lucent-ui 0.8.0 → 0.9.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
@@ -203,6 +203,46 @@ export declare interface CollapsibleProps {
203
203
  style?: CSSProperties;
204
204
  }
205
205
 
206
+ export declare const COLOR_PICKER_MANIFEST: ComponentManifest;
207
+
208
+ export declare const COLOR_SWATCH_MANIFEST: ComponentManifest;
209
+
210
+ export declare function ColorPicker({ value, onChange, label, disabled, presetGroups, id, style, }: ColorPickerProps): JSX_2.Element;
211
+
212
+ export declare namespace ColorPicker {
213
+ var displayName: string;
214
+ }
215
+
216
+ export declare interface ColorPickerProps {
217
+ value?: string;
218
+ onChange?: (hex: string) => void;
219
+ label?: string;
220
+ disabled?: boolean;
221
+ presetGroups?: ColorPresetGroup[];
222
+ id?: string;
223
+ style?: CSSProperties;
224
+ }
225
+
226
+ export declare interface ColorPresetGroup {
227
+ label: string;
228
+ colors: string[];
229
+ }
230
+
231
+ export declare const ColorSwatch: ForwardRefExoticComponent<ColorSwatchProps & RefAttributes<HTMLButtonElement>>;
232
+
233
+ export declare interface ColorSwatchProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {
234
+ color: string;
235
+ size?: ColorSwatchSize;
236
+ shape?: ColorSwatchShape;
237
+ /** Show a checkerboard underneath — use when color may have transparency */
238
+ showCheckerboard?: boolean;
239
+ selected?: boolean;
240
+ }
241
+
242
+ export declare type ColorSwatchShape = 'circle' | 'square';
243
+
244
+ export declare type ColorSwatchSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
245
+
206
246
  export declare const COMMAND_PALETTE_MANIFEST: ComponentManifest;
207
247
 
208
248
  export declare interface CommandItem {
@@ -525,15 +565,24 @@ export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes
525
565
 
526
566
  export declare const InputManifest: ComponentManifest;
527
567
 
528
- export declare interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
568
+ export declare interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
529
569
  type?: InputType;
570
+ size?: InputSize;
530
571
  label?: string;
531
572
  helperText?: string;
532
573
  errorText?: string;
574
+ /** Icon/element floated inside the left edge — does not resize the field */
533
575
  leftElement?: ReactNode;
576
+ /** Icon/element floated inside the right edge — does not resize the field */
534
577
  rightElement?: ReactNode;
578
+ /** Inset label attached to the left of the field (e.g. "$", "https://") */
579
+ prefix?: ReactNode;
580
+ /** Inset label attached to the right of the field (e.g. "kg", ".com") */
581
+ suffix?: ReactNode;
535
582
  }
536
583
 
584
+ declare type InputSize = 'sm' | 'md' | 'lg';
585
+
537
586
  export declare type InputType = 'text' | 'number' | 'password' | 'email' | 'tel' | 'url' | 'search' | 'color';
538
587
 
539
588
  export declare function isValidPropDescriptor(prop: unknown): prop is PropDescriptor;
@@ -751,6 +800,38 @@ export declare interface SearchResult {
751
800
  label: string;
752
801
  }
753
802
 
803
+ export declare const SEGMENTED_CONTROL_MANIFEST: ComponentManifest;
804
+
805
+ export declare function SegmentedControl({ options, value, defaultValue, onChange, size, disabled, fullWidth, id, style, }: SegmentedControlProps): JSX_2.Element;
806
+
807
+ export declare namespace SegmentedControl {
808
+ var displayName: string;
809
+ }
810
+
811
+ export declare interface SegmentedControlProps {
812
+ options: SegmentedOption[];
813
+ /** Controlled selected value */
814
+ value?: string;
815
+ /** Initial value for uncontrolled usage */
816
+ defaultValue?: string;
817
+ onChange?: (value: string) => void;
818
+ size?: SegmentedControlSize;
819
+ /** Disabled all options */
820
+ disabled?: boolean;
821
+ /** Stretch to fill available width */
822
+ fullWidth?: boolean;
823
+ id?: string;
824
+ style?: CSSProperties;
825
+ }
826
+
827
+ export declare type SegmentedControlSize = 'sm' | 'md' | 'lg';
828
+
829
+ export declare interface SegmentedOption {
830
+ value: string;
831
+ label: ReactNode;
832
+ disabled?: boolean;
833
+ }
834
+
754
835
  export declare const Select: ForwardRefExoticComponent<SelectProps & RefAttributes<HTMLSelectElement>>;
755
836
 
756
837
  export declare const SelectManifest: ComponentManifest;