@mrpelz/uikit-ish 0.0.0-stage → 7.8.0

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 (348) hide show
  1. package/dist/components/action-sheet/main.d.ts +39 -0
  2. package/dist/components/action-sheet/main.d.ts.map +1 -0
  3. package/dist/components/action-sheet/main.js +35 -0
  4. package/dist/components/action-sheet/main.js.map +1 -0
  5. package/dist/components/action-sheet/props.d.ts +10 -0
  6. package/dist/components/action-sheet/props.d.ts.map +1 -0
  7. package/dist/components/action-sheet/props.js +2 -0
  8. package/dist/components/action-sheet/props.js.map +1 -0
  9. package/dist/components/action-sheet/style.css +8 -0
  10. package/dist/components/activity-view/main.d.ts +45 -0
  11. package/dist/components/activity-view/main.d.ts.map +1 -0
  12. package/dist/components/activity-view/main.js +64 -0
  13. package/dist/components/activity-view/main.js.map +1 -0
  14. package/dist/components/activity-view/props.d.ts +12 -0
  15. package/dist/components/activity-view/props.d.ts.map +1 -0
  16. package/dist/components/activity-view/props.js +2 -0
  17. package/dist/components/activity-view/props.js.map +1 -0
  18. package/dist/components/activity-view/style.css +209 -0
  19. package/dist/components/alert/main.d.ts +53 -0
  20. package/dist/components/alert/main.d.ts.map +1 -0
  21. package/dist/components/alert/main.js +57 -0
  22. package/dist/components/alert/main.js.map +1 -0
  23. package/dist/components/alert/props.d.ts +18 -0
  24. package/dist/components/alert/props.d.ts.map +1 -0
  25. package/dist/components/alert/props.js +2 -0
  26. package/dist/components/alert/props.js.map +1 -0
  27. package/dist/components/alert/style.css +205 -0
  28. package/dist/components/avatar/main.d.ts +20 -0
  29. package/dist/components/avatar/main.d.ts.map +1 -0
  30. package/dist/components/avatar/main.js +42 -0
  31. package/dist/components/avatar/main.js.map +1 -0
  32. package/dist/components/avatar/props.d.ts +18 -0
  33. package/dist/components/avatar/props.d.ts.map +1 -0
  34. package/dist/components/avatar/props.js +2 -0
  35. package/dist/components/avatar/props.js.map +1 -0
  36. package/dist/components/avatar/style.css +83 -0
  37. package/dist/components/badge/main.d.ts +12 -0
  38. package/dist/components/badge/main.d.ts.map +1 -0
  39. package/dist/components/badge/main.js +33 -0
  40. package/dist/components/badge/main.js.map +1 -0
  41. package/dist/components/badge/props.d.ts +20 -0
  42. package/dist/components/badge/props.d.ts.map +1 -0
  43. package/dist/components/badge/props.js +2 -0
  44. package/dist/components/badge/props.js.map +1 -0
  45. package/dist/components/badge/style.css +71 -0
  46. package/dist/components/button/main.d.ts +16 -0
  47. package/dist/components/button/main.d.ts.map +1 -0
  48. package/dist/components/button/main.js +64 -0
  49. package/dist/components/button/main.js.map +1 -0
  50. package/dist/components/button/props.d.ts +45 -0
  51. package/dist/components/button/props.d.ts.map +1 -0
  52. package/dist/components/button/props.js +2 -0
  53. package/dist/components/button/props.js.map +1 -0
  54. package/dist/components/button/style.css +338 -0
  55. package/dist/components/checkbox/main.d.ts +23 -0
  56. package/dist/components/checkbox/main.d.ts.map +1 -0
  57. package/dist/components/checkbox/main.js +43 -0
  58. package/dist/components/checkbox/main.js.map +1 -0
  59. package/dist/components/checkbox/props.d.ts +14 -0
  60. package/dist/components/checkbox/props.d.ts.map +1 -0
  61. package/dist/components/checkbox/props.js +2 -0
  62. package/dist/components/checkbox/props.js.map +1 -0
  63. package/dist/components/checkbox/style.css +73 -0
  64. package/dist/components/color-picker/main.d.ts +31 -0
  65. package/dist/components/color-picker/main.d.ts.map +1 -0
  66. package/dist/components/color-picker/main.js +356 -0
  67. package/dist/components/color-picker/main.js.map +1 -0
  68. package/dist/components/color-picker/props.d.ts +61 -0
  69. package/dist/components/color-picker/props.d.ts.map +1 -0
  70. package/dist/components/color-picker/props.js +2 -0
  71. package/dist/components/color-picker/props.js.map +1 -0
  72. package/dist/components/color-picker/style.css +374 -0
  73. package/dist/components/contextual-menu/main.d.ts +84 -0
  74. package/dist/components/contextual-menu/main.d.ts.map +1 -0
  75. package/dist/components/contextual-menu/main.js +255 -0
  76. package/dist/components/contextual-menu/main.js.map +1 -0
  77. package/dist/components/contextual-menu/props.d.ts +44 -0
  78. package/dist/components/contextual-menu/props.d.ts.map +1 -0
  79. package/dist/components/contextual-menu/props.js +2 -0
  80. package/dist/components/contextual-menu/props.js.map +1 -0
  81. package/dist/components/contextual-menu/style.css +80 -0
  82. package/dist/components/date-picker/main.d.ts +57 -0
  83. package/dist/components/date-picker/main.d.ts.map +1 -0
  84. package/dist/components/date-picker/main.js +770 -0
  85. package/dist/components/date-picker/main.js.map +1 -0
  86. package/dist/components/date-picker/props.d.ts +220 -0
  87. package/dist/components/date-picker/props.d.ts.map +1 -0
  88. package/dist/components/date-picker/props.js +2 -0
  89. package/dist/components/date-picker/props.js.map +1 -0
  90. package/dist/components/date-picker/style.css +446 -0
  91. package/dist/components/edit-menu/main.d.ts +71 -0
  92. package/dist/components/edit-menu/main.d.ts.map +1 -0
  93. package/dist/components/edit-menu/main.js +317 -0
  94. package/dist/components/edit-menu/main.js.map +1 -0
  95. package/dist/components/edit-menu/props.d.ts +21 -0
  96. package/dist/components/edit-menu/props.d.ts.map +1 -0
  97. package/dist/components/edit-menu/props.js +2 -0
  98. package/dist/components/edit-menu/props.js.map +1 -0
  99. package/dist/components/edit-menu/style.css +189 -0
  100. package/dist/components/form/main.d.ts +21 -0
  101. package/dist/components/form/main.d.ts.map +1 -0
  102. package/dist/components/form/main.js +32 -0
  103. package/dist/components/form/main.js.map +1 -0
  104. package/dist/components/form/props.d.ts +4 -0
  105. package/dist/components/form/props.d.ts.map +1 -0
  106. package/dist/components/form/props.js +2 -0
  107. package/dist/components/form/props.js.map +1 -0
  108. package/dist/components/form/style.css +9 -0
  109. package/dist/components/glass/main.d.ts +34 -0
  110. package/dist/components/glass/main.d.ts.map +1 -0
  111. package/dist/components/glass/main.js +157 -0
  112. package/dist/components/glass/main.js.map +1 -0
  113. package/dist/components/glass/props.d.ts +22 -0
  114. package/dist/components/glass/props.d.ts.map +1 -0
  115. package/dist/components/glass/props.js +2 -0
  116. package/dist/components/glass/props.js.map +1 -0
  117. package/dist/components/glass/style.css +488 -0
  118. package/dist/components/header/main.d.ts +15 -0
  119. package/dist/components/header/main.d.ts.map +1 -0
  120. package/dist/components/header/main.js +78 -0
  121. package/dist/components/header/main.js.map +1 -0
  122. package/dist/components/header/props.d.ts +16 -0
  123. package/dist/components/header/props.d.ts.map +1 -0
  124. package/dist/components/header/props.js +2 -0
  125. package/dist/components/header/props.js.map +1 -0
  126. package/dist/components/header/style.css +119 -0
  127. package/dist/components/index.d.ts +38 -0
  128. package/dist/components/index.d.ts.map +1 -0
  129. package/dist/components/index.js +45 -0
  130. package/dist/components/index.js.map +1 -0
  131. package/dist/components/layout/main.d.ts +15 -0
  132. package/dist/components/layout/main.d.ts.map +1 -0
  133. package/dist/components/layout/main.js +241 -0
  134. package/dist/components/layout/main.js.map +1 -0
  135. package/dist/components/layout/props.d.ts +52 -0
  136. package/dist/components/layout/props.d.ts.map +1 -0
  137. package/dist/components/layout/props.js +2 -0
  138. package/dist/components/layout/props.js.map +1 -0
  139. package/dist/components/layout/style.css +208 -0
  140. package/dist/components/list/main.d.ts +104 -0
  141. package/dist/components/list/main.d.ts.map +1 -0
  142. package/dist/components/list/main.js +1553 -0
  143. package/dist/components/list/main.js.map +1 -0
  144. package/dist/components/list/props.d.ts +178 -0
  145. package/dist/components/list/props.d.ts.map +1 -0
  146. package/dist/components/list/props.js +2 -0
  147. package/dist/components/list/props.js.map +1 -0
  148. package/dist/components/list/style.css +1689 -0
  149. package/dist/components/menu/main.d.ts +119 -0
  150. package/dist/components/menu/main.d.ts.map +1 -0
  151. package/dist/components/menu/main.js +487 -0
  152. package/dist/components/menu/main.js.map +1 -0
  153. package/dist/components/menu/props.d.ts +54 -0
  154. package/dist/components/menu/props.d.ts.map +1 -0
  155. package/dist/components/menu/props.js +2 -0
  156. package/dist/components/menu/props.js.map +1 -0
  157. package/dist/components/menu/style.css +446 -0
  158. package/dist/components/navigation/main.d.ts +9 -0
  159. package/dist/components/navigation/main.d.ts.map +1 -0
  160. package/dist/components/navigation/main.js +201 -0
  161. package/dist/components/navigation/main.js.map +1 -0
  162. package/dist/components/navigation/props.d.ts +16 -0
  163. package/dist/components/navigation/props.d.ts.map +1 -0
  164. package/dist/components/navigation/props.js +2 -0
  165. package/dist/components/navigation/props.js.map +1 -0
  166. package/dist/components/navigation/style.css +83 -0
  167. package/dist/components/page/main.d.ts +9 -0
  168. package/dist/components/page/main.d.ts.map +1 -0
  169. package/dist/components/page/main.js +20 -0
  170. package/dist/components/page/main.js.map +1 -0
  171. package/dist/components/page/props.d.ts +10 -0
  172. package/dist/components/page/props.d.ts.map +1 -0
  173. package/dist/components/page/props.js +2 -0
  174. package/dist/components/page/props.js.map +1 -0
  175. package/dist/components/page/style.css +19 -0
  176. package/dist/components/page-control/main.d.ts +13 -0
  177. package/dist/components/page-control/main.d.ts.map +1 -0
  178. package/dist/components/page-control/main.js +138 -0
  179. package/dist/components/page-control/main.js.map +1 -0
  180. package/dist/components/page-control/props.d.ts +36 -0
  181. package/dist/components/page-control/props.d.ts.map +1 -0
  182. package/dist/components/page-control/props.js +2 -0
  183. package/dist/components/page-control/props.js.map +1 -0
  184. package/dist/components/page-control/style.css +111 -0
  185. package/dist/components/popover/main.d.ts +34 -0
  186. package/dist/components/popover/main.d.ts.map +1 -0
  187. package/dist/components/popover/main.js +232 -0
  188. package/dist/components/popover/main.js.map +1 -0
  189. package/dist/components/popover/props.d.ts +23 -0
  190. package/dist/components/popover/props.d.ts.map +1 -0
  191. package/dist/components/popover/props.js +2 -0
  192. package/dist/components/popover/props.js.map +1 -0
  193. package/dist/components/popover/style.css +160 -0
  194. package/dist/components/progress/main.d.ts +31 -0
  195. package/dist/components/progress/main.d.ts.map +1 -0
  196. package/dist/components/progress/main.js +77 -0
  197. package/dist/components/progress/main.js.map +1 -0
  198. package/dist/components/progress/props.d.ts +56 -0
  199. package/dist/components/progress/props.d.ts.map +1 -0
  200. package/dist/components/progress/props.js +2 -0
  201. package/dist/components/progress/props.js.map +1 -0
  202. package/dist/components/progress/style.css +264 -0
  203. package/dist/components/roll/main.d.ts +18 -0
  204. package/dist/components/roll/main.d.ts.map +1 -0
  205. package/dist/components/roll/main.js +463 -0
  206. package/dist/components/roll/main.js.map +1 -0
  207. package/dist/components/roll/props.d.ts +58 -0
  208. package/dist/components/roll/props.d.ts.map +1 -0
  209. package/dist/components/roll/props.js +2 -0
  210. package/dist/components/roll/props.js.map +1 -0
  211. package/dist/components/roll/style.css +173 -0
  212. package/dist/components/segmented/main.d.ts +17 -0
  213. package/dist/components/segmented/main.d.ts.map +1 -0
  214. package/dist/components/segmented/main.js +151 -0
  215. package/dist/components/segmented/main.js.map +1 -0
  216. package/dist/components/segmented/props.d.ts +16 -0
  217. package/dist/components/segmented/props.d.ts.map +1 -0
  218. package/dist/components/segmented/props.js +2 -0
  219. package/dist/components/segmented/props.js.map +1 -0
  220. package/dist/components/segmented/style.css +428 -0
  221. package/dist/components/sheet/main.d.ts +32 -0
  222. package/dist/components/sheet/main.d.ts.map +1 -0
  223. package/dist/components/sheet/main.js +101 -0
  224. package/dist/components/sheet/main.js.map +1 -0
  225. package/dist/components/sheet/props.d.ts +11 -0
  226. package/dist/components/sheet/props.d.ts.map +1 -0
  227. package/dist/components/sheet/props.js +2 -0
  228. package/dist/components/sheet/props.js.map +1 -0
  229. package/dist/components/sheet/style.css +125 -0
  230. package/dist/components/sidebar/main.d.ts +15 -0
  231. package/dist/components/sidebar/main.d.ts.map +1 -0
  232. package/dist/components/sidebar/main.js +42 -0
  233. package/dist/components/sidebar/main.js.map +1 -0
  234. package/dist/components/sidebar/props.d.ts +5 -0
  235. package/dist/components/sidebar/props.d.ts.map +1 -0
  236. package/dist/components/sidebar/props.js +2 -0
  237. package/dist/components/sidebar/props.js.map +1 -0
  238. package/dist/components/sidebar/style.css +94 -0
  239. package/dist/components/slider/main.d.ts +35 -0
  240. package/dist/components/slider/main.d.ts.map +1 -0
  241. package/dist/components/slider/main.js +153 -0
  242. package/dist/components/slider/main.js.map +1 -0
  243. package/dist/components/slider/props.d.ts +56 -0
  244. package/dist/components/slider/props.d.ts.map +1 -0
  245. package/dist/components/slider/props.js +2 -0
  246. package/dist/components/slider/props.js.map +1 -0
  247. package/dist/components/slider/style.css +345 -0
  248. package/dist/components/stepper/main.d.ts +22 -0
  249. package/dist/components/stepper/main.d.ts.map +1 -0
  250. package/dist/components/stepper/main.js +56 -0
  251. package/dist/components/stepper/main.js.map +1 -0
  252. package/dist/components/stepper/props.d.ts +10 -0
  253. package/dist/components/stepper/props.d.ts.map +1 -0
  254. package/dist/components/stepper/props.js +2 -0
  255. package/dist/components/stepper/props.js.map +1 -0
  256. package/dist/components/stepper/style.css +115 -0
  257. package/dist/components/switch/main.d.ts +14 -0
  258. package/dist/components/switch/main.d.ts.map +1 -0
  259. package/dist/components/switch/main.js +143 -0
  260. package/dist/components/switch/main.js.map +1 -0
  261. package/dist/components/switch/props.d.ts +34 -0
  262. package/dist/components/switch/props.d.ts.map +1 -0
  263. package/dist/components/switch/props.js +2 -0
  264. package/dist/components/switch/props.js.map +1 -0
  265. package/dist/components/switch/style.css +168 -0
  266. package/dist/components/symbol/main.d.ts +8 -0
  267. package/dist/components/symbol/main.d.ts.map +1 -0
  268. package/dist/components/symbol/main.js +32 -0
  269. package/dist/components/symbol/main.js.map +1 -0
  270. package/dist/components/symbol/props.d.ts +10 -0
  271. package/dist/components/symbol/props.d.ts.map +1 -0
  272. package/dist/components/symbol/props.js +2 -0
  273. package/dist/components/symbol/props.js.map +1 -0
  274. package/dist/components/symbol/style.css +26 -0
  275. package/dist/components/tab-bar/main.d.ts +39 -0
  276. package/dist/components/tab-bar/main.d.ts.map +1 -0
  277. package/dist/components/tab-bar/main.js +1133 -0
  278. package/dist/components/tab-bar/main.js.map +1 -0
  279. package/dist/components/tab-bar/props.d.ts +152 -0
  280. package/dist/components/tab-bar/props.d.ts.map +1 -0
  281. package/dist/components/tab-bar/props.js +2 -0
  282. package/dist/components/tab-bar/props.js.map +1 -0
  283. package/dist/components/tab-bar/style.css +936 -0
  284. package/dist/components/text-field/main.d.ts +28 -0
  285. package/dist/components/text-field/main.d.ts.map +1 -0
  286. package/dist/components/text-field/main.js +105 -0
  287. package/dist/components/text-field/main.js.map +1 -0
  288. package/dist/components/text-field/props.d.ts +3 -0
  289. package/dist/components/text-field/props.d.ts.map +1 -0
  290. package/dist/components/text-field/props.js +2 -0
  291. package/dist/components/text-field/props.js.map +1 -0
  292. package/dist/components/text-field/style.css +230 -0
  293. package/dist/components/toolbar/main.d.ts +37 -0
  294. package/dist/components/toolbar/main.d.ts.map +1 -0
  295. package/dist/components/toolbar/main.js +142 -0
  296. package/dist/components/toolbar/main.js.map +1 -0
  297. package/dist/components/toolbar/props.d.ts +46 -0
  298. package/dist/components/toolbar/props.d.ts.map +1 -0
  299. package/dist/components/toolbar/props.js +2 -0
  300. package/dist/components/toolbar/props.js.map +1 -0
  301. package/dist/components/toolbar/style.css +210 -0
  302. package/dist/components/tooltip/main.d.ts +29 -0
  303. package/dist/components/tooltip/main.d.ts.map +1 -0
  304. package/dist/components/tooltip/main.js +37 -0
  305. package/dist/components/tooltip/main.js.map +1 -0
  306. package/dist/components/tooltip/props.d.ts +11 -0
  307. package/dist/components/tooltip/props.d.ts.map +1 -0
  308. package/dist/components/tooltip/props.js +2 -0
  309. package/dist/components/tooltip/props.js.map +1 -0
  310. package/dist/components/tooltip/style.css +29 -0
  311. package/dist/components/typography/main.d.ts +8 -0
  312. package/dist/components/typography/main.d.ts.map +1 -0
  313. package/dist/components/typography/main.js +21 -0
  314. package/dist/components/typography/main.js.map +1 -0
  315. package/dist/components/typography/props.d.ts +35 -0
  316. package/dist/components/typography/props.d.ts.map +1 -0
  317. package/dist/components/typography/props.js +2 -0
  318. package/dist/components/typography/props.js.map +1 -0
  319. package/dist/components/typography/style.css +719 -0
  320. package/dist/components/utils/main.d.ts +114 -0
  321. package/dist/components/utils/main.d.ts.map +1 -0
  322. package/dist/components/utils/main.js +431 -0
  323. package/dist/components/utils/main.js.map +1 -0
  324. package/dist/components/utils/props.d.ts +52 -0
  325. package/dist/components/utils/props.d.ts.map +1 -0
  326. package/dist/components/utils/props.js +2 -0
  327. package/dist/components/utils/props.js.map +1 -0
  328. package/dist/components/utils/style.css +77 -0
  329. package/dist/components/viewport/main.d.ts +32 -0
  330. package/dist/components/viewport/main.d.ts.map +1 -0
  331. package/dist/components/viewport/main.js +197 -0
  332. package/dist/components/viewport/main.js.map +1 -0
  333. package/dist/components/viewport/props.d.ts +71 -0
  334. package/dist/components/viewport/props.d.ts.map +1 -0
  335. package/dist/components/viewport/props.js +2 -0
  336. package/dist/components/viewport/props.js.map +1 -0
  337. package/dist/components/viewport/style.css +112 -0
  338. package/dist/main.d.ts +4 -0
  339. package/dist/main.d.ts.map +1 -0
  340. package/dist/main.js +3 -0
  341. package/dist/main.js.map +1 -0
  342. package/dist/styles.css +567 -0
  343. package/dist/styles.d.ts +25 -0
  344. package/dist/styles.d.ts.map +1 -0
  345. package/dist/styles.js +39 -0
  346. package/dist/styles.js.map +1 -0
  347. package/package.json +55 -4
  348. package/README.md +0 -3
@@ -0,0 +1,28 @@
1
+ import './style.css';
2
+ import type { ClearProps } from './props.js';
3
+ export declare const TextField: {
4
+ Search: import("preact").FunctionalComponent<import("react").PropsWithoutRef<import("react").LabelHTMLAttributes<HTMLLabelElement>> & {
5
+ ref?: import("preact").Ref<HTMLLabelElement> | undefined;
6
+ }>;
7
+ Root: import("preact").FunctionalComponent<import("react").PropsWithoutRef<Omit<import("@base-ui/react/field").FieldRootProps, "ref">> & {
8
+ ref?: import("preact").Ref<HTMLDivElement> | undefined;
9
+ }>;
10
+ Label: import("preact").FunctionalComponent<import("react").PropsWithoutRef<Omit<import("@base-ui/react/field").FieldLabelProps, "ref">> & {
11
+ ref?: import("preact").Ref<HTMLElement> | undefined;
12
+ }>;
13
+ Control: import("preact").FunctionalComponent<import("react").PropsWithoutRef<Omit<import("@base-ui/react/field").FieldControlProps, "ref">> & {
14
+ ref?: import("preact").Ref<HTMLElement> | undefined;
15
+ }>;
16
+ Description: import("preact").FunctionalComponent<import("react").PropsWithoutRef<Omit<import("@base-ui/react/field").FieldDescriptionProps, "ref">> & {
17
+ ref?: import("preact").Ref<HTMLParagraphElement> | undefined;
18
+ }>;
19
+ Error: import("preact").FunctionalComponent<import("react").PropsWithoutRef<Omit<import("@base-ui/react/field").FieldErrorProps, "ref">> & {
20
+ ref?: import("preact").Ref<HTMLDivElement> | undefined;
21
+ }>;
22
+ Clear: import("preact").FunctionalComponent<import("react").PropsWithoutRef<ClearProps> & {
23
+ ref?: import("preact").Ref<HTMLButtonElement> | undefined;
24
+ }>;
25
+ Validity: import("preact").FunctionComponent<import("@base-ui/react/field").FieldValidityProps>;
26
+ Item: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/field").FieldItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
27
+ };
28
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/text-field/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAerB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAiO7C,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;CASrB,CAAC"}
@@ -0,0 +1,105 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import './style.css';
3
+ import { Field as BaseField } from '@base-ui/react/field';
4
+ import { forwardRef, useId, useRef, useState, } from 'react';
5
+ import { cn } from '../utils/main.js';
6
+ // Source: Apple iOS 26 Figma (“Text Field”, light and dark appearance), with
7
+ // Figma colors mapped to UIKit semantic colors: 52px rows (padding 0 16px),
8
+ // the value in 17px at 510 (20px line height, Body's tracking) in `label`,
9
+ // the placeholder in `placeholderText`, a 2px caret in the tint, the clear
10
+ // button (􀁑, 17px) in `tertiaryLabel` while focused and filled. What Figma
11
+ // doesn't show follows Framework7 (`components/input/input.less`,
12
+ // `input-ios.less`, `input-vars.less`): info (`Description`) and error
13
+ // messages in 12px below, invalid text in `systemRed`, disabled at 55%.
14
+ //
15
+ // A Base UI field (UIKit `UITextField`): in a list row (`Root` rendering a
16
+ // `List.Item`), the label is the row's title and the control fills the rest
17
+ // of the row, the description and error below (see `List`); elsewhere, the
18
+ // parts stack. A textarea renders through `Control`'s `render`.
19
+ //
20
+ // Deviations:
21
+ // - No outlined style (Framework7 `.input-outline`).
22
+ // - Labels (Figma: none) are inline in rows, in Body, as UIKit's forms
23
+ // (Framework7 iOS: 12px labels above the input, `.item-label`); standalone,
24
+ // they're above, in Subheadline.
25
+ // - Info and errors are in Caption 1 (12/16px, Framework7: 12px, 1.4).
26
+ // - The caret is the browser's (Figma: 2×22px, rounded).
27
+ // - The clear button is UIKit's circled cross, cut out of the circle (Figma:
28
+ // the SF Symbols glyph), with a 44px hit area.
29
+ /** A field (Base UI); rendering a `List.Item`, a list row. */
30
+ const Root = forwardRef(({ className, ...props }, ref) => (_jsx(BaseField.Root, { ref: ref, "data-text-field-part": "root", ...props, className: cn('uikit-text-field-root', className) })));
31
+ const Label = forwardRef(({ className, ...props }, ref) => (_jsx(BaseField.Label, { ref: ref, "data-text-field-part": "label", ...props, className: cn('uikit-text-field-label', className) })));
32
+ const Control = forwardRef(({ className, ...props }, ref) => (_jsx(BaseField.Control, { ref: ref, "data-text-field-part": "control", ...props, className: cn('uikit-text-field-control', className) })));
33
+ /** Framework7 `.input-info`. */
34
+ const Description = forwardRef(({ className, ...props }, ref) => (_jsx(BaseField.Description, { ref: ref, "data-text-field-part": "description", ...props, className: cn('uikit-text-field-description', className) })));
35
+ /** Framework7 `.input-error-message`; shown while the field is invalid. */
36
+ const ErrorMessage = forwardRef(({ className, ...props }, ref) => (_jsx(BaseField.Error, { ref: ref, "data-text-field-part": "error", ...props, className: cn('uikit-text-field-error', className) })));
37
+ // The value setter of the control's element type (bypassing React's
38
+ // tracking, so the following input event reports the change).
39
+ const setValue = (control) => {
40
+ const prototype = control instanceof HTMLTextAreaElement
41
+ ? HTMLTextAreaElement.prototype
42
+ : HTMLInputElement.prototype;
43
+ Object.getOwnPropertyDescriptor(prototype, 'value')?.set?.call(control, '');
44
+ control.dispatchEvent(new Event('input', { bubbles: true }));
45
+ };
46
+ /**
47
+ * Empties the field's control (as typing would, so its change handlers run),
48
+ * keeping it focused (UIKit `clearButtonMode = .whileEditing`).
49
+ */
50
+ const Clear = forwardRef(({ className, children, onClick, onPointerDown, ...props }, ref) => {
51
+ const mask = useId();
52
+ return (_jsx("button", { ref: ref, "aria-label": "Clear text", "data-text-field-part": "clear", tabIndex: -1, type: "button", ...props, className: cn('uikit-text-field-clear', className), onClick: (event) => {
53
+ onClick?.(event);
54
+ if (event.defaultPrevented)
55
+ return;
56
+ const control = event.currentTarget
57
+ .closest('[data-text-field-part=root]')
58
+ ?.querySelector('[data-text-field-part=control]');
59
+ if (!(control instanceof HTMLInputElement) &&
60
+ !(control instanceof HTMLTextAreaElement)) {
61
+ return;
62
+ }
63
+ setValue(control);
64
+ control.focus();
65
+ }, onPointerDown: (event) => {
66
+ onPointerDown?.(event);
67
+ // The control keeps focus.
68
+ event.preventDefault();
69
+ }, children: children ?? (_jsxs("svg", { "aria-hidden": "true", height: "17", viewBox: "0 0 17 17", width: "17", children: [_jsxs("mask", { id: mask, children: [_jsx("rect", { fill: "#fff", height: "17", width: "17" }), _jsx("path", { d: "M5.5 5.5l6 6M11.5 5.5l-6 6", stroke: "#000", strokeLinecap: "round", strokeWidth: "1.6" })] }), _jsx("circle", { cx: "8.5", cy: "8.5", fill: "currentcolor", mask: `url(#${CSS.escape(mask)})`, r: "8.5" })] })) }));
70
+ });
71
+ /**
72
+ * A search field's capsule (Figma “Search Field”): its symbol, a
73
+ * `TextField.Control` (e.g. `type="search"`), and its buttons.
74
+ */
75
+ const Search = forwardRef(({ className, onBlur, onFocus, onPointerDown, ...props }, ref) => {
76
+ // Focused by a pointer (pressed first), or else by keyboard.
77
+ const pressed = useRef(false);
78
+ const [keyboard, setKeyboard] = useState(false);
79
+ return (_jsx("label", { ref: ref, "data-keyboard-focus": keyboard ? '' : undefined, "data-text-field-part": "search", onBlur: (event) => {
80
+ onBlur?.(event);
81
+ const { relatedTarget } = event;
82
+ if (!(relatedTarget instanceof Node) ||
83
+ !event.currentTarget.contains(relatedTarget)) {
84
+ setKeyboard(false);
85
+ }
86
+ }, onFocus: (event) => {
87
+ onFocus?.(event);
88
+ setKeyboard(!pressed.current);
89
+ pressed.current = false;
90
+ }, onPointerDown: (event) => {
91
+ onPointerDown?.(event);
92
+ pressed.current = true;
93
+ }, ...props, className: cn('uikit-text-field-search', className) }));
94
+ });
95
+ export const TextField = {
96
+ ...BaseField,
97
+ Search,
98
+ Root,
99
+ Label,
100
+ Control,
101
+ Description,
102
+ Error: ErrorMessage,
103
+ Clear,
104
+ };
105
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/text-field/main.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAEL,UAAU,EAIV,KAAK,EACL,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAGtC,6EAA6E;AAC7E,4EAA4E;AAC5E,2EAA2E;AAC3E,2EAA2E;AAC3E,4EAA4E;AAC5E,kEAAkE;AAClE,uEAAuE;AACvE,wEAAwE;AACxE,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,2EAA2E;AAC3E,gEAAgE;AAChE,EAAE;AACF,cAAc;AACd,qDAAqD;AACrD,uEAAuE;AACvE,8EAA8E;AAC9E,mCAAmC;AACnC,uEAAuE;AACvE,yDAAyD;AACzD,6EAA6E;AAC7E,iDAAiD;AAEjD,8DAA8D;AAC9D,MAAM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yBACa,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,0BACzB,QAAQ,EAC7B,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;YAChB,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;YAChB,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;YAChC,IACE,CAAC,CAAC,aAAa,YAAY,IAAI,CAAC;gBAChC,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,EAC5C,CAAC;gBACD,WAAW,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC;QACH,CAAC,EACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACjB,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;YACjB,WAAW,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC9B,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;QAC1B,CAAC,EACD,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;YACvB,aAAa,EAAE,CAAC,KAAK,CAAC,CAAC;YACvB,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;QACzB,CAAC,KACG,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,SAAS,CAAC,GACnD,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,GAAG,SAAS;IACZ,MAAM;IACN,IAAI;IACJ,KAAK;IACL,OAAO;IACP,WAAW;IACX,KAAK,EAAE,YAAY;IACnB,KAAK;CACN,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ComponentProps } from 'react';
2
+ export type ClearProps = Omit<ComponentProps<'button'>, 'ref'>;
3
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/text-field/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.js","sourceRoot":"","sources":["../../../src/components/text-field/props.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,230 @@
1
+ /* Text-field (see main.tsx). */
2
+ @layer uikit-ish {
3
+ .uikit-text-field-root {
4
+ &:not([data-list-part]) {
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: 4px;
8
+ }
9
+
10
+ /* The clear button, only while focused and filled; in a list row (in its
11
+ content), taking no room until then, so a value aligned to the end
12
+ reaches it (UIKit: the value moves over for the button). */
13
+ &:not([data-filled][data-focused]) > [data-text-field-part='clear'] {
14
+ visibility: hidden;
15
+ }
16
+
17
+ /* (In a search field's capsule, see Search.) */
18
+ &:not([data-filled][data-focused])
19
+ > [data-text-field-part='search']
20
+ > [data-text-field-part='clear'] {
21
+ visibility: hidden;
22
+ }
23
+
24
+ &[data-list-part]:not([data-filled][data-focused])
25
+ > *
26
+ > [data-list-part='row']
27
+ > [data-text-field-part='clear'] {
28
+ display: none;
29
+ }
30
+ }
31
+
32
+ .uikit-text-field-label {
33
+ color: var(--color-ios-secondary-label);
34
+ font-size: var(--font-ios-subheadline-size);
35
+ font-style: normal;
36
+ font-variation-settings: 'wght' var(--font-ios-subheadline-weight);
37
+ font-weight: round(down, var(--font-ios-subheadline-weight), 100);
38
+ letter-spacing: var(--font-ios-subheadline-tracking);
39
+ line-height: var(--font-ios-subheadline-line-height);
40
+ stroke: currentcolor;
41
+ stroke-linejoin: round;
42
+ stroke-width: max(
43
+ 0px,
44
+ (var(--font-ios-subheadline-weight) - 400) / 326 * 1px
45
+ );
46
+
47
+ --uikit-symbol-thinning: max(
48
+ 0px,
49
+ (400 - var(--font-ios-subheadline-weight)) / 326 * 1px
50
+ );
51
+
52
+ &[data-disabled] {
53
+ opacity: 0.55;
54
+ }
55
+ }
56
+
57
+ .uikit-text-field-control {
58
+ width: 100%;
59
+ min-width: 0;
60
+ box-sizing: border-box;
61
+ padding: 0;
62
+ border: 0;
63
+ margin: 0;
64
+ appearance: none;
65
+ background: none;
66
+ caret-color: var(--color-ios-primary);
67
+ color: var(--color-ios-label);
68
+ font-family: inherit;
69
+ font-size: var(--font-ios-body-size);
70
+ font-variation-settings: 'wght' 510;
71
+ font-weight: round(down, 510, 100);
72
+ letter-spacing: var(--font-ios-body-tracking);
73
+ line-height: 20px;
74
+ outline: none;
75
+ stroke: currentcolor;
76
+ stroke-linejoin: round;
77
+ stroke-width: max(0px, (510 - 400) / 326 * 1px);
78
+
79
+ --uikit-symbol-thinning: max(0px, (400 - 510) / 326 * 1px);
80
+
81
+ &::placeholder {
82
+ color: var(--color-ios-placeholder-text);
83
+ opacity: 1;
84
+ }
85
+
86
+ /* Native parts iOS doesn't show, or the field draws itself: number
87
+ spinners (iOS: a keypad), search's decoration and cancel button (see
88
+ `Clear`). */
89
+ &[type='number'] {
90
+ appearance: textfield;
91
+ }
92
+
93
+ &::-webkit-inner-spin-button,
94
+ &::-webkit-outer-spin-button,
95
+ &::-webkit-search-decoration,
96
+ &::-webkit-search-cancel-button {
97
+ margin: 0;
98
+ appearance: none;
99
+ }
100
+
101
+ /* Dates and times: aligned as text (WebKit centers them). */
102
+ &::-webkit-date-and-time-value {
103
+ margin: 0;
104
+ text-align: inherit;
105
+ }
106
+
107
+ &::-webkit-datetime-edit {
108
+ padding: 0;
109
+ }
110
+
111
+ /* Autofilled: as typed, on the row (no browser fill, which is
112
+ `!important`: its color never transitions in). */
113
+ &:autofill {
114
+ -webkit-text-fill-color: var(--color-ios-label);
115
+ transition: background-color 0s 86400s;
116
+ }
117
+
118
+ /* As a textarea: three lines, growing with its text where supported */
119
+ textarea& {
120
+ min-height: calc(3 * 20px);
121
+ field-sizing: content;
122
+ resize: none;
123
+ }
124
+
125
+ &[data-invalid] {
126
+ color: var(--color-ios-system-red);
127
+ }
128
+
129
+ &[data-disabled] {
130
+ opacity: 0.55;
131
+ }
132
+ }
133
+
134
+ .uikit-text-field-description {
135
+ margin: 0;
136
+ color: var(--color-ios-secondary-label);
137
+ font-size: var(--font-ios-caption1-size);
138
+ font-style: normal;
139
+ font-variation-settings: 'wght' var(--font-ios-caption1-weight);
140
+ font-weight: round(down, var(--font-ios-caption1-weight), 100);
141
+ letter-spacing: var(--font-ios-caption1-tracking);
142
+ line-height: var(--font-ios-caption1-line-height);
143
+ stroke: currentcolor;
144
+ stroke-linejoin: round;
145
+ stroke-width: max(0px, (var(--font-ios-caption1-weight) - 400) / 326 * 1px);
146
+
147
+ --uikit-symbol-thinning: max(
148
+ 0px,
149
+ (400 - var(--font-ios-caption1-weight)) / 326 * 1px
150
+ );
151
+ }
152
+
153
+ .uikit-text-field-error {
154
+ margin: 0;
155
+ color: var(--color-ios-system-red);
156
+ font-size: var(--font-ios-caption1-size);
157
+ font-style: normal;
158
+ font-variation-settings: 'wght' var(--font-ios-caption1-weight);
159
+ font-weight: round(down, var(--font-ios-caption1-weight), 100);
160
+ letter-spacing: var(--font-ios-caption1-tracking);
161
+ line-height: var(--font-ios-caption1-line-height);
162
+ stroke: currentcolor;
163
+ stroke-linejoin: round;
164
+ stroke-width: max(0px, (var(--font-ios-caption1-weight) - 400) / 326 * 1px);
165
+
166
+ --uikit-symbol-thinning: max(
167
+ 0px,
168
+ (400 - var(--font-ios-caption1-weight)) / 326 * 1px
169
+ );
170
+ }
171
+
172
+ .uikit-text-field-clear {
173
+ position: relative;
174
+ display: grid;
175
+ padding: 0;
176
+ border: 0;
177
+ margin: 0;
178
+ appearance: none;
179
+ background: none;
180
+ color: var(--color-ios-tertiary-label);
181
+ cursor: pointer;
182
+ place-items: center;
183
+ -webkit-tap-highlight-color: transparent;
184
+
185
+ &::before {
186
+ position: absolute;
187
+ width: 44px;
188
+ height: 44px;
189
+ content: '';
190
+ inset: 50% auto auto 50%;
191
+ translate: -50% -50%;
192
+ }
193
+ }
194
+
195
+ .uikit-text-field-search {
196
+ display: flex;
197
+ min-width: 0;
198
+ min-height: var(--uikit-text-field-search-height, 36px);
199
+ box-sizing: border-box;
200
+ align-items: center;
201
+ padding: 0 var(--uikit-text-field-search-padding, 10px);
202
+ border-radius: 100px;
203
+ background-color: var(
204
+ --uikit-text-field-search-fill,
205
+ var(--color-ios-tertiary-system-fill)
206
+ );
207
+ color: var(--color-ios-secondary-label);
208
+ cursor: text;
209
+ font-size: var(--font-ios-body-size);
210
+ gap: var(--uikit-text-field-search-gap, 6px);
211
+
212
+ & > input {
213
+ flex: 1 1 auto;
214
+ font-variation-settings: 'wght' 400;
215
+ font-weight: round(down, 400, 100);
216
+ stroke: currentcolor;
217
+ stroke-linejoin: round;
218
+ stroke-width: max(0px, (400 - 400) / 326 * 1px);
219
+
220
+ --uikit-symbol-thinning: max(0px, (400 - 400) / 326 * 1px);
221
+ }
222
+
223
+ /* Focused by keyboard only (a text field matches :focus-visible however
224
+ it's focused; see Search). */
225
+ &[data-keyboard-focus] {
226
+ outline: 2px solid var(--color-ios-primary);
227
+ outline-offset: 2px;
228
+ }
229
+ }
230
+ }
@@ -0,0 +1,37 @@
1
+ import '../button/style.css';
2
+ import '../glass/style.css';
3
+ import '../typography/style.css';
4
+ import './style.css';
5
+ import { useRender } from '@base-ui/react/use-render';
6
+ import type { ToolbarButtonProps, ToolbarGroupProps, ToolbarRootProps, ToolbarSideProps, ToolbarTitleProps } from './props.js';
7
+ export type { ToolbarButtonProps, ToolbarGroupProps, ToolbarRootProps, ToolbarSideProps, ToolbarTitleProps, } from './props.js';
8
+ export declare const Toolbar: {
9
+ Root: import("preact").FunctionalComponent<import("react").PropsWithoutRef<ToolbarRootProps> & {
10
+ ref?: import("preact").Ref<HTMLDivElement> | undefined;
11
+ }>;
12
+ Leading: import("preact").FunctionalComponent<import("react").PropsWithoutRef<ToolbarSideProps> & {
13
+ ref?: import("preact").Ref<HTMLElement> | undefined;
14
+ }>;
15
+ Trailing: import("preact").FunctionalComponent<import("react").PropsWithoutRef<ToolbarSideProps> & {
16
+ ref?: import("preact").Ref<HTMLElement> | undefined;
17
+ }>;
18
+ Spacer: import("preact").FunctionalComponent<import("react").PropsWithoutRef<import("preact").HTMLAttributes<HTMLDivElement>> & {
19
+ ref?: import("preact").Ref<HTMLDivElement> | undefined;
20
+ }>;
21
+ Group: import("preact").FunctionalComponent<import("react").PropsWithoutRef<ToolbarGroupProps> & {
22
+ ref?: import("preact").Ref<HTMLDivElement> | undefined;
23
+ }>;
24
+ Button: import("preact").FunctionalComponent<import("react").PropsWithoutRef<ToolbarButtonProps> & {
25
+ ref?: import("preact").Ref<HTMLButtonElement> | undefined;
26
+ }>;
27
+ Title: import("preact").FunctionalComponent<import("react").PropsWithoutRef<ToolbarTitleProps> & {
28
+ ref?: import("preact").Ref<HTMLElement> | undefined;
29
+ }>;
30
+ Subtitle: import("preact").FunctionalComponent<import("react").PropsWithoutRef<useRender.ComponentProps<"span", {}, import("@base-ui/react/types").HTMLProps>> & {
31
+ ref?: import("preact").Ref<HTMLElement> | undefined;
32
+ }>;
33
+ Separator: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/toolbar").ToolbarSeparatorProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
34
+ Link: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/toolbar").ToolbarLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
35
+ Input: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/toolbar").ToolbarInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
36
+ };
37
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/main.tsx"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AACjC,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAUtD,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAqQpB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUnB,CAAC"}
@@ -0,0 +1,142 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import '../button/style.css';
3
+ import '../glass/style.css';
4
+ import '../typography/style.css';
5
+ import './style.css';
6
+ import { Toolbar as BaseToolbar } from '@base-ui/react/toolbar';
7
+ import { useRender } from '@base-ui/react/use-render';
8
+ import { createContext, forwardRef, useContext } from 'react';
9
+ import { Button } from '../button/main.js';
10
+ import { GlassBackground, InheritedGlassContext, useGlassContext, } from '../glass/main.js';
11
+ import { cn, useForwardedRef, withStyle } from '../utils/main.js';
12
+ // Source: Apple iOS 26 Figma (“Toolbars”: “Toolbar - Bottom”, “Toobar - Top -
13
+ // iPhone”, “_Buttons - Top”, “_Button - Bottom”, BG Context Dim/Bright), with
14
+ // the glass materials and vibrant content colors as tokens in `styles.css`,
15
+ // used via `glass/main.tsx`, and the titles' colors mapped to UIKit's label
16
+ // colors (`label`, `secondaryLabel`).
17
+ //
18
+ // A toolbar holds glass capsules (`Group`) of buttons (`Button`): at the
19
+ // bottom (default) 48px high, their buttons 36px, 6px from the capsule's
20
+ // ends and 12px apart; at the top (`placement`, a navigation bar) 44px high,
21
+ // 4px from the ends. Capsules sit at the bar's start (`Leading`) and end
22
+ // (`Trailing`), 12px (top: 10px) apart, anything else (a `Title`, a page
23
+ // control, a field) between them. A button of its own is a glass `Button`
24
+ // (a circle for a symbol); several share a capsule (`Group`). Symbols and
25
+ // labels are 17px (510, SF Pro's `ss16` alternates), in the glass' vibrant
26
+ // content color; glass can be tinted (`prominent`, Figma “Text - Primary”,
27
+ // “Symbol Primary”), its content white.
28
+ //
29
+ // Titles (Figma “Title”, “Title and Subtitle”): Body Emphasized, centered
30
+ // in the bar; with a subtitle, over 12px (510) in the secondary label
31
+ // color. Large titles sit below a top bar (see `Header`).
32
+ //
33
+ // Deviations:
34
+ // - The bar's middle is centered in it while the sides fit (as iOS's
35
+ // titles; Figma: the title absolutely centered): the sides share the free
36
+ // space equally; a title aligned to the start (or anything taking the
37
+ // free space) takes all of it instead.
38
+ // - Pressed, a capsule of several buttons turns into a glass lens as the tab
39
+ // bar's groups do (scaled up by 1.05, measured on iOS 26), the pressed
40
+ // button showing the selection (Figma: no pressed state).
41
+ // - The bottom bar's padding is Figma's (4px 16px 36px, the home
42
+ // indicator's 34px included), not the safe area's.
43
+ // - With a subtitle, the title stays in 17px (Figma: 15px), as iOS 26's
44
+ // (user: not smaller than the rows' text).
45
+ /** The bar (its glass context also for glass inside it). */
46
+ const Root = forwardRef(({ className, context: contextProp, placement = 'block-end', ...props }, forwardedRef) => {
47
+ const ref = useForwardedRef(forwardedRef);
48
+ const context = useGlassContext(ref, contextProp);
49
+ return (_jsx(InheritedGlassContext.Provider, { value: context, children: _jsx(BaseToolbar.Root, { ref: ref, "data-glass-context": context ?? 'auto', "data-placement": placement, ...props, className: cn('uikit-toolbar-root', className), "data-toolbar-part": "root" }) }));
50
+ });
51
+ /** The bar's start: its leading capsules. */
52
+ const Leading = forwardRef(({ className, render, ...props }, ref) => useRender({
53
+ defaultTagName: 'div',
54
+ props: {
55
+ 'data-toolbar-part': 'leading',
56
+ className: cn('uikit-toolbar-leading', className),
57
+ ...props,
58
+ },
59
+ ref,
60
+ render,
61
+ }));
62
+ /** The bar's end: its trailing capsules. */
63
+ const Trailing = forwardRef(({ className, render, ...props }, ref) => useRender({
64
+ defaultTagName: 'div',
65
+ props: {
66
+ 'data-toolbar-part': 'trailing',
67
+ className: cn('uikit-toolbar-trailing', className),
68
+ ...props,
69
+ },
70
+ ref,
71
+ render,
72
+ }));
73
+ /** Free space between parts (e.g. a capsule at each end, without sides). */
74
+ const Spacer = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('uikit-toolbar-spacer', className), "data-toolbar-part": "spacer", ...props })));
75
+ // Whether a button is in a capsule of several (see `ToolbarButton`).
76
+ const GroupContext = createContext(false);
77
+ /**
78
+ * A glass capsule of several buttons (Figma “Button Group”); a single
79
+ * button is a glass `Button` of its own (see `ToolbarButton`).
80
+ */
81
+ const Group = forwardRef(({ className, children, prominent, style, textColor, tint, ...props }, ref) => {
82
+ const tinted = prominent ?? tint !== undefined;
83
+ // With its own tint: the glass context's variables made of it (their
84
+ // tint resolved here, not at the toolbar's).
85
+ const context = useContext(InheritedGlassContext);
86
+ return (_jsxs(BaseToolbar.Group, { ref: ref, "data-prominent": tinted ? '' : undefined, "data-glass-context": tint === undefined ? undefined : (context ?? 'auto'), style: withStyle({
87
+ '--uikit-glass-tint': tint,
88
+ '--uikit-toolbar-content': textColor,
89
+ '--uikit-toolbar-content-blend': textColor === undefined ? undefined : 'normal',
90
+ }, style), ...props, className: cn('uikit-toolbar-group', className), "data-toolbar-part": "group", children: [_jsx(GlassBackground, { kind: "button", tinted: tinted }), _jsx(GroupContext.Provider, { value: true, children: children })] }));
91
+ });
92
+ const isClassic = (variant) => variant !== undefined && variant !== 'glass' && variant !== 'glass-prominent';
93
+ /**
94
+ * A toolbar button (`Button.Root`, with `Button.Icon` or `Button.Label`
95
+ * content), in the toolbar's keyboard navigation: in a `Group`, one of its
96
+ * buttons (in the capsule's style: as `Button`, as far as that goes; not
97
+ * its `size`, `context`, nor glass variants, which are the capsule's);
98
+ * otherwise a `Button` of its own (by default, glass).
99
+ */
100
+ const ToolbarButton = forwardRef(({ context, cursor, destructive, fill, onSecondaryClick, prominent, render, shape, size, tint, variant, ...props }, ref) => {
101
+ const inGroup = useContext(GroupContext);
102
+ // (Alone: the bar's glass context, unless its own.)
103
+ const inherited = useContext(InheritedGlassContext);
104
+ const shared = { cursor, destructive, onSecondaryClick, tint };
105
+ return (_jsx(BaseToolbar.Button, { ref: ref, "data-toolbar-part": "button", ...props, render: render ??
106
+ (inGroup ? (_jsx(Button.Root, { ...shared, className: "uikit-toolbar-button", "data-toolbar-classic": isClassic(variant) ? '' : undefined, fill: fill, shape: shape, variant: isClassic(variant) ? variant : undefined, "data-toolbar-tinted": (destructive ?? tint) && !isClassic(variant) ? '' : undefined })) : (_jsx(Button.Root, { ...shared, className: "uikit-toolbar-glass-button", context: context ?? inherited, fill: fill, shape: shape, size: size, variant: variant ?? (prominent ? 'glass-prominent' : 'glass') }))) }));
107
+ });
108
+ /** The bar's title; takes the free space when aligned to the start. */
109
+ const Title = forwardRef(({ alignStart, className, render, ...props }, ref) => useRender({
110
+ defaultTagName: 'div',
111
+ props: {
112
+ 'data-align-start': alignStart ? '' : undefined,
113
+ 'data-toolbar-part': 'title',
114
+ className: cn('uikit-toolbar-title', className),
115
+ ...props,
116
+ },
117
+ ref,
118
+ render,
119
+ }));
120
+ /** A title's subtitle (Figma “Subtitle”), inside `Title`. */
121
+ const Subtitle = forwardRef(({ className, render, ...props }, ref) => useRender({
122
+ defaultTagName: 'span',
123
+ props: {
124
+ 'data-toolbar-part': 'subtitle',
125
+ className: cn('uikit-toolbar-subtitle', className),
126
+ ...props,
127
+ },
128
+ ref,
129
+ render,
130
+ }));
131
+ export const Toolbar = {
132
+ ...BaseToolbar,
133
+ Root,
134
+ Leading,
135
+ Trailing,
136
+ Spacer,
137
+ Group,
138
+ Button: ToolbarButton,
139
+ Title,
140
+ Subtitle,
141
+ };
142
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/toolbar/main.tsx"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAC;AAC7B,OA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AC,OAAO,CAAC,GAC7D,CACH,CAAC,GAEJ,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,uEAAuE;AACvE,MAAM,KAAK,GAAG,UAAU,CACtB,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CACnD,SAAS,CAAC;IACR,cAAc,EAAE,KAAK;IACrB,KAAK,EAAE;QACL,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;QAC/C,mBAAmB,EAAE,OAAO;QAC5B,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC;QAC/C,GAAG,KAAK;KACT;IACD,GAAG;IACH,MAAM;CACP,CAAC,CACL,CAAC;AAEF,6DAA6D;AAC7D,MAAM,QAAQ,GAAG,UAAU,CACzB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CACvC,SAAS,CAAC;IACR,cAAc,EAAE,MAAM;IACtB,KAAK,EAAE;QACL,mBAAmB,EAAE,UAAU;QAC/B,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC;QAClD,GAAG,KAAK;KACT;IACD,GAAG;IACH,MAAM;CACP,CAAC,CACL,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,GAAG,WAAW;IACd,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,MAAM;IACN,KAAK;IACL,MAAM,EAAE,aAAa;IACrB,KAAK;IACL,QAAQ;CACT,CAAC"}
@@ -0,0 +1,46 @@
1
+ import type { Toolbar as BaseToolbar } from '@base-ui/react/toolbar';
2
+ import type { useRender } from '@base-ui/react/use-render';
3
+ import type { ButtonRootProps } from '../button/main.js';
4
+ import type { GlassContextValue } from '../glass/main.js';
5
+ export type Placement = 'block-end' | 'block-start';
6
+ export type ToolbarRootProps = Omit<BaseToolbar.Root.Props, 'ref'> & {
7
+ /**
8
+ * Brightness of the content behind the glass (`adaptive`: by what's
9
+ * behind the bar).
10
+ * @default 'bright', or 'dim' in dark mode
11
+ */
12
+ context?: GlassContextValue;
13
+ /**
14
+ * Where the bar is: at the bottom, or at the top (a navigation bar).
15
+ * @default 'block-end'
16
+ */
17
+ placement?: Placement;
18
+ };
19
+ export type ToolbarSideProps = useRender.ComponentProps<'div'>;
20
+ export type ToolbarGroupProps = Omit<BaseToolbar.Group.Props, 'ref'> & {
21
+ /** A tinted capsule (Figma “Text - Primary”, “Symbol Primary”). */
22
+ prominent?: boolean;
23
+ /**
24
+ * Its content's color (e.g. for a light `tint`; unblended).
25
+ * @default the glass' (tinted: white)
26
+ */
27
+ textColor?: string;
28
+ /**
29
+ * The tinted capsule's color (as a glass `Button`'s; given, the capsule
30
+ * is tinted).
31
+ * @default the app's tint
32
+ */
33
+ tint?: string;
34
+ };
35
+ export type ToolbarButtonProps = Omit<BaseToolbar.Button.Props, 'ref'> & Pick<ButtonRootProps, 'context' | 'cursor' | 'destructive' | 'fill' | 'onSecondaryClick' | 'shape' | 'size' | 'tint' | 'variant'> & {
36
+ /**
37
+ * Of its own (not in a `Group`): tinted glass (Figma “Text - Primary”,
38
+ * “Symbol Primary”; `variant="glass-prominent"`).
39
+ */
40
+ prominent?: boolean;
41
+ };
42
+ export type ToolbarTitleProps = useRender.ComponentProps<'div'> & {
43
+ /** Aligned to the bar's start (Figma Style=Title 2 Line Left). */
44
+ alignStart?: boolean;
45
+ };
46
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;IACnE;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE/D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;IACrE,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GACpE,IAAI,CACF,eAAe,EACb,SAAS,GACT,QAAQ,GACR,aAAa,GACb,MAAM,GACN,kBAAkB,GAClB,OAAO,GACP,MAAM,GACN,MAAM,GACN,SAAS,CACZ,GAAG;IACF;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEJ,MAAM,MAAM,iBAAiB,GAAG,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAChE,kEAAkE;IAClE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.js","sourceRoot":"","sources":["../../../src/components/toolbar/props.tsx"],"names":[],"mappings":""}