@uniai-fe/uds-primitives 0.2.1 → 0.2.3
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 +1 -1
- package/dist/styles.css +391 -81
- package/package.json +17 -8
- package/src/components/button/index.tsx +0 -2
- package/src/components/button/markup/Base.tsx +22 -1
- package/src/components/button/styles/button.scss +24 -2
- package/src/components/button/styles/variables.scss +4 -0
- package/src/components/button/types/index.ts +7 -0
- package/src/components/{input/img/calendar → calendar/img}/calendar.svg +5 -0
- package/src/components/calendar/index.tsx +5 -3
- package/src/components/calendar/markup/Core.tsx +67 -0
- package/src/components/calendar/markup/Icon.tsx +20 -0
- package/src/components/calendar/markup/Root.tsx +126 -0
- package/src/components/calendar/markup/index.tsx +24 -2
- package/src/components/calendar/markup/layout/Body.tsx +12 -0
- package/src/components/calendar/markup/layout/Container.tsx +43 -0
- package/src/components/calendar/markup/layout/Footer.tsx +12 -0
- package/src/components/calendar/markup/layout/Header.tsx +12 -0
- package/src/components/calendar/styles/index.scss +2 -0
- package/src/components/calendar/styles/layout.scss +21 -0
- package/src/components/calendar/styles/mantine-calendar.scss +240 -0
- package/src/components/calendar/types/calendar.ts +208 -0
- package/src/components/calendar/types/index.ts +1 -4
- package/src/components/calendar/utils/index.ts +1 -4
- package/src/components/calendar/utils/value-mapper.ts +24 -0
- package/src/components/checkbox/markup/Checkbox.tsx +31 -25
- package/src/components/dropdown/markup/index.tsx +10 -1
- package/src/components/input/hooks/index.ts +1 -0
- package/src/components/input/hooks/useAddress.ts +247 -0
- package/src/components/input/index.scss +5 -1
- package/src/components/input/markup/address/Button.tsx +65 -0
- package/src/components/input/markup/address/Template.tsx +135 -0
- package/src/components/input/markup/address/index.ts +9 -0
- package/src/components/input/markup/date/Template.tsx +181 -0
- package/src/components/input/markup/date/Trigger.tsx +79 -0
- package/src/components/input/markup/date/button/ApplyButton.tsx +38 -0
- package/src/components/input/markup/date/button/ClearButton.tsx +36 -0
- package/src/components/input/markup/date/button/TodayButton.tsx +36 -0
- package/src/components/input/markup/date/footer/Container.tsx +24 -0
- package/src/components/input/markup/date/footer/Template.tsx +36 -0
- package/src/components/input/markup/date/footer/UtilContainer.tsx +23 -0
- package/src/components/input/markup/date/footer/index.ts +3 -0
- package/src/components/input/markup/date/index.tsx +27 -0
- package/src/components/input/markup/foundation/Input.tsx +20 -1
- package/src/components/input/markup/index.tsx +4 -4
- package/src/components/input/styles/address.scss +24 -0
- package/src/components/input/styles/date.scss +45 -0
- package/src/components/input/styles/foundation.scss +28 -2
- package/src/components/input/styles/variables.scss +4 -0
- package/src/components/input/types/address.ts +249 -0
- package/src/components/input/types/date.ts +366 -0
- package/src/components/input/types/foundation.ts +6 -0
- package/src/components/input/types/index.ts +2 -1
- package/src/components/input/utils/address.ts +165 -0
- package/src/components/input/utils/date.ts +61 -0
- package/src/components/input/utils/index.tsx +2 -0
- package/src/components/pop-over/index.scss +1 -0
- package/src/components/pop-over/index.tsx +4 -0
- package/src/components/pop-over/markup/Content.tsx +77 -0
- package/src/components/pop-over/markup/Root.tsx +28 -0
- package/src/components/pop-over/markup/Trigger.tsx +26 -0
- package/src/components/pop-over/markup/index.tsx +17 -0
- package/src/components/pop-over/styles/base.scss +5 -0
- package/src/components/pop-over/styles/content.scss +24 -0
- package/src/components/pop-over/styles/index.scss +2 -0
- package/src/components/pop-over/types/index.ts +1 -0
- package/src/components/pop-over/types/pop-over.ts +86 -0
- package/src/components/radio/markup/Radio.tsx +10 -2
- package/src/components/radio/markup/RadioCard.tsx +6 -1
- package/src/components/radio/markup/RadioCardGroup.tsx +6 -1
- package/src/components/select/markup/Default.tsx +2 -0
- package/src/components/select/markup/foundation/Container.tsx +23 -0
- package/src/components/select/markup/multiple/Multiple.tsx +2 -0
- package/src/components/select/styles/select.scss +25 -2
- package/src/components/select/styles/variables.scss +4 -0
- package/src/components/select/types/props.ts +24 -5
- package/src/index.scss +1 -0
- package/src/index.tsx +3 -1
- package/src/init/mantine.css +5 -0
- package/src/init/mantine.ts +2 -0
- package/src/components/input/markup/calendar/Base.tsx +0 -329
- package/src/components/input/markup/calendar/index.tsx +0 -8
- package/src/components/input/styles/calendar.scss +0 -110
- package/src/components/input/styles/index.scss +0 -4
- package/src/components/input/types/calendar.ts +0 -208
- /package/src/components/{input/img/calendar → calendar/img}/chevron-down.svg +0 -0
- /package/src/components/{input/img/calendar → calendar/img}/chevron-left.svg +0 -0
- /package/src/components/{input/img/calendar → calendar/img}/chevron-right.svg +0 -0
- /package/src/components/{input/img/calendar → calendar/img}/chevron-up.svg +0 -0
package/README.md
CHANGED
|
@@ -140,7 +140,7 @@ import "@uniai-fe/uds-primitives/css";
|
|
|
140
140
|
|
|
141
141
|
ThemeProvider는 CSS를 import하지 않으므로 foundation/primitives styles를 앱 루트에서 1회만 로드하면 중복 없이 토큰 매핑이 적용된다. Provider 자체는 foundation 패키지(`@uniai-fe/uds-foundation/provider`)에서만 export된다(one-source 규칙).
|
|
142
142
|
|
|
143
|
-
> modules 레포 내부(Storybook 등)에서는 개발 편의를 위해 `@uniai-fe/uds-primitives/
|
|
143
|
+
> modules 레포 내부(Storybook 등)에서는 개발 편의를 위해 `@uniai-fe/uds-primitives/styles` 엔트리를 import하지만, 외부 서비스/패키지는 `@uniai-fe/uds-primitives/css` 엔트리만 사용한다.
|
|
144
144
|
|
|
145
145
|
### 토큰 스코프 & ThemeProvider
|
|
146
146
|
|
package/dist/styles.css
CHANGED
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
--theme-badge-line-height: var(--font-caption-medium-line-height, 1.5);
|
|
12
12
|
--theme-badge-letter-spacing: var(--font-caption-medium-letter-spacing, 0);
|
|
13
13
|
--theme-badge-dot-size: var(--spacing-gap-3, 8px);
|
|
14
|
+
/* layout presets */
|
|
15
|
+
--button-width: fit-content;
|
|
16
|
+
--button-flex: 0 0 auto;
|
|
14
17
|
/* default button spacing (size 기반) */
|
|
15
18
|
--button-default-gap-small: var(--spacing-gap-1);
|
|
16
19
|
--button-default-gap-medium: var(--spacing-gap-2);
|
|
@@ -225,6 +228,9 @@
|
|
|
225
228
|
--dropdown-option-height-small: var(--theme-size-medium-1, 40px);
|
|
226
229
|
--dropdown-option-height-medium: var(--theme-size-medium-2, 48px);
|
|
227
230
|
--dropdown-option-height-large: var(--theme-size-medium-3, 56px);
|
|
231
|
+
/* Layout presets */
|
|
232
|
+
--input-width: 100%;
|
|
233
|
+
--input-flex: 0 1 auto;
|
|
228
234
|
/* Input sizing tokens; Button 변수 규칙과 동일한 prefix 패턴을 맞춘다. */
|
|
229
235
|
--input-default-height-small: var(--theme-size-medium-1);
|
|
230
236
|
--input-default-height-medium: var(--theme-size-medium-2);
|
|
@@ -260,6 +266,9 @@
|
|
|
260
266
|
--input-surface-color: var(--color-common-100);
|
|
261
267
|
--input-surface-muted-color: var(--color-neutral-99);
|
|
262
268
|
--input-surface-disabled-color: var(--color-neutral-95);
|
|
269
|
+
/* layout presets */
|
|
270
|
+
--select-width: 100%;
|
|
271
|
+
--select-flex: 0 1 auto;
|
|
263
272
|
--select-primary-height-small: var(--input-default-height-small);
|
|
264
273
|
--select-primary-height-medium: var(--input-default-height-medium);
|
|
265
274
|
--select-primary-height-large: var(--input-default-height-large);
|
|
@@ -644,7 +653,8 @@
|
|
|
644
653
|
align-items: center;
|
|
645
654
|
justify-content: center;
|
|
646
655
|
gap: var(--button-default-gap-medium, var(--spacing-gap-2, 8px));
|
|
647
|
-
width:
|
|
656
|
+
width: var(--button-width);
|
|
657
|
+
flex: var(--button-flex);
|
|
648
658
|
min-width: var(--button-default-width-min-base, var(--theme-size-small-2, 24px));
|
|
649
659
|
min-height: var(--button-min-height, auto);
|
|
650
660
|
padding-inline: var(--button-padding-inline, var(--button-default-padding-inline-base, var(--spacing-padding-4, 16px)));
|
|
@@ -672,8 +682,24 @@
|
|
|
672
682
|
align-items: center;
|
|
673
683
|
justify-content: center;
|
|
674
684
|
}
|
|
675
|
-
.button
|
|
676
|
-
width:
|
|
685
|
+
.button[data-width=auto] {
|
|
686
|
+
--button-width: auto;
|
|
687
|
+
--button-flex: 0 1 auto;
|
|
688
|
+
}
|
|
689
|
+
.button[data-width=fill] {
|
|
690
|
+
--button-width: auto;
|
|
691
|
+
--button-flex: 1 1 0%;
|
|
692
|
+
}
|
|
693
|
+
.button[data-width=full], .button.button-block {
|
|
694
|
+
--button-width: 100%;
|
|
695
|
+
--button-flex: 0 0 100%;
|
|
696
|
+
}
|
|
697
|
+
.button[data-width=fit] {
|
|
698
|
+
--button-width: fit-content;
|
|
699
|
+
--button-flex: 0 0 auto;
|
|
700
|
+
}
|
|
701
|
+
.button[data-width=custom] {
|
|
702
|
+
--button-flex: 0 0 auto;
|
|
677
703
|
}
|
|
678
704
|
.button:not(.button-fill-solid):not(.button-fill-outlined) {
|
|
679
705
|
background-color: transparent;
|
|
@@ -985,6 +1011,260 @@
|
|
|
985
1011
|
border-radius: var(--button-round-radius-large, 30px);
|
|
986
1012
|
}
|
|
987
1013
|
|
|
1014
|
+
.calendar-root {
|
|
1015
|
+
width: fit-content;
|
|
1016
|
+
max-width: 100%;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
.calendar-trigger {
|
|
1020
|
+
width: 100%;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
.calendar-container {
|
|
1024
|
+
display: grid;
|
|
1025
|
+
gap: var(--spacing-gap-3);
|
|
1026
|
+
width: fit-content;
|
|
1027
|
+
max-width: 100%;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
.calendar-body,
|
|
1031
|
+
.calendar-grid {
|
|
1032
|
+
width: fit-content;
|
|
1033
|
+
max-width: 100%;
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
.calendar-root,
|
|
1037
|
+
.calendar-grid {
|
|
1038
|
+
--calendar-width: 375px;
|
|
1039
|
+
--calendar-inline-padding: var(--spacing-padding-6);
|
|
1040
|
+
--calendar-body-width: calc(
|
|
1041
|
+
var(--calendar-width) - (var(--calendar-inline-padding) * 2)
|
|
1042
|
+
);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.calendar-root {
|
|
1046
|
+
padding: var(--spacing-padding-10) var(--spacing-padding-6) var(--spacing-padding-6);
|
|
1047
|
+
display: grid;
|
|
1048
|
+
gap: var(--spacing-gap-3);
|
|
1049
|
+
width: var(--calendar-width);
|
|
1050
|
+
min-width: var(--calendar-width);
|
|
1051
|
+
max-width: min(100vw - var(--spacing-padding-5) * 2, 420px);
|
|
1052
|
+
box-sizing: border-box;
|
|
1053
|
+
z-index: 30;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
.calendar-header {
|
|
1057
|
+
margin-bottom: var(--spacing-gap-2);
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
.calendar-body {
|
|
1061
|
+
display: grid;
|
|
1062
|
+
gap: var(--spacing-gap-5);
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
.calendar-grid {
|
|
1066
|
+
width: var(--calendar-body-width);
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
.calendar-grid table {
|
|
1070
|
+
width: auto;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
.calendar-month-level {
|
|
1074
|
+
width: 100%;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
.calendar-month-level > [data-month-level=true],
|
|
1078
|
+
.calendar-month-level > [data-year-level=true],
|
|
1079
|
+
.calendar-month-level > [data-decade-level=true] {
|
|
1080
|
+
width: 100%;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
.calendar-header-row {
|
|
1084
|
+
display: grid;
|
|
1085
|
+
grid-template-columns: 44px 1fr 44px;
|
|
1086
|
+
align-items: center;
|
|
1087
|
+
width: 100%;
|
|
1088
|
+
max-width: none;
|
|
1089
|
+
column-gap: var(--spacing-gap-5);
|
|
1090
|
+
padding: 0 var(--spacing-padding-9);
|
|
1091
|
+
margin-bottom: var(--spacing-gap-5);
|
|
1092
|
+
--dch-fz: var(--font-heading-small-size) !important;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
.calendar-header-control {
|
|
1096
|
+
width: 44px;
|
|
1097
|
+
height: 44px;
|
|
1098
|
+
border-radius: 999px;
|
|
1099
|
+
display: inline-flex;
|
|
1100
|
+
align-items: center;
|
|
1101
|
+
justify-content: center;
|
|
1102
|
+
color: var(--color-label-alternative);
|
|
1103
|
+
transition: background-color 0.2s ease, color 0.2s ease;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
.calendar-header-control[data-direction=previous] {
|
|
1107
|
+
justify-self: start;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.calendar-header-control[data-direction=next] {
|
|
1111
|
+
justify-self: end;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
.calendar-header-level {
|
|
1115
|
+
justify-self: center;
|
|
1116
|
+
font-size: var(--font-heading-small-size);
|
|
1117
|
+
font-weight: var(--font-heading-small-weight);
|
|
1118
|
+
text-align: center;
|
|
1119
|
+
white-space: nowrap;
|
|
1120
|
+
writing-mode: horizontal-tb;
|
|
1121
|
+
letter-spacing: 0.2px;
|
|
1122
|
+
/* Month/Year 헤더 텍스트는 디자인 기준에 맞춰 strong 컬러를 사용한다. */
|
|
1123
|
+
color: var(--color-label-strong);
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
.calendar-header-control:where(:not([data-disabled=true])):hover {
|
|
1127
|
+
background-color: var(--color-tertiary-default);
|
|
1128
|
+
color: var(--color-label-standard);
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
.calendar-month-table {
|
|
1132
|
+
width: 100%;
|
|
1133
|
+
max-width: 100%;
|
|
1134
|
+
margin: 0 auto;
|
|
1135
|
+
table-layout: fixed;
|
|
1136
|
+
border-collapse: collapse;
|
|
1137
|
+
border-spacing: 0;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
.calendar-month-cell {
|
|
1141
|
+
width: 46px;
|
|
1142
|
+
padding: 1px;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
.calendar-months-list {
|
|
1146
|
+
width: 100%;
|
|
1147
|
+
max-width: 100%;
|
|
1148
|
+
margin: 0 auto;
|
|
1149
|
+
table-layout: fixed;
|
|
1150
|
+
border-collapse: separate;
|
|
1151
|
+
border-spacing: var(--spacing-gap-3);
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
.calendar-months-list-cell {
|
|
1155
|
+
padding: 0;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
.calendar-months-list-control {
|
|
1159
|
+
width: 100%;
|
|
1160
|
+
min-width: 0;
|
|
1161
|
+
height: 44px;
|
|
1162
|
+
padding: 0 var(--spacing-padding-2);
|
|
1163
|
+
border: none;
|
|
1164
|
+
border-radius: var(--theme-radius-medium-3);
|
|
1165
|
+
font-size: var(--font-body-medium-size);
|
|
1166
|
+
font-weight: var(--font-body-medium-weight);
|
|
1167
|
+
line-height: 1.5;
|
|
1168
|
+
color: var(--color-label-standard);
|
|
1169
|
+
text-transform: none;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
.calendar-months-list-control[data-selected=true] {
|
|
1173
|
+
background-color: var(--color-primary-default);
|
|
1174
|
+
color: var(--color-common-100);
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
.calendar-months-list-control:where(:not([data-disabled=true], [data-selected=true])):hover {
|
|
1178
|
+
background-color: var(--color-secondary-default);
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
.calendar-years-list {
|
|
1182
|
+
width: 100%;
|
|
1183
|
+
max-width: 100%;
|
|
1184
|
+
margin: 0 auto;
|
|
1185
|
+
table-layout: fixed;
|
|
1186
|
+
border-collapse: separate;
|
|
1187
|
+
border-spacing: var(--spacing-gap-3);
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
.calendar-years-list-cell {
|
|
1191
|
+
padding: 0;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
.calendar-years-list-control {
|
|
1195
|
+
width: 100%;
|
|
1196
|
+
min-width: 0;
|
|
1197
|
+
height: 44px;
|
|
1198
|
+
padding: 0 var(--spacing-padding-2);
|
|
1199
|
+
border: none;
|
|
1200
|
+
border-radius: var(--theme-radius-medium-3);
|
|
1201
|
+
font-size: var(--font-body-medium-size);
|
|
1202
|
+
font-weight: var(--font-body-medium-weight);
|
|
1203
|
+
line-height: 1.5;
|
|
1204
|
+
color: var(--color-label-standard);
|
|
1205
|
+
text-transform: none;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
.calendar-years-list-control[data-selected=true] {
|
|
1209
|
+
background-color: var(--color-primary-default);
|
|
1210
|
+
color: var(--color-common-100);
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
.calendar-years-list-control:where(:not([data-disabled=true], [data-selected=true])):hover {
|
|
1214
|
+
background-color: var(--color-secondary-default);
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
.calendar-weekdays {
|
|
1218
|
+
text-transform: none;
|
|
1219
|
+
--wr-fz: var(--font-heading-xxsmall-size) !important;
|
|
1220
|
+
--wr-spacing: 10px !important;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
.calendar-weekday {
|
|
1224
|
+
text-transform: none;
|
|
1225
|
+
width: 46px;
|
|
1226
|
+
min-width: 46px;
|
|
1227
|
+
height: 30px;
|
|
1228
|
+
padding-bottom: 5px;
|
|
1229
|
+
font-size: var(--font-heading-xxsmall-size);
|
|
1230
|
+
font-weight: var(--font-heading-xxsmall-weight);
|
|
1231
|
+
line-height: 1.5;
|
|
1232
|
+
letter-spacing: 0.2px;
|
|
1233
|
+
color: var(--color-label-alternative);
|
|
1234
|
+
text-align: center;
|
|
1235
|
+
vertical-align: middle;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
.calendar-day {
|
|
1239
|
+
width: 44px;
|
|
1240
|
+
height: 44px;
|
|
1241
|
+
padding: 0;
|
|
1242
|
+
border: none;
|
|
1243
|
+
border-radius: var(--theme-radius-large-1);
|
|
1244
|
+
font-size: var(--font-body-medium-size);
|
|
1245
|
+
color: var(--color-label-standard);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
.calendar-day[data-outside=true] {
|
|
1249
|
+
color: var(--color-label-alternative);
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
.calendar-day[data-selected=true],
|
|
1253
|
+
.calendar-day[data-focused=true] {
|
|
1254
|
+
background-color: var(--color-primary-default);
|
|
1255
|
+
color: var(--color-common-100);
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
.calendar-day:where(:not([data-disabled=true])):hover {
|
|
1259
|
+
background-color: var(--color-secondary-default);
|
|
1260
|
+
color: var(--color-label-standard);
|
|
1261
|
+
border: none;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
.calendar-footer {
|
|
1265
|
+
width: 100%;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
988
1268
|
|
|
989
1269
|
|
|
990
1270
|
.checkbox {
|
|
@@ -1597,15 +1877,64 @@ figure.chip {
|
|
|
1597
1877
|
padding: 0;
|
|
1598
1878
|
}
|
|
1599
1879
|
|
|
1880
|
+
.pop-over-content {
|
|
1881
|
+
position: relative;
|
|
1882
|
+
z-index: 50;
|
|
1883
|
+
outline: none;
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
.pop-over-content {
|
|
1887
|
+
width: fit-content;
|
|
1888
|
+
max-width: min(100vw - 24px, max-content);
|
|
1889
|
+
box-sizing: border-box;
|
|
1890
|
+
background-color: var(--color-common-100);
|
|
1891
|
+
border-radius: var(--theme-radius-large-2);
|
|
1892
|
+
overflow: hidden;
|
|
1893
|
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.16), 0 0 2px rgba(0, 0, 0, 0.12);
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
.pop-over-content[data-width=match] {
|
|
1897
|
+
width: var(--radix-popover-trigger-width);
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
.pop-over-content[data-width=fit-content] {
|
|
1901
|
+
width: fit-content;
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
.pop-over-content[data-width=max-content] {
|
|
1905
|
+
width: max-content;
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1600
1908
|
|
|
1601
1909
|
|
|
1602
1910
|
.input {
|
|
1603
1911
|
display: flex;
|
|
1604
1912
|
flex-direction: column;
|
|
1605
1913
|
gap: var(--spacing-gap-3);
|
|
1606
|
-
width:
|
|
1914
|
+
width: var(--input-width);
|
|
1915
|
+
flex: var(--input-flex);
|
|
1916
|
+
min-width: 0;
|
|
1917
|
+
}
|
|
1918
|
+
.input[data-width=auto] {
|
|
1919
|
+
--input-width: auto;
|
|
1920
|
+
--input-flex: 0 1 auto;
|
|
1921
|
+
}
|
|
1922
|
+
.input[data-width=fill] {
|
|
1923
|
+
--input-width: auto;
|
|
1924
|
+
--input-flex: 1 1 0%;
|
|
1925
|
+
}
|
|
1926
|
+
.input[data-width=full], .input[data-block=true] {
|
|
1927
|
+
--input-width: 100%;
|
|
1928
|
+
--input-flex: 0 0 100%;
|
|
1929
|
+
}
|
|
1930
|
+
.input[data-width=fit] {
|
|
1931
|
+
--input-width: fit-content;
|
|
1932
|
+
--input-flex: 0 0 auto;
|
|
1933
|
+
}
|
|
1934
|
+
.input[data-width=custom] {
|
|
1935
|
+
--input-flex: 0 0 auto;
|
|
1607
1936
|
}
|
|
1608
|
-
.input
|
|
1937
|
+
.input--block {
|
|
1609
1938
|
width: 100%;
|
|
1610
1939
|
}
|
|
1611
1940
|
|
|
@@ -1972,110 +2301,68 @@ figure.chip {
|
|
|
1972
2301
|
font-weight: var(--font-body-xxsmall-weight);
|
|
1973
2302
|
}
|
|
1974
2303
|
|
|
1975
|
-
.input-
|
|
1976
|
-
display:
|
|
1977
|
-
|
|
1978
|
-
gap: var(--spacing-gap-6, 20px);
|
|
1979
|
-
width: 100%;
|
|
1980
|
-
}
|
|
1981
|
-
.input-calendar[data-disabled=true] {
|
|
1982
|
-
opacity: 0.6;
|
|
1983
|
-
}
|
|
1984
|
-
|
|
1985
|
-
.input-calendar-container {
|
|
1986
|
-
background-color: var(--color-common-100, #fff);
|
|
1987
|
-
border-radius: var(--theme-radius-large-3, 16px);
|
|
1988
|
-
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.16), 0 0 2px rgba(0, 0, 0, 0.12);
|
|
1989
|
-
padding: var(--spacing-padding-10, 32px) var(--spacing-padding-6, 16px) var(--spacing-padding-6, 16px);
|
|
1990
|
-
display: flex;
|
|
1991
|
-
flex-direction: column;
|
|
1992
|
-
gap: var(--spacing-gap-5, 16px);
|
|
1993
|
-
}
|
|
1994
|
-
|
|
1995
|
-
.input-calendar-root {
|
|
2304
|
+
.input-date-field {
|
|
2305
|
+
display: grid;
|
|
2306
|
+
gap: var(--spacing-gap-5);
|
|
1996
2307
|
width: 100%;
|
|
1997
2308
|
}
|
|
1998
2309
|
|
|
1999
|
-
.input-
|
|
2310
|
+
.input-date-trigger-input {
|
|
2000
2311
|
width: 100%;
|
|
2001
|
-
border-radius: var(--theme-radius-large-1, 12px);
|
|
2002
|
-
background-color: transparent;
|
|
2003
2312
|
}
|
|
2004
2313
|
|
|
2005
|
-
.input-
|
|
2006
|
-
|
|
2007
|
-
align-items: center;
|
|
2008
|
-
justify-content: space-between;
|
|
2009
|
-
padding-inline: var(--spacing-padding-6, 16px);
|
|
2010
|
-
margin-bottom: var(--spacing-gap-4, 12px);
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
.input-calendar-header-control {
|
|
2014
|
-
width: 24px;
|
|
2015
|
-
height: 24px;
|
|
2314
|
+
.input-date-trigger-icon {
|
|
2315
|
+
margin: 0;
|
|
2016
2316
|
display: inline-flex;
|
|
2017
2317
|
align-items: center;
|
|
2018
2318
|
justify-content: center;
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
color: var(--color-label-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
.input-calendar-header-level {
|
|
2025
|
-
font-size: var(--font-heading-small-size, 19px);
|
|
2026
|
-
font-weight: var(--font-heading-small-weight, 600);
|
|
2319
|
+
width: 28px;
|
|
2320
|
+
height: 28px;
|
|
2321
|
+
color: var(--color-label-alternative);
|
|
2322
|
+
pointer-events: none;
|
|
2027
2323
|
}
|
|
2028
2324
|
|
|
2029
|
-
.input-
|
|
2325
|
+
.input-date-footer-template {
|
|
2030
2326
|
display: grid;
|
|
2031
|
-
|
|
2032
|
-
|
|
2327
|
+
gap: var(--spacing-gap-5);
|
|
2328
|
+
width: 100%;
|
|
2033
2329
|
}
|
|
2034
2330
|
|
|
2035
|
-
.input-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2331
|
+
.input-date-footer-util {
|
|
2332
|
+
display: flex;
|
|
2333
|
+
align-items: center;
|
|
2334
|
+
justify-content: space-between;
|
|
2335
|
+
gap: var(--spacing-gap-3);
|
|
2336
|
+
width: 100%;
|
|
2040
2337
|
}
|
|
2041
2338
|
|
|
2042
|
-
.input-
|
|
2043
|
-
width:
|
|
2044
|
-
height: 44px;
|
|
2045
|
-
border-radius: var(--theme-radius-large-1, 12px);
|
|
2046
|
-
justify-self: center;
|
|
2047
|
-
font-size: var(--font-body-medium-size, 17px);
|
|
2048
|
-
color: var(--color-label-strong, #3d3f43);
|
|
2339
|
+
.input-date-action-button {
|
|
2340
|
+
width: auto;
|
|
2049
2341
|
}
|
|
2050
2342
|
|
|
2051
|
-
.input-
|
|
2052
|
-
display: flex;
|
|
2053
|
-
flex-direction: column;
|
|
2054
|
-
gap: var(--spacing-gap-4, 12px);
|
|
2343
|
+
.input-date-apply-button {
|
|
2055
2344
|
width: 100%;
|
|
2056
2345
|
}
|
|
2057
2346
|
|
|
2058
|
-
.input-
|
|
2059
|
-
|
|
2060
|
-
align-items: center;
|
|
2061
|
-
justify-content: space-between;
|
|
2062
|
-
gap: var(--spacing-gap-3, 8px);
|
|
2347
|
+
.input-address-container {
|
|
2348
|
+
width: 100%;
|
|
2063
2349
|
}
|
|
2064
2350
|
|
|
2065
|
-
.input-
|
|
2351
|
+
.input-address-row {
|
|
2066
2352
|
width: 100%;
|
|
2353
|
+
display: flex;
|
|
2354
|
+
gap: var(--spacing-gap-5);
|
|
2067
2355
|
}
|
|
2068
2356
|
|
|
2069
|
-
.input-
|
|
2070
|
-
|
|
2357
|
+
.input-address-lower {
|
|
2358
|
+
margin-top: var(--spacing-gap-5);
|
|
2071
2359
|
}
|
|
2072
2360
|
|
|
2073
|
-
.input-
|
|
2074
|
-
|
|
2075
|
-
justify-content: flex-end;
|
|
2361
|
+
.input-address-upper {
|
|
2362
|
+
align-items: center;
|
|
2076
2363
|
}
|
|
2077
2364
|
|
|
2078
|
-
.input-
|
|
2365
|
+
.input-address-field {
|
|
2079
2366
|
width: 100%;
|
|
2080
2367
|
}
|
|
2081
2368
|
|
|
@@ -2084,13 +2371,36 @@ figure.chip {
|
|
|
2084
2371
|
|
|
2085
2372
|
.select {
|
|
2086
2373
|
display: flex;
|
|
2087
|
-
width:
|
|
2374
|
+
width: var(--select-width);
|
|
2375
|
+
flex: var(--select-flex);
|
|
2088
2376
|
flex-direction: column;
|
|
2089
2377
|
gap: var(--spacing-gap-2);
|
|
2378
|
+
min-width: 0;
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
.select[data-width=auto] {
|
|
2382
|
+
--select-width: auto;
|
|
2383
|
+
--select-flex: 0 1 auto;
|
|
2090
2384
|
}
|
|
2091
2385
|
|
|
2386
|
+
.select[data-width=fill] {
|
|
2387
|
+
--select-width: auto;
|
|
2388
|
+
--select-flex: 1 1 0%;
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2391
|
+
.select[data-width=full],
|
|
2092
2392
|
.select-block {
|
|
2093
|
-
width: 100%;
|
|
2393
|
+
--select-width: 100%;
|
|
2394
|
+
--select-flex: 0 0 100%;
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2397
|
+
.select[data-width=fit] {
|
|
2398
|
+
--select-width: fit-content;
|
|
2399
|
+
--select-flex: 0 0 auto;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
.select[data-width=custom] {
|
|
2403
|
+
--select-flex: 0 0 auto;
|
|
2094
2404
|
}
|
|
2095
2405
|
|
|
2096
2406
|
.select-button {
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniai-fe/uds-primitives",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "UNIAI Design System; Primitives Components Package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
7
7
|
"sideEffects": [
|
|
8
8
|
"./src/**/*.scss",
|
|
9
|
-
"./
|
|
10
|
-
"./
|
|
9
|
+
"./styles.scss",
|
|
10
|
+
"./src/**/*.css",
|
|
11
|
+
"./src/init/*.ts"
|
|
11
12
|
],
|
|
12
13
|
"license": "MIT",
|
|
13
14
|
"homepage": "https://www.uniai.co.kr/",
|
|
@@ -36,6 +37,8 @@
|
|
|
36
37
|
"./styles": "./styles.scss",
|
|
37
38
|
"./css": "./dist/styles.css",
|
|
38
39
|
"./init/dayjs": "./src/init/dayjs",
|
|
40
|
+
"./init/mantine": "./src/init/mantine",
|
|
41
|
+
"./mantine-style": "./src/init/mantine.css",
|
|
39
42
|
"./*": "./src/*"
|
|
40
43
|
},
|
|
41
44
|
"scripts": {
|
|
@@ -53,25 +56,31 @@
|
|
|
53
56
|
"design-primitives:dev": "pnpm run dev"
|
|
54
57
|
},
|
|
55
58
|
"peerDependencies": {
|
|
56
|
-
"@
|
|
59
|
+
"@mantine/core": "^8",
|
|
60
|
+
"@mantine/dates": "^8",
|
|
61
|
+
"@mantine/hooks": "^8",
|
|
57
62
|
"@uniai-fe/uds-foundation": "^0.1.0",
|
|
58
63
|
"@uniai-fe/util-functions": "^0.2.3",
|
|
59
64
|
"react": "^19",
|
|
65
|
+
"react-daum-postcode": "^3",
|
|
60
66
|
"react-dom": "^19",
|
|
61
67
|
"react-hook-form": "^7"
|
|
62
68
|
},
|
|
63
69
|
"dependencies": {
|
|
64
|
-
"@mantine/dates": "^8.3.14",
|
|
65
|
-
"@mantine/hooks": "^8.3.14",
|
|
66
70
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
67
71
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
72
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
68
73
|
"@radix-ui/react-radio-group": "^1.3.8",
|
|
69
74
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
75
|
+
"@radix-ui/react-visually-hidden": "^1.2.4",
|
|
70
76
|
"clsx": "^2.1.1",
|
|
71
|
-
"dayjs": "^1.11.19"
|
|
77
|
+
"dayjs": "^1.11.19",
|
|
78
|
+
"react-daum-postcode": "^3.2.0"
|
|
72
79
|
},
|
|
73
80
|
"devDependencies": {
|
|
74
|
-
"@
|
|
81
|
+
"@mantine/core": "^8.3.14",
|
|
82
|
+
"@mantine/dates": "^8.3.14",
|
|
83
|
+
"@mantine/hooks": "^8.3.14",
|
|
75
84
|
"@svgr/webpack": "^8.1.0",
|
|
76
85
|
"@types/node": "^24.10.2",
|
|
77
86
|
"@types/react": "^19.2.11",
|
|
@@ -4,6 +4,10 @@ import clsx from "clsx";
|
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import type { ButtonProps } from "../types";
|
|
6
6
|
import { SlotComponent } from "../../slot";
|
|
7
|
+
import {
|
|
8
|
+
getFormFieldWidthAttr,
|
|
9
|
+
getFormFieldWidthValue,
|
|
10
|
+
} from "../../form/utils/form-field";
|
|
7
11
|
|
|
8
12
|
/**
|
|
9
13
|
* uds-foundation 토큰 위에서 block/layout/priority/slot API를 제공하는 기본 Button 컴포넌트.
|
|
@@ -41,6 +45,7 @@ const ButtonDefault = forwardRef<HTMLElement, ButtonProps>(
|
|
|
41
45
|
priority,
|
|
42
46
|
state: stateProp = "default",
|
|
43
47
|
block = false,
|
|
48
|
+
width,
|
|
44
49
|
loading = false,
|
|
45
50
|
className,
|
|
46
51
|
type: typeProp,
|
|
@@ -65,6 +70,20 @@ const ButtonDefault = forwardRef<HTMLElement, ButtonProps>(
|
|
|
65
70
|
"aria-disabled": isDisabled || undefined,
|
|
66
71
|
};
|
|
67
72
|
|
|
73
|
+
const widthAttr =
|
|
74
|
+
width !== undefined
|
|
75
|
+
? getFormFieldWidthAttr(width)
|
|
76
|
+
: block
|
|
77
|
+
? "full"
|
|
78
|
+
: undefined;
|
|
79
|
+
const widthValue =
|
|
80
|
+
width !== undefined ? getFormFieldWidthValue(width) : undefined;
|
|
81
|
+
const { style, ...elementRestProps } = restProps;
|
|
82
|
+
const mergedStyle =
|
|
83
|
+
widthValue !== undefined
|
|
84
|
+
? { ...(style ?? {}), ["--button-width" as const]: widthValue }
|
|
85
|
+
: style;
|
|
86
|
+
|
|
68
87
|
return (
|
|
69
88
|
<SlotComponent
|
|
70
89
|
className={clsx(
|
|
@@ -83,8 +102,10 @@ const ButtonDefault = forwardRef<HTMLElement, ButtonProps>(
|
|
|
83
102
|
ref={forwardedRef}
|
|
84
103
|
aria-busy={loading || undefined}
|
|
85
104
|
data-user-action={userAction}
|
|
105
|
+
data-width={widthAttr}
|
|
106
|
+
style={mergedStyle}
|
|
86
107
|
{...elementSpecificProps}
|
|
87
|
-
{...
|
|
108
|
+
{...elementRestProps}
|
|
88
109
|
>
|
|
89
110
|
{left && (
|
|
90
111
|
<span className="button-left" data-slot="left">
|