@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,34 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { LucideIcon } from "lucide-react-native";
|
|
3
|
+
import * as react_jsx_runtime137 from "react/jsx-runtime";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
5
|
+
import * as TogglePrimitive from "@rn-primitives/toggle";
|
|
6
|
+
import * as class_variance_authority_types12 from "class-variance-authority/types";
|
|
7
|
+
|
|
8
|
+
//#region ui/toggle.d.ts
|
|
9
|
+
declare const toggleVariants: (props?: ({
|
|
10
|
+
variant?: "default" | "outline" | null | undefined;
|
|
11
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
12
|
+
} & class_variance_authority_types12.ClassProp) | undefined) => string;
|
|
13
|
+
declare const toggleTextVariants: (props?: ({
|
|
14
|
+
variant?: "default" | "outline" | null | undefined;
|
|
15
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
16
|
+
} & class_variance_authority_types12.ClassProp) | undefined) => string;
|
|
17
|
+
declare function Toggle({
|
|
18
|
+
className,
|
|
19
|
+
variant,
|
|
20
|
+
size,
|
|
21
|
+
...props
|
|
22
|
+
}: TogglePrimitive.RootProps & VariantProps<typeof toggleVariants> & VariantProps<typeof toggleVariants> & {
|
|
23
|
+
ref?: React$1.RefObject<TogglePrimitive.RootRef>;
|
|
24
|
+
}): react_jsx_runtime137.JSX.Element;
|
|
25
|
+
declare function ToggleIcon({
|
|
26
|
+
className,
|
|
27
|
+
icon: Icon,
|
|
28
|
+
...props
|
|
29
|
+
}: React$1.ComponentPropsWithoutRef<LucideIcon> & {
|
|
30
|
+
icon: LucideIcon;
|
|
31
|
+
}): react_jsx_runtime137.JSX.Element;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { Toggle, ToggleIcon, toggleTextVariants, toggleVariants };
|
|
34
|
+
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","names":[],"sources":["../../ui/toggle.tsx"],"sourcesContent":[],"mappings":";;;;;;;;cAOM;;;IAoBL,gCAAA,CAAA;AAxB8B,cA0BzB,kBAFL,EAAA,CAAA,KAyBC,CAzBD,EAAA,CAAA;EAEK,OAAA,CAAA,EAAA,SAAA,GAoBL,SAAA,GAAA,IAAA,GAAA,SAAA;EAEQ,IAAA,CAAA,EAAA,SAAM,GAAA,IAAA,GAAA,IAAA,GAAA,IAAA,GAAA,SAAA;CACb,GAHD,gCAAA,CAAA,SAGC,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;iBADO,MAAA,CAEP;EAAA,SAAA;EAAA,OAAA;EAAA,IAAA;EAAA,GAAA;CAAA,EAGC,eAAA,CAAgB,SAHjB,GAIA,YAJA,CAAA,OAIoB,cAJpB,CAAA,GAKA,YALA,CAAA,OAKoB,cALpB,CAAA,GAAA;EACA,GAAA,CAAA,EAKQ,OAAA,CAAM,SALd,CAKwB,eAAA,CAAgB,OALxC,CAAA;CAEC,CAAA,EAIA,oBAAA,CAAA,GAAA,CAAA,OAJgB;iBA4BV,UAAA,CA3Ba;EAAA,SAAA;EAAA,IAAA,EA6Bd,IA7Bc;EAAA,GAAA;CAAA,EA+BnB,OAAA,CAAM,wBA/Ba,CA+BY,UA/BZ,CAAA,GAAA;EAApB,IAAA,EAgCM,UAhCN;CACoB,CAAA,EAgCrB,oBAAA,CAAA,GAAA,CAAA,OAhCqB"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { cn } from "./utils.js";
|
|
2
|
+
import { TextClassContext } from "./text.js";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
import * as TogglePrimitive from "@rn-primitives/toggle";
|
|
7
|
+
|
|
8
|
+
//#region ui/toggle.tsx
|
|
9
|
+
const toggleVariants = cva("web:group web:inline-flex items-center justify-center rounded-md web:ring-offset-background web:transition-colors web:hover:bg-muted active:bg-muted web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2", {
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-transparent",
|
|
13
|
+
outline: "border border-input bg-transparent web:hover:bg-accent active:bg-accent active:bg-accent"
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
default: "h-10 px-3 native:h-12 native:px-[12]",
|
|
17
|
+
sm: "h-9 px-2.5 native:h-10 native:px-[9]",
|
|
18
|
+
lg: "h-11 px-5 native:h-14 native:px-6"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: "default",
|
|
23
|
+
size: "default"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const toggleTextVariants = cva("text-sm native:text-base text-foreground font-medium", {
|
|
27
|
+
variants: {
|
|
28
|
+
variant: {
|
|
29
|
+
default: "",
|
|
30
|
+
outline: "web:group-hover:text-accent-foreground web:group-active:text-accent-foreground"
|
|
31
|
+
},
|
|
32
|
+
size: {
|
|
33
|
+
default: "",
|
|
34
|
+
sm: "",
|
|
35
|
+
lg: ""
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
variant: "default",
|
|
40
|
+
size: "default"
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
function Toggle({ className, variant, size,...props }) {
|
|
44
|
+
return /* @__PURE__ */ jsx(TextClassContext.Provider, {
|
|
45
|
+
value: cn(toggleTextVariants({
|
|
46
|
+
variant,
|
|
47
|
+
size
|
|
48
|
+
}), props.pressed ? "text-accent-foreground" : "web:group-hover:text-muted-foreground", className),
|
|
49
|
+
children: /* @__PURE__ */ jsx(TogglePrimitive.Root, {
|
|
50
|
+
className: cn(toggleVariants({
|
|
51
|
+
variant,
|
|
52
|
+
size
|
|
53
|
+
}), props.disabled && "web:pointer-events-none opacity-50", props.pressed && "bg-accent", className),
|
|
54
|
+
...props
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function ToggleIcon({ className, icon: Icon,...props }) {
|
|
59
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
60
|
+
className: cn(React$1.useContext(TextClassContext), className),
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
//#endregion
|
|
66
|
+
export { Toggle, ToggleIcon, toggleTextVariants, toggleVariants };
|
|
67
|
+
//# sourceMappingURL=toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.js","names":["React"],"sources":["../../ui/toggle.tsx"],"sourcesContent":["import * as TogglePrimitive from '@rn-primitives/toggle';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type { LucideIcon } from 'lucide-react-native';\nimport * as React from 'react';\nimport { cn } from './utils';\nimport { TextClassContext } from './text';\n\nconst toggleVariants = cva(\n 'web:group web:inline-flex items-center justify-center rounded-md web:ring-offset-background web:transition-colors web:hover:bg-muted active:bg-muted web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2',\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n outline:\n 'border border-input bg-transparent web:hover:bg-accent active:bg-accent active:bg-accent',\n },\n size: {\n default: 'h-10 px-3 native:h-12 native:px-[12]',\n sm: 'h-9 px-2.5 native:h-10 native:px-[9]',\n lg: 'h-11 px-5 native:h-14 native:px-6',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n);\n\nconst toggleTextVariants = cva(\n 'text-sm native:text-base text-foreground font-medium',\n {\n variants: {\n variant: {\n default: '',\n outline:\n 'web:group-hover:text-accent-foreground web:group-active:text-accent-foreground',\n },\n size: {\n default: '',\n sm: '',\n lg: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n);\n\nfunction Toggle({\n className,\n variant,\n size,\n ...props\n}: TogglePrimitive.RootProps &\n VariantProps<typeof toggleVariants> &\n VariantProps<typeof toggleVariants> & {\n ref?: React.RefObject<TogglePrimitive.RootRef>;\n }) {\n return (\n <TextClassContext.Provider\n value={cn(\n toggleTextVariants({ variant, size }),\n props.pressed\n ? 'text-accent-foreground'\n : 'web:group-hover:text-muted-foreground',\n className\n )}\n >\n <TogglePrimitive.Root\n className={cn(\n toggleVariants({ variant, size }),\n props.disabled && 'web:pointer-events-none opacity-50',\n props.pressed && 'bg-accent',\n className\n )}\n {...props}\n />\n </TextClassContext.Provider>\n );\n}\n\nfunction ToggleIcon({\n className,\n icon: Icon,\n ...props\n}: React.ComponentPropsWithoutRef<LucideIcon> & {\n icon: LucideIcon;\n}) {\n const textClass = React.useContext(TextClassContext);\n return <Icon className={cn(textClass, className)} {...props} />;\n}\n\nexport { Toggle, ToggleIcon, toggleTextVariants, toggleVariants };\n"],"mappings":";;;;;;;;AAOA,MAAM,iBAAiB,IACrB,8QACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SACE;GACH;EACD,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;GACL;EACF;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACP;CACF,CACF;AAED,MAAM,qBAAqB,IACzB,wDACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SACE;GACH;EACD,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;GACL;EACF;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACP;CACF,CACF;AAED,SAAS,OAAO,EACd,WACA,SACA,KACA,GAAG,SAKA;AACH,QACE,oBAAC,iBAAiB;EAChB,OAAO,GACL,mBAAmB;GAAE;GAAS;GAAM,CAAC,EACrC,MAAM,UACF,2BACA,yCACJ,UACD;YAED,oBAAC,gBAAgB;GACf,WAAW,GACT,eAAe;IAAE;IAAS;IAAM,CAAC,EACjC,MAAM,YAAY,sCAClB,MAAM,WAAW,aACjB,UACD;GACD,GAAI;IACJ;GACwB;;AAIhC,SAAS,WAAW,EAClB,WACA,MAAM,KACN,GAAG,SAGF;AAED,QAAO,oBAAC;EAAK,WAAW,GADNA,QAAM,WAAW,iBAAiB,EACd,UAAU;EAAE,GAAI;GAAS"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_native55 from "react-native";
|
|
3
|
+
import * as react_jsx_runtime139 from "react/jsx-runtime";
|
|
4
|
+
import * as _rn_primitives_tooltip0 from "@rn-primitives/tooltip";
|
|
5
|
+
|
|
6
|
+
//#region ui/tooltip.d.ts
|
|
7
|
+
declare const Tooltip: React$1.ForwardRefExoticComponent<react_native55.ViewProps & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
} & {
|
|
10
|
+
onOpenChange?: (open: boolean) => void;
|
|
11
|
+
delayDuration?: number;
|
|
12
|
+
skipDelayDuration?: number;
|
|
13
|
+
disableHoverableContent?: boolean;
|
|
14
|
+
} & React$1.RefAttributes<react_native55.View>>;
|
|
15
|
+
declare const TooltipTrigger: React$1.ForwardRefExoticComponent<Omit<react_native55.PressableProps & React$1.RefAttributes<react_native55.View>, "ref"> & {
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
} & {
|
|
18
|
+
onKeyDown?: (ev: React$1.KeyboardEvent) => void;
|
|
19
|
+
onKeyUp?: (ev: React$1.KeyboardEvent) => void;
|
|
20
|
+
} & React$1.RefAttributes<_rn_primitives_tooltip0.TriggerRef>>;
|
|
21
|
+
declare function TooltipContent({
|
|
22
|
+
className,
|
|
23
|
+
sideOffset,
|
|
24
|
+
portalHost,
|
|
25
|
+
...props
|
|
26
|
+
}: _rn_primitives_tooltip0.ContentProps & {
|
|
27
|
+
ref?: React$1.RefObject<_rn_primitives_tooltip0.ContentRef>;
|
|
28
|
+
portalHost?: string;
|
|
29
|
+
}): react_jsx_runtime139.JSX.Element;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Tooltip, TooltipContent, TooltipTrigger };
|
|
32
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","names":[],"sources":["../../ui/tooltip.tsx"],"sourcesContent":[],"mappings":";;;;;;cAOM,SAAO,OAAA,CAAA,0BAAwB,cAAA,CAAxB,SAAA;;;;EAAP,aAA+B,CAAA,EAAA,MAAA;EAAA,iBAAxB,CAAA,EAAA,MAAA;EAAA,uBAAA,CAAA,EAAA,OAAA;0BAAA,cAAA,CAAA,IAAA;cAEP,cAFO,EAEO,OAAA,CAAA,yBAFP,CAEO,IAFP,CAEkC,cAAA,CAA3B,cAAA,GAAA,OAAA,CAAA,aAFP,CAEO,cAAA,CAAA,IAAA,CAFP,EAAA,KAAA,CAAA,GAAA;EAAA,OAAA,CAAA,EAAA,OAAA;AAAA,CAAA,GAEP;EAAyC,SAAA,CAAA,EAA3B,CAAA,EAAA,uBAAA,EAAA,GAAA,IAAA;EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,uBAAA,EAAA,GAAA,IAAA;CAAA,wBAAA,oCAAA,CAAA;iBAEX,cAAA,CAFW;EAAA,SAAA;EAAA,UAAA;EAAA,UAAA;EAAA,GAAA;CAAA,EAOjB,uBAAA,CAAiB,YAPA,GAAA;QAQZ,OAAA,CAAM,UAAU,uBAAA,CAAiB;;IAExC,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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, FadeOut } from "react-native-reanimated";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import * as TooltipPrimitive from "@rn-primitives/tooltip";
|
|
8
|
+
|
|
9
|
+
//#region ui/tooltip.tsx
|
|
10
|
+
const Tooltip = TooltipPrimitive.Root;
|
|
11
|
+
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
12
|
+
function TooltipContent({ className, sideOffset = 4, portalHost,...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, {
|
|
14
|
+
hostName: portalHost,
|
|
15
|
+
children: /* @__PURE__ */ jsx(TooltipPrimitive.Overlay, {
|
|
16
|
+
style: Platform.OS !== "web" ? StyleSheet.absoluteFill : void 0,
|
|
17
|
+
children: /* @__PURE__ */ jsx(Animated.View, {
|
|
18
|
+
entering: Platform.select({
|
|
19
|
+
web: void 0,
|
|
20
|
+
default: FadeIn
|
|
21
|
+
}),
|
|
22
|
+
exiting: Platform.select({
|
|
23
|
+
web: void 0,
|
|
24
|
+
default: FadeOut
|
|
25
|
+
}),
|
|
26
|
+
children: /* @__PURE__ */ jsx(TextClassContext.Provider, {
|
|
27
|
+
value: "text-sm native:text-base text-popover-foreground",
|
|
28
|
+
children: /* @__PURE__ */ jsx(TooltipPrimitive.Content, {
|
|
29
|
+
sideOffset,
|
|
30
|
+
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:animate-in web:fade-in-0 web:zoom-in-95 z-50 overflow-hidden rounded-md border px-3 py-1.5 shadow-md", className),
|
|
31
|
+
...props
|
|
32
|
+
})
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Tooltip, TooltipContent, TooltipTrigger };
|
|
41
|
+
//# sourceMappingURL=tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.js","names":[],"sources":["../../ui/tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from '@rn-primitives/tooltip';\nimport * as React from 'react';\nimport { Platform, StyleSheet } from 'react-native';\nimport Animated, { FadeIn, FadeOut } from 'react-native-reanimated';\nimport { TextClassContext } from './text';\nimport { cn } from './utils';\n\nconst Tooltip = TooltipPrimitive.Root;\n\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\nfunction TooltipContent({\n className,\n sideOffset = 4,\n portalHost,\n ...props\n}: TooltipPrimitive.ContentProps & {\n ref?: React.RefObject<TooltipPrimitive.ContentRef>;\n portalHost?: string;\n}) {\n return (\n <TooltipPrimitive.Portal hostName={portalHost}>\n <TooltipPrimitive.Overlay\n style={Platform.OS !== 'web' ? StyleSheet.absoluteFill : undefined}\n >\n <Animated.View\n entering={Platform.select({ web: undefined, default: FadeIn })}\n exiting={Platform.select({ web: undefined, default: FadeOut })}\n >\n <TextClassContext.Provider value=\"text-sm native:text-base text-popover-foreground\">\n <TooltipPrimitive.Content\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:animate-in web:fade-in-0 web:zoom-in-95 z-50 overflow-hidden rounded-md border px-3 py-1.5 shadow-md',\n className\n )}\n {...props}\n />\n </TextClassContext.Provider>\n </Animated.View>\n </TooltipPrimitive.Overlay>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipContent, TooltipTrigger };\n"],"mappings":";;;;;;;;;AAOA,MAAM,UAAU,iBAAiB;AAEjC,MAAM,iBAAiB,iBAAiB;AAExC,SAAS,eAAe,EACtB,WACA,aAAa,GACb,WACA,GAAG,SAIF;AACD,QACE,oBAAC,iBAAiB;EAAO,UAAU;YACjC,oBAAC,iBAAiB;GAChB,OAAO,SAAS,OAAO,QAAQ,WAAW,eAAe;aAEzD,oBAAC,SAAS;IACR,UAAU,SAAS,OAAO;KAAE,KAAK;KAAW,SAAS;KAAQ,CAAC;IAC9D,SAAS,SAAS,OAAO;KAAE,KAAK;KAAW,SAAS;KAAS,CAAC;cAE9D,oBAAC,iBAAiB;KAAS,OAAM;eAC/B,oBAAC,iBAAiB;MACJ;MACZ,WAAW,GACT,qTACA,UACD;MACD,GAAI;OACJ;MACwB;KACd;IACS;GACH"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { TextProps } from "./text.js";
|
|
2
|
+
import * as react_jsx_runtime140 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region ui/typography.d.ts
|
|
5
|
+
type TypographyProps = TextProps & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare function H1({
|
|
9
|
+
className,
|
|
10
|
+
asChild,
|
|
11
|
+
...props
|
|
12
|
+
}: TypographyProps): react_jsx_runtime140.JSX.Element;
|
|
13
|
+
declare function H2({
|
|
14
|
+
className,
|
|
15
|
+
asChild,
|
|
16
|
+
...props
|
|
17
|
+
}: TypographyProps): react_jsx_runtime140.JSX.Element;
|
|
18
|
+
declare function H3({
|
|
19
|
+
className,
|
|
20
|
+
asChild,
|
|
21
|
+
...props
|
|
22
|
+
}: TypographyProps): react_jsx_runtime140.JSX.Element;
|
|
23
|
+
declare function H4({
|
|
24
|
+
className,
|
|
25
|
+
asChild,
|
|
26
|
+
...props
|
|
27
|
+
}: TypographyProps): react_jsx_runtime140.JSX.Element;
|
|
28
|
+
declare function P({
|
|
29
|
+
className,
|
|
30
|
+
asChild,
|
|
31
|
+
...props
|
|
32
|
+
}: TypographyProps): react_jsx_runtime140.JSX.Element;
|
|
33
|
+
declare function BlockQuote({
|
|
34
|
+
className,
|
|
35
|
+
asChild,
|
|
36
|
+
...props
|
|
37
|
+
}: TypographyProps): react_jsx_runtime140.JSX.Element;
|
|
38
|
+
declare function Code({
|
|
39
|
+
className,
|
|
40
|
+
asChild,
|
|
41
|
+
...props
|
|
42
|
+
}: TypographyProps): react_jsx_runtime140.JSX.Element;
|
|
43
|
+
declare function Lead({
|
|
44
|
+
className,
|
|
45
|
+
asChild,
|
|
46
|
+
...props
|
|
47
|
+
}: TypographyProps): react_jsx_runtime140.JSX.Element;
|
|
48
|
+
declare function Large({
|
|
49
|
+
className,
|
|
50
|
+
asChild,
|
|
51
|
+
...props
|
|
52
|
+
}: TypographyProps): react_jsx_runtime140.JSX.Element;
|
|
53
|
+
declare function Small({
|
|
54
|
+
className,
|
|
55
|
+
asChild,
|
|
56
|
+
...props
|
|
57
|
+
}: TypographyProps): react_jsx_runtime140.JSX.Element;
|
|
58
|
+
declare function Muted({
|
|
59
|
+
className,
|
|
60
|
+
asChild,
|
|
61
|
+
...props
|
|
62
|
+
}: TypographyProps): react_jsx_runtime140.JSX.Element;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { BlockQuote, Code, H1, H2, H3, H4, Large, Lead, Muted, P, Small, TypographyProps };
|
|
65
|
+
//# sourceMappingURL=typography.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.d.ts","names":[],"sources":["../../ui/typography.tsx"],"sourcesContent":[],"mappings":";;;;KAMY,eAAA,GAAkB;;;AAA9B,iBAIS,EAAA,CAJG;EAAe,SAAA;EAAA,OAAG;EAAA,GAAS;AAAA,CAAA,EAIe,eAJf,CAAA,EAI8B,oBAAA,CAAA,GAAA,CAAA,OAJ9B;AAErC,iBAiBO,EAAA,CAfE;EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EAe2C,eAf3C,CAAA,EAe0D,oBAAA,CAAA,GAAA,CAAA,OAf1D;iBA8BF,EAAA,CA9BK;EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EA8BwC,eA9BxC,CAAA,EA8BuD,oBAAA,CAAA,GAAA,CAAA,OA9BvD;iBA6CL,EAAA,CA7CgB;EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EA6C6B,eA7C7B,CAAA,EA6C4C,oBAAA,CAAA,GAAA,CAAA,OA7C5C;iBA4DhB,CAAA,CA5D6C;EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EA4DD,eA5DC,CAAA,EA4Dc,oBAAA,CAAA,GAAA,CAAA,OA5Dd;iBAsE7C,UAAA,CAtE4D;EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EAsEP,eAtEO,CAAA,EAsEQ,oBAAA,CAAA,GAAA,CAAA,OAtER;iBAqF5D,IAAA,CArF4D;EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EAqFb,eArFa,CAAA,EAqFE,oBAAA,CAAA,GAAA,CAAA,OArFF;AAAA,iBAoG5D,IAAA,CArFE;EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EAqF6C,eArF7C,CAAA,EAqF4D,oBAAA,CAAA,GAAA,CAAA,OArF5D;iBA+FF,KAAA,CA/FK;EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EA+F2C,eA/F3C,CAAA,EA+F0D,oBAAA,CAAA,GAAA,CAAA,OA/F1D;iBA4GL,KAAA,CA5GgB;EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EA4GgC,eA5GhC,CAAA,EA4G+C,oBAAA,CAAA,GAAA,CAAA,OA5G/C;iBAyHhB,KAAA,CAzH6C;EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EAyHG,eAzHH,CAAA,EAyHkB,oBAAA,CAAA,GAAA,CAAA,OAzHlB"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { cn } from "./utils.js";
|
|
2
|
+
import { Text as Text$1 } from "./text.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Platform } from "react-native";
|
|
5
|
+
import * as Slot from "@rn-primitives/slot";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region ui/typography.tsx
|
|
9
|
+
function H1({ className, asChild = false,...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(asChild ? Slot.Text : Text$1, {
|
|
11
|
+
role: "heading",
|
|
12
|
+
"aria-level": "1",
|
|
13
|
+
className: cn("text-foreground web:select-text web:scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl", className),
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function H2({ className, asChild = false,...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(asChild ? Slot.Text : Text$1, {
|
|
19
|
+
role: "heading",
|
|
20
|
+
"aria-level": "2",
|
|
21
|
+
className: cn("border-border text-foreground web:select-text web:scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0", className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function H3({ className, asChild = false,...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(asChild ? Slot.Text : Text$1, {
|
|
27
|
+
role: "heading",
|
|
28
|
+
"aria-level": "3",
|
|
29
|
+
className: cn("text-foreground web:select-text web:scroll-m-20 text-2xl font-semibold tracking-tight", className),
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function H4({ className, asChild = false,...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx(asChild ? Slot.Text : Text$1, {
|
|
35
|
+
role: "heading",
|
|
36
|
+
"aria-level": "4",
|
|
37
|
+
className: cn("text-foreground web:select-text web:scroll-m-20 text-xl font-semibold tracking-tight", className),
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function P({ className, asChild = false,...props }) {
|
|
42
|
+
return /* @__PURE__ */ jsx(asChild ? Slot.Text : Text$1, {
|
|
43
|
+
className: cn("text-foreground web:select-text text-base", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function BlockQuote({ className, asChild = false,...props }) {
|
|
48
|
+
return /* @__PURE__ */ jsx(asChild ? Slot.Text : Text$1, {
|
|
49
|
+
role: Platform.OS === "web" ? "blockquote" : void 0,
|
|
50
|
+
className: cn("native:mt-4 native:pl-3 border-border text-foreground web:select-text mt-6 border-l-2 pl-6 text-base italic", className),
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function Code({ className, asChild = false,...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsx(asChild ? Slot.Text : Text$1, {
|
|
56
|
+
role: Platform.OS === "web" ? "code" : void 0,
|
|
57
|
+
className: cn("bg-muted text-foreground web:select-text relative rounded-md px-[0.3rem] py-[0.2rem] text-sm font-semibold", className),
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function Lead({ className, asChild = false,...props }) {
|
|
62
|
+
return /* @__PURE__ */ jsx(asChild ? Slot.Text : Text$1, {
|
|
63
|
+
className: cn("text-muted-foreground web:select-text text-xl", className),
|
|
64
|
+
...props
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function Large({ className, asChild = false,...props }) {
|
|
68
|
+
return /* @__PURE__ */ jsx(asChild ? Slot.Text : Text$1, {
|
|
69
|
+
className: cn("text-foreground web:select-text text-xl font-semibold", className),
|
|
70
|
+
...props
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function Small({ className, asChild = false,...props }) {
|
|
74
|
+
return /* @__PURE__ */ jsx(asChild ? Slot.Text : Text$1, {
|
|
75
|
+
className: cn("text-foreground web:select-text text-sm leading-none font-medium", className),
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function Muted({ className, asChild = false,...props }) {
|
|
80
|
+
return /* @__PURE__ */ jsx(asChild ? Slot.Text : Text$1, {
|
|
81
|
+
className: cn("text-muted-foreground web:select-text text-sm", className),
|
|
82
|
+
...props
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
//#endregion
|
|
87
|
+
export { BlockQuote, Code, H1, H2, H3, H4, Large, Lead, Muted, P, Small };
|
|
88
|
+
//# sourceMappingURL=typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.js","names":["Text"],"sources":["../../ui/typography.tsx"],"sourcesContent":["import * as Slot from '@rn-primitives/slot';\nimport * as React from 'react';\nimport { Platform } from 'react-native';\nimport { Text, type TextProps } from './text';\nimport { cn } from './utils';\n\nexport type TypographyProps = TextProps & {\n asChild?: boolean;\n};\n\nfunction H1({ className, asChild = false, ...props }: TypographyProps) {\n const Component = asChild ? Slot.Text : Text;\n return (\n <Component\n role=\"heading\"\n aria-level=\"1\"\n className={cn(\n 'text-foreground web:select-text web:scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction H2({ className, asChild = false, ...props }: TypographyProps) {\n const Component = asChild ? Slot.Text : Text;\n return (\n <Component\n role=\"heading\"\n aria-level=\"2\"\n className={cn(\n 'border-border text-foreground web:select-text web:scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction H3({ className, asChild = false, ...props }: TypographyProps) {\n const Component = asChild ? Slot.Text : Text;\n return (\n <Component\n role=\"heading\"\n aria-level=\"3\"\n className={cn(\n 'text-foreground web:select-text web:scroll-m-20 text-2xl font-semibold tracking-tight',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction H4({ className, asChild = false, ...props }: TypographyProps) {\n const Component = asChild ? Slot.Text : Text;\n return (\n <Component\n role=\"heading\"\n aria-level=\"4\"\n className={cn(\n 'text-foreground web:select-text web:scroll-m-20 text-xl font-semibold tracking-tight',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction P({ className, asChild = false, ...props }: TypographyProps) {\n const Component = asChild ? Slot.Text : Text;\n return (\n <Component\n className={cn('text-foreground web:select-text text-base', className)}\n {...props}\n />\n );\n}\n\nfunction BlockQuote({ className, asChild = false, ...props }: TypographyProps) {\n const Component = asChild ? Slot.Text : Text;\n return (\n <Component\n // @ts-ignore - role of blockquote renders blockquote element on the web\n role={Platform.OS === 'web' ? 'blockquote' : undefined}\n className={cn(\n 'native:mt-4 native:pl-3 border-border text-foreground web:select-text mt-6 border-l-2 pl-6 text-base italic',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction Code({ className, asChild = false, ...props }: TypographyProps) {\n const Component = asChild ? Slot.Text : Text;\n return (\n <Component\n // @ts-ignore - role of code renders code element on the web\n role={Platform.OS === 'web' ? 'code' : undefined}\n className={cn(\n 'bg-muted text-foreground web:select-text relative rounded-md px-[0.3rem] py-[0.2rem] text-sm font-semibold',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction Lead({ className, asChild = false, ...props }: TypographyProps) {\n const Component = asChild ? Slot.Text : Text;\n return (\n <Component\n className={cn('text-muted-foreground web:select-text text-xl', className)}\n {...props}\n />\n );\n}\n\nfunction Large({ className, asChild = false, ...props }: TypographyProps) {\n const Component = asChild ? Slot.Text : Text;\n return (\n <Component\n className={cn(\n 'text-foreground web:select-text text-xl font-semibold',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction Small({ className, asChild = false, ...props }: TypographyProps) {\n const Component = asChild ? Slot.Text : Text;\n return (\n <Component\n className={cn(\n 'text-foreground web:select-text text-sm leading-none font-medium',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction Muted({ className, asChild = false, ...props }: TypographyProps) {\n const Component = asChild ? Slot.Text : Text;\n return (\n <Component\n className={cn('text-muted-foreground web:select-text text-sm', className)}\n {...props}\n />\n );\n}\n\nexport { BlockQuote, Code, H1, H2, H3, H4, Large, Lead, Muted, P, Small };\n"],"mappings":";;;;;;;;AAUA,SAAS,GAAG,EAAE,WAAW,UAAU,MAAO,GAAG,SAA0B;AAErE,QACE,oBAFgB,UAAU,KAAK,OAAOA;EAGpC,MAAK;EACL,cAAW;EACX,WAAW,GACT,sGACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,GAAG,EAAE,WAAW,UAAU,MAAO,GAAG,SAA0B;AAErE,QACE,oBAFgB,UAAU,KAAK,OAAOA;EAGpC,MAAK;EACL,cAAW;EACX,WAAW,GACT,gIACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,GAAG,EAAE,WAAW,UAAU,MAAO,GAAG,SAA0B;AAErE,QACE,oBAFgB,UAAU,KAAK,OAAOA;EAGpC,MAAK;EACL,cAAW;EACX,WAAW,GACT,yFACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,GAAG,EAAE,WAAW,UAAU,MAAO,GAAG,SAA0B;AAErE,QACE,oBAFgB,UAAU,KAAK,OAAOA;EAGpC,MAAK;EACL,cAAW;EACX,WAAW,GACT,wFACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,EAAE,EAAE,WAAW,UAAU,MAAO,GAAG,SAA0B;AAEpE,QACE,oBAFgB,UAAU,KAAK,OAAOA;EAGpC,WAAW,GAAG,6CAA6C,UAAU;EACrE,GAAI;GACJ;;AAIN,SAAS,WAAW,EAAE,WAAW,UAAU,MAAO,GAAG,SAA0B;AAE7E,QACE,oBAFgB,UAAU,KAAK,OAAOA;EAIpC,MAAM,SAAS,OAAO,QAAQ,eAAe;EAC7C,WAAW,GACT,+GACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,KAAK,EAAE,WAAW,UAAU,MAAO,GAAG,SAA0B;AAEvE,QACE,oBAFgB,UAAU,KAAK,OAAOA;EAIpC,MAAM,SAAS,OAAO,QAAQ,SAAS;EACvC,WAAW,GACT,8GACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,KAAK,EAAE,WAAW,UAAU,MAAO,GAAG,SAA0B;AAEvE,QACE,oBAFgB,UAAU,KAAK,OAAOA;EAGpC,WAAW,GAAG,iDAAiD,UAAU;EACzE,GAAI;GACJ;;AAIN,SAAS,MAAM,EAAE,WAAW,UAAU,MAAO,GAAG,SAA0B;AAExE,QACE,oBAFgB,UAAU,KAAK,OAAOA;EAGpC,WAAW,GACT,yDACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,MAAM,EAAE,WAAW,UAAU,MAAO,GAAG,SAA0B;AAExE,QACE,oBAFgB,UAAU,KAAK,OAAOA;EAGpC,WAAW,GACT,oEACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,MAAM,EAAE,WAAW,UAAU,MAAO,GAAG,SAA0B;AAExE,QACE,oBAFgB,UAAU,KAAK,OAAOA;EAGpC,WAAW,GAAG,iDAAiD,UAAU;EACzE,GAAI;GACJ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_native59 from "react-native";
|
|
2
|
+
|
|
3
|
+
//#region ui/useColorScheme.d.ts
|
|
4
|
+
declare function useColorScheme(): {
|
|
5
|
+
colorScheme: "light" | "dark";
|
|
6
|
+
isDarkColorScheme: boolean;
|
|
7
|
+
setColorScheme: (scheme: react_native59.ColorSchemeName) => void;
|
|
8
|
+
toggleColorScheme: () => void;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { useColorScheme };
|
|
12
|
+
//# sourceMappingURL=useColorScheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useColorScheme.d.ts","names":[],"sources":["../../ui/useColorScheme.tsx"],"sourcesContent":[],"mappings":";;;iBAIgB,cAAA,CAAA;;;EAAA,cAAA,EAAA,CAAc,MAAA,EAAA,cAAA,CAAA,eAAA,EAAA,GAAA,IAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useColorScheme as useColorScheme$1 } from "nativewind";
|
|
2
|
+
|
|
3
|
+
//#region ui/useColorScheme.tsx
|
|
4
|
+
const DEFAULT_COLOR_SCHEME = "light";
|
|
5
|
+
function useColorScheme() {
|
|
6
|
+
const { colorScheme, setColorScheme, toggleColorScheme } = useColorScheme$1();
|
|
7
|
+
return {
|
|
8
|
+
colorScheme: colorScheme ?? DEFAULT_COLOR_SCHEME,
|
|
9
|
+
isDarkColorScheme: colorScheme === "dark",
|
|
10
|
+
setColorScheme,
|
|
11
|
+
toggleColorScheme
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { useColorScheme };
|
|
17
|
+
//# sourceMappingURL=useColorScheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useColorScheme.js","names":["useNativewindColorScheme"],"sources":["../../ui/useColorScheme.tsx"],"sourcesContent":["import { useColorScheme as useNativewindColorScheme } from 'nativewind';\n\nconst DEFAULT_COLOR_SCHEME = 'light';\n\nexport function useColorScheme() {\n const { colorScheme, setColorScheme, toggleColorScheme } =\n useNativewindColorScheme();\n\n return {\n colorScheme: colorScheme ?? DEFAULT_COLOR_SCHEME,\n isDarkColorScheme: colorScheme === 'dark',\n setColorScheme,\n toggleColorScheme,\n };\n}\n"],"mappings":";;;AAEA,MAAM,uBAAuB;AAE7B,SAAgB,iBAAiB;CAC/B,MAAM,EAAE,aAAa,gBAAgB,sBACnCA,kBAA0B;AAE5B,QAAO;EACL,aAAa,eAAe;EAC5B,mBAAmB,gBAAgB;EACnC;EACA;EACD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region ui/useListState.d.ts
|
|
2
|
+
interface UseListStateOptions {
|
|
3
|
+
initialSearch?: string;
|
|
4
|
+
initialFilters?: Record<string, string>;
|
|
5
|
+
initialPage?: number;
|
|
6
|
+
initialItemsPerPage?: number;
|
|
7
|
+
debounceMs?: number;
|
|
8
|
+
}
|
|
9
|
+
interface UseListStateReturn {
|
|
10
|
+
searchQuery: string;
|
|
11
|
+
setSearchQuery: (query: string) => void;
|
|
12
|
+
filters: Record<string, string>;
|
|
13
|
+
setFilter: (key: string, value: string) => void;
|
|
14
|
+
clearFilters: () => void;
|
|
15
|
+
currentPage: number;
|
|
16
|
+
itemsPerPage: number;
|
|
17
|
+
setCurrentPage: (page: number) => void;
|
|
18
|
+
setItemsPerPage: (itemsPerPage: number) => void;
|
|
19
|
+
queryParams: {
|
|
20
|
+
search: string;
|
|
21
|
+
page: number;
|
|
22
|
+
limit: number;
|
|
23
|
+
} & Record<string, string | number>;
|
|
24
|
+
resetAll: () => void;
|
|
25
|
+
}
|
|
26
|
+
declare const useListState: ({
|
|
27
|
+
initialSearch,
|
|
28
|
+
initialFilters,
|
|
29
|
+
initialPage,
|
|
30
|
+
initialItemsPerPage
|
|
31
|
+
}?: UseListStateOptions) => UseListStateReturn;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { UseListStateOptions, UseListStateReturn, useListState };
|
|
34
|
+
//# sourceMappingURL=useListState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useListState.d.ts","names":[],"sources":["../../ui/useListState.tsx"],"sourcesContent":[],"mappings":";UAEiB,mBAAA;EAAA,aAAA,CAAA,EAAA,MAAmB;EAQnB,cAAA,CAAA,EANE,MAMgB,CAAA,MAAA,EAAA,MAMxB,CAAA;EAqBE,WAAA,CAAA,EAAA,MA2EZ;EA3E4B,mBAAA,CAAA,EAAA,MAAA;EAAA,UAAA,CAAA,EAAA,MAAA;;AAAA,UA3BZ,kBAAA,CA2BY;EAK1B,WAAA,EAAA,MAAA;EAA2B,cAAA,EAAA,CAAA,KAAA,EAAA,MAAA,EAAA,GAAA,IAAA;EAsE7B,OAAA,EAhGU,MAgGV,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;MAjFK;;;cAMO;;;;;IAKV,wBAA2B"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { useCallback, useMemo, useState } from "react";
|
|
2
|
+
|
|
3
|
+
//#region ui/useListState.tsx
|
|
4
|
+
const useListState = ({ initialSearch = "", initialFilters = {}, initialPage = 1, initialItemsPerPage = 25 } = {}) => {
|
|
5
|
+
const [searchQuery, setSearchQuery] = useState(initialSearch);
|
|
6
|
+
const [filters, setFilters] = useState(initialFilters);
|
|
7
|
+
const [currentPage, setCurrentPage] = useState(initialPage);
|
|
8
|
+
const [itemsPerPage, setItemsPerPage] = useState(initialItemsPerPage);
|
|
9
|
+
const setFilter = useCallback((key, value) => {
|
|
10
|
+
setFilters((prev) => ({
|
|
11
|
+
...prev,
|
|
12
|
+
[key]: value
|
|
13
|
+
}));
|
|
14
|
+
setCurrentPage(1);
|
|
15
|
+
}, []);
|
|
16
|
+
const clearFilters = useCallback(() => {
|
|
17
|
+
setFilters({});
|
|
18
|
+
setCurrentPage(1);
|
|
19
|
+
}, []);
|
|
20
|
+
const handleSetSearchQuery = useCallback((query) => {
|
|
21
|
+
setSearchQuery(query);
|
|
22
|
+
setCurrentPage(1);
|
|
23
|
+
}, []);
|
|
24
|
+
const handleSetItemsPerPage = useCallback((newItemsPerPage) => {
|
|
25
|
+
setItemsPerPage(newItemsPerPage);
|
|
26
|
+
setCurrentPage(1);
|
|
27
|
+
}, []);
|
|
28
|
+
const resetAll = useCallback(() => {
|
|
29
|
+
setSearchQuery(initialSearch);
|
|
30
|
+
setFilters(initialFilters);
|
|
31
|
+
setCurrentPage(initialPage);
|
|
32
|
+
setItemsPerPage(initialItemsPerPage);
|
|
33
|
+
}, [
|
|
34
|
+
initialSearch,
|
|
35
|
+
initialFilters,
|
|
36
|
+
initialPage,
|
|
37
|
+
initialItemsPerPage
|
|
38
|
+
]);
|
|
39
|
+
return {
|
|
40
|
+
searchQuery,
|
|
41
|
+
setSearchQuery: handleSetSearchQuery,
|
|
42
|
+
filters,
|
|
43
|
+
setFilter,
|
|
44
|
+
clearFilters,
|
|
45
|
+
currentPage,
|
|
46
|
+
itemsPerPage,
|
|
47
|
+
setCurrentPage,
|
|
48
|
+
setItemsPerPage: handleSetItemsPerPage,
|
|
49
|
+
queryParams: useMemo(() => {
|
|
50
|
+
const baseParams = {
|
|
51
|
+
search: searchQuery,
|
|
52
|
+
page: currentPage,
|
|
53
|
+
limit: itemsPerPage
|
|
54
|
+
};
|
|
55
|
+
const filterParams = {};
|
|
56
|
+
Object.entries(filters).forEach(([key, value]) => {
|
|
57
|
+
if (value) filterParams[key] = value;
|
|
58
|
+
});
|
|
59
|
+
return {
|
|
60
|
+
...baseParams,
|
|
61
|
+
...filterParams
|
|
62
|
+
};
|
|
63
|
+
}, [
|
|
64
|
+
searchQuery,
|
|
65
|
+
filters,
|
|
66
|
+
currentPage,
|
|
67
|
+
itemsPerPage
|
|
68
|
+
]),
|
|
69
|
+
resetAll
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
//#endregion
|
|
74
|
+
export { useListState };
|
|
75
|
+
//# sourceMappingURL=useListState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useListState.js","names":["filterParams: Record<string, string>"],"sources":["../../ui/useListState.tsx"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react';\n\nexport interface UseListStateOptions {\n initialSearch?: string;\n initialFilters?: Record<string, string>;\n initialPage?: number;\n initialItemsPerPage?: number;\n debounceMs?: number;\n}\n\nexport interface UseListStateReturn {\n // Search\n searchQuery: string;\n setSearchQuery: (query: string) => void;\n\n // Filters\n filters: Record<string, string>;\n setFilter: (key: string, value: string) => void;\n clearFilters: () => void;\n\n // Pagination\n currentPage: number;\n itemsPerPage: number;\n setCurrentPage: (page: number) => void;\n setItemsPerPage: (itemsPerPage: number) => void;\n\n // Combined state for API calls\n queryParams: {\n search: string;\n page: number;\n limit: number;\n } & Record<string, string | number>;\n\n // Reset all\n resetAll: () => void;\n}\n\nexport const useListState = ({\n initialSearch = '',\n initialFilters = {},\n initialPage = 1,\n initialItemsPerPage = 25,\n}: UseListStateOptions = {}): UseListStateReturn => {\n const [searchQuery, setSearchQuery] = useState(initialSearch);\n const [filters, setFilters] = useState(initialFilters);\n const [currentPage, setCurrentPage] = useState(initialPage);\n const [itemsPerPage, setItemsPerPage] = useState(initialItemsPerPage);\n\n const setFilter = useCallback((key: string, value: string) => {\n setFilters((prev) => ({\n ...prev,\n [key]: value,\n }));\n // Reset to first page when filtering\n setCurrentPage(1);\n }, []);\n\n const clearFilters = useCallback(() => {\n setFilters({});\n setCurrentPage(1);\n }, []);\n\n const handleSetSearchQuery = useCallback((query: string) => {\n setSearchQuery(query);\n // Reset to first page when searching\n setCurrentPage(1);\n }, []);\n\n const handleSetItemsPerPage = useCallback((newItemsPerPage: number) => {\n setItemsPerPage(newItemsPerPage);\n // Reset to first page when changing items per page\n setCurrentPage(1);\n }, []);\n\n const resetAll = useCallback(() => {\n setSearchQuery(initialSearch);\n setFilters(initialFilters);\n setCurrentPage(initialPage);\n setItemsPerPage(initialItemsPerPage);\n }, [initialSearch, initialFilters, initialPage, initialItemsPerPage]);\n\n const queryParams = useMemo(() => {\n const baseParams = {\n search: searchQuery,\n page: currentPage,\n limit: itemsPerPage,\n };\n\n // Add active filters to params\n const filterParams: Record<string, string> = {};\n Object.entries(filters).forEach(([key, value]) => {\n if (value) {\n filterParams[key] = value;\n }\n });\n\n return { ...baseParams, ...filterParams };\n }, [searchQuery, filters, currentPage, itemsPerPage]);\n\n return {\n searchQuery,\n setSearchQuery: handleSetSearchQuery,\n filters,\n setFilter,\n clearFilters,\n currentPage,\n itemsPerPage,\n setCurrentPage,\n setItemsPerPage: handleSetItemsPerPage,\n queryParams,\n resetAll,\n };\n};\n"],"mappings":";;;AAqCA,MAAa,gBAAgB,EAC3B,gBAAgB,IAChB,iBAAiB,EAAE,EACnB,cAAc,GACd,sBAAsB,OACC,EAAE,KAAyB;CAClD,MAAM,CAAC,aAAa,kBAAkB,SAAS,cAAc;CAC7D,MAAM,CAAC,SAAS,cAAc,SAAS,eAAe;CACtD,MAAM,CAAC,aAAa,kBAAkB,SAAS,YAAY;CAC3D,MAAM,CAAC,cAAc,mBAAmB,SAAS,oBAAoB;CAErE,MAAM,YAAY,aAAa,KAAa,UAAkB;AAC5D,cAAY,UAAU;GACpB,GAAG;IACF,MAAM;GACR,EAAE;AAEH,iBAAe,EAAE;IAChB,EAAE,CAAC;CAEN,MAAM,eAAe,kBAAkB;AACrC,aAAW,EAAE,CAAC;AACd,iBAAe,EAAE;IAChB,EAAE,CAAC;CAEN,MAAM,uBAAuB,aAAa,UAAkB;AAC1D,iBAAe,MAAM;AAErB,iBAAe,EAAE;IAChB,EAAE,CAAC;CAEN,MAAM,wBAAwB,aAAa,oBAA4B;AACrE,kBAAgB,gBAAgB;AAEhC,iBAAe,EAAE;IAChB,EAAE,CAAC;CAEN,MAAM,WAAW,kBAAkB;AACjC,iBAAe,cAAc;AAC7B,aAAW,eAAe;AAC1B,iBAAe,YAAY;AAC3B,kBAAgB,oBAAoB;IACnC;EAAC;EAAe;EAAgB;EAAa;EAAoB,CAAC;AAoBrE,QAAO;EACL;EACA,gBAAgB;EAChB;EACA;EACA;EACA;EACA;EACA;EACA,iBAAiB;EACjB,aA5BkB,cAAc;GAChC,MAAM,aAAa;IACjB,QAAQ;IACR,MAAM;IACN,OAAO;IACR;GAGD,MAAMA,eAAuC,EAAE;AAC/C,UAAO,QAAQ,QAAQ,CAAC,SAAS,CAAC,KAAK,WAAW;AAChD,QAAI,MACF,cAAa,OAAO;KAEtB;AAEF,UAAO;IAAE,GAAG;IAAY,GAAG;IAAc;KACxC;GAAC;GAAa;GAAS;GAAa;GAAa,CAAC;EAanD;EACD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime154 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region ui/usecases/UseCaseCard.d.ts
|
|
4
|
+
declare function UseCaseCard({
|
|
5
|
+
title,
|
|
6
|
+
summary,
|
|
7
|
+
ctaHref,
|
|
8
|
+
ctaLabel,
|
|
9
|
+
onCtaClick
|
|
10
|
+
}: {
|
|
11
|
+
title: string;
|
|
12
|
+
summary?: string;
|
|
13
|
+
ctaHref?: string;
|
|
14
|
+
ctaLabel?: string;
|
|
15
|
+
onCtaClick?: () => void;
|
|
16
|
+
}): react_jsx_runtime154.JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { UseCaseCard };
|
|
19
|
+
//# sourceMappingURL=UseCaseCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UseCaseCard.d.ts","names":[],"sources":["../../../ui/usecases/UseCaseCard.tsx"],"sourcesContent":[],"mappings":";;;iBAIgB,WAAA;;;;;;;;;EAAA,OAAA,CAAA,EAAA,MAAW;EACzB,QAAA,CAAA,EAAA,MAAA;EACA,UAAA,CAAA,EAAA,GAAA,GAAA,IAAA;CACA,CAAA,EASD,oBAAA,CAAA,GAAA,CAAA,OATC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Button } from "../button.js";
|
|
2
|
+
import { HStack, VStack } from "../stack.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region ui/usecases/UseCaseCard.tsx
|
|
7
|
+
function UseCaseCard({ title, summary, ctaHref, ctaLabel = "Learn more", onCtaClick }) {
|
|
8
|
+
return /* @__PURE__ */ jsxs(VStack, {
|
|
9
|
+
className: "rounded-lg border p-4",
|
|
10
|
+
gap: "sm",
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ jsx("div", {
|
|
13
|
+
className: "text-lg font-semibold",
|
|
14
|
+
children: title
|
|
15
|
+
}),
|
|
16
|
+
summary && /* @__PURE__ */ jsx("div", {
|
|
17
|
+
className: "text-muted-foreground text-base",
|
|
18
|
+
children: summary
|
|
19
|
+
}),
|
|
20
|
+
ctaHref && /* @__PURE__ */ jsx(HStack, { children: /* @__PURE__ */ jsx("a", {
|
|
21
|
+
href: ctaHref,
|
|
22
|
+
onClick: onCtaClick,
|
|
23
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
24
|
+
size: "sm",
|
|
25
|
+
variant: "outline",
|
|
26
|
+
children: ctaLabel
|
|
27
|
+
})
|
|
28
|
+
}) })
|
|
29
|
+
]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { UseCaseCard };
|
|
35
|
+
//# sourceMappingURL=UseCaseCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UseCaseCard.js","names":[],"sources":["../../../ui/usecases/UseCaseCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { VStack, HStack } from '../stack';\nimport { Button } from '../button';\n\nexport function UseCaseCard({\n title,\n summary,\n ctaHref,\n ctaLabel = 'Learn more',\n onCtaClick,\n}: {\n title: string;\n summary?: string;\n ctaHref?: string;\n ctaLabel?: string;\n onCtaClick?: () => void;\n}) {\n return (\n <VStack className=\"rounded-lg border p-4\" gap=\"sm\">\n <div className=\"text-lg font-semibold\">{title}</div>\n {summary && (\n <div className=\"text-muted-foreground text-base\">{summary}</div>\n )}\n {ctaHref && (\n <HStack>\n <a href={ctaHref} onClick={onCtaClick}>\n <Button size=\"sm\" variant=\"outline\">\n {ctaLabel}\n </Button>\n </a>\n </HStack>\n )}\n </VStack>\n );\n}\n"],"mappings":";;;;;;AAIA,SAAgB,YAAY,EAC1B,OACA,SACA,SACA,WAAW,cACX,cAOC;AACD,QACE,qBAAC;EAAO,WAAU;EAAwB,KAAI;;GAC5C,oBAAC;IAAI,WAAU;cAAyB;KAAY;GACnD,WACC,oBAAC;IAAI,WAAU;cAAmC;KAAc;GAEjE,WACC,oBAAC,oBACC,oBAAC;IAAE,MAAM;IAAS,SAAS;cACzB,oBAAC;KAAO,MAAK;KAAK,SAAQ;eACvB;MACM;KACP,GACG;;GAEJ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime155 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region ui/usecases/UserStoryCard.d.ts
|
|
4
|
+
declare function UserStoryCard({
|
|
5
|
+
title,
|
|
6
|
+
body,
|
|
7
|
+
outcome
|
|
8
|
+
}: {
|
|
9
|
+
title: string;
|
|
10
|
+
body?: string;
|
|
11
|
+
outcome?: string;
|
|
12
|
+
}): react_jsx_runtime155.JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { UserStoryCard };
|
|
15
|
+
//# sourceMappingURL=UserStoryCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserStoryCard.d.ts","names":[],"sources":["../../../ui/usecases/UserStoryCard.tsx"],"sourcesContent":[],"mappings":";;;iBAGgB,aAAA;;;;;;;EAAA,OAAA,CAAA,EAAA,MAAa;CAC3B,CAAA,EAOD,oBAAA,CAAA,GAAA,CAAA,OAPC"}
|