@vuer-ai/vuer-uikit 0.0.109 → 0.0.113
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/dist/SyncScroll/SyncScroll.cjs +1 -1
- package/dist/SyncScroll/SyncScroll.mjs +1 -1
- package/dist/SyncScroll/index.cjs +1 -1
- package/dist/SyncScroll/index.mjs +1 -1
- package/dist/auth/components/index.cjs +128 -0
- package/dist/auth/components/index.d.cts +2 -0
- package/dist/auth/components/index.d.ts +2 -0
- package/dist/auth/components/index.mjs +119 -0
- package/dist/auth/components/user-avatar/index.cjs +127 -0
- package/dist/auth/components/user-avatar/index.d.cts +8 -0
- package/dist/auth/components/user-avatar/index.d.ts +8 -0
- package/dist/auth/components/user-avatar/index.mjs +118 -0
- package/dist/auth/context/user-context.cjs +10 -0
- package/dist/auth/context/{auth-context.d.cts → user-context.d.cts} +3 -3
- package/dist/auth/context/{auth-context.d.ts → user-context.d.ts} +3 -3
- package/dist/auth/context/user-context.mjs +1 -0
- package/dist/auth/handler/fetch-auth.cjs +11 -0
- package/dist/auth/handler/fetch-auth.d.cts +3 -0
- package/dist/auth/handler/fetch-auth.d.ts +3 -0
- package/dist/auth/handler/fetch-auth.mjs +2 -0
- package/dist/auth/handler/fetch-server.cjs +11 -0
- package/dist/auth/handler/fetch-server.d.cts +3 -0
- package/dist/auth/handler/fetch-server.d.ts +3 -0
- package/dist/auth/handler/fetch-server.mjs +2 -0
- package/dist/auth/handler/get-session.cjs +4 -3
- package/dist/auth/handler/get-session.d.cts +1 -1
- package/dist/auth/handler/get-session.d.ts +1 -1
- package/dist/auth/handler/get-session.mjs +3 -2
- package/dist/auth/handler/get-sessions.cjs +12 -0
- package/dist/auth/handler/get-sessions.d.cts +19 -0
- package/dist/auth/handler/get-sessions.d.ts +19 -0
- package/dist/auth/handler/get-sessions.mjs +3 -0
- package/dist/auth/handler/sign-in-handler.cjs +3 -3
- package/dist/auth/handler/sign-in-handler.d.cts +2 -2
- package/dist/auth/handler/sign-in-handler.d.ts +2 -2
- package/dist/auth/handler/sign-in-handler.mjs +2 -2
- package/dist/auth/handler/sign-out-handler.cjs +4 -3
- package/dist/auth/handler/sign-out-handler.mjs +3 -2
- package/dist/auth/hooks/use-sign-in.cjs +14 -0
- package/dist/auth/hooks/use-sign-in.d.cts +9 -0
- package/dist/auth/hooks/use-sign-in.d.ts +9 -0
- package/dist/auth/hooks/use-sign-in.mjs +5 -0
- package/dist/auth/hooks/use-sign-out.cjs +15 -0
- package/dist/auth/hooks/use-sign-out.d.cts +6 -0
- package/dist/auth/hooks/use-sign-out.d.ts +6 -0
- package/dist/auth/hooks/use-sign-out.mjs +6 -0
- package/dist/auth/hooks/use-user.cjs +11 -0
- package/dist/auth/hooks/use-user.d.cts +8 -0
- package/dist/auth/hooks/use-user.d.ts +8 -0
- package/dist/auth/hooks/use-user.mjs +2 -0
- package/dist/auth/hooks/use-vuer-sessions.cjs +15 -0
- package/dist/auth/hooks/use-vuer-sessions.d.cts +9 -0
- package/dist/auth/hooks/use-vuer-sessions.d.ts +9 -0
- package/dist/auth/hooks/use-vuer-sessions.mjs +6 -0
- package/dist/auth/index.cjs +151 -15
- package/dist/auth/index.d.cts +10 -6
- package/dist/auth/index.d.ts +10 -6
- package/dist/auth/index.mjs +124 -8
- package/dist/auth/localstorage-key.cjs +6 -2
- package/dist/auth/localstorage-key.d.cts +2 -1
- package/dist/auth/localstorage-key.d.ts +2 -1
- package/dist/auth/localstorage-key.mjs +1 -1
- package/dist/auth/vuer-user-provider.cjs +14 -0
- package/dist/auth/{vuer-auth-provider.d.cts → vuer-user-provider.d.cts} +2 -2
- package/dist/auth/{vuer-auth-provider.d.ts → vuer-user-provider.d.ts} +2 -2
- package/dist/auth/vuer-user-provider.mjs +5 -0
- package/dist/{chunk-2EG65KGO.cjs → chunk-2MSGENAQ.cjs} +2 -2
- package/dist/{chunk-VUMOJPEC.mjs → chunk-2SFB7HHW.mjs} +1 -1
- package/dist/chunk-3WMO5QJJ.cjs +8 -0
- package/dist/{chunk-5XBMFADS.cjs → chunk-4GVFCQGI.cjs} +2 -2
- package/dist/chunk-4JZOPZHB.cjs +30 -0
- package/dist/{chunk-MIT3YWUC.cjs → chunk-4LQDOYQJ.cjs} +2 -2
- package/dist/{chunk-5MBEK77I.mjs → chunk-57MAUYQZ.mjs} +9 -2
- package/dist/chunk-5OHAV55L.mjs +24 -0
- package/dist/{chunk-EAXBNWXE.cjs → chunk-5VUM46YD.cjs} +2 -2
- package/dist/{chunk-64L2SNKA.cjs → chunk-6D66V6ON.cjs} +2 -2
- package/dist/chunk-6GJM7TPE.cjs +28 -0
- package/dist/{chunk-GOGJVFRN.cjs → chunk-6IXKC64S.cjs} +4 -4
- package/dist/chunk-7E5Y224I.cjs +14 -0
- package/dist/{chunk-D5WOPTKY.cjs → chunk-7NUXYKXU.cjs} +2 -2
- package/dist/chunk-7R5HY3IM.cjs +12 -0
- package/dist/{chunk-3VVQWVDE.mjs → chunk-7XXTMBF5.mjs} +1 -1
- package/dist/{chunk-CZ4GQOXG.mjs → chunk-AAFU2FII.mjs} +2 -2
- package/dist/{chunk-4THQPG6Y.mjs → chunk-ACETEVZD.mjs} +1 -1
- package/dist/{chunk-SYX6TMCQ.mjs → chunk-AGHIJQAR.mjs} +1 -1
- package/dist/chunk-APC2GIE7.cjs +58 -0
- package/dist/{chunk-JFJRNNPQ.cjs → chunk-AW6Q4IWT.cjs} +2 -2
- package/dist/{chunk-ACYZOKPT.mjs → chunk-BBWT5YO2.mjs} +2 -2
- package/dist/{chunk-6XOTWZFC.mjs → chunk-BCA45QEW.mjs} +2 -2
- package/dist/{chunk-LFSCJLL2.cjs → chunk-BDAKLXXX.cjs} +9 -2
- package/dist/chunk-BI4QZVVB.cjs +82 -0
- package/dist/{chunk-ZRRCYQ53.cjs → chunk-BTXD3NAG.cjs} +3 -3
- package/dist/{chunk-7RHQ6DVU.cjs → chunk-CGBEPOL4.cjs} +21 -9
- package/dist/{chunk-QZUTRJSP.mjs → chunk-DHMLQTQ6.mjs} +2 -2
- package/dist/{chunk-OLVOIUCE.mjs → chunk-DT2LGZ5H.mjs} +3 -3
- package/dist/{chunk-KBC7VNER.mjs → chunk-ECOYNCWG.mjs} +1 -1
- package/dist/{chunk-SVWS4AL6.cjs → chunk-F4Z5KATZ.cjs} +2 -0
- package/dist/{chunk-NRQJX772.mjs → chunk-FB5MYIVE.mjs} +1 -0
- package/dist/chunk-FRAD2Z2G.mjs +43 -0
- package/dist/chunk-FROQ45MN.mjs +6 -0
- package/dist/chunk-G6ATG2WV.mjs +28 -0
- package/dist/chunk-GBERXSLI.cjs +53 -0
- package/dist/{chunk-TPAV6PXI.mjs → chunk-GF7EZ6DO.mjs} +2 -2
- package/dist/{chunk-EXQQRW7T.mjs → chunk-GSQE4JVF.mjs} +1 -1
- package/dist/{chunk-5HS4PMUR.mjs → chunk-GUSUTH7D.mjs} +16 -11
- package/dist/{chunk-IXNXSECD.mjs → chunk-H2AJ2CLT.mjs} +1 -1
- package/dist/{chunk-SHT4BJOB.cjs → chunk-H7H6MSWG.cjs} +2 -2
- package/dist/{chunk-SUEFWFPX.mjs → chunk-HFGRTWTD.mjs} +2 -2
- package/dist/chunk-HOMAESTR.mjs +12 -0
- package/dist/{chunk-T2D6PSA6.cjs → chunk-I2YVC4AE.cjs} +17 -12
- package/dist/{chunk-4JGGLCXT.mjs → chunk-JH5NAW2V.mjs} +1 -1
- package/dist/{chunk-QIYGXPLM.cjs → chunk-JHUVVUO4.cjs} +130 -178
- package/dist/chunk-JTJKIRFA.mjs +56 -0
- package/dist/chunk-KIZEJMW4.cjs +15 -0
- package/dist/{chunk-JYIVDUDL.cjs → chunk-KOMVGDDW.cjs} +4 -4
- package/dist/{chunk-ZNM6PNI6.mjs → chunk-KS5A3G7B.mjs} +1 -1
- package/dist/{chunk-4WRTIOGZ.cjs → chunk-KT772L2I.cjs} +6 -6
- package/dist/{chunk-NSUFTZNC.cjs → chunk-L2YLNWCQ.cjs} +2 -2
- package/dist/chunk-L3YEIRJS.mjs +31 -0
- package/dist/chunk-L4CIN7FR.mjs +96 -0
- package/dist/{chunk-6QU4J3HY.cjs → chunk-LBRS745M.cjs} +9 -9
- package/dist/{chunk-ASR6OXVT.cjs → chunk-LI5W744D.cjs} +8 -1
- package/dist/{chunk-UASPJ57U.cjs → chunk-LPKVKTOK.cjs} +1 -0
- package/dist/chunk-LUVD54GO.cjs +47 -0
- package/dist/{chunk-5JPYU5A6.cjs → chunk-LV4XJY75.cjs} +11 -11
- package/dist/{chunk-AOV3ADTV.cjs → chunk-M45UXJWX.cjs} +2 -2
- package/dist/{chunk-7HOEFGEO.mjs → chunk-MGFG7EXC.mjs} +1 -1
- package/dist/chunk-MO5V43Z3.mjs +13 -0
- package/dist/chunk-MRMSCW3P.cjs +19 -0
- package/dist/{chunk-WRKB3W2J.cjs → chunk-MTZQ4C2U.cjs} +6 -6
- package/dist/{chunk-AJQEHMYV.cjs → chunk-NIEFMP5V.cjs} +2 -2
- package/dist/chunk-NJXBYRKZ.mjs +80 -0
- package/dist/{chunk-S7SGB2FD.mjs → chunk-O7FGA5N2.mjs} +4 -4
- package/dist/chunk-OOHCJIRV.cjs +26 -0
- package/dist/chunk-PFIP3ETQ.cjs +55 -0
- package/dist/{chunk-RIJUPORK.mjs → chunk-PJJSHHL6.mjs} +1 -1
- package/dist/{chunk-RA6QMOFM.mjs → chunk-PMOHNMZK.mjs} +76 -123
- package/dist/{chunk-CGUQWS2I.mjs → chunk-PTBMSYQQ.mjs} +1 -1
- package/dist/chunk-PX2H7Z4D.mjs +26 -0
- package/dist/chunk-PXDT5GFJ.mjs +13 -0
- package/dist/{chunk-HN3AMWUM.cjs → chunk-Q5PJKBX7.cjs} +2 -2
- package/dist/chunk-Q76WU4DL.cjs +17 -0
- package/dist/{chunk-Y2H4A5AC.mjs → chunk-R2QXIDY2.mjs} +2 -2
- package/dist/{chunk-K2OC2HWQ.mjs → chunk-RFRBGVBZ.mjs} +19 -7
- package/dist/{chunk-7GJVMFKJ.cjs → chunk-ROY7233C.cjs} +4 -4
- package/dist/{chunk-HBIZQDDS.cjs → chunk-RQH7ZAWF.cjs} +2 -2
- package/dist/{chunk-PB4UO2NR.cjs → chunk-RSBVQ7SJ.cjs} +9 -10
- package/dist/{chunk-A2UZY7Y2.cjs → chunk-S5XJOGB4.cjs} +2 -2
- package/dist/chunk-SO2UTKSV.mjs +17 -0
- package/dist/{chunk-JFIAWTRH.cjs → chunk-SU57ZAZJ.cjs} +2 -2
- package/dist/{chunk-MG5TTPA7.mjs → chunk-SWJHOFZH.mjs} +6 -6
- package/dist/{chunk-PTCDBU72.cjs → chunk-TYZHIBYI.cjs} +2 -2
- package/dist/{chunk-IY36FZ5R.mjs → chunk-TZBOF3XO.mjs} +1 -1
- package/dist/{chunk-276VJZCV.mjs → chunk-UT7B4TLZ.mjs} +2 -1
- package/dist/{chunk-DQUI3PIU.mjs → chunk-UTWPMYGN.mjs} +2 -2
- package/dist/{chunk-XGM57WPN.mjs → chunk-V4KDK3BN.mjs} +8 -9
- package/dist/chunk-V5YUFNEB.mjs +53 -0
- package/dist/{chunk-VLOFKTSL.cjs → chunk-VEE2QBS5.cjs} +3 -3
- package/dist/{chunk-3IVDCAFM.mjs → chunk-VSFPXAGN.mjs} +4 -4
- package/dist/{chunk-LQGXG373.cjs → chunk-WB43VEZA.cjs} +21 -3
- package/dist/{chunk-YPQEJEB7.mjs → chunk-WGWNYPXW.mjs} +8 -1
- package/dist/{chunk-24IUD6Q3.mjs → chunk-WQCVK4PG.mjs} +1 -1
- package/dist/{chunk-5PHGYFZ3.cjs → chunk-WXJXXRPL.cjs} +2 -2
- package/dist/chunk-X3H6FYAM.cjs +15 -0
- package/dist/{chunk-LRSDE62T.mjs → chunk-XMQULAAU.mjs} +21 -3
- package/dist/chunk-YWECB5GR.cjs +2 -0
- package/dist/chunk-YYLBP356.mjs +1 -0
- package/dist/{chunk-2PJO5UJL.cjs → chunk-YZINVGLW.cjs} +11 -11
- package/dist/{chunk-JUSFLIU5.mjs → chunk-Z4ZGX3NM.mjs} +1 -1
- package/dist/chunk-Z7BZFZEV.mjs +15 -0
- package/dist/{chunk-VEWWUO2N.mjs → chunk-ZDSN4IFT.mjs} +1 -1
- package/dist/{chunk-PTGMHZFS.mjs → chunk-ZEBAIL6F.mjs} +1 -1
- package/dist/{chunk-2WD4ZL27.cjs → chunk-ZGS3VGGN.cjs} +4 -4
- package/dist/{chunk-Y5SVZCPQ.cjs → chunk-ZJ5SNYAO.cjs} +7 -7
- package/dist/{chunk-3TUONMQ6.mjs → chunk-ZRMDDK6J.mjs} +1 -1
- package/dist/chunk-ZXIKMZPH.cjs +99 -0
- package/dist/dial/DialPanel.cjs +51 -49
- package/dist/dial/DialPanel.d.cts +1 -0
- package/dist/dial/DialPanel.d.ts +1 -0
- package/dist/dial/DialPanel.mjs +50 -48
- package/dist/dial/DialProvider.cjs +3 -3
- package/dist/dial/DialProvider.d.cts +3 -2
- package/dist/dial/DialProvider.d.ts +3 -2
- package/dist/dial/DialProvider.example.cjs +4 -4
- package/dist/dial/DialProvider.example.mjs +1 -1
- package/dist/dial/DialProvider.mjs +1 -1
- package/dist/dial/index.cjs +69 -67
- package/dist/dial/index.d.cts +1 -0
- package/dist/dial/index.d.ts +1 -0
- package/dist/dial/index.mjs +50 -48
- package/dist/dial/wrapped-inputs/ControlledInputs.cjs +55 -53
- package/dist/dial/wrapped-inputs/ControlledInputs.d.cts +10 -9
- package/dist/dial/wrapped-inputs/ControlledInputs.d.ts +10 -9
- package/dist/dial/wrapped-inputs/ControlledInputs.mjs +50 -48
- package/dist/dial/wrapped-inputs/DialInputs.cjs +64 -62
- package/dist/dial/wrapped-inputs/DialInputs.d.cts +1 -0
- package/dist/dial/wrapped-inputs/DialInputs.d.ts +1 -0
- package/dist/dial/wrapped-inputs/DialInputs.mjs +50 -48
- package/dist/dial/wrapped-inputs/DialPresetsInput.cjs +45 -49
- package/dist/dial/wrapped-inputs/DialPresetsInput.d.cts +3 -3
- package/dist/dial/wrapped-inputs/DialPresetsInput.d.ts +3 -3
- package/dist/dial/wrapped-inputs/DialPresetsInput.mjs +44 -48
- package/dist/dial/wrapped-inputs/DialVectorInput.cjs +51 -49
- package/dist/dial/wrapped-inputs/DialVectorInput.d.cts +1 -0
- package/dist/dial/wrapped-inputs/DialVectorInput.d.ts +1 -0
- package/dist/dial/wrapped-inputs/DialVectorInput.mjs +50 -48
- package/dist/dial/wrapped-inputs/index.cjs +74 -72
- package/dist/dial/wrapped-inputs/index.d.cts +1 -0
- package/dist/dial/wrapped-inputs/index.d.ts +1 -0
- package/dist/dial/wrapped-inputs/index.mjs +50 -48
- package/dist/highlight-cursor/enhanced-components.cjs +12 -12
- package/dist/highlight-cursor/enhanced-components.mjs +7 -7
- package/dist/highlight-cursor/index.cjs +16 -16
- package/dist/highlight-cursor/index.mjs +7 -7
- package/dist/hooks/index.cjs +5 -5
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.cjs +210 -228
- package/dist/index.css +3 -3
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.mjs +50 -48
- package/dist/styles/theme.css +3 -3
- package/dist/ui/DialBadge.cjs +6 -6
- package/dist/ui/DialBadge.mjs +2 -2
- package/dist/ui/UIKitBadge.cjs +6 -6
- package/dist/ui/UIKitBadge.mjs +2 -2
- package/dist/ui/avatar.cjs +1 -1
- package/dist/ui/avatar.mjs +1 -1
- package/dist/ui/badge.cjs +1 -1
- package/dist/ui/badge.mjs +1 -1
- package/dist/ui/button.cjs +4 -4
- package/dist/ui/button.mjs +2 -2
- package/dist/ui/card.cjs +9 -9
- package/dist/ui/card.mjs +2 -2
- package/dist/ui/checkbox.cjs +1 -1
- package/dist/ui/checkbox.mjs +1 -1
- package/dist/ui/collapsible.cjs +1 -1
- package/dist/ui/collapsible.mjs +1 -1
- package/dist/ui/drawer.cjs +1 -1
- package/dist/ui/drawer.mjs +1 -1
- package/dist/ui/dropdown.cjs +1 -1
- package/dist/ui/dropdown.mjs +1 -1
- package/dist/ui/index.cjs +150 -169
- package/dist/ui/index.d.cts +4 -1
- package/dist/ui/index.d.ts +4 -1
- package/dist/ui/index.mjs +42 -41
- package/dist/ui/inputs/color-input.cjs +4 -4
- package/dist/ui/inputs/color-input.mjs +3 -3
- package/dist/ui/inputs/index.cjs +45 -45
- package/dist/ui/inputs/index.mjs +21 -21
- package/dist/ui/inputs/input-numbers.cjs +4 -4
- package/dist/ui/inputs/input-numbers.mjs +3 -3
- package/dist/ui/inputs/input.cjs +5 -5
- package/dist/ui/inputs/input.mjs +2 -2
- package/dist/ui/inputs/number-inputs/CmInput.cjs +5 -5
- package/dist/ui/inputs/number-inputs/CmInput.mjs +4 -4
- package/dist/ui/inputs/number-inputs/DegInput.cjs +5 -5
- package/dist/ui/inputs/number-inputs/DegInput.mjs +4 -4
- package/dist/ui/inputs/number-inputs/EulerDegInput.cjs +7 -7
- package/dist/ui/inputs/number-inputs/EulerDegInput.mjs +6 -6
- package/dist/ui/inputs/number-inputs/EulerInput.cjs +6 -6
- package/dist/ui/inputs/number-inputs/EulerInput.mjs +5 -5
- package/dist/ui/inputs/number-inputs/EulerRadInput.cjs +6 -6
- package/dist/ui/inputs/number-inputs/EulerRadInput.mjs +5 -5
- package/dist/ui/inputs/number-inputs/InchInput.cjs +5 -5
- package/dist/ui/inputs/number-inputs/InchInput.mjs +4 -4
- package/dist/ui/inputs/number-inputs/IntInput.cjs +5 -5
- package/dist/ui/inputs/number-inputs/IntInput.mjs +4 -4
- package/dist/ui/inputs/number-inputs/KVectorInput.cjs +6 -6
- package/dist/ui/inputs/number-inputs/KVectorInput.mjs +5 -5
- package/dist/ui/inputs/number-inputs/QuaternionInput.cjs +6 -6
- package/dist/ui/inputs/number-inputs/QuaternionInput.mjs +5 -5
- package/dist/ui/inputs/number-inputs/RadInput.cjs +5 -5
- package/dist/ui/inputs/number-inputs/RadInput.mjs +4 -4
- package/dist/ui/inputs/number-inputs/TimeInput.cjs +5 -5
- package/dist/ui/inputs/number-inputs/TimeInput.mjs +4 -4
- package/dist/ui/inputs/number-inputs/Vec3Input.cjs +6 -6
- package/dist/ui/inputs/number-inputs/Vec3Input.mjs +5 -5
- package/dist/ui/inputs/number-inputs/VectorInput.cjs +5 -5
- package/dist/ui/inputs/number-inputs/VectorInput.mjs +4 -4
- package/dist/ui/inputs/number-inputs/index.cjs +29 -29
- package/dist/ui/inputs/number-inputs/index.mjs +16 -16
- package/dist/ui/inputs/presets-input.cjs +6 -6
- package/dist/ui/inputs/presets-input.mjs +5 -5
- package/dist/ui/inputs/presets-rad-input.cjs +7 -7
- package/dist/ui/inputs/presets-rad-input.mjs +6 -6
- package/dist/ui/inputs/text-input.cjs +4 -4
- package/dist/ui/inputs/text-input.mjs +3 -3
- package/dist/ui/label.cjs +3 -3
- package/dist/ui/label.mjs +2 -2
- package/dist/ui/layout.cjs +3 -3
- package/dist/ui/layout.mjs +2 -2
- package/dist/ui/layouts/dock-layout/DockLayoutView.cjs +1 -1
- package/dist/ui/layouts/dock-layout/DockLayoutView.mjs +1 -1
- package/dist/ui/layouts/dock-layout/LayoutSlots.cjs +1 -1
- package/dist/ui/layouts/dock-layout/LayoutSlots.mjs +1 -1
- package/dist/ui/layouts/dock-layout/index.cjs +1 -1
- package/dist/ui/layouts/dock-layout/index.mjs +1 -1
- package/dist/ui/layouts/index.cjs +1 -1
- package/dist/ui/layouts/index.mjs +1 -1
- package/dist/ui/layouts/liquid-layout/LayoutSlots.cjs +1 -1
- package/dist/ui/layouts/liquid-layout/LayoutSlots.mjs +1 -1
- package/dist/ui/layouts/liquid-layout/LiquidLayoutView.cjs +1 -1
- package/dist/ui/layouts/liquid-layout/LiquidLayoutView.mjs +1 -1
- package/dist/ui/layouts/liquid-layout/index.cjs +1 -1
- package/dist/ui/layouts/liquid-layout/index.mjs +1 -1
- package/dist/ui/modal.cjs +1 -1
- package/dist/ui/modal.mjs +1 -1
- package/dist/ui/navigation.cjs +4 -4
- package/dist/ui/navigation.mjs +3 -3
- package/dist/ui/pagination.cjs +10 -10
- package/dist/ui/pagination.mjs +3 -3
- package/dist/ui/popover.cjs +1 -1
- package/dist/ui/popover.mjs +1 -1
- package/dist/ui/progress.cjs +20 -0
- package/dist/ui/progress.d.cts +7 -0
- package/dist/ui/progress.d.ts +7 -0
- package/dist/ui/{panel.mjs → progress.mjs} +2 -2
- package/dist/ui/radio-group.cjs +1 -1
- package/dist/ui/radio-group.mjs +1 -1
- package/dist/ui/resizable.cjs +1 -1
- package/dist/ui/resizable.mjs +1 -1
- package/dist/ui/select.cjs +1 -1
- package/dist/ui/select.mjs +1 -1
- package/dist/ui/separator.cjs +1 -1
- package/dist/ui/separator.mjs +1 -1
- package/dist/ui/sheet.cjs +1 -1
- package/dist/ui/sheet.mjs +1 -1
- package/dist/ui/sidebar.cjs +29 -29
- package/dist/ui/sidebar.mjs +5 -5
- package/dist/ui/simple-tree-view.cjs +1 -1
- package/dist/ui/simple-tree-view.mjs +1 -1
- package/dist/ui/skeleton.cjs +1 -1
- package/dist/ui/skeleton.mjs +1 -1
- package/dist/ui/slider.cjs +1 -1
- package/dist/ui/slider.mjs +1 -1
- package/dist/ui/spinner.cjs +10 -0
- package/dist/ui/spinner.d.cts +7 -0
- package/dist/ui/spinner.d.ts +7 -0
- package/dist/ui/spinner.mjs +1 -0
- package/dist/ui/switch.cjs +1 -1
- package/dist/ui/switch.mjs +1 -1
- package/dist/ui/table.cjs +1 -1
- package/dist/ui/table.mjs +1 -1
- package/dist/ui/tabs.cjs +1 -1
- package/dist/ui/tabs.mjs +1 -1
- package/dist/ui/textarea.cjs +1 -1
- package/dist/ui/textarea.mjs +1 -1
- package/dist/ui/theme/ThemeToggles.cjs +7 -7
- package/dist/ui/theme/ThemeToggles.mjs +4 -4
- package/dist/ui/theme/index.cjs +7 -7
- package/dist/ui/theme/index.mjs +4 -4
- package/dist/ui/toggle-buttons.cjs +1 -1
- package/dist/ui/toggle-buttons.mjs +1 -1
- package/dist/ui/toggle-group.cjs +1 -1
- package/dist/ui/toggle-group.mjs +1 -1
- package/dist/ui/toggle.cjs +1 -1
- package/dist/ui/toggle.mjs +1 -1
- package/dist/ui/toolbar.cjs +5 -5
- package/dist/ui/toolbar.mjs +2 -2
- package/dist/ui/tooltip.cjs +6 -6
- package/dist/ui/tooltip.mjs +2 -2
- package/dist/ui/tree-view/TreeSearchBar.cjs +5 -5
- package/dist/ui/tree-view/TreeSearchBar.mjs +4 -4
- package/dist/ui/tree-view/TreeView.cjs +1 -1
- package/dist/ui/tree-view/TreeView.mjs +1 -1
- package/dist/ui/tree-view/index.cjs +14 -14
- package/dist/ui/tree-view/index.mjs +5 -5
- package/dist/ui/tree-view-legacy.cjs +8 -8
- package/dist/ui/tree-view-legacy.mjs +4 -4
- package/dist/ui/waterfall/CursorOverlay.cjs +1 -1
- package/dist/ui/waterfall/CursorOverlay.mjs +1 -1
- package/dist/ui/waterfall/TimelineEvent.cjs +1 -1
- package/dist/ui/waterfall/TimelineEvent.mjs +1 -1
- package/dist/ui/waterfall/TimelineProcessBar.cjs +1 -1
- package/dist/ui/waterfall/TimelineProcessBar.mjs +1 -1
- package/dist/ui/waterfall/Wedges.cjs +1 -1
- package/dist/ui/waterfall/Wedges.mjs +1 -1
- package/dist/ui/waterfall/index.cjs +8 -8
- package/dist/ui/waterfall/index.mjs +7 -7
- package/package.json +5 -4
- package/src/auth/components/index.ts +1 -0
- package/src/auth/components/user-avatar/index.tsx +94 -0
- package/src/auth/context/{auth-context.ts → user-context.ts} +4 -4
- package/src/auth/handler/fetch-auth.ts +10 -0
- package/src/auth/handler/fetch-server.ts +10 -0
- package/src/auth/handler/get-session.ts +11 -9
- package/src/auth/handler/get-sessions.ts +16 -0
- package/src/auth/handler/sign-in-handler.ts +10 -11
- package/src/auth/handler/sign-out-handler.ts +2 -6
- package/src/auth/hooks/use-sign-in.ts +33 -0
- package/src/auth/hooks/use-sign-out.ts +30 -0
- package/src/auth/hooks/{use-vuer-auth.ts → use-user.ts} +3 -3
- package/src/auth/hooks/use-vuer-sessions.ts +29 -0
- package/src/auth/index.ts +9 -3
- package/src/auth/localstorage-key.ts +2 -0
- package/src/auth/{vuer-auth-provider.tsx → vuer-user-provider.tsx} +14 -9
- package/src/dial/DialProvider.tsx +67 -13
- package/src/dial/wrapped-inputs/ControlledInputs.tsx +79 -64
- package/src/dial/wrapped-inputs/DialPresetsInput.tsx +19 -27
- package/src/dial/wrapped-inputs/DialVectorInput.tsx +14 -9
- package/src/styles/theme.css +3 -3
- package/src/ui/button.tsx +2 -2
- package/src/ui/card.tsx +5 -5
- package/src/ui/index.ts +2 -1
- package/src/ui/inputs/input.tsx +21 -3
- package/src/ui/label.tsx +8 -1
- package/src/ui/layout.tsx +1 -0
- package/src/ui/progress.tsx +29 -0
- package/src/ui/spinner.tsx +68 -0
- package/src/ui/toolbar.tsx +21 -8
- package/src/ui/tooltip.tsx +11 -2
- package/src/ui/waterfall/index.tsx +15 -3
- package/dist/auth/context/auth-context.cjs +0 -10
- package/dist/auth/context/auth-context.mjs +0 -1
- package/dist/auth/hooks/use-vuer-auth.cjs +0 -11
- package/dist/auth/hooks/use-vuer-auth.d.cts +0 -8
- package/dist/auth/hooks/use-vuer-auth.d.ts +0 -8
- package/dist/auth/hooks/use-vuer-auth.mjs +0 -2
- package/dist/auth/hooks/use-vuer-method.cjs +0 -15
- package/dist/auth/hooks/use-vuer-method.d.cts +0 -10
- package/dist/auth/hooks/use-vuer-method.d.ts +0 -10
- package/dist/auth/hooks/use-vuer-method.mjs +0 -6
- package/dist/auth/vuer-auth-provider.cjs +0 -13
- package/dist/auth/vuer-auth-provider.mjs +0 -4
- package/dist/chunk-3HEZVWRW.mjs +0 -62
- package/dist/chunk-4B44SRRP.cjs +0 -12
- package/dist/chunk-4CPB3XHE.cjs +0 -18
- package/dist/chunk-AKVHFPXH.mjs +0 -26
- package/dist/chunk-C6L7YIGW.cjs +0 -117
- package/dist/chunk-CGODCUQ5.mjs +0 -16
- package/dist/chunk-G4Q5ALRW.mjs +0 -109
- package/dist/chunk-OPYMZDEZ.mjs +0 -28
- package/dist/chunk-RMK6W774.cjs +0 -65
- package/dist/chunk-T57VFBIC.mjs +0 -17
- package/dist/chunk-TC3W4VRO.mjs +0 -6
- package/dist/chunk-WTYBTOLO.cjs +0 -19
- package/dist/chunk-WZGZX3S2.cjs +0 -32
- package/dist/chunk-XFTKHT2M.cjs +0 -28
- package/dist/chunk-ZULCZ5L6.cjs +0 -8
- package/dist/ui/panel.cjs +0 -44
- package/dist/ui/panel.d.cts +0 -51
- package/dist/ui/panel.d.ts +0 -51
- package/src/auth/hooks/use-vuer-method.ts +0 -37
- package/src/ui/panel.tsx +0 -147
- /package/dist/{chunk-KFPS5CCR.cjs → chunk-NK7L5H2Y.cjs} +0 -0
- /package/dist/{chunk-G3EIVAVR.mjs → chunk-UXWS62ZO.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, useCallback, useEffect, useMemo, useState } from "react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { UserContext } from "./context/user-context";
|
|
4
4
|
import { getSession } from "./handler/get-session";
|
|
5
5
|
import { bearerToken } from "./localstorage-key";
|
|
6
6
|
import { UserSession } from "./types";
|
|
@@ -9,16 +9,21 @@ interface Props {
|
|
|
9
9
|
baseURL: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export function
|
|
12
|
+
export function VuerUserProvider({ children, baseURL }: PropsWithChildren<Props>) {
|
|
13
13
|
const [isPending, setIsPending] = useState<boolean>(true);
|
|
14
14
|
const [session, setSession] = useState<UserSession | null>(null);
|
|
15
15
|
|
|
16
16
|
const refetchHandle = useCallback(async () => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
try {
|
|
18
|
+
setIsPending(true);
|
|
19
|
+
const data = await getSession(baseURL);
|
|
20
|
+
setSession(data);
|
|
21
|
+
setIsPending(false);
|
|
22
|
+
return data;
|
|
23
|
+
} catch (e) {
|
|
24
|
+
console.error(e);
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
22
27
|
}, [baseURL]);
|
|
23
28
|
|
|
24
29
|
useEffect(() => {
|
|
@@ -36,7 +41,7 @@ export function VuerAuthProvider({ children, baseURL }: PropsWithChildren<Props>
|
|
|
36
41
|
}, [refetchHandle]);
|
|
37
42
|
|
|
38
43
|
return (
|
|
39
|
-
<
|
|
44
|
+
<UserContext.Provider
|
|
40
45
|
value={useMemo(() => {
|
|
41
46
|
return {
|
|
42
47
|
baseURL,
|
|
@@ -47,6 +52,6 @@ export function VuerAuthProvider({ children, baseURL }: PropsWithChildren<Props>
|
|
|
47
52
|
}, [baseURL, session, isPending, refetchHandle])}
|
|
48
53
|
>
|
|
49
54
|
{children}
|
|
50
|
-
</
|
|
55
|
+
</UserContext.Provider>
|
|
51
56
|
);
|
|
52
57
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React, { createContext, ReactNode, useCallback, useContext, useMemo, useState } from "react";
|
|
2
2
|
|
|
3
|
+
// Utility to check if an object is empty or nullish
|
|
4
|
+
function isEmptyObject(obj: unknown): boolean {
|
|
5
|
+
return obj == null || (typeof obj === "object" && Object.keys(obj).length === 0);
|
|
6
|
+
}
|
|
7
|
+
|
|
3
8
|
export type LabelPositionT = "left" | "top" | "inline" | undefined;
|
|
4
9
|
|
|
5
10
|
// Define specific value types for dial values
|
|
@@ -77,33 +82,82 @@ interface DialSchemaProviderProps {
|
|
|
77
82
|
}
|
|
78
83
|
|
|
79
84
|
// Provider component
|
|
80
|
-
export const DialProvider
|
|
85
|
+
export const DialProvider = ({
|
|
81
86
|
children,
|
|
82
87
|
schemas,
|
|
83
88
|
initialValues = {},
|
|
84
89
|
values: controlledValues,
|
|
85
90
|
onValueChange,
|
|
86
|
-
}) => {
|
|
91
|
+
}: DialSchemaProviderProps) => {
|
|
87
92
|
// Determine if component is controlled
|
|
88
|
-
const isControlled = controlledValues
|
|
93
|
+
const isControlled = !isEmptyObject(controlledValues);
|
|
89
94
|
|
|
90
95
|
// Initialize state with default values from schemas or provided initial values
|
|
91
|
-
const [internalValues, setInternalValues] = useState<Record<string, DialValue>>(() =>
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
const [internalValues, setInternalValues] = useState<Record<string, DialValue>>(() =>
|
|
97
|
+
Object.fromEntries(
|
|
98
|
+
schemas.map((schema) => [schema.name, initialValues[schema.name] ?? schema.value]),
|
|
99
|
+
),
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
// Helper function to merge controlled values with schema defaults
|
|
103
|
+
const mergeWithSchemaDefaults = useCallback(
|
|
104
|
+
(inputValues: Record<string, DialValue>) => {
|
|
105
|
+
const result = { ...inputValues };
|
|
106
|
+
|
|
107
|
+
schemas.forEach((schema) => {
|
|
108
|
+
// If the input doesn't have this property or it's undefined/null, use schema default
|
|
109
|
+
if (result[schema.name] === undefined || result[schema.name] === null) {
|
|
110
|
+
if (schema.value !== undefined) {
|
|
111
|
+
result[schema.name] = schema.value;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
return result;
|
|
117
|
+
},
|
|
118
|
+
[schemas],
|
|
119
|
+
);
|
|
98
120
|
|
|
99
121
|
// Use controlled values if provided, otherwise use internal state
|
|
100
|
-
|
|
122
|
+
// Always merge with schema defaults to ensure missing properties get default values
|
|
123
|
+
const values =
|
|
124
|
+
isControlled && controlledValues ? mergeWithSchemaDefaults(controlledValues) : internalValues;
|
|
125
|
+
|
|
126
|
+
// Helper function to format numbers to avoid floating point precision issues
|
|
127
|
+
const formatNumber = useCallback((value: number): number => {
|
|
128
|
+
// Round to 6 decimal places to avoid floating point precision errors
|
|
129
|
+
return Math.round(value * 1000000) / 1000000;
|
|
130
|
+
}, []);
|
|
131
|
+
|
|
132
|
+
// Helper function to format values based on their type
|
|
133
|
+
const formatValue = useCallback(
|
|
134
|
+
(value: DialValue): DialValue => {
|
|
135
|
+
if (value === null || value === undefined) {
|
|
136
|
+
return value;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Format single numbers
|
|
140
|
+
if (typeof value === "number") {
|
|
141
|
+
return formatNumber(value);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Format number arrays (vectors, etc.)
|
|
145
|
+
if (Array.isArray(value) && value.every((v) => typeof v === "number")) {
|
|
146
|
+
return value.map((v) => formatNumber(v as number));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Return non-numeric values as-is
|
|
150
|
+
return value;
|
|
151
|
+
},
|
|
152
|
+
[formatNumber],
|
|
153
|
+
);
|
|
101
154
|
|
|
102
155
|
const getValue = useCallback(
|
|
103
156
|
(name: string) => {
|
|
104
|
-
|
|
157
|
+
const rawValue = values[name];
|
|
158
|
+
return formatValue(rawValue);
|
|
105
159
|
},
|
|
106
|
-
[values],
|
|
160
|
+
[values, formatValue],
|
|
107
161
|
);
|
|
108
162
|
|
|
109
163
|
const setValue = useCallback(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { PropsWithChildren, ReactElement, ReactNode, useCallback } from "react";
|
|
2
2
|
import { LabelPositionT, useDialSchema } from "../DialProvider";
|
|
3
3
|
import {
|
|
4
4
|
ColorInput,
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
Input,
|
|
7
7
|
InputSlot,
|
|
8
8
|
Label,
|
|
9
|
+
type LayoutType,
|
|
9
10
|
Select,
|
|
10
11
|
SelectContent,
|
|
11
12
|
SelectItem,
|
|
@@ -15,56 +16,62 @@ import {
|
|
|
15
16
|
Switch,
|
|
16
17
|
} from "../../index"; // Base input component that connects to the dial store
|
|
17
18
|
|
|
18
|
-
// Base input component that connects to the dial store
|
|
19
|
-
interface DialInputProps {
|
|
20
|
-
name: string;
|
|
21
|
-
type?: string;
|
|
22
|
-
min?: number;
|
|
23
|
-
max?: number;
|
|
24
|
-
step?: number;
|
|
25
|
-
options?: any[];
|
|
26
|
-
label?: string;
|
|
27
|
-
labelPosition?: LabelPositionT;
|
|
28
|
-
size?: "sm" | "md" | "lg";
|
|
29
|
-
}
|
|
30
|
-
|
|
31
19
|
// Helper component for wrapping inputs with labels
|
|
32
20
|
const DialInputWrapper: React.FC<{
|
|
33
21
|
label?: string;
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
labelPosition?: LabelPositionT;
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
}> = ({ label, labelPosition = "top", children }) => {
|
|
36
25
|
if (!label) {
|
|
37
26
|
return <>{children}</>;
|
|
38
27
|
}
|
|
39
28
|
|
|
40
29
|
return (
|
|
41
|
-
<FormLayout orientation=
|
|
30
|
+
<FormLayout orientation={`label-${labelPosition}` as LayoutType}>
|
|
42
31
|
<Label size="sm">{label}</Label>
|
|
43
|
-
{children}
|
|
32
|
+
{children as ReactElement}
|
|
44
33
|
</FormLayout>
|
|
45
34
|
);
|
|
46
35
|
};
|
|
47
36
|
|
|
48
|
-
export
|
|
37
|
+
export interface DialNumInputProps extends PropsWithChildren {
|
|
38
|
+
name: string;
|
|
39
|
+
type?: string;
|
|
40
|
+
min?: number;
|
|
41
|
+
max?: number;
|
|
42
|
+
step?: number;
|
|
43
|
+
options?: unknown[];
|
|
44
|
+
label?: string;
|
|
45
|
+
labelPosition?: LabelPositionT;
|
|
46
|
+
size?: "sm" | "md" | "lg";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Base input component that connects to the dial store
|
|
50
|
+
export const DialNumberInput: React.FC<DialNumInputProps> = ({
|
|
49
51
|
name,
|
|
50
52
|
min,
|
|
51
53
|
max,
|
|
52
54
|
step = 1,
|
|
53
55
|
label,
|
|
54
|
-
labelPosition,
|
|
56
|
+
labelPosition = "top",
|
|
55
57
|
size = "sm",
|
|
58
|
+
...props
|
|
56
59
|
}) => {
|
|
57
60
|
const { getValue, setValue } = useDialSchema();
|
|
58
61
|
const value = (getValue(name) ?? 0) as number;
|
|
59
62
|
|
|
63
|
+
const handleChange = useCallback(
|
|
64
|
+
(e: React.ChangeEvent<HTMLInputElement>) => setValue(name, parseFloat(e.target.value)),
|
|
65
|
+
[name],
|
|
66
|
+
);
|
|
67
|
+
|
|
60
68
|
const inputProps = {
|
|
61
69
|
type: "number" as const,
|
|
62
70
|
value,
|
|
63
71
|
min,
|
|
64
72
|
max,
|
|
65
73
|
step,
|
|
66
|
-
onChange:
|
|
67
|
-
setValue(name, parseFloat(e.target.value)),
|
|
74
|
+
onChange: handleChange,
|
|
68
75
|
size,
|
|
69
76
|
};
|
|
70
77
|
|
|
@@ -74,69 +81,82 @@ export const DialNumberInput: React.FC<DialInputProps> = ({
|
|
|
74
81
|
);
|
|
75
82
|
} else {
|
|
76
83
|
return (
|
|
77
|
-
<DialInputWrapper label={label}>
|
|
84
|
+
<DialInputWrapper label={label} labelPosition={labelPosition} {...props}>
|
|
78
85
|
<Input {...inputProps} />
|
|
79
86
|
</DialInputWrapper>
|
|
80
87
|
);
|
|
81
88
|
}
|
|
82
89
|
};
|
|
83
90
|
|
|
84
|
-
export const DialBooleanInput: React.FC<
|
|
91
|
+
export const DialBooleanInput: React.FC<DialNumInputProps> = ({
|
|
92
|
+
name,
|
|
93
|
+
label,
|
|
94
|
+
labelPosition,
|
|
95
|
+
...props
|
|
96
|
+
}) => {
|
|
85
97
|
const { getValue, setValue } = useDialSchema();
|
|
86
98
|
const value = (getValue(name) ?? false) as boolean;
|
|
87
99
|
|
|
100
|
+
const handleChange = useCallback((checked: boolean) => setValue(name, checked), [name]);
|
|
101
|
+
|
|
88
102
|
const switchProps = {
|
|
89
103
|
checked: value,
|
|
90
|
-
onCheckedChange:
|
|
104
|
+
onCheckedChange: handleChange,
|
|
91
105
|
};
|
|
92
106
|
|
|
93
|
-
if (!label) {
|
|
107
|
+
if (!label || labelPosition === "inline") {
|
|
94
108
|
return <Switch {...switchProps} />;
|
|
95
109
|
}
|
|
96
110
|
|
|
97
111
|
return (
|
|
98
|
-
<
|
|
99
|
-
<Label size="sm">{label}</Label>
|
|
112
|
+
<DialInputWrapper label={label} labelPosition={labelPosition} {...props}>
|
|
100
113
|
<Switch {...switchProps} />
|
|
101
|
-
</
|
|
114
|
+
</DialInputWrapper>
|
|
102
115
|
);
|
|
103
116
|
};
|
|
104
117
|
|
|
105
118
|
// Dial-wrapped ColorInput
|
|
106
|
-
export const DialColorInput: React.FC<
|
|
119
|
+
export const DialColorInput: React.FC<DialNumInputProps> = ({ name, label, ...props }) => {
|
|
107
120
|
const { getValue, setValue } = useDialSchema();
|
|
108
121
|
const value = (getValue(name) ?? "") as string;
|
|
109
122
|
|
|
110
|
-
const
|
|
111
|
-
|
|
123
|
+
const handleChange = useCallback(
|
|
124
|
+
(e: React.ChangeEvent<HTMLInputElement>) => setValue(name, e.target.value),
|
|
125
|
+
[name],
|
|
112
126
|
);
|
|
113
127
|
|
|
114
|
-
|
|
115
|
-
return inputComp;
|
|
116
|
-
}
|
|
128
|
+
const inputComp = <ColorInput value={value} onChange={handleChange} prefix={label} />;
|
|
117
129
|
|
|
118
|
-
return
|
|
130
|
+
return (
|
|
131
|
+
<DialInputWrapper label={label} {...props}>
|
|
132
|
+
{inputComp}
|
|
133
|
+
</DialInputWrapper>
|
|
134
|
+
);
|
|
119
135
|
};
|
|
120
136
|
|
|
121
|
-
export const DialSelectInput: React.FC<
|
|
137
|
+
export const DialSelectInput: React.FC<DialNumInputProps> = ({
|
|
122
138
|
name,
|
|
123
139
|
options = [],
|
|
124
140
|
label,
|
|
125
|
-
labelPosition,
|
|
126
141
|
size = "sm",
|
|
142
|
+
...props
|
|
127
143
|
}) => {
|
|
128
144
|
const { getValue, setValue } = useDialSchema();
|
|
129
145
|
const value = getValue(name);
|
|
130
146
|
|
|
147
|
+
console.log("dial schema:", name, value);
|
|
148
|
+
|
|
149
|
+
const handleValueChange = useCallback(
|
|
150
|
+
(val: string) => {
|
|
151
|
+
// Try to parse as number if possible
|
|
152
|
+
const parsed = !isNaN(Number(val)) ? Number(val) : val;
|
|
153
|
+
setValue(name, parsed);
|
|
154
|
+
},
|
|
155
|
+
[name],
|
|
156
|
+
);
|
|
157
|
+
|
|
131
158
|
const selectComponent = (
|
|
132
|
-
<Select
|
|
133
|
-
value={String(value)}
|
|
134
|
-
onValueChange={(val) => {
|
|
135
|
-
// Try to parse as number if possible
|
|
136
|
-
const parsed = !isNaN(Number(val)) ? Number(val) : val;
|
|
137
|
-
setValue(name, parsed);
|
|
138
|
-
}}
|
|
139
|
-
>
|
|
159
|
+
<Select value={String(value)} onValueChange={handleValueChange}>
|
|
140
160
|
<SelectTrigger size={size}>
|
|
141
161
|
<SelectValue placeholder="Select an option" />
|
|
142
162
|
</SelectTrigger>
|
|
@@ -150,44 +170,39 @@ export const DialSelectInput: React.FC<DialInputProps> = ({
|
|
|
150
170
|
</Select>
|
|
151
171
|
);
|
|
152
172
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
173
|
+
return (
|
|
174
|
+
<DialInputWrapper label={label} {...props}>
|
|
175
|
+
{selectComponent}
|
|
176
|
+
</DialInputWrapper>
|
|
177
|
+
);
|
|
158
178
|
};
|
|
159
179
|
|
|
160
|
-
export const DialSliderInput: React.FC<
|
|
180
|
+
export const DialSliderInput: React.FC<DialNumInputProps> = ({
|
|
161
181
|
name,
|
|
162
182
|
min = 0,
|
|
163
183
|
max = 100,
|
|
164
184
|
step = 1,
|
|
165
185
|
label,
|
|
166
|
-
|
|
167
|
-
size = "sm",
|
|
186
|
+
...props
|
|
168
187
|
}) => {
|
|
169
188
|
const { getValue, setValue } = useDialSchema();
|
|
170
189
|
const value = (getValue(name) ?? min) as number;
|
|
171
190
|
|
|
191
|
+
const handleValueChange = useCallback(([val]: number[]) => setValue(name, val), [name]);
|
|
192
|
+
|
|
172
193
|
const sliderProps = {
|
|
173
194
|
value: [value],
|
|
174
|
-
onValueChange:
|
|
195
|
+
onValueChange: handleValueChange,
|
|
175
196
|
min,
|
|
176
197
|
max,
|
|
177
198
|
step,
|
|
178
199
|
className: "flex-1",
|
|
179
200
|
};
|
|
180
201
|
|
|
181
|
-
|
|
182
|
-
<
|
|
202
|
+
return (
|
|
203
|
+
<DialInputWrapper label={label} {...props}>
|
|
183
204
|
<Slider {...sliderProps} />
|
|
184
205
|
<span className="text-text-secondary w-12 text-right text-sm">{value}</span>
|
|
185
|
-
</
|
|
206
|
+
</DialInputWrapper>
|
|
186
207
|
);
|
|
187
|
-
|
|
188
|
-
if (!label) {
|
|
189
|
-
return sliderComponent;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
return <DialInputWrapper label={label}>{sliderComponent}</DialInputWrapper>;
|
|
193
208
|
};
|
|
@@ -1,51 +1,42 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
+
import { FormLayout, Label, type LayoutType } from "../../ui";
|
|
3
4
|
import { PresetsInput } from "../../ui/inputs/presets-input";
|
|
4
|
-
import { FormLayout, Label } from "../../index";
|
|
5
5
|
import { LabelPositionT, useDialSchema } from "../DialProvider";
|
|
6
6
|
|
|
7
|
-
interface DialPresetsInputProps {
|
|
8
|
-
name: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
size?: "sm" | "md" | "lg";
|
|
11
|
-
labelPosition?: LabelPositionT;
|
|
12
|
-
options: Array<string | number | { label: string; value: string | number }>;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
7
|
const DialInputWrapper: React.FC<{
|
|
16
8
|
label?: string;
|
|
9
|
+
labelPosition?: LabelPositionT;
|
|
17
10
|
children: React.ReactElement;
|
|
18
|
-
}> = ({ label, children }) => {
|
|
11
|
+
}> = ({ label, labelPosition = "top", children }) => {
|
|
19
12
|
if (!label) {
|
|
20
13
|
return <>{children}</>;
|
|
21
14
|
}
|
|
22
15
|
|
|
23
16
|
return (
|
|
24
|
-
<FormLayout orientation=
|
|
17
|
+
<FormLayout orientation={`label-${labelPosition}` as LayoutType}>
|
|
25
18
|
<Label size="sm">{label}</Label>
|
|
26
19
|
{children}
|
|
27
20
|
</FormLayout>
|
|
28
21
|
);
|
|
29
22
|
};
|
|
30
23
|
|
|
31
|
-
export const DialPresetsInput: React.FC<
|
|
32
|
-
name
|
|
33
|
-
label
|
|
34
|
-
size
|
|
35
|
-
labelPosition
|
|
36
|
-
options
|
|
37
|
-
}) => {
|
|
24
|
+
export const DialPresetsInput: React.FC<{
|
|
25
|
+
name: string;
|
|
26
|
+
label?: string;
|
|
27
|
+
size?: "sm" | "md" | "lg";
|
|
28
|
+
labelPosition?: LabelPositionT;
|
|
29
|
+
options: Array<string | number | { label: string; value: string | number }>;
|
|
30
|
+
}> = ({ name, label, size = "sm", labelPosition = "top", options }) => {
|
|
38
31
|
const { getValue, setValue } = useDialSchema();
|
|
39
32
|
const value = (getValue(name) ?? 0) as number;
|
|
40
33
|
|
|
41
34
|
// Extract preset values from options
|
|
42
|
-
const presets = options
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return typeof opt.value === "number" ? opt.value : parseFloat(opt.value as string);
|
|
48
|
-
}) as [number, number, number];
|
|
35
|
+
const presets = options.slice(0, 3).map((opt) => {
|
|
36
|
+
if (typeof opt === "number") return opt;
|
|
37
|
+
if (typeof opt === "string") return parseFloat(opt);
|
|
38
|
+
return typeof opt.value === "number" ? opt.value : parseFloat(opt.value as string);
|
|
39
|
+
}) as [number, number, number];
|
|
49
40
|
|
|
50
41
|
// Pad with zeros if less than 3 presets
|
|
51
42
|
while (presets.length < 3) {
|
|
@@ -53,6 +44,7 @@ export const DialPresetsInput: React.FC<DialPresetsInputProps> = ({
|
|
|
53
44
|
}
|
|
54
45
|
|
|
55
46
|
if (labelPosition === "inline") {
|
|
47
|
+
// this is suspicious - Ge
|
|
56
48
|
return (
|
|
57
49
|
<div className="flex items-center gap-2">
|
|
58
50
|
{label && <Label size="sm">{label}</Label>}
|
|
@@ -66,7 +58,7 @@ export const DialPresetsInput: React.FC<DialPresetsInputProps> = ({
|
|
|
66
58
|
);
|
|
67
59
|
} else {
|
|
68
60
|
return (
|
|
69
|
-
<DialInputWrapper label={label}>
|
|
61
|
+
<DialInputWrapper label={label} labelPosition={labelPosition}>
|
|
70
62
|
<PresetsInput
|
|
71
63
|
value={value}
|
|
72
64
|
onChange={(val) => setValue(name, val)}
|
|
@@ -76,4 +68,4 @@ export const DialPresetsInput: React.FC<DialPresetsInputProps> = ({
|
|
|
76
68
|
</DialInputWrapper>
|
|
77
69
|
);
|
|
78
70
|
}
|
|
79
|
-
};
|
|
71
|
+
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useCallback } from "react";
|
|
2
|
+
|
|
3
|
+
import { FormLayout, Label, type LayoutType, VectorInput } from "../../index";
|
|
2
4
|
import { useDialSchema } from "../DialProvider";
|
|
3
|
-
import { FormLayout, Label, VectorInput } from "../../index";
|
|
4
5
|
|
|
5
6
|
interface DialVectorInputProps {
|
|
6
7
|
name: string;
|
|
7
8
|
label?: string;
|
|
8
9
|
column?: boolean;
|
|
9
10
|
size?: "sm" | "md" | "lg";
|
|
11
|
+
labelPosition?: "left" | "top";
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
/**
|
|
@@ -17,8 +19,17 @@ export const DialVectorInput: React.FC<DialVectorInputProps> = ({
|
|
|
17
19
|
name,
|
|
18
20
|
label,
|
|
19
21
|
size = "sm",
|
|
22
|
+
labelPosition = "top",
|
|
20
23
|
}) => {
|
|
21
24
|
const { getValue, setValue, schemas } = useDialSchema();
|
|
25
|
+
|
|
26
|
+
const handleValuesChange = useCallback(
|
|
27
|
+
(newValues: number[]) => {
|
|
28
|
+
setValue(name, newValues);
|
|
29
|
+
},
|
|
30
|
+
[name],
|
|
31
|
+
);
|
|
32
|
+
|
|
22
33
|
const schema = schemas.find((s) => s.name === name);
|
|
23
34
|
if (!schema) {
|
|
24
35
|
return null;
|
|
@@ -61,8 +72,6 @@ export const DialVectorInput: React.FC<DialVectorInputProps> = ({
|
|
|
61
72
|
gridRows = undefined;
|
|
62
73
|
}
|
|
63
74
|
|
|
64
|
-
console.log("the grid-flow is", gridAutoFlow, gridColumns, gridRows);
|
|
65
|
-
|
|
66
75
|
// Ensure value is an array with correct dimensions
|
|
67
76
|
const vectorValue = Array.isArray(value)
|
|
68
77
|
? value.concat(Array(Math.max(0, dimensions - value.length)).fill(0))
|
|
@@ -85,10 +94,6 @@ export const DialVectorInput: React.FC<DialVectorInputProps> = ({
|
|
|
85
94
|
? placeholders.map((p) => <span className="text-xs">{p}</span>)
|
|
86
95
|
: undefined;
|
|
87
96
|
|
|
88
|
-
const handleValuesChange = (newValues: number[]) => {
|
|
89
|
-
setValue(name, newValues);
|
|
90
|
-
};
|
|
91
|
-
|
|
92
97
|
const inputComponent = (
|
|
93
98
|
<VectorInput
|
|
94
99
|
value={vectorValue}
|
|
@@ -107,7 +112,7 @@ export const DialVectorInput: React.FC<DialVectorInputProps> = ({
|
|
|
107
112
|
}
|
|
108
113
|
|
|
109
114
|
return (
|
|
110
|
-
<FormLayout orientation=
|
|
115
|
+
<FormLayout orientation={`label-${labelPosition}` as LayoutType}>
|
|
111
116
|
<Label size="sm">{label}</Label>
|
|
112
117
|
<div className="flex flex-row items-center gap-2">
|
|
113
118
|
{schema.helpText && (
|
package/src/styles/theme.css
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
rgba(50, 50, 50, 0.6) 0%,
|
|
11
11
|
rgba(70, 70, 70, 0.6) 105.28%
|
|
12
12
|
) !important;
|
|
13
|
-
backdrop-filter: blur(
|
|
13
|
+
backdrop-filter: blur(5px) !important;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
@utility liquid-light-bg {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
rgba(236, 236, 236, 0.6) 0%,
|
|
20
20
|
rgba(202, 202, 202, 0.6) 105.28%
|
|
21
21
|
) !important;
|
|
22
|
-
backdrop-filter: blur(
|
|
22
|
+
backdrop-filter: blur(5px) !important;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
@utility liquid-dark-bg-tooltip-arrow {
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
--color-select-secondary: var(--select-secondary);
|
|
166
166
|
/* radius */
|
|
167
167
|
--radius-uk-xs: var(--radius); /* 4px */
|
|
168
|
-
--radius-uk-sm: calc(var(--radius) +
|
|
168
|
+
--radius-uk-sm: calc(var(--radius) + 3px); /* 6px */
|
|
169
169
|
--radius-uk-md: calc(var(--radius) + 4px); /* 8px */
|
|
170
170
|
--radius-uk-lg: calc(var(--radius) + 10px); /* 12px */
|
|
171
171
|
--radius-uk-xl: calc(var(--radius) + 13px); /* 16px */
|
package/src/ui/button.tsx
CHANGED
package/src/ui/card.tsx
CHANGED
|
@@ -12,9 +12,12 @@ const cardVariants = cva(
|
|
|
12
12
|
"flex-col",
|
|
13
13
|
"rounded-uk-lg",
|
|
14
14
|
"bg-bg-primary",
|
|
15
|
-
"liquid:shadow-[0_4px_16px_0_var(--color-shadow-secondary)]",
|
|
16
15
|
"liquid-dark:liquid-dark-bg",
|
|
16
|
+
"liquid-dark:border-[0.9px]",
|
|
17
|
+
"liquid-dark:border-[rgba(85,85,85,100)]",
|
|
17
18
|
"liquid-light:liquid-light-bg",
|
|
19
|
+
"liquid-light:border-[0.8px]",
|
|
20
|
+
"liquid-light:border-[white]",
|
|
18
21
|
],
|
|
19
22
|
{
|
|
20
23
|
variants: {
|
|
@@ -86,7 +89,6 @@ function CardTitle({ className, ...props }: ComponentProps<"div">) {
|
|
|
86
89
|
"text-uk-md",
|
|
87
90
|
"leading-uk-md",
|
|
88
91
|
"font-medium",
|
|
89
|
-
"-mt-2",
|
|
90
92
|
"vertical-align-middle",
|
|
91
93
|
className,
|
|
92
94
|
)}
|
|
@@ -102,7 +104,7 @@ function CardDescription({ className, ...props }: ComponentProps<"div">) {
|
|
|
102
104
|
return (
|
|
103
105
|
<div
|
|
104
106
|
data-slot="card-description"
|
|
105
|
-
className={cn("text-uk-sm", "
|
|
107
|
+
className={cn("text-uk-sm", "text-text-secondary", "leading-uk-sm", className)}
|
|
106
108
|
{...props}
|
|
107
109
|
/>
|
|
108
110
|
);
|
|
@@ -119,8 +121,6 @@ function CardAction({ className, ...props }: ComponentProps<"div">) {
|
|
|
119
121
|
"text-text-secondary",
|
|
120
122
|
"text-uk-sm",
|
|
121
123
|
"leading-uk-sm",
|
|
122
|
-
"-mt-2",
|
|
123
|
-
"-mr-3",
|
|
124
124
|
"font-medium",
|
|
125
125
|
"vertical-align-middle",
|
|
126
126
|
className,
|
package/src/ui/index.ts
CHANGED
|
@@ -20,7 +20,6 @@ export * from "./toggle-group";
|
|
|
20
20
|
export * from "./badge";
|
|
21
21
|
export * from "./radio-group";
|
|
22
22
|
export * from "./card";
|
|
23
|
-
export * from "./panel";
|
|
24
23
|
export * from "./toolbar";
|
|
25
24
|
export * from "./checkbox";
|
|
26
25
|
export * from "./switch";
|
|
@@ -38,6 +37,8 @@ export * from "./UIKitBadge";
|
|
|
38
37
|
export * from "./DialBadge";
|
|
39
38
|
export * from "./resizable";
|
|
40
39
|
export * from "./inputs";
|
|
40
|
+
export * from "./progress";
|
|
41
|
+
export * from "./spinner";
|
|
41
42
|
|
|
42
43
|
export * from "./layouts";
|
|
43
44
|
export * from "./theme";
|