lucent-ui 0.9.1 → 0.10.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 +74 -36
- package/dist/index.d.ts +110 -2
- package/dist/index.js +2046 -1413
- package/dist-cli/cli/entry.js +32 -0
- package/dist-cli/cli/init/index.js +115 -0
- package/dist-cli/cli/init/prompts.js +25 -0
- package/dist-cli/src/tokens/presets/types.js +1 -0
- package/dist-server/server/index.js +45 -0
- package/dist-server/server/presets.js +105 -0
- package/dist-server/src/components/molecules/Card/Card.manifest.js +14 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -75,6 +75,8 @@ export declare type BadgeSize = 'sm' | 'md';
|
|
|
75
75
|
|
|
76
76
|
export declare type BadgeVariant = 'neutral' | 'success' | 'warning' | 'danger' | 'info' | 'accent';
|
|
77
77
|
|
|
78
|
+
export declare const brandPalette: ColorPalette;
|
|
79
|
+
|
|
78
80
|
/**
|
|
79
81
|
* Gold brand token overrides — the original lucentui.ai accent palette.
|
|
80
82
|
*
|
|
@@ -130,6 +132,13 @@ export declare type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger'
|
|
|
130
132
|
|
|
131
133
|
export declare function Card({ header, footer, children, padding, shadow, radius, style, }: CardProps): JSX_2.Element;
|
|
132
134
|
|
|
135
|
+
export declare function CardBleed({ children, style }: CardBleedProps): JSX_2.Element;
|
|
136
|
+
|
|
137
|
+
export declare interface CardBleedProps {
|
|
138
|
+
children: ReactNode;
|
|
139
|
+
style?: CSSProperties;
|
|
140
|
+
}
|
|
141
|
+
|
|
133
142
|
export declare const CardManifest: ComponentManifest;
|
|
134
143
|
|
|
135
144
|
export declare type CardPadding = 'none' | 'sm' | 'md' | 'lg';
|
|
@@ -207,6 +216,12 @@ export declare const COLOR_PICKER_MANIFEST: ComponentManifest;
|
|
|
207
216
|
|
|
208
217
|
export declare const COLOR_SWATCH_MANIFEST: ComponentManifest;
|
|
209
218
|
|
|
219
|
+
export declare interface ColorPalette {
|
|
220
|
+
name: string;
|
|
221
|
+
light: ThemeAnchors;
|
|
222
|
+
dark: ThemeAnchors;
|
|
223
|
+
}
|
|
224
|
+
|
|
210
225
|
export declare function ColorPicker({ value, onChange, label, disabled, presetGroups, id, style, }: ColorPickerProps): JSX_2.Element;
|
|
211
226
|
|
|
212
227
|
export declare namespace ColorPicker {
|
|
@@ -268,6 +283,8 @@ export declare interface CommandPaletteProps {
|
|
|
268
283
|
style?: CSSProperties;
|
|
269
284
|
}
|
|
270
285
|
|
|
286
|
+
export declare const compactDensity: DensityPreset;
|
|
287
|
+
|
|
271
288
|
/**
|
|
272
289
|
* The domain of a component.
|
|
273
290
|
* "neutral" means the component is domain-agnostic and reusable
|
|
@@ -438,6 +455,17 @@ export declare interface DateRangePickerProps {
|
|
|
438
455
|
style?: CSSProperties;
|
|
439
456
|
}
|
|
440
457
|
|
|
458
|
+
export declare const defaultDensity: DensityPreset;
|
|
459
|
+
|
|
460
|
+
export declare const defaultPalette: ColorPalette;
|
|
461
|
+
|
|
462
|
+
export declare type DensityName = 'compact' | 'default' | 'spacious';
|
|
463
|
+
|
|
464
|
+
export declare interface DensityPreset {
|
|
465
|
+
name: string;
|
|
466
|
+
tokens: SpacingTokens;
|
|
467
|
+
}
|
|
468
|
+
|
|
441
469
|
/**
|
|
442
470
|
* Derives a complete dark-mode token set from a light-mode token set.
|
|
443
471
|
*
|
|
@@ -475,6 +503,14 @@ export declare function deriveDarkFromLight(light: LucentTokens): LucentTokens;
|
|
|
475
503
|
*/
|
|
476
504
|
export declare function deriveTokens(overrides: Partial<LucentTokens>, merged: LucentTokens, theme: Theme): Partial<LucentTokens>;
|
|
477
505
|
|
|
506
|
+
export declare interface DesignPreset {
|
|
507
|
+
name: string;
|
|
508
|
+
palette: ColorPalette;
|
|
509
|
+
shape: ShapePreset;
|
|
510
|
+
density: DensityPreset;
|
|
511
|
+
shadow: ShadowPreset;
|
|
512
|
+
}
|
|
513
|
+
|
|
478
514
|
export declare function Divider({ orientation, label, spacing, style }: DividerProps): JSX_2.Element;
|
|
479
515
|
|
|
480
516
|
export declare const DividerManifest: ComponentManifest;
|
|
@@ -488,6 +524,10 @@ export declare interface DividerProps {
|
|
|
488
524
|
style?: CSSProperties;
|
|
489
525
|
}
|
|
490
526
|
|
|
527
|
+
export declare const elevatedShadow: ShadowPreset;
|
|
528
|
+
|
|
529
|
+
export declare const emeraldPalette: ColorPalette;
|
|
530
|
+
|
|
491
531
|
export declare function EmptyState({ illustration, title, description, action, style, }: EmptyStateProps): JSX_2.Element;
|
|
492
532
|
|
|
493
533
|
export declare const EmptyStateManifest: ComponentManifest;
|
|
@@ -500,6 +540,8 @@ export declare interface EmptyStateProps {
|
|
|
500
540
|
style?: CSSProperties;
|
|
501
541
|
}
|
|
502
542
|
|
|
543
|
+
export declare const enterprisePreset: DesignPreset;
|
|
544
|
+
|
|
503
545
|
export declare const FILE_UPLOAD_MANIFEST: ComponentManifest;
|
|
504
546
|
|
|
505
547
|
export declare function FileUpload({ accept, multiple, maxSize, value: controlledValue, onChange, onError, disabled, style, }: FileUploadProps): JSX_2.Element;
|
|
@@ -518,6 +560,8 @@ export declare interface FileUploadProps {
|
|
|
518
560
|
style?: CSSProperties;
|
|
519
561
|
}
|
|
520
562
|
|
|
563
|
+
export declare const flatShadow: ShadowPreset;
|
|
564
|
+
|
|
521
565
|
export declare function FormField({ label, htmlFor, required, helperText, errorMessage, children, style, }: FormFieldProps): JSX_2.Element;
|
|
522
566
|
|
|
523
567
|
export declare const FormFieldManifest: ComponentManifest;
|
|
@@ -561,6 +605,8 @@ export declare interface IconProps {
|
|
|
561
605
|
|
|
562
606
|
export declare type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
563
607
|
|
|
608
|
+
export declare const indigoPalette: ColorPalette;
|
|
609
|
+
|
|
564
610
|
export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement>>;
|
|
565
611
|
|
|
566
612
|
export declare const InputManifest: ComponentManifest;
|
|
@@ -613,12 +659,20 @@ declare interface LucentContextValue {
|
|
|
613
659
|
* <App />
|
|
614
660
|
* </LucentProvider>
|
|
615
661
|
*/
|
|
616
|
-
export declare function LucentProvider({ theme, tokens: tokenOverrides, anchors, children, }: LucentProviderProps): JSX_2.Element;
|
|
662
|
+
export declare function LucentProvider({ theme, preset, tokens: tokenOverrides, anchors, children, }: LucentProviderProps): JSX_2.Element;
|
|
617
663
|
|
|
618
664
|
export declare const LucentProviderManifest: ComponentManifest;
|
|
619
665
|
|
|
620
666
|
export declare interface LucentProviderProps {
|
|
621
667
|
theme?: Theme;
|
|
668
|
+
/**
|
|
669
|
+
* A design preset that bundles palette, shape, density, and shadow tokens.
|
|
670
|
+
* Pass a combined preset name (`"modern"`, `"enterprise"`, `"playful"`) or
|
|
671
|
+
* an object to mix dimensions: `{ palette: 'indigo', shape: 'pill' }`.
|
|
672
|
+
*
|
|
673
|
+
* Precedence (later wins): base theme → preset → anchors → tokens.
|
|
674
|
+
*/
|
|
675
|
+
preset?: PresetProp;
|
|
622
676
|
/**
|
|
623
677
|
* Full or partial token overrides. Individual tokens can be set here and
|
|
624
678
|
* any missing variant tokens will be derived automatically.
|
|
@@ -648,6 +702,8 @@ export declare function makeLibraryCSS(tokens: LucentTokens, selector?: string):
|
|
|
648
702
|
|
|
649
703
|
export declare const MANIFEST_SPEC_VERSION = "1.0";
|
|
650
704
|
|
|
705
|
+
export declare const modernPreset: DesignPreset;
|
|
706
|
+
|
|
651
707
|
declare interface MotionTokens {
|
|
652
708
|
durationFast: string;
|
|
653
709
|
durationBase: string;
|
|
@@ -693,6 +749,8 @@ export declare interface NavLinkProps {
|
|
|
693
749
|
style?: CSSProperties;
|
|
694
750
|
}
|
|
695
751
|
|
|
752
|
+
export declare const oceanPalette: ColorPalette;
|
|
753
|
+
|
|
696
754
|
export declare function PageLayout({ children, header, sidebar, sidebarWidth, headerHeight, sidebarCollapsed, rightSidebar, rightSidebarWidth, rightSidebarCollapsed, footer, footerHeight, mainStyle, style, }: PageLayoutProps): JSX_2.Element;
|
|
697
755
|
|
|
698
756
|
export declare interface PageLayoutProps {
|
|
@@ -720,6 +778,21 @@ export declare interface PageLayoutProps {
|
|
|
720
778
|
style?: CSSProperties;
|
|
721
779
|
}
|
|
722
780
|
|
|
781
|
+
export declare type PaletteName = 'default' | 'brand' | 'indigo' | 'emerald' | 'rose' | 'ocean';
|
|
782
|
+
|
|
783
|
+
export declare const pillShape: ShapePreset;
|
|
784
|
+
|
|
785
|
+
export declare const playfulPreset: DesignPreset;
|
|
786
|
+
|
|
787
|
+
export declare type PresetName = 'modern' | 'enterprise' | 'playful';
|
|
788
|
+
|
|
789
|
+
export declare type PresetProp = PresetName | {
|
|
790
|
+
palette?: PaletteName | ColorPalette;
|
|
791
|
+
shape?: ShapeName | ShapePreset;
|
|
792
|
+
density?: DensityName | DensityPreset;
|
|
793
|
+
shadow?: ShadowName | ShadowPreset;
|
|
794
|
+
};
|
|
795
|
+
|
|
723
796
|
export declare interface PropDescriptor {
|
|
724
797
|
/** Prop name as it appears in the component API */
|
|
725
798
|
name: string;
|
|
@@ -779,6 +852,17 @@ declare interface RadiusTokens {
|
|
|
779
852
|
radiusFull: string;
|
|
780
853
|
}
|
|
781
854
|
|
|
855
|
+
/**
|
|
856
|
+
* Resolves a `PresetProp` into a flat `Partial<LucentTokens>` that can be
|
|
857
|
+
* spread over the base theme. Palette colors are fully derived via
|
|
858
|
+
* `createTheme()`, so all hover/active/subtle/text variants are included.
|
|
859
|
+
*/
|
|
860
|
+
export declare function resolvePreset(preset: PresetProp, theme: Theme): Partial<LucentTokens>;
|
|
861
|
+
|
|
862
|
+
export declare const rosePalette: ColorPalette;
|
|
863
|
+
|
|
864
|
+
export declare const roundedShape: ShapePreset;
|
|
865
|
+
|
|
782
866
|
export declare function SearchInput({ value, onChange, placeholder, results, onResultSelect, isLoading, disabled, id, style, }: SearchInputProps): JSX_2.Element;
|
|
783
867
|
|
|
784
868
|
export declare const SearchInputManifest: ComponentManifest;
|
|
@@ -890,6 +974,14 @@ declare interface SemanticColorTokens {
|
|
|
890
974
|
focusRing: string;
|
|
891
975
|
}
|
|
892
976
|
|
|
977
|
+
export declare type ShadowName = 'flat' | 'subtle' | 'elevated';
|
|
978
|
+
|
|
979
|
+
export declare interface ShadowPreset {
|
|
980
|
+
name: string;
|
|
981
|
+
light: ShadowTokens;
|
|
982
|
+
dark: ShadowTokens;
|
|
983
|
+
}
|
|
984
|
+
|
|
893
985
|
declare interface ShadowTokens {
|
|
894
986
|
shadowNone: string;
|
|
895
987
|
shadowSm: string;
|
|
@@ -898,6 +990,15 @@ declare interface ShadowTokens {
|
|
|
898
990
|
shadowXl: string;
|
|
899
991
|
}
|
|
900
992
|
|
|
993
|
+
export declare type ShapeName = 'sharp' | 'rounded' | 'pill';
|
|
994
|
+
|
|
995
|
+
export declare interface ShapePreset {
|
|
996
|
+
name: string;
|
|
997
|
+
tokens: RadiusTokens;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
export declare const sharpShape: ShapePreset;
|
|
1001
|
+
|
|
901
1002
|
export declare function Skeleton({ variant, width, height, lines, animate, radius, style, }: SkeletonProps): JSX_2.Element;
|
|
902
1003
|
|
|
903
1004
|
export declare const SkeletonManifest: ComponentManifest;
|
|
@@ -948,6 +1049,8 @@ declare interface SpacingTokens {
|
|
|
948
1049
|
space24: string;
|
|
949
1050
|
}
|
|
950
1051
|
|
|
1052
|
+
export declare const spaciousDensity: DensityPreset;
|
|
1053
|
+
|
|
951
1054
|
export declare function Spinner({ size, label, color }: SpinnerProps): JSX_2.Element;
|
|
952
1055
|
|
|
953
1056
|
export declare const SpinnerManifest: ComponentManifest;
|
|
@@ -960,6 +1063,8 @@ export declare interface SpinnerProps {
|
|
|
960
1063
|
|
|
961
1064
|
export declare type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
962
1065
|
|
|
1066
|
+
export declare const subtleShadow: ShadowPreset;
|
|
1067
|
+
|
|
963
1068
|
export declare interface TabItem {
|
|
964
1069
|
value: string;
|
|
965
1070
|
label: ReactNode;
|
|
@@ -990,16 +1095,19 @@ export declare interface TableProps extends HTMLAttributes<HTMLTableElement> {
|
|
|
990
1095
|
striped?: boolean;
|
|
991
1096
|
}
|
|
992
1097
|
|
|
993
|
-
export declare function Tabs({ tabs, defaultValue, value, onChange, style }: TabsProps): JSX_2.Element;
|
|
1098
|
+
export declare function Tabs({ tabs, defaultValue, value, onChange, variant, style }: TabsProps): JSX_2.Element;
|
|
994
1099
|
|
|
995
1100
|
export declare interface TabsProps {
|
|
996
1101
|
tabs: TabItem[];
|
|
997
1102
|
defaultValue?: string;
|
|
998
1103
|
value?: string;
|
|
999
1104
|
onChange?: (value: string) => void;
|
|
1105
|
+
variant?: TabsVariant;
|
|
1000
1106
|
style?: CSSProperties;
|
|
1001
1107
|
}
|
|
1002
1108
|
|
|
1109
|
+
export declare type TabsVariant = 'underline' | 'pills';
|
|
1110
|
+
|
|
1003
1111
|
export declare function Tag({ children, variant, size, onDismiss, disabled }: TagProps): JSX_2.Element;
|
|
1004
1112
|
|
|
1005
1113
|
export declare const TagManifest: ComponentManifest;
|