@wealthx/shadcn 1.3.2 → 1.3.4
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/.turbo/turbo-build.log +227 -191
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-2UM72RJ7.mjs → chunk-2D3HQPFN.mjs} +12 -10
- package/dist/chunk-2EM2FRU6.mjs +613 -0
- package/dist/{chunk-FH6QVUVZ.mjs → chunk-2GIYVERS.mjs} +2 -2
- package/dist/chunk-2P7HP7LR.mjs +68 -0
- package/dist/{chunk-HISNT2MG.mjs → chunk-37AE3OM5.mjs} +5 -5
- package/dist/{chunk-HBZLGDIN.mjs → chunk-3ERBUVHC.mjs} +169 -110
- package/dist/{chunk-C7CQJNMR.mjs → chunk-3VDET466.mjs} +2 -2
- package/dist/{chunk-462HMNO4.mjs → chunk-4MM7LHM5.mjs} +2 -2
- package/dist/{chunk-QMY3AZJH.mjs → chunk-4Z66LMIQ.mjs} +2 -2
- package/dist/{chunk-U5X52X37.mjs → chunk-57ZXILTS.mjs} +6 -6
- package/dist/{chunk-2A5RRQGG.mjs → chunk-5NF6T2RS.mjs} +11 -20
- package/dist/{chunk-3OYFOX3X.mjs → chunk-5VOTTIXF.mjs} +2 -2
- package/dist/{chunk-LBMRIB3G.mjs → chunk-6AJUS7VX.mjs} +1 -1
- package/dist/{chunk-OODBHKG7.mjs → chunk-6HIOM2HL.mjs} +7 -4
- package/dist/{chunk-BDYZCBRT.mjs → chunk-6QAFGZC2.mjs} +2 -2
- package/dist/{chunk-U4NDAF2P.mjs → chunk-6TX73WG7.mjs} +1 -1
- package/dist/{chunk-GD4BJDJR.mjs → chunk-7BTFGCFC.mjs} +4 -4
- package/dist/{chunk-FAKPBKLT.mjs → chunk-7GWRPXHD.mjs} +4 -4
- package/dist/{chunk-NMOI6CQD.mjs → chunk-7YI3HEBH.mjs} +5 -5
- package/dist/{chunk-T4BJLT57.mjs → chunk-AE7MASLF.mjs} +5 -5
- package/dist/{chunk-VLQZANBF.mjs → chunk-AFML43VJ.mjs} +6 -1
- package/dist/chunk-BBXSNDS3.mjs +260 -0
- package/dist/chunk-BOW7U26Y.mjs +203 -0
- package/dist/{chunk-34NWQURD.mjs → chunk-BS75ICOO.mjs} +2 -2
- package/dist/chunk-D2NSIIXG.mjs +394 -0
- package/dist/{chunk-3GF7OVTP.mjs → chunk-DGNHGNYH.mjs} +2 -2
- package/dist/{chunk-VLARHE5V.mjs → chunk-DMXYRCHM.mjs} +6 -6
- package/dist/{chunk-OGOYQ7BG.mjs → chunk-DQB4EPIS.mjs} +1 -1
- package/dist/{chunk-MIZQHHUO.mjs → chunk-FL6DZFJK.mjs} +106 -38
- package/dist/{chunk-I3RZS7V2.mjs → chunk-FLL633WS.mjs} +19 -33
- package/dist/{chunk-PBL4OQV2.mjs → chunk-FTPBQVQ6.mjs} +4 -4
- package/dist/chunk-FYPSTTEJ.mjs +169 -0
- package/dist/{chunk-6O6KD7CE.mjs → chunk-G27TSQLQ.mjs} +6 -6
- package/dist/{chunk-66MI7Q4B.mjs → chunk-GT3RU6GA.mjs} +2 -2
- package/dist/{chunk-D6ID6M4V.mjs → chunk-GTAVSBDO.mjs} +2 -2
- package/dist/{chunk-24FUO7TD.mjs → chunk-H6NQTIF4.mjs} +2 -2
- package/dist/{chunk-7DHU4VGG.mjs → chunk-HK4HUQTV.mjs} +2 -2
- package/dist/chunk-I4KVSZCH.mjs +101 -0
- package/dist/{chunk-RGVKLTLH.mjs → chunk-IKXYTCSB.mjs} +2 -2
- package/dist/{chunk-Y6DWJSKZ.mjs → chunk-ISUA7DSB.mjs} +1 -1
- package/dist/{chunk-J5UICVJS.mjs → chunk-JPGL36WQ.mjs} +2 -2
- package/dist/{chunk-7XJHLGUV.mjs → chunk-JTK6VJXY.mjs} +2 -2
- package/dist/{chunk-7YAU5CY6.mjs → chunk-JVMXMFBB.mjs} +2 -2
- package/dist/{chunk-IAE3F7DR.mjs → chunk-JZY6TNIS.mjs} +21 -21
- package/dist/{chunk-K5A5L6T2.mjs → chunk-K4KOD3KR.mjs} +12 -12
- package/dist/{chunk-MBON7YRJ.mjs → chunk-K5QV4TT6.mjs} +3 -3
- package/dist/{chunk-IHMFS7NZ.mjs → chunk-K5VHK7CM.mjs} +21 -21
- package/dist/{chunk-RJI6GKVF.mjs → chunk-KCWNDYPZ.mjs} +5 -5
- package/dist/{chunk-UFYSFDER.mjs → chunk-KFH36NKF.mjs} +1 -1
- package/dist/{chunk-EBXQWIYG.mjs → chunk-KLTACJ2G.mjs} +5 -5
- package/dist/{chunk-3TTACBDP.mjs → chunk-KWD6GANL.mjs} +4 -4
- package/dist/{chunk-IOJRDS6V.mjs → chunk-L4NSRQ3T.mjs} +218 -147
- package/dist/{chunk-GYMYRIZP.mjs → chunk-LBTHZSBT.mjs} +2 -2
- package/dist/{chunk-AMQZRHEZ.mjs → chunk-LQULK2E3.mjs} +5 -5
- package/dist/{chunk-YJG55G2H.mjs → chunk-LR6LHDP3.mjs} +5 -5
- package/dist/{chunk-7PV3IWCN.mjs → chunk-M4VYX2PV.mjs} +19 -1
- package/dist/{chunk-P76HMUI6.mjs → chunk-MDUKXXIL.mjs} +2 -2
- package/dist/{chunk-LV35NGVG.mjs → chunk-N6Q5IPKT.mjs} +9 -9
- package/dist/{chunk-DOEO3CDL.mjs → chunk-NB3ZL36B.mjs} +1 -1
- package/dist/{chunk-XREGSKX3.mjs → chunk-NOOEKOWY.mjs} +5 -5
- package/dist/{chunk-NL3ZO62D.mjs → chunk-NT4FX27K.mjs} +1 -1
- package/dist/{chunk-QZ4RE6NA.mjs → chunk-NTYQWVLI.mjs} +6 -6
- package/dist/{chunk-ERGGHC2V.mjs → chunk-OEOOYMC2.mjs} +2 -2
- package/dist/{chunk-4GAWMKMI.mjs → chunk-OIKBW2QD.mjs} +291 -54
- package/dist/{chunk-DUJTAXMH.mjs → chunk-OKTJFDPN.mjs} +6 -6
- package/dist/chunk-OLKMCXAR.mjs +1219 -0
- package/dist/{chunk-EI5F6FMT.mjs → chunk-OWFQSXVD.mjs} +3 -3
- package/dist/{chunk-6DZEXFNB.mjs → chunk-P2N2PEFY.mjs} +3 -3
- package/dist/{chunk-NSLMILBT.mjs → chunk-P7CEBZM6.mjs} +2 -2
- package/dist/{chunk-7S5AESZO.mjs → chunk-PNRUH7JY.mjs} +6 -6
- package/dist/{chunk-ZU4NV6RG.mjs → chunk-PNSYFE3K.mjs} +2 -2
- package/dist/{chunk-JKGDCQTZ.mjs → chunk-QTRSCVQ3.mjs} +5 -5
- package/dist/{chunk-ABFDMHOR.mjs → chunk-QX7IFQSF.mjs} +5 -5
- package/dist/{chunk-CFMQP5QS.mjs → chunk-QXKGOMUX.mjs} +6 -6
- package/dist/{chunk-NQPOYKAQ.mjs → chunk-R2ON6CAN.mjs} +2 -2
- package/dist/{chunk-DBHJ5KC3.mjs → chunk-R4HCRDU5.mjs} +1 -1
- package/dist/{chunk-EWRB4PAD.mjs → chunk-RCAOCHWA.mjs} +14 -14
- package/dist/{chunk-EFRENWEJ.mjs → chunk-RSUIPKGX.mjs} +2 -2
- package/dist/{chunk-DGHAXJBN.mjs → chunk-S2FKV4M5.mjs} +5 -5
- package/dist/{chunk-RGU7HOEC.mjs → chunk-SET2ANTY.mjs} +5 -7
- package/dist/chunk-SFH2NJEJ.mjs +47 -0
- package/dist/{chunk-6AW4KJHE.mjs → chunk-SIVYAI3M.mjs} +12 -12
- package/dist/{chunk-5FQIKDKP.mjs → chunk-THVO2N47.mjs} +8 -8
- package/dist/{chunk-JMHR3YGZ.mjs → chunk-TLAWKTSA.mjs} +3 -3
- package/dist/{chunk-HVY6KCCF.mjs → chunk-TOWTPLRC.mjs} +68 -72
- package/dist/{chunk-6JQFUE5I.mjs → chunk-UALR6JGV.mjs} +2 -2
- package/dist/{chunk-N6TNTQL6.mjs → chunk-UJZ4UHWI.mjs} +9 -11
- package/dist/{chunk-MARPPFOJ.mjs → chunk-UNACI2YK.mjs} +2 -2
- package/dist/{chunk-3NCUZIFP.mjs → chunk-V6XGXYCJ.mjs} +7 -7
- package/dist/chunk-VB5M6OZQ.mjs +57 -0
- package/dist/{chunk-5IS7G74I.mjs → chunk-VY5NEUP7.mjs} +6 -6
- package/dist/{chunk-JHJHG4GO.mjs → chunk-WE4YKBDE.mjs} +2 -2
- package/dist/{chunk-BKNFWEH2.mjs → chunk-WL6WVV47.mjs} +3 -3
- package/dist/{chunk-FWCSY2DS.mjs → chunk-WNQUEZJF.mjs} +22 -1
- package/dist/{chunk-2Y7YJKPE.mjs → chunk-WZ6UJCBL.mjs} +1 -1
- package/dist/{chunk-UMTOX62O.mjs → chunk-XYPW2XA5.mjs} +13 -10
- package/dist/chunk-Y2MTAVAK.mjs +34 -0
- package/dist/{chunk-6CR5N2JW.mjs → chunk-YCWLFG27.mjs} +6 -6
- package/dist/{chunk-PU4YZQXV.mjs → chunk-YE67AALL.mjs} +12 -12
- package/dist/{chunk-M3FV7LOK.mjs → chunk-YEWNFK5S.mjs} +6 -1
- package/dist/{chunk-R3VSPKNP.mjs → chunk-YIZHS72Z.mjs} +11 -12
- package/dist/{chunk-7PYJD5JI.mjs → chunk-ZEDMKQK2.mjs} +2 -2
- package/dist/{chunk-N2PT566P.mjs → chunk-ZFCDYW6N.mjs} +4 -4
- package/dist/chunk-ZGQIVGIN.mjs +57 -0
- package/dist/{chunk-Q2BGOAMG.mjs → chunk-ZKWXDQDG.mjs} +4 -4
- package/dist/{chunk-GHC7LLUX.mjs → chunk-ZOWL2L5J.mjs} +5 -5
- package/dist/components/ui/accordion.mjs +3 -3
- package/dist/components/ui/add-column-modal.js +2 -2
- package/dist/components/ui/add-column-modal.mjs +10 -10
- package/dist/components/ui/add-lead-modal.js +424 -82
- package/dist/components/ui/add-lead-modal.mjs +12 -9
- package/dist/components/ui/advisor-card.js +2 -2
- package/dist/components/ui/advisor-card.mjs +8 -8
- package/dist/components/ui/ai-assistant-drawer.js +2 -2
- package/dist/components/ui/ai-assistant-drawer.mjs +9 -9
- package/dist/components/ui/ai-builder.js +958 -0
- package/dist/components/ui/ai-builder.mjs +25 -0
- package/dist/components/ui/ai-conversations.js +2045 -0
- package/dist/components/ui/ai-conversations.mjs +41 -0
- package/dist/components/ui/alert-dialog.js +2 -2
- package/dist/components/ui/alert-dialog.mjs +5 -5
- package/dist/components/ui/alert.mjs +3 -3
- package/dist/components/ui/appointment-action-dialogs.js +19 -3
- package/dist/components/ui/appointment-action-dialogs.mjs +15 -14
- package/dist/components/ui/appointment-availability-settings.js +181 -111
- package/dist/components/ui/appointment-availability-settings.mjs +20 -18
- package/dist/components/ui/appointment-book-dialog.js +113 -24
- package/dist/components/ui/appointment-book-dialog.mjs +21 -20
- package/dist/components/ui/appointment-calendar-view.js +19 -3
- package/dist/components/ui/appointment-calendar-view.mjs +10 -9
- package/dist/components/ui/appointment-detail-sheet.js +19 -3
- package/dist/components/ui/appointment-detail-sheet.mjs +18 -17
- package/dist/components/ui/appointment-gmail-connect.js +49 -89
- package/dist/components/ui/appointment-gmail-connect.mjs +8 -9
- package/dist/components/ui/appointment-mini-card.js +2 -2
- package/dist/components/ui/appointment-mini-card.mjs +6 -6
- package/dist/components/ui/appointment-time-slot-picker.mjs +6 -6
- package/dist/components/ui/appointment-upcoming-card.js +19 -3
- package/dist/components/ui/appointment-upcoming-card.mjs +15 -14
- package/dist/components/ui/auth-logo.js +95 -0
- package/dist/components/ui/auth-logo.mjs +8 -0
- package/dist/components/ui/auth-page-layout.js +108 -0
- package/dist/components/ui/auth-page-layout.mjs +8 -0
- package/dist/components/ui/avatar.mjs +3 -3
- package/dist/components/ui/backoffice-alert-history-chart.js +2 -2
- package/dist/components/ui/backoffice-alert-history-chart.mjs +9 -9
- package/dist/components/ui/backoffice-alerts-chart.js +2 -2
- package/dist/components/ui/backoffice-alerts-chart.mjs +11 -11
- package/dist/components/ui/backoffice-connections-chart.js +2 -2
- package/dist/components/ui/backoffice-connections-chart.mjs +11 -11
- package/dist/components/ui/backoffice-contact-history-chart.js +2 -2
- package/dist/components/ui/backoffice-contact-history-chart.mjs +9 -9
- package/dist/components/ui/badge.mjs +4 -4
- package/dist/components/ui/borrowing-capacity-line-chart.js +145 -132
- package/dist/components/ui/borrowing-capacity-line-chart.mjs +9 -9
- package/dist/components/ui/button.js +2 -2
- package/dist/components/ui/button.mjs +4 -4
- package/dist/components/ui/calendar.js +17 -3
- package/dist/components/ui/calendar.mjs +6 -5
- package/dist/components/ui/card.mjs +3 -3
- package/dist/components/ui/cash-balance-line-chart.js +158 -158
- package/dist/components/ui/cash-balance-line-chart.mjs +9 -9
- package/dist/components/ui/cashflow-bar-chart.js +2 -2
- package/dist/components/ui/cashflow-bar-chart.mjs +9 -9
- package/dist/components/ui/chat-widget-primitives.js +573 -0
- package/dist/components/ui/chat-widget-primitives.mjs +21 -0
- package/dist/components/ui/chat-widget.js +1268 -0
- package/dist/components/ui/chat-widget.mjs +29 -0
- package/dist/components/ui/checkbox.mjs +3 -3
- package/dist/components/ui/chip.js +2 -2
- package/dist/components/ui/chip.mjs +6 -6
- package/dist/components/ui/color-picker.js +2 -2
- package/dist/components/ui/color-picker.mjs +7 -7
- package/dist/components/ui/combobox.mjs +3 -3
- package/dist/components/ui/data-table.js +2 -2
- package/dist/components/ui/data-table.mjs +12 -12
- package/dist/components/ui/date-picker.js +22 -6
- package/dist/components/ui/date-picker.mjs +9 -8
- package/dist/components/ui/dialog.js +2 -2
- package/dist/components/ui/dialog.mjs +5 -5
- package/dist/components/ui/document-checklist-template.js +630 -0
- package/dist/components/ui/document-checklist-template.mjs +15 -0
- package/dist/components/ui/drawer.js +2 -2
- package/dist/components/ui/drawer.mjs +3 -3
- package/dist/components/ui/dropdown-menu.mjs +3 -3
- package/dist/components/ui/empty.mjs +3 -3
- package/dist/components/ui/expense-bar-chart.js +2 -2
- package/dist/components/ui/expense-bar-chart.mjs +9 -9
- package/dist/components/ui/field.mjs +5 -5
- package/dist/components/ui/financial-cards.js +431 -291
- package/dist/components/ui/financial-cards.mjs +10 -9
- package/dist/components/ui/financial-drawers.js +4 -4
- package/dist/components/ui/financial-drawers.mjs +8 -8
- package/dist/components/ui/financial-primitives.mjs +3 -3
- package/dist/components/ui/financial-sections.js +8 -9
- package/dist/components/ui/financial-sections.mjs +12 -12
- package/dist/components/ui/form-primitives.mjs +8 -8
- package/dist/components/ui/income-bar-chart.js +2 -2
- package/dist/components/ui/income-bar-chart.mjs +9 -9
- package/dist/components/ui/input-group.js +2 -2
- package/dist/components/ui/input-group.mjs +7 -7
- package/dist/components/ui/input-otp.mjs +3 -3
- package/dist/components/ui/input.mjs +3 -3
- package/dist/components/ui/kanban-column.js +19 -23
- package/dist/components/ui/kanban-column.mjs +14 -14
- package/dist/components/ui/label.mjs +3 -3
- package/dist/components/ui/onboarding-layout.js +476 -0
- package/dist/components/ui/onboarding-layout.mjs +11 -0
- package/dist/components/ui/opportunity-card.js +2 -2
- package/dist/components/ui/opportunity-card.mjs +12 -12
- package/dist/components/ui/opportunity-edit-modals.js +22 -6
- package/dist/components/ui/opportunity-edit-modals.mjs +21 -20
- package/dist/components/ui/opportunity-summary-tab.js +991 -674
- package/dist/components/ui/opportunity-summary-tab.mjs +26 -26
- package/dist/components/ui/page-header.mjs +3 -3
- package/dist/components/ui/page-top-bar.mjs +3 -3
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/pagination.mjs +6 -6
- package/dist/components/ui/password-strength-tooltip.js +197 -0
- package/dist/components/ui/password-strength-tooltip.mjs +11 -0
- package/dist/components/ui/pipeline-alerts.mjs +3 -3
- package/dist/components/ui/pipeline-board.js +19 -23
- package/dist/components/ui/pipeline-board.mjs +18 -18
- package/dist/components/ui/pipeline-chart.js +12 -6
- package/dist/components/ui/pipeline-chart.mjs +4 -3
- package/dist/components/ui/pipeline-dialogs.js +28 -12
- package/dist/components/ui/pipeline-dialogs.mjs +14 -13
- package/dist/components/ui/pipeline-primitives.mjs +6 -6
- package/dist/components/ui/popover.mjs +3 -3
- package/dist/components/ui/progress.mjs +3 -3
- package/dist/components/ui/property-cashflow-doughnut-chart.js +2 -2
- package/dist/components/ui/property-cashflow-doughnut-chart.mjs +9 -9
- package/dist/components/ui/property-debt-equity-doughnut-chart.js +2 -2
- package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +9 -9
- package/dist/components/ui/property-mobile-estimate-line-chart.js +2 -2
- package/dist/components/ui/property-mobile-estimate-line-chart.mjs +9 -9
- package/dist/components/ui/radio-group.mjs +3 -3
- package/dist/components/ui/select.mjs +3 -3
- package/dist/components/ui/separator.mjs +3 -3
- package/dist/components/ui/sheet.mjs +3 -3
- package/dist/components/ui/sidebar-nav.js +6 -5
- package/dist/components/ui/sidebar-nav.mjs +7 -7
- package/dist/components/ui/skeleton.mjs +3 -3
- package/dist/components/ui/slider.mjs +3 -3
- package/dist/components/ui/sonner.mjs +2 -2
- package/dist/components/ui/spinner.mjs +3 -3
- package/dist/components/ui/stage-timeline.mjs +10 -10
- package/dist/components/ui/stepper.mjs +3 -3
- package/dist/components/ui/switch.mjs +3 -3
- package/dist/components/ui/table.mjs +3 -3
- package/dist/components/ui/tabs.mjs +3 -3
- package/dist/components/ui/textarea.mjs +3 -3
- package/dist/components/ui/toggle-group.mjs +4 -4
- package/dist/components/ui/toggle.mjs +3 -3
- package/dist/components/ui/tooltip.mjs +3 -3
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +2 -2
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +9 -9
- package/dist/components/ui/transactions-income-expense-bar-chart.js +2 -2
- package/dist/components/ui/transactions-income-expense-bar-chart.mjs +9 -9
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +2 -2
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +9 -9
- package/dist/components/ui/two-fa-setup-form.js +612 -0
- package/dist/components/ui/two-fa-setup-form.mjs +16 -0
- package/dist/components/ui/upload-card.js +187 -0
- package/dist/components/ui/upload-card.mjs +10 -0
- package/dist/components/ui/video-background.js +118 -0
- package/dist/components/ui/video-background.mjs +8 -0
- package/dist/index.js +12674 -9311
- package/dist/index.mjs +341 -245
- package/dist/lib/colors.mjs +1 -1
- package/dist/lib/theme-provider.mjs +1 -1
- package/dist/lib/typography.mjs +2 -2
- package/dist/lib/utils.js +8 -2
- package/dist/lib/utils.mjs +6 -4
- package/dist/styles.css +1 -1
- package/package.json +61 -1
- package/src/components/index.tsx +126 -1
- package/src/components/ui/add-lead-modal.tsx +101 -142
- package/src/components/ui/ai-builder.tsx +560 -0
- package/src/components/ui/ai-conversations.tsx +1690 -0
- package/src/components/ui/appointment-availability-settings.tsx +152 -101
- package/src/components/ui/appointment-book-dialog.tsx +138 -24
- package/src/components/ui/appointment-calendar-view.tsx +2 -3
- package/src/components/ui/appointment-gmail-connect.tsx +23 -42
- package/src/components/ui/auth-logo.tsx +50 -0
- package/src/components/ui/auth-page-layout.tsx +59 -0
- package/src/components/ui/borrowing-capacity-line-chart.tsx +10 -8
- package/src/components/ui/button.tsx +2 -2
- package/src/components/ui/calendar.tsx +2 -1
- package/src/components/ui/cash-balance-line-chart.tsx +11 -20
- package/src/components/ui/chart-shared.tsx +10 -0
- package/src/components/ui/chat-widget-primitives.tsx +336 -0
- package/src/components/ui/chat-widget.tsx +822 -0
- package/src/components/ui/document-checklist-template.tsx +264 -0
- package/src/components/ui/drawer.tsx +2 -2
- package/src/components/ui/financial-cards.tsx +176 -78
- package/src/components/ui/financial-drawers.tsx +2 -2
- package/src/components/ui/financial-sections.tsx +1 -1
- package/src/components/ui/kanban-column.tsx +2 -5
- package/src/components/ui/onboarding-layout.tsx +109 -0
- package/src/components/ui/opportunity-summary-tab.tsx +469 -142
- package/src/components/ui/password-strength-tooltip.tsx +70 -0
- package/src/components/ui/pipeline-chart.tsx +2 -6
- package/src/components/ui/sidebar-nav.tsx +1 -11
- package/src/components/ui/two-fa-setup-form.tsx +229 -0
- package/src/components/ui/upload-card.tsx +98 -0
- package/src/components/ui/video-background.tsx +55 -0
- package/src/lib/format-date.ts +26 -0
- package/src/lib/utils.ts +11 -0
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +13 -0
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __copyProps = (to, from, except, desc) => {
|
|
42
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(from))
|
|
44
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return to;
|
|
48
|
+
};
|
|
49
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
+
mod
|
|
56
|
+
));
|
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
+
var __async = (__this, __arguments, generator) => {
|
|
59
|
+
return new Promise((resolve, reject) => {
|
|
60
|
+
var fulfilled = (value) => {
|
|
61
|
+
try {
|
|
62
|
+
step(generator.next(value));
|
|
63
|
+
} catch (e) {
|
|
64
|
+
reject(e);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var rejected = (value) => {
|
|
68
|
+
try {
|
|
69
|
+
step(generator.throw(value));
|
|
70
|
+
} catch (e) {
|
|
71
|
+
reject(e);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
75
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// src/components/ui/two-fa-setup-form.tsx
|
|
80
|
+
var two_fa_setup_form_exports = {};
|
|
81
|
+
__export(two_fa_setup_form_exports, {
|
|
82
|
+
TwoFASetupForm: () => TwoFASetupForm
|
|
83
|
+
});
|
|
84
|
+
module.exports = __toCommonJS(two_fa_setup_form_exports);
|
|
85
|
+
var import_react3 = require("react");
|
|
86
|
+
var import_lucide_react2 = require("lucide-react");
|
|
87
|
+
|
|
88
|
+
// src/components/ui/button.tsx
|
|
89
|
+
var import_react = require("react");
|
|
90
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
91
|
+
var import_lucide_react = require("lucide-react");
|
|
92
|
+
|
|
93
|
+
// src/lib/utils.ts
|
|
94
|
+
var import_clsx = require("clsx");
|
|
95
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
96
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
97
|
+
extend: {
|
|
98
|
+
classGroups: {
|
|
99
|
+
"font-size": [
|
|
100
|
+
{
|
|
101
|
+
text: [
|
|
102
|
+
"display-large",
|
|
103
|
+
"display-medium",
|
|
104
|
+
"display-small",
|
|
105
|
+
"h1",
|
|
106
|
+
"h2",
|
|
107
|
+
"h3",
|
|
108
|
+
"h4",
|
|
109
|
+
"h5",
|
|
110
|
+
"h6",
|
|
111
|
+
"body-large",
|
|
112
|
+
"body-medium",
|
|
113
|
+
"body-small",
|
|
114
|
+
"label-large",
|
|
115
|
+
"label-medium",
|
|
116
|
+
"label-small",
|
|
117
|
+
"button",
|
|
118
|
+
"button-xs",
|
|
119
|
+
"caption",
|
|
120
|
+
"overline",
|
|
121
|
+
"code"
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
function cn(...inputs) {
|
|
129
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// src/lib/slot.tsx
|
|
133
|
+
var React = __toESM(require("react"));
|
|
134
|
+
function mergeRefs(...refs) {
|
|
135
|
+
return (value) => {
|
|
136
|
+
for (const ref of refs) {
|
|
137
|
+
if (typeof ref === "function") ref(value);
|
|
138
|
+
else if (ref !== null)
|
|
139
|
+
ref.current = value;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
var Slot = React.forwardRef(
|
|
144
|
+
(_a, forwardedRef) => {
|
|
145
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
146
|
+
const child = React.Children.only(children);
|
|
147
|
+
if (!React.isValidElement(child)) return null;
|
|
148
|
+
const childProps = child.props;
|
|
149
|
+
const merged = __spreadValues({}, props);
|
|
150
|
+
for (const key of Object.keys(childProps)) {
|
|
151
|
+
if (key === "className") {
|
|
152
|
+
merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
|
|
153
|
+
} else if (key === "style") {
|
|
154
|
+
merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
|
|
155
|
+
} else if (key.startsWith("on") && typeof childProps[key] === "function") {
|
|
156
|
+
const parentHandler = props[key];
|
|
157
|
+
if (typeof parentHandler === "function") {
|
|
158
|
+
merged[key] = (...args) => {
|
|
159
|
+
childProps[key](...args);
|
|
160
|
+
parentHandler(...args);
|
|
161
|
+
};
|
|
162
|
+
} else {
|
|
163
|
+
merged[key] = childProps[key];
|
|
164
|
+
}
|
|
165
|
+
} else {
|
|
166
|
+
merged[key] = childProps[key];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
const childRef = child.ref;
|
|
170
|
+
merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
|
|
171
|
+
return React.cloneElement(
|
|
172
|
+
child,
|
|
173
|
+
merged
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
Slot.displayName = "Slot";
|
|
178
|
+
|
|
179
|
+
// src/components/ui/button.tsx
|
|
180
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
181
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
182
|
+
"inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 font-sans text-button whitespace-nowrap transition-all active:scale-[0.98] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
183
|
+
{
|
|
184
|
+
variants: {
|
|
185
|
+
variant: {
|
|
186
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
187
|
+
secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
|
|
188
|
+
destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
189
|
+
outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground focus-visible:border-border focus-visible:ring-border/50 dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
190
|
+
"outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
|
|
191
|
+
"outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:border-brand-secondary focus-visible:ring-brand-secondary/30",
|
|
192
|
+
ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs focus-visible:ring-border/50 dark:hover:bg-accent/50",
|
|
193
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
194
|
+
},
|
|
195
|
+
size: {
|
|
196
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
197
|
+
xs: "h-6 gap-1 px-2 text-button-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
198
|
+
sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
199
|
+
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
200
|
+
icon: "size-9",
|
|
201
|
+
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
202
|
+
"icon-sm": "size-8",
|
|
203
|
+
"icon-lg": "size-10"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
defaultVariants: {
|
|
207
|
+
variant: "default",
|
|
208
|
+
size: "default"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
|
|
213
|
+
var _b = _a, {
|
|
214
|
+
className,
|
|
215
|
+
variant,
|
|
216
|
+
size,
|
|
217
|
+
asChild = false,
|
|
218
|
+
loading = false,
|
|
219
|
+
disabled,
|
|
220
|
+
type = "button",
|
|
221
|
+
children
|
|
222
|
+
} = _b, props = __objRest(_b, [
|
|
223
|
+
"className",
|
|
224
|
+
"variant",
|
|
225
|
+
"size",
|
|
226
|
+
"asChild",
|
|
227
|
+
"loading",
|
|
228
|
+
"disabled",
|
|
229
|
+
"type",
|
|
230
|
+
"children"
|
|
231
|
+
]);
|
|
232
|
+
const Comp = asChild ? Slot : "button";
|
|
233
|
+
const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
|
|
234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
235
|
+
Comp,
|
|
236
|
+
__spreadProps(__spreadValues({
|
|
237
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
238
|
+
"data-size": size,
|
|
239
|
+
"data-slot": "button",
|
|
240
|
+
"data-variant": variant,
|
|
241
|
+
disabled: loading || disabled,
|
|
242
|
+
ref,
|
|
243
|
+
type
|
|
244
|
+
}, props), {
|
|
245
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
246
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
|
|
247
|
+
!isIconOnly && children
|
|
248
|
+
] }) : children
|
|
249
|
+
})
|
|
250
|
+
);
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
// src/components/ui/field.tsx
|
|
254
|
+
var import_react2 = require("react");
|
|
255
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
256
|
+
|
|
257
|
+
// src/components/ui/label.tsx
|
|
258
|
+
var import_jsx_runtime2 = (
|
|
259
|
+
// eslint-disable-next-line jsx-a11y/label-has-associated-control -- htmlFor is passed by the consumer
|
|
260
|
+
require("react/jsx-runtime")
|
|
261
|
+
);
|
|
262
|
+
function Label(_a) {
|
|
263
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
265
|
+
"label",
|
|
266
|
+
__spreadValues({
|
|
267
|
+
className: cn(
|
|
268
|
+
"flex items-center gap-2 text-label-medium leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
269
|
+
className
|
|
270
|
+
),
|
|
271
|
+
"data-slot": "label"
|
|
272
|
+
}, props)
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// src/components/ui/separator.tsx
|
|
277
|
+
var import_separator = require("@base-ui/react/separator");
|
|
278
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
279
|
+
|
|
280
|
+
// src/components/ui/field.tsx
|
|
281
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
282
|
+
var fieldVariants = (0, import_class_variance_authority2.cva)(
|
|
283
|
+
"group/field flex w-full gap-3 data-[invalid=true]:text-destructive",
|
|
284
|
+
{
|
|
285
|
+
variants: {
|
|
286
|
+
orientation: {
|
|
287
|
+
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
288
|
+
horizontal: [
|
|
289
|
+
"flex-row items-center",
|
|
290
|
+
"[&>[data-slot=field-label]]:flex-auto",
|
|
291
|
+
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
292
|
+
],
|
|
293
|
+
responsive: [
|
|
294
|
+
"flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
|
|
295
|
+
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
296
|
+
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
defaultVariants: {
|
|
301
|
+
orientation: "vertical"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
);
|
|
305
|
+
function Field(_a) {
|
|
306
|
+
var _b = _a, {
|
|
307
|
+
className,
|
|
308
|
+
orientation = "vertical"
|
|
309
|
+
} = _b, props = __objRest(_b, [
|
|
310
|
+
"className",
|
|
311
|
+
"orientation"
|
|
312
|
+
]);
|
|
313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
314
|
+
"div",
|
|
315
|
+
__spreadValues({
|
|
316
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
317
|
+
"data-orientation": orientation,
|
|
318
|
+
"data-slot": "field",
|
|
319
|
+
role: "group"
|
|
320
|
+
}, props)
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
function FieldError(_a) {
|
|
324
|
+
var _b = _a, {
|
|
325
|
+
className,
|
|
326
|
+
children,
|
|
327
|
+
errors
|
|
328
|
+
} = _b, props = __objRest(_b, [
|
|
329
|
+
"className",
|
|
330
|
+
"children",
|
|
331
|
+
"errors"
|
|
332
|
+
]);
|
|
333
|
+
const content = (0, import_react2.useMemo)(() => {
|
|
334
|
+
var _a2;
|
|
335
|
+
if (children) {
|
|
336
|
+
return children;
|
|
337
|
+
}
|
|
338
|
+
if (!(errors == null ? void 0 : errors.length)) {
|
|
339
|
+
return null;
|
|
340
|
+
}
|
|
341
|
+
const uniqueErrors = Array.from(
|
|
342
|
+
new Map(errors.map((error) => [error == null ? void 0 : error.message, error])).values()
|
|
343
|
+
);
|
|
344
|
+
if (uniqueErrors.length === 1) {
|
|
345
|
+
return (_a2 = uniqueErrors[0]) == null ? void 0 : _a2.message;
|
|
346
|
+
}
|
|
347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
348
|
+
(error) => (error == null ? void 0 : error.message) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: error.message }, error.message)
|
|
349
|
+
) });
|
|
350
|
+
}, [children, errors]);
|
|
351
|
+
if (!content) {
|
|
352
|
+
return null;
|
|
353
|
+
}
|
|
354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
355
|
+
"div",
|
|
356
|
+
__spreadProps(__spreadValues({
|
|
357
|
+
className: cn("text-caption text-destructive", className),
|
|
358
|
+
"data-slot": "field-error",
|
|
359
|
+
role: "alert"
|
|
360
|
+
}, props), {
|
|
361
|
+
children: content
|
|
362
|
+
})
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// src/components/ui/input-group.tsx
|
|
367
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
368
|
+
|
|
369
|
+
// src/components/ui/input.tsx
|
|
370
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
371
|
+
function Input(_a) {
|
|
372
|
+
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
374
|
+
"input",
|
|
375
|
+
__spreadValues({
|
|
376
|
+
className: cn(
|
|
377
|
+
"h-9 w-full min-w-0 border border-input bg-transparent px-3 py-1 text-body-medium font-sans shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-label-medium file:text-foreground placeholder:font-normal placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30",
|
|
378
|
+
"focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20",
|
|
379
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
380
|
+
className
|
|
381
|
+
),
|
|
382
|
+
"data-slot": "input",
|
|
383
|
+
type
|
|
384
|
+
}, props)
|
|
385
|
+
);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// src/components/ui/textarea.tsx
|
|
389
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
390
|
+
|
|
391
|
+
// src/components/ui/input-group.tsx
|
|
392
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
393
|
+
function InputGroup(_a) {
|
|
394
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
396
|
+
"div",
|
|
397
|
+
__spreadValues({
|
|
398
|
+
className: cn(
|
|
399
|
+
"group/input-group relative flex w-full items-center border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30",
|
|
400
|
+
"h-9 min-w-0 has-[>textarea]:h-auto",
|
|
401
|
+
// Variants based on alignment.
|
|
402
|
+
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
403
|
+
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
404
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
405
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
406
|
+
// Focus state.
|
|
407
|
+
"has-[[data-slot=input-group-control]:focus-visible]:border-primary has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-primary/20",
|
|
408
|
+
// Error state.
|
|
409
|
+
"has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
|
|
410
|
+
className
|
|
411
|
+
),
|
|
412
|
+
"data-slot": "input-group",
|
|
413
|
+
role: "group"
|
|
414
|
+
}, props)
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
var inputGroupAddonVariants = (0, import_class_variance_authority3.cva)(
|
|
418
|
+
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
419
|
+
{
|
|
420
|
+
variants: {
|
|
421
|
+
align: {
|
|
422
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
423
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
|
|
424
|
+
"block-start": "order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3",
|
|
425
|
+
"block-end": "order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
defaultVariants: {
|
|
429
|
+
align: "inline-start"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
);
|
|
433
|
+
var inputGroupButtonVariants = (0, import_class_variance_authority3.cva)(
|
|
434
|
+
"flex items-center gap-2 text-sm shadow-none",
|
|
435
|
+
{
|
|
436
|
+
variants: {
|
|
437
|
+
size: {
|
|
438
|
+
xs: "h-6 gap-1 px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
|
|
439
|
+
sm: "h-8 gap-1.5 px-2.5 has-[>svg]:px-2.5",
|
|
440
|
+
"icon-xs": "size-6 p-0 has-[>svg]:p-0",
|
|
441
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
defaultVariants: {
|
|
445
|
+
size: "xs"
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
);
|
|
449
|
+
function InputGroupInput(_a) {
|
|
450
|
+
var _b = _a, {
|
|
451
|
+
className
|
|
452
|
+
} = _b, props = __objRest(_b, [
|
|
453
|
+
"className"
|
|
454
|
+
]);
|
|
455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
456
|
+
Input,
|
|
457
|
+
__spreadValues({
|
|
458
|
+
className: cn(
|
|
459
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
460
|
+
className
|
|
461
|
+
),
|
|
462
|
+
"data-slot": "input-group-control"
|
|
463
|
+
}, props)
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
// src/components/ui/two-fa-setup-form.tsx
|
|
468
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
469
|
+
var DEFAULT_APPS = [
|
|
470
|
+
{ name: "Google Authenticator" },
|
|
471
|
+
{ name: "Microsoft Authenticator" }
|
|
472
|
+
];
|
|
473
|
+
function AppDownloadStep({
|
|
474
|
+
apps,
|
|
475
|
+
onNext,
|
|
476
|
+
onSetupLater,
|
|
477
|
+
required
|
|
478
|
+
}) {
|
|
479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
480
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex gap-4", children: apps.map((app) => {
|
|
481
|
+
var _a;
|
|
482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
483
|
+
"div",
|
|
484
|
+
{
|
|
485
|
+
className: "flex flex-1 flex-col items-center gap-3 border border-border bg-muted/30 p-4 text-center",
|
|
486
|
+
children: [
|
|
487
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2 text-sm font-medium text-foreground", children: [
|
|
488
|
+
(_a = app.icon) != null ? _a : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Smartphone, { size: 18, className: "text-muted-foreground" }),
|
|
489
|
+
app.name
|
|
490
|
+
] }),
|
|
491
|
+
app.qrNode ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex items-center justify-center", children: app.qrNode }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-[100px] w-[100px] items-center justify-center border border-dashed border-border bg-muted/50 text-[11px] text-muted-foreground", children: "Scan to download" })
|
|
492
|
+
]
|
|
493
|
+
},
|
|
494
|
+
app.name
|
|
495
|
+
);
|
|
496
|
+
}) }),
|
|
497
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-center text-sm text-muted-foreground", children: "Once downloaded, or if you already have the app installed, click Next." }),
|
|
498
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
499
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { className: "w-full", onClick: onNext, children: "Next" }),
|
|
500
|
+
!required && onSetupLater && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { variant: "ghost", className: "w-full", onClick: onSetupLater, children: "Setup Later" })
|
|
501
|
+
] })
|
|
502
|
+
] });
|
|
503
|
+
}
|
|
504
|
+
function VerificationStep({
|
|
505
|
+
qrCodeNode,
|
|
506
|
+
onVerify,
|
|
507
|
+
onBack,
|
|
508
|
+
onSetupLater,
|
|
509
|
+
required
|
|
510
|
+
}) {
|
|
511
|
+
const [token, setToken] = (0, import_react3.useState)("");
|
|
512
|
+
const [error, setError] = (0, import_react3.useState)("");
|
|
513
|
+
const [isLoading, setIsLoading] = (0, import_react3.useState)(false);
|
|
514
|
+
const handleVerify = () => __async(null, null, function* () {
|
|
515
|
+
if (!token) {
|
|
516
|
+
setError("Required");
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
setError("");
|
|
520
|
+
setIsLoading(true);
|
|
521
|
+
try {
|
|
522
|
+
yield onVerify(token);
|
|
523
|
+
} catch (e) {
|
|
524
|
+
setError("Invalid code. Please try again.");
|
|
525
|
+
} finally {
|
|
526
|
+
setIsLoading(false);
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
530
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
|
|
531
|
+
qrCodeNode ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex items-center justify-center", children: qrCodeNode }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-[140px] w-[140px] items-center justify-center border border-dashed border-border bg-muted/50 text-xs text-muted-foreground", children: "QR Code" }),
|
|
532
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-center text-sm text-muted-foreground", children: "The temporary code will show for authentication. Insert below." })
|
|
533
|
+
] }),
|
|
534
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Field, { children: [
|
|
535
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Label, { htmlFor: "2fa-token", children: "Verification Code" }),
|
|
536
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(InputGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
537
|
+
InputGroupInput,
|
|
538
|
+
{
|
|
539
|
+
id: "2fa-token",
|
|
540
|
+
type: "text",
|
|
541
|
+
name: "token",
|
|
542
|
+
placeholder: "Enter Your Code",
|
|
543
|
+
value: token,
|
|
544
|
+
"aria-invalid": !!error,
|
|
545
|
+
onChange: (e) => {
|
|
546
|
+
setToken(e.target.value);
|
|
547
|
+
if (error) setError("");
|
|
548
|
+
},
|
|
549
|
+
onKeyDown: (e) => {
|
|
550
|
+
if (e.key === "Enter") handleVerify();
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
) }),
|
|
554
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FieldError, { children: error })
|
|
555
|
+
] }),
|
|
556
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
557
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
558
|
+
Button,
|
|
559
|
+
{
|
|
560
|
+
loading: isLoading,
|
|
561
|
+
disabled: !token,
|
|
562
|
+
className: "w-full",
|
|
563
|
+
onClick: handleVerify,
|
|
564
|
+
children: "Verify Now"
|
|
565
|
+
}
|
|
566
|
+
),
|
|
567
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { variant: "outline", className: "w-full", onClick: onBack, children: "Back" }),
|
|
568
|
+
!required && onSetupLater && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { variant: "ghost", className: "w-full", onClick: onSetupLater, children: "Setup Later" })
|
|
569
|
+
] })
|
|
570
|
+
] });
|
|
571
|
+
}
|
|
572
|
+
function TwoFASetupForm({
|
|
573
|
+
title = "2FA Setup",
|
|
574
|
+
apps = DEFAULT_APPS,
|
|
575
|
+
qrCodeNode,
|
|
576
|
+
onVerify,
|
|
577
|
+
onSetupLater,
|
|
578
|
+
required = true,
|
|
579
|
+
className
|
|
580
|
+
}) {
|
|
581
|
+
const [step, setStep] = (0, import_react3.useState)(1);
|
|
582
|
+
const stepTitle = step === 1 ? title : "Open Auth App and Scan Code";
|
|
583
|
+
const stepSubtitle = step === 1 ? "We recommend Google Authenticator or Microsoft Authenticator" : "Open your authenticator app and scan the QR code";
|
|
584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("flex flex-col gap-6", className), children: [
|
|
585
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
586
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "text-xl font-semibold text-foreground", children: stepTitle }),
|
|
587
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-muted-foreground", children: stepSubtitle })
|
|
588
|
+
] }),
|
|
589
|
+
step === 1 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
590
|
+
AppDownloadStep,
|
|
591
|
+
{
|
|
592
|
+
apps,
|
|
593
|
+
onNext: () => setStep(2),
|
|
594
|
+
onSetupLater,
|
|
595
|
+
required
|
|
596
|
+
}
|
|
597
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
598
|
+
VerificationStep,
|
|
599
|
+
{
|
|
600
|
+
qrCodeNode,
|
|
601
|
+
onVerify,
|
|
602
|
+
onBack: () => setStep(1),
|
|
603
|
+
onSetupLater,
|
|
604
|
+
required
|
|
605
|
+
}
|
|
606
|
+
)
|
|
607
|
+
] });
|
|
608
|
+
}
|
|
609
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
610
|
+
0 && (module.exports = {
|
|
611
|
+
TwoFASetupForm
|
|
612
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TwoFASetupForm
|
|
3
|
+
} from "../../chunk-FYPSTTEJ.mjs";
|
|
4
|
+
import "../../chunk-7YI3HEBH.mjs";
|
|
5
|
+
import "../../chunk-7BTFGCFC.mjs";
|
|
6
|
+
import "../../chunk-BS75ICOO.mjs";
|
|
7
|
+
import "../../chunk-P7CEBZM6.mjs";
|
|
8
|
+
import "../../chunk-2GIYVERS.mjs";
|
|
9
|
+
import "../../chunk-LBTHZSBT.mjs";
|
|
10
|
+
import "../../chunk-NOOEKOWY.mjs";
|
|
11
|
+
import "../../chunk-R4HCRDU5.mjs";
|
|
12
|
+
import "../../chunk-AFML43VJ.mjs";
|
|
13
|
+
import "../../chunk-WNQUEZJF.mjs";
|
|
14
|
+
export {
|
|
15
|
+
TwoFASetupForm
|
|
16
|
+
};
|