@unifiedsoftware/react-ui 2.0.1-beta.1 → 2.0.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +169 -13
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -525,6 +525,26 @@ declare function useFormat(options: FormatOptions): {
|
|
|
525
525
|
getValue: (value: any) => string | undefined;
|
|
526
526
|
};
|
|
527
527
|
|
|
528
|
+
type TimerMode = 'up' | 'down';
|
|
529
|
+
interface UseTimerOptions {
|
|
530
|
+
mode: TimerMode;
|
|
531
|
+
initialSeconds: number;
|
|
532
|
+
maxSeconds?: number;
|
|
533
|
+
onTick?: (seconds: number) => void;
|
|
534
|
+
onComplete?: () => void;
|
|
535
|
+
}
|
|
536
|
+
declare const useTimer: ({ mode, initialSeconds, maxSeconds, onTick, onComplete }: UseTimerOptions) => {
|
|
537
|
+
seconds: number;
|
|
538
|
+
formattedTime: string;
|
|
539
|
+
isRunning: boolean;
|
|
540
|
+
isCompleted: boolean;
|
|
541
|
+
start: () => void;
|
|
542
|
+
pause: () => void;
|
|
543
|
+
reset: (newSeconds?: number) => void;
|
|
544
|
+
stop: () => void;
|
|
545
|
+
};
|
|
546
|
+
type Timer = ReturnType<typeof useTimer>;
|
|
547
|
+
|
|
528
548
|
type ColorScheme = 'default' | 'light' | 'dark';
|
|
529
549
|
|
|
530
550
|
type MediaQuery = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
@@ -2035,27 +2055,163 @@ interface UploadFileProps {
|
|
|
2035
2055
|
}
|
|
2036
2056
|
declare const UploadFiles: ({ data, max, readOnly, disabled, accept, multiple, onChange }: UploadFileProps) => react_jsx_runtime.JSX.Element;
|
|
2037
2057
|
|
|
2038
|
-
type
|
|
2058
|
+
type Optional<T, K extends keyof T> = Partial<Pick<T, K>> & Omit<T, K>;
|
|
2059
|
+
type Rect = {
|
|
2060
|
+
x: number;
|
|
2061
|
+
y: number;
|
|
2062
|
+
width: number;
|
|
2063
|
+
height: number;
|
|
2064
|
+
};
|
|
2065
|
+
type Cursor = {
|
|
2066
|
+
x: number;
|
|
2067
|
+
y: number;
|
|
2068
|
+
};
|
|
2069
|
+
type LayoutMeta = {
|
|
2070
|
+
id: string;
|
|
2071
|
+
x: number;
|
|
2072
|
+
y: number;
|
|
2073
|
+
width: number;
|
|
2074
|
+
height: number;
|
|
2075
|
+
};
|
|
2076
|
+
type LayoutPositon = {
|
|
2077
|
+
width: number;
|
|
2078
|
+
height: number;
|
|
2079
|
+
id: string;
|
|
2080
|
+
x: number;
|
|
2081
|
+
y: number;
|
|
2082
|
+
isEmpty: boolean;
|
|
2083
|
+
isVertical: boolean;
|
|
2084
|
+
windows: PanelMeta[];
|
|
2085
|
+
gridX: number;
|
|
2086
|
+
gridY: number;
|
|
2087
|
+
gridW: number;
|
|
2088
|
+
gridH: number;
|
|
2089
|
+
fullDimensions: {
|
|
2090
|
+
x: number;
|
|
2091
|
+
y: number;
|
|
2092
|
+
width: number;
|
|
2093
|
+
height: number;
|
|
2094
|
+
};
|
|
2095
|
+
emptyDimensions: {
|
|
2096
|
+
x: any;
|
|
2097
|
+
y: any;
|
|
2098
|
+
width: any;
|
|
2099
|
+
height: any;
|
|
2100
|
+
};
|
|
2101
|
+
};
|
|
2102
|
+
type PanelMeta = {
|
|
2039
2103
|
id: string;
|
|
2040
2104
|
title: string;
|
|
2041
|
-
|
|
2105
|
+
render?: react__default.ReactNode;
|
|
2042
2106
|
x?: number;
|
|
2043
2107
|
y?: number;
|
|
2044
2108
|
width?: number;
|
|
2045
2109
|
height?: number;
|
|
2046
2110
|
minimized?: boolean;
|
|
2047
2111
|
maximized?: boolean;
|
|
2112
|
+
snapped?: boolean;
|
|
2048
2113
|
closed?: boolean;
|
|
2114
|
+
zIndex?: number;
|
|
2115
|
+
layoutId?: string;
|
|
2116
|
+
closable?: boolean;
|
|
2049
2117
|
};
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2118
|
+
declare function useLayoutPanelManager({ layouts, setLayouts, panels, setPanels, windowContainerRef, layoutContainerRef, }: {
|
|
2119
|
+
layouts: LayoutMeta[];
|
|
2120
|
+
setLayouts: react__default.Dispatch<react__default.SetStateAction<LayoutMeta[]>>;
|
|
2121
|
+
panels: PanelMeta[];
|
|
2122
|
+
setPanels: react__default.Dispatch<react__default.SetStateAction<PanelMeta[]>>;
|
|
2123
|
+
windowContainerRef: react__default.RefObject<HTMLDivElement>;
|
|
2124
|
+
layoutContainerRef: react__default.RefObject<HTMLDivElement>;
|
|
2125
|
+
}): {
|
|
2126
|
+
isMobile: boolean;
|
|
2127
|
+
layouts: LayoutMeta[];
|
|
2128
|
+
setLayouts: react__default.Dispatch<react__default.SetStateAction<LayoutMeta[]>>;
|
|
2129
|
+
panels: PanelMeta[];
|
|
2130
|
+
setPanels: react__default.Dispatch<react__default.SetStateAction<PanelMeta[]>>;
|
|
2131
|
+
layoutContainerRef: react__default.RefObject<HTMLDivElement>;
|
|
2132
|
+
windowContainerRef: react__default.RefObject<HTMLDivElement>;
|
|
2133
|
+
windowContainerRect: Rect;
|
|
2134
|
+
layoutContainerRect: Rect;
|
|
2135
|
+
activePanel: PanelMeta | undefined;
|
|
2136
|
+
layoutPanelIds: Record<string, string[]>;
|
|
2137
|
+
selectWindow: (id: string) => void;
|
|
2138
|
+
updateWindow: (id: string, patch: Partial<PanelMeta>) => void;
|
|
2139
|
+
closeWindow: (id: string) => void;
|
|
2140
|
+
minimizeWindow: (id: string) => void;
|
|
2141
|
+
createWindow: (win: Optional<Omit<PanelMeta, "zIndex">, "id">) => string;
|
|
2142
|
+
newPositions: {
|
|
2143
|
+
fullDimensions: {
|
|
2144
|
+
x: number;
|
|
2145
|
+
y: number;
|
|
2146
|
+
width: number;
|
|
2147
|
+
height: number;
|
|
2148
|
+
};
|
|
2149
|
+
emptyDimensions: {
|
|
2150
|
+
x: any;
|
|
2151
|
+
y: any;
|
|
2152
|
+
width: any;
|
|
2153
|
+
height: any;
|
|
2154
|
+
};
|
|
2155
|
+
width: number;
|
|
2156
|
+
height: number;
|
|
2157
|
+
id: string;
|
|
2158
|
+
x: number;
|
|
2159
|
+
y: number;
|
|
2160
|
+
isEmpty: boolean;
|
|
2161
|
+
isVertical: boolean;
|
|
2162
|
+
windows: PanelMeta[];
|
|
2163
|
+
gridX: number;
|
|
2164
|
+
gridY: number;
|
|
2165
|
+
gridW: number;
|
|
2166
|
+
gridH: number;
|
|
2167
|
+
baseFull: {
|
|
2168
|
+
x: number;
|
|
2169
|
+
y: number;
|
|
2170
|
+
width: number;
|
|
2171
|
+
height: number;
|
|
2172
|
+
};
|
|
2173
|
+
baseEmpty: {
|
|
2174
|
+
x: any;
|
|
2175
|
+
y: any;
|
|
2176
|
+
width: any;
|
|
2177
|
+
height: any;
|
|
2178
|
+
};
|
|
2179
|
+
}[];
|
|
2058
2180
|
};
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2181
|
+
interface LayoutManagerContextValue {
|
|
2182
|
+
windowContainerRef: react__default.RefObject<HTMLDivElement>;
|
|
2183
|
+
layoutContainerRef: react__default.RefObject<HTMLDivElement>;
|
|
2184
|
+
windowContainerRect: Rect;
|
|
2185
|
+
layoutContainerRect: Rect;
|
|
2186
|
+
isMobile: boolean;
|
|
2187
|
+
panels: PanelMeta[];
|
|
2188
|
+
setPanels: react__default.Dispatch<react__default.SetStateAction<PanelMeta[]>>;
|
|
2189
|
+
activePanel?: PanelMeta;
|
|
2190
|
+
updateWindow: (id: string, patch: Partial<PanelMeta>) => void;
|
|
2191
|
+
selectWindow: (id: string) => void;
|
|
2192
|
+
closeWindow: (id: string) => void;
|
|
2193
|
+
minimizeWindow: (id: string) => void;
|
|
2194
|
+
createWindow: (win: Optional<Omit<PanelMeta, 'zIndex'>, 'id'>) => string;
|
|
2195
|
+
layouts: LayoutMeta[];
|
|
2196
|
+
layoutPanelIds: Record<string, string[]>;
|
|
2197
|
+
hoveredLayoutIdRef: react__default.MutableRefObject<string | null>;
|
|
2198
|
+
hoveredLayoutId: string | null;
|
|
2199
|
+
setHoveredLayoutId: react__default.Dispatch<react__default.SetStateAction<string | null>>;
|
|
2200
|
+
newPositions: LayoutPositon[];
|
|
2201
|
+
}
|
|
2202
|
+
declare const useLayoutManager: () => LayoutManagerContextValue;
|
|
2203
|
+
declare function LayoutManger({ children, ...manager }: ReturnType<typeof useLayoutPanelManager> & {
|
|
2204
|
+
children: react__default.ReactNode;
|
|
2205
|
+
}): react_jsx_runtime.JSX.Element;
|
|
2206
|
+
interface LayoutManagerPanelContextValue {
|
|
2207
|
+
panel: PanelMeta;
|
|
2208
|
+
}
|
|
2209
|
+
declare const useLayoutManagerPanel: () => LayoutManagerPanelContextValue;
|
|
2210
|
+
declare function LayoutManagerLayouts(): react_jsx_runtime.JSX.Element;
|
|
2211
|
+
declare function LayoutManagerPanels(): react_jsx_runtime.JSX.Element;
|
|
2212
|
+
declare function LayoutManagerTaskbar(): react_jsx_runtime.JSX.Element;
|
|
2213
|
+
declare function LayoutManagerColissions({ layoutIds }: {
|
|
2214
|
+
layoutIds: string[];
|
|
2215
|
+
}): react_jsx_runtime.JSX.Element;
|
|
2216
|
+
|
|
2217
|
+
export { Accordion, type AccordionArrow, AccordionBody, type AccordionBodyProps, type AccordionColor, AccordionContent, type AccordionContentProps, AccordionContext, AccordionHeader, type AccordionHeaderProps, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionSize, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, Autocomplete, type AutocompleteClearable, AutocompleteContext, type AutocompleteContextValue, type AutocompleteMultiple, type AutocompleteProps, Backdrop, type BackdropPlacement, type BackdropProps, type BackdropVariant, Badge, type BadgeProps, Button, type ButtonColor, ButtonGroup, ButtonGroupContext, type ButtonGroupContextValue, type ButtonGroupDirection, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, CardSubtitle, type CardSubtitleProps, CardTitle, type CardTitleProps, Checkbox, type CheckboxColor, CheckboxGroup, type CheckboxGroupAlignment, CheckboxGroupContext, type CheckboxGroupContextValue, type CheckboxGroupDirection, type CheckboxGroupProps, type CheckboxLabelPlacement, type CheckboxProps, type CheckboxSize, type CheckboxValue, Chip, type ChipProps, Collapse, CollapseContent, type CollapseContentProps, CollapseContext, type CollapseContextValue, type CollapseProps, CollapseTrigger, type CollapseTriggerProps, type ColorScheme, type ContainerBreakpoints, ContainerMediaQuery, type Cursor, DataList, type DataListItem, type DataListKeyField, type DataListMultipleProps, type DataListProps, type DataListSingleProps, Description, DescriptionEmpty, type DescriptionEmptyProps, type DescriptionProps, DescriptionText, type DescriptionTextProps, Descriptions, type DescriptionsAlign, DescriptionsContext, type DescriptionsContextValue, type DescriptionsLayout, type DescriptionsMode, type DescriptionsProps, type DescriptionsSize, type Disclosure, Divider, type DividerProps, Draggable, DraggableContent, type DraggableContentProps, DraggableTrigger, Drawer, type DrawerBackdrop, DrawerBody, type DrawerBodyProps, type DrawerClose, DrawerContext, type DrawerContextValue, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, type DrawerPosition, type DrawerProps, type DrawerSize, Dropdown, DropdownContent, type DropdownContentProps, DropdownContext, type DropdownContextValue, DropdownItem, type DropdownItemProps, type DropdownProps, DropdownTrigger, type DropdownTriggerProps, Field, type FieldProps, type FormatBooleanOptions, type FormatCurrencyOptions, type FormatDateOptions, type FormatFileSizeOptions, type FormatNumberOptions, type FormatOptions, type FormatPercentOptions, type FormatStringOptions, Grid, GridContext, type GridContextValue, GridItem, type GridItemProps, type GridMode, type GridProps, GridSub, type GridSubProps, Html, type HtmlProps, INDENT_SIZE, Icon, type IconColor, type IconProps, type IconSize, Iframe, type IframeProps, type InfiniteData, type InfiniteQueryFunction, type InfiniteQueryOptions, type InfiniteQueryRefetchOptions, type InputColor, InputGroup, type InputGroupProps, type InputSize, type InputVariant, LayoutManagerColissions, type LayoutManagerContextValue, LayoutManagerLayouts, type LayoutManagerPanelContextValue, LayoutManagerPanels, LayoutManagerTaskbar, LayoutManger, type LayoutMeta, type LayoutPositon, List, ListGroup, type ListGroupProps, ListItem, type ListItemProps, type ListProps, type ListSize, ListSubheader, type ListSubheaderProps, ListTree, ListTreeContext, type ListTreeContextValue, ListTreeItem, ListTreeItemIndentation, type ListTreeItemProps, type ListTreeProps, type MediaQuery, Menu, MenuContext, type MenuContextValue, MenuGroup, type MenuGroupItemType, type MenuGroupProps, MenuItem, type MenuItemProps, type MenuItemType, type MenuProps, MenuSubmenu, type MenuSubmenuProps, MenuValueContext, Modal, type ModalBackdrop, ModalBody, type ModalBodyProps, type ModalClose, ModalContent, type ModalContentProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalPlacement, type ModalProps, type ModalScrollBehavior, type ModalSize, type MutationError, type MutationFunction, type MutationOK, type MutationResult, MutationStatus, NavRail, NavRailItem, type NavRailItemProps, type NavRailPlacement, type NavRailProps, type PanelMeta, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, type PortalProps, type QueryFunction, QueryStatus, Radio, type RadioColor, RadioGroup, type RadioGroupAlignment, RadioGroupContext, type RadioGroupContextValue, type RadioGroupDirection, type RadioGroupProps, type RadioLabelPlacement, type RadioProps, type RadioSize, type RadioValue, type ReactRef, type Rect, type Resize, type Responsive, Result, type ResultProps, type ResultStatus, STRING_RULES, type ScrollAlignment, ScrollArea, type ScrollAreaProps, type ScrollBehavior, type ScrollToOptions, Select, type SelectClearable, SelectContext, type SelectContextValue, type SelectMultiple, type SelectProps, type SelectionItem, type SelectionOnChange, type SelectionProps, type SelectionValue, Step, type StepColor, type StepProps, Steps, StepsContext, type StepsContextValue, type StepsProps, type StringRules, Swipe, SwipeItem, type SwipeItemProps, type SwipeProps, Switch, type SwitchColor, type SwitchLabelPlacement, type SwitchProps, type SwitchSize, Tab, type TabProps, Tabs, type TabsAlignment, type TabsProps, type TabsVariant, TextInput, type TextInputProps, type Timer, type TimerMode, Toolbar, type ToolbarProps, type ToolbarSize, Transition, type TransitionProps, Tree, TreeContext, type TreeContextValue, TreeItem, type TreeItemBase, type TreeItemData, type TreeItemProps, type TreeItemValue, type TreeProps$1 as TreeProps, type UploadFileData, type UploadFileProps, UploadFiles, type UseContainerMediaQueryOptions, type UseInfiniteQueryOptions, type UseInfiniteQueryResult, type UseMutationOptions, type UseMutationResult, type UseQueryOptions, type UseQueryResult, type UseResizeObserverOptions, type VirtualItem, type Virtualizer, type VirtualizerOptions, areArraysEqual, assignRef, breakpointsMap, clsx, containsPlainText, defaultBreakpoints, doesNotContainEmojis, flattenTree, format, formatCurrency, formatDate, formatDateTime, formatFileSize, formatPercent, formatShortDateTime, formatTime, generateId, getOpenValuesByPathname, hasResizeObserver, initializeTreeValues, isAlphanumeric, isEmpty, isEmptyString, isNumeric, mergeRefs, reactNodeToText, scrollToItem, toAlphaString, toAlphanumericString, toLocalDateString, toLocalDateTimeString, toNotEmojisString, toNumericString, toPlainTextString, toRulesString, updateTreeValues, useAccordion, useAccordionItem, useAutocomplete, useButtonGroup, useCheckboxGroup, useCollapse, useContainerMediaQuery, useDebounce, useDescriptionsContext, useDisclosure, useDrawer, useDropdownContext, useEffectEvent, useElementSize, useFormat, useGridContext, useInfiniteQuery, useLayoutManager, useLayoutManagerPanel, useLayoutPanelManager, useLocalStorage, useMediaQuery, useMenu, useMenuItemValue, useModal, useMutation, useOnClickOutside, usePopover, usePrevious, useQuery, useRadioGroup, useResizeObserver, useSelect, useStep, useStepsContext, useTimer, useTree, useValueEffect, useVirtualizer, validateRules, valueToValues, valuesToValue };
|