@lssm-tech/lib.ui-kit 4.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +180 -0
- package/dist/browser/index.js +1 -0
- package/dist/browser/ui/accordion.js +1 -0
- package/dist/browser/ui/alert-dialog.js +1 -0
- package/dist/browser/ui/alert.js +1 -0
- package/dist/browser/ui/aspect-ratio.js +1 -0
- package/dist/browser/ui/atoms/FilterSelect/FilterSelect.js +1 -0
- package/dist/browser/ui/atoms/FilterSelect/index.js +1 -0
- package/dist/browser/ui/atoms/FilterSelect/types.js +0 -0
- package/dist/browser/ui/atoms/LoadingSpinner/LoadingSpinner.js +1 -0
- package/dist/browser/ui/atoms/LoadingSpinner/index.js +1 -0
- package/dist/browser/ui/atoms/Pagination/Pagination.js +1 -0
- package/dist/browser/ui/atoms/Pagination/index.js +1 -0
- package/dist/browser/ui/atoms/Pagination/types.js +0 -0
- package/dist/browser/ui/atoms/SearchInput/SearchInput.js +1 -0
- package/dist/browser/ui/atoms/SearchInput/index.js +1 -0
- package/dist/browser/ui/atoms/SearchInput/types.js +0 -0
- package/dist/browser/ui/avatar.js +1 -0
- package/dist/browser/ui/badge.js +1 -0
- package/dist/browser/ui/breadcrumb.js +1 -0
- package/dist/browser/ui/button.js +1 -0
- package/dist/browser/ui/card.js +1 -0
- package/dist/browser/ui/carousel.js +1 -0
- package/dist/browser/ui/checkbox.js +1 -0
- package/dist/browser/ui/collapsible.js +1 -0
- package/dist/browser/ui/combobox.js +1 -0
- package/dist/browser/ui/command.js +1 -0
- package/dist/browser/ui/context-menu.js +1 -0
- package/dist/browser/ui/contracts.typecheck.js +0 -0
- package/dist/browser/ui/data-table.js +1 -0
- package/dist/browser/ui/date-picker.js +1 -0
- package/dist/browser/ui/date-range-picker.js +1 -0
- package/dist/browser/ui/datetime-picker.js +1 -0
- package/dist/browser/ui/dialog.js +1 -0
- package/dist/browser/ui/dropdown-menu.js +1 -0
- package/dist/browser/ui/empty-state.js +1 -0
- package/dist/browser/ui/empty.js +1 -0
- package/dist/browser/ui/fab.js +1 -0
- package/dist/browser/ui/field.js +1 -0
- package/dist/browser/ui/form.js +1 -0
- package/dist/browser/ui/hover-card.js +1 -0
- package/dist/browser/ui/icons/Check.js +1 -0
- package/dist/browser/ui/icons/ChevronDown.js +1 -0
- package/dist/browser/ui/icons/ChevronRight.js +1 -0
- package/dist/browser/ui/icons/ChevronUp.js +1 -0
- package/dist/browser/ui/icons/CircleUser.js +1 -0
- package/dist/browser/ui/icons/Info.js +1 -0
- package/dist/browser/ui/icons/Key.js +1 -0
- package/dist/browser/ui/icons/MoonStar.js +1 -0
- package/dist/browser/ui/icons/Sun.js +1 -0
- package/dist/browser/ui/icons/X.js +1 -0
- package/dist/browser/ui/icons/iconWithClassName.js +1 -0
- package/dist/browser/ui/input-group.js +1 -0
- package/dist/browser/ui/input-otp.js +1 -0
- package/dist/browser/ui/input-password.js +1 -0
- package/dist/browser/ui/input.js +1 -0
- package/dist/browser/ui/label.js +1 -0
- package/dist/browser/ui/link.js +1 -0
- package/dist/browser/ui/list.js +1 -0
- package/dist/browser/ui/loading-button.js +1 -0
- package/dist/browser/ui/loading-overlay.js +1 -0
- package/dist/browser/ui/loading-screen.js +1 -0
- package/dist/browser/ui/marketing/FeatureGrid.js +1 -0
- package/dist/browser/ui/marketing/Hero.js +1 -0
- package/dist/browser/ui/marketing/PricingTable.js +1 -0
- package/dist/browser/ui/marketing/index.js +1 -0
- package/dist/browser/ui/menubar.js +1 -0
- package/dist/browser/ui/molecules/Autocomplete/index.js +1 -0
- package/dist/browser/ui/molecules/SearchAndFilter/SearchAndFilter.js +1 -0
- package/dist/browser/ui/molecules/SearchAndFilter/index.js +1 -0
- package/dist/browser/ui/molecules/SearchAndFilter/types.js +0 -0
- package/dist/browser/ui/molecules/SkeletonList.js +1 -0
- package/dist/browser/ui/native-select.js +1 -0
- package/dist/browser/ui/nativewind-env.d.js +0 -0
- package/dist/browser/ui/navigation-menu.js +1 -0
- package/dist/browser/ui/organisms/ErrorBoundary/ErrorBoundary.js +1 -0
- package/dist/browser/ui/organisms/ErrorBoundary/index.js +1 -0
- package/dist/browser/ui/organisms/ListPage/ListPage.js +1 -0
- package/dist/browser/ui/organisms/ListPage/index.js +1 -0
- package/dist/browser/ui/organisms/ListPage/types.js +0 -0
- package/dist/browser/ui/page-header.js +1 -0
- package/dist/browser/ui/password-strength.js +1 -0
- package/dist/browser/ui/popover.js +1 -0
- package/dist/browser/ui/portal.js +1 -0
- package/dist/browser/ui/progress.js +1 -0
- package/dist/browser/ui/radio-group.js +1 -0
- package/dist/browser/ui/select.js +1 -0
- package/dist/browser/ui/separator.js +1 -0
- package/dist/browser/ui/sheet.js +1 -0
- package/dist/browser/ui/sidebar.js +1 -0
- package/dist/browser/ui/skeleton.js +1 -0
- package/dist/browser/ui/slider.js +1 -0
- package/dist/browser/ui/stack.js +1 -0
- package/dist/browser/ui/stepper.js +1 -0
- package/dist/browser/ui/switch.js +1 -0
- package/dist/browser/ui/table.js +1 -0
- package/dist/browser/ui/tabs.js +1 -0
- package/dist/browser/ui/text.js +1 -0
- package/dist/browser/ui/textarea.js +1 -0
- package/dist/browser/ui/time-picker.js +1 -0
- package/dist/browser/ui/toast.js +1 -0
- package/dist/browser/ui/toggle-group.js +1 -0
- package/dist/browser/ui/toggle.js +1 -0
- package/dist/browser/ui/toolbar.js +1 -0
- package/dist/browser/ui/tooltip.js +1 -0
- package/dist/browser/ui/typography.js +1 -0
- package/dist/browser/ui/useColorScheme.js +1 -0
- package/dist/browser/ui/useListState.js +1 -0
- package/dist/browser/ui/usecases/UseCaseCard.js +1 -0
- package/dist/browser/ui/usecases/UserStoryCard.js +1 -0
- package/dist/browser/ui/usecases/index.js +1 -0
- package/dist/browser/ui/utils.js +1 -0
- package/dist/browser/ui/visualization/Visualization.js +1 -0
- package/dist/browser/ui/visualization/index.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/ui/accordion.d.ts +16 -0
- package/dist/ui/accordion.js +2 -0
- package/dist/ui/alert-dialog.d.ts +46 -0
- package/dist/ui/alert-dialog.js +2 -0
- package/dist/ui/alert.d.ts +17 -0
- package/dist/ui/alert.js +2 -0
- package/dist/ui/aspect-ratio.d.ts +8 -0
- package/dist/ui/aspect-ratio.js +2 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +3 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.js +2 -0
- package/dist/ui/atoms/FilterSelect/index.d.ts +2 -0
- package/dist/ui/atoms/FilterSelect/index.js +2 -0
- package/dist/ui/atoms/FilterSelect/types.d.ts +5 -0
- package/dist/ui/atoms/FilterSelect/types.js +1 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +19 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +2 -0
- package/dist/ui/atoms/LoadingSpinner/index.d.ts +1 -0
- package/dist/ui/atoms/LoadingSpinner/index.js +2 -0
- package/dist/ui/atoms/Pagination/Pagination.d.ts +3 -0
- package/dist/ui/atoms/Pagination/Pagination.js +2 -0
- package/dist/ui/atoms/Pagination/index.d.ts +2 -0
- package/dist/ui/atoms/Pagination/index.js +2 -0
- package/dist/ui/atoms/Pagination/types.d.ts +3 -0
- package/dist/ui/atoms/Pagination/types.js +1 -0
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts +3 -0
- package/dist/ui/atoms/SearchInput/SearchInput.js +2 -0
- package/dist/ui/atoms/SearchInput/index.d.ts +2 -0
- package/dist/ui/atoms/SearchInput/index.js +2 -0
- package/dist/ui/atoms/SearchInput/types.d.ts +3 -0
- package/dist/ui/atoms/SearchInput/types.js +1 -0
- package/dist/ui/avatar.d.ts +13 -0
- package/dist/ui/avatar.js +2 -0
- package/dist/ui/badge.d.ts +11 -0
- package/dist/ui/badge.js +2 -0
- package/dist/ui/breadcrumb.d.ts +12 -0
- package/dist/ui/breadcrumb.js +2 -0
- package/dist/ui/button.d.ts +16 -0
- package/dist/ui/button.js +2 -0
- package/dist/ui/card.d.ts +22 -0
- package/dist/ui/card.js +2 -0
- package/dist/ui/carousel.d.ts +1 -0
- package/dist/ui/carousel.js +2 -0
- package/dist/ui/checkbox.d.ts +12 -0
- package/dist/ui/checkbox.js +2 -0
- package/dist/ui/collapsible.d.ts +27 -0
- package/dist/ui/collapsible.js +2 -0
- package/dist/ui/combobox.d.ts +17 -0
- package/dist/ui/combobox.js +2 -0
- package/dist/ui/command.d.ts +1 -0
- package/dist/ui/command.js +2 -0
- package/dist/ui/context-menu.d.ts +83 -0
- package/dist/ui/context-menu.js +2 -0
- package/dist/ui/contracts.typecheck.d.ts +1 -0
- package/dist/ui/contracts.typecheck.js +1 -0
- package/dist/ui/data-table.d.ts +8 -0
- package/dist/ui/data-table.js +2 -0
- package/dist/ui/data-table.smoke.test.d.ts +1 -0
- package/dist/ui/date-picker.d.ts +4 -0
- package/dist/ui/date-picker.js +2 -0
- package/dist/ui/date-range-picker.d.ts +6 -0
- package/dist/ui/date-range-picker.js +2 -0
- package/dist/ui/datetime-picker.d.ts +6 -0
- package/dist/ui/datetime-picker.js +2 -0
- package/dist/ui/dialog.d.ts +51 -0
- package/dist/ui/dialog.js +2 -0
- package/dist/ui/dropdown-menu.d.ts +84 -0
- package/dist/ui/dropdown-menu.js +2 -0
- package/dist/ui/empty-state.d.ts +9 -0
- package/dist/ui/empty-state.js +2 -0
- package/dist/ui/empty.d.ts +12 -0
- package/dist/ui/empty.js +2 -0
- package/dist/ui/fab.d.ts +21 -0
- package/dist/ui/fab.js +2 -0
- package/dist/ui/field.d.ts +21 -0
- package/dist/ui/field.js +2 -0
- package/dist/ui/form.d.ts +29 -0
- package/dist/ui/form.js +2 -0
- package/dist/ui/hover-card.d.ts +25 -0
- package/dist/ui/hover-card.js +2 -0
- package/dist/ui/icons/Check.d.ts +2 -0
- package/dist/ui/icons/Check.js +2 -0
- package/dist/ui/icons/ChevronDown.d.ts +2 -0
- package/dist/ui/icons/ChevronDown.js +2 -0
- package/dist/ui/icons/ChevronRight.d.ts +2 -0
- package/dist/ui/icons/ChevronRight.js +2 -0
- package/dist/ui/icons/ChevronUp.d.ts +2 -0
- package/dist/ui/icons/ChevronUp.js +2 -0
- package/dist/ui/icons/CircleUser.d.ts +2 -0
- package/dist/ui/icons/CircleUser.js +2 -0
- package/dist/ui/icons/Info.d.ts +2 -0
- package/dist/ui/icons/Info.js +2 -0
- package/dist/ui/icons/Key.d.ts +2 -0
- package/dist/ui/icons/Key.js +2 -0
- package/dist/ui/icons/MoonStar.d.ts +2 -0
- package/dist/ui/icons/MoonStar.js +2 -0
- package/dist/ui/icons/Sun.d.ts +2 -0
- package/dist/ui/icons/Sun.js +2 -0
- package/dist/ui/icons/X.d.ts +2 -0
- package/dist/ui/icons/X.js +2 -0
- package/dist/ui/icons/iconWithClassName.d.ts +2 -0
- package/dist/ui/icons/iconWithClassName.js +2 -0
- package/dist/ui/input-group.d.ts +36 -0
- package/dist/ui/input-group.js +2 -0
- package/dist/ui/input-otp.d.ts +20 -0
- package/dist/ui/input-otp.js +2 -0
- package/dist/ui/input-password.d.ts +10 -0
- package/dist/ui/input-password.js +2 -0
- package/dist/ui/input.d.ts +8 -0
- package/dist/ui/input.js +2 -0
- package/dist/ui/label.d.ts +3 -0
- package/dist/ui/label.js +2 -0
- package/dist/ui/link.d.ts +6 -0
- package/dist/ui/link.js +2 -0
- package/dist/ui/list.d.ts +23 -0
- package/dist/ui/list.js +2 -0
- package/dist/ui/loading-button.d.ts +9 -0
- package/dist/ui/loading-button.js +2 -0
- package/dist/ui/loading-overlay.d.ts +7 -0
- package/dist/ui/loading-overlay.js +2 -0
- package/dist/ui/loading-screen.d.ts +6 -0
- package/dist/ui/loading-screen.js +2 -0
- package/dist/ui/marketing/FeatureGrid.d.ts +4 -0
- package/dist/ui/marketing/FeatureGrid.js +2 -0
- package/dist/ui/marketing/Hero.d.ts +16 -0
- package/dist/ui/marketing/Hero.js +2 -0
- package/dist/ui/marketing/PricingTable.d.ts +4 -0
- package/dist/ui/marketing/PricingTable.js +2 -0
- package/dist/ui/marketing/index.d.ts +3 -0
- package/dist/ui/marketing/index.js +2 -0
- package/dist/ui/menubar.d.ts +80 -0
- package/dist/ui/menubar.js +2 -0
- package/dist/ui/molecules/Autocomplete/index.d.ts +1 -0
- package/dist/ui/molecules/Autocomplete/index.js +2 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +3 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +2 -0
- package/dist/ui/molecules/SearchAndFilter/index.d.ts +2 -0
- package/dist/ui/molecules/SearchAndFilter/index.js +2 -0
- package/dist/ui/molecules/SearchAndFilter/types.d.ts +4 -0
- package/dist/ui/molecules/SearchAndFilter/types.js +1 -0
- package/dist/ui/molecules/SkeletonList.d.ts +7 -0
- package/dist/ui/molecules/SkeletonList.js +2 -0
- package/dist/ui/native-select.d.ts +29 -0
- package/dist/ui/native-select.js +2 -0
- package/dist/ui/nativewind-env.d.js +1 -0
- package/dist/ui/navigation-menu.d.ts +44 -0
- package/dist/ui/navigation-menu.js +2 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +25 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +2 -0
- package/dist/ui/organisms/ErrorBoundary/index.d.ts +2 -0
- package/dist/ui/organisms/ErrorBoundary/index.js +2 -0
- package/dist/ui/organisms/ListPage/ListPage.d.ts +2 -0
- package/dist/ui/organisms/ListPage/ListPage.js +2 -0
- package/dist/ui/organisms/ListPage/index.d.ts +2 -0
- package/dist/ui/organisms/ListPage/index.js +2 -0
- package/dist/ui/organisms/ListPage/types.d.ts +44 -0
- package/dist/ui/organisms/ListPage/types.js +1 -0
- package/dist/ui/page-header.d.ts +9 -0
- package/dist/ui/page-header.js +2 -0
- package/dist/ui/password-strength.d.ts +13 -0
- package/dist/ui/password-strength.js +2 -0
- package/dist/ui/popover.d.ts +23 -0
- package/dist/ui/popover.js +2 -0
- package/dist/ui/portal.d.ts +1 -0
- package/dist/ui/portal.js +2 -0
- package/dist/ui/progress.d.ts +7 -0
- package/dist/ui/progress.js +2 -0
- package/dist/ui/radio-group.d.ts +4 -0
- package/dist/ui/radio-group.js +2 -0
- package/dist/ui/select.d.ts +60 -0
- package/dist/ui/select.js +2 -0
- package/dist/ui/separator.d.ts +6 -0
- package/dist/ui/separator.js +2 -0
- package/dist/ui/sheet.d.ts +1 -0
- package/dist/ui/sheet.js +2 -0
- package/dist/ui/sidebar.d.ts +1 -0
- package/dist/ui/sidebar.js +2 -0
- package/dist/ui/skeleton.d.ts +4 -0
- package/dist/ui/skeleton.js +2 -0
- package/dist/ui/slider.d.ts +7 -0
- package/dist/ui/slider.js +2 -0
- package/dist/ui/stack.d.ts +43 -0
- package/dist/ui/stack.js +2 -0
- package/dist/ui/stepper.d.ts +10 -0
- package/dist/ui/stepper.js +2 -0
- package/dist/ui/switch.d.ts +7 -0
- package/dist/ui/switch.js +2 -0
- package/dist/ui/table.d.ts +24 -0
- package/dist/ui/table.js +2 -0
- package/dist/ui/tabs.d.ts +6 -0
- package/dist/ui/tabs.js +2 -0
- package/dist/ui/text.d.ts +12 -0
- package/dist/ui/text.js +2 -0
- package/dist/ui/textarea.d.ts +8 -0
- package/dist/ui/textarea.js +2 -0
- package/dist/ui/time-picker.d.ts +4 -0
- package/dist/ui/time-picker.js +2 -0
- package/dist/ui/toast.d.ts +40 -0
- package/dist/ui/toast.js +2 -0
- package/dist/ui/toggle-group.d.ts +15 -0
- package/dist/ui/toggle-group.js +2 -0
- package/dist/ui/toggle.d.ts +19 -0
- package/dist/ui/toggle.js +2 -0
- package/dist/ui/toolbar.d.ts +25 -0
- package/dist/ui/toolbar.js +2 -0
- package/dist/ui/tooltip.d.ts +27 -0
- package/dist/ui/tooltip.js +2 -0
- package/dist/ui/typography.d.ts +16 -0
- package/dist/ui/typography.js +2 -0
- package/dist/ui/useColorScheme.d.ts +6 -0
- package/dist/ui/useColorScheme.js +2 -0
- package/dist/ui/useListState.d.ts +6 -0
- package/dist/ui/useListState.js +2 -0
- package/dist/ui/usecases/UseCaseCard.d.ts +7 -0
- package/dist/ui/usecases/UseCaseCard.js +2 -0
- package/dist/ui/usecases/UserStoryCard.d.ts +5 -0
- package/dist/ui/usecases/UserStoryCard.js +2 -0
- package/dist/ui/usecases/index.d.ts +2 -0
- package/dist/ui/usecases/index.js +2 -0
- package/dist/ui/utils.d.ts +2 -0
- package/dist/ui/utils.js +2 -0
- package/dist/ui/visualization/Visualization.d.ts +7 -0
- package/dist/ui/visualization/Visualization.js +2 -0
- package/dist/ui/visualization/index.d.ts +1 -0
- package/dist/ui/visualization/index.js +2 -0
- package/package.json +1776 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Input, type InputProps } from './input';
|
|
3
|
+
import { Box, type BoxProps, HStack, type HStackProps } from './stack';
|
|
4
|
+
type InputOTPProps = InputProps & {
|
|
5
|
+
containerClassName?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function InputOTP({ className, containerClassName, ...props }: InputOTPProps & {
|
|
8
|
+
ref?: React.RefObject<React.ComponentRef<typeof Input>>;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function InputOTPGroup({ className, ...props }: HStackProps & {
|
|
11
|
+
ref?: React.RefObject<React.ComponentRef<typeof HStack>>;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function InputOTPSlot({ index: _index, className, ...props }: BoxProps & {
|
|
14
|
+
index: number;
|
|
15
|
+
ref?: React.RefObject<React.ComponentRef<typeof Box>>;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function InputOTPSeparator({ className, children, ...props }: BoxProps & {
|
|
18
|
+
ref?: React.RefObject<React.ComponentRef<typeof Box>>;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as P}from"@contractspec/lib.ui-kit-core/utils";import*as R from"@rn-primitives/slot";import*as M from"react";import{Text as f}from"react-native";import{jsx as V}from"react/jsx-runtime";var I=M.createContext(void 0);function B({className:z,asChild:q=!1,...A}){let D=M.useContext(I);return V(q?R.Text:f,{className:P("web:select-text text-base text-foreground",D,z),...A})}import{cn as W}from"@contractspec/lib.ui-kit-core/utils";import{cva as X}from"class-variance-authority";import{View as Y}from"react-native";import{jsx as G}from"react/jsx-runtime";var Z="flex",b=X([Z,"flex-col"],{variants:{spacing:{none:"",xs:"gap-y-1",sm:"gap-y-2",md:"gap-y-4",lg:"gap-y-6",xl:"gap-y-8","2xl":"gap-y-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"}},defaultVariants:{spacing:"md",align:"stretch",justify:"start",width:"auto",padding:"none",gap:"none"}}),v=X([Z,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"start",width:"auto",padding:"none",gap:"none",wrap:"wrap"}}),y=X([Z,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"center",width:"auto",padding:"none",gap:"none",wrap:"wrap"}});function _({className:z,spacing:q,align:A,justify:D,width:E,padding:J,gap:K,wrap:L,...U}){return G(Y,{className:W(y({spacing:q,align:A,justify:D,width:E,padding:J,gap:K,wrap:L}),z),...U})}function $({className:z,spacing:q,align:A,justify:D,width:E,padding:J,gap:K,wrap:L,...U}){return G(Y,{className:W(v({spacing:q,align:A,justify:D,width:E,padding:J,gap:K,wrap:L}),z),...U})}function g({className:z,spacing:q,align:A,justify:D,width:E,padding:J,gap:K,...L}){return G(Y,{className:W(b({spacing:q,align:A,justify:D,width:E,padding:J,gap:K}),z),...L})}import{cn as H}from"@contractspec/lib.ui-kit-core/utils";import{TextInput as T}from"react-native";import{jsx as k}from"react/jsx-runtime";function O({className:z,placeholderClassName:q,...A}){return k(T,{className:H("web:flex h-10 native:h-12 web:w-full rounded-md border border-input bg-background px-3 web:py-2 native:text-lg text-base text-foreground native:leading-tight web:ring-offset-background file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 lg:text-sm",A.editable===!1&&"web:cursor-not-allowed opacity-50",z),placeholderClassName:H("text-muted-foreground",q),...A})}import{cn as Q}from"@contractspec/lib.ui-kit-core/utils";import{jsx as F}from"react/jsx-runtime";function p({className:z,containerClassName:q,...A}){return F($,{className:Q("items-center",q),width:"full",children:F(O,{className:z,...A})})}function t({className:z,...q}){return F($,{className:Q("items-center",z),...q})}function s({index:z,className:q,...A}){return F(_,{className:Q("h-10 w-10 items-center justify-center rounded-md border border-input",q),...A})}function a({className:z,children:q,...A}){return F(_,{className:Q("items-center justify-center px-1",z),...A,children:q??F(B,{children:"-"})})}export{s as InputOTPSlot,a as InputOTPSeparator,t as InputOTPGroup,p as InputOTP};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type InputProps } from './input';
|
|
2
|
+
export type PasswordPurpose = 'current' | 'new';
|
|
3
|
+
export type InputPasswordProps = Omit<InputProps, 'secureTextEntry' | 'textContentType'> & {
|
|
4
|
+
passwordPurpose?: PasswordPurpose;
|
|
5
|
+
visibilityToggle?: boolean;
|
|
6
|
+
showLabel?: string;
|
|
7
|
+
hideLabel?: string;
|
|
8
|
+
};
|
|
9
|
+
declare function InputPassword({ className, passwordPurpose, visibilityToggle, showLabel, hideLabel, autoComplete, editable, disabled, ...props }: InputPasswordProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { InputPassword };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as S}from"@contractspec/lib.ui-kit-core/utils";import{TextInput as k}from"react-native";import{jsx as E}from"react/jsx-runtime";function K({className:q,placeholderClassName:B,...F}){return E(k,{className:S("web:flex h-10 native:h-12 web:w-full rounded-md border border-input bg-background px-3 web:py-2 native:text-lg text-base text-foreground native:leading-tight web:ring-offset-background file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 lg:text-sm",F.editable===!1&&"web:cursor-not-allowed opacity-50",q),placeholderClassName:S("text-muted-foreground",B),...F})}import{cn as V}from"@contractspec/lib.ui-kit-core/utils";import{Eye as A,EyeOff as g}from"lucide-react-native";import*as U from"react";import{Pressable as L,View as D}from"react-native";import{jsx as H,jsxs as P}from"react/jsx-runtime";function h(q){return q==="new"?"new-password":"current-password"}function I(q){return q==="new"?"newPassword":"password"}function m({className:q,passwordPurpose:B="current",visibilityToggle:F=!0,showLabel:W="Show password",hideLabel:X="Hide password",autoComplete:Y,editable:Z,disabled:J,...M}){let[G,_]=U.useState(!1),z=Boolean(J||Z===!1),$=G?X:W,O=G?g:A,Q=Y??h(B),R=I(B);if(!F)return H(K,{className:q,secureTextEntry:!0,autoComplete:Q,textContentType:R,editable:!z,disabled:J,...M});return P(D,{className:V("web:flex native:h-12 web:w-full flex-row items-center rounded-md border border-input bg-background px-3 text-foreground web:ring-offset-background",z&&"web:cursor-not-allowed opacity-50",q),children:[H(K,{className:"native:h-12 web:h-10 min-w-0 flex-1 border-0 bg-transparent px-0 shadow-none web:focus-visible:ring-0 web:focus-visible:ring-offset-0",secureTextEntry:!G,autoComplete:Q,textContentType:R,editable:!z,disabled:J,...M}),H(L,{accessibilityRole:"button",accessibilityLabel:$,accessibilityState:{disabled:z,selected:G},disabled:z,className:"native:h-10 native:w-10 items-center justify-center",onPress:()=>{_((f)=>!f)},children:H(O,{size:18,color:"#64748b"})})]})}export{m as InputPassword};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SharedInputProps } from '@contractspec/lib.ui-kit-core/interfaces';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { TextInput, type TextInputProps } from 'react-native';
|
|
4
|
+
export type InputProps = SharedInputProps & TextInputProps & {
|
|
5
|
+
ref?: React.RefObject<TextInput>;
|
|
6
|
+
};
|
|
7
|
+
declare function Input({ className, placeholderClassName, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { Input };
|
package/dist/ui/input.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as g}from"@contractspec/lib.ui-kit-core/utils";import{TextInput as y}from"react-native";import{jsx as z}from"react/jsx-runtime";function D({className:q,placeholderClassName:w,...f}){return z(y,{className:g("web:flex h-10 native:h-12 web:w-full rounded-md border border-input bg-background px-3 web:py-2 native:text-lg text-base text-foreground native:leading-tight web:ring-offset-background file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 lg:text-sm",f.editable===!1&&"web:cursor-not-allowed opacity-50",q),placeholderClassName:g("text-muted-foreground",w),...f})}export{D as Input};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as LabelPrimitive from '@rn-primitives/label';
|
|
2
|
+
declare function Label({ className, onPress, onLongPress, onPressIn, onPressOut, disabled, ...props }: LabelPrimitive.TextProps & React.RefAttributes<LabelPrimitive.TextRef>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export { Label };
|
package/dist/ui/label.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as w}from"@contractspec/lib.ui-kit-core/utils";import*as h from"@rn-primitives/label";import{Platform as y}from"react-native";import{jsx as z}from"react/jsx-runtime";function J({className:A,onPress:B,onLongPress:C,onPressIn:D,onPressOut:E,disabled:q,...F}){return z(h.Root,{className:w("flex select-none flex-row items-center gap-2",y.select({web:"cursor-default leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50"}),q&&"opacity-50"),onPress:B,onLongPress:C,onPressIn:D,onPressOut:E,disabled:q,children:z(h.Text,{className:w("font-medium text-foreground text-sm",y.select({web:"leading-none"}),A),...F})})}export{J as Label};
|
package/dist/ui/link.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import type { ViewProps } from 'react-native';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
export type ListType = 'unordered' | 'ordered' | 'none';
|
|
6
|
+
declare const listVariants: (props?: ({
|
|
7
|
+
spacing?: "none" | "sm" | "lg" | "xs" | "md" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
export type ListProps = ViewProps & VariantProps<typeof listVariants> & {
|
|
10
|
+
type?: ListType;
|
|
11
|
+
ref?: React.RefObject<React.ComponentRef<typeof View>>;
|
|
12
|
+
};
|
|
13
|
+
declare function List({ className, type, spacing, ...props }: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare const listItemVariants: (props?: ({
|
|
15
|
+
tone?: "default" | "muted" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
|
+
export type ListItemProps = ViewProps & VariantProps<typeof listItemVariants> & {
|
|
18
|
+
index?: number;
|
|
19
|
+
marker?: React.ReactNode | false;
|
|
20
|
+
ref?: React.RefObject<React.ComponentRef<typeof View>>;
|
|
21
|
+
};
|
|
22
|
+
declare function ListItem({ children, className, tone, index, marker, ...props }: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { List, ListItem, listItemVariants, listVariants };
|
package/dist/ui/list.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as G}from"@contractspec/lib.ui-kit-core/utils";import{cva as H}from"class-variance-authority";import*as B from"react";import{Text as Q,View as E}from"react-native";import{jsx as A,jsxs as W}from"react/jsx-runtime";var J=B.createContext("unordered"),R=H("flex flex-col",{variants:{spacing:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4"}},defaultVariants:{spacing:"sm"}});function _({className:f,type:z="unordered",spacing:q,...D}){return A(J.Provider,{value:z,children:A(E,{role:"list",className:G(R({spacing:q}),f),...D})})}var S=H("flex flex-row items-start",{variants:{tone:{default:"",muted:"text-muted-foreground"}},defaultVariants:{tone:"default"}});function U(f,z,q){if(q!==void 0)return q;if(f==="none")return!1;if(f==="ordered")return`${z??1}.`;return"\u2022"}function $({children:f,className:z,tone:q,index:D,marker:K,...O}){let P=B.useContext(J),F=U(P,D,K);return W(E,{role:"listitem",className:G(S({tone:q}),z),...O,children:[F===!1?null:A(Q,{className:"mr-2 min-w-4 text-foreground",children:F}),A(E,{className:"flex-1",children:f})]})}export{R as listVariants,S as listItemVariants,$ as ListItem,_ as List};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SharedLoadingButtonProps } from '@contractspec/lib.ui-kit-core/interfaces';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { ButtonProps } from './button';
|
|
4
|
+
export interface LoadingButtonProps extends SharedLoadingButtonProps, ButtonProps {
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
loadingText?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function LoadingButton({ isLoading, loadingText, children, disabled, ...props }: LoadingButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as Y}from"@contractspec/lib.ui-kit-core/utils";import*as M from"@rn-primitives/slot";import*as H from"react";import{Text as Z}from"react-native";import{jsx as _}from"react/jsx-runtime";var q=H.createContext(void 0);function O({className:o,asChild:L=!1,...f}){let B=H.useContext(q);return _(L?M.Text:Z,{className:Y("web:select-text text-base text-foreground",B,o),...f})}import{cn as $}from"@contractspec/lib.ui-kit-core/utils";import{cva as U}from"class-variance-authority";import{Pressable as z}from"react-native";import{jsx as Q}from"react/jsx-runtime";var S=U("group flex items-center justify-center rounded-md web:ring-offset-background web:transition-colors web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2",{variants:{variant:{default:"bg-primary web:hover:opacity-90 active:opacity-90",destructive:"bg-destructive web:hover:opacity-90 active:opacity-90",outline:"border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",secondary:"bg-secondary web:hover:opacity-80 active:opacity-80",ghost:"web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",link:"web:underline-offset-4 web:hover:underline web:focus:underline"},size:{default:"h-10 native:h-12 native:px-5 px-4 native:py-3 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 native:h-14 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),k=U("web:whitespace-nowrap font-medium native:text-base text-foreground text-sm web:transition-colors",{variants:{variant:{default:"text-primary-foreground",destructive:"text-destructive-foreground",outline:"group-active:text-accent-foreground",secondary:"text-secondary-foreground group-active:text-secondary-foreground",ghost:"group-active:text-accent-foreground",link:"text-primary group-active:underline"},size:{default:"",sm:"",lg:"native:text-lg",icon:""}},defaultVariants:{variant:"default",size:"default"}});function W({ref:o,className:L,variant:f,size:B,...P}){return Q(q.Provider,{value:k({variant:f,size:B,className:"web:pointer-events-none"}),children:Q(z,{className:$(P.disabled&&"web:pointer-events-none opacity-50",S({variant:f,size:B,className:L})),ref:o,role:"button",...P})})}import{cn as D}from"@contractspec/lib.ui-kit-core/utils";import{cva as E}from"class-variance-authority";import{View as F}from"react-native";import{jsx as J}from"react/jsx-runtime";var G="flex",T=E([G,"flex-col"],{variants:{spacing:{none:"",xs:"gap-y-1",sm:"gap-y-2",md:"gap-y-4",lg:"gap-y-6",xl:"gap-y-8","2xl":"gap-y-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"}},defaultVariants:{spacing:"md",align:"stretch",justify:"start",width:"auto",padding:"none",gap:"none"}}),d=E([G,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"start",width:"auto",padding:"none",gap:"none",wrap:"wrap"}}),b=E([G,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"center",width:"auto",padding:"none",gap:"none",wrap:"wrap"}});function e({className:o,spacing:L,align:f,justify:B,width:P,padding:m,gap:R,wrap:A,...I}){return J(F,{className:D(b({spacing:L,align:f,justify:B,width:P,padding:m,gap:R,wrap:A}),o),...I})}function X({className:o,spacing:L,align:f,justify:B,width:P,padding:m,gap:R,wrap:A,...I}){return J(F,{className:D(d({spacing:L,align:f,justify:B,width:P,padding:m,gap:R,wrap:A}),o),...I})}function t({className:o,spacing:L,align:f,justify:B,width:P,padding:m,gap:R,...A}){return J(F,{className:D(T({spacing:L,align:f,justify:B,width:P,padding:m,gap:R}),o),...A})}import{ActivityIndicator as h}from"react-native";import{jsx as K,jsxs as y}from"react/jsx-runtime";function Bo({isLoading:o=!1,loadingText:L,children:f,disabled:B,...P}){return K(W,{disabled:B||o,...P,children:o?y(X,{className:"items-center gap-x-2",children:[K(h,{size:"small"}),K(O,{children:L||"Loading..."})]}):f})}export{Bo as LoadingButton};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as V}from"@contractspec/lib.ui-kit-core/utils";import*as M from"@rn-primitives/slot";import*as J from"react";import{Text as y}from"react-native";import{jsx as H}from"react/jsx-runtime";var B=J.createContext(void 0);function L({className:O,asChild:f=!1,...I}){let z=J.useContext(B);return H(f?M.Text:y,{className:V("web:select-text text-base text-foreground",z,O),...I})}import{cn as W}from"@contractspec/lib.ui-kit-core/utils";import{cva as X}from"class-variance-authority";import{View as Y}from"react-native";import{jsx as $}from"react/jsx-runtime";var Z="flex",k=X([Z,"flex-col"],{variants:{spacing:{none:"",xs:"gap-y-1",sm:"gap-y-2",md:"gap-y-4",lg:"gap-y-6",xl:"gap-y-8","2xl":"gap-y-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"}},defaultVariants:{spacing:"md",align:"stretch",justify:"start",width:"auto",padding:"none",gap:"none"}}),S=X([Z,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"start",width:"auto",padding:"none",gap:"none",wrap:"wrap"}}),v=X([Z,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"center",width:"auto",padding:"none",gap:"none",wrap:"wrap"}});function r({className:O,spacing:f,align:I,justify:z,width:D,padding:E,gap:F,wrap:G,...U}){return $(Y,{className:W(v({spacing:f,align:I,justify:z,width:D,padding:E,gap:F,wrap:G}),O),...U})}function j({className:O,spacing:f,align:I,justify:z,width:D,padding:E,gap:F,wrap:G,...U}){return $(Y,{className:W(S({spacing:f,align:I,justify:z,width:D,padding:E,gap:F,wrap:G}),O),...U})}function _({className:O,spacing:f,align:I,justify:z,width:D,padding:E,gap:F,...G}){return $(Y,{className:W(k({spacing:f,align:I,justify:z,width:D,padding:E,gap:F}),O),...G})}import{cn as b}from"@contractspec/lib.ui-kit-core/utils";import*as A from"@rn-primitives/slot";import{Platform as P}from"react-native";import{jsx as q}from"react/jsx-runtime";function i({className:O,asChild:f=!1,...I}){return q(f?A.Text:L,{role:"heading","aria-level":"1",className:b("web:select-text web:scroll-m-20 font-extrabold text-4xl text-foreground tracking-tight lg:text-5xl",O),...I})}function l({className:O,asChild:f=!1,...I}){return q(f?A.Text:L,{role:"heading","aria-level":"2",className:b("web:select-text web:scroll-m-20 border-border border-b pb-2 font-semibold text-3xl text-foreground tracking-tight first:mt-0",O),...I})}function Q({className:O,asChild:f=!1,...I}){return q(f?A.Text:L,{role:"heading","aria-level":"3",className:b("web:select-text web:scroll-m-20 font-semibold text-2xl text-foreground tracking-tight",O),...I})}function c({className:O,asChild:f=!1,...I}){return q(f?A.Text:L,{role:"heading","aria-level":"4",className:b("web:select-text web:scroll-m-20 font-semibold text-foreground text-xl tracking-tight",O),...I})}function p({className:O,asChild:f=!1,...I}){return q(f?A.Text:L,{className:b("web:select-text text-base text-foreground",O),...I})}function a({className:O,asChild:f=!1,...I}){return q(f?A.Text:L,{role:P.OS==="web"?"blockquote":void 0,className:b("mt-6 native:mt-4 web:select-text border-border border-l-2 native:pl-3 pl-6 text-base text-foreground italic",O),...I})}function s({className:O,asChild:f=!1,...I}){return q(f?A.Text:L,{role:P.OS==="web"?"code":void 0,className:b("relative web:select-text rounded-md bg-muted px-[0.3rem] py-[0.2rem] font-semibold text-foreground text-sm",O),...I})}function I0({className:O,asChild:f=!1,...I}){return q(f?A.Text:L,{className:b("web:select-text text-muted-foreground text-xl",O),...I})}function O0({className:O,asChild:f=!1,...I}){return q(f?A.Text:L,{className:b("web:select-text font-semibold text-foreground text-xl",O),...I})}function f0({className:O,asChild:f=!1,...I}){return q(f?A.Text:L,{className:b("web:select-text font-medium text-foreground text-sm leading-none",O),...I})}function z0({className:O,asChild:f=!1,...I}){return q(f?A.Text:L,{className:b("web:select-text text-muted-foreground text-sm",O),...I})}import{ActivityIndicator as u,View as g}from"react-native";import{jsx as K,jsxs as R}from"react/jsx-runtime";function F0({isVisible:O,title:f="Loading...",subtitle:I}){if(!O)return null;return K(g,{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.9)",justifyContent:"center",alignItems:"center",zIndex:1000},children:R(_,{className:"items-center gap-y-4",children:[K(u,{size:"large",color:"#6b7280"}),R(_,{className:"items-center gap-y-2",children:[K(Q,{className:"text-center",children:f}),I&&K(L,{className:"text-center text-muted-foreground",children:I})]})]})})}export{F0 as LoadingOverlay};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as Q}from"@contractspec/lib.ui-kit-core/utils";import*as Y from"@rn-primitives/slot";import*as I from"react";import{Text as B}from"react-native";import{jsx as H}from"react/jsx-runtime";var R=I.createContext(void 0);function N({className:f,asChild:V=!1,...w}){let y=I.useContext(R);return H(V?Y.Text:B,{className:Q("web:select-text text-base text-foreground",y,f),...w})}import{cn as K}from"@contractspec/lib.ui-kit-core/utils";import{cva as O}from"class-variance-authority";import{View as U}from"react-native";import{jsx as X}from"react/jsx-runtime";var W="flex",g=O([W,"flex-col"],{variants:{spacing:{none:"",xs:"gap-y-1",sm:"gap-y-2",md:"gap-y-4",lg:"gap-y-6",xl:"gap-y-8","2xl":"gap-y-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"}},defaultVariants:{spacing:"md",align:"stretch",justify:"start",width:"auto",padding:"none",gap:"none"}}),b=O([W,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"start",width:"auto",padding:"none",gap:"none",wrap:"wrap"}}),u=O([W,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"center",width:"auto",padding:"none",gap:"none",wrap:"wrap"}});function i({className:f,spacing:V,align:w,justify:y,width:D,padding:E,gap:F,wrap:G,...J}){return X(U,{className:K(u({spacing:V,align:w,justify:y,width:D,padding:E,gap:F,wrap:G}),f),...J})}function s({className:f,spacing:V,align:w,justify:y,width:D,padding:E,gap:F,wrap:G,...J}){return X(U,{className:K(b({spacing:V,align:w,justify:y,width:D,padding:E,gap:F,wrap:G}),f),...J})}function m({className:f,spacing:V,align:w,justify:y,width:D,padding:E,gap:F,...G}){return X(U,{className:K(g({spacing:V,align:w,justify:y,width:D,padding:E,gap:F}),f),...G})}import{cn as _}from"@contractspec/lib.ui-kit-core/utils";import*as A from"@rn-primitives/slot";import{Platform as Z}from"react-native";import{jsx as z}from"react/jsx-runtime";function yf({className:f,asChild:V=!1,...w}){return z(V?A.Text:N,{role:"heading","aria-level":"1",className:_("web:select-text web:scroll-m-20 font-extrabold text-4xl text-foreground tracking-tight lg:text-5xl",f),...w})}function mf({className:f,asChild:V=!1,...w}){return z(V?A.Text:N,{role:"heading","aria-level":"2",className:_("web:select-text web:scroll-m-20 border-border border-b pb-2 font-semibold text-3xl text-foreground tracking-tight first:mt-0",f),...w})}function $({className:f,asChild:V=!1,...w}){return z(V?A.Text:N,{role:"heading","aria-level":"3",className:_("web:select-text web:scroll-m-20 font-semibold text-2xl text-foreground tracking-tight",f),...w})}function Lf({className:f,asChild:V=!1,...w}){return z(V?A.Text:N,{role:"heading","aria-level":"4",className:_("web:select-text web:scroll-m-20 font-semibold text-foreground text-xl tracking-tight",f),...w})}function Nf({className:f,asChild:V=!1,...w}){return z(V?A.Text:N,{className:_("web:select-text text-base text-foreground",f),...w})}function Af({className:f,asChild:V=!1,...w}){return z(V?A.Text:N,{role:Z.OS==="web"?"blockquote":void 0,className:_("mt-6 native:mt-4 web:select-text border-border border-l-2 native:pl-3 pl-6 text-base text-foreground italic",f),...w})}function _f({className:f,asChild:V=!1,...w}){return z(V?A.Text:N,{role:Z.OS==="web"?"code":void 0,className:_("relative web:select-text rounded-md bg-muted px-[0.3rem] py-[0.2rem] font-semibold text-foreground text-sm",f),...w})}function zf({className:f,asChild:V=!1,...w}){return z(V?A.Text:N,{className:_("web:select-text text-muted-foreground text-xl",f),...w})}function Df({className:f,asChild:V=!1,...w}){return z(V?A.Text:N,{className:_("web:select-text font-semibold text-foreground text-xl",f),...w})}function Ef({className:f,asChild:V=!1,...w}){return z(V?A.Text:N,{className:_("web:select-text font-medium text-foreground text-sm leading-none",f),...w})}function Ff({className:f,asChild:V=!1,...w}){return z(V?A.Text:N,{className:_("web:select-text text-muted-foreground text-sm",f),...w})}import{cn as v}from"@contractspec/lib.ui-kit-core/utils";import*as P from"react";import h,{useAnimatedStyle as T,useSharedValue as o,withRepeat as e,withSequence as C,withTiming as q}from"react-native-reanimated";import{jsx as l}from"react/jsx-runtime";var M=1000;function k({className:f,...V}){let w=o(1);P.useEffect(()=>{w.value=e(C(q(0.5,{duration:M}),q(1,{duration:M})),-1)},[]);let y=T(()=>({opacity:w.value}));return l(h.View,{style:y,className:v("rounded-md bg-secondary dark:bg-muted",f),...V})}import{View as r}from"react-native";import{SafeAreaView as c}from"react-native-safe-area-context";import{jsx as S,jsxs as L}from"react/jsx-runtime";function qf({title:f="Loading...",variant:V="default"}){return S(c,{style:{flex:1},children:S(r,{style:{flex:1,padding:16,justifyContent:"center"},children:(()=>{switch(V){case"profile":return L(m,{className:"gap-y-6",children:[L(m,{className:"gap-y-2",children:[S(k,{className:"h-8 w-3/4"}),S(k,{className:"h-4 w-1/2"})]}),L(m,{className:"gap-y-4",children:[S(k,{className:"h-16 w-16 rounded-full"}),L(m,{className:"gap-y-2",children:[S(k,{className:"h-6 w-2/3"}),S(k,{className:"h-4 w-1/2"})]})]}),L(m,{className:"gap-y-3",children:[S(k,{className:"h-4 w-full"}),S(k,{className:"h-4 w-5/6"}),S(k,{className:"h-4 w-3/4"})]})]});case"form":return L(m,{className:"gap-y-6",children:[L(m,{className:"gap-y-2",children:[S(k,{className:"h-8 w-3/4"}),S(k,{className:"h-4 w-1/2"})]}),L(m,{className:"gap-y-4",children:[L(m,{className:"gap-y-2",children:[S(k,{className:"h-4 w-1/4"}),S(k,{className:"h-12 w-full"})]}),L(m,{className:"gap-y-2",children:[S(k,{className:"h-4 w-1/4"}),S(k,{className:"h-12 w-full"})]}),S(k,{className:"h-12 w-full"})]})]});case"list":return L(m,{className:"gap-y-4",children:[S(k,{className:"h-8 w-1/2"}),[...Array(5)].map((y,D)=>L(m,{className:"gap-y-2",children:[S(k,{className:"h-6 w-3/4"}),S(k,{className:"h-4 w-1/2"})]},D))]});default:return L(m,{className:"gap-y-4",children:[S($,{className:"text-center text-muted-foreground",children:f}),S(k,{className:"h-8 w-full"}),S(k,{className:"h-6 w-3/4"}),S(k,{className:"h-6 w-1/2"})]})}})()})})}export{qf as LoadingScreen};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SharedFeatureGridProps, SharedFeatureItem } from '@contractspec/lib.ui-kit-core/interfaces';
|
|
2
|
+
export interface FeatureItem extends SharedFeatureItem {
|
|
3
|
+
}
|
|
4
|
+
export declare function FeatureGrid({ items, columns, className, }: SharedFeatureGridProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as z}from"@contractspec/lib.ui-kit-core/utils";import*as I from"@rn-primitives/slot";import*as m from"react";import{Text as A}from"react-native";import{jsx as E}from"react/jsx-runtime";var D=m.createContext(void 0);function u({className:f,asChild:r=!1,...w}){let g=m.useContext(D);return E(r?I.Text:A,{className:z("web:select-text text-base text-foreground",g,f),...w})}import{cn as F}from"@contractspec/lib.ui-kit-core/utils";import*as V from"@rn-primitives/slot";import{Platform as S}from"react-native";import{jsx as e}from"react/jsx-runtime";function $({className:f,asChild:r=!1,...w}){return e(r?V.Text:u,{role:"heading","aria-level":"1",className:F("web:select-text web:scroll-m-20 font-extrabold text-4xl text-foreground tracking-tight lg:text-5xl",f),...w})}function k({className:f,asChild:r=!1,...w}){return e(r?V.Text:u,{role:"heading","aria-level":"2",className:F("web:select-text web:scroll-m-20 border-border border-b pb-2 font-semibold text-3xl text-foreground tracking-tight first:mt-0",f),...w})}function B({className:f,asChild:r=!1,...w}){return e(r?V.Text:u,{role:"heading","aria-level":"3",className:F("web:select-text web:scroll-m-20 font-semibold text-2xl text-foreground tracking-tight",f),...w})}function Q({className:f,asChild:r=!1,...w}){return e(r?V.Text:u,{role:"heading","aria-level":"4",className:F("web:select-text web:scroll-m-20 font-semibold text-foreground text-xl tracking-tight",f),...w})}function P({className:f,asChild:r=!1,...w}){return e(r?V.Text:u,{className:F("web:select-text text-base text-foreground",f),...w})}function R({className:f,asChild:r=!1,...w}){return e(r?V.Text:u,{role:S.OS==="web"?"blockquote":void 0,className:F("mt-6 native:mt-4 web:select-text border-border border-l-2 native:pl-3 pl-6 text-base text-foreground italic",f),...w})}function d({className:f,asChild:r=!1,...w}){return e(r?V.Text:u,{role:S.OS==="web"?"code":void 0,className:F("relative web:select-text rounded-md bg-muted px-[0.3rem] py-[0.2rem] font-semibold text-foreground text-sm",f),...w})}function L({className:f,asChild:r=!1,...w}){return e(r?V.Text:u,{className:F("web:select-text text-muted-foreground text-xl",f),...w})}function t({className:f,asChild:r=!1,...w}){return e(r?V.Text:u,{className:F("web:select-text font-semibold text-foreground text-xl",f),...w})}function n({className:f,asChild:r=!1,...w}){return e(r?V.Text:u,{className:F("web:select-text font-medium text-foreground text-sm leading-none",f),...w})}function v({className:f,asChild:r=!1,...w}){return e(r?V.Text:u,{className:F("web:select-text text-muted-foreground text-sm",f),...w})}import{clsx as J}from"clsx";import{twMerge as K}from"tailwind-merge";function G(...f){return K(J(f))}import{View as o}from"react-native";import{jsx as b,jsxs as M}from"react/jsx-runtime";function p({items:f,columns:r=3,className:w}){let g=r===4?"md:grid-cols-4":r===2?"md:grid-cols-2":"md:grid-cols-3";return b(o,{className:G("mx-auto max-w-6xl py-12",w),children:b(o,{className:G("flex flex-col gap-6 md:flex-row md:flex-wrap",g),children:f.map((y,q)=>M(o,{className:"flex-1 rounded-lg border p-6",children:[y.icon&&b(o,{className:"mb-3 text-primary",children:y.icon}),b(u,{className:"font-semibold text-lg",children:y.title}),y.description&&b(P,{className:"mt-2 text-base text-muted-foreground",children:y.description})]},q))})})}export{p as FeatureGrid};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function Hero({ title, subtitle, primaryCta, secondaryCta, className, }: {
|
|
3
|
+
title: React.ReactNode;
|
|
4
|
+
subtitle?: React.ReactNode;
|
|
5
|
+
primaryCta?: {
|
|
6
|
+
label: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
};
|
|
10
|
+
secondaryCta?: {
|
|
11
|
+
label: string;
|
|
12
|
+
href?: string;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
};
|
|
15
|
+
className?: string;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as W}from"@contractspec/lib.ui-kit-core/utils";import*as F from"@rn-primitives/slot";import*as D from"react";import{Text as X}from"react-native";import{jsx as Y}from"react/jsx-runtime";var E=D.createContext(void 0);function R({className:g,asChild:w=!1,...f}){let k=D.useContext(E);return Y(w?F.Text:X,{className:W("web:select-text text-base text-foreground",k,g),...f})}import{cn as Z}from"@contractspec/lib.ui-kit-core/utils";import{cva as I}from"class-variance-authority";import{Pressable as _}from"react-native";import{jsx as G}from"react/jsx-runtime";var $=I("group flex items-center justify-center rounded-md web:ring-offset-background web:transition-colors web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2",{variants:{variant:{default:"bg-primary web:hover:opacity-90 active:opacity-90",destructive:"bg-destructive web:hover:opacity-90 active:opacity-90",outline:"border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",secondary:"bg-secondary web:hover:opacity-80 active:opacity-80",ghost:"web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",link:"web:underline-offset-4 web:hover:underline web:focus:underline"},size:{default:"h-10 native:h-12 native:px-5 px-4 native:py-3 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 native:h-14 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),b=I("web:whitespace-nowrap font-medium native:text-base text-foreground text-sm web:transition-colors",{variants:{variant:{default:"text-primary-foreground",destructive:"text-destructive-foreground",outline:"group-active:text-accent-foreground",secondary:"text-secondary-foreground group-active:text-secondary-foreground",ghost:"group-active:text-accent-foreground",link:"text-primary group-active:underline"},size:{default:"",sm:"",lg:"native:text-lg",icon:""}},defaultVariants:{variant:"default",size:"default"}});function A({ref:g,className:w,variant:f,size:k,...z}){return G(E.Provider,{value:b({variant:f,size:k,className:"web:pointer-events-none"}),children:G(_,{className:Z(z.disabled&&"web:pointer-events-none opacity-50",$({variant:f,size:k,className:w})),ref:g,role:"button",...z})})}import{cn as L}from"@contractspec/lib.ui-kit-core/utils";import*as B from"@rn-primitives/slot";import{Platform as J}from"react-native";import{jsx as V}from"react/jsx-runtime";function l({className:g,asChild:w=!1,...f}){return V(w?B.Text:R,{role:"heading","aria-level":"1",className:L("web:select-text web:scroll-m-20 font-extrabold text-4xl text-foreground tracking-tight lg:text-5xl",g),...f})}function e({className:g,asChild:w=!1,...f}){return V(w?B.Text:R,{role:"heading","aria-level":"2",className:L("web:select-text web:scroll-m-20 border-border border-b pb-2 font-semibold text-3xl text-foreground tracking-tight first:mt-0",g),...f})}function t({className:g,asChild:w=!1,...f}){return V(w?B.Text:R,{role:"heading","aria-level":"3",className:L("web:select-text web:scroll-m-20 font-semibold text-2xl text-foreground tracking-tight",g),...f})}function r({className:g,asChild:w=!1,...f}){return V(w?B.Text:R,{role:"heading","aria-level":"4",className:L("web:select-text web:scroll-m-20 font-semibold text-foreground text-xl tracking-tight",g),...f})}function K({className:g,asChild:w=!1,...f}){return V(w?B.Text:R,{className:L("web:select-text text-base text-foreground",g),...f})}function x({className:g,asChild:w=!1,...f}){return V(w?B.Text:R,{role:J.OS==="web"?"blockquote":void 0,className:L("mt-6 native:mt-4 web:select-text border-border border-l-2 native:pl-3 pl-6 text-base text-foreground italic",g),...f})}function C({className:g,asChild:w=!1,...f}){return V(w?B.Text:R,{role:J.OS==="web"?"code":void 0,className:L("relative web:select-text rounded-md bg-muted px-[0.3rem] py-[0.2rem] font-semibold text-foreground text-sm",g),...f})}function c({className:g,asChild:w=!1,...f}){return V(w?B.Text:R,{className:L("web:select-text text-muted-foreground text-xl",g),...f})}function p({className:g,asChild:w=!1,...f}){return V(w?B.Text:R,{className:L("web:select-text font-semibold text-foreground text-xl",g),...f})}function a({className:g,asChild:w=!1,...f}){return V(w?B.Text:R,{className:L("web:select-text font-medium text-foreground text-sm leading-none",g),...f})}function s({className:g,asChild:w=!1,...f}){return V(w?B.Text:R,{className:L("web:select-text text-muted-foreground text-sm",g),...f})}import{clsx as u}from"clsx";import{twMerge as Q}from"tailwind-merge";function M(...g){return Q(u(g))}import{Link as O}from"expo-router";import{View as P}from"react-native";import{jsx as q,jsxs as U}from"react/jsx-runtime";function Df({title:g,subtitle:w,primaryCta:f,secondaryCta:k,className:z}){return U(P,{className:M("mx-auto max-w-4xl py-16",z),children:[q(R,{className:"font-bold text-4xl tracking-tight md:text-5xl",children:g}),w&&q(K,{className:"mt-4 text-lg text-muted-foreground md:text-xl",children:w}),(f||k)&&U(P,{className:"mt-8 flex flex-row items-center justify-center gap-3",children:[f&&(f.href?q(A,{size:"lg",children:q(O,{href:f.href,children:f.label})}):q(A,{size:"lg",onPress:f.onClick,children:f.label})),k&&(k.href?q(A,{variant:"outline",size:"lg",children:q(O,{href:k.href,children:k.label})}):q(A,{variant:"outline",size:"lg",onPress:k.onClick,children:k.label}))]})]})}export{Df as Hero};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SharedPricingTableProps, SharedPricingTier } from '@contractspec/lib.ui-kit-core/interfaces';
|
|
2
|
+
export interface PricingTier extends SharedPricingTier {
|
|
3
|
+
}
|
|
4
|
+
export declare function PricingTable({ tiers, className }: SharedPricingTableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as G}from"@contractspec/lib.ui-kit-core/utils";import*as n from"@rn-primitives/slot";import*as o from"react";import{Text as I}from"react-native";import{jsx as J}from"react/jsx-runtime";var S=o.createContext(void 0);function w({className:e,asChild:g=!1,...f}){let m=o.useContext(S);return J(g?n.Text:I,{className:G("web:select-text text-base text-foreground",m,e),...f})}import{cn as K}from"@contractspec/lib.ui-kit-core/utils";import{cva as A}from"class-variance-authority";import{Pressable as L}from"react-native";import{jsx as q}from"react/jsx-runtime";var M=A("group flex items-center justify-center rounded-md web:ring-offset-background web:transition-colors web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2",{variants:{variant:{default:"bg-primary web:hover:opacity-90 active:opacity-90",destructive:"bg-destructive web:hover:opacity-90 active:opacity-90",outline:"border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",secondary:"bg-secondary web:hover:opacity-80 active:opacity-80",ghost:"web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",link:"web:underline-offset-4 web:hover:underline web:focus:underline"},size:{default:"h-10 native:h-12 native:px-5 px-4 native:py-3 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 native:h-14 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),O=A("web:whitespace-nowrap font-medium native:text-base text-foreground text-sm web:transition-colors",{variants:{variant:{default:"text-primary-foreground",destructive:"text-destructive-foreground",outline:"group-active:text-accent-foreground",secondary:"text-secondary-foreground group-active:text-secondary-foreground",ghost:"group-active:text-accent-foreground",link:"text-primary group-active:underline"},size:{default:"",sm:"",lg:"native:text-lg",icon:""}},defaultVariants:{variant:"default",size:"default"}});function k({ref:e,className:g,variant:f,size:m,...V}){return q(S.Provider,{value:O({variant:f,size:m,className:"web:pointer-events-none"}),children:q(L,{className:K(V.disabled&&"web:pointer-events-none opacity-50",M({variant:f,size:m,className:g})),ref:e,role:"button",...V})})}import{cn as u}from"@contractspec/lib.ui-kit-core/utils";import*as r from"@rn-primitives/slot";import{Platform as D}from"react-native";import{jsx as y}from"react/jsx-runtime";function N({className:e,asChild:g=!1,...f}){return y(g?r.Text:w,{role:"heading","aria-level":"1",className:u("web:select-text web:scroll-m-20 font-extrabold text-4xl text-foreground tracking-tight lg:text-5xl",e),...f})}function t({className:e,asChild:g=!1,...f}){return y(g?r.Text:w,{role:"heading","aria-level":"2",className:u("web:select-text web:scroll-m-20 border-border border-b pb-2 font-semibold text-3xl text-foreground tracking-tight first:mt-0",e),...f})}function c({className:e,asChild:g=!1,...f}){return y(g?r.Text:w,{role:"heading","aria-level":"3",className:u("web:select-text web:scroll-m-20 font-semibold text-2xl text-foreground tracking-tight",e),...f})}function x({className:e,asChild:g=!1,...f}){return y(g?r.Text:w,{role:"heading","aria-level":"4",className:u("web:select-text web:scroll-m-20 font-semibold text-foreground text-xl tracking-tight",e),...f})}function E({className:e,asChild:g=!1,...f}){return y(g?r.Text:w,{className:u("web:select-text text-base text-foreground",e),...f})}function C({className:e,asChild:g=!1,...f}){return y(g?r.Text:w,{role:D.OS==="web"?"blockquote":void 0,className:u("mt-6 native:mt-4 web:select-text border-border border-l-2 native:pl-3 pl-6 text-base text-foreground italic",e),...f})}function p({className:e,asChild:g=!1,...f}){return y(g?r.Text:w,{role:D.OS==="web"?"code":void 0,className:u("relative web:select-text rounded-md bg-muted px-[0.3rem] py-[0.2rem] font-semibold text-foreground text-sm",e),...f})}function j({className:e,asChild:g=!1,...f}){return y(g?r.Text:w,{className:u("web:select-text text-muted-foreground text-xl",e),...f})}function a({className:e,asChild:g=!1,...f}){return y(g?r.Text:w,{className:u("web:select-text font-semibold text-foreground text-xl",e),...f})}function s({className:e,asChild:g=!1,...f}){return y(g?r.Text:w,{className:u("web:select-text font-medium text-foreground text-sm leading-none",e),...f})}function ff({className:e,asChild:g=!1,...f}){return y(g?r.Text:w,{className:u("web:select-text text-muted-foreground text-sm",e),...f})}import{clsx as W}from"clsx";import{twMerge as X}from"tailwind-merge";function B(...e){return X(W(e))}import{Link as Y}from"expo-router";import{View as P}from"react-native";import{jsx as b,jsxs as U}from"react/jsx-runtime";function Sf({tiers:e,className:g}){return U(P,{className:B("mx-auto max-w-6xl py-12",g),children:[b(P,{className:"flex flex-col gap-6 md:flex-row md:flex-wrap",children:e.map((f,m)=>U(P,{className:B("flex flex-1 flex-col rounded-lg border p-6",f.highlighted&&"border-primary shadow-lg"),children:[b(w,{className:"mb-2 font-medium text-base text-muted-foreground",children:f.name}),b(w,{className:"font-semibold text-3xl",children:f.price}),f.tagline&&b(w,{className:"mt-1 text-base text-muted-foreground",children:f.tagline}),b(P,{className:"mt-4 flex flex-col gap-2",children:f.features.map((V,F)=>U(P,{className:"flex flex-row items-start gap-2",children:[b(P,{className:"mt-1 h-1.5 w-1.5 rounded-full bg-primary"}),b(w,{className:"text-base",children:V})]},F))}),f.cta&&b(P,{className:"mt-6",children:f.cta.href?b(k,{className:"w-full",children:b(Y,{href:f.cta.href,children:f.cta.label})}):b(k,{className:"w-full",onPress:f.cta.onClick,children:f.cta.label})})]},m))}),b(E,{className:"mt-6 text-center text-base text-muted-foreground",children:"Usage-based tiers inspired by generous free allowances and per-unit pricing."})]})}export{Sf as PricingTable};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as MenubarPrimitive from '@rn-primitives/menubar';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { type TextProps, View } from 'react-native';
|
|
4
|
+
declare const MenubarMenu: {
|
|
5
|
+
({ asChild, value, ref, ...viewProps }: import("react-native").ViewProps & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
} & {
|
|
8
|
+
value: string | undefined;
|
|
9
|
+
} & React.RefAttributes<View>): React.JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
declare const MenubarGroup: {
|
|
13
|
+
({ asChild, ref, ...props }: import("react-native").ViewProps & {
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
} & React.RefAttributes<View>): React.JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
declare const MenubarPortal: typeof MenubarPrimitive.Portal;
|
|
19
|
+
declare const MenubarSub: {
|
|
20
|
+
({ asChild, defaultOpen, open: openProp, onOpenChange: onOpenChangeProp, ref, ...props }: import("react-native").ViewProps & {
|
|
21
|
+
asChild?: boolean;
|
|
22
|
+
} & {
|
|
23
|
+
defaultOpen?: boolean;
|
|
24
|
+
open?: boolean;
|
|
25
|
+
onOpenChange?: (value: boolean) => void;
|
|
26
|
+
} & React.RefAttributes<View>): React.JSX.Element;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
29
|
+
declare const MenubarRadioGroup: {
|
|
30
|
+
({ asChild, value, onValueChange, ref, ...props }: import("react-native").ViewProps & {
|
|
31
|
+
asChild?: boolean;
|
|
32
|
+
} & {
|
|
33
|
+
value: string | undefined;
|
|
34
|
+
onValueChange: (value: string) => void;
|
|
35
|
+
} & React.RefAttributes<View>): React.JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
declare function Menubar({ className, ...props }: MenubarPrimitive.RootProps & {
|
|
39
|
+
ref?: React.RefObject<MenubarPrimitive.RootRef>;
|
|
40
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
declare function MenubarTrigger({ className, ...props }: MenubarPrimitive.TriggerProps & {
|
|
42
|
+
ref?: React.RefObject<MenubarPrimitive.TriggerRef>;
|
|
43
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
declare function MenubarSubTrigger({ className, inset, children, ...props }: MenubarPrimitive.SubTriggerProps & {
|
|
45
|
+
ref?: React.RefObject<MenubarPrimitive.SubTriggerRef>;
|
|
46
|
+
className?: string;
|
|
47
|
+
inset?: boolean;
|
|
48
|
+
children?: React.ReactNode;
|
|
49
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
declare function MenubarSubContent({ className, ...props }: MenubarPrimitive.SubContentProps & {
|
|
51
|
+
ref?: React.RefObject<MenubarPrimitive.SubContentRef>;
|
|
52
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
declare function MenubarContent({ className, portalHost, ...props }: MenubarPrimitive.ContentProps & {
|
|
54
|
+
ref?: React.RefObject<MenubarPrimitive.ContentRef>;
|
|
55
|
+
className?: string;
|
|
56
|
+
portalHost?: string;
|
|
57
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
declare function MenubarItem({ className, inset, ...props }: MenubarPrimitive.ItemProps & {
|
|
59
|
+
ref?: React.RefObject<MenubarPrimitive.ItemRef>;
|
|
60
|
+
className?: string;
|
|
61
|
+
inset?: boolean;
|
|
62
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
declare function MenubarCheckboxItem({ className, children, checked, ...props }: MenubarPrimitive.CheckboxItemProps & {
|
|
64
|
+
ref?: React.RefObject<MenubarPrimitive.CheckboxItemRef>;
|
|
65
|
+
children?: React.ReactNode;
|
|
66
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
declare function MenubarRadioItem({ className, children, ...props }: MenubarPrimitive.RadioItemProps & {
|
|
68
|
+
ref?: React.RefObject<MenubarPrimitive.RadioItemRef>;
|
|
69
|
+
children?: React.ReactNode;
|
|
70
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
declare function MenubarLabel({ className, inset, ...props }: MenubarPrimitive.LabelProps & {
|
|
72
|
+
ref?: React.RefObject<MenubarPrimitive.LabelRef>;
|
|
73
|
+
className?: string;
|
|
74
|
+
inset?: boolean;
|
|
75
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
declare function MenubarSeparator({ className, ...props }: MenubarPrimitive.SeparatorProps & {
|
|
77
|
+
ref?: React.RefObject<MenubarPrimitive.SeparatorRef>;
|
|
78
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
declare function MenubarShortcut({ className, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{styled as D}from"nativewind";function B(y){D(y,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{ChevronDown as K}from"lucide-react-native";B(K);import{cn as U}from"@contractspec/lib.ui-kit-core/utils";import*as _ from"@rn-primitives/slot";import*as F from"react";import{Text as G}from"react-native";import{jsx as H}from"react/jsx-runtime";var J=F.createContext(void 0);function d({className:y,asChild:W=!1,...L}){let A=F.useContext(J);return H(W?_.Text:G,{className:U("web:select-text text-base text-foreground",A,y),...L})}import{Check as O}from"lucide-react-native";B(O);import{ChevronUp as Q}from"lucide-react-native";B(Q);import{ChevronRight as X}from"lucide-react-native";B(X);import{cn as z}from"@contractspec/lib.ui-kit-core/utils";import*as f from"@rn-primitives/menubar";import{Platform as I,Text as P,View as Y}from"react-native";import{jsx as q,jsxs as Z}from"react/jsx-runtime";var a=f.Menu,e=f.Group,s=f.Portal,ff=f.Sub,yf=f.RadioGroup;function Wf({className:y,...W}){return q(f.Root,{className:z("flex h-10 native:h-12 flex-row items-center gap-x-1 rounded-md border border-border bg-background p-1",y),...W})}function Lf({className:y,...W}){let{value:L}=f.useRootContext(),{value:A}=f.useMenuContext();return q(f.Trigger,{className:z("flex native:h-10 web:cursor-default web:select-none flex-row items-center rounded-xs native:px-5 px-3 native:py-0 py-1.5 font-medium text-sm web:outline-hidden web:focus:bg-accent web:focus:text-accent-foreground active:bg-accent",L===A&&"bg-accent text-accent-foreground",y),...W})}function qf({className:y,inset:W,children:L,...A}){let{open:E}=f.useSubContext(),$=I.OS==="web"?X:E?Q:K;return q(J.Provider,{value:z("select-none native:text-lg text-primary text-sm",E&&"native:text-accent-foreground"),children:Z(f.SubTrigger,{className:z("flex web:cursor-default web:select-none flex-row items-center gap-2 rounded-xs px-2 native:py-2 py-1.5 web:outline-hidden web:hover:bg-accent web:focus:bg-accent active:bg-accent",E&&"bg-accent",W&&"pl-8",y),...A,children:[L,q($,{size:18,className:"ml-auto text-foreground"})]})})}function zf({className:y,...W}){let{open:L}=f.useSubContext();return q(f.SubContent,{className:z("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 z-50 mt-1 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-1 shadow-foreground/5 shadow-md",L?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out web:animate-out",y),...W})}function Af({className:y,portalHost:W,...L}){let{value:A}=f.useRootContext(),{value:E}=f.useMenuContext();return q(f.Portal,{hostName:W,children:q(f.Content,{className:z("z-50 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-1 shadow-foreground/5 shadow-md",A===E?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",y),...L})})}function Bf({className:y,inset:W,...L}){return q(J.Provider,{value:"select-none text-sm native:text-lg text-popover-foreground web:group-focus:text-accent-foreground",children:q(f.Item,{className:z("group relative flex web:cursor-default flex-row items-center gap-2 rounded-xs px-2 native:py-2 py-1.5 web:outline-hidden web:hover:bg-accent web:focus:bg-accent active:bg-accent",W&&"pl-8",L.disabled&&"web:pointer-events-none opacity-50",y),...L})})}function Ef({className:y,children:W,checked:L,...A}){return Z(f.CheckboxItem,{className:z("web:group relative flex web:cursor-default flex-row items-center rounded-xs native:py-2 py-1.5 pr-2 pl-8 web:outline-hidden web:focus:bg-accent active:bg-accent",A.disabled&&"web:pointer-events-none opacity-50",y),checked:L,...A,children:[q(Y,{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:q(f.ItemIndicator,{children:q(O,{size:14,strokeWidth:3,className:"text-foreground"})})}),W]})}function Ff({className:y,children:W,...L}){return Z(f.RadioItem,{className:z("web:group relative flex web:cursor-default flex-row items-center rounded-xs native:py-2 py-1.5 pr-2 pl-8 web:outline-hidden web:focus:bg-accent active:bg-accent",L.disabled&&"web:pointer-events-none opacity-50",y),...L,children:[q(Y,{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:q(f.ItemIndicator,{children:q(Y,{className:"h-2 w-2 rounded-full bg-foreground"})})}),W]})}function Jf({className:y,inset:W,...L}){return q(f.Label,{className:z("web:cursor-default px-2 py-1.5 font-semibold native:text-base text-foreground text-sm",W&&"pl-8",y),...L})}function Kf({className:y,...W}){return q(f.Separator,{className:z("-mx-1 my-1 h-px bg-border",y),...W})}function Of({className:y,...W}){return q(P,{className:z("ml-auto native:text-sm text-muted-foreground text-xs tracking-widest",y),...W})}export{Lf as MenubarTrigger,qf as MenubarSubTrigger,zf as MenubarSubContent,ff as MenubarSub,Of as MenubarShortcut,Kf as MenubarSeparator,Ff as MenubarRadioItem,yf as MenubarRadioGroup,s as MenubarPortal,a as MenubarMenu,Jf as MenubarLabel,Bf as MenubarItem,e as MenubarGroup,Af as MenubarContent,Ef as MenubarCheckboxItem,Wf as Menubar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const autocomplete = "todo";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{styled as Km}from"nativewind";function _(m){Km(m,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{ChevronDown as F}from"lucide-react-native";_(F);import{cn as Qm}from"@contractspec/lib.ui-kit-core/utils";import*as e from"@rn-primitives/slot";import*as P from"react";import{Text as Ym}from"react-native";import{jsx as Zm}from"react/jsx-runtime";var k=P.createContext(void 0);function Q({className:m,asChild:y=!1,...W}){let E=P.useContext(k);return Zm(y?e.Text:Ym,{className:Qm("web:select-text text-base text-foreground",E,m),...W})}import{cn as _m}from"@contractspec/lib.ui-kit-core/utils";import{cva as c}from"class-variance-authority";import{Pressable as Gm}from"react-native";import{jsx as t}from"react/jsx-runtime";var Tm=c("group flex items-center justify-center rounded-md web:ring-offset-background web:transition-colors web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2",{variants:{variant:{default:"bg-primary web:hover:opacity-90 active:opacity-90",destructive:"bg-destructive web:hover:opacity-90 active:opacity-90",outline:"border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",secondary:"bg-secondary web:hover:opacity-80 active:opacity-80",ghost:"web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",link:"web:underline-offset-4 web:hover:underline web:focus:underline"},size:{default:"h-10 native:h-12 native:px-5 px-4 native:py-3 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 native:h-14 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),zm=c("web:whitespace-nowrap font-medium native:text-base text-foreground text-sm web:transition-colors",{variants:{variant:{default:"text-primary-foreground",destructive:"text-destructive-foreground",outline:"group-active:text-accent-foreground",secondary:"text-secondary-foreground group-active:text-secondary-foreground",ghost:"group-active:text-accent-foreground",link:"text-primary group-active:underline"},size:{default:"",sm:"",lg:"native:text-lg",icon:""}},defaultVariants:{variant:"default",size:"default"}});function f({ref:m,className:y,variant:W,size:E,...I}){return t(k.Provider,{value:zm({variant:W,size:E,className:"web:pointer-events-none"}),children:t(Gm,{className:_m(I.disabled&&"web:pointer-events-none opacity-50",Tm({variant:W,size:E,className:y})),ref:m,role:"button",...I})})}import{cn as j}from"@contractspec/lib.ui-kit-core/utils";import*as U from"@rn-primitives/label";import{Platform as n}from"react-native";import{jsx as l}from"react/jsx-runtime";function i({className:m,onPress:y,onLongPress:W,onPressIn:E,onPressOut:I,disabled:$,...J}){return l(U.Root,{className:j("flex select-none flex-row items-center gap-2",n.select({web:"cursor-default leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50"}),$&&"opacity-50"),onPress:y,onLongPress:W,onPressIn:E,onPressOut:I,disabled:$,children:l(U.Text,{className:j("font-medium text-foreground text-sm",n.select({web:"leading-none"}),m),...J})})}import{Check as S}from"lucide-react-native";_(S);import{ChevronUp as L}from"lucide-react-native";_(L);import{cn as Y}from"@contractspec/lib.ui-kit-core/utils";import*as R from"@rn-primitives/select";import{Platform as u,StyleSheet as Am,View as Om}from"react-native";import fm,{FadeIn as Dm,FadeOut as Fm}from"react-native-reanimated";import{jsx as X,jsxs as V}from"react/jsx-runtime";var a=R.Root,_0=R.Group,s=R.Value;function mm({ref:m,className:y,children:W,...E}){return V(R.Trigger,{ref:m,className:Y("flex h-10 native:h-12 flex-row items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-muted-foreground text-sm web:ring-offset-background web:focus:outline-hidden web:focus:ring-2 web:focus:ring-ring web:focus:ring-offset-2 [&>span]:line-clamp-1",E.disabled&&"web:cursor-not-allowed opacity-50",y),...E,children:[W,X(F,{size:16,"aria-hidden":!0,className:"text-foreground opacity-50"})]})}function Pm({className:m,...y}){if(u.OS!=="web")return null;return X(R.ScrollUpButton,{className:Y("flex web:cursor-default items-center justify-center py-1",m),...y,children:X(L,{size:14,className:"text-foreground"})})}function Um({className:m,...y}){if(u.OS!=="web")return null;return X(R.ScrollDownButton,{className:Y("flex web:cursor-default items-center justify-center py-1",m),...y,children:X(F,{size:14,className:"text-foreground"})})}function ym({className:m,children:y,position:W="popper",portalHost:E,...I}){let{open:$}=R.useRootContext();return X(R.Portal,{hostName:E,children:X(R.Overlay,{style:u.OS!=="web"?Am.absoluteFill:void 0,children:X(fm.View,{className:"z-50",entering:Dm,exiting:Fm,children:V(R.Content,{className:Y("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 relative z-50 max-h-96 min-w-32 rounded-md border border-border bg-popover px-1 py-2 shadow-foreground/10 shadow-md",W==="popper"&&"data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",$?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",m),position:W,...I,children:[X(Pm,{}),X(R.Viewport,{className:Y("p-1",W==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:y}),X(Um,{})]})})})})}function G0({className:m,...y}){return X(R.Label,{className:Y("py-1.5 pr-2 native:pb-2 native:pl-10 pl-8 font-semibold native:text-base text-popover-foreground text-sm",m),...y})}function N({className:m,children:y,...W}){return V(R.Item,{className:Y("web:group relative flex w-full web:cursor-default web:select-none flex-row items-center rounded-xs native:py-2 py-1.5 pr-2 native:pl-10 pl-8 web:outline-hidden web:hover:bg-accent/50 web:focus:bg-accent active:bg-accent",W.disabled&&"web:pointer-events-none opacity-50",m),...W,children:[X(Om,{className:"absolute left-2 native:left-3.5 flex h-3.5 w-3.5 items-center justify-center native:pt-px",children:X(R.ItemIndicator,{children:X(S,{size:16,strokeWidth:3,className:"text-popover-foreground"})})}),X(R.ItemText,{className:"native:text-base native:text-lg text-popover-foreground text-sm web:group-focus:text-accent-foreground"})]})}function T0({className:m,...y}){return X(R.Separator,{className:Y("-mx-1 my-1 h-px bg-muted",m),...y})}import{cn as w}from"@contractspec/lib.ui-kit-core/utils";import{cva as h}from"class-variance-authority";import{View as v}from"react-native";import{jsx as b}from"react/jsx-runtime";var C="flex",Bm=h([C,"flex-col"],{variants:{spacing:{none:"",xs:"gap-y-1",sm:"gap-y-2",md:"gap-y-4",lg:"gap-y-6",xl:"gap-y-8","2xl":"gap-y-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"}},defaultVariants:{spacing:"md",align:"stretch",justify:"start",width:"auto",padding:"none",gap:"none"}}),km=h([C,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"start",width:"auto",padding:"none",gap:"none",wrap:"wrap"}}),Sm=h([C,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"center",width:"auto",padding:"none",gap:"none",wrap:"wrap"}});function F0({className:m,spacing:y,align:W,justify:E,width:I,padding:$,gap:J,wrap:K,...H}){return b(v,{className:w(Sm({spacing:y,align:W,justify:E,width:I,padding:$,gap:J,wrap:K}),m),...H})}function g({className:m,spacing:y,align:W,justify:E,width:I,padding:$,gap:J,wrap:K,...H}){return b(v,{className:w(km({spacing:y,align:W,justify:E,width:I,padding:$,gap:J,wrap:K}),m),...H})}function P0({className:m,spacing:y,align:W,justify:E,width:I,padding:$,gap:J,...K}){return b(v,{className:w(Bm({spacing:y,align:W,justify:E,width:I,padding:$,gap:J}),m),...K})}import{View as Lm}from"react-native";import{jsx as G,jsxs as Z}from"react/jsx-runtime";var o=({value:m,options:y,onChange:W,placeholder:E="S\xE9lectionner...",label:I,disabled:$=!1,className:J="",showCounts:K=!1})=>{return Z(g,{className:`space-y-2 ${J}`,children:[I&&G(i,{className:"font-medium text-base text-foreground",children:I}),Z(a,{value:m,onValueChange:W,disabled:$,children:[G(mm,{className:"w-full",children:G(s,{placeholder:E})}),Z(ym,{className:"bg-background",children:[Z(N,{value:"all",label:"Tous",children:[G(Q,{children:"Tous"}),K&&Z(Lm,{className:"ml-2 text-muted-foreground text-sm",children:["(",y.reduce((H,D)=>H+(D.count||0),0),")"]})]}),y.map((H)=>G(N,{value:H.value,label:H.label,children:Z(g,{className:"flex w-full items-center justify-between",children:[G(Q,{children:H.label}),K&&H.count!==void 0&&Z(Q,{className:"ml-2 text-muted-foreground text-sm",children:["(",H.count,")"]})]})},H.value))]})]})]})};import{cn as Rm}from"@contractspec/lib.ui-kit-core/utils";import{TextInput as um}from"react-native";import{jsx as Nm}from"react/jsx-runtime";function Wm({className:m,placeholderClassName:y,...W}){return Nm(um,{className:Rm("web:flex h-10 native:h-12 web:w-full rounded-md border border-input bg-background px-3 web:py-2 native:text-lg text-base text-foreground native:leading-tight web:ring-offset-background file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 lg:text-sm",W.editable===!1&&"web:cursor-not-allowed opacity-50",m),placeholderClassName:Rm("text-muted-foreground",y),...W})}import{Search as Vm,X as wm}from"lucide-react";import{View as d}from"react-native";import{jsx as T,jsxs as Em}from"react/jsx-runtime";var r=({value:m,onChange:y,placeholder:W="Rechercher...",onClear:E,disabled:I=!1,className:$=""})=>{let J=()=>{y(""),E?.()};return Em(d,{className:`relative w-full ${$}`,children:[T(d,{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:T(Vm,{className:"h-4 w-4 text-muted-foreground"})}),T(Wm,{value:m,onChange:(K)=>y(K.nativeEvent.text),placeholder:W,editable:!I,className:"pr-10 pl-10"}),m&&T(d,{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:Em(f,{variant:"ghost",size:"sm",onPress:J,disabled:I,className:"h-6 w-6 p-0 hover:bg-transparent",children:[T(wm,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),T(Q,{className:"sr-only",children:"Effacer la recherche"})]})})]})};import*as z from"@rn-primitives/collapsible";var Im=z.Root,$m=z.Trigger,Mm=z.Content;import{ChevronDown as hm,ChevronUp as vm,Filter as Cm}from"lucide-react";import{useState as gm}from"react";import{View as A}from"react-native";import{jsx as q,jsxs as O}from"react/jsx-runtime";var $y=({searchValue:m,onSearchChange:y,searchPlaceholder:W,filters:E=[],isLoading:I=!1,disabled:$=!1,className:J="",collapsible:K=!0,defaultCollapsed:H=!1})=>{let[D,Xm]=gm(H),x=E.length>0,B=E.filter((M)=>M.value).length,qm=K&&x,p=()=>q(A,{className:"flex flex-col gap-4 sm:flex-row sm:flex-wrap",children:E.map((M)=>q(o,{value:{value:M.value,label:M.value},options:M.options,onChange:M.onChange,label:M.label,disabled:$||I,showCounts:M.showCounts,className:"min-w-0"},M.key))});return O(A,{className:`flex flex-col gap-4 ${J}`,children:[O(A,{className:"flex flex-col gap-4 sm:flex-row",children:[q(A,{className:"flex-1",children:q(r,{value:m,onChange:y,placeholder:W,disabled:$||I,className:"w-full"})}),qm&&O(Im,{open:!D,onOpenChange:Xm,className:"sm:hidden",children:[q($m,{asChild:!0,children:O(f,{variant:"outline",className:"sm:hidden",disabled:$||I,children:[q(Cm,{className:"mr-2 h-4 w-4"}),"Filtres",B>0&&q(Q,{className:"ml-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground text-sm",children:B}),D?q(hm,{className:"ml-2 h-4 w-4"}):q(vm,{className:"ml-2 h-4 w-4"})]})}),q(Mm,{className:"mt-4 space-y-4",children:q(p,{})})]})]}),x&&q(A,{className:"hidden sm:flex",children:q(p,{})}),B>0&&O(A,{className:"flex flex-wrap items-center gap-2",children:[q(Q,{className:"text-base text-muted-foreground",children:"Filtres actifs:"}),E.filter((M)=>M.value).map((M)=>{let Hm=M.options.find((Jm)=>Jm.value===M.value);return O(f,{variant:"secondary",size:"sm",onPress:()=>M.onChange(void 0),disabled:$||I,className:"h-7 px-2 text-sm",children:[M.label,": ",Hm?.label,q(Q,{className:"ml-1",children:"\xD7"})]},M.key)})]})]})};export{$y as SearchAndFilter};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{styled as Km}from"nativewind";function _(m){Km(m,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{ChevronDown as P}from"lucide-react-native";_(P);import{cn as Qm}from"@contractspec/lib.ui-kit-core/utils";import*as e from"@rn-primitives/slot";import*as D from"react";import{Text as Ym}from"react-native";import{jsx as Zm}from"react/jsx-runtime";var B=D.createContext(void 0);function Q({className:m,asChild:y=!1,...W}){let E=D.useContext(B);return Zm(y?e.Text:Ym,{className:Qm("web:select-text text-base text-foreground",E,m),...W})}import{cn as _m}from"@contractspec/lib.ui-kit-core/utils";import{cva as c}from"class-variance-authority";import{Pressable as Am}from"react-native";import{jsx as t}from"react/jsx-runtime";var Gm=c("group flex items-center justify-center rounded-md web:ring-offset-background web:transition-colors web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2",{variants:{variant:{default:"bg-primary web:hover:opacity-90 active:opacity-90",destructive:"bg-destructive web:hover:opacity-90 active:opacity-90",outline:"border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",secondary:"bg-secondary web:hover:opacity-80 active:opacity-80",ghost:"web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",link:"web:underline-offset-4 web:hover:underline web:focus:underline"},size:{default:"h-10 native:h-12 native:px-5 px-4 native:py-3 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 native:h-14 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Tm=c("web:whitespace-nowrap font-medium native:text-base text-foreground text-sm web:transition-colors",{variants:{variant:{default:"text-primary-foreground",destructive:"text-destructive-foreground",outline:"group-active:text-accent-foreground",secondary:"text-secondary-foreground group-active:text-secondary-foreground",ghost:"group-active:text-accent-foreground",link:"text-primary group-active:underline"},size:{default:"",sm:"",lg:"native:text-lg",icon:""}},defaultVariants:{variant:"default",size:"default"}});function F({ref:m,className:y,variant:W,size:E,...I}){return t(B.Provider,{value:Tm({variant:W,size:E,className:"web:pointer-events-none"}),children:t(Am,{className:_m(I.disabled&&"web:pointer-events-none opacity-50",Gm({variant:W,size:E,className:y})),ref:m,role:"button",...I})})}import{cn as j}from"@contractspec/lib.ui-kit-core/utils";import*as S from"@rn-primitives/label";import{Platform as n}from"react-native";import{jsx as l}from"react/jsx-runtime";function i({className:m,onPress:y,onLongPress:W,onPressIn:E,onPressOut:I,disabled:$,...J}){return l(S.Root,{className:j("flex select-none flex-row items-center gap-2",n.select({web:"cursor-default leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50"}),$&&"opacity-50"),onPress:y,onLongPress:W,onPressIn:E,onPressOut:I,disabled:$,children:l(S.Text,{className:j("font-medium text-foreground text-sm",n.select({web:"leading-none"}),m),...J})})}import{Check as k}from"lucide-react-native";_(k);import{ChevronUp as L}from"lucide-react-native";_(L);import{cn as Y}from"@contractspec/lib.ui-kit-core/utils";import*as R from"@rn-primitives/select";import{Platform as h,StyleSheet as fm,View as zm}from"react-native";import Fm,{FadeIn as Om,FadeOut as Pm}from"react-native-reanimated";import{jsx as X,jsxs as N}from"react/jsx-runtime";var a=R.Root,Ay=R.Group,s=R.Value;function mm({ref:m,className:y,children:W,...E}){return N(R.Trigger,{ref:m,className:Y("flex h-10 native:h-12 flex-row items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-muted-foreground text-sm web:ring-offset-background web:focus:outline-hidden web:focus:ring-2 web:focus:ring-ring web:focus:ring-offset-2 [&>span]:line-clamp-1",E.disabled&&"web:cursor-not-allowed opacity-50",y),...E,children:[W,X(P,{size:16,"aria-hidden":!0,className:"text-foreground opacity-50"})]})}function Dm({className:m,...y}){if(h.OS!=="web")return null;return X(R.ScrollUpButton,{className:Y("flex web:cursor-default items-center justify-center py-1",m),...y,children:X(L,{size:14,className:"text-foreground"})})}function Sm({className:m,...y}){if(h.OS!=="web")return null;return X(R.ScrollDownButton,{className:Y("flex web:cursor-default items-center justify-center py-1",m),...y,children:X(P,{size:14,className:"text-foreground"})})}function ym({className:m,children:y,position:W="popper",portalHost:E,...I}){let{open:$}=R.useRootContext();return X(R.Portal,{hostName:E,children:X(R.Overlay,{style:h.OS!=="web"?fm.absoluteFill:void 0,children:X(Fm.View,{className:"z-50",entering:Om,exiting:Pm,children:N(R.Content,{className:Y("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 relative z-50 max-h-96 min-w-32 rounded-md border border-border bg-popover px-1 py-2 shadow-foreground/10 shadow-md",W==="popper"&&"data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",$?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",m),position:W,...I,children:[X(Dm,{}),X(R.Viewport,{className:Y("p-1",W==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:y}),X(Sm,{})]})})})})}function Gy({className:m,...y}){return X(R.Label,{className:Y("py-1.5 pr-2 native:pb-2 native:pl-10 pl-8 font-semibold native:text-base text-popover-foreground text-sm",m),...y})}function u({className:m,children:y,...W}){return N(R.Item,{className:Y("web:group relative flex w-full web:cursor-default web:select-none flex-row items-center rounded-xs native:py-2 py-1.5 pr-2 native:pl-10 pl-8 web:outline-hidden web:hover:bg-accent/50 web:focus:bg-accent active:bg-accent",W.disabled&&"web:pointer-events-none opacity-50",m),...W,children:[X(zm,{className:"absolute left-2 native:left-3.5 flex h-3.5 w-3.5 items-center justify-center native:pt-px",children:X(R.ItemIndicator,{children:X(k,{size:16,strokeWidth:3,className:"text-popover-foreground"})})}),X(R.ItemText,{className:"native:text-base native:text-lg text-popover-foreground text-sm web:group-focus:text-accent-foreground"})]})}function Ty({className:m,...y}){return X(R.Separator,{className:Y("-mx-1 my-1 h-px bg-muted",m),...y})}import{cn as V}from"@contractspec/lib.ui-kit-core/utils";import{cva as w}from"class-variance-authority";import{View as v}from"react-native";import{jsx as b}from"react/jsx-runtime";var C="flex",Um=w([C,"flex-col"],{variants:{spacing:{none:"",xs:"gap-y-1",sm:"gap-y-2",md:"gap-y-4",lg:"gap-y-6",xl:"gap-y-8","2xl":"gap-y-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"}},defaultVariants:{spacing:"md",align:"stretch",justify:"start",width:"auto",padding:"none",gap:"none"}}),Bm=w([C,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"start",width:"auto",padding:"none",gap:"none",wrap:"wrap"}}),km=w([C,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"center",width:"auto",padding:"none",gap:"none",wrap:"wrap"}});function Dy({className:m,spacing:y,align:W,justify:E,width:I,padding:$,gap:J,wrap:K,...H}){return b(v,{className:V(km({spacing:y,align:W,justify:E,width:I,padding:$,gap:J,wrap:K}),m),...H})}function g({className:m,spacing:y,align:W,justify:E,width:I,padding:$,gap:J,wrap:K,...H}){return b(v,{className:V(Bm({spacing:y,align:W,justify:E,width:I,padding:$,gap:J,wrap:K}),m),...H})}function Sy({className:m,spacing:y,align:W,justify:E,width:I,padding:$,gap:J,...K}){return b(v,{className:V(Um({spacing:y,align:W,justify:E,width:I,padding:$,gap:J}),m),...K})}import{View as Lm}from"react-native";import{jsx as A,jsxs as Z}from"react/jsx-runtime";var o=({value:m,options:y,onChange:W,placeholder:E="S\xE9lectionner...",label:I,disabled:$=!1,className:J="",showCounts:K=!1})=>{return Z(g,{className:`space-y-2 ${J}`,children:[I&&A(i,{className:"font-medium text-base text-foreground",children:I}),Z(a,{value:m,onValueChange:W,disabled:$,children:[A(mm,{className:"w-full",children:A(s,{placeholder:E})}),Z(ym,{className:"bg-background",children:[Z(u,{value:"all",label:"Tous",children:[A(Q,{children:"Tous"}),K&&Z(Lm,{className:"ml-2 text-muted-foreground text-sm",children:["(",y.reduce((H,O)=>H+(O.count||0),0),")"]})]}),y.map((H)=>A(u,{value:H.value,label:H.label,children:Z(g,{className:"flex w-full items-center justify-between",children:[A(Q,{children:H.label}),K&&H.count!==void 0&&Z(Q,{className:"ml-2 text-muted-foreground text-sm",children:["(",H.count,")"]})]})},H.value))]})]})]})};import{cn as Rm}from"@contractspec/lib.ui-kit-core/utils";import{TextInput as hm}from"react-native";import{jsx as um}from"react/jsx-runtime";function Wm({className:m,placeholderClassName:y,...W}){return um(hm,{className:Rm("web:flex h-10 native:h-12 web:w-full rounded-md border border-input bg-background px-3 web:py-2 native:text-lg text-base text-foreground native:leading-tight web:ring-offset-background file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 lg:text-sm",W.editable===!1&&"web:cursor-not-allowed opacity-50",m),placeholderClassName:Rm("text-muted-foreground",y),...W})}import{Search as Nm,X as Vm}from"lucide-react";import{View as d}from"react-native";import{jsx as G,jsxs as Em}from"react/jsx-runtime";var r=({value:m,onChange:y,placeholder:W="Rechercher...",onClear:E,disabled:I=!1,className:$=""})=>{let J=()=>{y(""),E?.()};return Em(d,{className:`relative w-full ${$}`,children:[G(d,{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:G(Nm,{className:"h-4 w-4 text-muted-foreground"})}),G(Wm,{value:m,onChange:(K)=>y(K.nativeEvent.text),placeholder:W,editable:!I,className:"pr-10 pl-10"}),m&&G(d,{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:Em(F,{variant:"ghost",size:"sm",onPress:J,disabled:I,className:"h-6 w-6 p-0 hover:bg-transparent",children:[G(Vm,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),G(Q,{className:"sr-only",children:"Effacer la recherche"})]})})]})};import*as T from"@rn-primitives/collapsible";var Im=T.Root,$m=T.Trigger,Mm=T.Content;import{ChevronDown as wm,ChevronUp as vm,Filter as Cm}from"lucide-react";import{useState as gm}from"react";import{View as f}from"react-native";import{jsx as q,jsxs as z}from"react/jsx-runtime";var bm=({searchValue:m,onSearchChange:y,searchPlaceholder:W,filters:E=[],isLoading:I=!1,disabled:$=!1,className:J="",collapsible:K=!0,defaultCollapsed:H=!1})=>{let[O,Xm]=gm(H),p=E.length>0,U=E.filter((M)=>M.value).length,qm=K&&p,x=()=>q(f,{className:"flex flex-col gap-4 sm:flex-row sm:flex-wrap",children:E.map((M)=>q(o,{value:{value:M.value,label:M.value},options:M.options,onChange:M.onChange,label:M.label,disabled:$||I,showCounts:M.showCounts,className:"min-w-0"},M.key))});return z(f,{className:`flex flex-col gap-4 ${J}`,children:[z(f,{className:"flex flex-col gap-4 sm:flex-row",children:[q(f,{className:"flex-1",children:q(r,{value:m,onChange:y,placeholder:W,disabled:$||I,className:"w-full"})}),qm&&z(Im,{open:!O,onOpenChange:Xm,className:"sm:hidden",children:[q($m,{asChild:!0,children:z(F,{variant:"outline",className:"sm:hidden",disabled:$||I,children:[q(Cm,{className:"mr-2 h-4 w-4"}),"Filtres",U>0&&q(Q,{className:"ml-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground text-sm",children:U}),O?q(wm,{className:"ml-2 h-4 w-4"}):q(vm,{className:"ml-2 h-4 w-4"})]})}),q(Mm,{className:"mt-4 space-y-4",children:q(x,{})})]})]}),p&&q(f,{className:"hidden sm:flex",children:q(x,{})}),U>0&&z(f,{className:"flex flex-wrap items-center gap-2",children:[q(Q,{className:"text-base text-muted-foreground",children:"Filtres actifs:"}),E.filter((M)=>M.value).map((M)=>{let Hm=M.options.find((Jm)=>Jm.value===M.value);return z(F,{variant:"secondary",size:"sm",onPress:()=>M.onChange(void 0),disabled:$||I,className:"h-7 px-2 text-sm",children:[M.label,": ",Hm?.label,q(Q,{className:"ml-1",children:"\xD7"})]},M.key)})]})]})};export{bm as SearchAndFilter};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as p}from"@contractspec/lib.ui-kit-core/utils";import*as N from"react";import C,{useAnimatedStyle as L,useSharedValue as V,withRepeat as _,withSequence as b,withTiming as l}from"react-native-reanimated";import{jsx as y}from"react/jsx-runtime";var r=1000;function P({className:o,...m}){let f=V(1);N.useEffect(()=>{f.value=_(b(l(0.5,{duration:r}),l(1,{duration:r})),-1)},[]);let g=L(()=>({opacity:f.value}));return y(C.View,{style:g,className:p("rounded-md bg-secondary dark:bg-muted",o),...m})}import{View as z}from"react-native";import{jsx as $}from"react/jsx-runtime";function I({count:o=6,className:m="",itemClassName:f=""}){return $(z,{className:`flex flex-col gap-3 ${m}`,children:Array.from({length:o}).map((g,k)=>$(P,{className:`h-20 rounded-md ${f}`},k))})}export{I as SkeletonList};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface NativeSelectProps {
|
|
3
|
+
value?: string;
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
onValueChange?: (value: string) => void;
|
|
6
|
+
onChange?: (event: {
|
|
7
|
+
target: {
|
|
8
|
+
value: string;
|
|
9
|
+
};
|
|
10
|
+
}) => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export interface NativeSelectOptionProps {
|
|
17
|
+
value?: string | number;
|
|
18
|
+
label?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export interface NativeSelectOptGroupProps {
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
label?: string;
|
|
25
|
+
}
|
|
26
|
+
declare function NativeSelect({ value, defaultValue, onValueChange, onChange, placeholder, disabled, className, children, }: NativeSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare function NativeSelectOption({ value, label, children, disabled, }: NativeSelectOptionProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function NativeSelectOptGroup({ children }: NativeSelectOptGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{styled as h}from"nativewind";function g(t){h(t,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{ChevronDown as f}from"lucide-react-native";g(f);import{Check as b}from"lucide-react-native";g(b);import{ChevronUp as O}from"lucide-react-native";g(O);import{cn as l}from"@contractspec/lib.ui-kit-core/utils";import*as e from"@rn-primitives/select";import{Platform as R,StyleSheet as c,View as I}from"react-native";import M,{FadeIn as T,FadeOut as q}from"react-native-reanimated";import{jsx as i,jsxs as y}from"react/jsx-runtime";var G=e.Root,m=e.Group,N=e.Value;function C({ref:t,className:u,children:r,...n}){return y(e.Trigger,{ref:t,className:l("flex h-10 native:h-12 flex-row items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-muted-foreground text-sm web:ring-offset-background web:focus:outline-hidden web:focus:ring-2 web:focus:ring-ring web:focus:ring-offset-2 [&>span]:line-clamp-1",n.disabled&&"web:cursor-not-allowed opacity-50",u),...n,children:[r,i(f,{size:16,"aria-hidden":!0,className:"text-foreground opacity-50"})]})}function z({className:t,...u}){if(R.OS!=="web")return null;return i(e.ScrollUpButton,{className:l("flex web:cursor-default items-center justify-center py-1",t),...u,children:i(O,{size:14,className:"text-foreground"})})}function E({className:t,...u}){if(R.OS!=="web")return null;return i(e.ScrollDownButton,{className:l("flex web:cursor-default items-center justify-center py-1",t),...u,children:i(f,{size:14,className:"text-foreground"})})}function S({className:t,children:u,position:r="popper",portalHost:n,...a}){let{open:d}=e.useRootContext();return i(e.Portal,{hostName:n,children:i(e.Overlay,{style:R.OS!=="web"?c.absoluteFill:void 0,children:i(M.View,{className:"z-50",entering:T,exiting:q,children:y(e.Content,{className:l("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 relative z-50 max-h-96 min-w-32 rounded-md border border-border bg-popover px-1 py-2 shadow-foreground/10 shadow-md",r==="popper"&&"data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",d?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",t),position:r,...a,children:[i(z,{}),i(e.Viewport,{className:l("p-1",r==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:u}),i(E,{})]})})})})}function j({className:t,...u}){return i(e.Label,{className:l("py-1.5 pr-2 native:pb-2 native:pl-10 pl-8 font-semibold native:text-base text-popover-foreground text-sm",t),...u})}function V({className:t,children:u,...r}){return y(e.Item,{className:l("web:group relative flex w-full web:cursor-default web:select-none flex-row items-center rounded-xs native:py-2 py-1.5 pr-2 native:pl-10 pl-8 web:outline-hidden web:hover:bg-accent/50 web:focus:bg-accent active:bg-accent",r.disabled&&"web:pointer-events-none opacity-50",t),...r,children:[i(I,{className:"absolute left-2 native:left-3.5 flex h-3.5 w-3.5 items-center justify-center native:pt-px",children:i(e.ItemIndicator,{children:i(b,{size:16,strokeWidth:3,className:"text-popover-foreground"})})}),i(e.ItemText,{className:"native:text-base native:text-lg text-popover-foreground text-sm web:group-focus:text-accent-foreground"})]})}function s({className:t,...u}){return i(e.Separator,{className:l("-mx-1 my-1 h-px bg-muted",t),...u})}import{jsx as o,jsxs as J}from"react/jsx-runtime";function W(t){return t==null?void 0:{value:t,label:t}}function ue({value:t,defaultValue:u,onValueChange:r,onChange:n,placeholder:a="Select option",disabled:d,className:L,children:P}){return J(G,{value:W(t),defaultValue:W(u),onValueChange:(v)=>{if(!v)return;r?.(v.value),n?.({target:{value:v.value}})},disabled:d,children:[o(C,{disabled:d,className:L,children:o(N,{placeholder:a})}),o(S,{children:o(m,{children:P})})]})}function re({value:t,label:u,children:r,disabled:n}){let a=t==null?"":String(t);return o(V,{value:a,label:u??(typeof r==="string"?r:a),disabled:n})}function ne({children:t}){return o(m,{children:t})}export{re as NativeSelectOption,ne as NativeSelectOptGroup,ue as NativeSelect};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|