@lssm/lib.ui-kit 0.0.0-canary-20251120170226
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/README.md +75 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/node_modules/@hookform/resolvers/dist/resolvers.js +35 -0
- package/dist/node_modules/@hookform/resolvers/dist/resolvers.js.map +1 -0
- package/dist/node_modules/@hookform/resolvers/zod/dist/zod.js +119 -0
- package/dist/node_modules/@hookform/resolvers/zod/dist/zod.js.map +1 -0
- package/dist/node_modules/react-hook-form/dist/index.esm.js +2062 -0
- package/dist/node_modules/react-hook-form/dist/index.esm.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/errors.js +30 -0
- package/dist/node_modules/zod/v4/classic/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/iso.js +38 -0
- package/dist/node_modules/zod/v4/classic/iso.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/parse.js +20 -0
- package/dist/node_modules/zod/v4/classic/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +395 -0
- package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/api.js +377 -0
- package/dist/node_modules/zod/v4/core/api.js.map +1 -0
- package/dist/node_modules/zod/v4/core/checks.js +226 -0
- package/dist/node_modules/zod/v4/core/checks.js.map +1 -0
- package/dist/node_modules/zod/v4/core/core.js +57 -0
- package/dist/node_modules/zod/v4/core/core.js.map +1 -0
- package/dist/node_modules/zod/v4/core/errors.js +63 -0
- package/dist/node_modules/zod/v4/core/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/core/parse.js +110 -0
- package/dist/node_modules/zod/v4/core/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/core/regexes.js +59 -0
- package/dist/node_modules/zod/v4/core/regexes.js.map +1 -0
- package/dist/node_modules/zod/v4/core/registries.js +53 -0
- package/dist/node_modules/zod/v4/core/registries.js.map +1 -0
- package/dist/node_modules/zod/v4/core/schemas.js +755 -0
- package/dist/node_modules/zod/v4/core/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/util.js +152 -0
- package/dist/node_modules/zod/v4/core/util.js.map +1 -0
- package/dist/node_modules/zod/v4/core/versions.js +10 -0
- package/dist/node_modules/zod/v4/core/versions.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/ui/accordion.d.ts +36 -0
- package/dist/ui/accordion.d.ts.map +1 -0
- package/dist/ui/accordion.js +93 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert-dialog.d.ts +72 -0
- package/dist/ui/alert-dialog.d.ts.map +1 -0
- package/dist/ui/alert-dialog.js +98 -0
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.d.ts +37 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/alert.js +50 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/aspect-ratio.d.ts +12 -0
- package/dist/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/ui/aspect-ratio.js +8 -0
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +8 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts.map +1 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.js +58 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.js.map +1 -0
- package/dist/ui/atoms/FilterSelect/index.d.ts +3 -0
- package/dist/ui/atoms/FilterSelect/index.js +3 -0
- package/dist/ui/atoms/FilterSelect/types.d.ts +19 -0
- package/dist/ui/atoms/FilterSelect/types.d.ts.map +1 -0
- package/dist/ui/atoms/FilterSelect/types.js +0 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +23 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts.map +1 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +48 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js.map +1 -0
- package/dist/ui/atoms/LoadingSpinner/index.d.ts +2 -0
- package/dist/ui/atoms/LoadingSpinner/index.js +3 -0
- package/dist/ui/atoms/Pagination/Pagination.d.ts +8 -0
- package/dist/ui/atoms/Pagination/Pagination.d.ts.map +1 -0
- package/dist/ui/atoms/Pagination/Pagination.js +163 -0
- package/dist/ui/atoms/Pagination/Pagination.js.map +1 -0
- package/dist/ui/atoms/Pagination/index.d.ts +3 -0
- package/dist/ui/atoms/Pagination/index.js +3 -0
- package/dist/ui/atoms/Pagination/types.d.ts +16 -0
- package/dist/ui/atoms/Pagination/types.d.ts.map +1 -0
- package/dist/ui/atoms/Pagination/types.js +0 -0
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts +8 -0
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts.map +1 -0
- package/dist/ui/atoms/SearchInput/SearchInput.js +50 -0
- package/dist/ui/atoms/SearchInput/SearchInput.js.map +1 -0
- package/dist/ui/atoms/SearchInput/index.d.ts +3 -0
- package/dist/ui/atoms/SearchInput/index.js +3 -0
- package/dist/ui/atoms/SearchInput/types.d.ts +13 -0
- package/dist/ui/atoms/SearchInput/types.d.ts.map +1 -0
- package/dist/ui/atoms/SearchInput/types.js +0 -0
- package/dist/ui/avatar.d.ts +28 -0
- package/dist/ui/avatar.d.ts.map +1 -0
- package/dist/ui/avatar.js +28 -0
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge.d.ts +22 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.js +26 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/breadcrumb.d.ts +39 -0
- package/dist/ui/breadcrumb.d.ts.map +1 -0
- package/dist/ui/breadcrumb.js +73 -0
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button.d.ts +26 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +75 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/card.d.ts +44 -0
- package/dist/ui/card.d.ts.map +1 -0
- package/dist/ui/card.js +52 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/carousel.d.ts +5 -0
- package/dist/ui/carousel.d.ts.map +1 -0
- package/dist/ui/carousel.js +6 -0
- package/dist/ui/carousel.js.map +1 -0
- package/dist/ui/checkbox.d.ts +17 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +21 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/collapsible.d.ts +25 -0
- package/dist/ui/collapsible.d.ts.map +1 -0
- package/dist/ui/collapsible.js +10 -0
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/command.d.ts +5 -0
- package/dist/ui/command.d.ts.map +1 -0
- package/dist/ui/command.js +6 -0
- package/dist/ui/command.js.map +1 -0
- package/dist/ui/context-menu.d.ts +110 -0
- package/dist/ui/context-menu.d.ts.map +1 -0
- package/dist/ui/context-menu.js +108 -0
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/date-picker.d.ts +24 -0
- package/dist/ui/date-picker.d.ts.map +1 -0
- package/dist/ui/date-picker.js +54 -0
- package/dist/ui/date-picker.js.map +1 -0
- package/dist/ui/date-range-picker.d.ts +31 -0
- package/dist/ui/date-range-picker.d.ts.map +1 -0
- package/dist/ui/date-range-picker.js +86 -0
- package/dist/ui/date-range-picker.js.map +1 -0
- package/dist/ui/datetime-picker.d.ts +28 -0
- package/dist/ui/datetime-picker.d.ts.map +1 -0
- package/dist/ui/datetime-picker.js +45 -0
- package/dist/ui/datetime-picker.js.map +1 -0
- package/dist/ui/dialog.d.ts +69 -0
- package/dist/ui/dialog.d.ts.map +1 -0
- package/dist/ui/dialog.js +81 -0
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/dropdown-menu.d.ts +112 -0
- package/dist/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/dropdown-menu.js +110 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/empty-state.d.ts +29 -0
- package/dist/ui/empty-state.d.ts.map +1 -0
- package/dist/ui/empty-state.js +46 -0
- package/dist/ui/empty-state.js.map +1 -0
- package/dist/ui/empty.d.ts +37 -0
- package/dist/ui/empty.d.ts.map +1 -0
- package/dist/ui/empty.js +63 -0
- package/dist/ui/empty.js.map +1 -0
- package/dist/ui/fab.d.ts +36 -0
- package/dist/ui/fab.d.ts.map +1 -0
- package/dist/ui/fab.js +104 -0
- package/dist/ui/fab.js.map +1 -0
- package/dist/ui/field.d.ts +67 -0
- package/dist/ui/field.d.ts.map +1 -0
- package/dist/ui/field.js +124 -0
- package/dist/ui/field.js.map +1 -0
- package/dist/ui/form.d.ts +50 -0
- package/dist/ui/form.d.ts.map +1 -0
- package/dist/ui/form.js +96 -0
- package/dist/ui/form.js.map +1 -0
- package/dist/ui/hover-card.d.ts +30 -0
- package/dist/ui/hover-card.d.ts.map +1 -0
- package/dist/ui/hover-card.js +33 -0
- package/dist/ui/hover-card.js.map +1 -0
- package/dist/ui/icons/Check.d.ts +2 -0
- package/dist/ui/icons/Check.js +9 -0
- package/dist/ui/icons/Check.js.map +1 -0
- package/dist/ui/icons/ChevronDown.d.ts +2 -0
- package/dist/ui/icons/ChevronDown.js +9 -0
- package/dist/ui/icons/ChevronDown.js.map +1 -0
- package/dist/ui/icons/ChevronRight.d.ts +2 -0
- package/dist/ui/icons/ChevronRight.js +9 -0
- package/dist/ui/icons/ChevronRight.js.map +1 -0
- package/dist/ui/icons/ChevronUp.d.ts +2 -0
- package/dist/ui/icons/ChevronUp.js +9 -0
- package/dist/ui/icons/ChevronUp.js.map +1 -0
- package/dist/ui/icons/CircleUser.d.ts +2 -0
- package/dist/ui/icons/CircleUser.js +9 -0
- package/dist/ui/icons/CircleUser.js.map +1 -0
- package/dist/ui/icons/Info.d.ts +2 -0
- package/dist/ui/icons/Info.js +9 -0
- package/dist/ui/icons/Info.js.map +1 -0
- package/dist/ui/icons/Key.d.ts +2 -0
- package/dist/ui/icons/Key.js +9 -0
- package/dist/ui/icons/Key.js.map +1 -0
- package/dist/ui/icons/MoonStar.d.ts +2 -0
- package/dist/ui/icons/MoonStar.js +9 -0
- package/dist/ui/icons/MoonStar.js.map +1 -0
- package/dist/ui/icons/Sun.d.ts +2 -0
- package/dist/ui/icons/Sun.js +9 -0
- package/dist/ui/icons/Sun.js.map +1 -0
- package/dist/ui/icons/X.d.ts +2 -0
- package/dist/ui/icons/X.js +9 -0
- package/dist/ui/icons/X.js.map +1 -0
- package/dist/ui/icons/iconWithClassName.d.ts +7 -0
- package/dist/ui/icons/iconWithClassName.d.ts.map +1 -0
- package/dist/ui/icons/iconWithClassName.js +16 -0
- package/dist/ui/icons/iconWithClassName.js.map +1 -0
- package/dist/ui/input.d.ts +15 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +17 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.d.ts +16 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +24 -0
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/link.d.ts +14 -0
- package/dist/ui/link.d.ts.map +1 -0
- package/dist/ui/link.js +16 -0
- package/dist/ui/link.js.map +1 -0
- package/dist/ui/loading-button.d.ts +20 -0
- package/dist/ui/loading-button.d.ts.map +1 -0
- package/dist/ui/loading-button.js +22 -0
- package/dist/ui/loading-button.js.map +1 -0
- package/dist/ui/loading-overlay.d.ts +16 -0
- package/dist/ui/loading-overlay.d.ts.map +1 -0
- package/dist/ui/loading-overlay.js +44 -0
- package/dist/ui/loading-overlay.js.map +1 -0
- package/dist/ui/loading-screen.d.ts +14 -0
- package/dist/ui/loading-screen.d.ts.map +1 -0
- package/dist/ui/loading-screen.js +93 -0
- package/dist/ui/loading-screen.js.map +1 -0
- package/dist/ui/marketing/FeatureGrid.d.ts +21 -0
- package/dist/ui/marketing/FeatureGrid.d.ts.map +1 -0
- package/dist/ui/marketing/FeatureGrid.js +35 -0
- package/dist/ui/marketing/FeatureGrid.js.map +1 -0
- package/dist/ui/marketing/Hero.d.ts +28 -0
- package/dist/ui/marketing/Hero.d.ts.map +1 -0
- package/dist/ui/marketing/Hero.js +52 -0
- package/dist/ui/marketing/Hero.js.map +1 -0
- package/dist/ui/marketing/PricingTable.d.ts +25 -0
- package/dist/ui/marketing/PricingTable.d.ts.map +1 -0
- package/dist/ui/marketing/PricingTable.js +60 -0
- package/dist/ui/marketing/PricingTable.js.map +1 -0
- package/dist/ui/marketing/index.d.ts +4 -0
- package/dist/ui/marketing/index.js +5 -0
- package/dist/ui/menubar.d.ts +115 -0
- package/dist/ui/menubar.d.ts.map +1 -0
- package/dist/ui/menubar.js +120 -0
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/molecules/Autocomplete/index.d.ts +5 -0
- package/dist/ui/molecules/Autocomplete/index.d.ts.map +1 -0
- package/dist/ui/molecules/Autocomplete/index.js +6 -0
- package/dist/ui/molecules/Autocomplete/index.js.map +1 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +8 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts.map +1 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +106 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js.map +1 -0
- package/dist/ui/molecules/SearchAndFilter/index.d.ts +3 -0
- package/dist/ui/molecules/SearchAndFilter/index.js +3 -0
- package/dist/ui/molecules/SearchAndFilter/types.d.ts +25 -0
- package/dist/ui/molecules/SearchAndFilter/types.d.ts.map +1 -0
- package/dist/ui/molecules/SearchAndFilter/types.js +0 -0
- package/dist/ui/molecules/SkeletonList.d.ts +16 -0
- package/dist/ui/molecules/SkeletonList.d.ts.map +1 -0
- package/dist/ui/molecules/SkeletonList.js +15 -0
- package/dist/ui/molecules/SkeletonList.js.map +1 -0
- package/dist/ui/nativewind-env.d.ts +1 -0
- package/dist/ui/navigation-menu.d.ts +68 -0
- package/dist/ui/navigation-menu.d.ts.map +1 -0
- package/dist/ui/navigation-menu.js +87 -0
- package/dist/ui/navigation-menu.js.map +1 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +30 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts.map +1 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +108 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js.map +1 -0
- package/dist/ui/organisms/ErrorBoundary/index.d.ts +2 -0
- package/dist/ui/organisms/ErrorBoundary/index.js +3 -0
- package/dist/ui/organisms/ListPage/ListPage.d.ts +29 -0
- package/dist/ui/organisms/ListPage/ListPage.d.ts.map +1 -0
- package/dist/ui/organisms/ListPage/ListPage.js +198 -0
- package/dist/ui/organisms/ListPage/ListPage.js.map +1 -0
- package/dist/ui/organisms/ListPage/index.d.ts +3 -0
- package/dist/ui/organisms/ListPage/index.js +3 -0
- package/dist/ui/organisms/ListPage/types.d.ts +42 -0
- package/dist/ui/organisms/ListPage/types.d.ts.map +1 -0
- package/dist/ui/organisms/ListPage/types.js +0 -0
- package/dist/ui/page-header.d.ts +27 -0
- package/dist/ui/page-header.d.ts.map +1 -0
- package/dist/ui/page-header.js +41 -0
- package/dist/ui/page-header.js.map +1 -0
- package/dist/ui/password-strength.d.ts +21 -0
- package/dist/ui/password-strength.d.ts.map +1 -0
- package/dist/ui/password-strength.js +99 -0
- package/dist/ui/password-strength.js.map +1 -0
- package/dist/ui/popover.d.ts +30 -0
- package/dist/ui/popover.d.ts.map +1 -0
- package/dist/ui/popover.js +35 -0
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/progress.d.ts +17 -0
- package/dist/ui/progress.d.ts.map +1 -0
- package/dist/ui/progress.js +40 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/radio-group.d.ts +15 -0
- package/dist/ui/radio-group.d.ts.map +1 -0
- package/dist/ui/radio-group.js +23 -0
- package/dist/ui/radio-group.js.map +1 -0
- package/dist/ui/select.d.ts +84 -0
- package/dist/ui/select.d.ts.map +1 -0
- package/dist/ui/select.js +111 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.d.ts +16 -0
- package/dist/ui/separator.d.ts.map +1 -0
- package/dist/ui/separator.js +18 -0
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/sheet.d.ts +5 -0
- package/dist/ui/sheet.d.ts.map +1 -0
- package/dist/ui/sheet.js +6 -0
- package/dist/ui/sheet.js.map +1 -0
- package/dist/ui/sidebar.d.ts +5 -0
- package/dist/ui/sidebar.d.ts.map +1 -0
- package/dist/ui/sidebar.js +6 -0
- package/dist/ui/sidebar.js.map +1 -0
- package/dist/ui/skeleton.d.ts +12 -0
- package/dist/ui/skeleton.d.ts.map +1 -0
- package/dist/ui/skeleton.js +24 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/stack.d.ts +77 -0
- package/dist/ui/stack.d.ts.map +1 -0
- package/dist/ui/stack.js +238 -0
- package/dist/ui/stack.js.map +1 -0
- package/dist/ui/stepper.d.ts +23 -0
- package/dist/ui/stepper.d.ts.map +1 -0
- package/dist/ui/stepper.js +38 -0
- package/dist/ui/stepper.js.map +1 -0
- package/dist/ui/switch.d.ts +15 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/ui/switch.js +54 -0
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.d.ts +51 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +57 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.d.ts +33 -0
- package/dist/ui/tabs.d.ts.map +1 -0
- package/dist/ui/tabs.js +29 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/text.d.ts +21 -0
- package/dist/ui/text.d.ts.map +1 -0
- package/dist/ui/text.js +19 -0
- package/dist/ui/text.js.map +1 -0
- package/dist/ui/textarea.d.ts +10 -0
- package/dist/ui/textarea.d.ts.map +1 -0
- package/dist/ui/textarea.js +20 -0
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/time-picker.d.ts +22 -0
- package/dist/ui/time-picker.d.ts.map +1 -0
- package/dist/ui/time-picker.js +53 -0
- package/dist/ui/time-picker.js.map +1 -0
- package/dist/ui/toggle-group.d.ts +36 -0
- package/dist/ui/toggle-group.d.ts.map +1 -0
- package/dist/ui/toggle-group.js +55 -0
- package/dist/ui/toggle-group.js.map +1 -0
- package/dist/ui/toggle.d.ts +34 -0
- package/dist/ui/toggle.d.ts.map +1 -0
- package/dist/ui/toggle.js +67 -0
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.d.ts +32 -0
- package/dist/ui/tooltip.d.ts.map +1 -0
- package/dist/ui/tooltip.js +41 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/ui/typography.d.ts +65 -0
- package/dist/ui/typography.d.ts.map +1 -0
- package/dist/ui/typography.js +88 -0
- package/dist/ui/typography.js.map +1 -0
- package/dist/ui/useColorScheme.d.ts +12 -0
- package/dist/ui/useColorScheme.d.ts.map +1 -0
- package/dist/ui/useColorScheme.js +17 -0
- package/dist/ui/useColorScheme.js.map +1 -0
- package/dist/ui/useListState.d.ts +34 -0
- package/dist/ui/useListState.d.ts.map +1 -0
- package/dist/ui/useListState.js +75 -0
- package/dist/ui/useListState.js.map +1 -0
- package/dist/ui/usecases/UseCaseCard.d.ts +19 -0
- package/dist/ui/usecases/UseCaseCard.d.ts.map +1 -0
- package/dist/ui/usecases/UseCaseCard.js +35 -0
- package/dist/ui/usecases/UseCaseCard.js.map +1 -0
- package/dist/ui/usecases/UserStoryCard.d.ts +15 -0
- package/dist/ui/usecases/UserStoryCard.d.ts.map +1 -0
- package/dist/ui/usecases/UserStoryCard.js +36 -0
- package/dist/ui/usecases/UserStoryCard.js.map +1 -0
- package/dist/ui/usecases/index.d.ts +3 -0
- package/dist/ui/usecases/index.js +4 -0
- package/dist/ui/utils.d.ts +7 -0
- package/dist/ui/utils.d.ts.map +1 -0
- package/dist/ui/utils.js +11 -0
- package/dist/ui/utils.js.map +1 -0
- package/package.json +212 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Label } from "./label.js";
|
|
2
|
+
import { BoxProps } from "./stack.js";
|
|
3
|
+
import { TypographyProps } from "./typography.js";
|
|
4
|
+
import * as react_jsx_runtime70 from "react/jsx-runtime";
|
|
5
|
+
import { VariantProps } from "class-variance-authority";
|
|
6
|
+
import * as class_variance_authority_types5 from "class-variance-authority/types";
|
|
7
|
+
|
|
8
|
+
//#region ui/field.d.ts
|
|
9
|
+
declare function FieldSet({
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}: BoxProps): react_jsx_runtime70.JSX.Element;
|
|
13
|
+
declare function FieldLegend({
|
|
14
|
+
className,
|
|
15
|
+
variant,
|
|
16
|
+
...props
|
|
17
|
+
}: BoxProps & {
|
|
18
|
+
variant?: 'legend' | 'label';
|
|
19
|
+
}): react_jsx_runtime70.JSX.Element;
|
|
20
|
+
declare function FieldGroup({
|
|
21
|
+
className,
|
|
22
|
+
...props
|
|
23
|
+
}: BoxProps): react_jsx_runtime70.JSX.Element;
|
|
24
|
+
declare const fieldVariants: (props?: ({
|
|
25
|
+
orientation?: "vertical" | "horizontal" | "responsive" | null | undefined;
|
|
26
|
+
} & class_variance_authority_types5.ClassProp) | undefined) => string;
|
|
27
|
+
declare function Field({
|
|
28
|
+
className,
|
|
29
|
+
orientation,
|
|
30
|
+
...props
|
|
31
|
+
}: BoxProps & VariantProps<typeof fieldVariants>): react_jsx_runtime70.JSX.Element;
|
|
32
|
+
declare function FieldContent({
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}: BoxProps): react_jsx_runtime70.JSX.Element;
|
|
36
|
+
declare function FieldLabel({
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}: React.ComponentProps<typeof Label>): react_jsx_runtime70.JSX.Element;
|
|
40
|
+
declare function FieldTitle({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: BoxProps): react_jsx_runtime70.JSX.Element;
|
|
44
|
+
declare function FieldDescription({
|
|
45
|
+
className,
|
|
46
|
+
...props
|
|
47
|
+
}: TypographyProps): react_jsx_runtime70.JSX.Element;
|
|
48
|
+
declare function FieldSeparator({
|
|
49
|
+
children,
|
|
50
|
+
className,
|
|
51
|
+
...props
|
|
52
|
+
}: BoxProps & {
|
|
53
|
+
children?: React.ReactNode;
|
|
54
|
+
}): react_jsx_runtime70.JSX.Element;
|
|
55
|
+
declare function FieldError({
|
|
56
|
+
className,
|
|
57
|
+
children,
|
|
58
|
+
errors,
|
|
59
|
+
...props
|
|
60
|
+
}: BoxProps & {
|
|
61
|
+
errors?: ({
|
|
62
|
+
message?: string;
|
|
63
|
+
} | undefined)[];
|
|
64
|
+
}): react_jsx_runtime70.JSX.Element | null;
|
|
65
|
+
//#endregion
|
|
66
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
67
|
+
//# sourceMappingURL=field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.d.ts","names":[],"sources":["../../ui/field.tsx"],"sourcesContent":[],"mappings":";;;;;;;;iBAWS,QAAA;;;GAAkC,WAAQ,mBAAA,CAAA,GAAA,CAAA;iBAc1C,WAAA;;;;GAIN;;IAA2C,mBAAA,CAAA,GAAA,CAAA;AApBS,iBAoC9C,UAAA,CAlCQ;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAkC4B,QAlC5B,CAAA,EAkCoC,mBAAA,CAAA,GAAA,CAAA,OAlCpC;cA+CX,aA/Cc,EAAA,CAAA,KAA+B,CAA/B,EAAA,CAAA;EAAuB,WAAA,CAAA,EAAA,UAAA,GAAA,YAAA,GAAA,YAAA,GAAA,IAAA,GAAA,SAAA;CAAQ,GAqElD,+BAAA,CAAA,SArEkD,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;iBAuE1C,KAAA,CAvE0C;EAAA,SAAA;EAAA,WAAA;EAAA,GAAA;AAAA,CAAA,EA2EhD,QA3EgD,GA2ErC,YA3EqC,CAAA,OA2EjB,aA3EiB,CAAA,CAAA,EA2EH,mBAAA,CAAA,GAAA,CAAA,OA3EG;AAAA,iBAuF1C,YAAA,CAzEW;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAyE2B,QAzE3B,CAAA,EAyEmC,mBAAA,CAAA,GAAA,CAAA,OAzEnC;iBAsFX,UAAA,CArFP;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAwFC,KAAA,CAAM,cAxFP,CAAA,OAwF6B,KAxF7B,CAAA,CAAA,EAwFmC,mBAAA,CAAA,GAAA,CAAA,OAxFnC;iBAuGO,UAAA,CAtGP;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAsG2C,QAtG3C,CAAA,EAsGmD,mBAAA,CAAA,GAAA,CAAA,OAtGnD;iBAmHO,gBAAA,CAjHN;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAiHgD,eAjHhD,CAAA,EAiH+D,mBAAA,CAAA,GAAA,CAAA,OAjH/D;iBAgIM,cAAA,CAhIqC;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAoI3C,QApI2C,GAAA;EAAA,QAAA,CAAA,EAqIjC,KAAA,CAAM,SArI2B;AAAA,CAAA,CAAA,EAsI7C,mBAAA,CAAA,GAAA,CAAA,OAtHkB;iBA8IV,UAAA,CA9Ia;EAAA,SAAA;EAAA,QAAA;EAAA,MAAA;EAAA,GAAA;AAA+B,CAA/B,EAmJnB,QAnJmB,GAAA;EAAuB,MAAA,CAAA,EAAA,CAAA;IAAQ,OAAA,CAAA,EAAA,MAAA;EAAA,CAAA,GAAA,SAAA,CAAA,EAAA;AAAA,CAAA,CAAA,EAqJpD,mBAAA,CAAA,GAAA,CAAA,OAAA,GAlHA,IAAA"}
|
package/dist/ui/field.js
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { cn } from "./utils.js";
|
|
5
|
+
import { Box, VStack } from "./stack.js";
|
|
6
|
+
import { P } from "./typography.js";
|
|
7
|
+
import { Label } from "./label.js";
|
|
8
|
+
import { Separator } from "./separator.js";
|
|
9
|
+
import { useMemo } from "react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { cva } from "class-variance-authority";
|
|
12
|
+
|
|
13
|
+
//#region ui/field.tsx
|
|
14
|
+
function FieldSet({ className,...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
16
|
+
"data-slot": "field-set",
|
|
17
|
+
className: cn("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function FieldLegend({ className, variant = "legend",...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
23
|
+
"data-slot": "field-legend",
|
|
24
|
+
"data-variant": variant,
|
|
25
|
+
className: cn("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", className),
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function FieldGroup({ className,...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
31
|
+
"data-slot": "field-group",
|
|
32
|
+
className: cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 data-[slot=field-group]:*:gap-4", className),
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
const fieldVariants = cva("group/field flex w-full gap-3 data-[invalid=true]:text-destructive", {
|
|
37
|
+
variants: { orientation: {
|
|
38
|
+
vertical: ["flex-col *:w-full [&>.sr-only]:w-auto"],
|
|
39
|
+
horizontal: [
|
|
40
|
+
"flex-row items-center",
|
|
41
|
+
"data-[slot=field-label]:*:flex-auto",
|
|
42
|
+
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
43
|
+
],
|
|
44
|
+
responsive: [
|
|
45
|
+
"flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto",
|
|
46
|
+
"@md/field-group:data-[slot=field-label]:*:flex-auto",
|
|
47
|
+
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
48
|
+
]
|
|
49
|
+
} },
|
|
50
|
+
defaultVariants: { orientation: "vertical" }
|
|
51
|
+
});
|
|
52
|
+
function Field({ className, orientation = "vertical",...props }) {
|
|
53
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
54
|
+
role: "group",
|
|
55
|
+
"data-slot": "field",
|
|
56
|
+
"data-orientation": orientation,
|
|
57
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function FieldContent({ className,...props }) {
|
|
62
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
63
|
+
"data-slot": "field-content",
|
|
64
|
+
className: cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className),
|
|
65
|
+
...props
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function FieldLabel({ className,...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsx(Label, {
|
|
70
|
+
"data-slot": "field-label",
|
|
71
|
+
className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4", "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10", className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function FieldTitle({ className,...props }) {
|
|
76
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
77
|
+
"data-slot": "field-label",
|
|
78
|
+
className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50", className),
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function FieldDescription({ className,...props }) {
|
|
83
|
+
return /* @__PURE__ */ jsx(P, {
|
|
84
|
+
"data-slot": "field-description",
|
|
85
|
+
className: cn("text-muted-foreground text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance", "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", className),
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function FieldSeparator({ children, className,...props }) {
|
|
90
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
91
|
+
"data-slot": "field-separator",
|
|
92
|
+
"data-content": !!children,
|
|
93
|
+
className: cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
|
|
94
|
+
...props,
|
|
95
|
+
children: [/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && /* @__PURE__ */ jsx(Box, {
|
|
96
|
+
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
97
|
+
"data-slot": "field-separator-content",
|
|
98
|
+
children
|
|
99
|
+
})]
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function FieldError({ className, children, errors,...props }) {
|
|
103
|
+
const content = useMemo(() => {
|
|
104
|
+
if (children) return children;
|
|
105
|
+
if (!errors?.length) return null;
|
|
106
|
+
if (errors?.length == 1) return errors[0]?.message;
|
|
107
|
+
return /* @__PURE__ */ jsx(VStack, {
|
|
108
|
+
className: "ml-4 flex list-disc flex-col gap-1",
|
|
109
|
+
children: errors.map((error, index) => error?.message && /* @__PURE__ */ jsx(P, { children: error.message }, index))
|
|
110
|
+
});
|
|
111
|
+
}, [children, errors]);
|
|
112
|
+
if (!content) return null;
|
|
113
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
114
|
+
role: "alert",
|
|
115
|
+
"data-slot": "field-error",
|
|
116
|
+
className: cn("text-destructive text-sm font-normal", className),
|
|
117
|
+
...props,
|
|
118
|
+
children: content
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
//#endregion
|
|
123
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
124
|
+
//# sourceMappingURL=field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.js","names":[],"sources":["../../ui/field.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from './utils';\nimport { Label } from './label';\nimport { Separator } from './separator';\nimport { Box, VStack, type BoxProps } from './stack';\nimport { P, type TypographyProps } from './typography';\n\nfunction FieldSet({ className, ...props }: BoxProps) {\n return (\n <Box\n data-slot=\"field-set\"\n className={cn(\n 'flex flex-col gap-6',\n 'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLegend({\n className,\n variant = 'legend',\n ...props\n}: BoxProps & { variant?: 'legend' | 'label' }) {\n return (\n <Box\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn(\n 'mb-3 font-medium',\n 'data-[variant=legend]:text-base',\n 'data-[variant=label]:text-sm',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldGroup({ className, ...props }: BoxProps) {\n return (\n <Box\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 data-[slot=field-group]:*:gap-4',\n className\n )}\n {...props}\n />\n );\n}\n\nconst fieldVariants = cva(\n 'group/field flex w-full gap-3 data-[invalid=true]:text-destructive',\n {\n variants: {\n orientation: {\n vertical: ['flex-col *:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center',\n 'data-[slot=field-label]:*:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto',\n '@md/field-group:data-[slot=field-label]:*:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n }\n);\n\nfunction Field({\n className,\n orientation = 'vertical',\n ...props\n}: BoxProps & VariantProps<typeof fieldVariants>) {\n return (\n <Box\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\nfunction FieldContent({ className, ...props }: BoxProps) {\n return (\n <Box\n data-slot=\"field-content\"\n className={cn(\n 'group/field-content flex flex-1 flex-col gap-1.5 leading-snug',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLabel({\n className,\n ...props\n}: React.ComponentProps<typeof Label>) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50',\n 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4',\n 'has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldTitle({ className, ...props }: BoxProps) {\n return (\n <Box\n data-slot=\"field-label\"\n className={cn(\n 'flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldDescription({ className, ...props }: TypographyProps) {\n return (\n <P\n data-slot=\"field-description\"\n className={cn(\n 'text-muted-foreground text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: BoxProps & {\n children?: React.ReactNode;\n}) {\n return (\n <Box\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn(\n 'relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2',\n className\n )}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <Box\n className=\"bg-background text-muted-foreground relative mx-auto block w-fit px-2\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </Box>\n )}\n </Box>\n );\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: BoxProps & {\n errors?: ({ message?: string } | undefined)[];\n}) {\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors?.length) {\n return null;\n }\n\n if (errors?.length == 1) {\n return errors[0]?.message;\n }\n\n return (\n <VStack className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map(\n (error, index) => error?.message && <P key={index}>{error.message}</P>\n )}\n </VStack>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <Box\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn('text-destructive text-sm font-normal', className)}\n {...props}\n >\n {content}\n </Box>\n );\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n};\n"],"mappings":";;;;;;;;;;;;;AAWA,SAAS,SAAS,EAAE,UAAW,GAAG,SAAmB;AACnD,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,uBACA,gFACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,WACA,UAAU,SACV,GAAG,SAC2C;AAC9C,QACE,oBAAC;EACC,aAAU;EACV,gBAAc;EACd,WAAW,GACT,oBACA,mCACA,gCACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAAE,UAAW,GAAG,SAAmB;AACrD,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,wIACA,UACD;EACD,GAAI;GACJ;;AAIN,MAAM,gBAAgB,IACpB,sEACA;CACE,UAAU,EACR,aAAa;EACX,UAAU,CAAC,wCAAwC;EACnD,YAAY;GACV;GACA;GACA;GACD;EACD,YAAY;GACV;GACA;GACA;GACD;EACF,EACF;CACD,iBAAiB,EACf,aAAa,YACd;CACF,CACF;AAED,SAAS,MAAM,EACb,WACA,cAAc,WACd,GAAG,SAC6C;AAChD,QACE,oBAAC;EACC,MAAK;EACL,aAAU;EACV,oBAAkB;EAClB,WAAW,GAAG,cAAc,EAAE,aAAa,CAAC,EAAE,UAAU;EACxD,GAAI;GACJ;;AAIN,SAAS,aAAa,EAAE,UAAW,GAAG,SAAmB;AACvD,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,iEACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAClB,UACA,GAAG,SACkC;AACrC,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,gHACA,iKACA,6HACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAAE,UAAW,GAAG,SAAmB;AACrD,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,8GACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,iBAAiB,EAAE,UAAW,GAAG,SAA0B;AAClE,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,uHACA,gEACA,qEACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,eAAe,EACtB,UACA,UACA,GAAG,SAGF;AACD,QACE,qBAAC;EACC,aAAU;EACV,gBAAc,CAAC,CAAC;EAChB,WAAW,GACT,6EACA,UACD;EACD,GAAI;aAEJ,oBAAC,aAAU,WAAU,6BAA6B,EACjD,YACC,oBAAC;GACC,WAAU;GACV,aAAU;GAET;IACG;GAEJ;;AAIV,SAAS,WAAW,EAClB,WACA,UACA,OACA,GAAG,SAGF;CACD,MAAM,UAAU,cAAc;AAC5B,MAAI,SACF,QAAO;AAGT,MAAI,CAAC,QAAQ,OACX,QAAO;AAGT,MAAI,QAAQ,UAAU,EACpB,QAAO,OAAO,IAAI;AAGpB,SACE,oBAAC;GAAO,WAAU;aACf,OAAO,KACL,OAAO,UAAU,OAAO,WAAW,oBAAC,eAAe,MAAM,WAAd,MAA0B,CACvE;IACM;IAEV,CAAC,UAAU,OAAO,CAAC;AAEtB,KAAI,CAAC,QACH,QAAO;AAGT,QACE,oBAAC;EACC,MAAK;EACL,aAAU;EACV,WAAW,GAAG,wCAAwC,UAAU;EAChE,GAAI;YAEH;GACG"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Label } from "./label.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { View } from "react-native";
|
|
4
|
+
import * as react_jsx_runtime80 from "react/jsx-runtime";
|
|
5
|
+
import * as react_hook_form0 from "react-hook-form";
|
|
6
|
+
import { ControllerProps, FieldPath, FieldValues, UseFormReturn, useFieldArray, useForm } from "react-hook-form";
|
|
7
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
8
|
+
|
|
9
|
+
//#region ui/form.d.ts
|
|
10
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form0.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
|
|
11
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
|
|
12
|
+
...props
|
|
13
|
+
}: ControllerProps<TFieldValues, TName>) => react_jsx_runtime80.JSX.Element;
|
|
14
|
+
declare const useFormField: () => {
|
|
15
|
+
invalid: boolean;
|
|
16
|
+
isDirty: boolean;
|
|
17
|
+
isTouched: boolean;
|
|
18
|
+
isValidating: boolean;
|
|
19
|
+
error?: react_hook_form0.FieldError;
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
formItemId: string;
|
|
23
|
+
formDescriptionId: string;
|
|
24
|
+
formMessageId: string;
|
|
25
|
+
};
|
|
26
|
+
declare function FormItem({
|
|
27
|
+
className,
|
|
28
|
+
...props
|
|
29
|
+
}: React$1.ComponentProps<'div'>): react_jsx_runtime80.JSX.Element;
|
|
30
|
+
declare function FormLabel({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: React$1.ComponentProps<typeof Label>): react_jsx_runtime80.JSX.Element;
|
|
34
|
+
declare function FormControl({
|
|
35
|
+
asChild,
|
|
36
|
+
...props
|
|
37
|
+
}: React$1.ComponentProps<typeof View> & {
|
|
38
|
+
asChild?: boolean;
|
|
39
|
+
}): react_jsx_runtime80.JSX.Element;
|
|
40
|
+
declare function FormDescription({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: React$1.ComponentProps<'p'>): react_jsx_runtime80.JSX.Element;
|
|
44
|
+
declare function FormMessage({
|
|
45
|
+
className,
|
|
46
|
+
...props
|
|
47
|
+
}: React$1.ComponentProps<'p'>): react_jsx_runtime80.JSX.Element | null;
|
|
48
|
+
//#endregion
|
|
49
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type UseFormReturn, useFieldArray, useForm, useFormField, zodResolver };
|
|
50
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","names":[],"sources":["../../ui/form.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;cAqBM,4BAAI,kDAAA,qBAAA,gBAAA,CAAA,kBAAA,cAAA,UAAA,wBAAA,OAAA,CAAA,GAAA,CAAA;cAaJ,iCACiB,cAAc,2BACrB,UAAU,gBAAgB,UAAU;;GAGjD,gBAAgB,cAAc,WAAM,mBAAA,CAAA,GAAA,CAAA;cAQjC;EA1BA,OAAmB,EAAA,OAAA;EAAf,OAAA,EAAA,OAAA;EAAA,SAAA,EAAA,OAAA;EAAA,YAAA,EAAA,OAAA;EAAA,KAAA,CAAA,EA+CT,gBAAA,CAAA,UA/CS;EAAA,EAAA,EAAA,MAAA;EAAA,IAAA,EAAA,MAAA;EAAA,UAAA,EAAA,MAAA;EAAe,iBAAA,EAAA,MAAA;EAanB,aAWL,EAAA,MAAA;CAVsB;iBA2Cd,QAAA,CA3C4B;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA2CM,OAAA,CAAM,cA3CZ,CAAA,KAAA,CAAA,CAAA,EA2CiC,mBAAA,CAAA,GAAA,CAAA,OA3CjC;iBAyD5B,SAAA,CAxDiB;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA2DvB,OAAA,CAAM,cA3DiB,CAAA,OA2DK,KA3DL,CAAA,CAAA,EA2DW,mBAAA,CAAA,GAAA,CAAA,OA3DX;iBAyEjB,WAAA,CAzEO;EAAA,OAAA;EAAA,GAAA;CAAA,EA4Eb,OAAA,CAAM,cA5EO,CAAA,OA4Ee,IA5Ef,CAAA,GAAA;EAAoC,OAAA,CAAA,EAAA,OAAA;CAAV,CAAA,EA8EzC,mBAAA,CAAA,GAAA,CAAA,OA9EyC;iBAkGjC,eAAA,CA/FU;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA+F+B,OAAA,CAAM,cA/FrC,CAAA,GAAA,CAAA,CAAA,EA+FwD,mBAAA,CAAA,GAAA,CAAA,OA/FxD;iBA4GV,WAAA,CA5GwB;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA4Ga,OAAA,CAAM,cA5GnB,CAAA,GAAA,CAAA,CAAA,EA4GsC,mBAAA,CAAA,GAAA,CAAA,OAAA,GA5GtC,IAAA"}
|
package/dist/ui/form.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { cn } from "./utils.js";
|
|
5
|
+
import { Label } from "./label.js";
|
|
6
|
+
import { Controller, FormProvider, useFieldArray, useForm, useFormContext, useFormState } from "../node_modules/react-hook-form/dist/index.esm.js";
|
|
7
|
+
import { a } from "../node_modules/@hookform/resolvers/zod/dist/zod.js";
|
|
8
|
+
import * as React$1 from "react";
|
|
9
|
+
import { View } from "react-native";
|
|
10
|
+
import * as Slot from "@rn-primitives/slot";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
|
|
13
|
+
//#region ui/form.tsx
|
|
14
|
+
const Form = FormProvider;
|
|
15
|
+
const FormFieldContext = React$1.createContext({});
|
|
16
|
+
const FormField = ({ ...props }) => {
|
|
17
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, {
|
|
18
|
+
value: { name: props.name },
|
|
19
|
+
children: /* @__PURE__ */ jsx(Controller, { ...props })
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
const useFormField = () => {
|
|
23
|
+
const fieldContext = React$1.useContext(FormFieldContext);
|
|
24
|
+
const itemContext = React$1.useContext(FormItemContext);
|
|
25
|
+
const { getFieldState } = useFormContext();
|
|
26
|
+
const formState = useFormState({ name: fieldContext.name });
|
|
27
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
28
|
+
if (!fieldContext) throw new Error("useFormField should be used within <FormField>");
|
|
29
|
+
const { id } = itemContext;
|
|
30
|
+
return {
|
|
31
|
+
id,
|
|
32
|
+
name: fieldContext.name,
|
|
33
|
+
formItemId: `${id}-form-item`,
|
|
34
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
35
|
+
formMessageId: `${id}-form-item-message`,
|
|
36
|
+
...fieldState
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
const FormItemContext = React$1.createContext({});
|
|
40
|
+
function FormItem({ className,...props }) {
|
|
41
|
+
const id = React$1.useId();
|
|
42
|
+
return /* @__PURE__ */ jsx(FormItemContext.Provider, {
|
|
43
|
+
value: { id },
|
|
44
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
45
|
+
"data-slot": "form-item",
|
|
46
|
+
className: cn("grid gap-2", className),
|
|
47
|
+
...props
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function FormLabel({ className,...props }) {
|
|
52
|
+
const { error, formItemId } = useFormField();
|
|
53
|
+
return /* @__PURE__ */ jsx(Label, {
|
|
54
|
+
"data-slot": "form-label",
|
|
55
|
+
"data-error": !!error,
|
|
56
|
+
className: cn("data-[error=true]:text-destructive", className),
|
|
57
|
+
htmlFor: formItemId,
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function FormControl({ asChild = false,...props }) {
|
|
62
|
+
const Component = asChild ? Slot.Text : View;
|
|
63
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
64
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
65
|
+
"data-slot": "form-control",
|
|
66
|
+
id: formItemId,
|
|
67
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
68
|
+
"aria-invalid": !!error,
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function FormDescription({ className,...props }) {
|
|
73
|
+
const { formDescriptionId } = useFormField();
|
|
74
|
+
return /* @__PURE__ */ jsx("p", {
|
|
75
|
+
"data-slot": "form-description",
|
|
76
|
+
id: formDescriptionId,
|
|
77
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
78
|
+
...props
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function FormMessage({ className,...props }) {
|
|
82
|
+
const { error, formMessageId } = useFormField();
|
|
83
|
+
const body = error ? String(error?.message ?? "") : props.children;
|
|
84
|
+
if (!body) return null;
|
|
85
|
+
return /* @__PURE__ */ jsx("p", {
|
|
86
|
+
"data-slot": "form-message",
|
|
87
|
+
id: formMessageId,
|
|
88
|
+
className: cn("text-destructive text-sm", className),
|
|
89
|
+
...props,
|
|
90
|
+
children: body
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFieldArray, useForm, useFormField, a as zodResolver };
|
|
96
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.js","names":["React","RNView"],"sources":["../../ui/form.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as Slot from '@rn-primitives/slot';\nimport { View as RNView } from 'react-native';\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n useFormState,\n} from 'react-hook-form';\n\nimport { cn } from './utils';\nimport { Label } from './label';\n\nexport { zodResolver } from '@hookform/resolvers/zod';\nexport { useForm, type UseFormReturn, useFieldArray } from 'react-hook-form';\n\nconst Form = FormProvider;\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n {} as FormFieldContextValue\n);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue\n);\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div\n data-slot=\"form-item\"\n className={cn('grid gap-2', className)}\n {...props}\n />\n </FormItemContext.Provider>\n );\n}\n\nfunction FormLabel({\n className,\n ...props\n}: React.ComponentProps<typeof Label>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n data-slot=\"form-label\"\n data-error={!!error}\n className={cn('data-[error=true]:text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormControl({\n asChild = false,\n ...props\n}: React.ComponentProps<typeof RNView> & {\n asChild?: boolean;\n}) {\n const Component = asChild ? Slot.Text : RNView;\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Component\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n {...props}\n />\n );\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n data-slot=\"form-description\"\n id={formDescriptionId}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n data-slot=\"form-message\"\n id={formMessageId}\n className={cn('text-destructive text-sm', className)}\n {...props}\n >\n {body}\n </p>\n );\n}\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n};\n"],"mappings":";;;;;;;;;;;;;AAqBA,MAAM,OAAO;AASb,MAAM,mBAAmBA,QAAM,cAC7B,EAAE,CACH;AAED,MAAM,aAGJ,EACA,GAAG,YACuC;AAC1C,QACE,oBAAC,iBAAiB;EAAS,OAAO,EAAE,MAAM,MAAM,MAAM;YACpD,oBAAC,cAAW,GAAI,QAAS;GACC;;AAIhC,MAAM,qBAAqB;CACzB,MAAM,eAAeA,QAAM,WAAW,iBAAiB;CACvD,MAAM,cAAcA,QAAM,WAAW,gBAAgB;CACrD,MAAM,EAAE,kBAAkB,gBAAgB;CAC1C,MAAM,YAAY,aAAa,EAAE,MAAM,aAAa,MAAM,CAAC;CAC3D,MAAM,aAAa,cAAc,aAAa,MAAM,UAAU;AAE9D,KAAI,CAAC,aACH,OAAM,IAAI,MAAM,iDAAiD;CAGnE,MAAM,EAAE,OAAO;AAEf,QAAO;EACL;EACA,MAAM,aAAa;EACnB,YAAY,GAAG,GAAG;EAClB,mBAAmB,GAAG,GAAG;EACzB,eAAe,GAAG,GAAG;EACrB,GAAG;EACJ;;AAOH,MAAM,kBAAkBA,QAAM,cAC5B,EAAE,CACH;AAED,SAAS,SAAS,EAAE,UAAW,GAAG,SAAsC;CACtE,MAAM,KAAKA,QAAM,OAAO;AAExB,QACE,oBAAC,gBAAgB;EAAS,OAAO,EAAE,IAAI;YACrC,oBAAC;GACC,aAAU;GACV,WAAW,GAAG,cAAc,UAAU;GACtC,GAAI;IACJ;GACuB;;AAI/B,SAAS,UAAU,EACjB,UACA,GAAG,SACkC;CACrC,MAAM,EAAE,OAAO,eAAe,cAAc;AAE5C,QACE,oBAAC;EACC,aAAU;EACV,cAAY,CAAC,CAAC;EACd,WAAW,GAAG,sCAAsC,UAAU;EAC9D,SAAS;EACT,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,UAAU,MACV,GAAG,SAGF;CACD,MAAM,YAAY,UAAU,KAAK,OAAOC;CACxC,MAAM,EAAE,OAAO,YAAY,mBAAmB,kBAC5C,cAAc;AAEhB,QACE,oBAAC;EACC,aAAU;EACV,IAAI;EACJ,oBACE,CAAC,QACG,GAAG,sBACH,GAAG,kBAAkB,GAAG;EAE9B,gBAAc,CAAC,CAAC;EAChB,GAAI;GACJ;;AAIN,SAAS,gBAAgB,EAAE,UAAW,GAAG,SAAoC;CAC3E,MAAM,EAAE,sBAAsB,cAAc;AAE5C,QACE,oBAAC;EACC,aAAU;EACV,IAAI;EACJ,WAAW,GAAG,iCAAiC,UAAU;EACzD,GAAI;GACJ;;AAIN,SAAS,YAAY,EAAE,UAAW,GAAG,SAAoC;CACvE,MAAM,EAAE,OAAO,kBAAkB,cAAc;CAC/C,MAAM,OAAO,QAAQ,OAAO,OAAO,WAAW,GAAG,GAAG,MAAM;AAE1D,KAAI,CAAC,KACH,QAAO;AAGT,QACE,oBAAC;EACC,aAAU;EACV,IAAI;EACJ,WAAW,GAAG,4BAA4B,UAAU;EACpD,GAAI;YAEH;GACC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_native25 from "react-native";
|
|
3
|
+
import * as react_jsx_runtime86 from "react/jsx-runtime";
|
|
4
|
+
import * as _rn_primitives_hover_card0 from "@rn-primitives/hover-card";
|
|
5
|
+
|
|
6
|
+
//#region ui/hover-card.d.ts
|
|
7
|
+
declare const HoverCard: React$1.ForwardRefExoticComponent<react_native25.ViewProps & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
} & {
|
|
10
|
+
onOpenChange?: (open: boolean) => void;
|
|
11
|
+
openDelay?: number;
|
|
12
|
+
closeDelay?: number;
|
|
13
|
+
} & React$1.RefAttributes<react_native25.View>>;
|
|
14
|
+
declare const HoverCardTrigger: React$1.ForwardRefExoticComponent<Omit<react_native25.PressableProps & React$1.RefAttributes<react_native25.View>, "ref"> & {
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
} & {
|
|
17
|
+
onKeyDown?: (ev: React$1.KeyboardEvent) => void;
|
|
18
|
+
onKeyUp?: (ev: React$1.KeyboardEvent) => void;
|
|
19
|
+
} & React$1.RefAttributes<_rn_primitives_hover_card0.TriggerRef>>;
|
|
20
|
+
declare function HoverCardContent({
|
|
21
|
+
className,
|
|
22
|
+
align,
|
|
23
|
+
sideOffset,
|
|
24
|
+
...props
|
|
25
|
+
}: _rn_primitives_hover_card0.ContentProps & {
|
|
26
|
+
ref?: React$1.RefObject<_rn_primitives_hover_card0.ContentRef>;
|
|
27
|
+
}): react_jsx_runtime86.JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
30
|
+
//# sourceMappingURL=hover-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-card.d.ts","names":[],"sources":["../../ui/hover-card.tsx"],"sourcesContent":[],"mappings":";;;;;;cAOM,WAAS,OAAA,CAAA,0BAA0B,cAAA,CAA1B,SAAA;;;;EAAT,SAAA,CAAA,EAAmC,MAAA;EAAA,UAAA,CAAA,EAA1B,MAAA;CAAA,wBAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA;cAET,kBAAgB,OAAA,CAAA,0BAAA,KAA6B,cAAA,CAA7B,cAAA,GAAA,OAAA,CAAA,cAAA,cAAA,CAAA,IAAA;EAFP,OAAA,CAAA,EAAA,OAAA;CAAA,GAAA;EAET,SAAA,CAAA,EAAA,CAAA,EAAA,uBAA6C,EAAA,GAAA,IAAA;EAAA,OAAA,CAAA,EAAA,CAAA,EAA7B,uBAAA,EAAA,GAAA,IAAA;CAAA,wBAAA,uCAAA,CAAA;iBAEb,gBAAA,CAFa;EAAA,SAAA;EAAA,KAAA;EAAA,UAAA;EAAA,GAAA;CAAA,EAOnB,0BAAA,CAAmB,YAPA,GAAA;EAAA,GAAA,CAAA,EAQd,OAAA,CAAM,SARQ,CAQE,0BAAA,CAAmB,UARrB,CAAA;IASrB,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { cn } from "./utils.js";
|
|
2
|
+
import { TextClassContext } from "./text.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Platform, StyleSheet } from "react-native";
|
|
5
|
+
import Animated, { FadeIn } from "react-native-reanimated";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import * as HoverCardPrimitive from "@rn-primitives/hover-card";
|
|
8
|
+
|
|
9
|
+
//#region ui/hover-card.tsx
|
|
10
|
+
const HoverCard = HoverCardPrimitive.Root;
|
|
11
|
+
const HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
12
|
+
function HoverCardContent({ className, align = "center", sideOffset = 4,...props }) {
|
|
13
|
+
const { open } = HoverCardPrimitive.useRootContext();
|
|
14
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { children: /* @__PURE__ */ jsx(HoverCardPrimitive.Overlay, {
|
|
15
|
+
style: Platform.OS !== "web" ? StyleSheet.absoluteFill : void 0,
|
|
16
|
+
children: /* @__PURE__ */ jsx(Animated.View, {
|
|
17
|
+
entering: FadeIn,
|
|
18
|
+
children: /* @__PURE__ */ jsx(TextClassContext.Provider, {
|
|
19
|
+
value: "text-popover-foreground",
|
|
20
|
+
children: /* @__PURE__ */ jsx(HoverCardPrimitive.Content, {
|
|
21
|
+
align,
|
|
22
|
+
sideOffset,
|
|
23
|
+
className: cn("border-border bg-popover shadow-foreground/5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 web:cursor-auto web:outline-hidden z-50 w-64 rounded-md border p-4 shadow-md", open ? "web:animate-in web:fade-in-0 web:zoom-in-95" : "web:animate-out web:fade-out-0 web:zoom-out-95", className),
|
|
24
|
+
...props
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
}) });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
33
|
+
//# sourceMappingURL=hover-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-card.js","names":[],"sources":["../../ui/hover-card.tsx"],"sourcesContent":["import * as HoverCardPrimitive from '@rn-primitives/hover-card';\nimport * as React from 'react';\nimport { Platform, StyleSheet } from 'react-native';\nimport Animated, { FadeIn } from 'react-native-reanimated';\nimport { cn } from './utils';\nimport { TextClassContext } from './text';\n\nconst HoverCard = HoverCardPrimitive.Root;\n\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\nfunction HoverCardContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: HoverCardPrimitive.ContentProps & {\n ref?: React.RefObject<HoverCardPrimitive.ContentRef>;\n}) {\n const { open } = HoverCardPrimitive.useRootContext();\n return (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Overlay\n style={Platform.OS !== 'web' ? StyleSheet.absoluteFill : undefined}\n >\n <Animated.View entering={FadeIn}>\n <TextClassContext.Provider value=\"text-popover-foreground\">\n <HoverCardPrimitive.Content\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'border-border bg-popover shadow-foreground/5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 web:cursor-auto web:outline-hidden z-50 w-64 rounded-md border p-4 shadow-md',\n open\n ? 'web:animate-in web:fade-in-0 web:zoom-in-95'\n : 'web:animate-out web:fade-out-0 web:zoom-out-95',\n className\n )}\n {...props}\n />\n </TextClassContext.Provider>\n </Animated.View>\n </HoverCardPrimitive.Overlay>\n </HoverCardPrimitive.Portal>\n );\n}\n\nexport { HoverCard, HoverCardContent, HoverCardTrigger };\n"],"mappings":";;;;;;;;;AAOA,MAAM,YAAY,mBAAmB;AAErC,MAAM,mBAAmB,mBAAmB;AAE5C,SAAS,iBAAiB,EACxB,WACA,QAAQ,UACR,aAAa,EACb,GAAG,SAGF;CACD,MAAM,EAAE,SAAS,mBAAmB,gBAAgB;AACpD,QACE,oBAAC,mBAAmB,oBAClB,oBAAC,mBAAmB;EAClB,OAAO,SAAS,OAAO,QAAQ,WAAW,eAAe;YAEzD,oBAAC,SAAS;GAAK,UAAU;aACvB,oBAAC,iBAAiB;IAAS,OAAM;cAC/B,oBAAC,mBAAmB;KACX;KACK;KACZ,WAAW,GACT,yRACA,OACI,gDACA,kDACJ,UACD;KACD,GAAI;MACJ;KACwB;IACd;GACW,GACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Check.js","names":[],"sources":["../../../ui/icons/Check.tsx"],"sourcesContent":["import { Check } from 'lucide-react-native';\nimport { iconWithClassName } from './iconWithClassName';\n\niconWithClassName(Check);\nexport { Check };\n"],"mappings":";;;;AAGA,kBAAkB,MAAM"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { iconWithClassName } from "./iconWithClassName.js";
|
|
2
|
+
import { ChevronDown } from "lucide-react-native";
|
|
3
|
+
|
|
4
|
+
//#region ui/icons/ChevronDown.tsx
|
|
5
|
+
iconWithClassName(ChevronDown);
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ChevronDown };
|
|
9
|
+
//# sourceMappingURL=ChevronDown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChevronDown.js","names":[],"sources":["../../../ui/icons/ChevronDown.tsx"],"sourcesContent":["import { ChevronDown } from 'lucide-react-native';\nimport { iconWithClassName } from './iconWithClassName';\n\niconWithClassName(ChevronDown);\nexport { ChevronDown };\n"],"mappings":";;;;AAGA,kBAAkB,YAAY"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { iconWithClassName } from "./iconWithClassName.js";
|
|
2
|
+
import { ChevronRight } from "lucide-react-native";
|
|
3
|
+
|
|
4
|
+
//#region ui/icons/ChevronRight.tsx
|
|
5
|
+
iconWithClassName(ChevronRight);
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ChevronRight };
|
|
9
|
+
//# sourceMappingURL=ChevronRight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChevronRight.js","names":[],"sources":["../../../ui/icons/ChevronRight.tsx"],"sourcesContent":["import { ChevronRight } from 'lucide-react-native';\nimport { iconWithClassName } from './iconWithClassName';\n\niconWithClassName(ChevronRight);\nexport { ChevronRight };\n"],"mappings":";;;;AAGA,kBAAkB,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChevronUp.js","names":[],"sources":["../../../ui/icons/ChevronUp.tsx"],"sourcesContent":["import { ChevronUp } from 'lucide-react-native';\nimport { iconWithClassName } from './iconWithClassName';\n\niconWithClassName(ChevronUp);\nexport { ChevronUp };\n"],"mappings":";;;;AAGA,kBAAkB,UAAU"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { iconWithClassName } from "./iconWithClassName.js";
|
|
2
|
+
import { CircleUserRoundIcon } from "lucide-react-native";
|
|
3
|
+
|
|
4
|
+
//#region ui/icons/CircleUser.tsx
|
|
5
|
+
iconWithClassName(CircleUserRoundIcon);
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { CircleUserRoundIcon };
|
|
9
|
+
//# sourceMappingURL=CircleUser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CircleUser.js","names":[],"sources":["../../../ui/icons/CircleUser.tsx"],"sourcesContent":["import { CircleUserRoundIcon } from 'lucide-react-native';\nimport { iconWithClassName } from './iconWithClassName';\n\niconWithClassName(CircleUserRoundIcon);\nexport { CircleUserRoundIcon };\n"],"mappings":";;;;AAGA,kBAAkB,oBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Info.js","names":[],"sources":["../../../ui/icons/Info.tsx"],"sourcesContent":["import { Info } from 'lucide-react-native';\nimport { iconWithClassName } from './iconWithClassName';\n\niconWithClassName(Info);\nexport { Info };\n"],"mappings":";;;;AAGA,kBAAkB,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Key.js","names":[],"sources":["../../../ui/icons/Key.tsx"],"sourcesContent":["import { KeyRoundIcon } from 'lucide-react-native';\nimport { iconWithClassName } from './iconWithClassName';\n\niconWithClassName(KeyRoundIcon);\nexport { KeyRoundIcon };\n"],"mappings":";;;;AAGA,kBAAkB,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MoonStar.js","names":[],"sources":["../../../ui/icons/MoonStar.tsx"],"sourcesContent":["import { MoonStar } from 'lucide-react-native';\nimport { iconWithClassName } from './iconWithClassName';\n\niconWithClassName(MoonStar);\nexport { MoonStar };\n"],"mappings":";;;;AAGA,kBAAkB,SAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sun.js","names":[],"sources":["../../../ui/icons/Sun.tsx"],"sourcesContent":["import { Sun } from 'lucide-react-native';\nimport { iconWithClassName } from './iconWithClassName';\n\niconWithClassName(Sun);\nexport { Sun };\n"],"mappings":";;;;AAGA,kBAAkB,IAAI"}
|