@bizapps/ui 1.4.2 → 1.5.0
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 +176 -15
- package/dist/main.cjs.map +1 -1
- package/dist/main.d.cts +116 -21
- package/dist/main.d.ts +116 -21
- package/dist/main.js +176 -17
- package/dist/main.js.map +1 -1
- package/package.json +2 -1
package/dist/main.d.cts
CHANGED
|
@@ -2071,29 +2071,45 @@ interface UseTableSizingReturn {
|
|
|
2071
2071
|
*/
|
|
2072
2072
|
declare function useTableSizing({ columnSizing: controlledSizing, defaultColumnSizing, onColumnSizingChange, }: UseTableSizingProps): UseTableSizingReturn;
|
|
2073
2073
|
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2074
|
+
/**
|
|
2075
|
+
* AUTO-GENERATED — do not edit by hand.
|
|
2076
|
+
*
|
|
2077
|
+
* Regenerate with `pnpm generate-permissions`, which reads the catalog from the
|
|
2078
|
+
* Nexus backend. The list is committed so the library build never depends on a
|
|
2079
|
+
* live backend call.
|
|
2080
|
+
*
|
|
2081
|
+
* While this list is empty, `Permission` degrades to plain `string` and the
|
|
2082
|
+
* development-time unknown-permission warning is skipped entirely — an empty
|
|
2083
|
+
* catalog must never produce false positives.
|
|
2084
|
+
*/
|
|
2085
|
+
declare const KNOWN_PERMISSIONS: readonly [];
|
|
2086
|
+
type KnownPermission = (typeof KNOWN_PERMISSIONS)[number];
|
|
2087
|
+
|
|
2088
|
+
/**
|
|
2089
|
+
* A permission string in `resource.action` or `module.resource.action`
|
|
2090
|
+
* dot-notation, lowercase, with `*` as a segment wildcard and a bare `*` as the
|
|
2091
|
+
* super-grant.
|
|
2092
|
+
*
|
|
2093
|
+
* Known catalog entries are suggested by autocomplete; any other string is still
|
|
2094
|
+
* accepted, so a permission the catalog has not caught up with never blocks a
|
|
2095
|
+
* build. The `(string & {})` half is the TypeScript idiom that keeps the literal
|
|
2096
|
+
* suggestions from collapsing into plain `string`.
|
|
2097
|
+
*/
|
|
2098
|
+
type Permission = KnownPermission | (string & {});
|
|
2092
2099
|
|
|
2100
|
+
/** `'loading'` while the grant set is unresolved, `'ready'` once it is known. */
|
|
2101
|
+
type AbilityStatus = 'loading' | 'ready';
|
|
2093
2102
|
interface AbilityContextValue {
|
|
2094
|
-
can: (permissions:
|
|
2103
|
+
can: (permissions: Permission | Permission[], mode?: 'any' | 'all') => boolean;
|
|
2095
2104
|
setAbilities: (permissions: string[]) => void;
|
|
2096
2105
|
clearAbilities: () => void;
|
|
2106
|
+
/**
|
|
2107
|
+
* `'loading'` while the grant set is genuinely unresolved, `'ready'` once it
|
|
2108
|
+
* is known — including when it is known to be empty. This is what makes
|
|
2109
|
+
* "still loading" distinguishable from "loaded, zero grants": both produce
|
|
2110
|
+
* an empty set, so without this flag a consumer cannot tell them apart.
|
|
2111
|
+
*/
|
|
2112
|
+
status: AbilityStatus;
|
|
2097
2113
|
}
|
|
2098
2114
|
interface AbilityProviderProps {
|
|
2099
2115
|
children: ReactNode;
|
|
@@ -2106,7 +2122,86 @@ interface AbilityProviderProps {
|
|
|
2106
2122
|
declare function matchPermission(pattern: string, permission: string): boolean;
|
|
2107
2123
|
declare function AbilityProvider({ children, permissions }: AbilityProviderProps): react.JSX.Element;
|
|
2108
2124
|
declare function useAbility(): AbilityContextValue;
|
|
2109
|
-
declare function useCan(permissions:
|
|
2125
|
+
declare function useCan(permissions: Permission | Permission[], mode?: 'any' | 'all'): boolean;
|
|
2126
|
+
/** Returns whether the grant set is resolved yet. Useful for skeletons without a `Can` wrapper. */
|
|
2127
|
+
declare function useAbilityStatus(): AbilityStatus;
|
|
2128
|
+
|
|
2129
|
+
interface CanState {
|
|
2130
|
+
/**
|
|
2131
|
+
* Whether the permission check passed, after `negate` is applied. While
|
|
2132
|
+
* `status` is `'loading'`, the underlying check is always `false` — so
|
|
2133
|
+
* `allowed` is `false` for `Can` (fail-closed) but `true` for `CanNot`
|
|
2134
|
+
* (fail-open: negating an unresolved `false` flips it to `true`).
|
|
2135
|
+
*/
|
|
2136
|
+
allowed: boolean;
|
|
2137
|
+
/** Whether the grant set has resolved yet. */
|
|
2138
|
+
status: AbilityStatus;
|
|
2139
|
+
}
|
|
2140
|
+
interface CanProps {
|
|
2141
|
+
permission: Permission | Permission[];
|
|
2142
|
+
mode?: 'any' | 'all';
|
|
2143
|
+
negate?: boolean;
|
|
2144
|
+
/**
|
|
2145
|
+
* `'hide'` (default) removes the subtree and renders `fallback` instead.
|
|
2146
|
+
* `'disable'` keeps the subtree visible but non-interactive, with `reason`
|
|
2147
|
+
* surfaced in a tooltip. Use `'disable'` when the user should know the
|
|
2148
|
+
* action exists and why it is unavailable.
|
|
2149
|
+
*/
|
|
2150
|
+
behavior?: 'hide' | 'disable';
|
|
2151
|
+
/**
|
|
2152
|
+
* Explanation shown in a tooltip when `behavior='disable'` denies. Accepts a
|
|
2153
|
+
* node so callers can pass translated content without the library taking an
|
|
2154
|
+
* i18n dependency. No tooltip is rendered when omitted.
|
|
2155
|
+
*/
|
|
2156
|
+
reason?: ReactNode;
|
|
2157
|
+
fallback?: ReactNode;
|
|
2158
|
+
/**
|
|
2159
|
+
* Rendered while the grant set is unresolved. Unlike `reason` and `fallback`, `null` and
|
|
2160
|
+
* "omitted" are deliberately NOT the same value here: a node renders that node;
|
|
2161
|
+
* `loading={null}` renders nothing; omitting `loading` entirely falls through to
|
|
2162
|
+
* `fallback` (or, for `CanNot`, lets the fail-open children render). The distinction
|
|
2163
|
+
* exists because for `loading` — and only for `loading` — "render nothing" and "fall
|
|
2164
|
+
* through" are genuinely different outcomes: `CanNot` is fail-open during loading, so
|
|
2165
|
+
* without an explicit `loading={null}` its children render immediately and then
|
|
2166
|
+
* disappear once the grant set resolves. Pass `loading={null}` to suppress that flash.
|
|
2167
|
+
*/
|
|
2168
|
+
loading?: ReactNode;
|
|
2169
|
+
children: ReactNode | ((state: CanState) => ReactNode);
|
|
2170
|
+
}
|
|
2171
|
+
type CanNotProps = Omit<CanProps, 'negate'>;
|
|
2172
|
+
/**
|
|
2173
|
+
* Renders its children when the user has the required permission(s). Requires an
|
|
2174
|
+
* `AbilityProvider` in the tree.
|
|
2175
|
+
*
|
|
2176
|
+
* Render precedence: a render-prop `children` always wins and receives the full
|
|
2177
|
+
* `CanState`; otherwise `loading` renders while the grant set is unresolved; then
|
|
2178
|
+
* `children` when allowed; then `fallback` when denied.
|
|
2179
|
+
*
|
|
2180
|
+
* When `children` is a function it OWNS EVERY STATE, and `behavior`, `reason`, `fallback`
|
|
2181
|
+
* and `loading` are all ignored — the render prop returns before any of them is consulted.
|
|
2182
|
+
* So `<Can behavior='disable' reason='…'>{({ allowed }) => …}</Can>` produces no tooltip
|
|
2183
|
+
* and no disabled treatment; the function has to read `allowed` and `status` and render
|
|
2184
|
+
* the disabled, loading and denied cases itself. Passing any of those four alongside a
|
|
2185
|
+
* function logs a development-only warning, since nothing else about the code looks wrong.
|
|
2186
|
+
*
|
|
2187
|
+
* Fail-closed by default: while `status === 'loading'`, the underlying check
|
|
2188
|
+
* is always `false` and nothing renders optimistically. Passing `negate`
|
|
2189
|
+
* flips this to fail-open — the unresolved `false` becomes `true` — so
|
|
2190
|
+
* children render immediately during loading unless `loading` is explicitly
|
|
2191
|
+
* passed. `CanNot` is `<Can negate />`, so it always exhibits the fail-open
|
|
2192
|
+
* case; pass `loading={null}` to suppress that flash and render nothing
|
|
2193
|
+
* instead — a node passed to `loading` renders that node, while omitting
|
|
2194
|
+
* `loading` falls through to the fail-open children.
|
|
2195
|
+
*/
|
|
2196
|
+
declare function Can({ permission, mode, negate, behavior, reason, fallback, loading, children, }: CanProps): react.JSX.Element;
|
|
2197
|
+
declare namespace Can {
|
|
2198
|
+
var displayName: string;
|
|
2199
|
+
}
|
|
2200
|
+
/** Renders its children when the user does NOT have the required permission(s). Alias for `<Can negate />`. Requires an `AbilityProvider` in the tree. */
|
|
2201
|
+
declare function CanNot({ permission, mode, behavior, reason, fallback, loading, children, }: CanNotProps): react.JSX.Element;
|
|
2202
|
+
declare namespace CanNot {
|
|
2203
|
+
var displayName: string;
|
|
2204
|
+
}
|
|
2110
2205
|
|
|
2111
2206
|
declare function Sheet({ ...props }: react.ComponentProps<typeof Dialog$1.Root>): react.JSX.Element;
|
|
2112
2207
|
declare function SheetTrigger({ ...props }: react.ComponentProps<typeof Dialog$1.Trigger>): react.JSX.Element;
|
|
@@ -2182,4 +2277,4 @@ interface TCCEProviderProps {
|
|
|
2182
2277
|
}
|
|
2183
2278
|
declare function TCCEProvider({ children, permissions, toasterPosition, tooltipDelayDuration, }: TCCEProviderProps): react.JSX.Element;
|
|
2184
2279
|
|
|
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, 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 };
|
|
2280
|
+
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, KNOWN_PERMISSIONS, type KnownPermission, 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, type 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, 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 };
|
package/dist/main.d.ts
CHANGED
|
@@ -2071,29 +2071,45 @@ interface UseTableSizingReturn {
|
|
|
2071
2071
|
*/
|
|
2072
2072
|
declare function useTableSizing({ columnSizing: controlledSizing, defaultColumnSizing, onColumnSizingChange, }: UseTableSizingProps): UseTableSizingReturn;
|
|
2073
2073
|
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2074
|
+
/**
|
|
2075
|
+
* AUTO-GENERATED — do not edit by hand.
|
|
2076
|
+
*
|
|
2077
|
+
* Regenerate with `pnpm generate-permissions`, which reads the catalog from the
|
|
2078
|
+
* Nexus backend. The list is committed so the library build never depends on a
|
|
2079
|
+
* live backend call.
|
|
2080
|
+
*
|
|
2081
|
+
* While this list is empty, `Permission` degrades to plain `string` and the
|
|
2082
|
+
* development-time unknown-permission warning is skipped entirely — an empty
|
|
2083
|
+
* catalog must never produce false positives.
|
|
2084
|
+
*/
|
|
2085
|
+
declare const KNOWN_PERMISSIONS: readonly [];
|
|
2086
|
+
type KnownPermission = (typeof KNOWN_PERMISSIONS)[number];
|
|
2087
|
+
|
|
2088
|
+
/**
|
|
2089
|
+
* A permission string in `resource.action` or `module.resource.action`
|
|
2090
|
+
* dot-notation, lowercase, with `*` as a segment wildcard and a bare `*` as the
|
|
2091
|
+
* super-grant.
|
|
2092
|
+
*
|
|
2093
|
+
* Known catalog entries are suggested by autocomplete; any other string is still
|
|
2094
|
+
* accepted, so a permission the catalog has not caught up with never blocks a
|
|
2095
|
+
* build. The `(string & {})` half is the TypeScript idiom that keeps the literal
|
|
2096
|
+
* suggestions from collapsing into plain `string`.
|
|
2097
|
+
*/
|
|
2098
|
+
type Permission = KnownPermission | (string & {});
|
|
2092
2099
|
|
|
2100
|
+
/** `'loading'` while the grant set is unresolved, `'ready'` once it is known. */
|
|
2101
|
+
type AbilityStatus = 'loading' | 'ready';
|
|
2093
2102
|
interface AbilityContextValue {
|
|
2094
|
-
can: (permissions:
|
|
2103
|
+
can: (permissions: Permission | Permission[], mode?: 'any' | 'all') => boolean;
|
|
2095
2104
|
setAbilities: (permissions: string[]) => void;
|
|
2096
2105
|
clearAbilities: () => void;
|
|
2106
|
+
/**
|
|
2107
|
+
* `'loading'` while the grant set is genuinely unresolved, `'ready'` once it
|
|
2108
|
+
* is known — including when it is known to be empty. This is what makes
|
|
2109
|
+
* "still loading" distinguishable from "loaded, zero grants": both produce
|
|
2110
|
+
* an empty set, so without this flag a consumer cannot tell them apart.
|
|
2111
|
+
*/
|
|
2112
|
+
status: AbilityStatus;
|
|
2097
2113
|
}
|
|
2098
2114
|
interface AbilityProviderProps {
|
|
2099
2115
|
children: ReactNode;
|
|
@@ -2106,7 +2122,86 @@ interface AbilityProviderProps {
|
|
|
2106
2122
|
declare function matchPermission(pattern: string, permission: string): boolean;
|
|
2107
2123
|
declare function AbilityProvider({ children, permissions }: AbilityProviderProps): react.JSX.Element;
|
|
2108
2124
|
declare function useAbility(): AbilityContextValue;
|
|
2109
|
-
declare function useCan(permissions:
|
|
2125
|
+
declare function useCan(permissions: Permission | Permission[], mode?: 'any' | 'all'): boolean;
|
|
2126
|
+
/** Returns whether the grant set is resolved yet. Useful for skeletons without a `Can` wrapper. */
|
|
2127
|
+
declare function useAbilityStatus(): AbilityStatus;
|
|
2128
|
+
|
|
2129
|
+
interface CanState {
|
|
2130
|
+
/**
|
|
2131
|
+
* Whether the permission check passed, after `negate` is applied. While
|
|
2132
|
+
* `status` is `'loading'`, the underlying check is always `false` — so
|
|
2133
|
+
* `allowed` is `false` for `Can` (fail-closed) but `true` for `CanNot`
|
|
2134
|
+
* (fail-open: negating an unresolved `false` flips it to `true`).
|
|
2135
|
+
*/
|
|
2136
|
+
allowed: boolean;
|
|
2137
|
+
/** Whether the grant set has resolved yet. */
|
|
2138
|
+
status: AbilityStatus;
|
|
2139
|
+
}
|
|
2140
|
+
interface CanProps {
|
|
2141
|
+
permission: Permission | Permission[];
|
|
2142
|
+
mode?: 'any' | 'all';
|
|
2143
|
+
negate?: boolean;
|
|
2144
|
+
/**
|
|
2145
|
+
* `'hide'` (default) removes the subtree and renders `fallback` instead.
|
|
2146
|
+
* `'disable'` keeps the subtree visible but non-interactive, with `reason`
|
|
2147
|
+
* surfaced in a tooltip. Use `'disable'` when the user should know the
|
|
2148
|
+
* action exists and why it is unavailable.
|
|
2149
|
+
*/
|
|
2150
|
+
behavior?: 'hide' | 'disable';
|
|
2151
|
+
/**
|
|
2152
|
+
* Explanation shown in a tooltip when `behavior='disable'` denies. Accepts a
|
|
2153
|
+
* node so callers can pass translated content without the library taking an
|
|
2154
|
+
* i18n dependency. No tooltip is rendered when omitted.
|
|
2155
|
+
*/
|
|
2156
|
+
reason?: ReactNode;
|
|
2157
|
+
fallback?: ReactNode;
|
|
2158
|
+
/**
|
|
2159
|
+
* Rendered while the grant set is unresolved. Unlike `reason` and `fallback`, `null` and
|
|
2160
|
+
* "omitted" are deliberately NOT the same value here: a node renders that node;
|
|
2161
|
+
* `loading={null}` renders nothing; omitting `loading` entirely falls through to
|
|
2162
|
+
* `fallback` (or, for `CanNot`, lets the fail-open children render). The distinction
|
|
2163
|
+
* exists because for `loading` — and only for `loading` — "render nothing" and "fall
|
|
2164
|
+
* through" are genuinely different outcomes: `CanNot` is fail-open during loading, so
|
|
2165
|
+
* without an explicit `loading={null}` its children render immediately and then
|
|
2166
|
+
* disappear once the grant set resolves. Pass `loading={null}` to suppress that flash.
|
|
2167
|
+
*/
|
|
2168
|
+
loading?: ReactNode;
|
|
2169
|
+
children: ReactNode | ((state: CanState) => ReactNode);
|
|
2170
|
+
}
|
|
2171
|
+
type CanNotProps = Omit<CanProps, 'negate'>;
|
|
2172
|
+
/**
|
|
2173
|
+
* Renders its children when the user has the required permission(s). Requires an
|
|
2174
|
+
* `AbilityProvider` in the tree.
|
|
2175
|
+
*
|
|
2176
|
+
* Render precedence: a render-prop `children` always wins and receives the full
|
|
2177
|
+
* `CanState`; otherwise `loading` renders while the grant set is unresolved; then
|
|
2178
|
+
* `children` when allowed; then `fallback` when denied.
|
|
2179
|
+
*
|
|
2180
|
+
* When `children` is a function it OWNS EVERY STATE, and `behavior`, `reason`, `fallback`
|
|
2181
|
+
* and `loading` are all ignored — the render prop returns before any of them is consulted.
|
|
2182
|
+
* So `<Can behavior='disable' reason='…'>{({ allowed }) => …}</Can>` produces no tooltip
|
|
2183
|
+
* and no disabled treatment; the function has to read `allowed` and `status` and render
|
|
2184
|
+
* the disabled, loading and denied cases itself. Passing any of those four alongside a
|
|
2185
|
+
* function logs a development-only warning, since nothing else about the code looks wrong.
|
|
2186
|
+
*
|
|
2187
|
+
* Fail-closed by default: while `status === 'loading'`, the underlying check
|
|
2188
|
+
* is always `false` and nothing renders optimistically. Passing `negate`
|
|
2189
|
+
* flips this to fail-open — the unresolved `false` becomes `true` — so
|
|
2190
|
+
* children render immediately during loading unless `loading` is explicitly
|
|
2191
|
+
* passed. `CanNot` is `<Can negate />`, so it always exhibits the fail-open
|
|
2192
|
+
* case; pass `loading={null}` to suppress that flash and render nothing
|
|
2193
|
+
* instead — a node passed to `loading` renders that node, while omitting
|
|
2194
|
+
* `loading` falls through to the fail-open children.
|
|
2195
|
+
*/
|
|
2196
|
+
declare function Can({ permission, mode, negate, behavior, reason, fallback, loading, children, }: CanProps): react.JSX.Element;
|
|
2197
|
+
declare namespace Can {
|
|
2198
|
+
var displayName: string;
|
|
2199
|
+
}
|
|
2200
|
+
/** Renders its children when the user does NOT have the required permission(s). Alias for `<Can negate />`. Requires an `AbilityProvider` in the tree. */
|
|
2201
|
+
declare function CanNot({ permission, mode, behavior, reason, fallback, loading, children, }: CanNotProps): react.JSX.Element;
|
|
2202
|
+
declare namespace CanNot {
|
|
2203
|
+
var displayName: string;
|
|
2204
|
+
}
|
|
2110
2205
|
|
|
2111
2206
|
declare function Sheet({ ...props }: react.ComponentProps<typeof Dialog$1.Root>): react.JSX.Element;
|
|
2112
2207
|
declare function SheetTrigger({ ...props }: react.ComponentProps<typeof Dialog$1.Trigger>): react.JSX.Element;
|
|
@@ -2182,4 +2277,4 @@ interface TCCEProviderProps {
|
|
|
2182
2277
|
}
|
|
2183
2278
|
declare function TCCEProvider({ children, permissions, toasterPosition, tooltipDelayDuration, }: TCCEProviderProps): react.JSX.Element;
|
|
2184
2279
|
|
|
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, 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 };
|
|
2280
|
+
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, KNOWN_PERMISSIONS, type KnownPermission, 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, type 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, 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 };
|
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';
|
|
@@ -5138,6 +5138,8 @@ function AbilityProvider({ children, permissions }) {
|
|
|
5138
5138
|
const [permissionSet, setPermissionSet] = useState(
|
|
5139
5139
|
() => new Set(permissions ?? [])
|
|
5140
5140
|
);
|
|
5141
|
+
const [imperativelyResolved, setImperativelyResolved] = useState(false);
|
|
5142
|
+
const status = permissions !== void 0 || imperativelyResolved ? "ready" : "loading";
|
|
5141
5143
|
const can = useCallback(
|
|
5142
5144
|
(perms, mode = "any") => {
|
|
5143
5145
|
const list = Array.isArray(perms) ? perms : [perms];
|
|
@@ -5152,21 +5154,23 @@ function AbilityProvider({ children, permissions }) {
|
|
|
5152
5154
|
);
|
|
5153
5155
|
const setAbilities = useCallback((perms) => {
|
|
5154
5156
|
setPermissionSet(new Set(perms));
|
|
5157
|
+
setImperativelyResolved(true);
|
|
5155
5158
|
}, []);
|
|
5156
5159
|
const clearAbilities = useCallback(() => {
|
|
5157
5160
|
setPermissionSet(/* @__PURE__ */ new Set());
|
|
5161
|
+
setImperativelyResolved(true);
|
|
5158
5162
|
}, []);
|
|
5159
|
-
const
|
|
5163
|
+
const permissionKey = permissions === void 0 ? null : [...permissions].sort().join("|");
|
|
5164
|
+
const syncedKey = useRef(permissionKey);
|
|
5160
5165
|
useEffect(() => {
|
|
5161
|
-
if (
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
syncedKey.current = key;
|
|
5166
|
+
if (permissionKey === null) return;
|
|
5167
|
+
if (permissionKey === syncedKey.current) return;
|
|
5168
|
+
syncedKey.current = permissionKey;
|
|
5165
5169
|
setPermissionSet(new Set(permissions));
|
|
5166
|
-
}, [permissions]);
|
|
5170
|
+
}, [permissionKey, permissions]);
|
|
5167
5171
|
const value = useMemo(
|
|
5168
|
-
() => ({ can, setAbilities, clearAbilities }),
|
|
5169
|
-
[can, setAbilities, clearAbilities]
|
|
5172
|
+
() => ({ can, setAbilities, clearAbilities, status }),
|
|
5173
|
+
[can, setAbilities, clearAbilities, status]
|
|
5170
5174
|
);
|
|
5171
5175
|
return /* @__PURE__ */ jsx(AbilityContext.Provider, { value, children });
|
|
5172
5176
|
}
|
|
@@ -5181,18 +5185,173 @@ function useCan(permissions, mode = "any") {
|
|
|
5181
5185
|
const { can } = useAbility();
|
|
5182
5186
|
return can(permissions, mode);
|
|
5183
5187
|
}
|
|
5184
|
-
function
|
|
5185
|
-
|
|
5186
|
-
|
|
5188
|
+
function useAbilityStatus() {
|
|
5189
|
+
return useAbility().status;
|
|
5190
|
+
}
|
|
5191
|
+
|
|
5192
|
+
// src/components/authorization/permissions.generated.ts
|
|
5193
|
+
var KNOWN_PERMISSIONS = [];
|
|
5194
|
+
|
|
5195
|
+
// src/components/authorization/permission-catalog.ts
|
|
5196
|
+
var CATALOG = new Set(KNOWN_PERMISSIONS);
|
|
5197
|
+
var warned = /* @__PURE__ */ new Set();
|
|
5198
|
+
function warnUnknownPermission(permission) {
|
|
5199
|
+
if (process.env.NODE_ENV === "production") return;
|
|
5200
|
+
if (CATALOG.size === 0) return;
|
|
5201
|
+
const requested = Array.isArray(permission) ? permission : [permission];
|
|
5202
|
+
for (const entry of requested) {
|
|
5203
|
+
if (entry.includes("*")) continue;
|
|
5204
|
+
if (CATALOG.has(entry) || warned.has(entry)) continue;
|
|
5205
|
+
warned.add(entry);
|
|
5206
|
+
console.warn(
|
|
5207
|
+
`[Can] Unknown permission "${entry}". It is not in the generated permission catalog. Check for a typo, or regenerate the catalog with \`pnpm generate-permissions\`.`
|
|
5208
|
+
);
|
|
5209
|
+
}
|
|
5210
|
+
}
|
|
5211
|
+
var FOCUS_TRAVERSAL_KEYS = /* @__PURE__ */ new Set(["Tab", "Escape"]);
|
|
5212
|
+
function blockInteraction(event) {
|
|
5213
|
+
event.preventDefault();
|
|
5214
|
+
event.stopPropagation();
|
|
5215
|
+
}
|
|
5216
|
+
function blockNonTraversalKey(event) {
|
|
5217
|
+
if (!FOCUS_TRAVERSAL_KEYS.has(event.key)) blockInteraction(event);
|
|
5218
|
+
}
|
|
5219
|
+
var warnedRenderPropMisuse = /* @__PURE__ */ new Set();
|
|
5220
|
+
function warnRenderPropVoidsProps(voided) {
|
|
5221
|
+
if (process.env.NODE_ENV === "production") return;
|
|
5222
|
+
if (voided.length === 0) return;
|
|
5223
|
+
const key = voided.join(",");
|
|
5224
|
+
if (warnedRenderPropMisuse.has(key)) return;
|
|
5225
|
+
warnedRenderPropMisuse.add(key);
|
|
5226
|
+
console.warn(
|
|
5227
|
+
`[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.`
|
|
5228
|
+
);
|
|
5229
|
+
}
|
|
5230
|
+
function disableElement(child) {
|
|
5231
|
+
return cloneElement(child, {
|
|
5232
|
+
"aria-disabled": "true",
|
|
5233
|
+
className: cn(child.props.className, "cursor-not-allowed opacity-50"),
|
|
5234
|
+
onClickCapture: blockInteraction,
|
|
5235
|
+
onKeyDownCapture: blockNonTraversalKey,
|
|
5236
|
+
onKeyUpCapture: blockNonTraversalKey,
|
|
5237
|
+
onPointerDownCapture: blockInteraction,
|
|
5238
|
+
onMouseDownCapture: blockInteraction
|
|
5239
|
+
});
|
|
5240
|
+
}
|
|
5241
|
+
function InteractionFirewall({ children }) {
|
|
5242
|
+
return /* @__PURE__ */ jsx(
|
|
5243
|
+
"span",
|
|
5244
|
+
{
|
|
5245
|
+
"data-slot": "can-blocked",
|
|
5246
|
+
className: "contents",
|
|
5247
|
+
onClickCapture: blockInteraction,
|
|
5248
|
+
onPointerDownCapture: blockInteraction,
|
|
5249
|
+
onMouseDownCapture: blockInteraction,
|
|
5250
|
+
onKeyDownCapture: blockNonTraversalKey,
|
|
5251
|
+
onKeyUpCapture: blockNonTraversalKey,
|
|
5252
|
+
children
|
|
5253
|
+
}
|
|
5254
|
+
);
|
|
5255
|
+
}
|
|
5256
|
+
function DisabledSubtree({
|
|
5257
|
+
children,
|
|
5258
|
+
className,
|
|
5259
|
+
...props
|
|
5260
|
+
}) {
|
|
5261
|
+
const { "data-slot": _incomingDataSlot, ...restProps } = props;
|
|
5262
|
+
return /* @__PURE__ */ jsx(
|
|
5263
|
+
"span",
|
|
5264
|
+
{
|
|
5265
|
+
"data-slot": "can-disabled",
|
|
5266
|
+
"aria-disabled": "true",
|
|
5267
|
+
className: cn(
|
|
5268
|
+
"inline-flex cursor-not-allowed opacity-50",
|
|
5269
|
+
"*:pointer-events-none",
|
|
5270
|
+
className
|
|
5271
|
+
),
|
|
5272
|
+
onClickCapture: blockInteraction,
|
|
5273
|
+
onPointerDownCapture: blockInteraction,
|
|
5274
|
+
onMouseDownCapture: blockInteraction,
|
|
5275
|
+
onKeyDownCapture: blockNonTraversalKey,
|
|
5276
|
+
onKeyUpCapture: blockNonTraversalKey,
|
|
5277
|
+
...restProps,
|
|
5278
|
+
children
|
|
5279
|
+
}
|
|
5280
|
+
);
|
|
5281
|
+
}
|
|
5282
|
+
function Can({
|
|
5283
|
+
permission,
|
|
5284
|
+
mode = "any",
|
|
5285
|
+
negate = false,
|
|
5286
|
+
behavior = "hide",
|
|
5287
|
+
reason = null,
|
|
5288
|
+
fallback = null,
|
|
5289
|
+
loading,
|
|
5290
|
+
children
|
|
5291
|
+
}) {
|
|
5292
|
+
warnUnknownPermission(permission);
|
|
5293
|
+
const { can, status } = useAbility();
|
|
5294
|
+
const hasPermission = status === "ready" && can(permission, mode);
|
|
5187
5295
|
const show = negate ? !hasPermission : hasPermission;
|
|
5188
5296
|
if (typeof children === "function") {
|
|
5189
|
-
|
|
5297
|
+
warnRenderPropVoidsProps([
|
|
5298
|
+
...behavior === "disable" ? ["behavior='disable'"] : [],
|
|
5299
|
+
...reason !== null ? ["reason"] : [],
|
|
5300
|
+
...fallback !== null ? ["fallback"] : [],
|
|
5301
|
+
...loading !== void 0 ? ["loading"] : []
|
|
5302
|
+
]);
|
|
5303
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: children({ allowed: show, status }) });
|
|
5190
5304
|
}
|
|
5191
|
-
|
|
5305
|
+
if (status === "loading" && loading !== void 0) {
|
|
5306
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: loading });
|
|
5307
|
+
}
|
|
5308
|
+
if (show) {
|
|
5309
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
5310
|
+
}
|
|
5311
|
+
if (behavior === "disable") {
|
|
5312
|
+
if (isValidElement(children) && children.type !== Fragment) {
|
|
5313
|
+
const disabledChild = disableElement(children);
|
|
5314
|
+
if (reason === null) {
|
|
5315
|
+
return /* @__PURE__ */ jsx(InteractionFirewall, { children: disabledChild });
|
|
5316
|
+
}
|
|
5317
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
5318
|
+
/* @__PURE__ */ jsx(InteractionFirewall, { children: /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: disabledChild }) }),
|
|
5319
|
+
/* @__PURE__ */ jsx(TooltipContent, { children: reason })
|
|
5320
|
+
] });
|
|
5321
|
+
}
|
|
5322
|
+
if (reason === null) {
|
|
5323
|
+
return /* @__PURE__ */ jsx(DisabledSubtree, { children });
|
|
5324
|
+
}
|
|
5325
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
5326
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(DisabledSubtree, { children }) }),
|
|
5327
|
+
/* @__PURE__ */ jsx(TooltipContent, { children: reason })
|
|
5328
|
+
] });
|
|
5329
|
+
}
|
|
5330
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: fallback });
|
|
5192
5331
|
}
|
|
5193
5332
|
Can.displayName = "Can";
|
|
5194
|
-
function CanNot({
|
|
5195
|
-
|
|
5333
|
+
function CanNot({
|
|
5334
|
+
permission,
|
|
5335
|
+
mode = "any",
|
|
5336
|
+
behavior = "hide",
|
|
5337
|
+
reason = null,
|
|
5338
|
+
fallback = null,
|
|
5339
|
+
loading,
|
|
5340
|
+
children
|
|
5341
|
+
}) {
|
|
5342
|
+
return /* @__PURE__ */ jsx(
|
|
5343
|
+
Can,
|
|
5344
|
+
{
|
|
5345
|
+
permission,
|
|
5346
|
+
mode,
|
|
5347
|
+
negate: true,
|
|
5348
|
+
behavior,
|
|
5349
|
+
reason,
|
|
5350
|
+
fallback,
|
|
5351
|
+
loading,
|
|
5352
|
+
children
|
|
5353
|
+
}
|
|
5354
|
+
);
|
|
5196
5355
|
}
|
|
5197
5356
|
CanNot.displayName = "CanNot";
|
|
5198
5357
|
function useMediaQuery(query) {
|
|
@@ -9212,6 +9371,6 @@ function TCCEProvider({
|
|
|
9212
9371
|
return /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: tooltipDelayDuration, children: /* @__PURE__ */ jsx(AbilityProvider, { permissions, children: /* @__PURE__ */ jsx(Toaster, { position: toasterPosition, children }) }) });
|
|
9213
9372
|
}
|
|
9214
9373
|
|
|
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 };
|
|
9374
|
+
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
9375
|
//# sourceMappingURL=main.js.map
|
|
9217
9376
|
//# sourceMappingURL=main.js.map
|