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 @@
1
+ {"version":3,"names":["memo","StyleSheet","Text","View","Icon","useTheme","Button","EMPTY_STATE_ICON_SIZE","emptyStateStructure","resolveEmptyStateColors","jsx","_jsx","jsxs","_jsxs","ICON_STROKE","EmptyState","icon","title","description","action","style","testID","theme","colors","children","undefined","accessibilityElementsHidden","importantForAccessibility","name","size","color","strokeWidth","fontStyleForWeight","fontWeights","bold","styles","text","fontSize","fontSizes","lg","sm","label","onPress","tone","variant","create","textAlign"],"sourceRoot":"../../../../src","sources":["modules/empty-state/EmptyState.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAErD,SAASC,IAAI,QAAQ,0BAAiB;AAGtC,SAASC,QAAQ,QAAQ,sBAAa;AACtC,SAASC,MAAM,QAAQ,oBAAW;AAElC,SAASC,qBAAqB,EAAEC,mBAAmB,EAAEC,uBAAuB,QAAQ,0BAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAiB5G;AACA;AACA,MAAMC,WAAW,GAAG,GAAG;AAEvB,O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AK,EAAEP,MAAM,CAACL;MAAY,CAAC,CAAE;MAAAM,QAAA,EACrFN;IAAW,CACR,CACP,EACAC,MAAM,KAAKM,SAAS,iBACnBd,IAAA,CAACL,MAAM;MAACmC,KAAK,EAAEtB,MAAM,CAACsB,KAAM;MAACC,OAAO,EAAEvB,MAAM,CAACuB,OAAQ;MAACC,IAAI,EAAC,QAAQ;MAACC,OAAO,EAAC;IAAO,CAAE,CACtF;EAAA,CACG,CAAC;AAEX,CAAC,CAAC;AAEF,MAAMT,MAAM,GAAGlC,UAAU,CAAC4C,MAAM,CAAC;EAC/BT,IAAI,EAAE;IAAEU,SAAS,EAAE;EAAS;AAC9B,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * EmptyState's style resolution — same split as `Card.variants` / `Divider.variants`:
5
+ * - STRUCTURE (centring, padding, the vertical rhythm between icon / title / description /
6
+ * action) lives in the themed `emptyStateStructure` resolver, static per (brand, mode),
7
+ * registered once via `StyleSheet.create`. There is no `variant`/`size`/`tone` to select
8
+ * between — one visual identity, same reasoning `Divider`/`Avatar` give for their own single
9
+ * identity.
10
+ * - COLOUR is resolved from the theme's ROLE colours by `resolveEmptyStateColors`, never a raw
11
+ * ramp and never a hardcoded hex.
12
+ *
13
+ * Free of React and lucide, so the WCAG test imports this directly (mocking only `react-native`'s
14
+ * `StyleSheet`, as `core/style` and every sibling module's tests do).
15
+ */
16
+
17
+ import { createThemedVariants } from "../../core/style/index.js";
18
+
19
+ /**
20
+ * The icon glyph's rendered size, in dp. A component design constant — same status `Button`'s
21
+ * `ICON_STROKE` / `BUTTON_SIZES.*.iconSize` have — not on the theme's numeric scale: EmptyState
22
+ * takes no `size` prop, so there is exactly one icon size, deliberately large since it is the
23
+ * focal point of an otherwise mostly-empty layout.
24
+ */
25
+ export const EMPTY_STATE_ICON_SIZE = 48;
26
+ /**
27
+ * Maps EmptyState onto the theme's role colours. No `tone`/`color` prop to widen — every colour
28
+ * this component can show is one of these role lookups (same reasoning as `Divider`/`Avatar`), so
29
+ * it inverts light↔dark for free and can never be an off-palette value an app invented.
30
+ */
31
+ export function resolveEmptyStateColors(colors) {
32
+ return {
33
+ icon: colors.fg.muted,
34
+ title: colors.fg.default,
35
+ description: colors.fg.muted
36
+ };
37
+ }
38
+
39
+ /**
40
+ * Structural styles only — centring, padding, and the vertical rhythm between children. No
41
+ * colours (those are resolved separately and applied inline over this) and no closed union to
42
+ * select, so this compiles once per theme identity via the `WeakMap`-cached themed resolver and
43
+ * never rebuilds per render.
44
+ */
45
+ export const emptyStateStructure = createThemedVariants(theme => ({
46
+ base: {
47
+ alignItems: "center",
48
+ justifyContent: "center",
49
+ paddingHorizontal: theme.space[6],
50
+ paddingVertical: theme.space[8],
51
+ rowGap: theme.space[3]
52
+ }
53
+ }));
54
+ //# sourceMappingURL=EmptyState.variants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createThemedVariants","EMPTY_STATE_ICON_SIZE","resolveEmptyStateColors","colors","icon","fg","muted","title","default","description","emptyStateStructure","theme","base","alignItems","justifyContent","paddingHorizontal","space","paddingVertical","rowGap"],"sourceRoot":"../../../../src","sources":["modules/empty-state/EmptyState.variants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,oBAAoB,QAAQ,2BAAkB;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAAG,EAAE;AAWvC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CAACC,MAAkB,EAAoB;EAC5E,OAAO;IACLC,IAAI,EAAED,MAAM,CAACE,EAAE,CAACC,KAAK;IACrBC,KAAK,EAAEJ,MAAM,CAACE,EAAE,CAACG,OAAO;IACxBC,WAAW,EAAEN,MAAM,CAACE,EAAE,CAACC;EACzB,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,mBAAmB,GAAGV,oBAAoB,CAAEW,KAAY,KAAM;EACzEC,IAAI,EAAE;IACJC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,iBAAiB,EAAEJ,KAAK,CAACK,KAAK,CAAC,CAAC,CAAC;IACjCC,eAAe,EAAEN,KAAK,CAACK,KAAK,CAAC,CAAC,CAAC;IAC/BE,MAAM,EAAEP,KAAK,CAACK,KAAK,CAAC,CAAC;EACvB;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,78 @@
1
+ # empty-state/ — a centred placeholder for "nothing here yet" / zero-result states
2
+
3
+ `EmptyState` groups an optional decorative icon, a required title, an optional description, and an
4
+ optional call-to-action into one centred column. It takes no closed union of its own — one visual
5
+ identity, same reasoning `Divider`/`Avatar` give for theirs.
6
+
7
+ ## Files
8
+
9
+ | File | Role |
10
+ |------|------|
11
+ | `EmptyState.tsx` | The component. Resolves role colours + the themed structural style, composes the optional icon/description/action, `style` last. |
12
+ | `EmptyState.variants.ts` | Pure resolver (`resolveEmptyStateColors`) + the themed structural variant resolver `emptyStateStructure` + the `EMPTY_STATE_ICON_SIZE` constant. No React, no lucide. |
13
+ | `index.ts` | Public surface: `EmptyState`, `EmptyStateProps`, `EmptyStateAction`, `IconName` (re-exported from `core/icon`). |
14
+ | `__tests__/EmptyState.test.ts` | Pure: WCAG 1.4.3 (title + description, all brands × modes), the icon's 3:1 non-text floor, the colour-mapping contract, `EMPTY_STATE_ICON_SIZE`. |
15
+ | `__tests__/EmptyState.render.test.tsx` | Render: title/description compose, `testID` forwards, icon absent vs. hidden-from-AT, the composed action `Button` fires `onPress` and carries its label as the accessible name, consumer `style` applies last. |
16
+
17
+ ## Props
18
+
19
+ | Prop | Type | Default | Notes |
20
+ |------|------|---------|-------|
21
+ | `icon` | `IconName` | — | A NAME from the closed 22-name catalogue, never a `ReactNode`. Decorative — hidden from assistive tech. |
22
+ | `title` | `string` | — | Required. Rendered bold, `fg.default`, centred. |
23
+ | `description` | `string` | — | Optional. Rendered `fg.muted`, centred, below the title. |
24
+ | `action` | `{ label: string; onPress: () => void }` | — | Optional. Rendered via this library's own `Button` (`tone="accent" variant="solid"`) — a justified composition, same reasoning `AlertDialog` documents for its own footer buttons. |
25
+ | `style` | `LayoutStyle` | — | Layout-only, outermost, applied exactly once, last. |
26
+ | `testID` | `string` | — | Forwarded to the outermost `View`; the icon wrapper (when rendered) gets `${testID}-icon`. |
27
+
28
+ `EmptyState` has no `variant`/`size`/`tone` — there is exactly one visual identity, so there is
29
+ nothing to close a union over (same reasoning `Card`'s single-background siblings `Divider` and
30
+ `Avatar` give for their own props that take no appearance union).
31
+
32
+ ## Why the action composes `Button` instead of a hand-rolled `Pressable`
33
+
34
+ A call-to-action is a real interactive control — it needs press/focus feedback, a 44dp touch
35
+ target, and disabled/busy affordances if the app ever needs them. Reimplementing that here would
36
+ duplicate `Button`'s tested wiring for no benefit, so `EmptyState` imports the stable `../button`
37
+ module and renders it with `tone="accent" variant="solid"`, matching `AlertDialog`'s footer-button
38
+ composition and `Select`'s reuse of stable siblings.
39
+
40
+ ## Accessibility contract (WCAG)
41
+
42
+ - **No `accessibilityRole` of its own.** Like `Card`, this is a plain grouping container — the
43
+ title and description read as their own `Text` elements, in document order, and the composed
44
+ `Button` carries its own role/state. There is nothing here for assistive tech to announce beyond
45
+ its children.
46
+ - **Icon is decorative.** Redundant with the visible title, so its wrapper carries
47
+ `accessibilityElementsHidden` + `importantForAccessibility="no-hide-descendants"` — the same
48
+ contract `Avatar`/`Skeleton` give their own decorative default — rather than being announced as
49
+ a second, unexplained element.
50
+ - **1.4.3** — the title and description both clear ≥ 4.5:1 against `bg.canvas`, measured for all 8
51
+ brands × both modes (`EmptyState.test.ts`).
52
+ - **1.4.11 / icon** — N/A: the icon is hidden from assistive tech, so 1.4.11 does not bind it
53
+ (same reasoning `Divider.test.ts` documents for its own decorative colour). Its ≥ 3:1 floor
54
+ against `bg.canvas` is still measured anyway, so a future edit can't silently regress it to
55
+ something illegible for sighted users.
56
+ - **2.3.3 (reduced motion)** — N/A. `EmptyState` has no animation of its own; the composed
57
+ `Button` handles its own press-fade suppression.
58
+ - **Touch target (2.5.x)** — N/A for `EmptyState` itself (not interactive); the composed `Button`
59
+ meets its own 44dp floor.
60
+
61
+ ## Patterns copied from `button/` (the reference module)
62
+
63
+ 1. **Structure vs colour split.** Static/theme-numeric structure (padding, the vertical rhythm
64
+ between icon/title/description/action) → `createThemedVariants` (registered once per theme).
65
+ Colour → resolved from role tokens by `resolveEmptyStateColors`, applied inline.
66
+ 2. **Pure, testable resolver** in `EmptyState.variants.ts` (no React/lucide) so the WCAG contract
67
+ is unit-tested by measuring real palettes — never eyeballed.
68
+ 3. **`icon` as a NAME**, `style: LayoutStyle` last and once, no `{...rest}`, internals never
69
+ receive consumer style.
70
+ 4. **Justified composition of a stable sibling** (`Button`), not a re-implementation.
71
+
72
+ ## Known gaps
73
+
74
+ None — no new icon, no new theme token, no new core helper needed for this component.
75
+
76
+ ## Performance
77
+
78
+ Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). Its one library child, `Button`, receives `action.label`/`action.onPress` straight from the consumer's own `action` object, not a freshly-derived closure — nothing to memoize.
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Public surface of `pixelize-native-library/empty-state`. Value exports and type exports are split
5
+ * for `verbatimModuleSyntax`. The style/colour resolvers (`resolveEmptyStateColors`,
6
+ * `emptyStateStructure`) stay internal — a consumer configures an EmptyState through its props,
7
+ * never by importing its internals.
8
+ */
9
+
10
+ export { EmptyState } from "./EmptyState.js";
11
+
12
+ // Re-exported so a caller can type an `icon` prop without a separate import from `core/icon`.
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["EmptyState"],"sourceRoot":"../../../../src","sources":["modules/empty-state/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,iBAAc;;AAGzC","ignoreList":[]}
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * FileUpload — a trigger `Button` that opens a native picker and reports the picked LOCAL file back
5
+ * through the controlled `onChange`. No network upload logic lives here: turning the returned `uri`
6
+ * into a real upload is the consumer's job.
7
+ *
8
+ * The first module in this library with a genuine native-picker dependency. `expo-image-picker`/
9
+ * `expo-document-picker` are optional peers (see package.json) imported PLAIN at the top of
10
+ * `FileUpload.variants.ts` — the established `core/icon` pattern for an optional-peer native
11
+ * dependency (no lazy-loading gymnastics): per-component subpath exports already mean this module's
12
+ * code, and everything it imports, loads only when a consumer imports `pixelize-native-library/file-upload`
13
+ * at all. Because the import is unconditional, a consumer needs BOTH packages installed even if they
14
+ * only ever pass `source="document"` in their app — the same tradeoff `core/icon` already makes for
15
+ * `lucide-react-native` + `react-native-svg` (a Button that renders no icon still requires both).
16
+ *
17
+ * Composes the library's own `Button` for BOTH interactive elements (the trigger AND the "remove"
18
+ * control) rather than hand-rolling a `Pressable` — see MODULE.md "Why this module has no colour
19
+ * resolver" for why that's a deliberate departure from every sibling module's structure/colour split.
20
+ */
21
+
22
+ import { memo, useCallback, useState } from "react";
23
+ import { StyleSheet, Text, View } from "react-native";
24
+ import { useTheme } from "../../theme/index.js";
25
+ import { Button } from "../button/index.js";
26
+ import { FILE_UPLOAD_PICK_ERROR_MESSAGE, fileUploadContainerStructure, fileUploadRowStructure, pickDocumentFile, pickImageFile, resolveFileUploadRemoveLabel, resolveFileUploadTriggerLabel } from "./FileUpload.variants.js";
27
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
+ export const FileUpload = /*#__PURE__*/memo(function FileUpload(props) {
29
+ const {
30
+ source,
31
+ label,
32
+ value = null,
33
+ onChange,
34
+ size = "md",
35
+ disabled = false,
36
+ allowedMimeTypes,
37
+ allowsEditing = false,
38
+ style,
39
+ testID
40
+ } = props;
41
+ const theme = useTheme();
42
+ // Distinct from `value`: a pick attempt can fail (denied permission, or any other native error)
43
+ // independently of whether a file was already selected — see `openPicker`'s catch block.
44
+ const [pickError, setPickError] = useState(false);
45
+ const openPicker = useCallback(async () => {
46
+ if (disabled) return;
47
+ setPickError(false);
48
+ try {
49
+ const picked = source === "image" ? await pickImageFile(allowsEditing) : await pickDocumentFile(allowedMimeTypes);
50
+ // `picked` is `null` for a user cancel too — `onChange` must not fire then, or a voluntary
51
+ // "never mind" would wipe out whatever was already selected.
52
+ if (picked) onChange(picked);
53
+ } catch (error) {
54
+ // A rejection (denied/undetermined permission, or any other native failure) is the one case
55
+ // that DOES clear the value — the pick attempt genuinely failed, so the field can't claim to
56
+ // still hold whatever was selected before. Never crashes, never swallowed silently: the error
57
+ // row below announces it, and — mirroring `PixelizeProvider`'s own dev-warning convention,
58
+ // the only console usage in this codebase — a console warning names the likely cause for the
59
+ // developer. Gated the identical way: skipped only when `__DEV__` is DEFINITELY false.
60
+ onChange(null);
61
+ setPickError(true);
62
+ const isDefinitelyProd = typeof __DEV__ !== "undefined" && !__DEV__;
63
+ if (!isDefinitelyProd) {
64
+ console.warn("[pixelize-native-library] <FileUpload> couldn't open the picker — likely a denied " + "permission or missing platform config (Info.plist / AndroidManifest usage strings).", error);
65
+ }
66
+ }
67
+ }, [disabled, source, allowsEditing, allowedMimeTypes, onChange]);
68
+
69
+ // Stable wrapper so `Button`'s `onPress` reference doesn't churn every render — `openPicker`
70
+ // itself is async and can't be passed directly (the promise must be discarded).
71
+ const handlePick = useCallback(() => {
72
+ void openPicker();
73
+ }, [openPicker]);
74
+ const handleRemove = useCallback(() => {
75
+ setPickError(false);
76
+ onChange(null);
77
+ }, [onChange]);
78
+ return /*#__PURE__*/_jsxs(View, {
79
+ testID: testID,
80
+ style: [fileUploadContainerStructure(theme), style],
81
+ children: [/*#__PURE__*/_jsx(Button, {
82
+ label: label,
83
+ icon: "upload",
84
+ onPress: handlePick,
85
+ disabled: disabled,
86
+ size: size,
87
+ accessibilityLabel: resolveFileUploadTriggerLabel(label, value),
88
+ testID: testID ? `${testID}-trigger` : undefined
89
+ }), value && /*#__PURE__*/_jsxs(View, {
90
+ testID: testID ? `${testID}-row` : undefined,
91
+ style: [fileUploadRowStructure(theme), {
92
+ borderColor: theme.colors.border.interactive,
93
+ backgroundColor: theme.colors.bg.surface
94
+ }],
95
+ children: [/*#__PURE__*/_jsx(Text, {
96
+ numberOfLines: 1,
97
+ style: [theme.fontStyleForWeight(theme.fontWeights.regular), {
98
+ flex: 1,
99
+ fontSize: theme.fontSizes.md,
100
+ color: theme.colors.fg.default
101
+ }, disabled && styles.dimmedText],
102
+ children: value.name
103
+ }), /*#__PURE__*/_jsx(Button, {
104
+ icon: "trash",
105
+ accessibilityLabel: resolveFileUploadRemoveLabel(value.name),
106
+ onPress: handleRemove,
107
+ disabled: disabled,
108
+ size: "sm",
109
+ variant: "ghost",
110
+ tone: "neutral",
111
+ testID: testID ? `${testID}-remove` : undefined
112
+ })]
113
+ }), pickError && /*#__PURE__*/_jsx(Text, {
114
+ accessibilityLiveRegion: "polite",
115
+ style: [theme.fontStyleForWeight(theme.fontWeights.regular), {
116
+ fontSize: theme.fontSizes.xs,
117
+ color: theme.colors.status.danger.text
118
+ }],
119
+ children: FILE_UPLOAD_PICK_ERROR_MESSAGE
120
+ })]
121
+ });
122
+ });
123
+ const styles = StyleSheet.create({
124
+ // A disabled control is exempt from the contrast minimum (WCAG 1.4.3) — same uniform dim every
125
+ // other module uses. Scoped to the filename `Text` alone, not the row: the row's own `Button`
126
+ // (remove) already dims itself when `disabled`, so dimming the row's container too would compound
127
+ // both opacities on that button.
128
+ dimmedText: {
129
+ opacity: 0.5
130
+ }
131
+ });
132
+ //# sourceMappingURL=FileUpload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["memo","useCallback","useState","StyleSheet","Text","View","useTheme","Button","FILE_UPLOAD_PICK_ERROR_MESSAGE","fileUploadContainerStructure","fileUploadRowStructure","pickDocumentFile","pickImageFile","resolveFileUploadRemoveLabel","resolveFileUploadTriggerLabel","jsx","_jsx","jsxs","_jsxs","FileUpload","props","source","label","value","onChange","size","disabled","allowedMimeTypes","allowsEditing","style","testID","theme","pickError","setPickError","openPicker","picked","error","isDefinitelyProd","__DEV__","console","warn","handlePick","handleRemove","children","icon","onPress","accessibilityLabel","undefined","borderColor","colors","border","interactive","backgroundColor","bg","surface","numberOfLines","fontStyleForWeight","fontWeights","regular","flex","fontSize","fontSizes","md","color","fg","default","styles","dimmedText","name","variant","tone","accessibilityLiveRegion","xs","status","danger","text","create","opacity"],"sourceRoot":"../../../../src","sources":["modules/file-upload/FileUpload.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AACnD,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAGrD,SAASC,QAAQ,QAAQ,sBAAa;AACtC,SAASC,MAAM,QAAQ,oBAAW;AAElC,SACEC,8BAA8B,EAC9BC,4BAA4B,EAC5BC,sBAAsB,EACtBC,gBAAgB,EAChBC,aAAa,EACbC,4BAA4B,EAC5BC,6BAA6B,QACxB,0BAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA0B/B,OAAO,MAAMC,UAAU,gBAAGnB,IAAI,CAAC,SAASmB,UAAUA,CAACC,KAAsB,EAAE;EACzE,MAAM;IACJC,MAAM;IACNC,KAAK;IACLC,KAAK,GAAG,IAAI;IACZC,QAAQ;IACRC,IAAI,GAAG,IAAI;IACXC,QAAQ,GAAG,KAAK;IAChBC,gBAAgB;IAChBC,aAAa,GAAG,KAAK;IACrBC,KAAK;IACLC;EACF,CAAC,GAAGV,KAAK;EAET,MAAMW,KAAK,GAAGzB,QAAQ,CAAC,CAAC;EACxB;EACA;EACA,MAAM,CAAC0B,SAAS,EAAEC,YA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AI,EAAC,SAAS;QACdxC,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,SAAS,GAAGiB;MAAU,CACjD,CAAC;IAAA,CACE,CACP,EAEAf,SAAS,iBACRhB,IAAA,CAACZ,IAAI;MACHmE,uBAAuB,EAAC,QAAQ;MAChC1C,KAAK,EAAE,CACLE,KAAK,CAACyB,kBAAkB,CAACzB,KAAK,CAAC0B,WAAW,CAACC,OAAO,CAAC,EACnD;QAAEE,QAAQ,EAAE7B,KAAK,CAAC8B,SAAS,CAACW,EAAE;QAAET,KAAK,EAAEhC,KAAK,CAACkB,MAAM,CAACwB,MAAM,CAACC,MAAM,CAACC;MAAK,CAAC,CACxE;MAAAhC,QAAA,EAEDnC;IAA8B,CAC3B,CACP;EAAA,CACG,CAAC;AAEX,CAAC,CAAC;AAEF,MAAM0D,MAAM,GAAG/D,UAAU,CAACyE,MAAM,CAAC;EAC/B;EACA;EACA;EACA;EACAT,UAAU,EAAE;IAAEU,OAAO,EAAE;EAAI;AAC7B,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * FileUpload's pure logic: the native-picker calls, the raw-result → `FileUploadResult` mapping,
5
+ * the accessible-name derivation, and the structural resolvers.
6
+ *
7
+ * This is the one module in the library whose "pure" file is NOT free of a native runtime import —
8
+ * every sibling's `*.variants.ts` header says "free of React and of any native/lucide import"
9
+ * because that module owns no native call of its own. FileUpload does: `pickImageFile`/
10
+ * `pickDocumentFile` call `expo-image-picker`/`expo-document-picker` directly, PLAIN top-level
11
+ * imports (no lazy-loading), the same established pattern `core/icon` uses for its optional-peer
12
+ * native deps. Colocating the call with its own result-mapping keeps both testable the same way —
13
+ * `FileUpload.test.ts` mocks the two packages at the module level and asserts on the real call
14
+ * (options forwarded, cancel vs success vs rejection) — rather than splitting "call" (untestable
15
+ * without mounting) from "map" (pure) across files. Both packages are already mandatory peers for
16
+ * this subpath regardless of which `source` a given instance uses (see `FileUpload.tsx`'s header),
17
+ * so this adds no new install requirement.
18
+ *
19
+ * Free of React, so this file (and `FileUpload.test.ts`) never needs `@testing-library/react-native`
20
+ * — only `react-native`'s `StyleSheet` is mocked to identity, same as every sibling's pure test.
21
+ */
22
+
23
+ import * as DocumentPicker from "expo-document-picker";
24
+ import * as ImagePicker from "expo-image-picker";
25
+ import { createThemedVariants } from "../../core/style/index.js";
26
+ /** Shown below the control when a pick attempt fails outright (see `FileUpload.tsx`'s `openPicker`). */
27
+ export const FILE_UPLOAD_PICK_ERROR_MESSAGE = "Couldn't open the picker. Check that photo or file access is allowed, then try again.";
28
+
29
+ /**
30
+ * Falls back to the URI's last path segment when a picker doesn't supply a name —
31
+ * `ImagePickerAsset.fileName` can be `null` "when the name is unavailable or the user gave limited
32
+ * permission to access the media library" (its own doc comment). Strips a query/fragment first (a
33
+ * content:// or blob-style URI can carry one), then decodes percent-escapes so the displayed name
34
+ * reads like a normal filename instead of `my%20photo.jpg`.
35
+ */
36
+ export function fileNameFromUri(uri) {
37
+ const withoutQuery = uri.split(/[?#]/)[0] ?? uri;
38
+ const segments = withoutQuery.split("/");
39
+ const last = segments[segments.length - 1];
40
+ if (!last) return uri;
41
+ try {
42
+ return decodeURIComponent(last);
43
+ } catch {
44
+ // A malformed percent-escape (rare, but `decodeURIComponent` throws on one) — the raw segment
45
+ // is still a usable, if unprettified, name; never let a display-name fallback itself crash.
46
+ return last;
47
+ }
48
+ }
49
+
50
+ /**
51
+ * Maps `ImagePicker.launchImageLibraryAsync`'s result onto the public shape. `null` for a user
52
+ * cancellation (`canceled: true`) AND, defensively, for an empty `assets` array — the type allows
53
+ * it even though a single, non-multi-select call should never resolve that way. The caller (`
54
+ * FileUpload.tsx`) is the one that decides what a `null` MEANS (cancel → leave `value` alone,
55
+ * reject → clear it) by checking `result.canceled` itself; this function only normalizes the shape.
56
+ */
57
+ export function resolveImagePickResult(result) {
58
+ if (result.canceled) return null;
59
+ const asset = result.assets[0];
60
+ if (!asset) return null;
61
+ return {
62
+ uri: asset.uri,
63
+ name: asset.fileName ?? fileNameFromUri(asset.uri),
64
+ size: asset.fileSize,
65
+ mimeType: asset.mimeType
66
+ };
67
+ }
68
+
69
+ /** Maps `DocumentPicker.getDocumentAsync`'s result onto the public shape — same `canceled`/empty-array handling as `resolveImagePickResult`. `DocumentPickerAsset.name` is always present, so no filename fallback is needed. */
70
+ export function resolveDocumentPickResult(result) {
71
+ if (result.canceled) return null;
72
+ const asset = result.assets[0];
73
+ if (!asset) return null;
74
+ return {
75
+ uri: asset.uri,
76
+ name: asset.name,
77
+ size: asset.size,
78
+ mimeType: asset.mimeType
79
+ };
80
+ }
81
+
82
+ /**
83
+ * Opens the OS media-library picker and returns the normalized result, or `null` on cancel.
84
+ *
85
+ * Deliberately calls NO permission API first. Read directly from the installed `expo-image-picker`
86
+ * (v57)'s own native source: `launchImageLibraryAsync` with the default (non-editing) options never
87
+ * touches the media-library permission requester at all on either platform —
88
+ * `ImagePickerModule.swift`'s `launchImageLibraryAsync` goes straight to `launchMultiSelectPicker`
89
+ * (`PHPickerViewController`, permission-less by OS design) whenever `allowsEditing` is false, and
90
+ * `ImagePickerModule.kt`'s `launchImageLibraryAsync` never calls its permission helper either
91
+ * (unlike `launchCameraAsync`, which explicitly does on both platforms). So the "modern
92
+ * limited-access picker flow doesn't require an explicit permission request" is not a guess here —
93
+ * it's what the native module actually does for this call shape.
94
+ *
95
+ * `allowsEditing: true` is the one case that's genuinely uncertain: it routes iOS through the
96
+ * LEGACY `UIImagePickerController`, which (per Apple's own OS behaviour, outside this module's
97
+ * code) can trigger the native photo-library permission prompt on first use — see the "Known gaps"
98
+ * note in MODULE.md. Either way, this function does not special-case it: a rejection (denied
99
+ * permission, or any other native failure) simply propagates to the caller, which is the ONE place
100
+ * — `FileUpload.tsx`'s `openPicker` — that decides how to surface it (clear `value`, show the
101
+ * error row, warn in dev). A `canceled: true` resolution and a thrown rejection are the two
102
+ * possible "nothing was picked" outcomes; this function does not conflate them.
103
+ */
104
+ export async function pickImageFile(allowsEditing) {
105
+ const result = await ImagePicker.launchImageLibraryAsync({
106
+ allowsEditing
107
+ });
108
+ return resolveImagePickResult(result);
109
+ }
110
+
111
+ /**
112
+ * Opens the OS document picker and returns the normalized result, or `null` on cancel.
113
+ * `expo-document-picker` exposes no permission API whatsoever — it's backed by the platform's own
114
+ * file-picker UI (iOS Files / Android Storage Access Framework), which is inherently
115
+ * permission-less: the user grants access to the one file they pick, not to a library.
116
+ */
117
+ export async function pickDocumentFile(allowedMimeTypes) {
118
+ const result = await DocumentPicker.getDocumentAsync({
119
+ type: allowedMimeTypes
120
+ });
121
+ return resolveDocumentPickResult(result);
122
+ }
123
+
124
+ /**
125
+ * The trigger Button's accessible name — folds in the current selection so a screen-reader user
126
+ * learns the state without needing to reach the separate "selected file" row. Reuses Button's own
127
+ * `accessibilityLabel` prop (never a second, parallel a11y mechanism) — see MODULE.md.
128
+ */
129
+ export function resolveFileUploadTriggerLabel(label, value) {
130
+ return value ? `${label}. Selected: ${value.name}` : label;
131
+ }
132
+
133
+ /**
134
+ * The remove control's accessible name — one announcement naming BOTH the target and the action,
135
+ * matching how a screen reader should read a removable chip (e.g. "Selected file: report.pdf,
136
+ * remove"). The filename `Text` next to it is decorative (hidden from the accessibility tree, same
137
+ * reasoning as `Input.tsx`'s visible label), so this is the only place that name reaches AT.
138
+ */
139
+ export function resolveFileUploadRemoveLabel(fileName) {
140
+ return `Selected file: ${fileName}, remove`;
141
+ }
142
+
143
+ /**
144
+ * Root container — a vertical stack with a gap between the trigger, the optional "selected file"
145
+ * row, and the optional error message. `alignSelf: "flex-start"` is a deliberate, explicit default
146
+ * (not an omission): unlike `Select`/`MultiSelect`, which force `alignSelf: "stretch"` because they
147
+ * ARE an Input-box replica meant to span a form row, FileUpload's trigger is a plain `Button` (which
148
+ * hugs its own content width) — hard-coding a predictable "hug content" default here, rather than
149
+ * silently inheriting whatever `alignItems` the parent happens to have, means a consumer who DOES
150
+ * want it to span a row opts in explicitly via `style={{ alignSelf: "stretch" }}` (a `LayoutStyle`
151
+ * key), instead of the result depending on ambient parent layout.
152
+ */
153
+ export const fileUploadContainerStructure = createThemedVariants(theme => ({
154
+ base: {
155
+ alignSelf: "flex-start",
156
+ rowGap: theme.space[2]
157
+ }
158
+ }));
159
+
160
+ /**
161
+ * The "selected file" row — a bordered chip below the trigger. `border.interactive`, NOT the
162
+ * decorative `border.default`: `Card.variants.ts` documents `border.default` as measuring
163
+ * ~1.0–1.4:1 against `bg.surface` on every brand × mode — nowhere near a legible boundary. This row
164
+ * is a real UI grouping (WCAG 1.4.11), so it makes the identical substitution `Card`'s `outline`
165
+ * variant and `Button`'s `outline` variant both make, for the identical reason — measured against
166
+ * `bg.canvas` in `FileUpload.test.ts`, the same backdrop `Card.test.ts` uses for its own border.
167
+ */
168
+ export const fileUploadRowStructure = createThemedVariants(theme => ({
169
+ base: {
170
+ flexDirection: "row",
171
+ alignItems: "center",
172
+ columnGap: theme.space[2],
173
+ borderWidth: theme.borderWidths.thin,
174
+ borderRadius: theme.radii.base,
175
+ paddingHorizontal: theme.space[3],
176
+ paddingVertical: theme.space[2]
177
+ }
178
+ }));
179
+ //# sourceMappingURL=FileUpload.variants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DocumentPicker","ImagePicker","createThemedVariants","FILE_UPLOAD_PICK_ERROR_MESSAGE","fileNameFromUri","uri","withoutQuery","split","segments","last","length","decodeURIComponent","resolveImagePickResult","result","canceled","asset","assets","name","fileName","size","fileSize","mimeType","resolveDocumentPickResult","pickImageFile","allowsEditing","launchImageLibraryAsync","pickDocumentFile","allowedMimeTypes","getDocumentAsync","type","resolveFileUploadTriggerLabel","label","value","resolveFileUploadRemoveLabel","fileUploadContainerStructure","theme","base","alignSelf","rowGap","space","fileUploadRowStructure","flexDirection","alignItems","columnGap","borderWidth","borderWidths","thin","borderRadius","radii","paddingHorizontal","paddingVertical"],"sourceRoot":"../../../../src","sources":["modules/file-upload/FileUpload.variants.ts"],"mappings":";;AAAA;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GAAGhC,oBAAoB,CAAEiC,KAAY,KAAM;EAClFC,IAAI,EAAE;IACJC,SAAS,EAAE,YAAY;IACvBC,MAAM,EAAEH,KAAK,CAACI,KAAK,CAAC,CAAC;EACvB;AACF,CAAC,CAAC,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGtC,oBAAoB,CAAEiC,KAAY,KAAM;EAC5EC,IAAI,EAAE;IACJK,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,SAAS,EAAER,KAAK,CAACI,KAAK,CAAC,CAAC,CAAC;IACzBK,WAAW,EAAET,KAAK,CAACU,YAAY,CAACC,IAAI;IACpCC,YAAY,EAAEZ,KAAK,CAACa,KAAK,CAACZ,IAAI;IAC9Ba,iBAAiB,EAAEd,KAAK,CAACI,KAAK,CAAC,CAAC,CAAC;IACjCW,eAAe,EAAEf,KAAK,CAACI,KAAK,CAAC,CAAC;EAChC;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,130 @@
1
+ # file-upload/ — a trigger Button that opens a native image/document picker
2
+
3
+ `FileUpload` opens `expo-image-picker`'s `launchImageLibraryAsync` (`source="image"`) or
4
+ `expo-document-picker`'s `getDocumentAsync` (`source="document"`) and reports the picked LOCAL file
5
+ back through the controlled `onChange`. No network upload logic lives here — turning the returned
6
+ `uri` into a real upload is the consumer's job. First module with a genuine native-picker dependency,
7
+ and the first that composes a sibling module (`Button`) instead of hand-rolling its own `Pressable`.
8
+
9
+ ## Files
10
+
11
+ | File | Role |
12
+ |------|------|
13
+ | `FileUpload.tsx` | The component. Composes `Button` for BOTH the trigger and the "remove" control; owns the `pickError` state and the try/catch around the pick attempt. |
14
+ | `FileUpload.variants.ts` | The native-picker calls (`pickImageFile`, `pickDocumentFile`), the raw-result → `FileUploadResult` mappers, `fileNameFromUri`, the accessible-name resolvers, and the structural resolvers. Free of React, but — deliberately, unlike every sibling — NOT free of a native runtime import (see below). |
15
+ | `index.ts` | Public surface: `FileUpload`, `FileUploadProps`, `FileUploadResult`, `FileUploadSource`, `FileUploadSize`. |
16
+ | `__tests__/FileUpload.test.ts` | Pure: the native-picker calls (mocked `expo-image-picker`/`expo-document-picker`), result-mapping, `fileNameFromUri`, accessible-name resolvers, WCAG contrast (all brands × modes). |
17
+ | `__tests__/FileUpload.render.test.tsx` | Render: trigger press → picker → `onChange`, cancel leaves `value` untouched, the "selected file" row + remove control, `disabled`, a pick failure's error row + dev warning, `style` application. |
18
+
19
+ ## Props
20
+
21
+ | Prop | Type | Default | Notes |
22
+ |------|------|---------|-------|
23
+ | `source` | `"image" \| "document"` | — | Required, closed union — which native picker this instance uses. |
24
+ | `label` | `string` | — | Required. Trigger's visible label (e.g. `"Upload photo"`). Constant regardless of selection — pressing it again re-opens the picker and replaces the file; the "selected file" row communicates state, not the label. |
25
+ | `value` | `FileUploadResult \| null` | — | Controlled — the currently selected file, or none. |
26
+ | `onChange` | `(result: FileUploadResult \| null) => void` | — | Required. See "Three `onChange` outcomes" below. |
27
+ | `size` | `sm \| md \| lg` | `md` | Forwarded straight to the trigger `Button`'s own `size`. |
28
+ | `disabled` | `boolean` | `false` | Forwarded to both `Button`s (trigger and remove). |
29
+ | `allowedMimeTypes` | `string[]` | — | Document-only — forwarded as `DocumentPicker.getDocumentAsync`'s `type`. Ignored when `source` is `"image"`. |
30
+ | `allowsEditing` | `boolean` | `false` | Image-only — forwarded as `ImagePicker.launchImageLibraryAsync`'s `allowsEditing`. Ignored when `source` is `"document"`. `false` keeps the default permission-less picker flow — see "Permissions." |
31
+ | `style` | `LayoutStyle` | — | Layout-only, outermost, applied exactly once, last — the root `View` is the outermost node. |
32
+ | `testID` | `string` | — | Roots `${testID}-trigger`, `${testID}-row`, `${testID}-remove`. |
33
+
34
+ `FileUploadResult`: `{ uri: string; name: string; size?: number; mimeType?: string }`.
35
+
36
+ ## Three `onChange` outcomes
37
+
38
+ | Outcome | `onChange` called? | Why |
39
+ |---|---|---|
40
+ | User picks a file | Yes, with the mapped result | Normal path. |
41
+ | User cancels the picker | **No** | A voluntary "never mind" must not wipe out whatever was already selected. |
42
+ | Remove control pressed | Yes, with `null` | Explicit clear. |
43
+ | Pick attempt rejects (denied permission or any other native error) | Yes, with `null` | The attempt genuinely failed, so the field can't claim to still hold the prior selection. Also sets `pickError` (an error row + dev warning — see "Permissions"). |
44
+
45
+ `resolveImagePickResult`/`resolveDocumentPickResult` return `null` for both a cancel and an
46
+ (unexpected) empty `assets` array — they only normalize the shape. `openPicker` is the one place
47
+ that decides what `null` means: it calls `onChange` only when a file was actually picked
48
+ (`if (picked) onChange(picked)`), so a resolved cancel never reaches `onChange`.
49
+
50
+ ## Permissions — no upfront check/request, and why that's correct here
51
+
52
+ `FileUpload` calls **no** `requestMediaLibraryPermissionsAsync`/`getMediaLibraryPermissionsAsync`
53
+ before opening the image picker — read directly from the installed `expo-image-picker` (v57)'s own
54
+ native source, not assumed from docs:
55
+
56
+ - **iOS** (`ImagePickerModule.swift`): the default (non-editing) `launchImageLibraryAsync` presents a
57
+ `PHPickerViewController` (Apple's modern, permission-less picker). The permission-requester code is
58
+ wired only to the explicit permission calls and to `launchCameraAsync` — never to
59
+ `launchImageLibraryAsync`.
60
+ - **Android** (`ImagePickerModule.kt`): `launchImageLibraryAsync` launches the system Photo Picker
61
+ activity contract directly, with no permission check in between.
62
+ - `expo-document-picker` exposes **no permission API at all** — it's backed by the platform's own
63
+ file picker (iOS Files / Android SAF), inherently permission-less.
64
+
65
+ So for the default flow, "denied/undetermined permission" isn't a state to query in advance — it's
66
+ handled reactively: any rejection from `pickImageFile`/`pickDocumentFile` is caught in `openPicker`,
67
+ which clears `value` (`onChange(null)`), sets `pickError` (renders a `status.danger.text` message
68
+ with `accessibilityLiveRegion="polite"`, same pattern `Input.tsx`'s `errorText` uses), and warns via
69
+ `console.warn` — gated the same way `PixelizeProvider.tsx` gates its own dev-only warning (the only
70
+ other `console` usage in this codebase, reused rather than inventing a second convention).
71
+
72
+ **Known gap:** `allowsEditing: true` routes iOS through the LEGACY `UIImagePickerController`, which
73
+ can (per Apple's own OS behaviour, outside this module's code) trigger the native permission prompt
74
+ on first use. Whether a denial there surfaces as a rejection (→ caught) or `{ canceled: true }` (→
75
+ indistinguishable from a voluntary cancel) can't be observed without a device-level test;
76
+ `pickImageFile` does not special-case it. The default, non-editing flow never reaches this ambiguity.
77
+
78
+ ## Two departures from every sibling module
79
+
80
+ 1. **The native call lives in `.variants.ts`, not `.tsx`.** Every sibling's `*.variants.ts` header
81
+ says "free of React and of any native/lucide import" because that module owns no native call —
82
+ `pickImageFile`/`pickDocumentFile` genuinely call `expo-image-picker`/`expo-document-picker`.
83
+ Colocating the call with its result-mapping keeps both testable the same way: `FileUpload.test.ts`
84
+ mocks the two packages at the module level (the same technique used for `core/icon`/RN's own
85
+ `Modal` elsewhere) and asserts on the real call. The import is still PLAIN and top-level — no
86
+ lazy-loading — matching `core/icon`'s established pattern for an optional-peer native dependency;
87
+ moving it from `.tsx` to `.variants.ts` doesn't change loading semantics, both files ship in the
88
+ same subpath entry. A consumer needs BOTH packages installed once they import this subpath at all,
89
+ even if they only use one `source` — the identical tradeoff `core/icon` makes for
90
+ `lucide-react-native` + `react-native-svg`.
91
+ 2. **No colour resolver.** Every sibling has a `resolveXxxTone`/`resolveXxxStatus` mapping a closed
92
+ union onto `RoleColors`. FileUpload doesn't need one: **both** interactive elements it renders —
93
+ trigger and remove control — are the library's own `Button` (composed, not reimplemented, per the
94
+ project brief), which already owns its tone→role mapping, focus ring, and ≥44dp touch target.
95
+ The only colours FileUpload itself renders are non-branching single-role lookups — filename text
96
+ (`fg.default`), the row border (`border.interactive`, the same substitution `Card`'s `outline`
97
+ variant makes for `border.default`'s sub-3:1 problem), and the error message
98
+ (`status.danger.text`) — read directly in the component, same as `Input.tsx`'s label `Text`, and
99
+ measured directly (no resolver) in `FileUpload.test.ts`.
100
+
101
+ ## Accessibility contract (WCAG)
102
+
103
+ - **4.1.2** — trigger and remove control reuse `Button`'s own contract in full (role, state,
104
+ disabled/press gating, focus ring). Trigger's `accessibilityLabel` folds in the selection
105
+ (`"Upload photo. Selected: report.pdf"`); remove control's names target + action in one
106
+ announcement (`"Selected file: report.pdf, remove"`) since icon-only `Button` needs exactly one
107
+ accessible name.
108
+ - **1.3.1** — the filename `Text` is purely visual; the composed name above is the only place a
109
+ screen reader hears it, avoiding a double announcement.
110
+ - **1.4.3** — filename text and the error message measured ≥ 4.5:1 against `bg.canvas`, all 8
111
+ brands × both modes.
112
+ - **1.4.11** — the row's border (`border.interactive`) measured ≥ 3:1 against `bg.canvas`.
113
+ - **2.5.5 / 2.5.8** — both interactive elements are `Button` instances, inheriting its ≥44dp
114
+ guarantee directly — this module defines no touch-target arithmetic of its own.
115
+ - **4.1.3** — the error message carries `accessibilityLiveRegion="polite"`.
116
+ - Disabled dims the filename `Text` only (`opacity: 0.5`), not the row container — the row's own
117
+ remove `Button` already dims itself, and dimming the container too would compound both opacities.
118
+
119
+ ## Known gaps
120
+
121
+ - Single-file only — `allowsMultipleSelection`/`multiple` aren't exposed; a future
122
+ `multiple?: boolean` would need `FileUploadResult[]`, a real API change, not a quiet bolt-on.
123
+ - The `allowsEditing: true` legacy-picker permission-prompt ambiguity — see "Permissions" above.
124
+ - No upload progress/state — out of scope by design; the consumer composes that around the `uri`.
125
+ - No thumbnail/preview of a selected image — the row shows only the file name, matching how
126
+ `Input`/`Select` show text, not media. A future `previewImage?: boolean` is a reasonable v2.
127
+
128
+ ## Performance
129
+
130
+ Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). `openPicker` is `useCallback`'d; a new `handlePick` wrapper replaces the old inline `onPress={() => void openPicker()}` so the trigger `Button`'s `onPress` reference stays stable, and `handleRemove` is `useCallback`'d for the "remove" `Button` — both are this library's own `Button` instances, so stabilizing these closures is what keeps `Button`'s memo from being defeated.
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Public surface of `pixelize-native-library/file-upload`. Value exports and type exports are split for
5
+ * `verbatimModuleSyntax`. The picker calls, result resolvers, and structural resolvers stay
6
+ * internal — a consumer configures a FileUpload through its props, never by importing its internals.
7
+ */
8
+
9
+ export { FileUpload } from "./FileUpload.js";
10
+ //# sourceMappingURL=index.js.map