@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.
Files changed (51) hide show
  1. package/README.md +17 -0
  2. package/dist/styles.css +253 -840
  3. package/package.json +9 -9
  4. package/src/components/button/markup/Base.tsx +3 -2
  5. package/src/components/button/styles/button.scss +99 -326
  6. package/src/components/button/styles/round-button.scss +12 -39
  7. package/src/components/button/styles/text-button.scss +16 -52
  8. package/src/components/button/styles/variables.scss +33 -55
  9. package/src/components/button/types/options.ts +7 -4
  10. package/src/components/button/types/props.ts +11 -14
  11. package/src/components/button/utils/index.ts +14 -3
  12. package/src/components/form/markup/Provider.tsx +7 -3
  13. package/src/components/form/markup/form-field/Body.tsx +1 -0
  14. package/src/components/form/markup/form-field/Container.tsx +3 -1
  15. package/src/components/form/markup/form-field/Footer.tsx +1 -0
  16. package/src/components/form/markup/form-field/Header.tsx +2 -0
  17. package/src/components/form/markup/form-field/Template.tsx +3 -2
  18. package/src/components/form/markup/form-field/index.tsx +1 -1
  19. package/src/components/form/markup/index.tsx +1 -0
  20. package/src/components/form/styles/form-field/variables.scss +2 -2
  21. package/src/components/form/types/props.ts +21 -19
  22. package/src/components/form/utils/form-field.ts +6 -4
  23. package/src/components/input/styles/date.scss +1 -1
  24. package/src/components/input/styles/text.scss +1 -1
  25. package/src/components/slot/index.tsx +3 -6
  26. package/src/components/slot/markup/Base.tsx +146 -9
  27. package/src/components/slot/markup/index.tsx +2 -4
  28. package/src/components/slot/types/props.ts +119 -23
  29. package/src/components/table/types/foundation.ts +9 -7
  30. package/src/index.scss +0 -2
  31. package/src/index.tsx +8 -2
  32. package/src/types/index.ts +1 -4
  33. package/src/utils/index.ts +8 -4
  34. package/src/utils/selected-values.ts +20 -14
  35. package/src/components/scrollbar/hooks/index.ts +0 -4
  36. package/src/components/scrollbar/img/.gitkeep +0 -0
  37. package/src/components/scrollbar/index.scss +0 -1
  38. package/src/components/scrollbar/index.tsx +0 -4
  39. package/src/components/scrollbar/markup/index.tsx +0 -4
  40. package/src/components/scrollbar/styles/index.scss +0 -0
  41. package/src/components/scrollbar/types/index.ts +0 -4
  42. package/src/components/scrollbar/utils/index.ts +0 -4
  43. package/src/components/spinner/hooks/index.ts +0 -4
  44. package/src/components/spinner/img/.gitkeep +0 -0
  45. package/src/components/spinner/index.scss +0 -1
  46. package/src/components/spinner/index.tsx +0 -4
  47. package/src/components/spinner/markup/index.tsx +0 -4
  48. package/src/components/spinner/styles/index.scss +0 -0
  49. package/src/components/spinner/types/index.ts +0 -4
  50. package/src/components/spinner/utils/index.ts +0 -4
  51. 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
- * @returns {string} 정규화된 문자열
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
- * @returns {boolean} 동등 여부
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
- * @returns {boolean} 동등 여부
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
- * @returns {SelectedValue | undefined} 단일 선택 결과
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
- * @returns {SelectedValue[]} 모드 규칙 적용 결과
63
+ * @desc 다중 선택은 전체 배열을 유지하고 단일 선택은 첫 value만 유지한다.
64
+ * @return {SelectedValue[]} 모드 규칙 적용 결과
59
65
  */
60
66
  export const normalizeSelectedValuesByMode = (
61
67
  selectedValues: SelectedValue[],
@@ -1,4 +0,0 @@
1
- /**
2
- * Scrollbar Hooks; 현재 공개된 훅이 없는 placeholder 엔트리
3
- */
4
- export {};
File without changes
@@ -1 +0,0 @@
1
- @use "./styles/index.scss";
@@ -1,4 +0,0 @@
1
- /**
2
- * Scrollbar; 현재 public export가 없는 placeholder 카테고리 배럴
3
- */
4
- export * from "./markup";
@@ -1,4 +0,0 @@
1
- /**
2
- * Scrollbar Markup; 현재 공개된 컴포넌트가 없는 placeholder 엔트리
3
- */
4
- export {};
File without changes
@@ -1,4 +0,0 @@
1
- /**
2
- * Scrollbar Types; 현재 공개된 타입이 없는 placeholder 엔트리
3
- */
4
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * Scrollbar Utils; 현재 공개된 유틸이 없는 placeholder 엔트리
3
- */
4
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * Spinner Hooks; 현재 공개된 훅이 없는 placeholder 엔트리
3
- */
4
- export {};
File without changes
@@ -1 +0,0 @@
1
- @use "./styles/index.scss";
@@ -1,4 +0,0 @@
1
- /**
2
- * Spinner; 현재 public export가 없는 placeholder 카테고리 배럴
3
- */
4
- export * from "./markup";
@@ -1,4 +0,0 @@
1
- /**
2
- * Spinner Markup; 현재 공개된 컴포넌트가 없는 placeholder 엔트리
3
- */
4
- export {};
File without changes
@@ -1,4 +0,0 @@
1
- /**
2
- * Spinner Types; 현재 공개된 타입이 없는 placeholder 엔트리
3
- */
4
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * Spinner Utils; 현재 공개된 유틸이 없는 placeholder 엔트리
3
- */
4
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * shared hooks placeholder: 카테고리 간 재사용 로직을 이 디렉터리에 모아둔다.
3
- */
4
- export {};