optikos 0.1.0 → 0.2.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 (386) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/README.md +13 -11
  3. package/dist/chunk-23XLG2EM.js +2 -0
  4. package/dist/{chunk-666O2GKD.js.map → chunk-23XLG2EM.js.map} +1 -1
  5. package/dist/chunk-27UZFEXD.js +2 -0
  6. package/dist/chunk-27UZFEXD.js.map +7 -0
  7. package/dist/chunk-2ZRNGG2N.js +2 -0
  8. package/dist/chunk-2ZRNGG2N.js.map +7 -0
  9. package/dist/chunk-2ZUZ5HDL.js +2 -0
  10. package/dist/chunk-2ZUZ5HDL.js.map +7 -0
  11. package/dist/chunk-3DBEZGOY.js +2 -0
  12. package/dist/chunk-3DBEZGOY.js.map +7 -0
  13. package/dist/chunk-3S24ZRPK.js +2 -0
  14. package/dist/chunk-3S24ZRPK.js.map +7 -0
  15. package/dist/chunk-3TAW4AKH.js +2 -0
  16. package/dist/chunk-3TAW4AKH.js.map +7 -0
  17. package/dist/chunk-4EZJ5FKJ.js +2 -0
  18. package/dist/{chunk-IHAYOSBR.js.map → chunk-4EZJ5FKJ.js.map} +1 -1
  19. package/dist/chunk-4LZZ244E.js +2 -0
  20. package/dist/chunk-4LZZ244E.js.map +7 -0
  21. package/dist/chunk-4SYIIX5A.js +2 -0
  22. package/dist/chunk-4SYIIX5A.js.map +7 -0
  23. package/dist/chunk-5BC72727.js +2 -0
  24. package/dist/chunk-5BC72727.js.map +7 -0
  25. package/dist/chunk-5DJTP53N.js +2 -0
  26. package/dist/{chunk-ODWPBBVL.js.map → chunk-5DJTP53N.js.map} +1 -1
  27. package/dist/{chunk-NWTTHDIM.js → chunk-5JEXM5S7.js} +2 -2
  28. package/dist/chunk-5Q76ACVI.js +2 -0
  29. package/dist/{chunk-O4DCHALR.js.map → chunk-5Q76ACVI.js.map} +1 -1
  30. package/dist/chunk-5QUY72FX.js +2 -0
  31. package/dist/chunk-5QUY72FX.js.map +7 -0
  32. package/dist/chunk-5YS7OD5E.js +2 -0
  33. package/dist/{chunk-GZNQPENR.js.map → chunk-5YS7OD5E.js.map} +1 -1
  34. package/dist/{chunk-NV5AIBQP.js → chunk-6VBK2I5B.js} +2 -2
  35. package/dist/{chunk-ZYUXCZX7.js → chunk-7KMIFXHZ.js} +2 -2
  36. package/dist/{chunk-IYPKPLCU.js → chunk-A2NKDOYN.js} +2 -2
  37. package/dist/chunk-A2NKDOYN.js.map +7 -0
  38. package/dist/chunk-ATFJ7PNA.js +2 -0
  39. package/dist/chunk-ATFJ7PNA.js.map +7 -0
  40. package/dist/chunk-BXYWVRKJ.js +2 -0
  41. package/dist/chunk-BXYWVRKJ.js.map +7 -0
  42. package/dist/chunk-CKXS375P.js +2 -0
  43. package/dist/chunk-CKXS375P.js.map +7 -0
  44. package/dist/chunk-CUN5QO4T.js +2 -0
  45. package/dist/{chunk-4DHQKECB.js.map → chunk-CUN5QO4T.js.map} +1 -1
  46. package/dist/chunk-DBMWS3O5.js +2 -0
  47. package/dist/chunk-DBMWS3O5.js.map +7 -0
  48. package/dist/chunk-E4VNLYO2.js +2 -0
  49. package/dist/chunk-E4VNLYO2.js.map +7 -0
  50. package/dist/chunk-EDUMAMK4.js +2 -0
  51. package/dist/chunk-EDUMAMK4.js.map +7 -0
  52. package/dist/chunk-ELYARUCN.js +2 -0
  53. package/dist/{chunk-Z25NC4CS.js → chunk-EV73ADN2.js} +2 -2
  54. package/dist/{chunk-LV6HXFHU.js → chunk-FEHGU6EP.js} +3 -3
  55. package/dist/chunk-FEHGU6EP.js.map +7 -0
  56. package/dist/chunk-FHM5NUS4.js +3 -0
  57. package/dist/chunk-FHM5NUS4.js.map +7 -0
  58. package/dist/chunk-G2DAD3MQ.js +2 -0
  59. package/dist/chunk-G2DAD3MQ.js.map +7 -0
  60. package/dist/chunk-G2KUK6AT.js +2 -0
  61. package/dist/chunk-GBPLNXMP.js +2 -0
  62. package/dist/chunk-GBPLNXMP.js.map +7 -0
  63. package/dist/{chunk-LBCWEWPN.js → chunk-GNU4VOOE.js} +2 -2
  64. package/dist/{chunk-IW7PK4VS.js → chunk-GZ7X34QP.js} +2 -2
  65. package/dist/chunk-HOF4JGMQ.js +2 -0
  66. package/dist/chunk-HOF4JGMQ.js.map +7 -0
  67. package/dist/chunk-HXDTGP2K.js +2 -0
  68. package/dist/chunk-HXDTGP2K.js.map +7 -0
  69. package/dist/{chunk-QEQIJAAB.js → chunk-I4SP6JTU.js} +2 -2
  70. package/dist/chunk-IHE2MQ3W.js +2 -0
  71. package/dist/{chunk-OW2ZSMGS.js.map → chunk-IHE2MQ3W.js.map} +1 -1
  72. package/dist/chunk-II6ITOA6.js +2 -0
  73. package/dist/chunk-II6ITOA6.js.map +7 -0
  74. package/dist/chunk-JBLRAM7Z.js +2 -0
  75. package/dist/{chunk-JZNEB7A7.js.map → chunk-JBLRAM7Z.js.map} +1 -1
  76. package/dist/{chunk-4SUKNSCY.js → chunk-JI265XFO.js} +2 -2
  77. package/dist/chunk-JK74QK3M.js +2 -0
  78. package/dist/chunk-JK74QK3M.js.map +7 -0
  79. package/dist/chunk-JOFQJGZK.js +2 -0
  80. package/dist/chunk-JOFQJGZK.js.map +7 -0
  81. package/dist/chunk-KCEUD232.js +2 -0
  82. package/dist/chunk-KCEUD232.js.map +7 -0
  83. package/dist/chunk-KLLAY2IM.js +2 -0
  84. package/dist/chunk-KLLAY2IM.js.map +7 -0
  85. package/dist/chunk-LBJSMXLV.js +2 -0
  86. package/dist/chunk-LBJSMXLV.js.map +7 -0
  87. package/dist/chunk-LQRFNQ2N.js +2 -0
  88. package/dist/chunk-LQRFNQ2N.js.map +7 -0
  89. package/dist/{chunk-NDBFYIL6.js → chunk-LW2WRUVL.js} +2 -2
  90. package/dist/{chunk-NDBFYIL6.js.map → chunk-LW2WRUVL.js.map} +2 -2
  91. package/dist/chunk-M242VYZA.js +2 -0
  92. package/dist/{chunk-XVIC24AW.js.map → chunk-M242VYZA.js.map} +1 -1
  93. package/dist/chunk-MB3MU6HR.js +2 -0
  94. package/dist/chunk-MB3MU6HR.js.map +7 -0
  95. package/dist/chunk-MW3RWBZ7.js +2 -0
  96. package/dist/chunk-MW3RWBZ7.js.map +7 -0
  97. package/dist/chunk-NXSTUFS7.js +2 -0
  98. package/dist/chunk-NXSTUFS7.js.map +7 -0
  99. package/dist/chunk-OEAXCCVM.js +2 -0
  100. package/dist/chunk-OEAXCCVM.js.map +7 -0
  101. package/dist/chunk-OGRFQTXA.js +2 -0
  102. package/dist/chunk-OGRFQTXA.js.map +7 -0
  103. package/dist/chunk-REW4LR46.js +2 -0
  104. package/dist/chunk-REW4LR46.js.map +7 -0
  105. package/dist/chunk-RNN55473.js +2 -0
  106. package/dist/chunk-RNN55473.js.map +7 -0
  107. package/dist/{chunk-6NJW7QFD.js → chunk-SA53QUBF.js} +2 -2
  108. package/dist/chunk-TIPK3SCJ.js +2 -0
  109. package/dist/chunk-TIPK3SCJ.js.map +7 -0
  110. package/dist/{chunk-TBLICXWW.js → chunk-TOLTUOZS.js} +2 -2
  111. package/dist/{chunk-DXO3UJKL.js → chunk-TZOQWCVH.js} +2 -2
  112. package/dist/chunk-VF7BGP6L.js +2 -0
  113. package/dist/chunk-VF7BGP6L.js.map +7 -0
  114. package/dist/chunk-VU3GIDZ3.js +2 -0
  115. package/dist/chunk-VU3GIDZ3.js.map +7 -0
  116. package/dist/{chunk-SNTHW4K2.js → chunk-W3H7GTJY.js} +2 -2
  117. package/dist/{chunk-ZHVSHDLH.js → chunk-XHOBNSBO.js} +2 -2
  118. package/dist/chunk-XX2MVWFS.js +4 -0
  119. package/dist/chunk-XX2MVWFS.js.map +7 -0
  120. package/dist/chunk-XYZ6VZ5T.js +2 -0
  121. package/dist/chunk-XYZ6VZ5T.js.map +7 -0
  122. package/dist/chunk-YBAYEU25.js +2 -0
  123. package/dist/chunk-YBAYEU25.js.map +7 -0
  124. package/dist/chunk-YHEMA56R.js +2 -0
  125. package/dist/{chunk-5GNEFX6F.js.map → chunk-YHEMA56R.js.map} +1 -1
  126. package/dist/chunk-Z2JBUHKA.js +2 -0
  127. package/dist/chunk-Z2JBUHKA.js.map +7 -0
  128. package/dist/{chunk-6O2BXCRN.js → chunk-Z2Z52GFT.js} +2 -2
  129. package/dist/chunk-ZPPELYNJ.js +2 -0
  130. package/dist/chunk-ZPPELYNJ.js.map +7 -0
  131. package/dist/chunk-ZVK4L5GK.js +2 -0
  132. package/dist/chunk-ZVK4L5GK.js.map +7 -0
  133. package/dist/chunk-ZWNQREWS.js +2 -0
  134. package/dist/chunk-ZWNQREWS.js.map +7 -0
  135. package/dist/components/badge.js +2 -0
  136. package/dist/components/badge.js.map +7 -0
  137. package/dist/components/breadcrumb.js +1 -1
  138. package/dist/components/button.js +1 -1
  139. package/dist/components/calendar.js +1 -1
  140. package/dist/components/cellediting.js +2 -0
  141. package/dist/components/cellediting.js.map +7 -0
  142. package/dist/components/chat.js +1 -1
  143. package/dist/components/checkbox.js +1 -1
  144. package/dist/components/checkboxgroup.js +2 -0
  145. package/dist/components/checkboxgroup.js.map +7 -0
  146. package/dist/components/chip.js +2 -0
  147. package/dist/components/chip.js.map +7 -0
  148. package/dist/components/codeviewer.js +2 -0
  149. package/dist/components/codeviewer.js.map +7 -0
  150. package/dist/components/combobox.js +1 -1
  151. package/dist/components/commandpalette.js +1 -1
  152. package/dist/components/container.js +1 -1
  153. package/dist/components/dataview.js +1 -1
  154. package/dist/components/datefield.js +1 -1
  155. package/dist/components/daterangefield.js +1 -1
  156. package/dist/components/dial.js +2 -0
  157. package/dist/components/dial.js.map +7 -0
  158. package/dist/components/dropdown.js +1 -1
  159. package/dist/components/fieldgroup.js +2 -0
  160. package/dist/components/fieldgroup.js.map +7 -0
  161. package/dist/components/fieldlist.js +2 -0
  162. package/dist/components/fieldlist.js.map +7 -0
  163. package/dist/components/fieldset.js +1 -1
  164. package/dist/components/filterbuilder.js +1 -1
  165. package/dist/components/form.js +1 -1
  166. package/dist/components/formactions.js +2 -0
  167. package/dist/components/formactions.js.map +7 -0
  168. package/dist/components/formerrors.js +2 -0
  169. package/dist/components/formerrors.js.map +7 -0
  170. package/dist/components/formsection.js +2 -0
  171. package/dist/components/formsection.js.map +7 -0
  172. package/dist/components/grid.js +1 -1
  173. package/dist/components/icon.js +1 -1
  174. package/dist/components/inputgroup.js +2 -0
  175. package/dist/components/inputgroup.js.map +7 -0
  176. package/dist/components/label.js +1 -1
  177. package/dist/components/listbox.js +1 -1
  178. package/dist/components/lookupfield.js +1 -1
  179. package/dist/components/menu.js +1 -1
  180. package/dist/components/messagebox.js +1 -1
  181. package/dist/components/navmenu.js +1 -1
  182. package/dist/components/numberfield.js +1 -1
  183. package/dist/components/pagination.js +1 -1
  184. package/dist/components/panel.js +1 -1
  185. package/dist/components/pickerfield.js +1 -1
  186. package/dist/components/radiogroup.js +1 -1
  187. package/dist/components/searchgrid.js +1 -1
  188. package/dist/components/secretfield.js +1 -1
  189. package/dist/components/select.js +1 -1
  190. package/dist/components/slider.js +1 -1
  191. package/dist/components/spacer.js +1 -1
  192. package/dist/components/spinner.js +1 -1
  193. package/dist/components/stepform.js +1 -1
  194. package/dist/components/stepper.js +1 -1
  195. package/dist/components/suggestfield.js +1 -1
  196. package/dist/components/table.js +1 -1
  197. package/dist/components/tabs.js +1 -1
  198. package/dist/components/textarea.js +1 -1
  199. package/dist/components/textfield.js +1 -1
  200. package/dist/components/toast.js +1 -1
  201. package/dist/components/toggle.js +2 -0
  202. package/dist/components/toggle.js.map +7 -0
  203. package/dist/components/toolbar.js +1 -1
  204. package/dist/components/tooltip.js +1 -1
  205. package/dist/components/tree.js +2 -0
  206. package/dist/components/tree.js.map +7 -0
  207. package/dist/components/viewmanager.js +1 -1
  208. package/dist/components/viewport.js +1 -1
  209. package/dist/components/widget.js +1 -1
  210. package/dist/components/window.js +1 -1
  211. package/dist/core.js +1 -1
  212. package/dist/css/badge.css +39 -0
  213. package/dist/css/base.css +71 -51
  214. package/dist/css/button.css +2 -0
  215. package/dist/css/cellediting.css +33 -0
  216. package/dist/css/chat.css +0 -1
  217. package/dist/css/checkboxgroup.css +12 -0
  218. package/dist/css/chip.css +64 -0
  219. package/dist/css/codeviewer.css +109 -0
  220. package/dist/css/dial.css +203 -0
  221. package/dist/css/fieldgroup.css +26 -0
  222. package/dist/css/fieldlist.css +84 -0
  223. package/dist/css/fieldset.css +36 -0
  224. package/dist/css/formactions.css +40 -0
  225. package/dist/css/formerrors.css +39 -0
  226. package/dist/css/formsection.css +45 -0
  227. package/dist/css/grid.css +14 -3
  228. package/dist/css/inputgroup.css +58 -0
  229. package/dist/css/menu.css +45 -0
  230. package/dist/css/panel.css +8 -1
  231. package/dist/css/stepper.css +7 -2
  232. package/dist/css/tabs.css +12 -3
  233. package/dist/css/toggle.css +39 -0
  234. package/dist/css/tree.css +94 -0
  235. package/dist/css/widget.css +58 -0
  236. package/dist/css/window.css +4 -0
  237. package/dist/data.js +1 -1
  238. package/dist/index.js +3 -3
  239. package/dist/index.js.map +3 -3
  240. package/dist/optikos.css +1194 -99
  241. package/dist/themes/dark.css +47 -32
  242. package/dist/types/components/badge.d.ts +1 -0
  243. package/dist/types/components/base/badge/badge.d.ts +18 -0
  244. package/dist/types/components/base/chip/chip.d.ts +27 -0
  245. package/dist/types/components/base/codeviewer/codeviewer.d.ts +48 -0
  246. package/dist/types/components/cellediting.d.ts +1 -0
  247. package/dist/types/components/checkboxgroup.d.ts +1 -0
  248. package/dist/types/components/chip.d.ts +1 -0
  249. package/dist/types/components/codeviewer.d.ts +1 -0
  250. package/dist/types/components/data/cellediting/cellediting.d.ts +10 -0
  251. package/dist/types/components/data/filterbuilder/filterbuilder.d.ts +3 -1
  252. package/dist/types/components/data/grid/grid.d.ts +42 -16
  253. package/dist/types/components/data/tree/tree.d.ts +71 -0
  254. package/dist/types/components/dial.d.ts +1 -0
  255. package/dist/types/components/fieldgroup.d.ts +1 -0
  256. package/dist/types/components/fieldlist.d.ts +1 -0
  257. package/dist/types/components/fields/checkboxgroup/checkboxgroup.d.ts +27 -0
  258. package/dist/types/components/fields/dial/dial.d.ts +84 -0
  259. package/dist/types/components/fields/toggle/toggle.d.ts +9 -0
  260. package/dist/types/components/form/fieldgroup/fieldgroup.d.ts +33 -0
  261. package/dist/types/components/form/fieldlist/fieldlist.d.ts +58 -0
  262. package/dist/types/components/form/form/form.d.ts +19 -2
  263. package/dist/types/components/form/formactions/formactions.d.ts +34 -0
  264. package/dist/types/components/form/formerrors/formerrors.d.ts +23 -0
  265. package/dist/types/components/form/formsection/formsection.d.ts +26 -0
  266. package/dist/types/components/form/inputgroup/inputgroup.d.ts +28 -0
  267. package/dist/types/components/form/stepform/stepform.d.ts +2 -0
  268. package/dist/types/components/formactions.d.ts +1 -0
  269. package/dist/types/components/formerrors.d.ts +1 -0
  270. package/dist/types/components/formsection.d.ts +1 -0
  271. package/dist/types/components/inputgroup.d.ts +1 -0
  272. package/dist/types/components/layout/fieldset/fieldset.d.ts +9 -0
  273. package/dist/types/components/layout/panel/panel.d.ts +6 -0
  274. package/dist/types/components/layout/panel/reload.d.ts +1 -0
  275. package/dist/types/components/navigation/tabs/tabs.d.ts +8 -0
  276. package/dist/types/components/overlays/menu/menu.d.ts +15 -0
  277. package/dist/types/components/overlays/messagebox/messagebox.d.ts +8 -0
  278. package/dist/types/components/overlays/widget/widget.d.ts +13 -0
  279. package/dist/types/components/overlays/window/window.d.ts +8 -1
  280. package/dist/types/components/toggle.d.ts +1 -0
  281. package/dist/types/components/tree.d.ts +1 -0
  282. package/dist/types/core/component.d.ts +6 -2
  283. package/dist/types/core/i18n.d.ts +5 -0
  284. package/dist/types/core/index.d.ts +1 -1
  285. package/dist/types/core/position.d.ts +4 -1
  286. package/dist/types/data/column.d.ts +9 -4
  287. package/dist/types/index.d.ts +14 -0
  288. package/dist/types/themes/define.d.ts +4 -3
  289. package/dist/types/ui/enums.d.ts +0 -6
  290. package/dist/types/ui/ui.d.ts +12 -3
  291. package/dist/ui.js +1 -1
  292. package/package.json +6 -1
  293. package/dist/chunk-4COBH4QJ.js +0 -2
  294. package/dist/chunk-4COBH4QJ.js.map +0 -7
  295. package/dist/chunk-4DHQKECB.js +0 -2
  296. package/dist/chunk-4Q67QI7J.js +0 -2
  297. package/dist/chunk-4Q67QI7J.js.map +0 -7
  298. package/dist/chunk-5AXLYDKU.js +0 -2
  299. package/dist/chunk-5AXLYDKU.js.map +0 -7
  300. package/dist/chunk-5GNEFX6F.js +0 -2
  301. package/dist/chunk-5Q6Y6CM4.js +0 -2
  302. package/dist/chunk-5Q6Y6CM4.js.map +0 -7
  303. package/dist/chunk-666O2GKD.js +0 -2
  304. package/dist/chunk-A66MDXHL.js +0 -2
  305. package/dist/chunk-A66MDXHL.js.map +0 -7
  306. package/dist/chunk-ARCW54L2.js +0 -2
  307. package/dist/chunk-ARCW54L2.js.map +0 -7
  308. package/dist/chunk-BIYNHKSA.js +0 -2
  309. package/dist/chunk-BIYNHKSA.js.map +0 -7
  310. package/dist/chunk-BNPVRIFT.js +0 -2
  311. package/dist/chunk-BNPVRIFT.js.map +0 -7
  312. package/dist/chunk-C3N7QTQB.js +0 -2
  313. package/dist/chunk-C3N7QTQB.js.map +0 -7
  314. package/dist/chunk-CEXY5A4T.js +0 -2
  315. package/dist/chunk-CN7USUJR.js +0 -2
  316. package/dist/chunk-CN7USUJR.js.map +0 -7
  317. package/dist/chunk-CQRHNTEX.js +0 -2
  318. package/dist/chunk-CUPAPOKC.js +0 -2
  319. package/dist/chunk-CUPAPOKC.js.map +0 -7
  320. package/dist/chunk-GZNQPENR.js +0 -2
  321. package/dist/chunk-HFFK6K4K.js +0 -2
  322. package/dist/chunk-HFFK6K4K.js.map +0 -7
  323. package/dist/chunk-IHAYOSBR.js +0 -2
  324. package/dist/chunk-IO66A6G5.js +0 -2
  325. package/dist/chunk-IO66A6G5.js.map +0 -7
  326. package/dist/chunk-IYPKPLCU.js.map +0 -7
  327. package/dist/chunk-JTYWZMSZ.js +0 -2
  328. package/dist/chunk-JTYWZMSZ.js.map +0 -7
  329. package/dist/chunk-JVEPKW5X.js +0 -2
  330. package/dist/chunk-JVEPKW5X.js.map +0 -7
  331. package/dist/chunk-JZNEB7A7.js +0 -2
  332. package/dist/chunk-K2DGY6MP.js +0 -2
  333. package/dist/chunk-K2DGY6MP.js.map +0 -7
  334. package/dist/chunk-LEE2FEEL.js +0 -2
  335. package/dist/chunk-LEE2FEEL.js.map +0 -7
  336. package/dist/chunk-LMGCV35W.js +0 -2
  337. package/dist/chunk-LMGCV35W.js.map +0 -7
  338. package/dist/chunk-LV6HXFHU.js.map +0 -7
  339. package/dist/chunk-MA5BJL3S.js +0 -2
  340. package/dist/chunk-MA5BJL3S.js.map +0 -7
  341. package/dist/chunk-NHVEP72K.js +0 -2
  342. package/dist/chunk-NHVEP72K.js.map +0 -7
  343. package/dist/chunk-O4DCHALR.js +0 -2
  344. package/dist/chunk-ODWPBBVL.js +0 -2
  345. package/dist/chunk-OW2ZSMGS.js +0 -2
  346. package/dist/chunk-PSPQH35P.js +0 -2
  347. package/dist/chunk-PSPQH35P.js.map +0 -7
  348. package/dist/chunk-T4OYVG2X.js +0 -2
  349. package/dist/chunk-T4OYVG2X.js.map +0 -7
  350. package/dist/chunk-TK2RC3T5.js +0 -2
  351. package/dist/chunk-TK2RC3T5.js.map +0 -7
  352. package/dist/chunk-U3X2FW6U.js +0 -2
  353. package/dist/chunk-U3X2FW6U.js.map +0 -7
  354. package/dist/chunk-UPOBGNJ5.js +0 -2
  355. package/dist/chunk-UPOBGNJ5.js.map +0 -7
  356. package/dist/chunk-XVIC24AW.js +0 -2
  357. package/dist/chunk-XZ5CUZZP.js +0 -2
  358. package/dist/chunk-XZ5CUZZP.js.map +0 -7
  359. package/dist/chunk-XZEOSW3Q.js +0 -2
  360. package/dist/chunk-XZEOSW3Q.js.map +0 -7
  361. package/dist/chunk-YET5PM6F.js +0 -2
  362. package/dist/chunk-YET5PM6F.js.map +0 -7
  363. package/dist/chunk-ZCAAM4NH.js +0 -2
  364. package/dist/chunk-ZCAAM4NH.js.map +0 -7
  365. package/dist/themes/brand.css +0 -240
  366. package/dist/themes/brutal.css +0 -100
  367. package/dist/themes/corporate.css +0 -112
  368. package/dist/themes/editorial.css +0 -110
  369. package/dist/themes/soft.css +0 -101
  370. package/dist/themes/terminal.css +0 -91
  371. /package/dist/{chunk-NWTTHDIM.js.map → chunk-5JEXM5S7.js.map} +0 -0
  372. /package/dist/{chunk-NV5AIBQP.js.map → chunk-6VBK2I5B.js.map} +0 -0
  373. /package/dist/{chunk-ZYUXCZX7.js.map → chunk-7KMIFXHZ.js.map} +0 -0
  374. /package/dist/{chunk-CEXY5A4T.js.map → chunk-ELYARUCN.js.map} +0 -0
  375. /package/dist/{chunk-Z25NC4CS.js.map → chunk-EV73ADN2.js.map} +0 -0
  376. /package/dist/{chunk-CQRHNTEX.js.map → chunk-G2KUK6AT.js.map} +0 -0
  377. /package/dist/{chunk-LBCWEWPN.js.map → chunk-GNU4VOOE.js.map} +0 -0
  378. /package/dist/{chunk-IW7PK4VS.js.map → chunk-GZ7X34QP.js.map} +0 -0
  379. /package/dist/{chunk-QEQIJAAB.js.map → chunk-I4SP6JTU.js.map} +0 -0
  380. /package/dist/{chunk-4SUKNSCY.js.map → chunk-JI265XFO.js.map} +0 -0
  381. /package/dist/{chunk-6NJW7QFD.js.map → chunk-SA53QUBF.js.map} +0 -0
  382. /package/dist/{chunk-TBLICXWW.js.map → chunk-TOLTUOZS.js.map} +0 -0
  383. /package/dist/{chunk-DXO3UJKL.js.map → chunk-TZOQWCVH.js.map} +0 -0
  384. /package/dist/{chunk-SNTHW4K2.js.map → chunk-W3H7GTJY.js.map} +0 -0
  385. /package/dist/{chunk-ZHVSHDLH.js.map → chunk-XHOBNSBO.js.map} +0 -0
  386. /package/dist/{chunk-6O2BXCRN.js.map → chunk-Z2Z52GFT.js.map} +0 -0
@@ -1,38 +1,53 @@
1
- /* Dark theme: only semantic colors and shadows change. Use data-op-theme="dark" on any element. */
1
+ /* Dark: the same sober look at night. Steel blue on deep slate, quiet borders, a darker sidebar; shape and density come
2
+ from the base. Use data-op-theme="dark" on any element. */
2
3
  @layer optikos {
3
4
  [data-op-theme~='dark'] {
4
5
  color-scheme: dark; /* native controls follow */
5
- --op-color-bg: var(--op-gray-900);
6
- --op-color-surface: var(--op-gray-800);
7
- --op-color-surface-2: #273449;
8
- --op-color-fg: var(--op-gray-100);
9
- --op-color-fg-muted: var(--op-gray-400);
10
- --op-color-border: var(--op-gray-700);
11
- --op-color-border-strong: var(--op-gray-600);
12
- --op-color-hover: #2b3a52;
13
- --op-color-selected: #1e3a8a;
14
- --op-color-primary: var(--op-blue-500);
15
- --op-color-primary-hover: #60a5fa;
16
- --op-color-primary-fg: var(--op-gray-900);
17
- --op-color-primary-soft: #172554;
18
- --op-color-danger: #f87171;
19
- --op-color-danger-hover: #fca5a5;
20
- --op-color-danger-fg: var(--op-gray-900);
21
- --op-color-danger-soft: #450a0a;
22
- --op-color-success: #4ade80;
23
- --op-color-success-soft: #052e16;
24
- --op-color-warning: #fbbf24;
25
- --op-color-warning-soft: #422006;
26
- --op-color-info: #60a5fa;
27
- --op-color-info-soft: #172554;
28
- --op-color-focus: #60a5fa;
29
- --op-color-disabled-fg: var(--op-gray-500);
30
- --op-color-disabled-bg: #1b2538;
31
- --op-color-overlay: rgb(0 0 0 / 0.65);
32
- --op-color-inverse-bg: var(--op-gray-100);
33
- --op-color-inverse-fg: var(--op-gray-900);
34
- --op-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
35
- --op-shadow: 0 4px 12px rgb(0 0 0 / 0.5);
6
+ --op-color-bg: #0f141c;
7
+ --op-color-surface: #161d28;
8
+ --op-color-surface-2: #1c2532;
9
+ --op-color-fg: #e2e8f0;
10
+ --op-color-fg-muted: #9ba7b8;
11
+ --op-color-border: #2a3444;
12
+ --op-color-border-strong: #435064;
13
+ --op-color-hover: #212d3e;
14
+ --op-color-selected: #1d3557;
15
+ --op-color-primary: #6ea8ec; /* primary text keeps 4.5:1 on the dark surfaces */
16
+ --op-color-primary-hover: #93bff2;
17
+ --op-color-primary-fg: #0b1524;
18
+ --op-color-primary-soft: #172a45;
19
+ --op-color-danger: #f28b82;
20
+ --op-color-danger-hover: #f6aaa3;
21
+ --op-color-danger-fg: #1f0b09;
22
+ --op-color-danger-soft: #3b1715;
23
+ --op-color-success: #5cc493;
24
+ --op-color-success-soft: #10301f;
25
+ --op-color-warning: #e9b44c;
26
+ --op-color-warning-soft: #36270c;
27
+ --op-color-info: #6ea8ec;
28
+ --op-color-info-soft: #172a45;
29
+ --op-color-focus: #6ea8ec;
30
+ --op-color-disabled-fg: #647186;
31
+ --op-color-disabled-bg: #1a222e;
32
+ --op-color-overlay: rgb(0 0 0 / 0.62);
33
+ --op-color-inverse-bg: #e2e8f0;
34
+ --op-color-inverse-fg: #0f141c;
35
+ --op-shadow-sm: none;
36
+ --op-shadow: 0 2px 8px rgb(0 0 0 / 0.45);
36
37
  --op-shadow-lg: 0 12px 32px rgb(0 0 0 / 0.6);
38
+
39
+ --op-navmenu-item-height: 2.5rem;
40
+ --op-navmenu-bg: #0b1018;
41
+ --op-navmenu-fg: #c6d0de;
42
+ --op-navmenu-group-fg: #7f8ea6;
43
+ --op-navmenu-item-hover-bg: #172131;
44
+ --op-navmenu-active-bg: #1b3050;
45
+ --op-navmenu-active-fg: #ffffff;
46
+ --op-navmenu-active-bar: #6ea8ec;
47
+ --op-navmenu-badge-bg: #6ea8ec;
48
+ --op-navmenu-badge-fg: #0b1524;
49
+ --op-grid-header-bg: #1a2230;
50
+ --op-grid-header-fg: #d3dbe6;
51
+ --op-field-label-weight: 600;
37
52
  }
38
53
  }
@@ -0,0 +1 @@
1
+ export * from '../components/base/badge/badge.js';
@@ -0,0 +1,18 @@
1
+ import { Component, type ComponentConfig } from '../../../core/component.js';
2
+ export type Tone = 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info';
3
+ export interface BadgeConfig extends ComponentConfig {
4
+ text?: string | number;
5
+ tone?: Tone;
6
+ icon?: string;
7
+ /** A small colored dot before the text (a status light). */
8
+ dot?: boolean;
9
+ }
10
+ /** A small status label or count: "Paid", "3 new", "Beta". Not interactive (see Chip for that). */
11
+ export declare class Badge extends Component<BadgeConfig> {
12
+ protected baseCls: string;
13
+ protected tag: 'span';
14
+ private textEl;
15
+ protected onRender(): void;
16
+ setText(text: string | number): void;
17
+ setTone(tone: Tone): void;
18
+ }
@@ -0,0 +1,27 @@
1
+ import { Component, type ComponentConfig } from '../../../core/component.js';
2
+ export interface ChipConfig extends ComponentConfig {
3
+ text?: string;
4
+ icon?: string;
5
+ /** Click toggles it on and off (a filter, a tag being picked): a toggle button with `aria-pressed`. */
6
+ selectable?: boolean;
7
+ selected?: boolean;
8
+ /** Shows a × button that fires `remove` (the app removes the chip). */
9
+ removable?: boolean;
10
+ disabled?: boolean;
11
+ handler?: (chip: Chip) => void;
12
+ }
13
+ /** A compact token: a filter to toggle, a tag to remove, a choice to click. */
14
+ export declare class Chip extends Component<ChipConfig> {
15
+ protected baseCls: string;
16
+ protected tag: 'span';
17
+ private main;
18
+ private textEl;
19
+ private removeBtn?;
20
+ protected onRender(): void;
21
+ setText(text: string): void;
22
+ /** Selected state (only meaningful with `selectable`); `notify` fires `change`. */
23
+ setSelected(on: boolean, notify?: boolean): void;
24
+ isSelected(): boolean;
25
+ setDisabled(disabled: boolean): void;
26
+ protected focusEl(): HTMLElement;
27
+ }
@@ -0,0 +1,48 @@
1
+ import { Component, type ComponentConfig } from '../../../core/component.js';
2
+ export type CodeLanguage = 'ts' | 'js' | 'json' | 'css' | 'html' | 'sh' | 'text';
3
+ export interface CodeViewerConfig extends ComponentConfig {
4
+ code?: string;
5
+ language?: CodeLanguage;
6
+ /** The bar text. Default: the language name. */
7
+ title?: string;
8
+ lineNumbers?: boolean;
9
+ startLine?: number;
10
+ /** Lines to mark: `[3, 4]` or `'3-5,8'` (numbers as shown, so they follow `startLine`). */
11
+ highlight?: number[] | string;
12
+ wrap?: boolean;
13
+ copyable?: boolean;
14
+ bar?: boolean;
15
+ maxHeight?: number | string;
16
+ }
17
+ type Tok = [kind: string, text: string];
18
+ /** Splits code into tokens (kind '' = plain). Pure: no DOM. */
19
+ export declare function tokenize(code: string, language?: CodeLanguage): Tok[];
20
+ /** Read-only code: syntax colors, line numbers (CSS counters, never copied), marked lines and a copy button. */
21
+ export declare class CodeViewer extends Component<CodeViewerConfig> {
22
+ protected baseCls: string;
23
+ private titleEl;
24
+ private bar;
25
+ private pre;
26
+ private codeEl;
27
+ private status;
28
+ private copyBtn;
29
+ protected build(): HTMLDivElement;
30
+ protected onRender(): void;
31
+ private get language();
32
+ private paintBar;
33
+ /** One line element per line, tokens split at line breaks so a comment or string can span lines. */
34
+ private paintCode;
35
+ getCode(): string;
36
+ /** Copies the code. Without a clipboard (an insecure page) it selects the code instead and resolves false. */
37
+ copy(): Promise<boolean>;
38
+ private update;
39
+ setCode(code: string): void;
40
+ setLanguage(language: CodeLanguage): void;
41
+ setTitle(title: string): void;
42
+ setLineNumbers(lineNumbers: boolean): void;
43
+ setStartLine(startLine: number): void;
44
+ setHighlight(highlight: CodeViewerConfig['highlight']): void;
45
+ setWrap(wrap: boolean): void;
46
+ setMaxHeight(maxHeight: CodeViewerConfig['maxHeight']): void;
47
+ }
48
+ export {};
@@ -0,0 +1 @@
1
+ export * from '../components/data/cellediting/cellediting.js';
@@ -0,0 +1 @@
1
+ export * from '../components/fields/checkboxgroup/checkboxgroup.js';
@@ -0,0 +1 @@
1
+ export * from '../components/base/chip/chip.js';
@@ -0,0 +1 @@
1
+ export * from '../components/base/codeviewer/codeviewer.js';
@@ -0,0 +1,10 @@
1
+ import type { GridPlugin } from '../grid/grid.js';
2
+ export interface CellEditingOptions {
3
+ /** What starts editing with the pointer: a double click (default) or a single click. F2 and Enter always do. */
4
+ trigger?: 'dblclick' | 'click';
5
+ }
6
+ /**
7
+ * Inline editing plugin. Events on the grid: `before-edit(record, field)` (cancelable), `edit(record, field, value, old)`
8
+ * after a valid value was written to the record (`record.set`, so it is marked modified), `edit-cancel(record, field)`.
9
+ */
10
+ export declare function cellEditing(options?: CellEditingOptions): GridPlugin;
@@ -5,6 +5,8 @@ export interface FilterField {
5
5
  name: string;
6
6
  label?: string;
7
7
  type?: 'text' | 'number' | 'date' | 'select';
8
+ /** Fields with the same group sit together in the field pickers (as columns do in the Grid's column menu). */
9
+ group?: string;
8
10
  /** For `select`: the choices. */
9
11
  options?: Array<string | number | {
10
12
  value: string | number;
@@ -21,7 +23,7 @@ export interface FilterBuilderConfig extends ComponentConfig {
21
23
  live?: boolean;
22
24
  /**
23
25
  * What "Add filter" does: `'row'` (default) adds an empty row for the first field; `'pick'` first asks
24
- * which field to filter by (a menu of the fields) and adds the row for it.
26
+ * which field to filter by (a menu of the fields, grouped by `group`, with a search field past 6 fields) and adds the row for it.
25
27
  */
26
28
  addMode?: 'row' | 'pick';
27
29
  /** Deepest group nesting allowed. Default 3. */
@@ -2,11 +2,11 @@ import { Component, type ComponentConfig } from '../../../core/component.js';
2
2
  import { Store } from '../../../data/store.js';
3
3
  import type { Model } from '../../../data/model.js';
4
4
  import { type Column } from '../../../data/column.js';
5
- export interface GridConfig extends ComponentConfig {
6
- store?: Store<any>;
5
+ export interface GridConfig<T extends Record<string, any> = any> extends ComponentConfig {
6
+ store?: Store<T>;
7
7
  /** Used when no `store` is given. */
8
- data?: Record<string, any>[];
9
- columns: Column[];
8
+ data?: Partial<T>[];
9
+ columns: Column<T>[];
10
10
  selection?: 'none' | 'single' | 'multi';
11
11
  /** Row height in px. Default: measured from the `--op-grid-row-height` / `--op-row-height` tokens. */
12
12
  rowHeight?: number;
@@ -20,9 +20,11 @@ export interface GridConfig extends ComponentConfig {
20
20
  /** Keep selected records when the page or the filters change. Default false. */
21
21
  keepSelection?: boolean;
22
22
  /** Buttons shown in a bar above the header while records are selected. */
23
- bulkActions?: GridAction[];
23
+ bulkActions?: GridAction<T>[];
24
24
  /** Actions at the end of every row (see `rowActionsMode`). */
25
- rowActions?: GridRowAction[];
25
+ rowActions?: GridRowAction<T>[];
26
+ /** Optional features (`cellEditing()`...). See `GridPlugin`. */
27
+ plugins?: GridPlugin<T>[];
26
28
  /** `'menu'` (default): one "⋯" button opens a menu. `'visible'`: every action is an icon button, always shown (dimmed until the row is hovered, active or selected). */
27
29
  rowActionsMode?: 'menu' | 'visible';
28
30
  /** A "Columns" button in the bar: toggle columns on and off, with search. */
@@ -34,19 +36,31 @@ export interface GridConfig extends ComponentConfig {
34
36
  /** Show the group labels (`Column.group`) as a band over the header. Default true when any column has a group. */
35
37
  groupHeaders?: boolean;
36
38
  }
37
- export interface GridAction {
39
+ /** Extends a Grid without growing its base: `init` runs once the grid is rendered and may return a cleanup. */
40
+ export interface GridPlugin<T extends Record<string, any> = any> {
41
+ init(grid: Grid<T>): void | (() => void);
42
+ destroy?(): void;
43
+ }
44
+ /** What `cellAt` finds under a DOM node: the row index, its record, the column and the cell element. */
45
+ export interface GridCell<T extends Record<string, any> = any> {
46
+ index: number;
47
+ record: Model<T>;
48
+ column: Column<T>;
49
+ el: HTMLElement;
50
+ }
51
+ export interface GridAction<T extends Record<string, any> = any> {
38
52
  text: string;
39
53
  icon?: string;
40
54
  variant?: 'default' | 'danger';
41
- handler: (records: Model[], grid: Grid) => void;
55
+ handler: (records: Model<T>[], grid: Grid<T>) => void;
42
56
  }
43
- export interface GridRowAction {
57
+ export interface GridRowAction<T extends Record<string, any> = any> {
44
58
  text: string;
45
59
  icon?: string;
46
60
  variant?: 'default' | 'danger';
47
61
  /** Disabled for the records where this returns true. */
48
- disabled?: (record: Model) => boolean;
49
- handler: (record: Model, grid: Grid) => void;
62
+ disabled?: (record: Model<T>) => boolean;
63
+ handler: (record: Model<T>, grid: Grid<T>) => void;
50
64
  }
51
65
  export interface ColumnState {
52
66
  field: string;
@@ -54,7 +68,8 @@ export interface ColumnState {
54
68
  width?: number;
55
69
  }
56
70
  /** Data grid with a virtualized body: only the visible rows (plus a small overscan) exist in the DOM. */
57
- export declare class Grid extends Component<GridConfig> {
71
+ /** `T` is the record shape; `new Grid({ store })` infers it from a typed `Store<T>`. */
72
+ export declare class Grid<T extends Record<string, any> = any> extends Component<GridConfig<T>> {
58
73
  protected baseCls: string;
59
74
  private store;
60
75
  private offStore?;
@@ -62,6 +77,8 @@ export declare class Grid extends Component<GridConfig> {
62
77
  private headRow;
63
78
  private viewport;
64
79
  private emptyEl;
80
+ /** The focusable `role=grid` part (header + rows); the root also holds the bulk bar and the pager, which a grid may not contain. */
81
+ private table;
65
82
  private pager?;
66
83
  private v;
67
84
  private selected;
@@ -87,14 +104,22 @@ export declare class Grid extends Component<GridConfig> {
87
104
  private mode;
88
105
  protected build(): HTMLDivElement;
89
106
  protected onRender(): void;
107
+ /** The row, record, column and cell element under a node (e.g. an event target), if it is a body cell. */
108
+ cellAt(node: EventTarget | null): GridCell<T> | undefined;
109
+ /** The body cell of row `index` and column `field`, when that row is in the DOM (rows are virtualized). */
110
+ getCell(index: number, field: string): HTMLElement | undefined;
111
+ /** The visible data columns, in order (no checkbox/action columns). */
112
+ getColumns(): Column<T>[];
113
+ /** The active row index (keyboard cursor), or -1. */
114
+ getActive(): number;
90
115
  notifyMount(): void;
91
116
  /** Re-measures row height and scrollbar (needed after the grid becomes visible or resizes). */
92
117
  private layout;
93
118
  private bindStore;
94
119
  /** Brings count, selection and the empty state in line with the store. */
95
120
  private sync;
96
- setStore(store: Store<any>): void;
97
- getStore(): Store<any>;
121
+ setStore(store: Store<T>): void;
122
+ getStore(): Store<T>;
98
123
  /** Column widths → the CSS grid template shared by the header and every row. */
99
124
  private layoutColumns;
100
125
  private buildHeader;
@@ -124,9 +149,9 @@ export declare class Grid extends Component<GridConfig> {
124
149
  private renderRow;
125
150
  private indexOfEvent;
126
151
  private onRowEvent;
127
- getSelection(): Model[];
152
+ getSelection(): Model<T>[];
128
153
  /** Selects a record or row index. `add` keeps the current selection (multi mode). */
129
- select(target: Model | number, opts?: {
154
+ select(target: Model<T> | number, opts?: {
130
155
  add?: boolean;
131
156
  }): void;
132
157
  deselectAll(): void;
@@ -138,6 +163,7 @@ export declare class Grid extends Component<GridConfig> {
138
163
  private setActive;
139
164
  private updateActiveDescendant;
140
165
  focusRow(i: number): void;
166
+ protected focusEl(): HTMLElement;
141
167
  scrollToRow(i: number): void;
142
168
  private onKey;
143
169
  refresh(): void;
@@ -0,0 +1,71 @@
1
+ import { Component, type ComponentConfig } from '../../../core/component.js';
2
+ export interface TreeNode {
3
+ id: string;
4
+ text: string;
5
+ icon?: string;
6
+ children?: TreeNode[];
7
+ /** No children and nothing to load: no expand arrow. Default: true when there are no `children` and no `load`. */
8
+ leaf?: boolean;
9
+ expanded?: boolean;
10
+ disabled?: boolean;
11
+ /** With `checkboxes`: the node's own state (a parent's state comes from its children). */
12
+ checked?: boolean;
13
+ data?: unknown;
14
+ }
15
+ export type CheckState = boolean | 'mixed';
16
+ export interface TreeConfig extends ComponentConfig {
17
+ items?: TreeNode[];
18
+ /** `single` (default), `multi` (Ctrl/⌘ + click or Space toggle) or `none`. */
19
+ selection?: 'single' | 'multi' | 'none';
20
+ /** A tri-state checkbox per node: checking a parent checks its whole branch; a parent shows "mixed" when partly checked. */
21
+ checkboxes?: boolean;
22
+ /** Children on demand: called the first time a node without `children` (and not `leaf`) is expanded. */
23
+ load?: (node: TreeNode) => Promise<TreeNode[]> | TreeNode[];
24
+ emptyText?: string;
25
+ }
26
+ /** A hierarchy: expand/collapse, single or multiple selection, tri-state checkboxes, children loaded on demand, filter, APG tree keyboard. */
27
+ export declare class Tree extends Component<TreeConfig> {
28
+ protected baseCls: string;
29
+ private items;
30
+ private open;
31
+ private selected;
32
+ private loading;
33
+ private query;
34
+ private focusId?;
35
+ private root;
36
+ protected onRender(): void;
37
+ getNode(id: string, list?: TreeNode[]): TreeNode | undefined;
38
+ /** The ancestors of a node, from the root down. */
39
+ getPath(id: string, list?: TreeNode[], trail?: TreeNode[]): TreeNode[] | undefined;
40
+ private isLeaf;
41
+ private matches;
42
+ private walk;
43
+ private paint;
44
+ private node;
45
+ expand(id: string): Promise<void>;
46
+ collapse(id: string): void;
47
+ toggle(id: string): void;
48
+ /** Opens every node that already has its children (it does not load). */
49
+ expandAll(): void;
50
+ collapseAll(): void;
51
+ private pick;
52
+ /** Selects a node (opening its parents); `add` keeps the current selection in multi mode. */
53
+ select(id: string, opts?: {
54
+ add?: boolean;
55
+ }): void;
56
+ getSelection(): TreeNode[];
57
+ deselectAll(): void;
58
+ /** A node's state: its own `checked`, or for a parent with children, all / none / "mixed" of them. */
59
+ checkState(n: TreeNode): CheckState;
60
+ private setBranch;
61
+ setChecked(id: string, on: boolean): void;
62
+ toggleChecked(id: string): void;
63
+ /** Every checked node (a fully checked parent and its children all count). */
64
+ getChecked(): TreeNode[];
65
+ setItems(items: TreeNode[]): void;
66
+ /** Shows only what matches (and its ancestors, opened); empty text clears the filter. */
67
+ filter(text: string): void;
68
+ private rows;
69
+ private focusRow;
70
+ private onKey;
71
+ }
@@ -0,0 +1 @@
1
+ export * from '../components/fields/dial/dial.js';
@@ -0,0 +1 @@
1
+ export * from '../components/form/fieldgroup/fieldgroup.js';
@@ -0,0 +1 @@
1
+ export * from '../components/form/fieldlist/fieldlist.js';
@@ -0,0 +1,27 @@
1
+ import { Field, type FieldConfig } from '../../../core/field.js';
2
+ import type { RadioOption } from '../radiogroup/radiogroup.js';
3
+ type Value = string | number;
4
+ export interface CheckboxGroupConfig extends FieldConfig<Value[]> {
5
+ options?: RadioOption[];
6
+ direction?: 'vertical' | 'horizontal';
7
+ }
8
+ /** Several choices from a few visible options; the value is the list of checked option values, in option order. */
9
+ export declare class CheckboxGroup extends Field<Value[], CheckboxGroupConfig> {
10
+ protected baseCls: string;
11
+ private group;
12
+ private inputs;
13
+ protected emptyValue(): Value[];
14
+ /** `required` means "at least one". */
15
+ protected isEmpty(v: Value[]): boolean;
16
+ protected isEqual(a: Value[], b: Value[]): boolean;
17
+ protected createControl(): HTMLElement;
18
+ private opts;
19
+ private buildOptions;
20
+ protected onRender(): void;
21
+ protected applyValue(v: Value[]): void;
22
+ private paint;
23
+ getDisplayText(): string;
24
+ protected onDisabled(disabled: boolean): void;
25
+ setOptions(options: RadioOption[]): void;
26
+ }
27
+ export {};
@@ -0,0 +1,84 @@
1
+ import { Field, type FieldConfig } from '../../../core/field.js';
2
+ export type DialValue = number | string;
3
+ export interface DialOption {
4
+ value: DialValue;
5
+ label?: string;
6
+ }
7
+ export interface DialConfig extends FieldConfig<DialValue> {
8
+ min?: number;
9
+ max?: number;
10
+ step?: number;
11
+ /** A list instead of a range: the value is the item's value. */
12
+ options?: (DialValue | DialOption)[];
13
+ /** Snap points: every multiple of N (a range, default 10), every N items (a list, default 1), explicit values, or none. */
14
+ snap?: number | DialValue[] | false;
15
+ shape?: 'linear' | 'circle';
16
+ format?: (v: DialValue) => string;
17
+ /** Which ticks get a label. Default `snap`. */
18
+ labels?: 'snap' | 'all' | 'none';
19
+ }
20
+ /** A flat ruler (or a clock face) to pick one value from a range or a list, with a rolling readout. */
21
+ export declare class Dial extends Field<DialValue, DialConfig> {
22
+ protected baseCls: string;
23
+ private face;
24
+ private tape;
25
+ private needle;
26
+ private readout;
27
+ private cache?;
28
+ /** Where the ruler sits, as an item index (fractional while dragging). */
29
+ private pos;
30
+ /** The hand's angle in circle mode, kept continuous so it always turns the short way. */
31
+ private angle;
32
+ private shown;
33
+ private stopGlide?;
34
+ constructor(config?: DialConfig);
35
+ private get isCircle();
36
+ private get items();
37
+ private fmt;
38
+ private buildItems;
39
+ protected emptyValue(): DialValue;
40
+ protected isEmpty(): boolean;
41
+ private indexOf;
42
+ private normalize;
43
+ private get index();
44
+ protected createControl(): HTMLDivElement;
45
+ protected onRender(): void;
46
+ private paintTicks;
47
+ protected build(): HTMLElement;
48
+ /** Distance in px between two ticks on the ruler, for drags (12 when there is no layout, as in tests). */
49
+ private spacing;
50
+ private place;
51
+ /** Turns the hand to item `i` the short way round. */
52
+ private aim;
53
+ protected applyValue(v: DialValue): void;
54
+ /** ARIA, the current tick and the readout for item `i`. */
55
+ private paintState;
56
+ /** Digits roll like an odometer when the text keeps its shape; any other change slides the new text in. */
57
+ private paintReadout;
58
+ /** The user picked item `i`: animate there and tell everyone. */
59
+ private choose;
60
+ private get locked();
61
+ private onKey;
62
+ /** The next snap point after item `i` in direction `dir` (or the limit when there is none). */
63
+ private snapFrom;
64
+ private angleAt;
65
+ private onDown;
66
+ /** Comes to rest on item `i`; a glide (after a flick) takes longer the further it goes. */
67
+ private rest;
68
+ /** Moves `n` steps (negative goes back). */
69
+ next(n?: number): void;
70
+ prev(n?: number): void;
71
+ nextSnap(): void;
72
+ prevSnap(): void;
73
+ getDisplayText(): string;
74
+ private rebuild;
75
+ setMin(min: number): void;
76
+ setMax(max: number): void;
77
+ setStep(step: number): void;
78
+ setOptions(options: DialConfig['options']): void;
79
+ setSnap(snap: DialConfig['snap']): void;
80
+ setShape(shape: 'linear' | 'circle'): void;
81
+ setFormat(format: DialConfig['format']): void;
82
+ protected onDisabled(disabled: boolean): void;
83
+ protected onReadonly(readonly: boolean): void;
84
+ }
@@ -0,0 +1,9 @@
1
+ import { Checkbox, type CheckboxConfig } from '../checkbox/checkbox.js';
2
+ export type ToggleConfig = Omit<CheckboxConfig, 'indeterminate'>;
3
+ /** An on/off switch: a Checkbox with `role="switch"` and a track-and-knob look. Same value (`boolean`), events and API. */
4
+ export declare class Toggle extends Checkbox {
5
+ protected baseCls: string;
6
+ protected onRender(): void;
7
+ /** A switch has no third state. */
8
+ setIndeterminate(): void;
9
+ }
@@ -0,0 +1,33 @@
1
+ import { Container, type ContainerConfig } from '../../../core/container.js';
2
+ import { Field } from '../../../core/field.js';
3
+ export interface FieldGroupConfig extends ContainerConfig {
4
+ label?: string;
5
+ help?: string;
6
+ /** The `*` marker (also shown when any field inside is required). */
7
+ required?: boolean;
8
+ /** Default: the form's `labelPos`. */
9
+ labelPos?: 'top' | 'left';
10
+ /** Under this width (px) the row becomes a column. */
11
+ stackBelow?: number;
12
+ }
13
+ /** Several inputs read as one field: one label, one help line and one error line over a row of fields. */
14
+ export declare class FieldGroup extends Container<FieldGroupConfig> {
15
+ protected baseCls: string;
16
+ private labelEl;
17
+ private bodyEl;
18
+ private helpEl;
19
+ private errorEl;
20
+ private error;
21
+ constructor(config?: FieldGroupConfig);
22
+ getBody(): HTMLElement;
23
+ /** The fields inside (also inside nested containers). */
24
+ getFields(): Field<any>[];
25
+ getError(): string;
26
+ protected build(): HTMLElement;
27
+ protected onRender(): void;
28
+ /** The group shows the first error of its fields, in one line. */
29
+ private paintError;
30
+ private describe;
31
+ setLabel(label: string): void;
32
+ setHelp(help: string): void;
33
+ }
@@ -0,0 +1,58 @@
1
+ import { Field, type FieldConfig } from '../../../core/field.js';
2
+ import { Container } from '../../../core/container.js';
3
+ import { type AnyConfig } from '../../../core/registry.js';
4
+ import type { LayoutSpec } from '../../../layout/layout.js';
5
+ import { Component } from '../../../core/component.js';
6
+ type Row = Record<string, any>;
7
+ export interface FieldListConfig extends FieldConfig<Row[]> {
8
+ /** The fields of one row (configs or instances such as `ui.text(...)`). Names are relative to the row (nested allowed). */
9
+ items?: Array<AnyConfig | Component>;
10
+ min?: number;
11
+ max?: number;
12
+ addText?: string;
13
+ reorderable?: boolean;
14
+ /** Values for a new row, or a function that returns them. */
15
+ newRow?: Row | (() => Row);
16
+ /** Layout of a row. Default `hbox` (the fields share the row). */
17
+ rowLayout?: LayoutSpec;
18
+ }
19
+ /** A repeating block of fields: add, remove and reorder rows; the value is an array of row objects. */
20
+ export declare class FieldList extends Field<Row[], FieldListConfig> {
21
+ protected baseCls: string;
22
+ private rowsEl;
23
+ private addBtn;
24
+ private emptyEl;
25
+ private rows;
26
+ private syncing;
27
+ protected emptyValue(): Row[];
28
+ protected isEmpty(v: Row[]): boolean;
29
+ protected createControl(): HTMLDivElement;
30
+ protected onRender(): void;
31
+ private label;
32
+ private makeRow;
33
+ private rowFields;
34
+ private collect;
35
+ private commitRows;
36
+ /** Puts every row in place: its group name, tools, and which tools are allowed. */
37
+ private paintRows;
38
+ protected applyValue(value: Row[]): void;
39
+ /** Adds a row (at the end) and focuses its first field. */
40
+ addRow(values?: Row): void;
41
+ removeRow(index: number): void;
42
+ moveRow(from: number, to: number): void;
43
+ getRows(): Container[];
44
+ getRowFields(index: number): Field<any>[];
45
+ setAddText(text: string): void;
46
+ setMin(min: number): void;
47
+ setMax(max: number): void;
48
+ protected check(): string;
49
+ /** Validates every row too; the list is valid when its own rules and every field inside pass. */
50
+ validate(): boolean;
51
+ isValid(): boolean;
52
+ /** The first invalid field inside, or the add button. */
53
+ focus(): void;
54
+ protected onDisabled(disabled: boolean): void;
55
+ protected onReadonly(readonly: boolean): void;
56
+ protected onDestroy(): void;
57
+ }
58
+ export {};