@furcrer/fullstack-components 0.1.0 → 1.0.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 +2 -2
- package/dist/index.js +2015 -1088
- package/dist/styles.css +1 -1
- package/dist/types/components/containers/Grid/Grid.d.ts +1 -0
- package/dist/types/components/containers/Stack/Stack.d.ts +1 -0
- package/dist/types/components/data/CrudExample/CrudExample.d.ts +1 -0
- package/dist/types/components/data/ResourceTable/ResourceTable.d.ts +3 -2
- package/dist/types/components/data/ResultsCount/ResultsCount.d.ts +11 -0
- package/dist/types/components/data/ResultsCount/ResultsCount.fixture.d.ts +2 -0
- package/dist/types/components/data/ResultsCount/ResultsCount.variants.d.ts +11 -0
- package/dist/types/components/data/ResultsCount/index.d.ts +2 -0
- package/dist/types/components/forms/ColorInput/ColorInput.d.ts +6 -0
- package/dist/types/components/forms/DateInput/DateInput.d.ts +9 -0
- package/dist/types/components/forms/FileInput/FileInput.d.ts +6 -0
- package/dist/types/components/forms/MultiSelectFilter/MultiSelectFilter.d.ts +23 -0
- package/dist/types/components/forms/MultiSelectFilter/MultiSelectFilter.fixture.d.ts +2 -0
- package/dist/types/components/forms/MultiSelectFilter/MultiSelectFilter.variants.d.ts +9 -0
- package/dist/types/components/forms/MultiSelectFilter/index.d.ts +2 -0
- package/dist/types/components/forms/NumberInput/NumberInput.d.ts +8 -0
- package/dist/types/components/forms/PasswordInput/PasswordInput.d.ts +6 -0
- package/dist/types/components/forms/RadioGroup/RadioGroup.d.ts +8 -0
- package/dist/types/components/forms/SearchInput/SearchInput.d.ts +4 -0
- package/dist/types/components/forms/SelectFilter/SelectFilter.d.ts +19 -0
- package/dist/types/components/forms/SelectFilter/SelectFilter.fixture.d.ts +2 -0
- package/dist/types/components/forms/SelectFilter/SelectFilter.variants.d.ts +9 -0
- package/dist/types/components/forms/SelectFilter/index.d.ts +2 -0
- package/dist/types/components/forms/Slider/Slider.d.ts +10 -0
- package/dist/types/components/ohm/ActionBar/ActionBar.d.ts +17 -0
- package/dist/types/components/ohm/ActionBar/ActionBar.fixture.d.ts +2 -0
- package/dist/types/components/ohm/ActionBar/ActionBar.variants.d.ts +13 -0
- package/dist/types/components/ohm/ActionBar/index.d.ts +2 -0
- package/dist/types/components/ohm/DataField/DataField.d.ts +27 -0
- package/dist/types/components/ohm/DataField/DataField.fixture.d.ts +2 -0
- package/dist/types/components/ohm/DataField/DataField.variants.d.ts +5 -0
- package/dist/types/components/ohm/DataField/index.d.ts +2 -0
- package/dist/types/components/ohm/DocumentList/DocumentList.d.ts +21 -0
- package/dist/types/components/ohm/DocumentList/DocumentList.fixture.d.ts +2 -0
- package/dist/types/components/ohm/DocumentList/DocumentList.variants.d.ts +5 -0
- package/dist/types/components/ohm/DocumentList/index.d.ts +2 -0
- package/dist/types/components/ohm/EntityCard/EntityCard.d.ts +14 -0
- package/dist/types/components/ohm/EntityCard/EntityCard.fixture.d.ts +2 -0
- package/dist/types/components/ohm/EntityCard/EntityCard.variants.d.ts +7 -0
- package/dist/types/components/ohm/EntityCard/index.d.ts +2 -0
- package/dist/types/components/ohm/Main/Main.d.ts +8 -0
- package/dist/types/components/ohm/Main/Main.fixture.d.ts +3 -0
- package/dist/types/components/ohm/Main/Main.variants.d.ts +5 -0
- package/dist/types/components/ohm/Main/index.d.ts +2 -0
- package/dist/types/components/ohm/Navbar/Navbar.d.ts +115 -0
- package/dist/types/components/ohm/Navbar/Navbar.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Navbar/Navbar.variants.d.ts +75 -0
- package/dist/types/components/ohm/Navbar/index.d.ts +2 -0
- package/dist/types/components/ohm/PageHeader/PageHeader.d.ts +11 -0
- package/dist/types/components/ohm/PageHeader/PageHeader.fixture.d.ts +2 -0
- package/dist/types/components/ohm/PageHeader/PageHeader.variants.d.ts +15 -0
- package/dist/types/components/ohm/PageHeader/index.d.ts +2 -0
- package/dist/types/components/ohm/PhotoGrid/PhotoGrid.d.ts +19 -0
- package/dist/types/components/ohm/PhotoGrid/PhotoGrid.fixture.d.ts +2 -0
- package/dist/types/components/ohm/PhotoGrid/PhotoGrid.variants.d.ts +5 -0
- package/dist/types/components/ohm/PhotoGrid/index.d.ts +2 -0
- package/dist/types/components/ohm/SearchFilterSection/SearchFilterSection.d.ts +20 -0
- package/dist/types/components/ohm/SearchFilterSection/SearchFilterSection.fixture.d.ts +1 -0
- package/dist/types/components/ohm/SearchFilterSection/SearchFilterSection.variants.d.ts +5 -0
- package/dist/types/components/ohm/SearchFilterSection/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/Table.d.ts +5 -0
- package/dist/types/{data → components/ohm/Table}/Table.fixture.d.ts +1 -1
- package/dist/types/components/ohm/Table/Table.types.d.ts +43 -0
- package/dist/types/components/ohm/Table/Table.variants.d.ts +23 -0
- package/dist/types/components/ohm/Table/TableAction/TableAction.d.ts +6 -0
- package/dist/types/components/ohm/Table/TableAction/TableAction.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableAction/TableAction.variants.d.ts +22 -0
- package/dist/types/components/ohm/Table/TableAction/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableActions/TableActions.d.ts +11 -0
- package/dist/types/components/ohm/Table/TableActions/TableActions.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableActions/TableActions.variants.d.ts +28 -0
- package/dist/types/components/ohm/Table/TableActions/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableBody/TableBody.d.ts +6 -0
- package/dist/types/components/ohm/Table/TableBody/TableBody.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableBody/TableBody.variants.d.ts +7 -0
- package/dist/types/components/ohm/Table/TableBody/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableCell/TableCell.d.ts +7 -0
- package/dist/types/components/ohm/Table/TableCell/TableCell.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableCell/TableCell.variants.d.ts +7 -0
- package/dist/types/components/ohm/Table/TableCell/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableEmpty/TableEmpty.d.ts +6 -0
- package/dist/types/components/ohm/Table/TableEmpty/TableEmpty.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableEmpty/TableEmpty.variants.d.ts +8 -0
- package/dist/types/components/ohm/Table/TableEmpty/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableError/TableError.d.ts +6 -0
- package/dist/types/components/ohm/Table/TableError/TableError.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableError/TableError.variants.d.ts +8 -0
- package/dist/types/components/ohm/Table/TableError/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableExpand/TableExpand.d.ts +7 -0
- package/dist/types/components/ohm/Table/TableExpand/TableExpand.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableExpand/TableExpand.variants.d.ts +7 -0
- package/dist/types/components/ohm/Table/TableExpand/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableFooter/TableFooter.d.ts +6 -0
- package/dist/types/components/ohm/Table/TableFooter/TableFooter.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableFooter/TableFooter.variants.d.ts +7 -0
- package/dist/types/components/ohm/Table/TableFooter/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableHeader/TableHeader.d.ts +6 -0
- package/dist/types/components/ohm/Table/TableHeader/TableHeader.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableHeader/TableHeader.variants.d.ts +7 -0
- package/dist/types/components/ohm/Table/TableHeader/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableHeaderCell/TableHeaderCell.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableHeaderCell/TableHeaderCell.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableHeaderCell/TableHeaderCell.variants.d.ts +15 -0
- package/dist/types/components/ohm/Table/TableHeaderCell/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableLoading/TableLoading.d.ts +5 -0
- package/dist/types/components/ohm/Table/TableLoading/TableLoading.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableLoading/TableLoading.variants.d.ts +7 -0
- package/dist/types/components/ohm/Table/TableLoading/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TablePagination/TablePagination.d.ts +6 -0
- package/dist/types/components/ohm/Table/TablePagination/TablePagination.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TablePagination/TablePagination.variants.d.ts +8 -0
- package/dist/types/components/ohm/Table/TablePagination/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableRow/TableRow.d.ts +8 -0
- package/dist/types/components/ohm/Table/TableRow/TableRow.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableRow/TableRow.variants.d.ts +7 -0
- package/dist/types/components/ohm/Table/TableRow/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableRowActions/TableRowActions.d.ts +6 -0
- package/dist/types/components/ohm/Table/TableRowActions/TableRowActions.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableRowActions/TableRowActions.variants.d.ts +7 -0
- package/dist/types/components/ohm/Table/TableRowActions/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableSelection/TableSelection.d.ts +7 -0
- package/dist/types/components/ohm/Table/TableSelection/TableSelection.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableSelection/TableSelection.variants.d.ts +7 -0
- package/dist/types/components/ohm/Table/TableSelection/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableSort/TableSort.d.ts +8 -0
- package/dist/types/components/ohm/Table/TableSort/TableSort.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableSort/TableSort.variants.d.ts +8 -0
- package/dist/types/components/ohm/Table/TableSort/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableStructure/TableStructure.d.ts +11 -0
- package/dist/types/components/ohm/Table/TableStructure/TableStructure.fixture.d.ts +2 -0
- package/dist/types/components/ohm/Table/TableStructure/TableStructure.variants.d.ts +14 -0
- package/dist/types/components/ohm/Table/TableStructure/index.d.ts +2 -0
- package/dist/types/components/ohm/Table/index.d.ts +21 -0
- package/dist/types/components/overlays/FilterMenu/FilterMenu.d.ts +17 -0
- package/dist/types/components/overlays/FilterMenu/FilterMenu.fixture.d.ts +2 -0
- package/dist/types/components/overlays/FilterMenu/FilterMenu.variants.d.ts +9 -0
- package/dist/types/components/overlays/FilterMenu/index.d.ts +2 -0
- package/dist/types/components/primitives/Accordion/Accordion.d.ts +1 -0
- package/dist/types/components/primitives/Alert/Alert.d.ts +1 -0
- package/dist/types/components/primitives/Avatar/Avatar.d.ts +1 -0
- package/dist/types/components/primitives/Button/Button.types.d.ts +2 -0
- package/dist/types/components/primitives/Button/Button.variants.d.ts +34 -0
- package/dist/types/components/primitives/Carousel/Carousel.d.ts +1 -0
- package/dist/types/components/primitives/Combobox/Combobox.d.ts +1 -0
- package/dist/types/components/primitives/CommandPalette/CommandPalette.d.ts +1 -0
- package/dist/types/components/primitives/ContextMenu/ContextMenu.d.ts +1 -0
- package/dist/types/components/primitives/DatePicker/DatePicker.d.ts +1 -0
- package/dist/types/components/primitives/Drawer/Drawer.d.ts +5 -0
- package/dist/types/components/primitives/DropdownMenu/DropdownMenu.d.ts +1 -0
- package/dist/types/components/primitives/FileUpload/FileUpload.d.ts +1 -0
- package/dist/types/components/primitives/FormField/FormField.variants.d.ts +19 -0
- package/dist/types/components/primitives/Heading/Heading.d.ts +3 -0
- package/dist/types/components/primitives/Link/Link.d.ts +1 -0
- package/dist/types/components/primitives/Menubar/Menubar.d.ts +1 -0
- package/dist/types/components/primitives/MultiSelect/MultiSelect.d.ts +1 -0
- package/dist/types/components/primitives/NavigationMenu/NavigationMenu.d.ts +1 -0
- package/dist/types/components/primitives/Pagination/Pagination.d.ts +4 -0
- package/dist/types/components/primitives/Popover/Popover.d.ts +4 -0
- package/dist/types/components/primitives/Progress/Progress.d.ts +4 -0
- package/dist/types/components/primitives/ResizablePanel/ResizablePanel.d.ts +1 -0
- package/dist/types/components/primitives/SearchBar/SearchBar.d.ts +1 -0
- package/dist/types/components/primitives/Separator/Separator.d.ts +1 -0
- package/dist/types/components/primitives/Sidebar/Sidebar.d.ts +1 -0
- package/dist/types/components/primitives/Skeleton/Skeleton.d.ts +1 -0
- package/dist/types/components/primitives/Spinner/Spinner.d.ts +1 -0
- package/dist/types/components/primitives/Stepper/Stepper.d.ts +1 -0
- package/dist/types/components/primitives/Tabs/Tabs.d.ts +1 -0
- package/dist/types/components/primitives/Text/Text.d.ts +1 -0
- package/dist/types/components/primitives/Toast/Toast.d.ts +1 -0
- package/dist/types/components/primitives/Tooltip/Tooltip.d.ts +2 -0
- package/dist/types/components/primitives/TreeView/TreeView.d.ts +1 -0
- package/dist/types/data/index.d.ts +0 -1
- package/dist/types/forms/FormActions.d.ts +2 -0
- package/dist/types/forms/FormField.d.ts +4 -0
- package/dist/types/forms/react-form.d.ts +6 -0
- package/dist/types/forms/react.d.ts +6 -1
- package/dist/types/generated/component-registry.d.ts +2913 -50
- package/dist/types/generated/public-exports.d.ts +92 -0
- package/dist/types/types/metadata.d.ts +23 -3
- package/package.json +3 -2
- package/dist/types/data/Table.d.ts +0 -13
- package/dist/types/data/resource-controller.test.d.ts +0 -1
- package/dist/types/theme/theme.test.d.ts +0 -1
- package/dist/types/tooling/discovery/discover.d.ts +0 -9
- package/dist/types/tooling/discovery/discover.test.d.ts +0 -1
- package/dist/types/tooling/discovery/generate-exports.d.ts +0 -6
- package/dist/types/tooling/discovery/generate-registry.d.ts +0 -6
- package/dist/types/tooling/discovery/generate-registry.test.d.ts +0 -1
- package/dist/types/tooling/discovery/generate.d.ts +0 -1
- package/dist/types/tooling/discovery/vite-plugin.d.ts +0 -8
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import "../ohm.css";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
export type NavbarResponsive = {
|
|
4
|
+
mobile?: number;
|
|
5
|
+
desktop?: number;
|
|
6
|
+
};
|
|
7
|
+
export type NavbarWidth = {
|
|
8
|
+
mobile?: string;
|
|
9
|
+
collapsed?: string;
|
|
10
|
+
expanded?: string;
|
|
11
|
+
};
|
|
12
|
+
export type NavbarBrandProps = {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
href: string;
|
|
15
|
+
};
|
|
16
|
+
export type NavbarBrandLogoProps = {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
};
|
|
19
|
+
export type NavbarBrandNameProps = {
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
};
|
|
22
|
+
export type NavbarHeaderProps = {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
};
|
|
25
|
+
export type NavbarMainProps = {
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
};
|
|
28
|
+
export type NavbarSectionNameProps = {
|
|
29
|
+
name: ReactNode;
|
|
30
|
+
icon?: ReactNode;
|
|
31
|
+
};
|
|
32
|
+
export type NavbarItemConfig = {
|
|
33
|
+
name: ReactNode;
|
|
34
|
+
href: string;
|
|
35
|
+
icon: ReactNode;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
hidden?: boolean;
|
|
38
|
+
tooltip?: ReactNode;
|
|
39
|
+
ariaLabel?: string;
|
|
40
|
+
};
|
|
41
|
+
export type NavbarItemProps = NavbarItemConfig;
|
|
42
|
+
export type NavbarItemIconProps = {
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
};
|
|
45
|
+
export type NavbarItemNameProps = {
|
|
46
|
+
children: ReactNode;
|
|
47
|
+
};
|
|
48
|
+
export type NavbarSectionConfig = {
|
|
49
|
+
name: ReactNode;
|
|
50
|
+
icon?: ReactNode;
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
hidden?: boolean;
|
|
53
|
+
items: NavbarItemConfig[];
|
|
54
|
+
};
|
|
55
|
+
export type NavbarSectionProps = {
|
|
56
|
+
name: ReactNode;
|
|
57
|
+
icon?: ReactNode;
|
|
58
|
+
disabled?: boolean;
|
|
59
|
+
hidden?: boolean;
|
|
60
|
+
children: ReactNode;
|
|
61
|
+
};
|
|
62
|
+
export type NavbarFooterProps = {
|
|
63
|
+
children: ReactNode;
|
|
64
|
+
};
|
|
65
|
+
export type NavbarProfileConfig = {
|
|
66
|
+
picture?: {
|
|
67
|
+
src?: string;
|
|
68
|
+
fallback?: ReactNode;
|
|
69
|
+
};
|
|
70
|
+
name: ReactNode;
|
|
71
|
+
profileHref: string;
|
|
72
|
+
settingsHref: string;
|
|
73
|
+
onLogout: () => void;
|
|
74
|
+
settingsIcon?: ReactNode;
|
|
75
|
+
logoutIcon?: ReactNode;
|
|
76
|
+
};
|
|
77
|
+
export type NavbarProfileProps = NavbarProfileConfig;
|
|
78
|
+
export type NavbarProfilePictureProps = {
|
|
79
|
+
src?: string;
|
|
80
|
+
fallback?: ReactNode;
|
|
81
|
+
};
|
|
82
|
+
export type NavbarToggleProps = {
|
|
83
|
+
expandedIcon?: ReactNode;
|
|
84
|
+
collapsedIcon?: ReactNode;
|
|
85
|
+
mobileOpenIcon?: ReactNode;
|
|
86
|
+
mobileClosedIcon?: ReactNode;
|
|
87
|
+
};
|
|
88
|
+
export type NavbarProps = {
|
|
89
|
+
children?: ReactNode;
|
|
90
|
+
responsive?: NavbarResponsive;
|
|
91
|
+
width?: NavbarWidth;
|
|
92
|
+
sections?: NavbarSectionConfig[];
|
|
93
|
+
profile?: NavbarProfileConfig;
|
|
94
|
+
brand?: {
|
|
95
|
+
href: string;
|
|
96
|
+
logo: ReactNode;
|
|
97
|
+
name: ReactNode;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
/** Responsive Ohm application navigation shell. */
|
|
101
|
+
export declare function Navbar({ children, responsive, width, sections, profile, brand }: NavbarProps): import("react").JSX.Element;
|
|
102
|
+
export declare function NavbarHeader({ children }: NavbarHeaderProps): import("react").JSX.Element;
|
|
103
|
+
export declare function NavbarBrand({ children, href }: NavbarBrandProps): import("react").JSX.Element;
|
|
104
|
+
export declare function NavbarBrandLogo({ children }: NavbarBrandLogoProps): import("react").JSX.Element;
|
|
105
|
+
export declare function NavbarBrandName({ children }: NavbarBrandNameProps): import("react").JSX.Element;
|
|
106
|
+
export declare function NavbarToggle({ expandedIcon, collapsedIcon, mobileOpenIcon, mobileClosedIcon }: NavbarToggleProps): import("react").JSX.Element;
|
|
107
|
+
export declare function NavbarMain({ children }: NavbarMainProps): import("react").JSX.Element;
|
|
108
|
+
export declare function NavbarSection({ name, icon, disabled, hidden, children }: NavbarSectionProps): import("react").JSX.Element | null;
|
|
109
|
+
export declare function NavbarSectionName({ name, icon }: NavbarSectionNameProps): import("react").JSX.Element;
|
|
110
|
+
export declare function NavbarItem({ name, href, icon, disabled, hidden, tooltip, ariaLabel }: NavbarItemProps): import("react").JSX.Element | null;
|
|
111
|
+
export declare function NavbarItemIcon({ children }: NavbarItemIconProps): import("react").JSX.Element;
|
|
112
|
+
export declare function NavbarItemName({ children }: NavbarItemNameProps): import("react").JSX.Element;
|
|
113
|
+
export declare function NavbarFooter({ children }: NavbarFooterProps): import("react").JSX.Element;
|
|
114
|
+
export declare function NavbarProfilePicture({ src, fallback }: NavbarProfilePictureProps): import("react").JSX.Element;
|
|
115
|
+
export declare function NavbarProfile({ picture, name, profileHref, settingsHref, onLogout, settingsIcon, logoutIcon }: NavbarProfileProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export declare const NavbarVariants: readonly [{
|
|
2
|
+
readonly id: "default";
|
|
3
|
+
readonly name: "Default";
|
|
4
|
+
readonly props: {};
|
|
5
|
+
}];
|
|
6
|
+
export declare const NavbarHeaderVariants: readonly [{
|
|
7
|
+
readonly id: "default";
|
|
8
|
+
readonly name: "Default";
|
|
9
|
+
readonly props: {};
|
|
10
|
+
}];
|
|
11
|
+
export declare const NavbarBrandVariants: readonly [{
|
|
12
|
+
readonly id: "default";
|
|
13
|
+
readonly name: "Default";
|
|
14
|
+
readonly props: {};
|
|
15
|
+
}];
|
|
16
|
+
export declare const NavbarBrandLogoVariants: readonly [{
|
|
17
|
+
readonly id: "default";
|
|
18
|
+
readonly name: "Default";
|
|
19
|
+
readonly props: {};
|
|
20
|
+
}];
|
|
21
|
+
export declare const NavbarBrandNameVariants: readonly [{
|
|
22
|
+
readonly id: "default";
|
|
23
|
+
readonly name: "Default";
|
|
24
|
+
readonly props: {};
|
|
25
|
+
}];
|
|
26
|
+
export declare const NavbarToggleVariants: readonly [{
|
|
27
|
+
readonly id: "default";
|
|
28
|
+
readonly name: "Default";
|
|
29
|
+
readonly props: {};
|
|
30
|
+
}];
|
|
31
|
+
export declare const NavbarMainVariants: readonly [{
|
|
32
|
+
readonly id: "default";
|
|
33
|
+
readonly name: "Default";
|
|
34
|
+
readonly props: {};
|
|
35
|
+
}];
|
|
36
|
+
export declare const NavbarSectionVariants: readonly [{
|
|
37
|
+
readonly id: "default";
|
|
38
|
+
readonly name: "Default";
|
|
39
|
+
readonly props: {};
|
|
40
|
+
}];
|
|
41
|
+
export declare const NavbarSectionNameVariants: readonly [{
|
|
42
|
+
readonly id: "default";
|
|
43
|
+
readonly name: "Default";
|
|
44
|
+
readonly props: {};
|
|
45
|
+
}];
|
|
46
|
+
export declare const NavbarItemVariants: readonly [{
|
|
47
|
+
readonly id: "default";
|
|
48
|
+
readonly name: "Default";
|
|
49
|
+
readonly props: {};
|
|
50
|
+
}];
|
|
51
|
+
export declare const NavbarItemIconVariants: readonly [{
|
|
52
|
+
readonly id: "default";
|
|
53
|
+
readonly name: "Default";
|
|
54
|
+
readonly props: {};
|
|
55
|
+
}];
|
|
56
|
+
export declare const NavbarItemNameVariants: readonly [{
|
|
57
|
+
readonly id: "default";
|
|
58
|
+
readonly name: "Default";
|
|
59
|
+
readonly props: {};
|
|
60
|
+
}];
|
|
61
|
+
export declare const NavbarFooterVariants: readonly [{
|
|
62
|
+
readonly id: "default";
|
|
63
|
+
readonly name: "Default";
|
|
64
|
+
readonly props: {};
|
|
65
|
+
}];
|
|
66
|
+
export declare const NavbarProfilePictureVariants: readonly [{
|
|
67
|
+
readonly id: "default";
|
|
68
|
+
readonly name: "Default";
|
|
69
|
+
readonly props: {};
|
|
70
|
+
}];
|
|
71
|
+
export declare const NavbarProfileVariants: readonly [{
|
|
72
|
+
readonly id: "default";
|
|
73
|
+
readonly name: "Default";
|
|
74
|
+
readonly props: {};
|
|
75
|
+
}];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { Navbar, NavbarBrand, NavbarBrandLogo, NavbarBrandName, NavbarFooter, NavbarItem, NavbarItemIcon, NavbarItemName, NavbarMain, NavbarProfile, NavbarProfilePicture, NavbarSection, NavbarSectionName, NavbarHeader, NavbarToggle } from "./Navbar.js";
|
|
2
|
+
export type { NavbarBrandProps, NavbarBrandLogoProps, NavbarBrandNameProps, NavbarFooterProps, NavbarHeaderProps, NavbarItemConfig, NavbarItemProps, NavbarItemIconProps, NavbarItemNameProps, NavbarMainProps, NavbarProfileConfig, NavbarProfileProps, NavbarProfilePictureProps, NavbarProps, NavbarResponsive, NavbarSectionConfig, NavbarSectionNameProps, NavbarSectionProps, NavbarToggleProps, NavbarWidth, } from "./Navbar.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "../ohm.css";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export interface PageHeaderProps {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
breadcrumb?: ReactNode;
|
|
7
|
+
backAction?: ReactNode;
|
|
8
|
+
actions?: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function PageHeader({ title, description, breadcrumb, backAction, actions, className, }: PageHeaderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const PageHeaderVariants: readonly [{
|
|
2
|
+
readonly id: "default";
|
|
3
|
+
readonly name: "Default";
|
|
4
|
+
readonly props: {
|
|
5
|
+
readonly title: "Objekty";
|
|
6
|
+
readonly description: "Správa objektov a technických zariadení.";
|
|
7
|
+
};
|
|
8
|
+
}, {
|
|
9
|
+
readonly id: "actions";
|
|
10
|
+
readonly name: "With actions";
|
|
11
|
+
readonly props: {
|
|
12
|
+
readonly title: "Objekty";
|
|
13
|
+
readonly description: "Správa objektov a technických zariadení.";
|
|
14
|
+
};
|
|
15
|
+
}];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import "../ohm.css";
|
|
3
|
+
import "./PhotoGrid.css";
|
|
4
|
+
export interface PhotoGridItem {
|
|
5
|
+
id: string;
|
|
6
|
+
src: string;
|
|
7
|
+
alt?: string;
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface PhotoGridProps {
|
|
11
|
+
photos?: PhotoGridItem[];
|
|
12
|
+
columns?: number;
|
|
13
|
+
emptyState?: ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
onOpen?: (photo: PhotoGridItem) => void;
|
|
16
|
+
onShare?: (photo: PhotoGridItem) => void;
|
|
17
|
+
onDelete?: (photo: PhotoGridItem) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function PhotoGrid({ photos, columns, emptyState, className, onOpen, onShare, onDelete }: PhotoGridProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import "./SearchFilterSection.css";
|
|
3
|
+
/**
|
|
4
|
+
* Reusable Ohm search/filter layout for list pages.
|
|
5
|
+
* It owns presentation only; search and filter state remain with the page.
|
|
6
|
+
*/
|
|
7
|
+
export interface SearchFilterSectionProps extends Omit<HTMLAttributes<HTMLElement>, "aria-label"> {
|
|
8
|
+
/** Content for the primary text search control. */
|
|
9
|
+
search: ReactNode;
|
|
10
|
+
/** Content for secondary filter controls. */
|
|
11
|
+
filters?: ReactNode;
|
|
12
|
+
/** Optional page-specific actions. */
|
|
13
|
+
actions?: ReactNode;
|
|
14
|
+
/** Accessible name for the search/filter section. */
|
|
15
|
+
"aria-label"?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Search/filter section for Ohm list pages.
|
|
19
|
+
*/
|
|
20
|
+
export declare function SearchFilterSection({ search, filters, actions, className, "aria-label": ariaLabel, ...props }: SearchFilterSectionProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SearchFilterSectionFixture(): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "../ohm.css";
|
|
2
|
+
import "./Table.css";
|
|
3
|
+
import type { TableColumn, TableProps, TableSortState } from "./Table.types.js";
|
|
4
|
+
export type { TableColumn, TableProps, TableSortState };
|
|
5
|
+
export declare function Table<TData extends Record<string, unknown>>({ data, columns, caption, sortable, pagination, pageSize, actions, actionItems, selectable, selectedRowIds, getRowId, onSelectionChange, onRowClick, renderRowActions, renderExpandedRow, loading, emptyState, error, className, }: TableProps<TData>): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ComponentPreviewProps } from "
|
|
1
|
+
import type { ComponentPreviewProps } from "../../../types/metadata.js";
|
|
2
2
|
export declare function TableFixture({ props }: ComponentPreviewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { TableActionDefinition } from "./TableActions/TableActions.js";
|
|
3
|
+
export interface TableColumn<TData extends Record<string, unknown> = Record<string, unknown>> {
|
|
4
|
+
key: keyof TData & string;
|
|
5
|
+
header: ReactNode;
|
|
6
|
+
sortable?: boolean;
|
|
7
|
+
width?: string;
|
|
8
|
+
render?: (value: TData[keyof TData], row: TData) => ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export type TableSortDirection = "asc" | "desc";
|
|
11
|
+
export interface TableSortState {
|
|
12
|
+
key: string;
|
|
13
|
+
direction: TableSortDirection;
|
|
14
|
+
}
|
|
15
|
+
export interface TableProps<TData extends Record<string, unknown> = Record<string, unknown>> {
|
|
16
|
+
data: TData[];
|
|
17
|
+
columns: TableColumn<TData>[];
|
|
18
|
+
caption?: ReactNode;
|
|
19
|
+
sortable?: boolean;
|
|
20
|
+
pagination?: boolean;
|
|
21
|
+
pageSize?: number;
|
|
22
|
+
selectable?: boolean;
|
|
23
|
+
selectedRowIds?: string[];
|
|
24
|
+
getRowId?: (row: TData, index: number) => string;
|
|
25
|
+
onSelectionChange?: (ids: string[], rows: TData[]) => void;
|
|
26
|
+
onRowClick?: (row: TData) => void;
|
|
27
|
+
actions?: boolean;
|
|
28
|
+
actionItems?: TableActionDefinition<TData>[];
|
|
29
|
+
renderRowActions?: (row: TData) => ReactNode;
|
|
30
|
+
renderExpandedRow?: (row: TData) => ReactNode;
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
emptyState?: ReactNode;
|
|
33
|
+
error?: ReactNode;
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface TableHeaderCellProps {
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
sortable?: boolean;
|
|
39
|
+
sortDirection?: TableSortDirection;
|
|
40
|
+
onSort?: () => void;
|
|
41
|
+
scope?: "col" | "row";
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const TableVariants: readonly [{
|
|
2
|
+
readonly id: "default";
|
|
3
|
+
readonly name: "Default";
|
|
4
|
+
readonly props: {};
|
|
5
|
+
}, {
|
|
6
|
+
readonly id: "loading";
|
|
7
|
+
readonly name: "Loading";
|
|
8
|
+
readonly props: {
|
|
9
|
+
readonly loading: true;
|
|
10
|
+
};
|
|
11
|
+
}, {
|
|
12
|
+
readonly id: "empty";
|
|
13
|
+
readonly name: "Empty";
|
|
14
|
+
readonly props: {
|
|
15
|
+
readonly emptyState: "Neboli nájdené žiadne objekty.";
|
|
16
|
+
};
|
|
17
|
+
}, {
|
|
18
|
+
readonly id: "error";
|
|
19
|
+
readonly name: "Error";
|
|
20
|
+
readonly props: {
|
|
21
|
+
readonly error: "Tabuľku sa nepodarilo načítať.";
|
|
22
|
+
};
|
|
23
|
+
}];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface TableActionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
icon: ReactNode;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function TableAction({ icon, label, className, type, onClick, ...props }: TableActionProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const TableActionVariants: readonly [{
|
|
2
|
+
readonly id: "edit";
|
|
3
|
+
readonly name: "Edit";
|
|
4
|
+
readonly props: {
|
|
5
|
+
readonly label: "Upraviť";
|
|
6
|
+
readonly icon: "✎";
|
|
7
|
+
};
|
|
8
|
+
}, {
|
|
9
|
+
readonly id: "share";
|
|
10
|
+
readonly name: "Share";
|
|
11
|
+
readonly props: {
|
|
12
|
+
readonly label: "Zdieľať";
|
|
13
|
+
readonly icon: "↗";
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
readonly id: "delete";
|
|
17
|
+
readonly name: "Delete";
|
|
18
|
+
readonly props: {
|
|
19
|
+
readonly label: "Vymazať";
|
|
20
|
+
readonly icon: "⌫";
|
|
21
|
+
};
|
|
22
|
+
}];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type TableActionProps } from "../TableAction/TableAction.js";
|
|
2
|
+
export interface TableActionDefinition<TData = unknown> extends Omit<TableActionProps, "onClick"> {
|
|
3
|
+
id: string;
|
|
4
|
+
onClick?: (row: TData) => void;
|
|
5
|
+
}
|
|
6
|
+
export interface TableActionsProps<TData = unknown> {
|
|
7
|
+
row: TData;
|
|
8
|
+
actions?: TableActionDefinition<TData>[];
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function TableActions<TData = unknown>({ row, actions, className }: TableActionsProps<TData>): import("react").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const TableActionsVariants: readonly [{
|
|
2
|
+
readonly id: "default";
|
|
3
|
+
readonly name: "Default";
|
|
4
|
+
readonly props: {
|
|
5
|
+
readonly row: {
|
|
6
|
+
readonly id: 1;
|
|
7
|
+
readonly name: "Administratívna budova";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
readonly id: "custom";
|
|
12
|
+
readonly name: "Custom actions";
|
|
13
|
+
readonly props: {
|
|
14
|
+
readonly row: {
|
|
15
|
+
readonly id: 1;
|
|
16
|
+
readonly name: "Administratívna budova";
|
|
17
|
+
};
|
|
18
|
+
readonly actions: readonly [{
|
|
19
|
+
readonly id: "edit";
|
|
20
|
+
readonly label: "Upraviť";
|
|
21
|
+
readonly icon: "✎";
|
|
22
|
+
}, {
|
|
23
|
+
readonly id: "share";
|
|
24
|
+
readonly label: "Zdieľať";
|
|
25
|
+
readonly icon: "↗";
|
|
26
|
+
}];
|
|
27
|
+
};
|
|
28
|
+
}];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface TableExpandProps {
|
|
2
|
+
expanded?: boolean;
|
|
3
|
+
onChange?: (expanded: boolean) => void;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function TableExpand({ expanded, onChange, disabled, label }: TableExpandProps): import("react").JSX.Element;
|