@akira-io/ui 1.0.0 → 1.1.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/README.md +15 -10
- package/dist/blocks.d.ts +162 -9
- package/dist/blocks.js +1410 -36
- package/dist/blocks.js.map +1 -1
- package/dist/button-Bj6My68b.d.ts +17 -0
- package/dist/chunk-2WIIRDHT.js +83 -0
- package/dist/chunk-2WIIRDHT.js.map +1 -0
- package/dist/{chunk-A2SIZOEA.js → chunk-4SOQAVUP.js} +125 -45
- package/dist/chunk-4SOQAVUP.js.map +1 -0
- package/dist/chunk-5AJFQ6C4.js +35 -0
- package/dist/chunk-5AJFQ6C4.js.map +1 -0
- package/dist/chunk-CFDDAFPJ.js +1243 -0
- package/dist/chunk-CFDDAFPJ.js.map +1 -0
- package/dist/chunk-FWQFB37J.js +45 -0
- package/dist/chunk-FWQFB37J.js.map +1 -0
- package/dist/chunk-IQMRJXEO.js +59 -0
- package/dist/chunk-IQMRJXEO.js.map +1 -0
- package/dist/chunk-L2H5GIF7.js +22 -0
- package/dist/chunk-L2H5GIF7.js.map +1 -0
- package/dist/chunk-ODYCBCKS.js +290 -0
- package/dist/chunk-ODYCBCKS.js.map +1 -0
- package/dist/{chunk-5MQWJVM2.js → chunk-QHZWW55M.js} +383 -326
- package/dist/chunk-QHZWW55M.js.map +1 -0
- package/dist/chunk-RPCL7VFQ.js +123 -0
- package/dist/chunk-RPCL7VFQ.js.map +1 -0
- package/dist/chunk-T2INZOCM.js +165 -0
- package/dist/chunk-T2INZOCM.js.map +1 -0
- package/dist/chunk-TGF54WAO.js +29 -0
- package/dist/chunk-TGF54WAO.js.map +1 -0
- package/dist/chunk-XZCC6MTE.js +26 -0
- package/dist/chunk-XZCC6MTE.js.map +1 -0
- package/dist/{chunk-UXL33CZ4.js → chunk-YOVY3KT6.js} +13 -11
- package/dist/chunk-YOVY3KT6.js.map +1 -0
- package/dist/code.d.ts +9 -0
- package/dist/code.js +650 -0
- package/dist/code.js.map +1 -0
- package/dist/context-YWbxMH0C.d.ts +383 -0
- package/dist/editor.d.ts +128 -0
- package/dist/editor.js +450 -0
- package/dist/editor.js.map +1 -0
- package/dist/index.d.ts +298 -222
- package/dist/index.js +1300 -670
- package/dist/index.js.map +1 -1
- package/dist/inertia.d.ts +47 -2
- package/dist/inertia.js +138 -7
- package/dist/inertia.js.map +1 -1
- package/dist/input-Dpi7pXeR.d.ts +6 -0
- package/dist/json-viewer-BARA2RCW.d.ts +51 -0
- package/dist/{language-Bft6rBBt.d.ts → language-Dgjr9bm3.d.ts} +1 -1
- package/dist/locales/pt.d.ts +26 -4
- package/dist/locales/pt.js +127 -1
- package/dist/locales/pt.js.map +1 -1
- package/dist/password-input-DcXX7SG9.d.ts +51 -0
- package/dist/shells.d.ts +45 -7
- package/dist/shells.js +96 -60
- package/dist/shells.js.map +1 -1
- package/dist/sidebar-DqkFRUxQ.d.ts +81 -0
- package/dist/types-B-eGPoFD.d.ts +111 -0
- package/dist/types-cmBL8zOc.d.ts +51 -0
- package/package.json +170 -130
- package/theme.css +20 -0
- package/themes/nosferry.css +4 -0
- package/dist/chunk-42BJBH56.js +0 -786
- package/dist/chunk-42BJBH56.js.map +0 -1
- package/dist/chunk-5MQWJVM2.js.map +0 -1
- package/dist/chunk-A2SIZOEA.js.map +0 -1
- package/dist/chunk-POE7OYET.js +0 -96
- package/dist/chunk-POE7OYET.js.map +0 -1
- package/dist/chunk-UXL33CZ4.js.map +0 -1
- package/dist/date-range-filter-QEa8fhUM.d.ts +0 -149
- package/dist/sidebar-BDhG9SUU.d.ts +0 -88
- package/dist/types-Cno1_Ijx.d.ts +0 -40
- package/dist/types-cOieac8G.d.ts +0 -77
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { Column, ColumnDef, Row } from '@tanstack/react-table';
|
|
4
|
-
import { I as IconComponent } from './types-Cno1_Ijx.js';
|
|
5
|
-
|
|
6
|
-
interface ComboboxOption {
|
|
7
|
-
value: string;
|
|
8
|
-
label: string;
|
|
9
|
-
}
|
|
10
|
-
interface ComboboxLabels {
|
|
11
|
-
placeholder: string;
|
|
12
|
-
searchPlaceholder: string;
|
|
13
|
-
emptyText: string;
|
|
14
|
-
}
|
|
15
|
-
interface ComboboxProps {
|
|
16
|
-
id?: string;
|
|
17
|
-
value: string;
|
|
18
|
-
options: ComboboxOption[];
|
|
19
|
-
onChange: (value: string) => void;
|
|
20
|
-
placeholder?: ComboboxLabels['placeholder'];
|
|
21
|
-
searchPlaceholder?: ComboboxLabels['searchPlaceholder'];
|
|
22
|
-
emptyText?: ComboboxLabels['emptyText'];
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
invalid?: boolean;
|
|
25
|
-
}
|
|
26
|
-
declare function Combobox({ id, value, options, onChange, placeholder, searchPlaceholder, emptyText, disabled, invalid, }: ComboboxProps): React.JSX.Element;
|
|
27
|
-
|
|
28
|
-
interface ConfirmDialogLabels {
|
|
29
|
-
title: string;
|
|
30
|
-
description: string;
|
|
31
|
-
confirmText: string;
|
|
32
|
-
cancelText: string;
|
|
33
|
-
}
|
|
34
|
-
interface ConfirmDialogProps {
|
|
35
|
-
open: boolean;
|
|
36
|
-
onOpenChange: (open: boolean) => void;
|
|
37
|
-
title?: ConfirmDialogLabels['title'];
|
|
38
|
-
description?: ConfirmDialogLabels['description'] | ReactNode;
|
|
39
|
-
confirmText?: ConfirmDialogLabels['confirmText'];
|
|
40
|
-
cancelText?: ConfirmDialogLabels['cancelText'];
|
|
41
|
-
variant?: 'destructive' | 'default';
|
|
42
|
-
processing?: boolean;
|
|
43
|
-
onConfirm: () => void;
|
|
44
|
-
onCancel?: () => void;
|
|
45
|
-
}
|
|
46
|
-
declare function ConfirmDialog({ open, onOpenChange, title, description, confirmText, cancelText, variant, processing, onConfirm, onCancel, }: ConfirmDialogProps): React.JSX.Element;
|
|
47
|
-
|
|
48
|
-
interface DataTableFilter {
|
|
49
|
-
columnId: string;
|
|
50
|
-
label: string;
|
|
51
|
-
options: {
|
|
52
|
-
label: string;
|
|
53
|
-
value: string;
|
|
54
|
-
}[];
|
|
55
|
-
}
|
|
56
|
-
interface DataTableServerFilter {
|
|
57
|
-
paramKey: string;
|
|
58
|
-
label: string;
|
|
59
|
-
options: {
|
|
60
|
-
label: string;
|
|
61
|
-
value: string;
|
|
62
|
-
}[];
|
|
63
|
-
}
|
|
64
|
-
interface DataTableFacetedFilterLabels {
|
|
65
|
-
noOptionsLabel: string;
|
|
66
|
-
}
|
|
67
|
-
declare function FacetedFilter<TData>({ column, filter, noOptionsLabel, }: {
|
|
68
|
-
column?: Column<TData, unknown>;
|
|
69
|
-
filter: DataTableFilter;
|
|
70
|
-
noOptionsLabel?: DataTableFacetedFilterLabels['noOptionsLabel'];
|
|
71
|
-
}): React.JSX.Element;
|
|
72
|
-
declare function ServerFacetedFilter({ filter, selected, onChange, noOptionsLabel, }: {
|
|
73
|
-
filter: DataTableServerFilter;
|
|
74
|
-
selected: string[];
|
|
75
|
-
onChange: (values: string[]) => void;
|
|
76
|
-
noOptionsLabel?: DataTableFacetedFilterLabels['noOptionsLabel'];
|
|
77
|
-
}): React.JSX.Element;
|
|
78
|
-
|
|
79
|
-
interface DataTableRowAction<TData> {
|
|
80
|
-
label: string;
|
|
81
|
-
icon?: IconComponent;
|
|
82
|
-
variant?: 'default' | 'destructive';
|
|
83
|
-
onClick: (row: TData) => void;
|
|
84
|
-
}
|
|
85
|
-
declare function RowActionsMenu<TData>({ row, actions, }: {
|
|
86
|
-
row: TData;
|
|
87
|
-
actions: DataTableRowAction<TData>[];
|
|
88
|
-
}): React.JSX.Element;
|
|
89
|
-
|
|
90
|
-
interface DataTableLabels {
|
|
91
|
-
searchPlaceholder: string;
|
|
92
|
-
emptyLabel: string;
|
|
93
|
-
createLabel: string;
|
|
94
|
-
clearFiltersLabel: string;
|
|
95
|
-
paginationLabel: (page: number, pages: number) => string;
|
|
96
|
-
noOptionsLabel: string;
|
|
97
|
-
totalLabel: (total: number) => string;
|
|
98
|
-
}
|
|
99
|
-
interface DataTableProps<TData, TValue> {
|
|
100
|
-
columns: ColumnDef<TData, TValue>[];
|
|
101
|
-
data: TData[];
|
|
102
|
-
searchPlaceholder?: DataTableLabels['searchPlaceholder'];
|
|
103
|
-
emptyLabel?: DataTableLabels['emptyLabel'];
|
|
104
|
-
createLabel?: DataTableLabels['createLabel'];
|
|
105
|
-
clearFiltersLabel?: DataTableLabels['clearFiltersLabel'];
|
|
106
|
-
paginationLabel?: DataTableLabels['paginationLabel'];
|
|
107
|
-
noOptionsLabel?: DataTableLabels['noOptionsLabel'];
|
|
108
|
-
totalLabel?: DataTableLabels['totalLabel'];
|
|
109
|
-
searchKey?: string;
|
|
110
|
-
pageSize?: number;
|
|
111
|
-
pageSizeOptions?: number[];
|
|
112
|
-
onPageSizeChange?: (size: number) => void;
|
|
113
|
-
filters?: DataTableFilter[];
|
|
114
|
-
serverFilters?: DataTableServerFilter[];
|
|
115
|
-
filterValues?: Record<string, string[]>;
|
|
116
|
-
onFilterChange?: (paramKey: string, values: string[]) => void;
|
|
117
|
-
canClearFilters?: boolean;
|
|
118
|
-
onClearFilters?: () => void;
|
|
119
|
-
toolbarExtra?: ReactNode;
|
|
120
|
-
toolbarAction?: ReactNode;
|
|
121
|
-
renderRow?: (row: Row<TData>) => ReactNode;
|
|
122
|
-
onRowClick?: (row: TData) => void;
|
|
123
|
-
isRowActive?: (row: TData) => boolean;
|
|
124
|
-
rowActions?: DataTableRowAction<TData>[];
|
|
125
|
-
searchValue?: string;
|
|
126
|
-
onSearchChange?: (value: string) => void;
|
|
127
|
-
manualPagination?: boolean;
|
|
128
|
-
pageCount?: number;
|
|
129
|
-
pageIndex?: number;
|
|
130
|
-
total?: number;
|
|
131
|
-
onPageChange?: (pageIndex: number) => void;
|
|
132
|
-
onCreate?: () => void;
|
|
133
|
-
}
|
|
134
|
-
declare function DataTable<TData, TValue>({ columns, data, searchKey, searchPlaceholder, pageSize, pageSizeOptions, onPageSizeChange, filters, serverFilters, filterValues, onFilterChange, canClearFilters, onClearFilters, toolbarExtra, toolbarAction, emptyLabel, clearFiltersLabel, paginationLabel, noOptionsLabel, totalLabel, renderRow, onRowClick, isRowActive, rowActions, searchValue, onSearchChange, manualPagination, pageCount, pageIndex, total, onPageChange, onCreate, createLabel, }: DataTableProps<TData, TValue>): React.JSX.Element;
|
|
135
|
-
|
|
136
|
-
interface DateRangeFilterLabels {
|
|
137
|
-
emptyLabel: string;
|
|
138
|
-
dateFormat: string;
|
|
139
|
-
}
|
|
140
|
-
declare function DateRangeFilter({ from, to, onChange, emptyLabel, dateFormat, }: {
|
|
141
|
-
from?: string;
|
|
142
|
-
to?: string;
|
|
143
|
-
onChange: (range: {
|
|
144
|
-
from?: string;
|
|
145
|
-
to?: string;
|
|
146
|
-
}) => void;
|
|
147
|
-
} & Partial<DateRangeFilterLabels>): React.JSX.Element;
|
|
148
|
-
|
|
149
|
-
export { Combobox as C, DataTable as D, FacetedFilter as F, RowActionsMenu as R, ServerFacetedFilter as S, type ComboboxLabels as a, type ComboboxOption as b, ConfirmDialog as c, type ConfirmDialogLabels as d, type DataTableFacetedFilterLabels as e, type DataTableFilter as f, type DataTableLabels as g, type DataTableRowAction as h, type DataTableServerFilter as i, DateRangeFilter as j, type DateRangeFilterLabels as k };
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
5
|
-
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
6
|
-
|
|
7
|
-
declare const buttonVariants: (props?: ({
|
|
8
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
9
|
-
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
10
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
-
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
12
|
-
asChild?: boolean;
|
|
13
|
-
}): React.JSX.Element;
|
|
14
|
-
|
|
15
|
-
declare function Input({ className, type, ...props }: React.ComponentProps<'input'>): React.JSX.Element;
|
|
16
|
-
|
|
17
|
-
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): React.JSX.Element;
|
|
18
|
-
|
|
19
|
-
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
|
|
20
|
-
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element;
|
|
21
|
-
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element;
|
|
22
|
-
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): React.JSX.Element;
|
|
23
|
-
|
|
24
|
-
type SidebarContext = {
|
|
25
|
-
state: 'expanded' | 'collapsed';
|
|
26
|
-
open: boolean;
|
|
27
|
-
setOpen: (open: boolean) => void;
|
|
28
|
-
openMobile: boolean;
|
|
29
|
-
setOpenMobile: (open: boolean) => void;
|
|
30
|
-
isMobile: boolean;
|
|
31
|
-
toggleSidebar: () => void;
|
|
32
|
-
};
|
|
33
|
-
declare const SidebarContext: React.Context<SidebarContext | null>;
|
|
34
|
-
declare function useSidebar(): SidebarContext;
|
|
35
|
-
declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<'div'> & {
|
|
36
|
-
defaultOpen?: boolean;
|
|
37
|
-
open?: boolean;
|
|
38
|
-
onOpenChange?: (open: boolean) => void;
|
|
39
|
-
}): React.JSX.Element;
|
|
40
|
-
declare function Sidebar({ side, variant, collapsible, className, children, ...props }: React.ComponentProps<'div'> & {
|
|
41
|
-
side?: 'left' | 'right';
|
|
42
|
-
variant?: 'sidebar' | 'floating' | 'inset';
|
|
43
|
-
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
44
|
-
}): React.JSX.Element;
|
|
45
|
-
declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
46
|
-
declare function SidebarRail({ className, ...props }: React.ComponentProps<'button'>): React.JSX.Element;
|
|
47
|
-
declare function SidebarInset({ className, ...props }: React.ComponentProps<'main'>): React.JSX.Element;
|
|
48
|
-
declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): React.JSX.Element;
|
|
49
|
-
declare function SidebarHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
50
|
-
declare function SidebarFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
51
|
-
declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
|
|
52
|
-
declare function SidebarContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
53
|
-
declare function SidebarGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
54
|
-
declare function SidebarGroupLabel({ className, asChild, ...props }: React.ComponentProps<'div'> & {
|
|
55
|
-
asChild?: boolean;
|
|
56
|
-
}): React.JSX.Element;
|
|
57
|
-
declare function SidebarGroupAction({ className, asChild, ...props }: React.ComponentProps<'button'> & {
|
|
58
|
-
asChild?: boolean;
|
|
59
|
-
}): React.JSX.Element;
|
|
60
|
-
declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
61
|
-
declare function SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>): React.JSX.Element;
|
|
62
|
-
declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
63
|
-
declare const sidebarMenuButtonVariants: (props?: ({
|
|
64
|
-
variant?: "default" | "outline" | null | undefined;
|
|
65
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
66
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
67
|
-
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<'button'> & {
|
|
68
|
-
asChild?: boolean;
|
|
69
|
-
isActive?: boolean;
|
|
70
|
-
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
71
|
-
} & VariantProps<typeof sidebarMenuButtonVariants>): React.JSX.Element;
|
|
72
|
-
declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: React.ComponentProps<'button'> & {
|
|
73
|
-
asChild?: boolean;
|
|
74
|
-
showOnHover?: boolean;
|
|
75
|
-
}): React.JSX.Element;
|
|
76
|
-
declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
77
|
-
declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<'div'> & {
|
|
78
|
-
showIcon?: boolean;
|
|
79
|
-
}): React.JSX.Element;
|
|
80
|
-
declare function SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>): React.JSX.Element;
|
|
81
|
-
declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
82
|
-
declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...props }: React.ComponentProps<'a'> & {
|
|
83
|
-
asChild?: boolean;
|
|
84
|
-
size?: 'sm' | 'md';
|
|
85
|
-
isActive?: boolean;
|
|
86
|
-
}): React.JSX.Element;
|
|
87
|
-
|
|
88
|
-
export { buttonVariants as A, Button as B, useSidebar as C, Input as I, Separator as S, Tooltip as T, Sidebar as a, SidebarContent as b, SidebarFooter as c, SidebarGroup as d, SidebarGroupAction as e, SidebarGroupContent as f, SidebarGroupLabel as g, SidebarHeader as h, SidebarInput as i, SidebarInset as j, SidebarMenu as k, SidebarMenuAction as l, SidebarMenuBadge as m, SidebarMenuButton as n, SidebarMenuItem as o, SidebarMenuSkeleton as p, SidebarMenuSub as q, SidebarMenuSubButton as r, SidebarMenuSubItem as s, SidebarProvider as t, SidebarRail as u, SidebarSeparator as v, SidebarTrigger as w, TooltipContent as x, TooltipProvider as y, TooltipTrigger as z };
|
package/dist/types-Cno1_Ijx.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ComponentType, ReactNode, MouseEvent } from 'react';
|
|
2
|
-
|
|
3
|
-
type UrlLike = string | {
|
|
4
|
-
url: string;
|
|
5
|
-
method?: string;
|
|
6
|
-
};
|
|
7
|
-
type IconComponent = ComponentType<{
|
|
8
|
-
className?: string;
|
|
9
|
-
}>;
|
|
10
|
-
interface NavItem {
|
|
11
|
-
title: string;
|
|
12
|
-
href: UrlLike;
|
|
13
|
-
icon?: IconComponent | null;
|
|
14
|
-
isActive?: boolean;
|
|
15
|
-
}
|
|
16
|
-
interface BreadcrumbItem {
|
|
17
|
-
title: string;
|
|
18
|
-
href: UrlLike;
|
|
19
|
-
}
|
|
20
|
-
interface NavGroup {
|
|
21
|
-
label?: string;
|
|
22
|
-
items: NavItem[];
|
|
23
|
-
}
|
|
24
|
-
interface SharedUser {
|
|
25
|
-
name: string;
|
|
26
|
-
email: string;
|
|
27
|
-
avatar?: string;
|
|
28
|
-
}
|
|
29
|
-
interface LinkProps {
|
|
30
|
-
href: UrlLike;
|
|
31
|
-
children?: ReactNode;
|
|
32
|
-
className?: string;
|
|
33
|
-
prefetch?: boolean;
|
|
34
|
-
as?: string;
|
|
35
|
-
onClick?: (event: MouseEvent) => void;
|
|
36
|
-
[key: string]: unknown;
|
|
37
|
-
}
|
|
38
|
-
type LinkComponent = ComponentType<LinkProps>;
|
|
39
|
-
|
|
40
|
-
export type { BreadcrumbItem as B, IconComponent as I, LinkComponent as L, NavGroup as N, SharedUser as S, UrlLike as U, NavItem as a, LinkProps as b };
|
package/dist/types-cOieac8G.d.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { LucideIcon } from 'lucide-react';
|
|
4
|
-
|
|
5
|
-
interface CommandPaletteItem {
|
|
6
|
-
id: string;
|
|
7
|
-
label: string;
|
|
8
|
-
icon?: LucideIcon;
|
|
9
|
-
value?: string;
|
|
10
|
-
hint?: string;
|
|
11
|
-
}
|
|
12
|
-
interface CommandPaletteGroup {
|
|
13
|
-
heading: string;
|
|
14
|
-
items: CommandPaletteItem[];
|
|
15
|
-
}
|
|
16
|
-
interface CommandPaletteLabels {
|
|
17
|
-
placeholder: string;
|
|
18
|
-
noResultsLabel: string;
|
|
19
|
-
}
|
|
20
|
-
interface CommandPaletteProps {
|
|
21
|
-
open: boolean;
|
|
22
|
-
onOpenChange: (open: boolean) => void;
|
|
23
|
-
groups: CommandPaletteGroup[];
|
|
24
|
-
onSelect: (item: CommandPaletteItem) => void;
|
|
25
|
-
query?: string;
|
|
26
|
-
onQueryChange?: (query: string) => void;
|
|
27
|
-
placeholder?: CommandPaletteLabels['placeholder'];
|
|
28
|
-
noResultsLabel?: CommandPaletteLabels['noResultsLabel'];
|
|
29
|
-
emptyState?: ReactNode;
|
|
30
|
-
className?: string;
|
|
31
|
-
}
|
|
32
|
-
declare function CommandPalette({ open, onOpenChange, groups, onSelect, query, onQueryChange, placeholder, noResultsLabel, emptyState, className, }: CommandPaletteProps): React.JSX.Element;
|
|
33
|
-
declare function useCommandPalette(initialOpen?: boolean): {
|
|
34
|
-
open: boolean;
|
|
35
|
-
setOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
36
|
-
toggle: () => void;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
type DateFilterMode = 'all' | 'preset' | 'fixed' | 'relative';
|
|
40
|
-
type DateFilterOperator = 'between' | 'before' | 'on' | 'after';
|
|
41
|
-
type DateFilterUnit = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
42
|
-
interface DateFilterValue {
|
|
43
|
-
mode: DateFilterMode;
|
|
44
|
-
preset?: string;
|
|
45
|
-
operator?: DateFilterOperator;
|
|
46
|
-
start?: string;
|
|
47
|
-
end?: string;
|
|
48
|
-
unit?: DateFilterUnit;
|
|
49
|
-
amount?: number;
|
|
50
|
-
include_current?: boolean;
|
|
51
|
-
offset_amount?: number;
|
|
52
|
-
offset_unit?: DateFilterUnit;
|
|
53
|
-
}
|
|
54
|
-
interface DateFilterOption {
|
|
55
|
-
value: string;
|
|
56
|
-
label: string;
|
|
57
|
-
}
|
|
58
|
-
interface DateFilterLabels {
|
|
59
|
-
all: string;
|
|
60
|
-
fixed: string;
|
|
61
|
-
relative: string;
|
|
62
|
-
relativeTitle: string;
|
|
63
|
-
apply: string;
|
|
64
|
-
back: string;
|
|
65
|
-
latest: string;
|
|
66
|
-
ago: string;
|
|
67
|
-
includeCurrent: string;
|
|
68
|
-
startingAgo: string;
|
|
69
|
-
removeOffset: string;
|
|
70
|
-
fallback: string;
|
|
71
|
-
}
|
|
72
|
-
declare const DEFAULT_PRESETS: DateFilterOption[];
|
|
73
|
-
declare const DEFAULT_OPERATORS: DateFilterOption[];
|
|
74
|
-
declare const DEFAULT_UNITS: DateFilterOption[];
|
|
75
|
-
declare const DEFAULT_LABELS: DateFilterLabels;
|
|
76
|
-
|
|
77
|
-
export { CommandPalette as C, type DateFilterValue as D, type DateFilterLabels as a, type DateFilterOption as b, type DateFilterUnit as c, type CommandPaletteGroup as d, type CommandPaletteItem as e, type CommandPaletteProps as f, DEFAULT_LABELS as g, DEFAULT_OPERATORS as h, DEFAULT_PRESETS as i, DEFAULT_UNITS as j, type DateFilterMode as k, type DateFilterOperator as l, type CommandPaletteLabels as m, useCommandPalette as u };
|