optikos 0.1.0 → 0.3.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.
- package/CHANGELOG.md +135 -0
- package/README.md +13 -11
- package/dist/chunk-23XLG2EM.js +2 -0
- package/dist/{chunk-666O2GKD.js.map → chunk-23XLG2EM.js.map} +1 -1
- package/dist/chunk-2YZB6XQR.js +2 -0
- package/dist/chunk-2YZB6XQR.js.map +7 -0
- package/dist/chunk-2ZRNGG2N.js +2 -0
- package/dist/chunk-2ZRNGG2N.js.map +7 -0
- package/dist/chunk-2ZUZ5HDL.js +2 -0
- package/dist/chunk-2ZUZ5HDL.js.map +7 -0
- package/dist/chunk-3S24ZRPK.js +2 -0
- package/dist/chunk-3S24ZRPK.js.map +7 -0
- package/dist/chunk-3TAW4AKH.js +2 -0
- package/dist/chunk-3TAW4AKH.js.map +7 -0
- package/dist/chunk-4EQEHJB3.js +2 -0
- package/dist/chunk-4EQEHJB3.js.map +7 -0
- package/dist/chunk-4EZJ5FKJ.js +2 -0
- package/dist/{chunk-IHAYOSBR.js.map → chunk-4EZJ5FKJ.js.map} +1 -1
- package/dist/chunk-4LZZ244E.js +2 -0
- package/dist/chunk-4LZZ244E.js.map +7 -0
- package/dist/chunk-4SYIIX5A.js +2 -0
- package/dist/chunk-4SYIIX5A.js.map +7 -0
- package/dist/chunk-5BC72727.js +2 -0
- package/dist/chunk-5BC72727.js.map +7 -0
- package/dist/chunk-5DJTP53N.js +2 -0
- package/dist/{chunk-ODWPBBVL.js.map → chunk-5DJTP53N.js.map} +1 -1
- package/dist/{chunk-NWTTHDIM.js → chunk-5JEXM5S7.js} +2 -2
- package/dist/chunk-5Q76ACVI.js +2 -0
- package/dist/{chunk-O4DCHALR.js.map → chunk-5Q76ACVI.js.map} +1 -1
- package/dist/chunk-5QUY72FX.js +2 -0
- package/dist/chunk-5QUY72FX.js.map +7 -0
- package/dist/{chunk-NV5AIBQP.js → chunk-6VBK2I5B.js} +2 -2
- package/dist/{chunk-ZYUXCZX7.js → chunk-7KMIFXHZ.js} +2 -2
- package/dist/{chunk-IYPKPLCU.js → chunk-A2NKDOYN.js} +2 -2
- package/dist/chunk-A2NKDOYN.js.map +7 -0
- package/dist/chunk-CKXS375P.js +2 -0
- package/dist/chunk-CKXS375P.js.map +7 -0
- package/dist/chunk-DBMWS3O5.js +2 -0
- package/dist/chunk-DBMWS3O5.js.map +7 -0
- package/dist/chunk-E4VNLYO2.js +2 -0
- package/dist/chunk-E4VNLYO2.js.map +7 -0
- package/dist/chunk-EDUMAMK4.js +2 -0
- package/dist/chunk-EDUMAMK4.js.map +7 -0
- package/dist/chunk-EJGWCKE4.js +2 -0
- package/dist/{chunk-4DHQKECB.js.map → chunk-EJGWCKE4.js.map} +1 -1
- package/dist/chunk-ELYARUCN.js +2 -0
- package/dist/{chunk-Z25NC4CS.js → chunk-EV73ADN2.js} +2 -2
- package/dist/{chunk-LV6HXFHU.js → chunk-FEHGU6EP.js} +3 -3
- package/dist/chunk-FEHGU6EP.js.map +7 -0
- package/dist/chunk-G2DAD3MQ.js +2 -0
- package/dist/chunk-G2DAD3MQ.js.map +7 -0
- package/dist/chunk-G2KUK6AT.js +2 -0
- package/dist/chunk-GD5JGKM7.js +2 -0
- package/dist/chunk-GD5JGKM7.js.map +7 -0
- package/dist/{chunk-LBCWEWPN.js → chunk-GNU4VOOE.js} +2 -2
- package/dist/{chunk-IW7PK4VS.js → chunk-GZ7X34QP.js} +2 -2
- package/dist/chunk-HOF4JGMQ.js +2 -0
- package/dist/chunk-HOF4JGMQ.js.map +7 -0
- package/dist/chunk-HXDTGP2K.js +2 -0
- package/dist/chunk-HXDTGP2K.js.map +7 -0
- package/dist/{chunk-QEQIJAAB.js → chunk-I4SP6JTU.js} +2 -2
- package/dist/chunk-IHE2MQ3W.js +2 -0
- package/dist/{chunk-OW2ZSMGS.js.map → chunk-IHE2MQ3W.js.map} +1 -1
- package/dist/chunk-JBLRAM7Z.js +2 -0
- package/dist/{chunk-JZNEB7A7.js.map → chunk-JBLRAM7Z.js.map} +1 -1
- package/dist/{chunk-4SUKNSCY.js → chunk-JI265XFO.js} +2 -2
- package/dist/chunk-JK74QK3M.js +2 -0
- package/dist/chunk-JK74QK3M.js.map +7 -0
- package/dist/chunk-JOFQJGZK.js +2 -0
- package/dist/chunk-JOFQJGZK.js.map +7 -0
- package/dist/chunk-KCEUD232.js +2 -0
- package/dist/chunk-KCEUD232.js.map +7 -0
- package/dist/chunk-KLLAY2IM.js +2 -0
- package/dist/chunk-KLLAY2IM.js.map +7 -0
- package/dist/chunk-LBJSMXLV.js +2 -0
- package/dist/chunk-LBJSMXLV.js.map +7 -0
- package/dist/chunk-LQRFNQ2N.js +2 -0
- package/dist/chunk-LQRFNQ2N.js.map +7 -0
- package/dist/{chunk-NDBFYIL6.js → chunk-LW2WRUVL.js} +2 -2
- package/dist/{chunk-NDBFYIL6.js.map → chunk-LW2WRUVL.js.map} +2 -2
- package/dist/chunk-M242VYZA.js +2 -0
- package/dist/{chunk-XVIC24AW.js.map → chunk-M242VYZA.js.map} +1 -1
- package/dist/chunk-MB3MU6HR.js +2 -0
- package/dist/chunk-MB3MU6HR.js.map +7 -0
- package/dist/chunk-MW3RWBZ7.js +2 -0
- package/dist/chunk-MW3RWBZ7.js.map +7 -0
- package/dist/chunk-NXSTUFS7.js +2 -0
- package/dist/chunk-NXSTUFS7.js.map +7 -0
- package/dist/chunk-OEAXCCVM.js +2 -0
- package/dist/chunk-OEAXCCVM.js.map +7 -0
- package/dist/chunk-OGRFQTXA.js +2 -0
- package/dist/chunk-OGRFQTXA.js.map +7 -0
- package/dist/chunk-Q26YZYTD.js +2 -0
- package/dist/chunk-Q26YZYTD.js.map +7 -0
- package/dist/chunk-REW4LR46.js +2 -0
- package/dist/chunk-REW4LR46.js.map +7 -0
- package/dist/chunk-RNN55473.js +2 -0
- package/dist/chunk-RNN55473.js.map +7 -0
- package/dist/{chunk-6NJW7QFD.js → chunk-SA53QUBF.js} +2 -2
- package/dist/chunk-TIPK3SCJ.js +2 -0
- package/dist/chunk-TIPK3SCJ.js.map +7 -0
- package/dist/{chunk-TBLICXWW.js → chunk-TOLTUOZS.js} +2 -2
- package/dist/{chunk-DXO3UJKL.js → chunk-TZOQWCVH.js} +2 -2
- package/dist/chunk-UB5RYS7T.js +2 -0
- package/dist/chunk-UB5RYS7T.js.map +7 -0
- package/dist/chunk-UXXJOU5J.js +2 -0
- package/dist/chunk-UXXJOU5J.js.map +7 -0
- package/dist/chunk-VU3GIDZ3.js +2 -0
- package/dist/chunk-VU3GIDZ3.js.map +7 -0
- package/dist/chunk-W2BAFOCN.js +3 -0
- package/dist/chunk-W2BAFOCN.js.map +7 -0
- package/dist/{chunk-SNTHW4K2.js → chunk-W3H7GTJY.js} +2 -2
- package/dist/chunk-WFGTQZIQ.js +2 -0
- package/dist/chunk-WFGTQZIQ.js.map +7 -0
- package/dist/{chunk-ZHVSHDLH.js → chunk-XHOBNSBO.js} +2 -2
- package/dist/chunk-XX2MVWFS.js +4 -0
- package/dist/chunk-XX2MVWFS.js.map +7 -0
- package/dist/chunk-XYZ6VZ5T.js +2 -0
- package/dist/chunk-XYZ6VZ5T.js.map +7 -0
- package/dist/chunk-YBAYEU25.js +2 -0
- package/dist/chunk-YBAYEU25.js.map +7 -0
- package/dist/chunk-YF75HKL6.js +2 -0
- package/dist/chunk-YF75HKL6.js.map +7 -0
- package/dist/chunk-YHEMA56R.js +2 -0
- package/dist/{chunk-5GNEFX6F.js.map → chunk-YHEMA56R.js.map} +1 -1
- package/dist/chunk-Z2JBUHKA.js +2 -0
- package/dist/chunk-Z2JBUHKA.js.map +7 -0
- package/dist/{chunk-6O2BXCRN.js → chunk-Z2Z52GFT.js} +2 -2
- package/dist/chunk-ZPPELYNJ.js +2 -0
- package/dist/chunk-ZPPELYNJ.js.map +7 -0
- package/dist/chunk-ZVK4L5GK.js +2 -0
- package/dist/chunk-ZVK4L5GK.js.map +7 -0
- package/dist/chunk-ZWNQREWS.js +2 -0
- package/dist/chunk-ZWNQREWS.js.map +7 -0
- package/dist/components/badge.js +2 -0
- package/dist/components/badge.js.map +7 -0
- package/dist/components/breadcrumb.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/cellediting.js +2 -0
- package/dist/components/cellediting.js.map +7 -0
- package/dist/components/chat.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkboxgroup.js +2 -0
- package/dist/components/checkboxgroup.js.map +7 -0
- package/dist/components/chip.js +2 -0
- package/dist/components/chip.js.map +7 -0
- package/dist/components/codeviewer.js +2 -0
- package/dist/components/codeviewer.js.map +7 -0
- package/dist/components/combobox.js +1 -1
- package/dist/components/commandpalette.js +1 -1
- package/dist/components/container.js +1 -1
- package/dist/components/dataview.js +1 -1
- package/dist/components/datefield.js +1 -1
- package/dist/components/daterangefield.js +1 -1
- package/dist/components/dial.js +2 -0
- package/dist/components/dial.js.map +7 -0
- package/dist/components/dropdown.js +1 -1
- package/dist/components/fieldgroup.js +2 -0
- package/dist/components/fieldgroup.js.map +7 -0
- package/dist/components/fieldlist.js +2 -0
- package/dist/components/fieldlist.js.map +7 -0
- package/dist/components/fieldset.js +1 -1
- package/dist/components/filterbuilder.js +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/formactions.js +2 -0
- package/dist/components/formactions.js.map +7 -0
- package/dist/components/formerrors.js +2 -0
- package/dist/components/formerrors.js.map +7 -0
- package/dist/components/formsection.js +2 -0
- package/dist/components/formsection.js.map +7 -0
- package/dist/components/grid.js +1 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/inputgroup.js +2 -0
- package/dist/components/inputgroup.js.map +7 -0
- package/dist/components/label.js +1 -1
- package/dist/components/listbox.js +1 -1
- package/dist/components/lookupfield.js +1 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/messagebox.js +1 -1
- package/dist/components/navmenu.js +1 -1
- package/dist/components/numberfield.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/panel.js +1 -1
- package/dist/components/pickerfield.js +1 -1
- package/dist/components/radiogroup.js +1 -1
- package/dist/components/searchgrid.js +1 -1
- package/dist/components/secretfield.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/spacer.js +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/stepform.js +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/suggestfield.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/textfield.js +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toggle.js +2 -0
- package/dist/components/toggle.js.map +7 -0
- package/dist/components/toolbar.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tree.js +2 -0
- package/dist/components/tree.js.map +7 -0
- package/dist/components/viewmanager.js +1 -1
- package/dist/components/viewport.js +1 -1
- package/dist/components/widget.js +1 -1
- package/dist/components/window.js +1 -1
- package/dist/core.js +1 -1
- package/dist/css/badge.css +39 -0
- package/dist/css/base.css +71 -51
- package/dist/css/button.css +2 -0
- package/dist/css/cellediting.css +33 -0
- package/dist/css/chat.css +0 -1
- package/dist/css/checkboxgroup.css +12 -0
- package/dist/css/chip.css +64 -0
- package/dist/css/codeviewer.css +109 -0
- package/dist/css/dial.css +203 -0
- package/dist/css/fieldgroup.css +26 -0
- package/dist/css/fieldlist.css +84 -0
- package/dist/css/fieldset.css +36 -0
- package/dist/css/formactions.css +40 -0
- package/dist/css/formerrors.css +39 -0
- package/dist/css/formsection.css +45 -0
- package/dist/css/grid.css +14 -3
- package/dist/css/inputgroup.css +58 -0
- package/dist/css/menu.css +54 -0
- package/dist/css/navmenu.css +9 -7
- package/dist/css/panel.css +8 -1
- package/dist/css/stepform.css +9 -0
- package/dist/css/stepper.css +7 -2
- package/dist/css/tabs.css +12 -3
- package/dist/css/toggle.css +39 -0
- package/dist/css/tree.css +94 -0
- package/dist/css/widget.css +58 -0
- package/dist/css/window.css +4 -0
- package/dist/data.js +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +3 -3
- package/dist/optikos.css +1221 -106
- package/dist/themes/dark.css +47 -32
- package/dist/types/components/badge.d.ts +1 -0
- package/dist/types/components/base/badge/badge.d.ts +18 -0
- package/dist/types/components/base/chip/chip.d.ts +27 -0
- package/dist/types/components/base/codeviewer/codeviewer.d.ts +48 -0
- package/dist/types/components/cellediting.d.ts +1 -0
- package/dist/types/components/checkboxgroup.d.ts +1 -0
- package/dist/types/components/chip.d.ts +1 -0
- package/dist/types/components/codeviewer.d.ts +1 -0
- package/dist/types/components/data/cellediting/cellediting.d.ts +10 -0
- package/dist/types/components/data/filterbuilder/filterbuilder.d.ts +3 -1
- package/dist/types/components/data/grid/grid.d.ts +42 -16
- package/dist/types/components/data/tree/tree.d.ts +71 -0
- package/dist/types/components/dial.d.ts +1 -0
- package/dist/types/components/fieldgroup.d.ts +1 -0
- package/dist/types/components/fieldlist.d.ts +1 -0
- package/dist/types/components/fields/checkboxgroup/checkboxgroup.d.ts +27 -0
- package/dist/types/components/fields/dial/dial.d.ts +84 -0
- package/dist/types/components/fields/toggle/toggle.d.ts +9 -0
- package/dist/types/components/form/fieldgroup/fieldgroup.d.ts +33 -0
- package/dist/types/components/form/fieldlist/fieldlist.d.ts +58 -0
- package/dist/types/components/form/form/form.d.ts +19 -2
- package/dist/types/components/form/formactions/formactions.d.ts +34 -0
- package/dist/types/components/form/formerrors/formerrors.d.ts +23 -0
- package/dist/types/components/form/formsection/formsection.d.ts +26 -0
- package/dist/types/components/form/inputgroup/inputgroup.d.ts +28 -0
- package/dist/types/components/form/stepform/stepform.d.ts +30 -4
- package/dist/types/components/formactions.d.ts +1 -0
- package/dist/types/components/formerrors.d.ts +1 -0
- package/dist/types/components/formsection.d.ts +1 -0
- package/dist/types/components/inputgroup.d.ts +1 -0
- package/dist/types/components/layout/fieldset/fieldset.d.ts +9 -0
- package/dist/types/components/layout/panel/panel.d.ts +6 -0
- package/dist/types/components/layout/panel/reload.d.ts +1 -0
- package/dist/types/components/navigation/navmenu/navmenu.d.ts +6 -0
- package/dist/types/components/navigation/tabs/tabs.d.ts +8 -0
- package/dist/types/components/overlays/menu/menu.d.ts +17 -0
- package/dist/types/components/overlays/messagebox/messagebox.d.ts +8 -0
- package/dist/types/components/overlays/widget/widget.d.ts +13 -0
- package/dist/types/components/overlays/window/window.d.ts +8 -1
- package/dist/types/components/toggle.d.ts +1 -0
- package/dist/types/components/tree.d.ts +1 -0
- package/dist/types/core/component.d.ts +6 -2
- package/dist/types/core/i18n.d.ts +5 -0
- package/dist/types/core/index.d.ts +1 -1
- package/dist/types/core/position.d.ts +4 -1
- package/dist/types/data/column.d.ts +9 -4
- package/dist/types/index.d.ts +14 -0
- package/dist/types/themes/define.d.ts +4 -3
- package/dist/types/ui/enums.d.ts +0 -6
- package/dist/types/ui/ui.d.ts +12 -3
- package/dist/ui.js +1 -1
- package/package.json +6 -1
- package/dist/chunk-4COBH4QJ.js +0 -2
- package/dist/chunk-4COBH4QJ.js.map +0 -7
- package/dist/chunk-4DHQKECB.js +0 -2
- package/dist/chunk-4Q67QI7J.js +0 -2
- package/dist/chunk-4Q67QI7J.js.map +0 -7
- package/dist/chunk-5AXLYDKU.js +0 -2
- package/dist/chunk-5AXLYDKU.js.map +0 -7
- package/dist/chunk-5GNEFX6F.js +0 -2
- package/dist/chunk-5Q6Y6CM4.js +0 -2
- package/dist/chunk-5Q6Y6CM4.js.map +0 -7
- package/dist/chunk-666O2GKD.js +0 -2
- package/dist/chunk-A66MDXHL.js +0 -2
- package/dist/chunk-A66MDXHL.js.map +0 -7
- package/dist/chunk-ARCW54L2.js +0 -2
- package/dist/chunk-ARCW54L2.js.map +0 -7
- package/dist/chunk-BIYNHKSA.js +0 -2
- package/dist/chunk-BIYNHKSA.js.map +0 -7
- package/dist/chunk-BNPVRIFT.js +0 -2
- package/dist/chunk-BNPVRIFT.js.map +0 -7
- package/dist/chunk-C3N7QTQB.js +0 -2
- package/dist/chunk-C3N7QTQB.js.map +0 -7
- package/dist/chunk-CEXY5A4T.js +0 -2
- package/dist/chunk-CN7USUJR.js +0 -2
- package/dist/chunk-CN7USUJR.js.map +0 -7
- package/dist/chunk-CQRHNTEX.js +0 -2
- package/dist/chunk-CUPAPOKC.js +0 -2
- package/dist/chunk-CUPAPOKC.js.map +0 -7
- package/dist/chunk-GZNQPENR.js +0 -2
- package/dist/chunk-GZNQPENR.js.map +0 -7
- package/dist/chunk-HFFK6K4K.js +0 -2
- package/dist/chunk-HFFK6K4K.js.map +0 -7
- package/dist/chunk-IHAYOSBR.js +0 -2
- package/dist/chunk-IO66A6G5.js +0 -2
- package/dist/chunk-IO66A6G5.js.map +0 -7
- package/dist/chunk-IYPKPLCU.js.map +0 -7
- package/dist/chunk-JTYWZMSZ.js +0 -2
- package/dist/chunk-JTYWZMSZ.js.map +0 -7
- package/dist/chunk-JVEPKW5X.js +0 -2
- package/dist/chunk-JVEPKW5X.js.map +0 -7
- package/dist/chunk-JZNEB7A7.js +0 -2
- package/dist/chunk-K2DGY6MP.js +0 -2
- package/dist/chunk-K2DGY6MP.js.map +0 -7
- package/dist/chunk-LEE2FEEL.js +0 -2
- package/dist/chunk-LEE2FEEL.js.map +0 -7
- package/dist/chunk-LMGCV35W.js +0 -2
- package/dist/chunk-LMGCV35W.js.map +0 -7
- package/dist/chunk-LV6HXFHU.js.map +0 -7
- package/dist/chunk-MA5BJL3S.js +0 -2
- package/dist/chunk-MA5BJL3S.js.map +0 -7
- package/dist/chunk-NHVEP72K.js +0 -2
- package/dist/chunk-NHVEP72K.js.map +0 -7
- package/dist/chunk-O4DCHALR.js +0 -2
- package/dist/chunk-ODWPBBVL.js +0 -2
- package/dist/chunk-OW2ZSMGS.js +0 -2
- package/dist/chunk-PSPQH35P.js +0 -2
- package/dist/chunk-PSPQH35P.js.map +0 -7
- package/dist/chunk-T4OYVG2X.js +0 -2
- package/dist/chunk-T4OYVG2X.js.map +0 -7
- package/dist/chunk-TK2RC3T5.js +0 -2
- package/dist/chunk-TK2RC3T5.js.map +0 -7
- package/dist/chunk-U3X2FW6U.js +0 -2
- package/dist/chunk-U3X2FW6U.js.map +0 -7
- package/dist/chunk-UPOBGNJ5.js +0 -2
- package/dist/chunk-UPOBGNJ5.js.map +0 -7
- package/dist/chunk-XVIC24AW.js +0 -2
- package/dist/chunk-XZ5CUZZP.js +0 -2
- package/dist/chunk-XZ5CUZZP.js.map +0 -7
- package/dist/chunk-XZEOSW3Q.js +0 -2
- package/dist/chunk-XZEOSW3Q.js.map +0 -7
- package/dist/chunk-YET5PM6F.js +0 -2
- package/dist/chunk-YET5PM6F.js.map +0 -7
- package/dist/chunk-ZCAAM4NH.js +0 -2
- package/dist/chunk-ZCAAM4NH.js.map +0 -7
- package/dist/themes/brand.css +0 -240
- package/dist/themes/brutal.css +0 -100
- package/dist/themes/corporate.css +0 -112
- package/dist/themes/editorial.css +0 -110
- package/dist/themes/soft.css +0 -101
- package/dist/themes/terminal.css +0 -91
- /package/dist/{chunk-NWTTHDIM.js.map → chunk-5JEXM5S7.js.map} +0 -0
- /package/dist/{chunk-NV5AIBQP.js.map → chunk-6VBK2I5B.js.map} +0 -0
- /package/dist/{chunk-ZYUXCZX7.js.map → chunk-7KMIFXHZ.js.map} +0 -0
- /package/dist/{chunk-CEXY5A4T.js.map → chunk-ELYARUCN.js.map} +0 -0
- /package/dist/{chunk-Z25NC4CS.js.map → chunk-EV73ADN2.js.map} +0 -0
- /package/dist/{chunk-CQRHNTEX.js.map → chunk-G2KUK6AT.js.map} +0 -0
- /package/dist/{chunk-LBCWEWPN.js.map → chunk-GNU4VOOE.js.map} +0 -0
- /package/dist/{chunk-IW7PK4VS.js.map → chunk-GZ7X34QP.js.map} +0 -0
- /package/dist/{chunk-QEQIJAAB.js.map → chunk-I4SP6JTU.js.map} +0 -0
- /package/dist/{chunk-4SUKNSCY.js.map → chunk-JI265XFO.js.map} +0 -0
- /package/dist/{chunk-6NJW7QFD.js.map → chunk-SA53QUBF.js.map} +0 -0
- /package/dist/{chunk-TBLICXWW.js.map → chunk-TOLTUOZS.js.map} +0 -0
- /package/dist/{chunk-DXO3UJKL.js.map → chunk-TZOQWCVH.js.map} +0 -0
- /package/dist/{chunk-SNTHW4K2.js.map → chunk-W3H7GTJY.js.map} +0 -0
- /package/dist/{chunk-ZHVSHDLH.js.map → chunk-XHOBNSBO.js.map} +0 -0
- /package/dist/{chunk-6O2BXCRN.js.map → chunk-Z2Z52GFT.js.map} +0 -0
|
@@ -15,20 +15,35 @@ export interface FormConfig extends ContainerConfig {
|
|
|
15
15
|
tabs?: FormTab[];
|
|
16
16
|
/** Default `labelPos` for fields that do not set their own. */
|
|
17
17
|
labelPos?: 'top' | 'left';
|
|
18
|
+
/** Width of the labels on the left (`labelPos: 'left'`), so they line up in a column. Number = px. */
|
|
19
|
+
labelWidth?: number | string;
|
|
20
|
+
/** Shortcut for a responsive grid layout (one column on narrow screens); items take `colspan` (a number or `'full'`). */
|
|
21
|
+
columns?: number;
|
|
18
22
|
readonly?: boolean;
|
|
19
23
|
}
|
|
20
24
|
export declare class Form extends Container<FormConfig> {
|
|
21
25
|
protected baseCls: string;
|
|
22
26
|
protected tag: 'form';
|
|
27
|
+
/** Components hidden by their `showIf` rule: their fields do not count (no validation, not in `getValues`). */
|
|
28
|
+
private ruledOut;
|
|
29
|
+
private dirty;
|
|
23
30
|
constructor(config?: FormConfig);
|
|
24
31
|
protected build(): HTMLElement;
|
|
25
32
|
protected onRender(): void;
|
|
26
33
|
getFields(): Field<any>[];
|
|
27
34
|
getField(name: string): Field<any> | undefined;
|
|
28
|
-
/** Nested object built from field names (`address.city` → `{ address: { city } }`). */
|
|
35
|
+
/** Nested object built from field names (`address.city` → `{ address: { city } }`). Fields hidden by `showIf` are left out. */
|
|
29
36
|
getValues(opts?: {
|
|
30
37
|
dirtyOnly?: boolean;
|
|
31
38
|
}): Record<string, any>;
|
|
39
|
+
/** The fields that count: not inside something its `showIf` rule hid. */
|
|
40
|
+
private counted;
|
|
41
|
+
/** A field changed: rerun the `showIf`/`enableIf` rules and say when the form as a whole became (un)changed. */
|
|
42
|
+
private changed;
|
|
43
|
+
/** Shows/hides and enables/disables every item that has a rule, from the current values (hidden fields included). */
|
|
44
|
+
applyRules(): void;
|
|
45
|
+
/** Brings a field into view (opening its tab or step) and focuses it. */
|
|
46
|
+
focusField(field: Field<any>): void;
|
|
32
47
|
/** Sets the fields present in `values` (silently). */
|
|
33
48
|
setValues(values: Record<string, any>): void;
|
|
34
49
|
/** Fills the form from a plain object or a Model, and makes it the "clean" state. */
|
|
@@ -44,8 +59,10 @@ export declare class Form extends Container<FormConfig> {
|
|
|
44
59
|
isDirty(): boolean;
|
|
45
60
|
isValid(): boolean;
|
|
46
61
|
clearErrors(): void;
|
|
47
|
-
/** Validates every field (marks errors) and focuses the first invalid one. */
|
|
62
|
+
/** Validates every field that counts (marks errors) and focuses the first invalid one. */
|
|
48
63
|
validate(): boolean;
|
|
49
64
|
submit(): boolean;
|
|
65
|
+
/** Width of the labels on the left (number = px); they line up in a column. */
|
|
66
|
+
setLabelWidth(width: number | string): void;
|
|
50
67
|
setReadonly(readonly: boolean): void;
|
|
51
68
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Component, type ComponentConfig } from '../../../core/component.js';
|
|
2
|
+
import { type ButtonConfig } from '../../base/button/button.js';
|
|
3
|
+
import type { Form } from '../form/form.js';
|
|
4
|
+
export interface FormActionsConfig extends ComponentConfig {
|
|
5
|
+
submitText?: string;
|
|
6
|
+
/** `false` hides Cancel. */
|
|
7
|
+
cancelText?: string | false;
|
|
8
|
+
/** Extra buttons, before Cancel. */
|
|
9
|
+
buttons?: ButtonConfig[];
|
|
10
|
+
/** Sticks to the bottom of the scrolling area. */
|
|
11
|
+
sticky?: boolean;
|
|
12
|
+
/** Save is disabled until the form has changes. */
|
|
13
|
+
requireChanges?: boolean;
|
|
14
|
+
/** The "Unsaved changes" line. Default true. */
|
|
15
|
+
status?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** The form's action bar: Cancel (resets), Save (submits) and an "Unsaved changes" status. */
|
|
18
|
+
export declare class FormActions extends Component<FormActionsConfig> {
|
|
19
|
+
protected baseCls: string;
|
|
20
|
+
private statusEl;
|
|
21
|
+
private buttonsEl;
|
|
22
|
+
private form?;
|
|
23
|
+
private save;
|
|
24
|
+
private cancel?;
|
|
25
|
+
private extra;
|
|
26
|
+
protected build(): HTMLDivElement;
|
|
27
|
+
protected onRender(): void;
|
|
28
|
+
private paint;
|
|
29
|
+
getForm(): Form | undefined;
|
|
30
|
+
setSubmitText(text: string): void;
|
|
31
|
+
/** The Cancel button's text, or `false` to hide it. Cancel emits `cancel` (return false to keep the changes), then resets. */
|
|
32
|
+
setCancelText(text: string | false): void;
|
|
33
|
+
setSticky(sticky: boolean): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Component, type ComponentConfig } from '../../../core/component.js';
|
|
2
|
+
import { Field } from '../../../core/field.js';
|
|
3
|
+
export interface FormErrorsConfig extends ComponentConfig {
|
|
4
|
+
/** The heading: a function of the number of problems, or a fixed text. */
|
|
5
|
+
title?: string | ((n: number) => string);
|
|
6
|
+
/** Take the focus after a failed submit (instead of the first invalid field). */
|
|
7
|
+
focus?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** An error summary: after a failed validation, every problem as a button that takes you to its field. */
|
|
10
|
+
export declare class FormErrors extends Component<FormErrorsConfig> {
|
|
11
|
+
protected baseCls: string;
|
|
12
|
+
private titleEl;
|
|
13
|
+
private listEl;
|
|
14
|
+
private form?;
|
|
15
|
+
/** Shown only once the form was validated with errors (not while the user is still filling it in). */
|
|
16
|
+
private active;
|
|
17
|
+
protected build(): HTMLDivElement;
|
|
18
|
+
protected onRender(): void;
|
|
19
|
+
/** The form fields that have an error, in order. */
|
|
20
|
+
getErrors(): Field<any>[];
|
|
21
|
+
/** Redraws the list from the current errors (hides when there are none). */
|
|
22
|
+
refresh(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Container, type ContainerConfig } from '../../../core/container.js';
|
|
2
|
+
export interface FormSectionConfig extends ContainerConfig {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
/** Title and description in a column beside the fields (default); `false` stacks them above. */
|
|
6
|
+
aside?: boolean;
|
|
7
|
+
/** Shortcut for a responsive grid layout of the fields; items take `colspan` (a number or `'full'`). */
|
|
8
|
+
columns?: number;
|
|
9
|
+
/** A rule between consecutive sections. Default true. */
|
|
10
|
+
divider?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** A titled part of a long form, "settings page" style: title and description on the left, fields on the right. */
|
|
13
|
+
export declare class FormSection extends Container<FormSectionConfig> {
|
|
14
|
+
protected baseCls: string;
|
|
15
|
+
protected tag: 'section';
|
|
16
|
+
private titleEl;
|
|
17
|
+
private descEl;
|
|
18
|
+
private bodyEl;
|
|
19
|
+
getBody(): HTMLElement;
|
|
20
|
+
protected build(): HTMLElement;
|
|
21
|
+
protected onRender(): void;
|
|
22
|
+
setTitle(title: string): void;
|
|
23
|
+
setDescription(text: string): void;
|
|
24
|
+
/** Title beside the fields (true) or always above them (false). */
|
|
25
|
+
setAside(aside: boolean): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Container, type ContainerConfig } from '../../../core/container.js';
|
|
2
|
+
import { Field } from '../../../core/field.js';
|
|
3
|
+
/** Text joined to the input (`'R$'`, `'.com'`), or a button. */
|
|
4
|
+
export type InputAffix = string | {
|
|
5
|
+
icon?: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
handler?: (field: Field<any>) => void;
|
|
9
|
+
};
|
|
10
|
+
export interface InputGroupConfig extends ContainerConfig {
|
|
11
|
+
prefix?: InputAffix;
|
|
12
|
+
suffix?: InputAffix;
|
|
13
|
+
}
|
|
14
|
+
/** Joins text or buttons to a field's input box. The field keeps its label, help, error, name and value. */
|
|
15
|
+
export declare class InputGroup extends Container<InputGroupConfig> {
|
|
16
|
+
protected baseCls: string;
|
|
17
|
+
private affixes;
|
|
18
|
+
/** The field inside. */
|
|
19
|
+
getField(): Field<any> | undefined;
|
|
20
|
+
protected onRender(): void;
|
|
21
|
+
/** Text affixes describe the input, after the field's own help and error. */
|
|
22
|
+
private describe;
|
|
23
|
+
/** `[prefix][the field's input box][suffix]` inside the field's control. */
|
|
24
|
+
private paint;
|
|
25
|
+
private track;
|
|
26
|
+
setPrefix(prefix: InputAffix | undefined): void;
|
|
27
|
+
setSuffix(suffix: InputAffix | undefined): void;
|
|
28
|
+
}
|
|
@@ -12,7 +12,14 @@ export interface FormStep {
|
|
|
12
12
|
items: ContainerConfig['items'];
|
|
13
13
|
/** Default: two columns (one on a phone). */
|
|
14
14
|
layout?: LayoutSpec;
|
|
15
|
+
/**
|
|
16
|
+
* A check that may ask the server (an email already taken, a free slug), run when leaving the step forward and on Finish.
|
|
17
|
+
* Return `true`, a message for the whole step, or `{ field: message }`. The signal aborts when the user goes elsewhere.
|
|
18
|
+
*/
|
|
19
|
+
validate?: (values: Record<string, any>, form: StepForm, signal: AbortSignal) => StepCheck | Promise<StepCheck>;
|
|
15
20
|
}
|
|
21
|
+
/** The result of a step's `validate`: ok, a message for the whole step, or messages per field name. */
|
|
22
|
+
export type StepCheck = true | string | Record<string, string>;
|
|
16
23
|
export interface StepFormConfig extends FormConfig {
|
|
17
24
|
steps: FormStep[];
|
|
18
25
|
/** Moving forward validates the steps on the way. `false` lets the user click any step. Default true. */
|
|
@@ -25,6 +32,8 @@ export interface StepFormConfig extends FormConfig {
|
|
|
25
32
|
finishText?: string;
|
|
26
33
|
/** Shows a Cancel button (fires `cancel`). */
|
|
27
34
|
cancelText?: string;
|
|
35
|
+
/** On a new step, focus its first field (a phone keyboard pops up). Default false: the step panel gets the focus. */
|
|
36
|
+
autoFocus?: boolean;
|
|
28
37
|
}
|
|
29
38
|
/** One form, several steps: a Stepper on top, one step at a time, Back / Next / Finish, validation per step and an optional review. */
|
|
30
39
|
export declare class StepForm extends Form {
|
|
@@ -36,6 +45,11 @@ export declare class StepForm extends Form {
|
|
|
36
45
|
private nextBtn;
|
|
37
46
|
private finishBtn;
|
|
38
47
|
private index;
|
|
48
|
+
/** The step check in flight (Next waits for it; going elsewhere aborts it). */
|
|
49
|
+
private pending?;
|
|
50
|
+
/** Each step's general message (from its `validate`), shown in one alert line above the steps. */
|
|
51
|
+
private notes;
|
|
52
|
+
private noteEl?;
|
|
39
53
|
constructor(config: StepFormConfig);
|
|
40
54
|
private cfg;
|
|
41
55
|
private count;
|
|
@@ -46,10 +60,22 @@ export declare class StepForm extends Form {
|
|
|
46
60
|
private stepFields;
|
|
47
61
|
/** Validates one step's fields (marks the errors, sets its state on the stepper). */
|
|
48
62
|
validateStep(i: number): boolean;
|
|
49
|
-
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
63
|
+
/** Sets step `i`'s general message ('' clears it); it shows while that step is the current one. */
|
|
64
|
+
private note;
|
|
65
|
+
private showNote;
|
|
66
|
+
/** Busy while a step check runs: Next and Finish show their loading state. */
|
|
67
|
+
private busy;
|
|
68
|
+
/** Cancels the step check in flight, if any. */
|
|
69
|
+
private stop;
|
|
70
|
+
/** Runs step `k`'s `validate`. A failure marks the fields or shows the step's message. Resolves false when aborted too. */
|
|
71
|
+
private check;
|
|
72
|
+
/**
|
|
73
|
+
* Moves to a step. Forward with `linear` validates the steps on the way (their fields, then their `validate`) and stops
|
|
74
|
+
* at the first invalid one. Resolves with whether it got there; without a step `validate` on the way it moves at once.
|
|
75
|
+
*/
|
|
76
|
+
goTo(j: number): Promise<boolean>;
|
|
77
|
+
next(): Promise<boolean>;
|
|
78
|
+
back(): Promise<boolean>;
|
|
53
79
|
/** The card layout changed the visible step (by `goTo`, or because `validate` brought an invalid field into view). */
|
|
54
80
|
private onActivate;
|
|
55
81
|
private refreshReview;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../components/form/formactions/formactions.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../components/form/formerrors/formerrors.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../components/form/formsection/formsection.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../components/form/inputgroup/inputgroup.js';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { Container, type ContainerConfig } from '../../../core/container.js';
|
|
2
2
|
export interface FieldSetConfig extends ContainerConfig {
|
|
3
3
|
title?: string;
|
|
4
|
+
/** A line under the legend, read as the group's description. */
|
|
5
|
+
description?: string;
|
|
6
|
+
/** `box` (a framed group, default), `line` (a rule under the legend, no frame) or `plain` (just the legend). */
|
|
7
|
+
variant?: 'box' | 'line' | 'plain';
|
|
8
|
+
/** Shortcut for a responsive grid layout; items take `colspan` (a number or `'full'`). */
|
|
9
|
+
columns?: number;
|
|
4
10
|
collapsible?: boolean;
|
|
5
11
|
collapsed?: boolean;
|
|
6
12
|
}
|
|
@@ -10,10 +16,13 @@ export declare class FieldSet extends Container<FieldSetConfig> {
|
|
|
10
16
|
private legend;
|
|
11
17
|
private bodyEl;
|
|
12
18
|
private toggleBtn?;
|
|
19
|
+
private descEl;
|
|
13
20
|
getBody(): HTMLElement;
|
|
14
21
|
protected build(): HTMLElement;
|
|
15
22
|
protected onRender(): void;
|
|
16
23
|
setTitle(title: string): void;
|
|
24
|
+
setDescription(text: string): void;
|
|
25
|
+
setVariant(variant: 'box' | 'line' | 'plain'): void;
|
|
17
26
|
setCollapsed(collapsed: boolean): void;
|
|
18
27
|
collapse(): void;
|
|
19
28
|
expand(): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Container, type ContainerConfig } from '../../../core/container.js';
|
|
2
|
+
import './reload.js';
|
|
2
3
|
import { type ToolbarConfig } from '../toolbar/toolbar.js';
|
|
3
4
|
import type { ButtonConfig } from '../../base/button/button.js';
|
|
4
5
|
export interface PanelTool {
|
|
@@ -13,6 +14,9 @@ export interface PanelConfig extends ContainerConfig {
|
|
|
13
14
|
collapsed?: boolean;
|
|
14
15
|
closable?: boolean;
|
|
15
16
|
closeAction?: 'destroy' | 'hide';
|
|
17
|
+
/** A ↻ button in the header that calls `onReload` (a Promise shows the loading mask until it settles). */
|
|
18
|
+
reloadable?: boolean;
|
|
19
|
+
onReload?: (panel: Panel) => void | Promise<unknown>;
|
|
16
20
|
tools?: PanelTool[];
|
|
17
21
|
tbar?: ToolbarConfig['items'];
|
|
18
22
|
bbar?: ToolbarConfig['items'];
|
|
@@ -35,6 +39,8 @@ export declare class Panel<C extends PanelConfig = PanelConfig> extends Containe
|
|
|
35
39
|
protected onRender(): void;
|
|
36
40
|
private addTool;
|
|
37
41
|
private updateHeader;
|
|
42
|
+
/** Runs `onReload` (`before-reload` can cancel); a returned Promise keeps the loading mask (and a turning ↻) until it settles. */
|
|
43
|
+
reload(): Promise<boolean>;
|
|
38
44
|
setTitle(title: string): void;
|
|
39
45
|
setIcon(name: string): void;
|
|
40
46
|
/** Collapses/expands without events. Use `collapse()`/`expand()` for the full behavior. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -30,6 +30,10 @@ export declare class NavMenu extends Component<NavMenuConfig> {
|
|
|
30
30
|
private query;
|
|
31
31
|
private focusId?;
|
|
32
32
|
private root;
|
|
33
|
+
/** Rail mode: the floating menu of a group, and the group it belongs to. */
|
|
34
|
+
private flyout?;
|
|
35
|
+
private flyoutOf?;
|
|
36
|
+
private hoverTimer?;
|
|
33
37
|
protected onRender(): void;
|
|
34
38
|
getItem(id: string, list?: NavItem[]): NavItem | undefined;
|
|
35
39
|
private parentsOf;
|
|
@@ -54,6 +58,8 @@ export declare class NavMenu extends Component<NavMenuConfig> {
|
|
|
54
58
|
setItems(items: NavItem[]): void;
|
|
55
59
|
/** Changes an item in place (a badge, a label, disabled...). */
|
|
56
60
|
updateItem(id: string, patch: Partial<NavItem>): void;
|
|
61
|
+
/** Rail mode: a group's children in a Menu beside its icon (title as the header, badges kept). */
|
|
62
|
+
private openFlyout;
|
|
57
63
|
setCollapsed(collapsed: boolean): void;
|
|
58
64
|
/** Hides what does not match and opens the groups that have a match; empty text clears the filter. */
|
|
59
65
|
filter(text: string): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Container, type ContainerConfig } from '../../../core/container.js';
|
|
2
|
+
import '../../layout/panel/reload.js';
|
|
2
3
|
import { Component } from '../../../core/component.js';
|
|
3
4
|
import { type AnyConfig } from '../../../core/registry.js';
|
|
4
5
|
export interface TabsConfig extends ContainerConfig {
|
|
@@ -9,6 +10,8 @@ export interface TabsConfig extends ContainerConfig {
|
|
|
9
10
|
lazy?: boolean;
|
|
10
11
|
/** Default `closable` for tabs. */
|
|
11
12
|
closable?: boolean;
|
|
13
|
+
/** Default `reloadable` for tabs: a ↻ in the tab that calls the panel's `onReload`. */
|
|
14
|
+
reloadable?: boolean;
|
|
12
15
|
}
|
|
13
16
|
/**
|
|
14
17
|
* Items are the panels. Each may carry `title`, `icon`, `closable` and `disabled` for its tab header.
|
|
@@ -37,6 +40,11 @@ export declare class Tabs extends Container<TabsConfig> {
|
|
|
37
40
|
/** Activates a tab (instance, id or index). `before-change` can cancel. */
|
|
38
41
|
setActive(tab: Component | string | number): void;
|
|
39
42
|
insert(index: number, item: AnyConfig | Component | string): Component;
|
|
43
|
+
/**
|
|
44
|
+
* Reloads a tab: calls its panel's `onReload` (`before-reload` can cancel). While a returned Promise is pending the panel
|
|
45
|
+
* shows its loading mask and the tab's ↻ spins; `reload(panel)` fires when it is done.
|
|
46
|
+
*/
|
|
47
|
+
reloadTab(tab: Component | string | number): Promise<boolean>;
|
|
40
48
|
/** Closes a tab (`before-close` can cancel). The neighbor becomes active. */
|
|
41
49
|
closeTab(tab: Component | string | number): void;
|
|
42
50
|
remove(child: Component | string | number, destroy?: boolean): Component | undefined;
|
|
@@ -8,10 +8,16 @@ export interface MenuItem {
|
|
|
8
8
|
/** Present (true/false) makes it a checkable item. */
|
|
9
9
|
checked?: boolean;
|
|
10
10
|
items?: MenuEntry[];
|
|
11
|
+
/** Items with the same group sit together under its name (ungrouped items come first). */
|
|
12
|
+
group?: string;
|
|
13
|
+
/** A count or short label at the end of the row. */
|
|
14
|
+
badge?: string | number;
|
|
11
15
|
}
|
|
12
16
|
export type MenuEntry = MenuItem | '-';
|
|
13
17
|
export interface MenuConfig extends ComponentConfig {
|
|
14
18
|
items?: MenuEntry[];
|
|
19
|
+
/** A search field over the items: filters as you type; a search that names a group shows the whole group. */
|
|
20
|
+
search?: boolean;
|
|
15
21
|
}
|
|
16
22
|
/** Floating menu with submenus. Use `showBy(button)` for button menus and `showAt(x, y)` for context menus. */
|
|
17
23
|
export declare class Menu extends Component<MenuConfig> {
|
|
@@ -22,11 +28,22 @@ export declare class Menu extends Component<MenuConfig> {
|
|
|
22
28
|
private subOwner?;
|
|
23
29
|
private opener;
|
|
24
30
|
private hoverCancel?;
|
|
31
|
+
/** The `role=menu` element: the root itself, or a list under the search field. */
|
|
32
|
+
private list;
|
|
33
|
+
private searchEl?;
|
|
34
|
+
private emptyEl?;
|
|
25
35
|
protected build(): HTMLDivElement;
|
|
36
|
+
/** Without search the root is the menu; with it, the root holds the field, the menu and the "no results" line. */
|
|
37
|
+
private shell;
|
|
38
|
+
private first;
|
|
39
|
+
/** Hides the items that do not match the search (a group whose name matches keeps all of them); empty groups hide in CSS. */
|
|
40
|
+
private filter;
|
|
26
41
|
protected onRender(): void;
|
|
27
42
|
private entries;
|
|
28
43
|
private renderItems;
|
|
29
44
|
setItems(items: MenuEntry[]): void;
|
|
45
|
+
/** Turns the search field on or off. */
|
|
46
|
+
setSearch(search: boolean): void;
|
|
30
47
|
private activate;
|
|
31
48
|
private root;
|
|
32
49
|
private openSub;
|
|
@@ -18,18 +18,23 @@ export interface MessageBoxConfig {
|
|
|
18
18
|
value?: string;
|
|
19
19
|
placeholder?: string;
|
|
20
20
|
validators?: Validator<string>[];
|
|
21
|
+
autoFocus?: boolean;
|
|
21
22
|
};
|
|
22
23
|
/** Called with the pressed button id before closing; return `false` to keep the dialog open. */
|
|
23
24
|
beforeClose?: (id: string, win: Window, input?: TextField) => boolean | void;
|
|
25
|
+
/** Dim the page behind. Default false: a message is still modal, but it does not darken the screen. */
|
|
26
|
+
mask?: boolean;
|
|
24
27
|
}
|
|
25
28
|
declare function open(cfg: MessageBoxConfig): Promise<string>;
|
|
26
29
|
export interface AlertOptions {
|
|
27
30
|
title?: string;
|
|
31
|
+
mask?: boolean;
|
|
28
32
|
okText?: string;
|
|
29
33
|
icon?: string;
|
|
30
34
|
}
|
|
31
35
|
export interface ConfirmOptions {
|
|
32
36
|
title?: string;
|
|
37
|
+
mask?: boolean;
|
|
33
38
|
okText?: string;
|
|
34
39
|
cancelText?: string;
|
|
35
40
|
danger?: boolean;
|
|
@@ -37,11 +42,14 @@ export interface ConfirmOptions {
|
|
|
37
42
|
}
|
|
38
43
|
export interface PromptOptions {
|
|
39
44
|
title?: string;
|
|
45
|
+
mask?: boolean;
|
|
40
46
|
value?: string;
|
|
41
47
|
placeholder?: string;
|
|
42
48
|
okText?: string;
|
|
43
49
|
cancelText?: string;
|
|
44
50
|
validators?: Validator<string>[];
|
|
51
|
+
/** Focus the text field on open (a phone keyboard pops up). Default false: the dialog gets the focus. */
|
|
52
|
+
autoFocus?: boolean;
|
|
45
53
|
}
|
|
46
54
|
export declare const MessageBox: {
|
|
47
55
|
show: typeof open;
|
|
@@ -11,9 +11,12 @@ export interface WidgetConfig extends PanelConfig {
|
|
|
11
11
|
/** Which sides the switcher offers. Default left, right, bottom. */
|
|
12
12
|
sides?: WidgetSide[];
|
|
13
13
|
closeOnEsc?: boolean;
|
|
14
|
+
/** On open the focus goes to the widget itself; `true` focuses its first field instead. Default false. */
|
|
14
15
|
autoFocus?: boolean;
|
|
15
16
|
/** The user can move it by its header (pointer drag, or Alt+arrow keys). A move frees it from the side; `setSide` docks it again. */
|
|
16
17
|
draggable?: boolean;
|
|
18
|
+
/** The user can resize it: the inner edge while docked, a corner grip once moved; arrow keys on the handle. */
|
|
19
|
+
resizable?: boolean;
|
|
17
20
|
}
|
|
18
21
|
/** A panel that floats over the page, attached to one edge. Not modal: the page behind stays usable. */
|
|
19
22
|
export declare class Widget extends Panel<WidgetConfig> {
|
|
@@ -23,6 +26,7 @@ export declare class Widget extends Panel<WidgetConfig> {
|
|
|
23
26
|
private cancelHide?;
|
|
24
27
|
private userTools;
|
|
25
28
|
private pos?;
|
|
29
|
+
private grip?;
|
|
26
30
|
constructor(config?: WidgetConfig);
|
|
27
31
|
protected onRender(): void;
|
|
28
32
|
getSide(): WidgetSide;
|
|
@@ -38,6 +42,15 @@ export declare class Widget extends Panel<WidgetConfig> {
|
|
|
38
42
|
private moveTo;
|
|
39
43
|
private initDrag;
|
|
40
44
|
setSize(size: number | string): void;
|
|
45
|
+
/** Adds or removes the resize handle (only for a floating widget). */
|
|
46
|
+
setResizable(resizable: boolean): void;
|
|
47
|
+
/**
|
|
48
|
+
* Resizes from rect `r` by a pointer (or key) delta. Moved: the corner grip sets width and height. Docked: the inner edge
|
|
49
|
+
* sets the size, so pulling it away from the docked edge makes the widget bigger.
|
|
50
|
+
*/
|
|
51
|
+
private resizeBy;
|
|
52
|
+
/** The handle's orientation and value follow the dimension it changes. */
|
|
53
|
+
private paintGrip;
|
|
41
54
|
isOpen(): boolean;
|
|
42
55
|
open(): void;
|
|
43
56
|
/** Opens or closes (with no argument: the other one). `toggle()` stays the Panel's collapse. */
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { Panel, type PanelConfig } from '../../layout/panel/panel.js';
|
|
2
2
|
export interface WindowConfig extends PanelConfig {
|
|
3
3
|
modal?: boolean;
|
|
4
|
+
/** Dims the page behind a modal window. `false` keeps it modal (inert page, trapped focus) but clear. Default true. */
|
|
5
|
+
mask?: boolean;
|
|
4
6
|
draggable?: boolean;
|
|
5
7
|
closeOnEsc?: boolean;
|
|
6
8
|
closeOnBackdrop?: boolean;
|
|
7
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* On show the focus goes to the dialog itself (it is modal: the focus must be inside), so a phone keyboard does not
|
|
11
|
+
* pop up. `true` focuses its first field instead. Default false.
|
|
12
|
+
*/
|
|
8
13
|
autoFocus?: boolean;
|
|
9
14
|
}
|
|
10
15
|
/** Floating dialog. Modal by default: the page behind becomes inert and Tab stays inside. */
|
|
@@ -19,6 +24,8 @@ export declare class Window extends Panel<WindowConfig> {
|
|
|
19
24
|
constructor(config?: WindowConfig);
|
|
20
25
|
protected onRender(): void;
|
|
21
26
|
private initDrag;
|
|
27
|
+
/** Dims (true) or not (false) the page behind the modal window. */
|
|
28
|
+
setMask(mask: boolean): void;
|
|
22
29
|
isVisible(): boolean;
|
|
23
30
|
/** Centers in the viewport (also done on show and on resize until the user drags it). */
|
|
24
31
|
center(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../components/fields/toggle/toggle.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../components/data/tree/tree.js';
|
|
@@ -10,6 +10,10 @@ export interface ComponentConfig {
|
|
|
10
10
|
height?: number | string;
|
|
11
11
|
flex?: number | string;
|
|
12
12
|
tooltip?: string;
|
|
13
|
+
/** Inside a Form: shown only while this returns true (given the form values). A field hidden this way neither validates nor goes into `getValues`. */
|
|
14
|
+
showIf?: (values: Record<string, any>) => boolean;
|
|
15
|
+
/** Inside a Form: enabled only while this returns true (given the form values). */
|
|
16
|
+
enableIf?: (values: Record<string, any>) => boolean;
|
|
13
17
|
/** Component-scoped tokens: `{ radius: '0' }` on a button sets `--op-button-radius`. Keys starting with `--` are used as is. */
|
|
14
18
|
theme?: Record<string, string | number>;
|
|
15
19
|
/**
|
|
@@ -23,8 +27,8 @@ export interface ComponentConfig {
|
|
|
23
27
|
ariaLabel?: string;
|
|
24
28
|
/** Layout `border`: where the item goes. */
|
|
25
29
|
region?: 'north' | 'south' | 'west' | 'east' | 'center';
|
|
26
|
-
/** Layout `grid`: columns spanned. */
|
|
27
|
-
colspan?: number;
|
|
30
|
+
/** Layout `grid`: columns spanned; `'full'` takes the whole row. */
|
|
31
|
+
colspan?: number | 'full';
|
|
28
32
|
listeners?: Record<string, Handler>;
|
|
29
33
|
renderTo?: string | HTMLElement;
|
|
30
34
|
/** Free slot for application data. */
|
|
@@ -3,5 +3,10 @@ export declare const locales: Record<string, Locale>;
|
|
|
3
3
|
/** Picks a registered locale by name (`'pt-BR'`, or `'pt'` as a prefix) or merges a custom object over English. */
|
|
4
4
|
export declare function setLocale(l: string | Locale): void;
|
|
5
5
|
export declare const getLocale: () => Locale;
|
|
6
|
+
/**
|
|
7
|
+
* Adds messages to a locale (created if missing). Keys already there are kept, so an app's own overrides win.
|
|
8
|
+
* Each component registers its own keys this way, so its messages only ship with it.
|
|
9
|
+
*/
|
|
10
|
+
export declare function addMessages(lang: string, messages: Locale): void;
|
|
6
11
|
/** Translates a key, replacing `{name}` placeholders. */
|
|
7
12
|
export declare function t(key: string, vars?: Record<string, string | number>): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Emitter, type Handler } from './emitter.js';
|
|
2
2
|
export { h, attr, uid, kebab, px, clamp, type Attrs, type Child } from './dom.js';
|
|
3
|
-
export { t, setLocale, getLocale, locales, type Locale } from './i18n.js';
|
|
3
|
+
export { t, setLocale, getLocale, addMessages, locales, type Locale } from './i18n.js';
|
|
4
4
|
export { Component, type ComponentConfig, type Parent } from './component.js';
|
|
5
5
|
export { Container, type ContainerConfig } from './container.js';
|
|
6
6
|
export { register, create, getType, type AnyConfig, type ComponentClass } from './registry.js';
|
|
@@ -7,7 +7,10 @@ export interface PlaceOptions {
|
|
|
7
7
|
matchWidth?: boolean;
|
|
8
8
|
margin?: number;
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Positions a floating element (`position: fixed`) next to an anchor element or a point, flipping and clamping to the viewport.
|
|
12
|
+
* Taller than the room on either side (a long menu, a big theme): it goes where there is more room, capped to it, and scrolls.
|
|
13
|
+
*/
|
|
11
14
|
export declare function place(el: HTMLElement, anchor: Element | {
|
|
12
15
|
x: number;
|
|
13
16
|
y: number;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type Formatter } from './format.js';
|
|
2
2
|
import type { Model } from './model.js';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/** A grid/table column. `T` is the record shape: `field` then autocompletes its keys (any string still works). */
|
|
4
|
+
export interface Column<T extends Record<string, any> = any> {
|
|
5
|
+
field: Extract<keyof T, string> | (string & {});
|
|
5
6
|
header?: string;
|
|
6
7
|
/** Fixed width in px. */
|
|
7
8
|
width?: number;
|
|
@@ -20,8 +21,12 @@ export interface Column {
|
|
|
20
21
|
/** Name registered with `registerFormat` (`money`, `date`, `number`, `percent`, `bool`) or a function. */
|
|
21
22
|
format?: string | Formatter;
|
|
22
23
|
/** Full control over the cell content. Text is escaped; return a Node for markup. */
|
|
23
|
-
renderer?: (value: any, rec: Model
|
|
24
|
+
renderer?: (value: any, rec: Model<T>, col: Column<T>) => string | Node;
|
|
24
25
|
cls?: string;
|
|
26
|
+
/** With the `cellEditing()` grid plugin: `true` (an editor for the value's type), a field type (`'select'`) or a field config. */
|
|
27
|
+
editor?: boolean | string | Record<string, any>;
|
|
28
|
+
/** With `cellEditing()`: whether this record's cell can be edited (default: every record, when `editor` is set). */
|
|
29
|
+
editable?: (rec: Model<T>) => boolean;
|
|
25
30
|
}
|
|
26
31
|
/** Cell content for a record: `renderer` first, then `format`, then the plain value. */
|
|
27
|
-
export declare function cellContent(col: Column
|
|
32
|
+
export declare function cellContent<T extends Record<string, any>>(col: Column<T>, rec: Model<T>): string | Node;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,23 +3,30 @@ export * from './data/index.js';
|
|
|
3
3
|
export * from './themes/index.js';
|
|
4
4
|
export * from './motion/index.js';
|
|
5
5
|
export * from './ui/index.js';
|
|
6
|
+
export * from './components/base/badge/badge.js';
|
|
6
7
|
export * from './components/base/button/button.js';
|
|
8
|
+
export * from './components/base/chip/chip.js';
|
|
9
|
+
export * from './components/base/codeviewer/codeviewer.js';
|
|
7
10
|
export * from './components/base/icon/icon.js';
|
|
8
11
|
export * from './components/base/label/label.js';
|
|
9
12
|
export * from './components/chat/chat/chat.js';
|
|
13
|
+
export * from './components/data/cellediting/cellediting.js';
|
|
10
14
|
export * from './components/data/dataview/dataview.js';
|
|
11
15
|
export * from './components/data/filterbuilder/filterbuilder.js';
|
|
12
16
|
export * from './components/data/grid/grid.js';
|
|
13
17
|
export * from './components/data/pagination/pagination.js';
|
|
14
18
|
export * from './components/data/searchgrid/searchgrid.js';
|
|
15
19
|
export * from './components/data/table/table.js';
|
|
20
|
+
export * from './components/data/tree/tree.js';
|
|
16
21
|
export * from './components/data/viewmanager/viewmanager.js';
|
|
17
22
|
export * from './components/dates/calendar/calendar.js';
|
|
18
23
|
export * from './components/feedback/spinner/spinner.js';
|
|
19
24
|
export * from './components/fields/checkbox/checkbox.js';
|
|
25
|
+
export * from './components/fields/checkboxgroup/checkboxgroup.js';
|
|
20
26
|
export * from './components/fields/combobox/combobox.js';
|
|
21
27
|
export * from './components/fields/datefield/datefield.js';
|
|
22
28
|
export * from './components/fields/daterangefield/daterangefield.js';
|
|
29
|
+
export * from './components/fields/dial/dial.js';
|
|
23
30
|
export * from './components/fields/listbox/listbox.js';
|
|
24
31
|
export * from './components/fields/lookupfield/lookupfield.js';
|
|
25
32
|
export * from './components/fields/numberfield/numberfield.js';
|
|
@@ -31,7 +38,14 @@ export * from './components/fields/slider/slider.js';
|
|
|
31
38
|
export * from './components/fields/suggestfield/suggestfield.js';
|
|
32
39
|
export * from './components/fields/textarea/textarea.js';
|
|
33
40
|
export * from './components/fields/textfield/textfield.js';
|
|
41
|
+
export * from './components/fields/toggle/toggle.js';
|
|
42
|
+
export * from './components/form/fieldgroup/fieldgroup.js';
|
|
43
|
+
export * from './components/form/fieldlist/fieldlist.js';
|
|
34
44
|
export * from './components/form/form/form.js';
|
|
45
|
+
export * from './components/form/formactions/formactions.js';
|
|
46
|
+
export * from './components/form/formerrors/formerrors.js';
|
|
47
|
+
export * from './components/form/formsection/formsection.js';
|
|
48
|
+
export * from './components/form/inputgroup/inputgroup.js';
|
|
35
49
|
export * from './components/form/stepform/stepform.js';
|
|
36
50
|
export * from './components/layout/container/container.js';
|
|
37
51
|
export * from './components/layout/fieldset/fieldset.js';
|
|
@@ -5,11 +5,12 @@ export interface ThemeDefinition {
|
|
|
5
5
|
color?: Partial<Record<ColorToken | string, string>>;
|
|
6
6
|
font?: Values;
|
|
7
7
|
space?: Values;
|
|
8
|
-
radius
|
|
8
|
+
/** `radius: '0.5rem'` sets `--op-radius`; `radius: { sm, lg, pill }` sets `--op-radius-sm`... */
|
|
9
|
+
radius?: Values | string | number;
|
|
9
10
|
shadow?: Values;
|
|
10
11
|
control?: Values;
|
|
11
|
-
/** Any other key is a component scope: `{ button: { radius: 0 } }` → `--op-button-radius`. */
|
|
12
|
-
[group: string]: Values | undefined;
|
|
12
|
+
/** Any other key is a component scope: `{ button: { radius: 0 } }` → `--op-button-radius`. A plain value sets the group's own token (`{ radius: 0 }` → `--op-radius`). */
|
|
13
|
+
[group: string]: Values | string | number | undefined;
|
|
13
14
|
}
|
|
14
15
|
export interface Theme {
|
|
15
16
|
name: string;
|