lucent-ui 0.1.0 → 0.2.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/README.md +95 -19
- package/dist/index.cjs +22 -17
- package/dist/index.d.ts +83 -2
- package/dist/index.js +1078 -672
- package/package.json +9 -4
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { ForwardRefExoticComponent } from 'react';
|
|
|
5
5
|
import { ImgHTMLAttributes } from 'react';
|
|
6
6
|
import { InputHTMLAttributes } from 'react';
|
|
7
7
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
8
|
+
import { MouseEventHandler } from 'react';
|
|
8
9
|
import { ReactNode } from 'react';
|
|
9
10
|
import { RefAttributes } from 'react';
|
|
10
11
|
import { SelectHTMLAttributes } from 'react';
|
|
@@ -55,7 +56,7 @@ export declare interface AvatarProps extends Omit<ImgHTMLAttributes<HTMLImageEle
|
|
|
55
56
|
|
|
56
57
|
export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
57
58
|
|
|
58
|
-
export declare function Badge({ variant, size, dot, children }: BadgeProps): JSX_2.Element;
|
|
59
|
+
export declare function Badge({ variant, size, dot, children, style }: BadgeProps): JSX_2.Element;
|
|
59
60
|
|
|
60
61
|
export declare const BadgeManifest: ComponentManifest;
|
|
61
62
|
|
|
@@ -64,6 +65,7 @@ export declare interface BadgeProps {
|
|
|
64
65
|
size?: BadgeSize;
|
|
65
66
|
children: ReactNode;
|
|
66
67
|
dot?: boolean;
|
|
68
|
+
style?: CSSProperties;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
export declare type BadgeSize = 'sm' | 'md';
|
|
@@ -83,6 +85,21 @@ export declare type BadgeVariant = 'neutral' | 'success' | 'warning' | 'danger'
|
|
|
83
85
|
*/
|
|
84
86
|
export declare const brandTokens: Partial<LucentTokens>;
|
|
85
87
|
|
|
88
|
+
export declare function Breadcrumb({ items, separator, style }: BreadcrumbProps): JSX_2.Element;
|
|
89
|
+
|
|
90
|
+
export declare interface BreadcrumbItem {
|
|
91
|
+
label: ReactNode;
|
|
92
|
+
href?: string;
|
|
93
|
+
onClick?: () => void;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export declare interface BreadcrumbProps {
|
|
97
|
+
items: BreadcrumbItem[];
|
|
98
|
+
/** Separator between items. Defaults to "/" */
|
|
99
|
+
separator?: ReactNode;
|
|
100
|
+
style?: CSSProperties;
|
|
101
|
+
}
|
|
102
|
+
|
|
86
103
|
export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
87
104
|
|
|
88
105
|
export declare const ButtonManifest: ComponentManifest;
|
|
@@ -92,10 +109,14 @@ export declare interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElem
|
|
|
92
109
|
size?: ButtonSize;
|
|
93
110
|
loading?: boolean;
|
|
94
111
|
fullWidth?: boolean;
|
|
112
|
+
/** When true, spaces content to the edges (justifyContent: space-between). Useful with fullWidth + rightIcon/chevron. */
|
|
113
|
+
spread?: boolean;
|
|
95
114
|
leftIcon?: ReactNode;
|
|
96
115
|
rightIcon?: ReactNode;
|
|
97
116
|
/** Appends a chevron-down icon after the label (or rightIcon). Useful for dropdown triggers. */
|
|
98
117
|
chevron?: boolean;
|
|
118
|
+
/** Disables the built-in hover background/border overrides. Use when passing custom colours via style. */
|
|
119
|
+
disableHoverStyles?: boolean;
|
|
99
120
|
}
|
|
100
121
|
|
|
101
122
|
export declare type ButtonSize = 'sm' | 'md' | 'lg';
|
|
@@ -134,6 +155,17 @@ export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInpu
|
|
|
134
155
|
|
|
135
156
|
export declare type CheckboxSize = 'sm' | 'md';
|
|
136
157
|
|
|
158
|
+
export declare function Collapsible({ trigger, children, defaultOpen, open, onOpenChange, style }: CollapsibleProps): JSX_2.Element;
|
|
159
|
+
|
|
160
|
+
export declare interface CollapsibleProps {
|
|
161
|
+
trigger: ReactNode;
|
|
162
|
+
children: ReactNode;
|
|
163
|
+
defaultOpen?: boolean;
|
|
164
|
+
open?: boolean;
|
|
165
|
+
onOpenChange?: (open: boolean) => void;
|
|
166
|
+
style?: CSSProperties;
|
|
167
|
+
}
|
|
168
|
+
|
|
137
169
|
/**
|
|
138
170
|
* The domain of a component.
|
|
139
171
|
* "neutral" means the component is domain-agnostic and reusable
|
|
@@ -205,7 +237,7 @@ export declare interface CompositionNode {
|
|
|
205
237
|
|
|
206
238
|
export declare const darkTokens: LucentTokens;
|
|
207
239
|
|
|
208
|
-
export declare function Divider({ orientation, label, spacing }: DividerProps): JSX_2.Element;
|
|
240
|
+
export declare function Divider({ orientation, label, spacing, style }: DividerProps): JSX_2.Element;
|
|
209
241
|
|
|
210
242
|
export declare const DividerManifest: ComponentManifest;
|
|
211
243
|
|
|
@@ -215,6 +247,7 @@ export declare interface DividerProps {
|
|
|
215
247
|
orientation?: DividerOrientation;
|
|
216
248
|
label?: string;
|
|
217
249
|
spacing?: string;
|
|
250
|
+
style?: CSSProperties;
|
|
218
251
|
}
|
|
219
252
|
|
|
220
253
|
export declare function EmptyState({ illustration, title, description, action, style, }: EmptyStateProps): JSX_2.Element;
|
|
@@ -340,6 +373,37 @@ declare interface MotionTokens {
|
|
|
340
373
|
easingDecelerate: string;
|
|
341
374
|
}
|
|
342
375
|
|
|
376
|
+
export declare function NavLink({ children, href, isActive, icon, disabled, onClick, as, style, }: NavLinkProps): JSX_2.Element;
|
|
377
|
+
|
|
378
|
+
export declare interface NavLinkProps {
|
|
379
|
+
children: ReactNode;
|
|
380
|
+
href?: string;
|
|
381
|
+
isActive?: boolean;
|
|
382
|
+
icon?: ReactNode;
|
|
383
|
+
disabled?: boolean;
|
|
384
|
+
onClick?: MouseEventHandler;
|
|
385
|
+
/** Polymorphic root element. Defaults to `<a>`. Use e.g. `Link` from react-router. */
|
|
386
|
+
as?: React.ElementType;
|
|
387
|
+
style?: CSSProperties;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export declare function PageLayout({ children, header, sidebar, sidebarWidth, headerHeight, sidebarCollapsed, mainStyle, style, }: PageLayoutProps): JSX_2.Element;
|
|
391
|
+
|
|
392
|
+
export declare interface PageLayoutProps {
|
|
393
|
+
children: ReactNode;
|
|
394
|
+
header?: ReactNode;
|
|
395
|
+
sidebar?: ReactNode;
|
|
396
|
+
/** Sidebar width in px or any CSS value. Default: 240 */
|
|
397
|
+
sidebarWidth?: number | string;
|
|
398
|
+
/** Header height in px or any CSS value. Default: 48 */
|
|
399
|
+
headerHeight?: number | string;
|
|
400
|
+
/** Collapse the sidebar to zero width */
|
|
401
|
+
sidebarCollapsed?: boolean;
|
|
402
|
+
/** Style overrides for the main content card (border, borderRadius, boxShadow, etc.) */
|
|
403
|
+
mainStyle?: CSSProperties;
|
|
404
|
+
style?: CSSProperties;
|
|
405
|
+
}
|
|
406
|
+
|
|
343
407
|
export declare interface PropDescriptor {
|
|
344
408
|
/** Prop name as it appears in the component API */
|
|
345
409
|
name: string;
|
|
@@ -529,6 +593,23 @@ export declare interface SpinnerProps {
|
|
|
529
593
|
|
|
530
594
|
export declare type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
531
595
|
|
|
596
|
+
export declare interface TabItem {
|
|
597
|
+
value: string;
|
|
598
|
+
label: ReactNode;
|
|
599
|
+
content: ReactNode;
|
|
600
|
+
disabled?: boolean;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
export declare function Tabs({ tabs, defaultValue, value, onChange, style }: TabsProps): JSX_2.Element;
|
|
604
|
+
|
|
605
|
+
export declare interface TabsProps {
|
|
606
|
+
tabs: TabItem[];
|
|
607
|
+
defaultValue?: string;
|
|
608
|
+
value?: string;
|
|
609
|
+
onChange?: (value: string) => void;
|
|
610
|
+
style?: CSSProperties;
|
|
611
|
+
}
|
|
612
|
+
|
|
532
613
|
export declare function Tag({ children, variant, size, onDismiss, disabled }: TagProps): JSX_2.Element;
|
|
533
614
|
|
|
534
615
|
export declare const TagManifest: ComponentManifest;
|