@korzun/design 0.0.0-stage → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (608) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +73 -2
  3. package/dist/component/card/index.d.ts +15 -0
  4. package/dist/component/card/index.d.ts.map +1 -0
  5. package/dist/component/card/index.js +34 -0
  6. package/dist/component/card/index.js.map +1 -0
  7. package/dist/component/card/style.d.ts +5 -0
  8. package/dist/component/card/style.d.ts.map +1 -0
  9. package/dist/component/card/style.js +69 -0
  10. package/dist/component/card/style.js.map +1 -0
  11. package/dist/component/card-divider/index.d.ts +10 -0
  12. package/dist/component/card-divider/index.d.ts.map +1 -0
  13. package/dist/component/card-divider/index.js +23 -0
  14. package/dist/component/card-divider/index.js.map +1 -0
  15. package/dist/component/card-divider/style.d.ts +5 -0
  16. package/dist/component/card-divider/style.d.ts.map +1 -0
  17. package/dist/component/card-divider/style.js +48 -0
  18. package/dist/component/card-divider/style.js.map +1 -0
  19. package/dist/component/card-row/index.d.ts +6 -0
  20. package/dist/component/card-row/index.d.ts.map +1 -0
  21. package/dist/component/card-row/index.js +16 -0
  22. package/dist/component/card-row/index.js.map +1 -0
  23. package/dist/component/card-row/style.d.ts +5 -0
  24. package/dist/component/card-row/style.d.ts.map +1 -0
  25. package/dist/component/card-row/style.js +13 -0
  26. package/dist/component/card-row/style.js.map +1 -0
  27. package/dist/component/collapsible-section/index.d.ts +11 -0
  28. package/dist/component/collapsible-section/index.d.ts.map +1 -0
  29. package/dist/component/collapsible-section/index.js +20 -0
  30. package/dist/component/collapsible-section/index.js.map +1 -0
  31. package/dist/component/collapsible-section/style.d.ts +5 -0
  32. package/dist/component/collapsible-section/style.d.ts.map +1 -0
  33. package/dist/component/collapsible-section/style.js +36 -0
  34. package/dist/component/collapsible-section/style.js.map +1 -0
  35. package/dist/component/empty-state/index.d.ts +22 -0
  36. package/dist/component/empty-state/index.d.ts.map +1 -0
  37. package/dist/component/empty-state/index.js +19 -0
  38. package/dist/component/empty-state/index.js.map +1 -0
  39. package/dist/component/empty-state/style.d.ts +5 -0
  40. package/dist/component/empty-state/style.d.ts.map +1 -0
  41. package/dist/component/empty-state/style.js +30 -0
  42. package/dist/component/empty-state/style.js.map +1 -0
  43. package/dist/component/index.d.ts +16 -0
  44. package/dist/component/index.d.ts.map +1 -0
  45. package/dist/component/index.js +15 -0
  46. package/dist/component/index.js.map +1 -0
  47. package/dist/component/meta-line/index.d.ts +21 -0
  48. package/dist/component/meta-line/index.d.ts.map +1 -0
  49. package/dist/component/meta-line/index.js +24 -0
  50. package/dist/component/meta-line/index.js.map +1 -0
  51. package/dist/component/meta-line/style.d.ts +5 -0
  52. package/dist/component/meta-line/style.d.ts.map +1 -0
  53. package/dist/component/meta-line/style.js +35 -0
  54. package/dist/component/meta-line/style.js.map +1 -0
  55. package/dist/component/metadata/index.d.ts +6 -0
  56. package/dist/component/metadata/index.d.ts.map +1 -0
  57. package/dist/component/metadata/index.js +7 -0
  58. package/dist/component/metadata/index.js.map +1 -0
  59. package/dist/component/metadata/style.d.ts +5 -0
  60. package/dist/component/metadata/style.d.ts.map +1 -0
  61. package/dist/component/metadata/style.js +20 -0
  62. package/dist/component/metadata/style.js.map +1 -0
  63. package/dist/component/metadata-list/index.d.ts +10 -0
  64. package/dist/component/metadata-list/index.d.ts.map +1 -0
  65. package/dist/component/metadata-list/index.js +9 -0
  66. package/dist/component/metadata-list/index.js.map +1 -0
  67. package/dist/component/metadata-list/style.d.ts +5 -0
  68. package/dist/component/metadata-list/style.d.ts.map +1 -0
  69. package/dist/component/metadata-list/style.js +10 -0
  70. package/dist/component/metadata-list/style.js.map +1 -0
  71. package/dist/component/nav-desktop/index.d.ts +6 -0
  72. package/dist/component/nav-desktop/index.d.ts.map +1 -0
  73. package/dist/component/nav-desktop/index.js +11 -0
  74. package/dist/component/nav-desktop/index.js.map +1 -0
  75. package/dist/component/nav-desktop/style.d.ts +5 -0
  76. package/dist/component/nav-desktop/style.d.ts.map +1 -0
  77. package/dist/component/nav-desktop/style.js +94 -0
  78. package/dist/component/nav-desktop/style.js.map +1 -0
  79. package/dist/component/nav-mobile/index.d.ts +25 -0
  80. package/dist/component/nav-mobile/index.d.ts.map +1 -0
  81. package/dist/component/nav-mobile/index.js +153 -0
  82. package/dist/component/nav-mobile/index.js.map +1 -0
  83. package/dist/component/nav-mobile/style.d.ts +5 -0
  84. package/dist/component/nav-mobile/style.d.ts.map +1 -0
  85. package/dist/component/nav-mobile/style.js +347 -0
  86. package/dist/component/nav-mobile/style.js.map +1 -0
  87. package/dist/component/nav-types.d.ts +12 -0
  88. package/dist/component/nav-types.d.ts.map +1 -0
  89. package/dist/component/nav-types.js +2 -0
  90. package/dist/component/nav-types.js.map +1 -0
  91. package/dist/component/page/index.d.ts +33 -0
  92. package/dist/component/page/index.d.ts.map +1 -0
  93. package/dist/component/page/index.js +20 -0
  94. package/dist/component/page/index.js.map +1 -0
  95. package/dist/component/page/style.d.ts +10 -0
  96. package/dist/component/page/style.d.ts.map +1 -0
  97. package/dist/component/page/style.js +132 -0
  98. package/dist/component/page/style.js.map +1 -0
  99. package/dist/component/progress-indicator/index.d.ts +17 -0
  100. package/dist/component/progress-indicator/index.d.ts.map +1 -0
  101. package/dist/component/progress-indicator/index.js +19 -0
  102. package/dist/component/progress-indicator/index.js.map +1 -0
  103. package/dist/component/progress-indicator/style.d.ts +5 -0
  104. package/dist/component/progress-indicator/style.d.ts.map +1 -0
  105. package/dist/component/progress-indicator/style.js +24 -0
  106. package/dist/component/progress-indicator/style.js.map +1 -0
  107. package/dist/component/tag/index.d.ts +9 -0
  108. package/dist/component/tag/index.d.ts.map +1 -0
  109. package/dist/component/tag/index.js +15 -0
  110. package/dist/component/tag/index.js.map +1 -0
  111. package/dist/component/tag/style.d.ts +5 -0
  112. package/dist/component/tag/style.d.ts.map +1 -0
  113. package/dist/component/tag/style.js +28 -0
  114. package/dist/component/tag/style.js.map +1 -0
  115. package/dist/component/theme-setting/index.d.ts +2 -0
  116. package/dist/component/theme-setting/index.d.ts.map +1 -0
  117. package/dist/component/theme-setting/index.js +14 -0
  118. package/dist/component/theme-setting/index.js.map +1 -0
  119. package/dist/component/top-fade/index.d.ts +2 -0
  120. package/dist/component/top-fade/index.d.ts.map +1 -0
  121. package/dist/component/top-fade/index.js +9 -0
  122. package/dist/component/top-fade/index.js.map +1 -0
  123. package/dist/component/top-fade/style.d.ts +5 -0
  124. package/dist/component/top-fade/style.d.ts.map +1 -0
  125. package/dist/component/top-fade/style.js +57 -0
  126. package/dist/component/top-fade/style.js.map +1 -0
  127. package/dist/control/action-menu-list/index.d.ts +44 -0
  128. package/dist/control/action-menu-list/index.d.ts.map +1 -0
  129. package/dist/control/action-menu-list/index.js +9 -0
  130. package/dist/control/action-menu-list/index.js.map +1 -0
  131. package/dist/control/action-menu-list/style.d.ts +5 -0
  132. package/dist/control/action-menu-list/style.d.ts.map +1 -0
  133. package/dist/control/action-menu-list/style.js +51 -0
  134. package/dist/control/action-menu-list/style.js.map +1 -0
  135. package/dist/control/action-menu-list/use-dismiss.d.ts +3 -0
  136. package/dist/control/action-menu-list/use-dismiss.d.ts.map +1 -0
  137. package/dist/control/action-menu-list/use-dismiss.js +25 -0
  138. package/dist/control/action-menu-list/use-dismiss.js.map +1 -0
  139. package/dist/control/back-button/index.d.ts +6 -0
  140. package/dist/control/back-button/index.d.ts.map +1 -0
  141. package/dist/control/back-button/index.js +20 -0
  142. package/dist/control/back-button/index.js.map +1 -0
  143. package/dist/control/back-button/style.d.ts +5 -0
  144. package/dist/control/back-button/style.d.ts.map +1 -0
  145. package/dist/control/back-button/style.js +26 -0
  146. package/dist/control/back-button/style.js.map +1 -0
  147. package/dist/control/button/index.d.ts +36 -0
  148. package/dist/control/button/index.d.ts.map +1 -0
  149. package/dist/control/button/index.js +39 -0
  150. package/dist/control/button/index.js.map +1 -0
  151. package/dist/control/button/style.d.ts +24 -0
  152. package/dist/control/button/style.d.ts.map +1 -0
  153. package/dist/control/button/style.js +370 -0
  154. package/dist/control/button/style.js.map +1 -0
  155. package/dist/control/chips-input/index.d.ts +17 -0
  156. package/dist/control/chips-input/index.d.ts.map +1 -0
  157. package/dist/control/chips-input/index.js +77 -0
  158. package/dist/control/chips-input/index.js.map +1 -0
  159. package/dist/control/chips-input/style.d.ts +10 -0
  160. package/dist/control/chips-input/style.d.ts.map +1 -0
  161. package/dist/control/chips-input/style.js +152 -0
  162. package/dist/control/chips-input/style.js.map +1 -0
  163. package/dist/control/confirm-modal/index.d.ts +17 -0
  164. package/dist/control/confirm-modal/index.d.ts.map +1 -0
  165. package/dist/control/confirm-modal/index.js +22 -0
  166. package/dist/control/confirm-modal/index.js.map +1 -0
  167. package/dist/control/confirm-modal/style.d.ts +5 -0
  168. package/dist/control/confirm-modal/style.d.ts.map +1 -0
  169. package/dist/control/confirm-modal/style.js +33 -0
  170. package/dist/control/confirm-modal/style.js.map +1 -0
  171. package/dist/control/date-time-input/index.d.ts +21 -0
  172. package/dist/control/date-time-input/index.d.ts.map +1 -0
  173. package/dist/control/date-time-input/index.js +35 -0
  174. package/dist/control/date-time-input/index.js.map +1 -0
  175. package/dist/control/date-time-input/iso-date.d.ts +25 -0
  176. package/dist/control/date-time-input/iso-date.d.ts.map +1 -0
  177. package/dist/control/date-time-input/iso-date.js +51 -0
  178. package/dist/control/date-time-input/iso-date.js.map +1 -0
  179. package/dist/control/date-time-input/style.d.ts +5 -0
  180. package/dist/control/date-time-input/style.d.ts.map +1 -0
  181. package/dist/control/date-time-input/style.js +72 -0
  182. package/dist/control/date-time-input/style.js.map +1 -0
  183. package/dist/control/field-list/index.d.ts +26 -0
  184. package/dist/control/field-list/index.d.ts.map +1 -0
  185. package/dist/control/field-list/index.js +11 -0
  186. package/dist/control/field-list/index.js.map +1 -0
  187. package/dist/control/field-list/style.d.ts +5 -0
  188. package/dist/control/field-list/style.d.ts.map +1 -0
  189. package/dist/control/field-list/style.js +43 -0
  190. package/dist/control/field-list/style.js.map +1 -0
  191. package/dist/control/index.d.ts +23 -0
  192. package/dist/control/index.d.ts.map +1 -0
  193. package/dist/control/index.js +18 -0
  194. package/dist/control/index.js.map +1 -0
  195. package/dist/control/number-input/index.d.ts +12 -0
  196. package/dist/control/number-input/index.d.ts.map +1 -0
  197. package/dist/control/number-input/index.js +34 -0
  198. package/dist/control/number-input/index.js.map +1 -0
  199. package/dist/control/number-input/style.d.ts +5 -0
  200. package/dist/control/number-input/style.d.ts.map +1 -0
  201. package/dist/control/number-input/style.js +50 -0
  202. package/dist/control/number-input/style.js.map +1 -0
  203. package/dist/control/page-actions-bar/index.d.ts +11 -0
  204. package/dist/control/page-actions-bar/index.d.ts.map +1 -0
  205. package/dist/control/page-actions-bar/index.js +26 -0
  206. package/dist/control/page-actions-bar/index.js.map +1 -0
  207. package/dist/control/page-actions-bar/style.d.ts +5 -0
  208. package/dist/control/page-actions-bar/style.d.ts.map +1 -0
  209. package/dist/control/page-actions-bar/style.js +63 -0
  210. package/dist/control/page-actions-bar/style.js.map +1 -0
  211. package/dist/control/page-actions-menu/index.d.ts +7 -0
  212. package/dist/control/page-actions-menu/index.d.ts.map +1 -0
  213. package/dist/control/page-actions-menu/index.js +19 -0
  214. package/dist/control/page-actions-menu/index.js.map +1 -0
  215. package/dist/control/page-actions-menu/style.d.ts +5 -0
  216. package/dist/control/page-actions-menu/style.d.ts.map +1 -0
  217. package/dist/control/page-actions-menu/style.js +33 -0
  218. package/dist/control/page-actions-menu/style.js.map +1 -0
  219. package/dist/control/page-footer-actions/index.d.ts +17 -0
  220. package/dist/control/page-footer-actions/index.d.ts.map +1 -0
  221. package/dist/control/page-footer-actions/index.js +14 -0
  222. package/dist/control/page-footer-actions/index.js.map +1 -0
  223. package/dist/control/page-footer-actions/style.d.ts +5 -0
  224. package/dist/control/page-footer-actions/style.d.ts.map +1 -0
  225. package/dist/control/page-footer-actions/style.js +12 -0
  226. package/dist/control/page-footer-actions/style.js.map +1 -0
  227. package/dist/control/popover/index.d.ts +27 -0
  228. package/dist/control/popover/index.d.ts.map +1 -0
  229. package/dist/control/popover/index.js +58 -0
  230. package/dist/control/popover/index.js.map +1 -0
  231. package/dist/control/popover/style.d.ts +5 -0
  232. package/dist/control/popover/style.d.ts.map +1 -0
  233. package/dist/control/popover/style.js +8 -0
  234. package/dist/control/popover/style.js.map +1 -0
  235. package/dist/control/segmented-control/index.d.ts +55 -0
  236. package/dist/control/segmented-control/index.d.ts.map +1 -0
  237. package/dist/control/segmented-control/index.js +107 -0
  238. package/dist/control/segmented-control/index.js.map +1 -0
  239. package/dist/control/segmented-control/style.d.ts +5 -0
  240. package/dist/control/segmented-control/style.d.ts.map +1 -0
  241. package/dist/control/segmented-control/style.js +149 -0
  242. package/dist/control/segmented-control/style.js.map +1 -0
  243. package/dist/control/select/index.d.ts +37 -0
  244. package/dist/control/select/index.d.ts.map +1 -0
  245. package/dist/control/select/index.js +138 -0
  246. package/dist/control/select/index.js.map +1 -0
  247. package/dist/control/select/style.d.ts +5 -0
  248. package/dist/control/select/style.d.ts.map +1 -0
  249. package/dist/control/select/style.js +192 -0
  250. package/dist/control/select/style.js.map +1 -0
  251. package/dist/control/switch/index.d.ts +39 -0
  252. package/dist/control/switch/index.d.ts.map +1 -0
  253. package/dist/control/switch/index.js +94 -0
  254. package/dist/control/switch/index.js.map +1 -0
  255. package/dist/control/switch/style.d.ts +36 -0
  256. package/dist/control/switch/style.d.ts.map +1 -0
  257. package/dist/control/switch/style.js +159 -0
  258. package/dist/control/switch/style.js.map +1 -0
  259. package/dist/control/text-area/index.d.ts +15 -0
  260. package/dist/control/text-area/index.d.ts.map +1 -0
  261. package/dist/control/text-area/index.js +44 -0
  262. package/dist/control/text-area/index.js.map +1 -0
  263. package/dist/control/text-area/style.d.ts +5 -0
  264. package/dist/control/text-area/style.d.ts.map +1 -0
  265. package/dist/control/text-area/style.js +85 -0
  266. package/dist/control/text-area/style.js.map +1 -0
  267. package/dist/control/text-input/index.d.ts +25 -0
  268. package/dist/control/text-input/index.d.ts.map +1 -0
  269. package/dist/control/text-input/index.js +43 -0
  270. package/dist/control/text-input/index.js.map +1 -0
  271. package/dist/control/text-input/style.d.ts +5 -0
  272. package/dist/control/text-input/style.d.ts.map +1 -0
  273. package/dist/control/text-input/style.js +80 -0
  274. package/dist/control/text-input/style.js.map +1 -0
  275. package/dist/control/use-modal-dialog/index.d.ts +24 -0
  276. package/dist/control/use-modal-dialog/index.d.ts.map +1 -0
  277. package/dist/control/use-modal-dialog/index.js +73 -0
  278. package/dist/control/use-modal-dialog/index.js.map +1 -0
  279. package/dist/hooks/index.d.ts +6 -0
  280. package/dist/hooks/index.d.ts.map +1 -0
  281. package/dist/hooks/index.js +4 -0
  282. package/dist/hooks/index.js.map +1 -0
  283. package/dist/hooks/is-standalone.d.ts +2 -0
  284. package/dist/hooks/is-standalone.d.ts.map +1 -0
  285. package/dist/hooks/is-standalone.js +10 -0
  286. package/dist/hooks/is-standalone.js.map +1 -0
  287. package/dist/hooks/use-minimize-on-scroll.d.ts +48 -0
  288. package/dist/hooks/use-minimize-on-scroll.d.ts.map +1 -0
  289. package/dist/hooks/use-minimize-on-scroll.js +123 -0
  290. package/dist/hooks/use-minimize-on-scroll.js.map +1 -0
  291. package/dist/hooks/use-pull-to-refresh.d.ts +37 -0
  292. package/dist/hooks/use-pull-to-refresh.d.ts.map +1 -0
  293. package/dist/hooks/use-pull-to-refresh.js +116 -0
  294. package/dist/hooks/use-pull-to-refresh.js.map +1 -0
  295. package/dist/icon/adjustments-horizontal.d.ts +3 -0
  296. package/dist/icon/adjustments-horizontal.d.ts.map +1 -0
  297. package/dist/icon/adjustments-horizontal.js +11 -0
  298. package/dist/icon/adjustments-horizontal.js.map +1 -0
  299. package/dist/icon/alert-octagon.d.ts +3 -0
  300. package/dist/icon/alert-octagon.d.ts.map +1 -0
  301. package/dist/icon/alert-octagon.js +8 -0
  302. package/dist/icon/alert-octagon.js.map +1 -0
  303. package/dist/icon/book.d.ts +3 -0
  304. package/dist/icon/book.d.ts.map +1 -0
  305. package/dist/icon/book.js +11 -0
  306. package/dist/icon/book.js.map +1 -0
  307. package/dist/icon/books.d.ts +3 -0
  308. package/dist/icon/books.d.ts.map +1 -0
  309. package/dist/icon/books.js +11 -0
  310. package/dist/icon/books.js.map +1 -0
  311. package/dist/icon/check.d.ts +3 -0
  312. package/dist/icon/check.d.ts.map +1 -0
  313. package/dist/icon/check.js +8 -0
  314. package/dist/icon/check.js.map +1 -0
  315. package/dist/icon/chevron-circle.d.ts +3 -0
  316. package/dist/icon/chevron-circle.d.ts.map +1 -0
  317. package/dist/icon/chevron-circle.js +11 -0
  318. package/dist/icon/chevron-circle.js.map +1 -0
  319. package/dist/icon/chevron.d.ts +3 -0
  320. package/dist/icon/chevron.d.ts.map +1 -0
  321. package/dist/icon/chevron.js +11 -0
  322. package/dist/icon/chevron.js.map +1 -0
  323. package/dist/icon/circle-x.d.ts +3 -0
  324. package/dist/icon/circle-x.d.ts.map +1 -0
  325. package/dist/icon/circle-x.js +8 -0
  326. package/dist/icon/circle-x.js.map +1 -0
  327. package/dist/icon/clock.d.ts +3 -0
  328. package/dist/icon/clock.d.ts.map +1 -0
  329. package/dist/icon/clock.js +11 -0
  330. package/dist/icon/clock.js.map +1 -0
  331. package/dist/icon/device.d.ts +3 -0
  332. package/dist/icon/device.d.ts.map +1 -0
  333. package/dist/icon/device.js +11 -0
  334. package/dist/icon/device.js.map +1 -0
  335. package/dist/icon/emoji.d.ts +20 -0
  336. package/dist/icon/emoji.d.ts.map +1 -0
  337. package/dist/icon/emoji.js +21 -0
  338. package/dist/icon/emoji.js.map +1 -0
  339. package/dist/icon/hand-love-you.d.ts +3 -0
  340. package/dist/icon/hand-love-you.d.ts.map +1 -0
  341. package/dist/icon/hand-love-you.js +5 -0
  342. package/dist/icon/hand-love-you.js.map +1 -0
  343. package/dist/icon/hand-ok.d.ts +3 -0
  344. package/dist/icon/hand-ok.d.ts.map +1 -0
  345. package/dist/icon/hand-ok.js +5 -0
  346. package/dist/icon/hand-ok.js.map +1 -0
  347. package/dist/icon/hand-peace.d.ts +3 -0
  348. package/dist/icon/hand-peace.d.ts.map +1 -0
  349. package/dist/icon/hand-peace.js +5 -0
  350. package/dist/icon/hand-peace.js.map +1 -0
  351. package/dist/icon/hands-clap.d.ts +3 -0
  352. package/dist/icon/hands-clap.d.ts.map +1 -0
  353. package/dist/icon/hands-clap.js +5 -0
  354. package/dist/icon/hands-clap.js.map +1 -0
  355. package/dist/icon/home.d.ts +3 -0
  356. package/dist/icon/home.d.ts.map +1 -0
  357. package/dist/icon/home.js +11 -0
  358. package/dist/icon/home.js.map +1 -0
  359. package/dist/icon/index.d.ts +31 -0
  360. package/dist/icon/index.d.ts.map +1 -0
  361. package/dist/icon/index.js +30 -0
  362. package/dist/icon/index.js.map +1 -0
  363. package/dist/icon/info-circle.d.ts +3 -0
  364. package/dist/icon/info-circle.d.ts.map +1 -0
  365. package/dist/icon/info-circle.js +8 -0
  366. package/dist/icon/info-circle.js.map +1 -0
  367. package/dist/icon/key.d.ts +3 -0
  368. package/dist/icon/key.d.ts.map +1 -0
  369. package/dist/icon/key.js +8 -0
  370. package/dist/icon/key.js.map +1 -0
  371. package/dist/icon/list-check.d.ts +3 -0
  372. package/dist/icon/list-check.d.ts.map +1 -0
  373. package/dist/icon/list-check.js +11 -0
  374. package/dist/icon/list-check.js.map +1 -0
  375. package/dist/icon/more.d.ts +3 -0
  376. package/dist/icon/more.d.ts.map +1 -0
  377. package/dist/icon/more.js +11 -0
  378. package/dist/icon/more.js.map +1 -0
  379. package/dist/icon/props.d.ts +26 -0
  380. package/dist/icon/props.d.ts.map +1 -0
  381. package/dist/icon/props.js +16 -0
  382. package/dist/icon/props.js.map +1 -0
  383. package/dist/icon/row-remove.d.ts +3 -0
  384. package/dist/icon/row-remove.d.ts.map +1 -0
  385. package/dist/icon/row-remove.js +11 -0
  386. package/dist/icon/row-remove.js.map +1 -0
  387. package/dist/icon/search.d.ts +3 -0
  388. package/dist/icon/search.d.ts.map +1 -0
  389. package/dist/icon/search.js +11 -0
  390. package/dist/icon/search.js.map +1 -0
  391. package/dist/icon/settings.d.ts +3 -0
  392. package/dist/icon/settings.d.ts.map +1 -0
  393. package/dist/icon/settings.js +11 -0
  394. package/dist/icon/settings.js.map +1 -0
  395. package/dist/icon/spinner.d.ts +3 -0
  396. package/dist/icon/spinner.d.ts.map +1 -0
  397. package/dist/icon/spinner.js +10 -0
  398. package/dist/icon/spinner.js.map +1 -0
  399. package/dist/icon/thumb-down.d.ts +3 -0
  400. package/dist/icon/thumb-down.d.ts.map +1 -0
  401. package/dist/icon/thumb-down.js +5 -0
  402. package/dist/icon/thumb-down.js.map +1 -0
  403. package/dist/icon/upload.d.ts +3 -0
  404. package/dist/icon/upload.d.ts.map +1 -0
  405. package/dist/icon/upload.js +11 -0
  406. package/dist/icon/upload.js.map +1 -0
  407. package/dist/icon/user.d.ts +3 -0
  408. package/dist/icon/user.d.ts.map +1 -0
  409. package/dist/icon/user.js +11 -0
  410. package/dist/icon/user.js.map +1 -0
  411. package/dist/icon/users.d.ts +3 -0
  412. package/dist/icon/users.d.ts.map +1 -0
  413. package/dist/icon/users.js +11 -0
  414. package/dist/icon/users.js.map +1 -0
  415. package/dist/icon/x.d.ts +3 -0
  416. package/dist/icon/x.d.ts.map +1 -0
  417. package/dist/icon/x.js +11 -0
  418. package/dist/icon/x.js.map +1 -0
  419. package/dist/index.d.ts +10 -0
  420. package/dist/index.d.ts.map +1 -0
  421. package/dist/index.js +12 -0
  422. package/dist/index.js.map +1 -0
  423. package/dist/theme/context.d.ts +11 -0
  424. package/dist/theme/context.d.ts.map +1 -0
  425. package/dist/theme/context.js +7 -0
  426. package/dist/theme/context.js.map +1 -0
  427. package/dist/theme/global-styles.d.ts +3 -0
  428. package/dist/theme/global-styles.d.ts.map +1 -0
  429. package/dist/theme/global-styles.js +67 -0
  430. package/dist/theme/global-styles.js.map +1 -0
  431. package/dist/theme/index.d.ts +11 -0
  432. package/dist/theme/index.d.ts.map +1 -0
  433. package/dist/theme/index.js +7 -0
  434. package/dist/theme/index.js.map +1 -0
  435. package/dist/theme/provider.d.ts +7 -0
  436. package/dist/theme/provider.d.ts.map +1 -0
  437. package/dist/theme/provider.js +49 -0
  438. package/dist/theme/provider.js.map +1 -0
  439. package/dist/theme/theme.d.ts +262 -0
  440. package/dist/theme/theme.d.ts.map +1 -0
  441. package/dist/theme/theme.js +481 -0
  442. package/dist/theme/theme.js.map +1 -0
  443. package/dist/theme/use-theme-setting.d.ts +4 -0
  444. package/dist/theme/use-theme-setting.d.ts.map +1 -0
  445. package/dist/theme/use-theme-setting.js +7 -0
  446. package/dist/theme/use-theme-setting.js.map +1 -0
  447. package/dist/theme/use-theme.d.ts +3 -0
  448. package/dist/theme/use-theme.d.ts.map +1 -0
  449. package/dist/theme/use-theme.js +5 -0
  450. package/dist/theme/use-theme.js.map +1 -0
  451. package/dist/toast/context.d.ts +5 -0
  452. package/dist/toast/context.d.ts.map +1 -0
  453. package/dist/toast/context.js +5 -0
  454. package/dist/toast/context.js.map +1 -0
  455. package/dist/toast/hook/index.d.ts +2 -0
  456. package/dist/toast/hook/index.d.ts.map +1 -0
  457. package/dist/toast/hook/index.js +2 -0
  458. package/dist/toast/hook/index.js.map +1 -0
  459. package/dist/toast/hook/use-toast.d.ts +2 -0
  460. package/dist/toast/hook/use-toast.d.ts.map +1 -0
  461. package/dist/toast/hook/use-toast.js +7 -0
  462. package/dist/toast/hook/use-toast.js.map +1 -0
  463. package/dist/toast/index.d.ts +3 -0
  464. package/dist/toast/index.d.ts.map +1 -0
  465. package/dist/toast/index.js +3 -0
  466. package/dist/toast/index.js.map +1 -0
  467. package/dist/toast/provider.d.ts +8 -0
  468. package/dist/toast/provider.d.ts.map +1 -0
  469. package/dist/toast/provider.js +57 -0
  470. package/dist/toast/provider.js.map +1 -0
  471. package/dist/toast/reducer.d.ts +21 -0
  472. package/dist/toast/reducer.d.ts.map +1 -0
  473. package/dist/toast/reducer.js +24 -0
  474. package/dist/toast/reducer.js.map +1 -0
  475. package/dist/toast/style.d.ts +5 -0
  476. package/dist/toast/style.d.ts.map +1 -0
  477. package/dist/toast/style.js +63 -0
  478. package/dist/toast/style.js.map +1 -0
  479. package/dist/toast/toast.d.ts +12 -0
  480. package/dist/toast/toast.d.ts.map +1 -0
  481. package/dist/toast/toast.js +17 -0
  482. package/dist/toast/toast.js.map +1 -0
  483. package/dist/utils.d.ts +3 -0
  484. package/dist/utils.d.ts.map +1 -0
  485. package/dist/utils.js +38 -0
  486. package/dist/utils.js.map +1 -0
  487. package/package.json +93 -4
  488. package/src/component/card/index.tsx +123 -0
  489. package/src/component/card/style.ts +69 -0
  490. package/src/component/card-divider/index.tsx +74 -0
  491. package/src/component/card-divider/style.ts +48 -0
  492. package/src/component/card-row/index.tsx +32 -0
  493. package/src/component/card-row/style.ts +13 -0
  494. package/src/component/collapsible-section/index.tsx +58 -0
  495. package/src/component/collapsible-section/style.ts +36 -0
  496. package/src/component/empty-state/index.tsx +35 -0
  497. package/src/component/empty-state/style.ts +30 -0
  498. package/src/component/index.ts +15 -0
  499. package/src/component/meta-line/index.tsx +42 -0
  500. package/src/component/meta-line/style.ts +36 -0
  501. package/src/component/metadata/index.tsx +15 -0
  502. package/src/component/metadata/style.ts +20 -0
  503. package/src/component/metadata-list/index.tsx +15 -0
  504. package/src/component/metadata-list/style.ts +10 -0
  505. package/src/component/nav-desktop/index.tsx +43 -0
  506. package/src/component/nav-desktop/style.ts +94 -0
  507. package/src/component/nav-mobile/index.tsx +358 -0
  508. package/src/component/nav-mobile/style.ts +354 -0
  509. package/src/component/nav-types.ts +13 -0
  510. package/src/component/page/index.tsx +87 -0
  511. package/src/component/page/style.ts +133 -0
  512. package/src/component/progress-indicator/index.tsx +58 -0
  513. package/src/component/progress-indicator/style.ts +24 -0
  514. package/src/component/tag/index.tsx +38 -0
  515. package/src/component/tag/style.ts +28 -0
  516. package/src/component/theme-setting/index.tsx +24 -0
  517. package/src/component/top-fade/index.tsx +8 -0
  518. package/src/component/top-fade/style.ts +58 -0
  519. package/src/control/action-menu-list/index.tsx +75 -0
  520. package/src/control/action-menu-list/style.ts +51 -0
  521. package/src/control/action-menu-list/use-dismiss.ts +29 -0
  522. package/src/control/back-button/index.tsx +44 -0
  523. package/src/control/back-button/style.ts +26 -0
  524. package/src/control/button/index.tsx +148 -0
  525. package/src/control/button/style.ts +389 -0
  526. package/src/control/chips-input/index.tsx +168 -0
  527. package/src/control/chips-input/style.ts +158 -0
  528. package/src/control/confirm-modal/index.tsx +79 -0
  529. package/src/control/confirm-modal/style.ts +33 -0
  530. package/src/control/date-time-input/index.tsx +95 -0
  531. package/src/control/date-time-input/iso-date.ts +61 -0
  532. package/src/control/date-time-input/style.ts +72 -0
  533. package/src/control/field-list/index.tsx +78 -0
  534. package/src/control/field-list/style.ts +43 -0
  535. package/src/control/index.ts +23 -0
  536. package/src/control/number-input/index.tsx +75 -0
  537. package/src/control/number-input/style.ts +50 -0
  538. package/src/control/page-actions-bar/index.tsx +68 -0
  539. package/src/control/page-actions-bar/style.ts +63 -0
  540. package/src/control/page-actions-menu/index.tsx +49 -0
  541. package/src/control/page-actions-menu/style.ts +33 -0
  542. package/src/control/page-footer-actions/index.tsx +50 -0
  543. package/src/control/page-footer-actions/style.ts +12 -0
  544. package/src/control/popover/index.tsx +102 -0
  545. package/src/control/popover/style.ts +8 -0
  546. package/src/control/segmented-control/index.tsx +193 -0
  547. package/src/control/segmented-control/style.ts +150 -0
  548. package/src/control/select/index.tsx +326 -0
  549. package/src/control/select/style.ts +192 -0
  550. package/src/control/switch/index.tsx +189 -0
  551. package/src/control/switch/style.ts +172 -0
  552. package/src/control/text-area/index.tsx +106 -0
  553. package/src/control/text-area/style.ts +85 -0
  554. package/src/control/text-input/index.tsx +124 -0
  555. package/src/control/text-input/style.ts +80 -0
  556. package/src/control/use-modal-dialog/index.ts +75 -0
  557. package/src/hooks/index.ts +5 -0
  558. package/src/hooks/is-standalone.ts +11 -0
  559. package/src/hooks/use-minimize-on-scroll.ts +137 -0
  560. package/src/hooks/use-pull-to-refresh.ts +133 -0
  561. package/src/icon/adjustments-horizontal.tsx +48 -0
  562. package/src/icon/alert-octagon.tsx +31 -0
  563. package/src/icon/book.tsx +42 -0
  564. package/src/icon/books.tsx +46 -0
  565. package/src/icon/check.tsx +31 -0
  566. package/src/icon/chevron-circle.tsx +40 -0
  567. package/src/icon/chevron.tsx +39 -0
  568. package/src/icon/circle-x.tsx +30 -0
  569. package/src/icon/clock.tsx +41 -0
  570. package/src/icon/device.tsx +41 -0
  571. package/src/icon/emoji.tsx +70 -0
  572. package/src/icon/hand-love-you.tsx +5 -0
  573. package/src/icon/hand-ok.tsx +5 -0
  574. package/src/icon/hand-peace.tsx +7 -0
  575. package/src/icon/hands-clap.tsx +5 -0
  576. package/src/icon/home.tsx +42 -0
  577. package/src/icon/index.ts +31 -0
  578. package/src/icon/info-circle.tsx +30 -0
  579. package/src/icon/key.tsx +38 -0
  580. package/src/icon/list-check.tsx +44 -0
  581. package/src/icon/more.tsx +41 -0
  582. package/src/icon/props.ts +29 -0
  583. package/src/icon/row-remove.tsx +41 -0
  584. package/src/icon/search.tsx +41 -0
  585. package/src/icon/settings.tsx +41 -0
  586. package/src/icon/spinner.tsx +36 -0
  587. package/src/icon/thumb-down.tsx +5 -0
  588. package/src/icon/upload.tsx +42 -0
  589. package/src/icon/user.tsx +41 -0
  590. package/src/icon/users.tsx +43 -0
  591. package/src/icon/x.tsx +41 -0
  592. package/src/index.ts +12 -0
  593. package/src/theme/context.ts +19 -0
  594. package/src/theme/global-styles.ts +71 -0
  595. package/src/theme/index.ts +11 -0
  596. package/src/theme/provider.tsx +74 -0
  597. package/src/theme/theme.ts +672 -0
  598. package/src/theme/use-theme-setting.ts +10 -0
  599. package/src/theme/use-theme.tsx +7 -0
  600. package/src/toast/context.ts +9 -0
  601. package/src/toast/hook/index.ts +1 -0
  602. package/src/toast/hook/use-toast.ts +8 -0
  603. package/src/toast/index.ts +2 -0
  604. package/src/toast/provider.tsx +90 -0
  605. package/src/toast/reducer.ts +41 -0
  606. package/src/toast/style.ts +63 -0
  607. package/src/toast/toast.tsx +51 -0
  608. package/src/utils.ts +47 -0
@@ -0,0 +1,153 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import cx from 'classnames';
3
+ import { useEffect, useRef, useState } from 'react';
4
+ import { Link, useLocation } from 'react-router';
5
+ import { useMinimizeOnScroll } from '../../hooks/use-minimize-on-scroll.js';
6
+ import { useTheme } from '../../theme/index.js';
7
+ import { useStyle } from './style.js';
8
+ const sameBox = (a, b) => a != null &&
9
+ b != null &&
10
+ a.left === b.left &&
11
+ a.width === b.width &&
12
+ a.capsuleWidth === b.capsuleWidth &&
13
+ a.pillHeight === b.pillHeight;
14
+ // Narrow navigation pinned to the bottom of the viewport (mobile only): two frosted
15
+ // "liquid glass" pills, one expanded and one collapsed to a circle. The expanded one's
16
+ // active tab is wrapped by a glass lens that slides between (equal-width) tabs. A blue
17
+ // copy of the tab row, clipped to the lens, reveals the active color only where the lens
18
+ // is. Hidden at and above the desktop breakpoint.
19
+ //
20
+ // Scrolling down MINIMIZES the expanded side to a circle holding the active
21
+ // tab, the way the iOS tab bar gets out of the way of what you are reading;
22
+ // scrolling up, reaching the top, tapping the circle or changing page brings it
23
+ // back. It is the same morph the route-driven collapse uses — one width
24
+ // animating — so the two never fight: a side is a circle when it is not the
25
+ // expanded side OR the bar is minimized. The other side's circle is left as it
26
+ // is, like the search button iOS keeps beside its minimized bar.
27
+ export const NavMobile = ({ main, settings, expanded }) => {
28
+ const styles = useStyle();
29
+ const { key } = useLocation();
30
+ const { minimized, expand } = useMinimizeOnScroll({ resetKey: key });
31
+ return (_jsxs("nav", { className: styles.root, children: [_jsx(Pill, { pill: main, expanded: expanded === 'main', minimized: minimized, onExpand: expand, styles: styles }), _jsx(Pill, { pill: settings, expanded: expanded === 'settings', minimized: minimized, onExpand: expand, styles: styles })] }));
32
+ };
33
+ const Pill = ({ pill, expanded, minimized, onExpand, styles, }) => {
34
+ const theme = useTheme();
35
+ const pillRef = useRef(null);
36
+ const containerRef = useRef(null);
37
+ const [box, setBox] = useState(null);
38
+ const [shown, setShown] = useState(false);
39
+ const [ready, setReady] = useState(false);
40
+ const { items, collapsed } = pill;
41
+ const activeItem = items.find((item) => item.active);
42
+ const activeTo = activeItem?.to;
43
+ const CollapsedIcon = collapsed.Icon;
44
+ // The three shapes, exactly one of them showing. `open` is the capsule;
45
+ // the two circles split the rest by WHY the side is a circle.
46
+ const open = expanded && !minimized;
47
+ const showMinimized = expanded && minimized;
48
+ // The minimized circle stands for the capsule it replaced, so it wears the
49
+ // tab you are on — where you are is the one thing worth keeping on screen.
50
+ // When the route maps to no tab it falls back to the side's own collapsed
51
+ // glyph rather than showing nothing.
52
+ const MinimizedIcon = activeItem?.Icon ?? CollapsedIcon;
53
+ // Its badge is the active tab's own when it has one — that tab's icon is
54
+ // what is showing, so its count is honest there — and otherwise a dot for
55
+ // whatever the hidden siblings want, the same claim a collapsed side makes.
56
+ const minimizedBadge = activeItem?.badge ?? (items.some((item) => item.badge !== undefined) ? 'dot' : undefined);
57
+ // Measure the active tab's horizontal box (its vertical extent is fixed in CSS) so
58
+ // the lens can wrap and morph to it, plus the two sizes this pill animates between.
59
+ // Runs after paint so the morph transition starts from the on-screen position. Keeps
60
+ // the last lens box when the route maps to no tab, so the lens fades out / back in
61
+ // place. Re-measures on active-tab/tab-set change, on expand/collapse, and on resize.
62
+ useEffect(() => {
63
+ const container = containerRef.current;
64
+ const pillElement = pillRef.current;
65
+ if (!container || !pillElement)
66
+ return;
67
+ const measure = () => {
68
+ const pillBox = pillElement.getBoundingClientRect();
69
+ const containerBox = container.getBoundingClientRect();
70
+ const active = container.querySelector('[aria-current="page"]');
71
+ if (!active) {
72
+ // Still record the SIZES. A collapsed pill has no active tab inside it,
73
+ // and an early return here would leave it with no width to animate to.
74
+ setBox((prev) => prev === null
75
+ ? { left: 0, width: 0, capsuleWidth: containerBox.width, pillHeight: pillBox.height }
76
+ : { ...prev, capsuleWidth: containerBox.width, pillHeight: pillBox.height });
77
+ setShown(false);
78
+ return;
79
+ }
80
+ const activeBox = active.getBoundingClientRect();
81
+ const next = {
82
+ left: activeBox.left - containerBox.left - container.clientLeft,
83
+ width: activeBox.width,
84
+ capsuleWidth: containerBox.width,
85
+ pillHeight: pillBox.height,
86
+ };
87
+ setBox((prev) => (sameBox(prev, next) ? prev : next));
88
+ setShown(true);
89
+ };
90
+ measure();
91
+ if (typeof ResizeObserver === 'undefined')
92
+ return;
93
+ const observer = new ResizeObserver(measure);
94
+ observer.observe(container);
95
+ observer.observe(pillElement);
96
+ return () => observer.disconnect();
97
+ }, [activeTo, items.length, expanded]);
98
+ // Enable the morph transitions one frame after the first placement, so they are never
99
+ // turned on in the same frame a position or width is first set. Without this a pill
100
+ // would animate its whole width on mount — from the natural capsule width down to a
101
+ // circle — as if the bar were collapsing on arrival.
102
+ useEffect(() => {
103
+ let raf = 0;
104
+ let timer;
105
+ if (typeof requestAnimationFrame === 'function') {
106
+ raf = requestAnimationFrame(() => setReady(true));
107
+ }
108
+ else {
109
+ timer = setTimeout(() => setReady(true), 0);
110
+ }
111
+ return () => {
112
+ if (raf)
113
+ cancelAnimationFrame(raf);
114
+ if (timer)
115
+ clearTimeout(timer);
116
+ };
117
+ }, []);
118
+ // The lens slides via transform. The blue reveal is a fixed full-row overlay that
119
+ // never moves — instead a clip-path window (matching the lens box) animates over it,
120
+ // so the blue can't drift relative to the tabs; it's simply unmasked as the lens passes.
121
+ const lensStyle = box
122
+ ? { opacity: shown ? 1 : 0, width: box.width, transform: `translateX(${box.left}px)` }
123
+ : { opacity: 0 };
124
+ const clip = box
125
+ ? `inset(${theme.space.xs} ${box.capsuleWidth - box.left - box.width}px ${theme.space.xs} ${box.left}px round ${theme.radius.pill})`
126
+ : undefined;
127
+ const revealStyle = box
128
+ ? { opacity: shown ? 1 : 0, clipPath: clip, WebkitClipPath: clip }
129
+ : { opacity: 0 };
130
+ // The morph itself: one number, animated. Expanded, the pill is as wide as its capsule
131
+ // naturally is; collapsed, as wide as it is tall, which at `radius.pill` is a circle.
132
+ // Left to CSS until the first measurement, so a pill never renders at a guessed width.
133
+ const pillStyle = box === null ? undefined : { width: open ? box.capsuleWidth : box.pillHeight };
134
+ return (_jsxs("div", { ref: pillRef, className: cx(styles.pill, { [styles.pillReady]: ready, [styles.pillCollapsed]: !open }), style: pillStyle, children: [_jsx("div", { className: styles.glass, "aria-hidden": "true" }), _jsxs("div", { ref: containerRef, className: cx(styles.capsule, { [styles.capsuleHidden]: !open }), "aria-hidden": open ? undefined : true, inert: open ? undefined : true, children: [_jsx("span", { className: cx(styles.lens, { [styles.lensReady]: ready }), style: lensStyle, "aria-hidden": "true" }), items.map(({ to, label, Icon, active, badge }) => (_jsxs(Link, { className: styles.item, "aria-current": active ? 'page' : undefined, to: to, children: [_jsx(BadgedIcon, { Icon: Icon, badge: badge, size: 14, styles: styles }), label] }, to))), _jsx("div", { className: styles.grayLayer, "aria-hidden": "true", children: items.map(({ to, label, Icon, badge }) => (_jsxs("span", { className: styles.layerItem, children: [_jsx(BadgedIcon, { Icon: Icon, badge: badge, size: 14, styles: styles }), label] }, to))) }), _jsx("div", { className: cx(styles.reveal, { [styles.revealReady]: ready }), style: revealStyle, "aria-hidden": "true", children: items.map(({ to, label, Icon, badge }) => (_jsxs("span", { className: styles.layerItem, children: [_jsx(BadgedIcon, { Icon: Icon, badge: badge, size: 14, styles: styles }), label] }, to))) })] }), _jsx(Link, { className: cx(styles.collapsedLink, {
135
+ [styles.collapsedHidden]: expanded,
136
+ [styles.collapsedActive]: collapsed.active,
137
+ }), "aria-hidden": expanded ? true : undefined, inert: expanded ? true : undefined, "aria-current": collapsed.active ? 'page' : undefined, "aria-label": collapsed.label, to: collapsed.to, children: _jsx(BadgedIcon, { Icon: CollapsedIcon, badge: expanded ? undefined : collapsed.badge, size: 18, styles: styles }) }), _jsx("button", { type: "button", className: cx(styles.minimizedButton, {
138
+ [styles.collapsedHidden]: !showMinimized,
139
+ // Lit only when a tab IS selected. Falling back to the stand-in
140
+ // glyph is not a selection, and a lit stand-in told a reader on
141
+ // Settings that something in the main group was.
142
+ [styles.minimizedActive]: activeItem !== undefined,
143
+ }), "aria-hidden": showMinimized ? undefined : true, inert: showMinimized ? undefined : true, "aria-expanded": false, "aria-label": "Show navigation", onClick: onExpand, children: _jsx(BadgedIcon, { Icon: MinimizedIcon, badge: showMinimized ? minimizedBadge : undefined, size: 18, styles: styles }) })] }));
144
+ };
145
+ /**
146
+ * An icon with its badge on the upper-right corner, the way an app badge sits.
147
+ *
148
+ * Same wrapper as `nav-desktop`: the badge is positioned against the ICON, not
149
+ * the whole tab. Anchoring to the tab at a fixed `top`/`right` tracked the
150
+ * tab's geometry rather than the icon's.
151
+ */
152
+ const BadgedIcon = ({ Icon, badge, size, styles, }) => (_jsxs("span", { className: styles.iconWrap, children: [_jsx(Icon, { height: size, width: size }), typeof badge === 'number' && badge > 0 && _jsx("span", { className: styles.badge, children: badge }), badge === 'dot' && _jsx("span", { className: styles.badgeDot, "data-testid": "nav-badge-dot" })] }));
153
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/component/nav-mobile/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAsB,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA6CtC,MAAM,OAAO,GAAG,CAAC,CAAiB,EAAE,CAAiB,EAAW,EAAE,CAChE,CAAC,IAAI,IAAI;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AM,CAAC,eAAe,EAAE;oBACpC,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC,aAAa;oBACxC,gEAAgE;oBAChE,gEAAgE;oBAChE,iDAAiD;oBACjD,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,UAAU,KAAK,SAAS;iBACnD,CAAC,iBACW,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAC7C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,mBACxB,KAAK,gBACT,iBAAiB,EAC5B,OAAO,EAAE,QAAQ,YAEjB,KAAC,UAAU,IACT,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,EACjD,IAAI,EAAE,EAAE,EACR,MAAM,EAAE,MAAM,GACd,GACK,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,CAAC,EAClB,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,MAAM,GAMP,EAAE,EAAE,CAAC,CACJ,gBAAM,SAAS,EAAE,MAAM,CAAC,QAAQ,aAC9B,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAI,EAClC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,IAAI,eAAM,SAAS,EAAE,MAAM,CAAC,KAAK,YAAG,KAAK,GAAQ,EACvF,KAAK,KAAK,KAAK,IAAI,eAAM,SAAS,EAAE,MAAM,CAAC,QAAQ,iBAAc,eAAe,GAAG,IAC/E,CACR,CAAC","sourcesContent":["import cx from 'classnames';\nimport { type CSSProperties, useEffect, useRef, useState } from 'react';\nimport { Link, useLocation } from 'react-router';\n\nimport { useMinimizeOnScroll } from '../../hooks/use-minimize-on-scroll.js';\nimport { useTheme } from '../../theme/index.js';\nimport type { NavItem } from '../nav-types.js';\nimport { useStyle } from './style.js';\n\n/**\n * One side of the bar, in both of the shapes it can take.\n *\n * Both shapes are always rendered, which is what makes the swap a MORPH rather\n * than a cross-fade: the pill around them is a single element whose width\n * animates between the two, so the capsule is seen to shrink into the circle\n * instead of one bar fading out while a different one fades in.\n */\nexport interface NavPill {\n /** Destinations shown while this side is expanded. */\n items: NavItem[];\n /** The single destination it collapses to. */\n collapsed: NavItem;\n}\n\nexport interface NavMobileProps {\n /** The left-hand side: the app's main destinations. */\n main: NavPill;\n /** The right-hand side: settings. */\n settings: NavPill;\n /** Which side is expanded; the other is a circle. */\n expanded: 'main' | 'settings';\n}\n\n/** Horizontal geometry measured from the live DOM. */\ninterface LensBox {\n /** Active tab's left offset within the capsule. */\n left: number;\n /** Active tab's width (the lens/mask width). */\n width: number;\n /** Full capsule width — pins the blue reveal grid so its columns match the real row. */\n capsuleWidth: number;\n /**\n * The PILL's height, not the capsule's, and the diameter it collapses to.\n *\n * Measured from the pill because the row stretches both pills to a common\n * height: a side whose own content is shorter — a reader's settings side has\n * no expanded destinations at all — would otherwise collapse to a circle\n * smaller than the bar beside it.\n */\n pillHeight: number;\n}\n\nconst sameBox = (a: LensBox | null, b: LensBox | null): boolean =>\n a != null &&\n b != null &&\n a.left === b.left &&\n a.width === b.width &&\n a.capsuleWidth === b.capsuleWidth &&\n a.pillHeight === b.pillHeight;\n\n// Narrow navigation pinned to the bottom of the viewport (mobile only): two frosted\n// \"liquid glass\" pills, one expanded and one collapsed to a circle. The expanded one's\n// active tab is wrapped by a glass lens that slides between (equal-width) tabs. A blue\n// copy of the tab row, clipped to the lens, reveals the active color only where the lens\n// is. Hidden at and above the desktop breakpoint.\n//\n// Scrolling down MINIMIZES the expanded side to a circle holding the active\n// tab, the way the iOS tab bar gets out of the way of what you are reading;\n// scrolling up, reaching the top, tapping the circle or changing page brings it\n// back. It is the same morph the route-driven collapse uses — one width\n// animating — so the two never fight: a side is a circle when it is not the\n// expanded side OR the bar is minimized. The other side's circle is left as it\n// is, like the search button iOS keeps beside its minimized bar.\nexport const NavMobile = ({ main, settings, expanded }: NavMobileProps) => {\n const styles = useStyle();\n const { key } = useLocation();\n const { minimized, expand } = useMinimizeOnScroll({ resetKey: key });\n\n return (\n <nav className={styles.root}>\n <Pill\n pill={main}\n expanded={expanded === 'main'}\n minimized={minimized}\n onExpand={expand}\n styles={styles}\n />\n <Pill\n pill={settings}\n expanded={expanded === 'settings'}\n minimized={minimized}\n onExpand={expand}\n styles={styles}\n />\n </nav>\n );\n};\n\nconst Pill = ({\n pill,\n expanded,\n minimized,\n onExpand,\n styles,\n}: {\n pill: NavPill;\n expanded: boolean;\n /** The bar has scrolled out of the way; an expanded side shows its active tab alone. */\n minimized: boolean;\n onExpand: () => void;\n styles: ReturnType<typeof useStyle>;\n}) => {\n const theme = useTheme();\n const pillRef = useRef<HTMLDivElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const [box, setBox] = useState<LensBox | null>(null);\n const [shown, setShown] = useState(false);\n const [ready, setReady] = useState(false);\n\n const { items, collapsed } = pill;\n const activeItem = items.find((item) => item.active);\n const activeTo = activeItem?.to;\n const CollapsedIcon = collapsed.Icon;\n\n // The three shapes, exactly one of them showing. `open` is the capsule;\n // the two circles split the rest by WHY the side is a circle.\n const open = expanded && !minimized;\n const showMinimized = expanded && minimized;\n // The minimized circle stands for the capsule it replaced, so it wears the\n // tab you are on — where you are is the one thing worth keeping on screen.\n // When the route maps to no tab it falls back to the side's own collapsed\n // glyph rather than showing nothing.\n const MinimizedIcon = activeItem?.Icon ?? CollapsedIcon;\n // Its badge is the active tab's own when it has one — that tab's icon is\n // what is showing, so its count is honest there — and otherwise a dot for\n // whatever the hidden siblings want, the same claim a collapsed side makes.\n const minimizedBadge: NavItem['badge'] =\n activeItem?.badge ?? (items.some((item) => item.badge !== undefined) ? 'dot' : undefined);\n\n // Measure the active tab's horizontal box (its vertical extent is fixed in CSS) so\n // the lens can wrap and morph to it, plus the two sizes this pill animates between.\n // Runs after paint so the morph transition starts from the on-screen position. Keeps\n // the last lens box when the route maps to no tab, so the lens fades out / back in\n // place. Re-measures on active-tab/tab-set change, on expand/collapse, and on resize.\n useEffect(() => {\n const container = containerRef.current;\n const pillElement = pillRef.current;\n if (!container || !pillElement) return;\n\n const measure = () => {\n const pillBox = pillElement.getBoundingClientRect();\n const containerBox = container.getBoundingClientRect();\n const active = container.querySelector<HTMLElement>('[aria-current=\"page\"]');\n if (!active) {\n // Still record the SIZES. A collapsed pill has no active tab inside it,\n // and an early return here would leave it with no width to animate to.\n setBox((prev) =>\n prev === null\n ? { left: 0, width: 0, capsuleWidth: containerBox.width, pillHeight: pillBox.height }\n : { ...prev, capsuleWidth: containerBox.width, pillHeight: pillBox.height }\n );\n setShown(false);\n return;\n }\n const activeBox = active.getBoundingClientRect();\n const next: LensBox = {\n left: activeBox.left - containerBox.left - container.clientLeft,\n width: activeBox.width,\n capsuleWidth: containerBox.width,\n pillHeight: pillBox.height,\n };\n setBox((prev) => (sameBox(prev, next) ? prev : next));\n setShown(true);\n };\n\n measure();\n\n if (typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(measure);\n observer.observe(container);\n observer.observe(pillElement);\n return () => observer.disconnect();\n }, [activeTo, items.length, expanded]);\n\n // Enable the morph transitions one frame after the first placement, so they are never\n // turned on in the same frame a position or width is first set. Without this a pill\n // would animate its whole width on mount — from the natural capsule width down to a\n // circle — as if the bar were collapsing on arrival.\n useEffect(() => {\n let raf = 0;\n let timer: ReturnType<typeof setTimeout> | undefined;\n if (typeof requestAnimationFrame === 'function') {\n raf = requestAnimationFrame(() => setReady(true));\n } else {\n timer = setTimeout(() => setReady(true), 0);\n }\n return () => {\n if (raf) cancelAnimationFrame(raf);\n if (timer) clearTimeout(timer);\n };\n }, []);\n\n // The lens slides via transform. The blue reveal is a fixed full-row overlay that\n // never moves — instead a clip-path window (matching the lens box) animates over it,\n // so the blue can't drift relative to the tabs; it's simply unmasked as the lens passes.\n const lensStyle: CSSProperties = box\n ? { opacity: shown ? 1 : 0, width: box.width, transform: `translateX(${box.left}px)` }\n : { opacity: 0 };\n const clip = box\n ? `inset(${theme.space.xs} ${box.capsuleWidth - box.left - box.width}px ${theme.space.xs} ${box.left}px round ${theme.radius.pill})`\n : undefined;\n const revealStyle: CSSProperties = box\n ? { opacity: shown ? 1 : 0, clipPath: clip, WebkitClipPath: clip }\n : { opacity: 0 };\n\n // The morph itself: one number, animated. Expanded, the pill is as wide as its capsule\n // naturally is; collapsed, as wide as it is tall, which at `radius.pill` is a circle.\n // Left to CSS until the first measurement, so a pill never renders at a guessed width.\n const pillStyle: CSSProperties | undefined =\n box === null ? undefined : { width: open ? box.capsuleWidth : box.pillHeight };\n\n return (\n <div\n ref={pillRef}\n className={cx(styles.pill, { [styles.pillReady]: ready, [styles.pillCollapsed]: !open })}\n style={pillStyle}\n >\n <div className={styles.glass} aria-hidden=\"true\" />\n <div\n ref={containerRef}\n className={cx(styles.capsule, { [styles.capsuleHidden]: !open })}\n // A collapsed pill's destinations are behind a clip, not merely faded:\n // without these they stay in the accessibility tree and the tab order, and a\n // screen reader reads a navigation nobody can see.\n aria-hidden={open ? undefined : true}\n inert={open ? undefined : true}\n >\n <span\n className={cx(styles.lens, { [styles.lensReady]: ready })}\n style={lensStyle}\n aria-hidden=\"true\"\n />\n {items.map(({ to, label, Icon, active, badge }) => (\n <Link key={to} className={styles.item} aria-current={active ? 'page' : undefined} to={to}>\n <BadgedIcon Icon={Icon} badge={badge} size={14} styles={styles} />\n {label}\n </Link>\n ))}\n {/* The badge is repeated in BOTH visible rows, not just on the real\n tab. The real tab is transparent and these rows paint above it, so a\n badge left only there sat under each row's copy of the icon, whose\n strokes showed through it. Here it paints over the icon, as on\n desktop, and the two copies are pixel-aligned like everything else\n in these rows. */}\n <div className={styles.grayLayer} aria-hidden=\"true\">\n {items.map(({ to, label, Icon, badge }) => (\n <span key={to} className={styles.layerItem}>\n <BadgedIcon Icon={Icon} badge={badge} size={14} styles={styles} />\n {label}\n </span>\n ))}\n </div>\n <div\n className={cx(styles.reveal, { [styles.revealReady]: ready })}\n style={revealStyle}\n aria-hidden=\"true\"\n >\n {items.map(({ to, label, Icon, badge }) => (\n <span key={to} className={styles.layerItem}>\n <BadgedIcon Icon={Icon} badge={badge} size={14} styles={styles} />\n {label}\n </span>\n ))}\n </div>\n </div>\n <Link\n className={cx(styles.collapsedLink, {\n [styles.collapsedHidden]: expanded,\n [styles.collapsedActive]: collapsed.active,\n })}\n // The mirror of the capsule's pair above: whichever shape is not showing\n // is out of the accessibility tree and the tab order, so the bar offers\n // exactly what is on screen and nothing else.\n aria-hidden={expanded ? true : undefined}\n inert={expanded ? true : undefined}\n aria-current={collapsed.active ? 'page' : undefined}\n aria-label={collapsed.label}\n to={collapsed.to}\n >\n {/* Same badge wrapper the capsule's own tabs use. A collapsed side\n hides whatever is inside it, so without this a tab that wanted\n attention would go silent exactly when it could not be seen.\n Only while actually COLLAPSED: this shape stays mounted when the\n side is expanded (it is what the pill morphs back to), and a badge\n left in the document there would double-count the one already\n showing on the tab it stands for. */}\n <BadgedIcon\n Icon={CollapsedIcon}\n badge={expanded ? undefined : collapsed.badge}\n size={18}\n styles={styles}\n />\n </Link>\n {/* The scrolled-away shape. A BUTTON, not a link to the active tab: you\n are already there, and what a tap on a minimized bar asks for is the\n bar back, not a navigation (which would also push a history entry\n and scroll the page to its top). Hidden by the same pair as the other\n two shapes, so the bar offers one shape at a time. */}\n <button\n type=\"button\"\n className={cx(styles.minimizedButton, {\n [styles.collapsedHidden]: !showMinimized,\n // Lit only when a tab IS selected. Falling back to the stand-in\n // glyph is not a selection, and a lit stand-in told a reader on\n // Settings that something in the main group was.\n [styles.minimizedActive]: activeItem !== undefined,\n })}\n aria-hidden={showMinimized ? undefined : true}\n inert={showMinimized ? undefined : true}\n aria-expanded={false}\n aria-label=\"Show navigation\"\n onClick={onExpand}\n >\n <BadgedIcon\n Icon={MinimizedIcon}\n badge={showMinimized ? minimizedBadge : undefined}\n size={18}\n styles={styles}\n />\n </button>\n </div>\n );\n};\n\n/**\n * An icon with its badge on the upper-right corner, the way an app badge sits.\n *\n * Same wrapper as `nav-desktop`: the badge is positioned against the ICON, not\n * the whole tab. Anchoring to the tab at a fixed `top`/`right` tracked the\n * tab's geometry rather than the icon's.\n */\nconst BadgedIcon = ({\n Icon,\n badge,\n size,\n styles,\n}: {\n Icon: NavItem['Icon'];\n badge: NavItem['badge'];\n size: number;\n styles: ReturnType<typeof useStyle>;\n}) => (\n <span className={styles.iconWrap}>\n <Icon height={size} width={size} />\n {typeof badge === 'number' && badge > 0 && <span className={styles.badge}>{badge}</span>}\n {badge === 'dot' && <span className={styles.badgeDot} data-testid=\"nav-badge-dot\" />}\n </span>\n);\n"]}
@@ -0,0 +1,5 @@
1
+ import { type Theme } from '../../theme/index.js';
2
+ export declare const useStyle: (data?: {
3
+ theme?: Theme | undefined;
4
+ } | undefined) => import("jss").Classes<"badge" | "badgeDot" | "capsule" | "capsuleHidden" | "collapsedActive" | "collapsedHidden" | "collapsedLink" | "glass" | "grayLayer" | "iconWrap" | "item" | "layerItem" | "lens" | "lensReady" | "minimizedActive" | "minimizedButton" | "pill" | "pillCollapsed" | "pillReady" | "reveal" | "revealReady" | "root">;
5
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/component/nav-mobile/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAEnE,eAAO,MAAM,QAAQ;;6VA+VnB,CAAC"}
@@ -0,0 +1,347 @@
1
+ import { createUseStyles } from '../../theme/index.js';
2
+ export const useStyle = createUseStyles((theme) => {
3
+ // Shared so the real tab row and the blue reveal row lay out identically (and
4
+ // therefore stay pixel-aligned). The grid gives every tab an equal width (sized to
5
+ // the widest label), so the lens has a constant width and simply slides between tabs.
6
+ const grid = {
7
+ display: 'inline-grid',
8
+ gridAutoFlow: 'column',
9
+ gridAutoColumns: '1fr',
10
+ alignItems: 'center',
11
+ gap: theme.space.xs,
12
+ padding: theme.space.xs,
13
+ };
14
+ const tab = {
15
+ display: 'flex', // block-level so each tab stretches to fill its equal grid column
16
+ flexDirection: 'column',
17
+ alignItems: 'center',
18
+ justifyContent: 'center',
19
+ rowGap: theme.space.xxs,
20
+ padding: `${theme.space.sm} ${theme.space.lg}`,
21
+ fontSize: '0.80rem', // nav-specific size; not on the global fontSize scale
22
+ };
23
+ /**
24
+ * The nav's inset on all three open sides: how far it floats above the
25
+ * bottom edge, and how far the capsule and its accessory sit in from the
26
+ * left and right. One distance framing the whole bar rather than three
27
+ * unrelated ones.
28
+ *
29
+ * One expression reused rather than values that happen to agree: it
30
+ * resolves differently per device (a browser tab has no bottom inset, so
31
+ * `env()` is 0 and this falls to the fixed floor; in standalone the home
32
+ * indicator dominates), and hard-coded side padding would match on a
33
+ * desktop screenshot while drifting apart on the device where the inset
34
+ * actually does something.
35
+ */
36
+ const bottomInset = `max(${theme.space.xxxl}, calc(env(safe-area-inset-bottom) - ${theme.space.xl}))`;
37
+ /**
38
+ * One of the pill's circle shapes: a single icon centred in whatever the
39
+ * pill's box currently is. Shared by the route-collapsed link and the
40
+ * scroll-minimized button so the two circles are the same circle.
41
+ */
42
+ const circle = {
43
+ position: 'absolute',
44
+ top: 0,
45
+ right: 0,
46
+ bottom: 0,
47
+ left: 0,
48
+ zIndex: 2,
49
+ display: 'flex',
50
+ alignItems: 'center',
51
+ justifyContent: 'center',
52
+ cursor: 'pointer',
53
+ userSelect: 'none',
54
+ '-webkit-user-select': 'none',
55
+ transition: `opacity ${theme.transition.fast}`,
56
+ };
57
+ return {
58
+ root: {
59
+ position: 'fixed',
60
+ bottom: 0,
61
+ left: 0,
62
+ width: '100vw',
63
+ zIndex: theme.zIndex.sticky,
64
+ // The side padding below is INSIDE the 100vw above; without this the
65
+ // nav would be two insets wider than the viewport and put a horizontal
66
+ // scrollbar on every page. There is no global `border-box` reset in
67
+ // this app, so it is declared here.
68
+ boxSizing: 'border-box',
69
+ display: 'flex',
70
+ // STRETCH, so both pills share one height however much each contains.
71
+ // A collapsed pill's circle is its own measured height, and a side with
72
+ // nothing to expand into (a reader's settings side) would otherwise be
73
+ // shorter than the bar beside it.
74
+ alignItems: 'stretch',
75
+ // Pushed to opposite edges: the capsule takes one side and its
76
+ // accessory the other, each inset by the same distance the bar floats
77
+ // above the bottom.
78
+ justifyContent: 'space-between',
79
+ paddingLeft: bottomInset,
80
+ paddingRight: bottomInset,
81
+ // A floor, not the spacing: `space-between` sets the real gap. This
82
+ // only stops the two touching if the capsule ever grows wide enough to
83
+ // close the distance itself.
84
+ gap: bottomInset,
85
+ // One rule, both contexts (no iOS-unreliable display-mode query): a browser tab has
86
+ // no bottom safe-area inset, so env() ≈ 0 and this resolves to the fixed floor
87
+ // (room for the frosted shadow); in standalone the home-indicator inset dominates
88
+ // and the pill dips toward it while staying clear.
89
+ paddingBottom: bottomInset,
90
+ [theme.breakpoint.normal]: {
91
+ display: 'none',
92
+ },
93
+ },
94
+ /**
95
+ * One side of the bar, and the thing that actually morphs.
96
+ *
97
+ * It holds BOTH shapes — the capsule of destinations and the single
98
+ * collapsed link — and animates its own width between them, clipping
99
+ * whichever is too wide to fit. That is the difference between a morph and
100
+ * a cross-fade: there is one element throughout, so the capsule is seen to
101
+ * shrink into the circle rather than being swapped for it.
102
+ *
103
+ * The frosted glass lives HERE rather than on the capsule now, so the
104
+ * visible surface is the pill itself and follows the width. It remains a
105
+ * SIBLING of the lens, never an ancestor — Safari and Firefox trap
106
+ * positioned descendants of a `backdrop-filter` element in a stacking
107
+ * sandbox where they stop repainting, which is the same reason the glass
108
+ * was a separate layer before.
109
+ */
110
+ pill: {
111
+ position: 'relative',
112
+ flexShrink: 0,
113
+ boxSizing: 'border-box',
114
+ borderRadius: theme.radius.pill,
115
+ // Clips the shape that is currently too wide for the pill. Without it a
116
+ // collapsed pill would show a slice of its capsule rather than a circle.
117
+ overflow: 'hidden',
118
+ display: 'flex',
119
+ alignItems: 'center',
120
+ justifyContent: 'center',
121
+ },
122
+ /**
123
+ * Added one frame after the first measurement. The width is set from the
124
+ * DOM, so on the very first render it changes from `auto` to a number —
125
+ * and with the transition already on, every pill would animate itself down
126
+ * to a circle on arrival, as if the bar collapsed as the page loaded.
127
+ */
128
+ pillReady: {
129
+ transition: `width ${theme.transition.spring}`,
130
+ '@media (prefers-reduced-motion: reduce)': {
131
+ // The capsule and circle still swap, they just stop sliding between
132
+ // the two widths — matching `lensReady`/`revealReady` below.
133
+ transition: 'none',
134
+ },
135
+ },
136
+ /** Only a hook for tests and future styling; the width does the work. */
137
+ pillCollapsed: {},
138
+ /** The collapsed shape: one icon, centred, filling the circle. */
139
+ collapsedLink: {
140
+ ...circle,
141
+ color: theme.color.text.primary,
142
+ textDecoration: 'none',
143
+ },
144
+ collapsedActive: {
145
+ color: theme.color.brand.default,
146
+ },
147
+ /**
148
+ * The minimized shape: the same circle, holding whatever the capsule had
149
+ * selected. Unlit by default — a plain glyph on the bare pill, like the
150
+ * route-collapsed circle — because a capsule with NO selected tab (a reader
151
+ * on Settings, whose main group is still the expanded side) minimizes to
152
+ * its stand-in glyph, and that must not claim to be selected. A button, so
153
+ * the native button chrome goes.
154
+ */
155
+ minimizedButton: {
156
+ ...circle,
157
+ boxSizing: 'border-box',
158
+ borderRadius: theme.radius.pill,
159
+ margin: 0,
160
+ padding: 0,
161
+ // Longhands, not `border`/`background` shorthands: `minimizedActive`
162
+ // below sets the matching longhands, and a shorthand here would reset
163
+ // the lot in environments that resolve the two in declaration order.
164
+ borderStyle: 'none',
165
+ backgroundColor: 'transparent',
166
+ font: 'inherit',
167
+ color: theme.color.text.primary,
168
+ '-webkit-tap-highlight-color': 'transparent',
169
+ },
170
+ /**
171
+ * …and lit when it IS the selected tab carried into the circle: the
172
+ * selected tab's surface — `glassHighlight`, the raised, lighter glass the
173
+ * lens paints over the pill — and the active colour for the glyph. Without
174
+ * the surface the circle read as an empty pill with a blue icon, a
175
+ * different thing from the lit tab it replaced.
176
+ *
177
+ * The highlight sits over the pill's own `glass` layer exactly as the lens
178
+ * does over the capsule; it is the pill's full box, so the whole circle is
179
+ * lens, not a smaller disc inside a plain one. Its own border follows the
180
+ * circle's radius, set above.
181
+ */
182
+ minimizedActive: {
183
+ ...theme.recipe.glassHighlight,
184
+ color: theme.color.brand.default,
185
+ },
186
+ /**
187
+ * Faded rather than unmounted: the two shapes swap while the pill is still
188
+ * mid-width, so both have to be drawable at once. `pointerEvents` matters
189
+ * independently of opacity — a transparent link still takes the tap.
190
+ */
191
+ collapsedHidden: {
192
+ opacity: 0,
193
+ pointerEvents: 'none',
194
+ },
195
+ capsuleHidden: {
196
+ opacity: 0,
197
+ pointerEvents: 'none',
198
+ transition: `opacity ${theme.transition.fast}`,
199
+ },
200
+ // Plain positioning/layout container. It deliberately has NO backdrop-filter:
201
+ // the frosted glass lives in a separate `glass` layer so the lens and links are
202
+ // its siblings, not its descendants (see `glass` below).
203
+ capsule: {
204
+ ...grid,
205
+ position: 'relative',
206
+ marginBottom: 0,
207
+ // Its NATURAL width, whatever the pill around it is currently set to.
208
+ // Without this the grid would shrink to fit a collapsing pill, the
209
+ // measured `capsuleWidth` would shrink with it, and the pill would chase
210
+ // a width that keeps moving.
211
+ width: 'max-content',
212
+ transition: `opacity ${theme.transition.fast}`,
213
+ },
214
+ // Frosted-glass background as its own layer behind everything. The backdrop-filter
215
+ // MUST live here and NOT on an ancestor of the lens/links: Safari and Firefox trap
216
+ // positioned descendants of a backdrop-filter element in a stacking sandbox where
217
+ // they don't repaint/animate. As a sibling, the lens morphs freely.
218
+ glass: {
219
+ ...theme.recipe.glass,
220
+ position: 'absolute',
221
+ top: 0,
222
+ right: 0,
223
+ bottom: 0,
224
+ left: 0,
225
+ zIndex: 0,
226
+ boxSizing: 'border-box',
227
+ borderRadius: theme.radius.pill,
228
+ pointerEvents: 'none',
229
+ },
230
+ // The active-tab lens. Vertical extent is fixed here (top/bottom insets ⇒ always
231
+ // concentric with the capsule); horizontal position + width come from inline style
232
+ // (measured from the active tab). The base rule only transitions opacity, so the
233
+ // first placement jumps into position (no slide-in from the corner). The `lensReady`
234
+ // modifier — added one frame after mount, decoupled from any position change — turns
235
+ // on the morph transition.
236
+ lens: {
237
+ ...theme.recipe.glassHighlight,
238
+ position: 'absolute',
239
+ zIndex: 1,
240
+ left: 0,
241
+ top: theme.space.xs,
242
+ bottom: theme.space.xs,
243
+ boxSizing: 'border-box',
244
+ borderRadius: theme.radius.pill,
245
+ opacity: 0,
246
+ pointerEvents: 'none',
247
+ willChange: 'transform',
248
+ transition: `opacity ${theme.transition.fast}`,
249
+ },
250
+ // Tabs are equal width, so only position changes between tabs — animate transform
251
+ // only (compositor-accelerated, so it stays smooth even while a new page loads on
252
+ // the main thread). Applied to the lens AND the blue reveal so they move in lockstep.
253
+ lensReady: {
254
+ transition: `transform ${theme.transition.spring}, opacity ${theme.transition.fast}`,
255
+ '@media (prefers-reduced-motion: reduce)': {
256
+ transition: `opacity ${theme.transition.fast}`,
257
+ },
258
+ },
259
+ // The real, interactive tabs — kept for layout (they size the capsule), clicks, and
260
+ // aria-current — but rendered transparent. The visible gray + blue come from the two
261
+ // absolute overlays below, so they share one rounding and overlap perfectly.
262
+ item: {
263
+ ...tab,
264
+ position: 'relative',
265
+ zIndex: 2,
266
+ color: 'transparent',
267
+ textDecoration: 'none',
268
+ cursor: 'pointer',
269
+ userSelect: 'none',
270
+ '-webkit-user-select': 'none',
271
+ },
272
+ // The two visible text rows. Both are absolute, shrink-to-fit at the capsule origin,
273
+ // with the same grid — so the browser rounds them to the exact same device pixels and
274
+ // `reveal` (blue) overlays `grayLayer` with no sub-pixel fringe. `reveal` is clipped to
275
+ // a lens-shaped window (set inline) that animates across it; `grayLayer` is always full.
276
+ grayLayer: {
277
+ ...grid,
278
+ position: 'absolute',
279
+ top: 0,
280
+ left: 0,
281
+ zIndex: 3,
282
+ color: theme.color.text.primary,
283
+ pointerEvents: 'none',
284
+ },
285
+ reveal: {
286
+ ...grid,
287
+ position: 'absolute',
288
+ top: 0,
289
+ left: 0,
290
+ zIndex: 4,
291
+ color: theme.color.brand.default,
292
+ pointerEvents: 'none',
293
+ opacity: 0,
294
+ willChange: 'clip-path',
295
+ transition: `opacity ${theme.transition.fast}`,
296
+ },
297
+ revealReady: {
298
+ transition: `clip-path ${theme.transition.spring}, opacity ${theme.transition.fast}`,
299
+ '@media (prefers-reduced-motion: reduce)': {
300
+ transition: `opacity ${theme.transition.fast}`,
301
+ },
302
+ },
303
+ layerItem: {
304
+ ...tab,
305
+ },
306
+ // The positioning context for the badge — the icon alone, not the whole
307
+ // item. The previous `top: 2px; right: 10px` was measured against the
308
+ // item's capsule, so it tracked the capsule's geometry rather than the
309
+ // icon's.
310
+ iconWrap: {
311
+ position: 'relative',
312
+ display: 'inline-flex',
313
+ alignItems: 'center',
314
+ justifyContent: 'center',
315
+ },
316
+ // A real pill, matching `nav-desktop`. This style used to be shared with
317
+ // the dot below — an 8x8 box with no padding — so a numeric badge was
318
+ // squeezed into a dot and clipped.
319
+ badge: {
320
+ position: 'absolute',
321
+ top: '-6px',
322
+ right: '-8px',
323
+ minWidth: '16px',
324
+ height: '16px',
325
+ padding: `0 ${theme.space.xs}`,
326
+ boxSizing: 'border-box',
327
+ borderRadius: theme.radius.pill,
328
+ backgroundColor: theme.color.danger.default,
329
+ color: theme.color.bg.page,
330
+ fontSize: '0.65rem',
331
+ lineHeight: '16px',
332
+ textAlign: 'center',
333
+ pointerEvents: 'none',
334
+ },
335
+ badgeDot: {
336
+ position: 'absolute',
337
+ top: '-3px',
338
+ right: '-4px',
339
+ width: '8px',
340
+ height: '8px',
341
+ borderRadius: theme.radius.pill,
342
+ backgroundColor: theme.color.danger.default,
343
+ pointerEvents: 'none',
344
+ },
345
+ };
346
+ });
347
+ //# sourceMappingURL=style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/component/nav-mobile/style.ts"],"names":[],"mappings":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ACD,yEAAyE;QACzE,sEAAsE;QACtE,mCAAmC;QACnC,KAAK,EAAE;YACL,QAAQ,EAAE,UAAU;YACpB,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,MAAM;YAChB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,KAAK,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE;YAC9B,SAAS,EAAE,YAAY;YACvB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;YAC/B,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO;YAC3C,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI;YAC1B,QAAQ,EAAE,SAAS;YACnB,UAAU,EAAE,MAAM;YAClB,SAAS,EAAE,QAAQ;YACnB,aAAa,EAAE,MAAM;SACtB;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,UAAU;YACpB,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,KAAK;YACb,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;YAC/B,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO;YAC3C,aAAa,EAAE,MAAM;SACtB;KACF,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { createUseStyles, type Theme } from '../../theme/index.js';\n\nexport const useStyle = createUseStyles((theme: Theme) => {\n // Shared so the real tab row and the blue reveal row lay out identically (and\n // therefore stay pixel-aligned). The grid gives every tab an equal width (sized to\n // the widest label), so the lens has a constant width and simply slides between tabs.\n const grid = {\n display: 'inline-grid',\n gridAutoFlow: 'column',\n gridAutoColumns: '1fr',\n alignItems: 'center',\n gap: theme.space.xs,\n padding: theme.space.xs,\n } as const;\n\n const tab = {\n display: 'flex', // block-level so each tab stretches to fill its equal grid column\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n rowGap: theme.space.xxs,\n padding: `${theme.space.sm} ${theme.space.lg}`,\n fontSize: '0.80rem', // nav-specific size; not on the global fontSize scale\n } as const;\n\n /**\n * The nav's inset on all three open sides: how far it floats above the\n * bottom edge, and how far the capsule and its accessory sit in from the\n * left and right. One distance framing the whole bar rather than three\n * unrelated ones.\n *\n * One expression reused rather than values that happen to agree: it\n * resolves differently per device (a browser tab has no bottom inset, so\n * `env()` is 0 and this falls to the fixed floor; in standalone the home\n * indicator dominates), and hard-coded side padding would match on a\n * desktop screenshot while drifting apart on the device where the inset\n * actually does something.\n */\n const bottomInset = `max(${theme.space.xxxl}, calc(env(safe-area-inset-bottom) - ${theme.space.xl}))`;\n\n /**\n * One of the pill's circle shapes: a single icon centred in whatever the\n * pill's box currently is. Shared by the route-collapsed link and the\n * scroll-minimized button so the two circles are the same circle.\n */\n const circle = {\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n zIndex: 2,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n cursor: 'pointer',\n userSelect: 'none',\n '-webkit-user-select': 'none',\n transition: `opacity ${theme.transition.fast}`,\n } as const;\n\n return {\n root: {\n position: 'fixed',\n bottom: 0,\n left: 0,\n width: '100vw',\n zIndex: theme.zIndex.sticky,\n // The side padding below is INSIDE the 100vw above; without this the\n // nav would be two insets wider than the viewport and put a horizontal\n // scrollbar on every page. There is no global `border-box` reset in\n // this app, so it is declared here.\n boxSizing: 'border-box',\n display: 'flex',\n // STRETCH, so both pills share one height however much each contains.\n // A collapsed pill's circle is its own measured height, and a side with\n // nothing to expand into (a reader's settings side) would otherwise be\n // shorter than the bar beside it.\n alignItems: 'stretch',\n // Pushed to opposite edges: the capsule takes one side and its\n // accessory the other, each inset by the same distance the bar floats\n // above the bottom.\n justifyContent: 'space-between',\n paddingLeft: bottomInset,\n paddingRight: bottomInset,\n // A floor, not the spacing: `space-between` sets the real gap. This\n // only stops the two touching if the capsule ever grows wide enough to\n // close the distance itself.\n gap: bottomInset,\n // One rule, both contexts (no iOS-unreliable display-mode query): a browser tab has\n // no bottom safe-area inset, so env() ≈ 0 and this resolves to the fixed floor\n // (room for the frosted shadow); in standalone the home-indicator inset dominates\n // and the pill dips toward it while staying clear.\n paddingBottom: bottomInset,\n [theme.breakpoint.normal]: {\n display: 'none',\n },\n },\n /**\n * One side of the bar, and the thing that actually morphs.\n *\n * It holds BOTH shapes — the capsule of destinations and the single\n * collapsed link — and animates its own width between them, clipping\n * whichever is too wide to fit. That is the difference between a morph and\n * a cross-fade: there is one element throughout, so the capsule is seen to\n * shrink into the circle rather than being swapped for it.\n *\n * The frosted glass lives HERE rather than on the capsule now, so the\n * visible surface is the pill itself and follows the width. It remains a\n * SIBLING of the lens, never an ancestor — Safari and Firefox trap\n * positioned descendants of a `backdrop-filter` element in a stacking\n * sandbox where they stop repainting, which is the same reason the glass\n * was a separate layer before.\n */\n pill: {\n position: 'relative',\n flexShrink: 0,\n boxSizing: 'border-box',\n borderRadius: theme.radius.pill,\n // Clips the shape that is currently too wide for the pill. Without it a\n // collapsed pill would show a slice of its capsule rather than a circle.\n overflow: 'hidden',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n /**\n * Added one frame after the first measurement. The width is set from the\n * DOM, so on the very first render it changes from `auto` to a number —\n * and with the transition already on, every pill would animate itself down\n * to a circle on arrival, as if the bar collapsed as the page loaded.\n */\n pillReady: {\n transition: `width ${theme.transition.spring}`,\n '@media (prefers-reduced-motion: reduce)': {\n // The capsule and circle still swap, they just stop sliding between\n // the two widths — matching `lensReady`/`revealReady` below.\n transition: 'none',\n },\n },\n /** Only a hook for tests and future styling; the width does the work. */\n pillCollapsed: {},\n\n /** The collapsed shape: one icon, centred, filling the circle. */\n collapsedLink: {\n ...circle,\n color: theme.color.text.primary,\n textDecoration: 'none',\n },\n collapsedActive: {\n color: theme.color.brand.default,\n },\n /**\n * The minimized shape: the same circle, holding whatever the capsule had\n * selected. Unlit by default — a plain glyph on the bare pill, like the\n * route-collapsed circle — because a capsule with NO selected tab (a reader\n * on Settings, whose main group is still the expanded side) minimizes to\n * its stand-in glyph, and that must not claim to be selected. A button, so\n * the native button chrome goes.\n */\n minimizedButton: {\n ...circle,\n boxSizing: 'border-box',\n borderRadius: theme.radius.pill,\n margin: 0,\n padding: 0,\n // Longhands, not `border`/`background` shorthands: `minimizedActive`\n // below sets the matching longhands, and a shorthand here would reset\n // the lot in environments that resolve the two in declaration order.\n borderStyle: 'none',\n backgroundColor: 'transparent',\n font: 'inherit',\n color: theme.color.text.primary,\n '-webkit-tap-highlight-color': 'transparent',\n },\n /**\n * …and lit when it IS the selected tab carried into the circle: the\n * selected tab's surface — `glassHighlight`, the raised, lighter glass the\n * lens paints over the pill — and the active colour for the glyph. Without\n * the surface the circle read as an empty pill with a blue icon, a\n * different thing from the lit tab it replaced.\n *\n * The highlight sits over the pill's own `glass` layer exactly as the lens\n * does over the capsule; it is the pill's full box, so the whole circle is\n * lens, not a smaller disc inside a plain one. Its own border follows the\n * circle's radius, set above.\n */\n minimizedActive: {\n ...theme.recipe.glassHighlight,\n color: theme.color.brand.default,\n },\n /**\n * Faded rather than unmounted: the two shapes swap while the pill is still\n * mid-width, so both have to be drawable at once. `pointerEvents` matters\n * independently of opacity — a transparent link still takes the tap.\n */\n collapsedHidden: {\n opacity: 0,\n pointerEvents: 'none',\n },\n capsuleHidden: {\n opacity: 0,\n pointerEvents: 'none',\n transition: `opacity ${theme.transition.fast}`,\n },\n\n // Plain positioning/layout container. It deliberately has NO backdrop-filter:\n // the frosted glass lives in a separate `glass` layer so the lens and links are\n // its siblings, not its descendants (see `glass` below).\n capsule: {\n ...grid,\n position: 'relative',\n marginBottom: 0,\n // Its NATURAL width, whatever the pill around it is currently set to.\n // Without this the grid would shrink to fit a collapsing pill, the\n // measured `capsuleWidth` would shrink with it, and the pill would chase\n // a width that keeps moving.\n width: 'max-content',\n transition: `opacity ${theme.transition.fast}`,\n },\n\n // Frosted-glass background as its own layer behind everything. The backdrop-filter\n // MUST live here and NOT on an ancestor of the lens/links: Safari and Firefox trap\n // positioned descendants of a backdrop-filter element in a stacking sandbox where\n // they don't repaint/animate. As a sibling, the lens morphs freely.\n glass: {\n ...theme.recipe.glass,\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n zIndex: 0,\n boxSizing: 'border-box',\n borderRadius: theme.radius.pill,\n pointerEvents: 'none',\n },\n // The active-tab lens. Vertical extent is fixed here (top/bottom insets ⇒ always\n // concentric with the capsule); horizontal position + width come from inline style\n // (measured from the active tab). The base rule only transitions opacity, so the\n // first placement jumps into position (no slide-in from the corner). The `lensReady`\n // modifier — added one frame after mount, decoupled from any position change — turns\n // on the morph transition.\n lens: {\n ...theme.recipe.glassHighlight,\n position: 'absolute',\n zIndex: 1,\n left: 0,\n top: theme.space.xs,\n bottom: theme.space.xs,\n boxSizing: 'border-box',\n borderRadius: theme.radius.pill,\n opacity: 0,\n pointerEvents: 'none',\n willChange: 'transform',\n transition: `opacity ${theme.transition.fast}`,\n },\n // Tabs are equal width, so only position changes between tabs — animate transform\n // only (compositor-accelerated, so it stays smooth even while a new page loads on\n // the main thread). Applied to the lens AND the blue reveal so they move in lockstep.\n lensReady: {\n transition: `transform ${theme.transition.spring}, opacity ${theme.transition.fast}`,\n '@media (prefers-reduced-motion: reduce)': {\n transition: `opacity ${theme.transition.fast}`,\n },\n },\n // The real, interactive tabs — kept for layout (they size the capsule), clicks, and\n // aria-current — but rendered transparent. The visible gray + blue come from the two\n // absolute overlays below, so they share one rounding and overlap perfectly.\n item: {\n ...tab,\n position: 'relative',\n zIndex: 2,\n color: 'transparent',\n textDecoration: 'none',\n cursor: 'pointer',\n userSelect: 'none',\n '-webkit-user-select': 'none',\n },\n // The two visible text rows. Both are absolute, shrink-to-fit at the capsule origin,\n // with the same grid — so the browser rounds them to the exact same device pixels and\n // `reveal` (blue) overlays `grayLayer` with no sub-pixel fringe. `reveal` is clipped to\n // a lens-shaped window (set inline) that animates across it; `grayLayer` is always full.\n grayLayer: {\n ...grid,\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 3,\n color: theme.color.text.primary,\n pointerEvents: 'none',\n },\n reveal: {\n ...grid,\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 4,\n color: theme.color.brand.default,\n pointerEvents: 'none',\n opacity: 0,\n willChange: 'clip-path',\n transition: `opacity ${theme.transition.fast}`,\n },\n revealReady: {\n transition: `clip-path ${theme.transition.spring}, opacity ${theme.transition.fast}`,\n '@media (prefers-reduced-motion: reduce)': {\n transition: `opacity ${theme.transition.fast}`,\n },\n },\n layerItem: {\n ...tab,\n },\n // The positioning context for the badge — the icon alone, not the whole\n // item. The previous `top: 2px; right: 10px` was measured against the\n // item's capsule, so it tracked the capsule's geometry rather than the\n // icon's.\n iconWrap: {\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n // A real pill, matching `nav-desktop`. This style used to be shared with\n // the dot below — an 8x8 box with no padding — so a numeric badge was\n // squeezed into a dot and clipped.\n badge: {\n position: 'absolute',\n top: '-6px',\n right: '-8px',\n minWidth: '16px',\n height: '16px',\n padding: `0 ${theme.space.xs}`,\n boxSizing: 'border-box',\n borderRadius: theme.radius.pill,\n backgroundColor: theme.color.danger.default,\n color: theme.color.bg.page,\n fontSize: '0.65rem',\n lineHeight: '16px',\n textAlign: 'center',\n pointerEvents: 'none',\n },\n badgeDot: {\n position: 'absolute',\n top: '-3px',\n right: '-4px',\n width: '8px',\n height: '8px',\n borderRadius: theme.radius.pill,\n backgroundColor: theme.color.danger.default,\n pointerEvents: 'none',\n },\n };\n});\n"]}
@@ -0,0 +1,12 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { IconProps } from '../icon/index.js';
3
+ /** A single navigation destination, shared by the desktop and mobile layouts. */
4
+ export interface NavItem {
5
+ to: string;
6
+ label: string;
7
+ Icon: (props: IconProps) => ReactElement;
8
+ active: boolean;
9
+ /** A count of pending fixes, or `'dot'` for "active, nothing to decide yet". */
10
+ badge?: number | 'dot';
11
+ }
12
+ //# sourceMappingURL=nav-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav-types.d.ts","sourceRoot":"","sources":["../../src/component/nav-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,iFAAiF;AACjF,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,YAAY,CAAC;IACzC,MAAM,EAAE,OAAO,CAAC;IAChB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=nav-types.js.map