@g9tm/lynxcontrols 0.0.0-stage → 1.4.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 (561) hide show
  1. package/README.md +29 -2
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/base/base.css +16 -0
  4. package/dist/base/base.css.map +1 -0
  5. package/dist/base/control.d.ts +68 -0
  6. package/dist/base/control.d.ts.map +1 -0
  7. package/dist/base/control.jsx +36 -0
  8. package/dist/base/control.jsx.map +1 -0
  9. package/dist/base/corner-badge.d.ts +35 -0
  10. package/dist/base/corner-badge.d.ts.map +1 -0
  11. package/dist/base/corner-badge.jsx +45 -0
  12. package/dist/base/corner-badge.jsx.map +1 -0
  13. package/dist/base/disposer.d.ts +28 -0
  14. package/dist/base/disposer.d.ts.map +1 -0
  15. package/dist/base/disposer.jsx +61 -0
  16. package/dist/base/disposer.jsx.map +1 -0
  17. package/dist/base/index.d.ts +10 -0
  18. package/dist/base/index.d.ts.map +1 -0
  19. package/dist/base/index.jsx +9 -0
  20. package/dist/base/press.d.ts +38 -0
  21. package/dist/base/press.d.ts.map +1 -0
  22. package/dist/base/press.jsx +73 -0
  23. package/dist/base/press.jsx.map +1 -0
  24. package/dist/base/pressable.d.ts +25 -0
  25. package/dist/base/pressable.d.ts.map +1 -0
  26. package/dist/base/pressable.jsx +38 -0
  27. package/dist/base/pressable.jsx.map +1 -0
  28. package/dist/base/selection-item.d.ts +29 -0
  29. package/dist/base/selection-item.d.ts.map +1 -0
  30. package/dist/base/selection-item.jsx +6 -0
  31. package/dist/base/selection-item.jsx.map +1 -0
  32. package/dist/base/timers.d.ts +7 -0
  33. package/dist/base/timers.d.ts.map +1 -0
  34. package/dist/base/timers.jsx +10 -0
  35. package/dist/base/timers.jsx.map +1 -0
  36. package/dist/base/use-controllable-state.d.ts +30 -0
  37. package/dist/base/use-controllable-state.d.ts.map +1 -0
  38. package/dist/base/use-controllable-state.jsx +49 -0
  39. package/dist/base/use-controllable-state.jsx.map +1 -0
  40. package/dist/base/use-stable-callback.d.ts +8 -0
  41. package/dist/base/use-stable-callback.d.ts.map +1 -0
  42. package/dist/base/use-stable-callback.jsx +12 -0
  43. package/dist/base/use-stable-callback.jsx.map +1 -0
  44. package/dist/button/button.css +162 -0
  45. package/dist/button/button.css.map +1 -0
  46. package/dist/button/button.d.ts +52 -0
  47. package/dist/button/button.d.ts.map +1 -0
  48. package/dist/button/button.jsx +88 -0
  49. package/dist/button/button.jsx.map +1 -0
  50. package/dist/button/header-action-button.d.ts +34 -0
  51. package/dist/button/header-action-button.d.ts.map +1 -0
  52. package/dist/button/header-action-button.jsx +51 -0
  53. package/dist/button/header-action-button.jsx.map +1 -0
  54. package/dist/button/icon-button.d.ts +46 -0
  55. package/dist/button/icon-button.d.ts.map +1 -0
  56. package/dist/button/icon-button.jsx +69 -0
  57. package/dist/button/icon-button.jsx.map +1 -0
  58. package/dist/button/index.d.ts +9 -0
  59. package/dist/button/index.d.ts.map +1 -0
  60. package/dist/button/index.jsx +8 -0
  61. package/dist/button/nav-card.d.ts +58 -0
  62. package/dist/button/nav-card.d.ts.map +1 -0
  63. package/dist/button/nav-card.jsx +96 -0
  64. package/dist/button/nav-card.jsx.map +1 -0
  65. package/dist/button/safe-tap.d.ts +27 -0
  66. package/dist/button/safe-tap.d.ts.map +1 -0
  67. package/dist/button/safe-tap.jsx +46 -0
  68. package/dist/button/safe-tap.jsx.map +1 -0
  69. package/dist/button/safe.d.ts +84 -0
  70. package/dist/button/safe.d.ts.map +1 -0
  71. package/dist/button/safe.jsx +116 -0
  72. package/dist/button/safe.jsx.map +1 -0
  73. package/dist/button/vertical-icon-text-button.d.ts +18 -0
  74. package/dist/button/vertical-icon-text-button.d.ts.map +1 -0
  75. package/dist/button/vertical-icon-text-button.jsx +21 -0
  76. package/dist/button/vertical-icon-text-button.jsx.map +1 -0
  77. package/dist/button/visuals.d.ts +53 -0
  78. package/dist/button/visuals.d.ts.map +1 -0
  79. package/dist/button/visuals.jsx +92 -0
  80. package/dist/button/visuals.jsx.map +1 -0
  81. package/dist/cascade/cascade-panel.d.ts +80 -0
  82. package/dist/cascade/cascade-panel.d.ts.map +1 -0
  83. package/dist/cascade/cascade-panel.jsx +179 -0
  84. package/dist/cascade/cascade-panel.jsx.map +1 -0
  85. package/dist/cascade/cascade.css +70 -0
  86. package/dist/cascade/cascade.css.map +1 -0
  87. package/dist/cascade/index.d.ts +3 -0
  88. package/dist/cascade/index.d.ts.map +1 -0
  89. package/dist/cascade/index.jsx +2 -0
  90. package/dist/cascade/model.d.ts +68 -0
  91. package/dist/cascade/model.d.ts.map +1 -0
  92. package/dist/cascade/model.jsx +161 -0
  93. package/dist/cascade/model.jsx.map +1 -0
  94. package/dist/deferred/deferred-content.d.ts +82 -0
  95. package/dist/deferred/deferred-content.d.ts.map +1 -0
  96. package/dist/deferred/deferred-content.jsx +263 -0
  97. package/dist/deferred/deferred-content.jsx.map +1 -0
  98. package/dist/deferred/deferred.css +62 -0
  99. package/dist/deferred/deferred.css.map +1 -0
  100. package/dist/deferred/index.d.ts +3 -0
  101. package/dist/deferred/index.d.ts.map +1 -0
  102. package/dist/deferred/index.jsx +2 -0
  103. package/dist/deferred/readiness-signal.d.ts +16 -0
  104. package/dist/deferred/readiness-signal.d.ts.map +1 -0
  105. package/dist/deferred/readiness-signal.jsx +29 -0
  106. package/dist/deferred/readiness-signal.jsx.map +1 -0
  107. package/dist/display/activity-indicator.d.ts +21 -0
  108. package/dist/display/activity-indicator.d.ts.map +1 -0
  109. package/dist/display/activity-indicator.jsx +22 -0
  110. package/dist/display/activity-indicator.jsx.map +1 -0
  111. package/dist/display/culture-date-time-label.d.ts +64 -0
  112. package/dist/display/culture-date-time-label.d.ts.map +1 -0
  113. package/dist/display/culture-date-time-label.jsx +73 -0
  114. package/dist/display/culture-date-time-label.jsx.map +1 -0
  115. package/dist/display/display.css +217 -0
  116. package/dist/display/display.css.map +1 -0
  117. package/dist/display/index.d.ts +7 -0
  118. package/dist/display/index.d.ts.map +1 -0
  119. package/dist/display/index.jsx +6 -0
  120. package/dist/display/progress-bar.d.ts +38 -0
  121. package/dist/display/progress-bar.d.ts.map +1 -0
  122. package/dist/display/progress-bar.jsx +57 -0
  123. package/dist/display/progress-bar.jsx.map +1 -0
  124. package/dist/display/separator.d.ts +30 -0
  125. package/dist/display/separator.d.ts.map +1 -0
  126. package/dist/display/separator.jsx +55 -0
  127. package/dist/display/separator.jsx.map +1 -0
  128. package/dist/display/shimmer.d.ts +41 -0
  129. package/dist/display/shimmer.d.ts.map +1 -0
  130. package/dist/display/shimmer.jsx +41 -0
  131. package/dist/display/shimmer.jsx.map +1 -0
  132. package/dist/display/title-with-line.d.ts +13 -0
  133. package/dist/display/title-with-line.d.ts.map +1 -0
  134. package/dist/display/title-with-line.jsx +21 -0
  135. package/dist/display/title-with-line.jsx.map +1 -0
  136. package/dist/edge-panel/edge-panel.css +132 -0
  137. package/dist/edge-panel/edge-panel.css.map +1 -0
  138. package/dist/edge-panel/edge-panel.d.ts +87 -0
  139. package/dist/edge-panel/edge-panel.d.ts.map +1 -0
  140. package/dist/edge-panel/edge-panel.jsx +326 -0
  141. package/dist/edge-panel/edge-panel.jsx.map +1 -0
  142. package/dist/edge-panel/helper.d.ts +27 -0
  143. package/dist/edge-panel/helper.d.ts.map +1 -0
  144. package/dist/edge-panel/helper.jsx +118 -0
  145. package/dist/edge-panel/helper.jsx.map +1 -0
  146. package/dist/edge-panel/index.d.ts +4 -0
  147. package/dist/edge-panel/index.d.ts.map +1 -0
  148. package/dist/edge-panel/index.jsx +3 -0
  149. package/dist/edge-panel/types.d.ts +155 -0
  150. package/dist/edge-panel/types.d.ts.map +1 -0
  151. package/dist/edge-panel/types.jsx +139 -0
  152. package/dist/edge-panel/types.jsx.map +1 -0
  153. package/dist/expander/expander.css +54 -0
  154. package/dist/expander/expander.css.map +1 -0
  155. package/dist/expander/expander.d.ts +46 -0
  156. package/dist/expander/expander.d.ts.map +1 -0
  157. package/dist/expander/expander.jsx +112 -0
  158. package/dist/expander/expander.jsx.map +1 -0
  159. package/dist/expander/index.d.ts +2 -0
  160. package/dist/expander/index.d.ts.map +1 -0
  161. package/dist/expander/index.jsx +1 -0
  162. package/dist/fields/dictation.d.ts +43 -0
  163. package/dist/fields/dictation.d.ts.map +1 -0
  164. package/dist/fields/dictation.jsx +124 -0
  165. package/dist/fields/dictation.jsx.map +1 -0
  166. package/dist/fields/editor.d.ts +26 -0
  167. package/dist/fields/editor.d.ts.map +1 -0
  168. package/dist/fields/editor.jsx +46 -0
  169. package/dist/fields/editor.jsx.map +1 -0
  170. package/dist/fields/fields.css +164 -0
  171. package/dist/fields/fields.css.map +1 -0
  172. package/dist/fields/index.d.ts +13 -0
  173. package/dist/fields/index.d.ts.map +1 -0
  174. package/dist/fields/index.jsx +12 -0
  175. package/dist/fields/input-policy.d.ts +48 -0
  176. package/dist/fields/input-policy.d.ts.map +1 -0
  177. package/dist/fields/input-policy.jsx +215 -0
  178. package/dist/fields/input-policy.jsx.map +1 -0
  179. package/dist/fields/notch.d.ts +10 -0
  180. package/dist/fields/notch.d.ts.map +1 -0
  181. package/dist/fields/notch.jsx +9 -0
  182. package/dist/fields/notch.jsx.map +1 -0
  183. package/dist/fields/outlined-field.d.ts +152 -0
  184. package/dist/fields/outlined-field.d.ts.map +1 -0
  185. package/dist/fields/outlined-field.jsx +199 -0
  186. package/dist/fields/outlined-field.jsx.map +1 -0
  187. package/dist/fields/pin-entry.d.ts +65 -0
  188. package/dist/fields/pin-entry.d.ts.map +1 -0
  189. package/dist/fields/pin-entry.jsx +294 -0
  190. package/dist/fields/pin-entry.jsx.map +1 -0
  191. package/dist/fields/search-entry.d.ts +35 -0
  192. package/dist/fields/search-entry.d.ts.map +1 -0
  193. package/dist/fields/search-entry.jsx +118 -0
  194. package/dist/fields/search-entry.jsx.map +1 -0
  195. package/dist/fields/slot-layout.d.ts +33 -0
  196. package/dist/fields/slot-layout.d.ts.map +1 -0
  197. package/dist/fields/slot-layout.jsx +33 -0
  198. package/dist/fields/slot-layout.jsx.map +1 -0
  199. package/dist/fields/text-entry.d.ts +62 -0
  200. package/dist/fields/text-entry.d.ts.map +1 -0
  201. package/dist/fields/text-entry.jsx +82 -0
  202. package/dist/fields/text-entry.jsx.map +1 -0
  203. package/dist/fields/use-dictation.d.ts +34 -0
  204. package/dist/fields/use-dictation.d.ts.map +1 -0
  205. package/dist/fields/use-dictation.jsx +80 -0
  206. package/dist/fields/use-dictation.jsx.map +1 -0
  207. package/dist/fields/use-text-input.d.ts +150 -0
  208. package/dist/fields/use-text-input.d.ts.map +1 -0
  209. package/dist/fields/use-text-input.jsx +247 -0
  210. package/dist/fields/use-text-input.jsx.map +1 -0
  211. package/dist/fields/validator.d.ts +14 -0
  212. package/dist/fields/validator.d.ts.map +1 -0
  213. package/dist/fields/validator.jsx +20 -0
  214. package/dist/fields/validator.jsx.map +1 -0
  215. package/dist/host/back.d.ts +42 -0
  216. package/dist/host/back.d.ts.map +1 -0
  217. package/dist/host/back.jsx +47 -0
  218. package/dist/host/back.jsx.map +1 -0
  219. package/dist/host/hooks.d.ts +90 -0
  220. package/dist/host/hooks.d.ts.map +1 -0
  221. package/dist/host/hooks.jsx +166 -0
  222. package/dist/host/hooks.jsx.map +1 -0
  223. package/dist/host/host.css +81 -0
  224. package/dist/host/host.css.map +1 -0
  225. package/dist/host/host.d.ts +70 -0
  226. package/dist/host/host.d.ts.map +1 -0
  227. package/dist/host/host.jsx +229 -0
  228. package/dist/host/host.jsx.map +1 -0
  229. package/dist/host/index.d.ts +9 -0
  230. package/dist/host/index.d.ts.map +1 -0
  231. package/dist/host/index.jsx +8 -0
  232. package/dist/host/keyboard.d.ts +24 -0
  233. package/dist/host/keyboard.d.ts.map +1 -0
  234. package/dist/host/keyboard.jsx +28 -0
  235. package/dist/host/keyboard.jsx.map +1 -0
  236. package/dist/host/layers.d.ts +69 -0
  237. package/dist/host/layers.d.ts.map +1 -0
  238. package/dist/host/layers.jsx +111 -0
  239. package/dist/host/layers.jsx.map +1 -0
  240. package/dist/host/page-loading-overlay.d.ts +17 -0
  241. package/dist/host/page-loading-overlay.d.ts.map +1 -0
  242. package/dist/host/page-loading-overlay.jsx +16 -0
  243. package/dist/host/page-loading-overlay.jsx.map +1 -0
  244. package/dist/host/readiness.d.ts +57 -0
  245. package/dist/host/readiness.d.ts.map +1 -0
  246. package/dist/host/readiness.jsx +138 -0
  247. package/dist/host/readiness.jsx.map +1 -0
  248. package/dist/host/registry.d.ts +106 -0
  249. package/dist/host/registry.d.ts.map +1 -0
  250. package/dist/host/registry.jsx +93 -0
  251. package/dist/host/registry.jsx.map +1 -0
  252. package/dist/icon/icon.css +39 -0
  253. package/dist/icon/icon.css.map +1 -0
  254. package/dist/icon/icon.d.ts +57 -0
  255. package/dist/icon/icon.d.ts.map +1 -0
  256. package/dist/icon/icon.jsx +115 -0
  257. package/dist/icon/icon.jsx.map +1 -0
  258. package/dist/icon/index.d.ts +4 -0
  259. package/dist/icon/index.d.ts.map +1 -0
  260. package/dist/icon/index.jsx +3 -0
  261. package/dist/icon/slot.d.ts +45 -0
  262. package/dist/icon/slot.d.ts.map +1 -0
  263. package/dist/icon/slot.jsx +61 -0
  264. package/dist/icon/slot.jsx.map +1 -0
  265. package/dist/icon/swatch.d.ts +29 -0
  266. package/dist/icon/swatch.d.ts.map +1 -0
  267. package/dist/icon/swatch.jsx +25 -0
  268. package/dist/icon/swatch.jsx.map +1 -0
  269. package/dist/index.d.ts +23 -0
  270. package/dist/index.d.ts.map +1 -0
  271. package/dist/index.jsx +1 -0
  272. package/dist/pickers/combo-box.d.ts +42 -0
  273. package/dist/pickers/combo-box.d.ts.map +1 -0
  274. package/dist/pickers/combo-box.jsx +129 -0
  275. package/dist/pickers/combo-box.jsx.map +1 -0
  276. package/dist/pickers/date-time-picker.d.ts +63 -0
  277. package/dist/pickers/date-time-picker.d.ts.map +1 -0
  278. package/dist/pickers/date-time-picker.jsx +141 -0
  279. package/dist/pickers/date-time-picker.jsx.map +1 -0
  280. package/dist/pickers/date-time.d.ts +82 -0
  281. package/dist/pickers/date-time.d.ts.map +1 -0
  282. package/dist/pickers/date-time.jsx +130 -0
  283. package/dist/pickers/date-time.jsx.map +1 -0
  284. package/dist/pickers/index.d.ts +10 -0
  285. package/dist/pickers/index.d.ts.map +1 -0
  286. package/dist/pickers/index.jsx +9 -0
  287. package/dist/pickers/picker-sheet.d.ts +21 -0
  288. package/dist/pickers/picker-sheet.d.ts.map +1 -0
  289. package/dist/pickers/picker-sheet.jsx +61 -0
  290. package/dist/pickers/picker-sheet.jsx.map +1 -0
  291. package/dist/pickers/picker.d.ts +32 -0
  292. package/dist/pickers/picker.d.ts.map +1 -0
  293. package/dist/pickers/picker.jsx +72 -0
  294. package/dist/pickers/picker.jsx.map +1 -0
  295. package/dist/pickers/pickers.css +219 -0
  296. package/dist/pickers/pickers.css.map +1 -0
  297. package/dist/pickers/timespan-picker.d.ts +36 -0
  298. package/dist/pickers/timespan-picker.d.ts.map +1 -0
  299. package/dist/pickers/timespan-picker.jsx +99 -0
  300. package/dist/pickers/timespan-picker.jsx.map +1 -0
  301. package/dist/pickers/timespan.d.ts +38 -0
  302. package/dist/pickers/timespan.d.ts.map +1 -0
  303. package/dist/pickers/timespan.jsx +49 -0
  304. package/dist/pickers/timespan.jsx.map +1 -0
  305. package/dist/pickers/trigger.d.ts +34 -0
  306. package/dist/pickers/trigger.d.ts.map +1 -0
  307. package/dist/pickers/trigger.jsx +77 -0
  308. package/dist/pickers/trigger.jsx.map +1 -0
  309. package/dist/pickers/wheel-column.d.ts +32 -0
  310. package/dist/pickers/wheel-column.d.ts.map +1 -0
  311. package/dist/pickers/wheel-column.jsx +99 -0
  312. package/dist/pickers/wheel-column.jsx.map +1 -0
  313. package/dist/plus-button/index.d.ts +3 -0
  314. package/dist/plus-button/index.d.ts.map +1 -0
  315. package/dist/plus-button/index.jsx +2 -0
  316. package/dist/plus-button/model.d.ts +65 -0
  317. package/dist/plus-button/model.d.ts.map +1 -0
  318. package/dist/plus-button/model.jsx +86 -0
  319. package/dist/plus-button/model.jsx.map +1 -0
  320. package/dist/plus-button/plus-button.css +67 -0
  321. package/dist/plus-button/plus-button.css.map +1 -0
  322. package/dist/plus-button/plus-button.d.ts +38 -0
  323. package/dist/plus-button/plus-button.d.ts.map +1 -0
  324. package/dist/plus-button/plus-button.jsx +155 -0
  325. package/dist/plus-button/plus-button.jsx.map +1 -0
  326. package/dist/popup/frame.d.ts +101 -0
  327. package/dist/popup/frame.d.ts.map +1 -0
  328. package/dist/popup/frame.jsx +252 -0
  329. package/dist/popup/frame.jsx.map +1 -0
  330. package/dist/popup/index.d.ts +8 -0
  331. package/dist/popup/index.d.ts.map +1 -0
  332. package/dist/popup/index.jsx +7 -0
  333. package/dist/popup/input-form.d.ts +35 -0
  334. package/dist/popup/input-form.d.ts.map +1 -0
  335. package/dist/popup/input-form.jsx +160 -0
  336. package/dist/popup/input-form.jsx.map +1 -0
  337. package/dist/popup/input.d.ts +175 -0
  338. package/dist/popup/input.d.ts.map +1 -0
  339. package/dist/popup/input.jsx +176 -0
  340. package/dist/popup/input.jsx.map +1 -0
  341. package/dist/popup/popup-view.d.ts +25 -0
  342. package/dist/popup/popup-view.d.ts.map +1 -0
  343. package/dist/popup/popup-view.jsx +67 -0
  344. package/dist/popup/popup-view.jsx.map +1 -0
  345. package/dist/popup/popup.css +203 -0
  346. package/dist/popup/popup.css.map +1 -0
  347. package/dist/popup/queue.d.ts +90 -0
  348. package/dist/popup/queue.d.ts.map +1 -0
  349. package/dist/popup/queue.jsx +309 -0
  350. package/dist/popup/queue.jsx.map +1 -0
  351. package/dist/popup/service.d.ts +60 -0
  352. package/dist/popup/service.d.ts.map +1 -0
  353. package/dist/popup/service.jsx +350 -0
  354. package/dist/popup/service.jsx.map +1 -0
  355. package/dist/popup/types.d.ts +222 -0
  356. package/dist/popup/types.d.ts.map +1 -0
  357. package/dist/popup/types.jsx +218 -0
  358. package/dist/popup/types.jsx.map +1 -0
  359. package/dist/provider/contexts.d.ts +41 -0
  360. package/dist/provider/contexts.d.ts.map +1 -0
  361. package/dist/provider/contexts.jsx +11 -0
  362. package/dist/provider/contexts.jsx.map +1 -0
  363. package/dist/provider/global-events.d.ts +8 -0
  364. package/dist/provider/global-events.d.ts.map +1 -0
  365. package/dist/provider/global-events.jsx +17 -0
  366. package/dist/provider/global-events.jsx.map +1 -0
  367. package/dist/provider/hooks.d.ts +49 -0
  368. package/dist/provider/hooks.d.ts.map +1 -0
  369. package/dist/provider/hooks.jsx +72 -0
  370. package/dist/provider/hooks.jsx.map +1 -0
  371. package/dist/provider/index.d.ts +5 -0
  372. package/dist/provider/index.d.ts.map +1 -0
  373. package/dist/provider/index.jsx +3 -0
  374. package/dist/provider/provider.css +18 -0
  375. package/dist/provider/provider.css.map +1 -0
  376. package/dist/provider/provider.d.ts +51 -0
  377. package/dist/provider/provider.d.ts.map +1 -0
  378. package/dist/provider/provider.jsx +290 -0
  379. package/dist/provider/provider.jsx.map +1 -0
  380. package/dist/provider/settings.d.ts +99 -0
  381. package/dist/provider/settings.d.ts.map +1 -0
  382. package/dist/provider/settings.jsx +45 -0
  383. package/dist/provider/settings.jsx.map +1 -0
  384. package/dist/provider/theme-css.d.ts +12 -0
  385. package/dist/provider/theme-css.d.ts.map +1 -0
  386. package/dist/provider/theme-css.jsx +19 -0
  387. package/dist/provider/theme-css.jsx.map +1 -0
  388. package/dist/provider/theme-root.d.ts +10 -0
  389. package/dist/provider/theme-root.d.ts.map +1 -0
  390. package/dist/provider/theme-root.jsx +24 -0
  391. package/dist/provider/theme-root.jsx.map +1 -0
  392. package/dist/provider/theme.css +473 -0
  393. package/dist/provider/theme.css.map +1 -0
  394. package/dist/range-slider/index.d.ts +3 -0
  395. package/dist/range-slider/index.d.ts.map +1 -0
  396. package/dist/range-slider/index.jsx +2 -0
  397. package/dist/range-slider/math.d.ts +23 -0
  398. package/dist/range-slider/math.d.ts.map +1 -0
  399. package/dist/range-slider/math.jsx +71 -0
  400. package/dist/range-slider/math.jsx.map +1 -0
  401. package/dist/range-slider/range-slider.css +90 -0
  402. package/dist/range-slider/range-slider.css.map +1 -0
  403. package/dist/range-slider/range-slider.d.ts +52 -0
  404. package/dist/range-slider/range-slider.d.ts.map +1 -0
  405. package/dist/range-slider/range-slider.jsx +159 -0
  406. package/dist/range-slider/range-slider.jsx.map +1 -0
  407. package/dist/selection/index.d.ts +5 -0
  408. package/dist/selection/index.d.ts.map +1 -0
  409. package/dist/selection/index.jsx +3 -0
  410. package/dist/selection/model.d.ts +53 -0
  411. package/dist/selection/model.d.ts.map +1 -0
  412. package/dist/selection/model.jsx +69 -0
  413. package/dist/selection/model.jsx.map +1 -0
  414. package/dist/selection/selection-sheet.d.ts +80 -0
  415. package/dist/selection/selection-sheet.d.ts.map +1 -0
  416. package/dist/selection/selection-sheet.jsx +366 -0
  417. package/dist/selection/selection-sheet.jsx.map +1 -0
  418. package/dist/selection/selection.css +76 -0
  419. package/dist/selection/selection.css.map +1 -0
  420. package/dist/selection/use-selection-model.d.ts +9 -0
  421. package/dist/selection/use-selection-model.d.ts.map +1 -0
  422. package/dist/selection/use-selection-model.jsx +22 -0
  423. package/dist/selection/use-selection-model.jsx.map +1 -0
  424. package/dist/sheet/frame.d.ts +47 -0
  425. package/dist/sheet/frame.d.ts.map +1 -0
  426. package/dist/sheet/frame.jsx +270 -0
  427. package/dist/sheet/frame.jsx.map +1 -0
  428. package/dist/sheet/gesture.d.ts +51 -0
  429. package/dist/sheet/gesture.d.ts.map +1 -0
  430. package/dist/sheet/gesture.jsx +107 -0
  431. package/dist/sheet/gesture.jsx.map +1 -0
  432. package/dist/sheet/handoff.d.ts +32 -0
  433. package/dist/sheet/handoff.d.ts.map +1 -0
  434. package/dist/sheet/handoff.jsx +33 -0
  435. package/dist/sheet/handoff.jsx.map +1 -0
  436. package/dist/sheet/header.d.ts +46 -0
  437. package/dist/sheet/header.d.ts.map +1 -0
  438. package/dist/sheet/header.jsx +158 -0
  439. package/dist/sheet/header.jsx.map +1 -0
  440. package/dist/sheet/height-memo.d.ts +47 -0
  441. package/dist/sheet/height-memo.d.ts.map +1 -0
  442. package/dist/sheet/height-memo.jsx +100 -0
  443. package/dist/sheet/height-memo.jsx.map +1 -0
  444. package/dist/sheet/index.d.ts +12 -0
  445. package/dist/sheet/index.d.ts.map +1 -0
  446. package/dist/sheet/index.jsx +11 -0
  447. package/dist/sheet/loadable.d.ts +35 -0
  448. package/dist/sheet/loadable.d.ts.map +1 -0
  449. package/dist/sheet/loadable.jsx +65 -0
  450. package/dist/sheet/loadable.jsx.map +1 -0
  451. package/dist/sheet/motion.d.ts +59 -0
  452. package/dist/sheet/motion.d.ts.map +1 -0
  453. package/dist/sheet/motion.jsx +59 -0
  454. package/dist/sheet/motion.jsx.map +1 -0
  455. package/dist/sheet/options.d.ts +252 -0
  456. package/dist/sheet/options.d.ts.map +1 -0
  457. package/dist/sheet/options.jsx +92 -0
  458. package/dist/sheet/options.jsx.map +1 -0
  459. package/dist/sheet/processing.d.ts +22 -0
  460. package/dist/sheet/processing.d.ts.map +1 -0
  461. package/dist/sheet/processing.jsx +66 -0
  462. package/dist/sheet/processing.jsx.map +1 -0
  463. package/dist/sheet/service.d.ts +55 -0
  464. package/dist/sheet/service.d.ts.map +1 -0
  465. package/dist/sheet/service.jsx +143 -0
  466. package/dist/sheet/service.jsx.map +1 -0
  467. package/dist/sheet/sheet.css +246 -0
  468. package/dist/sheet/sheet.css.map +1 -0
  469. package/dist/sheet/sheet.d.ts +19 -0
  470. package/dist/sheet/sheet.d.ts.map +1 -0
  471. package/dist/sheet/sheet.jsx +40 -0
  472. package/dist/sheet/sheet.jsx.map +1 -0
  473. package/dist/sheet/sizing.d.ts +87 -0
  474. package/dist/sheet/sizing.d.ts.map +1 -0
  475. package/dist/sheet/sizing.jsx +159 -0
  476. package/dist/sheet/sizing.jsx.map +1 -0
  477. package/dist/sheet/stack.d.ts +161 -0
  478. package/dist/sheet/stack.d.ts.map +1 -0
  479. package/dist/sheet/stack.jsx +378 -0
  480. package/dist/sheet/stack.jsx.map +1 -0
  481. package/dist/swipe/index.d.ts +3 -0
  482. package/dist/swipe/index.d.ts.map +1 -0
  483. package/dist/swipe/index.jsx +2 -0
  484. package/dist/swipe/model.d.ts +72 -0
  485. package/dist/swipe/model.d.ts.map +1 -0
  486. package/dist/swipe/model.jsx +66 -0
  487. package/dist/swipe/model.jsx.map +1 -0
  488. package/dist/swipe/swipe-view.d.ts +40 -0
  489. package/dist/swipe/swipe-view.d.ts.map +1 -0
  490. package/dist/swipe/swipe-view.jsx +163 -0
  491. package/dist/swipe/swipe-view.jsx.map +1 -0
  492. package/dist/swipe/swipe.css +34 -0
  493. package/dist/swipe/swipe.css.map +1 -0
  494. package/dist/tab-bar/index.d.ts +4 -0
  495. package/dist/tab-bar/index.d.ts.map +1 -0
  496. package/dist/tab-bar/index.jsx +3 -0
  497. package/dist/tab-bar/metrics.d.ts +230 -0
  498. package/dist/tab-bar/metrics.d.ts.map +1 -0
  499. package/dist/tab-bar/metrics.jsx +221 -0
  500. package/dist/tab-bar/metrics.jsx.map +1 -0
  501. package/dist/tab-bar/model.d.ts +170 -0
  502. package/dist/tab-bar/model.d.ts.map +1 -0
  503. package/dist/tab-bar/model.jsx +349 -0
  504. package/dist/tab-bar/model.jsx.map +1 -0
  505. package/dist/tab-bar/tab-bar.css +173 -0
  506. package/dist/tab-bar/tab-bar.css.map +1 -0
  507. package/dist/tab-bar/tab-bar.d.ts +61 -0
  508. package/dist/tab-bar/tab-bar.d.ts.map +1 -0
  509. package/dist/tab-bar/tab-bar.jsx +346 -0
  510. package/dist/tab-bar/tab-bar.jsx.map +1 -0
  511. package/dist/tabs/index.d.ts +3 -0
  512. package/dist/tabs/index.d.ts.map +1 -0
  513. package/dist/tabs/index.jsx +2 -0
  514. package/dist/tabs/model.d.ts +83 -0
  515. package/dist/tabs/model.d.ts.map +1 -0
  516. package/dist/tabs/model.jsx +113 -0
  517. package/dist/tabs/model.jsx.map +1 -0
  518. package/dist/tabs/tab-view.d.ts +47 -0
  519. package/dist/tabs/tab-view.d.ts.map +1 -0
  520. package/dist/tabs/tab-view.jsx +227 -0
  521. package/dist/tabs/tab-view.jsx.map +1 -0
  522. package/dist/tabs/tabs.css +182 -0
  523. package/dist/tabs/tabs.css.map +1 -0
  524. package/dist/toast/index.d.ts +3 -0
  525. package/dist/toast/index.d.ts.map +1 -0
  526. package/dist/toast/index.jsx +2 -0
  527. package/dist/toast/service.d.ts +48 -0
  528. package/dist/toast/service.d.ts.map +1 -0
  529. package/dist/toast/service.jsx +238 -0
  530. package/dist/toast/service.jsx.map +1 -0
  531. package/dist/toast/store.d.ts +176 -0
  532. package/dist/toast/store.d.ts.map +1 -0
  533. package/dist/toast/store.jsx +355 -0
  534. package/dist/toast/store.jsx.map +1 -0
  535. package/dist/toast/toast.css +159 -0
  536. package/dist/toast/toast.css.map +1 -0
  537. package/dist/toggle/checkbox-math.d.ts +52 -0
  538. package/dist/toggle/checkbox-math.d.ts.map +1 -0
  539. package/dist/toggle/checkbox-math.jsx +111 -0
  540. package/dist/toggle/checkbox-math.jsx.map +1 -0
  541. package/dist/toggle/checkbox.d.ts +56 -0
  542. package/dist/toggle/checkbox.d.ts.map +1 -0
  543. package/dist/toggle/checkbox.jsx +152 -0
  544. package/dist/toggle/checkbox.jsx.map +1 -0
  545. package/dist/toggle/chip-group.d.ts +50 -0
  546. package/dist/toggle/chip-group.d.ts.map +1 -0
  547. package/dist/toggle/chip-group.jsx +107 -0
  548. package/dist/toggle/chip-group.jsx.map +1 -0
  549. package/dist/toggle/index.d.ts +5 -0
  550. package/dist/toggle/index.d.ts.map +1 -0
  551. package/dist/toggle/index.jsx +4 -0
  552. package/dist/toggle/switch.d.ts +52 -0
  553. package/dist/toggle/switch.d.ts.map +1 -0
  554. package/dist/toggle/switch.jsx +192 -0
  555. package/dist/toggle/switch.jsx.map +1 -0
  556. package/dist/toggle/toggle.css +188 -0
  557. package/dist/toggle/toggle.css.map +1 -0
  558. package/package.json +155 -4
  559. package/rspeedy/index.d.ts +21 -0
  560. package/rspeedy/index.mjs +75 -0
  561. package/rspeedy/index.test.mjs +52 -0
@@ -0,0 +1,160 @@
1
+ import "./popup.css";
2
+ import { G9InputType, G9TextInputDirection } from "@g9tm/lynxcontrols-foundation";
3
+ import { useEffect, useRef, useSyncExternalStore } from "@lynx-js/react";
4
+ import { g9RowStyle } from "../base/control.jsx";
5
+ import { useG9Press } from "../base/press.jsx";
6
+ import { G9Editor } from "../fields/editor.jsx";
7
+ import { G9TextEntry } from "../fields/text-entry.jsx";
8
+ import { useG9Direction } from "../provider/hooks.jsx";
9
+ import { G9CheckBox } from "../toggle/checkbox.jsx";
10
+ import { initialPopupFormState, popupCheckBoxOptions, popupFieldKeyboard, validatePopupForm } from "./input.jsx";
11
+ function createPopupFormStore(fields) {
12
+ let state = {
13
+ form: initialPopupFormState(fields),
14
+ errors: {},
15
+ focus: null
16
+ };
17
+ const listeners = new Set();
18
+ const set = (next)=>{
19
+ state = next;
20
+ for (const l of listeners)l();
21
+ };
22
+ const clearError = (key)=>{
23
+ if (!(key in state.errors)) return state.errors;
24
+ const { [key]: _, ...rest } = state.errors;
25
+ return rest;
26
+ };
27
+ return {
28
+ fields,
29
+ getState: ()=>state,
30
+ subscribe (listener) {
31
+ listeners.add(listener);
32
+ return ()=>listeners.delete(listener);
33
+ },
34
+ setText (key, value) {
35
+ set({
36
+ ...state,
37
+ form: {
38
+ ...state.form,
39
+ text: {
40
+ ...state.form.text,
41
+ [key]: value
42
+ }
43
+ },
44
+ errors: clearError(key)
45
+ });
46
+ },
47
+ toggle (key, value, on) {
48
+ var _state_form_selected_key;
49
+ const current = null != (_state_form_selected_key = state.form.selected[key]) ? _state_form_selected_key : [];
50
+ const next = on ? current.includes(value) ? current : [
51
+ ...current,
52
+ value
53
+ ] : current.filter((v)=>v !== value);
54
+ set({
55
+ ...state,
56
+ form: {
57
+ ...state.form,
58
+ selected: {
59
+ ...state.form.selected,
60
+ [key]: next
61
+ }
62
+ },
63
+ errors: clearError(key)
64
+ });
65
+ },
66
+ validate (messages) {
67
+ var _ref;
68
+ var _state_focus;
69
+ const result = validatePopupForm(fields, state.form, messages);
70
+ set({
71
+ ...state,
72
+ errors: result.errors,
73
+ focus: result.firstInvalid ? {
74
+ key: result.firstInvalid,
75
+ n: (null != (_ref = null == (_state_focus = state.focus) ? void 0 : _state_focus.n) ? _ref : 0) + 1
76
+ } : state.focus
77
+ });
78
+ return result;
79
+ }
80
+ };
81
+ }
82
+ function RadioRow(props) {
83
+ const press = useG9Press(props.onPick, {
84
+ source: 'G9PopupInput',
85
+ guardMs: 0,
86
+ blocked: props.disabled
87
+ });
88
+ const direction = useG9Direction();
89
+ return <view className={`g9-popup-input__radio${props.selected ? ' g9-popup-input__radio--selected' : ''}`} style={g9RowStyle(direction)} accessibility-element={true} accessibility-traits="button" accessibility-label={props.text} accessibility-value={props.selected ? 'selected' : ''} bindtap={press}>
90
+ <view className="g9-popup-input__radio-ring">
91
+ {props.selected ? <view className="g9-popup-input__radio-dot"/> : null}
92
+ </view>
93
+ <text className="g9-popup-input__option-text">{props.text}</text>
94
+ </view>;
95
+ }
96
+ const inputTypeOf = (f)=>'email' === f.type ? G9InputType.Email : 'phone' === f.type ? G9InputType.Phone : 'number' === f.type ? G9InputType.Number : G9InputType.Default;
97
+ function PopupInputForm(props) {
98
+ var _state_focus;
99
+ const { store } = props;
100
+ const state = useSyncExternalStore((l)=>store.subscribe(l), ()=>store.getState());
101
+ const direction = useG9Direction();
102
+ const handles = useRef(new Map());
103
+ useEffect(()=>{
104
+ var _handles_current_get;
105
+ if (!props.focusFirst) return;
106
+ const first = store.fields.find((f)=>'checkBox' !== f.type && 'radioButton' !== f.type);
107
+ if (first) null == (_handles_current_get = handles.current.get(first.key)) || _handles_current_get.focus();
108
+ }, []);
109
+ useEffect(()=>{
110
+ var _handles_current_get;
111
+ if (state.focus) null == (_handles_current_get = handles.current.get(state.focus.key)) || _handles_current_get.focus();
112
+ }, [
113
+ null == (_state_focus = state.focus) ? void 0 : _state_focus.n
114
+ ]);
115
+ return <view className={`g9-popup-input g9-dir-${direction}`}>
116
+ {store.fields.map((f)=>{
117
+ var _state_form_text_f_key, _f_direction;
118
+ const error = state.errors[f.key];
119
+ if ('checkBox' === f.type || 'radioButton' === f.type) {
120
+ var _f_items, _state_form_selected_f_key;
121
+ const options = 'checkBox' === f.type ? popupCheckBoxOptions(f) : null != (_f_items = f.items) ? _f_items : [];
122
+ const selected = null != (_state_form_selected_f_key = state.form.selected[f.key]) ? _state_form_selected_f_key : [];
123
+ return <view key={f.key} className="g9-popup-input__group">
124
+ <text className="g9-popup-input__label" style={f.fontFamily ? {
125
+ fontFamily: f.fontFamily
126
+ } : {}}>
127
+ {f.label}
128
+ </text>
129
+ {options.map((o)=>'checkBox' === f.type ? <G9CheckBox key={o.value} text={o.text} checked={selected.includes(o.value)} disabled={f.isReadOnly} onCheckedChange={(on)=>store.toggle(f.key, o.value, on)}/> : <RadioRow key={o.value} text={o.text} selected={state.form.text[f.key] === o.value} disabled={f.isReadOnly} onPick={()=>store.setText(f.key, o.value)}/>)}
130
+ {error ? <text className="g9-popup-input__error">{error}</text> : null}
131
+ </view>;
132
+ }
133
+ const common = {
134
+ label: f.label,
135
+ placeholder: f.placeholder,
136
+ value: null != (_state_form_text_f_key = state.form.text[f.key]) ? _state_form_text_f_key : '',
137
+ onValueChange: (v)=>store.setText(f.key, v),
138
+ readOnly: f.isReadOnly,
139
+ hasError: void 0 !== error,
140
+ errorText: null != error ? error : null,
141
+ inputTextDirection: null != (_f_direction = f.direction) ? _f_direction : G9TextInputDirection.MatchParent,
142
+ customFont: f.fontFamily,
143
+ voiceEnabled: f.enableVoice,
144
+ isSpellCheckEnabled: f.isSpellCheckEnabled,
145
+ isTextPredictionEnabled: f.isTextPredictionEnabled,
146
+ ...f.maxLength ? {
147
+ maxLength: f.maxLength,
148
+ showCharacterCounter: false
149
+ } : {},
150
+ ref: (h)=>{
151
+ handles.current.set(f.key, h);
152
+ }
153
+ };
154
+ return 'multiline' === f.type || 'textArea' === f.type ? <G9Editor key={f.key} {...common}/> : <G9TextEntry key={f.key} {...common} keyboardType={popupFieldKeyboard(f)} inputType={inputTypeOf(f)} isPassword={'password' === f.type} passwordToggle={'password' === f.type}/>;
155
+ })}
156
+ </view>;
157
+ }
158
+ export { PopupInputForm, createPopupFormStore };
159
+
160
+ //# sourceMappingURL=input-form.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popup/input-form.jsx","sources":["../../src/popup/input-form.tsx"],"sourcesContent":["import './popup.css';\nimport { G9InputType, G9TextInputDirection } from '@g9tm/lynxcontrols-foundation';\nimport { type ReactNode, useEffect, useRef, useSyncExternalStore } from '@lynx-js/react';\nimport { g9RowStyle } from '../base/control';\nimport { useG9Press } from '../base/press';\nimport { G9Editor } from '../fields/editor';\nimport { G9TextEntry } from '../fields/text-entry';\nimport type { G9TextInputHandle } from '../fields/use-text-input';\nimport { useG9Direction } from '../provider/hooks';\nimport { G9CheckBox } from '../toggle/checkbox';\nimport {\n type G9PopupFormState,\n type G9PopupInputField,\n initialPopupFormState,\n popupCheckBoxOptions,\n popupFieldKeyboard,\n validatePopupForm,\n} from './input';\n\n/** The live state of an input popup's form: survives a re-show (a nested popup, a failed submit). */\nexport interface G9PopupFormStore {\n readonly fields: ReadonlyArray<G9PopupInputField>;\n getState(): {\n form: G9PopupFormState;\n errors: Readonly<Record<string, string>>;\n focus: { key: string; n: number } | null;\n };\n subscribe(listener: () => void): () => void;\n setText(key: string, value: string): void;\n toggle(key: string, value: string, on: boolean): void;\n /** Validates, shows the errors, focuses the first invalid field. */\n validate(messages: {\n readonly requiredSuffix: string;\n readonly invalidEmail: string;\n }): ReturnType<typeof validatePopupForm>;\n}\n\n/** Creates the store of one input popup. */\nexport function createPopupFormStore(fields: ReadonlyArray<G9PopupInputField>): G9PopupFormStore {\n let state: ReturnType<G9PopupFormStore['getState']> = {\n form: initialPopupFormState(fields),\n errors: {},\n focus: null,\n };\n const listeners = new Set<() => void>();\n const set = (next: typeof state) => {\n state = next;\n for (const l of listeners) l();\n };\n const clearError = (key: string) => {\n if (!(key in state.errors)) return state.errors;\n const { [key]: _, ...rest } = state.errors;\n return rest;\n };\n return {\n fields,\n getState: () => state,\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n setText(key, value) {\n set({ ...state, form: { ...state.form, text: { ...state.form.text, [key]: value } }, errors: clearError(key) });\n },\n toggle(key, value, on) {\n const current = state.form.selected[key] ?? [];\n const next = on ? (current.includes(value) ? current : [...current, value]) : current.filter((v) => v !== value);\n set({\n ...state,\n form: { ...state.form, selected: { ...state.form.selected, [key]: next } },\n errors: clearError(key),\n });\n },\n validate(messages) {\n const result = validatePopupForm(fields, state.form, messages);\n set({\n ...state,\n errors: result.errors,\n focus: result.firstInvalid ? { key: result.firstInvalid, n: (state.focus?.n ?? 0) + 1 } : state.focus,\n });\n return result;\n },\n };\n}\n\nfunction RadioRow(props: {\n readonly text: string;\n readonly selected: boolean;\n readonly disabled: boolean;\n readonly onPick: () => void;\n}): ReactNode {\n const press = useG9Press(props.onPick, { source: 'G9PopupInput', guardMs: 0, blocked: props.disabled });\n const direction = useG9Direction();\n return (\n <view\n className={`g9-popup-input__radio${props.selected ? ' g9-popup-input__radio--selected' : ''}`}\n style={g9RowStyle(direction)}\n accessibility-element={true}\n accessibility-traits=\"button\"\n accessibility-label={props.text}\n accessibility-value={props.selected ? 'selected' : ''}\n bindtap={press}\n >\n <view className=\"g9-popup-input__radio-ring\">\n {props.selected ? <view className=\"g9-popup-input__radio-dot\" /> : null}\n </view>\n <text className=\"g9-popup-input__option-text\">{props.text}</text>\n </view>\n );\n}\n\nconst inputTypeOf = (f: G9PopupInputField): G9InputType =>\n f.type === 'email'\n ? G9InputType.Email\n : f.type === 'phone'\n ? G9InputType.Phone\n : f.type === 'number'\n ? G9InputType.Number\n : G9InputType.Default;\n\n/**\n * The input popup's form (MAUI `ShowInputG9PopupAsync` form view): a `G9TextEntry` per text field (keyboard and\n * direction from the field), a `G9Editor` for multiline/text-area, a `G9CheckBox` per check-box option and radio rows.\n * Errors show under their fields; the first field is focused on open, the first invalid one after a failed submit.\n */\nexport function PopupInputForm(props: { readonly store: G9PopupFormStore; readonly focusFirst: boolean }): ReactNode {\n const { store } = props;\n const state = useSyncExternalStore(\n (l) => store.subscribe(l),\n () => store.getState(),\n );\n const direction = useG9Direction();\n const handles = useRef(new Map<string, G9TextInputHandle | null>());\n useEffect(() => {\n if (!props.focusFirst) return;\n const first = store.fields.find((f) => f.type !== 'checkBox' && f.type !== 'radioButton');\n if (first) handles.current.get(first.key)?.focus();\n }, []);\n useEffect(() => {\n if (state.focus) handles.current.get(state.focus.key)?.focus();\n }, [state.focus?.n]);\n return (\n <view className={`g9-popup-input g9-dir-${direction}`}>\n {store.fields.map((f) => {\n const error = state.errors[f.key];\n if (f.type === 'checkBox' || f.type === 'radioButton') {\n const options = f.type === 'checkBox' ? popupCheckBoxOptions(f) : (f.items ?? []);\n const selected = state.form.selected[f.key] ?? [];\n return (\n <view key={f.key} className=\"g9-popup-input__group\">\n <text className=\"g9-popup-input__label\" style={f.fontFamily ? { fontFamily: f.fontFamily } : {}}>\n {f.label}\n </text>\n {options.map((o) =>\n f.type === 'checkBox' ? (\n <G9CheckBox\n key={o.value}\n text={o.text}\n checked={selected.includes(o.value)}\n disabled={f.isReadOnly}\n onCheckedChange={(on) => store.toggle(f.key, o.value, on)}\n />\n ) : (\n <RadioRow\n key={o.value}\n text={o.text}\n selected={state.form.text[f.key] === o.value}\n disabled={f.isReadOnly}\n onPick={() => store.setText(f.key, o.value)}\n />\n ),\n )}\n {error ? <text className=\"g9-popup-input__error\">{error}</text> : null}\n </view>\n );\n }\n const common = {\n label: f.label,\n placeholder: f.placeholder,\n value: state.form.text[f.key] ?? '',\n onValueChange: (v: string) => store.setText(f.key, v),\n readOnly: f.isReadOnly,\n hasError: error !== undefined,\n errorText: error ?? null,\n inputTextDirection: f.direction ?? G9TextInputDirection.MatchParent,\n customFont: f.fontFamily,\n voiceEnabled: f.enableVoice,\n isSpellCheckEnabled: f.isSpellCheckEnabled,\n isTextPredictionEnabled: f.isTextPredictionEnabled,\n ...(f.maxLength ? { maxLength: f.maxLength, showCharacterCounter: false } : {}),\n ref: (h: G9TextInputHandle | null) => {\n handles.current.set(f.key, h);\n },\n };\n return f.type === 'multiline' || f.type === 'textArea' ? (\n <G9Editor key={f.key} {...common} />\n ) : (\n <G9TextEntry\n key={f.key}\n {...common}\n keyboardType={popupFieldKeyboard(f)}\n inputType={inputTypeOf(f)}\n isPassword={f.type === 'password'}\n passwordToggle={f.type === 'password'}\n />\n );\n })}\n </view>\n );\n}\n"],"names":["createPopupFormStore","fields","state","initialPopupFormState","listeners","Set","set","next","l","clearError","key","_","rest","listener","value","on","_state_form_selected_key","current","v","messages","_state_focus","result","validatePopupForm","RadioRow","props","press","useG9Press","direction","useG9Direction","view","g9RowStyle","text","inputTypeOf","f","G9InputType","PopupInputForm","store","useSyncExternalStore","handles","useRef","Map","useEffect","_handles_current_get","first","_state_form_text_f_key","_f_direction","error","_f_items","_state_form_selected_f_key","options","popupCheckBoxOptions","selected","o","G9CheckBox","common","undefined","G9TextInputDirection","h","G9Editor","G9TextEntry","popupFieldKeyboard"],"mappings":";;;;;;;;;;AAsCO,SAASA,qBAAqBC,MAAwC;IAC3E,IAAIC,QAAkD;QACpD,MAAMC,sBAAsBF;QAC5B,QAAQ,CAAC;QACT,OAAO;IACT;IACA,MAAMG,YAAY,IAAIC;IACtB,MAAMC,MAAM,CAACC;QACXL,QAAQK;QACR,KAAK,MAAMC,KAAKJ,UAAWI;IAC7B;IACA,MAAMC,aAAa,CAACC;QAClB,IAAI,CAAEA,CAAAA,OAAOR,MAAM,MAAK,GAAI,OAAOA,MAAM,MAAM;QAC/C,MAAM,EAAE,CAACQ,IAAI,EAAEC,CAAC,EAAE,GAAGC,MAAM,GAAGV,MAAM,MAAM;QAC1C,OAAOU;IACT;IACA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pCyB,SAAS,KAAKzB,EAAE,GAAG,GAAG,GAAGqB,MAAM,OAE/BK,YACC,KAAK1B,EAAE,GAAG,GACT,GAAGqB,MAAM,EACV,cAAcM,mBAAmB3B,IACjC,WAAWD,YAAYC,IACvB,YAAYA,AAAW,eAAXA,EAAE,IAAI,EAClB,gBAAgBA,AAAW,eAAXA,EAAE,IAAI;IAG5B,GAAG;IACL,EAAEJ;AAEN"}
@@ -0,0 +1,175 @@
1
+ import { G9KeyboardType, G9TextInputDirection } from '@g9tm/lynxcontrols-foundation';
2
+ import type { G9PopupAnimationType, G9PopupButton, G9PopupSettings, G9PopupType } from './types.js';
3
+ /** Field kinds (MAUI `G9PopupInputFieldType`). */
4
+ export declare const G9PopupInputFieldType: {
5
+ readonly Text: "text";
6
+ readonly Email: "email";
7
+ readonly Phone: "phone";
8
+ readonly Password: "password";
9
+ readonly Number: "number";
10
+ readonly TextArea: "textArea";
11
+ readonly CheckBox: "checkBox";
12
+ readonly RadioButton: "radioButton";
13
+ readonly Multiline: "multiline";
14
+ };
15
+ export type G9PopupInputFieldType = (typeof G9PopupInputFieldType)[keyof typeof G9PopupInputFieldType];
16
+ /** One choice of a check box / radio field (MAUI `G9PopupInputOption`). */
17
+ export interface G9PopupInputOption {
18
+ readonly value: string;
19
+ readonly text: string;
20
+ readonly isSelected: boolean;
21
+ }
22
+ /** MAUI `G9PopupInputOption.Create(value, text, isSelected)`: the text defaults to the value. */
23
+ export declare function popupInputOption(value: string, text?: string | null, isSelected?: boolean): G9PopupInputOption;
24
+ /** One form field (MAUI `G9PopupInputField`). Build it with {@link g9PopupInputField}. */
25
+ export interface G9PopupInputField {
26
+ readonly key: string;
27
+ readonly label: string;
28
+ readonly placeholder: string | null;
29
+ readonly initialValue: string | null;
30
+ readonly initialChecked: boolean | null;
31
+ /** Check box / radio choices. */
32
+ readonly items: ReadonlyArray<G9PopupInputOption> | null;
33
+ /** Writing direction of the value: `matchParent` (culture) for prose, LTR pinned for phone/email/password. */
34
+ readonly direction: G9TextInputDirection;
35
+ readonly fontFamily: string | null;
36
+ readonly type: G9PopupInputFieldType;
37
+ readonly isRequired: boolean;
38
+ /** Replaces "{label} is required". */
39
+ readonly requiredMessage: string | null;
40
+ readonly maxLength: number | null;
41
+ readonly isReadOnly: boolean;
42
+ /** Trim text values before validation and in the result. Default true. */
43
+ readonly trimValue: boolean;
44
+ readonly isTextPredictionEnabled: boolean;
45
+ readonly isSpellCheckEnabled: boolean;
46
+ /** Keyboard override; default from the type. */
47
+ readonly keyboard: G9KeyboardType | null;
48
+ /** Extra validation: return an error message, or `null` when valid. */
49
+ readonly validator: ((value: string) => string | null | undefined) | null;
50
+ /** Dictation microphone (text and text-area fields; never on a password). */
51
+ readonly enableVoice: boolean;
52
+ /** Text next to a single check box. */
53
+ readonly description: string | null;
54
+ }
55
+ /** Options of the field factories (MAUI optional parameters). */
56
+ export interface G9PopupInputFieldOptions {
57
+ readonly placeholder?: string | null;
58
+ readonly isRequired?: boolean;
59
+ readonly initialValue?: string | null;
60
+ readonly maxLength?: number | null;
61
+ readonly direction?: G9TextInputDirection;
62
+ readonly fontFamily?: string | null;
63
+ readonly enableVoice?: boolean;
64
+ readonly requiredMessage?: string | null;
65
+ readonly isReadOnly?: boolean;
66
+ readonly trimValue?: boolean;
67
+ readonly isTextPredictionEnabled?: boolean;
68
+ readonly isSpellCheckEnabled?: boolean;
69
+ readonly keyboard?: G9KeyboardType | null;
70
+ readonly validator?: ((value: string) => string | null | undefined) | null;
71
+ }
72
+ /**
73
+ * Field factories (MAUI `G9PopupInputField.Text/Phone/Email/…`). The culture rule: `text`, `multiline` and `textArea`
74
+ * follow the app's language (`matchParent`); `phone`, `email` and `password` are pinned left-to-right because those
75
+ * values are LTR in every language; `number` uses the number policy (LTR digits).
76
+ */
77
+ export declare const g9PopupInputField: Readonly<{
78
+ text: (key: string, label: string, o?: G9PopupInputFieldOptions) => G9PopupInputField;
79
+ phone: (key: string, label: string, o?: G9PopupInputFieldOptions) => G9PopupInputField;
80
+ email: (key: string, label: string, o?: G9PopupInputFieldOptions) => G9PopupInputField;
81
+ password: (key: string, label: string, o?: G9PopupInputFieldOptions) => G9PopupInputField;
82
+ number: (key: string, label: string, o?: G9PopupInputFieldOptions) => G9PopupInputField;
83
+ multiline: (key: string, label: string, o?: G9PopupInputFieldOptions) => G9PopupInputField;
84
+ textArea: (key: string, label: string, o?: G9PopupInputFieldOptions) => G9PopupInputField;
85
+ /** A check box per option (MAUI `CheckBox(key, label, items, …)`). */
86
+ checkBoxes: (key: string, label: string, items: ReadonlyArray<G9PopupInputOption>, o?: {
87
+ readonly isRequired?: boolean;
88
+ readonly fontFamily?: string | null;
89
+ readonly requiredMessage?: string | null;
90
+ }) => G9PopupInputField;
91
+ /** One check box (MAUI `CheckBox(key, label, isRequired, initialChecked, description)`); value `"true"` when checked. */
92
+ checkBox: (key: string, label: string, o?: {
93
+ readonly isRequired?: boolean;
94
+ readonly initialChecked?: boolean;
95
+ readonly description?: string | null;
96
+ readonly fontFamily?: string | null;
97
+ readonly requiredMessage?: string | null;
98
+ }) => G9PopupInputField;
99
+ radioButton: (key: string, label: string, items: ReadonlyArray<G9PopupInputOption>, o?: {
100
+ readonly isRequired?: boolean;
101
+ readonly initialValue?: string | null;
102
+ readonly fontFamily?: string | null;
103
+ readonly requiredMessage?: string | null;
104
+ }) => G9PopupInputField;
105
+ }>;
106
+ /** The keyboard of a field: its override, else from the type (MAUI `ResolveG9Keyboard`). */
107
+ export declare function popupFieldKeyboard(f: G9PopupInputField): G9KeyboardType;
108
+ /** The choices of a check box field: its items, or one `"true"` option labelled by placeholder/label. */
109
+ export declare function popupCheckBoxOptions(f: G9PopupInputField): ReadonlyArray<G9PopupInputOption>;
110
+ /** Options of an input popup (MAUI `G9PopupInputOptions`). */
111
+ export interface G9PopupInputOptions {
112
+ readonly fields: ReadonlyArray<G9PopupInputField>;
113
+ readonly title?: string | null;
114
+ readonly message?: string | null;
115
+ /** Default localized Save. */
116
+ readonly submitButtonText?: string | null;
117
+ /** Default localized Cancel. */
118
+ readonly cancelButtonText?: string | null;
119
+ /** Full submit button (its callback is replaced by the form's). */
120
+ readonly submitButton?: G9PopupButton | null;
121
+ readonly cancelButton?: G9PopupButton | null;
122
+ /** Default `'information'`. */
123
+ readonly type?: G9PopupType;
124
+ readonly settings?: G9PopupSettings | null;
125
+ readonly animation?: G9PopupAnimationType | null;
126
+ /** Focus the first text field when the popup opens. Default true. */
127
+ readonly focusFirstFieldOnOpen?: boolean;
128
+ }
129
+ /** MAUI `G9PopupInputOptions.Create(params fields)`. */
130
+ export declare function popupInputOptions(...fields: G9PopupInputField[]): G9PopupInputOptions;
131
+ /** What an input popup returns (MAUI `G9PopupInputResult`). */
132
+ export interface G9PopupInputResult {
133
+ readonly isSubmitted: boolean;
134
+ /** Text per key (check boxes: the selected values joined with ", "). */
135
+ readonly values: Readonly<Record<string, string>>;
136
+ /** Selected values of multi-choice fields. */
137
+ readonly arrayValues: Readonly<Record<string, ReadonlyArray<string>>> | null;
138
+ /** Message per invalid key (a submit that failed validation). */
139
+ readonly validationErrors: Readonly<Record<string, string>> | null;
140
+ /** MAUI `GetValue(key)`: case-insensitive. */
141
+ getValue(key: string): string | null;
142
+ /** MAUI `GetArrayValues(key)`: `[]` when absent. */
143
+ getArrayValues(key: string): ReadonlyArray<string>;
144
+ }
145
+ /** Builders (MAUI `G9PopupInputResult.Cancel/Submit/ValidationFailed`). */
146
+ export declare const g9PopupInputResult: Readonly<{
147
+ cancel: () => G9PopupInputResult;
148
+ submit: (values: Record<string, string>, arrayValues?: Record<string, ReadonlyArray<string>> | null) => G9PopupInputResult;
149
+ validationFailed: (values: Record<string, string>, arrayValues: Record<string, ReadonlyArray<string>> | null, errors: Record<string, string>) => G9PopupInputResult;
150
+ }>;
151
+ /** MAUI `IsEmailFormatValid`: one `@` not first, a dot after it with text on both sides. */
152
+ export declare function isPopupEmailValid(value: string): boolean;
153
+ /** The raw form state: text per key and selected values per multi-choice key. */
154
+ export interface G9PopupFormState {
155
+ readonly text: Readonly<Record<string, string>>;
156
+ readonly selected: Readonly<Record<string, ReadonlyArray<string>>>;
157
+ }
158
+ /** Initial form state from the fields (initial values, selected options, initial checks). */
159
+ export declare function initialPopupFormState(fields: ReadonlyArray<G9PopupInputField>): G9PopupFormState;
160
+ /**
161
+ * Validates a form (MAUI `ValidateInputFields` + `ValidateInputField`): text is trimmed (unless `trimValue: false`),
162
+ * required fields need text (check boxes: one selection), emails need a valid format, then the field's validator.
163
+ * Returns the values, array values, errors and the key of the first invalid field (focused by the form).
164
+ */
165
+ export declare function validatePopupForm(fields: ReadonlyArray<G9PopupInputField>, state: G9PopupFormState, messages: {
166
+ readonly requiredSuffix: string;
167
+ readonly invalidEmail: string;
168
+ }): {
169
+ valid: boolean;
170
+ values: Record<string, string>;
171
+ arrayValues: Record<string, ReadonlyArray<string>>;
172
+ errors: Record<string, string>;
173
+ firstInvalid: string | null;
174
+ };
175
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/popup/input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAKjG,kDAAkD;AAClD,eAAO,MAAM,qBAAqB;;;;;;;;;;CAUxB,CAAC;AACX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEvG,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAED,iGAAiG;AACjG,wBAAgB,gBAAgB,CAAC,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C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAC3E;IACD,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAwBA"}
@@ -0,0 +1,176 @@
1
+ import { G9KeyboardType, G9TextInputDirection } from "@g9tm/lynxcontrols-foundation";
2
+ const G9PopupInputFieldType = {
3
+ Text: 'text',
4
+ Email: 'email',
5
+ Phone: 'phone',
6
+ Password: 'password',
7
+ Number: 'number',
8
+ TextArea: 'textArea',
9
+ CheckBox: 'checkBox',
10
+ RadioButton: 'radioButton',
11
+ Multiline: 'multiline'
12
+ };
13
+ function popupInputOption(value, text, isSelected = false) {
14
+ return {
15
+ value,
16
+ text: null != text ? text : value,
17
+ isSelected
18
+ };
19
+ }
20
+ function field(type, key, label, o, direction) {
21
+ var _o_placeholder, _o_initialValue, _o_initialChecked, _o_items, _o_direction, _o_fontFamily, _o_requiredMessage, _o_maxLength, _o_keyboard, _o_validator, _o_description;
22
+ return {
23
+ key,
24
+ label,
25
+ placeholder: null != (_o_placeholder = o.placeholder) ? _o_placeholder : null,
26
+ initialValue: null != (_o_initialValue = o.initialValue) ? _o_initialValue : null,
27
+ initialChecked: null != (_o_initialChecked = o.initialChecked) ? _o_initialChecked : null,
28
+ items: null != (_o_items = o.items) ? _o_items : null,
29
+ direction: null != (_o_direction = o.direction) ? _o_direction : direction,
30
+ fontFamily: null != (_o_fontFamily = o.fontFamily) ? _o_fontFamily : null,
31
+ type,
32
+ isRequired: true === o.isRequired,
33
+ requiredMessage: null != (_o_requiredMessage = o.requiredMessage) ? _o_requiredMessage : null,
34
+ maxLength: null != (_o_maxLength = o.maxLength) ? _o_maxLength : null,
35
+ isReadOnly: true === o.isReadOnly,
36
+ trimValue: false !== o.trimValue,
37
+ isTextPredictionEnabled: false !== o.isTextPredictionEnabled,
38
+ isSpellCheckEnabled: false !== o.isSpellCheckEnabled,
39
+ keyboard: null != (_o_keyboard = o.keyboard) ? _o_keyboard : null,
40
+ validator: null != (_o_validator = o.validator) ? _o_validator : null,
41
+ enableVoice: 'password' !== type && true === o.enableVoice,
42
+ description: null != (_o_description = o.description) ? _o_description : null
43
+ };
44
+ }
45
+ const g9PopupInputField = Object.freeze({
46
+ text: (key, label, o = {})=>field('text', key, label, o, G9TextInputDirection.MatchParent),
47
+ phone: (key, label, o = {})=>field('phone', key, label, o, G9TextInputDirection.LeftToRight),
48
+ email: (key, label, o = {})=>field('email', key, label, o, G9TextInputDirection.LeftToRight),
49
+ password: (key, label, o = {})=>field('password', key, label, o, G9TextInputDirection.LeftToRight),
50
+ number: (key, label, o = {})=>field('number', key, label, o, G9TextInputDirection.LeftToRight),
51
+ multiline: (key, label, o = {})=>field('multiline', key, label, o, G9TextInputDirection.MatchParent),
52
+ textArea: (key, label, o = {})=>field('textArea', key, label, o, G9TextInputDirection.MatchParent),
53
+ checkBoxes: (key, label, items, o = {})=>field('checkBox', key, label, {
54
+ ...o,
55
+ items
56
+ }, G9TextInputDirection.MatchParent),
57
+ checkBox: (key, label, o = {})=>field('checkBox', key, label, o, G9TextInputDirection.MatchParent),
58
+ radioButton: (key, label, items, o = {})=>field('radioButton', key, label, {
59
+ ...o,
60
+ items
61
+ }, G9TextInputDirection.MatchParent)
62
+ });
63
+ function popupFieldKeyboard(f) {
64
+ if (f.keyboard) return f.keyboard;
65
+ if ('email' === f.type) return G9KeyboardType.Email;
66
+ if ('phone' === f.type) return G9KeyboardType.Phone;
67
+ if ('number' === f.type) return G9KeyboardType.Number;
68
+ if ('password' === f.type) return G9KeyboardType.Password;
69
+ return G9KeyboardType.Default;
70
+ }
71
+ function popupCheckBoxOptions(f) {
72
+ var _f_items;
73
+ var _f_description, _f_placeholder;
74
+ const items = (null != (_f_items = f.items) ? _f_items : []).filter((o)=>'' !== o.value.trim());
75
+ if (items.length > 0) return items;
76
+ const text = (null == (_f_description = f.description) ? void 0 : _f_description.trim()) ? f.description : (null == (_f_placeholder = f.placeholder) ? void 0 : _f_placeholder.trim()) ? f.placeholder : f.label;
77
+ return [
78
+ popupInputOption('true', text, true === f.initialChecked)
79
+ ];
80
+ }
81
+ function popupInputOptions(...fields) {
82
+ return {
83
+ fields
84
+ };
85
+ }
86
+ function makeResult(isSubmitted, values, arrayValues, errors) {
87
+ function find(map, key) {
88
+ if (!map) return;
89
+ if (key in map) return map[key];
90
+ const lower = key.toLowerCase();
91
+ const hit = Object.keys(map).find((k)=>k.toLowerCase() === lower);
92
+ return void 0 === hit ? void 0 : map[hit];
93
+ }
94
+ return Object.freeze({
95
+ isSubmitted,
96
+ values: Object.freeze({
97
+ ...values
98
+ }),
99
+ arrayValues: arrayValues ? Object.freeze({
100
+ ...arrayValues
101
+ }) : null,
102
+ validationErrors: errors ? Object.freeze({
103
+ ...errors
104
+ }) : null,
105
+ getValue: (key)=>{
106
+ var _find;
107
+ return null != (_find = find(values, key)) ? _find : null;
108
+ },
109
+ getArrayValues: (key)=>{
110
+ var _find;
111
+ return null != (_find = find(arrayValues, key)) ? _find : [];
112
+ }
113
+ });
114
+ }
115
+ const g9PopupInputResult = Object.freeze({
116
+ cancel: ()=>makeResult(false, {}, null, null),
117
+ submit: (values, arrayValues)=>makeResult(true, values, null != arrayValues ? arrayValues : null, null),
118
+ validationFailed: (values, arrayValues, errors)=>makeResult(false, values, arrayValues, errors)
119
+ });
120
+ function isPopupEmailValid(value) {
121
+ const at = value.indexOf('@');
122
+ if (at <= 0 || at !== value.lastIndexOf('@')) return false;
123
+ const dot = value.lastIndexOf('.');
124
+ return dot > at + 1 && dot < value.length - 1;
125
+ }
126
+ function initialPopupFormState(fields) {
127
+ const text = {};
128
+ const selected = {};
129
+ for (const f of fields){
130
+ var _f_initialValue;
131
+ if ('checkBox' === f.type) selected[f.key] = popupCheckBoxOptions(f).filter((o)=>o.isSelected).map((o)=>o.value);
132
+ else if ('radioButton' === f.type) {
133
+ var _ref, _f_initialValue1;
134
+ var _f_items_find, _f_items;
135
+ text[f.key] = null != (_ref = null != (_f_initialValue1 = f.initialValue) ? _f_initialValue1 : null == (_f_items = f.items) ? void 0 : null == (_f_items_find = _f_items.find((o)=>o.isSelected)) ? void 0 : _f_items_find.value) ? _ref : '';
136
+ } else text[f.key] = null != (_f_initialValue = f.initialValue) ? _f_initialValue : '';
137
+ }
138
+ return {
139
+ text,
140
+ selected
141
+ };
142
+ }
143
+ function validatePopupForm(fields, state, messages) {
144
+ const values = {};
145
+ const arrayValues = {};
146
+ const errors = {};
147
+ let firstInvalid = null;
148
+ for (const f of fields){
149
+ var _state_selected_f_key, _state_text_f_key, _f_requiredMessage, _ref;
150
+ var _f_validator;
151
+ const selected = 'checkBox' === f.type ? null != (_state_selected_f_key = state.selected[f.key]) ? _state_selected_f_key : [] : [];
152
+ const raw = null != (_state_text_f_key = state.text[f.key]) ? _state_text_f_key : '';
153
+ const value = 'radioButton' !== f.type && 'checkBox' !== f.type && f.trimValue ? raw.trim() : raw;
154
+ if (selected.length > 0) {
155
+ arrayValues[f.key] = selected;
156
+ values[f.key] = selected.join(', ');
157
+ } else values[f.key] = value;
158
+ const required = null != (_f_requiredMessage = f.requiredMessage) ? _f_requiredMessage : `${f.label} ${messages.requiredSuffix}`;
159
+ let error = null;
160
+ error = f.isRequired && ('checkBox' === f.type ? 0 === selected.length : '' === value.trim()) ? required : 'email' !== f.type || '' === value.trim() || isPopupEmailValid(value) ? null != (_ref = null == (_f_validator = f.validator) ? void 0 : _f_validator.call(f, value)) ? _ref : null : messages.invalidEmail;
161
+ if (error) {
162
+ errors[f.key] = error;
163
+ null != firstInvalid || (firstInvalid = f.key);
164
+ }
165
+ }
166
+ return {
167
+ valid: 0 === Object.keys(errors).length,
168
+ values,
169
+ arrayValues,
170
+ errors,
171
+ firstInvalid
172
+ };
173
+ }
174
+ export { G9PopupInputFieldType, g9PopupInputField, g9PopupInputResult, initialPopupFormState, isPopupEmailValid, popupCheckBoxOptions, popupFieldKeyboard, popupInputOption, popupInputOptions, validatePopupForm };
175
+
176
+ //# sourceMappingURL=input.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popup/input.jsx","sources":["../../src/popup/input.ts"],"sourcesContent":["import { G9KeyboardType, G9TextInputDirection } from '@g9tm/lynxcontrols-foundation';\nimport type { G9PopupAnimationType, G9PopupButton, G9PopupSettings, G9PopupType } from './types';\n\n// Input popup data (MAUI `G9PopupInputField`, `G9PopupInputFieldType`, `G9PopupInputOption`, `G9PopupInputOptions`,\n// `G9PopupInputResult`) and its validation (MAUI `ValidateInputFields`).\n\n/** Field kinds (MAUI `G9PopupInputFieldType`). */\nexport const G9PopupInputFieldType = {\n Text: 'text',\n Email: 'email',\n Phone: 'phone',\n Password: 'password',\n Number: 'number',\n TextArea: 'textArea',\n CheckBox: 'checkBox',\n RadioButton: 'radioButton',\n Multiline: 'multiline',\n} as const;\nexport type G9PopupInputFieldType = (typeof G9PopupInputFieldType)[keyof typeof G9PopupInputFieldType];\n\n/** One choice of a check box / radio field (MAUI `G9PopupInputOption`). */\nexport interface G9PopupInputOption {\n readonly value: string;\n readonly text: string;\n readonly isSelected: boolean;\n}\n\n/** MAUI `G9PopupInputOption.Create(value, text, isSelected)`: the text defaults to the value. */\nexport function popupInputOption(value: string, text?: string | null, isSelected = false): G9PopupInputOption {\n return { value, text: text ?? value, isSelected };\n}\n\n/** One form field (MAUI `G9PopupInputField`). Build it with {@link g9PopupInputField}. */\nexport interface G9PopupInputField {\n readonly key: string;\n readonly label: string;\n readonly placeholder: string | null;\n readonly initialValue: string | null;\n readonly initialChecked: boolean | null;\n /** Check box / radio choices. */\n readonly items: ReadonlyArray<G9PopupInputOption> | null;\n /** Writing direction of the value: `matchParent` (culture) for prose, LTR pinned for phone/email/password. */\n readonly direction: G9TextInputDirection;\n readonly fontFamily: string | null;\n readonly type: G9PopupInputFieldType;\n readonly isRequired: boolean;\n /** Replaces \"{label} is required\". */\n readonly requiredMessage: string | null;\n readonly maxLength: number | null;\n readonly isReadOnly: boolean;\n /** Trim text values before validation and in the result. Default true. */\n readonly trimValue: boolean;\n readonly isTextPredictionEnabled: boolean;\n readonly isSpellCheckEnabled: boolean;\n /** Keyboard override; default from the type. */\n readonly keyboard: G9KeyboardType | null;\n /** Extra validation: return an error message, or `null` when valid. */\n readonly validator: ((value: string) => string | null | undefined) | null;\n /** Dictation microphone (text and text-area fields; never on a password). */\n readonly enableVoice: boolean;\n /** Text next to a single check box. */\n readonly description: string | null;\n}\n\n/** Options of the field factories (MAUI optional parameters). */\nexport interface G9PopupInputFieldOptions {\n readonly placeholder?: string | null;\n readonly isRequired?: boolean;\n readonly initialValue?: string | null;\n readonly maxLength?: number | null;\n readonly direction?: G9TextInputDirection;\n readonly fontFamily?: string | null;\n readonly enableVoice?: boolean;\n readonly requiredMessage?: string | null;\n readonly isReadOnly?: boolean;\n readonly trimValue?: boolean;\n readonly isTextPredictionEnabled?: boolean;\n readonly isSpellCheckEnabled?: boolean;\n readonly keyboard?: G9KeyboardType | null;\n readonly validator?: ((value: string) => string | null | undefined) | null;\n}\n\nfunction field(\n type: G9PopupInputFieldType,\n key: string,\n label: string,\n o: G9PopupInputFieldOptions & {\n readonly items?: ReadonlyArray<G9PopupInputOption> | null;\n readonly initialChecked?: boolean | null;\n readonly description?: string | null;\n },\n direction: G9TextInputDirection,\n): G9PopupInputField {\n return {\n key,\n label,\n placeholder: o.placeholder ?? null,\n initialValue: o.initialValue ?? null,\n initialChecked: o.initialChecked ?? null,\n items: o.items ?? null,\n direction: o.direction ?? direction,\n fontFamily: o.fontFamily ?? null,\n type,\n isRequired: o.isRequired === true,\n requiredMessage: o.requiredMessage ?? null,\n maxLength: o.maxLength ?? null,\n isReadOnly: o.isReadOnly === true,\n trimValue: o.trimValue !== false,\n isTextPredictionEnabled: o.isTextPredictionEnabled !== false,\n isSpellCheckEnabled: o.isSpellCheckEnabled !== false,\n keyboard: o.keyboard ?? null,\n validator: o.validator ?? null,\n enableVoice: type !== 'password' && o.enableVoice === true,\n description: o.description ?? null,\n };\n}\n\n/**\n * Field factories (MAUI `G9PopupInputField.Text/Phone/Email/…`). The culture rule: `text`, `multiline` and `textArea`\n * follow the app's language (`matchParent`); `phone`, `email` and `password` are pinned left-to-right because those\n * values are LTR in every language; `number` uses the number policy (LTR digits).\n */\nexport const g9PopupInputField = Object.freeze({\n text: (key: string, label: string, o: G9PopupInputFieldOptions = {}) =>\n field('text', key, label, o, G9TextInputDirection.MatchParent),\n phone: (key: string, label: string, o: G9PopupInputFieldOptions = {}) =>\n field('phone', key, label, o, G9TextInputDirection.LeftToRight),\n email: (key: string, label: string, o: G9PopupInputFieldOptions = {}) =>\n field('email', key, label, o, G9TextInputDirection.LeftToRight),\n password: (key: string, label: string, o: G9PopupInputFieldOptions = {}) =>\n field('password', key, label, o, G9TextInputDirection.LeftToRight),\n number: (key: string, label: string, o: G9PopupInputFieldOptions = {}) =>\n field('number', key, label, o, G9TextInputDirection.LeftToRight),\n multiline: (key: string, label: string, o: G9PopupInputFieldOptions = {}) =>\n field('multiline', key, label, o, G9TextInputDirection.MatchParent),\n textArea: (key: string, label: string, o: G9PopupInputFieldOptions = {}) =>\n field('textArea', key, label, o, G9TextInputDirection.MatchParent),\n /** A check box per option (MAUI `CheckBox(key, label, items, …)`). */\n checkBoxes: (\n key: string,\n label: string,\n items: ReadonlyArray<G9PopupInputOption>,\n o: {\n readonly isRequired?: boolean;\n readonly fontFamily?: string | null;\n readonly requiredMessage?: string | null;\n } = {},\n ) => field('checkBox', key, label, { ...o, items }, G9TextInputDirection.MatchParent),\n /** One check box (MAUI `CheckBox(key, label, isRequired, initialChecked, description)`); value `\"true\"` when checked. */\n checkBox: (\n key: string,\n label: string,\n o: {\n readonly isRequired?: boolean;\n readonly initialChecked?: boolean;\n readonly description?: string | null;\n readonly fontFamily?: string | null;\n readonly requiredMessage?: string | null;\n } = {},\n ) => field('checkBox', key, label, o, G9TextInputDirection.MatchParent),\n radioButton: (\n key: string,\n label: string,\n items: ReadonlyArray<G9PopupInputOption>,\n o: {\n readonly isRequired?: boolean;\n readonly initialValue?: string | null;\n readonly fontFamily?: string | null;\n readonly requiredMessage?: string | null;\n } = {},\n ) => field('radioButton', key, label, { ...o, items }, G9TextInputDirection.MatchParent),\n});\n\n/** The keyboard of a field: its override, else from the type (MAUI `ResolveG9Keyboard`). */\nexport function popupFieldKeyboard(f: G9PopupInputField): G9KeyboardType {\n if (f.keyboard) return f.keyboard;\n if (f.type === 'email') return G9KeyboardType.Email;\n if (f.type === 'phone') return G9KeyboardType.Phone;\n if (f.type === 'number') return G9KeyboardType.Number;\n if (f.type === 'password') return G9KeyboardType.Password;\n return G9KeyboardType.Default;\n}\n\n/** The choices of a check box field: its items, or one `\"true\"` option labelled by placeholder/label. */\nexport function popupCheckBoxOptions(f: G9PopupInputField): ReadonlyArray<G9PopupInputOption> {\n const items = (f.items ?? []).filter((o) => o.value.trim() !== '');\n if (items.length > 0) return items;\n const text = f.description?.trim() ? f.description : f.placeholder?.trim() ? f.placeholder : f.label;\n return [popupInputOption('true', text, f.initialChecked === true)];\n}\n\n/** Options of an input popup (MAUI `G9PopupInputOptions`). */\nexport interface G9PopupInputOptions {\n readonly fields: ReadonlyArray<G9PopupInputField>;\n readonly title?: string | null;\n readonly message?: string | null;\n /** Default localized Save. */\n readonly submitButtonText?: string | null;\n /** Default localized Cancel. */\n readonly cancelButtonText?: string | null;\n /** Full submit button (its callback is replaced by the form's). */\n readonly submitButton?: G9PopupButton | null;\n readonly cancelButton?: G9PopupButton | null;\n /** Default `'information'`. */\n readonly type?: G9PopupType;\n readonly settings?: G9PopupSettings | null;\n readonly animation?: G9PopupAnimationType | null;\n /** Focus the first text field when the popup opens. Default true. */\n readonly focusFirstFieldOnOpen?: boolean;\n}\n\n/** MAUI `G9PopupInputOptions.Create(params fields)`. */\nexport function popupInputOptions(...fields: G9PopupInputField[]): G9PopupInputOptions {\n return { fields };\n}\n\n/** What an input popup returns (MAUI `G9PopupInputResult`). */\nexport interface G9PopupInputResult {\n readonly isSubmitted: boolean;\n /** Text per key (check boxes: the selected values joined with \", \"). */\n readonly values: Readonly<Record<string, string>>;\n /** Selected values of multi-choice fields. */\n readonly arrayValues: Readonly<Record<string, ReadonlyArray<string>>> | null;\n /** Message per invalid key (a submit that failed validation). */\n readonly validationErrors: Readonly<Record<string, string>> | null;\n /** MAUI `GetValue(key)`: case-insensitive. */\n getValue(key: string): string | null;\n /** MAUI `GetArrayValues(key)`: `[]` when absent. */\n getArrayValues(key: string): ReadonlyArray<string>;\n}\n\nfunction makeResult(\n isSubmitted: boolean,\n values: Record<string, string>,\n arrayValues: Record<string, ReadonlyArray<string>> | null,\n errors: Record<string, string> | null,\n): G9PopupInputResult {\n function find<T>(map: Record<string, T> | null, key: string): T | undefined {\n if (!map) return undefined;\n if (key in map) return map[key];\n const lower = key.toLowerCase();\n const hit = Object.keys(map).find((k) => k.toLowerCase() === lower);\n return hit === undefined ? undefined : map[hit];\n }\n return Object.freeze({\n isSubmitted,\n values: Object.freeze({ ...values }),\n arrayValues: arrayValues ? Object.freeze({ ...arrayValues }) : null,\n validationErrors: errors ? Object.freeze({ ...errors }) : null,\n getValue: (key: string) => find(values, key) ?? null,\n getArrayValues: (key: string) => find(arrayValues, key) ?? [],\n });\n}\n\n/** Builders (MAUI `G9PopupInputResult.Cancel/Submit/ValidationFailed`). */\nexport const g9PopupInputResult = Object.freeze({\n cancel: (): G9PopupInputResult => makeResult(false, {}, null, null),\n submit: (values: Record<string, string>, arrayValues?: Record<string, ReadonlyArray<string>> | null) =>\n makeResult(true, values, arrayValues ?? null, null),\n validationFailed: (\n values: Record<string, string>,\n arrayValues: Record<string, ReadonlyArray<string>> | null,\n errors: Record<string, string>,\n ) => makeResult(false, values, arrayValues, errors),\n});\n\n/** MAUI `IsEmailFormatValid`: one `@` not first, a dot after it with text on both sides. */\nexport function isPopupEmailValid(value: string): boolean {\n const at = value.indexOf('@');\n if (at <= 0 || at !== value.lastIndexOf('@')) return false;\n const dot = value.lastIndexOf('.');\n return dot > at + 1 && dot < value.length - 1;\n}\n\n/** The raw form state: text per key and selected values per multi-choice key. */\nexport interface G9PopupFormState {\n readonly text: Readonly<Record<string, string>>;\n readonly selected: Readonly<Record<string, ReadonlyArray<string>>>;\n}\n\n/** Initial form state from the fields (initial values, selected options, initial checks). */\nexport function initialPopupFormState(fields: ReadonlyArray<G9PopupInputField>): G9PopupFormState {\n const text: Record<string, string> = {};\n const selected: Record<string, ReadonlyArray<string>> = {};\n for (const f of fields) {\n if (f.type === 'checkBox')\n selected[f.key] = popupCheckBoxOptions(f)\n .filter((o) => o.isSelected)\n .map((o) => o.value);\n else if (f.type === 'radioButton') {\n text[f.key] = f.initialValue ?? f.items?.find((o) => o.isSelected)?.value ?? '';\n } else text[f.key] = f.initialValue ?? '';\n }\n return { text, selected };\n}\n\n/**\n * Validates a form (MAUI `ValidateInputFields` + `ValidateInputField`): text is trimmed (unless `trimValue: false`),\n * required fields need text (check boxes: one selection), emails need a valid format, then the field's validator.\n * Returns the values, array values, errors and the key of the first invalid field (focused by the form).\n */\nexport function validatePopupForm(\n fields: ReadonlyArray<G9PopupInputField>,\n state: G9PopupFormState,\n messages: { readonly requiredSuffix: string; readonly invalidEmail: string },\n): {\n valid: boolean;\n values: Record<string, string>;\n arrayValues: Record<string, ReadonlyArray<string>>;\n errors: Record<string, string>;\n firstInvalid: string | null;\n} {\n const values: Record<string, string> = {};\n const arrayValues: Record<string, ReadonlyArray<string>> = {};\n const errors: Record<string, string> = {};\n let firstInvalid: string | null = null;\n for (const f of fields) {\n const selected = f.type === 'checkBox' ? (state.selected[f.key] ?? []) : [];\n const raw = state.text[f.key] ?? '';\n const value = f.type === 'radioButton' || f.type === 'checkBox' || !f.trimValue ? raw : raw.trim();\n if (selected.length > 0) {\n arrayValues[f.key] = selected;\n values[f.key] = selected.join(', ');\n } else values[f.key] = value;\n const required = f.requiredMessage ?? `${f.label} ${messages.requiredSuffix}`;\n let error: string | null = null;\n if (f.isRequired && (f.type === 'checkBox' ? selected.length === 0 : value.trim() === '')) error = required;\n else if (f.type === 'email' && value.trim() !== '' && !isPopupEmailValid(value)) error = messages.invalidEmail;\n else error = f.validator?.(value) ?? null;\n if (error) {\n errors[f.key] = error;\n firstInvalid ??= f.key;\n }\n }\n return { valid: Object.keys(errors).length === 0, values, arrayValues, errors, firstInvalid };\n}\n"],"names":["G9PopupInputFieldType","popupInputOption","value","text","isSelected","field","type","key","label","o","direction","_o_placeholder","_o_initialValue","_o_initialChecked","_o_items","_o_direction","_o_fontFamily","_o_requiredMessage","_o_maxLength","_o_keyboard","_o_validator","_o_description","g9PopupInputField","Object","G9TextInputDirection","items","popupFieldKeyboard","f","G9KeyboardType","popupCheckBoxOptions","_f_items","_f_description","_f_placeholder","popupInputOptions","fields","makeResult","isSubmitted","values","arrayValues","errors","find","map","lower","hit","k","undefined","_find","g9PopupInputResult","isPopupEmailValid","at","dot","initialPopupFormState","selected","_f_initialValue","_ref","_f_items_find","validatePopupForm","state","messages","firstInvalid","_state_selected_f_key","_state_text_f_key","_f_requiredMessage","raw","required","error"],"mappings":";AAOO,MAAMA,wBAAwB;IACnC,MAAM;IACN,OAAO;IACP,OAAO;IACP,UAAU;IACV,QAAQ;IACR,UAAU;IACV,UAAU;IACV,aAAa;IACb,WAAW;AACb;AAWO,SAASC,iBAAiBC,KAAa,EAAEC,IAAoB,EAAEC,aAAa,KAAK;IACtF,OAAO;QAAEF;QAAO,MAAMC,QAAAA,OAAAA,OAAQD;QAAOE;IAAW;AAClD;AAoDA,SAASC,MACPC,IAA2B,EAC3BC,GAAW,EACXC,KAAa,EACbC,CAIC,EACDC,SAA+B;QAKhBC,gBACCC,iBACEC,mBACTC,UACIC,cACCC,eAGKC,oBACNC,cAKDC,aACCC,cAEEC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IAAI,KAAdA;QAClF,IAAIX,SAAS,MAAM,GAAG,GAAG;YACvBd,WAAW,CAACX,EAAE,GAAG,CAAC,GAAGyB;YACrBf,MAAM,CAACV,EAAE,GAAG,CAAC,GAAGyB,SAAS,IAAI,CAAC;QAChC,OAAOf,MAAM,CAACV,EAAE,GAAG,CAAC,GAAGzB;QACvB,MAAM8D,WAAW,QAAAF,CAAAA,qBAAAA,EAAE,eAAe,AAAD,IAAhBA,qBAAqB,GAAGnC,EAAE,KAAK,CAAC,CAAC,EAAE+B,SAAS,cAAc,EAAE;QAC7E,IAAIO,QAAuB;QACgEA,QAAvFtC,EAAE,UAAU,IAAKA,CAAAA,AAAW,eAAXA,EAAE,IAAI,GAAkByB,AAAoB,MAApBA,SAAS,MAAM,GAASlD,AAAiB,OAAjBA,MAAM,IAAI,EAAQ,IAAY8D,WAC1FrC,AAAW,YAAXA,EAAE,IAAI,IAAgBzB,AAAiB,OAAjBA,MAAM,IAAI,MAAc8C,kBAAkB9C,SAC5D,QAAR+D,CAAAA,OAAAA,QAAQtC,CAAAA,eAAAA,EAAE,SAAS,AAAD,IAAVA,KAAAA,IAAAA,aAAAA,IAAAA,CAAAA,GAAczB,MAAK,IAALA,OAAU,OADoDwD,SAAS,YAAY;QAE9G,IAAIO,OAAO;YACT1B,MAAM,CAACZ,EAAE,GAAG,CAAC,GAAGsC;YAChBN,QAAAA,gBAAAA,CAAAA,eAAiBhC,EAAE,GAAG,AAAD;QACvB;IACF;IACA,OAAO;QAAE,OAAOJ,AAA+B,MAA/BA,OAAO,IAAI,CAACgB,QAAQ,MAAM;QAAQF;QAAQC;QAAaC;QAAQoB;IAAa;AAC9F"}
@@ -0,0 +1,25 @@
1
+ import './popup.css';
2
+ import { type ReactNode } from '@lynx-js/react';
3
+ import { type G9PopupViewOpenOptions } from './frame.js';
4
+ /** Props of {@link G9PopupView}. */
5
+ export interface G9PopupViewProps {
6
+ /** Shown (MAUI `Open` / `CloseAsync` / `IsOpen`). */
7
+ readonly open: boolean;
8
+ /** Asks to close: background tap (with `closeOnBackgroundTap`), hardware back (with `closeOnBackButton`), auto-close. */
9
+ readonly onOpenChange?: (open: boolean) => void;
10
+ readonly options?: G9PopupViewOpenOptions;
11
+ /** The scrim was tapped (MAUI `BackgroundTapped`), whether or not it closes the popup. */
12
+ readonly onBackgroundTap?: () => void;
13
+ /** After the close motion (MAUI `Closed`). */
14
+ readonly onClosed?: () => void;
15
+ /** The card content (MAUI `Content` / `SetContent`). */
16
+ readonly children?: ReactNode;
17
+ }
18
+ /**
19
+ * A popup card you place yourself (MAUI `G9PopupView` hosted in your own layout): the same scrim, card, motions,
20
+ * placement and drag as the queued popups, but outside the queue: for floating tools (non-modal `overlayMode:
21
+ * 'none'` + `isDraggable` + a `G9PopupDragHandle` header) or a second popup next to the queued one. It fills its
22
+ * parent; put it in a full-size container (or a host layer).
23
+ */
24
+ export declare function G9PopupView(props: G9PopupViewProps): ReactNode;
25
+ //# sourceMappingURL=popup-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popup-view.d.ts","sourceRoot":"","sources":["../../src/popup/popup-view.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,gBAAgB,CAAC;AAI7E,OAAO,EAAE,KAAK,sBAAsB,EAAc,MAAM,SAAS,CAAC;AAElE,oCAAoC;AACpC,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,yHAAyH;IACzH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,QAAQ,CAAC,OAAO,CAAC,EAAE,sBAAsB,CAAC;IAC1C,0FAA0F;IAC1F,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC,8CAA8C;IAC9C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,wDAAwD;IACxD,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,CAqD9D"}