seppia 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +116 -2
- package/dist/blocks/ai-chat.cjs +19 -0
- package/dist/blocks/ai-chat.d.cts +1 -0
- package/dist/blocks/ai-chat.d.ts +1 -0
- package/dist/blocks/ai-chat.js +10 -0
- package/dist/blocks/app-shell.cjs +49 -0
- package/dist/blocks/app-shell.d.cts +1 -0
- package/dist/blocks/app-shell.d.ts +1 -0
- package/dist/blocks/app-shell.js +16 -0
- package/dist/blocks/auth.cjs +58 -0
- package/dist/blocks/auth.d.cts +1 -0
- package/dist/blocks/auth.d.ts +1 -0
- package/dist/blocks/auth.js +13 -0
- package/dist/blocks/dashboard.cjs +23 -0
- package/dist/blocks/dashboard.d.cts +1 -0
- package/dist/blocks/dashboard.d.ts +1 -0
- package/dist/blocks/dashboard.js +10 -0
- package/dist/blocks/data-table.cjs +29 -0
- package/dist/blocks/data-table.d.cts +1 -0
- package/dist/blocks/data-table.d.ts +1 -0
- package/dist/blocks/data-table.js +20 -0
- package/dist/blocks/forms.cjs +33 -0
- package/dist/blocks/forms.d.cts +1 -0
- package/dist/blocks/forms.d.ts +1 -0
- package/dist/blocks/forms.js +16 -0
- package/dist/blocks/kanban.cjs +16 -0
- package/dist/blocks/kanban.d.cts +1 -0
- package/dist/blocks/kanban.d.ts +1 -0
- package/dist/blocks/kanban.js +7 -0
- package/dist/blocks/modals.cjs +33 -0
- package/dist/blocks/modals.d.cts +1 -0
- package/dist/blocks/modals.d.ts +1 -0
- package/dist/blocks/modals.js +16 -0
- package/dist/blocks/notifications.cjs +37 -0
- package/dist/blocks/notifications.d.cts +1 -0
- package/dist/blocks/notifications.d.ts +1 -0
- package/dist/blocks/notifications.js +16 -0
- package/dist/blocks/permissions.cjs +21 -0
- package/dist/blocks/permissions.d.cts +1 -0
- package/dist/blocks/permissions.d.ts +1 -0
- package/dist/blocks/permissions.js +12 -0
- package/dist/blocks/scheduling.cjs +24 -0
- package/dist/blocks/scheduling.d.cts +1 -0
- package/dist/blocks/scheduling.d.ts +1 -0
- package/dist/blocks/scheduling.js +7 -0
- package/dist/chunk-22XE2ZSK.js +115 -0
- package/dist/chunk-2AS3PZ62.js +222 -0
- package/dist/chunk-2DW7PF2P.cjs +116 -0
- package/dist/chunk-2HMUVVUR.cjs +45 -0
- package/dist/chunk-2IBDXUBG.js +2 -0
- package/dist/chunk-2L7GUYB2.js +152 -0
- package/dist/chunk-2MX7EYXA.js +187 -0
- package/dist/chunk-2UB2HKMF.cjs +131 -0
- package/dist/chunk-2YB44UOW.js +2 -0
- package/dist/chunk-32OCNZWB.js +2 -0
- package/dist/chunk-344MRWFO.js +25 -0
- package/dist/chunk-3A2LHCPV.cjs +30 -0
- package/dist/chunk-3BC4NA2C.cjs +126 -0
- package/dist/chunk-3ENS37RT.cjs +373 -0
- package/dist/chunk-3FLWYYDS.js +161 -0
- package/dist/chunk-3GGOAJIG.cjs +176 -0
- package/dist/chunk-3HME5VXL.cjs +3 -0
- package/dist/chunk-3S3MBTXC.cjs +3 -0
- package/dist/chunk-3WWOK2IV.cjs +104 -0
- package/dist/chunk-3YOPOWUB.js +191 -0
- package/dist/chunk-3Z5M2WVW.cjs +3 -0
- package/dist/chunk-43N5QL6C.cjs +3 -0
- package/dist/chunk-4C7VKLTU.js +47 -0
- package/dist/chunk-4GLMIQUX.js +275 -0
- package/dist/chunk-4MTRY6D2.js +288 -0
- package/dist/chunk-4Q6LY3TN.cjs +259 -0
- package/dist/chunk-4STGAE4T.js +2 -0
- package/dist/chunk-4YXWES4C.cjs +81 -0
- package/dist/chunk-54SA4YJ7.js +217 -0
- package/dist/chunk-5A46EAUE.js +42 -0
- package/dist/chunk-5CKY3233.js +2 -0
- package/dist/chunk-5IGY4W4T.cjs +131 -0
- package/dist/chunk-5KNKWEIE.cjs +564 -0
- package/dist/chunk-5OOVB2S5.cjs +244 -0
- package/dist/chunk-64WDKM52.js +191 -0
- package/dist/chunk-6CZIXWOU.js +2 -0
- package/dist/chunk-6HPGI7VU.js +183 -0
- package/dist/chunk-6HZLPZ5A.js +146 -0
- package/dist/chunk-6IH2PZO5.js +122 -0
- package/dist/chunk-6JZYZDCV.cjs +245 -0
- package/dist/chunk-6K3RXUKZ.cjs +239 -0
- package/dist/chunk-6MJYJC3V.cjs +3 -0
- package/dist/chunk-6OA3BX3U.cjs +394 -0
- package/dist/chunk-6PE3ZGPD.cjs +239 -0
- package/dist/chunk-6QQPGNNK.js +2 -0
- package/dist/chunk-6W3OO6DK.cjs +159 -0
- package/dist/chunk-744QNW5E.js +77 -0
- package/dist/chunk-7DCJW7LC.cjs +146 -0
- package/dist/chunk-7OOBMBHB.js +34 -0
- package/dist/chunk-7PWTWLXL.cjs +3 -0
- package/dist/chunk-7RZVSATZ.js +83 -0
- package/dist/chunk-7S3BMPK6.js +262 -0
- package/dist/chunk-7V6SXPFO.cjs +164 -0
- package/dist/chunk-7WZL3ZII.js +124 -0
- package/dist/chunk-7XYHI3LD.cjs +3 -0
- package/dist/chunk-A2QD7OLJ.js +213 -0
- package/dist/chunk-A3M6ALHJ.js +2 -0
- package/dist/chunk-AEQ6DMPS.js +93 -0
- package/dist/chunk-APFW2I3Q.js +38 -0
- package/dist/chunk-AXWQJPZL.js +222 -0
- package/dist/chunk-B3D6KWG3.cjs +11 -0
- package/dist/chunk-B5Z4XIIF.js +26 -0
- package/dist/chunk-BQUUTWTZ.cjs +129 -0
- package/dist/chunk-BRHXMXA7.cjs +3 -0
- package/dist/chunk-CIMKUKAG.cjs +3 -0
- package/dist/chunk-CM7W446Z.cjs +410 -0
- package/dist/chunk-CQZU4EHR.cjs +263 -0
- package/dist/chunk-DKTUKZ5A.cjs +326 -0
- package/dist/chunk-DLS6YGNX.cjs +217 -0
- package/dist/chunk-DO4CSXWD.js +2 -0
- package/dist/chunk-DQQLYUXT.cjs +36 -0
- package/dist/chunk-DU2E5QXZ.js +2 -0
- package/dist/chunk-E2IMDHN3.cjs +286 -0
- package/dist/chunk-EAIDRCQS.js +2 -0
- package/dist/chunk-EAQYTXY7.js +127 -0
- package/dist/chunk-ECJ6AOAB.js +542 -0
- package/dist/chunk-EJV27E62.cjs +3 -0
- package/dist/chunk-ESHVB27V.cjs +3 -0
- package/dist/chunk-FDFQRXGC.cjs +3 -0
- package/dist/chunk-FG53BXIR.js +2 -0
- package/dist/chunk-FLLU5FAE.js +121 -0
- package/dist/chunk-FO7ZZP52.cjs +186 -0
- package/dist/chunk-FVVH37UH.js +57 -0
- package/dist/chunk-FXCVPRHV.cjs +52 -0
- package/dist/chunk-FXQKHROS.cjs +3 -0
- package/dist/chunk-G5UZZ2XG.cjs +52 -0
- package/dist/chunk-GASIBRAJ.js +650 -0
- package/dist/chunk-GHC7MKBR.cjs +31 -0
- package/dist/chunk-GK7BIWGS.cjs +149 -0
- package/dist/chunk-GROWBVU5.cjs +140 -0
- package/dist/chunk-GSF7YUXO.js +117 -0
- package/dist/chunk-GTU6TD5Q.cjs +197 -0
- package/dist/chunk-HN3FTZJN.cjs +3 -0
- package/dist/chunk-HNALBJPN.cjs +36 -0
- package/dist/chunk-HSZEON5G.js +351 -0
- package/dist/chunk-HV4PLJGS.js +2 -0
- package/dist/chunk-HWHAD4OZ.js +109 -0
- package/dist/chunk-I2QUKJX7.cjs +197 -0
- package/dist/chunk-I2RCFWV3.cjs +174 -0
- package/dist/chunk-I3GJQHNE.cjs +144 -0
- package/dist/chunk-I3HEEAHX.cjs +28 -0
- package/dist/chunk-I4VXNHO7.cjs +115 -0
- package/dist/chunk-IA664Z6A.js +2 -0
- package/dist/chunk-IEI6INUF.js +2 -0
- package/dist/chunk-IJSWK5ST.cjs +3 -0
- package/dist/chunk-IPNKP4DH.cjs +297 -0
- package/dist/chunk-IT27FHWR.cjs +131 -0
- package/dist/chunk-IUZBQ5G2.cjs +3 -0
- package/dist/chunk-J2JRWEOR.js +2 -0
- package/dist/chunk-JC6MXMQZ.cjs +109 -0
- package/dist/chunk-JD4NHZXF.js +2 -0
- package/dist/chunk-JGIKKJAS.cjs +16 -0
- package/dist/chunk-JUMI5UBA.cjs +143 -0
- package/dist/chunk-JXPOKP66.js +2 -0
- package/dist/chunk-JZUEW7WR.js +2 -0
- package/dist/chunk-K2CVKVIF.js +175 -0
- package/dist/chunk-K6MCWJ35.cjs +180 -0
- package/dist/chunk-K6X6O42N.js +9 -0
- package/dist/chunk-KA24K3XP.js +193 -0
- package/dist/chunk-KEISLNT6.cjs +3 -0
- package/dist/chunk-KLJ4DMH2.cjs +262 -0
- package/dist/chunk-KO5DJXD4.js +2 -0
- package/dist/chunk-KPG24YFL.js +30 -0
- package/dist/chunk-KVDIEAWQ.cjs +3 -0
- package/dist/chunk-KVFBDLSA.cjs +215 -0
- package/dist/chunk-KVXARKY4.js +136 -0
- package/dist/chunk-KXCKL4P2.cjs +3 -0
- package/dist/chunk-KZKDZRZJ.cjs +3 -0
- package/dist/chunk-KZOXFNUE.cjs +44 -0
- package/dist/chunk-L5JDNZS3.cjs +299 -0
- package/dist/chunk-L5P5R7QQ.cjs +3 -0
- package/dist/chunk-L5YN6PRP.js +2 -0
- package/dist/chunk-LD3DXOQ7.js +92 -0
- package/dist/chunk-LRI6V2NK.cjs +117 -0
- package/dist/chunk-LVE2WXGB.js +109 -0
- package/dist/chunk-M4U2IWVW.js +54 -0
- package/dist/chunk-MCK6WCG2.cjs +168 -0
- package/dist/chunk-MCQYUABH.cjs +154 -0
- package/dist/chunk-MFFNV55T.cjs +223 -0
- package/dist/chunk-MGUOCT7T.cjs +1047 -0
- package/dist/chunk-MHIFGXVD.cjs +213 -0
- package/dist/chunk-MHS4TQAK.cjs +77 -0
- package/dist/chunk-MK7U7I4G.js +2 -0
- package/dist/chunk-MNDB6QKQ.js +2 -0
- package/dist/chunk-MO5QNNWF.cjs +99 -0
- package/dist/chunk-MQR6Y7I3.cjs +3 -0
- package/dist/chunk-MVAFOPND.cjs +3 -0
- package/dist/chunk-MX54ZBNC.js +108 -0
- package/dist/chunk-MYTU26NE.js +158 -0
- package/dist/chunk-N4KGLSBT.cjs +85 -0
- package/dist/chunk-N64ZJPCO.cjs +3 -0
- package/dist/chunk-NGKH2EEJ.cjs +326 -0
- package/dist/chunk-NIT46ZG7.cjs +352 -0
- package/dist/chunk-NJEGW6SX.js +386 -0
- package/dist/chunk-NJYCQEIR.js +182 -0
- package/dist/chunk-NNDDH7H7.cjs +91 -0
- package/dist/chunk-NTKJSGK3.cjs +3 -0
- package/dist/chunk-NUQUDBTT.js +142 -0
- package/dist/chunk-NYRO7BWG.cjs +283 -0
- package/dist/chunk-OGVNBCOT.cjs +3 -0
- package/dist/chunk-OLWS65QZ.cjs +276 -0
- package/dist/chunk-OO5T2XLL.js +13 -0
- package/dist/chunk-OYCYKMKG.js +2 -0
- package/dist/chunk-PDP4YT3H.js +61 -0
- package/dist/chunk-PIXN6IV7.js +2 -0
- package/dist/chunk-POKS6BSL.cjs +166 -0
- package/dist/chunk-PSMIDELA.js +254 -0
- package/dist/chunk-PT736HBJ.js +27 -0
- package/dist/chunk-PWKKLWBX.js +144 -0
- package/dist/chunk-PWV4XF5I.js +198 -0
- package/dist/chunk-Q6ZVUGRJ.js +2 -0
- package/dist/chunk-Q7PT2DJ7.js +22 -0
- package/dist/chunk-QCUKTEYH.cjs +3 -0
- package/dist/chunk-QHFMQWSO.cjs +139 -0
- package/dist/chunk-QNLWPVUI.cjs +149 -0
- package/dist/chunk-QVTEK35C.js +22 -0
- package/dist/chunk-QYR4WKJI.js +124 -0
- package/dist/chunk-R6MVKE2B.cjs +331 -0
- package/dist/chunk-R7T6GOUN.cjs +3 -0
- package/dist/chunk-RDU664LO.js +253 -0
- package/dist/chunk-RZNIXIJU.js +132 -0
- package/dist/chunk-RZUCUWKB.js +104 -0
- package/dist/chunk-RZXU6H5L.js +202 -0
- package/dist/chunk-SELSORIZ.js +2 -0
- package/dist/chunk-SMK542RT.js +273 -0
- package/dist/chunk-SS6DGMZY.cjs +204 -0
- package/dist/chunk-SVUVXYWK.cjs +225 -0
- package/dist/chunk-SVZT7RT3.js +2 -0
- package/dist/chunk-T4DK7EUO.js +93 -0
- package/dist/chunk-T7M6256W.cjs +3 -0
- package/dist/chunk-TBSUIWGD.cjs +3 -0
- package/dist/chunk-TH7GDZUC.js +2 -0
- package/dist/chunk-TLP4LLIX.cjs +157 -0
- package/dist/chunk-TTUJ3IQK.cjs +225 -0
- package/dist/chunk-TTVLRRPE.js +241 -0
- package/dist/chunk-TWAJYDMC.cjs +3 -0
- package/dist/chunk-U3X4QBY4.js +2 -0
- package/dist/chunk-U7MANZTW.cjs +3 -0
- package/dist/chunk-UCWS7WMQ.cjs +677 -0
- package/dist/chunk-UGDDUI2N.js +131 -0
- package/dist/chunk-UORTZAPR.js +2 -0
- package/dist/chunk-UTYMDSOE.cjs +3 -0
- package/dist/chunk-UWQGY3GT.cjs +60 -0
- package/dist/chunk-UZS7VXCA.js +237 -0
- package/dist/chunk-VACQZKYM.cjs +44 -0
- package/dist/chunk-VDQ3DWO4.js +28 -0
- package/dist/chunk-VKYDWRL2.cjs +3 -0
- package/dist/chunk-VRFYJ4BN.js +80 -0
- package/dist/chunk-W3VOEVRS.cjs +74 -0
- package/dist/chunk-W7OZ3DOL.js +14 -0
- package/dist/chunk-WG4KHU2E.cjs +149 -0
- package/dist/chunk-WHM3QKTO.js +1012 -0
- package/dist/chunk-WINVYCMX.js +380 -0
- package/dist/chunk-WPTNMFHO.cjs +310 -0
- package/dist/chunk-WVZMSS2Z.cjs +411 -0
- package/dist/chunk-WX7H4YUM.js +2 -0
- package/dist/chunk-X355AHLF.js +2 -0
- package/dist/chunk-X47PLMHL.js +304 -0
- package/dist/chunk-X7WVGTJK.js +2 -0
- package/dist/chunk-XL2A3RFS.js +202 -0
- package/dist/chunk-XQMLBUHW.js +175 -0
- package/dist/chunk-XSTQSKRP.cjs +3 -0
- package/dist/chunk-Y36NEYSP.js +255 -0
- package/dist/chunk-Y3UDKEIY.cjs +3 -0
- package/dist/chunk-Y5PAW326.cjs +142 -0
- package/dist/chunk-YEQVN7I3.js +330 -0
- package/dist/chunk-YI6XXQMC.cjs +275 -0
- package/dist/chunk-YJDQ3BQZ.js +118 -0
- package/dist/chunk-YJR744JB.js +131 -0
- package/dist/chunk-YN2AVSEN.js +371 -0
- package/dist/chunk-YNJA4HB2.js +307 -0
- package/dist/chunk-YRLEGHKB.js +137 -0
- package/dist/chunk-YTAX4ICP.cjs +154 -0
- package/dist/chunk-YU7IOI63.js +2 -0
- package/dist/chunk-YUG4SGR5.js +68 -0
- package/dist/chunk-YVGWCNLQ.js +154 -0
- package/dist/chunk-Z6SMSENC.js +107 -0
- package/dist/chunk-ZAQJBIYI.cjs +205 -0
- package/dist/chunk-ZGKDMG7N.cjs +3 -0
- package/dist/chunk-ZHGVBALA.js +304 -0
- package/dist/chunk-ZIGUJXZM.js +2 -0
- package/dist/chunk-ZPYGXDFU.js +2 -0
- package/dist/chunk-ZSD56XUT.js +240 -0
- package/dist/chunk-ZX6JRBPY.cjs +209 -0
- package/dist/components/accordion.cjs +27 -0
- package/dist/components/accordion.d.cts +1 -0
- package/dist/components/accordion.d.ts +1 -0
- package/dist/components/accordion.js +6 -0
- package/dist/components/ai.cjs +79 -0
- package/dist/components/ai.d.cts +1 -0
- package/dist/components/ai.d.ts +1 -0
- package/dist/components/ai.js +10 -0
- package/dist/components/alert.cjs +14 -0
- package/dist/components/alert.d.cts +1 -0
- package/dist/components/alert.d.ts +1 -0
- package/dist/components/alert.js +5 -0
- package/dist/components/avatar.cjs +21 -0
- package/dist/components/avatar.d.cts +1 -0
- package/dist/components/avatar.d.ts +1 -0
- package/dist/components/avatar.js +4 -0
- package/dist/components/badge.cjs +13 -0
- package/dist/components/badge.d.cts +1 -0
- package/dist/components/badge.d.ts +1 -0
- package/dist/components/badge.js +4 -0
- package/dist/components/bar-chart.cjs +17 -0
- package/dist/components/bar-chart.d.cts +1 -0
- package/dist/components/bar-chart.d.ts +1 -0
- package/dist/components/bar-chart.js +8 -0
- package/dist/components/breadcrumbs.cjs +17 -0
- package/dist/components/breadcrumbs.d.cts +1 -0
- package/dist/components/breadcrumbs.d.ts +1 -0
- package/dist/components/breadcrumbs.js +4 -0
- package/dist/components/button.cjs +18 -0
- package/dist/components/button.d.cts +1 -0
- package/dist/components/button.d.ts +1 -0
- package/dist/components/button.js +5 -0
- package/dist/components/calendar.cjs +16 -0
- package/dist/components/calendar.d.cts +1 -0
- package/dist/components/calendar.d.ts +1 -0
- package/dist/components/calendar.js +7 -0
- package/dist/components/card.cjs +25 -0
- package/dist/components/card.d.cts +1 -0
- package/dist/components/card.d.ts +1 -0
- package/dist/components/card.js +4 -0
- package/dist/components/chart.cjs +84 -0
- package/dist/components/chart.d.cts +1 -0
- package/dist/components/chart.d.ts +1 -0
- package/dist/components/chart.js +7 -0
- package/dist/components/checkbox.cjs +16 -0
- package/dist/components/checkbox.d.cts +1 -0
- package/dist/components/checkbox.d.ts +1 -0
- package/dist/components/checkbox.js +7 -0
- package/dist/components/chip-select.cjs +15 -0
- package/dist/components/chip-select.d.cts +1 -0
- package/dist/components/chip-select.d.ts +1 -0
- package/dist/components/chip-select.js +6 -0
- package/dist/components/clock.cjs +13 -0
- package/dist/components/clock.d.cts +1 -0
- package/dist/components/clock.d.ts +1 -0
- package/dist/components/clock.js +4 -0
- package/dist/components/color-picker.cjs +15 -0
- package/dist/components/color-picker.d.cts +1 -0
- package/dist/components/color-picker.d.ts +1 -0
- package/dist/components/color-picker.js +6 -0
- package/dist/components/command-palette.cjs +21 -0
- package/dist/components/command-palette.d.cts +1 -0
- package/dist/components/command-palette.d.ts +1 -0
- package/dist/components/command-palette.js +8 -0
- package/dist/components/date-picker.cjs +22 -0
- package/dist/components/date-picker.d.cts +1 -0
- package/dist/components/date-picker.d.ts +1 -0
- package/dist/components/date-picker.js +13 -0
- package/dist/components/dialog.cjs +23 -0
- package/dist/components/dialog.d.cts +1 -0
- package/dist/components/dialog.d.ts +1 -0
- package/dist/components/dialog.js +10 -0
- package/dist/components/donut-chart.cjs +21 -0
- package/dist/components/donut-chart.d.cts +1 -0
- package/dist/components/donut-chart.d.ts +1 -0
- package/dist/components/donut-chart.js +8 -0
- package/dist/components/drawer.cjs +17 -0
- package/dist/components/drawer.d.cts +1 -0
- package/dist/components/drawer.d.ts +1 -0
- package/dist/components/drawer.js +8 -0
- package/dist/components/empty-state.cjs +25 -0
- package/dist/components/empty-state.d.cts +1 -0
- package/dist/components/empty-state.d.ts +1 -0
- package/dist/components/empty-state.js +4 -0
- package/dist/components/floating-panel.cjs +14 -0
- package/dist/components/floating-panel.d.cts +1 -0
- package/dist/components/floating-panel.d.ts +1 -0
- package/dist/components/floating-panel.js +5 -0
- package/dist/components/heatmap.cjs +17 -0
- package/dist/components/heatmap.d.cts +1 -0
- package/dist/components/heatmap.d.ts +1 -0
- package/dist/components/heatmap.js +8 -0
- package/dist/components/hold-button.cjs +14 -0
- package/dist/components/hold-button.d.cts +1 -0
- package/dist/components/hold-button.d.ts +1 -0
- package/dist/components/hold-button.js +5 -0
- package/dist/components/knob.cjs +16 -0
- package/dist/components/knob.d.cts +1 -0
- package/dist/components/knob.d.ts +1 -0
- package/dist/components/knob.js +7 -0
- package/dist/components/line-chart.cjs +17 -0
- package/dist/components/line-chart.d.cts +1 -0
- package/dist/components/line-chart.d.ts +1 -0
- package/dist/components/line-chart.js +8 -0
- package/dist/components/magnetic-button.cjs +14 -0
- package/dist/components/magnetic-button.d.cts +1 -0
- package/dist/components/magnetic-button.d.ts +1 -0
- package/dist/components/magnetic-button.js +5 -0
- package/dist/components/mascots.cjs +33 -0
- package/dist/components/mascots.d.cts +1 -0
- package/dist/components/mascots.d.ts +1 -0
- package/dist/components/mascots.js +4 -0
- package/dist/components/menu.cjs +23 -0
- package/dist/components/menu.d.cts +1 -0
- package/dist/components/menu.d.ts +1 -0
- package/dist/components/menu.js +10 -0
- package/dist/components/morph-button.cjs +14 -0
- package/dist/components/morph-button.d.cts +1 -0
- package/dist/components/morph-button.d.ts +1 -0
- package/dist/components/morph-button.js +5 -0
- package/dist/components/morph-dialog.cjs +33 -0
- package/dist/components/morph-dialog.d.cts +1 -0
- package/dist/components/morph-dialog.d.ts +1 -0
- package/dist/components/morph-dialog.js +8 -0
- package/dist/components/number-field.cjs +16 -0
- package/dist/components/number-field.d.cts +1 -0
- package/dist/components/number-field.d.ts +1 -0
- package/dist/components/number-field.js +7 -0
- package/dist/components/pagination.cjs +19 -0
- package/dist/components/pagination.d.cts +1 -0
- package/dist/components/pagination.d.ts +1 -0
- package/dist/components/pagination.js +6 -0
- package/dist/components/pin-input.cjs +16 -0
- package/dist/components/pin-input.d.cts +1 -0
- package/dist/components/pin-input.d.ts +1 -0
- package/dist/components/pin-input.js +7 -0
- package/dist/components/popover.cjs +19 -0
- package/dist/components/popover.d.cts +1 -0
- package/dist/components/popover.d.ts +1 -0
- package/dist/components/popover.js +10 -0
- package/dist/components/progress.cjs +18 -0
- package/dist/components/progress.d.cts +1 -0
- package/dist/components/progress.d.ts +1 -0
- package/dist/components/progress.js +5 -0
- package/dist/components/radial-menu.cjs +15 -0
- package/dist/components/radial-menu.d.cts +1 -0
- package/dist/components/radial-menu.d.ts +1 -0
- package/dist/components/radial-menu.js +6 -0
- package/dist/components/radio-group.cjs +15 -0
- package/dist/components/radio-group.d.cts +1 -0
- package/dist/components/radio-group.d.ts +1 -0
- package/dist/components/radio-group.js +6 -0
- package/dist/components/resizable-panels.cjs +19 -0
- package/dist/components/resizable-panels.d.cts +1 -0
- package/dist/components/resizable-panels.d.ts +1 -0
- package/dist/components/resizable-panels.js +6 -0
- package/dist/components/segmented-control.cjs +16 -0
- package/dist/components/segmented-control.d.cts +1 -0
- package/dist/components/segmented-control.d.ts +1 -0
- package/dist/components/segmented-control.js +7 -0
- package/dist/components/select.cjs +20 -0
- package/dist/components/select.d.cts +1 -0
- package/dist/components/select.d.ts +1 -0
- package/dist/components/select.js +11 -0
- package/dist/components/skeleton.cjs +17 -0
- package/dist/components/skeleton.d.cts +1 -0
- package/dist/components/skeleton.d.ts +1 -0
- package/dist/components/skeleton.js +4 -0
- package/dist/components/slider.cjs +16 -0
- package/dist/components/slider.d.cts +1 -0
- package/dist/components/slider.d.ts +1 -0
- package/dist/components/slider.js +7 -0
- package/dist/components/sortable-list.cjs +14 -0
- package/dist/components/sortable-list.d.cts +1 -0
- package/dist/components/sortable-list.d.ts +1 -0
- package/dist/components/sortable-list.js +5 -0
- package/dist/components/sparkline.cjs +15 -0
- package/dist/components/sparkline.d.cts +1 -0
- package/dist/components/sparkline.d.ts +1 -0
- package/dist/components/sparkline.js +6 -0
- package/dist/components/stat.cjs +23 -0
- package/dist/components/stat.d.cts +1 -0
- package/dist/components/stat.d.ts +1 -0
- package/dist/components/stat.js +6 -0
- package/dist/components/stepper.cjs +14 -0
- package/dist/components/stepper.d.cts +1 -0
- package/dist/components/stepper.d.ts +1 -0
- package/dist/components/stepper.js +5 -0
- package/dist/components/swipe-confirm.cjs +14 -0
- package/dist/components/swipe-confirm.d.cts +1 -0
- package/dist/components/swipe-confirm.d.ts +1 -0
- package/dist/components/swipe-confirm.js +5 -0
- package/dist/components/switch.cjs +17 -0
- package/dist/components/switch.d.cts +1 -0
- package/dist/components/switch.d.ts +1 -0
- package/dist/components/switch.js +8 -0
- package/dist/components/tabs.cjs +31 -0
- package/dist/components/tabs.d.cts +1 -0
- package/dist/components/tabs.d.ts +1 -0
- package/dist/components/tabs.js +6 -0
- package/dist/components/tether.cjs +17 -0
- package/dist/components/tether.d.cts +1 -0
- package/dist/components/tether.d.ts +1 -0
- package/dist/components/tether.js +4 -0
- package/dist/components/text-field.cjs +31 -0
- package/dist/components/text-field.d.cts +1 -0
- package/dist/components/text-field.d.ts +1 -0
- package/dist/components/text-field.js +6 -0
- package/dist/components/theme-switch.cjs +15 -0
- package/dist/components/theme-switch.d.cts +1 -0
- package/dist/components/theme-switch.d.ts +1 -0
- package/dist/components/theme-switch.js +6 -0
- package/dist/components/toaster.cjs +22 -0
- package/dist/components/toaster.d.cts +1 -0
- package/dist/components/toaster.d.ts +1 -0
- package/dist/components/toaster.js +5 -0
- package/dist/components/tooltip.cjs +17 -0
- package/dist/components/tooltip.d.cts +1 -0
- package/dist/components/tooltip.d.ts +1 -0
- package/dist/components/tooltip.js +8 -0
- package/dist/components/wheel-picker.cjs +16 -0
- package/dist/components/wheel-picker.d.cts +1 -0
- package/dist/components/wheel-picker.d.ts +1 -0
- package/dist/components/wheel-picker.js +7 -0
- package/dist/css/accordion.css +2 -0
- package/dist/css/ai-chat.css +2 -0
- package/dist/css/ai.css +2 -0
- package/dist/css/alert.css +2 -0
- package/dist/css/app-shell.css +2 -0
- package/dist/css/auth.css +2 -0
- package/dist/css/avatar.css +2 -0
- package/dist/css/badge.css +2 -0
- package/dist/css/base.css +2 -0
- package/dist/css/breadcrumbs.css +2 -0
- package/dist/css/button.css +2 -0
- package/dist/css/calendar.css +2 -0
- package/dist/css/card.css +2 -0
- package/dist/css/chart.css +2 -0
- package/dist/css/checkbox.css +2 -0
- package/dist/css/chip-select.css +2 -0
- package/dist/css/clock.css +2 -0
- package/dist/css/color-picker.css +2 -0
- package/dist/css/command-palette.css +2 -0
- package/dist/css/dashboard.css +2 -0
- package/dist/css/data-table.css +2 -0
- package/dist/css/date-picker.css +2 -0
- package/dist/css/dialog.css +2 -0
- package/dist/css/drawer.css +2 -0
- package/dist/css/empty-state.css +2 -0
- package/dist/css/floating-panel.css +2 -0
- package/dist/css/forms.css +2 -0
- package/dist/css/hold-button.css +2 -0
- package/dist/css/kanban.css +2 -0
- package/dist/css/knob.css +2 -0
- package/dist/css/magnetic-button.css +2 -0
- package/dist/css/mascots.css +2 -0
- package/dist/css/menu.css +2 -0
- package/dist/css/modals.css +2 -0
- package/dist/css/morph-button.css +2 -0
- package/dist/css/morph-dialog.css +2 -0
- package/dist/css/notifications.css +2 -0
- package/dist/css/number-field.css +2 -0
- package/dist/css/pagination.css +2 -0
- package/dist/css/permissions.css +2 -0
- package/dist/css/pin-input.css +2 -0
- package/dist/css/popover.css +2 -0
- package/dist/css/progress.css +2 -0
- package/dist/css/radial-menu.css +2 -0
- package/dist/css/radio-group.css +2 -0
- package/dist/css/resizable-panels.css +2 -0
- package/dist/css/scheduling.css +2 -0
- package/dist/css/segmented-control.css +2 -0
- package/dist/css/select.css +2 -0
- package/dist/css/skeleton.css +2 -0
- package/dist/css/slider.css +2 -0
- package/dist/css/sortable-list.css +2 -0
- package/dist/css/sparkline.css +2 -0
- package/dist/css/stepper.css +2 -0
- package/dist/css/swipe-confirm.css +2 -0
- package/dist/css/switch.css +2 -0
- package/dist/css/tabs.css +2 -0
- package/dist/css/template-auth.css +2 -0
- package/dist/css/template-calendar.css +2 -0
- package/dist/css/template-crm.css +2 -0
- package/dist/css/template-dashboard.css +2 -0
- package/dist/css/template-orders.css +2 -0
- package/dist/css/template-settings.css +2 -0
- package/dist/css/template-shared.css +2 -0
- package/dist/css/tether.css +2 -0
- package/dist/css/text-field.css +2 -0
- package/dist/css/theme-switch.css +2 -0
- package/dist/css/toaster.css +2 -0
- package/dist/css/tooltip.css +2 -0
- package/dist/css/wheel-picker.css +2 -0
- package/dist/index.cjs +828 -0
- package/dist/index.d.cts +3182 -0
- package/dist/index.d.ts +3182 -0
- package/dist/index.js +123 -0
- package/dist/styles.css +2 -0
- package/dist/templates/auth.cjs +22 -0
- package/dist/templates/auth.d.cts +1 -0
- package/dist/templates/auth.d.ts +1 -0
- package/dist/templates/auth.js +13 -0
- package/dist/templates/calendar.cjs +40 -0
- package/dist/templates/calendar.d.cts +1 -0
- package/dist/templates/calendar.d.ts +1 -0
- package/dist/templates/calendar.js +31 -0
- package/dist/templates/crm.cjs +43 -0
- package/dist/templates/crm.d.cts +1 -0
- package/dist/templates/crm.d.ts +1 -0
- package/dist/templates/crm.js +34 -0
- package/dist/templates/dashboard.cjs +46 -0
- package/dist/templates/dashboard.d.cts +1 -0
- package/dist/templates/dashboard.d.ts +1 -0
- package/dist/templates/dashboard.js +37 -0
- package/dist/templates/orders.cjs +45 -0
- package/dist/templates/orders.d.cts +1 -0
- package/dist/templates/orders.d.ts +1 -0
- package/dist/templates/orders.js +36 -0
- package/dist/templates/settings.cjs +47 -0
- package/dist/templates/settings.d.cts +1 -0
- package/dist/templates/settings.d.ts +1 -0
- package/dist/templates/settings.js +38 -0
- package/package.json +120 -4
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkW3VOEVRS_cjs = require('./chunk-W3VOEVRS.cjs');
|
|
5
|
+
var chunkGHC7MKBR_cjs = require('./chunk-GHC7MKBR.cjs');
|
|
6
|
+
var chunkB3D6KWG3_cjs = require('./chunk-B3D6KWG3.cjs');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var react = require('motion/react');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
+
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
|
+
|
|
31
|
+
var FieldContext = React__namespace.createContext(null);
|
|
32
|
+
var useField = () => React__namespace.useContext(FieldContext);
|
|
33
|
+
function Field({ label, description, error, required, optional, disabled, labelAction, htmlFor, className, children, ...rest }) {
|
|
34
|
+
const auto = React__namespace.useId();
|
|
35
|
+
const id = htmlFor ?? `sp-field-${auto}`;
|
|
36
|
+
const descriptionId = description ? `${id}-desc` : void 0;
|
|
37
|
+
const errorId = error ? `${id}-err` : void 0;
|
|
38
|
+
const { reduced } = chunkGHC7MKBR_cjs.useMotionPreset();
|
|
39
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FieldContext.Provider, { value: { id, descriptionId, errorId, invalid: !!error, required, disabled }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, className: chunkB3D6KWG3_cjs.cx("sp-field", className), "data-invalid": error ? "" : void 0, "data-disabled": disabled || void 0, children: [
|
|
40
|
+
(label || labelAction) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sp-field__head", children: [
|
|
41
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "sp-field__label", htmlFor: id, children: [
|
|
42
|
+
label,
|
|
43
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sp-field__required", "aria-hidden": true, children: "*" }),
|
|
44
|
+
optional && !required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sp-field__optional", children: "Optional" })
|
|
45
|
+
] }),
|
|
46
|
+
labelAction && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sp-field__action", children: labelAction })
|
|
47
|
+
] }),
|
|
48
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "sp-field__description", id: descriptionId, children: description }),
|
|
49
|
+
children,
|
|
50
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: error && /* @__PURE__ */ jsxRuntime.jsx(
|
|
51
|
+
react.motion.div,
|
|
52
|
+
{
|
|
53
|
+
className: "sp-field__error-wrap",
|
|
54
|
+
initial: reduced ? false : { height: 0, opacity: 0 },
|
|
55
|
+
animate: { height: "auto", opacity: 1 },
|
|
56
|
+
exit: reduced ? void 0 : { height: 0, opacity: 0 },
|
|
57
|
+
transition: { type: "spring", visualDuration: 0.24, bounce: 0 },
|
|
58
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "sp-field__error", id: errorId, role: "alert", children: [
|
|
59
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", width: "12", height: "12", "aria-hidden": true, fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 1.5a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13Zm0 3.25a.75.75 0 0 0-.75.75v3a.75.75 0 0 0 1.5 0v-3A.75.75 0 0 0 8 4.75Zm0 6.75a.85.85 0 1 0 0-1.7.85.85 0 0 0 0 1.7Z" }) }),
|
|
60
|
+
error
|
|
61
|
+
] })
|
|
62
|
+
},
|
|
63
|
+
"error"
|
|
64
|
+
) })
|
|
65
|
+
] }) });
|
|
66
|
+
}
|
|
67
|
+
function useFieldControlProps(own) {
|
|
68
|
+
const field = useField();
|
|
69
|
+
const describedBy = [own["aria-describedby"], field?.descriptionId, field?.errorId].filter(Boolean).join(" ") || void 0;
|
|
70
|
+
return {
|
|
71
|
+
id: own.id ?? field?.id,
|
|
72
|
+
"aria-describedby": describedBy,
|
|
73
|
+
"aria-invalid": own["aria-invalid"] ?? (field?.invalid || void 0),
|
|
74
|
+
required: own.required ?? field?.required,
|
|
75
|
+
disabled: own.disabled ?? field?.disabled
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
var TextField = React__namespace.forwardRef(function TextField2({ label, description, error, optional, labelAction, wrapperClassName, ...rest }, ref) {
|
|
79
|
+
if (label || description || error || labelAction) {
|
|
80
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field, { label, description, error, optional, required: rest.required, disabled: rest.disabled, labelAction, htmlFor: rest.id, className: wrapperClassName, children: /* @__PURE__ */ jsxRuntime.jsx(TextInput, { ...rest, ref, errorKey: typeof error === "string" ? error : error ? "error" : "" }) });
|
|
81
|
+
}
|
|
82
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TextInput, { ...rest, ref, className: chunkB3D6KWG3_cjs.cx(rest.className, wrapperClassName) });
|
|
83
|
+
});
|
|
84
|
+
var TextInput = React__namespace.forwardRef(function TextInput2({ onValueChange, onChange, size = "md", prefix, suffix, clearable, showCount, type = "text", className, style, errorKey, value, defaultValue, maxLength, ...rest }, ref) {
|
|
85
|
+
const control = useFieldControlProps(rest);
|
|
86
|
+
const inputRef = React__namespace.useRef(null);
|
|
87
|
+
const [reveal, setReveal] = React__namespace.useState(false);
|
|
88
|
+
const controlled = value !== void 0;
|
|
89
|
+
const [inner, setInner] = React__namespace.useState(String(defaultValue ?? ""));
|
|
90
|
+
const current = controlled ? String(value ?? "") : inner;
|
|
91
|
+
const isPassword = type === "password";
|
|
92
|
+
const boxRef = React__namespace.useRef(null);
|
|
93
|
+
const { reduced } = chunkGHC7MKBR_cjs.useMotionPreset();
|
|
94
|
+
const prevError = React__namespace.useRef(errorKey);
|
|
95
|
+
React__namespace.useEffect(() => {
|
|
96
|
+
if (errorKey && errorKey !== prevError.current && !reduced) {
|
|
97
|
+
boxRef.current?.animate?.(
|
|
98
|
+
[{ transform: "translateX(0)" }, { transform: "translateX(-3px)" }, { transform: "translateX(3px)" }, { transform: "translateX(-2px)" }, { transform: "translateX(0)" }],
|
|
99
|
+
{ duration: 280, easing: "cubic-bezier(0.22, 1, 0.36, 1)" }
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
prevError.current = errorKey;
|
|
103
|
+
}, [errorKey, reduced]);
|
|
104
|
+
const handleChange = (event) => {
|
|
105
|
+
if (!controlled) setInner(event.target.value);
|
|
106
|
+
onChange?.(event);
|
|
107
|
+
onValueChange?.(event.target.value);
|
|
108
|
+
};
|
|
109
|
+
const clear = () => {
|
|
110
|
+
const el = inputRef.current;
|
|
111
|
+
if (!el) return;
|
|
112
|
+
const setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
|
|
113
|
+
setter?.call(el, "");
|
|
114
|
+
el.dispatchEvent(new Event("input", { bubbles: true }));
|
|
115
|
+
el.focus();
|
|
116
|
+
};
|
|
117
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sp-textfield-wrap", children: [
|
|
118
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
className: chunkB3D6KWG3_cjs.cx("sp-textfield", className),
|
|
122
|
+
style,
|
|
123
|
+
"data-size": size,
|
|
124
|
+
"data-invalid": control["aria-invalid"] ? "" : void 0,
|
|
125
|
+
"data-disabled": control.disabled || void 0,
|
|
126
|
+
ref: boxRef,
|
|
127
|
+
onPointerDown: (e) => {
|
|
128
|
+
if (e.target === e.currentTarget) {
|
|
129
|
+
e.preventDefault();
|
|
130
|
+
inputRef.current?.focus();
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
children: [
|
|
134
|
+
prefix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sp-textfield__adorn", "data-side": "start", children: prefix }),
|
|
135
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
136
|
+
"input",
|
|
137
|
+
{
|
|
138
|
+
...rest,
|
|
139
|
+
...control,
|
|
140
|
+
ref: chunkW3VOEVRS_cjs.mergeRefs(inputRef, ref),
|
|
141
|
+
type: isPassword && reveal ? "text" : type,
|
|
142
|
+
value: controlled ? value : void 0,
|
|
143
|
+
defaultValue: controlled ? void 0 : defaultValue,
|
|
144
|
+
maxLength,
|
|
145
|
+
onChange: handleChange,
|
|
146
|
+
className: "sp-textfield__input"
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
clearable && current && !control.disabled && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "sp-reset-button sp-textfield__btn", "aria-label": "Clear", onClick: clear, tabIndex: -1, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", width: "14", height: "14", "aria-hidden": true, fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 5l6 6M11 5l-6 6" }) }) }),
|
|
150
|
+
isPassword && /* @__PURE__ */ jsxRuntime.jsx(
|
|
151
|
+
"button",
|
|
152
|
+
{
|
|
153
|
+
type: "button",
|
|
154
|
+
className: "sp-reset-button sp-textfield__btn",
|
|
155
|
+
"aria-label": reveal ? "Hide password" : "Show password",
|
|
156
|
+
"aria-pressed": reveal,
|
|
157
|
+
onClick: () => {
|
|
158
|
+
setReveal((r) => !r);
|
|
159
|
+
inputRef.current?.focus();
|
|
160
|
+
},
|
|
161
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(EyeIcon, { open: !reveal })
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
suffix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sp-textfield__adorn", "data-side": "end", children: suffix })
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
showCount && maxLength ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sp-textfield__count", "aria-live": "polite", "data-full": current.length >= maxLength || void 0, children: [
|
|
169
|
+
current.length,
|
|
170
|
+
" / ",
|
|
171
|
+
maxLength
|
|
172
|
+
] }) : null
|
|
173
|
+
] });
|
|
174
|
+
});
|
|
175
|
+
function EyeIcon({ open }) {
|
|
176
|
+
const { reduced } = chunkGHC7MKBR_cjs.useMotionPreset();
|
|
177
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { viewBox: "0 0 16 16", width: "15", height: "15", "aria-hidden": true, fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
178
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1.5 8s2.4-4.5 6.5-4.5S14.5 8 14.5 8 12.1 12.5 8 12.5 1.5 8 1.5 8Z" }),
|
|
179
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "2" }),
|
|
180
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.motion.path, { d: "M2.5 2.5l11 11", initial: false, animate: { pathLength: open ? 0 : 1, opacity: open ? 0 : 1 }, transition: reduced ? { duration: 0 } : { duration: 0.18 } })
|
|
181
|
+
] });
|
|
182
|
+
}
|
|
183
|
+
var TextArea = React__namespace.forwardRef(function TextArea2({ label, description, error, optional, labelAction, wrapperClassName, ...rest }, ref) {
|
|
184
|
+
if (label || description || error || labelAction) {
|
|
185
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field, { label, description, error, optional, required: rest.required, disabled: rest.disabled, labelAction, htmlFor: rest.id, className: wrapperClassName, children: /* @__PURE__ */ jsxRuntime.jsx(TextAreaInput, { ...rest, ref }) });
|
|
186
|
+
}
|
|
187
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TextAreaInput, { ...rest, ref });
|
|
188
|
+
});
|
|
189
|
+
var TextAreaInput = React__namespace.forwardRef(function TextAreaInput2({ onValueChange, onChange, autoResize = true, minRows = 3, maxRows = 10, showCount, className, value, defaultValue, maxLength, ...rest }, ref) {
|
|
190
|
+
const control = useFieldControlProps(rest);
|
|
191
|
+
const elRef = React__namespace.useRef(null);
|
|
192
|
+
const controlled = value !== void 0;
|
|
193
|
+
const [inner, setInner] = React__namespace.useState(String(defaultValue ?? ""));
|
|
194
|
+
const current = controlled ? String(value ?? "") : inner;
|
|
195
|
+
const resize = React__namespace.useCallback(() => {
|
|
196
|
+
const el = elRef.current;
|
|
197
|
+
if (!el || !autoResize) return;
|
|
198
|
+
const cs = getComputedStyle(el);
|
|
199
|
+
const line = parseFloat(cs.lineHeight) || 20;
|
|
200
|
+
const pad = parseFloat(cs.paddingTop) + parseFloat(cs.paddingBottom) + parseFloat(cs.borderTopWidth) + parseFloat(cs.borderBottomWidth);
|
|
201
|
+
el.style.height = "auto";
|
|
202
|
+
const h = Math.min(Math.max(el.scrollHeight, line * minRows + pad), line * maxRows + pad);
|
|
203
|
+
el.style.height = `${h}px`;
|
|
204
|
+
el.style.overflowY = el.scrollHeight > h ? "auto" : "hidden";
|
|
205
|
+
}, [autoResize, minRows, maxRows]);
|
|
206
|
+
chunkW3VOEVRS_cjs.useIsoLayoutEffect(resize, [current, resize]);
|
|
207
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sp-textfield-wrap", children: [
|
|
208
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
209
|
+
"textarea",
|
|
210
|
+
{
|
|
211
|
+
...rest,
|
|
212
|
+
...control,
|
|
213
|
+
ref: chunkW3VOEVRS_cjs.mergeRefs(elRef, ref),
|
|
214
|
+
rows: minRows,
|
|
215
|
+
value: controlled ? value : void 0,
|
|
216
|
+
defaultValue: controlled ? void 0 : defaultValue,
|
|
217
|
+
maxLength,
|
|
218
|
+
onChange: (e) => {
|
|
219
|
+
if (!controlled) setInner(e.target.value);
|
|
220
|
+
onChange?.(e);
|
|
221
|
+
onValueChange?.(e.target.value);
|
|
222
|
+
},
|
|
223
|
+
"data-invalid": control["aria-invalid"] ? "" : void 0,
|
|
224
|
+
className: chunkB3D6KWG3_cjs.cx("sp-textarea", className)
|
|
225
|
+
}
|
|
226
|
+
),
|
|
227
|
+
showCount && maxLength ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sp-textfield__count", "aria-live": "polite", "data-full": current.length >= maxLength || void 0, children: [
|
|
228
|
+
current.length,
|
|
229
|
+
" / ",
|
|
230
|
+
maxLength
|
|
231
|
+
] }) : null
|
|
232
|
+
] });
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
exports.Field = Field;
|
|
236
|
+
exports.TextArea = TextArea;
|
|
237
|
+
exports.TextField = TextField;
|
|
238
|
+
exports.useField = useField;
|
|
239
|
+
exports.useFieldControlProps = useFieldControlProps;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkW3VOEVRS_cjs = require('./chunk-W3VOEVRS.cjs');
|
|
5
|
+
var chunkGHC7MKBR_cjs = require('./chunk-GHC7MKBR.cjs');
|
|
6
|
+
var chunkB3D6KWG3_cjs = require('./chunk-B3D6KWG3.cjs');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var react = require('motion/react');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
+
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
|
+
|
|
31
|
+
function SortableList({ items, onReorder, getKey, getLabel = (item) => getKey(item), renderItem, handle = false, axis = "y", haptics = true, className, ...rest }) {
|
|
32
|
+
const [lifted, setLifted] = React__namespace.useState(null);
|
|
33
|
+
const [announcement, setAnnouncement] = React__namespace.useState("");
|
|
34
|
+
const original = React__namespace.useRef(null);
|
|
35
|
+
const listId = React__namespace.useId();
|
|
36
|
+
const move = (key, delta) => {
|
|
37
|
+
const i = items.findIndex((it) => getKey(it) === key);
|
|
38
|
+
const j = i + delta;
|
|
39
|
+
if (i === -1 || j < 0 || j >= items.length) return;
|
|
40
|
+
const next = items.slice();
|
|
41
|
+
const [moved] = next.splice(i, 1);
|
|
42
|
+
next.splice(j, 0, moved);
|
|
43
|
+
onReorder(next);
|
|
44
|
+
if (haptics) chunkW3VOEVRS_cjs.haptic(4);
|
|
45
|
+
setAnnouncement(`${getLabel(moved)} moved to position ${j + 1} of ${items.length}.`);
|
|
46
|
+
};
|
|
47
|
+
const onKeyDown = (item, index) => (event) => {
|
|
48
|
+
if (event.target !== event.currentTarget) return;
|
|
49
|
+
const key = getKey(item);
|
|
50
|
+
const prev = axis === "y" ? "ArrowUp" : "ArrowLeft";
|
|
51
|
+
const next = axis === "y" ? "ArrowDown" : "ArrowRight";
|
|
52
|
+
if (event.key === " " || event.key === "Enter") {
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
if (lifted === key) {
|
|
55
|
+
setLifted(null);
|
|
56
|
+
original.current = null;
|
|
57
|
+
setAnnouncement(`${getLabel(item)} dropped at position ${index + 1} of ${items.length}.`);
|
|
58
|
+
} else {
|
|
59
|
+
setLifted(key);
|
|
60
|
+
original.current = items.slice();
|
|
61
|
+
setAnnouncement(`${getLabel(item)} lifted. Position ${index + 1} of ${items.length}. Use the arrow keys to move, space to drop, escape to cancel.`);
|
|
62
|
+
}
|
|
63
|
+
} else if (lifted === key && (event.key === prev || event.key === next)) {
|
|
64
|
+
event.preventDefault();
|
|
65
|
+
move(key, event.key === next ? 1 : -1);
|
|
66
|
+
} else if (lifted === key && event.key === "Escape") {
|
|
67
|
+
event.preventDefault();
|
|
68
|
+
if (original.current) onReorder(original.current);
|
|
69
|
+
setLifted(null);
|
|
70
|
+
setAnnouncement(`Reorder cancelled. ${getLabel(item)} returned to its position.`);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
React__namespace.useEffect(() => {
|
|
74
|
+
if (!lifted) return;
|
|
75
|
+
document.getElementById(`${listId}-${lifted}`)?.focus({ preventScroll: false });
|
|
76
|
+
}, [items, lifted]);
|
|
77
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
78
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
79
|
+
react.Reorder.Group,
|
|
80
|
+
{
|
|
81
|
+
...rest,
|
|
82
|
+
axis,
|
|
83
|
+
values: items,
|
|
84
|
+
onReorder,
|
|
85
|
+
className: chunkB3D6KWG3_cjs.cx("sp-sortable", className),
|
|
86
|
+
"data-axis": axis,
|
|
87
|
+
"aria-describedby": `${listId}-hint`,
|
|
88
|
+
children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
89
|
+
SortableItem,
|
|
90
|
+
{
|
|
91
|
+
id: `${listId}-${getKey(item)}`,
|
|
92
|
+
item,
|
|
93
|
+
index,
|
|
94
|
+
handle,
|
|
95
|
+
lifted: lifted === getKey(item),
|
|
96
|
+
onKeyDown: onKeyDown(item, index),
|
|
97
|
+
renderItem,
|
|
98
|
+
haptics
|
|
99
|
+
},
|
|
100
|
+
getKey(item)
|
|
101
|
+
))
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { id: `${listId}-hint`, className: "sp-sr-only", children: "Press space to lift an item, use the arrow keys to move it and space again to drop." }),
|
|
105
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sp-sr-only", "aria-live": "assertive", children: announcement })
|
|
106
|
+
] });
|
|
107
|
+
}
|
|
108
|
+
function SortableItem({
|
|
109
|
+
id,
|
|
110
|
+
item,
|
|
111
|
+
index,
|
|
112
|
+
handle,
|
|
113
|
+
lifted,
|
|
114
|
+
onKeyDown,
|
|
115
|
+
renderItem,
|
|
116
|
+
haptics
|
|
117
|
+
}) {
|
|
118
|
+
const controls = react.useDragControls();
|
|
119
|
+
const [dragging, setDragging] = React__namespace.useState(false);
|
|
120
|
+
const { t, reduced } = chunkGHC7MKBR_cjs.useMotionPreset();
|
|
121
|
+
const active = dragging || lifted;
|
|
122
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
123
|
+
react.Reorder.Item,
|
|
124
|
+
{
|
|
125
|
+
id,
|
|
126
|
+
value: item,
|
|
127
|
+
tabIndex: 0,
|
|
128
|
+
"aria-roledescription": "sortable item",
|
|
129
|
+
"aria-pressed": lifted || void 0,
|
|
130
|
+
className: "sp-sortable__item",
|
|
131
|
+
"data-active": active || void 0,
|
|
132
|
+
dragListener: !handle,
|
|
133
|
+
dragControls: controls,
|
|
134
|
+
onDragStart: () => {
|
|
135
|
+
setDragging(true);
|
|
136
|
+
if (haptics) chunkW3VOEVRS_cjs.haptic(6);
|
|
137
|
+
},
|
|
138
|
+
onDragEnd: () => setDragging(false),
|
|
139
|
+
onKeyDown,
|
|
140
|
+
animate: { scale: active && !reduced ? 1.025 : 1, zIndex: active ? 2 : 0 },
|
|
141
|
+
transition: t({ type: "spring", stiffness: 520, damping: 36 }),
|
|
142
|
+
style: { position: "relative" },
|
|
143
|
+
children: renderItem(item, {
|
|
144
|
+
active,
|
|
145
|
+
index,
|
|
146
|
+
handleProps: handle ? {
|
|
147
|
+
onPointerDown: (e) => {
|
|
148
|
+
e.preventDefault();
|
|
149
|
+
controls.start(e);
|
|
150
|
+
},
|
|
151
|
+
style: { touchAction: "none", cursor: "grab" },
|
|
152
|
+
"aria-hidden": true
|
|
153
|
+
} : {}
|
|
154
|
+
})
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
exports.SortableList = SortableList;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { AuthCard, VerifyCodeForm, ForgotPasswordForm, SignUpForm, SignInForm } from './chunk-WINVYCMX.js';
|
|
3
|
+
import { useMotionPreset } from './chunk-VDQ3DWO4.js';
|
|
4
|
+
import { cx } from './chunk-K6X6O42N.js';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { AnimatePresence, motion } from 'motion/react';
|
|
7
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
function AuthTemplate({ mode, onModeChange, logo, productName = "your workspace", aside, quote, providers, onSignIn, onSignUp, onForgotPassword, onVerify, onResendCode, verifyDestination, terms, className }) {
|
|
10
|
+
const { reduced } = useMotionPreset();
|
|
11
|
+
const order = ["sign-in", "verify", "forgot", "sign-up"];
|
|
12
|
+
const prev = React.useRef(mode);
|
|
13
|
+
const dir = order.indexOf(mode) >= order.indexOf(prev.current) ? 1 : -1;
|
|
14
|
+
React.useEffect(() => {
|
|
15
|
+
prev.current = mode;
|
|
16
|
+
}, [mode]);
|
|
17
|
+
const link = (to, label) => /* @__PURE__ */ jsx("button", { type: "button", className: "sp-reset-button", onClick: () => onModeChange(to), children: label });
|
|
18
|
+
const screens = {
|
|
19
|
+
"sign-in": {
|
|
20
|
+
title: "Welcome back",
|
|
21
|
+
description: `Sign in to ${productName}.`,
|
|
22
|
+
body: /* @__PURE__ */ jsx(SignInForm, { onSubmit: onSignIn, providers, onForgotPassword: () => onModeChange("forgot") }),
|
|
23
|
+
footer: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24
|
+
"No account yet? ",
|
|
25
|
+
link("sign-up", "Create one")
|
|
26
|
+
] })
|
|
27
|
+
},
|
|
28
|
+
"sign-up": {
|
|
29
|
+
title: "Create your account",
|
|
30
|
+
description: "Free for 14 days. No card required.",
|
|
31
|
+
body: /* @__PURE__ */ jsx(SignUpForm, { onSubmit: onSignUp, providers, askCompany: true, terms }),
|
|
32
|
+
footer: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33
|
+
"Already have an account? ",
|
|
34
|
+
link("sign-in", "Sign in")
|
|
35
|
+
] })
|
|
36
|
+
},
|
|
37
|
+
forgot: {
|
|
38
|
+
title: "Reset your password",
|
|
39
|
+
description: "We\u2019ll email you a link to choose a new one.",
|
|
40
|
+
body: /* @__PURE__ */ jsx(ForgotPasswordForm, { onSubmit: onForgotPassword, onBack: () => onModeChange("sign-in") })
|
|
41
|
+
},
|
|
42
|
+
verify: {
|
|
43
|
+
title: "Check your authenticator",
|
|
44
|
+
description: "Enter the code to finish signing in.",
|
|
45
|
+
body: onVerify ? /* @__PURE__ */ jsx(VerifyCodeForm, { onVerify, onResend: onResendCode, destination: verifyDestination }) : null,
|
|
46
|
+
footer: /* @__PURE__ */ jsx(Fragment, { children: link("sign-in", "Use a different account") })
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const s = screens[mode];
|
|
50
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("sp-tpl-auth", className), children: [
|
|
51
|
+
/* @__PURE__ */ jsx("div", { className: "sp-tpl-auth__form", children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", initial: false, custom: dir, children: /* @__PURE__ */ jsx(
|
|
52
|
+
motion.div,
|
|
53
|
+
{
|
|
54
|
+
className: "sp-tpl-auth__screen",
|
|
55
|
+
initial: reduced ? { opacity: 0 } : { opacity: 0, x: dir * 24 },
|
|
56
|
+
animate: { opacity: 1, x: 0 },
|
|
57
|
+
exit: reduced ? { opacity: 0 } : { opacity: 0, x: dir * -24 },
|
|
58
|
+
transition: { type: "spring", visualDuration: 0.3, bounce: 0.04 },
|
|
59
|
+
children: /* @__PURE__ */ jsx(AuthCard, { logo, title: s.title, description: s.description, footer: s.footer, children: s.body })
|
|
60
|
+
},
|
|
61
|
+
mode
|
|
62
|
+
) }) }),
|
|
63
|
+
/* @__PURE__ */ jsx("aside", { className: "sp-tpl-auth__aside", "aria-hidden": !quote && !aside, children: aside ?? /* @__PURE__ */ jsx("div", { className: "sp-tpl-auth__pattern", children: quote && /* @__PURE__ */ jsxs("figure", { className: "sp-tpl-auth__quote", children: [
|
|
64
|
+
/* @__PURE__ */ jsxs("blockquote", { children: [
|
|
65
|
+
"\u201C",
|
|
66
|
+
quote.text,
|
|
67
|
+
"\u201D"
|
|
68
|
+
] }),
|
|
69
|
+
/* @__PURE__ */ jsxs("figcaption", { children: [
|
|
70
|
+
/* @__PURE__ */ jsx("b", { children: quote.author }),
|
|
71
|
+
quote.role && /* @__PURE__ */ jsx("span", { children: quote.role })
|
|
72
|
+
] })
|
|
73
|
+
] }) }) })
|
|
74
|
+
] });
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { AuthTemplate };
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkJC6MXMQZ_cjs = require('./chunk-JC6MXMQZ.cjs');
|
|
5
|
+
var chunkI3HEEAHX_cjs = require('./chunk-I3HEEAHX.cjs');
|
|
6
|
+
var chunkW3VOEVRS_cjs = require('./chunk-W3VOEVRS.cjs');
|
|
7
|
+
var chunkGHC7MKBR_cjs = require('./chunk-GHC7MKBR.cjs');
|
|
8
|
+
var chunkB3D6KWG3_cjs = require('./chunk-B3D6KWG3.cjs');
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var react = require('motion/react');
|
|
11
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
+
|
|
13
|
+
function _interopNamespace(e) {
|
|
14
|
+
if (e && e.__esModule) return e;
|
|
15
|
+
var n = Object.create(null);
|
|
16
|
+
if (e) {
|
|
17
|
+
Object.keys(e).forEach(function (k) {
|
|
18
|
+
if (k !== 'default') {
|
|
19
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return e[k]; }
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
n.default = e;
|
|
28
|
+
return Object.freeze(n);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
32
|
+
|
|
33
|
+
var warmUntil = 0;
|
|
34
|
+
var lastAt = null;
|
|
35
|
+
function Tooltip({ content, shortcut, children, placement = "top", delay = 450, disabled, container, className }) {
|
|
36
|
+
const [open, setOpen] = React__namespace.useState(false);
|
|
37
|
+
const triggerRef = React__namespace.useRef(null);
|
|
38
|
+
const tipRef = React__namespace.useRef(null);
|
|
39
|
+
const timer = React__namespace.useRef(void 0);
|
|
40
|
+
const id = React__namespace.useId();
|
|
41
|
+
const { t, reduced } = chunkGHC7MKBR_cjs.useMotionPreset();
|
|
42
|
+
const { pos } = chunkJC6MXMQZ_cjs.useFloatingPosition(open, triggerRef, tipRef, placement, 7);
|
|
43
|
+
const x = react.useMotionValue(0);
|
|
44
|
+
const y = react.useMotionValue(0);
|
|
45
|
+
const glide = React__namespace.useRef(null);
|
|
46
|
+
const placed = React__namespace.useRef(false);
|
|
47
|
+
const posRef = React__namespace.useRef(pos);
|
|
48
|
+
posRef.current = pos;
|
|
49
|
+
const show = (immediate = false) => {
|
|
50
|
+
if (disabled) return;
|
|
51
|
+
clearTimeout(timer.current);
|
|
52
|
+
const warm = Date.now() < warmUntil;
|
|
53
|
+
glide.current = warm && !reduced ? lastAt : null;
|
|
54
|
+
if (immediate || warm) setOpen(true);
|
|
55
|
+
else timer.current = setTimeout(() => setOpen(true), delay);
|
|
56
|
+
};
|
|
57
|
+
const hide = () => {
|
|
58
|
+
clearTimeout(timer.current);
|
|
59
|
+
setOpen((was) => {
|
|
60
|
+
if (was) {
|
|
61
|
+
warmUntil = Date.now() + 400;
|
|
62
|
+
if (posRef.current) lastAt = { left: posRef.current.left, top: posRef.current.top };
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
React__namespace.useEffect(() => {
|
|
68
|
+
if (!open) {
|
|
69
|
+
placed.current = false;
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (!pos || placed.current) return;
|
|
73
|
+
placed.current = true;
|
|
74
|
+
const from = glide.current;
|
|
75
|
+
const side0 = pos.side;
|
|
76
|
+
const spring = { type: "spring", stiffness: 520, damping: 38, mass: 0.7 };
|
|
77
|
+
if (from) {
|
|
78
|
+
x.set(from.left - pos.left);
|
|
79
|
+
y.set(from.top - pos.top);
|
|
80
|
+
} else {
|
|
81
|
+
const off = chunkJC6MXMQZ_cjs.enterFrom(side0, reduced ? 0 : 3);
|
|
82
|
+
x.set(off.x ?? 0);
|
|
83
|
+
y.set(off.y ?? 0);
|
|
84
|
+
}
|
|
85
|
+
void react.animate(x, 0, spring);
|
|
86
|
+
void react.animate(y, 0, spring);
|
|
87
|
+
}, [open, pos]);
|
|
88
|
+
React__namespace.useEffect(() => () => clearTimeout(timer.current), []);
|
|
89
|
+
React__namespace.useEffect(() => {
|
|
90
|
+
if (!open) return;
|
|
91
|
+
const onKey = (e) => e.key === "Escape" && hide();
|
|
92
|
+
document.addEventListener("keydown", onKey);
|
|
93
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
94
|
+
}, [open]);
|
|
95
|
+
const child = React__namespace.Children.only(children);
|
|
96
|
+
const p = child.props;
|
|
97
|
+
const trigger = React__namespace.cloneElement(child, {
|
|
98
|
+
ref: chunkW3VOEVRS_cjs.mergeRefs(triggerRef, chunkJC6MXMQZ_cjs.getElementRef(child)),
|
|
99
|
+
"aria-describedby": [p["aria-describedby"], open ? id : null].filter(Boolean).join(" ") || void 0,
|
|
100
|
+
onPointerEnter: (e) => {
|
|
101
|
+
p.onPointerEnter?.(e);
|
|
102
|
+
if (e.pointerType !== "touch") show();
|
|
103
|
+
},
|
|
104
|
+
onPointerLeave: (e) => {
|
|
105
|
+
p.onPointerLeave?.(e);
|
|
106
|
+
hide();
|
|
107
|
+
},
|
|
108
|
+
onPointerDown: (e) => {
|
|
109
|
+
p.onPointerDown?.(e);
|
|
110
|
+
hide();
|
|
111
|
+
},
|
|
112
|
+
onFocus: (e) => {
|
|
113
|
+
p.onFocus?.(e);
|
|
114
|
+
if (e.target.matches?.(":focus-visible")) show(true);
|
|
115
|
+
},
|
|
116
|
+
onBlur: (e) => {
|
|
117
|
+
p.onBlur?.(e);
|
|
118
|
+
hide();
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
const side = pos?.side ?? placement.split("-")[0];
|
|
122
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
123
|
+
trigger,
|
|
124
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkI3HEEAHX_cjs.Portal, { container, anchor: triggerRef.current, children: /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { children: open && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
125
|
+
react.motion.div,
|
|
126
|
+
{
|
|
127
|
+
ref: tipRef,
|
|
128
|
+
id,
|
|
129
|
+
role: "tooltip",
|
|
130
|
+
className: chunkB3D6KWG3_cjs.cx("sp-tooltip", className),
|
|
131
|
+
"data-side": side,
|
|
132
|
+
style: { top: pos?.top ?? -9999, left: pos?.left ?? -9999, transformOrigin: pos?.origin, visibility: pos ? "visible" : "hidden", pointerEvents: "none", x, y },
|
|
133
|
+
initial: { opacity: glide.current ? 0.7 : 0, scale: reduced || glide.current ? 1 : 0.96 },
|
|
134
|
+
animate: { opacity: 1, scale: 1 },
|
|
135
|
+
exit: { opacity: 0, transition: { duration: 0.08 } },
|
|
136
|
+
transition: t({ type: "spring", stiffness: 700, damping: 40, mass: 0.6 }),
|
|
137
|
+
children: [
|
|
138
|
+
content,
|
|
139
|
+
shortcut && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sp-tooltip__keys", "aria-label": `Shortcut ${shortcut}`, children: shortcut.split(/\s*\+\s*|\s+/).map((k, i) => /* @__PURE__ */ jsxRuntime.jsx("kbd", { children: k }, i)) })
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
) }) })
|
|
143
|
+
] });
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
exports.Tooltip = Tooltip;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useMotionPreset } from './chunk-VDQ3DWO4.js';
|
|
3
|
+
import { cx } from './chunk-K6X6O42N.js';
|
|
4
|
+
import { motion } from 'motion/react';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function Stepper({ steps, current, orientation = "horizontal", onStepClick, size = "md", className, ...rest }) {
|
|
8
|
+
const { t } = useMotionPreset();
|
|
9
|
+
return /* @__PURE__ */ jsx("ol", { ...rest, className: cx("sp-stepper", className), "data-orientation": orientation, "data-size": size, "aria-label": rest["aria-label"] ?? "Progress", children: steps.map((step, i) => {
|
|
10
|
+
const state = step.error ? "error" : i < current ? "complete" : i === current ? "current" : "upcoming";
|
|
11
|
+
const clickable = !!onStepClick && i < current;
|
|
12
|
+
const Marker = clickable ? "button" : "span";
|
|
13
|
+
return /* @__PURE__ */ jsxs("li", { className: "sp-stepper__step", "data-state": state, "aria-current": i === current ? "step" : void 0, children: [
|
|
14
|
+
/* @__PURE__ */ jsxs(
|
|
15
|
+
Marker,
|
|
16
|
+
{
|
|
17
|
+
...clickable ? { type: "button", onClick: () => onStepClick?.(i) } : {},
|
|
18
|
+
className: cx("sp-stepper__head", clickable && "sp-reset-button"),
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx("span", { className: "sp-stepper__dot", "aria-hidden": true, children: state === "complete" ? /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "12", height: "12", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx(motion.path, { d: "m3.5 8.3 2.9 2.8 6.1-6.2", initial: { pathLength: 0 }, animate: { pathLength: 1 }, transition: t({ duration: 0.28, ease: [0.22, 1, 0.36, 1] }) }) }) : state === "error" ? "!" : i + 1 }),
|
|
21
|
+
/* @__PURE__ */ jsxs("span", { className: "sp-stepper__text", children: [
|
|
22
|
+
/* @__PURE__ */ jsx("span", { className: "sp-stepper__label", children: step.label }),
|
|
23
|
+
step.description && /* @__PURE__ */ jsx("span", { className: "sp-stepper__desc", children: step.description })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ jsx("span", { className: "sp-sr-only", children: state === "complete" ? " (completed)" : state === "error" ? " (has errors)" : "" })
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
i < steps.length - 1 && /* @__PURE__ */ jsx("span", { className: "sp-stepper__line", "aria-hidden": true, children: /* @__PURE__ */ jsx(motion.span, { className: "sp-stepper__fill", initial: false, animate: { scaleX: orientation === "horizontal" ? i < current ? 1 : 0 : 1, scaleY: orientation === "vertical" ? i < current ? 1 : 0 : 1 }, transition: t({ type: "spring", visualDuration: 0.4, bounce: 0 }) }) })
|
|
30
|
+
] }, step.id);
|
|
31
|
+
}) });
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { Stepper };
|