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,82 @@
1
+ # badge/ — non-interactive status/label chip
2
+
3
+ `Badge` renders a small status/label chip: subtle tinted fill, a coloured border, and a label
4
+ (with an optional leading icon). It is a `View`, never a `Pressable` — no press, focus, loading,
5
+ or disabled state.
6
+
7
+ ## Files
8
+
9
+ | File | Role |
10
+ |------|------|
11
+ | `Badge.tsx` | The component. Composition + a11y wiring only — no press/focus/animation logic. |
12
+ | `Badge.variants.ts` | Pure resolvers (`BADGE_SIZES`, `resolveBadgeTone`, `resolveBadgeAccessibility`) + the themed structural variant resolver `badgeStructure`. No React, no lucide. |
13
+ | `index.ts` | Public surface: `Badge`, `BadgeProps`, the closed unions, `IconName` (re-exported from `core/icon`). |
14
+ | `__tests__/Badge.test.ts` | Pure: WCAG contrast (all brands × modes) + accessibility contract. |
15
+ | `__tests__/Badge.render.test.tsx` | Render: tones, sizes, accessible name, optional icon. |
16
+
17
+ ## Props
18
+
19
+ | Prop | Type | Default | Notes |
20
+ |------|------|---------|-------|
21
+ | `tone` | `accent \| neutral \| success \| warning \| danger \| info` | `accent` | Closed union — see below. |
22
+ | `size` | `sm \| md` | `md` | 20 / 24 dp. No touch-target floor — not interactive. |
23
+ | `label` | `string` | — | Always required; a Badge is never icon-only. |
24
+ | `icon` | `IconName` | — | A NAME, never a `ReactNode`. Optional, leading only. |
25
+ | `style` | `LayoutStyle` | — | Layout-only, outermost, applied exactly once, last. |
26
+ | `testID` | `string` | — | |
27
+
28
+ ## Accessibility contract (WCAG)
29
+
30
+ - **4.1.2** — the chip is ONE accessible node: `accessible`, `accessibilityRole="text"`,
31
+ `accessibilityLabel={label}`. The icon (a plain SVG, not independently accessible) and the label
32
+ `Text` never surface as two separate elements to assistive tech.
33
+ - **1.4.3** — the label is the tone's derived `text` colour on the tone's `fill`, measured ≥ 4.5:1
34
+ for every tone × brand × mode (`Badge.test.ts`).
35
+ - **1.4.11** — the border clears ≥ 3:1 both against the canvas AND against the chip's own `fill`
36
+ (the two colours it's actually adjacent to), for every tone × brand × mode.
37
+ - No touch target / `hitSlop`, no focus ring, no reduced-motion handling — none apply. Badge is
38
+ non-interactive and has no animation to suppress.
39
+
40
+ ## Why `tone` is a union, not a `color`
41
+
42
+ Same reasoning as Button/Input: every colour a Badge can show is a role lookup
43
+ (`resolveBadgeTone`), guaranteed legible in both modes, never an app-invented hex. `accent`/
44
+ `neutral` mirror Button's tone shapes at "subtle" emphasis only (a badge never uses a solid fill —
45
+ it's a passive label, not a call-to-action). The four status tones map onto
46
+ `colors.status.<role>`.
47
+
48
+ ## A real gap this module found: `StatusColors.border` is not a badge border
49
+
50
+ The spec for this component assumed `status.<role>.border`, `.subtle`, and `.text` were all
51
+ already ≥ AA from `roleColors()`. Measuring (never assuming — see `Badge.test.ts`) found that
52
+ **`StatusColors.border` (`ramp[200]`) clears neither 3:1 against the canvas nor against its own
53
+ `subtle` fill, on any of the 8 brands × either mode** (as low as 1.26:1) — it is a decorative rung,
54
+ not a boundary one. `.solid` doesn't generalise as a fix either: `Input.variants.ts` already reads
55
+ it for `danger` alone and documents it clearing ≥ 3:1 everywhere, but measured here it fails for
56
+ `success`/`warning`/`info` in light mode (as low as 1.84:1).
57
+
58
+ The field that DOES clear ≥ 3:1 against both the canvas and the subtle fill, for every status role
59
+ × brand × mode, is `StatusColors.text` — so `resolveBadgeTone` reuses it as the border colour too.
60
+ This is a deliberate, measured substitution (see the comment in `Badge.variants.ts`), not a
61
+ shortcut — and it happens to read as the shadcn-style "coloured outline matching the label" look.
62
+ `accent`/`neutral` don't have this problem: `border.interactive` (the same outline Button's
63
+ `outline` variant uses) measures ≥ 3:1 against the canvas and against both subtle fills on every
64
+ brand × mode.
65
+
66
+ ## Patterns copied from Button/Input
67
+
68
+ 1. **Structure vs colour split.** Height/padding/radius/border WIDTH → `createThemedVariants`
69
+ (registered once per theme). Colour → resolved from role tokens per `tone`, applied inline.
70
+ 2. **Pure, testable resolvers** in `Badge.variants.ts` (no React/lucide) so the WCAG contract is
71
+ unit-tested by measuring real palettes — never eyeballed.
72
+ 3. **Closed unions only** (`tone`/`size`), `icon` as a NAME, `style: LayoutStyle` last and once, no
73
+ `{...rest}`.
74
+
75
+ ## Known gaps
76
+
77
+ - None outside the `StatusColors.border` finding documented above (which this module works
78
+ around at the component layer rather than editing the frozen `theme/tokens/`).
79
+
80
+ ## Performance
81
+
82
+ Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). Its one child, `Icon`, only ever receives primitives — nothing to memoize.
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Public surface of `pixelize-native-library/badge`. Value exports and type exports are split for
5
+ * `verbatimModuleSyntax`. The visual resolver (`resolveBadgeTone`, `BADGE_SIZES`, …) stays
6
+ * internal — a consumer configures a Badge through its props, never by importing its internals.
7
+ */
8
+
9
+ export { Badge } from "./Badge.js";
10
+
11
+ // Re-exported so a caller can type an `icon` prop without a separate import from `core/icon`.
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Badge"],"sourceRoot":"../../../../src","sources":["modules/badge/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,QAAQ,YAAS;;AAK/B","ignoreList":[]}
@@ -0,0 +1,257 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * BottomNav — a fixed bottom tab bar (core tab slots + a trailing "More" slot) that presents its
5
+ * overflow destinations, search, and the opt-in "Edit tabs" flow inside the library's OWN `Drawer`
6
+ * (`../drawer`), consumed exactly as any app would — through its public `index.ts`, never Drawer's
7
+ * internal `Drawer.variants.ts`. This is what satisfies reusing the existing bottom-sheet primitive
8
+ * instead of rebuilding slide/backdrop/dismiss mechanics from scratch: every one of Drawer's WCAG
9
+ * escape hooks (backdrop press, Android hardware back, iOS VoiceOver escape, the web-portal opt-in)
10
+ * is inherited for free.
11
+ *
12
+ * `BottomNav.tsx` owns only the fixed bar: per-tab focus tracking, the active-indicator render
13
+ * (presence/absence + a label-weight switch, never colour alone — see the accessibility contract in
14
+ * MODULE.md), wiring press → `onDestinationPress`, and closing the sheet after a sheet-row selection.
15
+ * The sheet's actual content (search, Recent, grouped sections, edit mode, no-results) is
16
+ * `BottomNavOverflowSheet` — a private sub-component in its own file, the same "this warrants its own
17
+ * file" call this library already made for Reorder's private `ReorderRow`.
18
+ *
19
+ * Every piece of state here was classified against one question: does anything OUTSIDE this
20
+ * component plausibly need to read or set it? `active`, `moreVisible`, `recent`, `coreTabs`, and
21
+ * `edit.editing` all answer yes (the app's own router/persistence owns them) and are therefore
22
+ * controlled props, never internal state — see MODULE.md's "Controlled-state contract" for the full,
23
+ * item-by-item reasoning. Only per-tab keyboard/AT focus is internal here, the same idiom
24
+ * Button/Input/Select already use for their own focus rings.
25
+ */
26
+
27
+ import { memo, useCallback, useMemo, useState } from "react";
28
+ import { Platform, Pressable, StyleSheet, Text, View } from "react-native";
29
+ import { Icon } from "../../core/icon/index.js";
30
+ import { useTheme } from "../../theme/index.js";
31
+ import { Button } from "../button/index.js";
32
+ import { Drawer } from "../drawer/index.js";
33
+ import { Menu } from "../menu/index.js";
34
+ import { BOTTOM_NAV_ICON_SIZE, bottomNavBarStructure, bottomNavTabStructure, resolveBottomNavAccessibility, resolveBottomNavBottomInset, resolveBottomNavTabColors } from "./BottomNav.variants.js";
35
+ import { BottomNavOverflowSheet } from "./BottomNavOverflowSheet.js";
36
+
37
+ /** Fully app-supplied. The library never hardcodes a destination's id, label, icon, or grouping. */
38
+
39
+ /**
40
+ * Discriminated, closed, and exhaustive — the ONE state fact BottomNav needs to render the right
41
+ * selection UI. New variants may be ADDED later (e.g. a future `{ kind: "search" }`); existing
42
+ * variants are never renamed or reshaped — see MODULE.md's API stability contract.
43
+ */
44
+
45
+ /**
46
+ * The whole "Edit tabs" feature is atomically opt-in — omit `edit` entirely and BottomNav renders NO
47
+ * edit affordance anywhere, byte-identical to a build of this module that never had the feature.
48
+ */
49
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
50
+ const ICON_STROKE = 2;
51
+ const DEFAULT_SEARCH_PLACEHOLDER = "Search";
52
+ const DEFAULT_RECENT_LABEL = "Recent";
53
+ const DEFAULT_NO_RESULTS_LABEL = "No matches";
54
+ const DEFAULT_MORE_QUICK_ACTIONS_LABEL = "More options";
55
+ // Nudges the quick-actions badge toward the More tab's corner without clipping its own ≥44dp target
56
+ // (Button's `hitSlop` still expands outward from this offset position).
57
+ const QUICK_ACTIONS_BADGE_OFFSET = -4;
58
+ // The active-tab dot — presence/absence conveys selection (WCAG 1.4.1), never a colour swap alone.
59
+ const ACTIVE_DOT_SIZE = 6;
60
+ // Stable identity so an omitted `recent` hands `BottomNavOverflowSheet` the SAME empty array every
61
+ // render, rather than a fresh `[]` literal that would defeat its memo.
62
+ const EMPTY_RECENT = [];
63
+
64
+ /** Which tab currently holds keyboard/AT focus — a discriminated shape (not a bare id) so the More
65
+ * tab, whose "id" isn't one of `coreTabs`, can't collide with a core tab that happens to share it. */
66
+
67
+ function focusRing(theme, testID) {
68
+ return /*#__PURE__*/_jsx(View, {
69
+ pointerEvents: "none",
70
+ testID: testID,
71
+ style: {
72
+ position: "absolute",
73
+ top: 0,
74
+ left: 0,
75
+ right: 0,
76
+ bottom: 0,
77
+ borderWidth: 2,
78
+ borderColor: theme.colors.border.focus,
79
+ borderRadius: theme.radii.base
80
+ }
81
+ });
82
+ }
83
+ export const BottomNav = /*#__PURE__*/memo(function BottomNav(props) {
84
+ const {
85
+ coreTabs,
86
+ active,
87
+ onDestinationPress,
88
+ moreLabel,
89
+ moreIcon,
90
+ moreVisible,
91
+ onMoreVisibleChange,
92
+ overflowSections,
93
+ recent,
94
+ searchPlaceholder = DEFAULT_SEARCH_PLACEHOLDER,
95
+ searchAccessibilityLabel,
96
+ recentLabel = DEFAULT_RECENT_LABEL,
97
+ noResultsLabel = DEFAULT_NO_RESULTS_LABEL,
98
+ edit,
99
+ moreQuickActions,
100
+ moreQuickActionsLabel = DEFAULT_MORE_QUICK_ACTIONS_LABEL,
101
+ style,
102
+ testID
103
+ } = props;
104
+ const theme = useTheme();
105
+ const [focused, setFocused] = useState(null);
106
+ const bottomInset = resolveBottomNavBottomInset(theme.space[2], Platform.OS);
107
+ const moreSelected = active.kind === "more";
108
+ const moreColors = resolveBottomNavTabColors(theme.colors, moreSelected);
109
+ const moreA11y = resolveBottomNavAccessibility({
110
+ selected: moreSelected,
111
+ expanded: moreVisible
112
+ });
113
+ const closeSheet = useCallback(() => onMoreVisibleChange(false), [onMoreVisibleChange]);
114
+ // Every navigation intent inside the sheet reports through the same `onDestinationPress` the core
115
+ // tabs use, then closes the sheet — see the interaction model in MODULE.md. Stable via useCallback
116
+ // so `BottomNavOverflowSheet`'s memo isn't defeated by a fresh closure every render.
117
+ const handleSheetPress = useCallback(id => {
118
+ onDestinationPress(id);
119
+ closeSheet();
120
+ }, [onDestinationPress, closeSheet]);
121
+
122
+ // Memoized so `Menu`'s own memo isn't defeated by a fresh trigger element every render.
123
+ const quickActionsTrigger = useMemo(() => /*#__PURE__*/_jsx(Button, {
124
+ icon: "more-horizontal",
125
+ variant: "ghost",
126
+ tone: "neutral",
127
+ size: "sm",
128
+ accessibilityLabel: moreQuickActionsLabel,
129
+ testID: testID ? `${testID}-more-quick-actions` : undefined
130
+ }), [moreQuickActionsLabel, testID]);
131
+ const sheetTestID = testID ? `${testID}-sheet` : undefined;
132
+ return /*#__PURE__*/_jsxs(_Fragment, {
133
+ children: [/*#__PURE__*/_jsxs(View, {
134
+ testID: testID,
135
+ accessibilityRole: "tablist",
136
+ style: [bottomNavBarStructure(theme), {
137
+ backgroundColor: theme.colors.bg.surface,
138
+ borderTopColor: theme.colors.border.default,
139
+ paddingBottom: bottomInset
140
+ }, style],
141
+ children: [coreTabs.map(tab => {
142
+ const selected = active.kind === "core" && active.id === tab.id;
143
+ const colors = resolveBottomNavTabColors(theme.colors, selected);
144
+ const a11y = resolveBottomNavAccessibility({
145
+ selected
146
+ });
147
+ const isFocused = focused?.kind === "core" && focused.id === tab.id;
148
+ const tabTestID = testID ? `${testID}-tab-${tab.id}` : undefined;
149
+ return /*#__PURE__*/_jsxs(Pressable, {
150
+ testID: tabTestID,
151
+ accessibilityRole: a11y.accessibilityRole,
152
+ accessibilityLabel: tab.accessibilityLabel ?? tab.label,
153
+ accessibilityState: a11y.accessibilityState,
154
+ onPress: () => onDestinationPress(tab.id),
155
+ onFocus: () => setFocused({
156
+ kind: "core",
157
+ id: tab.id
158
+ }),
159
+ onBlur: () => setFocused(prev => prev?.kind === "core" && prev.id === tab.id ? null : prev),
160
+ style: bottomNavTabStructure(theme),
161
+ children: [isFocused && focusRing(theme, tabTestID ? `${tabTestID}-focus-ring` : undefined), /*#__PURE__*/_jsx(Icon, {
162
+ name: tab.icon,
163
+ size: BOTTOM_NAV_ICON_SIZE,
164
+ color: colors.icon,
165
+ strokeWidth: ICON_STROKE
166
+ }), /*#__PURE__*/_jsx(Text, {
167
+ numberOfLines: 1,
168
+ style: [theme.fontStyleForWeight(selected ? theme.fontWeights.semibold : theme.fontWeights.regular), {
169
+ fontSize: theme.fontSizes.xs,
170
+ color: colors.label
171
+ }],
172
+ children: tab.label
173
+ }), selected && /*#__PURE__*/_jsx(View, {
174
+ testID: tabTestID ? `${tabTestID}-indicator` : undefined,
175
+ style: {
176
+ width: ACTIVE_DOT_SIZE,
177
+ height: ACTIVE_DOT_SIZE,
178
+ borderRadius: ACTIVE_DOT_SIZE / 2,
179
+ backgroundColor: colors.indicator
180
+ }
181
+ })]
182
+ }, tab.id);
183
+ }), /*#__PURE__*/_jsxs(View, {
184
+ style: styles.moreSlot,
185
+ children: [/*#__PURE__*/_jsxs(Pressable, {
186
+ testID: testID ? `${testID}-more` : undefined,
187
+ accessibilityRole: moreA11y.accessibilityRole,
188
+ accessibilityLabel: moreLabel,
189
+ accessibilityState: moreA11y.accessibilityState,
190
+ onPress: () => onMoreVisibleChange(true),
191
+ onFocus: () => setFocused({
192
+ kind: "more"
193
+ }),
194
+ onBlur: () => setFocused(prev => prev?.kind === "more" ? null : prev),
195
+ style: bottomNavTabStructure(theme),
196
+ children: [focused?.kind === "more" && focusRing(theme, testID ? `${testID}-more-focus-ring` : undefined), /*#__PURE__*/_jsx(Icon, {
197
+ name: moreIcon,
198
+ size: BOTTOM_NAV_ICON_SIZE,
199
+ color: moreColors.icon,
200
+ strokeWidth: ICON_STROKE
201
+ }), /*#__PURE__*/_jsx(Text, {
202
+ numberOfLines: 1,
203
+ style: [theme.fontStyleForWeight(moreSelected ? theme.fontWeights.semibold : theme.fontWeights.regular), {
204
+ fontSize: theme.fontSizes.xs,
205
+ color: moreColors.label
206
+ }],
207
+ children: moreLabel
208
+ }), moreSelected && /*#__PURE__*/_jsx(View, {
209
+ testID: testID ? `${testID}-more-indicator` : undefined,
210
+ style: {
211
+ width: ACTIVE_DOT_SIZE,
212
+ height: ACTIVE_DOT_SIZE,
213
+ borderRadius: ACTIVE_DOT_SIZE / 2,
214
+ backgroundColor: moreColors.indicator
215
+ }
216
+ })]
217
+ }), moreQuickActions !== undefined && /*#__PURE__*/_jsx(View, {
218
+ style: styles.quickActionsBadge,
219
+ children: /*#__PURE__*/_jsx(Menu, {
220
+ trigger: quickActionsTrigger,
221
+ items: moreQuickActions,
222
+ testID: testID ? `${testID}-more-quick-actions-menu` : undefined
223
+ })
224
+ })]
225
+ })]
226
+ }), /*#__PURE__*/_jsx(Drawer, {
227
+ visible: moreVisible,
228
+ onRequestClose: closeSheet,
229
+ testID: sheetTestID,
230
+ children: /*#__PURE__*/_jsx(BottomNavOverflowSheet, {
231
+ overflowSections: overflowSections,
232
+ recent: recent ?? EMPTY_RECENT,
233
+ coreTabs: coreTabs,
234
+ active: active,
235
+ onDestinationPress: handleSheetPress,
236
+ edit: edit,
237
+ searchPlaceholder: searchPlaceholder,
238
+ searchAccessibilityLabel: searchAccessibilityLabel ?? searchPlaceholder,
239
+ recentLabel: recentLabel,
240
+ noResultsLabel: noResultsLabel,
241
+ testID: sheetTestID
242
+ })
243
+ })]
244
+ });
245
+ });
246
+ const styles = StyleSheet.create({
247
+ moreSlot: {
248
+ flex: 1,
249
+ position: "relative"
250
+ },
251
+ quickActionsBadge: {
252
+ position: "absolute",
253
+ top: QUICK_ACTIONS_BADGE_OFFSET,
254
+ right: QUICK_ACTIONS_BADGE_OFFSET
255
+ }
256
+ });
257
+ //# sourceMappingURL=BottomNav.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["memo","useCallback","useMemo","useState","Platform","Pressable","StyleSheet","Text","View","Icon","useTheme","Button","Drawer","Menu","BOTTOM_NAV_ICON_SIZE","bottomNavBarStructure","bottomNavTabStructure","resolveBottomNavAccessibility","resolveBottomNavBottomInset","resolveBottomNavTabColors","BottomNavOverflowSheet","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ICON_STROKE","DEFAULT_SEARCH_PLACEHOLDER","DEFAULT_RECENT_LABEL","DEFAULT_NO_RESULTS_LABEL","DEFAULT_MORE_QUICK_ACTIONS_LABEL","QUICK_ACTIONS_BADGE_OFFSET","ACTIVE_DOT_SIZE","EMPTY_RECENT","focusRing","theme","testID","pointerEvents","style","position","top","left","right","bottom","borderWidth","borderColor","colors","border","focus","borderRadius","radii","base","BottomNav","props","coreTabs","active","onDestinationPress","moreLabel","moreIcon","moreVisible","onMoreVisibleChange","overflowSections","recent","searchPlaceholder","searchAccessibilityLabel","recentLabel","noResultsLabel","edit","moreQuickActions","moreQuickActionsLabel","focused","setFocused","bottomInset","space","OS","moreSelected","kind","moreColors","moreA11y","selected","expanded","closeSheet","handleSheetPress","id","quickActionsTrigger","icon","variant","tone","size","accessibilityLabel","undefined","sheetTestID","children","accessibilityRole","backgroundColor","bg","surface","borderTopColor","default","paddingBottom","map","tab","a11y","isFocused","tabTestID","label","accessibilityState","onPress","onFocus","onBlur","prev","name","color","strokeWidth","numberOfLines","fontStyleForWeight","fontWeights","semibold","regular","fontSize","fontSizes","xs","width","height","indicator","styles","moreSlot","quickActionsBadge","trigger","items","visible","onRequestClose","create","flex"],"sourceRoot":"../../../../src","sources":["modules/bottom-nav/BottomNav.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC5D,SAASC,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAE1E,SAASC,IAAI,QAAQ,0BAAiB;AAGtC,SAASC,QAAQ,QAAQ,sBAAa;AAEtC,SAASC,MAAM,QAAQ,oBAAW;AAClC,SAASC,MAAM,QAAQ,oBAAW;AAClC,SAASC,IAAI,QAAQ,kBAAS;AAG9B,SACEC,oBAAoB,EACpBC,qBAAqB,EACrBC,qBAAqB,EACrBC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,yBAAyB,QACpB,yBAAsB;AAC7B,SAASC,sBAAsB,QAAQ,6BAA0B;;AAEjE;;AAmBA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AAHA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAA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AAEA,cAAe;QAC/B9B,MAAM,EAAEuD;MAAY,CACrB;IAAC,CACI,CAAC;EAAA,CACT,CAAC;AAEP,CAAC,CAAC;AAEF,MAAMkC,MAAM,GAAGxH,UAAU,CAAC+H,MAAM,CAAC;EAC/BN,QAAQ,EAAE;IAAEO,IAAI,EAAE,CAAC;IAAE9F,QAAQ,EAAE;EAAW,CAAC;EAC3CwF,iBAAiB,EAAE;IACjBxF,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAET,0BAA0B;IAC/BW,KAAK,EAAEX;EACT;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,153 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * BottomNav's fuzzy destination search — pure, framework-free (no React, no `react-native` import at
5
+ * all). Kept out of `BottomNav.variants.ts` deliberately: this is an orthogonal concern (ranking
6
+ * CORRECTNESS, not colour/structure) with its own large, focused test surface, the same "give it its
7
+ * own file" call the design brief makes for `BottomNavOverflowSheet.tsx`.
8
+ *
9
+ * A from-scratch scorer, not a new dependency — same "no new dependency" bar `Reorder`'s hand-built
10
+ * `PanResponder` drag math already set for this library. See MODULE.md's "Open Risks" for why this
11
+ * algorithm is a build-time judgment call (swappable behind the same `matchDestinations` signature),
12
+ * not a locked-in guarantee.
13
+ *
14
+ * Deliberately searches `overflowSections` only — never `coreTabs` (already visible in the bar) and
15
+ * never `recent` (a separate, always-available pre-search fast path). See MODULE.md.
16
+ *
17
+ * Types are imported `import type` only (erased by `verbatimModuleSyntax`), so this file pulls in no
18
+ * runtime dependency on `BottomNav.tsx`, React, or React Native — it stays testable under plain jest
19
+ * with zero mocking.
20
+ */
21
+
22
+ /** Lowercases and collapses internal whitespace runs to a single space, trimmed at both ends — the
23
+ * shared normalisation every tier below measures against. */
24
+ export function normalizeQuery(text) {
25
+ return text.trim().toLowerCase().replace(/\s+/g, " ");
26
+ }
27
+
28
+ /**
29
+ * Classic Levenshtein edit distance (insert/delete/substitute, each cost 1), the iterative two-row
30
+ * form — O(min memory), never the full O(a·b) matrix a naive implementation would allocate.
31
+ */
32
+ export function levenshteinDistance(a, b) {
33
+ if (a === b) return 0;
34
+ if (a.length === 0) return b.length;
35
+ if (b.length === 0) return a.length;
36
+ let previousRow = Array.from({
37
+ length: b.length + 1
38
+ }, (_, index) => index);
39
+ for (let i = 1; i <= a.length; i += 1) {
40
+ const currentRow = [i];
41
+ for (let j = 1; j <= b.length; j += 1) {
42
+ const substitutionCost = a[i - 1] === b[j - 1] ? 0 : 1;
43
+ const deletion = (previousRow[j] ?? 0) + 1;
44
+ const insertion = (currentRow[j - 1] ?? 0) + 1;
45
+ const substitution = (previousRow[j - 1] ?? 0) + substitutionCost;
46
+ currentRow.push(Math.min(deletion, insertion, substitution));
47
+ }
48
+ previousRow = currentRow;
49
+ }
50
+ return previousRow[b.length] ?? 0;
51
+ }
52
+
53
+ /** How many single-character edits a word of this length may be off by and still count as a typo of
54
+ * the query rather than a different word: 1 for short words (≤ 6 chars), 2 for longer ones — a
55
+ * longer word has more room for one stray transposition/typo before it stops resembling the query. */
56
+ export function typoBudget(wordLength) {
57
+ return wordLength <= 6 ? 1 : 2;
58
+ }
59
+
60
+ // Tiered scoring constants — highest signal wins, same "best signal wins" idea Button's
61
+ // `resolveButtonTone` reuses (a single, ordered lookup rather than accumulating point systems).
62
+ const SCORE_EXACT = 100;
63
+ const SCORE_PREFIX = 90;
64
+ const SCORE_SUBSTRING = 70;
65
+ const SCORE_SUBSEQUENCE_BASE = 50;
66
+ // Added on top of the base, scaled by how much of the label the query's characters actually span —
67
+ // a cheap proxy for "contiguity" (a query packed tightly into a short label scores higher than the
68
+ // same characters scattered across a long one), without the cost/risk of computing a true longest
69
+ // contiguous run.
70
+ const SCORE_SUBSEQUENCE_DENSITY_BONUS = 10;
71
+ const SCORE_TYPO_BASE = 20;
72
+ const SCORE_TYPO_PER_DISTANCE = 5;
73
+
74
+ /** True if every character of `query` appears in `label`, in order — not necessarily contiguous. */
75
+ function isSubsequence(query, label) {
76
+ let position = 0;
77
+ for (const char of label) {
78
+ if (position < query.length && char === query[position]) position += 1;
79
+ }
80
+ return position === query.length;
81
+ }
82
+
83
+ /** Tier 4 — 0 when `query` isn't a subsequence of `label` at all. */
84
+ function subsequenceScore(query, label) {
85
+ if (query.length === 0 || label.length === 0 || !isSubsequence(query, label)) return 0;
86
+ const density = query.length / label.length;
87
+ return SCORE_SUBSEQUENCE_BASE + density * SCORE_SUBSEQUENCE_DENSITY_BONUS;
88
+ }
89
+
90
+ /** Tier 5 — the best (lowest-distance) per-word typo match, 0 if no word clears its own budget. */
91
+ function typoScore(query, label) {
92
+ let best = 0;
93
+ for (const word of label.split(" ")) {
94
+ if (word.length === 0) continue;
95
+ const distance = levenshteinDistance(query, word);
96
+ if (distance > typoBudget(word.length)) continue;
97
+ const score = SCORE_TYPO_BASE - distance * SCORE_TYPO_PER_DISTANCE;
98
+ if (score > best) best = score;
99
+ }
100
+ return best;
101
+ }
102
+
103
+ /**
104
+ * Tiered scoring, highest signal wins:
105
+ * 1. exact match (case-insensitive, whitespace-collapsed) → {@link SCORE_EXACT}
106
+ * 2. prefix match ("acc" → "Accounts") → {@link SCORE_PREFIX}
107
+ * 3. substring anywhere in the label → {@link SCORE_SUBSTRING}
108
+ * 4. subsequence match ("acnt" → "Accounts"), density-scaled → {@link SCORE_SUBSEQUENCE_BASE}+
109
+ * 5. typo-tolerant: per-word Levenshtein ≤ `typoBudget` → {@link SCORE_TYPO_BASE}-
110
+ * Returns 0 (no match) below tier 5's own threshold. An empty/whitespace `query` always returns 0 —
111
+ * callers (`matchDestinations`) short-circuit on that case before ever reaching here.
112
+ */
113
+ export function fuzzyScore(query, label) {
114
+ const normalizedQuery = normalizeQuery(query);
115
+ const normalizedLabel = normalizeQuery(label);
116
+ if (normalizedQuery.length === 0) return 0;
117
+ if (normalizedLabel === normalizedQuery) return SCORE_EXACT;
118
+ if (normalizedLabel.startsWith(normalizedQuery)) return SCORE_PREFIX;
119
+ if (normalizedLabel.includes(normalizedQuery)) return SCORE_SUBSTRING;
120
+ const subsequence = subsequenceScore(normalizedQuery, normalizedLabel);
121
+ if (subsequence > 0) return subsequence;
122
+ return typoScore(normalizedQuery, normalizedLabel);
123
+ }
124
+
125
+ /**
126
+ * Ranks every destination across every section for one query; empty/whitespace query → `[]` (the
127
+ * pre-search state is Recent + grouped sections, not an empty search result — `BottomNavOverflowSheet`
128
+ * itself decides which view to render, this function only ever answers "what matches").
129
+ *
130
+ * `Array.prototype.sort` has been a STABLE sort since ES2019 — ties keep their original
131
+ * section/destination order for free, so this never needs a second manual tiebreaker (same "let the
132
+ * platform guarantee do the work" reasoning `moveItem`'s splice-based approach relies on).
133
+ */
134
+ export function matchDestinations(query, sections) {
135
+ const normalizedQuery = normalizeQuery(query);
136
+ if (normalizedQuery.length === 0) return [];
137
+ const matches = [];
138
+ for (const section of sections) {
139
+ for (const destination of section.destinations) {
140
+ const score = fuzzyScore(normalizedQuery, destination.label);
141
+ if (score > 0) {
142
+ matches.push({
143
+ destination,
144
+ sectionId: section.id,
145
+ sectionLabel: section.label,
146
+ score
147
+ });
148
+ }
149
+ }
150
+ }
151
+ return matches.sort((a, b) => b.score - a.score);
152
+ }
153
+ //# sourceMappingURL=BottomNav.search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["normalizeQuery","text","trim","toLowerCase","replace","levenshteinDistance","a","b","length","previousRow","Array","from","_","index","i","currentRow","j","substitutionCost","deletion","insertion","substitution","push","Math","min","typoBudget","wordLength","SCORE_EXACT","SCORE_PREFIX","SCORE_SUBSTRING","SCORE_SUBSEQUENCE_BASE","SCORE_SUBSEQUENCE_DENSITY_BONUS","SCORE_TYPO_BASE","SCORE_TYPO_PER_DISTANCE","isSubsequence","query","label","position","char","subsequenceScore","density","typoScore","best","word","split","distance","score","fuzzyScore","normalizedQuery","normalizedLabel","startsWith","includes","subsequence","matchDestinations","sections","matches","section","destination","destinations","sectionId","id","sectionLabel","sort"],"sourceRoot":"../../../../src","sources":["modules/bottom-nav/BottomN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