@arkcit/react-ui 0.3.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/ui.d.ts ADDED
@@ -0,0 +1,119 @@
1
+ import { c3 as GameAPI, bS as TreeItem } from './ComponentGuidelines-h1MjGBuJ.js';
2
+ export { A as Accordion, a as AlertBanner, b as Avatar, B as Badge, c as BarGraph, d as BarGraphProps, e as Breadcrumb, f as BreadcrumbItem, g as BreadcrumbProps, h as Button, i as ButtonIntent, j as ButtonProps, k as ButtonSize, l as ButtonVariant, C as Carousel, m as Checkbox, n as Code, o as CodeExample, p as CodeExampleProps, q as Combobox, r as ComboboxOption, s as ComboboxProps, t as CommandItem, u as CommandPalette, v as CommandPaletteProps, w as ComponentGuidelines, x as ComponentGuidelinesProps, y as Container, z as ContextMenu, D as ContextMenuItem, E as ContextMenuProps, F as Cover, G as CoverAlign, H as CoverAs, I as CoverProps, J as CoverSize, K as CoverSurface, L as CoverTextVariant, M as CoverVariant, P as DataGrid, Q as DataGridColumn, R as DataGridProps, S as DataGridSortDirection, T as DataGridSortState, U as DateRange, V as DateRangeField, W as DateRangeFieldProps, X as DateRangeFieldUi, Y as DateRangePicker, Z as DateRangePickerCalendar, _ as DateRangePickerConstraints, $ as DateRangePickerOverlay, a0 as DateRangePickerProps, a1 as DecodeTranslation, a2 as Divider, a3 as Drawer, a4 as DrawerProps, a5 as EmbeddedVideo, a7 as EmptyState, a8 as ExpandablePanel, a9 as FileUpload, aa as FileUploadProps, ab as FileUploadRejectReason, ac as FilterBar, ad as Form, ae as FormField, af as FormWizard, ag as FormWizardBehavior, ah as FormWizardFormConfig, ai as FormWizardI18n, aj as FormWizardLabels, ak as FormWizardLayout, al as FormWizardProps, am as FormWizardState, an as FormWizardStateConfig, ao as FormWizardStudioProps, ap as GameCanvas2D, aq as Graph, ar as GraphAxisConfig, as as GraphDatum, at as GraphIntent, au as GraphProps, av as GraphSeries, aw as Grid, ax as GridAlign, ay as GridAutoRows, az as GridCols, aA as GridGap, aB as GridItem, aC as GridItemProps, aD as GridJustify, aE as GridProps, aF as GridResponsive, aG as H1, aH as H2, aI as H3, aJ as InfiniteList, aK as InfiniteListProps, aL as Input, aM as Kbd, aN as KbdProps, aO as KbdSize, aP as KbdVariant, aQ as Lead, aR as LineGraph, aS as LineGraphProps, aT as Link, aU as LinkIntent, aV as LinkProps, aW as LinkSize, aX as LinkTone, aY as LinkUnderline, aZ as LinkVariant, a_ as MapCard, b0 as Muted, b1 as Pagination, b2 as Popin, b3 as PopinMaxSize, b4 as PopinProps, b5 as Portal, b6 as PortalProps, b7 as Product, b8 as Progress, b9 as Radio, ba as RadioField, bb as RadioFieldProps, bc as RadioGroup, bd as RadioGroupProps, be as RadioOption, bf as RadioProps, bg as ScrollReveal, bh as ScrollRevealProps, bi as Select, bj as Skeleton, bk as Slider, bl as SliderIntent, bm as SliderProps, bn as SliderSize, bo as Step, bp as StepForm, bq as StepFormAlign, br as StepFormFormProps, bs as StepFormProps, bt as StepFormSize, bu as StepFormStudioProps, bv as StepFormVariant, bw as Stepper, bx as StepperProps, by as Switch, bz as Table, bA as Tabs, bB as Tag, bC as TagIntent, bD as TagProps, bE as TagSize, bF as TagVariant, bG as Text, bH as Textarea, bI as Toast, bJ as ToastContainer, bK as Tooltip, bL as TooltipProps, bM as Tree, bN as TreeAppearanceConfig, bO as TreeBehaviorConfig, bP as TreeCheckedConfig, bQ as TreeExpandedConfig, bR as TreeId, bT as TreeProps, bU as TreeSelectionConfig, bV as Typography, bW as TypographyLeading, bX as TypographyProps, bY as TypographySize, bZ as TypographyTone, b_ as TypographyTracking, b$ as TypographyVariant, c0 as TypographyWeight, c1 as WizardStepBase, c2 as WizardStepId } from './ComponentGuidelines-h1MjGBuJ.js';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import React__default, { HTMLAttributes, ReactNode, ReactElement } from 'react';
5
+ export { a as ComboboxFieldProps, b as FileUploadFieldProps, c as SliderFieldProps } from './FileUploadField-DLwEPn_A.js';
6
+ export { A as ApiDocLayout, a as ApiDocLayoutProps, b as ApiPropDoc } from './ApiDocLayout-6hYQvst0.js';
7
+ import '@arkcit/engine/form';
8
+ import 'lucide-react';
9
+
10
+ interface RPGViewportRenderSize {
11
+ width: number;
12
+ height: number;
13
+ }
14
+ interface RPGViewportProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
15
+ height?: number;
16
+ minWidth?: number;
17
+ children: (size: RPGViewportRenderSize) => ReactNode;
18
+ }
19
+ declare const RPGViewport: ({ height, minWidth, children, className, ...props }: RPGViewportProps) => react_jsx_runtime.JSX.Element;
20
+
21
+ type RPGAssetMap = Record<string, string>;
22
+ type LoadedRPGAssets<T extends RPGAssetMap> = {
23
+ [K in keyof T]: HTMLImageElement | null;
24
+ };
25
+ declare const useRPGAssets: <T extends RPGAssetMap>(sources: T) => LoadedRPGAssets<T>;
26
+
27
+ interface RPGControlState {
28
+ moveLeft: boolean;
29
+ moveRight: boolean;
30
+ action: boolean;
31
+ }
32
+ interface ResolveRPGControlsOptions {
33
+ leftKeys?: string[];
34
+ rightKeys?: string[];
35
+ actionKeys?: string[];
36
+ pointerLeftZone?: number;
37
+ pointerRightZone?: number;
38
+ }
39
+ declare const resolveRPGControls: (api: GameAPI, { leftKeys, rightKeys, actionKeys, pointerLeftZone, pointerRightZone, }?: ResolveRPGControlsOptions) => RPGControlState;
40
+
41
+ interface DropdownProps {
42
+ title: ReactNode;
43
+ menu?: ReadonlyArray<ReactElement | null | undefined>;
44
+ children?: ReactNode;
45
+ isBurger?: boolean;
46
+ open?: boolean;
47
+ onOpenChange?: (open: boolean) => void;
48
+ }
49
+ declare const Dropdown: ({ title, menu, children, isBurger, open, onOpenChange, }: DropdownProps) => react_jsx_runtime.JSX.Element;
50
+
51
+ declare const cx: (...classes: Array<string | false | null | undefined>) => string;
52
+
53
+ declare const LOADER_COMPONENTS: {
54
+ readonly spinner: () => react_jsx_runtime.JSX.Element;
55
+ readonly dots: () => react_jsx_runtime.JSX.Element;
56
+ readonly ring: () => react_jsx_runtime.JSX.Element;
57
+ };
58
+
59
+ declare const LoaderSpinner: () => react_jsx_runtime.JSX.Element;
60
+
61
+ declare const LoaderDots: () => react_jsx_runtime.JSX.Element;
62
+
63
+ declare const LoaderRing: () => react_jsx_runtime.JSX.Element;
64
+
65
+ interface CardProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, "children" | "onClick"> {
66
+ children: React__default.ReactNode;
67
+ className?: string;
68
+ onClick?: () => void;
69
+ disabled?: boolean;
70
+ }
71
+ interface CardSectionProps extends React__default.HTMLAttributes<HTMLDivElement> {
72
+ className?: string;
73
+ }
74
+
75
+ declare const CardContent: ({ className, children, ...props }: CardSectionProps) => react_jsx_runtime.JSX.Element;
76
+
77
+ declare const CardFooter: ({ className, children, ...props }: CardSectionProps) => react_jsx_runtime.JSX.Element;
78
+
79
+ declare const CardHeader: ({ className, children, ...props }: CardSectionProps) => react_jsx_runtime.JSX.Element;
80
+
81
+ type CardComponent = ((props: CardProps) => React__default.ReactElement) & {
82
+ Header: typeof CardHeader;
83
+ Content: typeof CardContent;
84
+ Footer: typeof CardFooter;
85
+ };
86
+ declare const Card: CardComponent;
87
+
88
+ interface UseInfiniteScrollOptions {
89
+ hasNextPage: boolean;
90
+ isFetching: boolean;
91
+ onLoadMore: () => void;
92
+ disabled?: boolean;
93
+ rootMargin?: string;
94
+ threshold?: number;
95
+ once?: boolean;
96
+ root?: Element | null;
97
+ }
98
+ interface UseInfiniteScrollResult {
99
+ sentinelRef: React.RefObject<HTMLDivElement | null>;
100
+ isIntersecting: boolean;
101
+ }
102
+ declare const useInfiniteScroll: ({ hasNextPage, isFetching, onLoadMore, disabled, rootMargin, threshold, once, root, }: UseInfiniteScrollOptions) => UseInfiniteScrollResult;
103
+
104
+ declare function useEventListener<K extends keyof WindowEventMap>(event: K, handler: (event: WindowEventMap[K]) => void, options?: AddEventListenerOptions): void;
105
+
106
+ declare function useOnClickOutside<T extends HTMLElement>(ref: React.RefObject<T | null>, handler: (event: MouseEvent | TouchEvent) => void): void;
107
+
108
+ type VisibleTreeNode = {
109
+ id: string;
110
+ item: TreeItem;
111
+ level: number;
112
+ parentId: string | null;
113
+ hasChildren: boolean;
114
+ };
115
+ declare const collectDefaultExpandedIds: (items: TreeItem[]) => string[];
116
+ declare const flattenVisibleTree: (items: TreeItem[], expandedSet: Set<string>) => VisibleTreeNode[];
117
+ declare const buildTreeItemMap: (items: TreeItem[]) => Map<string, TreeItem>;
118
+
119
+ export { Card, CardContent, CardFooter, CardHeader, Dropdown, type DropdownProps, LOADER_COMPONENTS, LoaderDots, LoaderRing, LoaderSpinner, type RPGControlState, RPGViewport, type RPGViewportProps, type RPGViewportRenderSize, type ResolveRPGControlsOptions, TreeItem, type UseInfiniteScrollOptions, type UseInfiniteScrollResult, buildTreeItemMap, collectDefaultExpandedIds, cx, flattenVisibleTree, resolveRPGControls, useEventListener, useInfiniteScroll, useOnClickOutside, useRPGAssets };