@uniai-fe/uds-primitives 0.12.8 → 0.12.9

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/styles.css CHANGED
@@ -3,13 +3,12 @@
3
3
  --alternate-unit-text-color: var(--color-cool-gray-70);
4
4
  --alternate-unit-text-font-size: 1.4rem;
5
5
  --alternate-unit-text-line-height: 1.5;
6
- --alternate-unit-gap: var(--spacing-gap-6);
6
+ --alternate-figure-text-gap-ratio: 0.344444;
7
7
  --alternate-loading-icon-color: var(--color-primary-default);
8
8
  --alternate-loading-icon-small-size: 2.4rem;
9
9
  --alternate-loading-icon-medium-size: 3.6rem;
10
10
  --alternate-loading-icon-large-size: 5.2rem;
11
11
  --alternate-layout-min-block-size: 320px;
12
- --alternate-layout-gap: var(--spacing-gap-7);
13
12
  --alternate-layout-content-gap: var(--spacing-gap-4);
14
13
  --alternate-layout-figure-size: 120px;
15
14
  --alternate-layout-title-color: var(--color-label-strong);
@@ -1045,6 +1044,10 @@
1045
1044
  }
1046
1045
 
1047
1046
  .alternate {
1047
+ --alternate-unit-gap: calc(
1048
+ var(--alternate-loading-icon-small-size) *
1049
+ var(--alternate-figure-text-gap-ratio)
1050
+ );
1048
1051
  width: 100%;
1049
1052
  height: 100%;
1050
1053
  display: flex;
@@ -1102,6 +1105,9 @@
1102
1105
  }
1103
1106
 
1104
1107
  .alternate-layout {
1108
+ --alternate-layout-gap: calc(
1109
+ var(--alternate-layout-figure-size) * var(--alternate-figure-text-gap-ratio)
1110
+ );
1105
1111
  display: flex;
1106
1112
  flex-direction: column;
1107
1113
  align-items: center;
@@ -1122,6 +1128,13 @@
1122
1128
  margin: 0;
1123
1129
  }
1124
1130
 
1131
+ .alternate-layout-text {
1132
+ display: flex;
1133
+ flex-direction: column;
1134
+ align-items: center;
1135
+ gap: var(--alternate-layout-content-gap);
1136
+ }
1137
+
1125
1138
  .alternate-layout-title {
1126
1139
  margin: 0;
1127
1140
  color: var(--alternate-layout-title-color);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniai-fe/uds-primitives",
3
- "version": "0.12.8",
3
+ "version": "0.12.9",
4
4
  "description": "UNIAI Design System; Primitives Components Package",
5
5
  "type": "module",
6
6
  "private": false,
@@ -88,10 +88,10 @@
88
88
  "sass": "^1.102.0",
89
89
  "typescript": "6.0.3",
90
90
  "@uniai-fe/eslint-config": "0.4.3",
91
- "@uniai-fe/tsconfig": "0.2.0",
92
- "@uniai-fe/next-devkit": "0.4.1",
91
+ "@uniai-fe/uds-foundation": "0.6.0",
93
92
  "@uniai-fe/util-functions": "0.4.3",
94
- "@uniai-fe/uds-foundation": "0.6.0"
93
+ "@uniai-fe/next-devkit": "0.4.1",
94
+ "@uniai-fe/tsconfig": "0.2.0"
95
95
  },
96
96
  "scripts": {
97
97
  "check:pre-commit": "pnpm --dir ../../.. run check:pre-commit",
@@ -2,6 +2,7 @@ import AlternateLayoutButton from "./Button";
2
2
  import AlternateLayoutContainer from "./Container";
3
3
  import AlternateLayoutContents from "./Contents";
4
4
  import AlternateLayoutFigure from "./Figure";
5
+ import AlternateLayoutText from "./Text";
5
6
  import AlternateLayoutTextButton from "./TextButton";
6
7
  import AlternateLayoutTitle from "./Title";
7
8
 
@@ -10,6 +11,7 @@ import AlternateLayoutTitle from "./Title";
10
11
  * @desc
11
12
  * - `Container`: 화면 상태 조합 루트다.
12
13
  * - `Figure`: 도입 측이 제어하는 visual 영역이다.
14
+ * - `Text`: 제목과 본문을 묶는 텍스트 영역이다.
13
15
  * - `Title`: 제목 텍스트 영역이다.
14
16
  * - `Contents`: 본문 텍스트 영역이다.
15
17
  * - `TextButton`: paragraph 내부 text action이다.
@@ -18,6 +20,7 @@ import AlternateLayoutTitle from "./Title";
18
20
  const AlternateLayout = {
19
21
  Container: AlternateLayoutContainer,
20
22
  Figure: AlternateLayoutFigure,
23
+ Text: AlternateLayoutText,
21
24
  Title: AlternateLayoutTitle,
22
25
  Contents: AlternateLayoutContents,
23
26
  TextButton: AlternateLayoutTextButton,
@@ -0,0 +1,23 @@
1
+ import { clsx } from "clsx";
2
+ import type { AlternateLayoutTextProps } from "../types";
3
+
4
+ /**
5
+ * Alternate Layout Text; 제목과 본문을 묶는 텍스트 영역
6
+ * @component
7
+ * @param {AlternateLayoutTextProps} props
8
+ * @param {string} [props.className] 텍스트 영역 className override다.
9
+ * @param {React.ReactNode} [props.children] 제목과 본문 콘텐츠다.
10
+ * @example
11
+ * <Alternate.Layout.Text>
12
+ * <Alternate.Layout.Title>데이터가 없습니다.</Alternate.Layout.Title>
13
+ * <Alternate.Layout.Contents>다른 조건으로 검색해 주세요.</Alternate.Layout.Contents>
14
+ * </Alternate.Layout.Text>
15
+ */
16
+ export default function AlternateLayoutText({
17
+ className,
18
+ children,
19
+ }: AlternateLayoutTextProps) {
20
+ return (
21
+ <div className={clsx("alternate-layout-text", className)}>{children}</div>
22
+ );
23
+ }
@@ -1,4 +1,8 @@
1
1
  .alternate-layout {
2
+ --alternate-layout-gap: calc(
3
+ var(--alternate-layout-figure-size) * var(--alternate-figure-text-gap-ratio)
4
+ );
5
+
2
6
  display: flex;
3
7
  flex-direction: column;
4
8
  align-items: center;
@@ -19,6 +23,13 @@
19
23
  margin: 0;
20
24
  }
21
25
 
26
+ .alternate-layout-text {
27
+ display: flex;
28
+ flex-direction: column;
29
+ align-items: center;
30
+ gap: var(--alternate-layout-content-gap);
31
+ }
32
+
22
33
  .alternate-layout-title {
23
34
  margin: 0;
24
35
  color: var(--alternate-layout-title-color);
@@ -25,6 +25,11 @@
25
25
  }
26
26
 
27
27
  .alternate {
28
+ --alternate-unit-gap: calc(
29
+ var(--alternate-loading-icon-small-size) *
30
+ var(--alternate-figure-text-gap-ratio)
31
+ );
32
+
28
33
  width: 100%;
29
34
  height: 100%;
30
35
  display: flex;
@@ -2,14 +2,13 @@
2
2
  --alternate-unit-text-color: var(--color-cool-gray-70);
3
3
  --alternate-unit-text-font-size: 1.4rem;
4
4
  --alternate-unit-text-line-height: 1.5;
5
- --alternate-unit-gap: var(--spacing-gap-6);
5
+ --alternate-figure-text-gap-ratio: 0.344444;
6
6
  --alternate-loading-icon-color: var(--color-primary-default);
7
7
  --alternate-loading-icon-small-size: 2.4rem;
8
8
  --alternate-loading-icon-medium-size: 3.6rem;
9
9
  --alternate-loading-icon-large-size: 5.2rem;
10
10
 
11
11
  --alternate-layout-min-block-size: 320px;
12
- --alternate-layout-gap: var(--spacing-gap-7);
13
12
  --alternate-layout-content-gap: var(--spacing-gap-4);
14
13
  --alternate-layout-figure-size: 120px;
15
14
  --alternate-layout-title-color: var(--color-label-strong);
@@ -38,6 +38,22 @@ export interface AlternateLayoutFigureProps {
38
38
  children?: ReactNode;
39
39
  }
40
40
 
41
+ /**
42
+ * Alternate Layout Text Props; 제목과 본문을 묶는 텍스트 영역 props
43
+ * @property {string} [className] 텍스트 영역 className override다.
44
+ * @property {ReactNode} [children] 제목과 본문 콘텐츠다.
45
+ */
46
+ export interface AlternateLayoutTextProps {
47
+ /**
48
+ * 텍스트 영역 className override다.
49
+ */
50
+ className?: string;
51
+ /**
52
+ * 제목과 본문 콘텐츠다.
53
+ */
54
+ children?: ReactNode;
55
+ }
56
+
41
57
  /**
42
58
  * Alternate Layout Title Props; 제목 텍스트 props
43
59
  * @property {ElementType} [as] 렌더링할 제목 요소다. 기본값은 strong이다.