@nexus-cross/design-system 1.0.9 → 1.0.11
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/cursor-rules/nexus-ui-api.mdc +27 -5
- package/dist/chunks/chunk-2XV3XP3Y.js +279 -0
- package/dist/chunks/{chunk-22O6YUYH.mjs → chunk-6J7TZ4GP.mjs} +1 -1
- package/dist/chunks/{chunk-OE5BAEBE.js → chunk-7B2CTQKB.js} +1 -1
- package/dist/chunks/chunk-FBC53TOS.mjs +99 -0
- package/dist/chunks/{chunk-2N2EPBO4.js → chunk-LTS674LF.js} +45 -43
- package/dist/chunks/{chunk-7G65JBTN.js → chunk-OX5MEJ7B.js} +2 -0
- package/dist/chunks/{chunk-DO6VK2QQ.mjs → chunk-QOREDNWO.mjs} +2 -0
- package/dist/chunks/chunk-XKJO5Y4J.mjs +256 -0
- package/dist/components/DatePicker.d.ts.map +1 -1
- package/dist/components/ImageUpload.d.ts +23 -0
- package/dist/components/ImageUpload.d.ts.map +1 -0
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-picker.mjs +1 -1
- package/dist/image-upload.js +16 -0
- package/dist/image-upload.mjs +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -20
- package/dist/index.mjs +4 -3
- package/dist/schemas/_all.json +83 -0
- package/dist/schemas/image-upload.d.ts +45 -0
- package/dist/schemas/image-upload.d.ts.map +1 -0
- package/dist/schemas/imageUpload.json +83 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas.js +18 -0
- package/dist/schemas.mjs +18 -1
- package/dist/select.js +5 -5
- package/dist/select.mjs +1 -1
- package/dist/styles/.generated/built.d.ts +1 -1
- package/dist/styles/.generated/built.d.ts.map +1 -1
- package/dist/styles/layer.js +2 -2
- package/dist/styles/layer.mjs +1 -1
- package/dist/styles.css +382 -44
- package/dist/styles.js +2 -2
- package/dist/styles.layered.css +382 -44
- package/dist/styles.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunks/chunk-FUIBYZZ4.mjs +0 -98
package/dist/styles.layered.css
CHANGED
|
@@ -1994,7 +1994,14 @@
|
|
|
1994
1994
|
transition-duration: 200ms;
|
|
1995
1995
|
}
|
|
1996
1996
|
.nexus-select-trigger:hover {
|
|
1997
|
-
border-color: var(--color-border-
|
|
1997
|
+
border-color: var(--color-border-default-hover);
|
|
1998
|
+
box-shadow: 0 0 0 0.5px var(--color-border-default-hover);
|
|
1999
|
+
}
|
|
2000
|
+
.nexus-select-trigger--open,
|
|
2001
|
+
.nexus-select-trigger:focus-within {
|
|
2002
|
+
outline: none;
|
|
2003
|
+
border-color: var(--color-accent-primary);
|
|
2004
|
+
box-shadow: 0 0 0 0.5px var(--color-accent-primary);
|
|
1998
2005
|
}
|
|
1999
2006
|
.nexus-select-trigger:has(:disabled) {
|
|
2000
2007
|
cursor: not-allowed;
|
|
@@ -3902,9 +3909,10 @@
|
|
|
3902
3909
|
═══════════════════════════════════════════ */
|
|
3903
3910
|
|
|
3904
3911
|
.nexus-datepicker {
|
|
3905
|
-
position: relative;
|
|
3906
3912
|
display: inline-block;
|
|
3907
3913
|
}
|
|
3914
|
+
|
|
3915
|
+
/* — Trigger — */
|
|
3908
3916
|
.nexus-datepicker__trigger {
|
|
3909
3917
|
display: inline-flex;
|
|
3910
3918
|
align-items: center;
|
|
@@ -3918,11 +3926,20 @@
|
|
|
3918
3926
|
font-size: var(--text-text-sm, 0.875rem);
|
|
3919
3927
|
color: var(--color-text-primary);
|
|
3920
3928
|
cursor: pointer;
|
|
3921
|
-
transition:
|
|
3929
|
+
transition:
|
|
3930
|
+
border-color 150ms,
|
|
3931
|
+
box-shadow 150ms;
|
|
3922
3932
|
min-width: 10rem;
|
|
3923
3933
|
}
|
|
3924
3934
|
.nexus-datepicker__trigger:hover {
|
|
3925
3935
|
border-color: var(--color-border-default-hover);
|
|
3936
|
+
box-shadow: 0 0 0 0.5px var(--color-border-default-hover);
|
|
3937
|
+
}
|
|
3938
|
+
.nexus-datepicker__trigger:focus-visible,
|
|
3939
|
+
.nexus-datepicker__trigger[data-state='open'] {
|
|
3940
|
+
outline: none;
|
|
3941
|
+
border-color: var(--color-accent-primary);
|
|
3942
|
+
box-shadow: 0 0 0 0.5px var(--color-accent-primary);
|
|
3926
3943
|
}
|
|
3927
3944
|
.nexus-datepicker__trigger:disabled {
|
|
3928
3945
|
opacity: var(--opacity-disabled-element, 0.4);
|
|
@@ -3931,126 +3948,229 @@
|
|
|
3931
3948
|
.nexus-datepicker__trigger--placeholder span {
|
|
3932
3949
|
color: var(--color-text-muted);
|
|
3933
3950
|
}
|
|
3951
|
+
.nexus-datepicker__trigger--has-value {
|
|
3952
|
+
border-color: var(--color-border-default-hover);
|
|
3953
|
+
}
|
|
3934
3954
|
.nexus-datepicker__icon {
|
|
3935
3955
|
width: var(--size-icon-sm, 1rem);
|
|
3936
3956
|
height: var(--size-icon-sm, 1rem);
|
|
3937
3957
|
flex-shrink: 0;
|
|
3938
3958
|
color: var(--color-icon-secondary);
|
|
3959
|
+
transition: color 150ms;
|
|
3939
3960
|
}
|
|
3961
|
+
|
|
3962
|
+
/* — Popover (Radix Portal 기반 — position은 Radix가 인라인으로 처리) — */
|
|
3940
3963
|
.nexus-datepicker__popover {
|
|
3941
|
-
position: absolute;
|
|
3942
|
-
top: calc(100% + 4px);
|
|
3943
|
-
left: 0;
|
|
3944
3964
|
z-index: var(--z-index-layer-popover, 30);
|
|
3945
3965
|
background: var(--color-surface-default);
|
|
3946
3966
|
border: var(--border-width-stroke-default, 1px) solid
|
|
3947
3967
|
var(--color-border-default);
|
|
3948
3968
|
border-radius: var(--radius-corner-lg, 0.75rem);
|
|
3949
|
-
box-shadow: var(--shadow-
|
|
3950
|
-
padding: var(--spacing-padding-sm, 0.75rem)
|
|
3951
|
-
|
|
3969
|
+
box-shadow: var(--shadow-xl, 0 4px 15px -3px rgb(0 0 0 / 0.12));
|
|
3970
|
+
padding: var(--spacing-padding-sm, 0.75rem) var(--spacing-padding-md, 1rem)
|
|
3971
|
+
var(--spacing-padding-md, 1rem);
|
|
3972
|
+
animation: nexus-datepicker-enter-bottom 200ms cubic-bezier(0, 0, 0.2, 1);
|
|
3952
3973
|
}
|
|
3953
3974
|
|
|
3975
|
+
/* — Calendar — */
|
|
3954
3976
|
.nexus-calendar {
|
|
3977
|
+
position: relative;
|
|
3955
3978
|
font-size: var(--text-text-sm, 0.875rem);
|
|
3956
3979
|
}
|
|
3957
3980
|
.nexus-calendar__months {
|
|
3958
3981
|
display: flex;
|
|
3959
3982
|
flex-direction: column;
|
|
3960
|
-
gap: var(--spacing-gap-sm, 0.5rem);
|
|
3961
3983
|
}
|
|
3984
|
+
|
|
3985
|
+
/* — Caption (Month/Year) — 왼쪽 정렬, nav과 같은 줄 */
|
|
3962
3986
|
.nexus-calendar__caption {
|
|
3963
3987
|
display: flex;
|
|
3964
|
-
justify-content: center;
|
|
3965
3988
|
align-items: center;
|
|
3966
|
-
|
|
3967
|
-
font-weight: var(--font-weight-
|
|
3989
|
+
height: 2.5rem;
|
|
3990
|
+
font-weight: var(--font-weight-heading-h6, 600);
|
|
3991
|
+
font-size: var(--text-text-base, 1rem);
|
|
3968
3992
|
color: var(--color-text-primary);
|
|
3993
|
+
letter-spacing: -0.01em;
|
|
3969
3994
|
}
|
|
3995
|
+
|
|
3996
|
+
/* — Nav Buttons — 오른쪽, 캡션과 수직 중앙 정렬 */
|
|
3970
3997
|
.nexus-calendar__nav {
|
|
3998
|
+
position: absolute;
|
|
3999
|
+
top: 0;
|
|
4000
|
+
right: 0;
|
|
4001
|
+
height: 2.5rem;
|
|
3971
4002
|
display: flex;
|
|
4003
|
+
align-items: center;
|
|
3972
4004
|
gap: var(--spacing-gap-xs, 0.25rem);
|
|
3973
4005
|
}
|
|
3974
4006
|
.nexus-calendar__nav-btn {
|
|
3975
4007
|
display: inline-flex;
|
|
3976
4008
|
align-items: center;
|
|
3977
4009
|
justify-content: center;
|
|
3978
|
-
width:
|
|
3979
|
-
height:
|
|
4010
|
+
width: 2rem;
|
|
4011
|
+
height: 2rem;
|
|
3980
4012
|
border: none;
|
|
3981
4013
|
background: transparent;
|
|
3982
|
-
border-radius: var(--radius-corner-
|
|
4014
|
+
border-radius: var(--radius-corner-full, 9999px);
|
|
3983
4015
|
cursor: pointer;
|
|
3984
|
-
color: var(--color-icon-
|
|
3985
|
-
transition:
|
|
4016
|
+
color: var(--color-icon-tertiary);
|
|
4017
|
+
transition:
|
|
4018
|
+
background 150ms,
|
|
4019
|
+
color 150ms;
|
|
4020
|
+
}
|
|
4021
|
+
.nexus-calendar__nav-btn svg {
|
|
4022
|
+
width: 1.125rem;
|
|
4023
|
+
height: 1.125rem;
|
|
4024
|
+
stroke-width: 2;
|
|
3986
4025
|
}
|
|
3987
4026
|
.nexus-calendar__nav-btn:hover {
|
|
3988
|
-
background: var(--color-
|
|
4027
|
+
background: color-mix(in srgb, var(--color-accent-primary) 12%, transparent);
|
|
4028
|
+
color: var(--color-accent-primary);
|
|
4029
|
+
}
|
|
4030
|
+
.nexus-calendar__nav-btn:active {
|
|
4031
|
+
background: color-mix(in srgb, var(--color-accent-primary) 20%, transparent);
|
|
3989
4032
|
}
|
|
4033
|
+
|
|
4034
|
+
/* — Grid — table 고유 레이아웃 사용 (빈 셀도 너비 유지) */
|
|
3990
4035
|
.nexus-calendar__grid {
|
|
3991
4036
|
width: 100%;
|
|
3992
|
-
border-collapse:
|
|
3993
|
-
|
|
3994
|
-
.nexus-calendar__head-row {
|
|
3995
|
-
display: flex;
|
|
4037
|
+
border-collapse: separate;
|
|
4038
|
+
border-spacing: 0 2px;
|
|
3996
4039
|
}
|
|
4040
|
+
|
|
4041
|
+
/* — Weekday Header — */
|
|
3997
4042
|
.nexus-calendar__head-cell {
|
|
3998
|
-
width:
|
|
4043
|
+
width: 2.5rem;
|
|
4044
|
+
height: 2.25rem;
|
|
3999
4045
|
text-align: center;
|
|
4046
|
+
vertical-align: middle;
|
|
4000
4047
|
font-size: var(--text-text-xs, 0.75rem);
|
|
4001
|
-
font-weight: var(--font-weight-
|
|
4002
|
-
color: var(--color-text-
|
|
4003
|
-
padding: var(--spacing-padding-2xs, 0.25rem) 0;
|
|
4004
|
-
}
|
|
4005
|
-
.nexus-calendar__row {
|
|
4006
|
-
display: flex;
|
|
4048
|
+
font-weight: var(--font-weight-label-md, 500);
|
|
4049
|
+
color: var(--color-text-secondary);
|
|
4007
4050
|
}
|
|
4051
|
+
|
|
4052
|
+
/* — Day Cell — */
|
|
4008
4053
|
.nexus-calendar__cell {
|
|
4009
4054
|
text-align: center;
|
|
4055
|
+
vertical-align: middle;
|
|
4056
|
+
padding: 0;
|
|
4010
4057
|
}
|
|
4058
|
+
|
|
4059
|
+
/* — Day Button — */
|
|
4011
4060
|
.nexus-calendar__day {
|
|
4012
4061
|
display: inline-flex;
|
|
4013
4062
|
align-items: center;
|
|
4014
4063
|
justify-content: center;
|
|
4015
|
-
width:
|
|
4016
|
-
height:
|
|
4017
|
-
border:
|
|
4064
|
+
width: 2.5rem;
|
|
4065
|
+
height: 2.5rem;
|
|
4066
|
+
border: 2px solid transparent;
|
|
4018
4067
|
background: transparent;
|
|
4019
|
-
border-radius: var(--radius-corner-
|
|
4068
|
+
border-radius: var(--radius-corner-full, 9999px);
|
|
4020
4069
|
cursor: pointer;
|
|
4021
4070
|
font: inherit;
|
|
4022
4071
|
font-size: var(--text-text-sm, 0.875rem);
|
|
4023
4072
|
color: var(--color-text-primary);
|
|
4073
|
+
position: relative;
|
|
4024
4074
|
transition:
|
|
4025
4075
|
background 150ms,
|
|
4026
|
-
color 150ms
|
|
4076
|
+
color 150ms,
|
|
4077
|
+
border-color 150ms,
|
|
4078
|
+
box-shadow 150ms;
|
|
4027
4079
|
}
|
|
4028
4080
|
.nexus-calendar__day:hover {
|
|
4029
|
-
background: var(--color-
|
|
4081
|
+
background: color-mix(in srgb, var(--color-accent-primary) 10%, transparent);
|
|
4082
|
+
}
|
|
4083
|
+
.nexus-calendar__day:active {
|
|
4084
|
+
background: color-mix(in srgb, var(--color-accent-primary) 18%, transparent);
|
|
4030
4085
|
}
|
|
4031
|
-
|
|
4086
|
+
|
|
4087
|
+
/* Selected — 진한 accent 채움 (selected 클래스는 <td>에 붙으므로 내부 button 대상) */
|
|
4088
|
+
.nexus-calendar__day--selected .nexus-calendar__day {
|
|
4032
4089
|
background: var(--color-accent-primary);
|
|
4033
4090
|
color: var(--color-accent-on-primary);
|
|
4091
|
+
font-weight: var(--font-weight-text-semibold-sm, 600);
|
|
4092
|
+
border-color: transparent;
|
|
4034
4093
|
}
|
|
4035
|
-
.nexus-calendar__day--selected:hover {
|
|
4094
|
+
.nexus-calendar__day--selected .nexus-calendar__day:hover {
|
|
4036
4095
|
background: var(--color-accent-primary-hover);
|
|
4037
4096
|
}
|
|
4038
|
-
|
|
4097
|
+
|
|
4098
|
+
/* Today — 연한 accent 배경 */
|
|
4099
|
+
.nexus-calendar__day--today .nexus-calendar__day {
|
|
4100
|
+
background: color-mix(in srgb, var(--color-accent-primary) 14%, transparent);
|
|
4101
|
+
color: var(--color-accent-primary);
|
|
4039
4102
|
font-weight: var(--font-weight-text-semibold-sm, 600);
|
|
4040
|
-
border: var(--border-width-stroke-default, 1px) solid
|
|
4041
|
-
var(--color-accent-primary);
|
|
4042
4103
|
}
|
|
4043
|
-
.nexus-calendar__day--
|
|
4104
|
+
.nexus-calendar__day--today .nexus-calendar__day:hover {
|
|
4105
|
+
background: color-mix(in srgb, var(--color-accent-primary) 22%, transparent);
|
|
4106
|
+
}
|
|
4107
|
+
.nexus-calendar__day--today.nexus-calendar__day--selected .nexus-calendar__day {
|
|
4108
|
+
background: var(--color-accent-primary);
|
|
4109
|
+
color: var(--color-accent-on-primary);
|
|
4110
|
+
border-color: transparent;
|
|
4111
|
+
}
|
|
4112
|
+
|
|
4113
|
+
/* Outside month */
|
|
4114
|
+
.nexus-calendar__day--outside .nexus-calendar__day {
|
|
4044
4115
|
color: var(--color-text-muted);
|
|
4045
|
-
opacity: 0.
|
|
4116
|
+
opacity: 0.35;
|
|
4117
|
+
}
|
|
4118
|
+
.nexus-calendar__day--outside .nexus-calendar__day:hover {
|
|
4119
|
+
opacity: 0.55;
|
|
4046
4120
|
}
|
|
4047
|
-
|
|
4121
|
+
|
|
4122
|
+
/* Disabled */
|
|
4123
|
+
.nexus-calendar__day--disabled .nexus-calendar__day {
|
|
4048
4124
|
color: var(--color-text-muted);
|
|
4049
4125
|
opacity: var(--opacity-disabled-element, 0.4);
|
|
4050
4126
|
cursor: not-allowed;
|
|
4051
4127
|
pointer-events: none;
|
|
4052
4128
|
}
|
|
4053
4129
|
|
|
4130
|
+
@keyframes nexus-datepicker-enter-bottom {
|
|
4131
|
+
from {
|
|
4132
|
+
opacity: 0;
|
|
4133
|
+
transform: translateY(-6px) scale(0.98);
|
|
4134
|
+
}
|
|
4135
|
+
to {
|
|
4136
|
+
opacity: 1;
|
|
4137
|
+
transform: translateY(0) scale(1);
|
|
4138
|
+
}
|
|
4139
|
+
}
|
|
4140
|
+
@keyframes nexus-datepicker-enter-top {
|
|
4141
|
+
from {
|
|
4142
|
+
opacity: 0;
|
|
4143
|
+
transform: translateY(6px) scale(0.98);
|
|
4144
|
+
}
|
|
4145
|
+
to {
|
|
4146
|
+
opacity: 1;
|
|
4147
|
+
transform: translateY(0) scale(1);
|
|
4148
|
+
}
|
|
4149
|
+
}
|
|
4150
|
+
.nexus-datepicker__popover[data-side='bottom'] {
|
|
4151
|
+
animation-name: nexus-datepicker-enter-bottom;
|
|
4152
|
+
}
|
|
4153
|
+
.nexus-datepicker__popover[data-side='top'] {
|
|
4154
|
+
animation-name: nexus-datepicker-enter-top;
|
|
4155
|
+
}
|
|
4156
|
+
@media (prefers-reduced-motion: reduce) {
|
|
4157
|
+
.nexus-datepicker__popover {
|
|
4158
|
+
animation: none;
|
|
4159
|
+
}
|
|
4160
|
+
.nexus-calendar__day {
|
|
4161
|
+
transition: none;
|
|
4162
|
+
}
|
|
4163
|
+
.nexus-datepicker__trigger {
|
|
4164
|
+
transition: none;
|
|
4165
|
+
}
|
|
4166
|
+
.nexus-calendar__nav-btn {
|
|
4167
|
+
transition: none;
|
|
4168
|
+
}
|
|
4169
|
+
.nexus-datepicker__icon {
|
|
4170
|
+
transition: none;
|
|
4171
|
+
}
|
|
4172
|
+
}
|
|
4173
|
+
|
|
4054
4174
|
@keyframes nexus-fade-in {
|
|
4055
4175
|
from {
|
|
4056
4176
|
opacity: 0;
|
|
@@ -4062,4 +4182,222 @@
|
|
|
4062
4182
|
}
|
|
4063
4183
|
}
|
|
4064
4184
|
|
|
4185
|
+
/* ─── ImageUpload ─── */
|
|
4186
|
+
.nexus-image-upload__container {
|
|
4187
|
+
width: 100%;
|
|
4188
|
+
background: var(--color-bg-subtle);
|
|
4189
|
+
border-radius: var(--radius-corner-md, 8px);
|
|
4190
|
+
overflow: hidden;
|
|
4191
|
+
}
|
|
4192
|
+
.nexus-image-upload {
|
|
4193
|
+
position: relative;
|
|
4194
|
+
display: flex;
|
|
4195
|
+
flex-direction: column;
|
|
4196
|
+
align-items: center;
|
|
4197
|
+
justify-content: center;
|
|
4198
|
+
gap: var(--spacing-gap-sm, 0.5rem);
|
|
4199
|
+
width: 100%;
|
|
4200
|
+
border: 1px dashed var(--color-border-medium);
|
|
4201
|
+
border-radius: var(--radius-corner-md, 8px);
|
|
4202
|
+
background: transparent;
|
|
4203
|
+
cursor: pointer;
|
|
4204
|
+
overflow: hidden;
|
|
4205
|
+
transition:
|
|
4206
|
+
border-color 150ms ease,
|
|
4207
|
+
background-color 150ms ease,
|
|
4208
|
+
box-shadow 150ms ease;
|
|
4209
|
+
outline: none;
|
|
4210
|
+
}
|
|
4211
|
+
.nexus-image-upload:hover {
|
|
4212
|
+
border-color: var(--color-border-default-hover);
|
|
4213
|
+
box-shadow: 0 0 0 0.5px var(--color-border-default-hover);
|
|
4214
|
+
}
|
|
4215
|
+
.nexus-image-upload:focus-visible {
|
|
4216
|
+
outline: none;
|
|
4217
|
+
border-color: var(--color-accent-primary);
|
|
4218
|
+
box-shadow: 0 0 0 0.5px var(--color-accent-primary);
|
|
4219
|
+
}
|
|
4220
|
+
.nexus-image-upload--dragging {
|
|
4221
|
+
border-color: var(--color-accent-primary);
|
|
4222
|
+
border-style: solid;
|
|
4223
|
+
background: color-mix(
|
|
4224
|
+
in srgb,
|
|
4225
|
+
var(--color-accent-primary) 6%,
|
|
4226
|
+
var(--color-surface-default)
|
|
4227
|
+
);
|
|
4228
|
+
}
|
|
4229
|
+
.nexus-image-upload--disabled {
|
|
4230
|
+
opacity: var(--opacity-disabled-element, 0.4);
|
|
4231
|
+
cursor: not-allowed;
|
|
4232
|
+
pointer-events: none;
|
|
4233
|
+
}
|
|
4234
|
+
|
|
4235
|
+
.nexus-image-upload--sm {
|
|
4236
|
+
padding: var(--spacing-padding-xs, 0.5rem) var(--spacing-padding-sm, 0.75rem);
|
|
4237
|
+
min-height: 80px;
|
|
4238
|
+
}
|
|
4239
|
+
.nexus-image-upload--md {
|
|
4240
|
+
padding: var(--spacing-padding-md, 1rem) var(--spacing-padding-sm, 0.75rem);
|
|
4241
|
+
min-height: 120px;
|
|
4242
|
+
}
|
|
4243
|
+
.nexus-image-upload--lg {
|
|
4244
|
+
padding: var(--spacing-padding-xl, 2rem) var(--spacing-padding-md, 1rem);
|
|
4245
|
+
min-height: 180px;
|
|
4246
|
+
}
|
|
4247
|
+
|
|
4248
|
+
.nexus-image-upload__icon {
|
|
4249
|
+
width: var(--size-icon-xl, 32px);
|
|
4250
|
+
height: var(--size-icon-xl, 32px);
|
|
4251
|
+
color: var(--color-icon-muted);
|
|
4252
|
+
flex-shrink: 0;
|
|
4253
|
+
}
|
|
4254
|
+
.nexus-image-upload--sm .nexus-image-upload__icon {
|
|
4255
|
+
width: var(--size-icon-lg, 24px);
|
|
4256
|
+
height: var(--size-icon-lg, 24px);
|
|
4257
|
+
}
|
|
4258
|
+
|
|
4259
|
+
.nexus-image-upload__text-group {
|
|
4260
|
+
display: flex;
|
|
4261
|
+
flex-direction: column;
|
|
4262
|
+
align-items: center;
|
|
4263
|
+
gap: var(--spacing-gap-xs, 0.25rem);
|
|
4264
|
+
}
|
|
4265
|
+
.nexus-image-upload__text {
|
|
4266
|
+
font-size: var(--text-text-medium-xs);
|
|
4267
|
+
font-weight: var(--font-weight-text-medium-xs, 500);
|
|
4268
|
+
line-height: 1.5;
|
|
4269
|
+
letter-spacing: var(--letter-spacing-text-medium-xs, -0.01em);
|
|
4270
|
+
color: var(--color-text-tertiary);
|
|
4271
|
+
white-space: nowrap;
|
|
4272
|
+
}
|
|
4273
|
+
.nexus-image-upload__format {
|
|
4274
|
+
font-size: var(--text-text-xs);
|
|
4275
|
+
font-weight: var(--font-weight-text-xs, 400);
|
|
4276
|
+
line-height: 1.5;
|
|
4277
|
+
letter-spacing: var(--letter-spacing-text-xs, -0.01em);
|
|
4278
|
+
color: var(--color-text-tertiary);
|
|
4279
|
+
white-space: nowrap;
|
|
4280
|
+
}
|
|
4281
|
+
.nexus-image-upload__input {
|
|
4282
|
+
position: absolute;
|
|
4283
|
+
width: 1px;
|
|
4284
|
+
height: 1px;
|
|
4285
|
+
padding: 0;
|
|
4286
|
+
margin: -1px;
|
|
4287
|
+
overflow: hidden;
|
|
4288
|
+
clip: rect(0, 0, 0, 0);
|
|
4289
|
+
white-space: nowrap;
|
|
4290
|
+
border-width: 0;
|
|
4291
|
+
}
|
|
4292
|
+
|
|
4293
|
+
/* ─── ImageUpload: Preview State ─── */
|
|
4294
|
+
.nexus-image-upload--has-preview {
|
|
4295
|
+
display: flex;
|
|
4296
|
+
flex-direction: row;
|
|
4297
|
+
align-items: flex-start;
|
|
4298
|
+
gap: var(--spacing-gap-md, 1rem);
|
|
4299
|
+
padding: 6px 6px 0 0;
|
|
4300
|
+
overflow: visible;
|
|
4301
|
+
}
|
|
4302
|
+
.nexus-image-upload__preview-wrapper {
|
|
4303
|
+
position: relative;
|
|
4304
|
+
flex-shrink: 0;
|
|
4305
|
+
width: 116px;
|
|
4306
|
+
height: 116px;
|
|
4307
|
+
border-radius: var(--radius-corner-md, 8px);
|
|
4308
|
+
border: 1px solid var(--color-border-default);
|
|
4309
|
+
overflow: visible;
|
|
4310
|
+
}
|
|
4311
|
+
.nexus-image-upload--sm .nexus-image-upload__preview-wrapper {
|
|
4312
|
+
width: 80px;
|
|
4313
|
+
height: 80px;
|
|
4314
|
+
}
|
|
4315
|
+
.nexus-image-upload--lg .nexus-image-upload__preview-wrapper {
|
|
4316
|
+
width: 160px;
|
|
4317
|
+
height: 160px;
|
|
4318
|
+
}
|
|
4319
|
+
.nexus-image-upload__preview {
|
|
4320
|
+
width: 100%;
|
|
4321
|
+
height: 100%;
|
|
4322
|
+
object-fit: cover;
|
|
4323
|
+
pointer-events: none;
|
|
4324
|
+
border-radius: var(--radius-corner-md, 8px);
|
|
4325
|
+
}
|
|
4326
|
+
.nexus-image-upload__remove {
|
|
4327
|
+
position: absolute;
|
|
4328
|
+
top: -6px;
|
|
4329
|
+
right: -6px;
|
|
4330
|
+
display: flex;
|
|
4331
|
+
align-items: center;
|
|
4332
|
+
justify-content: center;
|
|
4333
|
+
width: 20px;
|
|
4334
|
+
height: 20px;
|
|
4335
|
+
border: none;
|
|
4336
|
+
border-radius: var(--radius-corner-full, 9999px);
|
|
4337
|
+
background: var(--color-surface-inverted);
|
|
4338
|
+
color: var(--color-icon-inverted);
|
|
4339
|
+
cursor: pointer;
|
|
4340
|
+
transition: opacity 150ms ease;
|
|
4341
|
+
z-index: 1;
|
|
4342
|
+
}
|
|
4343
|
+
.nexus-image-upload__remove:hover {
|
|
4344
|
+
opacity: 0.8;
|
|
4345
|
+
}
|
|
4346
|
+
.nexus-image-upload__remove-icon {
|
|
4347
|
+
width: 16px;
|
|
4348
|
+
height: 16px;
|
|
4349
|
+
}
|
|
4350
|
+
|
|
4351
|
+
.nexus-image-upload__info {
|
|
4352
|
+
display: flex;
|
|
4353
|
+
flex-direction: column;
|
|
4354
|
+
align-items: flex-start;
|
|
4355
|
+
gap: var(--spacing-gap-sm, 0.5rem);
|
|
4356
|
+
padding-top: 2px;
|
|
4357
|
+
}
|
|
4358
|
+
.nexus-image-upload__change-btn {
|
|
4359
|
+
display: inline-flex;
|
|
4360
|
+
align-items: center;
|
|
4361
|
+
justify-content: center;
|
|
4362
|
+
height: var(--size-control-xs, 24px);
|
|
4363
|
+
padding: var(--spacing-padding-2xs, 0.25rem) var(--spacing-padding-xs, 0.5rem);
|
|
4364
|
+
border: 1px solid var(--color-border-default);
|
|
4365
|
+
border-radius: var(--radius-corner-sm, 4px);
|
|
4366
|
+
background: var(--color-surface-default);
|
|
4367
|
+
font-size: var(--text-label-sm);
|
|
4368
|
+
font-weight: var(--font-weight-label-sm, 500);
|
|
4369
|
+
color: var(--color-text-primary);
|
|
4370
|
+
cursor: pointer;
|
|
4371
|
+
white-space: nowrap;
|
|
4372
|
+
transition:
|
|
4373
|
+
border-color 150ms ease,
|
|
4374
|
+
background-color 150ms ease;
|
|
4375
|
+
}
|
|
4376
|
+
.nexus-image-upload__change-btn:hover {
|
|
4377
|
+
border-color: var(--color-border-default-hover);
|
|
4378
|
+
background: var(--color-surface-default-hover);
|
|
4379
|
+
}
|
|
4380
|
+
|
|
4381
|
+
/* ─── ImageUpload: Field wrapper (label + description) ─── */
|
|
4382
|
+
.nexus-image-upload-field {
|
|
4383
|
+
display: flex;
|
|
4384
|
+
flex-direction: column;
|
|
4385
|
+
gap: var(--spacing-gap-xs, 0.25rem);
|
|
4386
|
+
}
|
|
4387
|
+
.nexus-image-upload-field__label {
|
|
4388
|
+
font-size: var(--text-label-semibold-md);
|
|
4389
|
+
font-weight: var(--font-weight-label-semibold-md, 600);
|
|
4390
|
+
line-height: 1;
|
|
4391
|
+
letter-spacing: var(--letter-spacing-label-semibold-md, 0);
|
|
4392
|
+
color: var(--color-text-tertiary);
|
|
4393
|
+
}
|
|
4394
|
+
.nexus-image-upload-field__description {
|
|
4395
|
+
font-size: var(--text-text-xs);
|
|
4396
|
+
font-weight: var(--font-weight-text-xs, 400);
|
|
4397
|
+
line-height: 1.5;
|
|
4398
|
+
letter-spacing: var(--letter-spacing-text-xs, -0.01em);
|
|
4399
|
+
color: var(--color-text-tertiary);
|
|
4400
|
+
margin: 0;
|
|
4401
|
+
}
|
|
4402
|
+
|
|
4065
4403
|
}
|
package/dist/styles.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexus-cross/design-system",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "NEXUS Design System UI Components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
"typescript": "^5.0.0",
|
|
349
349
|
"vitest": "^1.6.1",
|
|
350
350
|
"zod-to-json-schema": "^3.25.2",
|
|
351
|
-
"@nexus-cross/tokens": "1.0.
|
|
351
|
+
"@nexus-cross/tokens": "1.0.11"
|
|
352
352
|
},
|
|
353
353
|
"scripts": {
|
|
354
354
|
"postinstall": "node scripts/setup-cursor-rules.cjs",
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-MCKOWMLS.mjs';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { DayPicker } from 'react-day-picker';
|
|
4
|
-
import { format } from 'date-fns';
|
|
5
|
-
import { ko } from 'date-fns/locale';
|
|
6
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var CalendarIcon = ({ className }) => /* @__PURE__ */ jsxs("svg", { className, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
|
|
9
|
-
/* @__PURE__ */ jsx("rect", { x: "3", y: "4", width: "14", height: "14", rx: "2" }),
|
|
10
|
-
/* @__PURE__ */ jsx("path", { d: "M3 8h14M7 2v4M13 2v4", strokeLinecap: "round" })
|
|
11
|
-
] });
|
|
12
|
-
var DatePicker = ({
|
|
13
|
-
value,
|
|
14
|
-
defaultValue,
|
|
15
|
-
onChange,
|
|
16
|
-
placeholder = "\uB0A0\uC9DC \uC120\uD0DD",
|
|
17
|
-
disabled = false,
|
|
18
|
-
minDate,
|
|
19
|
-
maxDate,
|
|
20
|
-
locale: localeProp = "ko",
|
|
21
|
-
formatStr = "yyyy-MM-dd",
|
|
22
|
-
className
|
|
23
|
-
}) => {
|
|
24
|
-
const [internalDate, setInternalDate] = React.useState(defaultValue);
|
|
25
|
-
const [open, setOpen] = React.useState(false);
|
|
26
|
-
const wrapperRef = React.useRef(null);
|
|
27
|
-
const selected = value ?? internalDate;
|
|
28
|
-
const handleSelect = React.useCallback(
|
|
29
|
-
(date) => {
|
|
30
|
-
if (!value) setInternalDate(date);
|
|
31
|
-
onChange?.(date);
|
|
32
|
-
setOpen(false);
|
|
33
|
-
},
|
|
34
|
-
[value, onChange]
|
|
35
|
-
);
|
|
36
|
-
React.useEffect(() => {
|
|
37
|
-
const handleClickOutside = (e) => {
|
|
38
|
-
if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
|
|
39
|
-
setOpen(false);
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
if (open) document.addEventListener("mousedown", handleClickOutside);
|
|
43
|
-
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
44
|
-
}, [open]);
|
|
45
|
-
const displayText = selected ? format(selected, formatStr, { locale: localeProp === "ko" ? ko : void 0 }) : placeholder;
|
|
46
|
-
return /* @__PURE__ */ jsxs("div", { ref: wrapperRef, className: cn("nexus-datepicker", className), children: [
|
|
47
|
-
/* @__PURE__ */ jsxs(
|
|
48
|
-
"button",
|
|
49
|
-
{
|
|
50
|
-
type: "button",
|
|
51
|
-
className: cn(
|
|
52
|
-
"nexus-datepicker__trigger",
|
|
53
|
-
!selected && "nexus-datepicker__trigger--placeholder"
|
|
54
|
-
),
|
|
55
|
-
onClick: () => !disabled && setOpen(!open),
|
|
56
|
-
disabled,
|
|
57
|
-
children: [
|
|
58
|
-
/* @__PURE__ */ jsx(CalendarIcon, { className: "nexus-datepicker__icon" }),
|
|
59
|
-
/* @__PURE__ */ jsx("span", { children: displayText })
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
open && /* @__PURE__ */ jsx("div", { className: "nexus-datepicker__popover", children: /* @__PURE__ */ jsx(
|
|
64
|
-
DayPicker,
|
|
65
|
-
{
|
|
66
|
-
mode: "single",
|
|
67
|
-
selected,
|
|
68
|
-
onSelect: handleSelect,
|
|
69
|
-
locale: localeProp === "ko" ? ko : void 0,
|
|
70
|
-
disabled: [
|
|
71
|
-
...minDate ? [{ before: minDate }] : [],
|
|
72
|
-
...maxDate ? [{ after: maxDate }] : []
|
|
73
|
-
],
|
|
74
|
-
classNames: {
|
|
75
|
-
root: "nexus-calendar",
|
|
76
|
-
months: "nexus-calendar__months",
|
|
77
|
-
month_caption: "nexus-calendar__caption",
|
|
78
|
-
nav: "nexus-calendar__nav",
|
|
79
|
-
button_previous: "nexus-calendar__nav-btn",
|
|
80
|
-
button_next: "nexus-calendar__nav-btn",
|
|
81
|
-
month_grid: "nexus-calendar__grid",
|
|
82
|
-
weekdays: "nexus-calendar__head-row",
|
|
83
|
-
weekday: "nexus-calendar__head-cell",
|
|
84
|
-
week: "nexus-calendar__row",
|
|
85
|
-
day: "nexus-calendar__cell",
|
|
86
|
-
day_button: "nexus-calendar__day",
|
|
87
|
-
selected: "nexus-calendar__day--selected",
|
|
88
|
-
today: "nexus-calendar__day--today",
|
|
89
|
-
outside: "nexus-calendar__day--outside",
|
|
90
|
-
disabled: "nexus-calendar__day--disabled"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
) })
|
|
94
|
-
] });
|
|
95
|
-
};
|
|
96
|
-
DatePicker.displayName = "DatePicker";
|
|
97
|
-
|
|
98
|
-
export { DatePicker };
|