lucent-ui 0.4.2 → 0.6.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.d.ts CHANGED
@@ -2,6 +2,7 @@ import { ButtonHTMLAttributes } from 'react';
2
2
  import { CSSProperties } from 'react';
3
3
  import { default as default_2 } from 'react';
4
4
  import { ForwardRefExoticComponent } from 'react';
5
+ import { HTMLAttributes } from 'react';
5
6
  import { ImgHTMLAttributes } from 'react';
6
7
  import { InputHTMLAttributes } from 'react';
7
8
  import { JSX as JSX_2 } from 'react/jsx-runtime';
@@ -9,7 +10,9 @@ import { MouseEventHandler } from 'react';
9
10
  import { ReactNode } from 'react';
10
11
  import { RefAttributes } from 'react';
11
12
  import { SelectHTMLAttributes } from 'react';
13
+ import { TdHTMLAttributes } from 'react';
12
14
  import { TextareaHTMLAttributes } from 'react';
15
+ import { ThHTMLAttributes } from 'react';
13
16
 
14
17
  export declare interface AccessibilityDescriptor {
15
18
  /** ARIA role applied to the root element */
@@ -117,6 +120,8 @@ export declare interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElem
117
120
  chevron?: boolean;
118
121
  /** Disables the built-in hover background/border overrides. Use when passing custom colours via style. */
119
122
  disableHoverStyles?: boolean;
123
+ /** If false, the component renders without any border. Useful when you want a solid "flat" look. */
124
+ bordered?: boolean;
120
125
  }
121
126
 
122
127
  export declare type ButtonSize = 'sm' | 'md' | 'lg';
@@ -155,6 +160,38 @@ export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInpu
155
160
 
156
161
  export declare type CheckboxSize = 'sm' | 'md';
157
162
 
163
+ export declare function CodeBlock({ code, language, tabs, variant, helperText, showCopyButton, style, }: CodeBlockProps): JSX_2.Element;
164
+
165
+ export declare const CodeBlockManifest: ComponentManifest;
166
+
167
+ export declare interface CodeBlockProps {
168
+ /** Code string — used in single (non-tabbed) mode */
169
+ code?: string;
170
+ /** Language label shown in the header (non-tabbed mode only) */
171
+ language?: string;
172
+ /** Tabbed mode: each entry is a selectable code snippet */
173
+ tabs?: CodeBlockTab[];
174
+ /**
175
+ * 'code' (default) renders a <pre><code> block.
176
+ * 'prompt' renders a single-line display for AI prompts — full text is
177
+ * always copied even when visually truncated.
178
+ */
179
+ variant?: CodeBlockVariant;
180
+ /** Optional descriptive text rendered between the tab bar and the code area */
181
+ helperText?: string;
182
+ showCopyButton?: boolean;
183
+ style?: React.CSSProperties;
184
+ }
185
+
186
+ export declare interface CodeBlockTab {
187
+ label: string;
188
+ code: string;
189
+ language?: string;
190
+ icon?: ReactNode;
191
+ }
192
+
193
+ export declare type CodeBlockVariant = 'code' | 'prompt';
194
+
158
195
  export declare function Collapsible({ trigger, children, defaultOpen, open, onOpenChange, style }: CollapsibleProps): JSX_2.Element;
159
196
 
160
197
  export declare interface CollapsibleProps {
@@ -264,7 +301,7 @@ export declare const darkTokens: LucentTokens;
264
301
 
265
302
  export declare const DATA_TABLE_MANIFEST: ComponentManifest;
266
303
 
267
- export declare function DataTable<T extends object>({ columns, rows, pageSize, page: controlledPage, onPageChange, emptyState, style, }: DataTableProps<T>): JSX_2.Element;
304
+ export declare function DataTable<T extends object>({ columns, rows, pageSize, page: controlledPage, onPageChange, onFilterChange, emptyState, style, }: DataTableProps<T>): JSX_2.Element;
268
305
 
269
306
  export declare interface DataTableColumn<T> {
270
307
  key: string;
@@ -272,6 +309,8 @@ export declare interface DataTableColumn<T> {
272
309
  /** Custom cell renderer — defaults to `String(row[key])` */
273
310
  render?: (row: T, index: number) => ReactNode;
274
311
  sortable?: boolean;
312
+ /** Adds a searchable, multi-select dropdown filter above the table for this column */
313
+ filterable?: boolean;
275
314
  width?: string;
276
315
  align?: 'left' | 'center' | 'right';
277
316
  }
@@ -284,6 +323,11 @@ export declare interface DataTableProps<T extends object> {
284
323
  /** Controlled current page (0-indexed) */
285
324
  page?: number;
286
325
  onPageChange?: (page: number) => void;
326
+ /**
327
+ * Called with the current filter map whenever any filter changes.
328
+ * Keys are column keys; values are arrays of selected filter strings (empty arrays are omitted).
329
+ */
330
+ onFilterChange?: (filters: Record<string, string[]>) => void;
287
331
  /** Empty state slot */
288
332
  emptyState?: ReactNode;
289
333
  style?: CSSProperties;
@@ -423,7 +467,7 @@ export declare interface InputProps extends Omit<InputHTMLAttributes<HTMLInputEl
423
467
  rightElement?: ReactNode;
424
468
  }
425
469
 
426
- export declare type InputType = 'text' | 'number' | 'password' | 'email' | 'tel' | 'url' | 'search';
470
+ export declare type InputType = 'text' | 'number' | 'password' | 'email' | 'tel' | 'url' | 'search' | 'color';
427
471
 
428
472
  export declare function isValidPropDescriptor(prop: unknown): prop is PropDescriptor;
429
473
 
@@ -662,6 +706,7 @@ declare interface SemanticColorTokens {
662
706
  accentHover: string;
663
707
  accentActive: string;
664
708
  accentSubtle: string;
709
+ accentBorder: string;
665
710
  successDefault: string;
666
711
  successSubtle: string;
667
712
  successText: string;
@@ -702,6 +747,24 @@ export declare interface SkeletonProps {
702
747
 
703
748
  export declare type SkeletonVariant = 'text' | 'circle' | 'rectangle';
704
749
 
750
+ export declare function Slider({ label, showValue, size, min, max, step, value, defaultValue, disabled, id, onChange, style, ...rest }: SliderProps): JSX_2.Element;
751
+
752
+ export declare const SliderManifest: ComponentManifest;
753
+
754
+ export declare interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
755
+ label?: string;
756
+ showValue?: boolean;
757
+ size?: SliderSize;
758
+ min?: number;
759
+ max?: number;
760
+ step?: number;
761
+ value?: number;
762
+ defaultValue?: number;
763
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
764
+ }
765
+
766
+ export declare type SliderSize = 'sm' | 'md' | 'lg';
767
+
705
768
  declare interface SpacingTokens {
706
769
  space0: string;
707
770
  space1: string;
@@ -737,6 +800,29 @@ export declare interface TabItem {
737
800
  disabled?: boolean;
738
801
  }
739
802
 
803
+ export declare function Table({ striped, children, className, style, ...rest }: TableProps): JSX_2.Element;
804
+
805
+ export declare namespace Table {
806
+ var Head: ({ children, style, ...rest }: HTMLAttributes<HTMLTableSectionElement>) => JSX_2.Element;
807
+ var Body: ({ children, ...rest }: HTMLAttributes<HTMLTableSectionElement>) => JSX_2.Element;
808
+ var Foot: ({ children, style, ...rest }: HTMLAttributes<HTMLTableSectionElement>) => JSX_2.Element;
809
+ var Row: ({ children, className, ...rest }: HTMLAttributes<HTMLTableRowElement>) => JSX_2.Element;
810
+ var Cell: ({ as, children, style, ...rest }: TableCellProps) => JSX_2.Element;
811
+ }
812
+
813
+ export declare type TableCellProps = ({
814
+ as?: 'td';
815
+ } & TdHTMLAttributes<HTMLTableCellElement>) | ({
816
+ as: 'th';
817
+ } & ThHTMLAttributes<HTMLTableCellElement>);
818
+
819
+ export declare const TableManifest: ComponentManifest;
820
+
821
+ export declare interface TableProps extends HTMLAttributes<HTMLTableElement> {
822
+ /** Applies alternating row backgrounds to tbody rows */
823
+ striped?: boolean;
824
+ }
825
+
740
826
  export declare function Tabs({ tabs, defaultValue, value, onChange, style }: TabsProps): JSX_2.Element;
741
827
 
742
828
  export declare interface TabsProps {