@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,6 @@
|
|
|
1
|
+
import type { SharedDateRange, SharedDateRangePickerProps } from '@contractspec/lib.ui-kit-core/interfaces';
|
|
2
|
+
export interface DateRange extends SharedDateRange {
|
|
3
|
+
}
|
|
4
|
+
export interface DateRangePickerProps extends SharedDateRangePickerProps {
|
|
5
|
+
}
|
|
6
|
+
export declare function DateRangePicker({ value, onChange, disabled, minDate, maxDate, placeholders, className, }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as j}from"@contractspec/lib.ui-kit-core/utils";import*as E from"@rn-primitives/slot";import*as W from"react";import{Text as h}from"react-native";import{jsx as x}from"react/jsx-runtime";var g=W.createContext(void 0);function Z({className:q,asChild:F=!1,...z}){let A=W.useContext(g);return x(F?E.Text:h,{className:j("web:select-text text-base text-foreground",A,q),...z})}import{cn as _}from"@contractspec/lib.ui-kit-core/utils";import{cva as $}from"class-variance-authority";import{View as B}from"react-native";import{jsx as R}from"react/jsx-runtime";var M="flex",m=$([M,"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"}}),o=$([M,"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=$([M,"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 s({className:q,spacing:F,align:z,justify:A,width:G,padding:J,gap:K,wrap:L,...O}){return R(B,{className:_(v({spacing:F,align:z,justify:A,width:G,padding:J,gap:K,wrap:L}),q),...O})}function P({className:q,spacing:F,align:z,justify:A,width:G,padding:J,gap:K,wrap:L,...O}){return R(B,{className:_(o({spacing:F,align:z,justify:A,width:G,padding:J,gap:K,wrap:L}),q),...O})}function T({className:q,spacing:F,align:z,justify:A,width:G,padding:J,gap:K,...L}){return R(B,{className:_(m({spacing:F,align:z,justify:A,width:G,padding:J,gap:K}),q),...L})}import{cn as U}from"@contractspec/lib.ui-kit-core/utils";import V from"@react-native-community/datetimepicker";import{useMemo as p,useState as y}from"react";import{Platform as X,Pressable as N}from"react-native";import{jsx as Q,jsxs as C}from"react/jsx-runtime";function f(q){if(!q)return"";try{return q.toLocaleDateString()}catch{return""}}function Iq({value:q,onChange:F,disabled:z,minDate:A,maxDate:G,placeholders:J,className:K}){let[L,O]=y(!1),[k,H]=y(!1),D=p(()=>({minimumDate:A,maximumDate:G}),[A,G]),b=(S,I)=>{if(X.OS!=="ios")O(!1);if(!I)return;let Y=q.end&&I>q.end?I:q.end;F({start:I,end:Y})},w=(S,I)=>{if(X.OS!=="ios")H(!1);if(!I)return;let Y=q.start&&I<q.start?I:q.start;F({start:Y,end:I})};return C(T,{className:U("w-full",K),spacing:"sm",children:[C(P,{gap:"sm",children:[Q(N,{disabled:z,onPress:()=>O(!0),className:U("h-12 flex-1 flex-row items-center rounded-md border border-input bg-background px-3",z&&"opacity-50"),children:Q(Z,{className:U("text-base text-foreground",!q.start&&"opacity-50"),children:q.start?f(q.start):J?.start||"Start date"})}),Q(N,{disabled:z,onPress:()=>H(!0),className:U("h-12 flex-1 flex-row items-center rounded-md border border-input bg-background px-3",z&&"opacity-50"),children:Q(Z,{className:U("text-base text-foreground",!q.end&&"opacity-50"),children:q.end?f(q.end):J?.end||"End date"})})]}),L&&Q(V,{value:q.start??new Date,mode:"date",display:X.OS==="ios"?"inline":"default",onChange:b,...D}),k&&Q(V,{value:q.end??q.start??new Date,mode:"date",display:X.OS==="ios"?"inline":"default",onChange:w,minimumDate:q.start??A,maximumDate:G})]})}export{Iq as DateRangePicker};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SharedDateTimePickerProps } from '@contractspec/lib.ui-kit-core/interfaces';
|
|
2
|
+
export interface DateTimePickerProps extends SharedDateTimePickerProps {
|
|
3
|
+
datePlaceholder?: string;
|
|
4
|
+
timePlaceholder?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function DateTimePicker({ value, onChange, disabled, minDate, maxDate, datePlaceholder, timePlaceholder, is24Hour, className, }: DateTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as N}from"@contractspec/lib.ui-kit-core/utils";import*as T from"@rn-primitives/slot";import*as M from"react";import{Text as h}from"react-native";import{jsx as b}from"react/jsx-runtime";var y=M.createContext(void 0);function O({className:P,asChild:f=!1,...q}){let A=M.useContext(y);return b(f?T.Text:h,{className:N("web:select-text text-base text-foreground",A,P),...q})}import{cn as U}from"@contractspec/lib.ui-kit-core/utils";import{cva as W}from"class-variance-authority";import{View as X}from"react-native";import{jsx as Z}from"react/jsx-runtime";var Y="flex",g=W([Y,"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"}}),w=W([Y,"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"}}),m=W([Y,"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:P,spacing:f,align:q,justify:A,width:z,padding:F,gap:G,wrap:E,...I}){return Z(X,{className:U(m({spacing:f,align:q,justify:A,width:z,padding:F,gap:G,wrap:E}),P),...I})}function k({className:P,spacing:f,align:q,justify:A,width:z,padding:F,gap:G,wrap:E,...I}){return Z(X,{className:U(w({spacing:f,align:q,justify:A,width:z,padding:F,gap:G,wrap:E}),P),...I})}function G0({className:P,spacing:f,align:q,justify:A,width:z,padding:F,gap:G,...E}){return Z(X,{className:U(g({spacing:f,align:q,justify:A,width:z,padding:F,gap:G}),P),...E})}import{cn as _}from"@contractspec/lib.ui-kit-core/utils";import o from"@react-native-community/datetimepicker";import{useMemo as j,useState as r}from"react";import{Platform as H,Pressable as x,View as n}from"react-native";import{jsx as $,jsxs as u}from"react/jsx-runtime";function v(P){if(!P)return"";try{return P.toLocaleDateString(void 0,{day:"2-digit",month:"long",year:"numeric"})}catch{return""}}function D({value:P,onChange:f,disabled:q,minDate:A,maxDate:z,placeholder:F="Select date",className:G}){let[E,I]=r(!1),L=j(()=>({minimumDate:A,maximumDate:z,timeZoneName:void 0}),[A,z]),Q=(J,K)=>{if(H.OS!=="ios")I(!1);if(K)f(K)};return u(n,{className:_("w-full",G),children:[$(x,{disabled:q,onPress:()=>I(!0),className:_("h-12 flex-row items-center rounded-md border border-input bg-background px-3",q&&"opacity-50"),children:$(O,{className:_("text-base text-foreground",!P&&"opacity-50"),children:P?v(P):F})}),E&&$(o,{value:P??new Date,mode:"date",display:H.OS==="ios"?"inline":"default",onChange:Q,...L})]})}import{cn as B}from"@contractspec/lib.ui-kit-core/utils";import p from"@react-native-community/datetimepicker";import{useMemo as d,useState as c}from"react";import{Platform as C,Pressable as l,View as i}from"react-native";import{jsx as R,jsxs as s}from"react/jsx-runtime";function t(P,f){if(!P)return"";try{return P.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!f})}catch{return""}}function S({value:P,onChange:f,disabled:q,placeholder:A="Select time",is24Hour:z=!0,className:F}){let[G,E]=c(!1),I=d(()=>({is24Hour:z,timeZoneName:void 0}),[z]),L=(Q,J)=>{if(C.OS!=="ios")E(!1);if(J)f(J)};return s(i,{className:B("w-full",F),children:[R(l,{disabled:q,onPress:()=>E(!0),className:B("h-12 flex-row items-center rounded-md border border-input bg-background px-3",q&&"opacity-50"),children:R(O,{className:B("text-base text-foreground",!P&&"opacity-50"),children:P?t(P,z):A})}),G&&R(p,{value:P??new Date,mode:"time",display:C.OS==="ios"?"spinner":"default",onChange:L,...I})]})}import{jsx as V,jsxs as e}from"react/jsx-runtime";function D0({value:P,onChange:f,disabled:q,minDate:A,maxDate:z,datePlaceholder:F,timePlaceholder:G,is24Hour:E,className:I}){return e(k,{className:I,gap:"sm",children:[V(D,{value:P,onChange:(J)=>{if(!J)return;let K=new Date(J);if(P)K.setHours(P.getHours(),P.getMinutes(),0,0);f(K)},disabled:q,minDate:A,maxDate:z,placeholder:F,className:"flex-1"}),V(S,{value:P,onChange:(J)=>{if(!J)return;let K=new Date(P??new Date);K.setHours(J.getHours(),J.getMinutes(),0,0),f(K)},disabled:q,is24Hour:E,placeholder:G,className:"flex-1"})]})}export{D0 as DateTimePicker};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as DialogPrimitive from '@rn-primitives/dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { View, type ViewProps } from 'react-native';
|
|
4
|
+
declare const Dialog: {
|
|
5
|
+
({ asChild, open: openProp, defaultOpen, onOpenChange: onOpenChangeProp, ref, ...viewProps }: ViewProps & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
} & {
|
|
8
|
+
open?: boolean;
|
|
9
|
+
defaultOpen?: boolean;
|
|
10
|
+
onOpenChange?: (value: boolean) => void;
|
|
11
|
+
} & React.RefAttributes<View>): React.JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
declare const DialogTrigger: {
|
|
15
|
+
({ asChild, onPress: onPressProp, disabled, ref, ...props }: Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
} & {
|
|
18
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
19
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
20
|
+
} & React.RefAttributes<View>): React.JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
declare const DialogPortal: typeof DialogPrimitive.Portal;
|
|
24
|
+
declare const DialogClose: {
|
|
25
|
+
({ asChild, onPress: onPressProp, disabled, ref, ...props }: Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
|
|
26
|
+
asChild?: boolean;
|
|
27
|
+
} & {
|
|
28
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
29
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
30
|
+
} & React.RefAttributes<View>): React.JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
declare function DialogOverlayNative({ className, children, ...props }: DialogPrimitive.OverlayProps & {
|
|
34
|
+
ref?: React.RefObject<DialogPrimitive.OverlayRef>;
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
declare const DialogOverlay: typeof DialogOverlayNative;
|
|
38
|
+
declare function DialogContent({ className, children, portalHost, ...props }: DialogPrimitive.ContentProps & {
|
|
39
|
+
ref?: React.RefObject<DialogPrimitive.ContentRef>;
|
|
40
|
+
className?: string;
|
|
41
|
+
portalHost?: string;
|
|
42
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare function DialogHeader({ className, ...props }: ViewProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
declare function DialogFooter({ className, ...props }: ViewProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
declare function DialogTitle({ className, ...props }: DialogPrimitive.TitleProps & {
|
|
46
|
+
ref?: React.RefObject<DialogPrimitive.TitleRef>;
|
|
47
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
declare function DialogDescription({ className, ...props }: DialogPrimitive.DescriptionProps & {
|
|
49
|
+
ref?: React.RefObject<DialogPrimitive.DescriptionRef>;
|
|
50
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{styled as G}from"nativewind";function z(u){G(u,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{X as q}from"lucide-react-native";z(q);import{cn as M}from"@contractspec/lib.ui-kit-core/utils";import*as f from"@rn-primitives/dialog";import{Platform as B,StyleSheet as J,View as C}from"react-native";import K,{FadeIn as Q,FadeOut as R}from"react-native-reanimated";import{jsx as I,jsxs as $}from"react/jsx-runtime";var F=f.Root,H=f.Trigger,U=f.Portal,P=f.Close;function Y({className:u,...L}){let{open:W}=f.useRootContext();return I(f.Overlay,{className:M("absolute top-0 right-0 bottom-0 left-0 flex items-center justify-center bg-black/80 p-2",W?"web:fade-in-0 web:animate-in":"web:fade-out-0 web:animate-out",u),...L})}function Z({className:u,children:L,...W}){return I(f.Overlay,{style:J.absoluteFill,className:M("flex items-center justify-center bg-black/80 p-2",u),...W,children:I(K.View,{entering:Q.duration(150),exiting:R.duration(150),children:L})})}var _=B.select({web:Y,default:Z});function O({className:u,children:L,portalHost:W,...E}){let{open:y}=f.useRootContext();return I(U,{hostName:W,children:I(_,{children:$(f.Content,{className:M("max-w-lg web:cursor-default gap-4 rounded-lg border border-border bg-background p-6 shadow-lg web:duration-200",y?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",u),...E,children:[L,I(f.Close,{className:"web:group absolute top-4 right-4 rounded-xs p-0.5 opacity-70 web:ring-offset-background web:transition-opacity web:hover:opacity-100 web:focus:outline-hidden web:focus:ring-2 web:focus:ring-ring web:focus:ring-offset-2 web:disabled:pointer-events-none",children:I(q,{size:B.OS==="web"?16:18,className:M("text-muted-foreground",y&&"text-accent-foreground")})})]})})})}function d({className:u,...L}){return I(C,{className:M("flex flex-col gap-1.5 text-center sm:text-left",u),...L})}function v({className:u,...L}){return I(C,{className:M("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",u),...L})}function m({className:u,...L}){return I(f.Title,{className:M("font-semibold native:text-xl text-foreground text-lg leading-none tracking-tight",u),...L})}function t({className:u,...L}){return I(f.Description,{className:M("native:text-base text-muted-foreground text-sm",u),...L})}export{H as DialogTrigger,m as DialogTitle,U as DialogPortal,_ as DialogOverlay,d as DialogHeader,v as DialogFooter,t as DialogDescription,O as DialogContent,P as DialogClose,F as Dialog};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from '@rn-primitives/dropdown-menu';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { type StyleProp, type TextProps, View, type ViewStyle } from 'react-native';
|
|
4
|
+
declare const DropdownMenu: {
|
|
5
|
+
({ asChild, onOpenChange: onOpenChangeProp, ref, ...viewProps }: import("react-native").ViewProps & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
} & {
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
} & React.RefAttributes<View>): React.JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
declare const DropdownMenuTrigger: {
|
|
13
|
+
({ asChild, onPress: onPressProp, disabled, ref, ...props }: Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
} & {
|
|
16
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
17
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
18
|
+
} & React.RefAttributes<import("@rn-primitives/dropdown-menu").TriggerRef>): React.JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
declare const DropdownMenuGroup: {
|
|
22
|
+
({ asChild, ref, ...props }: import("react-native").ViewProps & {
|
|
23
|
+
asChild?: boolean;
|
|
24
|
+
} & React.RefAttributes<View>): React.JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
declare const DropdownMenuPortal: typeof DropdownMenuPrimitive.Portal;
|
|
28
|
+
declare const DropdownMenuSub: {
|
|
29
|
+
({ asChild, defaultOpen, open: openProp, onOpenChange: onOpenChangeProp, ref, ...props }: import("react-native").ViewProps & {
|
|
30
|
+
asChild?: boolean;
|
|
31
|
+
} & {
|
|
32
|
+
defaultOpen?: boolean;
|
|
33
|
+
open?: boolean;
|
|
34
|
+
onOpenChange?: (value: boolean) => void;
|
|
35
|
+
} & React.RefAttributes<View>): React.JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
declare const DropdownMenuRadioGroup: {
|
|
39
|
+
({ asChild, value, onValueChange, ref, ...props }: import("react-native").ViewProps & {
|
|
40
|
+
asChild?: boolean;
|
|
41
|
+
} & {
|
|
42
|
+
value: string | undefined;
|
|
43
|
+
onValueChange: (value: string) => void;
|
|
44
|
+
} & React.RefAttributes<View>): React.JSX.Element;
|
|
45
|
+
displayName: string;
|
|
46
|
+
};
|
|
47
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: DropdownMenuPrimitive.SubTriggerProps & {
|
|
48
|
+
ref?: React.RefObject<DropdownMenuPrimitive.SubTriggerRef>;
|
|
49
|
+
className?: string;
|
|
50
|
+
inset?: boolean;
|
|
51
|
+
children?: React.ReactNode;
|
|
52
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
declare function DropdownMenuSubContent({ className, ...props }: DropdownMenuPrimitive.SubContentProps & {
|
|
54
|
+
ref?: React.RefObject<DropdownMenuPrimitive.SubContentRef>;
|
|
55
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
declare function DropdownMenuContent({ className, overlayClassName, overlayStyle, portalHost, ...props }: DropdownMenuPrimitive.ContentProps & {
|
|
57
|
+
ref?: React.RefObject<DropdownMenuPrimitive.ContentRef>;
|
|
58
|
+
overlayStyle?: StyleProp<ViewStyle>;
|
|
59
|
+
overlayClassName?: string;
|
|
60
|
+
portalHost?: string;
|
|
61
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
declare function DropdownMenuItem({ className, inset, ...props }: DropdownMenuPrimitive.ItemProps & {
|
|
63
|
+
ref?: React.RefObject<DropdownMenuPrimitive.ItemRef>;
|
|
64
|
+
className?: string;
|
|
65
|
+
inset?: boolean;
|
|
66
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: DropdownMenuPrimitive.CheckboxItemProps & {
|
|
68
|
+
ref?: React.RefObject<DropdownMenuPrimitive.CheckboxItemRef>;
|
|
69
|
+
children?: React.ReactNode;
|
|
70
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: DropdownMenuPrimitive.RadioItemProps & {
|
|
72
|
+
ref?: React.RefObject<DropdownMenuPrimitive.RadioItemRef>;
|
|
73
|
+
children?: React.ReactNode;
|
|
74
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: DropdownMenuPrimitive.LabelProps & {
|
|
76
|
+
ref?: React.RefObject<DropdownMenuPrimitive.LabelRef>;
|
|
77
|
+
className?: string;
|
|
78
|
+
inset?: boolean;
|
|
79
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
declare function DropdownMenuSeparator({ className, ...props }: DropdownMenuPrimitive.SeparatorProps & {
|
|
81
|
+
ref?: React.RefObject<DropdownMenuPrimitive.SeparatorRef>;
|
|
82
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
declare function DropdownMenuShortcut({ className, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{styled as I}from"nativewind";function E(W){I(W,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{ChevronDown as Q}from"lucide-react-native";E(Q);import{cn as g}from"@contractspec/lib.ui-kit-core/utils";import*as H from"@rn-primitives/slot";import*as J from"react";import{Text as V}from"react-native";import{jsx as P}from"react/jsx-runtime";var K=J.createContext(void 0);function S({className:W,asChild:L=!1,...q}){let B=J.useContext(K);return P(L?H.Text:V,{className:g("web:select-text text-base text-foreground",B,W),...q})}import{Check as X}from"lucide-react-native";E(X);import{ChevronUp as Y}from"lucide-react-native";E(Y);import{ChevronRight as Z}from"lucide-react-native";E(Z);import{cn as A}from"@contractspec/lib.ui-kit-core/utils";import*as f from"@rn-primitives/dropdown-menu";import{Platform as $,StyleSheet as _,Text as R,View as U}from"react-native";import{jsx as z,jsxs as G}from"react/jsx-runtime";var e=f.Root,s=f.Trigger,ff=f.Group,Wf=f.Portal,Lf=f.Sub,qf=f.RadioGroup;function zf({className:W,inset:L,children:q,...B}){let{open:F}=f.useSubContext(),O=$.OS==="web"?Z:F?Y:Q;return z(K.Provider,{value:A("select-none native:text-lg text-primary text-sm",F&&"native:text-accent-foreground"),children:G(f.SubTrigger,{className:A("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",F&&"bg-accent",L&&"pl-8",W),...B,children:[q,z(O,{size:18,className:"ml-auto text-foreground"})]})})}function Af({className:W,...L}){let{open:q}=f.useSubContext();return z(f.SubContent,{className:A("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",q?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out web:animate-out",W),...L})}function Bf({className:W,overlayClassName:L,overlayStyle:q,portalHost:B,...F}){let{open:O}=f.useRootContext();return z(f.Portal,{hostName:B,children:z(f.Overlay,{style:q?_.flatten([$.OS!=="web"?_.absoluteFill:void 0,q]):$.OS!=="web"?_.absoluteFill:void 0,className:L,children:z(f.Content,{className:A("web:data-[side=bottom]:slide-in-from-top-2 web:data-[side=left]:slide-in-from-right-2 web:data-[side=right]:slide-in-from-left-2 web:data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-1 shadow-foreground/5 shadow-md",O?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",W),...F})})})}function Ef({className:W,inset:L,...q}){return z(K.Provider,{value:"select-none text-sm native:text-lg text-popover-foreground web:group-focus:text-accent-foreground",children:z(f.Item,{className:A("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",L&&"pl-8",q.disabled&&"web:pointer-events-none opacity-50",W),...q})})}function Ff({className:W,children:L,checked:q,...B}){return G(f.CheckboxItem,{className:A("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",B.disabled&&"web:pointer-events-none opacity-50",W),checked:q,...B,children:[z(U,{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:z(f.ItemIndicator,{children:z(X,{size:14,strokeWidth:3,className:"text-foreground"})})}),L]})}function Jf({className:W,children:L,...q}){return G(f.RadioItem,{className:A("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",q.disabled&&"web:pointer-events-none opacity-50",W),...q,children:[z(U,{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:z(f.ItemIndicator,{children:z(U,{className:"h-2 w-2 rounded-full bg-foreground"})})}),L]})}function Kf({className:W,inset:L,...q}){return z(f.Label,{className:A("web:cursor-default px-2 py-1.5 font-semibold native:text-base text-foreground text-sm",L&&"pl-8",W),...q})}function Of({className:W,...L}){return z(f.Separator,{className:A("-mx-1 my-1 h-px bg-border",W),...L})}function Qf({className:W,...L}){return z(R,{className:A("ml-auto native:text-sm text-muted-foreground text-xs tracking-widest",W),...L})}export{s as DropdownMenuTrigger,zf as DropdownMenuSubTrigger,Af as DropdownMenuSubContent,Lf as DropdownMenuSub,Qf as DropdownMenuShortcut,Of as DropdownMenuSeparator,Jf as DropdownMenuRadioItem,qf as DropdownMenuRadioGroup,Wf as DropdownMenuPortal,Kf as DropdownMenuLabel,Ef as DropdownMenuItem,ff as DropdownMenuGroup,Bf as DropdownMenuContent,Ff as DropdownMenuCheckboxItem,e as DropdownMenu};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SharedEmptyStateProps } from '@contractspec/lib.ui-kit-core/interfaces';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const containerVariants: (props?: ({
|
|
4
|
+
density?: "default" | "compact" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface EmptyStateProps extends SharedEmptyStateProps, VariantProps<typeof containerVariants> {
|
|
7
|
+
}
|
|
8
|
+
export declare function EmptyState({ icon, title, description, primaryAction, secondaryAction, className, density, }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as A}from"@contractspec/lib.ui-kit-core/utils";import*as P from"@rn-primitives/slot";import*as Z from"react";import{Text as S}from"react-native";import{jsx as v}from"react/jsx-runtime";var k=Z.createContext(void 0);function F({className:q,asChild:D=!1,...z}){let E=Z.useContext(k);return v(D?P.Text:S,{className:A("web:select-text text-base text-foreground",E,q),...z})}import{cn as $}from"@contractspec/lib.ui-kit-core/utils";import{cva as M}from"class-variance-authority";import{View as Q}from"react-native";import{jsx as B}from"react/jsx-runtime";var R="flex",V=M([R,"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"}}),T=M([R,"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"}}),w=M([R,"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 o({className:q,spacing:D,align:z,justify:E,width:K,padding:O,gap:U,wrap:W,..._}){return B(Q,{className:$(w({spacing:D,align:z,justify:E,width:K,padding:O,gap:U,wrap:W}),q),..._})}function n({className:q,spacing:D,align:z,justify:E,width:K,padding:O,gap:U,wrap:W,..._}){return B(Q,{className:$(T({spacing:D,align:z,justify:E,width:K,padding:O,gap:U,wrap:W}),q),..._})}function H({className:q,spacing:D,align:z,justify:E,width:K,padding:O,gap:U,...W}){return B(Q,{className:$(V({spacing:D,align:z,justify:E,width:K,padding:O,gap:U}),q),...W})}import{cn as I}from"@contractspec/lib.ui-kit-core/utils";import*as G from"@rn-primitives/slot";import{Platform as b}from"react-native";import{jsx as J}from"react/jsx-runtime";function t({className:q,asChild:D=!1,...z}){return J(D?G.Text:F,{role:"heading","aria-level":"1",className:I("web:select-text web:scroll-m-20 font-extrabold text-4xl text-foreground tracking-tight lg:text-5xl",q),...z})}function i({className:q,asChild:D=!1,...z}){return J(D?G.Text:F,{role:"heading","aria-level":"2",className:I("web:select-text web:scroll-m-20 border-border border-b pb-2 font-semibold text-3xl text-foreground tracking-tight first:mt-0",q),...z})}function f({className:q,asChild:D=!1,...z}){return J(D?G.Text:F,{role:"heading","aria-level":"3",className:I("web:select-text web:scroll-m-20 font-semibold text-2xl text-foreground tracking-tight",q),...z})}function a({className:q,asChild:D=!1,...z}){return J(D?G.Text:F,{role:"heading","aria-level":"4",className:I("web:select-text web:scroll-m-20 font-semibold text-foreground text-xl tracking-tight",q),...z})}function s({className:q,asChild:D=!1,...z}){return J(D?G.Text:F,{className:I("web:select-text text-base text-foreground",q),...z})}function qq({className:q,asChild:D=!1,...z}){return J(D?G.Text:F,{role:b.OS==="web"?"blockquote":void 0,className:I("mt-6 native:mt-4 web:select-text border-border border-l-2 native:pl-3 pl-6 text-base text-foreground italic",q),...z})}function zq({className:q,asChild:D=!1,...z}){return J(D?G.Text:F,{role:b.OS==="web"?"code":void 0,className:I("relative web:select-text rounded-md bg-muted px-[0.3rem] py-[0.2rem] font-semibold text-foreground text-sm",q),...z})}function Dq({className:q,asChild:D=!1,...z}){return J(D?G.Text:F,{className:I("web:select-text text-muted-foreground text-xl",q),...z})}function Eq({className:q,asChild:D=!1,...z}){return J(D?G.Text:F,{className:I("web:select-text font-semibold text-foreground text-xl",q),...z})}function Fq({className:q,asChild:D=!1,...z}){return J(D?G.Text:F,{className:I("web:select-text font-medium text-foreground text-sm leading-none",q),...z})}function Gq({className:q,asChild:D=!1,...z}){return J(D?G.Text:F,{className:I("web:select-text text-muted-foreground text-sm",q),...z})}import{cn as u}from"@contractspec/lib.ui-kit-core/utils";import{cva as y}from"class-variance-authority";import{View as X}from"react-native";import{jsx as Y,jsxs as L}from"react/jsx-runtime";var g=y("items-center text-center",{variants:{density:{compact:"gap-3 p-6",default:"gap-4 p-8"}},defaultVariants:{density:"default"}});function Zq({icon:q,title:D,description:z,primaryAction:E,secondaryAction:K,className:O,density:U}){return L(H,{className:u(g({density:U}),O),children:[q?Y(X,{className:"flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:Y(X,{className:"flex items-center justify-center text-muted-foreground",children:q})}):null,L(X,{children:[Y(f,{className:"font-medium",children:D}),z?Y(X,{className:"text-base text-muted-foreground",children:Y(F,{children:z})}):null]}),(E||K)&&L(X,{className:"flex items-center justify-center gap-2",children:[E,K]})]})}export{Zq as EmptyState};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { type ViewProps } from 'react-native';
|
|
3
|
+
declare function Empty({ className, ...props }: ViewProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function EmptyHeader({ className, ...props }: ViewProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const emptyMediaVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "icon" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function EmptyMedia({ className, variant, ...props }: ViewProps & VariantProps<typeof emptyMediaVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function EmptyTitle({ className, ...props }: ViewProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function EmptyDescription({ className, ...props }: ViewProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function EmptyContent({ className, ...props }: ViewProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, };
|
package/dist/ui/empty.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as q}from"@contractspec/lib.ui-kit-core/utils";import{cva as F}from"class-variance-authority";import{View as z}from"react-native";import{jsx as A}from"react/jsx-runtime";function L({className:g,...f}){return A(z,{"data-slot":"empty",className:q("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance rounded-lg border-dashed p-6 text-center md:p-12",g),...f})}function O({className:g,...f}){return A(z,{"data-slot":"empty-header",className:q("flex max-w-sm flex-col items-center gap-2 text-center",g),...f})}var G=F("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function P({className:g,variant:f="default",...B}){return A(z,{"data-slot":"empty-icon","data-variant":f,className:q(G({variant:f,className:g})),...B})}function Q({className:g,...f}){return A(z,{"data-slot":"empty-title",className:q("font-medium text-lg tracking-tight",g),...f})}function R({className:g,...f}){return A(z,{"data-slot":"empty-description",className:q("text-muted-foreground text-sm/relaxed [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",g),...f})}function S({className:g,...f}){return A(z,{"data-slot":"empty-content",className:q("flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm",g),...f})}export{Q as EmptyTitle,P as EmptyMedia,O as EmptyHeader,R as EmptyDescription,S as EmptyContent,L as Empty};
|
package/dist/ui/fab.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface FABAction {
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
label: string;
|
|
5
|
+
onPress: () => void;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
interface FABProps {
|
|
9
|
+
actions: FABAction[];
|
|
10
|
+
className?: string;
|
|
11
|
+
mainIcon?: React.ReactNode;
|
|
12
|
+
mainColor?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function FAB({ actions, className, mainIcon, mainColor, }: FABProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function MiniFAB({ icon, onPress, className, color, }: {
|
|
16
|
+
icon: React.ReactNode;
|
|
17
|
+
onPress: () => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
color?: string;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
package/dist/ui/fab.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as z}from"@contractspec/lib.ui-kit-core/utils";import{Plus as M,X}from"lucide-react-native";import{useState as Y}from"react";import{Pressable as Q,StyleSheet as C,View as R}from"react-native";import T,{useAnimatedStyle as K,withSpring as L,withTiming as V}from"react-native-reanimated";import{jsx as q,jsxs as v}from"react/jsx-runtime";var U=T.createAnimatedComponent(Q);function A({actions:B,className:D,mainIcon:E,mainColor:F="bg-primary"}){let[f,G]=Y(!1),W=()=>{G(!f)},Z=K(()=>{return{transform:[{rotate:L(f?"45deg":"0deg",{damping:15,stiffness:150})}]}});return v(R,{className:z("absolute right-4 bottom-24 z-50",D),children:[f&&q(Q,{style:C.absoluteFillObject,className:"fixed inset-0 -top-full -left-full h-[200%] w-[200%]",onPress:()=>G(!1)}),B.map((H,J)=>{let _=K(()=>{let k=f?-(J+1)*65:0;return{transform:[{translateY:L(k,{damping:15,stiffness:150,mass:1+J*0.1})}],opacity:V(f?1:0,{duration:200}),pointerEvents:f?"auto":"none"}}),$=K(()=>{return{transform:[{scale:L(f?1:0.8,{damping:15,stiffness:150})}]}});return q(U,{style:[_,$],className:"absolute right-0 bottom-0",onPress:()=>{H.onPress(),G(!1)},children:q(R,{className:z("h-12 w-12 items-center justify-center rounded-full shadow-lg",H.color||"bg-secondary"),children:H.icon})},J)}),q(U,{onPress:W,className:z("h-14 w-14 items-center justify-center rounded-full shadow-xl",F),style:[Z,{shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:0.3,shadowRadius:8,elevation:8}],children:f?q(X,{size:24,color:"white",strokeWidth:2.5}):E||q(M,{size:24,color:"white",strokeWidth:2.5})})]})}function b({icon:B,onPress:D,className:E,color:F="bg-primary"}){return q(Q,{onPress:D,className:z("h-12 w-12 items-center justify-center rounded-full shadow-lg",F,E),style:{shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:0.25,shadowRadius:4,elevation:5},children:B})}export{b as MiniFAB,A as FAB};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SharedFieldErrorProps, SharedFieldLegendProps, SharedFieldProps } from '@contractspec/lib.ui-kit-core/interfaces';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { Label } from './label';
|
|
4
|
+
import { type BoxProps } from './stack';
|
|
5
|
+
import { type TypographyProps } from './typography';
|
|
6
|
+
declare function FieldSet({ className, ...props }: BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function FieldLegend({ className, variant, ...props }: BoxProps & SharedFieldLegendProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function FieldGroup({ className, ...props }: BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const fieldVariants: (props?: ({
|
|
10
|
+
orientation?: "vertical" | "horizontal" | "responsive" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
declare function Field({ className, orientation, ...props }: BoxProps & SharedFieldProps & VariantProps<typeof fieldVariants>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function FieldContent({ className, ...props }: BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function FieldTitle({ className, ...props }: BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function FieldDescription({ className, ...props }: TypographyProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function FieldSeparator({ children, className, ...props }: BoxProps & {
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function FieldError({ className, children, errors, ...props }: BoxProps & SharedFieldErrorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, };
|
package/dist/ui/field.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as v}from"@contractspec/lib.ui-kit-core/utils";import*as f from"@rn-primitives/slot";import*as Q from"react";import{Text as g}from"react-native";import{jsx as u}from"react/jsx-runtime";var C=Q.createContext(void 0);function U({className:z,asChild:q=!1,...A}){let J=Q.useContext(C);return u(q?f.Text:g,{className:v("web:select-text text-base text-foreground",J,z),...A})}import{cn as B}from"@contractspec/lib.ui-kit-core/utils";import*as R from"@rn-primitives/label";import{Platform as k}from"react-native";import{jsx as w}from"react/jsx-runtime";function y({className:z,onPress:q,onLongPress:A,onPressIn:J,onPressOut:X,disabled:Y,...E}){return w(R.Root,{className:B("flex select-none flex-row items-center gap-2",k.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"}),Y&&"opacity-50"),onPress:q,onLongPress:A,onPressIn:J,onPressOut:X,disabled:Y,children:w(R.Text,{className:B("font-medium text-foreground text-sm",k.select({web:"leading-none"}),z),...E})})}import{cn as M}from"@contractspec/lib.ui-kit-core/utils";import{cva as O}from"class-variance-authority";import{View as H}from"react-native";import{jsx as V}from"react/jsx-runtime";var L="flex",j=O([L,"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"}}),h=O([L,"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"}}),N=O([L,"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:J,width:X,padding:Y,gap:E,wrap:G,...I}){return V(H,{className:M(N({spacing:q,align:A,justify:J,width:X,padding:Y,gap:E,wrap:G}),z),...I})}function Jq({className:z,spacing:q,align:A,justify:J,width:X,padding:Y,gap:E,wrap:G,...I}){return V(H,{className:M(h({spacing:q,align:A,justify:J,width:X,padding:Y,gap:E,wrap:G}),z),...I})}function S({className:z,spacing:q,align:A,justify:J,width:X,padding:Y,gap:E,...G}){return V(H,{className:M(j({spacing:q,align:A,justify:J,width:X,padding:Y,gap:E}),z),...G})}import{cn as Z}from"@contractspec/lib.ui-kit-core/utils";import*as W from"@rn-primitives/slot";import{Platform as P}from"react-native";import{jsx as _}from"react/jsx-runtime";function Zq({className:z,asChild:q=!1,...A}){return _(q?W.Text:U,{role:"heading","aria-level":"1",className:Z("web:select-text web:scroll-m-20 font-extrabold text-4xl text-foreground tracking-tight lg:text-5xl",z),...A})}function _q({className:z,asChild:q=!1,...A}){return _(q?W.Text:U,{role:"heading","aria-level":"2",className:Z("web:select-text web:scroll-m-20 border-border border-b pb-2 font-semibold text-3xl text-foreground tracking-tight first:mt-0",z),...A})}function $q({className:z,asChild:q=!1,...A}){return _(q?W.Text:U,{role:"heading","aria-level":"3",className:Z("web:select-text web:scroll-m-20 font-semibold text-2xl text-foreground tracking-tight",z),...A})}function Dq({className:z,asChild:q=!1,...A}){return _(q?W.Text:U,{role:"heading","aria-level":"4",className:Z("web:select-text web:scroll-m-20 font-semibold text-foreground text-xl tracking-tight",z),...A})}function F({className:z,asChild:q=!1,...A}){return _(q?W.Text:U,{className:Z("web:select-text text-base text-foreground",z),...A})}function Eq({className:z,asChild:q=!1,...A}){return _(q?W.Text:U,{role:P.OS==="web"?"blockquote":void 0,className:Z("mt-6 native:mt-4 web:select-text border-border border-l-2 native:pl-3 pl-6 text-base text-foreground italic",z),...A})}function Gq({className:z,asChild:q=!1,...A}){return _(q?W.Text:U,{role:P.OS==="web"?"code":void 0,className:Z("relative web:select-text rounded-md bg-muted px-[0.3rem] py-[0.2rem] font-semibold text-foreground text-sm",z),...A})}function Qq({className:z,asChild:q=!1,...A}){return _(q?W.Text:U,{className:Z("web:select-text text-muted-foreground text-xl",z),...A})}function Rq({className:z,asChild:q=!1,...A}){return _(q?W.Text:U,{className:Z("web:select-text font-semibold text-foreground text-xl",z),...A})}function Iq({className:z,asChild:q=!1,...A}){return _(q?W.Text:U,{className:Z("web:select-text font-medium text-foreground text-sm leading-none",z),...A})}function Mq({className:z,asChild:q=!1,...A}){return _(q?W.Text:U,{className:Z("web:select-text text-muted-foreground text-sm",z),...A})}import{cn as m}from"@contractspec/lib.ui-kit-core/utils";import*as T from"@rn-primitives/separator";import{jsx as x}from"react/jsx-runtime";function b({className:z,orientation:q="horizontal",decorative:A=!0,...J}){return x(T.Root,{decorative:A,orientation:q,className:m("shrink-0 bg-border",q==="horizontal"?"h-px w-full":"h-full w-px",z),...J})}import{cn as D}from"@contractspec/lib.ui-kit-core/utils";import{cva as d}from"class-variance-authority";import{useMemo as n}from"react";import{jsx as K,jsxs as l}from"react/jsx-runtime";function Tq({className:z,...q}){return K($,{"data-slot":"field-set",className:D("flex flex-col gap-6","has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",z),...q})}function bq({className:z,variant:q="legend",...A}){return K($,{"data-slot":"field-legend","data-variant":q,className:D("mb-3 font-medium","data-[variant=legend]:text-base","data-[variant=label]:text-sm",z),...A})}function vq({className:z,...q}){return K($,{"data-slot":"field-group",className:D("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 data-[slot=field-group]:*:gap-4",z),...q})}var o=d("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col *:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","data-[slot=field-label]:*:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["@md/field-group:flex-row flex-col @md/field-group:items-center *:w-full @md/field-group:*:w-auto [&>.sr-only]:w-auto","@md/field-group:data-[slot=field-label]:*:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function gq({className:z,orientation:q="vertical",...A}){return K($,{role:"group","data-slot":"field","data-orientation":q,className:D(o({orientation:q}),z),...A})}function Cq({className:z,...q}){return K($,{"data-slot":"field-content",className:D("group/field-content flex flex-1 flex-col gap-1.5 leading-snug",z),...q})}function uq({className:z,...q}){return K(y,{"data-slot":"field-label",className:D("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4","has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10",z),...q})}function jq({className:z,...q}){return K($,{"data-slot":"field-label",className:D("flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50",z),...q})}function hq({className:z,...q}){return K(F,{"data-slot":"field-description",className:D("font-normal text-muted-foreground text-sm leading-normal group-has-data-[orientation=horizontal]/field:text-balance","nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",z),...q})}function Nq({children:z,className:q,...A}){return l($,{"data-slot":"field-separator","data-content":!!z,className:D("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",q),...A,children:[K(b,{className:"absolute inset-0 top-1/2"}),z&&K($,{className:"relative mx-auto block w-fit bg-background px-2 text-muted-foreground","data-slot":"field-separator-content",children:z})]})}function mq({className:z,children:q,errors:A,...J}){let X=n(()=>{if(q)return q;if(!A?.length)return null;if(A?.length==1)return A[0]?.message;return K(S,{className:"ml-4 flex list-disc flex-col gap-1",children:A.map((Y,E)=>Y?.message&&K(F,{children:Y.message},E))})},[q,A]);if(!X)return null;return K($,{role:"alert","data-slot":"field-error",className:D("font-normal text-destructive text-sm",z),...J,children:X})}export{jq as FieldTitle,Tq as FieldSet,Nq as FieldSeparator,bq as FieldLegend,uq as FieldLabel,vq as FieldGroup,mq as FieldError,hq as FieldDescription,Cq as FieldContent,gq as Field};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ControllerProps, type FieldPath, type FieldValues } from 'react-hook-form';
|
|
3
|
+
import { View as RNView } from 'react-native';
|
|
4
|
+
import { Label } from './label';
|
|
5
|
+
import { P } from './typography';
|
|
6
|
+
export { zodResolver } from '@hookform/resolvers/zod';
|
|
7
|
+
export { type UseFormReturn, useFieldArray, useForm } from 'react-hook-form';
|
|
8
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
9
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const useFormField: () => {
|
|
11
|
+
invalid: boolean;
|
|
12
|
+
isDirty: boolean;
|
|
13
|
+
isTouched: boolean;
|
|
14
|
+
isValidating: boolean;
|
|
15
|
+
error?: import("react-hook-form").FieldError;
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
formItemId: string;
|
|
19
|
+
formDescriptionId: string;
|
|
20
|
+
formMessageId: string;
|
|
21
|
+
};
|
|
22
|
+
declare function FormItem({ className, ...props }: React.ComponentProps<typeof RNView>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function FormLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function FormControl({ asChild, ...props }: React.ComponentProps<typeof RNView> & {
|
|
25
|
+
asChild?: boolean;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare function FormDescription({ className, ...props }: React.ComponentProps<typeof P>): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function FormMessage({ className, ...props }: React.ComponentProps<typeof P>): import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, };
|
package/dist/ui/form.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as v}from"@contractspec/lib.ui-kit-core/utils";import*as V from"@rn-primitives/slot";import*as z from"react";import{Text as I}from"react-native";import{jsx as b}from"react/jsx-runtime";var T=z.createContext(void 0);function J({className:A,asChild:q=!1,...E}){let G=z.useContext(T);return b(q?V.Text:I,{className:v("web:select-text text-base text-foreground",G,A),...E})}import{cn as R}from"@contractspec/lib.ui-kit-core/utils";import*as B from"@rn-primitives/label";import{Platform as y}from"react-native";import{jsx as D}from"react/jsx-runtime";function H({className:A,onPress:q,onLongPress:E,onPressIn:G,onPressOut:X,disabled:$,...Z}){return D(B.Root,{className:R("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"}),$&&"opacity-50"),onPress:q,onLongPress:E,onPressIn:G,onPressOut:X,disabled:$,children:D(B.Text,{className:R("font-medium text-foreground text-sm",y.select({web:"leading-none"}),A),...Z})})}import{cn as U}from"@contractspec/lib.ui-kit-core/utils";import*as K from"@rn-primitives/slot";import{Platform as M}from"react-native";import{jsx as W}from"react/jsx-runtime";function l({className:A,asChild:q=!1,...E}){return W(q?K.Text:J,{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",A),...E})}function t({className:A,asChild:q=!1,...E}){return W(q?K.Text:J,{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",A),...E})}function o({className:A,asChild:q=!1,...E}){return W(q?K.Text:J,{role:"heading","aria-level":"3",className:U("web:select-text web:scroll-m-20 font-semibold text-2xl text-foreground tracking-tight",A),...E})}function a({className:A,asChild:q=!1,...E}){return W(q?K.Text:J,{role:"heading","aria-level":"4",className:U("web:select-text web:scroll-m-20 font-semibold text-foreground text-xl tracking-tight",A),...E})}function O({className:A,asChild:q=!1,...E}){return W(q?K.Text:J,{className:U("web:select-text text-base text-foreground",A),...E})}function r({className:A,asChild:q=!1,...E}){return W(q?K.Text:J,{role:M.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",A),...E})}function e({className:A,asChild:q=!1,...E}){return W(q?K.Text:J,{role:M.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",A),...E})}function s({className:A,asChild:q=!1,...E}){return W(q?K.Text:J,{className:U("web:select-text text-muted-foreground text-xl",A),...E})}function qq({className:A,asChild:q=!1,...E}){return W(q?K.Text:J,{className:U("web:select-text font-semibold text-foreground text-xl",A),...E})}function Aq({className:A,asChild:q=!1,...E}){return W(q?K.Text:J,{className:U("web:select-text font-medium text-foreground text-sm leading-none",A),...E})}function Eq({className:A,asChild:q=!1,...E}){return W(q?K.Text:J,{className:U("web:select-text text-muted-foreground text-sm",A),...E})}import{cn as Q}from"@contractspec/lib.ui-kit-core/utils";import*as S from"@rn-primitives/slot";import*as Y from"react";import{Controller as P,FormProvider as f,useFormContext as u,useFormState as j}from"react-hook-form";import{View as L}from"react-native";import{zodResolver as Rq}from"@hookform/resolvers/zod";import{useFieldArray as Dq,useForm as Hq}from"react-hook-form";import{jsx as _}from"react/jsx-runtime";var Zq=f,g=Y.createContext({}),_q=({...A})=>{return _(g.Provider,{value:{name:A.name},children:_(P,{...A})})},w=()=>{let A=Y.useId(),q=Y.useContext(g),E=Y.useContext(k),{getFieldState:G}=u();if(!q?.name)throw Error("useFormField should be used within <FormField>");let X=j({name:q.name}),$=G(q.name,X),Z=E?.id??A;return{id:Z,name:q.name,formItemId:`${Z}-form-item`,formDescriptionId:`${Z}-form-item-description`,formMessageId:`${Z}-form-item-message`,...$}},k=Y.createContext({});function $q({className:A,...q}){let E=Y.useId();return _(k.Provider,{value:{id:E},children:_(L,{"data-slot":"form-item",className:Q("flex flex-col gap-2",A),...q})})}function zq({className:A,...q}){let{error:E,formItemId:G}=w();return _(H,{"data-slot":"form-label","data-error":!!E,className:Q("data-[error=true]:text-destructive",A),htmlFor:G,...q})}function Bq({asChild:A=!1,...q}){let E=A?S.Text:L,{error:G,formItemId:X,formDescriptionId:$,formMessageId:Z}=w();return _(E,{"data-slot":"form-control",id:X,"aria-describedby":!G?`${$}`:`${$} ${Z}`,"aria-invalid":!!G,...q})}function Qq({className:A,...q}){let{formDescriptionId:E}=w();return _(O,{"data-slot":"form-description",nativeID:E,className:Q("text-muted-foreground text-sm",A),...q})}function wq({className:A,...q}){let{error:E,formMessageId:G}=w(),X=E?String(E?.message??""):q.children;if(!X)return null;return _(O,{"data-slot":"form-message",nativeID:G,className:Q("text-destructive text-sm",A),...q,children:X})}export{Rq as zodResolver,w as useFormField,Hq as useForm,Dq as useFieldArray,wq as FormMessage,zq as FormLabel,$q as FormItem,_q as FormField,Qq as FormDescription,Bq as FormControl,Zq as Form};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as HoverCardPrimitive from '@rn-primitives/hover-card';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const HoverCard: {
|
|
4
|
+
({ asChild, openDelay: _openDelay, closeDelay: _closeDelay, onOpenChange: onOpenChangeProp, ref, ...viewProps }: import("react-native").ViewProps & {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
} & {
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
openDelay?: number;
|
|
9
|
+
closeDelay?: number;
|
|
10
|
+
} & React.RefAttributes<import("react-native").View>): React.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
declare const HoverCardTrigger: {
|
|
14
|
+
({ asChild, onPress: onPressProp, disabled, ref, ...props }: Omit<import("react-native").PressableProps & React.RefAttributes<import("react-native").View>, "ref"> & {
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
} & {
|
|
17
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
18
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
19
|
+
} & React.RefAttributes<import("@rn-primitives/hover-card").TriggerRef>): React.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
declare function HoverCardContent({ className, align, sideOffset, ...props }: HoverCardPrimitive.ContentProps & {
|
|
23
|
+
ref?: React.RefObject<HoverCardPrimitive.ContentRef>;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as M}from"@contractspec/lib.ui-kit-core/utils";import*as L from"@rn-primitives/slot";import*as z from"react";import{Text as Q}from"react-native";import{jsx as U}from"react/jsx-runtime";var J=z.createContext(void 0);function y({className:B,asChild:D=!1,...E}){let G=z.useContext(J);return U(D?L.Text:Q,{className:M("web:select-text text-base text-foreground",G,B),...E})}import{cn as V}from"@contractspec/lib.ui-kit-core/utils";import*as q from"@rn-primitives/hover-card";import{Platform as W,StyleSheet as X}from"react-native";import Y,{FadeIn as Z}from"react-native-reanimated";import{jsx as w}from"react/jsx-runtime";var k=q.Root,O=q.Trigger;function S({className:B,align:D="center",sideOffset:E=4,...G}){let{open:K}=q.useRootContext();return w(q.Portal,{children:w(q.Overlay,{style:W.OS!=="web"?X.absoluteFill:void 0,children:w(Y.View,{entering:Z,children:w(J.Provider,{value:"text-popover-foreground",children:w(q.Content,{align:D,sideOffset:E,className:V("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 w-64 web:cursor-auto rounded-md border border-border bg-popover p-4 shadow-foreground/5 shadow-md web:outline-hidden",K?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",B),...G})})})})})}export{O as HoverCardTrigger,S as HoverCardContent,k as HoverCard};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button, type ButtonProps } from './button';
|
|
3
|
+
import { Input, type InputProps } from './input';
|
|
4
|
+
import { HStack, type HStackProps } from './stack';
|
|
5
|
+
import { Text, type TextProps } from './text';
|
|
6
|
+
import { Textarea, type TextareaProps } from './textarea';
|
|
7
|
+
export type InputGroupAddonAlign = 'inline-start' | 'inline-end' | 'block-start' | 'block-end';
|
|
8
|
+
type SlotProps = {
|
|
9
|
+
'data-slot'?: string;
|
|
10
|
+
};
|
|
11
|
+
type InputGroupProps = HStackProps & SlotProps & {
|
|
12
|
+
'data-disabled'?: boolean | string;
|
|
13
|
+
};
|
|
14
|
+
type InputGroupAddonProps = Omit<HStackProps, 'align'> & SlotProps & {
|
|
15
|
+
align?: InputGroupAddonAlign;
|
|
16
|
+
'data-align'?: InputGroupAddonAlign;
|
|
17
|
+
};
|
|
18
|
+
declare function InputGroup({ className, ...props }: InputGroupProps & {
|
|
19
|
+
ref?: React.RefObject<React.ComponentRef<typeof HStack>>;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function InputGroupAddon({ align: _align, className, ...props }: InputGroupAddonProps & {
|
|
22
|
+
ref?: React.RefObject<React.ComponentRef<typeof HStack>>;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function InputGroupButton({ className, ...props }: ButtonProps & SlotProps & {
|
|
25
|
+
ref?: React.RefObject<React.ComponentRef<typeof Button>>;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare function InputGroupText({ className, ...props }: TextProps & SlotProps & {
|
|
28
|
+
ref?: React.RefObject<React.ComponentRef<typeof Text>>;
|
|
29
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare function InputGroupInput({ className, ...props }: InputProps & SlotProps & {
|
|
31
|
+
ref?: React.RefObject<React.ComponentRef<typeof Input>>;
|
|
32
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
declare function InputGroupTextarea({ className, ...props }: TextareaProps & SlotProps & {
|
|
34
|
+
ref?: React.RefObject<React.ComponentRef<typeof Textarea>>;
|
|
35
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cn as k}from"@contractspec/lib.ui-kit-core/utils";import*as H from"@rn-primitives/slot";import*as U from"react";import{Text as w}from"react-native";import{jsx as C}from"react/jsx-runtime";var X=U.createContext(void 0);function z({className:D,asChild:q=!1,...E}){let F=U.useContext(X);return C(q?H.Text:w,{className:k("web:select-text text-base text-foreground",F,D),...E})}import{cn as h}from"@contractspec/lib.ui-kit-core/utils";import{cva as G}from"class-variance-authority";import{Pressable as T}from"react-native";import{jsx as B}from"react/jsx-runtime";var b=G("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"}}),v=G("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 S({ref:D,className:q,variant:E,size:F,...J}){return B(X.Provider,{value:v({variant:E,size:F,className:"web:pointer-events-none"}),children:B(T,{className:h(J.disabled&&"web:pointer-events-none opacity-50",b({variant:E,size:F,className:q})),ref:D,role:"button",...J})})}import{cn as Y}from"@contractspec/lib.ui-kit-core/utils";import{cva as Z}from"class-variance-authority";import{View as _}from"react-native";import{jsx as P}from"react/jsx-runtime";var $="flex",g=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"}}),d=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"}}),j=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 Eq({className:D,spacing:q,align:E,justify:F,width:J,padding:M,gap:O,wrap:Q,...W}){return P(_,{className:Y(j({spacing:q,align:E,justify:F,width:J,padding:M,gap:O,wrap:Q}),D),...W})}function A({className:D,spacing:q,align:E,justify:F,width:J,padding:M,gap:O,wrap:Q,...W}){return P(_,{className:Y(d({spacing:q,align:E,justify:F,width:J,padding:M,gap:O,wrap:Q}),D),...W})}function Fq({className:D,spacing:q,align:E,justify:F,width:J,padding:M,gap:O,...Q}){return P(_,{className:Y(g({spacing:q,align:E,justify:F,width:J,padding:M,gap:O}),D),...Q})}import{cn as f}from"@contractspec/lib.ui-kit-core/utils";import{TextInput as N}from"react-native";import{jsx as m}from"react/jsx-runtime";function y({className:D,placeholderClassName:q,...E}){return m(N,{className:f("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",E.editable===!1&&"web:cursor-not-allowed opacity-50",D),placeholderClassName:f("text-muted-foreground",q),...E})}import{cn as I}from"@contractspec/lib.ui-kit-core/utils";import*as V from"react";import{TextInput as x}from"react-native";import{jsx as u}from"react/jsx-runtime";var R=V.forwardRef(({className:D,placeholderClassName:q,...E},F)=>{return u(x,{ref:F,className:I("web:flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 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",E.editable===!1&&"web:cursor-not-allowed opacity-50",D),placeholderClassName:I("text-muted-foreground",q),multiline:!0,...E})});R.displayName="Textarea";import{cn as K}from"@contractspec/lib.ui-kit-core/utils";import{jsx as L}from"react/jsx-runtime";function Hq({className:D,...q}){return L(A,{className:K("w-full rounded-md border border-input bg-background",D),gap:"xs",width:"full",...q})}function zq({align:D="inline-start",className:q,...E}){return L(A,{className:K("items-center px-2 py-1.5",q),gap:"xs",...E})}function Bq({className:D,...q}){return L(S,{className:K("h-8 px-2 shadow-none",D),size:"sm",variant:"ghost",...q})}function Gq({className:D,...q}){return L(z,{className:K("text-muted-foreground text-sm",D),...q})}function Sq({className:D,...q}){return L(y,{className:K("flex-1 border-0 bg-transparent shadow-none",D),...q})}function fq({className:D,...q}){return L(R,{className:K("flex-1 border-0 bg-transparent shadow-none",D),...q})}export{fq as InputGroupTextarea,Gq as InputGroupText,Sq as InputGroupInput,Bq as InputGroupButton,zq as InputGroupAddon,Hq as InputGroup};
|