@bizapps/ui 1.4.2 → 1.5.1
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/dist/main.cjs +191 -27
- package/dist/main.cjs.map +1 -1
- package/dist/main.d.cts +91 -25
- package/dist/main.d.ts +91 -25
- package/dist/main.js +191 -29
- package/dist/main.js.map +1 -1
- package/dist/policy-DPpMNLiO.d.cts +75 -0
- package/dist/policy-DPpMNLiO.d.ts +75 -0
- package/dist/policy.cjs +33 -0
- package/dist/policy.cjs.map +1 -0
- package/dist/policy.d.cts +1 -0
- package/dist/policy.d.ts +1 -0
- package/dist/policy.js +29 -0
- package/dist/policy.js.map +1 -0
- package/package.json +7 -1
package/dist/main.d.cts
CHANGED
|
@@ -14,6 +14,8 @@ export { Controller, useFieldArray } from 'react-hook-form';
|
|
|
14
14
|
import { ZodType, z } from 'zod';
|
|
15
15
|
import { ColumnDef, SortingState, ColumnFiltersState, Row, RowSelectionState, Table as Table$1, VisibilityState, ColumnSizingState, Header, Updater, Column } from '@tanstack/react-table';
|
|
16
16
|
export { Column, ColumnDef, ColumnFiltersState, Row, SortingState, Table as TanStackTableType, createColumnHelper } from '@tanstack/react-table';
|
|
17
|
+
import { P as Permission } from './policy-DPpMNLiO.cjs';
|
|
18
|
+
export { K as KNOWN_PERMISSIONS, a as KnownPermission, m as matchPermission } from './policy-DPpMNLiO.cjs';
|
|
17
19
|
|
|
18
20
|
declare const alertVariants: (props?: ({
|
|
19
21
|
variant?: "default" | "info" | "success" | "warning" | "error" | null | undefined;
|
|
@@ -2071,43 +2073,107 @@ interface UseTableSizingReturn {
|
|
|
2071
2073
|
*/
|
|
2072
2074
|
declare function useTableSizing({ columnSizing: controlledSizing, defaultColumnSizing, onColumnSizingChange, }: UseTableSizingProps): UseTableSizingReturn;
|
|
2073
2075
|
|
|
2076
|
+
/** `'loading'` while the grant set is unresolved, `'ready'` once it is known. */
|
|
2077
|
+
type AbilityStatus = 'loading' | 'ready';
|
|
2078
|
+
interface AbilityContextValue {
|
|
2079
|
+
can: (permissions: Permission | Permission[], mode?: 'any' | 'all') => boolean;
|
|
2080
|
+
setAbilities: (permissions: string[]) => void;
|
|
2081
|
+
clearAbilities: () => void;
|
|
2082
|
+
/**
|
|
2083
|
+
* `'loading'` while the grant set is genuinely unresolved, `'ready'` once it
|
|
2084
|
+
* is known — including when it is known to be empty. This is what makes
|
|
2085
|
+
* "still loading" distinguishable from "loaded, zero grants": both produce
|
|
2086
|
+
* an empty set, so without this flag a consumer cannot tell them apart.
|
|
2087
|
+
*/
|
|
2088
|
+
status: AbilityStatus;
|
|
2089
|
+
}
|
|
2090
|
+
interface AbilityProviderProps {
|
|
2091
|
+
children: ReactNode;
|
|
2092
|
+
permissions?: string[];
|
|
2093
|
+
}
|
|
2094
|
+
declare function AbilityProvider({ children, permissions }: AbilityProviderProps): react.JSX.Element;
|
|
2095
|
+
declare function useAbility(): AbilityContextValue;
|
|
2096
|
+
declare function useCan(permissions: Permission | Permission[], mode?: 'any' | 'all'): boolean;
|
|
2097
|
+
/** Returns whether the grant set is resolved yet. Useful for skeletons without a `Can` wrapper. */
|
|
2098
|
+
declare function useAbilityStatus(): AbilityStatus;
|
|
2099
|
+
|
|
2100
|
+
interface CanState {
|
|
2101
|
+
/**
|
|
2102
|
+
* Whether the permission check passed, after `negate` is applied. While
|
|
2103
|
+
* `status` is `'loading'`, the underlying check is always `false` — so
|
|
2104
|
+
* `allowed` is `false` for `Can` (fail-closed) but `true` for `CanNot`
|
|
2105
|
+
* (fail-open: negating an unresolved `false` flips it to `true`).
|
|
2106
|
+
*/
|
|
2107
|
+
allowed: boolean;
|
|
2108
|
+
/** Whether the grant set has resolved yet. */
|
|
2109
|
+
status: AbilityStatus;
|
|
2110
|
+
}
|
|
2074
2111
|
interface CanProps {
|
|
2075
|
-
permission:
|
|
2112
|
+
permission: Permission | Permission[];
|
|
2076
2113
|
mode?: 'any' | 'all';
|
|
2077
2114
|
negate?: boolean;
|
|
2115
|
+
/**
|
|
2116
|
+
* `'hide'` (default) removes the subtree and renders `fallback` instead.
|
|
2117
|
+
* `'disable'` keeps the subtree visible but non-interactive, with `reason`
|
|
2118
|
+
* surfaced in a tooltip. Use `'disable'` when the user should know the
|
|
2119
|
+
* action exists and why it is unavailable.
|
|
2120
|
+
*/
|
|
2121
|
+
behavior?: 'hide' | 'disable';
|
|
2122
|
+
/**
|
|
2123
|
+
* Explanation shown in a tooltip when `behavior='disable'` denies. Accepts a
|
|
2124
|
+
* node so callers can pass translated content without the library taking an
|
|
2125
|
+
* i18n dependency. No tooltip is rendered when omitted.
|
|
2126
|
+
*/
|
|
2127
|
+
reason?: ReactNode;
|
|
2078
2128
|
fallback?: ReactNode;
|
|
2079
|
-
|
|
2129
|
+
/**
|
|
2130
|
+
* Rendered while the grant set is unresolved. Unlike `reason` and `fallback`, `null` and
|
|
2131
|
+
* "omitted" are deliberately NOT the same value here: a node renders that node;
|
|
2132
|
+
* `loading={null}` renders nothing; omitting `loading` entirely falls through to
|
|
2133
|
+
* `fallback` (or, for `CanNot`, lets the fail-open children render). The distinction
|
|
2134
|
+
* exists because for `loading` — and only for `loading` — "render nothing" and "fall
|
|
2135
|
+
* through" are genuinely different outcomes: `CanNot` is fail-open during loading, so
|
|
2136
|
+
* without an explicit `loading={null}` its children render immediately and then
|
|
2137
|
+
* disappear once the grant set resolves. Pass `loading={null}` to suppress that flash.
|
|
2138
|
+
*/
|
|
2139
|
+
loading?: ReactNode;
|
|
2140
|
+
children: ReactNode | ((state: CanState) => ReactNode);
|
|
2080
2141
|
}
|
|
2081
2142
|
type CanNotProps = Omit<CanProps, 'negate'>;
|
|
2082
|
-
/**
|
|
2083
|
-
|
|
2143
|
+
/**
|
|
2144
|
+
* Renders its children when the user has the required permission(s). Requires an
|
|
2145
|
+
* `AbilityProvider` in the tree.
|
|
2146
|
+
*
|
|
2147
|
+
* Render precedence: a render-prop `children` always wins and receives the full
|
|
2148
|
+
* `CanState`; otherwise `loading` renders while the grant set is unresolved; then
|
|
2149
|
+
* `children` when allowed; then `fallback` when denied.
|
|
2150
|
+
*
|
|
2151
|
+
* When `children` is a function it OWNS EVERY STATE, and `behavior`, `reason`, `fallback`
|
|
2152
|
+
* and `loading` are all ignored — the render prop returns before any of them is consulted.
|
|
2153
|
+
* So `<Can behavior='disable' reason='…'>{({ allowed }) => …}</Can>` produces no tooltip
|
|
2154
|
+
* and no disabled treatment; the function has to read `allowed` and `status` and render
|
|
2155
|
+
* the disabled, loading and denied cases itself. Passing any of those four alongside a
|
|
2156
|
+
* function logs a development-only warning, since nothing else about the code looks wrong.
|
|
2157
|
+
*
|
|
2158
|
+
* Fail-closed by default: while `status === 'loading'`, the underlying check
|
|
2159
|
+
* is always `false` and nothing renders optimistically. Passing `negate`
|
|
2160
|
+
* flips this to fail-open — the unresolved `false` becomes `true` — so
|
|
2161
|
+
* children render immediately during loading unless `loading` is explicitly
|
|
2162
|
+
* passed. `CanNot` is `<Can negate />`, so it always exhibits the fail-open
|
|
2163
|
+
* case; pass `loading={null}` to suppress that flash and render nothing
|
|
2164
|
+
* instead — a node passed to `loading` renders that node, while omitting
|
|
2165
|
+
* `loading` falls through to the fail-open children.
|
|
2166
|
+
*/
|
|
2167
|
+
declare function Can({ permission, mode, negate, behavior, reason, fallback, loading, children, }: CanProps): react.JSX.Element;
|
|
2084
2168
|
declare namespace Can {
|
|
2085
2169
|
var displayName: string;
|
|
2086
2170
|
}
|
|
2087
|
-
/** Renders children when the user does NOT have the required permission(s). Alias for `<Can negate />`. Requires `AbilityProvider` in the tree. */
|
|
2088
|
-
declare function CanNot({ permission, mode, fallback, children }: CanNotProps): react.JSX.Element;
|
|
2171
|
+
/** Renders its children when the user does NOT have the required permission(s). Alias for `<Can negate />`. Requires an `AbilityProvider` in the tree. */
|
|
2172
|
+
declare function CanNot({ permission, mode, behavior, reason, fallback, loading, children, }: CanNotProps): react.JSX.Element;
|
|
2089
2173
|
declare namespace CanNot {
|
|
2090
2174
|
var displayName: string;
|
|
2091
2175
|
}
|
|
2092
2176
|
|
|
2093
|
-
interface AbilityContextValue {
|
|
2094
|
-
can: (permissions: string | string[], mode?: 'any' | 'all') => boolean;
|
|
2095
|
-
setAbilities: (permissions: string[]) => void;
|
|
2096
|
-
clearAbilities: () => void;
|
|
2097
|
-
}
|
|
2098
|
-
interface AbilityProviderProps {
|
|
2099
|
-
children: ReactNode;
|
|
2100
|
-
permissions?: string[];
|
|
2101
|
-
}
|
|
2102
|
-
/**
|
|
2103
|
-
* @param pattern - an entry from the user's grant set (may contain `*` as a segment wildcard)
|
|
2104
|
-
* @param permission - the permission being requested (from `Can.perform`)
|
|
2105
|
-
*/
|
|
2106
|
-
declare function matchPermission(pattern: string, permission: string): boolean;
|
|
2107
|
-
declare function AbilityProvider({ children, permissions }: AbilityProviderProps): react.JSX.Element;
|
|
2108
|
-
declare function useAbility(): AbilityContextValue;
|
|
2109
|
-
declare function useCan(permissions: string | string[], mode?: 'any' | 'all'): boolean;
|
|
2110
|
-
|
|
2111
2177
|
declare function Sheet({ ...props }: react.ComponentProps<typeof Dialog$1.Root>): react.JSX.Element;
|
|
2112
2178
|
declare function SheetTrigger({ ...props }: react.ComponentProps<typeof Dialog$1.Trigger>): react.JSX.Element;
|
|
2113
2179
|
declare function SheetClose({ ...props }: react.ComponentProps<typeof Dialog$1.Close>): react.JSX.Element;
|
|
@@ -2182,4 +2248,4 @@ interface TCCEProviderProps {
|
|
|
2182
2248
|
}
|
|
2183
2249
|
declare function TCCEProvider({ children, permissions, toasterPosition, tooltipDelayDuration, }: TCCEProviderProps): react.JSX.Element;
|
|
2184
2250
|
|
|
2185
|
-
export { type AbilityContextValue, AbilityProvider, type AbilityProviderProps, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, type AnimationTokens, AppShell, type AppShellItem, type AppShellProps, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BottomNav, type BottomNavItem, BottomNavTabs, BottomNavTabsContent, type BottomNavTabsItem, BottomNavTabsList, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button$1 as Button, type CalendarEvent, type CalendarView, Can, CanNot, type CanNotProps, type CanProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CellAlignment, Checkbox, ColorPicker, ColorPickerAlpha, type ColorPickerAlphaProps, ColorPickerEyeDropper, type ColorPickerEyeDropperProps, ColorPickerFormat, type ColorPickerFormatProps, ColorPickerHue, type ColorPickerHueProps, ColorPickerOutput, type ColorPickerOutputProps, ColorPickerPresets, type ColorPickerPresetsProps, type ColorPickerProps, ColorPickerSelection, type ColorPickerSelectionProps, type ColumnMeta, Combobox, type ComboboxMatchMode, type ComboboxOption, type ComboboxProps, DataTable, DataTableCardView, type DataTableCardViewProps, DataTableColumnFilter, type DataTableColumnFilterProps, DataTableFooter, type DataTableFooterProps, DataTableHeaderCell, type DataTableHeaderCellProps, type DataTableProps, DataTableRowActions, type DataTableRowActionsProps, DataTableSearch, type DataTableSearchProps, DataTableSkeleton, type DataTableSkeletonProps, DataTableToolbar, type DataTableToolbarProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, type DrawerSide, type DrawerSize, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneContent, type DropzoneContentProps, DropzoneEmptyState, type DropzoneEmptyStateProps, type DropzoneProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EventCalendar, type EventCalendarProps, type EventCreateRange, Field, FieldDescription, FieldError, FieldGroup, FieldLabel, FilterOption, type FilterOptionProps, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, Link, Logo, type LogoKey, MiniCalendar, MiniCalendarDay, type MiniCalendarDayProps, MiniCalendarDays, type MiniCalendarDaysProps, MiniCalendarNavigation, type MiniCalendarNavigationProps, type MiniCalendarProps, Navbar, type NavbarDropdownItem, type NavbarNavLink, type NavbarNotification, type NavbarProps, type NavbarUtilityLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PhoneField, type PhoneFieldCountry, type PhoneFieldProps, PinInput, type PinInputProps, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, type ProgressProps, RadioGroup, RadioGroupItem, type RowAction, SegmentedControl, SegmentedControlItem, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger$1 as SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, type SortDirection, type SortRecord, Spinner, SpinnerDots, type SpinnerDotsProps, SpinnerLoader, type SpinnerLoaderProps, type SpinnerProps, Status, StatusIndicator, type StatusIndicatorProps, StatusLabel, type StatusLabelProps, type StatusProps, Switch, TCCEProvider, type TCCEProviderProps, TEXT_SIZES, TEXT_WEIGHTS, Table, TableBody, TableCaption, TableCell, type TableCellSize, type TableClassNames, type TableColumnDef, type TableContextType, TableFooter, TableHead, TableHeader, TablePagination, type TablePaginationProps, TableRow, type TableVariant, Tabs, TabsContent, TabsList, TabsTrigger, Text, type TextAs, type TextProps, type TextSize, type TextWeight, Textarea, type ToastAction, type ToastItem, type ToastType, Toaster, type ToasterPosition, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseTableDataProps, type UseTableDataReturn, type UseTableFilteringProps, type UseTableFilteringReturn, type UseTableGlobalFilterProps, type UseTableGlobalFilterReturn, type UseTableSizingProps, type UseTableSizingReturn, type UseTableSortingProps, type UseTableSortingReturn, type UseTableVisibilityProps, type UseTableVisibilityReturn, alertVariants, animation, avatarVariants, badgeVariants, buttonVariants$1 as buttonVariants, columnFiltersToArrayQueryParams, columnFiltersToJsonString, columnFiltersToQueryParams, columnFiltersToRecord, createBackendParams, createBackendParamsWithFilters, duration, ease, fadeIn, getActiveFilterCount, getActiveFilterValues, getColumnValueCounts, getUniqueColumnValues, hasActiveFilters, linkVariants, logos,
|
|
2251
|
+
export { type AbilityContextValue, AbilityProvider, type AbilityProviderProps, type AbilityStatus, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, type AnimationTokens, AppShell, type AppShellItem, type AppShellProps, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BottomNav, type BottomNavItem, BottomNavTabs, BottomNavTabsContent, type BottomNavTabsItem, BottomNavTabsList, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button$1 as Button, type CalendarEvent, type CalendarView, Can, CanNot, type CanNotProps, type CanProps, type CanState, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CellAlignment, Checkbox, ColorPicker, ColorPickerAlpha, type ColorPickerAlphaProps, ColorPickerEyeDropper, type ColorPickerEyeDropperProps, ColorPickerFormat, type ColorPickerFormatProps, ColorPickerHue, type ColorPickerHueProps, ColorPickerOutput, type ColorPickerOutputProps, ColorPickerPresets, type ColorPickerPresetsProps, type ColorPickerProps, ColorPickerSelection, type ColorPickerSelectionProps, type ColumnMeta, Combobox, type ComboboxMatchMode, type ComboboxOption, type ComboboxProps, DataTable, DataTableCardView, type DataTableCardViewProps, DataTableColumnFilter, type DataTableColumnFilterProps, DataTableFooter, type DataTableFooterProps, DataTableHeaderCell, type DataTableHeaderCellProps, type DataTableProps, DataTableRowActions, type DataTableRowActionsProps, DataTableSearch, type DataTableSearchProps, DataTableSkeleton, type DataTableSkeletonProps, DataTableToolbar, type DataTableToolbarProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, type DrawerSide, type DrawerSize, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneContent, type DropzoneContentProps, DropzoneEmptyState, type DropzoneEmptyStateProps, type DropzoneProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EventCalendar, type EventCalendarProps, type EventCreateRange, Field, FieldDescription, FieldError, FieldGroup, FieldLabel, FilterOption, type FilterOptionProps, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, Link, Logo, type LogoKey, MiniCalendar, MiniCalendarDay, type MiniCalendarDayProps, MiniCalendarDays, type MiniCalendarDaysProps, MiniCalendarNavigation, type MiniCalendarNavigationProps, type MiniCalendarProps, Navbar, type NavbarDropdownItem, type NavbarNavLink, type NavbarNotification, type NavbarProps, type NavbarUtilityLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Permission, PhoneField, type PhoneFieldCountry, type PhoneFieldProps, PinInput, type PinInputProps, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, type ProgressProps, RadioGroup, RadioGroupItem, type RowAction, SegmentedControl, SegmentedControlItem, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger$1 as SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, type SortDirection, type SortRecord, Spinner, SpinnerDots, type SpinnerDotsProps, SpinnerLoader, type SpinnerLoaderProps, type SpinnerProps, Status, StatusIndicator, type StatusIndicatorProps, StatusLabel, type StatusLabelProps, type StatusProps, Switch, TCCEProvider, type TCCEProviderProps, TEXT_SIZES, TEXT_WEIGHTS, Table, TableBody, TableCaption, TableCell, type TableCellSize, type TableClassNames, type TableColumnDef, type TableContextType, TableFooter, TableHead, TableHeader, TablePagination, type TablePaginationProps, TableRow, type TableVariant, Tabs, TabsContent, TabsList, TabsTrigger, Text, type TextAs, type TextProps, type TextSize, type TextWeight, Textarea, type ToastAction, type ToastItem, type ToastType, Toaster, type ToasterPosition, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseTableDataProps, type UseTableDataReturn, type UseTableFilteringProps, type UseTableFilteringReturn, type UseTableGlobalFilterProps, type UseTableGlobalFilterReturn, type UseTableSizingProps, type UseTableSizingReturn, type UseTableSortingProps, type UseTableSortingReturn, type UseTableVisibilityProps, type UseTableVisibilityReturn, alertVariants, animation, avatarVariants, badgeVariants, buttonVariants$1 as buttonVariants, columnFiltersToArrayQueryParams, columnFiltersToJsonString, columnFiltersToQueryParams, columnFiltersToRecord, createBackendParams, createBackendParamsWithFilters, duration, ease, fadeIn, getActiveFilterCount, getActiveFilterValues, getColumnValueCounts, getUniqueColumnValues, hasActiveFilters, linkVariants, logos, mergeFilters, multiSelectFilter, navigationMenuTriggerStyle, parseJsonToFilters, parseQueryParamsToFilters, progressIndicatorVariants, progressVariants, scaleIn, searchInArray, skeletonVariants, slideRight, slideUp, sortRecordToSortingState, sortingStateToJsonString, sortingStateToRecord, spinnerDotsVariants, spinnerLoaderVariants, spinnerVariants, spring, stagger, toggleVariants, tooltipContentVariants, transition, useAbility, useAbilityStatus, useAppForm, useCan, useCarousel, useColorPicker, useColumnFilter, useSidebar, useTableContext, useTableData, useTableFiltering, useTableGlobalFilter, useTableSizing, useTableSorting, useTableVisibility, useToast };
|
package/dist/main.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export { Controller, useFieldArray } from 'react-hook-form';
|
|
|
14
14
|
import { ZodType, z } from 'zod';
|
|
15
15
|
import { ColumnDef, SortingState, ColumnFiltersState, Row, RowSelectionState, Table as Table$1, VisibilityState, ColumnSizingState, Header, Updater, Column } from '@tanstack/react-table';
|
|
16
16
|
export { Column, ColumnDef, ColumnFiltersState, Row, SortingState, Table as TanStackTableType, createColumnHelper } from '@tanstack/react-table';
|
|
17
|
+
import { P as Permission } from './policy-DPpMNLiO.js';
|
|
18
|
+
export { K as KNOWN_PERMISSIONS, a as KnownPermission, m as matchPermission } from './policy-DPpMNLiO.js';
|
|
17
19
|
|
|
18
20
|
declare const alertVariants: (props?: ({
|
|
19
21
|
variant?: "default" | "info" | "success" | "warning" | "error" | null | undefined;
|
|
@@ -2071,43 +2073,107 @@ interface UseTableSizingReturn {
|
|
|
2071
2073
|
*/
|
|
2072
2074
|
declare function useTableSizing({ columnSizing: controlledSizing, defaultColumnSizing, onColumnSizingChange, }: UseTableSizingProps): UseTableSizingReturn;
|
|
2073
2075
|
|
|
2076
|
+
/** `'loading'` while the grant set is unresolved, `'ready'` once it is known. */
|
|
2077
|
+
type AbilityStatus = 'loading' | 'ready';
|
|
2078
|
+
interface AbilityContextValue {
|
|
2079
|
+
can: (permissions: Permission | Permission[], mode?: 'any' | 'all') => boolean;
|
|
2080
|
+
setAbilities: (permissions: string[]) => void;
|
|
2081
|
+
clearAbilities: () => void;
|
|
2082
|
+
/**
|
|
2083
|
+
* `'loading'` while the grant set is genuinely unresolved, `'ready'` once it
|
|
2084
|
+
* is known — including when it is known to be empty. This is what makes
|
|
2085
|
+
* "still loading" distinguishable from "loaded, zero grants": both produce
|
|
2086
|
+
* an empty set, so without this flag a consumer cannot tell them apart.
|
|
2087
|
+
*/
|
|
2088
|
+
status: AbilityStatus;
|
|
2089
|
+
}
|
|
2090
|
+
interface AbilityProviderProps {
|
|
2091
|
+
children: ReactNode;
|
|
2092
|
+
permissions?: string[];
|
|
2093
|
+
}
|
|
2094
|
+
declare function AbilityProvider({ children, permissions }: AbilityProviderProps): react.JSX.Element;
|
|
2095
|
+
declare function useAbility(): AbilityContextValue;
|
|
2096
|
+
declare function useCan(permissions: Permission | Permission[], mode?: 'any' | 'all'): boolean;
|
|
2097
|
+
/** Returns whether the grant set is resolved yet. Useful for skeletons without a `Can` wrapper. */
|
|
2098
|
+
declare function useAbilityStatus(): AbilityStatus;
|
|
2099
|
+
|
|
2100
|
+
interface CanState {
|
|
2101
|
+
/**
|
|
2102
|
+
* Whether the permission check passed, after `negate` is applied. While
|
|
2103
|
+
* `status` is `'loading'`, the underlying check is always `false` — so
|
|
2104
|
+
* `allowed` is `false` for `Can` (fail-closed) but `true` for `CanNot`
|
|
2105
|
+
* (fail-open: negating an unresolved `false` flips it to `true`).
|
|
2106
|
+
*/
|
|
2107
|
+
allowed: boolean;
|
|
2108
|
+
/** Whether the grant set has resolved yet. */
|
|
2109
|
+
status: AbilityStatus;
|
|
2110
|
+
}
|
|
2074
2111
|
interface CanProps {
|
|
2075
|
-
permission:
|
|
2112
|
+
permission: Permission | Permission[];
|
|
2076
2113
|
mode?: 'any' | 'all';
|
|
2077
2114
|
negate?: boolean;
|
|
2115
|
+
/**
|
|
2116
|
+
* `'hide'` (default) removes the subtree and renders `fallback` instead.
|
|
2117
|
+
* `'disable'` keeps the subtree visible but non-interactive, with `reason`
|
|
2118
|
+
* surfaced in a tooltip. Use `'disable'` when the user should know the
|
|
2119
|
+
* action exists and why it is unavailable.
|
|
2120
|
+
*/
|
|
2121
|
+
behavior?: 'hide' | 'disable';
|
|
2122
|
+
/**
|
|
2123
|
+
* Explanation shown in a tooltip when `behavior='disable'` denies. Accepts a
|
|
2124
|
+
* node so callers can pass translated content without the library taking an
|
|
2125
|
+
* i18n dependency. No tooltip is rendered when omitted.
|
|
2126
|
+
*/
|
|
2127
|
+
reason?: ReactNode;
|
|
2078
2128
|
fallback?: ReactNode;
|
|
2079
|
-
|
|
2129
|
+
/**
|
|
2130
|
+
* Rendered while the grant set is unresolved. Unlike `reason` and `fallback`, `null` and
|
|
2131
|
+
* "omitted" are deliberately NOT the same value here: a node renders that node;
|
|
2132
|
+
* `loading={null}` renders nothing; omitting `loading` entirely falls through to
|
|
2133
|
+
* `fallback` (or, for `CanNot`, lets the fail-open children render). The distinction
|
|
2134
|
+
* exists because for `loading` — and only for `loading` — "render nothing" and "fall
|
|
2135
|
+
* through" are genuinely different outcomes: `CanNot` is fail-open during loading, so
|
|
2136
|
+
* without an explicit `loading={null}` its children render immediately and then
|
|
2137
|
+
* disappear once the grant set resolves. Pass `loading={null}` to suppress that flash.
|
|
2138
|
+
*/
|
|
2139
|
+
loading?: ReactNode;
|
|
2140
|
+
children: ReactNode | ((state: CanState) => ReactNode);
|
|
2080
2141
|
}
|
|
2081
2142
|
type CanNotProps = Omit<CanProps, 'negate'>;
|
|
2082
|
-
/**
|
|
2083
|
-
|
|
2143
|
+
/**
|
|
2144
|
+
* Renders its children when the user has the required permission(s). Requires an
|
|
2145
|
+
* `AbilityProvider` in the tree.
|
|
2146
|
+
*
|
|
2147
|
+
* Render precedence: a render-prop `children` always wins and receives the full
|
|
2148
|
+
* `CanState`; otherwise `loading` renders while the grant set is unresolved; then
|
|
2149
|
+
* `children` when allowed; then `fallback` when denied.
|
|
2150
|
+
*
|
|
2151
|
+
* When `children` is a function it OWNS EVERY STATE, and `behavior`, `reason`, `fallback`
|
|
2152
|
+
* and `loading` are all ignored — the render prop returns before any of them is consulted.
|
|
2153
|
+
* So `<Can behavior='disable' reason='…'>{({ allowed }) => …}</Can>` produces no tooltip
|
|
2154
|
+
* and no disabled treatment; the function has to read `allowed` and `status` and render
|
|
2155
|
+
* the disabled, loading and denied cases itself. Passing any of those four alongside a
|
|
2156
|
+
* function logs a development-only warning, since nothing else about the code looks wrong.
|
|
2157
|
+
*
|
|
2158
|
+
* Fail-closed by default: while `status === 'loading'`, the underlying check
|
|
2159
|
+
* is always `false` and nothing renders optimistically. Passing `negate`
|
|
2160
|
+
* flips this to fail-open — the unresolved `false` becomes `true` — so
|
|
2161
|
+
* children render immediately during loading unless `loading` is explicitly
|
|
2162
|
+
* passed. `CanNot` is `<Can negate />`, so it always exhibits the fail-open
|
|
2163
|
+
* case; pass `loading={null}` to suppress that flash and render nothing
|
|
2164
|
+
* instead — a node passed to `loading` renders that node, while omitting
|
|
2165
|
+
* `loading` falls through to the fail-open children.
|
|
2166
|
+
*/
|
|
2167
|
+
declare function Can({ permission, mode, negate, behavior, reason, fallback, loading, children, }: CanProps): react.JSX.Element;
|
|
2084
2168
|
declare namespace Can {
|
|
2085
2169
|
var displayName: string;
|
|
2086
2170
|
}
|
|
2087
|
-
/** Renders children when the user does NOT have the required permission(s). Alias for `<Can negate />`. Requires `AbilityProvider` in the tree. */
|
|
2088
|
-
declare function CanNot({ permission, mode, fallback, children }: CanNotProps): react.JSX.Element;
|
|
2171
|
+
/** Renders its children when the user does NOT have the required permission(s). Alias for `<Can negate />`. Requires an `AbilityProvider` in the tree. */
|
|
2172
|
+
declare function CanNot({ permission, mode, behavior, reason, fallback, loading, children, }: CanNotProps): react.JSX.Element;
|
|
2089
2173
|
declare namespace CanNot {
|
|
2090
2174
|
var displayName: string;
|
|
2091
2175
|
}
|
|
2092
2176
|
|
|
2093
|
-
interface AbilityContextValue {
|
|
2094
|
-
can: (permissions: string | string[], mode?: 'any' | 'all') => boolean;
|
|
2095
|
-
setAbilities: (permissions: string[]) => void;
|
|
2096
|
-
clearAbilities: () => void;
|
|
2097
|
-
}
|
|
2098
|
-
interface AbilityProviderProps {
|
|
2099
|
-
children: ReactNode;
|
|
2100
|
-
permissions?: string[];
|
|
2101
|
-
}
|
|
2102
|
-
/**
|
|
2103
|
-
* @param pattern - an entry from the user's grant set (may contain `*` as a segment wildcard)
|
|
2104
|
-
* @param permission - the permission being requested (from `Can.perform`)
|
|
2105
|
-
*/
|
|
2106
|
-
declare function matchPermission(pattern: string, permission: string): boolean;
|
|
2107
|
-
declare function AbilityProvider({ children, permissions }: AbilityProviderProps): react.JSX.Element;
|
|
2108
|
-
declare function useAbility(): AbilityContextValue;
|
|
2109
|
-
declare function useCan(permissions: string | string[], mode?: 'any' | 'all'): boolean;
|
|
2110
|
-
|
|
2111
2177
|
declare function Sheet({ ...props }: react.ComponentProps<typeof Dialog$1.Root>): react.JSX.Element;
|
|
2112
2178
|
declare function SheetTrigger({ ...props }: react.ComponentProps<typeof Dialog$1.Trigger>): react.JSX.Element;
|
|
2113
2179
|
declare function SheetClose({ ...props }: react.ComponentProps<typeof Dialog$1.Close>): react.JSX.Element;
|
|
@@ -2182,4 +2248,4 @@ interface TCCEProviderProps {
|
|
|
2182
2248
|
}
|
|
2183
2249
|
declare function TCCEProvider({ children, permissions, toasterPosition, tooltipDelayDuration, }: TCCEProviderProps): react.JSX.Element;
|
|
2184
2250
|
|
|
2185
|
-
export { type AbilityContextValue, AbilityProvider, type AbilityProviderProps, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, type AnimationTokens, AppShell, type AppShellItem, type AppShellProps, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BottomNav, type BottomNavItem, BottomNavTabs, BottomNavTabsContent, type BottomNavTabsItem, BottomNavTabsList, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button$1 as Button, type CalendarEvent, type CalendarView, Can, CanNot, type CanNotProps, type CanProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CellAlignment, Checkbox, ColorPicker, ColorPickerAlpha, type ColorPickerAlphaProps, ColorPickerEyeDropper, type ColorPickerEyeDropperProps, ColorPickerFormat, type ColorPickerFormatProps, ColorPickerHue, type ColorPickerHueProps, ColorPickerOutput, type ColorPickerOutputProps, ColorPickerPresets, type ColorPickerPresetsProps, type ColorPickerProps, ColorPickerSelection, type ColorPickerSelectionProps, type ColumnMeta, Combobox, type ComboboxMatchMode, type ComboboxOption, type ComboboxProps, DataTable, DataTableCardView, type DataTableCardViewProps, DataTableColumnFilter, type DataTableColumnFilterProps, DataTableFooter, type DataTableFooterProps, DataTableHeaderCell, type DataTableHeaderCellProps, type DataTableProps, DataTableRowActions, type DataTableRowActionsProps, DataTableSearch, type DataTableSearchProps, DataTableSkeleton, type DataTableSkeletonProps, DataTableToolbar, type DataTableToolbarProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, type DrawerSide, type DrawerSize, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneContent, type DropzoneContentProps, DropzoneEmptyState, type DropzoneEmptyStateProps, type DropzoneProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EventCalendar, type EventCalendarProps, type EventCreateRange, Field, FieldDescription, FieldError, FieldGroup, FieldLabel, FilterOption, type FilterOptionProps, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, Link, Logo, type LogoKey, MiniCalendar, MiniCalendarDay, type MiniCalendarDayProps, MiniCalendarDays, type MiniCalendarDaysProps, MiniCalendarNavigation, type MiniCalendarNavigationProps, type MiniCalendarProps, Navbar, type NavbarDropdownItem, type NavbarNavLink, type NavbarNotification, type NavbarProps, type NavbarUtilityLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PhoneField, type PhoneFieldCountry, type PhoneFieldProps, PinInput, type PinInputProps, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, type ProgressProps, RadioGroup, RadioGroupItem, type RowAction, SegmentedControl, SegmentedControlItem, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger$1 as SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, type SortDirection, type SortRecord, Spinner, SpinnerDots, type SpinnerDotsProps, SpinnerLoader, type SpinnerLoaderProps, type SpinnerProps, Status, StatusIndicator, type StatusIndicatorProps, StatusLabel, type StatusLabelProps, type StatusProps, Switch, TCCEProvider, type TCCEProviderProps, TEXT_SIZES, TEXT_WEIGHTS, Table, TableBody, TableCaption, TableCell, type TableCellSize, type TableClassNames, type TableColumnDef, type TableContextType, TableFooter, TableHead, TableHeader, TablePagination, type TablePaginationProps, TableRow, type TableVariant, Tabs, TabsContent, TabsList, TabsTrigger, Text, type TextAs, type TextProps, type TextSize, type TextWeight, Textarea, type ToastAction, type ToastItem, type ToastType, Toaster, type ToasterPosition, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseTableDataProps, type UseTableDataReturn, type UseTableFilteringProps, type UseTableFilteringReturn, type UseTableGlobalFilterProps, type UseTableGlobalFilterReturn, type UseTableSizingProps, type UseTableSizingReturn, type UseTableSortingProps, type UseTableSortingReturn, type UseTableVisibilityProps, type UseTableVisibilityReturn, alertVariants, animation, avatarVariants, badgeVariants, buttonVariants$1 as buttonVariants, columnFiltersToArrayQueryParams, columnFiltersToJsonString, columnFiltersToQueryParams, columnFiltersToRecord, createBackendParams, createBackendParamsWithFilters, duration, ease, fadeIn, getActiveFilterCount, getActiveFilterValues, getColumnValueCounts, getUniqueColumnValues, hasActiveFilters, linkVariants, logos,
|
|
2251
|
+
export { type AbilityContextValue, AbilityProvider, type AbilityProviderProps, type AbilityStatus, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, type AnimationTokens, AppShell, type AppShellItem, type AppShellProps, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BottomNav, type BottomNavItem, BottomNavTabs, BottomNavTabsContent, type BottomNavTabsItem, BottomNavTabsList, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button$1 as Button, type CalendarEvent, type CalendarView, Can, CanNot, type CanNotProps, type CanProps, type CanState, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CellAlignment, Checkbox, ColorPicker, ColorPickerAlpha, type ColorPickerAlphaProps, ColorPickerEyeDropper, type ColorPickerEyeDropperProps, ColorPickerFormat, type ColorPickerFormatProps, ColorPickerHue, type ColorPickerHueProps, ColorPickerOutput, type ColorPickerOutputProps, ColorPickerPresets, type ColorPickerPresetsProps, type ColorPickerProps, ColorPickerSelection, type ColorPickerSelectionProps, type ColumnMeta, Combobox, type ComboboxMatchMode, type ComboboxOption, type ComboboxProps, DataTable, DataTableCardView, type DataTableCardViewProps, DataTableColumnFilter, type DataTableColumnFilterProps, DataTableFooter, type DataTableFooterProps, DataTableHeaderCell, type DataTableHeaderCellProps, type DataTableProps, DataTableRowActions, type DataTableRowActionsProps, DataTableSearch, type DataTableSearchProps, DataTableSkeleton, type DataTableSkeletonProps, DataTableToolbar, type DataTableToolbarProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, type DrawerSide, type DrawerSize, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneContent, type DropzoneContentProps, DropzoneEmptyState, type DropzoneEmptyStateProps, type DropzoneProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EventCalendar, type EventCalendarProps, type EventCreateRange, Field, FieldDescription, FieldError, FieldGroup, FieldLabel, FilterOption, type FilterOptionProps, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, Link, Logo, type LogoKey, MiniCalendar, MiniCalendarDay, type MiniCalendarDayProps, MiniCalendarDays, type MiniCalendarDaysProps, MiniCalendarNavigation, type MiniCalendarNavigationProps, type MiniCalendarProps, Navbar, type NavbarDropdownItem, type NavbarNavLink, type NavbarNotification, type NavbarProps, type NavbarUtilityLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Permission, PhoneField, type PhoneFieldCountry, type PhoneFieldProps, PinInput, type PinInputProps, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, type ProgressProps, RadioGroup, RadioGroupItem, type RowAction, SegmentedControl, SegmentedControlItem, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger$1 as SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, type SortDirection, type SortRecord, Spinner, SpinnerDots, type SpinnerDotsProps, SpinnerLoader, type SpinnerLoaderProps, type SpinnerProps, Status, StatusIndicator, type StatusIndicatorProps, StatusLabel, type StatusLabelProps, type StatusProps, Switch, TCCEProvider, type TCCEProviderProps, TEXT_SIZES, TEXT_WEIGHTS, Table, TableBody, TableCaption, TableCell, type TableCellSize, type TableClassNames, type TableColumnDef, type TableContextType, TableFooter, TableHead, TableHeader, TablePagination, type TablePaginationProps, TableRow, type TableVariant, Tabs, TabsContent, TabsList, TabsTrigger, Text, type TextAs, type TextProps, type TextSize, type TextWeight, Textarea, type ToastAction, type ToastItem, type ToastType, Toaster, type ToasterPosition, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseTableDataProps, type UseTableDataReturn, type UseTableFilteringProps, type UseTableFilteringReturn, type UseTableGlobalFilterProps, type UseTableGlobalFilterReturn, type UseTableSizingProps, type UseTableSizingReturn, type UseTableSortingProps, type UseTableSortingReturn, type UseTableVisibilityProps, type UseTableVisibilityReturn, alertVariants, animation, avatarVariants, badgeVariants, buttonVariants$1 as buttonVariants, columnFiltersToArrayQueryParams, columnFiltersToJsonString, columnFiltersToQueryParams, columnFiltersToRecord, createBackendParams, createBackendParamsWithFilters, duration, ease, fadeIn, getActiveFilterCount, getActiveFilterValues, getColumnValueCounts, getUniqueColumnValues, hasActiveFilters, linkVariants, logos, mergeFilters, multiSelectFilter, navigationMenuTriggerStyle, parseJsonToFilters, parseQueryParamsToFilters, progressIndicatorVariants, progressVariants, scaleIn, searchInArray, skeletonVariants, slideRight, slideUp, sortRecordToSortingState, sortingStateToJsonString, sortingStateToRecord, spinnerDotsVariants, spinnerLoaderVariants, spinnerVariants, spring, stagger, toggleVariants, tooltipContentVariants, transition, useAbility, useAbilityStatus, useAppForm, useCan, useCarousel, useColorPicker, useColumnFilter, useSidebar, useTableContext, useTableData, useTableFiltering, useTableGlobalFilter, useTableSizing, useTableSorting, useTableVisibility, useToast };
|
package/dist/main.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cva } from 'class-variance-authority';
|
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
7
|
-
import { createContext, memo, useRef, useState, useMemo, useCallback, useEffect, forwardRef, Fragment, useId, useContext, useLayoutEffect } from 'react';
|
|
7
|
+
import { createContext, memo, useRef, useState, useMemo, useCallback, useEffect, forwardRef, Fragment, useId, useContext, useLayoutEffect, isValidElement, cloneElement } from 'react';
|
|
8
8
|
import { Avatar as Avatar$1, Checkbox as Checkbox$1, Slot, Select as Select$1, Label as Label$1, Popover as Popover$1, Toggle as Toggle$1, ToggleGroup, Separator as Separator$1, Progress as Progress$1, Slider as Slider$1, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1, Dialog as Dialog$1, AlertDialog as AlertDialog$1, Accordion as Accordion$1, DropdownMenu as DropdownMenu$1, RadioGroup as RadioGroup$1, NavigationMenu as NavigationMenu$1 } from 'radix-ui';
|
|
9
9
|
import { isSameDay, isToday, format, addDays } from 'date-fns';
|
|
10
10
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
@@ -5117,6 +5117,8 @@ function NavigationMenuIndicator({
|
|
|
5117
5117
|
}
|
|
5118
5118
|
);
|
|
5119
5119
|
}
|
|
5120
|
+
|
|
5121
|
+
// src/components/authorization/policy.ts
|
|
5120
5122
|
function matchPermission(pattern, permission) {
|
|
5121
5123
|
if (pattern === "*") return true;
|
|
5122
5124
|
if (pattern === permission) return true;
|
|
@@ -5132,41 +5134,46 @@ function matchesAny(permissionSet, permission) {
|
|
|
5132
5134
|
}
|
|
5133
5135
|
return false;
|
|
5134
5136
|
}
|
|
5137
|
+
function can(permissionSet, perms, mode = "any") {
|
|
5138
|
+
const list = Array.isArray(perms) ? perms : [perms];
|
|
5139
|
+
if (list.length === 0) return false;
|
|
5140
|
+
if (permissionSet.has("*")) return true;
|
|
5141
|
+
if (mode === "all") {
|
|
5142
|
+
return list.every((p) => matchesAny(permissionSet, p));
|
|
5143
|
+
}
|
|
5144
|
+
return list.some((p) => matchesAny(permissionSet, p));
|
|
5145
|
+
}
|
|
5135
5146
|
var AbilityContext = createContext(void 0);
|
|
5136
5147
|
AbilityContext.displayName = "AbilityContext";
|
|
5137
5148
|
function AbilityProvider({ children, permissions }) {
|
|
5138
5149
|
const [permissionSet, setPermissionSet] = useState(
|
|
5139
5150
|
() => new Set(permissions ?? [])
|
|
5140
5151
|
);
|
|
5141
|
-
const
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
if (permissionSet.has("*")) return true;
|
|
5146
|
-
if (mode === "all") {
|
|
5147
|
-
return list.every((p) => matchesAny(permissionSet, p));
|
|
5148
|
-
}
|
|
5149
|
-
return list.some((p) => matchesAny(permissionSet, p));
|
|
5150
|
-
},
|
|
5152
|
+
const [imperativelyResolved, setImperativelyResolved] = useState(false);
|
|
5153
|
+
const status = permissions !== void 0 || imperativelyResolved ? "ready" : "loading";
|
|
5154
|
+
const can2 = useCallback(
|
|
5155
|
+
(perms, mode = "any") => can(permissionSet, perms, mode),
|
|
5151
5156
|
[permissionSet]
|
|
5152
5157
|
);
|
|
5153
5158
|
const setAbilities = useCallback((perms) => {
|
|
5154
5159
|
setPermissionSet(new Set(perms));
|
|
5160
|
+
setImperativelyResolved(true);
|
|
5155
5161
|
}, []);
|
|
5156
5162
|
const clearAbilities = useCallback(() => {
|
|
5157
5163
|
setPermissionSet(/* @__PURE__ */ new Set());
|
|
5164
|
+
setImperativelyResolved(true);
|
|
5158
5165
|
}, []);
|
|
5159
|
-
const
|
|
5166
|
+
const permissionKey = permissions === void 0 ? null : [...permissions].sort().join("|");
|
|
5167
|
+
const syncedKey = useRef(permissionKey);
|
|
5160
5168
|
useEffect(() => {
|
|
5161
|
-
if (
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
syncedKey.current = key;
|
|
5169
|
+
if (permissionKey === null) return;
|
|
5170
|
+
if (permissionKey === syncedKey.current) return;
|
|
5171
|
+
syncedKey.current = permissionKey;
|
|
5165
5172
|
setPermissionSet(new Set(permissions));
|
|
5166
|
-
}, [permissions]);
|
|
5173
|
+
}, [permissionKey, permissions]);
|
|
5167
5174
|
const value = useMemo(
|
|
5168
|
-
() => ({ can, setAbilities, clearAbilities }),
|
|
5169
|
-
[
|
|
5175
|
+
() => ({ can: can2, setAbilities, clearAbilities, status }),
|
|
5176
|
+
[can2, setAbilities, clearAbilities, status]
|
|
5170
5177
|
);
|
|
5171
5178
|
return /* @__PURE__ */ jsx(AbilityContext.Provider, { value, children });
|
|
5172
5179
|
}
|
|
@@ -5178,21 +5185,176 @@ function useAbility() {
|
|
|
5178
5185
|
return context;
|
|
5179
5186
|
}
|
|
5180
5187
|
function useCan(permissions, mode = "any") {
|
|
5181
|
-
const { can } = useAbility();
|
|
5182
|
-
return
|
|
5188
|
+
const { can: can2 } = useAbility();
|
|
5189
|
+
return can2(permissions, mode);
|
|
5190
|
+
}
|
|
5191
|
+
function useAbilityStatus() {
|
|
5192
|
+
return useAbility().status;
|
|
5193
|
+
}
|
|
5194
|
+
|
|
5195
|
+
// src/components/authorization/permissions.generated.ts
|
|
5196
|
+
var KNOWN_PERMISSIONS = [];
|
|
5197
|
+
|
|
5198
|
+
// src/components/authorization/permission-catalog.ts
|
|
5199
|
+
var CATALOG = new Set(KNOWN_PERMISSIONS);
|
|
5200
|
+
var warned = /* @__PURE__ */ new Set();
|
|
5201
|
+
function warnUnknownPermission(permission) {
|
|
5202
|
+
if (process.env.NODE_ENV === "production") return;
|
|
5203
|
+
if (CATALOG.size === 0) return;
|
|
5204
|
+
const requested = Array.isArray(permission) ? permission : [permission];
|
|
5205
|
+
for (const entry of requested) {
|
|
5206
|
+
if (entry.includes("*")) continue;
|
|
5207
|
+
if (CATALOG.has(entry) || warned.has(entry)) continue;
|
|
5208
|
+
warned.add(entry);
|
|
5209
|
+
console.warn(
|
|
5210
|
+
`[Can] Unknown permission "${entry}". It is not in the generated permission catalog. Check for a typo, or regenerate the catalog with \`pnpm generate-permissions\`.`
|
|
5211
|
+
);
|
|
5212
|
+
}
|
|
5213
|
+
}
|
|
5214
|
+
var FOCUS_TRAVERSAL_KEYS = /* @__PURE__ */ new Set(["Tab", "Escape"]);
|
|
5215
|
+
function blockInteraction(event) {
|
|
5216
|
+
event.preventDefault();
|
|
5217
|
+
event.stopPropagation();
|
|
5218
|
+
}
|
|
5219
|
+
function blockNonTraversalKey(event) {
|
|
5220
|
+
if (!FOCUS_TRAVERSAL_KEYS.has(event.key)) blockInteraction(event);
|
|
5221
|
+
}
|
|
5222
|
+
var warnedRenderPropMisuse = /* @__PURE__ */ new Set();
|
|
5223
|
+
function warnRenderPropVoidsProps(voided) {
|
|
5224
|
+
if (process.env.NODE_ENV === "production") return;
|
|
5225
|
+
if (voided.length === 0) return;
|
|
5226
|
+
const key = voided.join(",");
|
|
5227
|
+
if (warnedRenderPropMisuse.has(key)) return;
|
|
5228
|
+
warnedRenderPropMisuse.add(key);
|
|
5229
|
+
console.warn(
|
|
5230
|
+
`[Can] \`children\` is a function, so ${voided.map((prop) => `\`${prop}\``).join(", ")} ${voided.length === 1 ? "is" : "are"} ignored. A render prop owns every state: read \`allowed\` and \`status\` and render the disabled, loading and denied cases yourself, or pass an element instead of a function.`
|
|
5231
|
+
);
|
|
5232
|
+
}
|
|
5233
|
+
function disableElement(child) {
|
|
5234
|
+
return cloneElement(child, {
|
|
5235
|
+
"aria-disabled": "true",
|
|
5236
|
+
className: cn(child.props.className, "cursor-not-allowed opacity-50"),
|
|
5237
|
+
onClickCapture: blockInteraction,
|
|
5238
|
+
onKeyDownCapture: blockNonTraversalKey,
|
|
5239
|
+
onKeyUpCapture: blockNonTraversalKey,
|
|
5240
|
+
onPointerDownCapture: blockInteraction,
|
|
5241
|
+
onMouseDownCapture: blockInteraction
|
|
5242
|
+
});
|
|
5243
|
+
}
|
|
5244
|
+
function InteractionFirewall({ children }) {
|
|
5245
|
+
return /* @__PURE__ */ jsx(
|
|
5246
|
+
"span",
|
|
5247
|
+
{
|
|
5248
|
+
"data-slot": "can-blocked",
|
|
5249
|
+
className: "contents",
|
|
5250
|
+
onClickCapture: blockInteraction,
|
|
5251
|
+
onPointerDownCapture: blockInteraction,
|
|
5252
|
+
onMouseDownCapture: blockInteraction,
|
|
5253
|
+
onKeyDownCapture: blockNonTraversalKey,
|
|
5254
|
+
onKeyUpCapture: blockNonTraversalKey,
|
|
5255
|
+
children
|
|
5256
|
+
}
|
|
5257
|
+
);
|
|
5258
|
+
}
|
|
5259
|
+
function DisabledSubtree({
|
|
5260
|
+
children,
|
|
5261
|
+
className,
|
|
5262
|
+
...props
|
|
5263
|
+
}) {
|
|
5264
|
+
const { "data-slot": _incomingDataSlot, ...restProps } = props;
|
|
5265
|
+
return /* @__PURE__ */ jsx(
|
|
5266
|
+
"span",
|
|
5267
|
+
{
|
|
5268
|
+
"data-slot": "can-disabled",
|
|
5269
|
+
"aria-disabled": "true",
|
|
5270
|
+
className: cn(
|
|
5271
|
+
"inline-flex cursor-not-allowed opacity-50",
|
|
5272
|
+
"*:pointer-events-none",
|
|
5273
|
+
className
|
|
5274
|
+
),
|
|
5275
|
+
onClickCapture: blockInteraction,
|
|
5276
|
+
onPointerDownCapture: blockInteraction,
|
|
5277
|
+
onMouseDownCapture: blockInteraction,
|
|
5278
|
+
onKeyDownCapture: blockNonTraversalKey,
|
|
5279
|
+
onKeyUpCapture: blockNonTraversalKey,
|
|
5280
|
+
...restProps,
|
|
5281
|
+
children
|
|
5282
|
+
}
|
|
5283
|
+
);
|
|
5183
5284
|
}
|
|
5184
|
-
function Can({
|
|
5185
|
-
|
|
5186
|
-
|
|
5285
|
+
function Can({
|
|
5286
|
+
permission,
|
|
5287
|
+
mode = "any",
|
|
5288
|
+
negate = false,
|
|
5289
|
+
behavior = "hide",
|
|
5290
|
+
reason = null,
|
|
5291
|
+
fallback = null,
|
|
5292
|
+
loading,
|
|
5293
|
+
children
|
|
5294
|
+
}) {
|
|
5295
|
+
warnUnknownPermission(permission);
|
|
5296
|
+
const { can: can2, status } = useAbility();
|
|
5297
|
+
const hasPermission = status === "ready" && can2(permission, mode);
|
|
5187
5298
|
const show = negate ? !hasPermission : hasPermission;
|
|
5188
5299
|
if (typeof children === "function") {
|
|
5189
|
-
|
|
5300
|
+
warnRenderPropVoidsProps([
|
|
5301
|
+
...behavior === "disable" ? ["behavior='disable'"] : [],
|
|
5302
|
+
...reason !== null ? ["reason"] : [],
|
|
5303
|
+
...fallback !== null ? ["fallback"] : [],
|
|
5304
|
+
...loading !== void 0 ? ["loading"] : []
|
|
5305
|
+
]);
|
|
5306
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: children({ allowed: show, status }) });
|
|
5307
|
+
}
|
|
5308
|
+
if (status === "loading" && loading !== void 0) {
|
|
5309
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: loading });
|
|
5310
|
+
}
|
|
5311
|
+
if (show) {
|
|
5312
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
5190
5313
|
}
|
|
5191
|
-
|
|
5314
|
+
if (behavior === "disable") {
|
|
5315
|
+
if (isValidElement(children) && children.type !== Fragment) {
|
|
5316
|
+
const disabledChild = disableElement(children);
|
|
5317
|
+
if (reason === null) {
|
|
5318
|
+
return /* @__PURE__ */ jsx(InteractionFirewall, { children: disabledChild });
|
|
5319
|
+
}
|
|
5320
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
5321
|
+
/* @__PURE__ */ jsx(InteractionFirewall, { children: /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: disabledChild }) }),
|
|
5322
|
+
/* @__PURE__ */ jsx(TooltipContent, { children: reason })
|
|
5323
|
+
] });
|
|
5324
|
+
}
|
|
5325
|
+
if (reason === null) {
|
|
5326
|
+
return /* @__PURE__ */ jsx(DisabledSubtree, { children });
|
|
5327
|
+
}
|
|
5328
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
5329
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(DisabledSubtree, { children }) }),
|
|
5330
|
+
/* @__PURE__ */ jsx(TooltipContent, { children: reason })
|
|
5331
|
+
] });
|
|
5332
|
+
}
|
|
5333
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: fallback });
|
|
5192
5334
|
}
|
|
5193
5335
|
Can.displayName = "Can";
|
|
5194
|
-
function CanNot({
|
|
5195
|
-
|
|
5336
|
+
function CanNot({
|
|
5337
|
+
permission,
|
|
5338
|
+
mode = "any",
|
|
5339
|
+
behavior = "hide",
|
|
5340
|
+
reason = null,
|
|
5341
|
+
fallback = null,
|
|
5342
|
+
loading,
|
|
5343
|
+
children
|
|
5344
|
+
}) {
|
|
5345
|
+
return /* @__PURE__ */ jsx(
|
|
5346
|
+
Can,
|
|
5347
|
+
{
|
|
5348
|
+
permission,
|
|
5349
|
+
mode,
|
|
5350
|
+
negate: true,
|
|
5351
|
+
behavior,
|
|
5352
|
+
reason,
|
|
5353
|
+
fallback,
|
|
5354
|
+
loading,
|
|
5355
|
+
children
|
|
5356
|
+
}
|
|
5357
|
+
);
|
|
5196
5358
|
}
|
|
5197
5359
|
CanNot.displayName = "CanNot";
|
|
5198
5360
|
function useMediaQuery(query) {
|
|
@@ -9212,6 +9374,6 @@ function TCCEProvider({
|
|
|
9212
9374
|
return /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: tooltipDelayDuration, children: /* @__PURE__ */ jsx(AbilityProvider, { permissions, children: /* @__PURE__ */ jsx(Toaster, { position: toasterPosition, children }) }) });
|
|
9213
9375
|
}
|
|
9214
9376
|
|
|
9215
|
-
export { AbilityProvider, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge2 as Badge, BottomNav, BottomNavTabs, BottomNavTabsContent, BottomNavTabsList, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Can, CanNot, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, ColorPicker, ColorPickerAlpha, ColorPickerEyeDropper, ColorPickerFormat, ColorPickerHue, ColorPickerOutput, ColorPickerPresets, ColorPickerSelection, Combobox, DataTable, DataTableCardView, DataTableColumnFilter, DataTableFooter, DataTableHeaderCell, DataTableRowActions, DataTableSearch, DataTableSkeleton, DataTableToolbar, DatePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneContent, DropzoneEmptyState, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EventCalendar, Field, FieldDescription, FieldError, FieldGroup, FieldLabel, FilterOption, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, Link, Logo, MiniCalendar, MiniCalendarDay, MiniCalendarDays, MiniCalendarNavigation, Navbar, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PhoneField, PinInput, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, SegmentedControl, SegmentedControlItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, SpinnerDots, SpinnerLoader, Status, StatusIndicator, StatusLabel, Switch, TCCEProvider, TEXT_SIZES, TEXT_WEIGHTS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TablePagination, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, Textarea, Toaster, Toggle, ToggleGroup2 as ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, alertVariants, animation, avatarVariants, badgeVariants2 as badgeVariants, buttonVariants, columnFiltersToArrayQueryParams, columnFiltersToJsonString, columnFiltersToQueryParams, columnFiltersToRecord, createBackendParams, createBackendParamsWithFilters, duration, ease, fadeIn, getActiveFilterCount, getActiveFilterValues, getColumnValueCounts, getUniqueColumnValues, hasActiveFilters, linkVariants, logos, matchPermission, mergeFilters, multiSelectFilter, navigationMenuTriggerStyle, parseJsonToFilters, parseQueryParamsToFilters, progressIndicatorVariants, progressVariants, scaleIn, searchInArray, skeletonVariants, slideRight, slideUp, sortRecordToSortingState, sortingStateToJsonString, sortingStateToRecord, spinnerDotsVariants, spinnerLoaderVariants, spinnerVariants, spring, stagger, toggleVariants, tooltipContentVariants, transition, useAbility, useAppForm, useCan, useCarousel, useColorPicker, useColumnFilter, useSidebar, useTableContext, useTableData, useTableFiltering, useTableGlobalFilter, useTableSizing, useTableSorting, useTableVisibility, useToast };
|
|
9377
|
+
export { AbilityProvider, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge2 as Badge, BottomNav, BottomNavTabs, BottomNavTabsContent, BottomNavTabsList, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Can, CanNot, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, ColorPicker, ColorPickerAlpha, ColorPickerEyeDropper, ColorPickerFormat, ColorPickerHue, ColorPickerOutput, ColorPickerPresets, ColorPickerSelection, Combobox, DataTable, DataTableCardView, DataTableColumnFilter, DataTableFooter, DataTableHeaderCell, DataTableRowActions, DataTableSearch, DataTableSkeleton, DataTableToolbar, DatePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneContent, DropzoneEmptyState, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EventCalendar, Field, FieldDescription, FieldError, FieldGroup, FieldLabel, FilterOption, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, KNOWN_PERMISSIONS, Label, Link, Logo, MiniCalendar, MiniCalendarDay, MiniCalendarDays, MiniCalendarNavigation, Navbar, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PhoneField, PinInput, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, SegmentedControl, SegmentedControlItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, SpinnerDots, SpinnerLoader, Status, StatusIndicator, StatusLabel, Switch, TCCEProvider, TEXT_SIZES, TEXT_WEIGHTS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TablePagination, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, Textarea, Toaster, Toggle, ToggleGroup2 as ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, alertVariants, animation, avatarVariants, badgeVariants2 as badgeVariants, buttonVariants, columnFiltersToArrayQueryParams, columnFiltersToJsonString, columnFiltersToQueryParams, columnFiltersToRecord, createBackendParams, createBackendParamsWithFilters, duration, ease, fadeIn, getActiveFilterCount, getActiveFilterValues, getColumnValueCounts, getUniqueColumnValues, hasActiveFilters, linkVariants, logos, matchPermission, mergeFilters, multiSelectFilter, navigationMenuTriggerStyle, parseJsonToFilters, parseQueryParamsToFilters, progressIndicatorVariants, progressVariants, scaleIn, searchInArray, skeletonVariants, slideRight, slideUp, sortRecordToSortingState, sortingStateToJsonString, sortingStateToRecord, spinnerDotsVariants, spinnerLoaderVariants, spinnerVariants, spring, stagger, toggleVariants, tooltipContentVariants, transition, useAbility, useAbilityStatus, useAppForm, useCan, useCarousel, useColorPicker, useColumnFilter, useSidebar, useTableContext, useTableData, useTableFiltering, useTableGlobalFilter, useTableSizing, useTableSorting, useTableVisibility, useToast };
|
|
9216
9378
|
//# sourceMappingURL=main.js.map
|
|
9217
9379
|
//# sourceMappingURL=main.js.map
|