@lumx/core 3.20.1-alpha.46 → 3.20.1-alpha.48
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/_internal/DPnPEC08.js +9 -0
- package/js/constants/_internal/design-tokens.d.ts +5421 -0
- package/js/types/KebabCase.d.ts +1 -1
- package/js/utils/_internal/color/resolveColorWithVariants.d.ts +1 -1
- package/js/utils/{className → classNames}/color/index.d.ts +5 -5
- package/js/utils/{className → classNames}/color/index.js +4 -4
- package/js/utils/{className → classNames}/index.d.ts +1 -0
- package/js/utils/{className → classNames}/index.js +1 -0
- package/js/utils/{className → classNames}/typography/index.d.ts +1 -1
- package/js/utils/{className → classNames}/typography/index.js +0 -2
- package/js/utils/index.d.ts +1 -1
- package/js/utils/index.js +2 -2
- package/package.json +1 -1
- /package/js/utils/{className → classNames}/bem/block.d.ts +0 -0
- /package/js/utils/{className → classNames}/bem/block.js +0 -0
- /package/js/utils/{className → classNames}/bem/element.d.ts +0 -0
- /package/js/utils/{className → classNames}/bem/element.js +0 -0
- /package/js/utils/{className → classNames}/bem/generateBEMClass.d.ts +0 -0
- /package/js/utils/{className → classNames}/bem/generateBEMClass.js +0 -0
- /package/js/utils/{className → classNames}/bem/index.d.ts +0 -0
- /package/js/utils/{className → classNames}/bem/index.js +0 -0
- /package/js/utils/{className → classNames}/spacing/index.d.ts +0 -0
- /package/js/utils/{className → classNames}/spacing/index.js +0 -0
- /package/js/utils/{className → classNames}/visually-hidden/index.d.ts +0 -0
- /package/js/utils/{className → classNames}/visually-hidden/index.js +0 -0
package/js/types/KebabCase.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Transform a string literal into kebab case */
|
|
2
|
-
export type KebabCase<S> = S extends `${infer C}${infer T}` ? T extends Uncapitalize<T> ? `${Uncapitalize<C>}${KebabCase<T>}` : `${Uncapitalize<C>}-${KebabCase<T>}` : S
|
|
2
|
+
export type KebabCase<S extends string | number> = S extends `${infer C}${infer T}` ? T extends Uncapitalize<T> ? `${Uncapitalize<C>}${KebabCase<T>}` : `${Uncapitalize<C>}-${KebabCase<T>}` : `${S}`;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ColorPalette, ColorVariant, ColorWithVariants } from '
|
|
1
|
+
import type { ColorPalette, ColorVariant, ColorWithVariants } from '@lumx/core/js/constants';
|
|
2
2
|
/** Resolve color & color variant from a `ColorWithVariants` and optionally a `ColorVariant`. */
|
|
3
3
|
export declare function resolveColorWithVariants(colorWithVariants?: ColorWithVariants, colorVariant?: ColorVariant): [color?: ColorPalette, colorVariant?: ColorVariant];
|
|
@@ -14,19 +14,19 @@ import { ColorVariant, ColorWithVariants } from '@lumx/core/js/constants';
|
|
|
14
14
|
* color('font', 'primary-L2'); // 'lumx-color-font-primary-L2'
|
|
15
15
|
* color('font', undefined); // undefined
|
|
16
16
|
*/
|
|
17
|
-
export declare function color(type: 'font' | 'background', propColor
|
|
17
|
+
export declare function color(type: 'font' | 'background', propColor: ColorWithVariants, propColorVariant?: ColorVariant): string | undefined;
|
|
18
18
|
/**
|
|
19
19
|
* Generates a Lumx background color class name for the given color and variant.
|
|
20
20
|
*
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
21
|
+
* @param propColor - The color palette name (e.g., 'primary', 'dark', 'light')
|
|
22
|
+
* @param propColorVariant - The color variant (e.g., 'L1', 'L2', 'D1', 'N')
|
|
23
23
|
* @returns The Lumx background color class name
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* background('dark', 'L2'); // 'lumx-color-background-dark-L2'
|
|
27
27
|
* background('primary', 'N'); // 'lumx-color-background-primary-N'
|
|
28
28
|
*/
|
|
29
|
-
export declare const background: (
|
|
29
|
+
export declare const background: (propColor: ColorWithVariants, propColorVariant?: ColorVariant) => string | undefined;
|
|
30
30
|
/**
|
|
31
31
|
* Generates a Lumx font color class name for the given color and variant.
|
|
32
32
|
*
|
|
@@ -40,4 +40,4 @@ export declare const background: (col?: ColorWithVariants, variant?: ColorVarian
|
|
|
40
40
|
* font('primary'); // 'lumx-color-font-primary-N'
|
|
41
41
|
* font(undefined); // undefined
|
|
42
42
|
*/
|
|
43
|
-
export declare const font: (propColor
|
|
43
|
+
export declare const font: (propColor: ColorWithVariants, propColorVariant?: ColorVariant) => string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColorVariant } from '../../../constants/enums/index.js';
|
|
2
|
-
import { resolveColorWithVariants } from '
|
|
2
|
+
import { resolveColorWithVariants } from '../../../../_internal/DPnPEC08.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Generates a Lumx color class name for the given type, color and variant.
|
|
@@ -25,15 +25,15 @@ function color(type, propColor, propColorVariant) {
|
|
|
25
25
|
/**
|
|
26
26
|
* Generates a Lumx background color class name for the given color and variant.
|
|
27
27
|
*
|
|
28
|
-
* @param
|
|
29
|
-
* @param
|
|
28
|
+
* @param propColor - The color palette name (e.g., 'primary', 'dark', 'light')
|
|
29
|
+
* @param propColorVariant - The color variant (e.g., 'L1', 'L2', 'D1', 'N')
|
|
30
30
|
* @returns The Lumx background color class name
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
33
|
* background('dark', 'L2'); // 'lumx-color-background-dark-L2'
|
|
34
34
|
* background('primary', 'N'); // 'lumx-color-background-primary-N'
|
|
35
35
|
*/
|
|
36
|
-
const background = (
|
|
36
|
+
const background = (propColor, propColorVariant) => color('background', propColor, propColorVariant);
|
|
37
37
|
/**
|
|
38
38
|
* Generates a Lumx font color class name for the given color and variant.
|
|
39
39
|
*
|
|
@@ -3,4 +3,4 @@ import type { Typography } from '@lumx/core/js/constants';
|
|
|
3
3
|
* Returns the classname associated to the given typography. For example, for Typography.title it returns
|
|
4
4
|
* lumx-typography-title
|
|
5
5
|
*/
|
|
6
|
-
export declare function typography(typo
|
|
6
|
+
export declare function typography(typo: Typography): string;
|
package/js/utils/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * as
|
|
1
|
+
export * as classNames from './classNames';
|
|
2
2
|
export * from './events';
|
package/js/utils/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as index from './
|
|
2
|
-
export { index as
|
|
1
|
+
import * as index from './classNames/index.js';
|
|
2
|
+
export { index as classNames };
|
|
3
3
|
export { onButtonPressed, onEnterPressed, onEscapePressed } from './events/keyboard.js';
|
|
4
4
|
export { detectHorizontalSwipe } from './events/swipe.js';
|
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
|
|
36
36
|
},
|
|
37
37
|
"sideEffects": false,
|
|
38
|
-
"version": "3.20.1-alpha.
|
|
38
|
+
"version": "3.20.1-alpha.48",
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
41
41
|
"@types/react": "^17.0.2",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|