vxui-react 1.1.3 → 1.2.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 +1 -1
- package/dist/index.cjs +60 -40
- package/dist/index.js +2561 -2120
- package/dist/src/components/AppShell.d.ts +4 -2
- package/dist/src/components/Combobox.d.ts +8 -1
- package/dist/src/components/MultiSelect.d.ts +23 -0
- package/dist/src/components/Shell.d.ts +12 -2
- package/dist/src/components/TimePicker.d.ts +14 -0
- package/dist/src/lib/index.d.ts +4 -0
- package/dist/vxui-react.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, Ref } from 'react';
|
|
1
|
+
import { default as React, ReactNode, Ref } from 'react';
|
|
2
2
|
import { Shell, ShellSidebar, ShellNav, ShellNavSection, ShellNavItem, ShellOverlay, ShellMain, ShellTopbar, ShellContent, ShellNavItem as ShellNavItemType, ShellNavSection as ShellNavSectionType } from './Shell';
|
|
3
3
|
export { Shell, ShellSidebar, ShellNav, ShellNavSection, ShellNavItem, ShellOverlay, ShellMain, ShellTopbar, ShellContent, };
|
|
4
4
|
export type { ShellProps, ShellSidebarProps, ShellNavProps, ShellNavSectionProps, ShellNavItemProps, ShellOverlayProps, ShellMainProps, ShellTopbarProps, ShellContentProps, } from './Shell';
|
|
@@ -15,6 +15,8 @@ export interface AppShellProps {
|
|
|
15
15
|
navItems?: AppShellNavItem[];
|
|
16
16
|
navSections?: AppShellNavSection[];
|
|
17
17
|
sidebarCollapsed?: boolean;
|
|
18
|
+
/** Configuration for the minimum and exact width of the sidebar (number as px, or CSS string). */
|
|
19
|
+
sidebarWidth?: number | string;
|
|
18
20
|
mobileNavOpen?: boolean;
|
|
19
21
|
density?: 'comfortable' | 'compact';
|
|
20
22
|
onSidebarToggle?: () => void;
|
|
@@ -28,4 +30,4 @@ export interface AppShellProps {
|
|
|
28
30
|
sidebarFooter?: ReactNode;
|
|
29
31
|
children: ReactNode;
|
|
30
32
|
}
|
|
31
|
-
export declare function AppShell({ brand, brandCaption, brandIcon, topbarRef, breadcrumb, title, description, navItems, navSections, sidebarCollapsed, mobileNavOpen, onSidebarToggle, onMobileNavToggle, onSidebarClick, menuButtonLabel, sidebarCollapseLabel, sidebarExpandLabel, sidebarCloseLabel, density, headerActions, sidebarFooter, children, }: AppShellProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare function AppShell({ brand, brandCaption, brandIcon, topbarRef, breadcrumb, title, description, navItems, navSections, sidebarCollapsed, sidebarWidth, mobileNavOpen, onSidebarToggle, onMobileNavToggle, onSidebarClick, menuButtonLabel, sidebarCollapseLabel, sidebarExpandLabel, sidebarCloseLabel, density, headerActions, sidebarFooter, children, }: AppShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,6 +16,13 @@ export interface ComboboxProps {
|
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
clearable?: boolean;
|
|
18
18
|
emptyText?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Controls when the search input is shown.
|
|
21
|
+
* - `true` (default): always show
|
|
22
|
+
* - `false`: never show
|
|
23
|
+
* - `number N`: show only when `options.length > N`
|
|
24
|
+
*/
|
|
25
|
+
searchable?: boolean | number;
|
|
19
26
|
className?: string;
|
|
20
27
|
}
|
|
21
|
-
export declare function Combobox({ options, value: controlledValue, defaultValue, onChange, placeholder, searchPlaceholder, label, hint, error, disabled, clearable, emptyText, className, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function Combobox({ options, value: controlledValue, defaultValue, onChange, placeholder, searchPlaceholder, label, hint, error, disabled, clearable, emptyText, searchable, className, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface MultiSelectOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface MultiSelectProps {
|
|
7
|
+
options: MultiSelectOption[];
|
|
8
|
+
value?: string[];
|
|
9
|
+
defaultValue?: string[];
|
|
10
|
+
onChange?: (value: string[]) => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
searchPlaceholder?: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
hint?: string;
|
|
15
|
+
error?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
clearable?: boolean;
|
|
18
|
+
emptyText?: string;
|
|
19
|
+
/** Max number of visible tags before showing "+N more" badge */
|
|
20
|
+
maxDisplay?: number;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function MultiSelect({ options, value: controlledValue, defaultValue, onChange, placeholder, searchPlaceholder, label, hint, error, disabled, clearable, emptyText, maxDisplay, className, }: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,6 +7,10 @@ export interface ShellNavItem {
|
|
|
7
7
|
trailing?: ReactNode;
|
|
8
8
|
active?: boolean;
|
|
9
9
|
onSelect?: () => void;
|
|
10
|
+
/** Nested sub-items; renders an expandable sub-menu */
|
|
11
|
+
children?: ShellNavItem[];
|
|
12
|
+
/** Whether sub-menu is open by default */
|
|
13
|
+
defaultOpen?: boolean;
|
|
10
14
|
}
|
|
11
15
|
export interface ShellNavSection {
|
|
12
16
|
key?: string;
|
|
@@ -17,10 +21,12 @@ export interface ShellProps {
|
|
|
17
21
|
collapsed?: boolean;
|
|
18
22
|
mobileNavOpen?: boolean;
|
|
19
23
|
density?: 'comfortable' | 'compact';
|
|
24
|
+
/** Optional: Configure sidebar width via string (e.g., "18rem") or number (e.g., 280 for px) */
|
|
25
|
+
sidebarWidth?: number | string;
|
|
20
26
|
className?: string;
|
|
21
27
|
children: ReactNode;
|
|
22
28
|
}
|
|
23
|
-
export declare function Shell({ collapsed, mobileNavOpen, density, className, children }: ShellProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function Shell({ collapsed, mobileNavOpen, density, sidebarWidth, className, children }: ShellProps): import("react/jsx-runtime").JSX.Element;
|
|
24
30
|
export interface ShellSidebarProps {
|
|
25
31
|
brand?: string;
|
|
26
32
|
brandCaption?: string;
|
|
@@ -51,8 +57,12 @@ export interface ShellNavItemProps {
|
|
|
51
57
|
trailing?: ReactNode;
|
|
52
58
|
active?: boolean;
|
|
53
59
|
onSelect?: () => void;
|
|
60
|
+
/** Nested sub-items rendered as an expandable sub-menu */
|
|
61
|
+
children?: ReactNode;
|
|
62
|
+
/** Whether sub-menu starts open. Defaults to false */
|
|
63
|
+
defaultOpen?: boolean;
|
|
54
64
|
}
|
|
55
|
-
export declare function ShellNavItem({ label, icon, badge, trailing, active, onSelect }: ShellNavItemProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export declare function ShellNavItem({ label, icon, badge, trailing, active, onSelect, children, defaultOpen }: ShellNavItemProps): import("react/jsx-runtime").JSX.Element;
|
|
56
66
|
export interface ShellOverlayProps {
|
|
57
67
|
onClose?: () => void;
|
|
58
68
|
closeLabel?: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface TimePickerProps {
|
|
2
|
+
value?: string;
|
|
3
|
+
defaultValue?: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
hint?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Show seconds column. Default false */
|
|
11
|
+
seconds?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function TimePicker({ value: controlledValue, defaultValue, onChange, placeholder, label, hint, error, disabled, seconds, className, }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/src/lib/index.d.ts
CHANGED
|
@@ -82,6 +82,10 @@ export { DatePicker } from '../components/DatePicker';
|
|
|
82
82
|
export type { DatePickerProps } from '../components/DatePicker';
|
|
83
83
|
export { Combobox } from '../components/Combobox';
|
|
84
84
|
export type { ComboboxProps, ComboboxOption } from '../components/Combobox';
|
|
85
|
+
export { MultiSelect } from '../components/MultiSelect';
|
|
86
|
+
export type { MultiSelectProps, MultiSelectOption } from '../components/MultiSelect';
|
|
87
|
+
export { TimePicker } from '../components/TimePicker';
|
|
88
|
+
export type { TimePickerProps } from '../components/TimePicker';
|
|
85
89
|
export { FileUpload } from '../components/FileUpload';
|
|
86
90
|
export type { FileUploadProps, UploadedFile } from '../components/FileUpload';
|
|
87
91
|
export { Sheet } from '../components/Sheet';
|