@lumx/core 4.3.2-alpha.13 → 4.3.2-alpha.14

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 (123) hide show
  1. package/js/constants/enums/index.d.ts +9 -0
  2. package/js/constants/enums/index.js +10 -1
  3. package/js/constants/index.js +1 -1
  4. package/js/types/PartialBy.d.ts +12 -0
  5. package/js/types/index.d.ts +1 -0
  6. package/js/types/index.js +1 -0
  7. package/js/utils/classNames/bem/block.d.ts +3 -2
  8. package/js/utils/classNames/bem/element.d.ts +3 -2
  9. package/js/utils/classNames/bem/index.d.ts +5 -4
  10. package/js/utils/disabledState/index.js +12 -0
  11. package/js/utils/events/index.js +2 -0
  12. package/lumx.css +94 -0
  13. package/package.json +2 -23
  14. package/scss/_components.scss +1 -0
  15. package/scss/components/combobox/_index.scss +86 -0
  16. package/scss/components/combobox/_mixins.scss +63 -0
  17. package/scss/lumx.scss +1 -0
  18. package/js/components/Badge/BadgeWrapper.d.ts +0 -13
  19. package/js/components/Badge/BadgeWrapperStories.d.ts +0 -29
  20. package/js/components/Badge/BadgeWrapperTests.d.ts +0 -9
  21. package/js/components/Badge/Stories.d.ts +0 -52
  22. package/js/components/Badge/Tests.d.ts +0 -12
  23. package/js/components/Badge/index.d.ts +0 -37
  24. package/js/components/Button/Button.d.ts +0 -48
  25. package/js/components/Button/ButtonGroup.d.ts +0 -36
  26. package/js/components/Button/ButtonGroupStories.d.ts +0 -37
  27. package/js/components/Button/ButtonRoot.d.ts +0 -55
  28. package/js/components/Button/ButtonRootTests.d.ts +0 -12
  29. package/js/components/Button/IconButton.d.ts +0 -45
  30. package/js/components/Button/IconButtonStories.d.ts +0 -211
  31. package/js/components/Button/IconButtonTests.d.ts +0 -15
  32. package/js/components/Button/Stories.d.ts +0 -301
  33. package/js/components/Button/Tests.d.ts +0 -15
  34. package/js/components/Checkbox/Stories.d.ts +0 -88
  35. package/js/components/Checkbox/Tests.d.ts +0 -15
  36. package/js/components/Checkbox/index.d.ts +0 -49
  37. package/js/components/Divider/Stories.d.ts +0 -21
  38. package/js/components/Divider/Tests.d.ts +0 -12
  39. package/js/components/Divider/index.d.ts +0 -27
  40. package/js/components/Flag/Stories.d.ts +0 -120
  41. package/js/components/Flag/Tests.d.ts +0 -14
  42. package/js/components/Flag/index.d.ts +0 -34
  43. package/js/components/FlexBox/Stories.d.ts +0 -108
  44. package/js/components/FlexBox/Tests.d.ts +0 -13
  45. package/js/components/FlexBox/constants.d.ts +0 -4
  46. package/js/components/FlexBox/index.d.ts +0 -50
  47. package/js/components/FlexBox/types.d.ts +0 -7
  48. package/js/components/Heading/Stories.d.ts +0 -89
  49. package/js/components/Heading/Tests.d.ts +0 -11
  50. package/js/components/Heading/constants.d.ts +0 -21
  51. package/js/components/Heading/index.d.ts +0 -44
  52. package/js/components/Heading/utils.d.ts +0 -8
  53. package/js/components/Icon/Stories.d.ts +0 -150
  54. package/js/components/Icon/Tests.d.ts +0 -14
  55. package/js/components/Icon/constants.d.ts +0 -1
  56. package/js/components/Icon/index.d.ts +0 -41
  57. package/js/components/InputHelper/Stories.d.ts +0 -43
  58. package/js/components/InputHelper/Tests.d.ts +0 -12
  59. package/js/components/InputHelper/constants.d.ts +0 -3
  60. package/js/components/InputHelper/index.d.ts +0 -26
  61. package/js/components/InputLabel/Stories.d.ts +0 -34
  62. package/js/components/InputLabel/Tests.d.ts +0 -12
  63. package/js/components/InputLabel/index.d.ts +0 -25
  64. package/js/components/Link/Stories.d.ts +0 -93
  65. package/js/components/Link/Tests.d.ts +0 -15
  66. package/js/components/Link/index.d.ts +0 -54
  67. package/js/components/Message/Stories.d.ts +0 -119
  68. package/js/components/Message/Tests.d.ts +0 -14
  69. package/js/components/Message/index.d.ts +0 -75
  70. package/js/components/RadioButton/Stories.d.ts +0 -77
  71. package/js/components/RadioButton/Tests.d.ts +0 -15
  72. package/js/components/RadioButton/index.d.ts +0 -45
  73. package/js/components/RawClickable/Tests.d.ts +0 -14
  74. package/js/components/RawClickable/index.d.ts +0 -13
  75. package/js/components/Skeleton/SkeletonCircle.d.ts +0 -32
  76. package/js/components/Skeleton/SkeletonCircleStories.d.ts +0 -45
  77. package/js/components/Skeleton/SkeletonCircleTests.d.ts +0 -12
  78. package/js/components/Skeleton/SkeletonRectangle.d.ts +0 -47
  79. package/js/components/Skeleton/SkeletonRectangleStories.d.ts +0 -87
  80. package/js/components/Skeleton/SkeletonRectangleTests.d.ts +0 -13
  81. package/js/components/Skeleton/SkeletonTypography.d.ts +0 -37
  82. package/js/components/Skeleton/SkeletonTypographyStories.d.ts +0 -40
  83. package/js/components/Skeleton/SkeletonTypographyTests.d.ts +0 -13
  84. package/js/components/Skeleton/index.d.ts +0 -3
  85. package/js/components/Switch/Stories.d.ts +0 -94
  86. package/js/components/Switch/Tests.d.ts +0 -15
  87. package/js/components/Switch/index.d.ts +0 -47
  88. package/js/components/Table/Stories.d.ts +0 -25
  89. package/js/components/Table/TableCell.d.ts +0 -55
  90. package/js/components/Table/TableCellStories.d.ts +0 -44
  91. package/js/components/Table/TableCellTests.d.ts +0 -11
  92. package/js/components/Table/TableRowStories.d.ts +0 -23
  93. package/js/components/Table/Tests.d.ts +0 -11
  94. package/js/components/Table/constants.d.ts +0 -9
  95. package/js/components/Table/index.d.ts +0 -27
  96. package/js/components/Text/Stories.d.ts +0 -167
  97. package/js/components/Text/Tests.d.ts +0 -10
  98. package/js/components/Text/index.d.ts +0 -935
  99. package/js/components/Thumbnail/Stories.d.ts +0 -168
  100. package/js/components/Thumbnail/Tests.d.ts +0 -11
  101. package/js/components/Thumbnail/index.d.ts +0 -84
  102. package/js/components/Thumbnail/types.d.ts +0 -45
  103. package/js/components/Thumbnail/utils.d.ts +0 -79
  104. package/stories/controls/color.d.ts +0 -15
  105. package/stories/controls/element.d.ts +0 -16
  106. package/stories/controls/focusPoint.d.ts +0 -8
  107. package/stories/controls/icons.d.ts +0 -66
  108. package/stories/controls/image.d.ts +0 -96
  109. package/stories/controls/selectArgType.d.ts +0 -7
  110. package/stories/controls/theme.d.ts +0 -7
  111. package/stories/controls/typography.d.ts +0 -8
  112. package/stories/controls/withUndefined.d.ts +0 -1
  113. package/stories/types.d.ts +0 -47
  114. package/stories/utils/combinations.d.ts +0 -100
  115. package/stories/utils/concatPath.d.ts +0 -10
  116. package/stories/utils/disableArgTypes.d.ts +0 -7
  117. package/stories/utils/initDemoShadowDOMPortal.d.ts +0 -5
  118. package/stories/utils/lorem.d.ts +0 -7
  119. package/stories/utils/toFlattenProps.d.ts +0 -12
  120. package/stories/utils/withCategory.d.ts +0 -4
  121. package/testing/commonTestsSuiteTL.d.ts +0 -87
  122. package/testing/index.d.ts +0 -1
  123. package/testing/queries.d.ts +0 -4
@@ -1,168 +0,0 @@
1
- import type { SetupStoriesOptions } from '@lumx/core/stories/types';
2
- import { AspectRatio } from '../../constants';
3
- import { ThumbnailVariant } from './types';
4
- /**
5
- * Setup Thumbnail stories for a specific framework (React or Vue).
6
- * This function creates all the stories with the appropriate decorators.
7
- */
8
- export declare function setup({ component, render, decorators: { withNestedProps }, overrides, }: SetupStoriesOptions<{
9
- overrides: 'Simple' | 'FillHeightAndRatio' | 'ObjectFit';
10
- decorators: 'withNestedProps';
11
- }>): {
12
- meta: {
13
- component: any;
14
- render: any;
15
- argTypes: {
16
- image: {
17
- control: {
18
- type: "select" | "inline-radio";
19
- };
20
- options: string[];
21
- mapping: Record<string, string> | undefined;
22
- };
23
- align: {
24
- control: {
25
- type: "select" | "inline-radio";
26
- };
27
- options: ("center" | "left" | "right")[];
28
- mapping: Record<string, "center" | "left" | "right"> | undefined;
29
- };
30
- variant: {
31
- control: {
32
- type: "select" | "inline-radio";
33
- };
34
- options: ("squared" | "rounded")[];
35
- mapping: Record<string, "squared" | "rounded"> | undefined;
36
- };
37
- aspectRatio: {
38
- control: {
39
- type: "select" | "inline-radio";
40
- };
41
- options: ("horizontal" | "vertical" | "original" | "panoramic" | "wide" | "square" | "free")[];
42
- mapping: Record<string, "horizontal" | "vertical" | "original" | "panoramic" | "wide" | "square" | "free"> | undefined;
43
- };
44
- fallback: {
45
- control: boolean;
46
- };
47
- 'focusPoint.x': {
48
- control: {
49
- type: string;
50
- max: number;
51
- min: number;
52
- step: number;
53
- };
54
- };
55
- 'focusPoint.y': {
56
- control: {
57
- type: string;
58
- max: number;
59
- min: number;
60
- step: number;
61
- };
62
- };
63
- };
64
- decorators: ((story: any, context: any) => any)[];
65
- args: {
66
- align?: import("../../constants").HorizontalAlignment | undefined;
67
- alt?: string | undefined;
68
- aspectRatio?: AspectRatio | undefined;
69
- badge?: import("react").ReactNode;
70
- crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
71
- fallback?: import("react").ReactNode;
72
- fillHeight?: boolean | undefined;
73
- image?: string | undefined;
74
- loadingState?: string | undefined;
75
- imgProps?: import("react").ImgHTMLAttributes<HTMLImageElement> | undefined;
76
- imgRef?: import("../../types").CommonRef;
77
- ref?: import("../../types").CommonRef;
78
- isLoading?: boolean | undefined;
79
- objectFit?: import("./types").ThumbnailObjectFit | undefined;
80
- size?: import("./types").ThumbnailSize | undefined;
81
- loading?: "eager" | "lazy" | undefined;
82
- loadingPlaceholderImageRef?: React.RefObject<HTMLImageElement> | undefined;
83
- onClick?: ((event: any) => void) | undefined;
84
- onKeyPress?: ((event: any) => void) | undefined;
85
- variant?: ThumbnailVariant | undefined;
86
- linkProps?: import("../../types").GenericProps | undefined;
87
- focusPointStyle?: import("../../types").GenericProps | undefined;
88
- disabledStateProps?: import("../../types").GenericProps | undefined;
89
- isAnyDisabled?: boolean | undefined;
90
- linkAs?: "a" | any;
91
- 'aria-label'?: string | undefined;
92
- theme?: import("../../constants").Theme | undefined;
93
- className?: string | undefined;
94
- };
95
- };
96
- /** Simple thumbnail taking the size of the original image */
97
- Simple: {
98
- [x: string]: any;
99
- };
100
- /** Loading state */
101
- IsLoading: {
102
- args: {
103
- image: string;
104
- isLoading: boolean;
105
- };
106
- };
107
- WithoutSource: {
108
- args: {
109
- image: string;
110
- size: "xxl";
111
- aspectRatio: "square";
112
- };
113
- };
114
- /** Demonstrate the focus point X on a vertical thumbnail containing an horizontal image */
115
- FocusPointVertical: {
116
- args: {
117
- aspectRatio: "vertical";
118
- size: "xxl";
119
- image: string;
120
- 'focusPoint.x': number;
121
- };
122
- };
123
- /** Demonstrate the focus point Y on a horizontal thumbnail containing an vertical image */
124
- FocusPointHorizontal: {
125
- args: {
126
- aspectRatio: "horizontal";
127
- size: "xxl";
128
- image: string;
129
- 'focusPoint.y': number;
130
- };
131
- };
132
- /** Setting `onClick` to turn the thumbnail into a button */
133
- AsButton: {
134
- args: {
135
- image: string;
136
- };
137
- argTypes: {
138
- onClick: {
139
- action: boolean;
140
- };
141
- };
142
- };
143
- /** Setting `linkProps.href` to turn the thumbnail into a link */
144
- AsLink: {
145
- args: {
146
- image: string;
147
- linkProps: {
148
- href: string;
149
- };
150
- };
151
- };
152
- /** Combinations of fillHeight and ratios */
153
- FillHeightAndRatio: {
154
- [x: string]: any;
155
- };
156
- /** Simple thumbnail with svg image */
157
- WithSvgImages: {
158
- args: {
159
- image: string;
160
- size: "xxl";
161
- fillHeight: boolean;
162
- 'focusPoint.x': number;
163
- };
164
- };
165
- ObjectFit: {
166
- [x: string]: any;
167
- };
168
- };
@@ -1,11 +0,0 @@
1
- import { SetupOptions } from '../../../testing';
2
- /**
3
- * Mounts the component and returns common DOM elements / data needed in multiple tests further down.
4
- */
5
- export declare const setup: (propsOverride: any | undefined, { render, ...options }: SetupOptions<any>) => {
6
- props: any;
7
- thumbnail: HTMLElement;
8
- wrapper: Partial<import("../../../testing").SetupResult>;
9
- };
10
- declare const _default: (renderOptions: SetupOptions<any>) => void;
11
- export default _default;
@@ -1,84 +0,0 @@
1
- import type { ImgHTMLAttributes } from 'react';
2
- import { AspectRatio, HorizontalAlignment } from '@lumx/core/js/constants';
3
- import type { GenericProps, HasTheme, CommonRef, JSXElement, LumxClassName, HasClassName } from '@lumx/core/js/types';
4
- import { ThumbnailSize, ThumbnailVariant, ThumbnailObjectFit } from './types';
5
- type ImgHTMLProps = ImgHTMLAttributes<HTMLImageElement>;
6
- /**
7
- * Defines the props of the component.
8
- */
9
- export interface ThumbnailProps extends HasTheme, HasClassName {
10
- /** Alignment of the thumbnail in it's parent (requires flex parent). */
11
- align?: HorizontalAlignment;
12
- /** Image alternative text. */
13
- alt: string;
14
- /** Image aspect ratio. */
15
- aspectRatio?: AspectRatio;
16
- /** Badge. */
17
- badge?: JSXElement;
18
- /** Image cross origin resource policy. */
19
- crossOrigin?: ImgHTMLProps['crossOrigin'];
20
- /** Fallback icon (SVG path) or react node when image fails to load. */
21
- fallback?: string | JSXElement;
22
- /** Whether the thumbnail should fill it's parent size (requires flex parent) or not. */
23
- fillHeight?: boolean;
24
- /** Image URL. */
25
- image: string;
26
- loadingState: string;
27
- /** Props to inject into the native <img> element. */
28
- imgProps?: ImgHTMLProps;
29
- /** Reference to the native <img> element. */
30
- imgRef?: CommonRef;
31
- ref?: CommonRef;
32
- /** Set to true to force the display of the loading skeleton. */
33
- isLoading?: boolean;
34
- /** Set how the image should fit when its aspect ratio is constrained */
35
- objectFit?: ThumbnailObjectFit;
36
- /** Size variant of the component. */
37
- size?: ThumbnailSize;
38
- /** Image loading mode. */
39
- loading?: 'eager' | 'lazy';
40
- /** Ref of an existing placeholder image to display while loading. */
41
- loadingPlaceholderImageRef?: React.RefObject<HTMLImageElement>;
42
- /** On click callback. */
43
- onClick?: (event: any) => void;
44
- /** On key press callback. */
45
- onKeyPress?: (event: any) => void;
46
- /** Variant of the component. */
47
- variant?: ThumbnailVariant;
48
- /** Props to pass to the link wrapping the thumbnail. */
49
- linkProps?: GenericProps;
50
- focusPointStyle?: GenericProps;
51
- disabledStateProps?: GenericProps;
52
- isAnyDisabled?: boolean;
53
- /** Custom react component for the link (can be used to inject react router Link). */
54
- linkAs?: 'a' | any;
55
- 'aria-label'?: string;
56
- }
57
- /**
58
- * Component display name.
59
- */
60
- export declare const COMPONENT_NAME = "Thumbnail";
61
- /**
62
- * Component default class name and class prefix.
63
- */
64
- export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
65
- export declare const block: {
66
- (additionalClasses: string[]): string;
67
- (modifiers?: import("../../utils/classNames/bem/modifier").Modifier, additionalClasses?: string[]): string;
68
- }, element: {
69
- (elem: string, additionalClasses: string[]): string;
70
- (elem: string, modifiers?: import("../../utils/classNames/bem/modifier").Modifier, additionalClasses?: string[]): string;
71
- };
72
- /**
73
- * Component default props.
74
- */
75
- export declare const DEFAULT_PROPS: Partial<ThumbnailProps>;
76
- /**
77
- * Thumbnail component.
78
- *
79
- * @param props Component props.
80
- * @param ref Component ref.
81
- * @return React element.
82
- */
83
- export declare const Thumbnail: (props: ThumbnailProps) => import("react").JSX.Element;
84
- export * from './utils';
@@ -1,45 +0,0 @@
1
- import { AspectRatio, Size } from '../../constants';
2
- import { ValueOf } from '../../types';
3
- /**
4
- * Focal point using vertical alignment, horizontal alignment or coordinates (from -1 to 1).
5
- */
6
- export type FocusPoint = {
7
- x?: number;
8
- y?: number;
9
- };
10
- /**
11
- * Loading attribute is not yet supported in typescript, so we need
12
- * to add it in order to avoid a ts error.
13
- * https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/blob/master/ADVANCED.md#adding-non-standard-attributes
14
- */
15
- declare module 'react' {
16
- interface ImgHTMLAttributes<T> extends React.HTMLAttributes<T> {
17
- loading?: 'eager' | 'lazy';
18
- }
19
- }
20
- /**
21
- * All available aspect ratios.
22
- * @deprecated
23
- */
24
- export declare const ThumbnailAspectRatio: Record<string, AspectRatio>;
25
- /**
26
- * Thumbnail sizes.
27
- */
28
- export type ThumbnailSize = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
29
- /**
30
- * Thumbnail variants.
31
- */
32
- export declare const ThumbnailVariant: {
33
- readonly squared: "squared";
34
- readonly rounded: "rounded";
35
- };
36
- export type ThumbnailVariant = ValueOf<typeof ThumbnailVariant>;
37
- /**
38
- * Thumbnail object fit.
39
- */
40
- export declare const ThumbnailObjectFit: {
41
- readonly cover: "cover";
42
- readonly contain: "contain";
43
- };
44
- export type ThumbnailObjectFit = ValueOf<typeof ThumbnailObjectFit>;
45
- export type LoadingState = 'isLoading' | 'isLoaded' | 'hasError';
@@ -1,79 +0,0 @@
1
- import type { CSSProperties } from 'react';
2
- import type { RectSize } from '../../types';
3
- import { AspectRatio } from '../../constants';
4
- import type { FocusPoint, LoadingState } from './types';
5
- /**
6
- * Determines the loading state of an HTML image element.
7
- *
8
- * @param img - The HTML image element to check
9
- * @param event - Optional event (load or error) that triggered the state check
10
- * @returns The current loading state: 'hasError', 'isLoading', or 'isLoaded'
11
- */
12
- export declare function getImageLoadingState(img: HTMLImageElement | null | undefined, event?: Event): LoadingState;
13
- /**
14
- * Parameters for getting image size.
15
- */
16
- export interface GetImageSizeParams {
17
- /** Image URL (used for validation) */
18
- image?: string;
19
- /** Aspect ratio setting */
20
- aspectRatio?: AspectRatio;
21
- /** Focus point (if not set, size calculation is skipped) */
22
- focusPoint?: FocusPoint;
23
- /** Width from imgProps */
24
- width?: number;
25
- /** Height from imgProps */
26
- height?: number;
27
- /** Image element (for getting natural dimensions) */
28
- element?: HTMLImageElement;
29
- /** Whether image is loaded */
30
- isLoaded: boolean;
31
- }
32
- /**
33
- * Gets the natural image size from props or element.
34
- * Returns undefined if focus point is not applicable or size cannot be determined.
35
- *
36
- * @param params - Image size parameters
37
- * @returns Image size or undefined
38
- */
39
- export declare function getImageSize({ image, aspectRatio, focusPoint, width, height, element, isLoaded, }: GetImageSizeParams): RectSize | undefined;
40
- /**
41
- * Calculate shift position to center the focus point in the container.
42
- *
43
- * This function computes the percentage offset needed to position an image
44
- * such that a specific focus point on the image aligns with the center of
45
- * the container, taking into account the image's scale.
46
- *
47
- * @param params - Focus point shift calculation parameters
48
- * @returns Percentage shift (0-100) for CSS positioning
49
- */
50
- export declare function shiftPosition({ scale, focusPoint, imageSize, containerSize, }: {
51
- scale: number;
52
- focusPoint: number;
53
- imageSize: number;
54
- containerSize: number;
55
- }): number;
56
- /**
57
- * Parameters for calculating focus point style.
58
- */
59
- export interface CalculateFocusPointStyleParams {
60
- /** Image URL */
61
- image?: string;
62
- /** Aspect ratio */
63
- aspectRatio?: AspectRatio;
64
- /** Focus point */
65
- focusPoint?: FocusPoint;
66
- /** Image element (for validation) */
67
- element?: HTMLImageElement;
68
- /** Natural image size */
69
- imageSize?: RectSize;
70
- /** Container size */
71
- containerSize?: RectSize;
72
- }
73
- /**
74
- * Calculates CSS style for applying focus point positioning.
75
- *
76
- * @param params - Focus point style parameters
77
- * @returns CSS properties to apply to the image
78
- */
79
- export declare function calculateFocusPointStyle({ image, aspectRatio, focusPoint, element, imageSize, containerSize, }: CalculateFocusPointStyleParams): CSSProperties;
@@ -1,15 +0,0 @@
1
- export declare const ALL_COLORS: ("light" | "dark" | "primary" | "secondary" | "blue" | "green" | "yellow" | "red" | "grey")[];
2
- export declare const colorArgType: {
3
- control: {
4
- type: "select" | "inline-radio";
5
- };
6
- options: ("light" | "dark" | "primary" | "secondary" | "blue" | "green" | "yellow" | "red" | "grey" | undefined)[];
7
- mapping: Record<string, "light" | "dark" | "primary" | "secondary" | "blue" | "green" | "yellow" | "red" | "grey" | undefined> | undefined;
8
- };
9
- export declare const colorVariantArgType: {
10
- control: {
11
- type: "select" | "inline-radio";
12
- };
13
- options: ("D1" | "D2" | "L1" | "L2" | "L3" | "L4" | "L5" | "L6" | "N")[];
14
- mapping: Record<string, "D1" | "D2" | "L1" | "L2" | "L3" | "L4" | "L5" | "L6" | "N"> | undefined;
15
- };
@@ -1,16 +0,0 @@
1
- import { HeadingElement, TextElement } from '../../js/types';
2
- export declare const HEADING_ELEMENTS: HeadingElement[];
3
- export declare const headingElementArgType: {
4
- control: {
5
- type: "select" | "inline-radio";
6
- };
7
- options: HeadingElement[];
8
- mapping: Record<string, HeadingElement> | undefined;
9
- };
10
- export declare const textElementArgType: {
11
- control: {
12
- type: "select" | "inline-radio";
13
- };
14
- options: TextElement[];
15
- mapping: Record<string, TextElement> | undefined;
16
- };
@@ -1,8 +0,0 @@
1
- export declare const focusPoint: {
2
- control: {
3
- type: string;
4
- min: number;
5
- max: number;
6
- step: number;
7
- };
8
- };
@@ -1,66 +0,0 @@
1
- export declare const iconArgType: {
2
- control: {
3
- type: string;
4
- };
5
- options: {
6
- undefined: undefined;
7
- mdiAbTesting: string;
8
- mdiAbjadArabic: string;
9
- mdiAccount: string;
10
- mdiAccountBox: string;
11
- mdiAlert: string;
12
- mdiAlertCircle: string;
13
- mdiArrowDown: string;
14
- mdiArrowUp: string;
15
- mdiAtom: string;
16
- mdiBee: string;
17
- mdiBell: string;
18
- mdiBullhornOutline: string;
19
- mdiCheck: string;
20
- mdiCheckCircle: string;
21
- mdiChevronDown: string;
22
- mdiChevronLeft: string;
23
- mdiChevronRight: string;
24
- mdiChevronUp: string;
25
- mdiClose: string;
26
- mdiCloseCircle: string;
27
- mdiDelete: string;
28
- mdiDotsHorizontal: string;
29
- mdiDragVertical: string;
30
- mdiEarth: string;
31
- mdiEmail: string;
32
- mdiEye: string;
33
- mdiFileEdit: string;
34
- mdiFlag: string;
35
- mdiFolder: string;
36
- mdiFolderGoogleDrive: string;
37
- mdiFoodApple: string;
38
- mdiGoogleCirclesExtended: string;
39
- mdiHeart: string;
40
- mdiHome: string;
41
- mdiImageBroken: string;
42
- mdiInformation: string;
43
- mdiLink: string;
44
- mdiMagnifyMinusOutline: string;
45
- mdiMagnifyPlusOutline: string;
46
- mdiMenuDown: string;
47
- mdiMessageTextOutline: string;
48
- mdiMinus: string;
49
- mdiOpenInNew: string;
50
- mdiPauseCircleOutline: string;
51
- mdiPencil: string;
52
- mdiPlay: string;
53
- mdiPlayCircleOutline: string;
54
- mdiPlus: string;
55
- mdiRadioboxBlank: string;
56
- mdiRadioboxMarked: string;
57
- mdiReply: string;
58
- mdiSend: string;
59
- mdiStar: string;
60
- mdiTextBox: string;
61
- mdiTextBoxPlus: string;
62
- mdiTram: string;
63
- mdiTranslate: string;
64
- mdiViewList: string;
65
- };
66
- };
@@ -1,96 +0,0 @@
1
- export declare const AVATAR_IMAGES: {
2
- avatar1: string;
3
- avatar2: string;
4
- avatar3: string;
5
- avatar4: string;
6
- };
7
- export declare const SQUARE_IMAGES: {
8
- square1: string;
9
- square2: string;
10
- };
11
- export declare const SVG_IMAGES: {
12
- defaultSvg: string;
13
- };
14
- export declare const EMPTY_IMAGES: {
15
- emptyImage: string;
16
- };
17
- export declare const LANDSCAPE_IMAGES: {
18
- landscape1: string;
19
- landscape1s200: string;
20
- landscape2: string;
21
- landscape3: string;
22
- };
23
- export declare const LANDSCAPE_IMAGES_ALT: {
24
- [key in keyof typeof LANDSCAPE_IMAGES]: string;
25
- };
26
- export declare const PORTRAIT_IMAGES: {
27
- portrait1: string;
28
- portrait1s200: string;
29
- portrait2: string;
30
- portrait3: string;
31
- };
32
- export declare const IMAGES: {
33
- emptyImage: string;
34
- defaultSvg: string;
35
- avatar1: string;
36
- avatar2: string;
37
- avatar3: string;
38
- avatar4: string;
39
- square1: string;
40
- square2: string;
41
- portrait1: string;
42
- portrait1s200: string;
43
- portrait2: string;
44
- portrait3: string;
45
- landscape1: string;
46
- landscape1s200: string;
47
- landscape2: string;
48
- landscape3: string;
49
- };
50
- export declare const avatarImageArgType: {
51
- control: {
52
- type: "select" | "inline-radio";
53
- };
54
- options: string[];
55
- mapping: Record<string, string> | undefined;
56
- };
57
- export declare const squareImageArgType: {
58
- control: {
59
- type: "select" | "inline-radio";
60
- };
61
- options: string[];
62
- mapping: Record<string, string> | undefined;
63
- };
64
- export declare const landscapeImageArgType: {
65
- control: {
66
- type: "select" | "inline-radio";
67
- };
68
- options: string[];
69
- mapping: Record<string, string> | undefined;
70
- };
71
- export declare const portraitImageArgType: {
72
- control: {
73
- type: "select" | "inline-radio";
74
- };
75
- options: string[];
76
- mapping: Record<string, string> | undefined;
77
- };
78
- export declare const imageArgType: {
79
- control: {
80
- type: "select" | "inline-radio";
81
- };
82
- options: string[];
83
- mapping: Record<string, string> | undefined;
84
- };
85
- type Size = {
86
- width: number;
87
- height: number;
88
- };
89
- export declare const AVATAR_IMAGE_SIZES: Record<keyof typeof AVATAR_IMAGES, Size>;
90
- export declare const SQUARE_IMAGE_SIZES: Record<keyof typeof SQUARE_IMAGES, Size>;
91
- export declare const LANDSCAPE_IMAGE_SIZES: Record<keyof typeof LANDSCAPE_IMAGES, Size>;
92
- export declare const PORTRAIT_IMAGE_SIZES: Record<keyof typeof PORTRAIT_IMAGES, Size>;
93
- export declare const SVG_IMAGE_SIZES: Record<keyof typeof SVG_IMAGES, Size>;
94
- export declare const EMPTY_IMAGES_SIZES: Record<keyof typeof EMPTY_IMAGES, Size>;
95
- export declare const IMAGE_SIZES: Record<keyof typeof IMAGES, Size>;
96
- export {};
@@ -1,7 +0,0 @@
1
- export declare const getSelectArgType: <E>(options: Array<E> | Record<string, E>, type?: "select" | "inline-radio") => {
2
- control: {
3
- type: "select" | "inline-radio";
4
- };
5
- options: E[];
6
- mapping: Record<string, E> | undefined;
7
- };
@@ -1,7 +0,0 @@
1
- export declare const themeArgType: {
2
- control: string;
3
- options: {
4
- readonly light: "light";
5
- readonly dark: "dark";
6
- };
7
- };
@@ -1,8 +0,0 @@
1
- export declare const ALL_TYPOGRAPHY: ("overline" | "caption" | "body1" | "body2" | "subtitle1" | "subtitle2" | "title" | "headline" | "display1" | "custom-title1" | "custom-title2" | "custom-title3" | "custom-title4" | "custom-title5" | "custom-title6" | "custom-intro" | "custom-body-large" | "custom-body" | "custom-quote" | "custom-publish-info" | "custom-button")[];
2
- export declare const allTypographyArgType: {
3
- control: {
4
- type: "select" | "inline-radio";
5
- };
6
- options: ("overline" | "caption" | "body1" | "body2" | "subtitle1" | "subtitle2" | "title" | "headline" | "display1" | "custom-title1" | "custom-title2" | "custom-title3" | "custom-title4" | "custom-title5" | "custom-title6" | "custom-intro" | "custom-body-large" | "custom-body" | "custom-quote" | "custom-publish-info" | "custom-button")[];
7
- mapping: Record<string, "overline" | "caption" | "body1" | "body2" | "subtitle1" | "subtitle2" | "title" | "headline" | "display1" | "custom-title1" | "custom-title2" | "custom-title3" | "custom-title4" | "custom-title5" | "custom-title6" | "custom-intro" | "custom-body-large" | "custom-body" | "custom-quote" | "custom-publish-info" | "custom-button"> | undefined;
8
- };
@@ -1 +0,0 @@
1
- export declare const withUndefined: <E>(options: Array<E> | Record<string, E>) => (E | undefined)[];
@@ -1,47 +0,0 @@
1
- import type { CombinationsOptions } from './utils/combinations';
2
- /** Storybook decorator function */
3
- type Decorator = (story: any, context: any) => any;
4
- /** Framework-specific decorators (injectable by React/Vue consumers) */
5
- interface StoryDecorators {
6
- /** Decorator to wrap a story with a container element */
7
- withWrapper?: (props: Record<string, any>, as?: any) => Decorator;
8
- /** Decorator to render a story in a combinations matrix */
9
- withCombinations?: (options: CombinationsOptions) => Decorator;
10
- /** Decorator adding a themed background (light/dark) based on the `theme` arg */
11
- withThemedBackground?: () => Decorator;
12
- /** manages nested props */
13
- withNestedProps?: () => Decorator;
14
- /** Decorator wrapping story in a resizable box */
15
- withResizableBox?: (options?: {
16
- width?: number | string;
17
- height?: number | string;
18
- [key: string]: any;
19
- }) => Decorator;
20
- }
21
- /** A partial Storybook story object (args, argTypes, render, decorators, etc.) */
22
- type StoryOverride = Record<string, any>;
23
- /** Base options shared by all setup functions. */
24
- interface SetupStoriesBaseOptions {
25
- /** The component to create stories for */
26
- component: any;
27
- /** Base render */
28
- render?: any;
29
- /** Base args */
30
- args?: any;
31
- }
32
- /**
33
- * Generic options for setting up component stories.
34
- */
35
- export type SetupStoriesOptions<TConfig extends {
36
- overrides?: string;
37
- decorators?: keyof StoryDecorators;
38
- } = Record<string, never>> = SetupStoriesBaseOptions & (TConfig extends {
39
- overrides: infer O extends string;
40
- } ? {
41
- overrides?: Partial<Record<O, StoryOverride>>;
42
- } : unknown) & (TConfig extends {
43
- decorators: infer D extends keyof StoryDecorators;
44
- } ? {
45
- decorators: Pick<Required<StoryDecorators>, D> & StoryDecorators;
46
- } : unknown);
47
- export {};