@lssm-tech/lib.ui-kit 4.1.6 → 8.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -17
- package/package.json +1311 -807
- package/dist/browser/index.js +0 -1
- package/dist/browser/ui/accordion.js +0 -1
- package/dist/browser/ui/alert-dialog.js +0 -1
- package/dist/browser/ui/alert.js +0 -1
- package/dist/browser/ui/aspect-ratio.js +0 -1
- package/dist/browser/ui/atoms/FilterSelect/FilterSelect.js +0 -1
- package/dist/browser/ui/atoms/FilterSelect/index.js +0 -1
- package/dist/browser/ui/atoms/FilterSelect/types.js +0 -0
- package/dist/browser/ui/atoms/LoadingSpinner/LoadingSpinner.js +0 -1
- package/dist/browser/ui/atoms/LoadingSpinner/index.js +0 -1
- package/dist/browser/ui/atoms/Pagination/Pagination.js +0 -1
- package/dist/browser/ui/atoms/Pagination/index.js +0 -1
- package/dist/browser/ui/atoms/Pagination/types.js +0 -0
- package/dist/browser/ui/atoms/SearchInput/SearchInput.js +0 -1
- package/dist/browser/ui/atoms/SearchInput/index.js +0 -1
- package/dist/browser/ui/atoms/SearchInput/types.js +0 -0
- package/dist/browser/ui/avatar.js +0 -1
- package/dist/browser/ui/badge.js +0 -1
- package/dist/browser/ui/breadcrumb.js +0 -1
- package/dist/browser/ui/button.js +0 -1
- package/dist/browser/ui/card.js +0 -1
- package/dist/browser/ui/carousel.js +0 -1
- package/dist/browser/ui/checkbox.js +0 -1
- package/dist/browser/ui/collapsible.js +0 -1
- package/dist/browser/ui/combobox.js +0 -1
- package/dist/browser/ui/command.js +0 -1
- package/dist/browser/ui/context-menu.js +0 -1
- package/dist/browser/ui/contracts.typecheck.js +0 -0
- package/dist/browser/ui/data-table.js +0 -1
- package/dist/browser/ui/date-picker.js +0 -1
- package/dist/browser/ui/date-range-picker.js +0 -1
- package/dist/browser/ui/datetime-picker.js +0 -1
- package/dist/browser/ui/dialog.js +0 -1
- package/dist/browser/ui/dropdown-menu.js +0 -1
- package/dist/browser/ui/empty-state.js +0 -1
- package/dist/browser/ui/empty.js +0 -1
- package/dist/browser/ui/fab.js +0 -1
- package/dist/browser/ui/field.js +0 -1
- package/dist/browser/ui/form.js +0 -1
- package/dist/browser/ui/hover-card.js +0 -1
- package/dist/browser/ui/icons/Check.js +0 -1
- package/dist/browser/ui/icons/ChevronDown.js +0 -1
- package/dist/browser/ui/icons/ChevronRight.js +0 -1
- package/dist/browser/ui/icons/ChevronUp.js +0 -1
- package/dist/browser/ui/icons/CircleUser.js +0 -1
- package/dist/browser/ui/icons/Info.js +0 -1
- package/dist/browser/ui/icons/Key.js +0 -1
- package/dist/browser/ui/icons/MoonStar.js +0 -1
- package/dist/browser/ui/icons/Sun.js +0 -1
- package/dist/browser/ui/icons/X.js +0 -1
- package/dist/browser/ui/icons/iconWithClassName.js +0 -1
- package/dist/browser/ui/input-group.js +0 -1
- package/dist/browser/ui/input-otp.js +0 -1
- package/dist/browser/ui/input-password.js +0 -1
- package/dist/browser/ui/input.js +0 -1
- package/dist/browser/ui/label.js +0 -1
- package/dist/browser/ui/link.js +0 -1
- package/dist/browser/ui/list.js +0 -1
- package/dist/browser/ui/loading-button.js +0 -1
- package/dist/browser/ui/loading-overlay.js +0 -1
- package/dist/browser/ui/loading-screen.js +0 -1
- package/dist/browser/ui/marketing/FeatureGrid.js +0 -1
- package/dist/browser/ui/marketing/Hero.js +0 -1
- package/dist/browser/ui/marketing/PricingTable.js +0 -1
- package/dist/browser/ui/marketing/index.js +0 -1
- package/dist/browser/ui/menubar.js +0 -1
- package/dist/browser/ui/molecules/Autocomplete/index.js +0 -1
- package/dist/browser/ui/molecules/SearchAndFilter/SearchAndFilter.js +0 -1
- package/dist/browser/ui/molecules/SearchAndFilter/index.js +0 -1
- package/dist/browser/ui/molecules/SearchAndFilter/types.js +0 -0
- package/dist/browser/ui/molecules/SkeletonList.js +0 -1
- package/dist/browser/ui/native-select.js +0 -1
- package/dist/browser/ui/nativewind-env.d.js +0 -0
- package/dist/browser/ui/navigation-menu.js +0 -1
- package/dist/browser/ui/organisms/ErrorBoundary/ErrorBoundary.js +0 -1
- package/dist/browser/ui/organisms/ErrorBoundary/index.js +0 -1
- package/dist/browser/ui/organisms/ListPage/ListPage.js +0 -1
- package/dist/browser/ui/organisms/ListPage/index.js +0 -1
- package/dist/browser/ui/organisms/ListPage/types.js +0 -0
- package/dist/browser/ui/page-header.js +0 -1
- package/dist/browser/ui/password-strength.js +0 -1
- package/dist/browser/ui/popover.js +0 -1
- package/dist/browser/ui/portal.js +0 -1
- package/dist/browser/ui/progress.js +0 -1
- package/dist/browser/ui/radio-group.js +0 -1
- package/dist/browser/ui/select.js +0 -1
- package/dist/browser/ui/separator.js +0 -1
- package/dist/browser/ui/sheet.js +0 -1
- package/dist/browser/ui/sidebar.js +0 -1
- package/dist/browser/ui/skeleton.js +0 -1
- package/dist/browser/ui/slider.js +0 -1
- package/dist/browser/ui/stack.js +0 -1
- package/dist/browser/ui/stepper.js +0 -1
- package/dist/browser/ui/switch.js +0 -1
- package/dist/browser/ui/table.js +0 -1
- package/dist/browser/ui/tabs.js +0 -1
- package/dist/browser/ui/text.js +0 -1
- package/dist/browser/ui/textarea.js +0 -1
- package/dist/browser/ui/time-picker.js +0 -1
- package/dist/browser/ui/toast.js +0 -1
- package/dist/browser/ui/toggle-group.js +0 -1
- package/dist/browser/ui/toggle.js +0 -1
- package/dist/browser/ui/toolbar.js +0 -1
- package/dist/browser/ui/tooltip.js +0 -1
- package/dist/browser/ui/typography.js +0 -1
- package/dist/browser/ui/useColorScheme.js +0 -1
- package/dist/browser/ui/useListState.js +0 -1
- package/dist/browser/ui/usecases/UseCaseCard.js +0 -1
- package/dist/browser/ui/usecases/UserStoryCard.js +0 -1
- package/dist/browser/ui/usecases/index.js +0 -1
- package/dist/browser/ui/utils.js +0 -1
- package/dist/browser/ui/visualization/Visualization.js +0 -1
- package/dist/browser/ui/visualization/index.js +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/ui/accordion.d.ts +0 -16
- package/dist/ui/accordion.js +0 -2
- package/dist/ui/alert-dialog.d.ts +0 -46
- package/dist/ui/alert-dialog.js +0 -2
- package/dist/ui/alert.d.ts +0 -17
- package/dist/ui/alert.js +0 -2
- package/dist/ui/aspect-ratio.d.ts +0 -8
- package/dist/ui/aspect-ratio.js +0 -2
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +0 -3
- package/dist/ui/atoms/FilterSelect/FilterSelect.js +0 -2
- package/dist/ui/atoms/FilterSelect/index.d.ts +0 -2
- package/dist/ui/atoms/FilterSelect/index.js +0 -2
- package/dist/ui/atoms/FilterSelect/types.d.ts +0 -5
- package/dist/ui/atoms/FilterSelect/types.js +0 -1
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +0 -19
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +0 -2
- package/dist/ui/atoms/LoadingSpinner/index.d.ts +0 -1
- package/dist/ui/atoms/LoadingSpinner/index.js +0 -2
- package/dist/ui/atoms/Pagination/Pagination.d.ts +0 -3
- package/dist/ui/atoms/Pagination/Pagination.js +0 -2
- package/dist/ui/atoms/Pagination/index.d.ts +0 -2
- package/dist/ui/atoms/Pagination/index.js +0 -2
- package/dist/ui/atoms/Pagination/types.d.ts +0 -3
- package/dist/ui/atoms/Pagination/types.js +0 -1
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts +0 -3
- package/dist/ui/atoms/SearchInput/SearchInput.js +0 -2
- package/dist/ui/atoms/SearchInput/index.d.ts +0 -2
- package/dist/ui/atoms/SearchInput/index.js +0 -2
- package/dist/ui/atoms/SearchInput/types.d.ts +0 -3
- package/dist/ui/atoms/SearchInput/types.js +0 -1
- package/dist/ui/avatar.d.ts +0 -13
- package/dist/ui/avatar.js +0 -2
- package/dist/ui/badge.d.ts +0 -11
- package/dist/ui/badge.js +0 -2
- package/dist/ui/breadcrumb.d.ts +0 -12
- package/dist/ui/breadcrumb.js +0 -2
- package/dist/ui/button.d.ts +0 -16
- package/dist/ui/button.js +0 -2
- package/dist/ui/card.d.ts +0 -22
- package/dist/ui/card.js +0 -2
- package/dist/ui/carousel.d.ts +0 -1
- package/dist/ui/carousel.js +0 -2
- package/dist/ui/checkbox.d.ts +0 -12
- package/dist/ui/checkbox.js +0 -2
- package/dist/ui/collapsible.d.ts +0 -27
- package/dist/ui/collapsible.js +0 -2
- package/dist/ui/combobox.d.ts +0 -17
- package/dist/ui/combobox.js +0 -2
- package/dist/ui/command.d.ts +0 -1
- package/dist/ui/command.js +0 -2
- package/dist/ui/context-menu.d.ts +0 -83
- package/dist/ui/context-menu.js +0 -2
- package/dist/ui/contracts.typecheck.d.ts +0 -1
- package/dist/ui/contracts.typecheck.js +0 -1
- package/dist/ui/data-table.d.ts +0 -8
- package/dist/ui/data-table.js +0 -2
- package/dist/ui/data-table.smoke.test.d.ts +0 -1
- package/dist/ui/date-picker.d.ts +0 -4
- package/dist/ui/date-picker.js +0 -2
- package/dist/ui/date-range-picker.d.ts +0 -6
- package/dist/ui/date-range-picker.js +0 -2
- package/dist/ui/datetime-picker.d.ts +0 -6
- package/dist/ui/datetime-picker.js +0 -2
- package/dist/ui/dialog.d.ts +0 -51
- package/dist/ui/dialog.js +0 -2
- package/dist/ui/dropdown-menu.d.ts +0 -84
- package/dist/ui/dropdown-menu.js +0 -2
- package/dist/ui/empty-state.d.ts +0 -9
- package/dist/ui/empty-state.js +0 -2
- package/dist/ui/empty.d.ts +0 -12
- package/dist/ui/empty.js +0 -2
- package/dist/ui/fab.d.ts +0 -21
- package/dist/ui/fab.js +0 -2
- package/dist/ui/field.d.ts +0 -21
- package/dist/ui/field.js +0 -2
- package/dist/ui/form.d.ts +0 -29
- package/dist/ui/form.js +0 -2
- package/dist/ui/hover-card.d.ts +0 -25
- package/dist/ui/hover-card.js +0 -2
- package/dist/ui/icons/Check.d.ts +0 -2
- package/dist/ui/icons/Check.js +0 -2
- package/dist/ui/icons/ChevronDown.d.ts +0 -2
- package/dist/ui/icons/ChevronDown.js +0 -2
- package/dist/ui/icons/ChevronRight.d.ts +0 -2
- package/dist/ui/icons/ChevronRight.js +0 -2
- package/dist/ui/icons/ChevronUp.d.ts +0 -2
- package/dist/ui/icons/ChevronUp.js +0 -2
- package/dist/ui/icons/CircleUser.d.ts +0 -2
- package/dist/ui/icons/CircleUser.js +0 -2
- package/dist/ui/icons/Info.d.ts +0 -2
- package/dist/ui/icons/Info.js +0 -2
- package/dist/ui/icons/Key.d.ts +0 -2
- package/dist/ui/icons/Key.js +0 -2
- package/dist/ui/icons/MoonStar.d.ts +0 -2
- package/dist/ui/icons/MoonStar.js +0 -2
- package/dist/ui/icons/Sun.d.ts +0 -2
- package/dist/ui/icons/Sun.js +0 -2
- package/dist/ui/icons/X.d.ts +0 -2
- package/dist/ui/icons/X.js +0 -2
- package/dist/ui/icons/iconWithClassName.d.ts +0 -2
- package/dist/ui/icons/iconWithClassName.js +0 -2
- package/dist/ui/input-group.d.ts +0 -36
- package/dist/ui/input-group.js +0 -2
- package/dist/ui/input-otp.d.ts +0 -20
- package/dist/ui/input-otp.js +0 -2
- package/dist/ui/input-password.d.ts +0 -10
- package/dist/ui/input-password.js +0 -2
- package/dist/ui/input.d.ts +0 -8
- package/dist/ui/input.js +0 -2
- package/dist/ui/label.d.ts +0 -3
- package/dist/ui/label.js +0 -2
- package/dist/ui/link.d.ts +0 -6
- package/dist/ui/link.js +0 -2
- package/dist/ui/list.d.ts +0 -23
- package/dist/ui/list.js +0 -2
- package/dist/ui/loading-button.d.ts +0 -9
- package/dist/ui/loading-button.js +0 -2
- package/dist/ui/loading-overlay.d.ts +0 -7
- package/dist/ui/loading-overlay.js +0 -2
- package/dist/ui/loading-screen.d.ts +0 -6
- package/dist/ui/loading-screen.js +0 -2
- package/dist/ui/marketing/FeatureGrid.d.ts +0 -4
- package/dist/ui/marketing/FeatureGrid.js +0 -2
- package/dist/ui/marketing/Hero.d.ts +0 -16
- package/dist/ui/marketing/Hero.js +0 -2
- package/dist/ui/marketing/PricingTable.d.ts +0 -4
- package/dist/ui/marketing/PricingTable.js +0 -2
- package/dist/ui/marketing/index.d.ts +0 -3
- package/dist/ui/marketing/index.js +0 -2
- package/dist/ui/menubar.d.ts +0 -80
- package/dist/ui/menubar.js +0 -2
- package/dist/ui/molecules/Autocomplete/index.d.ts +0 -1
- package/dist/ui/molecules/Autocomplete/index.js +0 -2
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +0 -3
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +0 -2
- package/dist/ui/molecules/SearchAndFilter/index.d.ts +0 -2
- package/dist/ui/molecules/SearchAndFilter/index.js +0 -2
- package/dist/ui/molecules/SearchAndFilter/types.d.ts +0 -4
- package/dist/ui/molecules/SearchAndFilter/types.js +0 -1
- package/dist/ui/molecules/SkeletonList.d.ts +0 -7
- package/dist/ui/molecules/SkeletonList.js +0 -2
- package/dist/ui/native-select.d.ts +0 -29
- package/dist/ui/native-select.js +0 -2
- package/dist/ui/nativewind-env.d.js +0 -1
- package/dist/ui/navigation-menu.d.ts +0 -44
- package/dist/ui/navigation-menu.js +0 -2
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +0 -25
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +0 -2
- package/dist/ui/organisms/ErrorBoundary/index.d.ts +0 -2
- package/dist/ui/organisms/ErrorBoundary/index.js +0 -2
- package/dist/ui/organisms/ListPage/ListPage.d.ts +0 -2
- package/dist/ui/organisms/ListPage/ListPage.js +0 -2
- package/dist/ui/organisms/ListPage/index.d.ts +0 -2
- package/dist/ui/organisms/ListPage/index.js +0 -2
- package/dist/ui/organisms/ListPage/types.d.ts +0 -44
- package/dist/ui/organisms/ListPage/types.js +0 -1
- package/dist/ui/page-header.d.ts +0 -9
- package/dist/ui/page-header.js +0 -2
- package/dist/ui/password-strength.d.ts +0 -13
- package/dist/ui/password-strength.js +0 -2
- package/dist/ui/popover.d.ts +0 -23
- package/dist/ui/popover.js +0 -2
- package/dist/ui/portal.d.ts +0 -1
- package/dist/ui/portal.js +0 -2
- package/dist/ui/progress.d.ts +0 -7
- package/dist/ui/progress.js +0 -2
- package/dist/ui/radio-group.d.ts +0 -4
- package/dist/ui/radio-group.js +0 -2
- package/dist/ui/select.d.ts +0 -60
- package/dist/ui/select.js +0 -2
- package/dist/ui/separator.d.ts +0 -6
- package/dist/ui/separator.js +0 -2
- package/dist/ui/sheet.d.ts +0 -1
- package/dist/ui/sheet.js +0 -2
- package/dist/ui/sidebar.d.ts +0 -1
- package/dist/ui/sidebar.js +0 -2
- package/dist/ui/skeleton.d.ts +0 -4
- package/dist/ui/skeleton.js +0 -2
- package/dist/ui/slider.d.ts +0 -7
- package/dist/ui/slider.js +0 -2
- package/dist/ui/stack.d.ts +0 -43
- package/dist/ui/stack.js +0 -2
- package/dist/ui/stepper.d.ts +0 -10
- package/dist/ui/stepper.js +0 -2
- package/dist/ui/switch.d.ts +0 -7
- package/dist/ui/switch.js +0 -2
- package/dist/ui/table.d.ts +0 -24
- package/dist/ui/table.js +0 -2
- package/dist/ui/tabs.d.ts +0 -6
- package/dist/ui/tabs.js +0 -2
- package/dist/ui/text.d.ts +0 -12
- package/dist/ui/text.js +0 -2
- package/dist/ui/textarea.d.ts +0 -8
- package/dist/ui/textarea.js +0 -2
- package/dist/ui/time-picker.d.ts +0 -4
- package/dist/ui/time-picker.js +0 -2
- package/dist/ui/toast.d.ts +0 -40
- package/dist/ui/toast.js +0 -2
- package/dist/ui/toggle-group.d.ts +0 -15
- package/dist/ui/toggle-group.js +0 -2
- package/dist/ui/toggle.d.ts +0 -19
- package/dist/ui/toggle.js +0 -2
- package/dist/ui/toolbar.d.ts +0 -25
- package/dist/ui/toolbar.js +0 -2
- package/dist/ui/tooltip.d.ts +0 -27
- package/dist/ui/tooltip.js +0 -2
- package/dist/ui/typography.d.ts +0 -16
- package/dist/ui/typography.js +0 -2
- package/dist/ui/useColorScheme.d.ts +0 -6
- package/dist/ui/useColorScheme.js +0 -2
- package/dist/ui/useListState.d.ts +0 -6
- package/dist/ui/useListState.js +0 -2
- package/dist/ui/usecases/UseCaseCard.d.ts +0 -7
- package/dist/ui/usecases/UseCaseCard.js +0 -2
- package/dist/ui/usecases/UserStoryCard.d.ts +0 -5
- package/dist/ui/usecases/UserStoryCard.js +0 -2
- package/dist/ui/usecases/index.d.ts +0 -2
- package/dist/ui/usecases/index.js +0 -2
- package/dist/ui/utils.d.ts +0 -2
- package/dist/ui/utils.js +0 -2
- package/dist/ui/visualization/Visualization.d.ts +0 -7
- package/dist/ui/visualization/Visualization.js +0 -2
- package/dist/ui/visualization/index.d.ts +0 -1
- package/dist/ui/visualization/index.js +0 -2
package/dist/ui/breadcrumb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{cn as D}from"@contractspec/lib.ui-kit-core/utils";import{ChevronRight as G,MoreHorizontal as J}from"lucide-react";import{Text as K,View as A}from"react-native";import{jsx as y,jsxs as O}from"react/jsx-runtime";function X({...f}){return y("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...f})}function Y({className:f,...q}){return y(A,{"data-slot":"breadcrumb-list",className:D("flex flex-wrap items-center gap-1.5 break-words text-muted-foreground text-sm sm:gap-2.5",f),...q})}function Z({className:f,...q}){return y(A,{"data-slot":"breadcrumb-item",className:D("inline-flex items-center gap-1.5",f),...q})}function _({asChild:f,className:q,...F}){return y(A,{"data-slot":"breadcrumb-link",className:D("transition-colors hover:text-foreground",q),...F})}function $({className:f,...q}){return y(A,{"data-slot":"breadcrumb-page",role:"link","aria-disabled":!0,"aria-current":"page",className:D("font-normal text-foreground",f),...q})}function z({children:f,className:q,...F}){return y(A,{role:"presentation","data-slot":"breadcrumb-separator","aria-hidden":!0,className:D("[&>svg]:size-3.5",q),...F,children:f??y(G,{})})}function C({className:f,...q}){return O(A,{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":!0,className:D("flex size-9 items-center justify-center",f),...q,children:[y(J,{className:"size-4"}),y(A,{className:"sr-only",children:y(K,{children:"More"})})]})}export{z as BreadcrumbSeparator,$ as BreadcrumbPage,Y as BreadcrumbList,_ as BreadcrumbLink,Z as BreadcrumbItem,C as BreadcrumbEllipsis,X as Breadcrumb};
|
package/dist/ui/button.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { SharedButtonProps } from '@contractspec/lib.ui-kit-core/interfaces';
|
|
2
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Pressable } from 'react-native';
|
|
5
|
-
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
7
|
-
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
8
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
-
declare const buttonTextVariants: (props?: ({
|
|
10
|
-
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
11
|
-
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
12
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
-
type ButtonProps = SharedButtonProps & React.ComponentProps<typeof Pressable> & VariantProps<typeof buttonVariants>;
|
|
14
|
-
declare function Button({ ref, className, variant, size, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export type { ButtonProps };
|
|
16
|
-
export { Button, buttonTextVariants, buttonVariants };
|
package/dist/ui/button.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{cn as J}from"@contractspec/lib.ui-kit-core/utils";import*as G from"@rn-primitives/slot";import*as w from"react";import{Text as K}from"react-native";import{jsx as L}from"react/jsx-runtime";var F=w.createContext(void 0);function X({className:A,asChild:D=!1,...g}){let q=w.useContext(F);return L(D?G.Text:K,{className:J("web:select-text text-base text-foreground",q,A),...g})}import{cn as M}from"@contractspec/lib.ui-kit-core/utils";import{cva as I}from"class-variance-authority";import{Pressable as O}from"react-native";import{jsx as H}from"react/jsx-runtime";var Q=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"}}),S=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 P({ref:A,className:D,variant:g,size:q,...E}){return H(F.Provider,{value:S({variant:g,size:q,className:"web:pointer-events-none"}),children:H(O,{className:M(E.disabled&&"web:pointer-events-none opacity-50",Q({variant:g,size:q,className:D})),ref:A,role:"button",...E})})}export{Q as buttonVariants,S as buttonTextVariants,P as Button};
|
package/dist/ui/card.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { TextProps, ViewProps } from 'react-native';
|
|
3
|
-
import { Text, View } from 'react-native';
|
|
4
|
-
declare function Card({ className, ...props }: ViewProps & {
|
|
5
|
-
ref?: React.RefObject<View>;
|
|
6
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
declare function CardHeader({ className, ...props }: ViewProps & {
|
|
8
|
-
ref?: React.RefObject<View>;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
declare function CardTitle({ className, ...props }: TextProps & {
|
|
11
|
-
ref?: React.RefObject<Text>;
|
|
12
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
declare function CardDescription({ className, ...props }: TextProps & {
|
|
14
|
-
ref?: React.RefObject<Text>;
|
|
15
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
declare function CardContent({ className, ...props }: ViewProps & {
|
|
17
|
-
ref?: React.RefObject<View>;
|
|
18
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
declare function CardFooter({ className, ...props }: ViewProps & {
|
|
20
|
-
ref?: React.RefObject<View>;
|
|
21
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, };
|
package/dist/ui/card.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{cn as K}from"@contractspec/lib.ui-kit-core/utils";import*as E from"@rn-primitives/slot";import*as z from"react";import{Text as L}from"react-native";import{jsx as M}from"react/jsx-runtime";var B=z.createContext(void 0);function S({className:f,asChild:g=!1,...I}){let J=z.useContext(B);return M(g?E.Text:L,{className:K("web:select-text text-base text-foreground",J,f),...I})}import{cn as y}from"@contractspec/lib.ui-kit-core/utils";import{Text as G,View as A}from"react-native";import{jsx as q}from"react/jsx-runtime";function _({className:f,...g}){return q(A,{className:y("rounded-lg border border-border bg-card shadow-2xs shadow-foreground/10",f),...g})}function $({className:f,...g}){return q(A,{className:y("flex flex-col gap-y-1.5 p-6",f),...g})}function D({className:f,...g}){return q(G,{role:"heading","aria-level":3,className:y("font-semibold text-2xl text-card-foreground leading-none tracking-tight",f),...g})}function F({className:f,...g}){return q(G,{className:y("text-muted-foreground text-sm",f),...g})}function H({className:f,...g}){return q(B.Provider,{value:"text-card-foreground",children:q(A,{className:y("p-6 pt-0",f),...g})})}function R({className:f,...g}){return q(A,{className:y("flex flex-row items-center p-6 pt-0",f),...g})}export{D as CardTitle,$ as CardHeader,R as CardFooter,F as CardDescription,H as CardContent,_ as Card};
|
package/dist/ui/carousel.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const carousel = "null";
|
package/dist/ui/carousel.js
DELETED
package/dist/ui/checkbox.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare const Checkbox: React.ForwardRefExoticComponent<Omit<Omit<import("react-native").PressableProps & React.RefAttributes<import("react-native").View>, "ref"> & {
|
|
3
|
-
asChild?: boolean;
|
|
4
|
-
} & {
|
|
5
|
-
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
6
|
-
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
7
|
-
} & {
|
|
8
|
-
checked: boolean;
|
|
9
|
-
onCheckedChange: (checked: boolean) => void;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
} & React.RefAttributes<import("react-native").View>, "ref"> & React.RefAttributes<import("react-native").View>>;
|
|
12
|
-
export { Checkbox };
|
package/dist/ui/checkbox.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{cn as w}from"@contractspec/lib.ui-kit-core/utils";import*as g from"@rn-primitives/checkbox";import{Check as D}from"lucide-react-native";import*as y from"react";import{jsx as q}from"react/jsx-runtime";var E=y.forwardRef(({className:z,...A},B)=>q(g.Root,{ref:B,className:w("web:peer h-4 w-4 shrink-0 rounded-xs border border-primary web:ring-offset-background web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",z),...A,children:q(g.Indicator,{className:w("flex items-center justify-center text-current"),children:q(D,{className:"h-4 w-4"})})}));E.displayName=g.Root.displayName;export{E as Checkbox};
|
package/dist/ui/collapsible.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
declare const Collapsible: {
|
|
2
|
-
({ asChild, disabled, open: openProp, defaultOpen, onOpenChange: onOpenChangeProp, ref, ...viewProps }: import("react-native").ViewProps & {
|
|
3
|
-
asChild?: boolean;
|
|
4
|
-
} & {
|
|
5
|
-
open?: boolean;
|
|
6
|
-
defaultOpen?: boolean;
|
|
7
|
-
onOpenChange?: (open: boolean) => void;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
} & import("react").RefAttributes<import("react-native").View>): React.JSX.Element;
|
|
10
|
-
displayName: string;
|
|
11
|
-
};
|
|
12
|
-
declare const CollapsibleTrigger: {
|
|
13
|
-
({ asChild, onPress: onPressProp, disabled: disabledProp, ref, ...props }: Omit<import("react-native").PressableProps & import("react").RefAttributes<import("react-native").View>, "ref"> & {
|
|
14
|
-
asChild?: boolean;
|
|
15
|
-
} & {
|
|
16
|
-
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
17
|
-
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
18
|
-
} & import("react").RefAttributes<import("react-native").View>): React.JSX.Element;
|
|
19
|
-
displayName: string;
|
|
20
|
-
};
|
|
21
|
-
declare const CollapsibleContent: {
|
|
22
|
-
({ asChild, forceMount, ref, ...props }: import("@rn-primitives/types").ForceMountable & import("react-native").ViewProps & {
|
|
23
|
-
asChild?: boolean;
|
|
24
|
-
} & import("react").RefAttributes<import("react-native").View>): React.JSX.Element | null;
|
|
25
|
-
displayName: string;
|
|
26
|
-
};
|
|
27
|
-
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
package/dist/ui/collapsible.js
DELETED
package/dist/ui/combobox.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface ComboboxOption {
|
|
2
|
-
value: string;
|
|
3
|
-
label: string;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
keywords?: string[];
|
|
6
|
-
}
|
|
7
|
-
export interface ComboboxProps {
|
|
8
|
-
options: ComboboxOption[];
|
|
9
|
-
value?: string;
|
|
10
|
-
onValueChange?: (value: string) => void;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
searchPlaceholder?: string;
|
|
13
|
-
emptyText?: string;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
|
-
export declare function Combobox({ options, value, onValueChange, placeholder, emptyText, disabled, className, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/ui/combobox.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{styled as V}from"nativewind";function t(b){V(b,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{ChevronDown as v}from"lucide-react-native";t(v);import{Check as C}from"lucide-react-native";t(C);import{ChevronUp as r}from"lucide-react-native";t(r);import{cn as i}from"@contractspec/lib.ui-kit-core/utils";import*as e from"@rn-primitives/select";import{Platform as W,StyleSheet as k,View as q}from"react-native";import z,{FadeIn as E,FadeOut as J}from"react-native-reanimated";import{jsx as d,jsxs as O}from"react/jsx-runtime";var T=e.Root,_=e.Group,G=e.Value;function I({ref:b,className:l,children:u,...f}){return O(e.Trigger,{ref:b,className:i("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",f.disabled&&"web:cursor-not-allowed opacity-50",l),...f,children:[u,d(v,{size:16,"aria-hidden":!0,className:"text-foreground opacity-50"})]})}function K({className:b,...l}){if(W.OS!=="web")return null;return d(e.ScrollUpButton,{className:i("flex web:cursor-default items-center justify-center py-1",b),...l,children:d(r,{size:14,className:"text-foreground"})})}function P({className:b,...l}){if(W.OS!=="web")return null;return d(e.ScrollDownButton,{className:i("flex web:cursor-default items-center justify-center py-1",b),...l,children:d(v,{size:14,className:"text-foreground"})})}function L({className:b,children:l,position:u="popper",portalHost:f,...a}){let{open:o}=e.useRootContext();return d(e.Portal,{hostName:f,children:d(e.Overlay,{style:W.OS!=="web"?k.absoluteFill:void 0,children:d(z.View,{className:"z-50",entering:E,exiting:J,children:O(e.Content,{className:i("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",u==="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",o?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",b),position:u,...a,children:[d(K,{}),d(e.Viewport,{className:i("p-1",u==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:l}),d(P,{})]})})})})}function p({className:b,...l}){return d(e.Label,{className:i("py-1.5 pr-2 native:pb-2 native:pl-10 pl-8 font-semibold native:text-base text-popover-foreground text-sm",b),...l})}function h({className:b,children:l,...u}){return O(e.Item,{className:i("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",u.disabled&&"web:pointer-events-none opacity-50",b),...u,children:[d(q,{className:"absolute left-2 native:left-3.5 flex h-3.5 w-3.5 items-center justify-center native:pt-px",children:d(e.ItemIndicator,{children:d(C,{size:16,strokeWidth:3,className:"text-popover-foreground"})})}),d(e.ItemText,{className:"native:text-base native:text-lg text-popover-foreground text-sm web:group-focus:text-accent-foreground"})]})}function j({className:b,...l}){return d(e.Separator,{className:i("-mx-1 my-1 h-px bg-muted",b),...l})}import{jsx as m,jsxs as Q}from"react/jsx-runtime";function de({options:b,value:l,onValueChange:u,placeholder:f="Select option",emptyText:a="No option found.",disabled:o,className:M}){let y=b.find((g)=>g.value===l);return Q(T,{value:y?{value:y.value,label:y.label}:void 0,onValueChange:(g)=>{if(g)u?.(g.value)},disabled:o,children:[m(I,{disabled:o,className:M,children:m(G,{placeholder:f})}),m(L,{children:m(_,{children:b.length?b.map((g)=>m(h,{value:g.value,label:g.label,disabled:g.disabled},g.value)):m(h,{value:"__empty",label:a,disabled:!0})})})]})}export{de as Combobox};
|
package/dist/ui/command.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const carousel = "null";
|
package/dist/ui/command.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import * as ContextMenuPrimitive from '@rn-primitives/context-menu';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { type StyleProp, type TextProps, View, type ViewStyle } from 'react-native';
|
|
4
|
-
declare const ContextMenu: {
|
|
5
|
-
({ asChild, relativeTo, onOpenChange: onOpenChangeProp, ref, ...viewProps }: import("react-native").ViewProps & {
|
|
6
|
-
asChild?: boolean;
|
|
7
|
-
} & {
|
|
8
|
-
onOpenChange?: (open: boolean) => void;
|
|
9
|
-
relativeTo?: "longPress" | "trigger";
|
|
10
|
-
} & React.RefAttributes<View>): React.JSX.Element;
|
|
11
|
-
displayName: string;
|
|
12
|
-
};
|
|
13
|
-
declare const ContextMenuTrigger: {
|
|
14
|
-
({ asChild, onLongPress: onLongPressProp, disabled, onAccessibilityAction: onAccessibilityActionProp, ref, ...props }: Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
|
|
15
|
-
asChild?: boolean;
|
|
16
|
-
} & {
|
|
17
|
-
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
18
|
-
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
19
|
-
} & React.RefAttributes<import("@rn-primitives/context-menu").TriggerRef>): React.JSX.Element;
|
|
20
|
-
displayName: string;
|
|
21
|
-
};
|
|
22
|
-
declare const ContextMenuGroup: {
|
|
23
|
-
({ asChild, ref, ...props }: import("react-native").ViewProps & {
|
|
24
|
-
asChild?: boolean;
|
|
25
|
-
} & React.RefAttributes<View>): React.JSX.Element;
|
|
26
|
-
displayName: string;
|
|
27
|
-
};
|
|
28
|
-
declare const ContextMenuSub: {
|
|
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 ContextMenuRadioGroup: {
|
|
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 ContextMenuSubTrigger({ className, inset, children, ...props }: ContextMenuPrimitive.SubTriggerProps & {
|
|
48
|
-
ref?: React.RefObject<ContextMenuPrimitive.SubTriggerRef>;
|
|
49
|
-
children?: React.ReactNode;
|
|
50
|
-
inset?: boolean;
|
|
51
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
declare function ContextMenuSubContent({ className, ...props }: ContextMenuPrimitive.SubContentProps & {
|
|
53
|
-
ref?: React.RefObject<ContextMenuPrimitive.SubContentRef>;
|
|
54
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
55
|
-
declare function ContextMenuContent({ className, overlayClassName, overlayStyle, portalHost, ...props }: ContextMenuPrimitive.ContentProps & {
|
|
56
|
-
ref?: React.RefObject<ContextMenuPrimitive.ContentRef>;
|
|
57
|
-
overlayStyle?: StyleProp<ViewStyle>;
|
|
58
|
-
overlayClassName?: string;
|
|
59
|
-
portalHost?: string;
|
|
60
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
61
|
-
declare function ContextMenuItem({ className, inset, ...props }: ContextMenuPrimitive.ItemProps & {
|
|
62
|
-
ref?: React.RefObject<ContextMenuPrimitive.ItemRef>;
|
|
63
|
-
className?: string;
|
|
64
|
-
inset?: boolean;
|
|
65
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
66
|
-
declare function ContextMenuCheckboxItem({ className, children, ...props }: ContextMenuPrimitive.CheckboxItemProps & {
|
|
67
|
-
ref?: React.RefObject<ContextMenuPrimitive.CheckboxItemRef>;
|
|
68
|
-
children?: React.ReactNode;
|
|
69
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
70
|
-
declare function ContextMenuRadioItem({ className, children, ...props }: ContextMenuPrimitive.RadioItemProps & {
|
|
71
|
-
ref?: React.RefObject<ContextMenuPrimitive.RadioItemRef>;
|
|
72
|
-
children?: React.ReactNode;
|
|
73
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
74
|
-
declare function ContextMenuLabel({ className, inset, ...props }: ContextMenuPrimitive.LabelProps & {
|
|
75
|
-
ref?: React.RefObject<ContextMenuPrimitive.LabelRef>;
|
|
76
|
-
className?: string;
|
|
77
|
-
inset?: boolean;
|
|
78
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
79
|
-
declare function ContextMenuSeparator({ className, ...props }: ContextMenuPrimitive.SeparatorProps & {
|
|
80
|
-
ref?: React.RefObject<ContextMenuPrimitive.SeparatorRef>;
|
|
81
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
82
|
-
declare function ContextMenuShortcut({ className, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
83
|
-
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, };
|
package/dist/ui/context-menu.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{styled as H}from"nativewind";function B(W){H(W,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{ChevronDown as Q}from"lucide-react-native";B(Q);import{cn as I}from"@contractspec/lib.ui-kit-core/utils";import*as G from"@rn-primitives/slot";import*as J from"react";import{Text as g}from"react-native";import{jsx as P}from"react/jsx-runtime";var K=J.createContext(void 0);function T({className:W,asChild:L=!1,...q}){let F=J.useContext(K);return P(L?G.Text:g,{className:I("web:select-text text-base text-foreground",F,W),...q})}import{Check as X}from"lucide-react-native";B(X);import{ChevronUp as Y}from"lucide-react-native";B(Y);import{ChevronRight as Z}from"lucide-react-native";B(Z);import{cn as A}from"@contractspec/lib.ui-kit-core/utils";import*as f from"@rn-primitives/context-menu";import{Platform as $,StyleSheet as _,Text as V,View as D}from"react-native";import{jsx as z,jsxs as U}from"react/jsx-runtime";var e=f.Root,s=f.Trigger,ff=f.Group,Wf=f.Sub,Lf=f.RadioGroup;function qf({className:W,inset:L,children:q,...F}){let{open:E}=f.useSubContext(),O=$.OS==="web"?Z:E?Y:Q;return z(K.Provider,{value:A("select-none native:text-lg text-primary text-sm",E&&"native:text-accent-foreground"),children:U(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",E&&"bg-accent",L&&"pl-8",W),...F,children:[q,z(O,{size:18,className:"ml-auto text-foreground"})]})})}function zf({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 Af({className:W,overlayClassName:L,overlayStyle:q,portalHost:F,...E}){let{open:O}=f.useRootContext();return z(f.Portal,{hostName:F,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),...E})})})}function Bf({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 Ef({className:W,children:L,...q}){return U(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",q.disabled&&"web:pointer-events-none opacity-50",W),...q,children:[z(D,{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 Ff({className:W,children:L,...q}){return U(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(D,{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:z(f.ItemIndicator,{children:z(D,{className:"h-2 w-2 rounded-full bg-foreground"})})}),L]})}function Jf({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 Kf({className:W,...L}){return z(f.Separator,{className:A("-mx-1 my-1 h-px bg-border",W),...L})}function Of({className:W,...L}){return z(V,{className:A("ml-auto native:text-sm text-muted-foreground text-xs tracking-widest",W),...L})}export{s as ContextMenuTrigger,qf as ContextMenuSubTrigger,zf as ContextMenuSubContent,Wf as ContextMenuSub,Of as ContextMenuShortcut,Kf as ContextMenuSeparator,Ff as ContextMenuRadioItem,Lf as ContextMenuRadioGroup,Jf as ContextMenuLabel,Bf as ContextMenuItem,ff as ContextMenuGroup,Af as ContextMenuContent,Ef as ContextMenuCheckboxItem,e as ContextMenu};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// @bun
|
package/dist/ui/data-table.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ContractTableController, ContractTableRowRenderModel } from '@contractspec/lib.presentation-runtime-core';
|
|
2
|
-
import type { SharedDataTableProps } from '@contractspec/lib.ui-kit-core/interfaces';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
export interface DataTableProps<TItem = unknown> extends SharedDataTableProps<TItem> {
|
|
5
|
-
controller: ContractTableController<TItem, React.ReactNode>;
|
|
6
|
-
onRowPress?: (row: ContractTableRowRenderModel<TItem, React.ReactNode>) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare function DataTable<TItem>({ controller, className, toolbar, footer, emptyState, loading, onRowPress, }: DataTableProps<TItem>): import("react/jsx-runtime").JSX.Element;
|
package/dist/ui/data-table.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{styled as De}from"nativewind";function S(e){De(e,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{ChevronDown as $}from"lucide-react-native";S($);import{cn as Ge}from"@contractspec/lib.ui-kit-core/utils";import*as fe from"@rn-primitives/slot";import*as q from"react";import{Text as _e}from"react-native";import{jsx as qe}from"react/jsx-runtime";var E=q.createContext(void 0);function f({className:e,asChild:t=!1,...n}){let i=q.useContext(E);return qe(t?fe.Text:_e,{className:Ge("web:select-text text-base text-foreground",i,e),...n})}import{cn as Je}from"@contractspec/lib.ui-kit-core/utils";import{cva as be}from"class-variance-authority";import{Pressable as Ke}from"react-native";import{jsx as ue}from"react/jsx-runtime";var Oe=be("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"}}),Qe=be("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 M({ref:e,className:t,variant:n,size:i,...l}){return ue(E.Provider,{value:Qe({variant:n,size:i,className:"web:pointer-events-none"}),children:ue(Ke,{className:Je(l.disabled&&"web:pointer-events-none opacity-50",Oe({variant:n,size:i,className:t})),ref:e,role:"button",...l})})}import{Check as A}from"lucide-react-native";S(A);import{ChevronUp as X}from"lucide-react-native";S(X);import{cn as L}from"@contractspec/lib.ui-kit-core/utils";import*as m from"@rn-primitives/select";import{Platform as Q,StyleSheet as Ye,View as Ze}from"react-native";import Fe,{FadeIn as Ne,FadeOut as Ue}from"react-native-reanimated";import{jsx as R,jsxs as Y}from"react/jsx-runtime";var Re=m.Root,st=m.Group,Te=m.Value;function Ce({ref:e,className:t,children:n,...i}){return Y(m.Trigger,{ref:e,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",i.disabled&&"web:cursor-not-allowed opacity-50",t),...i,children:[n,R($,{size:16,"aria-hidden":!0,className:"text-foreground opacity-50"})]})}function ce({className:e,...t}){if(Q.OS!=="web")return null;return R(m.ScrollUpButton,{className:L("flex web:cursor-default items-center justify-center py-1",e),...t,children:R(X,{size:14,className:"text-foreground"})})}function pe({className:e,...t}){if(Q.OS!=="web")return null;return R(m.ScrollDownButton,{className:L("flex web:cursor-default items-center justify-center py-1",e),...t,children:R($,{size:14,className:"text-foreground"})})}function ge({className:e,children:t,position:n="popper",portalHost:i,...l}){let{open:a}=m.useRootContext();return R(m.Portal,{hostName:i,children:R(m.Overlay,{style:Q.OS!=="web"?Ye.absoluteFill:void 0,children:R(Fe.View,{className:"z-50",entering:Ne,exiting:Ue,children:Y(m.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",n==="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",a?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",e),position:n,...l,children:[R(ce,{}),R(m.Viewport,{className:L("p-1",n==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:t}),R(pe,{})]})})})})}function jt({className:e,...t}){return R(m.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",e),...t})}function he({className:e,children:t,...n}){return Y(m.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",n.disabled&&"web:pointer-events-none opacity-50",e),...n,children:[R(Ze,{className:"absolute left-2 native:left-3.5 flex h-3.5 w-3.5 items-center justify-center native:pt-px",children:R(m.ItemIndicator,{children:R(A,{size:16,strokeWidth:3,className:"text-popover-foreground"})})}),R(m.ItemText,{className:"native:text-base native:text-lg text-popover-foreground text-sm web:group-focus:text-accent-foreground"})]})}function en({className:e,...t}){return R(m.Separator,{className:L("-mx-1 my-1 h-px bg-muted",e),...t})}import{cn as Z}from"@contractspec/lib.ui-kit-core/utils";import{cva as F}from"class-variance-authority";import{View as N}from"react-native";import{jsx as c}from"react/jsx-runtime";var U="flex",xe=F([U,"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"}}),se=F([U,"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"}}),je=F([U,"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 ln({className:e,spacing:t,align:n,justify:i,width:l,padding:a,gap:d,wrap:b,...y}){return c(N,{className:Z(je({spacing:t,align:n,justify:i,width:l,padding:a,gap:d,wrap:b}),e),...y})}function P({className:e,spacing:t,align:n,justify:i,width:l,padding:a,gap:d,wrap:b,...y}){return c(N,{className:Z(se({spacing:t,align:n,justify:i,width:l,padding:a,gap:d,wrap:b}),e),...y})}function v({className:e,spacing:t,align:n,justify:i,width:l,padding:a,gap:d,...b}){return c(N,{className:Z(xe({spacing:t,align:n,justify:i,width:l,padding:a,gap:d}),e),...b})}import{ChevronLeft as et,ChevronRight as tt,ChevronsLeft as nt,ChevronsRight as it}from"lucide-react-native";import{jsx as u,jsxs as k}from"react/jsx-runtime";function ot(e,t){if(t<=7)return Array.from({length:t},(n,i)=>i+1);if(e<=3)return[1,2,3,4,5,"end-ellipsis",t];if(e>=t-2)return[1,"start-ellipsis",t-4,t-3,t-2,t-1,t];return[1,"start-ellipsis",e-1,e,e+1,"end-ellipsis",t]}var p=({currentPage:e,totalPages:t,totalItems:n,itemsPerPage:i,onPageChange:l,onItemsPerPageChange:a,disabled:d=!1,className:b="",showItemsPerPage:y=!0,itemsPerPageOptions:H=[10,25,50,100]})=>{if(t<=0)return null;let C=Math.max(0,n),_=Math.max(1,i),z=Math.min(Math.max(e,1),t),We=C===0?0:(z-1)*_+1,Ae=C===0?0:Math.min(z*_,C),ae=z>1&&!d,me=z<t&&!d,Xe=ot(z,t);return k(v,{align:"center",gap:"md",justify:"between",className:`sm:flex-row ${b}`,children:[u(v,{className:"order-2 text-base text-muted-foreground sm:order-1",children:k(f,{children:["Affichage de ",We," \xE0 ",Ae," sur ",C," r\xE9sultats"]})}),k(P,{align:"center",gap:"sm",className:"order-1 sm:order-2",children:[k(M,{variant:"outline",size:"sm",onPress:()=>l(1),disabled:!ae,accessibilityLabel:"Premi\xE8re page",className:"hidden h-8 w-8 p-0 sm:flex",children:[u(nt,{className:"h-4 w-4"}),u(f,{className:"sr-only",children:"Premi\xE8re page"})]}),k(M,{variant:"outline",size:"sm",onPress:()=>l(z-1),disabled:!ae,accessibilityLabel:"Page pr\xE9c\xE9dente",className:"h-8 w-8 p-0",children:[u(et,{className:"h-4 w-4"}),u(f,{className:"sr-only",children:"Page pr\xE9c\xE9dente"})]}),u(P,{align:"center",gap:"xs",children:Xe.map((g)=>{if(typeof g!=="number")return u(P,{className:"px-2 py-1 text-muted-foreground",children:u(f,{children:"..."})},g);return u(M,{variant:g===z?"default":"outline",size:"sm",onPress:()=>l(g),disabled:d,accessibilityLabel:`Page ${g}`,className:"h-8 min-w-8 px-2",children:u(f,{children:g})},g)})}),k(M,{variant:"outline",size:"sm",onPress:()=>l(z+1),disabled:!me,accessibilityLabel:"Page suivante",className:"h-8 w-8 p-0",children:[u(tt,{className:"h-4 w-4"}),u(f,{className:"sr-only",children:"Page suivante"})]}),k(M,{variant:"outline",size:"sm",onPress:()=>l(t),disabled:!me,accessibilityLabel:"Derni\xE8re page",className:"hidden h-8 w-8 p-0 sm:flex",children:[u(it,{className:"h-4 w-4"}),u(f,{className:"sr-only",children:"Derni\xE8re page"})]})]}),y&&a&&k(P,{align:"center",gap:"sm",className:"order-3 text-base",children:[u(f,{className:"text-muted-foreground",children:"Afficher:"}),k(Re,{value:{value:i.toString(),label:i.toString()},onValueChange:(g)=>{let O=parseInt(g?.value??"",10);if(!Number.isNaN(O)&&O>0)a(O)},disabled:d,children:[u(Ce,{className:"h-8 w-16",children:u(Te,{placeholder:"Afficher:"})}),u(ge,{className:"bg-background",children:H.map((g)=>u(he,{value:g.toString(),label:g.toString(),children:g},g))})]})]})]})};import{cn as Ie}from"@contractspec/lib.ui-kit-core/utils";import*as D from"@rn-primitives/checkbox";import{Check as dt}from"lucide-react-native";import*as Pe from"react";import{jsx as x}from"react/jsx-runtime";var J=Pe.forwardRef(({className:e,...t},n)=>x(D.Root,{ref:n,className:Ie("web:peer h-4 w-4 shrink-0 rounded-xs border border-primary web:ring-offset-background web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:x(D.Indicator,{className:Ie("flex items-center justify-center text-current"),children:x(dt,{className:"h-4 w-4"})})}));J.displayName=D.Root.displayName;import{ChevronRight as s}from"lucide-react-native";S(s);import{cn as w}from"@contractspec/lib.ui-kit-core/utils";import*as r from"@rn-primitives/dropdown-menu";import{Platform as ee,StyleSheet as j,Text as rt,View as te}from"react-native";import{jsx as T,jsxs as oe}from"react/jsx-runtime";var we=r.Root,ye=r.Trigger,Wn=r.Group,An=r.Portal,Xn=r.Sub,Dn=r.RadioGroup;function Gn({className:e,inset:t,children:n,...i}){let{open:l}=r.useSubContext(),a=ee.OS==="web"?s:l?X:$;return T(E.Provider,{value:w("select-none native:text-lg text-primary text-sm",l&&"native:text-accent-foreground"),children:oe(r.SubTrigger,{className:w("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",l&&"bg-accent",t&&"pl-8",e),...i,children:[n,T(a,{size:18,className:"ml-auto text-foreground"})]})})}function _n({className:e,...t}){let{open:n}=r.useSubContext();return T(r.SubContent,{className:w("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",n?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out web:animate-out",e),...t})}function Me({className:e,overlayClassName:t,overlayStyle:n,portalHost:i,...l}){let{open:a}=r.useRootContext();return T(r.Portal,{hostName:i,children:T(r.Overlay,{style:n?j.flatten([ee.OS!=="web"?j.absoluteFill:void 0,n]):ee.OS!=="web"?j.absoluteFill:void 0,className:t,children:T(r.Content,{className:w("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",a?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",e),...l})})})}function ne({className:e,inset:t,...n}){return T(E.Provider,{value:"select-none text-sm native:text-lg text-popover-foreground web:group-focus:text-accent-foreground",children:T(r.Item,{className:w("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",t&&"pl-8",n.disabled&&"web:pointer-events-none opacity-50",e),...n})})}function ke({className:e,children:t,checked:n,...i}){return oe(r.CheckboxItem,{className:w("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",i.disabled&&"web:pointer-events-none opacity-50",e),checked:n,...i,children:[T(te,{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:T(r.ItemIndicator,{children:T(A,{size:14,strokeWidth:3,className:"text-foreground"})})}),t]})}function qn({className:e,children:t,...n}){return oe(r.RadioItem,{className:w("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",n.disabled&&"web:pointer-events-none opacity-50",e),...n,children:[T(te,{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:T(r.ItemIndicator,{children:T(te,{className:"h-2 w-2 rounded-full bg-foreground"})})}),t]})}function ze({className:e,inset:t,...n}){return T(r.Label,{className:w("web:cursor-default px-2 py-1.5 font-semibold native:text-base text-foreground text-sm",t&&"pl-8",e),...n})}function ie({className:e,...t}){return T(r.Separator,{className:w("-mx-1 my-1 h-px bg-border",e),...t})}function Jn({className:e,...t}){return T(rt,{className:w("ml-auto native:text-sm text-muted-foreground text-xs tracking-widest",e),...t})}import{cn as lt}from"@contractspec/lib.ui-kit-core/utils";import*as Le from"react";import at,{useAnimatedStyle as mt,useSharedValue as ft,withRepeat as ut,withSequence as bt,withTiming as Se}from"react-native-reanimated";import{jsx as Rt}from"react/jsx-runtime";var Ee=1000;function Ve({className:e,...t}){let n=ft(1);Le.useEffect(()=>{n.value=ut(bt(Se(0.5,{duration:Ee}),Se(1,{duration:Ee})),-1)},[]);let i=mt(()=>({opacity:n.value}));return Rt(at.View,{style:i,className:lt("rounded-md bg-secondary dark:bg-muted",e),...t})}import{cn as B}from"@contractspec/lib.ui-kit-core/utils";import*as h from"@rn-primitives/table";import{jsx as V}from"react/jsx-runtime";function He({className:e,...t}){return V(h.Root,{className:B("w-full caption-bottom text-sm",e),...t})}function ve({className:e,...t}){return V(h.Header,{className:B("border-border [&_tr]:border-b",e),...t})}function Be({className:e,style:t,...n}){return V(h.Body,{className:B("flex-1 border-border [&_tr:last-child]:border-0",e),style:[{minHeight:2},t],...n})}function cn({className:e,...t}){return V(h.Footer,{className:B("bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})}function K({className:e,...t}){return V(h.Row,{className:B("flex-row border-border border-b web:transition-colors web:hover:bg-muted/50 web:data-[state=selected]:bg-muted",e),...t})}function $e({className:e,...t}){return V(E.Provider,{value:"text-muted-foreground",children:V(h.Head,{className:B("h-12 justify-center px-4 text-left font-medium [&:has([role=checkbox])]:pr-0",e),...t})})}function de({className:e,...t}){return V(h.Cell,{className:B("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t})}import{ChevronDown as Tt,ChevronRight as Ct,Columns3 as gt}from"lucide-react-native";import*as G from"react";import{ScrollView as ht,View as W}from"react-native";import It from"react-native-reanimated";import{jsx as o,jsxs as I,Fragment as zt}from"react/jsx-runtime";function mi({controller:e,className:t,toolbar:n,footer:i,emptyState:l,loading:a,onRowPress:d}){let b=e.visibleColumns.filter((C)=>C.pinState==="left"),y=e.visibleColumns.filter((C)=>!C.pinState),H=e.visibleColumns.filter((C)=>C.pinState==="right");return I(v,{gap:"md",className:t,children:[I(P,{justify:"between",align:"center",children:[o(W,{children:n}),o(Pt,{columns:e.columns})]}),a?o(v,{gap:"sm",children:Array.from({length:5}).map((C,_)=>o(Ve,{className:"h-12 w-full"},_))}):e.rows.length===0?l??o(W,{className:"rounded-md border border-border border-dashed p-6",children:o(f,{className:"text-center text-muted-foreground",children:"No rows available."})}):o(W,{className:"rounded-md border border-border",children:I(P,{gap:"none",align:"start",wrap:"nowrap",children:[b.length?re(e,b,d):null,o(ht,{horizontal:!0,showsHorizontalScrollIndicator:!1,children:re(e,y,d)}),H.length?re(e,H,d):null]})}),e.pageCount>0?o(p,{currentPage:e.pageIndex+1,totalPages:e.pageCount,totalItems:e.totalItems,itemsPerPage:e.pageSize,onPageChange:(C)=>e.setPageIndex(C-1),onItemsPerPageChange:(C)=>e.setPageSize(C)}):null,i]})}function re(e,t,n){return I(He,{children:[o(ve,{children:o(K,{children:t.map((i)=>o($e,{style:{width:i.size,minWidth:i.size},children:I(P,{gap:"sm",align:"center",justify:"between",wrap:"nowrap",children:[o(W,{children:yt(e,i)}),i.canResize?o(wt,{column:i}):null]})},i.id))})}),o(Be,{children:e.rows.map((i)=>{let l=new Map(i.cells.map((a)=>[a.columnId,a]));return I(v,{gap:"none",children:[o(K,{onPress:()=>n?.(i),children:t.map((a)=>o(de,{style:{width:a.size,minWidth:a.size},children:Mt(i,l.get(a.id))},a.id))}),i.isExpanded&&i.expandedContent?o(K,{children:o(de,{style:{width:t.reduce((a,d)=>a+d.size,0)},children:i.expandedContent})}):null]},i.id)})})]})}function Pt({columns:e}){let t=e.filter((d)=>d.kind==="data"),n=t.filter((d)=>d.canHide),i=n.filter((d)=>!d.visible),l=t.filter((d)=>d.visible),a=t.some((d)=>d.pinState);if(!n.length)return null;return I(we,{children:[o(ye,{asChild:!0,children:I(M,{variant:"outline",size:"sm",children:[o(gt,{size:16}),o(f,{children:"Columns"})]})}),I(Me,{children:[o(ze,{children:"Visible Columns"}),o(ie,{}),n.map((d)=>{let b=d.visible&&l.length<=1;return o(ke,{checked:d.visible,disabled:b,onCheckedChange:(y)=>{let H=Boolean(y);if(!H&&b)return;d.toggleVisibility?.(H)},children:I(P,{justify:"between",className:"w-full",children:[o(f,{children:d.label}),b?o(f,{className:"text-muted-foreground text-xs",children:"Required"}):null]})},d.id)}),i.length||a?I(zt,{children:[o(ie,{}),i.length?o(ne,{onPress:()=>n.forEach((d)=>d.toggleVisibility?.(!0)),children:o(f,{children:"Show All Columns"})}):null,a?o(ne,{onPress:()=>t.forEach((d)=>d.pin?.(!1)),children:o(f,{children:"Reset Pins"})}):null]}):null]})]})}function wt({column:e}){let t=G.useRef(null),n=G.useCallback(()=>{t.current=null},[]),i=G.useCallback((l)=>{let a=l.nativeEvent.pageX,d=t.current;if(t.current=a,d===null)return;let b=a-d;if(!Number.isFinite(b)||b===0)return;e.resizeBy?.(b)},[e]);return o(It.View,{testID:"resize-handle",onStartShouldSetResponder:()=>!0,onMoveShouldSetResponder:()=>!0,onResponderGrant:(l)=>{t.current=l.nativeEvent.pageX},onResponderMove:i,onResponderRelease:n,onResponderTerminate:n,className:"justify-center px-1",children:o(f,{className:"text-muted-foreground text-xs",children:"||"})})}function yt(e,t){if(t.kind==="selection"&&e.selectionMode==="multiple")return o(J,{"aria-label":"Select all rows",accessibilityLabel:"Select all rows",checked:e.allRowsSelected||e.someRowsSelected,onPress:(n)=>n.stopPropagation?.(),onCheckedChange:(n)=>e.toggleAllRowsSelected?.(Boolean(n))});if(t.kind==="expansion")return null;return typeof t.header==="string"?o(f,{children:t.header}):t.header}function Mt(e,t){if(!t)return null;if(t.kind==="selection")return o(J,{"aria-label":`Select row ${e.id}`,accessibilityLabel:`Select row ${e.id}`,checked:e.isSelected,onPress:(n)=>n.stopPropagation?.(),onCheckedChange:(n)=>e.toggleSelected?.(Boolean(n))});if(t.kind==="expansion"){if(!e.canExpand)return null;return o(M,{variant:"ghost",size:"icon","aria-label":e.isExpanded?`Collapse row ${e.id}`:`Expand row ${e.id}`,accessibilityLabel:e.isExpanded?`Collapse row ${e.id}`:`Expand row ${e.id}`,onPress:(n)=>{n.stopPropagation?.(),e.toggleExpanded?.()},children:e.isExpanded?o(Tt,{size:16}):o(Ct,{size:16})})}return typeof t.content==="string"?o(f,{ellipsizeMode:le(t)?"tail":void 0,numberOfLines:le(t)?1:void 0,children:t.content}):kt(t)}function le(e){return e.overflow==="truncate"||e.overflow==="expand"}function kt(e){if(e.overflow==="wrap")return o(W,{className:"min-w-0",children:e.content});if(le(e))return o(W,{className:"min-w-0 overflow-hidden",children:e.content});return e.content}export{mi as DataTable};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/ui/date-picker.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { SharedDatePickerProps } from '@contractspec/lib.ui-kit-core/interfaces';
|
|
2
|
-
export interface DatePickerProps extends SharedDatePickerProps {
|
|
3
|
-
}
|
|
4
|
-
export declare function DatePicker({ value, onChange, disabled, minDate, maxDate, placeholder, className, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/ui/date-picker.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{cn as Z}from"@contractspec/lib.ui-kit-core/utils";import*as K from"@rn-primitives/slot";import*as B from"react";import{Text as _}from"react-native";import{jsx as M}from"react/jsx-runtime";var $=B.createContext(void 0);function L({className:q,asChild:E=!1,...z}){let A=B.useContext($);return M(E?K.Text:_,{className:Z("web:select-text text-base text-foreground",A,q),...z})}import{cn as G}from"@contractspec/lib.ui-kit-core/utils";import R from"@react-native-community/datetimepicker";import{useMemo as V,useState as y}from"react";import{Platform as O,Pressable as f,View as g}from"react-native";import{jsx as H,jsxs as k}from"react/jsx-runtime";function S(q){if(!q)return"";try{return q.toLocaleDateString(void 0,{day:"2-digit",month:"long",year:"numeric"})}catch{return""}}function u({value:q,onChange:E,disabled:z,minDate:A,maxDate:F,placeholder:Q="Select date",className:U}){let[W,I]=y(!1),X=V(()=>({minimumDate:A,maximumDate:F,timeZoneName:void 0}),[A,F]),Y=(w,J)=>{if(O.OS!=="ios")I(!1);if(J)E(J)};return k(g,{className:G("w-full",U),children:[H(f,{disabled:z,onPress:()=>I(!0),className:G("h-12 flex-row items-center rounded-md border border-input bg-background px-3",z&&"opacity-50"),children:H(L,{className:G("text-base text-foreground",!q&&"opacity-50"),children:q?S(q):Q})}),W&&H(R,{value:q??new Date,mode:"date",display:O.OS==="ios"?"inline":"default",onChange:Y,...X})]})}export{u as DatePicker};
|
|
@@ -1,6 +0,0 @@
|
|
|
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;
|
|
@@ -1,2 +0,0 @@
|
|
|
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};
|
|
@@ -1,6 +0,0 @@
|
|
|
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;
|
|
@@ -1,2 +0,0 @@
|
|
|
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};
|
package/dist/ui/dialog.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
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, };
|
package/dist/ui/dialog.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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};
|
|
@@ -1,84 +0,0 @@
|
|
|
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, };
|
package/dist/ui/dropdown-menu.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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};
|
package/dist/ui/empty-state.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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 {};
|