@lumx/core 4.3.2-alpha.19 → 4.3.2-alpha.20

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 (116) hide show
  1. package/js/components/Badge/BadgeWrapper.d.ts +13 -0
  2. package/js/components/Badge/BadgeWrapperStories.d.ts +29 -0
  3. package/js/components/Badge/BadgeWrapperTests.d.ts +9 -0
  4. package/js/components/Badge/Stories.d.ts +52 -0
  5. package/js/components/Badge/Tests.d.ts +12 -0
  6. package/js/components/Badge/index.d.ts +37 -0
  7. package/js/components/Button/Button.d.ts +48 -0
  8. package/js/components/Button/ButtonGroup.d.ts +36 -0
  9. package/js/components/Button/ButtonGroupStories.d.ts +37 -0
  10. package/js/components/Button/ButtonRoot.d.ts +55 -0
  11. package/js/components/Button/ButtonRootTests.d.ts +12 -0
  12. package/js/components/Button/IconButton.d.ts +45 -0
  13. package/js/components/Button/IconButtonStories.d.ts +211 -0
  14. package/js/components/Button/IconButtonTests.d.ts +15 -0
  15. package/js/components/Button/Stories.d.ts +301 -0
  16. package/js/components/Button/Tests.d.ts +15 -0
  17. package/js/components/Checkbox/Stories.d.ts +88 -0
  18. package/js/components/Checkbox/Tests.d.ts +15 -0
  19. package/js/components/Checkbox/index.d.ts +49 -0
  20. package/js/components/Divider/Stories.d.ts +21 -0
  21. package/js/components/Divider/Tests.d.ts +12 -0
  22. package/js/components/Divider/index.d.ts +27 -0
  23. package/js/components/Flag/Stories.d.ts +120 -0
  24. package/js/components/Flag/Tests.d.ts +14 -0
  25. package/js/components/Flag/index.d.ts +34 -0
  26. package/js/components/FlexBox/Stories.d.ts +108 -0
  27. package/js/components/FlexBox/Tests.d.ts +13 -0
  28. package/js/components/FlexBox/constants.d.ts +4 -0
  29. package/js/components/FlexBox/index.d.ts +50 -0
  30. package/js/components/FlexBox/types.d.ts +7 -0
  31. package/js/components/Heading/Stories.d.ts +89 -0
  32. package/js/components/Heading/Tests.d.ts +11 -0
  33. package/js/components/Heading/constants.d.ts +21 -0
  34. package/js/components/Heading/index.d.ts +44 -0
  35. package/js/components/Heading/utils.d.ts +8 -0
  36. package/js/components/Icon/Stories.d.ts +150 -0
  37. package/js/components/Icon/Tests.d.ts +14 -0
  38. package/js/components/Icon/constants.d.ts +1 -0
  39. package/js/components/Icon/index.d.ts +41 -0
  40. package/js/components/InputHelper/Stories.d.ts +43 -0
  41. package/js/components/InputHelper/Tests.d.ts +12 -0
  42. package/js/components/InputHelper/constants.d.ts +3 -0
  43. package/js/components/InputHelper/index.d.ts +26 -0
  44. package/js/components/InputLabel/Stories.d.ts +34 -0
  45. package/js/components/InputLabel/Tests.d.ts +12 -0
  46. package/js/components/InputLabel/index.d.ts +25 -0
  47. package/js/components/Link/Stories.d.ts +93 -0
  48. package/js/components/Link/Tests.d.ts +15 -0
  49. package/js/components/Link/index.d.ts +54 -0
  50. package/js/components/Message/Stories.d.ts +119 -0
  51. package/js/components/Message/Tests.d.ts +14 -0
  52. package/js/components/Message/index.d.ts +75 -0
  53. package/js/components/RadioButton/Stories.d.ts +77 -0
  54. package/js/components/RadioButton/Tests.d.ts +15 -0
  55. package/js/components/RadioButton/index.d.ts +45 -0
  56. package/js/components/RawClickable/Tests.d.ts +14 -0
  57. package/js/components/RawClickable/index.d.ts +13 -0
  58. package/js/components/Skeleton/SkeletonCircle.d.ts +32 -0
  59. package/js/components/Skeleton/SkeletonCircleStories.d.ts +45 -0
  60. package/js/components/Skeleton/SkeletonCircleTests.d.ts +12 -0
  61. package/js/components/Skeleton/SkeletonRectangle.d.ts +47 -0
  62. package/js/components/Skeleton/SkeletonRectangleStories.d.ts +87 -0
  63. package/js/components/Skeleton/SkeletonRectangleTests.d.ts +13 -0
  64. package/js/components/Skeleton/SkeletonTypography.d.ts +37 -0
  65. package/js/components/Skeleton/SkeletonTypographyStories.d.ts +40 -0
  66. package/js/components/Skeleton/SkeletonTypographyTests.d.ts +13 -0
  67. package/js/components/Skeleton/index.d.ts +3 -0
  68. package/js/components/Switch/Stories.d.ts +94 -0
  69. package/js/components/Switch/Tests.d.ts +15 -0
  70. package/js/components/Switch/index.d.ts +47 -0
  71. package/js/components/Table/Stories.d.ts +25 -0
  72. package/js/components/Table/TableCell.d.ts +55 -0
  73. package/js/components/Table/TableCellStories.d.ts +44 -0
  74. package/js/components/Table/TableCellTests.d.ts +11 -0
  75. package/js/components/Table/TableRowStories.d.ts +23 -0
  76. package/js/components/Table/Tests.d.ts +11 -0
  77. package/js/components/Table/constants.d.ts +9 -0
  78. package/js/components/Table/index.d.ts +27 -0
  79. package/js/components/Text/Stories.d.ts +167 -0
  80. package/js/components/Text/Tests.d.ts +10 -0
  81. package/js/components/Text/index.d.ts +935 -0
  82. package/js/components/Thumbnail/Stories.d.ts +168 -0
  83. package/js/components/Thumbnail/Tests.d.ts +11 -0
  84. package/js/components/Thumbnail/index.d.ts +84 -0
  85. package/js/components/Thumbnail/types.d.ts +45 -0
  86. package/js/components/Thumbnail/utils.d.ts +79 -0
  87. package/js/constants/enums/index.d.ts +0 -9
  88. package/js/constants/enums/index.js +1 -10
  89. package/js/constants/index.js +1 -1
  90. package/js/types/index.d.ts +0 -1
  91. package/js/utils/classNames/bem/block.d.ts +2 -3
  92. package/js/utils/classNames/bem/element.d.ts +2 -3
  93. package/js/utils/classNames/bem/index.d.ts +4 -5
  94. package/package.json +28 -2
  95. package/stories/controls/color.d.ts +15 -0
  96. package/stories/controls/element.d.ts +16 -0
  97. package/stories/controls/focusPoint.d.ts +8 -0
  98. package/stories/controls/icons.d.ts +66 -0
  99. package/stories/controls/image.d.ts +96 -0
  100. package/stories/controls/selectArgType.d.ts +7 -0
  101. package/stories/controls/theme.d.ts +7 -0
  102. package/stories/controls/typography.d.ts +8 -0
  103. package/stories/controls/withUndefined.d.ts +1 -0
  104. package/stories/types.d.ts +47 -0
  105. package/stories/utils/combinations.d.ts +100 -0
  106. package/stories/utils/concatPath.d.ts +10 -0
  107. package/stories/utils/disableArgTypes.d.ts +7 -0
  108. package/stories/utils/initDemoShadowDOMPortal.d.ts +5 -0
  109. package/stories/utils/lorem.d.ts +7 -0
  110. package/stories/utils/toFlattenProps.d.ts +12 -0
  111. package/stories/utils/withCategory.d.ts +4 -0
  112. package/testing/commonTestsSuiteTL.d.ts +87 -0
  113. package/testing/index.d.ts +1 -0
  114. package/testing/queries.d.ts +4 -0
  115. package/js/types/PartialBy.d.ts +0 -12
  116. package/js/utils/events/index.js +0 -2
@@ -0,0 +1,168 @@
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
+ };
@@ -0,0 +1,11 @@
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;
@@ -0,0 +1,84 @@
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';
@@ -0,0 +1,45 @@
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';
@@ -0,0 +1,79 @@
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;
@@ -198,12 +198,3 @@ export declare const ColorVariant: {
198
198
  export type ColorVariant = ValueOf<typeof ColorVariant>;
199
199
  /** ColorPalette with all possible color variant combination */
200
200
  export type ColorWithVariants = ColorPalette | Exclude<`${ColorPalette}-${ColorVariant}`, `light-D${number}` | `dark-D${number}`>;
201
- export declare const REAL_SIZE_FOR_LUMX_SIZE: {
202
- xxs: number;
203
- xs: number;
204
- s: number;
205
- m: number;
206
- l: number;
207
- xl: number;
208
- xxl: number;
209
- };
@@ -151,14 +151,5 @@ const ColorVariant = {
151
151
  L6: 'L6',
152
152
  N: 'N',
153
153
  };
154
- const REAL_SIZE_FOR_LUMX_SIZE = {
155
- [Size.xxs]: 14,
156
- [Size.xs]: 20,
157
- [Size.s]: 24,
158
- [Size.m]: 36,
159
- [Size.l]: 64,
160
- [Size.xl]: 128,
161
- [Size.xxl]: 256,
162
- };
163
154
 
164
- export { Alignment, AspectRatio, ColorPalette, ColorVariant, Emphasis, Kind, Orientation, REAL_SIZE_FOR_LUMX_SIZE, Size, Theme, Typography, TypographyCustom, TypographyInterface, TypographyTitleCustom, WhiteSpace };
155
+ export { Alignment, AspectRatio, ColorPalette, ColorVariant, Emphasis, Kind, Orientation, Size, Theme, Typography, TypographyCustom, TypographyInterface, TypographyTitleCustom, WhiteSpace };
@@ -1,4 +1,4 @@
1
1
  export { BACKSPACE_KEY_CODE, DOWN_KEY_CODE, ENTER_KEY_CODE, ESCAPE_KEY_CODE, LEFT_KEY_CODE, RIGHT_KEY_CODE, SPACE_KEY_CODE, TAB_KEY_CODE, UP_KEY_CODE } from './keycodes/index.js';
2
2
  export { DIALOG_TRANSITION_DURATION, EXPANSION_PANEL_TRANSITION_DURATION, NOTIFICATION_TRANSITION_DURATION, SLIDESHOW_TRANSITION_DURATION, TOOLTIP_HOVER_DELAY, TOOLTIP_LONG_PRESS_DELAY } from './components/index.js';
3
- export { Alignment, AspectRatio, ColorPalette, ColorVariant, Emphasis, Kind, Orientation, REAL_SIZE_FOR_LUMX_SIZE, Size, Theme, Typography, TypographyCustom, TypographyInterface, TypographyTitleCustom, WhiteSpace } from './enums/index.js';
3
+ export { Alignment, AspectRatio, ColorPalette, ColorVariant, Emphasis, Kind, Orientation, Size, Theme, Typography, TypographyCustom, TypographyInterface, TypographyTitleCustom, WhiteSpace } from './enums/index.js';
4
4
  export { VISUALLY_HIDDEN } from './className/index.js';
@@ -25,4 +25,3 @@ export type { HasChecked } from './HasChecked';
25
25
  export type { HasDisabled } from './HasDisabled';
26
26
  export type { AriaAttributes } from './AriaAttributes';
27
27
  export type { Selector } from './Selector';
28
- export type { PartialBy, PartialExcept } from './PartialBy';
@@ -1,4 +1,3 @@
1
- import { ClassValue } from 'classnames/types';
2
1
  import { type Modifier } from './modifier';
3
2
  /**
4
3
  * Generates a BEM block + modifier class name string.
@@ -12,5 +11,5 @@ import { type Modifier } from './modifier';
12
11
  * block('button'); // 'button'
13
12
  * block('button', { active: true, disabled: false }); // 'button button--active'
14
13
  */
15
- export declare function block(baseName: string, additionalClasses: ClassValue[]): string;
16
- export declare function block(baseName: string, modifiers?: Modifier, additionalClasses?: ClassValue[]): string;
14
+ export declare function block(baseName: string, additionalClasses: string[]): string;
15
+ export declare function block(baseName: string, modifiers?: Modifier, additionalClasses?: string[]): string;
@@ -1,4 +1,3 @@
1
- import { ClassValue } from 'classnames/types';
2
1
  import type { Modifier } from './modifier';
3
2
  /**
4
3
  * Creates a BEM element class generator function for the given base class.
@@ -13,5 +12,5 @@ import type { Modifier } from './modifier';
13
12
  * element('my-button', 'icon'); // 'my-button__icon'
14
13
  * element('my-button', 'icon', { active: true }); // 'my-button__icon my-button__icon--active'
15
14
  */
16
- export declare function element(baseClass: string, elem: string, additionalClasses: ClassValue[]): string;
17
- export declare function element(baseClass: string, elem: string, modifiers?: Modifier, additionalClasses?: ClassValue[]): string;
15
+ export declare function element(baseClass: string, elem: string, additionalClasses: string[]): string;
16
+ export declare function element(baseClass: string, elem: string, modifiers?: Modifier, additionalClasses?: string[]): string;
@@ -1,4 +1,3 @@
1
- import { ClassValue } from 'classnames/types';
2
1
  import { block } from './block';
3
2
  import { element } from './element';
4
3
  import { type Modifier } from './modifier';
@@ -7,12 +6,12 @@ import { type Modifier } from './modifier';
7
6
  */
8
7
  export declare function bem(baseName: string): {
9
8
  block: {
10
- (additionalClasses: ClassValue[]): string;
11
- (modifiers?: Modifier, additionalClasses?: ClassValue[]): string;
9
+ (additionalClasses: string[]): string;
10
+ (modifiers?: Modifier, additionalClasses?: string[]): string;
12
11
  };
13
12
  element: {
14
- (elem: string, additionalClasses: ClassValue[]): string;
15
- (elem: string, modifiers?: Modifier, additionalClasses?: ClassValue[]): string;
13
+ (elem: string, additionalClasses: string[]): string;
14
+ (elem: string, modifiers?: Modifier, additionalClasses?: string[]): string;
16
15
  };
17
16
  modifier: (modifiers: Modifier) => string;
18
17
  };
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/lumapps/design-system/issues"
7
7
  },
8
8
  "dependencies": {
9
- "@lumx/icons": "^4.3.2-alpha.19",
9
+ "@lumx/icons": "^4.3.2-alpha.20",
10
10
  "classnames": "^2.3.2",
11
11
  "focus-visible": "^5.0.2",
12
12
  "lodash": "4.17.23",
@@ -22,6 +22,32 @@
22
22
  "license": "MIT",
23
23
  "type": "module",
24
24
  "name": "@lumx/core",
25
+ "exports": {
26
+ "./js/constants": {
27
+ "default": "./js/constants/index.js",
28
+ "types": "./js/constants/index.d.ts"
29
+ },
30
+ "./js/types": {
31
+ "default": "./js/types/index.js",
32
+ "types": "./js/types/index.d.ts"
33
+ },
34
+ "./js/utils/classNames": {
35
+ "default": "./js/utils/classNames/index.js",
36
+ "types": "./js/utils/classNames/index.d.ts"
37
+ },
38
+ "./js/utils/disabledState": {
39
+ "default": "./js/utils/disabledState/index.js",
40
+ "types": "./js/utils/disabledState/index.d.ts"
41
+ },
42
+ "./js/utils/selectors": {
43
+ "default": "./js/utils/selectors/index.js",
44
+ "types": "./js/utils/selectors/index.d.ts"
45
+ },
46
+ "./js/utils": {
47
+ "default": "./js/utils/index.js",
48
+ "types": "./js/utils/index.d.ts"
49
+ }
50
+ },
25
51
  "publishConfig": {
26
52
  "directory": "dist"
27
53
  },
@@ -37,7 +63,7 @@
37
63
  "update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
38
64
  },
39
65
  "sideEffects": false,
40
- "version": "4.3.2-alpha.19",
66
+ "version": "4.3.2-alpha.20",
41
67
  "devDependencies": {
42
68
  "@rollup/plugin-typescript": "^12.3.0",
43
69
  "@testing-library/dom": "^10.4.1",
@@ -0,0 +1,15 @@
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
+ };
@@ -0,0 +1,16 @@
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
+ };
@@ -0,0 +1,8 @@
1
+ export declare const focusPoint: {
2
+ control: {
3
+ type: string;
4
+ min: number;
5
+ max: number;
6
+ step: number;
7
+ };
8
+ };
@@ -0,0 +1,66 @@
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
+ };