@uniai-fe/uds-primitives 0.2.8 → 0.2.10
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 +419 -0
- package/package.json +2 -1
- package/src/components/calendar/types/calendar.ts +5 -0
- package/src/components/dropdown/markup/Template.tsx +41 -17
- package/src/components/dropdown/markup/foundation/Container.tsx +14 -2
- package/src/components/dropdown/markup/foundation/MenuItem.tsx +20 -6
- package/src/components/dropdown/markup/foundation/Root.tsx +8 -1
- package/src/components/dropdown/markup/foundation/Trigger.tsx +7 -1
- package/src/components/dropdown/styles/dropdown.scss +4 -0
- package/src/components/dropdown/types/props.ts +5 -0
- package/src/components/input/markup/date/Template.tsx +36 -5
- package/src/components/input/markup/date/Trigger.tsx +22 -4
- package/src/components/input/markup/foundation/Input.tsx +19 -11
- package/src/components/input/markup/foundation/Utility.tsx +11 -7
- package/src/components/input/styles/date.scss +21 -0
- package/src/components/input/styles/foundation.scss +30 -0
- package/src/components/input/styles/variables.scss +11 -0
- package/src/components/input/types/date.ts +15 -0
- package/src/components/input/types/foundation.ts +18 -11
- package/src/components/input/utils/date.ts +15 -1
- package/src/components/select/hooks/index.ts +1 -45
- package/src/components/select/hooks/interaction.ts +62 -0
- package/src/components/select/markup/Default.tsx +59 -35
- package/src/components/select/markup/foundation/Base.tsx +12 -4
- package/src/components/select/markup/foundation/Container.tsx +37 -34
- package/src/components/select/markup/foundation/Icon.tsx +6 -1
- package/src/components/select/markup/multiple/Multiple.tsx +62 -35
- package/src/components/select/markup/multiple/SelectedChip.tsx +5 -2
- package/src/components/select/styles/select.scss +50 -0
- package/src/components/select/styles/variables.scss +26 -0
- package/src/components/select/types/base.ts +3 -2
- package/src/components/select/types/icon.ts +7 -6
- package/src/components/select/types/index.ts +1 -0
- package/src/components/select/types/interaction.ts +30 -0
- package/src/components/select/types/props.ts +8 -0
- package/src/components/select/types/trigger.ts +4 -0
- package/src/components/table/hooks/index.ts +0 -3
- package/src/components/table/index.tsx +5 -3
- package/src/components/table/markup/Container.tsx +126 -0
- package/src/components/table/markup/foundation/Body.tsx +24 -0
- package/src/components/table/markup/foundation/Cell.tsx +72 -0
- package/src/components/table/markup/foundation/Col.tsx +22 -0
- package/src/components/table/markup/foundation/Colgroup.tsx +29 -0
- package/src/components/table/markup/foundation/Foot.tsx +24 -0
- package/src/components/table/markup/foundation/Head.tsx +24 -0
- package/src/components/table/markup/foundation/Root.tsx +32 -0
- package/src/components/table/markup/foundation/Row.tsx +32 -0
- package/src/components/table/markup/foundation/Td.tsx +37 -0
- package/src/components/table/markup/foundation/Th.tsx +39 -0
- package/src/components/table/markup/foundation/index.tsx +30 -0
- package/src/components/table/markup/index.tsx +8 -2
- package/src/components/table/styles/foundation.scss +247 -0
- package/src/components/table/styles/index.scss +2 -0
- package/src/components/table/styles/variables.scss +29 -0
- package/src/components/table/types/foundation.ts +250 -0
- package/src/components/table/types/index.ts +1 -4
- package/src/components/tooltip/img/info.svg +5 -0
- package/src/components/tooltip/img/information.svg +9 -0
- package/src/components/tooltip/index.scss +1 -0
- package/src/components/tooltip/index.tsx +4 -0
- package/src/components/tooltip/markup/Message.tsx +70 -0
- package/src/components/tooltip/markup/Root.tsx +32 -0
- package/src/components/tooltip/markup/Template.tsx +46 -0
- package/src/components/tooltip/markup/Trigger.tsx +32 -0
- package/src/components/tooltip/markup/index.tsx +18 -0
- package/src/components/tooltip/styles/index.scss +2 -0
- package/src/components/tooltip/styles/tooltip.scss +47 -0
- package/src/components/tooltip/styles/variables.scss +14 -0
- package/src/components/tooltip/types/index.ts +1 -0
- package/src/components/tooltip/types/props.ts +118 -0
- package/src/index.scss +1 -0
- package/src/index.tsx +1 -0
package/dist/styles.css
CHANGED
|
@@ -228,6 +228,17 @@
|
|
|
228
228
|
--dropdown-option-height-small: var(--theme-size-medium-1, 40px);
|
|
229
229
|
--dropdown-option-height-medium: var(--theme-size-medium-2, 48px);
|
|
230
230
|
--dropdown-option-height-large: var(--theme-size-medium-3, 56px);
|
|
231
|
+
--tooltip-message-background: var(--color-cool-gray-20);
|
|
232
|
+
--tooltip-message-foreground: var(--color-common-100);
|
|
233
|
+
--tooltip-message-radius: var(--theme-radius-medium-3);
|
|
234
|
+
--tooltip-message-padding-inline: var(--spacing-padding-5);
|
|
235
|
+
--tooltip-message-padding-block: var(--spacing-padding-4);
|
|
236
|
+
--tooltip-message-font-size: var(--font-caption-large-size);
|
|
237
|
+
--tooltip-message-line-height: var(--font-caption-large-line-height);
|
|
238
|
+
--tooltip-message-letter-spacing: var(--font-caption-large-letter-spacing);
|
|
239
|
+
--tooltip-message-font-weight: 400;
|
|
240
|
+
--tooltip-trigger-icon-size: 16px;
|
|
241
|
+
--tooltip-trigger-icon-color: var(--color-label-alternative);
|
|
231
242
|
/* Layout presets */
|
|
232
243
|
--input-width: 100%;
|
|
233
244
|
--input-flex: 0 1 auto;
|
|
@@ -241,6 +252,16 @@
|
|
|
241
252
|
--input-default-gap: var(--spacing-gap-4);
|
|
242
253
|
--input-default-radius-base: var(--theme-radius-large-1);
|
|
243
254
|
--input-tertiary-radius-base: var(--theme-radius-large-2);
|
|
255
|
+
--input-table-radius-base: 0;
|
|
256
|
+
--input-table-text-small-size: var(--font-body-xxsmall-size);
|
|
257
|
+
--input-table-text-small-line-height: var(--font-body-xxsmall-line-height);
|
|
258
|
+
--input-table-text-small-weight: var(--font-body-xxsmall-weight);
|
|
259
|
+
--input-table-text-medium-size: var(--font-body-xsmall-size);
|
|
260
|
+
--input-table-text-medium-line-height: var(--font-body-xsmall-line-height);
|
|
261
|
+
--input-table-text-medium-weight: var(--font-body-xsmall-weight);
|
|
262
|
+
--input-table-text-large-size: var(--font-body-small-size);
|
|
263
|
+
--input-table-text-large-line-height: var(--font-body-small-line-height);
|
|
264
|
+
--input-table-text-large-weight: var(--font-body-small-weight);
|
|
244
265
|
/* Label/helper colors */
|
|
245
266
|
--input-label-color: var(--color-label-standard);
|
|
246
267
|
--input-label-accent-color: var(--color-primary-default);
|
|
@@ -258,6 +279,7 @@
|
|
|
258
279
|
--input-border-width-emphasis: 1.4px;
|
|
259
280
|
--input-border-active-color: var(--color-blue-80);
|
|
260
281
|
--input-border-success-color: var(--color-blue-80);
|
|
282
|
+
--input-border-table-default-color: transparent;
|
|
261
283
|
/* error는 Figma 44% alpha */
|
|
262
284
|
--input-border-error-color: rgba(218, 29, 11, 0.44);
|
|
263
285
|
--input-border-disabled-color: var(--color-border-standard-cool-gray);
|
|
@@ -286,6 +308,32 @@
|
|
|
286
308
|
--select-secondary-gap: var(--spacing-gap-2);
|
|
287
309
|
--select-secondary-underline-width-default: 1px;
|
|
288
310
|
--select-secondary-underline-width-focus: 1.4px;
|
|
311
|
+
--select-table-radius: var(--input-table-radius-base);
|
|
312
|
+
--select-table-border-default-color: var(--input-border-table-default-color);
|
|
313
|
+
--select-table-border-focus-color: var(--input-border-active-color);
|
|
314
|
+
--select-table-border-disabled-color: var(--input-border-disabled-color);
|
|
315
|
+
--select-table-surface-color: transparent;
|
|
316
|
+
--select-table-surface-disabled-color: var(--input-surface-disabled-color);
|
|
317
|
+
--select-table-color-text: var(--input-text-color);
|
|
318
|
+
--select-table-color-placeholder: var(--input-placeholder-color);
|
|
319
|
+
--select-table-icon-color-default: var(--select-icon-color-default);
|
|
320
|
+
--select-table-icon-color-focused: var(--select-icon-color-focused);
|
|
321
|
+
--select-table-icon-color-disabled: var(--select-icon-color-disabled);
|
|
322
|
+
--select-table-text-small-size: var(--input-table-text-small-size);
|
|
323
|
+
--select-table-text-small-line-height: var(
|
|
324
|
+
--input-table-text-small-line-height
|
|
325
|
+
);
|
|
326
|
+
--select-table-text-small-weight: var(--input-table-text-small-weight);
|
|
327
|
+
--select-table-text-medium-size: var(--input-table-text-medium-size);
|
|
328
|
+
--select-table-text-medium-line-height: var(
|
|
329
|
+
--input-table-text-medium-line-height
|
|
330
|
+
);
|
|
331
|
+
--select-table-text-medium-weight: var(--input-table-text-medium-weight);
|
|
332
|
+
--select-table-text-large-size: var(--input-table-text-large-size);
|
|
333
|
+
--select-table-text-large-line-height: var(
|
|
334
|
+
--input-table-text-large-line-height
|
|
335
|
+
);
|
|
336
|
+
--select-table-text-large-weight: var(--input-table-text-large-weight);
|
|
289
337
|
--select-text-small-size: 15px;
|
|
290
338
|
--select-text-small-line-height: 1.4;
|
|
291
339
|
--select-text-small-letter-spacing: 0.2px;
|
|
@@ -402,6 +450,28 @@
|
|
|
402
450
|
--theme-radio-card-badge-color: var(--color-primary-default);
|
|
403
451
|
--theme-radio-focus-ring: rgba(2, 84, 255, 0.32);
|
|
404
452
|
--theme-radio-disabled-selected-opacity: 0.28;
|
|
453
|
+
--table-border-color: var(--color-border-standard-cool-gray);
|
|
454
|
+
--table-line-head-background-color: var(--color-surface-static-cool-gray);
|
|
455
|
+
--table-grid-head-background-color: var(
|
|
456
|
+
--color-background-alternative-cool-gray
|
|
457
|
+
);
|
|
458
|
+
--table-cell-background-color: var(--color-surface-static-white);
|
|
459
|
+
--table-line-cell-height-head: 44px;
|
|
460
|
+
--table-line-cell-height-body: 56px;
|
|
461
|
+
--table-grid-cell-height: 48px;
|
|
462
|
+
--table-grid-border-radius: var(--theme-radius-large-1);
|
|
463
|
+
--table-line-cell-padding-inline: var(--spacing-padding-6);
|
|
464
|
+
--table-line-cell-padding-block: 9px;
|
|
465
|
+
--table-grid-cell-padding-inline: var(--spacing-padding-6);
|
|
466
|
+
--table-grid-cell-padding-block: 9px;
|
|
467
|
+
--table-th-text-color: var(--color-label-standard);
|
|
468
|
+
--table-th-text-size: 13px;
|
|
469
|
+
--table-th-text-weight: var(--font-label-small-weight);
|
|
470
|
+
--table-th-text-line-height: var(--font-label-small-line-height);
|
|
471
|
+
--table-td-text-color: var(--color-label-standard);
|
|
472
|
+
--table-td-text-size: 15px;
|
|
473
|
+
--table-td-text-weight: var(--font-body-xsmall-weight);
|
|
474
|
+
--table-td-text-line-height: var(--font-body-xsmall-line-height);
|
|
405
475
|
--divider-width: 1px;
|
|
406
476
|
--divider-height: 12px;
|
|
407
477
|
--divider-color: var(--color-border-standard-cool-gray, #e4e5e7);
|
|
@@ -1782,6 +1852,10 @@ figure.chip {
|
|
|
1782
1852
|
margin: 0;
|
|
1783
1853
|
}
|
|
1784
1854
|
|
|
1855
|
+
.dropdown-menu-item-trigger.dropdown-menu-alt[data-disabled] {
|
|
1856
|
+
cursor: default;
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1785
1859
|
.dropdown-menu-item {
|
|
1786
1860
|
width: 100%;
|
|
1787
1861
|
}
|
|
@@ -1907,6 +1981,55 @@ figure.chip {
|
|
|
1907
1981
|
|
|
1908
1982
|
|
|
1909
1983
|
|
|
1984
|
+
.tooltip-trigger {
|
|
1985
|
+
display: inline-flex;
|
|
1986
|
+
align-items: center;
|
|
1987
|
+
justify-content: center;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
.tooltip-template-trigger {
|
|
1991
|
+
display: inline-flex;
|
|
1992
|
+
width: var(--tooltip-trigger-icon-size);
|
|
1993
|
+
height: var(--tooltip-trigger-icon-size);
|
|
1994
|
+
align-items: center;
|
|
1995
|
+
justify-content: center;
|
|
1996
|
+
padding: 0;
|
|
1997
|
+
border: 0;
|
|
1998
|
+
background-color: transparent;
|
|
1999
|
+
color: var(--tooltip-trigger-icon-color);
|
|
2000
|
+
cursor: pointer;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
.tooltip-template-trigger svg {
|
|
2004
|
+
width: 100%;
|
|
2005
|
+
height: 100%;
|
|
2006
|
+
display: block;
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
.tooltip-message {
|
|
2010
|
+
max-width: min(20rem, 100vw - 1.5rem);
|
|
2011
|
+
box-sizing: border-box;
|
|
2012
|
+
border-radius: var(--tooltip-message-radius);
|
|
2013
|
+
background-color: var(--tooltip-message-background);
|
|
2014
|
+
padding: var(--tooltip-message-padding-block) var(--tooltip-message-padding-inline);
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
.tooltip-message-text {
|
|
2018
|
+
display: block;
|
|
2019
|
+
color: var(--tooltip-message-foreground);
|
|
2020
|
+
font-size: var(--tooltip-message-font-size);
|
|
2021
|
+
line-height: var(--tooltip-message-line-height);
|
|
2022
|
+
letter-spacing: var(--tooltip-message-letter-spacing);
|
|
2023
|
+
font-weight: var(--tooltip-message-font-weight);
|
|
2024
|
+
white-space: normal;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
.tooltip-message-arrow {
|
|
2028
|
+
fill: var(--tooltip-message-background);
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
|
|
2032
|
+
|
|
1910
2033
|
.input {
|
|
1911
2034
|
display: flex;
|
|
1912
2035
|
flex-direction: column;
|
|
@@ -2039,6 +2162,11 @@ figure.chip {
|
|
|
2039
2162
|
align-self: center;
|
|
2040
2163
|
margin-left: 0;
|
|
2041
2164
|
}
|
|
2165
|
+
.input-field[data-priority=table] {
|
|
2166
|
+
border-radius: var(--input-table-radius-base);
|
|
2167
|
+
border-color: var(--input-border-table-default-color);
|
|
2168
|
+
background-color: transparent;
|
|
2169
|
+
}
|
|
2042
2170
|
.input-field:not([data-priority=secondary])[data-state=active], .input-field:not([data-priority=secondary])[data-state=focused] {
|
|
2043
2171
|
border-color: var(--input-border-active-color);
|
|
2044
2172
|
border-width: var(--input-border-width-emphasis);
|
|
@@ -2121,6 +2249,24 @@ figure.chip {
|
|
|
2121
2249
|
min-height: var(--theme-size-medium-2);
|
|
2122
2250
|
}
|
|
2123
2251
|
|
|
2252
|
+
.input-field[data-priority=table][data-size=small] .input-element {
|
|
2253
|
+
font-size: var(--input-table-text-small-size);
|
|
2254
|
+
line-height: var(--input-table-text-small-line-height);
|
|
2255
|
+
font-weight: var(--input-table-text-small-weight);
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
.input-field[data-priority=table][data-size=medium] .input-element {
|
|
2259
|
+
font-size: var(--input-table-text-medium-size);
|
|
2260
|
+
line-height: var(--input-table-text-medium-line-height);
|
|
2261
|
+
font-weight: var(--input-table-text-medium-weight);
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
.input-field[data-priority=table][data-size=large] .input-element {
|
|
2265
|
+
font-size: var(--input-table-text-large-size);
|
|
2266
|
+
line-height: var(--input-table-text-large-line-height);
|
|
2267
|
+
font-weight: var(--input-table-text-large-weight);
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2124
2270
|
.input-helper-text {
|
|
2125
2271
|
color: var(--input-helper-color);
|
|
2126
2272
|
font-size: var(--font-label-small-size);
|
|
@@ -2207,6 +2353,9 @@ figure.chip {
|
|
|
2207
2353
|
.input[data-state=disabled] .input-field[data-priority=secondary] {
|
|
2208
2354
|
background-color: transparent;
|
|
2209
2355
|
}
|
|
2356
|
+
.input[data-state=disabled] .input-field[data-priority=table] {
|
|
2357
|
+
background-color: transparent;
|
|
2358
|
+
}
|
|
2210
2359
|
|
|
2211
2360
|
.input-side {
|
|
2212
2361
|
display: flex;
|
|
@@ -2322,6 +2471,21 @@ figure.chip {
|
|
|
2322
2471
|
pointer-events: none;
|
|
2323
2472
|
}
|
|
2324
2473
|
|
|
2474
|
+
.input-date-trigger-input.input-priority-table .input-field {
|
|
2475
|
+
padding-inline: var(--spacing-padding-4);
|
|
2476
|
+
}
|
|
2477
|
+
.input-date-trigger-input.input-priority-table .input-field-control {
|
|
2478
|
+
gap: var(--spacing-gap-3);
|
|
2479
|
+
}
|
|
2480
|
+
.input-date-trigger-input.input-priority-table .input-element {
|
|
2481
|
+
font-size: var(--font-body-xsmall-size);
|
|
2482
|
+
line-height: var(--font-body-xsmall-line-height);
|
|
2483
|
+
font-weight: var(--font-body-xsmall-weight);
|
|
2484
|
+
}
|
|
2485
|
+
.input-date-trigger-input.input-priority-table .input-date-trigger-icon {
|
|
2486
|
+
color: var(--color-label-alternative);
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2325
2489
|
.input-date-footer-template {
|
|
2326
2490
|
display: grid;
|
|
2327
2491
|
gap: var(--spacing-gap-5);
|
|
@@ -2517,11 +2681,22 @@ figure.chip {
|
|
|
2517
2681
|
color: var(--color-label-disabled);
|
|
2518
2682
|
cursor: not-allowed;
|
|
2519
2683
|
}
|
|
2684
|
+
.select-button[data-priority=table] {
|
|
2685
|
+
border-radius: var(--select-table-radius);
|
|
2686
|
+
border-color: var(--select-table-border-default-color);
|
|
2687
|
+
background-color: var(--select-table-surface-color);
|
|
2688
|
+
--select-icon-fill: var(--select-table-icon-color-default);
|
|
2689
|
+
}
|
|
2520
2690
|
.select-button:not([data-priority=secondary])[data-state=focused], .select-button:not([data-priority=secondary])[data-open=true], .select-button:not([data-priority=secondary]):focus-visible {
|
|
2521
2691
|
border-color: var(--select-primary-color-border-focused);
|
|
2522
2692
|
border-width: var(--select-primary-border-width-focus);
|
|
2523
2693
|
--select-icon-fill: var(--select-icon-color-focused);
|
|
2524
2694
|
}
|
|
2695
|
+
.select-button[data-priority=table][data-state=focused], .select-button[data-priority=table][data-open=true], .select-button[data-priority=table]:focus-visible {
|
|
2696
|
+
border-color: var(--select-table-border-focus-color);
|
|
2697
|
+
border-width: var(--select-primary-border-width-focus);
|
|
2698
|
+
--select-icon-fill: var(--select-table-icon-color-focused);
|
|
2699
|
+
}
|
|
2525
2700
|
.select-button:not([data-priority=secondary])[data-state=disabled], .select-button:not([data-priority=secondary]):disabled {
|
|
2526
2701
|
border-color: var(--select-primary-color-border-disabled);
|
|
2527
2702
|
background-color: var(--select-primary-color-surface-disabled);
|
|
@@ -2536,6 +2711,12 @@ figure.chip {
|
|
|
2536
2711
|
background-color: var(--select-color-border-secondary-disabled);
|
|
2537
2712
|
height: var(--select-secondary-underline-width-default);
|
|
2538
2713
|
}
|
|
2714
|
+
.select-button[data-priority=table][data-state=disabled], .select-button[data-priority=table]:disabled {
|
|
2715
|
+
border-color: var(--select-table-border-disabled-color);
|
|
2716
|
+
background-color: var(--select-table-surface-disabled-color);
|
|
2717
|
+
cursor: not-allowed;
|
|
2718
|
+
--select-icon-fill: var(--select-table-icon-color-disabled);
|
|
2719
|
+
}
|
|
2539
2720
|
|
|
2540
2721
|
.select-value {
|
|
2541
2722
|
flex: 1 1 auto;
|
|
@@ -2561,6 +2742,9 @@ figure.chip {
|
|
|
2561
2742
|
.select-button[data-priority=secondary] .select-label {
|
|
2562
2743
|
color: var(--select-secondary-color-text);
|
|
2563
2744
|
}
|
|
2745
|
+
.select-button[data-priority=table] .select-label {
|
|
2746
|
+
color: var(--select-table-color-text);
|
|
2747
|
+
}
|
|
2564
2748
|
.select-button[data-state=focused] .select-label, .select-button[data-open=true] .select-label {
|
|
2565
2749
|
color: var(--select-primary-color-text-focused);
|
|
2566
2750
|
}
|
|
@@ -2577,6 +2761,9 @@ figure.chip {
|
|
|
2577
2761
|
.select-button[data-priority=secondary] .select-label-placeholder {
|
|
2578
2762
|
color: var(--select-secondary-color-placeholder);
|
|
2579
2763
|
}
|
|
2764
|
+
.select-button[data-priority=table] .select-label-placeholder {
|
|
2765
|
+
color: var(--select-table-color-placeholder);
|
|
2766
|
+
}
|
|
2580
2767
|
|
|
2581
2768
|
.select-button[data-size=small] .select-label {
|
|
2582
2769
|
font-size: var(--select-text-small-size);
|
|
@@ -2585,6 +2772,12 @@ figure.chip {
|
|
|
2585
2772
|
font-weight: var(--select-text-small-weight);
|
|
2586
2773
|
}
|
|
2587
2774
|
|
|
2775
|
+
.select-button[data-priority=table][data-size=small] .select-label {
|
|
2776
|
+
font-size: var(--select-table-text-small-size);
|
|
2777
|
+
line-height: var(--select-table-text-small-line-height);
|
|
2778
|
+
font-weight: var(--select-table-text-small-weight);
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2588
2781
|
.select-button[data-size=large] .select-label {
|
|
2589
2782
|
font-size: var(--select-text-large-size);
|
|
2590
2783
|
line-height: var(--select-text-large-line-height);
|
|
@@ -2592,6 +2785,18 @@ figure.chip {
|
|
|
2592
2785
|
font-weight: var(--select-text-large-weight);
|
|
2593
2786
|
}
|
|
2594
2787
|
|
|
2788
|
+
.select-button[data-priority=table][data-size=medium] .select-label {
|
|
2789
|
+
font-size: var(--select-table-text-medium-size);
|
|
2790
|
+
line-height: var(--select-table-text-medium-line-height);
|
|
2791
|
+
font-weight: var(--select-table-text-medium-weight);
|
|
2792
|
+
}
|
|
2793
|
+
|
|
2794
|
+
.select-button[data-priority=table][data-size=large] .select-label {
|
|
2795
|
+
font-size: var(--select-table-text-large-size);
|
|
2796
|
+
line-height: var(--select-table-text-large-line-height);
|
|
2797
|
+
font-weight: var(--select-table-text-large-weight);
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2595
2800
|
.select-button[data-priority=secondary][data-size=large] .select-label {
|
|
2596
2801
|
font-weight: 600;
|
|
2597
2802
|
}
|
|
@@ -3555,6 +3760,220 @@ figure.chip {
|
|
|
3555
3760
|
padding: var(--spacing-padding-6) 0;
|
|
3556
3761
|
}
|
|
3557
3762
|
|
|
3763
|
+
|
|
3764
|
+
|
|
3765
|
+
.table.table-container {
|
|
3766
|
+
width: 100%;
|
|
3767
|
+
border-collapse: collapse;
|
|
3768
|
+
border-spacing: 0;
|
|
3769
|
+
}
|
|
3770
|
+
|
|
3771
|
+
.table.table-container .table-native-cell.table-th,
|
|
3772
|
+
.table.table-container .table-native-cell.table-td {
|
|
3773
|
+
vertical-align: middle;
|
|
3774
|
+
background-color: var(--table-cell-background-color);
|
|
3775
|
+
text-align: left;
|
|
3776
|
+
}
|
|
3777
|
+
|
|
3778
|
+
.table.table-container[data-layout=line] .table-native-cell.table-th,
|
|
3779
|
+
.table.table-container[data-layout=line] .table-native-cell.table-td {
|
|
3780
|
+
--table-cell-padding-inline: var(--table-line-cell-padding-inline);
|
|
3781
|
+
--table-cell-padding-block: var(--table-line-cell-padding-block);
|
|
3782
|
+
border-bottom: 1px solid var(--table-border-color);
|
|
3783
|
+
}
|
|
3784
|
+
|
|
3785
|
+
.table.table-container[data-layout=line] .table-head .table-native-cell.table-th {
|
|
3786
|
+
height: var(--table-line-cell-height-head);
|
|
3787
|
+
border-top: 1px solid var(--table-border-color);
|
|
3788
|
+
background-color: var(--table-line-head-background-color);
|
|
3789
|
+
}
|
|
3790
|
+
|
|
3791
|
+
.table.table-container[data-layout=line] .table-body .table-native-cell.table-td,
|
|
3792
|
+
.table.table-container[data-layout=line] .table-foot .table-native-cell.table-td {
|
|
3793
|
+
height: var(--table-line-cell-height-body);
|
|
3794
|
+
}
|
|
3795
|
+
|
|
3796
|
+
.table.table-container[data-layout=grid] .table-native-cell.table-th,
|
|
3797
|
+
.table.table-container[data-layout=grid] .table-native-cell.table-td {
|
|
3798
|
+
--table-cell-padding-inline: var(--table-grid-cell-padding-inline);
|
|
3799
|
+
--table-cell-padding-block: var(--table-grid-cell-padding-block);
|
|
3800
|
+
border: 1px solid var(--table-border-color);
|
|
3801
|
+
height: var(--table-grid-cell-height);
|
|
3802
|
+
}
|
|
3803
|
+
|
|
3804
|
+
.table.table-container[data-layout=grid] {
|
|
3805
|
+
border-radius: var(--table-grid-border-radius);
|
|
3806
|
+
overflow: hidden;
|
|
3807
|
+
}
|
|
3808
|
+
|
|
3809
|
+
.table.table-container[data-layout=grid] .table-head .table-native-cell.table-th {
|
|
3810
|
+
background-color: var(--table-grid-head-background-color);
|
|
3811
|
+
}
|
|
3812
|
+
|
|
3813
|
+
.table-native-cell.table-th .table-native-cell-text {
|
|
3814
|
+
color: var(--table-th-text-color);
|
|
3815
|
+
font-size: var(--table-th-text-size);
|
|
3816
|
+
font-weight: var(--table-th-text-weight);
|
|
3817
|
+
line-height: var(--table-th-text-line-height);
|
|
3818
|
+
}
|
|
3819
|
+
|
|
3820
|
+
.table-native-cell.table-td .table-native-cell-text {
|
|
3821
|
+
color: var(--table-td-text-color);
|
|
3822
|
+
font-size: var(--table-td-text-size);
|
|
3823
|
+
font-weight: var(--table-td-text-weight);
|
|
3824
|
+
line-height: var(--table-td-text-line-height);
|
|
3825
|
+
}
|
|
3826
|
+
|
|
3827
|
+
.table-cell-content {
|
|
3828
|
+
display: flex;
|
|
3829
|
+
align-items: center;
|
|
3830
|
+
width: 100%;
|
|
3831
|
+
height: 100%;
|
|
3832
|
+
justify-content: flex-start;
|
|
3833
|
+
box-sizing: border-box;
|
|
3834
|
+
padding-inline: var(--table-cell-padding-inline);
|
|
3835
|
+
padding-block: var(--table-cell-padding-block);
|
|
3836
|
+
}
|
|
3837
|
+
|
|
3838
|
+
.table-cell-content[data-padding=none] {
|
|
3839
|
+
padding: 0;
|
|
3840
|
+
}
|
|
3841
|
+
|
|
3842
|
+
.table-cell-content[data-no-padding=true] {
|
|
3843
|
+
padding: 0;
|
|
3844
|
+
}
|
|
3845
|
+
|
|
3846
|
+
.table-cell-content[data-padding=default] .input[data-priority=table] {
|
|
3847
|
+
width: calc(100% + var(--table-cell-padding-inline) * 2);
|
|
3848
|
+
height: 100%;
|
|
3849
|
+
min-height: calc(100% + var(--table-cell-padding-block) * 2);
|
|
3850
|
+
margin-inline: calc(var(--table-cell-padding-inline) * -1);
|
|
3851
|
+
margin-block: calc(var(--table-cell-padding-block) * -1);
|
|
3852
|
+
flex: 1 1 auto;
|
|
3853
|
+
}
|
|
3854
|
+
|
|
3855
|
+
.table-cell-content[data-padding=default] :where(.input[data-priority=table] .input-box),
|
|
3856
|
+
.table-cell-content[data-padding=default] :where(.input[data-priority=table] .input-field) {
|
|
3857
|
+
width: 100%;
|
|
3858
|
+
height: 100%;
|
|
3859
|
+
}
|
|
3860
|
+
|
|
3861
|
+
.table-cell-content[data-padding=default] .input-date-field {
|
|
3862
|
+
width: calc(100% + var(--table-cell-padding-inline) * 2);
|
|
3863
|
+
height: 100%;
|
|
3864
|
+
min-height: calc(100% + var(--table-cell-padding-block) * 2);
|
|
3865
|
+
margin-inline: calc(var(--table-cell-padding-inline) * -1);
|
|
3866
|
+
margin-block: calc(var(--table-cell-padding-block) * -1);
|
|
3867
|
+
}
|
|
3868
|
+
|
|
3869
|
+
.table-cell-content[data-padding=default] :where(.select.select-container) {
|
|
3870
|
+
width: calc(100% + var(--table-cell-padding-inline) * 2);
|
|
3871
|
+
height: 100%;
|
|
3872
|
+
min-height: calc(100% + var(--table-cell-padding-block) * 2);
|
|
3873
|
+
margin-inline: calc(var(--table-cell-padding-inline) * -1);
|
|
3874
|
+
margin-block: calc(var(--table-cell-padding-block) * -1);
|
|
3875
|
+
flex: 1 1 auto;
|
|
3876
|
+
}
|
|
3877
|
+
|
|
3878
|
+
.table-cell-content[data-padding=default] :where(.select.select-container .select-button) {
|
|
3879
|
+
width: 100%;
|
|
3880
|
+
height: 100%;
|
|
3881
|
+
}
|
|
3882
|
+
|
|
3883
|
+
.table-cell-content[data-padding=none] :where(.input[data-priority=table],
|
|
3884
|
+
.input[data-priority=table] .input-box,
|
|
3885
|
+
.input[data-priority=table] .input-field,
|
|
3886
|
+
.input-date-field,
|
|
3887
|
+
.select.select-container,
|
|
3888
|
+
.select.select-container .select-button),
|
|
3889
|
+
.table-cell-content[data-no-padding=true] :where(.input[data-priority=table],
|
|
3890
|
+
.input[data-priority=table] .input-box,
|
|
3891
|
+
.input[data-priority=table] .input-field,
|
|
3892
|
+
.input-date-field,
|
|
3893
|
+
.select.select-container,
|
|
3894
|
+
.select.select-container .select-button) {
|
|
3895
|
+
width: 100%;
|
|
3896
|
+
height: 100%;
|
|
3897
|
+
min-height: 100%;
|
|
3898
|
+
margin: 0;
|
|
3899
|
+
}
|
|
3900
|
+
|
|
3901
|
+
.table-cell-content .table-cell-text {
|
|
3902
|
+
color: inherit;
|
|
3903
|
+
font-size: inherit;
|
|
3904
|
+
font-weight: inherit;
|
|
3905
|
+
line-height: inherit;
|
|
3906
|
+
}
|
|
3907
|
+
|
|
3908
|
+
.table-cell-content[data-align-x=left],
|
|
3909
|
+
.table-cell-content[data-align=left] {
|
|
3910
|
+
justify-content: flex-start;
|
|
3911
|
+
text-align: left;
|
|
3912
|
+
}
|
|
3913
|
+
|
|
3914
|
+
.table-cell-content[data-align-x=center],
|
|
3915
|
+
.table-cell-content[data-align=center] {
|
|
3916
|
+
justify-content: center;
|
|
3917
|
+
text-align: center;
|
|
3918
|
+
}
|
|
3919
|
+
|
|
3920
|
+
.table-cell-content[data-align-x=right],
|
|
3921
|
+
.table-cell-content[data-align=right] {
|
|
3922
|
+
justify-content: flex-end;
|
|
3923
|
+
text-align: right;
|
|
3924
|
+
}
|
|
3925
|
+
|
|
3926
|
+
.table-cell-content[data-align-y=top] {
|
|
3927
|
+
align-items: flex-start;
|
|
3928
|
+
}
|
|
3929
|
+
|
|
3930
|
+
.table-cell-content[data-align-y=center] {
|
|
3931
|
+
align-items: center;
|
|
3932
|
+
}
|
|
3933
|
+
|
|
3934
|
+
.table-cell-content[data-align-y=bottom] {
|
|
3935
|
+
align-items: flex-end;
|
|
3936
|
+
}
|
|
3937
|
+
|
|
3938
|
+
.table-cell.table-head-cell .table-cell-text {
|
|
3939
|
+
color: var(--table-th-text-color);
|
|
3940
|
+
font-size: var(--table-th-text-size);
|
|
3941
|
+
font-weight: var(--table-th-text-weight);
|
|
3942
|
+
line-height: var(--table-th-text-line-height);
|
|
3943
|
+
}
|
|
3944
|
+
|
|
3945
|
+
.table-cell .input[data-priority=table] .input-element,
|
|
3946
|
+
.table-cell .select.select-container .select-button[data-priority=table] .select-label,
|
|
3947
|
+
.table-cell .select.select-container .select-button[data-priority=table] .select-label-placeholder {
|
|
3948
|
+
color: var(--table-td-text-color);
|
|
3949
|
+
font-size: var(--table-td-text-size);
|
|
3950
|
+
font-weight: var(--table-td-text-weight);
|
|
3951
|
+
line-height: var(--table-td-text-line-height);
|
|
3952
|
+
}
|
|
3953
|
+
|
|
3954
|
+
.table-cell.table-head-cell .radio-label-text {
|
|
3955
|
+
color: var(--table-th-text-color);
|
|
3956
|
+
font-size: var(--table-th-text-size);
|
|
3957
|
+
font-weight: var(--table-th-text-weight);
|
|
3958
|
+
line-height: var(--table-th-text-line-height);
|
|
3959
|
+
}
|
|
3960
|
+
|
|
3961
|
+
.table-cell.table-body-cell .table-cell-text,
|
|
3962
|
+
.table-cell.table-foot-cell .table-cell-text {
|
|
3963
|
+
color: var(--table-td-text-color);
|
|
3964
|
+
font-size: var(--table-td-text-size);
|
|
3965
|
+
font-weight: var(--table-td-text-weight);
|
|
3966
|
+
line-height: var(--table-td-text-line-height);
|
|
3967
|
+
}
|
|
3968
|
+
|
|
3969
|
+
.table-cell.table-body-cell .radio-label-text,
|
|
3970
|
+
.table-cell.table-foot-cell .radio-label-text {
|
|
3971
|
+
color: var(--table-td-text-color);
|
|
3972
|
+
font-size: var(--table-td-text-size);
|
|
3973
|
+
font-weight: var(--table-td-text-weight);
|
|
3974
|
+
line-height: var(--table-td-text-line-height);
|
|
3975
|
+
}
|
|
3976
|
+
|
|
3558
3977
|
/* Divider 토큰도 전역 :root 범위에 선언한다. */
|
|
3559
3978
|
|
|
3560
3979
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniai-fe/uds-primitives",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "UNIAI Design System; Primitives Components Package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"@radix-ui/react-popover": "^1.1.15",
|
|
73
73
|
"@radix-ui/react-radio-group": "^1.3.8",
|
|
74
74
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
75
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
75
76
|
"@radix-ui/react-visually-hidden": "^1.2.4",
|
|
76
77
|
"clsx": "^2.1.1",
|
|
77
78
|
"dayjs": "^1.11.19",
|
|
@@ -35,6 +35,7 @@ export type CalendarOnChange = (value: CalendarValue) => void;
|
|
|
35
35
|
/**
|
|
36
36
|
* Mantine DatePicker 공개 옵션.
|
|
37
37
|
* @property {Partial<Record<DatePickerStylesNames, string>>} [classNames] Mantine 내부 스타일 클래스 매핑
|
|
38
|
+
* @property {string} [valueFormat] DatePicker 표시 포맷
|
|
38
39
|
*/
|
|
39
40
|
export type CalendarDatePickerProps = Partial<
|
|
40
41
|
Omit<
|
|
@@ -48,6 +49,10 @@ export type CalendarDatePickerProps = Partial<
|
|
|
48
49
|
| "styles"
|
|
49
50
|
>
|
|
50
51
|
> & {
|
|
52
|
+
/**
|
|
53
|
+
* DatePicker 표시 포맷
|
|
54
|
+
*/
|
|
55
|
+
valueFormat?: string;
|
|
51
56
|
/**
|
|
52
57
|
* Mantine 내부 스타일 classNames override.
|
|
53
58
|
*/
|
|
@@ -12,6 +12,16 @@ import DropdownTrigger from "./foundation/Trigger";
|
|
|
12
12
|
* Dropdown reference template; trigger/panel/menu 조합을 제공한다.
|
|
13
13
|
* @component
|
|
14
14
|
* @param {DropdownTemplateProps} props Dropdown template props
|
|
15
|
+
* @param {ReactNode} props.trigger trigger 요소
|
|
16
|
+
* @param {DropdownTemplateItem[]} props.items 렌더링할 menu item 리스트
|
|
17
|
+
* @param {string[]} [props.selectedIds] 선택된 item id 배열
|
|
18
|
+
* @param {(item: DropdownTemplateItem) => void} [props.onSelect] item 선택 콜백
|
|
19
|
+
* @param {"small" | "medium" | "large"} [props.size="medium"] menu size scale
|
|
20
|
+
* @param {"match" | "fit-content" | "max-content" | string | number} [props.width="match"] panel width 옵션
|
|
21
|
+
* @param {DropdownMenuProps} [props.rootProps] Dropdown.Root 전달 props
|
|
22
|
+
* @param {DropdownContainerProps} [props.containerProps] Dropdown.Container 전달 props
|
|
23
|
+
* @param {DropdownMenuListProps} [props.menuListProps] Dropdown.Menu.List 전달 props
|
|
24
|
+
* @param {ReactNode} [props.alt] empty 상태 대체 콘텐츠
|
|
15
25
|
*/
|
|
16
26
|
const DropdownTemplate = ({
|
|
17
27
|
trigger,
|
|
@@ -23,31 +33,45 @@ const DropdownTemplate = ({
|
|
|
23
33
|
rootProps,
|
|
24
34
|
containerProps,
|
|
25
35
|
menuListProps,
|
|
36
|
+
alt,
|
|
26
37
|
}: DropdownTemplateProps) => {
|
|
38
|
+
const hasItems = items.length > 0;
|
|
39
|
+
|
|
27
40
|
return (
|
|
28
41
|
<DropdownRoot {...rootProps}>
|
|
29
42
|
<DropdownTrigger asChild>{trigger}</DropdownTrigger>
|
|
30
43
|
<DropdownContainer {...containerProps} size={size} width={width}>
|
|
31
44
|
<DropdownMenuList {...menuListProps}>
|
|
32
|
-
{
|
|
45
|
+
{hasItems ? (
|
|
46
|
+
<>
|
|
47
|
+
{items.map(item => (
|
|
48
|
+
<DropdownMenuItem
|
|
49
|
+
key={item.id}
|
|
50
|
+
label={item.label}
|
|
51
|
+
description={item.description}
|
|
52
|
+
disabled={item.disabled}
|
|
53
|
+
left={item.left}
|
|
54
|
+
right={item.right}
|
|
55
|
+
multiple={item.multiple}
|
|
56
|
+
isSelected={selectedIds?.includes(item.id)}
|
|
57
|
+
onSelect={event => {
|
|
58
|
+
if (item.disabled) {
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
onSelect?.(item);
|
|
63
|
+
}}
|
|
64
|
+
/>
|
|
65
|
+
))}
|
|
66
|
+
</>
|
|
67
|
+
) : (
|
|
33
68
|
<DropdownMenuItem
|
|
34
|
-
|
|
35
|
-
label={
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
left={item.left}
|
|
39
|
-
right={item.right}
|
|
40
|
-
multiple={item.multiple}
|
|
41
|
-
isSelected={selectedIds?.includes(item.id)}
|
|
42
|
-
onSelect={event => {
|
|
43
|
-
if (item.disabled) {
|
|
44
|
-
event.preventDefault();
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
onSelect?.(item);
|
|
48
|
-
}}
|
|
69
|
+
// 변경: 사용처 1회 상수 대신 인라인 fallback으로 empty label을 처리한다.
|
|
70
|
+
label={alt ?? "데이터가 없습니다."}
|
|
71
|
+
disabled
|
|
72
|
+
className="dropdown-menu-alt"
|
|
49
73
|
/>
|
|
50
|
-
)
|
|
74
|
+
)}
|
|
51
75
|
</DropdownMenuList>
|
|
52
76
|
</DropdownContainer>
|
|
53
77
|
</DropdownRoot>
|
|
@@ -8,11 +8,23 @@ import type { DropdownContainerProps } from "../../types/props";
|
|
|
8
8
|
import { useDropdownContext } from "./Provider";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Dropdown
|
|
11
|
+
* Dropdown Foundation; Container 패널 렌더링 컴포넌트
|
|
12
12
|
* @component
|
|
13
13
|
* @param {DropdownContainerProps} props Dropdown container props
|
|
14
|
-
* @param {
|
|
14
|
+
* @param {React.ReactNode} props.children dropdown panel 콘텐츠
|
|
15
|
+
* @param {string} [props.className] panel className
|
|
15
16
|
* @param {DropdownSize} [props.size="medium"] option height scale
|
|
17
|
+
* @param {DropdownPanelWidth} [props.width="match"] panel width 옵션
|
|
18
|
+
* @param {HTMLElement | null} [props.portalContainer] portal 컨테이너
|
|
19
|
+
* @param {"start" | "center" | "end"} [props.align="start"] 정렬 기준
|
|
20
|
+
* @param {"top" | "right" | "bottom" | "left"} [props.side="bottom"] 패널 위치
|
|
21
|
+
* @param {number} [props.sideOffset=4] trigger 와 패널 사이 간격
|
|
22
|
+
* @param {number} [props.alignOffset] 정렬 보정값
|
|
23
|
+
* @param {React.CSSProperties} [props.style] 인라인 스타일
|
|
24
|
+
* @example
|
|
25
|
+
* <DropdownContainer width="match">
|
|
26
|
+
* <Dropdown.Menu.List />
|
|
27
|
+
* </DropdownContainer>
|
|
16
28
|
*/
|
|
17
29
|
const DropdownContainer = forwardRef<HTMLDivElement, DropdownContainerProps>(
|
|
18
30
|
(
|