@uniai-fe/uds-primitives 0.3.45 → 0.3.47
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 +27 -14
- package/package.json +1 -1
- package/src/components/alternate/markup/Label.tsx +9 -0
- package/src/components/alternate/markup/empty/Data.tsx +2 -1
- package/src/components/alternate/markup/index.tsx +2 -0
- package/src/components/alternate/markup/loading/Default.tsx +2 -3
- package/src/components/alternate/markup/loading/Icon.tsx +21 -3
- package/src/components/alternate/styles/alternate.scss +22 -9
- package/src/components/select/markup/foundation/Selected.tsx +4 -1
- package/src/components/select/styles/select.scss +3 -3
- package/src/components/select/styles/variables.scss +2 -6
package/dist/styles.css
CHANGED
|
@@ -534,14 +534,10 @@
|
|
|
534
534
|
--select-table-border-focus-color: var(--input-border-active-color);
|
|
535
535
|
--select-table-border-error-color: var(--input-border-error-color);
|
|
536
536
|
--select-table-border-disabled-color: var(--input-border-disabled-color);
|
|
537
|
-
--select-table-border-readonly-color:
|
|
538
|
-
--select-table-border-disabled-color
|
|
539
|
-
);
|
|
537
|
+
--select-table-border-readonly-color: transparent;
|
|
540
538
|
--select-table-surface-color: transparent;
|
|
541
539
|
--select-table-surface-disabled-color: var(--input-surface-disabled-color);
|
|
542
|
-
--select-table-surface-readonly-color:
|
|
543
|
-
--select-table-surface-disabled-color
|
|
544
|
-
);
|
|
540
|
+
--select-table-surface-readonly-color: transparent;
|
|
545
541
|
--select-table-color-text: var(--input-text-color);
|
|
546
542
|
--select-table-color-text-readonly: var(--select-primary-color-text-readonly);
|
|
547
543
|
--select-table-color-placeholder: var(--input-placeholder-color);
|
|
@@ -709,6 +705,22 @@
|
|
|
709
705
|
transform: rotate(360deg);
|
|
710
706
|
}
|
|
711
707
|
}
|
|
708
|
+
.empty-text {
|
|
709
|
+
font-size: 1.4rem;
|
|
710
|
+
color: var(--color-cool-gray-70);
|
|
711
|
+
line-height: 1.5;
|
|
712
|
+
word-break: keep-all;
|
|
713
|
+
text-align: center;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
.alternate-text {
|
|
717
|
+
font-size: 1.4rem;
|
|
718
|
+
color: var(--color-cool-gray-70);
|
|
719
|
+
line-height: 1.5;
|
|
720
|
+
word-break: keep-all;
|
|
721
|
+
text-align: center;
|
|
722
|
+
}
|
|
723
|
+
|
|
712
724
|
.alternate {
|
|
713
725
|
width: 100%;
|
|
714
726
|
height: 100%;
|
|
@@ -717,20 +729,15 @@
|
|
|
717
729
|
align-items: center;
|
|
718
730
|
justify-content: center;
|
|
719
731
|
}
|
|
720
|
-
.alternate .empty-text {
|
|
721
|
-
font-size: 1.4rem;
|
|
722
|
-
color: var(--color-cool-gray-70);
|
|
723
|
-
line-height: 1.5;
|
|
724
|
-
word-break: keep-all;
|
|
725
|
-
text-align: center;
|
|
726
|
-
}
|
|
727
732
|
.alternate.is-horizontal {
|
|
728
733
|
flex-direction: row;
|
|
729
734
|
}
|
|
730
735
|
.alternate.is-horizontal.loading .empty-text {
|
|
731
736
|
transform: translateY(0.2rem);
|
|
737
|
+
margin-left: 1rem;
|
|
732
738
|
}
|
|
733
|
-
.alternate.is-horizontal.loading .
|
|
739
|
+
.alternate.is-horizontal.loading .alternate-text {
|
|
740
|
+
transform: translateY(0.2rem);
|
|
734
741
|
margin-left: 1rem;
|
|
735
742
|
}
|
|
736
743
|
.alternate.is-vertical {
|
|
@@ -739,6 +746,9 @@
|
|
|
739
746
|
.alternate.is-vertical .empty-text {
|
|
740
747
|
margin-top: 1rem;
|
|
741
748
|
}
|
|
749
|
+
.alternate.is-vertical .alternate-text {
|
|
750
|
+
margin-top: 1rem;
|
|
751
|
+
}
|
|
742
752
|
|
|
743
753
|
.alternate-loading-icon {
|
|
744
754
|
width: 2.4rem;
|
|
@@ -3963,6 +3973,9 @@ figure.chip {
|
|
|
3963
3973
|
height: var(--select-secondary-underline-width-default);
|
|
3964
3974
|
}
|
|
3965
3975
|
.select-button:where([data-priority=table]):where([data-readonly=true]) {
|
|
3976
|
+
border-color: var(--select-table-border-readonly-color);
|
|
3977
|
+
background-color: var(--select-table-surface-readonly-color);
|
|
3978
|
+
cursor: not-allowed;
|
|
3966
3979
|
--select-icon-fill: var(--select-table-icon-color-disabled);
|
|
3967
3980
|
}
|
|
3968
3981
|
.select-button:where(:not([data-priority=secondary])):where([data-state=disabled]), .select-button:where(:not([data-priority=secondary])):disabled {
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
|
+
import AlternateText from "../Label";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* 차트; 데이터 없는 경우 대체 컴포넌트
|
|
@@ -20,7 +21,7 @@ export default function AlternateEmptyData({
|
|
|
20
21
|
|
|
21
22
|
return (
|
|
22
23
|
<div className={clsx("alternate empty-data", directionClass, className)}>
|
|
23
|
-
<
|
|
24
|
+
<AlternateText>{text || "데이터가 없습니다."}</AlternateText>
|
|
24
25
|
</div>
|
|
25
26
|
);
|
|
26
27
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import AlternateEmptyData from "./empty/Data";
|
|
2
|
+
import AlternateText from "./Label";
|
|
2
3
|
import AlternateLoadingDefault from "./loading/Default";
|
|
3
4
|
import AlternateLoadingIcon from "./loading/Icon";
|
|
4
5
|
|
|
@@ -6,6 +7,7 @@ const Alternate = {
|
|
|
6
7
|
EmptyData: AlternateEmptyData,
|
|
7
8
|
LoadingDefault: AlternateLoadingDefault,
|
|
8
9
|
LoadingIcon: AlternateLoadingIcon,
|
|
10
|
+
Text: AlternateText,
|
|
9
11
|
};
|
|
10
12
|
|
|
11
13
|
export default Alternate;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
4
|
import AlternateLoadingIcon from "./Icon";
|
|
5
|
+
import AlternateText from "../Label";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* 데이터 로딩중 컴포넌트
|
|
@@ -21,9 +22,7 @@ export default function AlternateLoadingDefault({
|
|
|
21
22
|
<div className={clsx("alternate loading", directionClass)}>
|
|
22
23
|
<AlternateLoadingIcon direction={direction} />
|
|
23
24
|
{["string", "undefined"].includes(typeof text) ? (
|
|
24
|
-
<
|
|
25
|
-
{text || "데이터를 불러오는 중입니다."}
|
|
26
|
-
</span>
|
|
25
|
+
<AlternateText>{text || "데이터를 불러오는 중입니다."}</AlternateText>
|
|
27
26
|
) : (
|
|
28
27
|
text
|
|
29
28
|
)}
|
|
@@ -25,13 +25,31 @@ export default function AlternateLoadingIcon({
|
|
|
25
25
|
)}
|
|
26
26
|
>
|
|
27
27
|
{size === "small" && (
|
|
28
|
-
<SpinnerSmallIcon
|
|
28
|
+
<SpinnerSmallIcon
|
|
29
|
+
alt="불러오는 중"
|
|
30
|
+
width={24}
|
|
31
|
+
height={24}
|
|
32
|
+
viewBox="0 0 24 24"
|
|
33
|
+
preserveAspectRatio="xMinYMin meet"
|
|
34
|
+
/>
|
|
29
35
|
)}
|
|
30
36
|
{size === "medium" && (
|
|
31
|
-
<SpinnerMediumIcon
|
|
37
|
+
<SpinnerMediumIcon
|
|
38
|
+
alt="불러오는 중"
|
|
39
|
+
width={36}
|
|
40
|
+
height={36}
|
|
41
|
+
viewBox="0 0 36 36"
|
|
42
|
+
preserveAspectRatio="xMinYMin meet"
|
|
43
|
+
/>
|
|
32
44
|
)}
|
|
33
45
|
{size === "large" && (
|
|
34
|
-
<SpinnerLargeIcon
|
|
46
|
+
<SpinnerLargeIcon
|
|
47
|
+
alt="불러오는 중"
|
|
48
|
+
width={52}
|
|
49
|
+
height={52}
|
|
50
|
+
viewBox="0 0 52 52"
|
|
51
|
+
preserveAspectRatio="xMinYMin meet"
|
|
52
|
+
/>
|
|
35
53
|
)}
|
|
36
54
|
</figure>
|
|
37
55
|
);
|
|
@@ -8,6 +8,22 @@
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
.empty-text {
|
|
12
|
+
font-size: 1.4rem;
|
|
13
|
+
color: var(--color-cool-gray-70);
|
|
14
|
+
line-height: 1.5;
|
|
15
|
+
word-break: keep-all;
|
|
16
|
+
text-align: center;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.alternate-text {
|
|
20
|
+
font-size: 1.4rem;
|
|
21
|
+
color: var(--color-cool-gray-70);
|
|
22
|
+
line-height: 1.5;
|
|
23
|
+
word-break: keep-all;
|
|
24
|
+
text-align: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
11
27
|
.alternate {
|
|
12
28
|
width: 100%;
|
|
13
29
|
height: 100%;
|
|
@@ -16,22 +32,16 @@
|
|
|
16
32
|
align-items: center;
|
|
17
33
|
justify-content: center;
|
|
18
34
|
|
|
19
|
-
.empty-text {
|
|
20
|
-
font-size: 1.4rem;
|
|
21
|
-
color: var(--color-cool-gray-70);
|
|
22
|
-
line-height: 1.5;
|
|
23
|
-
word-break: keep-all;
|
|
24
|
-
text-align: center;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
35
|
&.is-horizontal {
|
|
28
36
|
flex-direction: row;
|
|
29
37
|
|
|
30
38
|
&.loading {
|
|
31
39
|
.empty-text {
|
|
32
40
|
transform: translateY(0.2rem);
|
|
41
|
+
margin-left: 1rem;
|
|
33
42
|
}
|
|
34
|
-
.
|
|
43
|
+
.alternate-text {
|
|
44
|
+
transform: translateY(0.2rem);
|
|
35
45
|
margin-left: 1rem;
|
|
36
46
|
}
|
|
37
47
|
}
|
|
@@ -42,6 +52,9 @@
|
|
|
42
52
|
.empty-text {
|
|
43
53
|
margin-top: 1rem;
|
|
44
54
|
}
|
|
55
|
+
.alternate-text {
|
|
56
|
+
margin-top: 1rem;
|
|
57
|
+
}
|
|
45
58
|
}
|
|
46
59
|
}
|
|
47
60
|
|
|
@@ -59,6 +59,9 @@ const SelectTriggerSelected = ({
|
|
|
59
59
|
const resolvedLabelText = valueText || toInputText(label);
|
|
60
60
|
const isLabelTextLike =
|
|
61
61
|
typeof label === "string" || typeof label === "number";
|
|
62
|
+
// 변경 설명: readOnly에서 non-text label을 직접 렌더링하되, placeholder 상태일 때는 input placeholder 경로를 유지한다.
|
|
63
|
+
const shouldRenderReadonlyLabelNode =
|
|
64
|
+
readOnly && !isLabelTextLike && !isPlaceholder;
|
|
62
65
|
|
|
63
66
|
// 3) custom mode 활성 시에만 label input focus를 부여한다.
|
|
64
67
|
useEffect(() => {
|
|
@@ -71,7 +74,7 @@ const SelectTriggerSelected = ({
|
|
|
71
74
|
|
|
72
75
|
return (
|
|
73
76
|
<div className="select-value">
|
|
74
|
-
{
|
|
77
|
+
{shouldRenderReadonlyLabelNode ? (
|
|
75
78
|
// 변경 설명: readonly + ReactNode label일 때는 문자열 변환 없이 label 노드를 직접 렌더링한다.
|
|
76
79
|
<div
|
|
77
80
|
className={clsx("select-input-label", inputProps?.className, {
|
|
@@ -192,9 +192,9 @@
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
&:where([data-priority="table"]):where([data-readonly="true"]) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
border-color: var(--select-table-border-readonly-color);
|
|
196
|
+
background-color: var(--select-table-surface-readonly-color);
|
|
197
|
+
cursor: not-allowed;
|
|
198
198
|
--select-icon-fill: var(--select-table-icon-color-disabled);
|
|
199
199
|
}
|
|
200
200
|
|
|
@@ -37,14 +37,10 @@
|
|
|
37
37
|
--select-table-border-focus-color: var(--input-border-active-color);
|
|
38
38
|
--select-table-border-error-color: var(--input-border-error-color);
|
|
39
39
|
--select-table-border-disabled-color: var(--input-border-disabled-color);
|
|
40
|
-
--select-table-border-readonly-color:
|
|
41
|
-
--select-table-border-disabled-color
|
|
42
|
-
);
|
|
40
|
+
--select-table-border-readonly-color: transparent;
|
|
43
41
|
--select-table-surface-color: transparent;
|
|
44
42
|
--select-table-surface-disabled-color: var(--input-surface-disabled-color);
|
|
45
|
-
--select-table-surface-readonly-color:
|
|
46
|
-
--select-table-surface-disabled-color
|
|
47
|
-
);
|
|
43
|
+
--select-table-surface-readonly-color: transparent;
|
|
48
44
|
--select-table-color-text: var(--input-text-color);
|
|
49
45
|
--select-table-color-text-readonly: var(--select-primary-color-text-readonly);
|
|
50
46
|
--select-table-color-placeholder: var(--input-placeholder-color);
|