lucent-ui 0.1.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.
Files changed (33) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +103 -0
  3. package/dist/index.cjs +112 -0
  4. package/dist/index.d.ts +687 -0
  5. package/dist/index.js +3227 -0
  6. package/dist-server/server/index.js +111 -0
  7. package/dist-server/server/registry.js +48 -0
  8. package/dist-server/src/components/atoms/Avatar/Avatar.manifest.js +29 -0
  9. package/dist-server/src/components/atoms/Badge/Badge.manifest.js +29 -0
  10. package/dist-server/src/components/atoms/Button/Button.manifest.js +2 -0
  11. package/dist-server/src/components/atoms/Checkbox/Checkbox.manifest.js +74 -0
  12. package/dist-server/src/components/atoms/Divider/Divider.manifest.js +25 -0
  13. package/dist-server/src/components/atoms/Icon/Icon.manifest.js +54 -0
  14. package/dist-server/src/components/atoms/Input/Input.manifest.js +36 -0
  15. package/dist-server/src/components/atoms/Radio/Radio.manifest.js +82 -0
  16. package/dist-server/src/components/atoms/Select/Select.manifest.js +103 -0
  17. package/dist-server/src/components/atoms/Spinner/Spinner.manifest.js +27 -0
  18. package/dist-server/src/components/atoms/Tag/Tag.manifest.js +62 -0
  19. package/dist-server/src/components/atoms/Text/Text.manifest.js +106 -0
  20. package/dist-server/src/components/atoms/Textarea/Textarea.manifest.js +35 -0
  21. package/dist-server/src/components/atoms/Toggle/Toggle.manifest.js +67 -0
  22. package/dist-server/src/components/atoms/Tooltip/Tooltip.manifest.js +54 -0
  23. package/dist-server/src/components/molecules/Alert/Alert.manifest.js +81 -0
  24. package/dist-server/src/components/molecules/Card/Card.manifest.js +92 -0
  25. package/dist-server/src/components/molecules/EmptyState/EmptyState.manifest.js +79 -0
  26. package/dist-server/src/components/molecules/FormField/FormField.manifest.js +93 -0
  27. package/dist-server/src/components/molecules/SearchInput/SearchInput.manifest.js +102 -0
  28. package/dist-server/src/components/molecules/Skeleton/Skeleton.manifest.js +93 -0
  29. package/dist-server/src/manifest/examples/button.manifest.js +116 -0
  30. package/dist-server/src/manifest/index.js +3 -0
  31. package/dist-server/src/manifest/types.js +1 -0
  32. package/dist-server/src/manifest/validate.js +102 -0
  33. package/package.json +58 -0
@@ -0,0 +1,687 @@
1
+ import { ButtonHTMLAttributes } from 'react';
2
+ import { CSSProperties } from 'react';
3
+ import { default as default_2 } from 'react';
4
+ import { ForwardRefExoticComponent } from 'react';
5
+ import { ImgHTMLAttributes } from 'react';
6
+ import { InputHTMLAttributes } from 'react';
7
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
8
+ import { ReactNode } from 'react';
9
+ import { RefAttributes } from 'react';
10
+ import { SelectHTMLAttributes } from 'react';
11
+ import { TextareaHTMLAttributes } from 'react';
12
+
13
+ export declare interface AccessibilityDescriptor {
14
+ /** ARIA role applied to the root element */
15
+ role?: string;
16
+ /** ARIA attributes used by this component */
17
+ ariaAttributes?: string[];
18
+ /** Keyboard interactions supported */
19
+ keyboardInteractions?: string[];
20
+ /** Plain-English notes for screen reader behaviour */
21
+ notes?: string;
22
+ }
23
+
24
+ export declare function Alert({ variant, title, children, onDismiss, icon, style, }: AlertProps): JSX_2.Element;
25
+
26
+ export declare const AlertManifest: ComponentManifest;
27
+
28
+ export declare interface AlertProps {
29
+ variant?: AlertVariant;
30
+ title?: string;
31
+ children?: ReactNode;
32
+ onDismiss?: () => void;
33
+ icon?: ReactNode;
34
+ style?: CSSProperties;
35
+ }
36
+
37
+ export declare type AlertVariant = 'info' | 'success' | 'warning' | 'danger';
38
+
39
+ /**
40
+ * Asserts a manifest is valid. Throws a descriptive error if not.
41
+ * Use in tests or at component module load time.
42
+ */
43
+ export declare function assertManifest(manifest: unknown): asserts manifest is ComponentManifest;
44
+
45
+ export declare function Avatar({ src, alt, size, initials, style, ...rest }: AvatarProps): JSX_2.Element;
46
+
47
+ export declare const AvatarManifest: ComponentManifest;
48
+
49
+ export declare interface AvatarProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt'> {
50
+ src?: string;
51
+ alt: string;
52
+ size?: AvatarSize;
53
+ initials?: string;
54
+ }
55
+
56
+ export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
57
+
58
+ export declare function Badge({ variant, size, dot, children }: BadgeProps): JSX_2.Element;
59
+
60
+ export declare const BadgeManifest: ComponentManifest;
61
+
62
+ export declare interface BadgeProps {
63
+ variant?: BadgeVariant;
64
+ size?: BadgeSize;
65
+ children: ReactNode;
66
+ dot?: boolean;
67
+ }
68
+
69
+ export declare type BadgeSize = 'sm' | 'md';
70
+
71
+ export declare type BadgeVariant = 'neutral' | 'success' | 'warning' | 'danger' | 'info' | 'accent';
72
+
73
+ /**
74
+ * Gold brand token overrides — the original lucentui.ai accent palette.
75
+ *
76
+ * Pass to `<LucentProvider tokens={brandTokens}>` to opt in to the gold accent.
77
+ * `textOnAccent` is automatically computed by the provider via `getContrastText`,
78
+ * so text on accent surfaces will always meet WCAG AA contrast.
79
+ *
80
+ * @example
81
+ * import { brandTokens } from 'lucent-ui';
82
+ * <LucentProvider tokens={brandTokens}><App /></LucentProvider>
83
+ */
84
+ export declare const brandTokens: Partial<LucentTokens>;
85
+
86
+ export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
87
+
88
+ export declare const ButtonManifest: ComponentManifest;
89
+
90
+ export declare interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
91
+ variant?: ButtonVariant;
92
+ size?: ButtonSize;
93
+ loading?: boolean;
94
+ fullWidth?: boolean;
95
+ leftIcon?: ReactNode;
96
+ rightIcon?: ReactNode;
97
+ /** Appends a chevron-down icon after the label (or rightIcon). Useful for dropdown triggers. */
98
+ chevron?: boolean;
99
+ }
100
+
101
+ export declare type ButtonSize = 'sm' | 'md' | 'lg';
102
+
103
+ export declare type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
104
+
105
+ export declare function Card({ header, footer, children, padding, shadow, radius, style, }: CardProps): JSX_2.Element;
106
+
107
+ export declare const CardManifest: ComponentManifest;
108
+
109
+ export declare type CardPadding = 'none' | 'sm' | 'md' | 'lg';
110
+
111
+ export declare interface CardProps {
112
+ header?: ReactNode;
113
+ footer?: ReactNode;
114
+ children: ReactNode;
115
+ padding?: CardPadding;
116
+ shadow?: CardShadow;
117
+ radius?: CardRadius;
118
+ style?: CSSProperties;
119
+ }
120
+
121
+ export declare type CardRadius = 'none' | 'sm' | 'md' | 'lg';
122
+
123
+ export declare type CardShadow = 'none' | 'sm' | 'md' | 'lg';
124
+
125
+ export declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLInputElement>>;
126
+
127
+ export declare const CheckboxManifest: ComponentManifest;
128
+
129
+ export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
130
+ label?: string;
131
+ size?: CheckboxSize;
132
+ indeterminate?: boolean;
133
+ }
134
+
135
+ export declare type CheckboxSize = 'sm' | 'md';
136
+
137
+ /**
138
+ * The domain of a component.
139
+ * "neutral" means the component is domain-agnostic and reusable
140
+ * across any product context.
141
+ */
142
+ export declare type ComponentDomain = 'neutral' | string;
143
+
144
+ export declare interface ComponentManifest {
145
+ /**
146
+ * Unique identifier — kebab-case, e.g. "button", "form-field"
147
+ */
148
+ id: string;
149
+ /** Display name shown in docs and tooling */
150
+ name: string;
151
+ /** Position in the design system hierarchy */
152
+ tier: ComponentTier;
153
+ /**
154
+ * Product domain this component belongs to.
155
+ * Use "neutral" for general-purpose components.
156
+ */
157
+ domain: ComponentDomain;
158
+ /** One-sentence description for AI context */
159
+ description: string;
160
+ /** All accepted props */
161
+ props: readonly PropDescriptor[];
162
+ /** Code examples an AI can use to generate correct usage */
163
+ usageExamples: readonly UsageExample[];
164
+ /**
165
+ * For molecules, blocks, flows and overlays — the sub-components
166
+ * this component is composed from.
167
+ */
168
+ compositionGraph: readonly CompositionNode[];
169
+ /**
170
+ * Design intent: explain the "why" behind visual and interaction decisions.
171
+ * This is the key field for AI-legibility — it conveys context that
172
+ * prop types alone cannot.
173
+ */
174
+ designIntent: string;
175
+ /** Accessibility metadata */
176
+ accessibility?: AccessibilityDescriptor;
177
+ /**
178
+ * Spec version this manifest conforms to.
179
+ * Format: "MAJOR.MINOR" — e.g. "0.1"
180
+ */
181
+ specVersion: string;
182
+ }
183
+
184
+ /**
185
+ * The tier of a component in the design system hierarchy.
186
+ *
187
+ * - atom: Indivisible UI primitive (Button, Input, Badge…)
188
+ * - molecule: Composition of atoms (FormField, Card, Alert…)
189
+ * - block: Page-section-level composition (PageHeader, SidebarNav…)
190
+ * - flow: Multi-step or stateful sequences (Wizard, Onboarding…)
191
+ * - overlay: Layers above page content (Modal, Drawer, Tooltip…)
192
+ */
193
+ export declare type ComponentTier = 'atom' | 'molecule' | 'block' | 'flow' | 'overlay';
194
+
195
+ export declare interface CompositionNode {
196
+ /** Component id this node refers to */
197
+ componentId: string;
198
+ /** Human-readable name */
199
+ componentName: string;
200
+ /** How it is used in the composition */
201
+ role: string;
202
+ /** Whether this sub-component is always present or conditional */
203
+ required: boolean;
204
+ }
205
+
206
+ export declare const darkTokens: LucentTokens;
207
+
208
+ export declare function Divider({ orientation, label, spacing }: DividerProps): JSX_2.Element;
209
+
210
+ export declare const DividerManifest: ComponentManifest;
211
+
212
+ export declare type DividerOrientation = 'horizontal' | 'vertical';
213
+
214
+ export declare interface DividerProps {
215
+ orientation?: DividerOrientation;
216
+ label?: string;
217
+ spacing?: string;
218
+ }
219
+
220
+ export declare function EmptyState({ illustration, title, description, action, style, }: EmptyStateProps): JSX_2.Element;
221
+
222
+ export declare const EmptyStateManifest: ComponentManifest;
223
+
224
+ export declare interface EmptyStateProps {
225
+ illustration?: ReactNode;
226
+ title: string;
227
+ description?: string;
228
+ action?: ReactNode;
229
+ style?: CSSProperties;
230
+ }
231
+
232
+ export declare function FormField({ label, htmlFor, required, helperText, errorMessage, children, style, }: FormFieldProps): JSX_2.Element;
233
+
234
+ export declare const FormFieldManifest: ComponentManifest;
235
+
236
+ export declare interface FormFieldProps {
237
+ label?: string;
238
+ htmlFor?: string;
239
+ required?: boolean;
240
+ helperText?: string;
241
+ errorMessage?: string;
242
+ children: ReactNode;
243
+ style?: CSSProperties;
244
+ }
245
+
246
+ /**
247
+ * Returns `'#000000'` or `'#ffffff'` — whichever has higher WCAG contrast
248
+ * against the given background hex color.
249
+ *
250
+ * Use this to guarantee AA-compliant text on any solid accent surface.
251
+ *
252
+ * @example
253
+ * getContrastText('#e9c96b') // → '#000000' (gold bg → black text, 8.6:1)
254
+ * getContrastText('#111827') // → '#ffffff' (near-black bg → white text, 16.7:1)
255
+ */
256
+ export declare function getContrastText(hex: string): '#000000' | '#ffffff';
257
+
258
+ export declare function Icon({ children, size, label, color, style }: IconProps): JSX_2.Element;
259
+
260
+ export declare const IconManifest: ComponentManifest;
261
+
262
+ export declare interface IconProps {
263
+ /** The icon element — any SVG or icon-set component. */
264
+ children: ReactNode;
265
+ size?: IconSize;
266
+ /** Accessible label. When provided the wrapper gets role="img". Omit for decorative icons. */
267
+ label?: string;
268
+ /** CSS color value. Defaults to currentColor so the icon inherits parent text colour. */
269
+ color?: string;
270
+ style?: CSSProperties;
271
+ }
272
+
273
+ export declare type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
274
+
275
+ export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement>>;
276
+
277
+ export declare const InputManifest: ComponentManifest;
278
+
279
+ export declare interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
280
+ type?: InputType;
281
+ label?: string;
282
+ helperText?: string;
283
+ errorText?: string;
284
+ leftElement?: ReactNode;
285
+ rightElement?: ReactNode;
286
+ }
287
+
288
+ export declare type InputType = 'text' | 'number' | 'password' | 'email' | 'tel' | 'url' | 'search';
289
+
290
+ export declare function isValidPropDescriptor(prop: unknown): prop is PropDescriptor;
291
+
292
+ export declare const lightTokens: LucentTokens;
293
+
294
+ export declare const LUCENT_UI_VERSION = "0.1.0";
295
+
296
+ declare interface LucentContextValue {
297
+ theme: Theme;
298
+ tokens: LucentTokens;
299
+ }
300
+
301
+ /**
302
+ * Wraps your app (or a subtree) and injects Lucent design tokens
303
+ * as CSS custom properties into <head>. Uses useLayoutEffect so
304
+ * styles are applied synchronously before first paint.
305
+ *
306
+ * @example
307
+ * <LucentProvider theme="dark">
308
+ * <App />
309
+ * </LucentProvider>
310
+ */
311
+ export declare function LucentProvider({ theme, tokens: tokenOverrides, children, }: LucentProviderProps): JSX_2.Element;
312
+
313
+ export declare interface LucentProviderProps {
314
+ theme?: Theme;
315
+ tokens?: Partial<LucentTokens>;
316
+ children: ReactNode;
317
+ }
318
+
319
+ export declare interface LucentTokens extends SemanticColorTokens, TypographyTokens, SpacingTokens, RadiusTokens, ShadowTokens, MotionTokens {
320
+ }
321
+
322
+ /**
323
+ * Generates a CSS string of custom properties from a token set.
324
+ * Inject the result into a <style> tag or a CSS-in-JS solution.
325
+ *
326
+ * @example
327
+ * const css = makeLibraryCSS(lightTokens);
328
+ * document.getElementById('lucent-tokens').textContent = css;
329
+ */
330
+ export declare function makeLibraryCSS(tokens: LucentTokens, selector?: string): string;
331
+
332
+ export declare const MANIFEST_SPEC_VERSION = "0.1";
333
+
334
+ declare interface MotionTokens {
335
+ durationFast: string;
336
+ durationBase: string;
337
+ durationSlow: string;
338
+ easingDefault: string;
339
+ easingEmphasized: string;
340
+ easingDecelerate: string;
341
+ }
342
+
343
+ export declare interface PropDescriptor {
344
+ /** Prop name as it appears in the component API */
345
+ name: string;
346
+ /** TypeScript type or custom type name */
347
+ type: PropType;
348
+ /** Whether the prop is required */
349
+ required: boolean;
350
+ /** Default value as a string representation */
351
+ default?: string;
352
+ /** Human-readable description for AI and documentation */
353
+ description: string;
354
+ /** For enum types — the allowed values */
355
+ enumValues?: readonly string[];
356
+ }
357
+
358
+ export declare type PropType = 'string' | 'number' | 'boolean' | 'ReactNode' | 'function' | 'enum' | 'object' | 'array' | 'ref' | string;
359
+
360
+ export declare function Radio({ value, label, size, disabled, id, onChange, checked, ...rest }: RadioProps): JSX_2.Element;
361
+
362
+ export declare function RadioGroup({ name, value, onChange, disabled, orientation, label, children, }: RadioGroupProps): JSX_2.Element;
363
+
364
+ export declare type RadioGroupOrientation = 'vertical' | 'horizontal';
365
+
366
+ export declare interface RadioGroupProps {
367
+ name: string;
368
+ value: string;
369
+ onChange: (value: string) => void;
370
+ disabled?: boolean;
371
+ orientation?: RadioGroupOrientation;
372
+ label?: string;
373
+ children: ReactNode;
374
+ }
375
+
376
+ export declare function RadioGroupUncontrolled({ defaultValue, onChange, ...rest }: RadioGroupUncontrolledProps): JSX_2.Element;
377
+
378
+ export declare interface RadioGroupUncontrolledProps extends Omit<RadioGroupProps, 'value' | 'onChange'> {
379
+ defaultValue?: string;
380
+ onChange?: (value: string) => void;
381
+ }
382
+
383
+ export declare const RadioManifest: ComponentManifest;
384
+
385
+ export declare interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
386
+ value: string;
387
+ label?: string;
388
+ size?: RadioSize;
389
+ }
390
+
391
+ export declare type RadioSize = 'sm' | 'md';
392
+
393
+ declare interface RadiusTokens {
394
+ radiusNone: string;
395
+ radiusSm: string;
396
+ radiusMd: string;
397
+ radiusLg: string;
398
+ radiusXl: string;
399
+ radiusFull: string;
400
+ }
401
+
402
+ export declare function SearchInput({ value, onChange, placeholder, results, onResultSelect, isLoading, disabled, id, style, }: SearchInputProps): JSX_2.Element;
403
+
404
+ export declare const SearchInputManifest: ComponentManifest;
405
+
406
+ export declare interface SearchInputProps {
407
+ value: string;
408
+ onChange: (value: string) => void;
409
+ placeholder?: string;
410
+ results?: SearchResult[];
411
+ onResultSelect?: (result: SearchResult) => void;
412
+ isLoading?: boolean;
413
+ disabled?: boolean;
414
+ id?: string;
415
+ style?: CSSProperties;
416
+ }
417
+
418
+ export declare interface SearchResult {
419
+ id: string | number;
420
+ label: string;
421
+ }
422
+
423
+ export declare const Select: ForwardRefExoticComponent<SelectProps & RefAttributes<HTMLSelectElement>>;
424
+
425
+ export declare const SelectManifest: ComponentManifest;
426
+
427
+ export declare interface SelectOption {
428
+ value: string;
429
+ label: string;
430
+ disabled?: boolean;
431
+ }
432
+
433
+ export declare interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
434
+ options: SelectOption[];
435
+ size?: SelectSize;
436
+ label?: string;
437
+ helperText?: string;
438
+ errorText?: string;
439
+ placeholder?: string;
440
+ }
441
+
442
+ export declare type SelectSize = 'sm' | 'md' | 'lg';
443
+
444
+ declare interface SemanticColorTokens {
445
+ bgBase: string;
446
+ bgSubtle: string;
447
+ bgMuted: string;
448
+ bgOverlay: string;
449
+ surfaceDefault: string;
450
+ surfaceRaised: string;
451
+ surfaceOverlay: string;
452
+ borderDefault: string;
453
+ borderSubtle: string;
454
+ borderStrong: string;
455
+ textPrimary: string;
456
+ textSecondary: string;
457
+ textDisabled: string;
458
+ textInverse: string;
459
+ textOnAccent: string;
460
+ accentDefault: string;
461
+ accentHover: string;
462
+ accentActive: string;
463
+ accentSubtle: string;
464
+ successDefault: string;
465
+ successSubtle: string;
466
+ successText: string;
467
+ warningDefault: string;
468
+ warningSubtle: string;
469
+ warningText: string;
470
+ dangerDefault: string;
471
+ dangerHover: string;
472
+ dangerSubtle: string;
473
+ dangerText: string;
474
+ infoDefault: string;
475
+ infoSubtle: string;
476
+ infoText: string;
477
+ focusRing: string;
478
+ }
479
+
480
+ declare interface ShadowTokens {
481
+ shadowNone: string;
482
+ shadowSm: string;
483
+ shadowMd: string;
484
+ shadowLg: string;
485
+ shadowXl: string;
486
+ }
487
+
488
+ export declare function Skeleton({ variant, width, height, lines, animate, radius, style, }: SkeletonProps): JSX_2.Element;
489
+
490
+ export declare const SkeletonManifest: ComponentManifest;
491
+
492
+ export declare interface SkeletonProps {
493
+ variant?: SkeletonVariant;
494
+ width?: string | number;
495
+ height?: string | number;
496
+ lines?: number;
497
+ animate?: boolean;
498
+ radius?: string;
499
+ style?: CSSProperties;
500
+ }
501
+
502
+ export declare type SkeletonVariant = 'text' | 'circle' | 'rectangle';
503
+
504
+ declare interface SpacingTokens {
505
+ space0: string;
506
+ space1: string;
507
+ space2: string;
508
+ space3: string;
509
+ space4: string;
510
+ space5: string;
511
+ space6: string;
512
+ space8: string;
513
+ space10: string;
514
+ space12: string;
515
+ space16: string;
516
+ space20: string;
517
+ space24: string;
518
+ }
519
+
520
+ export declare function Spinner({ size, label, color }: SpinnerProps): JSX_2.Element;
521
+
522
+ export declare const SpinnerManifest: ComponentManifest;
523
+
524
+ export declare interface SpinnerProps {
525
+ size?: SpinnerSize;
526
+ label?: string;
527
+ color?: string;
528
+ }
529
+
530
+ export declare type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';
531
+
532
+ export declare function Tag({ children, variant, size, onDismiss, disabled }: TagProps): JSX_2.Element;
533
+
534
+ export declare const TagManifest: ComponentManifest;
535
+
536
+ export declare interface TagProps {
537
+ children: ReactNode;
538
+ variant?: TagVariant;
539
+ size?: TagSize;
540
+ onDismiss?: () => void;
541
+ disabled?: boolean;
542
+ }
543
+
544
+ export declare type TagSize = 'sm' | 'md';
545
+
546
+ export declare type TagVariant = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info';
547
+
548
+ declare function Text_2({ as, size, weight, color, align, lineHeight, family, truncate, children, style, ...rest }: TextProps): JSX_2.Element;
549
+ export { Text_2 as Text }
550
+
551
+ export declare type TextAlign = 'left' | 'center' | 'right';
552
+
553
+ export declare const Textarea: default_2.ForwardRefExoticComponent<TextareaProps & default_2.RefAttributes<HTMLTextAreaElement>>;
554
+
555
+ export declare const TextareaManifest: ComponentManifest;
556
+
557
+ export declare interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
558
+ label?: string;
559
+ helperText?: string;
560
+ errorText?: string;
561
+ autoResize?: boolean;
562
+ maxLength?: number;
563
+ showCount?: boolean;
564
+ }
565
+
566
+ export declare type TextAs = 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span' | 'div' | 'label' | 'strong' | 'em' | 'code';
567
+
568
+ export declare type TextColor = 'primary' | 'secondary' | 'disabled' | 'inverse' | 'onAccent' | 'success' | 'warning' | 'danger' | 'info';
569
+
570
+ export declare type TextFamily = 'base' | 'mono' | 'display';
571
+
572
+ export declare type TextLineHeight = 'tight' | 'base' | 'relaxed';
573
+
574
+ export declare const TextManifest: ComponentManifest;
575
+
576
+ export declare interface TextProps {
577
+ as?: TextAs;
578
+ size?: TextSize;
579
+ weight?: TextWeight;
580
+ color?: TextColor;
581
+ align?: TextAlign;
582
+ lineHeight?: TextLineHeight;
583
+ family?: TextFamily;
584
+ truncate?: boolean;
585
+ children: ReactNode;
586
+ style?: CSSProperties;
587
+ id?: string;
588
+ htmlFor?: string;
589
+ className?: string;
590
+ onClick?: React.MouseEventHandler;
591
+ title?: string;
592
+ 'aria-label'?: string;
593
+ 'aria-hidden'?: boolean | 'true' | 'false';
594
+ }
595
+
596
+ export declare type TextSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
597
+
598
+ export declare type TextWeight = 'regular' | 'medium' | 'semibold' | 'bold';
599
+
600
+ export declare type Theme = 'light' | 'dark';
601
+
602
+ export declare function Toggle({ label, size, checked, defaultChecked, disabled, id, onChange, style, ...rest }: ToggleProps): JSX_2.Element;
603
+
604
+ export declare const ToggleManifest: ComponentManifest;
605
+
606
+ export declare interface ToggleProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
607
+ label?: string;
608
+ size?: ToggleSize;
609
+ checked?: boolean;
610
+ defaultChecked?: boolean;
611
+ }
612
+
613
+ export declare type ToggleSize = 'sm' | 'md' | 'lg';
614
+
615
+ export declare function Tooltip({ content, children, placement, delay }: TooltipProps): JSX_2.Element;
616
+
617
+ export declare const TooltipManifest: ComponentManifest;
618
+
619
+ export declare type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
620
+
621
+ export declare interface TooltipProps {
622
+ content: ReactNode;
623
+ children: ReactNode;
624
+ placement?: TooltipPlacement;
625
+ /** Delay in ms before the tooltip appears. Default: 300 */
626
+ delay?: number;
627
+ }
628
+
629
+ declare interface TypographyTokens {
630
+ fontFamilyBase: string;
631
+ fontFamilyMono: string;
632
+ fontFamilyDisplay: string;
633
+ fontSizeXs: string;
634
+ fontSizeSm: string;
635
+ fontSizeMd: string;
636
+ fontSizeLg: string;
637
+ fontSizeXl: string;
638
+ fontSize2xl: string;
639
+ fontSize3xl: string;
640
+ fontWeightRegular: string;
641
+ fontWeightMedium: string;
642
+ fontWeightSemibold: string;
643
+ fontWeightBold: string;
644
+ lineHeightTight: string;
645
+ lineHeightBase: string;
646
+ lineHeightRelaxed: string;
647
+ letterSpacingTight: string;
648
+ letterSpacingBase: string;
649
+ letterSpacingWide: string;
650
+ }
651
+
652
+ export declare interface UsageExample {
653
+ /** Short label for the example */
654
+ title: string;
655
+ /** JSX or TSX code string */
656
+ code: string;
657
+ /** Optional description of what this example demonstrates */
658
+ description?: string;
659
+ }
660
+
661
+ /**
662
+ * Returns the current Lucent theme and resolved token set.
663
+ * Must be used inside a <LucentProvider>.
664
+ */
665
+ export declare function useLucent(): LucentContextValue;
666
+
667
+ /**
668
+ * Validates a ComponentManifest object at runtime.
669
+ * Returns a result object — does not throw.
670
+ *
671
+ * @example
672
+ * const result = validateManifest(ButtonManifest);
673
+ * if (!result.valid) console.error(result.errors);
674
+ */
675
+ export declare function validateManifest(manifest: unknown): ValidationResult;
676
+
677
+ export declare interface ValidationError {
678
+ field: string;
679
+ message: string;
680
+ }
681
+
682
+ export declare interface ValidationResult {
683
+ valid: boolean;
684
+ errors: ValidationError[];
685
+ }
686
+
687
+ export { }