@lumx/react 4.1.0 → 4.1.1-alpha.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/index.d.ts +203 -180
- package/index.js +573 -498
- package/index.js.map +1 -1
- package/package.json +4 -3
package/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Kind as Kind$1, HorizontalAlignment, Size as Size$1, ColorPalette as ColorPalette$1,
|
|
1
|
+
import { Kind as Kind$1, HorizontalAlignment, Size as Size$1, ColorPalette as ColorPalette$1, Alignment, VerticalAlignment, Orientation, ColorWithVariants as ColorWithVariants$1, ColorVariant as ColorVariant$1, Typography as Typography$1, WhiteSpace, AspectRatio, Emphasis as Emphasis$1, GlobalSize, TypographyInterface as TypographyInterface$1, Theme as Theme$1 } from '@lumx/core/js/constants';
|
|
2
2
|
export * from '@lumx/core/js/constants';
|
|
3
3
|
import * as _lumx_core_js_types from '@lumx/core/js/types';
|
|
4
|
-
import { GenericProps as GenericProps$1, HasTheme as HasTheme$1, ValueOf, HasCloseMode, TextElement, HeadingElement, Falsy, HasClassName as HasClassName$1, HasAriaLabelOrLabelledBy } from '@lumx/core/js/types';
|
|
4
|
+
import { GenericProps as GenericProps$1, HasTheme as HasTheme$1, ValueOf, HasAriaDisabled as HasAriaDisabled$1, HasCloseMode, TextElement, HeadingElement, Falsy, HasClassName as HasClassName$1, HasRequiredLinkHref, HasAriaLabelOrLabelledBy } from '@lumx/core/js/types';
|
|
5
5
|
export * from '@lumx/core/js/types';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
|
-
import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, AriaAttributes,
|
|
7
|
+
import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, AriaAttributes, InputHTMLAttributes, RefObject, ImgHTMLAttributes, CSSProperties, SetStateAction, Key, ElementType, ComponentProps } from 'react';
|
|
8
8
|
|
|
9
9
|
/** LumX Component Type. */
|
|
10
10
|
type Comp<P, T = HTMLElement> = {
|
|
@@ -31,10 +31,6 @@ type ComponentRef<C> = C extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElem
|
|
|
31
31
|
ref?: infer R;
|
|
32
32
|
}> ? R : never;
|
|
33
33
|
|
|
34
|
-
type HasRequiredLinkHref<E> = E extends 'a' ? {
|
|
35
|
-
href: string;
|
|
36
|
-
} : Record<string, unknown>;
|
|
37
|
-
|
|
38
34
|
interface AlertDialogProps extends Omit<DialogProps, 'header' | 'footer'> {
|
|
39
35
|
/** Message variant. */
|
|
40
36
|
kind?: Kind$1;
|
|
@@ -322,19 +318,183 @@ interface BadgeWrapperProps extends GenericProps$1 {
|
|
|
322
318
|
}
|
|
323
319
|
declare const BadgeWrapper: Comp<BadgeWrapperProps, HTMLDivElement>;
|
|
324
320
|
|
|
321
|
+
declare const Theme: {
|
|
322
|
+
readonly light: "light";
|
|
323
|
+
readonly dark: "dark";
|
|
324
|
+
};
|
|
325
|
+
type Theme = ValueOf<typeof Theme>;
|
|
326
|
+
declare const Size: {
|
|
327
|
+
readonly xxs: "xxs";
|
|
328
|
+
readonly xs: "xs";
|
|
329
|
+
readonly s: "s";
|
|
330
|
+
readonly m: "m";
|
|
331
|
+
readonly l: "l";
|
|
332
|
+
readonly xl: "xl";
|
|
333
|
+
readonly xxl: "xxl";
|
|
334
|
+
readonly tiny: "tiny";
|
|
335
|
+
readonly regular: "regular";
|
|
336
|
+
readonly medium: "medium";
|
|
337
|
+
readonly big: "big";
|
|
338
|
+
readonly huge: "huge";
|
|
339
|
+
};
|
|
340
|
+
type Size = ValueOf<typeof Size>;
|
|
341
|
+
declare const Emphasis: {
|
|
342
|
+
readonly low: "low";
|
|
343
|
+
readonly medium: "medium";
|
|
344
|
+
readonly high: "high";
|
|
345
|
+
};
|
|
346
|
+
type Emphasis = ValueOf<typeof Emphasis>;
|
|
347
|
+
/**
|
|
348
|
+
* List of typographies that can't be customized.
|
|
349
|
+
*/
|
|
350
|
+
declare const TypographyInterface: {
|
|
351
|
+
readonly overline: "overline";
|
|
352
|
+
readonly caption: "caption";
|
|
353
|
+
readonly body1: "body1";
|
|
354
|
+
readonly body2: "body2";
|
|
355
|
+
readonly subtitle1: "subtitle1";
|
|
356
|
+
readonly subtitle2: "subtitle2";
|
|
357
|
+
readonly title: "title";
|
|
358
|
+
readonly headline: "headline";
|
|
359
|
+
readonly display1: "display1";
|
|
360
|
+
};
|
|
361
|
+
type TypographyInterface = ValueOf<typeof TypographyInterface>;
|
|
362
|
+
/**
|
|
363
|
+
* List of typographies that can be customized (via CSS variables).
|
|
364
|
+
*/
|
|
365
|
+
declare const TypographyCustom: {
|
|
366
|
+
readonly intro: "custom-intro";
|
|
367
|
+
readonly 'body-large': "custom-body-large";
|
|
368
|
+
readonly body: "custom-body";
|
|
369
|
+
readonly quote: "custom-quote";
|
|
370
|
+
readonly 'publish-info': "custom-publish-info";
|
|
371
|
+
readonly button: "custom-button";
|
|
372
|
+
readonly title1: "custom-title1";
|
|
373
|
+
readonly title2: "custom-title2";
|
|
374
|
+
readonly title3: "custom-title3";
|
|
375
|
+
readonly title4: "custom-title4";
|
|
376
|
+
readonly title5: "custom-title5";
|
|
377
|
+
readonly title6: "custom-title6";
|
|
378
|
+
};
|
|
379
|
+
type TypographyCustom = ValueOf<typeof TypographyCustom>;
|
|
380
|
+
/**
|
|
381
|
+
* List of all typographies.
|
|
382
|
+
*/
|
|
383
|
+
declare const Typography: {
|
|
384
|
+
readonly custom: {
|
|
385
|
+
readonly intro: "custom-intro";
|
|
386
|
+
readonly 'body-large': "custom-body-large";
|
|
387
|
+
readonly body: "custom-body";
|
|
388
|
+
readonly quote: "custom-quote";
|
|
389
|
+
readonly 'publish-info': "custom-publish-info";
|
|
390
|
+
readonly button: "custom-button";
|
|
391
|
+
readonly title1: "custom-title1";
|
|
392
|
+
readonly title2: "custom-title2";
|
|
393
|
+
readonly title3: "custom-title3";
|
|
394
|
+
readonly title4: "custom-title4";
|
|
395
|
+
readonly title5: "custom-title5";
|
|
396
|
+
readonly title6: "custom-title6";
|
|
397
|
+
};
|
|
398
|
+
readonly overline: "overline";
|
|
399
|
+
readonly caption: "caption";
|
|
400
|
+
readonly body1: "body1";
|
|
401
|
+
readonly body2: "body2";
|
|
402
|
+
readonly subtitle1: "subtitle1";
|
|
403
|
+
readonly subtitle2: "subtitle2";
|
|
404
|
+
readonly title: "title";
|
|
405
|
+
readonly headline: "headline";
|
|
406
|
+
readonly display1: "display1";
|
|
407
|
+
};
|
|
408
|
+
type Typography = TypographyInterface | TypographyCustom;
|
|
409
|
+
/**
|
|
410
|
+
* Semantic info about the purpose of the component
|
|
411
|
+
*/
|
|
412
|
+
declare const Kind: {
|
|
413
|
+
readonly info: "info";
|
|
414
|
+
readonly success: "success";
|
|
415
|
+
readonly warning: "warning";
|
|
416
|
+
readonly error: "error";
|
|
417
|
+
};
|
|
418
|
+
type Kind = ValueOf<typeof Kind>;
|
|
419
|
+
/**
|
|
420
|
+
* See SCSS variable $lumx-color-palette
|
|
421
|
+
*/
|
|
422
|
+
declare const ColorPalette: {
|
|
423
|
+
readonly primary: "primary";
|
|
424
|
+
readonly secondary: "secondary";
|
|
425
|
+
readonly blue: "blue";
|
|
426
|
+
readonly dark: "dark";
|
|
427
|
+
readonly green: "green";
|
|
428
|
+
readonly yellow: "yellow";
|
|
429
|
+
readonly red: "red";
|
|
430
|
+
readonly light: "light";
|
|
431
|
+
readonly grey: "grey";
|
|
432
|
+
};
|
|
433
|
+
type ColorPalette = ValueOf<typeof ColorPalette>;
|
|
434
|
+
/**
|
|
435
|
+
* See SCSS variable $lumx-color-variants
|
|
436
|
+
*/
|
|
437
|
+
declare const ColorVariant: {
|
|
438
|
+
readonly D1: "D1";
|
|
439
|
+
readonly D2: "D2";
|
|
440
|
+
readonly L1: "L1";
|
|
441
|
+
readonly L2: "L2";
|
|
442
|
+
readonly L3: "L3";
|
|
443
|
+
readonly L4: "L4";
|
|
444
|
+
readonly L5: "L5";
|
|
445
|
+
readonly L6: "L6";
|
|
446
|
+
readonly N: "N";
|
|
447
|
+
};
|
|
448
|
+
type ColorVariant = ValueOf<typeof ColorVariant>;
|
|
449
|
+
/** ColorPalette with all possible color variant combination */
|
|
450
|
+
type ColorWithVariants = ColorPalette | Exclude<`${ColorPalette}-${ColorVariant}`, `light-D${number}` | `dark-D${number}`>;
|
|
451
|
+
|
|
452
|
+
interface HasClassName {
|
|
453
|
+
/**
|
|
454
|
+
* Class name forwarded to the root element of the component.
|
|
455
|
+
*/
|
|
456
|
+
className?: string;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
interface HasTheme {
|
|
460
|
+
/**
|
|
461
|
+
* Theme adapting the component to light or dark background.
|
|
462
|
+
*/
|
|
463
|
+
theme?: Theme;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Define a generic props types.
|
|
468
|
+
*/
|
|
469
|
+
interface GenericProps extends HasClassName {
|
|
470
|
+
/**
|
|
471
|
+
* Any prop (particularly any supported prop for a HTML element).
|
|
472
|
+
*/
|
|
473
|
+
[propName: string]: any;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
type JSXElement = boolean | number | string | React__default.JSX.Element | Iterable<JSXElement> | undefined | null;
|
|
477
|
+
|
|
478
|
+
/** Transform a string literal into kebab case */
|
|
479
|
+
type KebabCase<S> = S extends `${infer C}${infer T}` ? T extends Uncapitalize<T> ? `${Uncapitalize<C>}${KebabCase<T>}` : `${Uncapitalize<C>}-${KebabCase<T>}` : S;
|
|
480
|
+
|
|
481
|
+
/** Transform the component name into the lumx class name. */
|
|
482
|
+
type LumxClassName<TComponentName extends string> = `lumx-${KebabCase<TComponentName>}`;
|
|
483
|
+
|
|
484
|
+
type Booleanish = boolean | 'true' | 'false';
|
|
485
|
+
|
|
325
486
|
interface HasAriaDisabled {
|
|
326
487
|
/** Similar to `disabled` but does not block pointer events or focus */
|
|
327
|
-
'aria-disabled'?:
|
|
488
|
+
'aria-disabled'?: Booleanish;
|
|
328
489
|
}
|
|
329
490
|
|
|
330
|
-
type HTMLButtonProps = DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
331
491
|
/**
|
|
332
492
|
* Button size definition.
|
|
333
493
|
*/
|
|
334
|
-
type ButtonSize = Extract<Size
|
|
335
|
-
interface BaseButtonProps extends GenericProps
|
|
494
|
+
type ButtonSize = Extract<Size, 's' | 'm'>;
|
|
495
|
+
interface BaseButtonProps extends GenericProps, Pick<AriaAttributes, 'aria-expanded' | 'aria-haspopup' | 'aria-pressed' | 'aria-label'>, HasTheme, HasAriaDisabled {
|
|
336
496
|
/** Color variant. */
|
|
337
|
-
color?: ColorPalette
|
|
497
|
+
color?: ColorPalette;
|
|
338
498
|
/** Emphasis variant. */
|
|
339
499
|
emphasis?: Emphasis;
|
|
340
500
|
/** Whether or not the button has a background color in low emphasis. */
|
|
@@ -352,7 +512,7 @@ interface BaseButtonProps extends GenericProps$1, Pick<AriaAttributes, 'aria-exp
|
|
|
352
512
|
/** Native anchor target property. */
|
|
353
513
|
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
354
514
|
/** Native button type. */
|
|
355
|
-
type?:
|
|
515
|
+
type?: 'submit' | 'reset' | 'button' | undefined;
|
|
356
516
|
/** Custom react component for the link (can be used to inject react router Link). */
|
|
357
517
|
linkAs?: 'a' | any;
|
|
358
518
|
}
|
|
@@ -362,9 +522,6 @@ interface BaseButtonProps extends GenericProps$1, Pick<AriaAttributes, 'aria-exp
|
|
|
362
522
|
* @deprecated Use Emphasis instead.
|
|
363
523
|
*/
|
|
364
524
|
declare const ButtonEmphasis: {
|
|
365
|
-
/**
|
|
366
|
-
* Component default props.
|
|
367
|
-
*/
|
|
368
525
|
readonly low: "low";
|
|
369
526
|
readonly medium: "medium";
|
|
370
527
|
readonly high: "high";
|
|
@@ -380,8 +537,21 @@ interface ButtonProps extends BaseButtonProps {
|
|
|
380
537
|
/** When `true`, the button gets as large as possible. */
|
|
381
538
|
fullWidth?: boolean;
|
|
382
539
|
/** Children */
|
|
383
|
-
children?:
|
|
540
|
+
children?: JSXElement;
|
|
384
541
|
}
|
|
542
|
+
/**
|
|
543
|
+
* Component display name.
|
|
544
|
+
*/
|
|
545
|
+
declare const COMPONENT_NAME = "Button";
|
|
546
|
+
/**
|
|
547
|
+
* Component default class name and class prefix.
|
|
548
|
+
*/
|
|
549
|
+
declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
|
|
550
|
+
/**
|
|
551
|
+
* Component default props.
|
|
552
|
+
*/
|
|
553
|
+
declare const DEFAULT_PROPS: Partial<ButtonProps>;
|
|
554
|
+
|
|
385
555
|
/**
|
|
386
556
|
* Button component.
|
|
387
557
|
*
|
|
@@ -391,7 +561,7 @@ interface ButtonProps extends BaseButtonProps {
|
|
|
391
561
|
*/
|
|
392
562
|
declare const Button: Comp<ButtonProps, HTMLAnchorElement | HTMLButtonElement>;
|
|
393
563
|
|
|
394
|
-
interface IconButtonProps extends BaseButtonProps {
|
|
564
|
+
interface IconButtonProps$1 extends BaseButtonProps {
|
|
395
565
|
/**
|
|
396
566
|
* Icon (SVG path).
|
|
397
567
|
* If `image` is also set, `image` will be used instead.
|
|
@@ -407,6 +577,9 @@ interface IconButtonProps extends BaseButtonProps {
|
|
|
407
577
|
* If you really don't want an aria-label, you can set an empty label (this is not recommended).
|
|
408
578
|
*/
|
|
409
579
|
label: string;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
interface IconButtonProps extends IconButtonProps$1 {
|
|
410
583
|
/**
|
|
411
584
|
* Props to pass to the tooltip.
|
|
412
585
|
* If undefined or if tooltipProps.label is undefined, the label prop will be used as tooltip label.
|
|
@@ -427,12 +600,13 @@ declare const IconButton: Comp<IconButtonProps, HTMLButtonElement>;
|
|
|
427
600
|
/**
|
|
428
601
|
* Defines the props of the component
|
|
429
602
|
*/
|
|
430
|
-
interface ButtonGroupProps extends GenericProps
|
|
603
|
+
interface ButtonGroupProps extends GenericProps {
|
|
431
604
|
/**
|
|
432
605
|
* Children
|
|
433
606
|
*/
|
|
434
607
|
children?: React.ReactNode;
|
|
435
608
|
}
|
|
609
|
+
|
|
436
610
|
/**
|
|
437
611
|
* ButtonGroup component.
|
|
438
612
|
*
|
|
@@ -445,7 +619,7 @@ declare const ButtonGroup: Comp<ButtonGroupProps, HTMLDivElement>;
|
|
|
445
619
|
/**
|
|
446
620
|
* Defines the props of the component.
|
|
447
621
|
*/
|
|
448
|
-
interface CheckboxProps extends GenericProps$1, HasTheme$1, HasAriaDisabled {
|
|
622
|
+
interface CheckboxProps extends GenericProps$1, HasTheme$1, HasAriaDisabled$1 {
|
|
449
623
|
/** Helper text. */
|
|
450
624
|
helper?: string;
|
|
451
625
|
/** Native input id property. */
|
|
@@ -483,7 +657,7 @@ type ChipSize = Extract<Size$1, 's' | 'm'>;
|
|
|
483
657
|
/**
|
|
484
658
|
* Defines the props of the component.
|
|
485
659
|
*/
|
|
486
|
-
interface ChipProps extends GenericProps$1, HasTheme$1, HasAriaDisabled {
|
|
660
|
+
interface ChipProps extends GenericProps$1, HasTheme$1, HasAriaDisabled$1 {
|
|
487
661
|
/** A component to be rendered after the content. */
|
|
488
662
|
after?: ReactNode;
|
|
489
663
|
/** A component to be rendered before the content. */
|
|
@@ -1312,157 +1486,6 @@ interface GridColumnProps extends GenericProps$1 {
|
|
|
1312
1486
|
*/
|
|
1313
1487
|
declare const GridColumn: Comp<GridColumnProps, HTMLElement>;
|
|
1314
1488
|
|
|
1315
|
-
declare const Theme: {
|
|
1316
|
-
readonly light: "light";
|
|
1317
|
-
readonly dark: "dark";
|
|
1318
|
-
};
|
|
1319
|
-
type Theme = ValueOf<typeof Theme>;
|
|
1320
|
-
declare const Size: {
|
|
1321
|
-
readonly xxs: "xxs";
|
|
1322
|
-
readonly xs: "xs";
|
|
1323
|
-
readonly s: "s";
|
|
1324
|
-
readonly m: "m";
|
|
1325
|
-
readonly l: "l";
|
|
1326
|
-
readonly xl: "xl";
|
|
1327
|
-
readonly xxl: "xxl";
|
|
1328
|
-
readonly tiny: "tiny";
|
|
1329
|
-
readonly regular: "regular";
|
|
1330
|
-
readonly medium: "medium";
|
|
1331
|
-
readonly big: "big";
|
|
1332
|
-
readonly huge: "huge";
|
|
1333
|
-
};
|
|
1334
|
-
type Size = ValueOf<typeof Size>;
|
|
1335
|
-
/**
|
|
1336
|
-
* List of typographies that can't be customized.
|
|
1337
|
-
*/
|
|
1338
|
-
declare const TypographyInterface: {
|
|
1339
|
-
readonly overline: "overline";
|
|
1340
|
-
readonly caption: "caption";
|
|
1341
|
-
readonly body1: "body1";
|
|
1342
|
-
readonly body2: "body2";
|
|
1343
|
-
readonly subtitle1: "subtitle1";
|
|
1344
|
-
readonly subtitle2: "subtitle2";
|
|
1345
|
-
readonly title: "title";
|
|
1346
|
-
readonly headline: "headline";
|
|
1347
|
-
readonly display1: "display1";
|
|
1348
|
-
};
|
|
1349
|
-
type TypographyInterface = ValueOf<typeof TypographyInterface>;
|
|
1350
|
-
/**
|
|
1351
|
-
* List of typographies that can be customized (via CSS variables).
|
|
1352
|
-
*/
|
|
1353
|
-
declare const TypographyCustom: {
|
|
1354
|
-
readonly intro: "custom-intro";
|
|
1355
|
-
readonly 'body-large': "custom-body-large";
|
|
1356
|
-
readonly body: "custom-body";
|
|
1357
|
-
readonly quote: "custom-quote";
|
|
1358
|
-
readonly 'publish-info': "custom-publish-info";
|
|
1359
|
-
readonly button: "custom-button";
|
|
1360
|
-
readonly title1: "custom-title1";
|
|
1361
|
-
readonly title2: "custom-title2";
|
|
1362
|
-
readonly title3: "custom-title3";
|
|
1363
|
-
readonly title4: "custom-title4";
|
|
1364
|
-
readonly title5: "custom-title5";
|
|
1365
|
-
readonly title6: "custom-title6";
|
|
1366
|
-
};
|
|
1367
|
-
type TypographyCustom = ValueOf<typeof TypographyCustom>;
|
|
1368
|
-
/**
|
|
1369
|
-
* List of all typographies.
|
|
1370
|
-
*/
|
|
1371
|
-
declare const Typography: {
|
|
1372
|
-
readonly custom: {
|
|
1373
|
-
readonly intro: "custom-intro";
|
|
1374
|
-
readonly 'body-large': "custom-body-large";
|
|
1375
|
-
readonly body: "custom-body";
|
|
1376
|
-
readonly quote: "custom-quote";
|
|
1377
|
-
readonly 'publish-info': "custom-publish-info";
|
|
1378
|
-
readonly button: "custom-button";
|
|
1379
|
-
readonly title1: "custom-title1";
|
|
1380
|
-
readonly title2: "custom-title2";
|
|
1381
|
-
readonly title3: "custom-title3";
|
|
1382
|
-
readonly title4: "custom-title4";
|
|
1383
|
-
readonly title5: "custom-title5";
|
|
1384
|
-
readonly title6: "custom-title6";
|
|
1385
|
-
};
|
|
1386
|
-
readonly overline: "overline";
|
|
1387
|
-
readonly caption: "caption";
|
|
1388
|
-
readonly body1: "body1";
|
|
1389
|
-
readonly body2: "body2";
|
|
1390
|
-
readonly subtitle1: "subtitle1";
|
|
1391
|
-
readonly subtitle2: "subtitle2";
|
|
1392
|
-
readonly title: "title";
|
|
1393
|
-
readonly headline: "headline";
|
|
1394
|
-
readonly display1: "display1";
|
|
1395
|
-
};
|
|
1396
|
-
type Typography = TypographyInterface | TypographyCustom;
|
|
1397
|
-
/**
|
|
1398
|
-
* Semantic info about the purpose of the component
|
|
1399
|
-
*/
|
|
1400
|
-
declare const Kind: {
|
|
1401
|
-
readonly info: "info";
|
|
1402
|
-
readonly success: "success";
|
|
1403
|
-
readonly warning: "warning";
|
|
1404
|
-
readonly error: "error";
|
|
1405
|
-
};
|
|
1406
|
-
type Kind = ValueOf<typeof Kind>;
|
|
1407
|
-
/**
|
|
1408
|
-
* See SCSS variable $lumx-color-palette
|
|
1409
|
-
*/
|
|
1410
|
-
declare const ColorPalette: {
|
|
1411
|
-
readonly primary: "primary";
|
|
1412
|
-
readonly secondary: "secondary";
|
|
1413
|
-
readonly blue: "blue";
|
|
1414
|
-
readonly dark: "dark";
|
|
1415
|
-
readonly green: "green";
|
|
1416
|
-
readonly yellow: "yellow";
|
|
1417
|
-
readonly red: "red";
|
|
1418
|
-
readonly light: "light";
|
|
1419
|
-
readonly grey: "grey";
|
|
1420
|
-
};
|
|
1421
|
-
type ColorPalette = ValueOf<typeof ColorPalette>;
|
|
1422
|
-
/**
|
|
1423
|
-
* See SCSS variable $lumx-color-variants
|
|
1424
|
-
*/
|
|
1425
|
-
declare const ColorVariant: {
|
|
1426
|
-
readonly D1: "D1";
|
|
1427
|
-
readonly D2: "D2";
|
|
1428
|
-
readonly L1: "L1";
|
|
1429
|
-
readonly L2: "L2";
|
|
1430
|
-
readonly L3: "L3";
|
|
1431
|
-
readonly L4: "L4";
|
|
1432
|
-
readonly L5: "L5";
|
|
1433
|
-
readonly L6: "L6";
|
|
1434
|
-
readonly N: "N";
|
|
1435
|
-
};
|
|
1436
|
-
type ColorVariant = ValueOf<typeof ColorVariant>;
|
|
1437
|
-
/** ColorPalette with all possible color variant combination */
|
|
1438
|
-
type ColorWithVariants = ColorPalette | Exclude<`${ColorPalette}-${ColorVariant}`, `light-D${number}` | `dark-D${number}`>;
|
|
1439
|
-
|
|
1440
|
-
interface HasClassName {
|
|
1441
|
-
/**
|
|
1442
|
-
* Class name forwarded to the root element of the component.
|
|
1443
|
-
*/
|
|
1444
|
-
className?: string;
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
interface HasTheme {
|
|
1448
|
-
/**
|
|
1449
|
-
* Theme adapting the component to light or dark background.
|
|
1450
|
-
*/
|
|
1451
|
-
theme?: Theme;
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
/**
|
|
1455
|
-
* Define a generic props types.
|
|
1456
|
-
*/
|
|
1457
|
-
interface GenericProps extends HasClassName {
|
|
1458
|
-
/**
|
|
1459
|
-
* Any prop (particularly any supported prop for a HTML element).
|
|
1460
|
-
*/
|
|
1461
|
-
[propName: string]: any;
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
type JSXElement = boolean | number | string | React__default.JSX.Element | Iterable<JSXElement> | undefined | null;
|
|
1465
|
-
|
|
1466
1489
|
type IconSizes = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
|
|
1467
1490
|
/**
|
|
1468
1491
|
* Defines the props of the component.
|
|
@@ -1823,7 +1846,7 @@ type HTMLAnchorProps = React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAn
|
|
|
1823
1846
|
/**
|
|
1824
1847
|
* Defines the props of the component.
|
|
1825
1848
|
*/
|
|
1826
|
-
interface LinkProps extends GenericProps$1, HasAriaDisabled {
|
|
1849
|
+
interface LinkProps extends GenericProps$1, HasAriaDisabled$1 {
|
|
1827
1850
|
/** Color variant. */
|
|
1828
1851
|
color?: ColorWithVariants$1;
|
|
1829
1852
|
/** Lightened or darkened variant of the selected icon color. */
|
|
@@ -1935,7 +1958,7 @@ type ListItemSize = Extract<Size$1, 'tiny' | 'regular' | 'big' | 'huge'>;
|
|
|
1935
1958
|
/**
|
|
1936
1959
|
* Defines the props of the component.
|
|
1937
1960
|
*/
|
|
1938
|
-
interface ListItemProps extends GenericProps$1, HasAriaDisabled {
|
|
1961
|
+
interface ListItemProps extends GenericProps$1, HasAriaDisabled$1 {
|
|
1939
1962
|
/** A component to be rendered after the content. */
|
|
1940
1963
|
after?: ReactNode;
|
|
1941
1964
|
/** A component to be rendered before the content. */
|
|
@@ -2338,7 +2361,7 @@ declare const ProgressTrackerStepPanel: Comp<ProgressTrackerStepPanelProps, HTML
|
|
|
2338
2361
|
/**
|
|
2339
2362
|
* Defines the props of the component.
|
|
2340
2363
|
*/
|
|
2341
|
-
interface RadioButtonProps extends GenericProps$1, HasTheme$1, HasAriaDisabled {
|
|
2364
|
+
interface RadioButtonProps extends GenericProps$1, HasTheme$1, HasAriaDisabled$1 {
|
|
2342
2365
|
/** Helper text. */
|
|
2343
2366
|
helper?: string;
|
|
2344
2367
|
/** Native input id property. */
|
|
@@ -2493,7 +2516,7 @@ interface SideNavigationItemProps extends GenericProps$1, HasCloseMode {
|
|
|
2493
2516
|
/** SideNavigationItem elements. */
|
|
2494
2517
|
children?: ReactNode;
|
|
2495
2518
|
/** Emphasis variant. */
|
|
2496
|
-
emphasis?: Emphasis;
|
|
2519
|
+
emphasis?: Emphasis$1;
|
|
2497
2520
|
/** Label content. */
|
|
2498
2521
|
label: string | ReactNode;
|
|
2499
2522
|
/** Icon (SVG path). */
|
|
@@ -2832,7 +2855,7 @@ declare const Slides: Comp<SlidesProps, HTMLDivElement>;
|
|
|
2832
2855
|
/**
|
|
2833
2856
|
* Defines the props of the component.
|
|
2834
2857
|
*/
|
|
2835
|
-
interface SwitchProps extends GenericProps$1, HasTheme$1, HasAriaDisabled {
|
|
2858
|
+
interface SwitchProps extends GenericProps$1, HasTheme$1, HasAriaDisabled$1 {
|
|
2836
2859
|
/** Helper text. */
|
|
2837
2860
|
helper?: string;
|
|
2838
2861
|
/** Whether it is checked or not. */
|
|
@@ -3083,7 +3106,7 @@ declare const TabPanel: Comp<TabPanelProps, HTMLDivElement>;
|
|
|
3083
3106
|
/**
|
|
3084
3107
|
* Defines the props of the component.
|
|
3085
3108
|
*/
|
|
3086
|
-
interface TextFieldProps extends GenericProps$1, HasTheme$1, HasAriaDisabled {
|
|
3109
|
+
interface TextFieldProps extends GenericProps$1, HasTheme$1, HasAriaDisabled$1 {
|
|
3087
3110
|
/** Chip Group to be rendered before the main text input. */
|
|
3088
3111
|
chips?: ReactNode;
|
|
3089
3112
|
/** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */
|
|
@@ -3251,7 +3274,7 @@ interface FileInputProps extends Omit<React__default.ComponentProps<'input'>, 'o
|
|
|
3251
3274
|
/**
|
|
3252
3275
|
* Defines the props of the component.
|
|
3253
3276
|
*/
|
|
3254
|
-
interface UploaderProps extends GenericProps$1, HasTheme$1, HasAriaDisabled {
|
|
3277
|
+
interface UploaderProps extends GenericProps$1, HasTheme$1, HasAriaDisabled$1 {
|
|
3255
3278
|
/** Image aspect ratio. */
|
|
3256
3279
|
aspectRatio?: AspectRatio;
|
|
3257
3280
|
/** Icon (SVG path). */
|
|
@@ -3335,5 +3358,5 @@ declare const ThemeProvider: React__default.FC<{
|
|
|
3335
3358
|
/** Get the theme in the current context. */
|
|
3336
3359
|
declare function useTheme(): ThemeContextValue;
|
|
3337
3360
|
|
|
3338
|
-
export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonEmphasis, ButtonGroup, Checkbox, Chip, ChipGroup, CommentBlock, CommentBlockVariant, DatePicker, DatePickerControlled, DatePickerField, Dialog, Divider, DragHandle, Dropdown, ExpansionPanel, Flag, FlexBox, GenericBlock, GenericBlockGapSize, Grid, GridColumn, GridItem, Heading, HeadingLevelProvider, Icon, IconButton, ImageBlock, ImageBlockCaptionPosition, ImageLightbox, InlineList, InputHelper, InputLabel, Lightbox, Link, LinkPreview, List, ListDivider, ListItem, ListSubheader, Message, Mosaic, Navigation, Notification, Placement, Popover, PopoverDialog, PostBlock, Progress, ProgressCircular, ProgressLinear, ProgressTracker, ProgressTrackerProvider, ProgressTrackerStep, ProgressTrackerStepPanel, ProgressVariant, RadioButton, RadioGroup, RawInputText, RawInputTextarea, Select, SelectMultiple, SelectMultipleField, SelectVariant, SideNavigation, SideNavigationItem, SkeletonCircle, SkeletonRectangle, SkeletonRectangleVariant, SkeletonTypography, Slider, Slides, Slideshow, SlideshowControls, SlideshowItem, Switch, Tab, TabList, TabListLayout, TabPanel, TabProvider, Table, TableBody, TableCell, TableCellVariant, TableHeader, TableRow, Text, TextField, ThOrder, ThemeProvider, Thumbnail, ThumbnailAspectRatio, ThumbnailObjectFit, ThumbnailVariant, Toolbar, Tooltip, Uploader, UploaderVariant, UserBlock, clamp, isClickable, useFocusPointStyle, useHeadingLevel, useTheme };
|
|
3361
|
+
export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonEmphasis, ButtonGroup, CLASSNAME, COMPONENT_NAME, Checkbox, Chip, ChipGroup, CommentBlock, CommentBlockVariant, DEFAULT_PROPS, DatePicker, DatePickerControlled, DatePickerField, Dialog, Divider, DragHandle, Dropdown, ExpansionPanel, Flag, FlexBox, GenericBlock, GenericBlockGapSize, Grid, GridColumn, GridItem, Heading, HeadingLevelProvider, Icon, IconButton, ImageBlock, ImageBlockCaptionPosition, ImageLightbox, InlineList, InputHelper, InputLabel, Lightbox, Link, LinkPreview, List, ListDivider, ListItem, ListSubheader, Message, Mosaic, Navigation, Notification, Placement, Popover, PopoverDialog, PostBlock, Progress, ProgressCircular, ProgressLinear, ProgressTracker, ProgressTrackerProvider, ProgressTrackerStep, ProgressTrackerStepPanel, ProgressVariant, RadioButton, RadioGroup, RawInputText, RawInputTextarea, Select, SelectMultiple, SelectMultipleField, SelectVariant, SideNavigation, SideNavigationItem, SkeletonCircle, SkeletonRectangle, SkeletonRectangleVariant, SkeletonTypography, Slider, Slides, Slideshow, SlideshowControls, SlideshowItem, Switch, Tab, TabList, TabListLayout, TabPanel, TabProvider, Table, TableBody, TableCell, TableCellVariant, TableHeader, TableRow, Text, TextField, ThOrder, ThemeProvider, Thumbnail, ThumbnailAspectRatio, ThumbnailObjectFit, ThumbnailVariant, Toolbar, Tooltip, Uploader, UploaderVariant, UserBlock, clamp, isClickable, useFocusPointStyle, useHeadingLevel, useTheme };
|
|
3339
3362
|
export type { AlertDialogProps, AutocompleteMultipleProps, AutocompleteProps, AvatarProps, AvatarSize, BadgeProps, BadgeWrapperProps, BaseButtonProps, ButtonGroupProps, ButtonProps, ButtonSize, CheckboxProps, ChipGroupProps, ChipProps, CommentBlockProps, DatePickerControlledProps, DatePickerFieldProps, DatePickerProps, DialogProps, DialogSizes, DividerProps, DragHandleProps, DropdownProps, Elevation, ExpansionPanelProps, FlagProps, FlexBoxProps, FlexHorizontalAlignment, FlexVerticalAlignment, FocusPoint, GapSize, GenericBlockProps, GridColumnGapSize, GridColumnProps, GridItemProps, GridProps, HeadingLevelProviderProps, HeadingProps, IconButtonProps, IconProps, IconSizes, ImageBlockProps, ImageBlockSize, ImageLightboxProps, InlineListProps, InputHelperProps, InputLabelProps, LightboxProps, LinkPreviewProps, LinkProps, ListDividerProps, ListItemProps, ListItemSize, ListProps, ListSubheaderProps, MarginAutoAlignment, MessageProps, MosaicProps, NavigationProps, NotificationProps, Offset, PopoverDialogProps, PopoverProps, PostBlockProps, ProgressCircularProps, ProgressCircularSize, ProgressLinearProps, ProgressProps, ProgressTrackerProps, ProgressTrackerProviderProps, ProgressTrackerStepPanelProps, ProgressTrackerStepProps, RadioButtonProps, RadioGroupProps, RawInputTextProps, RawInputTextareaProps, SelectMultipleProps, SelectProps, SideNavigationItemProps, SideNavigationProps, SkeletonCircleProps, SkeletonRectangleProps, SkeletonTypographyProps, SliderProps, SlidesProps, SlideshowControlsProps, SlideshowItemProps, SlideshowProps, SwitchProps, TabListProps, TabPanelProps, TabProps, TabProviderProps, TableBodyProps, TableCellProps, TableHeaderProps, TableProps, TableRowProps, TextFieldProps, TextProps, ThumbnailProps, ThumbnailSize, ToolbarProps, TooltipPlacement, TooltipProps, UploaderProps, UploaderSize, UserBlockProps, UserBlockSize };
|