lucent-ui 0.1.1 → 0.3.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/dist/index.cjs +22 -17
- package/dist/index.d.ts +76 -1
- package/dist/index.js +917 -515
- package/dist-cli/cli/figma.js +41 -0
- package/dist-cli/cli/index.js +120 -0
- package/dist-cli/cli/mapper.js +162 -0
- package/dist-cli/cli/template.manifest.json +83 -0
- package/dist-cli/cli/types.js +1 -0
- package/dist-cli/src/tokens/types.js +1 -0
- package/dist-server/src/manifest/examples/button.manifest.js +1 -1
- package/dist-server/src/manifest/index.js +1 -1
- package/package.json +6 -3
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';
|
|
@@ -84,6 +85,21 @@ export declare type BadgeVariant = 'neutral' | 'success' | 'warning' | 'danger'
|
|
|
84
85
|
*/
|
|
85
86
|
export declare const brandTokens: Partial<LucentTokens>;
|
|
86
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
|
+
|
|
87
103
|
export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
88
104
|
|
|
89
105
|
export declare const ButtonManifest: ComponentManifest;
|
|
@@ -139,6 +155,17 @@ export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInpu
|
|
|
139
155
|
|
|
140
156
|
export declare type CheckboxSize = 'sm' | 'md';
|
|
141
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
|
+
|
|
142
169
|
/**
|
|
143
170
|
* The domain of a component.
|
|
144
171
|
* "neutral" means the component is domain-agnostic and reusable
|
|
@@ -335,7 +362,7 @@ export declare interface LucentTokens extends SemanticColorTokens, TypographyTok
|
|
|
335
362
|
*/
|
|
336
363
|
export declare function makeLibraryCSS(tokens: LucentTokens, selector?: string): string;
|
|
337
364
|
|
|
338
|
-
export declare const MANIFEST_SPEC_VERSION = "0
|
|
365
|
+
export declare const MANIFEST_SPEC_VERSION = "1.0";
|
|
339
366
|
|
|
340
367
|
declare interface MotionTokens {
|
|
341
368
|
durationFast: string;
|
|
@@ -346,6 +373,37 @@ declare interface MotionTokens {
|
|
|
346
373
|
easingDecelerate: string;
|
|
347
374
|
}
|
|
348
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
|
+
|
|
349
407
|
export declare interface PropDescriptor {
|
|
350
408
|
/** Prop name as it appears in the component API */
|
|
351
409
|
name: string;
|
|
@@ -535,6 +593,23 @@ export declare interface SpinnerProps {
|
|
|
535
593
|
|
|
536
594
|
export declare type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
537
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
|
+
|
|
538
613
|
export declare function Tag({ children, variant, size, onDismiss, disabled }: TagProps): JSX_2.Element;
|
|
539
614
|
|
|
540
615
|
export declare const TagManifest: ComponentManifest;
|