lucent-ui 0.3.0 → 0.4.1

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.d.ts CHANGED
@@ -166,6 +166,31 @@ export declare interface CollapsibleProps {
166
166
  style?: CSSProperties;
167
167
  }
168
168
 
169
+ export declare const COMMAND_PALETTE_MANIFEST: ComponentManifest;
170
+
171
+ export declare interface CommandItem {
172
+ id: string;
173
+ label: string;
174
+ description?: string;
175
+ icon?: ReactNode;
176
+ group?: string;
177
+ onSelect: () => void;
178
+ disabled?: boolean;
179
+ }
180
+
181
+ export declare function CommandPalette({ commands, placeholder, shortcutKey, open: controlledOpen, onOpenChange, style, }: CommandPaletteProps): JSX_2.Element | null;
182
+
183
+ export declare interface CommandPaletteProps {
184
+ commands: CommandItem[];
185
+ placeholder?: string;
186
+ /** Key that triggers open when held with Meta (Mac) or Ctrl (Win). Default: 'k' */
187
+ shortcutKey?: string;
188
+ /** Controlled open state */
189
+ open?: boolean;
190
+ onOpenChange?: (open: boolean) => void;
191
+ style?: CSSProperties;
192
+ }
193
+
169
194
  /**
170
195
  * The domain of a component.
171
196
  * "neutral" means the component is domain-agnostic and reusable
@@ -237,6 +262,68 @@ export declare interface CompositionNode {
237
262
 
238
263
  export declare const darkTokens: LucentTokens;
239
264
 
265
+ export declare const DATA_TABLE_MANIFEST: ComponentManifest;
266
+
267
+ export declare function DataTable<T extends object>({ columns, rows, pageSize, page: controlledPage, onPageChange, emptyState, style, }: DataTableProps<T>): JSX_2.Element;
268
+
269
+ export declare interface DataTableColumn<T> {
270
+ key: string;
271
+ header: ReactNode;
272
+ /** Custom cell renderer — defaults to `String(row[key])` */
273
+ render?: (row: T, index: number) => ReactNode;
274
+ sortable?: boolean;
275
+ width?: string;
276
+ align?: 'left' | 'center' | 'right';
277
+ }
278
+
279
+ export declare interface DataTableProps<T extends object> {
280
+ columns: DataTableColumn<T>[];
281
+ rows: T[];
282
+ /** Rows per page. Set to 0 to disable pagination. Default: 10 */
283
+ pageSize?: number;
284
+ /** Controlled current page (0-indexed) */
285
+ page?: number;
286
+ onPageChange?: (page: number) => void;
287
+ /** Empty state slot */
288
+ emptyState?: ReactNode;
289
+ style?: CSSProperties;
290
+ }
291
+
292
+ export declare const DATE_PICKER_MANIFEST: ComponentManifest;
293
+
294
+ export declare const DATE_RANGE_PICKER_MANIFEST: ComponentManifest;
295
+
296
+ export declare function DatePicker({ value: controlledValue, defaultValue, onChange, placeholder, disabled, min, max, style, }: DatePickerProps): JSX_2.Element;
297
+
298
+ export declare interface DatePickerProps {
299
+ value?: Date;
300
+ defaultValue?: Date;
301
+ onChange?: (date: Date) => void;
302
+ placeholder?: string;
303
+ disabled?: boolean;
304
+ min?: Date;
305
+ max?: Date;
306
+ style?: CSSProperties;
307
+ }
308
+
309
+ export declare interface DateRange {
310
+ start: Date;
311
+ end: Date;
312
+ }
313
+
314
+ export declare function DateRangePicker({ value: controlledValue, defaultValue, onChange, placeholder, disabled, min, max, style, }: DateRangePickerProps): JSX_2.Element;
315
+
316
+ export declare interface DateRangePickerProps {
317
+ value?: DateRange;
318
+ defaultValue?: DateRange;
319
+ onChange?: (range: DateRange) => void;
320
+ placeholder?: string;
321
+ disabled?: boolean;
322
+ min?: Date;
323
+ max?: Date;
324
+ style?: CSSProperties;
325
+ }
326
+
240
327
  export declare function Divider({ orientation, label, spacing, style }: DividerProps): JSX_2.Element;
241
328
 
242
329
  export declare const DividerManifest: ComponentManifest;
@@ -262,6 +349,24 @@ export declare interface EmptyStateProps {
262
349
  style?: CSSProperties;
263
350
  }
264
351
 
352
+ export declare const FILE_UPLOAD_MANIFEST: ComponentManifest;
353
+
354
+ export declare function FileUpload({ accept, multiple, maxSize, value: controlledValue, onChange, onError, disabled, style, }: FileUploadProps): JSX_2.Element;
355
+
356
+ export declare interface FileUploadProps {
357
+ /** Accepted MIME types or extensions, e.g. "image/*,.pdf" */
358
+ accept?: string;
359
+ multiple?: boolean;
360
+ /** Max file size in bytes */
361
+ maxSize?: number;
362
+ /** Controlled file list */
363
+ value?: UploadFile[];
364
+ onChange?: (files: UploadFile[]) => void;
365
+ onError?: (message: string) => void;
366
+ disabled?: boolean;
367
+ style?: CSSProperties;
368
+ }
369
+
265
370
  export declare function FormField({ label, htmlFor, required, helperText, errorMessage, children, style, }: FormFieldProps): JSX_2.Element;
266
371
 
267
372
  export declare const FormFieldManifest: ComponentManifest;
@@ -373,6 +478,28 @@ declare interface MotionTokens {
373
478
  easingDecelerate: string;
374
479
  }
375
480
 
481
+ export declare const MULTI_SELECT_MANIFEST: ComponentManifest;
482
+
483
+ export declare function MultiSelect({ options, value: controlledValue, defaultValue, onChange, placeholder, disabled, max, style, }: MultiSelectProps): JSX_2.Element;
484
+
485
+ export declare interface MultiSelectOption {
486
+ value: string;
487
+ label: string;
488
+ disabled?: boolean;
489
+ }
490
+
491
+ export declare interface MultiSelectProps {
492
+ options: MultiSelectOption[];
493
+ value?: string[];
494
+ defaultValue?: string[];
495
+ onChange?: (values: string[]) => void;
496
+ placeholder?: string;
497
+ disabled?: boolean;
498
+ /** Max number of items that can be selected. No limit by default. */
499
+ max?: number;
500
+ style?: CSSProperties;
501
+ }
502
+
376
503
  export declare function NavLink({ children, href, isActive, icon, disabled, onClick, as, style, }: NavLinkProps): JSX_2.Element;
377
504
 
378
505
  export declare interface NavLinkProps {
@@ -387,7 +514,7 @@ export declare interface NavLinkProps {
387
514
  style?: CSSProperties;
388
515
  }
389
516
 
390
- export declare function PageLayout({ children, header, sidebar, sidebarWidth, headerHeight, sidebarCollapsed, mainStyle, style, }: PageLayoutProps): JSX_2.Element;
517
+ export declare function PageLayout({ children, header, sidebar, sidebarWidth, headerHeight, sidebarCollapsed, rightSidebar, rightSidebarWidth, rightSidebarCollapsed, footer, footerHeight, mainStyle, style, }: PageLayoutProps): JSX_2.Element;
391
518
 
392
519
  export declare interface PageLayoutProps {
393
520
  children: ReactNode;
@@ -399,6 +526,16 @@ export declare interface PageLayoutProps {
399
526
  headerHeight?: number | string;
400
527
  /** Collapse the sidebar to zero width */
401
528
  sidebarCollapsed?: boolean;
529
+ /** Right panel content rendered as a flex sibling of <main> */
530
+ rightSidebar?: ReactNode;
531
+ /** Right panel width in px or any CSS value. Default: 240 */
532
+ rightSidebarWidth?: number | string;
533
+ /** Collapse the right panel to zero width */
534
+ rightSidebarCollapsed?: boolean;
535
+ /** Footer content rendered below the body row */
536
+ footer?: ReactNode;
537
+ /** Footer height in px or any CSS value. Default: 48 */
538
+ footerHeight?: number | string;
402
539
  /** Style overrides for the main content card (border, borderRadius, boxShadow, etc.) */
403
540
  mainStyle?: CSSProperties;
404
541
  style?: CSSProperties;
@@ -680,6 +817,26 @@ export declare type TextWeight = 'regular' | 'medium' | 'semibold' | 'bold';
680
817
 
681
818
  export declare type Theme = 'light' | 'dark';
682
819
 
820
+ export declare function Timeline({ items, style }: TimelineProps): JSX_2.Element;
821
+
822
+ export declare const TIMELINE_MANIFEST: ComponentManifest;
823
+
824
+ export declare interface TimelineItem {
825
+ id: string;
826
+ title: ReactNode;
827
+ description?: ReactNode;
828
+ date?: string;
829
+ status?: TimelineItemStatus;
830
+ icon?: ReactNode;
831
+ }
832
+
833
+ export declare type TimelineItemStatus = 'default' | 'success' | 'warning' | 'danger' | 'info';
834
+
835
+ export declare interface TimelineProps {
836
+ items: TimelineItem[];
837
+ style?: CSSProperties;
838
+ }
839
+
683
840
  export declare function Toggle({ label, size, checked, defaultChecked, disabled, id, onChange, style, ...rest }: ToggleProps): JSX_2.Element;
684
841
 
685
842
  export declare const ToggleManifest: ComponentManifest;
@@ -730,6 +887,14 @@ declare interface TypographyTokens {
730
887
  letterSpacingWide: string;
731
888
  }
732
889
 
890
+ export declare interface UploadFile {
891
+ id: string;
892
+ file: File;
893
+ /** 0–100. Undefined = not yet started. */
894
+ progress?: number;
895
+ error?: string;
896
+ }
897
+
733
898
  export declare interface UsageExample {
734
899
  /** Short label for the example */
735
900
  title: string;