@korzun/design 0.0.0-stage → 0.0.2

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,354 @@
1
+ import { createUseStyles, type Theme } from '../../theme/index.js';
2
+
3
+ export const useStyle = createUseStyles((theme: Theme) => {
4
+ // Shared so the real tab row and the blue reveal row lay out identically (and
5
+ // therefore stay pixel-aligned). The grid gives every tab an equal width (sized to
6
+ // the widest label), so the lens has a constant width and simply slides between tabs.
7
+ const grid = {
8
+ display: 'inline-grid',
9
+ gridAutoFlow: 'column',
10
+ gridAutoColumns: '1fr',
11
+ alignItems: 'center',
12
+ gap: theme.space.xs,
13
+ padding: theme.space.xs,
14
+ } as const;
15
+
16
+ const tab = {
17
+ display: 'flex', // block-level so each tab stretches to fill its equal grid column
18
+ flexDirection: 'column',
19
+ alignItems: 'center',
20
+ justifyContent: 'center',
21
+ rowGap: theme.space.xxs,
22
+ padding: `${theme.space.sm} ${theme.space.lg}`,
23
+ fontSize: '0.80rem', // nav-specific size; not on the global fontSize scale
24
+ } as const;
25
+
26
+ /**
27
+ * The nav's inset on all three open sides: how far it floats above the
28
+ * bottom edge, and how far the capsule and its accessory sit in from the
29
+ * left and right. One distance framing the whole bar rather than three
30
+ * unrelated ones.
31
+ *
32
+ * One expression reused rather than values that happen to agree: it
33
+ * resolves differently per device (a browser tab has no bottom inset, so
34
+ * `env()` is 0 and this falls to the fixed floor; in standalone the home
35
+ * indicator dominates), and hard-coded side padding would match on a
36
+ * desktop screenshot while drifting apart on the device where the inset
37
+ * actually does something.
38
+ */
39
+ const bottomInset = `max(${theme.space.xxxl}, calc(env(safe-area-inset-bottom) - ${theme.space.xl}))`;
40
+
41
+ /**
42
+ * One of the pill's circle shapes: a single icon centred in whatever the
43
+ * pill's box currently is. Shared by the route-collapsed link and the
44
+ * scroll-minimized button so the two circles are the same circle.
45
+ */
46
+ const circle = {
47
+ position: 'absolute',
48
+ top: 0,
49
+ right: 0,
50
+ bottom: 0,
51
+ left: 0,
52
+ zIndex: 2,
53
+ display: 'flex',
54
+ alignItems: 'center',
55
+ justifyContent: 'center',
56
+ cursor: 'pointer',
57
+ userSelect: 'none',
58
+ '-webkit-user-select': 'none',
59
+ transition: `opacity ${theme.transition.fast}`,
60
+ } as const;
61
+
62
+ return {
63
+ root: {
64
+ position: 'fixed',
65
+ bottom: 0,
66
+ left: 0,
67
+ width: '100vw',
68
+ zIndex: theme.zIndex.sticky,
69
+ // The side padding below is INSIDE the 100vw above; without this the
70
+ // nav would be two insets wider than the viewport and put a horizontal
71
+ // scrollbar on every page. There is no global `border-box` reset in
72
+ // this app, so it is declared here.
73
+ boxSizing: 'border-box',
74
+ display: 'flex',
75
+ // STRETCH, so both pills share one height however much each contains.
76
+ // A collapsed pill's circle is its own measured height, and a side with
77
+ // nothing to expand into (a reader's settings side) would otherwise be
78
+ // shorter than the bar beside it.
79
+ alignItems: 'stretch',
80
+ // Pushed to opposite edges: the capsule takes one side and its
81
+ // accessory the other, each inset by the same distance the bar floats
82
+ // above the bottom.
83
+ justifyContent: 'space-between',
84
+ paddingLeft: bottomInset,
85
+ paddingRight: bottomInset,
86
+ // A floor, not the spacing: `space-between` sets the real gap. This
87
+ // only stops the two touching if the capsule ever grows wide enough to
88
+ // close the distance itself.
89
+ gap: bottomInset,
90
+ // One rule, both contexts (no iOS-unreliable display-mode query): a browser tab has
91
+ // no bottom safe-area inset, so env() ≈ 0 and this resolves to the fixed floor
92
+ // (room for the frosted shadow); in standalone the home-indicator inset dominates
93
+ // and the pill dips toward it while staying clear.
94
+ paddingBottom: bottomInset,
95
+ [theme.breakpoint.normal]: {
96
+ display: 'none',
97
+ },
98
+ },
99
+ /**
100
+ * One side of the bar, and the thing that actually morphs.
101
+ *
102
+ * It holds BOTH shapes — the capsule of destinations and the single
103
+ * collapsed link — and animates its own width between them, clipping
104
+ * whichever is too wide to fit. That is the difference between a morph and
105
+ * a cross-fade: there is one element throughout, so the capsule is seen to
106
+ * shrink into the circle rather than being swapped for it.
107
+ *
108
+ * The frosted glass lives HERE rather than on the capsule now, so the
109
+ * visible surface is the pill itself and follows the width. It remains a
110
+ * SIBLING of the lens, never an ancestor — Safari and Firefox trap
111
+ * positioned descendants of a `backdrop-filter` element in a stacking
112
+ * sandbox where they stop repainting, which is the same reason the glass
113
+ * was a separate layer before.
114
+ */
115
+ pill: {
116
+ position: 'relative',
117
+ flexShrink: 0,
118
+ boxSizing: 'border-box',
119
+ borderRadius: theme.radius.pill,
120
+ // Clips the shape that is currently too wide for the pill. Without it a
121
+ // collapsed pill would show a slice of its capsule rather than a circle.
122
+ overflow: 'hidden',
123
+ display: 'flex',
124
+ alignItems: 'center',
125
+ justifyContent: 'center',
126
+ },
127
+ /**
128
+ * Added one frame after the first measurement. The width is set from the
129
+ * DOM, so on the very first render it changes from `auto` to a number —
130
+ * and with the transition already on, every pill would animate itself down
131
+ * to a circle on arrival, as if the bar collapsed as the page loaded.
132
+ */
133
+ pillReady: {
134
+ transition: `width ${theme.transition.spring}`,
135
+ '@media (prefers-reduced-motion: reduce)': {
136
+ // The capsule and circle still swap, they just stop sliding between
137
+ // the two widths — matching `lensReady`/`revealReady` below.
138
+ transition: 'none',
139
+ },
140
+ },
141
+ /** Only a hook for tests and future styling; the width does the work. */
142
+ pillCollapsed: {},
143
+
144
+ /** The collapsed shape: one icon, centred, filling the circle. */
145
+ collapsedLink: {
146
+ ...circle,
147
+ color: theme.color.text.primary,
148
+ textDecoration: 'none',
149
+ },
150
+ collapsedActive: {
151
+ color: theme.color.brand.default,
152
+ },
153
+ /**
154
+ * The minimized shape: the same circle, holding whatever the capsule had
155
+ * selected. Unlit by default — a plain glyph on the bare pill, like the
156
+ * route-collapsed circle — because a capsule with NO selected tab (a reader
157
+ * on Settings, whose main group is still the expanded side) minimizes to
158
+ * its stand-in glyph, and that must not claim to be selected. A button, so
159
+ * the native button chrome goes.
160
+ */
161
+ minimizedButton: {
162
+ ...circle,
163
+ boxSizing: 'border-box',
164
+ borderRadius: theme.radius.pill,
165
+ margin: 0,
166
+ padding: 0,
167
+ // Longhands, not `border`/`background` shorthands: `minimizedActive`
168
+ // below sets the matching longhands, and a shorthand here would reset
169
+ // the lot in environments that resolve the two in declaration order.
170
+ borderStyle: 'none',
171
+ backgroundColor: 'transparent',
172
+ font: 'inherit',
173
+ color: theme.color.text.primary,
174
+ '-webkit-tap-highlight-color': 'transparent',
175
+ },
176
+ /**
177
+ * …and lit when it IS the selected tab carried into the circle: the
178
+ * selected tab's surface — `glassHighlight`, the raised, lighter glass the
179
+ * lens paints over the pill — and the active colour for the glyph. Without
180
+ * the surface the circle read as an empty pill with a blue icon, a
181
+ * different thing from the lit tab it replaced.
182
+ *
183
+ * The highlight sits over the pill's own `glass` layer exactly as the lens
184
+ * does over the capsule; it is the pill's full box, so the whole circle is
185
+ * lens, not a smaller disc inside a plain one. Its own border follows the
186
+ * circle's radius, set above.
187
+ */
188
+ minimizedActive: {
189
+ ...theme.recipe.glassHighlight,
190
+ color: theme.color.brand.default,
191
+ },
192
+ /**
193
+ * Faded rather than unmounted: the two shapes swap while the pill is still
194
+ * mid-width, so both have to be drawable at once. `pointerEvents` matters
195
+ * independently of opacity — a transparent link still takes the tap.
196
+ */
197
+ collapsedHidden: {
198
+ opacity: 0,
199
+ pointerEvents: 'none',
200
+ },
201
+ capsuleHidden: {
202
+ opacity: 0,
203
+ pointerEvents: 'none',
204
+ transition: `opacity ${theme.transition.fast}`,
205
+ },
206
+
207
+ // Plain positioning/layout container. It deliberately has NO backdrop-filter:
208
+ // the frosted glass lives in a separate `glass` layer so the lens and links are
209
+ // its siblings, not its descendants (see `glass` below).
210
+ capsule: {
211
+ ...grid,
212
+ position: 'relative',
213
+ marginBottom: 0,
214
+ // Its NATURAL width, whatever the pill around it is currently set to.
215
+ // Without this the grid would shrink to fit a collapsing pill, the
216
+ // measured `capsuleWidth` would shrink with it, and the pill would chase
217
+ // a width that keeps moving.
218
+ width: 'max-content',
219
+ transition: `opacity ${theme.transition.fast}`,
220
+ },
221
+
222
+ // Frosted-glass background as its own layer behind everything. The backdrop-filter
223
+ // MUST live here and NOT on an ancestor of the lens/links: Safari and Firefox trap
224
+ // positioned descendants of a backdrop-filter element in a stacking sandbox where
225
+ // they don't repaint/animate. As a sibling, the lens morphs freely.
226
+ glass: {
227
+ ...theme.recipe.glass,
228
+ position: 'absolute',
229
+ top: 0,
230
+ right: 0,
231
+ bottom: 0,
232
+ left: 0,
233
+ zIndex: 0,
234
+ boxSizing: 'border-box',
235
+ borderRadius: theme.radius.pill,
236
+ pointerEvents: 'none',
237
+ },
238
+ // The active-tab lens. Vertical extent is fixed here (top/bottom insets ⇒ always
239
+ // concentric with the capsule); horizontal position + width come from inline style
240
+ // (measured from the active tab). The base rule only transitions opacity, so the
241
+ // first placement jumps into position (no slide-in from the corner). The `lensReady`
242
+ // modifier — added one frame after mount, decoupled from any position change — turns
243
+ // on the morph transition.
244
+ lens: {
245
+ ...theme.recipe.glassHighlight,
246
+ position: 'absolute',
247
+ zIndex: 1,
248
+ left: 0,
249
+ top: theme.space.xs,
250
+ bottom: theme.space.xs,
251
+ boxSizing: 'border-box',
252
+ borderRadius: theme.radius.pill,
253
+ opacity: 0,
254
+ pointerEvents: 'none',
255
+ willChange: 'transform',
256
+ transition: `opacity ${theme.transition.fast}`,
257
+ },
258
+ // Tabs are equal width, so only position changes between tabs — animate transform
259
+ // only (compositor-accelerated, so it stays smooth even while a new page loads on
260
+ // the main thread). Applied to the lens AND the blue reveal so they move in lockstep.
261
+ lensReady: {
262
+ transition: `transform ${theme.transition.spring}, opacity ${theme.transition.fast}`,
263
+ '@media (prefers-reduced-motion: reduce)': {
264
+ transition: `opacity ${theme.transition.fast}`,
265
+ },
266
+ },
267
+ // The real, interactive tabs — kept for layout (they size the capsule), clicks, and
268
+ // aria-current — but rendered transparent. The visible gray + blue come from the two
269
+ // absolute overlays below, so they share one rounding and overlap perfectly.
270
+ item: {
271
+ ...tab,
272
+ position: 'relative',
273
+ zIndex: 2,
274
+ color: 'transparent',
275
+ textDecoration: 'none',
276
+ cursor: 'pointer',
277
+ userSelect: 'none',
278
+ '-webkit-user-select': 'none',
279
+ },
280
+ // The two visible text rows. Both are absolute, shrink-to-fit at the capsule origin,
281
+ // with the same grid — so the browser rounds them to the exact same device pixels and
282
+ // `reveal` (blue) overlays `grayLayer` with no sub-pixel fringe. `reveal` is clipped to
283
+ // a lens-shaped window (set inline) that animates across it; `grayLayer` is always full.
284
+ grayLayer: {
285
+ ...grid,
286
+ position: 'absolute',
287
+ top: 0,
288
+ left: 0,
289
+ zIndex: 3,
290
+ color: theme.color.text.primary,
291
+ pointerEvents: 'none',
292
+ },
293
+ reveal: {
294
+ ...grid,
295
+ position: 'absolute',
296
+ top: 0,
297
+ left: 0,
298
+ zIndex: 4,
299
+ color: theme.color.brand.default,
300
+ pointerEvents: 'none',
301
+ opacity: 0,
302
+ willChange: 'clip-path',
303
+ transition: `opacity ${theme.transition.fast}`,
304
+ },
305
+ revealReady: {
306
+ transition: `clip-path ${theme.transition.spring}, opacity ${theme.transition.fast}`,
307
+ '@media (prefers-reduced-motion: reduce)': {
308
+ transition: `opacity ${theme.transition.fast}`,
309
+ },
310
+ },
311
+ layerItem: {
312
+ ...tab,
313
+ },
314
+ // The positioning context for the badge — the icon alone, not the whole
315
+ // item. The previous `top: 2px; right: 10px` was measured against the
316
+ // item's capsule, so it tracked the capsule's geometry rather than the
317
+ // icon's.
318
+ iconWrap: {
319
+ position: 'relative',
320
+ display: 'inline-flex',
321
+ alignItems: 'center',
322
+ justifyContent: 'center',
323
+ },
324
+ // A real pill, matching `nav-desktop`. This style used to be shared with
325
+ // the dot below — an 8x8 box with no padding — so a numeric badge was
326
+ // squeezed into a dot and clipped.
327
+ badge: {
328
+ position: 'absolute',
329
+ top: '-6px',
330
+ right: '-8px',
331
+ minWidth: '16px',
332
+ height: '16px',
333
+ padding: `0 ${theme.space.xs}`,
334
+ boxSizing: 'border-box',
335
+ borderRadius: theme.radius.pill,
336
+ backgroundColor: theme.color.danger.default,
337
+ color: theme.color.bg.page,
338
+ fontSize: '0.65rem',
339
+ lineHeight: '16px',
340
+ textAlign: 'center',
341
+ pointerEvents: 'none',
342
+ },
343
+ badgeDot: {
344
+ position: 'absolute',
345
+ top: '-3px',
346
+ right: '-4px',
347
+ width: '8px',
348
+ height: '8px',
349
+ borderRadius: theme.radius.pill,
350
+ backgroundColor: theme.color.danger.default,
351
+ pointerEvents: 'none',
352
+ },
353
+ };
354
+ });
@@ -0,0 +1,13 @@
1
+ import type { ReactElement } from 'react';
2
+
3
+ import type { IconProps } from '../icon/index.js';
4
+
5
+ /** A single navigation destination, shared by the desktop and mobile layouts. */
6
+ export interface NavItem {
7
+ to: string;
8
+ label: string;
9
+ Icon: (props: IconProps) => ReactElement;
10
+ active: boolean;
11
+ /** A count of pending fixes, or `'dot'` for "active, nothing to decide yet". */
12
+ badge?: number | 'dot';
13
+ }
@@ -0,0 +1,87 @@
1
+ import cx from 'classnames';
2
+ import { PropsWithChildren, useEffect } from 'react';
3
+ import { Fragment } from 'react/jsx-runtime';
4
+
5
+ import { BackButton } from '../../control/back-button/index.js';
6
+ import { PageActionsBar } from '../../control/page-actions-bar/index.js';
7
+ import { PageActionsMenu, type PageActionItem } from '../../control/page-actions-menu/index.js';
8
+ import { PageFooterActions, type FooterAction } from '../../control/page-footer-actions/index.js';
9
+ import { useStyle, PageType, PageTypeValue } from './style.js';
10
+
11
+ type PageProps = PropsWithChildren<{
12
+ type?: PageTypeValue;
13
+ back?: string;
14
+ headerActions?: PageActionItem[];
15
+ /** Overrides the overflow trigger's label (default "More…") on the desktop
16
+ * action bar — e.g. "Actions" when every action lives in the menu. */
17
+ actionsLabel?: string;
18
+ /**
19
+ * The page's own chrome for the header row — the row the desktop actions bar
20
+ * occupies, which every default page holds open whether or not it has
21
+ * actions (see `style.ts`).
22
+ *
23
+ * `page/library` passes its `<SearchBar />` here rather than rendering it as
24
+ * the first child: as a child it would sit BELOW the reserved row, starting
25
+ * the one page anyone lands on first lower than every other page. In the
26
+ * slot it lines up with every other page's actions instead.
27
+ */
28
+ header?: React.ReactNode;
29
+ footerActions?: FooterAction[];
30
+ /** Sets `document.title` when given; the title is not restored on unmount. Leave it
31
+ * out when the app manages the title itself. */
32
+ documentTitle?: string;
33
+ /** Reserve space under the content for a floating bottom navigation bar
34
+ * (`NavMobile`) on mobile. Default `false`. */
35
+ bottomNav?: boolean;
36
+ }>;
37
+
38
+ export const Page = ({
39
+ children,
40
+ type = PageType.default as PageTypeValue,
41
+ back,
42
+ headerActions,
43
+ actionsLabel,
44
+ header,
45
+ footerActions,
46
+ documentTitle,
47
+ bottomNav = false,
48
+ }: PageProps) => {
49
+ const styles = useStyle();
50
+
51
+ useEffect(() => {
52
+ if (documentTitle !== undefined) document.title = documentTitle;
53
+ }, [documentTitle]);
54
+
55
+ const hasHeaderActions = headerActions !== undefined && headerActions.length > 0;
56
+ const hasControls = back !== undefined || hasHeaderActions;
57
+
58
+ return (
59
+ <Fragment>
60
+ <main className={cx(styles[type], { [styles.bottomNav]: bottomNav })}>
61
+ {hasControls && (
62
+ <div className={styles.controlsRow}>
63
+ {back !== undefined && <BackButton to={back} />}
64
+ {hasHeaderActions && <PageActionsMenu items={headerActions} />}
65
+ </div>
66
+ )}
67
+ {/* Rendered for every default page, EMPTY INCLUDED — holding the row
68
+ open is what keeps pages with and without actions starting their
69
+ content at the same height. A minimal page (login, loading, the
70
+ forced password change) has no nav, no actions and nothing to line
71
+ up with, so it gets no row. */}
72
+ {type === PageType.default && (
73
+ <header className={styles.headerRow}>
74
+ {header}
75
+ {hasHeaderActions && (
76
+ <PageActionsBar items={headerActions} actionsLabel={actionsLabel} />
77
+ )}
78
+ </header>
79
+ )}
80
+ {children}
81
+ {footerActions !== undefined && footerActions.length > 0 && (
82
+ <PageFooterActions items={footerActions} />
83
+ )}
84
+ </main>
85
+ </Fragment>
86
+ );
87
+ };
@@ -0,0 +1,133 @@
1
+ import { createUseStyles, type Theme } from '../../theme/index.js';
2
+
3
+ export type PageTypeValue = 'default' | 'minimal';
4
+ export enum PageType {
5
+ default = 'default',
6
+ minimal = 'minimal',
7
+ }
8
+
9
+ export const useStyle = createUseStyles((theme: Theme) => ({
10
+ [PageType.default]: {
11
+ maxWidth: 800,
12
+ margin: `${theme.space.xxxxxl} auto`,
13
+ padding: `0 ${theme.space.xxl}`,
14
+ display: 'flex',
15
+ gap: theme.fontSize.md, // historical: 0.875rem flexbox gap
16
+ flexDirection: 'column',
17
+ [theme.breakpoint.mobile]: {
18
+ margin: 0,
19
+ // Top spacing the old static header used to provide (now that the desktop bar
20
+ // is display:none on mobile); plus the notch inset, like the modal recipe.
21
+ //
22
+ // The inset belongs to whatever is topmost. When that is this `<main>` the
23
+ // fallback applies; when the admin's library-switcher band sits above it
24
+ // (`router/nav-layout-style`), the band has already spent the inset and sets
25
+ // `--page-top-inset` to zero on everything after it. Counting it here as
26
+ // well left a status-bar-sized hole between the band's rule and the first
27
+ // row of content in the installed app — and nowhere else, because in a
28
+ // Safari tab the inset is zero, which is how it went unnoticed.
29
+ paddingTop: `calc(${theme.space.xxxxxl} + var(--page-top-inset, env(safe-area-inset-top)))`,
30
+ // Room below the last row so it can be scrolled above Safari's expanded URL bar; the home-indicator inset too.
31
+ paddingBottom: `calc(${theme.space.xxxxxl} + env(safe-area-inset-bottom))`,
32
+ },
33
+ },
34
+ [PageType.minimal]: {},
35
+ // Set by `bottomNav`: a floating mobile nav (`NavMobile`) sits over the page's
36
+ // bottom edge, so the last row needs to clear it as well. Declared after the
37
+ // page types so it wins the cascade on `<main>`.
38
+ bottomNav: {
39
+ [theme.breakpoint.mobile]: {
40
+ // Clears the floating mobile nav plus slack so the last row can always be
41
+ // scrolled above both the nav and Safari's expanded URL bar. Nav height is the
42
+ // shared theme.layout token (tune there); the extra space is this page's slack.
43
+ paddingBottom: `calc(${theme.layout.navHeightMobile} + ${theme.space.xxxxxl} + ${theme.space.xxl} + env(safe-area-inset-bottom))`,
44
+ },
45
+ },
46
+ // The page's header row — the desktop actions bar's home, and the space
47
+ // every other page holds open so that moving between them does not shift
48
+ // the content under the cursor. `/add`'s two views are the case that makes
49
+ // it obvious: only Upload publishes actions, so the toggle jumped every
50
+ // time you switched.
51
+ //
52
+ // MEASURED, not derived, and the one number to tune here: a `Button` takes
53
+ // its height from its own line box, which is the body font's `normal`
54
+ // line-height and therefore not something the tokens can predict. This
55
+ // floor only has to CLEAR that height — a floor above it makes every header
56
+ // row exactly this tall, actions or not, which is the whole point. Drop
57
+ // below it and the pages with actions grow past the ones without, quietly
58
+ // giving back the consistency this buys.
59
+ headerRow: {
60
+ minHeight: '2.25rem',
61
+ // ONE ROW: the page's own header content leads, the actions bar trails.
62
+ // `/add` is the case that needs both — its Upload/Request toggle on the
63
+ // left, its "Actions" trigger on the right — and the bar's own internal
64
+ // spacer keeps that trigger hard right however much room it is given.
65
+ display: 'flex',
66
+ alignItems: 'center',
67
+ gap: theme.space.md,
68
+ // Both slots share the leftover width rather than either one owning it:
69
+ // alone, the search bar or the actions bar takes the full row exactly as
70
+ // it did as a child of `<main>`; together, the toggle takes the space the
71
+ // actions do not need. `minWidth: 0` lets a wide child shrink instead of
72
+ // pushing the row past the content column.
73
+ '& > *': {
74
+ flexGrow: 1,
75
+ minWidth: 0,
76
+ },
77
+ // Mobile reserves nothing: the actions live in the floating menu
78
+ // (`PageActionsMenu`) rather than in this row, and screen height is too
79
+ // dear to hold open a row for chrome that is not there. `contents` makes
80
+ // the row itself vanish from the layout, so whatever it holds — a search
81
+ // bar — lands as a direct child of `<main>`, exactly where it sat before
82
+ // this row existed.
83
+ [theme.breakpoint.mobile]: {
84
+ display: 'contents',
85
+ // `contents` hands these children straight to `<main>`, whose flex
86
+ // direction is COLUMN — leaving `flexGrow` on would stretch a search bar
87
+ // down the whole page rather than across it.
88
+ '& > *': {
89
+ flexGrow: 0,
90
+ },
91
+ },
92
+ },
93
+ // Mobile-only row holding the back button and the page actions menu. STICKY,
94
+ // not fixed: it starts in the page's flow — under the admin's library-switcher
95
+ // band when there is one — scrolls up with the page like everything else, and
96
+ // pins at `floatingControlTopBase` once it gets there. Both halves of that
97
+ // (riding up with the band, then holding) used to be done by hand: the
98
+ // controls were `position: fixed` and a scroll listener published the scroll
99
+ // offset for the stylesheet to subtract from their `top`. Fixed chrome whose
100
+ // `top` is rewritten from scroll events lags the compositor on iOS and jitters
101
+ // for the whole ride; sticky positioning is the same motion, done by the
102
+ // scroller itself.
103
+ //
104
+ // Where the row rests before it pins: `floatingControlsGap` below the top of
105
+ // whatever is above it — the status-bar inset on a page with nothing above,
106
+ // or the band's rule, which sets the gap smaller (`router/nav-layout-style`).
107
+ // `<main>`'s top padding is larger than either gap, so the margin pulls the
108
+ // row up into that padding by the difference; the content that follows keeps
109
+ // its own `gap` from the row.
110
+ controlsRow: {
111
+ position: 'sticky',
112
+ top: theme.layout.floatingControlTopBase,
113
+ zIndex: theme.zIndex.sticky,
114
+ display: 'flex',
115
+ justifyContent: 'space-between',
116
+ alignItems: 'flex-start',
117
+ marginTop: `calc(var(--floating-controls-gap, ${theme.space.xxxxl}) - ${theme.space.xxxxxl})`,
118
+ // The buttons sit `space.lg` from the screen edge, inside a gutter of
119
+ // `space.xxl`, so the row reaches out past the gutter by the difference.
120
+ marginLeft: `calc(${theme.space.lg} - ${theme.space.xxl})`,
121
+ marginRight: `calc(${theme.space.lg} - ${theme.space.xxl})`,
122
+ // The row spans the width between the buttons; taps there must reach the
123
+ // content scrolling under it.
124
+ pointerEvents: 'none',
125
+ '& > *': {
126
+ pointerEvents: 'auto',
127
+ },
128
+ // Desktop has the actions bar in the header row and no back button.
129
+ [theme.breakpoint.normal]: {
130
+ display: 'none',
131
+ },
132
+ },
133
+ }));
@@ -0,0 +1,58 @@
1
+ import { useStyle } from './style.js';
2
+
3
+ type ProgressIndicatorProps = {
4
+ value: number;
5
+ /**
6
+ * Required, not defaulted (2026-08-13 final review, M-1): `role=
7
+ * "progressbar"` below has no accessible name of its own — a bare number
8
+ * ("N%") means nothing out of context to a screen-reader user, and this
9
+ * component has four semantic call sites (book, series, my-progress-row,
10
+ * user-progress-row) that each mean something different. Every caller
11
+ * must say what progress this actually is, e.g. `Reading progress for
12
+ * ${title}`.
13
+ */
14
+ ariaLabel: string;
15
+ size?: number;
16
+ };
17
+
18
+ const CX = 50;
19
+ const CY = 50;
20
+ const R_INNER = 36; // track and sector
21
+ const R_RING = 44; // outer ring (gap between inner edge and R_INNER is ~5 units)
22
+
23
+ const sectorPath = (pct: number): string => {
24
+ const angle = (pct / 100) * 2 * Math.PI - Math.PI / 2;
25
+ const x = CX + R_INNER * Math.cos(angle);
26
+ const y = CY + R_INNER * Math.sin(angle);
27
+ const largeArc = pct > 50 ? 1 : 0;
28
+ return `M ${CX} ${CY} L ${CX} ${CY - R_INNER} A ${R_INNER} ${R_INNER} 0 ${largeArc} 1 ${x} ${y} Z`;
29
+ };
30
+
31
+ export const ProgressIndicator = ({ value, ariaLabel, size = 40 }: ProgressIndicatorProps) => {
32
+ const style = useStyle();
33
+ const clamped = Math.min(100, Math.max(0, value * 100));
34
+
35
+ return (
36
+ <div className={style.root}>
37
+ {clamped > 0 && clamped < 100 && (
38
+ <svg
39
+ viewBox="0 0 100 100"
40
+ width={size}
41
+ height={size}
42
+ role="progressbar"
43
+ aria-label={ariaLabel}
44
+ aria-valuemin={0}
45
+ aria-valuemax={100}
46
+ aria-valuenow={Math.round(clamped)}
47
+ >
48
+ <circle cx={CX} cy={CY} r={R_INNER} className={style.track} />
49
+ <path d={sectorPath(clamped)} className={style.sector} />
50
+ <circle cx={CX} cy={CY} r={R_RING} className={style.ring} />
51
+ </svg>
52
+ )}
53
+ <span className={style.label}>
54
+ {clamped === 0 ? 'Not started' : clamped === 100 ? 'Completed' : `${Math.round(clamped)}%`}
55
+ </span>
56
+ </div>
57
+ );
58
+ };
@@ -0,0 +1,24 @@
1
+ import { createUseStyles, type Theme } from '../../theme/index.js';
2
+
3
+ export const useStyle = createUseStyles((theme: Theme) => ({
4
+ root: {
5
+ display: 'inline-flex',
6
+ alignItems: 'center',
7
+ gap: theme.space.xs,
8
+ },
9
+ track: {
10
+ fill: 'transparent',
11
+ },
12
+ sector: {
13
+ fill: theme.color.brand.default,
14
+ },
15
+ ring: {
16
+ fill: 'none',
17
+ stroke: theme.color.text.primary,
18
+ strokeWidth: 6,
19
+ },
20
+ label: {
21
+ fontSize: theme.fontSize.sm,
22
+ color: theme.color.text.primary,
23
+ },
24
+ }));