@uniai-fe/uds-primitives 0.12.5 → 0.12.7
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/README.md +17 -0
- package/dist/styles.css +253 -840
- package/package.json +9 -9
- package/src/components/button/markup/Base.tsx +3 -2
- package/src/components/button/styles/button.scss +99 -326
- package/src/components/button/styles/round-button.scss +12 -39
- package/src/components/button/styles/text-button.scss +16 -52
- package/src/components/button/styles/variables.scss +33 -55
- package/src/components/button/types/options.ts +7 -4
- package/src/components/button/types/props.ts +11 -14
- package/src/components/button/utils/index.ts +14 -3
- package/src/components/form/markup/Provider.tsx +7 -3
- package/src/components/form/markup/form-field/Body.tsx +1 -0
- package/src/components/form/markup/form-field/Container.tsx +3 -1
- package/src/components/form/markup/form-field/Footer.tsx +1 -0
- package/src/components/form/markup/form-field/Header.tsx +2 -0
- package/src/components/form/markup/form-field/Template.tsx +3 -2
- package/src/components/form/markup/form-field/index.tsx +1 -1
- package/src/components/form/markup/index.tsx +1 -0
- package/src/components/form/styles/form-field/variables.scss +2 -2
- package/src/components/form/types/props.ts +21 -19
- package/src/components/form/utils/form-field.ts +6 -4
- package/src/components/input/styles/date.scss +1 -1
- package/src/components/input/styles/text.scss +1 -1
- package/src/components/slot/index.tsx +3 -6
- package/src/components/slot/markup/Base.tsx +146 -9
- package/src/components/slot/markup/index.tsx +2 -4
- package/src/components/slot/types/props.ts +119 -23
- package/src/components/table/types/foundation.ts +9 -7
- package/src/index.scss +0 -2
- package/src/index.tsx +8 -2
- package/src/types/index.ts +1 -4
- package/src/utils/index.ts +8 -4
- package/src/utils/selected-values.ts +20 -14
- package/src/components/scrollbar/hooks/index.ts +0 -4
- package/src/components/scrollbar/img/.gitkeep +0 -0
- package/src/components/scrollbar/index.scss +0 -1
- package/src/components/scrollbar/index.tsx +0 -4
- package/src/components/scrollbar/markup/index.tsx +0 -4
- package/src/components/scrollbar/styles/index.scss +0 -0
- package/src/components/scrollbar/types/index.ts +0 -4
- package/src/components/scrollbar/utils/index.ts +0 -4
- package/src/components/spinner/hooks/index.ts +0 -4
- package/src/components/spinner/img/.gitkeep +0 -0
- package/src/components/spinner/index.scss +0 -1
- package/src/components/spinner/index.tsx +0 -4
- package/src/components/spinner/markup/index.tsx +0 -4
- package/src/components/spinner/styles/index.scss +0 -0
- package/src/components/spinner/types/index.ts +0 -4
- package/src/components/spinner/utils/index.ts +0 -4
- package/src/hooks/index.ts +0 -4
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Selected Values Utils; value 기반 선택 비교/정규화 유틸
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
1
|
/**
|
|
6
2
|
* Select/Dropdown value 원시 타입
|
|
7
3
|
*/
|
|
8
4
|
export type SelectedValue = string | number;
|
|
9
5
|
|
|
10
6
|
/**
|
|
11
|
-
* value를 비교 키 문자열로 정규화
|
|
7
|
+
* Selected Values; value를 비교 키 문자열로 정규화
|
|
8
|
+
* @function
|
|
12
9
|
* @param {SelectedValue | undefined} value 비교 대상 value
|
|
13
|
-
* @
|
|
10
|
+
* @desc Select와 Dropdown이 문자열·숫자 value를 같은 비교 축으로 다룰 수 있게 한다.
|
|
11
|
+
* @return {string} 정규화된 키 문자열
|
|
14
12
|
*/
|
|
15
13
|
export const toSelectedValueKey = (value?: SelectedValue): string =>
|
|
16
14
|
value === undefined ? "" : String(value);
|
|
17
15
|
|
|
18
16
|
/**
|
|
19
|
-
* 단일 value 동등성 비교
|
|
17
|
+
* Selected Values; 단일 value 동등성 비교
|
|
18
|
+
* @function
|
|
20
19
|
* @param {SelectedValue | undefined} previousValue 이전 value
|
|
21
20
|
* @param {SelectedValue | undefined} nextValue 다음 value
|
|
22
|
-
* @
|
|
21
|
+
* @desc 문자열·숫자 표현 차이를 정규화한 뒤 두 선택값의 동등성을 판정한다.
|
|
22
|
+
* @return {boolean} 동등 여부
|
|
23
23
|
*/
|
|
24
24
|
export const isSameSelectedValue = (
|
|
25
25
|
previousValue?: SelectedValue,
|
|
@@ -28,10 +28,12 @@ export const isSameSelectedValue = (
|
|
|
28
28
|
toSelectedValueKey(previousValue) === toSelectedValueKey(nextValue);
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* value 배열 동등성 비교
|
|
31
|
+
* Selected Values; value 배열 동등성 비교
|
|
32
|
+
* @function
|
|
32
33
|
* @param {SelectedValue[]} previousValues 이전 value 배열
|
|
33
34
|
* @param {SelectedValue[]} nextValues 다음 value 배열
|
|
34
|
-
* @
|
|
35
|
+
* @desc 선택 순서를 포함해 두 value 배열이 같은지 판정한다.
|
|
36
|
+
* @return {boolean} 동등 여부
|
|
35
37
|
*/
|
|
36
38
|
export const isSameSelectedValueList = (
|
|
37
39
|
previousValues: SelectedValue[],
|
|
@@ -43,19 +45,23 @@ export const isSameSelectedValueList = (
|
|
|
43
45
|
);
|
|
44
46
|
|
|
45
47
|
/**
|
|
46
|
-
* 단일 선택 value 정규화
|
|
48
|
+
* Selected Values; 단일 선택 value 정규화
|
|
49
|
+
* @function
|
|
47
50
|
* @param {SelectedValue[]} selectedValues 선택 value 배열
|
|
48
|
-
* @
|
|
51
|
+
* @desc 선택 배열의 첫 value를 단일 선택 결과로 사용한다.
|
|
52
|
+
* @return {SelectedValue | undefined} 단일 선택 결과
|
|
49
53
|
*/
|
|
50
54
|
export const normalizeSingleSelectedValue = (
|
|
51
55
|
selectedValues: SelectedValue[],
|
|
52
56
|
): SelectedValue | undefined => selectedValues[0];
|
|
53
57
|
|
|
54
58
|
/**
|
|
55
|
-
* 모드 기반 value 배열 정규화
|
|
59
|
+
* Selected Values; 모드 기반 value 배열 정규화
|
|
60
|
+
* @function
|
|
56
61
|
* @param {SelectedValue[]} selectedValues 선택 value 배열
|
|
57
62
|
* @param {boolean} multiple 다중 선택 모드 여부
|
|
58
|
-
* @
|
|
63
|
+
* @desc 다중 선택은 전체 배열을 유지하고 단일 선택은 첫 value만 유지한다.
|
|
64
|
+
* @return {SelectedValue[]} 모드 규칙 적용 결과
|
|
59
65
|
*/
|
|
60
66
|
export const normalizeSelectedValuesByMode = (
|
|
61
67
|
selectedValues: SelectedValue[],
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@use "./styles/index.scss";
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@use "./styles/index.scss";
|
|
File without changes
|
package/src/hooks/index.ts
DELETED