@chainberry/ui-components 1.0.0 → 1.0.2
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 +45 -12
- package/dist/index.cjs +1 -2
- package/dist/index.d.ts +75 -147
- package/dist/index.mjs +3402 -253
- package/dist/styles.css +2 -1
- package/package.json +28 -37
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,149 +1,77 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
export
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
export
|
|
56
|
-
|
|
57
|
-
export
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export
|
|
64
|
-
|
|
65
|
-
export
|
|
66
|
-
|
|
67
|
-
export
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export declare function NavGroup({ label, items, activeId, collapsed, onNavigate, }: NavGroupProps): JSX.Element;
|
|
79
|
-
|
|
80
|
-
/** A titled group of nav items. */
|
|
81
|
-
export declare interface NavGroupConfig {
|
|
82
|
-
/** Section heading (hidden when the drawer is collapsed). */
|
|
83
|
-
label: string;
|
|
84
|
-
items: NavItemConfig[];
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export declare interface NavGroupProps {
|
|
88
|
-
/** Section heading (hidden when collapsed). */
|
|
89
|
-
label?: string;
|
|
90
|
-
items?: NavItemConfig[];
|
|
91
|
-
/** Id of the active item. */
|
|
92
|
-
activeId?: string;
|
|
93
|
-
/** Icon-only rail. */
|
|
94
|
-
collapsed?: boolean;
|
|
95
|
-
onNavigate?: (id: string) => void;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export declare function NavIcon({ name, active }: NavIconProps): JSX.Element;
|
|
99
|
-
|
|
100
|
-
export declare interface NavIconProps {
|
|
101
|
-
name?: IconName;
|
|
102
|
-
/** Full-opacity + text color when active. */
|
|
103
|
-
active?: boolean;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export declare function NavItem({ id, label, icon, active, collapsed, badge, soon, ext, onNavigate, }: NavItemProps): JSX.Element;
|
|
107
|
-
|
|
108
|
-
/** A single navigation entry. */
|
|
109
|
-
export declare interface NavItemConfig {
|
|
110
|
-
/** Stable key + route id. */
|
|
111
|
-
id: string;
|
|
112
|
-
/** Visible label text. */
|
|
113
|
-
label: string;
|
|
114
|
-
/** Icon key (see ICONS). */
|
|
115
|
-
icon: IconName;
|
|
116
|
-
/** Count pill shown on the trailing edge. */
|
|
117
|
-
badge?: number;
|
|
118
|
-
/** Renders a "SOON" tag instead of a badge. */
|
|
119
|
-
soon?: boolean;
|
|
120
|
-
/** External URL → renders as an anchor with a ↗ indicator. */
|
|
121
|
-
ext?: string;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export declare interface NavItemProps extends NavItemConfig {
|
|
125
|
-
/** Active/selected styling. */
|
|
126
|
-
active?: boolean;
|
|
127
|
-
/** Icon-only rail. */
|
|
128
|
-
collapsed?: boolean;
|
|
129
|
-
onNavigate?: (id: string) => void;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export declare function NavLabel({ text }: NavLabelProps): JSX.Element;
|
|
133
|
-
|
|
134
|
-
export declare interface NavLabelProps {
|
|
135
|
-
text?: string;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export declare type NavPreset = keyof typeof NAV_PRESETS;
|
|
139
|
-
|
|
140
|
-
/** PRIMARY_NAV — trimmed navigation. */
|
|
141
|
-
export declare const PRIMARY_NAV: NavGroupConfig[];
|
|
142
|
-
|
|
143
|
-
export declare function SectionHeading({ label }: SectionHeadingProps): JSX.Element;
|
|
144
|
-
|
|
145
|
-
export declare interface SectionHeadingProps {
|
|
146
|
-
label?: string;
|
|
147
|
-
}
|
|
1
|
+
import { Badge } from '../../../react-app/src/components/nav/Badge';
|
|
2
|
+
import { BadgeVariant } from '../../../react-app/src/components/nav/Badge';
|
|
3
|
+
import { Button } from '../../../react-app/src/components/ui/button';
|
|
4
|
+
import { buttonVariants } from '../../../react-app/src/components/ui/button';
|
|
5
|
+
import { ComponentProps } from '../../../react-app/node_modules/@types/react';
|
|
6
|
+
import { findNavItem } from '../../../react-app/src/components/nav/navConfig';
|
|
7
|
+
import { FULL_NAV } from '../../../react-app/src/components/nav/navConfig';
|
|
8
|
+
import { ICON_NAMES } from '../../../react-app/src/components/nav/icons';
|
|
9
|
+
import { IconName } from '../../../react-app/src/components/nav/icons';
|
|
10
|
+
import { ICONS } from '../../../react-app/src/components/nav/icons';
|
|
11
|
+
import { Logo } from '../../../react-app/src/components/nav/Logo';
|
|
12
|
+
import { NAV_ITEMS } from '../../../react-app/src/components/nav/navConfig';
|
|
13
|
+
import { NAV_PRESETS } from '../../../react-app/src/components/nav/navConfig';
|
|
14
|
+
import { NavDrawer } from '../../../react-app/src/components/nav/NavDrawer';
|
|
15
|
+
import { NavGroup } from '../../../react-app/src/components/nav/NavGroup';
|
|
16
|
+
import { NavGroupConfig } from '../../../react-app/src/components/nav/navConfig';
|
|
17
|
+
import { NavIcon } from '../../../react-app/src/components/nav/NavIcon';
|
|
18
|
+
import { NavItem } from '../../../react-app/src/components/nav/NavItem';
|
|
19
|
+
import { NavItemConfig } from '../../../react-app/src/components/nav/navConfig';
|
|
20
|
+
import { NavItemProps } from '../../../react-app/src/components/nav/NavItem';
|
|
21
|
+
import { NavLabel } from '../../../react-app/src/components/nav/NavLabel';
|
|
22
|
+
import { NavPreset } from '../../../react-app/src/components/nav/navConfig';
|
|
23
|
+
import { PRIMARY_NAV } from '../../../react-app/src/components/nav/navConfig';
|
|
24
|
+
import { SectionHeading } from '../../../react-app/src/components/nav/SectionHeading';
|
|
25
|
+
|
|
26
|
+
export { Badge }
|
|
27
|
+
export { Badge as NavBadge }
|
|
28
|
+
|
|
29
|
+
export { BadgeVariant }
|
|
30
|
+
export { BadgeVariant as NavBadgeVariant }
|
|
31
|
+
|
|
32
|
+
export { Button }
|
|
33
|
+
|
|
34
|
+
export { buttonVariants }
|
|
35
|
+
|
|
36
|
+
export { findNavItem }
|
|
37
|
+
|
|
38
|
+
export { FULL_NAV }
|
|
39
|
+
|
|
40
|
+
export { ICON_NAMES }
|
|
41
|
+
|
|
42
|
+
export { IconName }
|
|
43
|
+
|
|
44
|
+
export { ICONS }
|
|
45
|
+
|
|
46
|
+
export { Logo }
|
|
47
|
+
|
|
48
|
+
export { NAV_ITEMS }
|
|
49
|
+
|
|
50
|
+
export { NAV_PRESETS }
|
|
51
|
+
|
|
52
|
+
/** @deprecated use the props of `Badge` instead. */
|
|
53
|
+
export declare type NavBadgeProps = ComponentProps<typeof Badge>;
|
|
54
|
+
|
|
55
|
+
export { NavDrawer }
|
|
56
|
+
|
|
57
|
+
export { NavGroup }
|
|
58
|
+
|
|
59
|
+
export { NavGroupConfig }
|
|
60
|
+
|
|
61
|
+
export { NavIcon }
|
|
62
|
+
|
|
63
|
+
export { NavItem }
|
|
64
|
+
|
|
65
|
+
export { NavItemConfig }
|
|
66
|
+
|
|
67
|
+
export { NavItemProps }
|
|
68
|
+
|
|
69
|
+
export { NavLabel }
|
|
70
|
+
|
|
71
|
+
export { NavPreset }
|
|
72
|
+
|
|
73
|
+
export { PRIMARY_NAV }
|
|
74
|
+
|
|
75
|
+
export { SectionHeading }
|
|
148
76
|
|
|
149
77
|
export { }
|