rothzerg-ui 0.1.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 +216 -0
- package/dist/_virtual/index.cjs +6 -0
- package/dist/_virtual/index.cjs.map +1 -0
- package/dist/_virtual/index.js +6 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index2.cjs +5 -0
- package/dist/_virtual/index2.cjs.map +1 -0
- package/dist/_virtual/index2.js +5 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.cjs +5 -0
- package/dist/_virtual/use-sync-external-store-shim.development.cjs.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.cjs +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.cjs.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/blocks/activity-feed/ActivityFeed.cjs +140 -0
- package/dist/blocks/activity-feed/ActivityFeed.cjs.map +1 -0
- package/dist/blocks/activity-feed/ActivityFeed.d.ts +28 -0
- package/dist/blocks/activity-feed/ActivityFeed.d.ts.map +1 -0
- package/dist/blocks/activity-feed/ActivityFeed.js +140 -0
- package/dist/blocks/activity-feed/ActivityFeed.js.map +1 -0
- package/dist/blocks/activity-feed/index.d.ts +3 -0
- package/dist/blocks/activity-feed/index.d.ts.map +1 -0
- package/dist/blocks/app-download/AppDownload.cjs +100 -0
- package/dist/blocks/app-download/AppDownload.cjs.map +1 -0
- package/dist/blocks/app-download/AppDownload.d.ts +24 -0
- package/dist/blocks/app-download/AppDownload.d.ts.map +1 -0
- package/dist/blocks/app-download/AppDownload.js +100 -0
- package/dist/blocks/app-download/AppDownload.js.map +1 -0
- package/dist/blocks/app-download/index.d.ts +3 -0
- package/dist/blocks/app-download/index.d.ts.map +1 -0
- package/dist/blocks/auth-form/AuthForm.cjs +105 -0
- package/dist/blocks/auth-form/AuthForm.cjs.map +1 -0
- package/dist/blocks/auth-form/AuthForm.d.ts +39 -0
- package/dist/blocks/auth-form/AuthForm.d.ts.map +1 -0
- package/dist/blocks/auth-form/AuthForm.js +105 -0
- package/dist/blocks/auth-form/AuthForm.js.map +1 -0
- package/dist/blocks/auth-form/index.d.ts +3 -0
- package/dist/blocks/auth-form/index.d.ts.map +1 -0
- package/dist/blocks/blog-post/BlogPost.cjs +50 -0
- package/dist/blocks/blog-post/BlogPost.cjs.map +1 -0
- package/dist/blocks/blog-post/BlogPost.d.ts +25 -0
- package/dist/blocks/blog-post/BlogPost.d.ts.map +1 -0
- package/dist/blocks/blog-post/BlogPost.js +50 -0
- package/dist/blocks/blog-post/BlogPost.js.map +1 -0
- package/dist/blocks/blog-post/index.d.ts +3 -0
- package/dist/blocks/blog-post/index.d.ts.map +1 -0
- package/dist/blocks/changelog/Changelog.cjs +47 -0
- package/dist/blocks/changelog/Changelog.cjs.map +1 -0
- package/dist/blocks/changelog/Changelog.d.ts +21 -0
- package/dist/blocks/changelog/Changelog.d.ts.map +1 -0
- package/dist/blocks/changelog/Changelog.js +47 -0
- package/dist/blocks/changelog/Changelog.js.map +1 -0
- package/dist/blocks/changelog/index.d.ts +3 -0
- package/dist/blocks/changelog/index.d.ts.map +1 -0
- package/dist/blocks/chat/Chat.cjs +176 -0
- package/dist/blocks/chat/Chat.cjs.map +1 -0
- package/dist/blocks/chat/Chat.d.ts +27 -0
- package/dist/blocks/chat/Chat.d.ts.map +1 -0
- package/dist/blocks/chat/Chat.js +176 -0
- package/dist/blocks/chat/Chat.js.map +1 -0
- package/dist/blocks/chat/index.d.ts +3 -0
- package/dist/blocks/chat/index.d.ts.map +1 -0
- package/dist/blocks/coming-soon/ComingSoon.cjs +78 -0
- package/dist/blocks/coming-soon/ComingSoon.cjs.map +1 -0
- package/dist/blocks/coming-soon/ComingSoon.d.ts +20 -0
- package/dist/blocks/coming-soon/ComingSoon.d.ts.map +1 -0
- package/dist/blocks/coming-soon/ComingSoon.js +78 -0
- package/dist/blocks/coming-soon/ComingSoon.js.map +1 -0
- package/dist/blocks/coming-soon/index.d.ts +3 -0
- package/dist/blocks/coming-soon/index.d.ts.map +1 -0
- package/dist/blocks/contact-form/ContactForm.cjs +83 -0
- package/dist/blocks/contact-form/ContactForm.cjs.map +1 -0
- package/dist/blocks/contact-form/ContactForm.d.ts +25 -0
- package/dist/blocks/contact-form/ContactForm.d.ts.map +1 -0
- package/dist/blocks/contact-form/ContactForm.js +83 -0
- package/dist/blocks/contact-form/ContactForm.js.map +1 -0
- package/dist/blocks/contact-form/index.d.ts +3 -0
- package/dist/blocks/contact-form/index.d.ts.map +1 -0
- package/dist/blocks/cookie-consent/CookieConsent.cjs +74 -0
- package/dist/blocks/cookie-consent/CookieConsent.cjs.map +1 -0
- package/dist/blocks/cookie-consent/CookieConsent.d.ts +20 -0
- package/dist/blocks/cookie-consent/CookieConsent.d.ts.map +1 -0
- package/dist/blocks/cookie-consent/CookieConsent.js +74 -0
- package/dist/blocks/cookie-consent/CookieConsent.js.map +1 -0
- package/dist/blocks/cookie-consent/index.d.ts +3 -0
- package/dist/blocks/cookie-consent/index.d.ts.map +1 -0
- package/dist/blocks/cta/CTA.cjs +16 -0
- package/dist/blocks/cta/CTA.cjs.map +1 -0
- package/dist/blocks/cta/CTA.d.ts +27 -0
- package/dist/blocks/cta/CTA.d.ts.map +1 -0
- package/dist/blocks/cta/CTA.js +16 -0
- package/dist/blocks/cta/CTA.js.map +1 -0
- package/dist/blocks/cta/index.d.ts +3 -0
- package/dist/blocks/cta/index.d.ts.map +1 -0
- package/dist/blocks/dashboard/Dashboard.cjs +62 -0
- package/dist/blocks/dashboard/Dashboard.cjs.map +1 -0
- package/dist/blocks/dashboard/Dashboard.d.ts +27 -0
- package/dist/blocks/dashboard/Dashboard.d.ts.map +1 -0
- package/dist/blocks/dashboard/Dashboard.js +62 -0
- package/dist/blocks/dashboard/Dashboard.js.map +1 -0
- package/dist/blocks/dashboard/index.d.ts +3 -0
- package/dist/blocks/dashboard/index.d.ts.map +1 -0
- package/dist/blocks/data-table-page/DataTablePage.cjs +106 -0
- package/dist/blocks/data-table-page/DataTablePage.cjs.map +1 -0
- package/dist/blocks/data-table-page/DataTablePage.d.ts +37 -0
- package/dist/blocks/data-table-page/DataTablePage.d.ts.map +1 -0
- package/dist/blocks/data-table-page/DataTablePage.js +106 -0
- package/dist/blocks/data-table-page/DataTablePage.js.map +1 -0
- package/dist/blocks/data-table-page/index.d.ts +3 -0
- package/dist/blocks/data-table-page/index.d.ts.map +1 -0
- package/dist/blocks/empty-state/EmptyState.cjs +27 -0
- package/dist/blocks/empty-state/EmptyState.cjs.map +1 -0
- package/dist/blocks/empty-state/EmptyState.d.ts +12 -0
- package/dist/blocks/empty-state/EmptyState.d.ts.map +1 -0
- package/dist/blocks/empty-state/EmptyState.js +27 -0
- package/dist/blocks/empty-state/EmptyState.js.map +1 -0
- package/dist/blocks/empty-state/index.d.ts +3 -0
- package/dist/blocks/empty-state/index.d.ts.map +1 -0
- package/dist/blocks/error-page/ErrorPage.cjs +34 -0
- package/dist/blocks/error-page/ErrorPage.cjs.map +1 -0
- package/dist/blocks/error-page/ErrorPage.d.ts +14 -0
- package/dist/blocks/error-page/ErrorPage.d.ts.map +1 -0
- package/dist/blocks/error-page/ErrorPage.js +34 -0
- package/dist/blocks/error-page/ErrorPage.js.map +1 -0
- package/dist/blocks/error-page/index.d.ts +3 -0
- package/dist/blocks/error-page/index.d.ts.map +1 -0
- package/dist/blocks/faq/FAQ.cjs +88 -0
- package/dist/blocks/faq/FAQ.cjs.map +1 -0
- package/dist/blocks/faq/FAQ.d.ts +20 -0
- package/dist/blocks/faq/FAQ.d.ts.map +1 -0
- package/dist/blocks/faq/FAQ.js +88 -0
- package/dist/blocks/faq/FAQ.js.map +1 -0
- package/dist/blocks/faq/index.d.ts +3 -0
- package/dist/blocks/faq/index.d.ts.map +1 -0
- package/dist/blocks/features-grid/FeaturesGrid.cjs +26 -0
- package/dist/blocks/features-grid/FeaturesGrid.cjs.map +1 -0
- package/dist/blocks/features-grid/FeaturesGrid.d.ts +35 -0
- package/dist/blocks/features-grid/FeaturesGrid.d.ts.map +1 -0
- package/dist/blocks/features-grid/FeaturesGrid.js +26 -0
- package/dist/blocks/features-grid/FeaturesGrid.js.map +1 -0
- package/dist/blocks/features-grid/index.d.ts +3 -0
- package/dist/blocks/features-grid/index.d.ts.map +1 -0
- package/dist/blocks/footer/Footer.cjs +41 -0
- package/dist/blocks/footer/Footer.cjs.map +1 -0
- package/dist/blocks/footer/Footer.d.ts +27 -0
- package/dist/blocks/footer/Footer.d.ts.map +1 -0
- package/dist/blocks/footer/Footer.js +41 -0
- package/dist/blocks/footer/Footer.js.map +1 -0
- package/dist/blocks/footer/index.d.ts +3 -0
- package/dist/blocks/footer/index.d.ts.map +1 -0
- package/dist/blocks/hero/Hero.cjs +38 -0
- package/dist/blocks/hero/Hero.cjs.map +1 -0
- package/dist/blocks/hero/Hero.d.ts +45 -0
- package/dist/blocks/hero/Hero.d.ts.map +1 -0
- package/dist/blocks/hero/Hero.js +38 -0
- package/dist/blocks/hero/Hero.js.map +1 -0
- package/dist/blocks/hero/index.d.ts +3 -0
- package/dist/blocks/hero/index.d.ts.map +1 -0
- package/dist/blocks/index.d.ts +73 -0
- package/dist/blocks/index.d.ts.map +1 -0
- package/dist/blocks/invoice/Invoice.cjs +114 -0
- package/dist/blocks/invoice/Invoice.cjs.map +1 -0
- package/dist/blocks/invoice/Invoice.d.ts +37 -0
- package/dist/blocks/invoice/Invoice.d.ts.map +1 -0
- package/dist/blocks/invoice/Invoice.js +114 -0
- package/dist/blocks/invoice/Invoice.js.map +1 -0
- package/dist/blocks/invoice/index.d.ts +3 -0
- package/dist/blocks/invoice/index.d.ts.map +1 -0
- package/dist/blocks/kanban/Kanban.cjs +223 -0
- package/dist/blocks/kanban/Kanban.cjs.map +1 -0
- package/dist/blocks/kanban/Kanban.d.ts +33 -0
- package/dist/blocks/kanban/Kanban.d.ts.map +1 -0
- package/dist/blocks/kanban/Kanban.js +223 -0
- package/dist/blocks/kanban/Kanban.js.map +1 -0
- package/dist/blocks/kanban/index.d.ts +3 -0
- package/dist/blocks/kanban/index.d.ts.map +1 -0
- package/dist/blocks/loading-page/LoadingPage.cjs +72 -0
- package/dist/blocks/loading-page/LoadingPage.cjs.map +1 -0
- package/dist/blocks/loading-page/LoadingPage.d.ts +10 -0
- package/dist/blocks/loading-page/LoadingPage.d.ts.map +1 -0
- package/dist/blocks/loading-page/LoadingPage.js +72 -0
- package/dist/blocks/loading-page/LoadingPage.js.map +1 -0
- package/dist/blocks/loading-page/index.d.ts +3 -0
- package/dist/blocks/loading-page/index.d.ts.map +1 -0
- package/dist/blocks/maintenance/Maintenance.cjs +109 -0
- package/dist/blocks/maintenance/Maintenance.cjs.map +1 -0
- package/dist/blocks/maintenance/Maintenance.d.ts +18 -0
- package/dist/blocks/maintenance/Maintenance.d.ts.map +1 -0
- package/dist/blocks/maintenance/Maintenance.js +109 -0
- package/dist/blocks/maintenance/Maintenance.js.map +1 -0
- package/dist/blocks/maintenance/index.d.ts +3 -0
- package/dist/blocks/maintenance/index.d.ts.map +1 -0
- package/dist/blocks/media-gallery/MediaGallery.cjs +114 -0
- package/dist/blocks/media-gallery/MediaGallery.cjs.map +1 -0
- package/dist/blocks/media-gallery/MediaGallery.d.ts +19 -0
- package/dist/blocks/media-gallery/MediaGallery.d.ts.map +1 -0
- package/dist/blocks/media-gallery/MediaGallery.js +114 -0
- package/dist/blocks/media-gallery/MediaGallery.js.map +1 -0
- package/dist/blocks/media-gallery/index.d.ts +3 -0
- package/dist/blocks/media-gallery/index.d.ts.map +1 -0
- package/dist/blocks/navbar/Navbar.cjs +74 -0
- package/dist/blocks/navbar/Navbar.cjs.map +1 -0
- package/dist/blocks/navbar/Navbar.d.ts +34 -0
- package/dist/blocks/navbar/Navbar.d.ts.map +1 -0
- package/dist/blocks/navbar/Navbar.js +74 -0
- package/dist/blocks/navbar/Navbar.js.map +1 -0
- package/dist/blocks/navbar/index.d.ts +3 -0
- package/dist/blocks/navbar/index.d.ts.map +1 -0
- package/dist/blocks/newsletter/Newsletter.cjs +83 -0
- package/dist/blocks/newsletter/Newsletter.cjs.map +1 -0
- package/dist/blocks/newsletter/Newsletter.d.ts +21 -0
- package/dist/blocks/newsletter/Newsletter.d.ts.map +1 -0
- package/dist/blocks/newsletter/Newsletter.js +83 -0
- package/dist/blocks/newsletter/Newsletter.js.map +1 -0
- package/dist/blocks/newsletter/index.d.ts +3 -0
- package/dist/blocks/newsletter/index.d.ts.map +1 -0
- package/dist/blocks/notification-center/NotificationCenter.cjs +73 -0
- package/dist/blocks/notification-center/NotificationCenter.cjs.map +1 -0
- package/dist/blocks/notification-center/NotificationCenter.d.ts +22 -0
- package/dist/blocks/notification-center/NotificationCenter.d.ts.map +1 -0
- package/dist/blocks/notification-center/NotificationCenter.js +73 -0
- package/dist/blocks/notification-center/NotificationCenter.js.map +1 -0
- package/dist/blocks/notification-center/index.d.ts +3 -0
- package/dist/blocks/notification-center/index.d.ts.map +1 -0
- package/dist/blocks/onboarding/Onboarding.cjs +100 -0
- package/dist/blocks/onboarding/Onboarding.cjs.map +1 -0
- package/dist/blocks/onboarding/Onboarding.d.ts +26 -0
- package/dist/blocks/onboarding/Onboarding.d.ts.map +1 -0
- package/dist/blocks/onboarding/Onboarding.js +100 -0
- package/dist/blocks/onboarding/Onboarding.js.map +1 -0
- package/dist/blocks/onboarding/index.d.ts +3 -0
- package/dist/blocks/onboarding/index.d.ts.map +1 -0
- package/dist/blocks/pricing/Pricing.cjs +92 -0
- package/dist/blocks/pricing/Pricing.cjs.map +1 -0
- package/dist/blocks/pricing/Pricing.d.ts +29 -0
- package/dist/blocks/pricing/Pricing.d.ts.map +1 -0
- package/dist/blocks/pricing/Pricing.js +92 -0
- package/dist/blocks/pricing/Pricing.js.map +1 -0
- package/dist/blocks/pricing/index.d.ts +3 -0
- package/dist/blocks/pricing/index.d.ts.map +1 -0
- package/dist/blocks/pricing-comparison/PricingComparison.cjs +85 -0
- package/dist/blocks/pricing-comparison/PricingComparison.cjs.map +1 -0
- package/dist/blocks/pricing-comparison/PricingComparison.d.ts +31 -0
- package/dist/blocks/pricing-comparison/PricingComparison.d.ts.map +1 -0
- package/dist/blocks/pricing-comparison/PricingComparison.js +85 -0
- package/dist/blocks/pricing-comparison/PricingComparison.js.map +1 -0
- package/dist/blocks/pricing-comparison/index.d.ts +3 -0
- package/dist/blocks/pricing-comparison/index.d.ts.map +1 -0
- package/dist/blocks/profile-page/ProfilePage.cjs +53 -0
- package/dist/blocks/profile-page/ProfilePage.cjs.map +1 -0
- package/dist/blocks/profile-page/ProfilePage.d.ts +25 -0
- package/dist/blocks/profile-page/ProfilePage.d.ts.map +1 -0
- package/dist/blocks/profile-page/ProfilePage.js +53 -0
- package/dist/blocks/profile-page/ProfilePage.js.map +1 -0
- package/dist/blocks/profile-page/index.d.ts +3 -0
- package/dist/blocks/profile-page/index.d.ts.map +1 -0
- package/dist/blocks/settings-page/SettingsPage.cjs +51 -0
- package/dist/blocks/settings-page/SettingsPage.cjs.map +1 -0
- package/dist/blocks/settings-page/SettingsPage.d.ts +36 -0
- package/dist/blocks/settings-page/SettingsPage.d.ts.map +1 -0
- package/dist/blocks/settings-page/SettingsPage.js +51 -0
- package/dist/blocks/settings-page/SettingsPage.js.map +1 -0
- package/dist/blocks/settings-page/index.d.ts +3 -0
- package/dist/blocks/settings-page/index.d.ts.map +1 -0
- package/dist/blocks/sidebar/Sidebar.cjs +75 -0
- package/dist/blocks/sidebar/Sidebar.cjs.map +1 -0
- package/dist/blocks/sidebar/Sidebar.d.ts +53 -0
- package/dist/blocks/sidebar/Sidebar.d.ts.map +1 -0
- package/dist/blocks/sidebar/Sidebar.js +75 -0
- package/dist/blocks/sidebar/Sidebar.js.map +1 -0
- package/dist/blocks/sidebar/index.d.ts +3 -0
- package/dist/blocks/sidebar/index.d.ts.map +1 -0
- package/dist/blocks/split-view/SplitView.cjs +105 -0
- package/dist/blocks/split-view/SplitView.cjs.map +1 -0
- package/dist/blocks/split-view/SplitView.d.ts +33 -0
- package/dist/blocks/split-view/SplitView.d.ts.map +1 -0
- package/dist/blocks/split-view/SplitView.js +105 -0
- package/dist/blocks/split-view/SplitView.js.map +1 -0
- package/dist/blocks/split-view/index.d.ts +3 -0
- package/dist/blocks/split-view/index.d.ts.map +1 -0
- package/dist/blocks/stats/Stats.cjs +34 -0
- package/dist/blocks/stats/Stats.cjs.map +1 -0
- package/dist/blocks/stats/Stats.d.ts +22 -0
- package/dist/blocks/stats/Stats.d.ts.map +1 -0
- package/dist/blocks/stats/Stats.js +34 -0
- package/dist/blocks/stats/Stats.js.map +1 -0
- package/dist/blocks/stats/index.d.ts +3 -0
- package/dist/blocks/stats/index.d.ts.map +1 -0
- package/dist/blocks/team-grid/TeamGrid.cjs +23 -0
- package/dist/blocks/team-grid/TeamGrid.cjs.map +1 -0
- package/dist/blocks/team-grid/TeamGrid.d.ts +23 -0
- package/dist/blocks/team-grid/TeamGrid.d.ts.map +1 -0
- package/dist/blocks/team-grid/TeamGrid.js +23 -0
- package/dist/blocks/team-grid/TeamGrid.js.map +1 -0
- package/dist/blocks/team-grid/index.d.ts +3 -0
- package/dist/blocks/team-grid/index.d.ts.map +1 -0
- package/dist/blocks/testimonials/Testimonials.cjs +35 -0
- package/dist/blocks/testimonials/Testimonials.cjs.map +1 -0
- package/dist/blocks/testimonials/Testimonials.d.ts +20 -0
- package/dist/blocks/testimonials/Testimonials.d.ts.map +1 -0
- package/dist/blocks/testimonials/Testimonials.js +35 -0
- package/dist/blocks/testimonials/Testimonials.js.map +1 -0
- package/dist/blocks/testimonials/index.d.ts +3 -0
- package/dist/blocks/testimonials/index.d.ts.map +1 -0
- package/dist/components/accordion/Accordion.cjs +45 -0
- package/dist/components/accordion/Accordion.cjs.map +1 -0
- package/dist/components/accordion/Accordion.d.ts +16 -0
- package/dist/components/accordion/Accordion.d.ts.map +1 -0
- package/dist/components/accordion/Accordion.js +45 -0
- package/dist/components/accordion/Accordion.js.map +1 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/alert/Alert.cjs +73 -0
- package/dist/components/alert/Alert.cjs.map +1 -0
- package/dist/components/alert/Alert.d.ts +25 -0
- package/dist/components/alert/Alert.d.ts.map +1 -0
- package/dist/components/alert/Alert.js +73 -0
- package/dist/components/alert/Alert.js.map +1 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/alert/index.d.ts.map +1 -0
- package/dist/components/alert-dialog/AlertDialog.cjs +81 -0
- package/dist/components/alert-dialog/AlertDialog.cjs.map +1 -0
- package/dist/components/alert-dialog/AlertDialog.d.ts +34 -0
- package/dist/components/alert-dialog/AlertDialog.d.ts.map +1 -0
- package/dist/components/alert-dialog/AlertDialog.js +81 -0
- package/dist/components/alert-dialog/AlertDialog.js.map +1 -0
- package/dist/components/alert-dialog/index.d.ts +3 -0
- package/dist/components/alert-dialog/index.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.cjs +93 -0
- package/dist/components/avatar/Avatar.cjs.map +1 -0
- package/dist/components/avatar/Avatar.d.ts +34 -0
- package/dist/components/avatar/Avatar.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.js +93 -0
- package/dist/components/avatar/Avatar.js.map +1 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/badge/Badge.cjs +28 -0
- package/dist/components/badge/Badge.cjs.map +1 -0
- package/dist/components/badge/Badge.d.ts +18 -0
- package/dist/components/badge/Badge.d.ts.map +1 -0
- package/dist/components/badge/Badge.js +28 -0
- package/dist/components/badge/Badge.js.map +1 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/banner/Banner.cjs +49 -0
- package/dist/components/banner/Banner.cjs.map +1 -0
- package/dist/components/banner/Banner.d.ts +16 -0
- package/dist/components/banner/Banner.d.ts.map +1 -0
- package/dist/components/banner/Banner.js +49 -0
- package/dist/components/banner/Banner.js.map +1 -0
- package/dist/components/banner/index.d.ts +3 -0
- package/dist/components/banner/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.cjs +70 -0
- package/dist/components/breadcrumb/Breadcrumb.cjs.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +44 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.js +70 -0
- package/dist/components/breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/button/Button.cjs +71 -0
- package/dist/components/button/Button.cjs.map +1 -0
- package/dist/components/button/Button.d.ts +41 -0
- package/dist/components/button/Button.d.ts.map +1 -0
- package/dist/components/button/Button.js +71 -0
- package/dist/components/button/Button.js.map +1 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/calendar/Calendar.cjs +165 -0
- package/dist/components/calendar/Calendar.cjs.map +1 -0
- package/dist/components/calendar/Calendar.d.ts +25 -0
- package/dist/components/calendar/Calendar.d.ts.map +1 -0
- package/dist/components/calendar/Calendar.js +165 -0
- package/dist/components/calendar/Calendar.js.map +1 -0
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/card/Card.cjs +81 -0
- package/dist/components/card/Card.cjs.map +1 -0
- package/dist/components/card/Card.d.ts +27 -0
- package/dist/components/card/Card.d.ts.map +1 -0
- package/dist/components/card/Card.js +81 -0
- package/dist/components/card/Card.js.map +1 -0
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/card/index.d.ts.map +1 -0
- package/dist/components/carousel/Carousel.cjs +125 -0
- package/dist/components/carousel/Carousel.cjs.map +1 -0
- package/dist/components/carousel/Carousel.d.ts +16 -0
- package/dist/components/carousel/Carousel.d.ts.map +1 -0
- package/dist/components/carousel/Carousel.js +125 -0
- package/dist/components/carousel/Carousel.js.map +1 -0
- package/dist/components/carousel/index.d.ts +3 -0
- package/dist/components/carousel/index.d.ts.map +1 -0
- package/dist/components/chart/Chart.cjs +155 -0
- package/dist/components/chart/Chart.cjs.map +1 -0
- package/dist/components/chart/Chart.d.ts +42 -0
- package/dist/components/chart/Chart.d.ts.map +1 -0
- package/dist/components/chart/Chart.js +155 -0
- package/dist/components/chart/Chart.js.map +1 -0
- package/dist/components/chart/index.d.ts +3 -0
- package/dist/components/chart/index.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.cjs +33 -0
- package/dist/components/checkbox/Checkbox.cjs.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +25 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.js +33 -0
- package/dist/components/checkbox/Checkbox.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/chip/Chip.cjs +70 -0
- package/dist/components/chip/Chip.cjs.map +1 -0
- package/dist/components/chip/Chip.d.ts +19 -0
- package/dist/components/chip/Chip.d.ts.map +1 -0
- package/dist/components/chip/Chip.js +70 -0
- package/dist/components/chip/Chip.js.map +1 -0
- package/dist/components/chip/index.d.ts +3 -0
- package/dist/components/chip/index.d.ts.map +1 -0
- package/dist/components/code-block/CodeBlock.cjs +54 -0
- package/dist/components/code-block/CodeBlock.cjs.map +1 -0
- package/dist/components/code-block/CodeBlock.d.ts +12 -0
- package/dist/components/code-block/CodeBlock.d.ts.map +1 -0
- package/dist/components/code-block/CodeBlock.js +54 -0
- package/dist/components/code-block/CodeBlock.js.map +1 -0
- package/dist/components/code-block/index.d.ts +3 -0
- package/dist/components/code-block/index.d.ts.map +1 -0
- package/dist/components/collapsible/Collapsible.cjs +42 -0
- package/dist/components/collapsible/Collapsible.cjs.map +1 -0
- package/dist/components/collapsible/Collapsible.d.ts +17 -0
- package/dist/components/collapsible/Collapsible.d.ts.map +1 -0
- package/dist/components/collapsible/Collapsible.js +42 -0
- package/dist/components/collapsible/Collapsible.js.map +1 -0
- package/dist/components/collapsible/index.d.ts +3 -0
- package/dist/components/collapsible/index.d.ts.map +1 -0
- package/dist/components/color-picker/ColorPicker.cjs +124 -0
- package/dist/components/color-picker/ColorPicker.cjs.map +1 -0
- package/dist/components/color-picker/ColorPicker.d.ts +13 -0
- package/dist/components/color-picker/ColorPicker.d.ts.map +1 -0
- package/dist/components/color-picker/ColorPicker.js +124 -0
- package/dist/components/color-picker/ColorPicker.js.map +1 -0
- package/dist/components/color-picker/index.d.ts +3 -0
- package/dist/components/color-picker/index.d.ts.map +1 -0
- package/dist/components/combobox/Combobox.cjs +104 -0
- package/dist/components/combobox/Combobox.cjs.map +1 -0
- package/dist/components/combobox/Combobox.d.ts +29 -0
- package/dist/components/combobox/Combobox.d.ts.map +1 -0
- package/dist/components/combobox/Combobox.js +104 -0
- package/dist/components/combobox/Combobox.js.map +1 -0
- package/dist/components/combobox/index.d.ts +3 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/command/Command.cjs +87 -0
- package/dist/components/command/Command.cjs.map +1 -0
- package/dist/components/command/Command.d.ts +81 -0
- package/dist/components/command/Command.d.ts.map +1 -0
- package/dist/components/command/Command.js +87 -0
- package/dist/components/command/Command.js.map +1 -0
- package/dist/components/command/index.d.ts +3 -0
- package/dist/components/command/index.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenu.cjs +120 -0
- package/dist/components/context-menu/ContextMenu.cjs.map +1 -0
- package/dist/components/context-menu/ContextMenu.d.ts +21 -0
- package/dist/components/context-menu/ContextMenu.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenu.js +120 -0
- package/dist/components/context-menu/ContextMenu.js.map +1 -0
- package/dist/components/context-menu/index.d.ts +3 -0
- package/dist/components/context-menu/index.d.ts.map +1 -0
- package/dist/components/copy-button/CopyButton.cjs +56 -0
- package/dist/components/copy-button/CopyButton.cjs.map +1 -0
- package/dist/components/copy-button/CopyButton.d.ts +15 -0
- package/dist/components/copy-button/CopyButton.d.ts.map +1 -0
- package/dist/components/copy-button/CopyButton.js +56 -0
- package/dist/components/copy-button/CopyButton.js.map +1 -0
- package/dist/components/copy-button/index.d.ts +3 -0
- package/dist/components/copy-button/index.d.ts.map +1 -0
- package/dist/components/date-picker/DatePicker.cjs +147 -0
- package/dist/components/date-picker/DatePicker.cjs.map +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +26 -0
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -0
- package/dist/components/date-picker/DatePicker.js +147 -0
- package/dist/components/date-picker/DatePicker.js.map +1 -0
- package/dist/components/date-picker/index.d.ts +3 -0
- package/dist/components/date-picker/index.d.ts.map +1 -0
- package/dist/components/dialog/Dialog.cjs +91 -0
- package/dist/components/dialog/Dialog.cjs.map +1 -0
- package/dist/components/dialog/Dialog.d.ts +32 -0
- package/dist/components/dialog/Dialog.d.ts.map +1 -0
- package/dist/components/dialog/Dialog.js +91 -0
- package/dist/components/dialog/Dialog.js.map +1 -0
- package/dist/components/dialog/index.d.ts +3 -0
- package/dist/components/dialog/index.d.ts.map +1 -0
- package/dist/components/drawer/Drawer.cjs +51 -0
- package/dist/components/drawer/Drawer.cjs.map +1 -0
- package/dist/components/drawer/Drawer.d.ts +27 -0
- package/dist/components/drawer/Drawer.d.ts.map +1 -0
- package/dist/components/drawer/Drawer.js +51 -0
- package/dist/components/drawer/Drawer.js.map +1 -0
- package/dist/components/drawer/index.d.ts +3 -0
- package/dist/components/drawer/index.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenu.cjs +133 -0
- package/dist/components/dropdown-menu/DropdownMenu.cjs.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +44 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenu.js +133 -0
- package/dist/components/dropdown-menu/DropdownMenu.js.map +1 -0
- package/dist/components/dropdown-menu/index.d.ts +3 -0
- package/dist/components/dropdown-menu/index.d.ts.map +1 -0
- package/dist/components/empty-content/EmptyContent.cjs +38 -0
- package/dist/components/empty-content/EmptyContent.cjs.map +1 -0
- package/dist/components/empty-content/EmptyContent.d.ts +16 -0
- package/dist/components/empty-content/EmptyContent.d.ts.map +1 -0
- package/dist/components/empty-content/EmptyContent.js +38 -0
- package/dist/components/empty-content/EmptyContent.js.map +1 -0
- package/dist/components/empty-content/index.d.ts +3 -0
- package/dist/components/empty-content/index.d.ts.map +1 -0
- package/dist/components/file-upload/FileUpload.cjs +126 -0
- package/dist/components/file-upload/FileUpload.cjs.map +1 -0
- package/dist/components/file-upload/FileUpload.d.ts +15 -0
- package/dist/components/file-upload/FileUpload.d.ts.map +1 -0
- package/dist/components/file-upload/FileUpload.js +126 -0
- package/dist/components/file-upload/FileUpload.js.map +1 -0
- package/dist/components/file-upload/index.d.ts +3 -0
- package/dist/components/file-upload/index.d.ts.map +1 -0
- package/dist/components/form/Form.cjs +81 -0
- package/dist/components/form/Form.cjs.map +1 -0
- package/dist/components/form/Form.d.ts +15 -0
- package/dist/components/form/Form.d.ts.map +1 -0
- package/dist/components/form/Form.js +82 -0
- package/dist/components/form/Form.js.map +1 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/form/index.d.ts.map +1 -0
- package/dist/components/hover-card/HoverCard.cjs +24 -0
- package/dist/components/hover-card/HoverCard.cjs.map +1 -0
- package/dist/components/hover-card/HoverCard.d.ts +6 -0
- package/dist/components/hover-card/HoverCard.d.ts.map +1 -0
- package/dist/components/hover-card/HoverCard.js +24 -0
- package/dist/components/hover-card/HoverCard.js.map +1 -0
- package/dist/components/hover-card/index.d.ts +2 -0
- package/dist/components/hover-card/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +128 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/input/Input.cjs +64 -0
- package/dist/components/input/Input.cjs.map +1 -0
- package/dist/components/input/Input.d.ts +32 -0
- package/dist/components/input/Input.d.ts.map +1 -0
- package/dist/components/input/Input.js +64 -0
- package/dist/components/input/Input.js.map +1 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input-otp/InputOTP.cjs +126 -0
- package/dist/components/input-otp/InputOTP.cjs.map +1 -0
- package/dist/components/input-otp/InputOTP.d.ts +19 -0
- package/dist/components/input-otp/InputOTP.d.ts.map +1 -0
- package/dist/components/input-otp/InputOTP.js +126 -0
- package/dist/components/input-otp/InputOTP.js.map +1 -0
- package/dist/components/input-otp/index.d.ts +3 -0
- package/dist/components/input-otp/index.d.ts.map +1 -0
- package/dist/components/kbd/Kbd.cjs +40 -0
- package/dist/components/kbd/Kbd.cjs.map +1 -0
- package/dist/components/kbd/Kbd.d.ts +10 -0
- package/dist/components/kbd/Kbd.d.ts.map +1 -0
- package/dist/components/kbd/Kbd.js +40 -0
- package/dist/components/kbd/Kbd.js.map +1 -0
- package/dist/components/kbd/index.d.ts +3 -0
- package/dist/components/kbd/index.d.ts.map +1 -0
- package/dist/components/label/Label.cjs +23 -0
- package/dist/components/label/Label.cjs.map +1 -0
- package/dist/components/label/Label.d.ts +20 -0
- package/dist/components/label/Label.d.ts.map +1 -0
- package/dist/components/label/Label.js +23 -0
- package/dist/components/label/Label.js.map +1 -0
- package/dist/components/label/index.d.ts +3 -0
- package/dist/components/label/index.d.ts.map +1 -0
- package/dist/components/marquee/Marquee.cjs +48 -0
- package/dist/components/marquee/Marquee.cjs.map +1 -0
- package/dist/components/marquee/Marquee.d.ts +16 -0
- package/dist/components/marquee/Marquee.d.ts.map +1 -0
- package/dist/components/marquee/Marquee.js +48 -0
- package/dist/components/marquee/Marquee.js.map +1 -0
- package/dist/components/marquee/index.d.ts +3 -0
- package/dist/components/marquee/index.d.ts.map +1 -0
- package/dist/components/menubar/Menubar.cjs +119 -0
- package/dist/components/menubar/Menubar.cjs.map +1 -0
- package/dist/components/menubar/Menubar.d.ts +30 -0
- package/dist/components/menubar/Menubar.d.ts.map +1 -0
- package/dist/components/menubar/Menubar.js +119 -0
- package/dist/components/menubar/Menubar.js.map +1 -0
- package/dist/components/menubar/index.d.ts +3 -0
- package/dist/components/menubar/index.d.ts.map +1 -0
- package/dist/components/multi-select/MultiSelect.cjs +101 -0
- package/dist/components/multi-select/MultiSelect.cjs.map +1 -0
- package/dist/components/multi-select/MultiSelect.d.ts +27 -0
- package/dist/components/multi-select/MultiSelect.d.ts.map +1 -0
- package/dist/components/multi-select/MultiSelect.js +101 -0
- package/dist/components/multi-select/MultiSelect.js.map +1 -0
- package/dist/components/multi-select/index.d.ts +3 -0
- package/dist/components/multi-select/index.d.ts.map +1 -0
- package/dist/components/navigation-menu/NavigationMenu.cjs +123 -0
- package/dist/components/navigation-menu/NavigationMenu.cjs.map +1 -0
- package/dist/components/navigation-menu/NavigationMenu.d.ts +44 -0
- package/dist/components/navigation-menu/NavigationMenu.d.ts.map +1 -0
- package/dist/components/navigation-menu/NavigationMenu.js +123 -0
- package/dist/components/navigation-menu/NavigationMenu.js.map +1 -0
- package/dist/components/navigation-menu/index.d.ts +3 -0
- package/dist/components/navigation-menu/index.d.ts.map +1 -0
- package/dist/components/number-input/NumberInput.cjs +118 -0
- package/dist/components/number-input/NumberInput.cjs.map +1 -0
- package/dist/components/number-input/NumberInput.d.ts +21 -0
- package/dist/components/number-input/NumberInput.d.ts.map +1 -0
- package/dist/components/number-input/NumberInput.js +118 -0
- package/dist/components/number-input/NumberInput.js.map +1 -0
- package/dist/components/number-input/index.d.ts +3 -0
- package/dist/components/number-input/index.d.ts.map +1 -0
- package/dist/components/pagination/Pagination.cjs +88 -0
- package/dist/components/pagination/Pagination.cjs.map +1 -0
- package/dist/components/pagination/Pagination.d.ts +18 -0
- package/dist/components/pagination/Pagination.d.ts.map +1 -0
- package/dist/components/pagination/Pagination.js +88 -0
- package/dist/components/pagination/Pagination.js.map +1 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.d.ts.map +1 -0
- package/dist/components/popover/Popover.cjs +72 -0
- package/dist/components/popover/Popover.cjs.map +1 -0
- package/dist/components/popover/Popover.d.ts +24 -0
- package/dist/components/popover/Popover.d.ts.map +1 -0
- package/dist/components/popover/Popover.js +72 -0
- package/dist/components/popover/Popover.js.map +1 -0
- package/dist/components/popover/index.d.ts +3 -0
- package/dist/components/popover/index.d.ts.map +1 -0
- package/dist/components/progress/Progress.cjs +61 -0
- package/dist/components/progress/Progress.cjs.map +1 -0
- package/dist/components/progress/Progress.d.ts +26 -0
- package/dist/components/progress/Progress.d.ts.map +1 -0
- package/dist/components/progress/Progress.js +61 -0
- package/dist/components/progress/Progress.js.map +1 -0
- package/dist/components/progress/index.d.ts +3 -0
- package/dist/components/progress/index.d.ts.map +1 -0
- package/dist/components/progress-ring/ProgressRing.cjs +110 -0
- package/dist/components/progress-ring/ProgressRing.cjs.map +1 -0
- package/dist/components/progress-ring/ProgressRing.d.ts +17 -0
- package/dist/components/progress-ring/ProgressRing.d.ts.map +1 -0
- package/dist/components/progress-ring/ProgressRing.js +110 -0
- package/dist/components/progress-ring/ProgressRing.js.map +1 -0
- package/dist/components/progress-ring/index.d.ts +3 -0
- package/dist/components/progress-ring/index.d.ts.map +1 -0
- package/dist/components/radio-group/RadioGroup.cjs +54 -0
- package/dist/components/radio-group/RadioGroup.cjs.map +1 -0
- package/dist/components/radio-group/RadioGroup.d.ts +38 -0
- package/dist/components/radio-group/RadioGroup.d.ts.map +1 -0
- package/dist/components/radio-group/RadioGroup.js +54 -0
- package/dist/components/radio-group/RadioGroup.js.map +1 -0
- package/dist/components/radio-group/index.d.ts +3 -0
- package/dist/components/radio-group/index.d.ts.map +1 -0
- package/dist/components/rating/Rating.cjs +95 -0
- package/dist/components/rating/Rating.cjs.map +1 -0
- package/dist/components/rating/Rating.d.ts +16 -0
- package/dist/components/rating/Rating.d.ts.map +1 -0
- package/dist/components/rating/Rating.js +95 -0
- package/dist/components/rating/Rating.js.map +1 -0
- package/dist/components/rating/index.d.ts +3 -0
- package/dist/components/rating/index.d.ts.map +1 -0
- package/dist/components/resizable/Resizable.cjs +98 -0
- package/dist/components/resizable/Resizable.cjs.map +1 -0
- package/dist/components/resizable/Resizable.d.ts +21 -0
- package/dist/components/resizable/Resizable.d.ts.map +1 -0
- package/dist/components/resizable/Resizable.js +98 -0
- package/dist/components/resizable/Resizable.js.map +1 -0
- package/dist/components/resizable/index.d.ts +3 -0
- package/dist/components/resizable/index.d.ts.map +1 -0
- package/dist/components/scroll-area/ScrollArea.cjs +36 -0
- package/dist/components/scroll-area/ScrollArea.cjs.map +1 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +9 -0
- package/dist/components/scroll-area/ScrollArea.d.ts.map +1 -0
- package/dist/components/scroll-area/ScrollArea.js +36 -0
- package/dist/components/scroll-area/ScrollArea.js.map +1 -0
- package/dist/components/scroll-area/index.d.ts +3 -0
- package/dist/components/scroll-area/index.d.ts.map +1 -0
- package/dist/components/select/Select.cjs +66 -0
- package/dist/components/select/Select.cjs.map +1 -0
- package/dist/components/select/Select.d.ts +49 -0
- package/dist/components/select/Select.d.ts.map +1 -0
- package/dist/components/select/Select.js +66 -0
- package/dist/components/select/Select.js.map +1 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/separator/Separator.cjs +45 -0
- package/dist/components/separator/Separator.cjs.map +1 -0
- package/dist/components/separator/Separator.d.ts +17 -0
- package/dist/components/separator/Separator.d.ts.map +1 -0
- package/dist/components/separator/Separator.js +45 -0
- package/dist/components/separator/Separator.js.map +1 -0
- package/dist/components/separator/index.d.ts +3 -0
- package/dist/components/separator/index.d.ts.map +1 -0
- package/dist/components/sheet/Sheet.cjs +59 -0
- package/dist/components/sheet/Sheet.cjs.map +1 -0
- package/dist/components/sheet/Sheet.d.ts +28 -0
- package/dist/components/sheet/Sheet.d.ts.map +1 -0
- package/dist/components/sheet/Sheet.js +59 -0
- package/dist/components/sheet/Sheet.js.map +1 -0
- package/dist/components/sheet/index.d.ts +3 -0
- package/dist/components/sheet/index.d.ts.map +1 -0
- package/dist/components/skeleton/Skeleton.cjs +70 -0
- package/dist/components/skeleton/Skeleton.cjs.map +1 -0
- package/dist/components/skeleton/Skeleton.d.ts +30 -0
- package/dist/components/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/Skeleton.js +70 -0
- package/dist/components/skeleton/Skeleton.js.map +1 -0
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/index.d.ts.map +1 -0
- package/dist/components/slider/Slider.cjs +27 -0
- package/dist/components/slider/Slider.cjs.map +1 -0
- package/dist/components/slider/Slider.d.ts +10 -0
- package/dist/components/slider/Slider.d.ts.map +1 -0
- package/dist/components/slider/Slider.js +27 -0
- package/dist/components/slider/Slider.js.map +1 -0
- package/dist/components/slider/index.d.ts +3 -0
- package/dist/components/slider/index.d.ts.map +1 -0
- package/dist/components/spinner/Spinner.cjs +79 -0
- package/dist/components/spinner/Spinner.cjs.map +1 -0
- package/dist/components/spinner/Spinner.d.ts +12 -0
- package/dist/components/spinner/Spinner.d.ts.map +1 -0
- package/dist/components/spinner/Spinner.js +79 -0
- package/dist/components/spinner/Spinner.js.map +1 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/stat-card/StatCard.cjs +73 -0
- package/dist/components/stat-card/StatCard.cjs.map +1 -0
- package/dist/components/stat-card/StatCard.d.ts +24 -0
- package/dist/components/stat-card/StatCard.d.ts.map +1 -0
- package/dist/components/stat-card/StatCard.js +73 -0
- package/dist/components/stat-card/StatCard.js.map +1 -0
- package/dist/components/stat-card/index.d.ts +3 -0
- package/dist/components/stat-card/index.d.ts.map +1 -0
- package/dist/components/stepper/Stepper.cjs +90 -0
- package/dist/components/stepper/Stepper.cjs.map +1 -0
- package/dist/components/stepper/Stepper.d.ts +24 -0
- package/dist/components/stepper/Stepper.d.ts.map +1 -0
- package/dist/components/stepper/Stepper.js +90 -0
- package/dist/components/stepper/Stepper.js.map +1 -0
- package/dist/components/stepper/index.d.ts +3 -0
- package/dist/components/stepper/index.d.ts.map +1 -0
- package/dist/components/switch/Switch.cjs +29 -0
- package/dist/components/switch/Switch.cjs.map +1 -0
- package/dist/components/switch/Switch.d.ts +20 -0
- package/dist/components/switch/Switch.d.ts.map +1 -0
- package/dist/components/switch/Switch.js +29 -0
- package/dist/components/switch/Switch.js.map +1 -0
- package/dist/components/switch/index.d.ts +3 -0
- package/dist/components/switch/index.d.ts.map +1 -0
- package/dist/components/table/Table.cjs +113 -0
- package/dist/components/table/Table.cjs.map +1 -0
- package/dist/components/table/Table.d.ts +48 -0
- package/dist/components/table/Table.d.ts.map +1 -0
- package/dist/components/table/Table.js +113 -0
- package/dist/components/table/Table.js.map +1 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.cjs +40 -0
- package/dist/components/tabs/Tabs.cjs.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +19 -0
- package/dist/components/tabs/Tabs.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.js +40 -0
- package/dist/components/tabs/Tabs.js.map +1 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tag-input/TagInput.cjs +113 -0
- package/dist/components/tag-input/TagInput.cjs.map +1 -0
- package/dist/components/tag-input/TagInput.d.ts +16 -0
- package/dist/components/tag-input/TagInput.d.ts.map +1 -0
- package/dist/components/tag-input/TagInput.js +113 -0
- package/dist/components/tag-input/TagInput.js.map +1 -0
- package/dist/components/tag-input/index.d.ts +3 -0
- package/dist/components/tag-input/index.d.ts.map +1 -0
- package/dist/components/textarea/Textarea.cjs +83 -0
- package/dist/components/textarea/Textarea.cjs.map +1 -0
- package/dist/components/textarea/Textarea.d.ts +28 -0
- package/dist/components/textarea/Textarea.d.ts.map +1 -0
- package/dist/components/textarea/Textarea.js +83 -0
- package/dist/components/textarea/Textarea.js.map +1 -0
- package/dist/components/textarea/index.d.ts +3 -0
- package/dist/components/textarea/index.d.ts.map +1 -0
- package/dist/components/timeline/Timeline.cjs +28 -0
- package/dist/components/timeline/Timeline.cjs.map +1 -0
- package/dist/components/timeline/Timeline.d.ts +17 -0
- package/dist/components/timeline/Timeline.d.ts.map +1 -0
- package/dist/components/timeline/Timeline.js +28 -0
- package/dist/components/timeline/Timeline.js.map +1 -0
- package/dist/components/timeline/index.d.ts +3 -0
- package/dist/components/timeline/index.d.ts.map +1 -0
- package/dist/components/toast/Toast.cjs +88 -0
- package/dist/components/toast/Toast.cjs.map +1 -0
- package/dist/components/toast/Toast.d.ts +45 -0
- package/dist/components/toast/Toast.d.ts.map +1 -0
- package/dist/components/toast/Toast.js +88 -0
- package/dist/components/toast/Toast.js.map +1 -0
- package/dist/components/toast/index.d.ts +3 -0
- package/dist/components/toast/index.d.ts.map +1 -0
- package/dist/components/toggle-group/ToggleGroup.cjs +35 -0
- package/dist/components/toggle-group/ToggleGroup.cjs.map +1 -0
- package/dist/components/toggle-group/ToggleGroup.d.ts +12 -0
- package/dist/components/toggle-group/ToggleGroup.d.ts.map +1 -0
- package/dist/components/toggle-group/ToggleGroup.js +35 -0
- package/dist/components/toggle-group/ToggleGroup.js.map +1 -0
- package/dist/components/toggle-group/index.d.ts +3 -0
- package/dist/components/toggle-group/index.d.ts.map +1 -0
- package/dist/components/tooltip/Tooltip.cjs +36 -0
- package/dist/components/tooltip/Tooltip.cjs.map +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +33 -0
- package/dist/components/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/Tooltip.js +36 -0
- package/dist/components/tooltip/Tooltip.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tree/Tree.cjs +132 -0
- package/dist/components/tree/Tree.cjs.map +1 -0
- package/dist/components/tree/Tree.d.ts +23 -0
- package/dist/components/tree/Tree.d.ts.map +1 -0
- package/dist/components/tree/Tree.js +132 -0
- package/dist/components/tree/Tree.js.map +1 -0
- package/dist/components/tree/index.d.ts +3 -0
- package/dist/components/tree/index.d.ts.map +1 -0
- package/dist/config/defaults.cjs +83 -0
- package/dist/config/defaults.cjs.map +1 -0
- package/dist/config/defaults.d.ts +3 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +83 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/index.cjs +26 -0
- package/dist/config/index.cjs.map +1 -0
- package/dist/config/index.d.ts +21 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +26 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/types.d.ts +114 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +34 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useArray.cjs +15 -0
- package/dist/hooks/useArray.cjs.map +1 -0
- package/dist/hooks/useArray.d.ts +18 -0
- package/dist/hooks/useArray.d.ts.map +1 -0
- package/dist/hooks/useArray.js +15 -0
- package/dist/hooks/useArray.js.map +1 -0
- package/dist/hooks/useBreakpoint.cjs +25 -0
- package/dist/hooks/useBreakpoint.cjs.map +1 -0
- package/dist/hooks/useBreakpoint.d.ts +10 -0
- package/dist/hooks/useBreakpoint.d.ts.map +1 -0
- package/dist/hooks/useBreakpoint.js +25 -0
- package/dist/hooks/useBreakpoint.js.map +1 -0
- package/dist/hooks/useClickOutside.cjs +19 -0
- package/dist/hooks/useClickOutside.cjs.map +1 -0
- package/dist/hooks/useClickOutside.d.ts +10 -0
- package/dist/hooks/useClickOutside.d.ts.map +1 -0
- package/dist/hooks/useClickOutside.js +19 -0
- package/dist/hooks/useClickOutside.js.map +1 -0
- package/dist/hooks/useClipboard.cjs +18 -0
- package/dist/hooks/useClipboard.cjs.map +1 -0
- package/dist/hooks/useClipboard.d.ts +12 -0
- package/dist/hooks/useClipboard.d.ts.map +1 -0
- package/dist/hooks/useClipboard.js +18 -0
- package/dist/hooks/useClipboard.js.map +1 -0
- package/dist/hooks/useCounter.cjs +15 -0
- package/dist/hooks/useCounter.cjs.map +1 -0
- package/dist/hooks/useCounter.d.ts +18 -0
- package/dist/hooks/useCounter.d.ts.map +1 -0
- package/dist/hooks/useCounter.js +15 -0
- package/dist/hooks/useCounter.js.map +1 -0
- package/dist/hooks/useDebounce.cjs +13 -0
- package/dist/hooks/useDebounce.cjs.map +1 -0
- package/dist/hooks/useDebounce.d.ts +8 -0
- package/dist/hooks/useDebounce.d.ts.map +1 -0
- package/dist/hooks/useDebounce.js +13 -0
- package/dist/hooks/useDebounce.js.map +1 -0
- package/dist/hooks/useEventListener.cjs +15 -0
- package/dist/hooks/useEventListener.cjs.map +1 -0
- package/dist/hooks/useEventListener.d.ts +10 -0
- package/dist/hooks/useEventListener.d.ts.map +1 -0
- package/dist/hooks/useEventListener.js +15 -0
- package/dist/hooks/useEventListener.js.map +1 -0
- package/dist/hooks/useFetch.cjs +33 -0
- package/dist/hooks/useFetch.cjs.map +1 -0
- package/dist/hooks/useFetch.d.ts +14 -0
- package/dist/hooks/useFetch.d.ts.map +1 -0
- package/dist/hooks/useFetch.js +33 -0
- package/dist/hooks/useFetch.js.map +1 -0
- package/dist/hooks/useFocus.cjs +22 -0
- package/dist/hooks/useFocus.cjs.map +1 -0
- package/dist/hooks/useFocus.d.ts +10 -0
- package/dist/hooks/useFocus.d.ts.map +1 -0
- package/dist/hooks/useFocus.js +22 -0
- package/dist/hooks/useFocus.js.map +1 -0
- package/dist/hooks/useHover.cjs +22 -0
- package/dist/hooks/useHover.cjs.map +1 -0
- package/dist/hooks/useHover.d.ts +10 -0
- package/dist/hooks/useHover.d.ts.map +1 -0
- package/dist/hooks/useHover.js +22 -0
- package/dist/hooks/useHover.js.map +1 -0
- package/dist/hooks/useInterval.cjs +14 -0
- package/dist/hooks/useInterval.cjs.map +1 -0
- package/dist/hooks/useInterval.d.ts +10 -0
- package/dist/hooks/useInterval.d.ts.map +1 -0
- package/dist/hooks/useInterval.js +14 -0
- package/dist/hooks/useInterval.js.map +1 -0
- package/dist/hooks/useIsMounted.cjs +15 -0
- package/dist/hooks/useIsMounted.cjs.map +1 -0
- package/dist/hooks/useIsMounted.d.ts +10 -0
- package/dist/hooks/useIsMounted.d.ts.map +1 -0
- package/dist/hooks/useIsMounted.js +15 -0
- package/dist/hooks/useIsMounted.js.map +1 -0
- package/dist/hooks/useIsVisible.cjs +18 -0
- package/dist/hooks/useIsVisible.cjs.map +1 -0
- package/dist/hooks/useIsVisible.d.ts +10 -0
- package/dist/hooks/useIsVisible.d.ts.map +1 -0
- package/dist/hooks/useIsVisible.js +18 -0
- package/dist/hooks/useIsVisible.js.map +1 -0
- package/dist/hooks/useKeyPress.cjs +25 -0
- package/dist/hooks/useKeyPress.cjs.map +1 -0
- package/dist/hooks/useKeyPress.d.ts +14 -0
- package/dist/hooks/useKeyPress.d.ts.map +1 -0
- package/dist/hooks/useKeyPress.js +25 -0
- package/dist/hooks/useKeyPress.js.map +1 -0
- package/dist/hooks/useLocalStorage.cjs +30 -0
- package/dist/hooks/useLocalStorage.cjs.map +1 -0
- package/dist/hooks/useLocalStorage.d.ts +8 -0
- package/dist/hooks/useLocalStorage.d.ts.map +1 -0
- package/dist/hooks/useLocalStorage.js +30 -0
- package/dist/hooks/useLocalStorage.js.map +1 -0
- package/dist/hooks/useMap.cjs +18 -0
- package/dist/hooks/useMap.cjs.map +1 -0
- package/dist/hooks/useMap.d.ts +17 -0
- package/dist/hooks/useMap.d.ts.map +1 -0
- package/dist/hooks/useMap.js +18 -0
- package/dist/hooks/useMap.js.map +1 -0
- package/dist/hooks/useMediaQuery.cjs +19 -0
- package/dist/hooks/useMediaQuery.cjs.map +1 -0
- package/dist/hooks/useMediaQuery.d.ts +9 -0
- package/dist/hooks/useMediaQuery.d.ts.map +1 -0
- package/dist/hooks/useMediaQuery.js +19 -0
- package/dist/hooks/useMediaQuery.js.map +1 -0
- package/dist/hooks/usePrevious.cjs +12 -0
- package/dist/hooks/usePrevious.cjs.map +1 -0
- package/dist/hooks/usePrevious.d.ts +8 -0
- package/dist/hooks/usePrevious.d.ts.map +1 -0
- package/dist/hooks/usePrevious.js +12 -0
- package/dist/hooks/usePrevious.js.map +1 -0
- package/dist/hooks/useScrollPosition.cjs +22 -0
- package/dist/hooks/useScrollPosition.cjs.map +1 -0
- package/dist/hooks/useScrollPosition.d.ts +14 -0
- package/dist/hooks/useScrollPosition.d.ts.map +1 -0
- package/dist/hooks/useScrollPosition.js +22 -0
- package/dist/hooks/useScrollPosition.js.map +1 -0
- package/dist/hooks/useSessionStorage.cjs +30 -0
- package/dist/hooks/useSessionStorage.cjs.map +1 -0
- package/dist/hooks/useSessionStorage.d.ts +8 -0
- package/dist/hooks/useSessionStorage.d.ts.map +1 -0
- package/dist/hooks/useSessionStorage.js +30 -0
- package/dist/hooks/useSessionStorage.js.map +1 -0
- package/dist/hooks/useSet.cjs +22 -0
- package/dist/hooks/useSet.cjs.map +1 -0
- package/dist/hooks/useSet.d.ts +17 -0
- package/dist/hooks/useSet.d.ts.map +1 -0
- package/dist/hooks/useSet.js +22 -0
- package/dist/hooks/useSet.js.map +1 -0
- package/dist/hooks/useThrottle.cjs +23 -0
- package/dist/hooks/useThrottle.cjs.map +1 -0
- package/dist/hooks/useThrottle.d.ts +8 -0
- package/dist/hooks/useThrottle.d.ts.map +1 -0
- package/dist/hooks/useThrottle.js +23 -0
- package/dist/hooks/useThrottle.js.map +1 -0
- package/dist/hooks/useTimeout.cjs +22 -0
- package/dist/hooks/useTimeout.cjs.map +1 -0
- package/dist/hooks/useTimeout.d.ts +12 -0
- package/dist/hooks/useTimeout.d.ts.map +1 -0
- package/dist/hooks/useTimeout.js +22 -0
- package/dist/hooks/useTimeout.js.map +1 -0
- package/dist/hooks/useToggle.cjs +10 -0
- package/dist/hooks/useToggle.cjs.map +1 -0
- package/dist/hooks/useToggle.d.ts +8 -0
- package/dist/hooks/useToggle.d.ts.map +1 -0
- package/dist/hooks/useToggle.js +10 -0
- package/dist/hooks/useToggle.js.map +1 -0
- package/dist/hooks/useWindowSize.cjs +17 -0
- package/dist/hooks/useWindowSize.cjs.map +1 -0
- package/dist/hooks/useWindowSize.d.ts +12 -0
- package/dist/hooks/useWindowSize.d.ts.map +1 -0
- package/dist/hooks/useWindowSize.js +17 -0
- package/dist/hooks/useWindowSize.js.map +1 -0
- package/dist/index.cjs +482 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +482 -0
- package/dist/index.js.map +1 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +729 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +729 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +630 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +630 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +341 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +325 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +152 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +177 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +177 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +152 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/@radix-ui/number/dist/index.cjs +7 -0
- package/dist/node_modules/@radix-ui/number/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs +12 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +12 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.cjs +319 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +319 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs +184 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +167 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.cjs +16 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +43 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +26 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs +141 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +124 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs +83 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js +66 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs +57 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.cjs +297 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +280 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.cjs +169 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +152 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs +71 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +71 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.cjs +107 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +57 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +99 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +82 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.cjs +337 -0
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +320 -0
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs +360 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +343 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.cjs +107 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs +28 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +234 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +217 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +316 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +299 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +47 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +30 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +226 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +209 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.cjs +273 -0
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +256 -0
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +32 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-label/dist/index.cjs +44 -0
- package/dist/node_modules/@radix-ui/react-label/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-label/dist/index.js +27 -0
- package/dist/node_modules/@radix-ui/react-label/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive/dist/index.cjs +57 -0
- package/dist/node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs +898 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +881 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.cjs +107 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.cjs +484 -0
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.js +467 -0
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.cjs +826 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.js +809 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.cjs +335 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +318 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.cjs +107 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +311 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +294 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +36 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +19 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs +147 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +62 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +44 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.cjs +107 -0
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-progress/dist/index.cjs +114 -0
- package/dist/node_modules/@radix-ui/react-progress/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-progress/dist/index.js +97 -0
- package/dist/node_modules/@radix-ui/react-progress/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.cjs +83 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.js +66 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.cjs +57 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.cjs +306 -0
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +289 -0
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +245 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +228 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.cjs +749 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +732 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.cjs +1214 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +1196 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.cjs +107 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-separator/dist/index.cjs +48 -0
- package/dist/node_modules/@radix-ui/react-separator/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-separator/dist/index.js +31 -0
- package/dist/node_modules/@radix-ui/react-separator/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.cjs +57 -0
- package/dist/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-slider/dist/index.cjs +580 -0
- package/dist/node_modules/@radix-ui/react-slider/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-slider/dist/index.js +563 -0
- package/dist/node_modules/@radix-ui/react-slider/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +124 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +107 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.cjs +173 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +156 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.cjs +212 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +195 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-toast/dist/index.cjs +663 -0
- package/dist/node_modules/@radix-ui/react-toast/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-toast/dist/index.js +645 -0
- package/dist/node_modules/@radix-ui/react-toast/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.cjs +53 -0
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.js +36 -0
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.cjs +172 -0
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js +172 -0
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs +520 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +503 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.cjs +16 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +32 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +89 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +72 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +35 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +18 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +16 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +24 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.cjs +32 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs +57 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +54 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +37 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.cjs +123 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.cjs.map +1 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +123 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/class-variance-authority/dist/index.cjs +46 -0
- package/dist/node_modules/class-variance-authority/dist/index.cjs.map +1 -0
- package/dist/node_modules/class-variance-authority/dist/index.js +46 -0
- package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.cjs +17 -0
- package/dist/node_modules/clsx/dist/clsx.cjs.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.cjs +19 -0
- package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.cjs.map +1 -0
- package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.js +19 -0
- package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.js.map +1 -0
- package/dist/node_modules/cmdk/dist/index.cjs +330 -0
- package/dist/node_modules/cmdk/dist/index.cjs.map +1 -0
- package/dist/node_modules/cmdk/dist/index.js +313 -0
- package/dist/node_modules/cmdk/dist/index.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.cjs +57 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.cjs +10 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.cjs.map +1 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +10 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +42 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +43 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +24 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +25 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +20 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-right.cjs +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-right.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-right.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-right.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/calendar.cjs +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/calendar.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/calendar.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/calendar.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.cjs +13 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs +13 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs +13 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.cjs +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs +13 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis.cjs +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/menu.cjs +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/menu.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/menu.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/menu.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minus.cjs +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minus.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minus.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minus.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panel-left-close.cjs +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panel-left-close.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panel-left-close.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panel-left-close.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panel-left-open.cjs +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panel-left-open.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panel-left-open.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panel-left-open.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/search.cjs +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/search.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/search.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/search.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/star.cjs +19 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/star.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/star.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/star.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-down.cjs +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-down.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-down.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-down.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.cjs +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.cjs +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/user.cjs +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/user.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/user.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/user.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.cjs +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +15 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -0
- package/dist/node_modules/react-hook-form/dist/index.esm.cjs +2135 -0
- package/dist/node_modules/react-hook-form/dist/index.esm.cjs.map +1 -0
- package/dist/node_modules/react-hook-form/dist/index.esm.js +2135 -0
- package/dist/node_modules/react-hook-form/dist/index.esm.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +28 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +12 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +198 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +181 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs +56 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +20 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +20 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +103 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +103 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs +6 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +7 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +65 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +48 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +11 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +11 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +38 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +38 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs +14 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +14 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs +34 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +17 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs +49 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +49 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +2467 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2467 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.cjs +39 -0
- package/dist/node_modules/tslib/tslib.es6.cjs.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.js +40 -0
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +12 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +12 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +53 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +36 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs +30 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +30 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs +39 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +22 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs +89 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +89 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +78 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +78 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +63 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +63 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/shim/index.cjs +18 -0
- package/dist/node_modules/use-sync-external-store/shim/index.cjs.map +1 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +18 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -0
- package/dist/provider/RothzergProvider.cjs +89 -0
- package/dist/provider/RothzergProvider.cjs.map +1 -0
- package/dist/provider/RothzergProvider.d.ts +34 -0
- package/dist/provider/RothzergProvider.d.ts.map +1 -0
- package/dist/provider/RothzergProvider.js +89 -0
- package/dist/provider/RothzergProvider.js.map +1 -0
- package/dist/provider/index.d.ts +3 -0
- package/dist/provider/index.d.ts.map +1 -0
- package/dist/styles.css +12211 -0
- package/dist/test/globals.d.ts +2 -0
- package/dist/test/globals.d.ts.map +1 -0
- package/dist/test/happy-dom.d.ts +2 -0
- package/dist/test/happy-dom.d.ts.map +1 -0
- package/dist/test/setup.d.ts +1 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/utils/array.cjs +22 -0
- package/dist/utils/array.cjs.map +1 -0
- package/dist/utils/array.d.ts +17 -0
- package/dist/utils/array.d.ts.map +1 -0
- package/dist/utils/array.js +22 -0
- package/dist/utils/array.js.map +1 -0
- package/dist/utils/browser.cjs +34 -0
- package/dist/utils/browser.cjs.map +1 -0
- package/dist/utils/browser.d.ts +32 -0
- package/dist/utils/browser.d.ts.map +1 -0
- package/dist/utils/browser.js +34 -0
- package/dist/utils/browser.js.map +1 -0
- package/dist/utils/cn.cjs +9 -0
- package/dist/utils/cn.cjs.map +1 -0
- package/dist/utils/cn.d.ts +11 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +9 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/formatBytes.cjs +12 -0
- package/dist/utils/formatBytes.cjs.map +1 -0
- package/dist/utils/formatBytes.d.ts +11 -0
- package/dist/utils/formatBytes.d.ts.map +1 -0
- package/dist/utils/formatBytes.js +12 -0
- package/dist/utils/formatBytes.js.map +1 -0
- package/dist/utils/formatDate.cjs +15 -0
- package/dist/utils/formatDate.cjs.map +1 -0
- package/dist/utils/formatDate.d.ts +15 -0
- package/dist/utils/formatDate.d.ts.map +1 -0
- package/dist/utils/formatDate.js +15 -0
- package/dist/utils/formatDate.js.map +1 -0
- package/dist/utils/formatDuration.cjs +13 -0
- package/dist/utils/formatDuration.cjs.map +1 -0
- package/dist/utils/formatDuration.d.ts +10 -0
- package/dist/utils/formatDuration.d.ts.map +1 -0
- package/dist/utils/formatDuration.js +13 -0
- package/dist/utils/formatDuration.js.map +1 -0
- package/dist/utils/formatNumber.cjs +30 -0
- package/dist/utils/formatNumber.cjs.map +1 -0
- package/dist/utils/formatNumber.d.ts +17 -0
- package/dist/utils/formatNumber.d.ts.map +1 -0
- package/dist/utils/formatNumber.js +30 -0
- package/dist/utils/formatNumber.js.map +1 -0
- package/dist/utils/formatRelativeTime.cjs +25 -0
- package/dist/utils/formatRelativeTime.cjs.map +1 -0
- package/dist/utils/formatRelativeTime.d.ts +10 -0
- package/dist/utils/formatRelativeTime.d.ts.map +1 -0
- package/dist/utils/formatRelativeTime.js +25 -0
- package/dist/utils/formatRelativeTime.js.map +1 -0
- package/dist/utils/function.cjs +22 -0
- package/dist/utils/function.cjs.map +1 -0
- package/dist/utils/function.d.ts +16 -0
- package/dist/utils/function.d.ts.map +1 -0
- package/dist/utils/function.js +22 -0
- package/dist/utils/function.js.map +1 -0
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/number.cjs +21 -0
- package/dist/utils/number.cjs.map +1 -0
- package/dist/utils/number.d.ts +26 -0
- package/dist/utils/number.d.ts.map +1 -0
- package/dist/utils/number.js +21 -0
- package/dist/utils/number.js.map +1 -0
- package/dist/utils/object.cjs +31 -0
- package/dist/utils/object.cjs.map +1 -0
- package/dist/utils/object.d.ts +23 -0
- package/dist/utils/object.d.ts.map +1 -0
- package/dist/utils/object.js +31 -0
- package/dist/utils/object.js.map +1 -0
- package/dist/utils/string.cjs +28 -0
- package/dist/utils/string.cjs.map +1 -0
- package/dist/utils/string.d.ts +41 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/string.js +28 -0
- package/dist/utils/string.js.map +1 -0
- package/package.json +126 -0
- package/rothzerg.config.example.js +161 -0
|
@@ -0,0 +1,2135 @@
|
|
|
1
|
+
import React__default from "react";
|
|
2
|
+
var isCheckBoxInput = (element) => element.type === "checkbox";
|
|
3
|
+
var isDateObject = (value) => value instanceof Date;
|
|
4
|
+
var isNullOrUndefined = (value) => value == null;
|
|
5
|
+
const isObjectType = (value) => typeof value === "object";
|
|
6
|
+
var isObject = (value) => !isNullOrUndefined(value) && !Array.isArray(value) && isObjectType(value) && !isDateObject(value);
|
|
7
|
+
var getEventValue = (event) => isObject(event) && event.target ? isCheckBoxInput(event.target) ? event.target.checked : event.target.value : event;
|
|
8
|
+
var getNodeParentName = (name) => name.substring(0, name.search(/\.\d+(\.|$)/)) || name;
|
|
9
|
+
var isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));
|
|
10
|
+
var isPlainObject = (tempObject) => {
|
|
11
|
+
const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;
|
|
12
|
+
return isObject(prototypeCopy) && prototypeCopy.hasOwnProperty("isPrototypeOf");
|
|
13
|
+
};
|
|
14
|
+
var isWeb = typeof window !== "undefined" && typeof window.HTMLElement !== "undefined" && typeof document !== "undefined";
|
|
15
|
+
function cloneObject(data) {
|
|
16
|
+
if (data instanceof Date) {
|
|
17
|
+
return new Date(data);
|
|
18
|
+
}
|
|
19
|
+
const isFileListInstance = typeof FileList !== "undefined" && data instanceof FileList;
|
|
20
|
+
if (isWeb && (data instanceof Blob || isFileListInstance)) {
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
const isArray = Array.isArray(data);
|
|
24
|
+
if (!isArray && !(isObject(data) && isPlainObject(data))) {
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
const copy = isArray ? [] : Object.create(Object.getPrototypeOf(data));
|
|
28
|
+
for (const key in data) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(data, key)) {
|
|
30
|
+
copy[key] = cloneObject(data[key]);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return copy;
|
|
34
|
+
}
|
|
35
|
+
var isKey = (value) => /^\w*$/.test(value);
|
|
36
|
+
var isUndefined = (val) => val === void 0;
|
|
37
|
+
var compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];
|
|
38
|
+
var stringToPath = (input) => compact(input.replace(/["|']|\]/g, "").split(/\.|\[/));
|
|
39
|
+
var get = (object, path, defaultValue) => {
|
|
40
|
+
if (!path || !isObject(object)) {
|
|
41
|
+
return defaultValue;
|
|
42
|
+
}
|
|
43
|
+
const result = (isKey(path) ? [path] : stringToPath(path)).reduce((result2, key) => isNullOrUndefined(result2) ? result2 : result2[key], object);
|
|
44
|
+
return isUndefined(result) || result === object ? isUndefined(object[path]) ? defaultValue : object[path] : result;
|
|
45
|
+
};
|
|
46
|
+
var isBoolean = (value) => typeof value === "boolean";
|
|
47
|
+
var isFunction = (value) => typeof value === "function";
|
|
48
|
+
var set = (object, path, value) => {
|
|
49
|
+
let index = -1;
|
|
50
|
+
const tempPath = isKey(path) ? [path] : stringToPath(path);
|
|
51
|
+
const length = tempPath.length;
|
|
52
|
+
const lastIndex = length - 1;
|
|
53
|
+
while (++index < length) {
|
|
54
|
+
const key = tempPath[index];
|
|
55
|
+
let newValue = value;
|
|
56
|
+
if (index !== lastIndex) {
|
|
57
|
+
const objValue = object[key];
|
|
58
|
+
newValue = isObject(objValue) || Array.isArray(objValue) ? objValue : !isNaN(+tempPath[index + 1]) ? [] : {};
|
|
59
|
+
}
|
|
60
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
object[key] = newValue;
|
|
64
|
+
object = object[key];
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const EVENTS = {
|
|
68
|
+
BLUR: "blur",
|
|
69
|
+
FOCUS_OUT: "focusout",
|
|
70
|
+
CHANGE: "change"
|
|
71
|
+
};
|
|
72
|
+
const VALIDATION_MODE = {
|
|
73
|
+
onBlur: "onBlur",
|
|
74
|
+
onChange: "onChange",
|
|
75
|
+
onSubmit: "onSubmit",
|
|
76
|
+
onTouched: "onTouched",
|
|
77
|
+
all: "all"
|
|
78
|
+
};
|
|
79
|
+
const INPUT_VALIDATION_RULES = {
|
|
80
|
+
max: "max",
|
|
81
|
+
min: "min",
|
|
82
|
+
maxLength: "maxLength",
|
|
83
|
+
minLength: "minLength",
|
|
84
|
+
pattern: "pattern",
|
|
85
|
+
required: "required",
|
|
86
|
+
validate: "validate"
|
|
87
|
+
};
|
|
88
|
+
const HookFormControlContext = React__default.createContext(null);
|
|
89
|
+
HookFormControlContext.displayName = "HookFormControlContext";
|
|
90
|
+
const useFormControlContext = () => React__default.useContext(HookFormControlContext);
|
|
91
|
+
var getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {
|
|
92
|
+
const result = {
|
|
93
|
+
defaultValues: control._defaultValues
|
|
94
|
+
};
|
|
95
|
+
for (const key in formState) {
|
|
96
|
+
Object.defineProperty(result, key, {
|
|
97
|
+
get: () => {
|
|
98
|
+
const _key = key;
|
|
99
|
+
if (control._proxyFormState[_key] !== VALIDATION_MODE.all) {
|
|
100
|
+
control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all;
|
|
101
|
+
}
|
|
102
|
+
localProxyFormState && (localProxyFormState[_key] = true);
|
|
103
|
+
return formState[_key];
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
};
|
|
109
|
+
const useIsomorphicLayoutEffect = typeof window !== "undefined" ? React__default.useLayoutEffect : React__default.useEffect;
|
|
110
|
+
function useFormState(props) {
|
|
111
|
+
const formControl = useFormControlContext();
|
|
112
|
+
const { control = formControl, disabled, name, exact } = props || {};
|
|
113
|
+
const [formState, updateFormState] = React__default.useState(control._formState);
|
|
114
|
+
const _localProxyFormState = React__default.useRef({
|
|
115
|
+
isDirty: false,
|
|
116
|
+
isLoading: false,
|
|
117
|
+
dirtyFields: false,
|
|
118
|
+
touchedFields: false,
|
|
119
|
+
validatingFields: false,
|
|
120
|
+
isValidating: false,
|
|
121
|
+
isValid: false,
|
|
122
|
+
errors: false
|
|
123
|
+
});
|
|
124
|
+
useIsomorphicLayoutEffect(() => control._subscribe({
|
|
125
|
+
name,
|
|
126
|
+
formState: _localProxyFormState.current,
|
|
127
|
+
exact,
|
|
128
|
+
callback: (formState2) => {
|
|
129
|
+
!disabled && updateFormState({
|
|
130
|
+
...control._formState,
|
|
131
|
+
...formState2
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}), [name, disabled, exact]);
|
|
135
|
+
React__default.useEffect(() => {
|
|
136
|
+
_localProxyFormState.current.isValid && control._setValid(true);
|
|
137
|
+
}, [control]);
|
|
138
|
+
return React__default.useMemo(() => getProxyFormState(formState, control, _localProxyFormState.current, false), [formState, control]);
|
|
139
|
+
}
|
|
140
|
+
var isString = (value) => typeof value === "string";
|
|
141
|
+
var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {
|
|
142
|
+
if (isString(names)) {
|
|
143
|
+
isGlobal && _names.watch.add(names);
|
|
144
|
+
return get(formValues, names, defaultValue);
|
|
145
|
+
}
|
|
146
|
+
if (Array.isArray(names)) {
|
|
147
|
+
return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName), get(formValues, fieldName)));
|
|
148
|
+
}
|
|
149
|
+
isGlobal && (_names.watchAll = true);
|
|
150
|
+
return formValues;
|
|
151
|
+
};
|
|
152
|
+
var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
|
|
153
|
+
function deepEqual(object1, object2, _internal_visited = /* @__PURE__ */ new WeakSet()) {
|
|
154
|
+
if (isPrimitive(object1) || isPrimitive(object2)) {
|
|
155
|
+
return Object.is(object1, object2);
|
|
156
|
+
}
|
|
157
|
+
if (isDateObject(object1) && isDateObject(object2)) {
|
|
158
|
+
return Object.is(object1.getTime(), object2.getTime());
|
|
159
|
+
}
|
|
160
|
+
const keys1 = Object.keys(object1);
|
|
161
|
+
const keys2 = Object.keys(object2);
|
|
162
|
+
if (keys1.length !== keys2.length) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
if (_internal_visited.has(object1) || _internal_visited.has(object2)) {
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
_internal_visited.add(object1);
|
|
169
|
+
_internal_visited.add(object2);
|
|
170
|
+
for (const key of keys1) {
|
|
171
|
+
const val1 = object1[key];
|
|
172
|
+
if (!keys2.includes(key)) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
if (key !== "ref") {
|
|
176
|
+
const val2 = object2[key];
|
|
177
|
+
if (isDateObject(val1) && isDateObject(val2) || isObject(val1) && isObject(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual(val1, val2, _internal_visited) : !Object.is(val1, val2)) {
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
function useWatch(props) {
|
|
185
|
+
const formControl = useFormControlContext();
|
|
186
|
+
const { control = formControl, name, defaultValue, disabled, exact, compute } = props || {};
|
|
187
|
+
const _defaultValue = React__default.useRef(defaultValue);
|
|
188
|
+
const _compute = React__default.useRef(compute);
|
|
189
|
+
const _computeFormValues = React__default.useRef(void 0);
|
|
190
|
+
const _prevControl = React__default.useRef(control);
|
|
191
|
+
const _prevName = React__default.useRef(name);
|
|
192
|
+
_compute.current = compute;
|
|
193
|
+
const [value, updateValue] = React__default.useState(() => {
|
|
194
|
+
const defaultValue2 = control._getWatch(name, _defaultValue.current);
|
|
195
|
+
return _compute.current ? _compute.current(defaultValue2) : defaultValue2;
|
|
196
|
+
});
|
|
197
|
+
const getCurrentOutput = React__default.useCallback((values) => {
|
|
198
|
+
const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);
|
|
199
|
+
return _compute.current ? _compute.current(formValues) : formValues;
|
|
200
|
+
}, [control._formValues, control._names, name]);
|
|
201
|
+
const refreshValue = React__default.useCallback((values) => {
|
|
202
|
+
if (!disabled) {
|
|
203
|
+
const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);
|
|
204
|
+
if (_compute.current) {
|
|
205
|
+
const computedFormValues = _compute.current(formValues);
|
|
206
|
+
if (!deepEqual(computedFormValues, _computeFormValues.current)) {
|
|
207
|
+
updateValue(computedFormValues);
|
|
208
|
+
_computeFormValues.current = computedFormValues;
|
|
209
|
+
}
|
|
210
|
+
} else {
|
|
211
|
+
updateValue(formValues);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}, [control._formValues, control._names, disabled, name]);
|
|
215
|
+
useIsomorphicLayoutEffect(() => {
|
|
216
|
+
if (_prevControl.current !== control || !deepEqual(_prevName.current, name)) {
|
|
217
|
+
_prevControl.current = control;
|
|
218
|
+
_prevName.current = name;
|
|
219
|
+
refreshValue();
|
|
220
|
+
}
|
|
221
|
+
return control._subscribe({
|
|
222
|
+
name,
|
|
223
|
+
formState: {
|
|
224
|
+
values: true
|
|
225
|
+
},
|
|
226
|
+
exact,
|
|
227
|
+
callback: (formState) => {
|
|
228
|
+
refreshValue(formState.values);
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}, [control, exact, name, refreshValue]);
|
|
232
|
+
React__default.useEffect(() => control._removeUnmounted());
|
|
233
|
+
const controlChanged = _prevControl.current !== control;
|
|
234
|
+
const prevName = _prevName.current;
|
|
235
|
+
const computedOutput = React__default.useMemo(() => {
|
|
236
|
+
if (disabled) {
|
|
237
|
+
return null;
|
|
238
|
+
}
|
|
239
|
+
const nameChanged = !controlChanged && !deepEqual(prevName, name);
|
|
240
|
+
const shouldReturnImmediate = controlChanged || nameChanged;
|
|
241
|
+
return shouldReturnImmediate ? getCurrentOutput() : null;
|
|
242
|
+
}, [disabled, controlChanged, name, prevName, getCurrentOutput]);
|
|
243
|
+
return computedOutput !== null ? computedOutput : value;
|
|
244
|
+
}
|
|
245
|
+
function useController(props) {
|
|
246
|
+
const formControl = useFormControlContext();
|
|
247
|
+
const { name, disabled, control = formControl, shouldUnregister, defaultValue, exact = true } = props;
|
|
248
|
+
const isArrayField = isNameInFieldArray(control._names.array, name);
|
|
249
|
+
const defaultValueMemo = React__default.useMemo(() => get(control._formValues, name, get(control._defaultValues, name, defaultValue)), [control, name, defaultValue]);
|
|
250
|
+
const value = useWatch({
|
|
251
|
+
control,
|
|
252
|
+
name,
|
|
253
|
+
defaultValue: defaultValueMemo,
|
|
254
|
+
exact
|
|
255
|
+
});
|
|
256
|
+
const formState = useFormState({
|
|
257
|
+
control,
|
|
258
|
+
name,
|
|
259
|
+
exact
|
|
260
|
+
});
|
|
261
|
+
const _props = React__default.useRef(props);
|
|
262
|
+
const _previousNameRef = React__default.useRef(void 0);
|
|
263
|
+
const _registerProps = React__default.useRef(control.register(name, {
|
|
264
|
+
...props.rules,
|
|
265
|
+
value,
|
|
266
|
+
...isBoolean(props.disabled) ? { disabled: props.disabled } : {}
|
|
267
|
+
}));
|
|
268
|
+
_props.current = props;
|
|
269
|
+
const fieldState = React__default.useMemo(() => Object.defineProperties({}, {
|
|
270
|
+
invalid: {
|
|
271
|
+
enumerable: true,
|
|
272
|
+
get: () => !!get(formState.errors, name)
|
|
273
|
+
},
|
|
274
|
+
isDirty: {
|
|
275
|
+
enumerable: true,
|
|
276
|
+
get: () => !!get(formState.dirtyFields, name)
|
|
277
|
+
},
|
|
278
|
+
isTouched: {
|
|
279
|
+
enumerable: true,
|
|
280
|
+
get: () => !!get(formState.touchedFields, name)
|
|
281
|
+
},
|
|
282
|
+
isValidating: {
|
|
283
|
+
enumerable: true,
|
|
284
|
+
get: () => !!get(formState.validatingFields, name)
|
|
285
|
+
},
|
|
286
|
+
error: {
|
|
287
|
+
enumerable: true,
|
|
288
|
+
get: () => get(formState.errors, name)
|
|
289
|
+
}
|
|
290
|
+
}), [formState, name]);
|
|
291
|
+
const onChange = React__default.useCallback((event) => _registerProps.current.onChange({
|
|
292
|
+
target: {
|
|
293
|
+
value: getEventValue(event),
|
|
294
|
+
name
|
|
295
|
+
},
|
|
296
|
+
type: EVENTS.CHANGE
|
|
297
|
+
}), [name]);
|
|
298
|
+
const onBlur = React__default.useCallback(() => _registerProps.current.onBlur({
|
|
299
|
+
target: {
|
|
300
|
+
value: get(control._formValues, name),
|
|
301
|
+
name
|
|
302
|
+
},
|
|
303
|
+
type: EVENTS.BLUR
|
|
304
|
+
}), [name, control._formValues]);
|
|
305
|
+
const ref = React__default.useCallback((elm) => {
|
|
306
|
+
const field2 = get(control._fields, name);
|
|
307
|
+
if (field2 && field2._f && elm) {
|
|
308
|
+
field2._f.ref = {
|
|
309
|
+
focus: () => isFunction(elm.focus) && elm.focus(),
|
|
310
|
+
select: () => isFunction(elm.select) && elm.select(),
|
|
311
|
+
setCustomValidity: (message) => isFunction(elm.setCustomValidity) && elm.setCustomValidity(message),
|
|
312
|
+
reportValidity: () => isFunction(elm.reportValidity) && elm.reportValidity()
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
}, [control._fields, name]);
|
|
316
|
+
const field = React__default.useMemo(() => ({
|
|
317
|
+
name,
|
|
318
|
+
value,
|
|
319
|
+
...isBoolean(disabled) || formState.disabled ? { disabled: formState.disabled || disabled } : {},
|
|
320
|
+
onChange,
|
|
321
|
+
onBlur,
|
|
322
|
+
ref
|
|
323
|
+
}), [name, disabled, formState.disabled, onChange, onBlur, ref, value]);
|
|
324
|
+
React__default.useEffect(() => {
|
|
325
|
+
const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;
|
|
326
|
+
const previousName = _previousNameRef.current;
|
|
327
|
+
if (previousName && previousName !== name && !isArrayField) {
|
|
328
|
+
control.unregister(previousName);
|
|
329
|
+
}
|
|
330
|
+
control.register(name, {
|
|
331
|
+
..._props.current.rules,
|
|
332
|
+
...isBoolean(_props.current.disabled) ? { disabled: _props.current.disabled } : {}
|
|
333
|
+
});
|
|
334
|
+
const updateMounted = (name2, value2) => {
|
|
335
|
+
const field2 = get(control._fields, name2);
|
|
336
|
+
if (field2 && field2._f) {
|
|
337
|
+
field2._f.mount = value2;
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
updateMounted(name, true);
|
|
341
|
+
if (_shouldUnregisterField) {
|
|
342
|
+
const value2 = cloneObject(get(control._options.defaultValues, name, _props.current.defaultValue));
|
|
343
|
+
set(control._defaultValues, name, value2);
|
|
344
|
+
if (isUndefined(get(control._formValues, name))) {
|
|
345
|
+
set(control._formValues, name, value2);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
!isArrayField && control.register(name);
|
|
349
|
+
_previousNameRef.current = name;
|
|
350
|
+
return () => {
|
|
351
|
+
(isArrayField ? _shouldUnregisterField && !control._state.action : _shouldUnregisterField) ? control.unregister(name) : updateMounted(name, false);
|
|
352
|
+
};
|
|
353
|
+
}, [name, control, isArrayField, shouldUnregister]);
|
|
354
|
+
React__default.useEffect(() => {
|
|
355
|
+
control._setDisabledField({
|
|
356
|
+
disabled,
|
|
357
|
+
name
|
|
358
|
+
});
|
|
359
|
+
}, [disabled, name, control]);
|
|
360
|
+
return React__default.useMemo(() => ({
|
|
361
|
+
field,
|
|
362
|
+
formState,
|
|
363
|
+
fieldState
|
|
364
|
+
}), [field, formState, fieldState]);
|
|
365
|
+
}
|
|
366
|
+
const Controller = (props) => props.render(useController(props));
|
|
367
|
+
const HookFormContext = React__default.createContext(null);
|
|
368
|
+
HookFormContext.displayName = "HookFormContext";
|
|
369
|
+
const useFormContext = () => React__default.useContext(HookFormContext);
|
|
370
|
+
const FormProvider = (props) => {
|
|
371
|
+
const { children, watch, getValues, getFieldState, setError, clearErrors, setValue, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe } = props;
|
|
372
|
+
return React__default.createElement(
|
|
373
|
+
HookFormContext.Provider,
|
|
374
|
+
{ value: React__default.useMemo(() => ({
|
|
375
|
+
watch,
|
|
376
|
+
getValues,
|
|
377
|
+
getFieldState,
|
|
378
|
+
setError,
|
|
379
|
+
clearErrors,
|
|
380
|
+
setValue,
|
|
381
|
+
trigger,
|
|
382
|
+
formState,
|
|
383
|
+
resetField,
|
|
384
|
+
reset,
|
|
385
|
+
handleSubmit,
|
|
386
|
+
unregister,
|
|
387
|
+
control,
|
|
388
|
+
register,
|
|
389
|
+
setFocus,
|
|
390
|
+
subscribe
|
|
391
|
+
}), [
|
|
392
|
+
clearErrors,
|
|
393
|
+
control,
|
|
394
|
+
formState,
|
|
395
|
+
getFieldState,
|
|
396
|
+
getValues,
|
|
397
|
+
handleSubmit,
|
|
398
|
+
register,
|
|
399
|
+
reset,
|
|
400
|
+
resetField,
|
|
401
|
+
setError,
|
|
402
|
+
setFocus,
|
|
403
|
+
setValue,
|
|
404
|
+
subscribe,
|
|
405
|
+
trigger,
|
|
406
|
+
unregister,
|
|
407
|
+
watch
|
|
408
|
+
]) },
|
|
409
|
+
React__default.createElement(HookFormControlContext.Provider, { value: control }, children)
|
|
410
|
+
);
|
|
411
|
+
};
|
|
412
|
+
var appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria ? {
|
|
413
|
+
...errors[name],
|
|
414
|
+
types: {
|
|
415
|
+
...errors[name] && errors[name].types ? errors[name].types : {},
|
|
416
|
+
[type]: message || true
|
|
417
|
+
}
|
|
418
|
+
} : {};
|
|
419
|
+
var convertToArrayPayload = (value) => Array.isArray(value) ? value : [value];
|
|
420
|
+
var createSubject = () => {
|
|
421
|
+
let _observers = [];
|
|
422
|
+
const next = (value) => {
|
|
423
|
+
for (const observer of _observers) {
|
|
424
|
+
observer.next && observer.next(value);
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
const subscribe = (observer) => {
|
|
428
|
+
_observers.push(observer);
|
|
429
|
+
return {
|
|
430
|
+
unsubscribe: () => {
|
|
431
|
+
_observers = _observers.filter((o) => o !== observer);
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
const unsubscribe = () => {
|
|
436
|
+
_observers = [];
|
|
437
|
+
};
|
|
438
|
+
return {
|
|
439
|
+
get observers() {
|
|
440
|
+
return _observers;
|
|
441
|
+
},
|
|
442
|
+
next,
|
|
443
|
+
subscribe,
|
|
444
|
+
unsubscribe
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
function extractFormValues(fieldsState, formValues) {
|
|
448
|
+
const values = {};
|
|
449
|
+
for (const key in fieldsState) {
|
|
450
|
+
if (fieldsState.hasOwnProperty(key)) {
|
|
451
|
+
const fieldState = fieldsState[key];
|
|
452
|
+
const fieldValue = formValues[key];
|
|
453
|
+
if (fieldState && isObject(fieldState) && fieldValue) {
|
|
454
|
+
const nestedFieldsState = extractFormValues(fieldState, fieldValue);
|
|
455
|
+
if (isObject(nestedFieldsState)) {
|
|
456
|
+
values[key] = nestedFieldsState;
|
|
457
|
+
}
|
|
458
|
+
} else if (fieldsState[key]) {
|
|
459
|
+
values[key] = fieldValue;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
return values;
|
|
464
|
+
}
|
|
465
|
+
var isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;
|
|
466
|
+
var isFileInput = (element) => element.type === "file";
|
|
467
|
+
var isHTMLElement = (value) => {
|
|
468
|
+
if (!isWeb) {
|
|
469
|
+
return false;
|
|
470
|
+
}
|
|
471
|
+
const owner = value ? value.ownerDocument : 0;
|
|
472
|
+
return value instanceof (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement);
|
|
473
|
+
};
|
|
474
|
+
var isMultipleSelect = (element) => element.type === `select-multiple`;
|
|
475
|
+
var isRadioInput = (element) => element.type === "radio";
|
|
476
|
+
var isRadioOrCheckbox = (ref) => isRadioInput(ref) || isCheckBoxInput(ref);
|
|
477
|
+
var live = (ref) => isHTMLElement(ref) && ref.isConnected;
|
|
478
|
+
function baseGet(object, updatePath) {
|
|
479
|
+
const length = updatePath.slice(0, -1).length;
|
|
480
|
+
let index = 0;
|
|
481
|
+
while (index < length) {
|
|
482
|
+
object = isUndefined(object) ? index++ : object[updatePath[index++]];
|
|
483
|
+
}
|
|
484
|
+
return object;
|
|
485
|
+
}
|
|
486
|
+
function isEmptyArray(obj) {
|
|
487
|
+
for (const key in obj) {
|
|
488
|
+
if (obj.hasOwnProperty(key) && !isUndefined(obj[key])) {
|
|
489
|
+
return false;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
return true;
|
|
493
|
+
}
|
|
494
|
+
function unset(object, path) {
|
|
495
|
+
const paths = Array.isArray(path) ? path : isKey(path) ? [path] : stringToPath(path);
|
|
496
|
+
const childObject = paths.length === 1 ? object : baseGet(object, paths);
|
|
497
|
+
const index = paths.length - 1;
|
|
498
|
+
const key = paths[index];
|
|
499
|
+
if (childObject) {
|
|
500
|
+
delete childObject[key];
|
|
501
|
+
}
|
|
502
|
+
if (index !== 0 && (isObject(childObject) && isEmptyObject(childObject) || Array.isArray(childObject) && isEmptyArray(childObject))) {
|
|
503
|
+
unset(object, paths.slice(0, -1));
|
|
504
|
+
}
|
|
505
|
+
return object;
|
|
506
|
+
}
|
|
507
|
+
var objectHasFunction = (data) => {
|
|
508
|
+
for (const key in data) {
|
|
509
|
+
if (isFunction(data[key])) {
|
|
510
|
+
return true;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
return false;
|
|
514
|
+
};
|
|
515
|
+
function isTraversable(value) {
|
|
516
|
+
return Array.isArray(value) || isObject(value) && !objectHasFunction(value);
|
|
517
|
+
}
|
|
518
|
+
function markFieldsDirty(data, fields = {}) {
|
|
519
|
+
for (const key in data) {
|
|
520
|
+
const value = data[key];
|
|
521
|
+
if (isTraversable(value)) {
|
|
522
|
+
fields[key] = Array.isArray(value) ? [] : {};
|
|
523
|
+
markFieldsDirty(value, fields[key]);
|
|
524
|
+
} else if (!isUndefined(value)) {
|
|
525
|
+
fields[key] = true;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
return fields;
|
|
529
|
+
}
|
|
530
|
+
function getDirtyFields(data, formValues, dirtyFieldsFromValues) {
|
|
531
|
+
if (!dirtyFieldsFromValues) {
|
|
532
|
+
dirtyFieldsFromValues = markFieldsDirty(formValues);
|
|
533
|
+
}
|
|
534
|
+
for (const key in data) {
|
|
535
|
+
const value = data[key];
|
|
536
|
+
if (isTraversable(value)) {
|
|
537
|
+
if (isUndefined(formValues) || isPrimitive(dirtyFieldsFromValues[key])) {
|
|
538
|
+
dirtyFieldsFromValues[key] = markFieldsDirty(value, Array.isArray(value) ? [] : {});
|
|
539
|
+
} else {
|
|
540
|
+
getDirtyFields(value, isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
|
|
541
|
+
}
|
|
542
|
+
} else {
|
|
543
|
+
const formValue = formValues[key];
|
|
544
|
+
dirtyFieldsFromValues[key] = !deepEqual(value, formValue);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return dirtyFieldsFromValues;
|
|
548
|
+
}
|
|
549
|
+
const defaultResult = {
|
|
550
|
+
value: false,
|
|
551
|
+
isValid: false
|
|
552
|
+
};
|
|
553
|
+
const validResult = { value: true, isValid: true };
|
|
554
|
+
var getCheckboxValue = (options) => {
|
|
555
|
+
if (Array.isArray(options)) {
|
|
556
|
+
if (options.length > 1) {
|
|
557
|
+
const values = options.filter((option) => option && option.checked && !option.disabled).map((option) => option.value);
|
|
558
|
+
return { value: values, isValid: !!values.length };
|
|
559
|
+
}
|
|
560
|
+
return options[0].checked && !options[0].disabled ? (
|
|
561
|
+
// @ts-expect-error expected to work in the browser
|
|
562
|
+
options[0].attributes && !isUndefined(options[0].attributes.value) ? isUndefined(options[0].value) || options[0].value === "" ? validResult : { value: options[0].value, isValid: true } : validResult
|
|
563
|
+
) : defaultResult;
|
|
564
|
+
}
|
|
565
|
+
return defaultResult;
|
|
566
|
+
};
|
|
567
|
+
var getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value) ? value : valueAsNumber ? value === "" ? NaN : value ? +value : value : valueAsDate && isString(value) ? new Date(value) : setValueAs ? setValueAs(value) : value;
|
|
568
|
+
const defaultReturn = {
|
|
569
|
+
isValid: false,
|
|
570
|
+
value: null
|
|
571
|
+
};
|
|
572
|
+
var getRadioValue = (options) => Array.isArray(options) ? options.reduce((previous, option) => option && option.checked && !option.disabled ? {
|
|
573
|
+
isValid: true,
|
|
574
|
+
value: option.value
|
|
575
|
+
} : previous, defaultReturn) : defaultReturn;
|
|
576
|
+
function getFieldValue(_f) {
|
|
577
|
+
const ref = _f.ref;
|
|
578
|
+
if (isFileInput(ref)) {
|
|
579
|
+
return ref.files;
|
|
580
|
+
}
|
|
581
|
+
if (isRadioInput(ref)) {
|
|
582
|
+
return getRadioValue(_f.refs).value;
|
|
583
|
+
}
|
|
584
|
+
if (isMultipleSelect(ref)) {
|
|
585
|
+
return [...ref.selectedOptions].map(({ value }) => value);
|
|
586
|
+
}
|
|
587
|
+
if (isCheckBoxInput(ref)) {
|
|
588
|
+
return getCheckboxValue(_f.refs).value;
|
|
589
|
+
}
|
|
590
|
+
return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f);
|
|
591
|
+
}
|
|
592
|
+
var getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation) => {
|
|
593
|
+
const fields = {};
|
|
594
|
+
for (const name of fieldsNames) {
|
|
595
|
+
const field = get(_fields, name);
|
|
596
|
+
field && set(fields, name, field._f);
|
|
597
|
+
}
|
|
598
|
+
return {
|
|
599
|
+
criteriaMode,
|
|
600
|
+
names: [...fieldsNames],
|
|
601
|
+
fields,
|
|
602
|
+
shouldUseNativeValidation
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
var isRegex = (value) => value instanceof RegExp;
|
|
606
|
+
var getRuleValue = (rule) => isUndefined(rule) ? rule : isRegex(rule) ? rule.source : isObject(rule) ? isRegex(rule.value) ? rule.value.source : rule.value : rule;
|
|
607
|
+
var getValidationModes = (mode) => ({
|
|
608
|
+
isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,
|
|
609
|
+
isOnBlur: mode === VALIDATION_MODE.onBlur,
|
|
610
|
+
isOnChange: mode === VALIDATION_MODE.onChange,
|
|
611
|
+
isOnAll: mode === VALIDATION_MODE.all,
|
|
612
|
+
isOnTouch: mode === VALIDATION_MODE.onTouched
|
|
613
|
+
});
|
|
614
|
+
const ASYNC_FUNCTION = "AsyncFunction";
|
|
615
|
+
var hasPromiseValidation = (fieldReference) => !!fieldReference && !!fieldReference.validate && !!(isFunction(fieldReference.validate) && fieldReference.validate.constructor.name === ASYNC_FUNCTION || isObject(fieldReference.validate) && Object.values(fieldReference.validate).find((validateFunction) => validateFunction.constructor.name === ASYNC_FUNCTION));
|
|
616
|
+
var hasValidation = (options) => options.mount && (options.required || options.min || options.max || options.maxLength || options.minLength || options.pattern || options.validate);
|
|
617
|
+
var isWatched = (name, _names, isBlurEvent) => !isBlurEvent && (_names.watchAll || _names.watch.has(name) || [..._names.watch].some((watchName) => name.startsWith(watchName) && /^\.\w+/.test(name.slice(watchName.length))));
|
|
618
|
+
const iterateFieldsByAction = (fields, action, fieldsNames, abortEarly) => {
|
|
619
|
+
for (const key of fieldsNames || Object.keys(fields)) {
|
|
620
|
+
const field = get(fields, key);
|
|
621
|
+
if (field) {
|
|
622
|
+
const { _f, ...currentField } = field;
|
|
623
|
+
if (_f) {
|
|
624
|
+
if (_f.refs && _f.refs[0] && action(_f.refs[0], key) && !abortEarly) {
|
|
625
|
+
return true;
|
|
626
|
+
} else if (_f.ref && action(_f.ref, _f.name) && !abortEarly) {
|
|
627
|
+
return true;
|
|
628
|
+
} else {
|
|
629
|
+
if (iterateFieldsByAction(currentField, action)) {
|
|
630
|
+
break;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
} else if (isObject(currentField)) {
|
|
634
|
+
if (iterateFieldsByAction(currentField, action)) {
|
|
635
|
+
break;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
return;
|
|
641
|
+
};
|
|
642
|
+
function schemaErrorLookup(errors, _fields, name) {
|
|
643
|
+
const error = get(errors, name);
|
|
644
|
+
if (error || isKey(name)) {
|
|
645
|
+
return {
|
|
646
|
+
error,
|
|
647
|
+
name
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
const names = name.split(".");
|
|
651
|
+
while (names.length) {
|
|
652
|
+
const fieldName = names.join(".");
|
|
653
|
+
const field = get(_fields, fieldName);
|
|
654
|
+
const foundError = get(errors, fieldName);
|
|
655
|
+
if (field && !Array.isArray(field) && name !== fieldName) {
|
|
656
|
+
return { name };
|
|
657
|
+
}
|
|
658
|
+
if (foundError && foundError.type) {
|
|
659
|
+
return {
|
|
660
|
+
name: fieldName,
|
|
661
|
+
error: foundError
|
|
662
|
+
};
|
|
663
|
+
}
|
|
664
|
+
if (foundError && foundError.root && foundError.root.type) {
|
|
665
|
+
return {
|
|
666
|
+
name: `${fieldName}.root`,
|
|
667
|
+
error: foundError.root
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
names.pop();
|
|
671
|
+
}
|
|
672
|
+
return {
|
|
673
|
+
name
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
var shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {
|
|
677
|
+
updateFormState(formStateData);
|
|
678
|
+
const { name, ...formState } = formStateData;
|
|
679
|
+
return isEmptyObject(formState) || Object.keys(formState).length >= Object.keys(_proxyFormState).length || Object.keys(formState).find((key) => _proxyFormState[key] === (!isRoot || VALIDATION_MODE.all));
|
|
680
|
+
};
|
|
681
|
+
var shouldSubscribeByName = (name, signalName, exact) => !name || !signalName || name === signalName || convertToArrayPayload(name).some((currentName) => currentName && (exact ? currentName === signalName : currentName.startsWith(signalName) || signalName.startsWith(currentName)));
|
|
682
|
+
var skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => {
|
|
683
|
+
if (mode.isOnAll) {
|
|
684
|
+
return false;
|
|
685
|
+
} else if (!isSubmitted && mode.isOnTouch) {
|
|
686
|
+
return !(isTouched || isBlurEvent);
|
|
687
|
+
} else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) {
|
|
688
|
+
return !isBlurEvent;
|
|
689
|
+
} else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) {
|
|
690
|
+
return isBlurEvent;
|
|
691
|
+
}
|
|
692
|
+
return true;
|
|
693
|
+
};
|
|
694
|
+
var unsetEmptyArray = (ref, name) => !compact(get(ref, name)).length && unset(ref, name);
|
|
695
|
+
var updateFieldArrayRootError = (errors, error, name) => {
|
|
696
|
+
const fieldArrayErrors = convertToArrayPayload(get(errors, name));
|
|
697
|
+
set(fieldArrayErrors, "root", error[name]);
|
|
698
|
+
set(errors, name, fieldArrayErrors);
|
|
699
|
+
return errors;
|
|
700
|
+
};
|
|
701
|
+
function getValidateError(result, ref, type = "validate") {
|
|
702
|
+
if (isString(result) || Array.isArray(result) && result.every(isString) || isBoolean(result) && !result) {
|
|
703
|
+
return {
|
|
704
|
+
type,
|
|
705
|
+
message: isString(result) ? result : "",
|
|
706
|
+
ref
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
var getValueAndMessage = (validationData) => isObject(validationData) && !isRegex(validationData) ? validationData : {
|
|
711
|
+
value: validationData,
|
|
712
|
+
message: ""
|
|
713
|
+
};
|
|
714
|
+
var validateField = async (field, disabledFieldNames, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {
|
|
715
|
+
const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount } = field._f;
|
|
716
|
+
const inputValue = get(formValues, name);
|
|
717
|
+
if (!mount || disabledFieldNames.has(name)) {
|
|
718
|
+
return {};
|
|
719
|
+
}
|
|
720
|
+
const inputRef = refs ? refs[0] : ref;
|
|
721
|
+
const setCustomValidity = (message) => {
|
|
722
|
+
if (shouldUseNativeValidation && inputRef.reportValidity) {
|
|
723
|
+
inputRef.setCustomValidity(isBoolean(message) ? "" : message || "");
|
|
724
|
+
inputRef.reportValidity();
|
|
725
|
+
}
|
|
726
|
+
};
|
|
727
|
+
const error = {};
|
|
728
|
+
const isRadio = isRadioInput(ref);
|
|
729
|
+
const isCheckBox = isCheckBoxInput(ref);
|
|
730
|
+
const isRadioOrCheckbox2 = isRadio || isCheckBox;
|
|
731
|
+
const isEmpty = (valueAsNumber || isFileInput(ref)) && isUndefined(ref.value) && isUndefined(inputValue) || isHTMLElement(ref) && ref.value === "" || inputValue === "" || Array.isArray(inputValue) && !inputValue.length;
|
|
732
|
+
const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error);
|
|
733
|
+
const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => {
|
|
734
|
+
const message = exceedMax ? maxLengthMessage : minLengthMessage;
|
|
735
|
+
error[name] = {
|
|
736
|
+
type: exceedMax ? maxType : minType,
|
|
737
|
+
message,
|
|
738
|
+
ref,
|
|
739
|
+
...appendErrorsCurry(exceedMax ? maxType : minType, message)
|
|
740
|
+
};
|
|
741
|
+
};
|
|
742
|
+
if (isFieldArray ? !Array.isArray(inputValue) || !inputValue.length : required && (!isRadioOrCheckbox2 && (isEmpty || isNullOrUndefined(inputValue)) || isBoolean(inputValue) && !inputValue || isCheckBox && !getCheckboxValue(refs).isValid || isRadio && !getRadioValue(refs).isValid)) {
|
|
743
|
+
const { value, message } = isString(required) ? { value: !!required, message: required } : getValueAndMessage(required);
|
|
744
|
+
if (value) {
|
|
745
|
+
error[name] = {
|
|
746
|
+
type: INPUT_VALIDATION_RULES.required,
|
|
747
|
+
message,
|
|
748
|
+
ref: inputRef,
|
|
749
|
+
...appendErrorsCurry(INPUT_VALIDATION_RULES.required, message)
|
|
750
|
+
};
|
|
751
|
+
if (!validateAllFieldCriteria) {
|
|
752
|
+
setCustomValidity(message);
|
|
753
|
+
return error;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) {
|
|
758
|
+
let exceedMax;
|
|
759
|
+
let exceedMin;
|
|
760
|
+
const maxOutput = getValueAndMessage(max);
|
|
761
|
+
const minOutput = getValueAndMessage(min);
|
|
762
|
+
if (!isNullOrUndefined(inputValue) && !isNaN(inputValue)) {
|
|
763
|
+
const valueNumber = ref.valueAsNumber || (inputValue ? +inputValue : inputValue);
|
|
764
|
+
if (!isNullOrUndefined(maxOutput.value)) {
|
|
765
|
+
exceedMax = valueNumber > maxOutput.value;
|
|
766
|
+
}
|
|
767
|
+
if (!isNullOrUndefined(minOutput.value)) {
|
|
768
|
+
exceedMin = valueNumber < minOutput.value;
|
|
769
|
+
}
|
|
770
|
+
} else {
|
|
771
|
+
const valueDate = ref.valueAsDate || new Date(inputValue);
|
|
772
|
+
const convertTimeToDate = (time) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + time);
|
|
773
|
+
const isTime = ref.type == "time";
|
|
774
|
+
const isWeek = ref.type == "week";
|
|
775
|
+
if (isString(maxOutput.value) && inputValue) {
|
|
776
|
+
exceedMax = isTime ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value) : isWeek ? inputValue > maxOutput.value : valueDate > new Date(maxOutput.value);
|
|
777
|
+
}
|
|
778
|
+
if (isString(minOutput.value) && inputValue) {
|
|
779
|
+
exceedMin = isTime ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value) : isWeek ? inputValue < minOutput.value : valueDate < new Date(minOutput.value);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
if (exceedMax || exceedMin) {
|
|
783
|
+
getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min);
|
|
784
|
+
if (!validateAllFieldCriteria) {
|
|
785
|
+
setCustomValidity(error[name].message);
|
|
786
|
+
return error;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
if ((maxLength || minLength) && !isEmpty && (isString(inputValue) || isFieldArray && Array.isArray(inputValue))) {
|
|
791
|
+
const maxLengthOutput = getValueAndMessage(maxLength);
|
|
792
|
+
const minLengthOutput = getValueAndMessage(minLength);
|
|
793
|
+
const exceedMax = !isNullOrUndefined(maxLengthOutput.value) && inputValue.length > +maxLengthOutput.value;
|
|
794
|
+
const exceedMin = !isNullOrUndefined(minLengthOutput.value) && inputValue.length < +minLengthOutput.value;
|
|
795
|
+
if (exceedMax || exceedMin) {
|
|
796
|
+
getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message);
|
|
797
|
+
if (!validateAllFieldCriteria) {
|
|
798
|
+
setCustomValidity(error[name].message);
|
|
799
|
+
return error;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
if (pattern && !isEmpty && isString(inputValue)) {
|
|
804
|
+
const { value: patternValue, message } = getValueAndMessage(pattern);
|
|
805
|
+
if (isRegex(patternValue) && !inputValue.match(patternValue)) {
|
|
806
|
+
error[name] = {
|
|
807
|
+
type: INPUT_VALIDATION_RULES.pattern,
|
|
808
|
+
message,
|
|
809
|
+
ref,
|
|
810
|
+
...appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message)
|
|
811
|
+
};
|
|
812
|
+
if (!validateAllFieldCriteria) {
|
|
813
|
+
setCustomValidity(message);
|
|
814
|
+
return error;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
if (validate) {
|
|
819
|
+
if (isFunction(validate)) {
|
|
820
|
+
const result = await validate(inputValue, formValues);
|
|
821
|
+
const validateError = getValidateError(result, inputRef);
|
|
822
|
+
if (validateError) {
|
|
823
|
+
error[name] = {
|
|
824
|
+
...validateError,
|
|
825
|
+
...appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message)
|
|
826
|
+
};
|
|
827
|
+
if (!validateAllFieldCriteria) {
|
|
828
|
+
setCustomValidity(validateError.message);
|
|
829
|
+
return error;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
} else if (isObject(validate)) {
|
|
833
|
+
let validationResult = {};
|
|
834
|
+
for (const key in validate) {
|
|
835
|
+
if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {
|
|
836
|
+
break;
|
|
837
|
+
}
|
|
838
|
+
const validateError = getValidateError(await validate[key](inputValue, formValues), inputRef, key);
|
|
839
|
+
if (validateError) {
|
|
840
|
+
validationResult = {
|
|
841
|
+
...validateError,
|
|
842
|
+
...appendErrorsCurry(key, validateError.message)
|
|
843
|
+
};
|
|
844
|
+
setCustomValidity(validateError.message);
|
|
845
|
+
if (validateAllFieldCriteria) {
|
|
846
|
+
error[name] = validationResult;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
if (!isEmptyObject(validationResult)) {
|
|
851
|
+
error[name] = {
|
|
852
|
+
ref: inputRef,
|
|
853
|
+
...validationResult
|
|
854
|
+
};
|
|
855
|
+
if (!validateAllFieldCriteria) {
|
|
856
|
+
return error;
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
setCustomValidity(true);
|
|
862
|
+
return error;
|
|
863
|
+
};
|
|
864
|
+
const defaultOptions = {
|
|
865
|
+
mode: VALIDATION_MODE.onSubmit,
|
|
866
|
+
reValidateMode: VALIDATION_MODE.onChange,
|
|
867
|
+
shouldFocusError: true
|
|
868
|
+
};
|
|
869
|
+
function createFormControl(props = {}) {
|
|
870
|
+
let _options = {
|
|
871
|
+
...defaultOptions,
|
|
872
|
+
...props
|
|
873
|
+
};
|
|
874
|
+
let _formState = {
|
|
875
|
+
submitCount: 0,
|
|
876
|
+
isDirty: false,
|
|
877
|
+
isReady: false,
|
|
878
|
+
isLoading: isFunction(_options.defaultValues),
|
|
879
|
+
isValidating: false,
|
|
880
|
+
isSubmitted: false,
|
|
881
|
+
isSubmitting: false,
|
|
882
|
+
isSubmitSuccessful: false,
|
|
883
|
+
isValid: false,
|
|
884
|
+
touchedFields: {},
|
|
885
|
+
dirtyFields: {},
|
|
886
|
+
validatingFields: {},
|
|
887
|
+
errors: _options.errors || {},
|
|
888
|
+
disabled: _options.disabled || false
|
|
889
|
+
};
|
|
890
|
+
let _fields = {};
|
|
891
|
+
let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values) ? cloneObject(_options.defaultValues || _options.values) || {} : {};
|
|
892
|
+
let _formValues = _options.shouldUnregister ? {} : cloneObject(_defaultValues);
|
|
893
|
+
let _state = {
|
|
894
|
+
action: false,
|
|
895
|
+
mount: false,
|
|
896
|
+
watch: false,
|
|
897
|
+
keepIsValid: false
|
|
898
|
+
};
|
|
899
|
+
let _names = {
|
|
900
|
+
mount: /* @__PURE__ */ new Set(),
|
|
901
|
+
disabled: /* @__PURE__ */ new Set(),
|
|
902
|
+
unMount: /* @__PURE__ */ new Set(),
|
|
903
|
+
array: /* @__PURE__ */ new Set(),
|
|
904
|
+
watch: /* @__PURE__ */ new Set()
|
|
905
|
+
};
|
|
906
|
+
let delayErrorCallback;
|
|
907
|
+
let timer = 0;
|
|
908
|
+
const defaultProxyFormState = {
|
|
909
|
+
isDirty: false,
|
|
910
|
+
dirtyFields: false,
|
|
911
|
+
validatingFields: false,
|
|
912
|
+
touchedFields: false,
|
|
913
|
+
isValidating: false,
|
|
914
|
+
isValid: false,
|
|
915
|
+
errors: false
|
|
916
|
+
};
|
|
917
|
+
const _proxyFormState = {
|
|
918
|
+
...defaultProxyFormState
|
|
919
|
+
};
|
|
920
|
+
let _proxySubscribeFormState = {
|
|
921
|
+
..._proxyFormState
|
|
922
|
+
};
|
|
923
|
+
const _subjects = {
|
|
924
|
+
array: createSubject(),
|
|
925
|
+
state: createSubject()
|
|
926
|
+
};
|
|
927
|
+
const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;
|
|
928
|
+
const debounce = (callback) => (wait) => {
|
|
929
|
+
clearTimeout(timer);
|
|
930
|
+
timer = setTimeout(callback, wait);
|
|
931
|
+
};
|
|
932
|
+
const _setValid = async (shouldUpdateValid) => {
|
|
933
|
+
if (_state.keepIsValid) {
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
if (!_options.disabled && (_proxyFormState.isValid || _proxySubscribeFormState.isValid || shouldUpdateValid)) {
|
|
937
|
+
let isValid;
|
|
938
|
+
if (_options.resolver) {
|
|
939
|
+
isValid = isEmptyObject((await _runSchema()).errors);
|
|
940
|
+
_updateIsValidating();
|
|
941
|
+
} else {
|
|
942
|
+
isValid = await executeBuiltInValidation(_fields, true);
|
|
943
|
+
}
|
|
944
|
+
if (isValid !== _formState.isValid) {
|
|
945
|
+
_subjects.state.next({
|
|
946
|
+
isValid
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
};
|
|
951
|
+
const _updateIsValidating = (names, isValidating) => {
|
|
952
|
+
if (!_options.disabled && (_proxyFormState.isValidating || _proxyFormState.validatingFields || _proxySubscribeFormState.isValidating || _proxySubscribeFormState.validatingFields)) {
|
|
953
|
+
(names || Array.from(_names.mount)).forEach((name) => {
|
|
954
|
+
if (name) {
|
|
955
|
+
isValidating ? set(_formState.validatingFields, name, isValidating) : unset(_formState.validatingFields, name);
|
|
956
|
+
}
|
|
957
|
+
});
|
|
958
|
+
_subjects.state.next({
|
|
959
|
+
validatingFields: _formState.validatingFields,
|
|
960
|
+
isValidating: !isEmptyObject(_formState.validatingFields)
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
};
|
|
964
|
+
const _setFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {
|
|
965
|
+
if (args && method && !_options.disabled) {
|
|
966
|
+
_state.action = true;
|
|
967
|
+
if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {
|
|
968
|
+
const fieldValues = method(get(_fields, name), args.argA, args.argB);
|
|
969
|
+
shouldSetValues && set(_fields, name, fieldValues);
|
|
970
|
+
}
|
|
971
|
+
if (shouldUpdateFieldsAndState && Array.isArray(get(_formState.errors, name))) {
|
|
972
|
+
const errors = method(get(_formState.errors, name), args.argA, args.argB);
|
|
973
|
+
shouldSetValues && set(_formState.errors, name, errors);
|
|
974
|
+
unsetEmptyArray(_formState.errors, name);
|
|
975
|
+
}
|
|
976
|
+
if ((_proxyFormState.touchedFields || _proxySubscribeFormState.touchedFields) && shouldUpdateFieldsAndState && Array.isArray(get(_formState.touchedFields, name))) {
|
|
977
|
+
const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB);
|
|
978
|
+
shouldSetValues && set(_formState.touchedFields, name, touchedFields);
|
|
979
|
+
}
|
|
980
|
+
if (_proxyFormState.dirtyFields || _proxySubscribeFormState.dirtyFields) {
|
|
981
|
+
_formState.dirtyFields = getDirtyFields(_defaultValues, _formValues);
|
|
982
|
+
}
|
|
983
|
+
_subjects.state.next({
|
|
984
|
+
name,
|
|
985
|
+
isDirty: _getDirty(name, values),
|
|
986
|
+
dirtyFields: _formState.dirtyFields,
|
|
987
|
+
errors: _formState.errors,
|
|
988
|
+
isValid: _formState.isValid
|
|
989
|
+
});
|
|
990
|
+
} else {
|
|
991
|
+
set(_formValues, name, values);
|
|
992
|
+
}
|
|
993
|
+
};
|
|
994
|
+
const updateErrors = (name, error) => {
|
|
995
|
+
set(_formState.errors, name, error);
|
|
996
|
+
_subjects.state.next({
|
|
997
|
+
errors: _formState.errors
|
|
998
|
+
});
|
|
999
|
+
};
|
|
1000
|
+
const _setErrors = (errors) => {
|
|
1001
|
+
_formState.errors = errors;
|
|
1002
|
+
_subjects.state.next({
|
|
1003
|
+
errors: _formState.errors,
|
|
1004
|
+
isValid: false
|
|
1005
|
+
});
|
|
1006
|
+
};
|
|
1007
|
+
const updateValidAndValue = (name, shouldSkipSetValueAs, value, ref) => {
|
|
1008
|
+
const field = get(_fields, name);
|
|
1009
|
+
if (field) {
|
|
1010
|
+
const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);
|
|
1011
|
+
isUndefined(defaultValue) || ref && ref.defaultChecked || shouldSkipSetValueAs ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f)) : setFieldValue(name, defaultValue);
|
|
1012
|
+
_state.mount && !_state.action && _setValid();
|
|
1013
|
+
}
|
|
1014
|
+
};
|
|
1015
|
+
const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {
|
|
1016
|
+
let shouldUpdateField = false;
|
|
1017
|
+
let isPreviousDirty = false;
|
|
1018
|
+
const output = {
|
|
1019
|
+
name
|
|
1020
|
+
};
|
|
1021
|
+
if (!_options.disabled) {
|
|
1022
|
+
if (!isBlurEvent || shouldDirty) {
|
|
1023
|
+
if (_proxyFormState.isDirty || _proxySubscribeFormState.isDirty) {
|
|
1024
|
+
isPreviousDirty = _formState.isDirty;
|
|
1025
|
+
_formState.isDirty = output.isDirty = _getDirty();
|
|
1026
|
+
shouldUpdateField = isPreviousDirty !== output.isDirty;
|
|
1027
|
+
}
|
|
1028
|
+
const isCurrentFieldPristine = deepEqual(get(_defaultValues, name), fieldValue);
|
|
1029
|
+
isPreviousDirty = !!get(_formState.dirtyFields, name);
|
|
1030
|
+
isCurrentFieldPristine ? unset(_formState.dirtyFields, name) : set(_formState.dirtyFields, name, true);
|
|
1031
|
+
output.dirtyFields = _formState.dirtyFields;
|
|
1032
|
+
shouldUpdateField = shouldUpdateField || (_proxyFormState.dirtyFields || _proxySubscribeFormState.dirtyFields) && isPreviousDirty !== !isCurrentFieldPristine;
|
|
1033
|
+
}
|
|
1034
|
+
if (isBlurEvent) {
|
|
1035
|
+
const isPreviousFieldTouched = get(_formState.touchedFields, name);
|
|
1036
|
+
if (!isPreviousFieldTouched) {
|
|
1037
|
+
set(_formState.touchedFields, name, isBlurEvent);
|
|
1038
|
+
output.touchedFields = _formState.touchedFields;
|
|
1039
|
+
shouldUpdateField = shouldUpdateField || (_proxyFormState.touchedFields || _proxySubscribeFormState.touchedFields) && isPreviousFieldTouched !== isBlurEvent;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
shouldUpdateField && shouldRender && _subjects.state.next(output);
|
|
1043
|
+
}
|
|
1044
|
+
return shouldUpdateField ? output : {};
|
|
1045
|
+
};
|
|
1046
|
+
const shouldRenderByError = (name, isValid, error, fieldState) => {
|
|
1047
|
+
const previousFieldError = get(_formState.errors, name);
|
|
1048
|
+
const shouldUpdateValid = (_proxyFormState.isValid || _proxySubscribeFormState.isValid) && isBoolean(isValid) && _formState.isValid !== isValid;
|
|
1049
|
+
if (_options.delayError && error) {
|
|
1050
|
+
delayErrorCallback = debounce(() => updateErrors(name, error));
|
|
1051
|
+
delayErrorCallback(_options.delayError);
|
|
1052
|
+
} else {
|
|
1053
|
+
clearTimeout(timer);
|
|
1054
|
+
delayErrorCallback = null;
|
|
1055
|
+
error ? set(_formState.errors, name, error) : unset(_formState.errors, name);
|
|
1056
|
+
}
|
|
1057
|
+
if ((error ? !deepEqual(previousFieldError, error) : previousFieldError) || !isEmptyObject(fieldState) || shouldUpdateValid) {
|
|
1058
|
+
const updatedFormState = {
|
|
1059
|
+
...fieldState,
|
|
1060
|
+
...shouldUpdateValid && isBoolean(isValid) ? { isValid } : {},
|
|
1061
|
+
errors: _formState.errors,
|
|
1062
|
+
name
|
|
1063
|
+
};
|
|
1064
|
+
_formState = {
|
|
1065
|
+
..._formState,
|
|
1066
|
+
...updatedFormState
|
|
1067
|
+
};
|
|
1068
|
+
_subjects.state.next(updatedFormState);
|
|
1069
|
+
}
|
|
1070
|
+
};
|
|
1071
|
+
const _runSchema = async (name) => {
|
|
1072
|
+
_updateIsValidating(name, true);
|
|
1073
|
+
const result = await _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));
|
|
1074
|
+
return result;
|
|
1075
|
+
};
|
|
1076
|
+
const executeSchemaAndUpdateState = async (names) => {
|
|
1077
|
+
const { errors } = await _runSchema(names);
|
|
1078
|
+
_updateIsValidating(names);
|
|
1079
|
+
if (names) {
|
|
1080
|
+
for (const name of names) {
|
|
1081
|
+
const error = get(errors, name);
|
|
1082
|
+
error ? set(_formState.errors, name, error) : unset(_formState.errors, name);
|
|
1083
|
+
}
|
|
1084
|
+
} else {
|
|
1085
|
+
_formState.errors = errors;
|
|
1086
|
+
}
|
|
1087
|
+
return errors;
|
|
1088
|
+
};
|
|
1089
|
+
const executeBuiltInValidation = async (fields, shouldOnlyCheckValid, context = {
|
|
1090
|
+
valid: true
|
|
1091
|
+
}) => {
|
|
1092
|
+
for (const name in fields) {
|
|
1093
|
+
const field = fields[name];
|
|
1094
|
+
if (field) {
|
|
1095
|
+
const { _f, ...fieldValue } = field;
|
|
1096
|
+
if (_f) {
|
|
1097
|
+
const isFieldArrayRoot = _names.array.has(_f.name);
|
|
1098
|
+
const isPromiseFunction = field._f && hasPromiseValidation(field._f);
|
|
1099
|
+
if (isPromiseFunction && _proxyFormState.validatingFields) {
|
|
1100
|
+
_updateIsValidating([_f.name], true);
|
|
1101
|
+
}
|
|
1102
|
+
const fieldError = await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot);
|
|
1103
|
+
if (isPromiseFunction && _proxyFormState.validatingFields) {
|
|
1104
|
+
_updateIsValidating([_f.name]);
|
|
1105
|
+
}
|
|
1106
|
+
if (fieldError[_f.name]) {
|
|
1107
|
+
context.valid = false;
|
|
1108
|
+
if (shouldOnlyCheckValid || props.shouldUseNativeValidation) {
|
|
1109
|
+
break;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
!shouldOnlyCheckValid && (get(fieldError, _f.name) ? isFieldArrayRoot ? updateFieldArrayRootError(_formState.errors, fieldError, _f.name) : set(_formState.errors, _f.name, fieldError[_f.name]) : unset(_formState.errors, _f.name));
|
|
1113
|
+
}
|
|
1114
|
+
!isEmptyObject(fieldValue) && await executeBuiltInValidation(fieldValue, shouldOnlyCheckValid, context);
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
return context.valid;
|
|
1118
|
+
};
|
|
1119
|
+
const _removeUnmounted = () => {
|
|
1120
|
+
for (const name of _names.unMount) {
|
|
1121
|
+
const field = get(_fields, name);
|
|
1122
|
+
field && (field._f.refs ? field._f.refs.every((ref) => !live(ref)) : !live(field._f.ref)) && unregister(name);
|
|
1123
|
+
}
|
|
1124
|
+
_names.unMount = /* @__PURE__ */ new Set();
|
|
1125
|
+
};
|
|
1126
|
+
const _getDirty = (name, data) => !_options.disabled && (name && data && set(_formValues, name, data), !deepEqual(getValues(), _defaultValues));
|
|
1127
|
+
const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {
|
|
1128
|
+
..._state.mount ? _formValues : isUndefined(defaultValue) ? _defaultValues : isString(names) ? { [names]: defaultValue } : defaultValue
|
|
1129
|
+
}, isGlobal, defaultValue);
|
|
1130
|
+
const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name, _options.shouldUnregister ? get(_defaultValues, name, []) : []));
|
|
1131
|
+
const setFieldValue = (name, value, options = {}) => {
|
|
1132
|
+
const field = get(_fields, name);
|
|
1133
|
+
let fieldValue = value;
|
|
1134
|
+
if (field) {
|
|
1135
|
+
const fieldReference = field._f;
|
|
1136
|
+
if (fieldReference) {
|
|
1137
|
+
!fieldReference.disabled && set(_formValues, name, getFieldValueAs(value, fieldReference));
|
|
1138
|
+
fieldValue = isHTMLElement(fieldReference.ref) && isNullOrUndefined(value) ? "" : value;
|
|
1139
|
+
if (isMultipleSelect(fieldReference.ref)) {
|
|
1140
|
+
[...fieldReference.ref.options].forEach((optionRef) => optionRef.selected = fieldValue.includes(optionRef.value));
|
|
1141
|
+
} else if (fieldReference.refs) {
|
|
1142
|
+
if (isCheckBoxInput(fieldReference.ref)) {
|
|
1143
|
+
fieldReference.refs.forEach((checkboxRef) => {
|
|
1144
|
+
if (!checkboxRef.defaultChecked || !checkboxRef.disabled) {
|
|
1145
|
+
if (Array.isArray(fieldValue)) {
|
|
1146
|
+
checkboxRef.checked = !!fieldValue.find((data) => data === checkboxRef.value);
|
|
1147
|
+
} else {
|
|
1148
|
+
checkboxRef.checked = fieldValue === checkboxRef.value || !!fieldValue;
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
});
|
|
1152
|
+
} else {
|
|
1153
|
+
fieldReference.refs.forEach((radioRef) => radioRef.checked = radioRef.value === fieldValue);
|
|
1154
|
+
}
|
|
1155
|
+
} else if (isFileInput(fieldReference.ref)) {
|
|
1156
|
+
fieldReference.ref.value = "";
|
|
1157
|
+
} else {
|
|
1158
|
+
fieldReference.ref.value = fieldValue;
|
|
1159
|
+
if (!fieldReference.ref.type) {
|
|
1160
|
+
_subjects.state.next({
|
|
1161
|
+
name,
|
|
1162
|
+
values: cloneObject(_formValues)
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
(options.shouldDirty || options.shouldTouch) && updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, true);
|
|
1169
|
+
options.shouldValidate && trigger(name);
|
|
1170
|
+
};
|
|
1171
|
+
const setValues = (name, value, options) => {
|
|
1172
|
+
for (const fieldKey in value) {
|
|
1173
|
+
if (!value.hasOwnProperty(fieldKey)) {
|
|
1174
|
+
return;
|
|
1175
|
+
}
|
|
1176
|
+
const fieldValue = value[fieldKey];
|
|
1177
|
+
const fieldName = name + "." + fieldKey;
|
|
1178
|
+
const field = get(_fields, fieldName);
|
|
1179
|
+
(_names.array.has(name) || isObject(fieldValue) || field && !field._f) && !isDateObject(fieldValue) ? setValues(fieldName, fieldValue, options) : setFieldValue(fieldName, fieldValue, options);
|
|
1180
|
+
}
|
|
1181
|
+
};
|
|
1182
|
+
const setValue = (name, value, options = {}) => {
|
|
1183
|
+
const field = get(_fields, name);
|
|
1184
|
+
const isFieldArray = _names.array.has(name);
|
|
1185
|
+
const cloneValue = cloneObject(value);
|
|
1186
|
+
set(_formValues, name, cloneValue);
|
|
1187
|
+
if (isFieldArray) {
|
|
1188
|
+
_subjects.array.next({
|
|
1189
|
+
name,
|
|
1190
|
+
values: cloneObject(_formValues)
|
|
1191
|
+
});
|
|
1192
|
+
if ((_proxyFormState.isDirty || _proxyFormState.dirtyFields || _proxySubscribeFormState.isDirty || _proxySubscribeFormState.dirtyFields) && options.shouldDirty) {
|
|
1193
|
+
_subjects.state.next({
|
|
1194
|
+
name,
|
|
1195
|
+
dirtyFields: getDirtyFields(_defaultValues, _formValues),
|
|
1196
|
+
isDirty: _getDirty(name, cloneValue)
|
|
1197
|
+
});
|
|
1198
|
+
}
|
|
1199
|
+
} else {
|
|
1200
|
+
field && !field._f && !isNullOrUndefined(cloneValue) ? setValues(name, cloneValue, options) : setFieldValue(name, cloneValue, options);
|
|
1201
|
+
}
|
|
1202
|
+
if (isWatched(name, _names)) {
|
|
1203
|
+
_subjects.state.next({
|
|
1204
|
+
..._formState,
|
|
1205
|
+
name,
|
|
1206
|
+
values: cloneObject(_formValues)
|
|
1207
|
+
});
|
|
1208
|
+
} else {
|
|
1209
|
+
_subjects.state.next({
|
|
1210
|
+
name: _state.mount ? name : void 0,
|
|
1211
|
+
values: cloneObject(_formValues)
|
|
1212
|
+
});
|
|
1213
|
+
}
|
|
1214
|
+
};
|
|
1215
|
+
const onChange = async (event) => {
|
|
1216
|
+
_state.mount = true;
|
|
1217
|
+
const target = event.target;
|
|
1218
|
+
let name = target.name;
|
|
1219
|
+
let isFieldValueUpdated = true;
|
|
1220
|
+
const field = get(_fields, name);
|
|
1221
|
+
const _updateIsFieldValueUpdated = (fieldValue) => {
|
|
1222
|
+
isFieldValueUpdated = Number.isNaN(fieldValue) || isDateObject(fieldValue) && isNaN(fieldValue.getTime()) || deepEqual(fieldValue, get(_formValues, name, fieldValue));
|
|
1223
|
+
};
|
|
1224
|
+
const validationModeBeforeSubmit = getValidationModes(_options.mode);
|
|
1225
|
+
const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);
|
|
1226
|
+
if (field) {
|
|
1227
|
+
let error;
|
|
1228
|
+
let isValid;
|
|
1229
|
+
const fieldValue = target.type ? getFieldValue(field._f) : getEventValue(event);
|
|
1230
|
+
const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;
|
|
1231
|
+
const shouldSkipValidation = !hasValidation(field._f) && !_options.resolver && !get(_formState.errors, name) && !field._f.deps || skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, validationModeAfterSubmit, validationModeBeforeSubmit);
|
|
1232
|
+
const watched = isWatched(name, _names, isBlurEvent);
|
|
1233
|
+
set(_formValues, name, fieldValue);
|
|
1234
|
+
if (isBlurEvent) {
|
|
1235
|
+
if (!target || !target.readOnly) {
|
|
1236
|
+
field._f.onBlur && field._f.onBlur(event);
|
|
1237
|
+
delayErrorCallback && delayErrorCallback(0);
|
|
1238
|
+
}
|
|
1239
|
+
} else if (field._f.onChange) {
|
|
1240
|
+
field._f.onChange(event);
|
|
1241
|
+
}
|
|
1242
|
+
const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent);
|
|
1243
|
+
const shouldRender = !isEmptyObject(fieldState) || watched;
|
|
1244
|
+
!isBlurEvent && _subjects.state.next({
|
|
1245
|
+
name,
|
|
1246
|
+
type: event.type,
|
|
1247
|
+
values: cloneObject(_formValues)
|
|
1248
|
+
});
|
|
1249
|
+
if (shouldSkipValidation) {
|
|
1250
|
+
if (_proxyFormState.isValid || _proxySubscribeFormState.isValid) {
|
|
1251
|
+
if (_options.mode === "onBlur") {
|
|
1252
|
+
if (isBlurEvent) {
|
|
1253
|
+
_setValid();
|
|
1254
|
+
}
|
|
1255
|
+
} else if (!isBlurEvent) {
|
|
1256
|
+
_setValid();
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
return shouldRender && _subjects.state.next({ name, ...watched ? {} : fieldState });
|
|
1260
|
+
}
|
|
1261
|
+
!isBlurEvent && watched && _subjects.state.next({ ..._formState });
|
|
1262
|
+
if (_options.resolver) {
|
|
1263
|
+
const { errors } = await _runSchema([name]);
|
|
1264
|
+
_updateIsValidating([name]);
|
|
1265
|
+
_updateIsFieldValueUpdated(fieldValue);
|
|
1266
|
+
if (isFieldValueUpdated) {
|
|
1267
|
+
const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);
|
|
1268
|
+
const errorLookupResult = schemaErrorLookup(errors, _fields, previousErrorLookupResult.name || name);
|
|
1269
|
+
error = errorLookupResult.error;
|
|
1270
|
+
name = errorLookupResult.name;
|
|
1271
|
+
isValid = isEmptyObject(errors);
|
|
1272
|
+
}
|
|
1273
|
+
} else {
|
|
1274
|
+
_updateIsValidating([name], true);
|
|
1275
|
+
error = (await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];
|
|
1276
|
+
_updateIsValidating([name]);
|
|
1277
|
+
_updateIsFieldValueUpdated(fieldValue);
|
|
1278
|
+
if (isFieldValueUpdated) {
|
|
1279
|
+
if (error) {
|
|
1280
|
+
isValid = false;
|
|
1281
|
+
} else if (_proxyFormState.isValid || _proxySubscribeFormState.isValid) {
|
|
1282
|
+
isValid = await executeBuiltInValidation(_fields, true);
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
if (isFieldValueUpdated) {
|
|
1287
|
+
field._f.deps && (!Array.isArray(field._f.deps) || field._f.deps.length > 0) && trigger(field._f.deps);
|
|
1288
|
+
shouldRenderByError(name, isValid, error, fieldState);
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
};
|
|
1292
|
+
const _focusInput = (ref, key) => {
|
|
1293
|
+
if (get(_formState.errors, key) && ref.focus) {
|
|
1294
|
+
ref.focus();
|
|
1295
|
+
return 1;
|
|
1296
|
+
}
|
|
1297
|
+
return;
|
|
1298
|
+
};
|
|
1299
|
+
const trigger = async (name, options = {}) => {
|
|
1300
|
+
let isValid;
|
|
1301
|
+
let validationResult;
|
|
1302
|
+
const fieldNames = convertToArrayPayload(name);
|
|
1303
|
+
if (_options.resolver) {
|
|
1304
|
+
const errors = await executeSchemaAndUpdateState(isUndefined(name) ? name : fieldNames);
|
|
1305
|
+
isValid = isEmptyObject(errors);
|
|
1306
|
+
validationResult = name ? !fieldNames.some((name2) => get(errors, name2)) : isValid;
|
|
1307
|
+
} else if (name) {
|
|
1308
|
+
validationResult = (await Promise.all(fieldNames.map(async (fieldName) => {
|
|
1309
|
+
const field = get(_fields, fieldName);
|
|
1310
|
+
return await executeBuiltInValidation(field && field._f ? { [fieldName]: field } : field);
|
|
1311
|
+
}))).every(Boolean);
|
|
1312
|
+
!(!validationResult && !_formState.isValid) && _setValid();
|
|
1313
|
+
} else {
|
|
1314
|
+
validationResult = isValid = await executeBuiltInValidation(_fields);
|
|
1315
|
+
}
|
|
1316
|
+
_subjects.state.next({
|
|
1317
|
+
...!isString(name) || (_proxyFormState.isValid || _proxySubscribeFormState.isValid) && isValid !== _formState.isValid ? {} : { name },
|
|
1318
|
+
..._options.resolver || !name ? { isValid } : {},
|
|
1319
|
+
errors: _formState.errors
|
|
1320
|
+
});
|
|
1321
|
+
options.shouldFocus && !validationResult && iterateFieldsByAction(_fields, _focusInput, name ? fieldNames : _names.mount);
|
|
1322
|
+
return validationResult;
|
|
1323
|
+
};
|
|
1324
|
+
const getValues = (fieldNames, config) => {
|
|
1325
|
+
let values = {
|
|
1326
|
+
..._state.mount ? _formValues : _defaultValues
|
|
1327
|
+
};
|
|
1328
|
+
if (config) {
|
|
1329
|
+
values = extractFormValues(config.dirtyFields ? _formState.dirtyFields : _formState.touchedFields, values);
|
|
1330
|
+
}
|
|
1331
|
+
return isUndefined(fieldNames) ? values : isString(fieldNames) ? get(values, fieldNames) : fieldNames.map((name) => get(values, name));
|
|
1332
|
+
};
|
|
1333
|
+
const getFieldState = (name, formState) => ({
|
|
1334
|
+
invalid: !!get((formState || _formState).errors, name),
|
|
1335
|
+
isDirty: !!get((formState || _formState).dirtyFields, name),
|
|
1336
|
+
error: get((formState || _formState).errors, name),
|
|
1337
|
+
isValidating: !!get(_formState.validatingFields, name),
|
|
1338
|
+
isTouched: !!get((formState || _formState).touchedFields, name)
|
|
1339
|
+
});
|
|
1340
|
+
const clearErrors = (name) => {
|
|
1341
|
+
const names = name ? convertToArrayPayload(name) : void 0;
|
|
1342
|
+
names === null || names === void 0 ? void 0 : names.forEach((inputName) => unset(_formState.errors, inputName));
|
|
1343
|
+
if (names) {
|
|
1344
|
+
names.forEach((inputName) => {
|
|
1345
|
+
_subjects.state.next({
|
|
1346
|
+
name: inputName,
|
|
1347
|
+
errors: _formState.errors
|
|
1348
|
+
});
|
|
1349
|
+
});
|
|
1350
|
+
} else {
|
|
1351
|
+
_subjects.state.next({
|
|
1352
|
+
errors: {}
|
|
1353
|
+
});
|
|
1354
|
+
}
|
|
1355
|
+
};
|
|
1356
|
+
const setError = (name, error, options) => {
|
|
1357
|
+
const ref = (get(_fields, name, { _f: {} })._f || {}).ref;
|
|
1358
|
+
const currentError = get(_formState.errors, name) || {};
|
|
1359
|
+
const { ref: currentRef, message, type, ...restOfErrorTree } = currentError;
|
|
1360
|
+
set(_formState.errors, name, {
|
|
1361
|
+
...restOfErrorTree,
|
|
1362
|
+
...error,
|
|
1363
|
+
ref
|
|
1364
|
+
});
|
|
1365
|
+
_subjects.state.next({
|
|
1366
|
+
name,
|
|
1367
|
+
errors: _formState.errors,
|
|
1368
|
+
isValid: false
|
|
1369
|
+
});
|
|
1370
|
+
options && options.shouldFocus && ref && ref.focus && ref.focus();
|
|
1371
|
+
};
|
|
1372
|
+
const watch = (name, defaultValue) => isFunction(name) ? _subjects.state.subscribe({
|
|
1373
|
+
next: (payload) => "values" in payload && name(_getWatch(void 0, defaultValue), payload)
|
|
1374
|
+
}) : _getWatch(name, defaultValue, true);
|
|
1375
|
+
const _subscribe = (props2) => _subjects.state.subscribe({
|
|
1376
|
+
next: (formState) => {
|
|
1377
|
+
if (shouldSubscribeByName(props2.name, formState.name, props2.exact) && shouldRenderFormState(formState, props2.formState || _proxyFormState, _setFormState, props2.reRenderRoot)) {
|
|
1378
|
+
props2.callback({
|
|
1379
|
+
values: { ..._formValues },
|
|
1380
|
+
..._formState,
|
|
1381
|
+
...formState,
|
|
1382
|
+
defaultValues: _defaultValues
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
}).unsubscribe;
|
|
1387
|
+
const subscribe = (props2) => {
|
|
1388
|
+
_state.mount = true;
|
|
1389
|
+
_proxySubscribeFormState = {
|
|
1390
|
+
..._proxySubscribeFormState,
|
|
1391
|
+
...props2.formState
|
|
1392
|
+
};
|
|
1393
|
+
return _subscribe({
|
|
1394
|
+
...props2,
|
|
1395
|
+
formState: {
|
|
1396
|
+
...defaultProxyFormState,
|
|
1397
|
+
...props2.formState
|
|
1398
|
+
}
|
|
1399
|
+
});
|
|
1400
|
+
};
|
|
1401
|
+
const unregister = (name, options = {}) => {
|
|
1402
|
+
for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {
|
|
1403
|
+
_names.mount.delete(fieldName);
|
|
1404
|
+
_names.array.delete(fieldName);
|
|
1405
|
+
if (!options.keepValue) {
|
|
1406
|
+
unset(_fields, fieldName);
|
|
1407
|
+
unset(_formValues, fieldName);
|
|
1408
|
+
}
|
|
1409
|
+
!options.keepError && unset(_formState.errors, fieldName);
|
|
1410
|
+
!options.keepDirty && unset(_formState.dirtyFields, fieldName);
|
|
1411
|
+
!options.keepTouched && unset(_formState.touchedFields, fieldName);
|
|
1412
|
+
!options.keepIsValidating && unset(_formState.validatingFields, fieldName);
|
|
1413
|
+
!_options.shouldUnregister && !options.keepDefaultValue && unset(_defaultValues, fieldName);
|
|
1414
|
+
}
|
|
1415
|
+
_subjects.state.next({
|
|
1416
|
+
values: cloneObject(_formValues)
|
|
1417
|
+
});
|
|
1418
|
+
_subjects.state.next({
|
|
1419
|
+
..._formState,
|
|
1420
|
+
...!options.keepDirty ? {} : { isDirty: _getDirty() }
|
|
1421
|
+
});
|
|
1422
|
+
!options.keepIsValid && _setValid();
|
|
1423
|
+
};
|
|
1424
|
+
const _setDisabledField = ({ disabled, name }) => {
|
|
1425
|
+
if (isBoolean(disabled) && _state.mount || !!disabled || _names.disabled.has(name)) {
|
|
1426
|
+
const wasDisabled = _names.disabled.has(name);
|
|
1427
|
+
const isDisabled = !!disabled;
|
|
1428
|
+
const disabledStateChanged = wasDisabled !== isDisabled;
|
|
1429
|
+
disabled ? _names.disabled.add(name) : _names.disabled.delete(name);
|
|
1430
|
+
disabledStateChanged && _state.mount && !_state.action && _setValid();
|
|
1431
|
+
}
|
|
1432
|
+
};
|
|
1433
|
+
const register = (name, options = {}) => {
|
|
1434
|
+
let field = get(_fields, name);
|
|
1435
|
+
const disabledIsDefined = isBoolean(options.disabled) || isBoolean(_options.disabled);
|
|
1436
|
+
set(_fields, name, {
|
|
1437
|
+
...field || {},
|
|
1438
|
+
_f: {
|
|
1439
|
+
...field && field._f ? field._f : { ref: { name } },
|
|
1440
|
+
name,
|
|
1441
|
+
mount: true,
|
|
1442
|
+
...options
|
|
1443
|
+
}
|
|
1444
|
+
});
|
|
1445
|
+
_names.mount.add(name);
|
|
1446
|
+
if (field) {
|
|
1447
|
+
_setDisabledField({
|
|
1448
|
+
disabled: isBoolean(options.disabled) ? options.disabled : _options.disabled,
|
|
1449
|
+
name
|
|
1450
|
+
});
|
|
1451
|
+
} else {
|
|
1452
|
+
updateValidAndValue(name, true, options.value);
|
|
1453
|
+
}
|
|
1454
|
+
return {
|
|
1455
|
+
...disabledIsDefined ? { disabled: options.disabled || _options.disabled } : {},
|
|
1456
|
+
..._options.progressive ? {
|
|
1457
|
+
required: !!options.required,
|
|
1458
|
+
min: getRuleValue(options.min),
|
|
1459
|
+
max: getRuleValue(options.max),
|
|
1460
|
+
minLength: getRuleValue(options.minLength),
|
|
1461
|
+
maxLength: getRuleValue(options.maxLength),
|
|
1462
|
+
pattern: getRuleValue(options.pattern)
|
|
1463
|
+
} : {},
|
|
1464
|
+
name,
|
|
1465
|
+
onChange,
|
|
1466
|
+
onBlur: onChange,
|
|
1467
|
+
ref: (ref) => {
|
|
1468
|
+
if (ref) {
|
|
1469
|
+
register(name, options);
|
|
1470
|
+
field = get(_fields, name);
|
|
1471
|
+
const fieldRef = isUndefined(ref.value) ? ref.querySelectorAll ? ref.querySelectorAll("input,select,textarea")[0] || ref : ref : ref;
|
|
1472
|
+
const radioOrCheckbox = isRadioOrCheckbox(fieldRef);
|
|
1473
|
+
const refs = field._f.refs || [];
|
|
1474
|
+
if (radioOrCheckbox ? refs.find((option) => option === fieldRef) : fieldRef === field._f.ref) {
|
|
1475
|
+
return;
|
|
1476
|
+
}
|
|
1477
|
+
set(_fields, name, {
|
|
1478
|
+
_f: {
|
|
1479
|
+
...field._f,
|
|
1480
|
+
...radioOrCheckbox ? {
|
|
1481
|
+
refs: [
|
|
1482
|
+
...refs.filter(live),
|
|
1483
|
+
fieldRef,
|
|
1484
|
+
...Array.isArray(get(_defaultValues, name)) ? [{}] : []
|
|
1485
|
+
],
|
|
1486
|
+
ref: { type: fieldRef.type, name }
|
|
1487
|
+
} : { ref: fieldRef }
|
|
1488
|
+
}
|
|
1489
|
+
});
|
|
1490
|
+
updateValidAndValue(name, false, void 0, fieldRef);
|
|
1491
|
+
} else {
|
|
1492
|
+
field = get(_fields, name, {});
|
|
1493
|
+
if (field._f) {
|
|
1494
|
+
field._f.mount = false;
|
|
1495
|
+
}
|
|
1496
|
+
(_options.shouldUnregister || options.shouldUnregister) && !(isNameInFieldArray(_names.array, name) && _state.action) && _names.unMount.add(name);
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
};
|
|
1500
|
+
};
|
|
1501
|
+
const _focusError = () => _options.shouldFocusError && iterateFieldsByAction(_fields, _focusInput, _names.mount);
|
|
1502
|
+
const _disableForm = (disabled) => {
|
|
1503
|
+
if (isBoolean(disabled)) {
|
|
1504
|
+
_subjects.state.next({ disabled });
|
|
1505
|
+
iterateFieldsByAction(_fields, (ref, name) => {
|
|
1506
|
+
const currentField = get(_fields, name);
|
|
1507
|
+
if (currentField) {
|
|
1508
|
+
ref.disabled = currentField._f.disabled || disabled;
|
|
1509
|
+
if (Array.isArray(currentField._f.refs)) {
|
|
1510
|
+
currentField._f.refs.forEach((inputRef) => {
|
|
1511
|
+
inputRef.disabled = currentField._f.disabled || disabled;
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
}, 0, false);
|
|
1516
|
+
}
|
|
1517
|
+
};
|
|
1518
|
+
const handleSubmit = (onValid, onInvalid) => async (e) => {
|
|
1519
|
+
let onValidError = void 0;
|
|
1520
|
+
if (e) {
|
|
1521
|
+
e.preventDefault && e.preventDefault();
|
|
1522
|
+
e.persist && e.persist();
|
|
1523
|
+
}
|
|
1524
|
+
let fieldValues = cloneObject(_formValues);
|
|
1525
|
+
_subjects.state.next({
|
|
1526
|
+
isSubmitting: true
|
|
1527
|
+
});
|
|
1528
|
+
if (_options.resolver) {
|
|
1529
|
+
const { errors, values } = await _runSchema();
|
|
1530
|
+
_updateIsValidating();
|
|
1531
|
+
_formState.errors = errors;
|
|
1532
|
+
fieldValues = cloneObject(values);
|
|
1533
|
+
} else {
|
|
1534
|
+
await executeBuiltInValidation(_fields);
|
|
1535
|
+
}
|
|
1536
|
+
if (_names.disabled.size) {
|
|
1537
|
+
for (const name of _names.disabled) {
|
|
1538
|
+
unset(fieldValues, name);
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
unset(_formState.errors, "root");
|
|
1542
|
+
if (isEmptyObject(_formState.errors)) {
|
|
1543
|
+
_subjects.state.next({
|
|
1544
|
+
errors: {}
|
|
1545
|
+
});
|
|
1546
|
+
try {
|
|
1547
|
+
await onValid(fieldValues, e);
|
|
1548
|
+
} catch (error) {
|
|
1549
|
+
onValidError = error;
|
|
1550
|
+
}
|
|
1551
|
+
} else {
|
|
1552
|
+
if (onInvalid) {
|
|
1553
|
+
await onInvalid({ ..._formState.errors }, e);
|
|
1554
|
+
}
|
|
1555
|
+
_focusError();
|
|
1556
|
+
setTimeout(_focusError);
|
|
1557
|
+
}
|
|
1558
|
+
_subjects.state.next({
|
|
1559
|
+
isSubmitted: true,
|
|
1560
|
+
isSubmitting: false,
|
|
1561
|
+
isSubmitSuccessful: isEmptyObject(_formState.errors) && !onValidError,
|
|
1562
|
+
submitCount: _formState.submitCount + 1,
|
|
1563
|
+
errors: _formState.errors
|
|
1564
|
+
});
|
|
1565
|
+
if (onValidError) {
|
|
1566
|
+
throw onValidError;
|
|
1567
|
+
}
|
|
1568
|
+
};
|
|
1569
|
+
const resetField = (name, options = {}) => {
|
|
1570
|
+
if (get(_fields, name)) {
|
|
1571
|
+
if (isUndefined(options.defaultValue)) {
|
|
1572
|
+
setValue(name, cloneObject(get(_defaultValues, name)));
|
|
1573
|
+
} else {
|
|
1574
|
+
setValue(name, options.defaultValue);
|
|
1575
|
+
set(_defaultValues, name, cloneObject(options.defaultValue));
|
|
1576
|
+
}
|
|
1577
|
+
if (!options.keepTouched) {
|
|
1578
|
+
unset(_formState.touchedFields, name);
|
|
1579
|
+
}
|
|
1580
|
+
if (!options.keepDirty) {
|
|
1581
|
+
unset(_formState.dirtyFields, name);
|
|
1582
|
+
_formState.isDirty = options.defaultValue ? _getDirty(name, cloneObject(get(_defaultValues, name))) : _getDirty();
|
|
1583
|
+
}
|
|
1584
|
+
if (!options.keepError) {
|
|
1585
|
+
unset(_formState.errors, name);
|
|
1586
|
+
_proxyFormState.isValid && _setValid();
|
|
1587
|
+
}
|
|
1588
|
+
_subjects.state.next({ ..._formState });
|
|
1589
|
+
}
|
|
1590
|
+
};
|
|
1591
|
+
const _reset = (formValues, keepStateOptions = {}) => {
|
|
1592
|
+
const updatedValues = formValues ? cloneObject(formValues) : _defaultValues;
|
|
1593
|
+
const cloneUpdatedValues = cloneObject(updatedValues);
|
|
1594
|
+
const isEmptyResetValues = isEmptyObject(formValues);
|
|
1595
|
+
const values = isEmptyResetValues ? _defaultValues : cloneUpdatedValues;
|
|
1596
|
+
if (!keepStateOptions.keepDefaultValues) {
|
|
1597
|
+
_defaultValues = updatedValues;
|
|
1598
|
+
}
|
|
1599
|
+
if (!keepStateOptions.keepValues) {
|
|
1600
|
+
if (keepStateOptions.keepDirtyValues) {
|
|
1601
|
+
const fieldsToCheck = /* @__PURE__ */ new Set([
|
|
1602
|
+
..._names.mount,
|
|
1603
|
+
...Object.keys(getDirtyFields(_defaultValues, _formValues))
|
|
1604
|
+
]);
|
|
1605
|
+
for (const fieldName of Array.from(fieldsToCheck)) {
|
|
1606
|
+
const isDirty = get(_formState.dirtyFields, fieldName);
|
|
1607
|
+
const existingValue = get(_formValues, fieldName);
|
|
1608
|
+
const newValue = get(values, fieldName);
|
|
1609
|
+
if (isDirty && !isUndefined(existingValue)) {
|
|
1610
|
+
set(values, fieldName, existingValue);
|
|
1611
|
+
} else if (!isDirty && !isUndefined(newValue)) {
|
|
1612
|
+
setValue(fieldName, newValue);
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
} else {
|
|
1616
|
+
if (isWeb && isUndefined(formValues)) {
|
|
1617
|
+
for (const name of _names.mount) {
|
|
1618
|
+
const field = get(_fields, name);
|
|
1619
|
+
if (field && field._f) {
|
|
1620
|
+
const fieldReference = Array.isArray(field._f.refs) ? field._f.refs[0] : field._f.ref;
|
|
1621
|
+
if (isHTMLElement(fieldReference)) {
|
|
1622
|
+
const form = fieldReference.closest("form");
|
|
1623
|
+
if (form) {
|
|
1624
|
+
form.reset();
|
|
1625
|
+
break;
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
if (keepStateOptions.keepFieldsRef) {
|
|
1632
|
+
for (const fieldName of _names.mount) {
|
|
1633
|
+
setValue(fieldName, get(values, fieldName));
|
|
1634
|
+
}
|
|
1635
|
+
} else {
|
|
1636
|
+
_fields = {};
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
_formValues = _options.shouldUnregister ? keepStateOptions.keepDefaultValues ? cloneObject(_defaultValues) : {} : cloneObject(values);
|
|
1640
|
+
_subjects.array.next({
|
|
1641
|
+
values: { ...values }
|
|
1642
|
+
});
|
|
1643
|
+
_subjects.state.next({
|
|
1644
|
+
values: { ...values }
|
|
1645
|
+
});
|
|
1646
|
+
}
|
|
1647
|
+
_names = {
|
|
1648
|
+
mount: keepStateOptions.keepDirtyValues ? _names.mount : /* @__PURE__ */ new Set(),
|
|
1649
|
+
unMount: /* @__PURE__ */ new Set(),
|
|
1650
|
+
array: /* @__PURE__ */ new Set(),
|
|
1651
|
+
disabled: /* @__PURE__ */ new Set(),
|
|
1652
|
+
watch: /* @__PURE__ */ new Set(),
|
|
1653
|
+
watchAll: false,
|
|
1654
|
+
focus: ""
|
|
1655
|
+
};
|
|
1656
|
+
_state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues || !_options.shouldUnregister && !isEmptyObject(values);
|
|
1657
|
+
_state.watch = !!_options.shouldUnregister;
|
|
1658
|
+
_state.keepIsValid = !!keepStateOptions.keepIsValid;
|
|
1659
|
+
_state.action = false;
|
|
1660
|
+
if (!keepStateOptions.keepErrors) {
|
|
1661
|
+
_formState.errors = {};
|
|
1662
|
+
}
|
|
1663
|
+
_subjects.state.next({
|
|
1664
|
+
submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0,
|
|
1665
|
+
isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual(formValues, _defaultValues)),
|
|
1666
|
+
isSubmitted: keepStateOptions.keepIsSubmitted ? _formState.isSubmitted : false,
|
|
1667
|
+
dirtyFields: isEmptyResetValues ? {} : keepStateOptions.keepDirtyValues ? keepStateOptions.keepDefaultValues && _formValues ? getDirtyFields(_defaultValues, _formValues) : _formState.dirtyFields : keepStateOptions.keepDefaultValues && formValues ? getDirtyFields(_defaultValues, formValues) : keepStateOptions.keepDirty ? _formState.dirtyFields : {},
|
|
1668
|
+
touchedFields: keepStateOptions.keepTouched ? _formState.touchedFields : {},
|
|
1669
|
+
errors: keepStateOptions.keepErrors ? _formState.errors : {},
|
|
1670
|
+
isSubmitSuccessful: keepStateOptions.keepIsSubmitSuccessful ? _formState.isSubmitSuccessful : false,
|
|
1671
|
+
isSubmitting: false,
|
|
1672
|
+
defaultValues: _defaultValues
|
|
1673
|
+
});
|
|
1674
|
+
};
|
|
1675
|
+
const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues) ? formValues(_formValues) : formValues, { ..._options.resetOptions, ...keepStateOptions });
|
|
1676
|
+
const setFocus = (name, options = {}) => {
|
|
1677
|
+
const field = get(_fields, name);
|
|
1678
|
+
const fieldReference = field && field._f;
|
|
1679
|
+
if (fieldReference) {
|
|
1680
|
+
const fieldRef = fieldReference.refs ? fieldReference.refs[0] : fieldReference.ref;
|
|
1681
|
+
if (fieldRef.focus) {
|
|
1682
|
+
setTimeout(() => {
|
|
1683
|
+
fieldRef.focus();
|
|
1684
|
+
options.shouldSelect && isFunction(fieldRef.select) && fieldRef.select();
|
|
1685
|
+
});
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
};
|
|
1689
|
+
const _setFormState = (updatedFormState) => {
|
|
1690
|
+
_formState = {
|
|
1691
|
+
..._formState,
|
|
1692
|
+
...updatedFormState
|
|
1693
|
+
};
|
|
1694
|
+
};
|
|
1695
|
+
const _resetDefaultValues = () => isFunction(_options.defaultValues) && _options.defaultValues().then((values) => {
|
|
1696
|
+
reset(values, _options.resetOptions);
|
|
1697
|
+
_subjects.state.next({
|
|
1698
|
+
isLoading: false
|
|
1699
|
+
});
|
|
1700
|
+
});
|
|
1701
|
+
const methods = {
|
|
1702
|
+
control: {
|
|
1703
|
+
register,
|
|
1704
|
+
unregister,
|
|
1705
|
+
getFieldState,
|
|
1706
|
+
handleSubmit,
|
|
1707
|
+
setError,
|
|
1708
|
+
_subscribe,
|
|
1709
|
+
_runSchema,
|
|
1710
|
+
_updateIsValidating,
|
|
1711
|
+
_focusError,
|
|
1712
|
+
_getWatch,
|
|
1713
|
+
_getDirty,
|
|
1714
|
+
_setValid,
|
|
1715
|
+
_setFieldArray,
|
|
1716
|
+
_setDisabledField,
|
|
1717
|
+
_setErrors,
|
|
1718
|
+
_getFieldArray,
|
|
1719
|
+
_reset,
|
|
1720
|
+
_resetDefaultValues,
|
|
1721
|
+
_removeUnmounted,
|
|
1722
|
+
_disableForm,
|
|
1723
|
+
_subjects,
|
|
1724
|
+
_proxyFormState,
|
|
1725
|
+
get _fields() {
|
|
1726
|
+
return _fields;
|
|
1727
|
+
},
|
|
1728
|
+
get _formValues() {
|
|
1729
|
+
return _formValues;
|
|
1730
|
+
},
|
|
1731
|
+
get _state() {
|
|
1732
|
+
return _state;
|
|
1733
|
+
},
|
|
1734
|
+
set _state(value) {
|
|
1735
|
+
_state = value;
|
|
1736
|
+
},
|
|
1737
|
+
get _defaultValues() {
|
|
1738
|
+
return _defaultValues;
|
|
1739
|
+
},
|
|
1740
|
+
get _names() {
|
|
1741
|
+
return _names;
|
|
1742
|
+
},
|
|
1743
|
+
set _names(value) {
|
|
1744
|
+
_names = value;
|
|
1745
|
+
},
|
|
1746
|
+
get _formState() {
|
|
1747
|
+
return _formState;
|
|
1748
|
+
},
|
|
1749
|
+
get _options() {
|
|
1750
|
+
return _options;
|
|
1751
|
+
},
|
|
1752
|
+
set _options(value) {
|
|
1753
|
+
_options = {
|
|
1754
|
+
..._options,
|
|
1755
|
+
...value
|
|
1756
|
+
};
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
subscribe,
|
|
1760
|
+
trigger,
|
|
1761
|
+
register,
|
|
1762
|
+
handleSubmit,
|
|
1763
|
+
watch,
|
|
1764
|
+
setValue,
|
|
1765
|
+
getValues,
|
|
1766
|
+
reset,
|
|
1767
|
+
resetField,
|
|
1768
|
+
clearErrors,
|
|
1769
|
+
unregister,
|
|
1770
|
+
setError,
|
|
1771
|
+
setFocus,
|
|
1772
|
+
getFieldState
|
|
1773
|
+
};
|
|
1774
|
+
return {
|
|
1775
|
+
...methods,
|
|
1776
|
+
formControl: methods
|
|
1777
|
+
};
|
|
1778
|
+
}
|
|
1779
|
+
var generateId = () => {
|
|
1780
|
+
if (typeof crypto !== "undefined" && crypto.randomUUID) {
|
|
1781
|
+
return crypto.randomUUID();
|
|
1782
|
+
}
|
|
1783
|
+
const d = typeof performance === "undefined" ? Date.now() : performance.now() * 1e3;
|
|
1784
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
1785
|
+
const r = (Math.random() * 16 + d) % 16 | 0;
|
|
1786
|
+
return (c == "x" ? r : r & 3 | 8).toString(16);
|
|
1787
|
+
});
|
|
1788
|
+
};
|
|
1789
|
+
var getFocusFieldName = (name, index, options = {}) => options.shouldFocus || isUndefined(options.shouldFocus) ? options.focusName || `${name}.${isUndefined(options.focusIndex) ? index : options.focusIndex}.` : "";
|
|
1790
|
+
var appendAt = (data, value) => [
|
|
1791
|
+
...data,
|
|
1792
|
+
...convertToArrayPayload(value)
|
|
1793
|
+
];
|
|
1794
|
+
var fillEmptyArray = (value) => Array.isArray(value) ? value.map(() => void 0) : void 0;
|
|
1795
|
+
function insert(data, index, value) {
|
|
1796
|
+
return [
|
|
1797
|
+
...data.slice(0, index),
|
|
1798
|
+
...convertToArrayPayload(value),
|
|
1799
|
+
...data.slice(index)
|
|
1800
|
+
];
|
|
1801
|
+
}
|
|
1802
|
+
var moveArrayAt = (data, from, to) => {
|
|
1803
|
+
if (!Array.isArray(data)) {
|
|
1804
|
+
return [];
|
|
1805
|
+
}
|
|
1806
|
+
if (isUndefined(data[to])) {
|
|
1807
|
+
data[to] = void 0;
|
|
1808
|
+
}
|
|
1809
|
+
data.splice(to, 0, data.splice(from, 1)[0]);
|
|
1810
|
+
return data;
|
|
1811
|
+
};
|
|
1812
|
+
var prependAt = (data, value) => [
|
|
1813
|
+
...convertToArrayPayload(value),
|
|
1814
|
+
...convertToArrayPayload(data)
|
|
1815
|
+
];
|
|
1816
|
+
function removeAtIndexes(data, indexes) {
|
|
1817
|
+
let i = 0;
|
|
1818
|
+
const temp = [...data];
|
|
1819
|
+
for (const index of indexes) {
|
|
1820
|
+
temp.splice(index - i, 1);
|
|
1821
|
+
i++;
|
|
1822
|
+
}
|
|
1823
|
+
return compact(temp).length ? temp : [];
|
|
1824
|
+
}
|
|
1825
|
+
var removeArrayAt = (data, index) => isUndefined(index) ? [] : removeAtIndexes(data, convertToArrayPayload(index).sort((a, b) => a - b));
|
|
1826
|
+
var swapArrayAt = (data, indexA, indexB) => {
|
|
1827
|
+
[data[indexA], data[indexB]] = [data[indexB], data[indexA]];
|
|
1828
|
+
};
|
|
1829
|
+
var updateAt = (fieldValues, index, value) => {
|
|
1830
|
+
fieldValues[index] = value;
|
|
1831
|
+
return fieldValues;
|
|
1832
|
+
};
|
|
1833
|
+
function useFieldArray(props) {
|
|
1834
|
+
const formControl = useFormControlContext();
|
|
1835
|
+
const { control = formControl, name, keyName = "id", shouldUnregister, rules } = props;
|
|
1836
|
+
const [fields, setFields] = React__default.useState(control._getFieldArray(name));
|
|
1837
|
+
const ids = React__default.useRef(control._getFieldArray(name).map(generateId));
|
|
1838
|
+
const _actioned = React__default.useRef(false);
|
|
1839
|
+
control._names.array.add(name);
|
|
1840
|
+
React__default.useMemo(() => rules && fields.length >= 0 && control.register(name, rules), [control, name, fields.length, rules]);
|
|
1841
|
+
useIsomorphicLayoutEffect(() => control._subjects.array.subscribe({
|
|
1842
|
+
next: ({ values, name: fieldArrayName }) => {
|
|
1843
|
+
if (fieldArrayName === name || !fieldArrayName) {
|
|
1844
|
+
const fieldValues = get(values, name);
|
|
1845
|
+
if (Array.isArray(fieldValues)) {
|
|
1846
|
+
setFields(fieldValues);
|
|
1847
|
+
ids.current = fieldValues.map(generateId);
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
}).unsubscribe, [control, name]);
|
|
1852
|
+
const updateValues = React__default.useCallback((updatedFieldArrayValues) => {
|
|
1853
|
+
_actioned.current = true;
|
|
1854
|
+
control._setFieldArray(name, updatedFieldArrayValues);
|
|
1855
|
+
}, [control, name]);
|
|
1856
|
+
const append = (value, options) => {
|
|
1857
|
+
const appendValue = convertToArrayPayload(cloneObject(value));
|
|
1858
|
+
const updatedFieldArrayValues = appendAt(control._getFieldArray(name), appendValue);
|
|
1859
|
+
control._names.focus = getFocusFieldName(name, updatedFieldArrayValues.length - 1, options);
|
|
1860
|
+
ids.current = appendAt(ids.current, appendValue.map(generateId));
|
|
1861
|
+
updateValues(updatedFieldArrayValues);
|
|
1862
|
+
setFields(updatedFieldArrayValues);
|
|
1863
|
+
control._setFieldArray(name, updatedFieldArrayValues, appendAt, {
|
|
1864
|
+
argA: fillEmptyArray(value)
|
|
1865
|
+
});
|
|
1866
|
+
};
|
|
1867
|
+
const prepend = (value, options) => {
|
|
1868
|
+
const prependValue = convertToArrayPayload(cloneObject(value));
|
|
1869
|
+
const updatedFieldArrayValues = prependAt(control._getFieldArray(name), prependValue);
|
|
1870
|
+
control._names.focus = getFocusFieldName(name, 0, options);
|
|
1871
|
+
ids.current = prependAt(ids.current, prependValue.map(generateId));
|
|
1872
|
+
updateValues(updatedFieldArrayValues);
|
|
1873
|
+
setFields(updatedFieldArrayValues);
|
|
1874
|
+
control._setFieldArray(name, updatedFieldArrayValues, prependAt, {
|
|
1875
|
+
argA: fillEmptyArray(value)
|
|
1876
|
+
});
|
|
1877
|
+
};
|
|
1878
|
+
const remove = (index) => {
|
|
1879
|
+
const updatedFieldArrayValues = removeArrayAt(control._getFieldArray(name), index);
|
|
1880
|
+
ids.current = removeArrayAt(ids.current, index);
|
|
1881
|
+
updateValues(updatedFieldArrayValues);
|
|
1882
|
+
setFields(updatedFieldArrayValues);
|
|
1883
|
+
!Array.isArray(get(control._fields, name)) && set(control._fields, name, void 0);
|
|
1884
|
+
control._setFieldArray(name, updatedFieldArrayValues, removeArrayAt, {
|
|
1885
|
+
argA: index
|
|
1886
|
+
});
|
|
1887
|
+
};
|
|
1888
|
+
const insert$1 = (index, value, options) => {
|
|
1889
|
+
const insertValue = convertToArrayPayload(cloneObject(value));
|
|
1890
|
+
const updatedFieldArrayValues = insert(control._getFieldArray(name), index, insertValue);
|
|
1891
|
+
control._names.focus = getFocusFieldName(name, index, options);
|
|
1892
|
+
ids.current = insert(ids.current, index, insertValue.map(generateId));
|
|
1893
|
+
updateValues(updatedFieldArrayValues);
|
|
1894
|
+
setFields(updatedFieldArrayValues);
|
|
1895
|
+
control._setFieldArray(name, updatedFieldArrayValues, insert, {
|
|
1896
|
+
argA: index,
|
|
1897
|
+
argB: fillEmptyArray(value)
|
|
1898
|
+
});
|
|
1899
|
+
};
|
|
1900
|
+
const swap = (indexA, indexB) => {
|
|
1901
|
+
const updatedFieldArrayValues = control._getFieldArray(name);
|
|
1902
|
+
swapArrayAt(updatedFieldArrayValues, indexA, indexB);
|
|
1903
|
+
swapArrayAt(ids.current, indexA, indexB);
|
|
1904
|
+
updateValues(updatedFieldArrayValues);
|
|
1905
|
+
setFields(updatedFieldArrayValues);
|
|
1906
|
+
control._setFieldArray(name, updatedFieldArrayValues, swapArrayAt, {
|
|
1907
|
+
argA: indexA,
|
|
1908
|
+
argB: indexB
|
|
1909
|
+
}, false);
|
|
1910
|
+
};
|
|
1911
|
+
const move = (from, to) => {
|
|
1912
|
+
const updatedFieldArrayValues = control._getFieldArray(name);
|
|
1913
|
+
moveArrayAt(updatedFieldArrayValues, from, to);
|
|
1914
|
+
moveArrayAt(ids.current, from, to);
|
|
1915
|
+
updateValues(updatedFieldArrayValues);
|
|
1916
|
+
setFields(updatedFieldArrayValues);
|
|
1917
|
+
control._setFieldArray(name, updatedFieldArrayValues, moveArrayAt, {
|
|
1918
|
+
argA: from,
|
|
1919
|
+
argB: to
|
|
1920
|
+
}, false);
|
|
1921
|
+
};
|
|
1922
|
+
const update = (index, value) => {
|
|
1923
|
+
const updateValue = cloneObject(value);
|
|
1924
|
+
const updatedFieldArrayValues = updateAt(control._getFieldArray(name), index, updateValue);
|
|
1925
|
+
ids.current = [...updatedFieldArrayValues].map((item, i) => !item || i === index ? generateId() : ids.current[i]);
|
|
1926
|
+
updateValues(updatedFieldArrayValues);
|
|
1927
|
+
setFields([...updatedFieldArrayValues]);
|
|
1928
|
+
control._setFieldArray(name, updatedFieldArrayValues, updateAt, {
|
|
1929
|
+
argA: index,
|
|
1930
|
+
argB: updateValue
|
|
1931
|
+
}, true, false);
|
|
1932
|
+
};
|
|
1933
|
+
const replace = (value) => {
|
|
1934
|
+
const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));
|
|
1935
|
+
ids.current = updatedFieldArrayValues.map(generateId);
|
|
1936
|
+
updateValues([...updatedFieldArrayValues]);
|
|
1937
|
+
setFields([...updatedFieldArrayValues]);
|
|
1938
|
+
control._setFieldArray(name, [...updatedFieldArrayValues], (data) => data, {}, true, false);
|
|
1939
|
+
};
|
|
1940
|
+
React__default.useEffect(() => {
|
|
1941
|
+
control._state.action = false;
|
|
1942
|
+
isWatched(name, control._names) && control._subjects.state.next({
|
|
1943
|
+
...control._formState
|
|
1944
|
+
});
|
|
1945
|
+
if (_actioned.current && (!getValidationModes(control._options.mode).isOnSubmit || control._formState.isSubmitted) && !getValidationModes(control._options.reValidateMode).isOnSubmit) {
|
|
1946
|
+
if (control._options.resolver) {
|
|
1947
|
+
control._runSchema([name]).then((result) => {
|
|
1948
|
+
control._updateIsValidating([name]);
|
|
1949
|
+
const error = get(result.errors, name);
|
|
1950
|
+
const existingError = get(control._formState.errors, name);
|
|
1951
|
+
if (existingError ? !error && existingError.type || error && (existingError.type !== error.type || existingError.message !== error.message) : error && error.type) {
|
|
1952
|
+
error ? set(control._formState.errors, name, error) : unset(control._formState.errors, name);
|
|
1953
|
+
control._subjects.state.next({
|
|
1954
|
+
errors: control._formState.errors
|
|
1955
|
+
});
|
|
1956
|
+
}
|
|
1957
|
+
});
|
|
1958
|
+
} else {
|
|
1959
|
+
const field = get(control._fields, name);
|
|
1960
|
+
if (field && field._f && !(getValidationModes(control._options.reValidateMode).isOnSubmit && getValidationModes(control._options.mode).isOnSubmit)) {
|
|
1961
|
+
validateField(field, control._names.disabled, control._formValues, control._options.criteriaMode === VALIDATION_MODE.all, control._options.shouldUseNativeValidation, true).then((error) => !isEmptyObject(error) && control._subjects.state.next({
|
|
1962
|
+
errors: updateFieldArrayRootError(control._formState.errors, error, name)
|
|
1963
|
+
}));
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
control._subjects.state.next({
|
|
1968
|
+
name,
|
|
1969
|
+
values: cloneObject(control._formValues)
|
|
1970
|
+
});
|
|
1971
|
+
control._names.focus && iterateFieldsByAction(control._fields, (ref, key) => {
|
|
1972
|
+
if (control._names.focus && key.startsWith(control._names.focus) && ref.focus) {
|
|
1973
|
+
ref.focus();
|
|
1974
|
+
return 1;
|
|
1975
|
+
}
|
|
1976
|
+
return;
|
|
1977
|
+
});
|
|
1978
|
+
control._names.focus = "";
|
|
1979
|
+
control._setValid();
|
|
1980
|
+
_actioned.current = false;
|
|
1981
|
+
}, [fields, name, control]);
|
|
1982
|
+
React__default.useEffect(() => {
|
|
1983
|
+
!get(control._formValues, name) && control._setFieldArray(name);
|
|
1984
|
+
return () => {
|
|
1985
|
+
const updateMounted = (name2, value) => {
|
|
1986
|
+
const field = get(control._fields, name2);
|
|
1987
|
+
if (field && field._f) {
|
|
1988
|
+
field._f.mount = value;
|
|
1989
|
+
}
|
|
1990
|
+
};
|
|
1991
|
+
control._options.shouldUnregister || shouldUnregister ? control.unregister(name) : updateMounted(name, false);
|
|
1992
|
+
};
|
|
1993
|
+
}, [name, control, keyName, shouldUnregister]);
|
|
1994
|
+
return {
|
|
1995
|
+
swap: React__default.useCallback(swap, [updateValues, name, control]),
|
|
1996
|
+
move: React__default.useCallback(move, [updateValues, name, control]),
|
|
1997
|
+
prepend: React__default.useCallback(prepend, [updateValues, name, control]),
|
|
1998
|
+
append: React__default.useCallback(append, [updateValues, name, control]),
|
|
1999
|
+
remove: React__default.useCallback(remove, [updateValues, name, control]),
|
|
2000
|
+
insert: React__default.useCallback(insert$1, [updateValues, name, control]),
|
|
2001
|
+
update: React__default.useCallback(update, [updateValues, name, control]),
|
|
2002
|
+
replace: React__default.useCallback(replace, [updateValues, name, control]),
|
|
2003
|
+
fields: React__default.useMemo(() => fields.map((field, index) => ({
|
|
2004
|
+
...field,
|
|
2005
|
+
[keyName]: ids.current[index] || generateId()
|
|
2006
|
+
})), [fields, keyName])
|
|
2007
|
+
};
|
|
2008
|
+
}
|
|
2009
|
+
function useForm(props = {}) {
|
|
2010
|
+
const _formControl = React__default.useRef(void 0);
|
|
2011
|
+
const _values = React__default.useRef(void 0);
|
|
2012
|
+
const [formState, updateFormState] = React__default.useState({
|
|
2013
|
+
isDirty: false,
|
|
2014
|
+
isValidating: false,
|
|
2015
|
+
isLoading: isFunction(props.defaultValues),
|
|
2016
|
+
isSubmitted: false,
|
|
2017
|
+
isSubmitting: false,
|
|
2018
|
+
isSubmitSuccessful: false,
|
|
2019
|
+
isValid: false,
|
|
2020
|
+
submitCount: 0,
|
|
2021
|
+
dirtyFields: {},
|
|
2022
|
+
touchedFields: {},
|
|
2023
|
+
validatingFields: {},
|
|
2024
|
+
errors: props.errors || {},
|
|
2025
|
+
disabled: props.disabled || false,
|
|
2026
|
+
isReady: false,
|
|
2027
|
+
defaultValues: isFunction(props.defaultValues) ? void 0 : props.defaultValues
|
|
2028
|
+
});
|
|
2029
|
+
if (!_formControl.current) {
|
|
2030
|
+
if (props.formControl) {
|
|
2031
|
+
_formControl.current = {
|
|
2032
|
+
...props.formControl,
|
|
2033
|
+
formState
|
|
2034
|
+
};
|
|
2035
|
+
if (props.defaultValues && !isFunction(props.defaultValues)) {
|
|
2036
|
+
props.formControl.reset(props.defaultValues, props.resetOptions);
|
|
2037
|
+
}
|
|
2038
|
+
} else {
|
|
2039
|
+
const { formControl, ...rest } = createFormControl(props);
|
|
2040
|
+
_formControl.current = {
|
|
2041
|
+
...rest,
|
|
2042
|
+
formState
|
|
2043
|
+
};
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
const control = _formControl.current.control;
|
|
2047
|
+
control._options = props;
|
|
2048
|
+
useIsomorphicLayoutEffect(() => {
|
|
2049
|
+
const sub = control._subscribe({
|
|
2050
|
+
formState: control._proxyFormState,
|
|
2051
|
+
callback: () => updateFormState({ ...control._formState }),
|
|
2052
|
+
reRenderRoot: true
|
|
2053
|
+
});
|
|
2054
|
+
updateFormState((data) => ({
|
|
2055
|
+
...data,
|
|
2056
|
+
isReady: true
|
|
2057
|
+
}));
|
|
2058
|
+
control._formState.isReady = true;
|
|
2059
|
+
return sub;
|
|
2060
|
+
}, [control]);
|
|
2061
|
+
React__default.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);
|
|
2062
|
+
React__default.useEffect(() => {
|
|
2063
|
+
if (props.mode) {
|
|
2064
|
+
control._options.mode = props.mode;
|
|
2065
|
+
}
|
|
2066
|
+
if (props.reValidateMode) {
|
|
2067
|
+
control._options.reValidateMode = props.reValidateMode;
|
|
2068
|
+
}
|
|
2069
|
+
}, [control, props.mode, props.reValidateMode]);
|
|
2070
|
+
React__default.useEffect(() => {
|
|
2071
|
+
if (props.errors) {
|
|
2072
|
+
control._setErrors(props.errors);
|
|
2073
|
+
control._focusError();
|
|
2074
|
+
}
|
|
2075
|
+
}, [control, props.errors]);
|
|
2076
|
+
React__default.useEffect(() => {
|
|
2077
|
+
props.shouldUnregister && control._subjects.state.next({
|
|
2078
|
+
values: control._getWatch()
|
|
2079
|
+
});
|
|
2080
|
+
}, [control, props.shouldUnregister]);
|
|
2081
|
+
React__default.useEffect(() => {
|
|
2082
|
+
if (control._proxyFormState.isDirty) {
|
|
2083
|
+
const isDirty = control._getDirty();
|
|
2084
|
+
if (isDirty !== formState.isDirty) {
|
|
2085
|
+
control._subjects.state.next({
|
|
2086
|
+
isDirty
|
|
2087
|
+
});
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
}, [control, formState.isDirty]);
|
|
2091
|
+
React__default.useEffect(() => {
|
|
2092
|
+
var _a;
|
|
2093
|
+
if (props.values && !deepEqual(props.values, _values.current)) {
|
|
2094
|
+
control._reset(props.values, {
|
|
2095
|
+
keepFieldsRef: true,
|
|
2096
|
+
...control._options.resetOptions
|
|
2097
|
+
});
|
|
2098
|
+
if (!((_a = control._options.resetOptions) === null || _a === void 0 ? void 0 : _a.keepIsValid)) {
|
|
2099
|
+
control._setValid();
|
|
2100
|
+
}
|
|
2101
|
+
_values.current = props.values;
|
|
2102
|
+
updateFormState((state) => ({ ...state }));
|
|
2103
|
+
} else {
|
|
2104
|
+
control._resetDefaultValues();
|
|
2105
|
+
}
|
|
2106
|
+
}, [control, props.values]);
|
|
2107
|
+
React__default.useEffect(() => {
|
|
2108
|
+
if (!control._state.mount) {
|
|
2109
|
+
control._setValid();
|
|
2110
|
+
control._state.mount = true;
|
|
2111
|
+
}
|
|
2112
|
+
if (control._state.watch) {
|
|
2113
|
+
control._state.watch = false;
|
|
2114
|
+
control._subjects.state.next({ ...control._formState });
|
|
2115
|
+
}
|
|
2116
|
+
control._removeUnmounted();
|
|
2117
|
+
});
|
|
2118
|
+
_formControl.current.formState = React__default.useMemo(() => getProxyFormState(formState, control), [control, formState]);
|
|
2119
|
+
return _formControl.current;
|
|
2120
|
+
}
|
|
2121
|
+
export {
|
|
2122
|
+
Controller,
|
|
2123
|
+
FormProvider,
|
|
2124
|
+
appendErrors,
|
|
2125
|
+
createFormControl,
|
|
2126
|
+
get,
|
|
2127
|
+
set,
|
|
2128
|
+
useController,
|
|
2129
|
+
useFieldArray,
|
|
2130
|
+
useForm,
|
|
2131
|
+
useFormContext,
|
|
2132
|
+
useFormState,
|
|
2133
|
+
useWatch
|
|
2134
|
+
};
|
|
2135
|
+
//# sourceMappingURL=index.esm.js.map
|