@uniai-fe/uds-foundation 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +33 -0
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/types/index.ts +2 -0
- package/src/types/style-option.ts +33 -0
package/dist/index.d.ts
CHANGED
|
@@ -5,3 +5,36 @@ export { ThemeProvider, FoundationThemeProviderProps as ThemeProviderProps } fro
|
|
|
5
5
|
export { ThemeColorPrimitive, ThemeColorSemanticSection, ThemeLayoutSizes, ThemeSpacingScale, ThemeTokens, ThemeTypographyCategory, ThemeTypographyVariant } from './types/theme-tokens.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
7
|
import 'react';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 개수가 지정된 배열 정의
|
|
11
|
+
* @example
|
|
12
|
+
* type DataArray = FixedLengthArray<number | string, 3>;
|
|
13
|
+
*/
|
|
14
|
+
type FixedLengthArray<ItemType, Length extends number> = [
|
|
15
|
+
ItemType,
|
|
16
|
+
...ItemType[]
|
|
17
|
+
] & {
|
|
18
|
+
length: Length;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 스타일 옵션 타입; margin, padding을 배열로 받는 경우
|
|
22
|
+
* @desc
|
|
23
|
+
* - [상하좌우]: 일괄적용 처리
|
|
24
|
+
* - [상하, 좌우]: [top-bottom, left-right]
|
|
25
|
+
* - [상, 좌우, 하]: [top, left-right, bottom]
|
|
26
|
+
* - [상, 우, 하, 좌]: [top, right, bottom, left]
|
|
27
|
+
*/
|
|
28
|
+
type StyleSpacingArray = FixedLengthArray<number | string, 1 | 2 | 3 | 4>;
|
|
29
|
+
/**
|
|
30
|
+
* 스타일 옵션 타입; margin, padding
|
|
31
|
+
* @desc
|
|
32
|
+
* - number | string: 단일 값
|
|
33
|
+
* - [상하좌우]: 일괄적용 처리
|
|
34
|
+
* - [상하, 좌우]
|
|
35
|
+
* - [상, 좌우, 하]
|
|
36
|
+
* - [상, 우, 하, 좌]
|
|
37
|
+
*/
|
|
38
|
+
type StyleSpacingType = number | string | StyleSpacingArray;
|
|
39
|
+
|
|
40
|
+
export type { FixedLengthArray, StyleSpacingArray, StyleSpacingType };
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 개수가 지정된 배열 정의
|
|
3
|
+
* @example
|
|
4
|
+
* type DataArray = FixedLengthArray<number | string, 3>;
|
|
5
|
+
*/
|
|
6
|
+
export type FixedLengthArray<ItemType, Length extends number> = [
|
|
7
|
+
ItemType,
|
|
8
|
+
...ItemType[],
|
|
9
|
+
] & { length: Length };
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 스타일 옵션 타입; margin, padding을 배열로 받는 경우
|
|
13
|
+
* @desc
|
|
14
|
+
* - [상하좌우]: 일괄적용 처리
|
|
15
|
+
* - [상하, 좌우]: [top-bottom, left-right]
|
|
16
|
+
* - [상, 좌우, 하]: [top, left-right, bottom]
|
|
17
|
+
* - [상, 우, 하, 좌]: [top, right, bottom, left]
|
|
18
|
+
*/
|
|
19
|
+
export type StyleSpacingArray = FixedLengthArray<
|
|
20
|
+
number | string,
|
|
21
|
+
1 | 2 | 3 | 4
|
|
22
|
+
>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 스타일 옵션 타입; margin, padding
|
|
26
|
+
* @desc
|
|
27
|
+
* - number | string: 단일 값
|
|
28
|
+
* - [상하좌우]: 일괄적용 처리
|
|
29
|
+
* - [상하, 좌우]
|
|
30
|
+
* - [상, 좌우, 하]
|
|
31
|
+
* - [상, 우, 하, 좌]
|
|
32
|
+
*/
|
|
33
|
+
export type StyleSpacingType = number | string | StyleSpacingArray;
|