@uniai-fe/uds-primitives 0.3.2 → 0.3.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/dist/styles.css +69 -48
- package/package.json +1 -1
- package/src/components/chip/markup/Chip.tsx +17 -10
- package/src/components/chip/styles/chip.scss +32 -20
- package/src/components/chip/styles/variables.scss +20 -15
- package/src/components/chip/types/props.ts +6 -0
- package/src/components/info-box/styles/variables.scss +2 -10
- package/src/components/input/markup/file/UploadedChip.tsx +1 -0
- package/src/components/input/styles/foundation.scss +4 -2
- package/src/components/table/styles/foundation.scss +17 -0
- package/src/components/table/styles/variables.scss +7 -1
package/dist/styles.css
CHANGED
|
@@ -181,29 +181,34 @@
|
|
|
181
181
|
--theme-checkbox-icon-selected: var(--color-common-100);
|
|
182
182
|
--theme-checkbox-icon-disabled-selected: var(--color-common-100);
|
|
183
183
|
--theme-checkbox-focus-ring: rgba(2, 84, 255, 0.32);
|
|
184
|
-
--theme-chip-height: var(--theme-size-small-3
|
|
185
|
-
--theme-chip-padding-horizontal: var(--spacing-padding-5
|
|
186
|
-
--theme-chip-gap: var(--spacing-gap-1
|
|
184
|
+
--theme-chip-height: var(--theme-size-small-3);
|
|
185
|
+
--theme-chip-padding-horizontal: var(--spacing-padding-5);
|
|
186
|
+
--theme-chip-gap: var(--spacing-gap-1);
|
|
187
|
+
--theme-chip-assist-gap: var(--spacing-gap-2);
|
|
188
|
+
--theme-chip-input-gap: var(--spacing-gap-1);
|
|
189
|
+
--theme-chip-input-padding-left: var(--spacing-padding-4);
|
|
190
|
+
--theme-chip-input-padding-right: var(--spacing-padding-2);
|
|
191
|
+
--theme-chip-label-gap: var(--spacing-gap-1);
|
|
187
192
|
/* 변경: table chip 수치를 Figma table 액션 셀 기준으로 보정한다. */
|
|
188
193
|
/* 변경: table chip 높이는 button table과 동일하게 24px로 맞춘다. */
|
|
189
194
|
--theme-chip-height-table: 24px;
|
|
190
|
-
--theme-chip-padding-horizontal-table: var(--spacing-padding-5
|
|
191
|
-
--theme-chip-padding-left-table: var(--spacing-padding-5
|
|
192
|
-
--theme-chip-padding-right-table: var(--spacing-padding-4
|
|
195
|
+
--theme-chip-padding-horizontal-table: var(--spacing-padding-5);
|
|
196
|
+
--theme-chip-padding-left-table: var(--spacing-padding-5);
|
|
197
|
+
--theme-chip-padding-right-table: var(--spacing-padding-4);
|
|
193
198
|
/* 변경: table chip은 높이 24px 고정을 위해 수직 padding을 사용하지 않는다. */
|
|
194
199
|
--theme-chip-padding-block-table: 0px;
|
|
195
|
-
--theme-chip-gap-table: var(--spacing-gap-1
|
|
196
|
-
--theme-chip-font-size-table: var(--font-caption-large-size
|
|
200
|
+
--theme-chip-gap-table: var(--spacing-gap-1);
|
|
201
|
+
--theme-chip-font-size-table: var(--font-caption-large-size);
|
|
197
202
|
/* 변경: table chip 텍스트는 font-weight를 400으로 고정한다. */
|
|
198
203
|
--theme-chip-font-weight-table: 400;
|
|
199
|
-
--theme-chip-line-height-table: var(--font-caption-large-line-height
|
|
204
|
+
--theme-chip-line-height-table: var(--font-caption-large-line-height);
|
|
200
205
|
/* 변경: Figma 705:13702 기준으로 table chip radius를 6px로 고정한다. */
|
|
201
|
-
--theme-chip-radius-table: var(--theme-radius-medium-2
|
|
202
|
-
--theme-chip-radius: var(--theme-radius-medium-3
|
|
203
|
-
--theme-chip-rounded-radius: var(--theme-radius-large-2
|
|
204
|
-
--theme-chip-font-family: var(--font-body-medium-family
|
|
205
|
-
--theme-chip-font-size: var(--font-body-xsmall-size
|
|
206
|
-
--theme-chip-font-weight: var(--font-body-xsmall-weight
|
|
206
|
+
--theme-chip-radius-table: var(--theme-radius-medium-2);
|
|
207
|
+
--theme-chip-radius: var(--theme-radius-medium-3);
|
|
208
|
+
--theme-chip-rounded-radius: var(--theme-radius-large-2);
|
|
209
|
+
--theme-chip-font-family: var(--font-body-medium-family);
|
|
210
|
+
--theme-chip-font-size: var(--font-body-xsmall-size);
|
|
211
|
+
--theme-chip-font-weight: var(--font-body-xsmall-weight);
|
|
207
212
|
--divider-width: 1px;
|
|
208
213
|
--divider-height: 12px;
|
|
209
214
|
--divider-color: var(--color-border-standard-cool-gray, #e4e5e7);
|
|
@@ -276,16 +281,8 @@
|
|
|
276
281
|
--form-field-helper-font-weight: 400;
|
|
277
282
|
--form-field-helper-line-height: var(--font-caption-medium-line-height);
|
|
278
283
|
--form-field-helper-color: var(--color-label-neutral);
|
|
279
|
-
--info-box-background-color: color-
|
|
280
|
-
|
|
281
|
-
var(--color-feedback-information) 9%,
|
|
282
|
-
var(--color-common-100)
|
|
283
|
-
);
|
|
284
|
-
--info-box-border-color: color-mix(
|
|
285
|
-
in srgb,
|
|
286
|
-
var(--color-feedback-information) 24%,
|
|
287
|
-
var(--color-common-100)
|
|
288
|
-
);
|
|
284
|
+
--info-box-background-color: var(--color-blue-99);
|
|
285
|
+
--info-box-border-color: var(--color-secondary-standard);
|
|
289
286
|
--info-box-icon-color: var(--color-feedback-information);
|
|
290
287
|
--info-box-heading-color: var(--color-feedback-information);
|
|
291
288
|
--info-box-body-color: var(--color-label-strong);
|
|
@@ -505,8 +502,12 @@
|
|
|
505
502
|
--table-border-color: var(--color-border-standard-cool-gray);
|
|
506
503
|
--table-line-head-background-color: var(--color-surface-static-cool-gray);
|
|
507
504
|
--table-grid-head-background-color: var(
|
|
508
|
-
--color-
|
|
505
|
+
--color-surface-static-cool-gray-darker
|
|
506
|
+
);
|
|
507
|
+
--table-grid-row-header-background-color: var(
|
|
508
|
+
--color-surface-static-cool-gray-darker
|
|
509
509
|
);
|
|
510
|
+
--table-grid-row-highlight-background-color: rgba(229, 238, 255, 0.52);
|
|
510
511
|
--table-cell-background-color: var(--color-surface-static-white);
|
|
511
512
|
--table-line-cell-height-head: 44px;
|
|
512
513
|
--table-line-cell-height-body: 56px;
|
|
@@ -1555,7 +1556,7 @@
|
|
|
1555
1556
|
--chip-gap: var(--theme-chip-gap);
|
|
1556
1557
|
--chip-bg: transparent;
|
|
1557
1558
|
--chip-border-color: transparent;
|
|
1558
|
-
--chip-label-color: var(--color-label-standard
|
|
1559
|
+
--chip-label-color: var(--color-label-standard);
|
|
1559
1560
|
display: flex;
|
|
1560
1561
|
align-items: center;
|
|
1561
1562
|
justify-content: center;
|
|
@@ -1589,21 +1590,21 @@ figure.chip {
|
|
|
1589
1590
|
}
|
|
1590
1591
|
|
|
1591
1592
|
.chip:focus-visible {
|
|
1592
|
-
outline: 2px solid var(--color-primary-default
|
|
1593
|
+
outline: 2px solid var(--color-primary-default);
|
|
1593
1594
|
outline-offset: 2px;
|
|
1594
1595
|
}
|
|
1595
1596
|
|
|
1596
1597
|
.chip:where([data-kind=filter]),
|
|
1597
1598
|
.chip:where([data-kind=filter-rounded]) {
|
|
1598
|
-
--chip-bg: var(--color-surface-standard
|
|
1599
|
-
--chip-label-color: var(--color-label-neutral
|
|
1599
|
+
--chip-bg: var(--color-surface-standard);
|
|
1600
|
+
--chip-label-color: var(--color-label-neutral);
|
|
1600
1601
|
--chip-border-color: transparent;
|
|
1601
1602
|
}
|
|
1602
1603
|
|
|
1603
1604
|
.chip:where([data-kind=filter][data-selected=true]),
|
|
1604
1605
|
.chip:where([data-kind=filter-rounded][data-selected=true]) {
|
|
1605
|
-
--chip-bg: var(--color-surface-heavy
|
|
1606
|
-
--chip-label-color: var(--color-common-100
|
|
1606
|
+
--chip-bg: var(--color-surface-heavy);
|
|
1607
|
+
--chip-label-color: var(--color-common-100);
|
|
1607
1608
|
}
|
|
1608
1609
|
|
|
1609
1610
|
.chip:where([data-kind=filter-rounded]) {
|
|
@@ -1611,23 +1612,28 @@ figure.chip {
|
|
|
1611
1612
|
}
|
|
1612
1613
|
|
|
1613
1614
|
.chip:where([data-kind=assist]) {
|
|
1614
|
-
--chip-bg: var(--color-surface-static-neutral
|
|
1615
|
-
--chip-label-color: var(--color-label-strong
|
|
1616
|
-
--chip-gap: var(--
|
|
1615
|
+
--chip-bg: var(--color-surface-static-neutral);
|
|
1616
|
+
--chip-label-color: var(--color-label-strong);
|
|
1617
|
+
--chip-gap: var(--theme-chip-assist-gap);
|
|
1617
1618
|
--chip-border-color: transparent;
|
|
1618
1619
|
}
|
|
1619
1620
|
|
|
1620
1621
|
.chip:where([data-kind=assist][data-selected=true]) {
|
|
1621
|
-
--chip-label-color: var(--color-primary-default
|
|
1622
|
+
--chip-label-color: var(--color-primary-default);
|
|
1622
1623
|
}
|
|
1623
1624
|
|
|
1624
1625
|
.chip:where([data-kind=input]) {
|
|
1625
|
-
--chip-gap: var(--
|
|
1626
|
-
--chip-bg: var(--color-common-100
|
|
1627
|
-
--chip-label-color: var(--color-label-standard
|
|
1628
|
-
--chip-border-color: var(--color-border-
|
|
1629
|
-
padding-left: var(--
|
|
1630
|
-
padding-right: var(--
|
|
1626
|
+
--chip-gap: var(--theme-chip-input-gap);
|
|
1627
|
+
--chip-bg: var(--color-common-100);
|
|
1628
|
+
--chip-label-color: var(--color-label-standard);
|
|
1629
|
+
--chip-border-color: var(--color-border-standard-cool-gray);
|
|
1630
|
+
padding-left: var(--theme-chip-input-padding-left);
|
|
1631
|
+
padding-right: var(--theme-chip-input-padding-right);
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
.chip:where([data-kind=input][data-removable=false]) {
|
|
1635
|
+
padding-left: var(--theme-chip-padding-horizontal);
|
|
1636
|
+
padding-right: var(--theme-chip-padding-horizontal);
|
|
1631
1637
|
}
|
|
1632
1638
|
|
|
1633
1639
|
.chip:where([data-size=table]) {
|
|
@@ -1651,13 +1657,18 @@ figure.chip {
|
|
|
1651
1657
|
padding-right: var(--theme-chip-padding-right-table);
|
|
1652
1658
|
}
|
|
1653
1659
|
|
|
1660
|
+
.chip:where([data-size=table][data-kind=input][data-removable=false]) {
|
|
1661
|
+
padding-left: var(--theme-chip-padding-horizontal-table);
|
|
1662
|
+
padding-right: var(--theme-chip-padding-horizontal-table);
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1654
1665
|
.chip:where([data-size=table][data-kind=input]) .chip-remove-button {
|
|
1655
1666
|
width: fit-content;
|
|
1656
1667
|
height: fit-content;
|
|
1657
1668
|
}
|
|
1658
1669
|
|
|
1659
1670
|
.chip:where([data-kind=input][data-selected=true]) {
|
|
1660
|
-
--chip-border-color: var(--color-border-standard-blue
|
|
1671
|
+
--chip-border-color: var(--color-border-standard-blue);
|
|
1661
1672
|
}
|
|
1662
1673
|
|
|
1663
1674
|
.chip-leading {
|
|
@@ -1671,7 +1682,7 @@ figure.chip {
|
|
|
1671
1682
|
.chip-label {
|
|
1672
1683
|
display: flex;
|
|
1673
1684
|
align-items: center;
|
|
1674
|
-
gap: var(--
|
|
1685
|
+
gap: var(--theme-chip-label-gap);
|
|
1675
1686
|
color: inherit;
|
|
1676
1687
|
line-height: 1;
|
|
1677
1688
|
white-space: nowrap;
|
|
@@ -1685,7 +1696,7 @@ figure.chip {
|
|
|
1685
1696
|
height: fit-content;
|
|
1686
1697
|
border: none;
|
|
1687
1698
|
background: transparent;
|
|
1688
|
-
color: var(--color-label-neutral
|
|
1699
|
+
color: var(--color-label-neutral);
|
|
1689
1700
|
cursor: pointer;
|
|
1690
1701
|
padding: 0;
|
|
1691
1702
|
transition: color 0.16s ease;
|
|
@@ -1693,7 +1704,7 @@ figure.chip {
|
|
|
1693
1704
|
|
|
1694
1705
|
.chip-remove-button:hover,
|
|
1695
1706
|
.chip-remove-button:focus-visible {
|
|
1696
|
-
color: var(--color-label-strong
|
|
1707
|
+
color: var(--color-label-strong);
|
|
1697
1708
|
}
|
|
1698
1709
|
|
|
1699
1710
|
.chip-remove-button svg {
|
|
@@ -2387,9 +2398,9 @@ figure.chip {
|
|
|
2387
2398
|
.input-field-utilities {
|
|
2388
2399
|
display: flex;
|
|
2389
2400
|
align-items: center;
|
|
2390
|
-
gap: var(--spacing-gap-2
|
|
2401
|
+
gap: var(--spacing-gap-2);
|
|
2391
2402
|
flex-shrink: 0;
|
|
2392
|
-
margin-left: var(--spacing-gap-3
|
|
2403
|
+
margin-left: var(--spacing-gap-3);
|
|
2393
2404
|
}
|
|
2394
2405
|
.input-field-utilities .input-affix {
|
|
2395
2406
|
margin-left: 0;
|
|
@@ -2517,6 +2528,7 @@ figure.chip {
|
|
|
2517
2528
|
}
|
|
2518
2529
|
.input[data-state=disabled] .input-field[data-priority=table] {
|
|
2519
2530
|
background-color: transparent;
|
|
2531
|
+
border-color: var(--input-border-table-default-color);
|
|
2520
2532
|
}
|
|
2521
2533
|
|
|
2522
2534
|
.input-side {
|
|
@@ -3941,6 +3953,15 @@ figure.chip {
|
|
|
3941
3953
|
background-color: var(--table-grid-head-background-color);
|
|
3942
3954
|
}
|
|
3943
3955
|
|
|
3956
|
+
.table.table-container[data-layout=grid] .table-body .table-native-cell.table-th {
|
|
3957
|
+
background-color: var(--table-grid-row-header-background-color);
|
|
3958
|
+
}
|
|
3959
|
+
|
|
3960
|
+
.table.table-container[data-layout=grid] .table-row[data-highlighted=true] .table-native-cell.table-th,
|
|
3961
|
+
.table.table-container[data-layout=grid] .table-row[data-highlighted=true] .table-native-cell.table-td {
|
|
3962
|
+
background-color: var(--table-grid-row-highlight-background-color);
|
|
3963
|
+
}
|
|
3964
|
+
|
|
3944
3965
|
.table-native-cell.table-th .table-native-cell-text {
|
|
3945
3966
|
color: var(--table-th-text-color);
|
|
3946
3967
|
font-size: var(--table-th-text-size);
|
package/package.json
CHANGED
|
@@ -21,6 +21,7 @@ const isChipInputProps = (props: ChipProps): props is ChipInputProps =>
|
|
|
21
21
|
* @param {React.ReactNode} [props.leading] assist kind 전용 leading slot.
|
|
22
22
|
* @param {"default" | "table"} [props.size="default"] chip size 축. table은 셀 콘텐츠용 compact 규격이다.
|
|
23
23
|
* @param {string} [props.removeButtonLabel="선택 항목 삭제"] input kind 제거 버튼 라벨.
|
|
24
|
+
* @param {boolean} [props.disabled] input kind 상호작용 비활성화 여부. true이면 remove 버튼을 렌더링하지 않는다.
|
|
24
25
|
* @param {(event: MouseEvent<HTMLButtonElement>) => void} [props.onRemove] input kind 제거 핸들러.
|
|
25
26
|
* @param {string} [props.className] root className.
|
|
26
27
|
*/
|
|
@@ -32,17 +33,19 @@ const Chip = forwardRef<HTMLElement, ChipProps>((props, ref) => {
|
|
|
32
33
|
className,
|
|
33
34
|
removeButtonLabel = "선택 항목 삭제",
|
|
34
35
|
onRemove,
|
|
36
|
+
disabled = false,
|
|
35
37
|
selected,
|
|
36
38
|
leading,
|
|
37
39
|
size = "default",
|
|
38
40
|
...restProps
|
|
39
41
|
} = props;
|
|
42
|
+
const removable = !disabled && typeof onRemove === "function";
|
|
40
43
|
const hasLeading = Boolean(leading);
|
|
41
44
|
const combinedClassName = composeChipClassName({
|
|
42
45
|
kind: "input",
|
|
43
46
|
selected,
|
|
44
47
|
hasLeading,
|
|
45
|
-
removable
|
|
48
|
+
removable,
|
|
46
49
|
className,
|
|
47
50
|
});
|
|
48
51
|
|
|
@@ -52,20 +55,24 @@ const Chip = forwardRef<HTMLElement, ChipProps>((props, ref) => {
|
|
|
52
55
|
ref={ref as Ref<HTMLElementTagNameMap["figure"]>}
|
|
53
56
|
className={combinedClassName}
|
|
54
57
|
data-kind="input"
|
|
55
|
-
data-removable="true"
|
|
58
|
+
data-removable={removable ? "true" : "false"}
|
|
56
59
|
data-size={size}
|
|
57
60
|
data-selected={selected ? "true" : undefined}
|
|
58
61
|
data-has-leading={hasLeading ? "true" : undefined}
|
|
62
|
+
data-disabled={disabled ? "true" : undefined}
|
|
63
|
+
aria-disabled={disabled ? "true" : undefined}
|
|
59
64
|
>
|
|
60
65
|
<span className={CHIP_LABEL_CLASSNAME}>{children}</span>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
{removable ? (
|
|
67
|
+
<button
|
|
68
|
+
type="button"
|
|
69
|
+
className={CHIP_REMOVE_BUTTON_CLASSNAME}
|
|
70
|
+
aria-label={removeButtonLabel}
|
|
71
|
+
onClick={onRemove}
|
|
72
|
+
>
|
|
73
|
+
<RemoveIcon aria-hidden="true" />
|
|
74
|
+
</button>
|
|
75
|
+
) : null}
|
|
69
76
|
</figure>
|
|
70
77
|
);
|
|
71
78
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
--chip-gap: var(--theme-chip-gap);
|
|
3
3
|
--chip-bg: transparent;
|
|
4
4
|
--chip-border-color: transparent;
|
|
5
|
-
--chip-label-color: var(--color-label-standard
|
|
5
|
+
--chip-label-color: var(--color-label-standard);
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
justify-content: center;
|
|
@@ -40,21 +40,21 @@ figure.chip {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.chip:focus-visible {
|
|
43
|
-
outline: 2px solid var(--color-primary-default
|
|
43
|
+
outline: 2px solid var(--color-primary-default);
|
|
44
44
|
outline-offset: 2px;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.chip:where([data-kind="filter"]),
|
|
48
48
|
.chip:where([data-kind="filter-rounded"]) {
|
|
49
|
-
--chip-bg: var(--color-surface-standard
|
|
50
|
-
--chip-label-color: var(--color-label-neutral
|
|
49
|
+
--chip-bg: var(--color-surface-standard);
|
|
50
|
+
--chip-label-color: var(--color-label-neutral);
|
|
51
51
|
--chip-border-color: transparent;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.chip:where([data-kind="filter"][data-selected="true"]),
|
|
55
55
|
.chip:where([data-kind="filter-rounded"][data-selected="true"]) {
|
|
56
|
-
--chip-bg: var(--color-surface-heavy
|
|
57
|
-
--chip-label-color: var(--color-common-100
|
|
56
|
+
--chip-bg: var(--color-surface-heavy);
|
|
57
|
+
--chip-label-color: var(--color-common-100);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.chip:where([data-kind="filter-rounded"]) {
|
|
@@ -62,23 +62,29 @@ figure.chip {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
.chip:where([data-kind="assist"]) {
|
|
65
|
-
--chip-bg: var(--color-surface-static-neutral
|
|
66
|
-
--chip-label-color: var(--color-label-strong
|
|
67
|
-
--chip-gap: var(--
|
|
65
|
+
--chip-bg: var(--color-surface-static-neutral);
|
|
66
|
+
--chip-label-color: var(--color-label-strong);
|
|
67
|
+
--chip-gap: var(--theme-chip-assist-gap);
|
|
68
68
|
--chip-border-color: transparent;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.chip:where([data-kind="assist"][data-selected="true"]) {
|
|
72
|
-
--chip-label-color: var(--color-primary-default
|
|
72
|
+
--chip-label-color: var(--color-primary-default);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.chip:where([data-kind="input"]) {
|
|
76
|
-
--chip-gap: var(--
|
|
77
|
-
--chip-bg: var(--color-common-100
|
|
78
|
-
--chip-label-color: var(--color-label-standard
|
|
79
|
-
--chip-border-color: var(--color-border-
|
|
80
|
-
padding-left: var(--
|
|
81
|
-
padding-right: var(--
|
|
76
|
+
--chip-gap: var(--theme-chip-input-gap);
|
|
77
|
+
--chip-bg: var(--color-common-100);
|
|
78
|
+
--chip-label-color: var(--color-label-standard);
|
|
79
|
+
--chip-border-color: var(--color-border-standard-cool-gray);
|
|
80
|
+
padding-left: var(--theme-chip-input-padding-left);
|
|
81
|
+
padding-right: var(--theme-chip-input-padding-right);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.chip:where([data-kind="input"][data-removable="false"]) {
|
|
85
|
+
// 변경: remove 버튼이 없는 input chip은 좌우 패딩을 12px로 맞춘다.
|
|
86
|
+
padding-left: var(--theme-chip-padding-horizontal);
|
|
87
|
+
padding-right: var(--theme-chip-padding-horizontal);
|
|
82
88
|
}
|
|
83
89
|
|
|
84
90
|
.chip:where([data-size="table"]) {
|
|
@@ -102,13 +108,19 @@ figure.chip {
|
|
|
102
108
|
padding-right: var(--theme-chip-padding-right-table);
|
|
103
109
|
}
|
|
104
110
|
|
|
111
|
+
.chip:where([data-size="table"][data-kind="input"][data-removable="false"]) {
|
|
112
|
+
// 변경: table size에서도 remove 버튼 미노출 시 좌우 패딩을 동일값(12px)으로 맞춘다.
|
|
113
|
+
padding-left: var(--theme-chip-padding-horizontal-table);
|
|
114
|
+
padding-right: var(--theme-chip-padding-horizontal-table);
|
|
115
|
+
}
|
|
116
|
+
|
|
105
117
|
.chip:where([data-size="table"][data-kind="input"]) .chip-remove-button {
|
|
106
118
|
width: fit-content;
|
|
107
119
|
height: fit-content;
|
|
108
120
|
}
|
|
109
121
|
|
|
110
122
|
.chip:where([data-kind="input"][data-selected="true"]) {
|
|
111
|
-
--chip-border-color: var(--color-border-standard-blue
|
|
123
|
+
--chip-border-color: var(--color-border-standard-blue);
|
|
112
124
|
}
|
|
113
125
|
|
|
114
126
|
.chip-leading {
|
|
@@ -122,7 +134,7 @@ figure.chip {
|
|
|
122
134
|
.chip-label {
|
|
123
135
|
display: flex;
|
|
124
136
|
align-items: center;
|
|
125
|
-
gap: var(--
|
|
137
|
+
gap: var(--theme-chip-label-gap);
|
|
126
138
|
color: inherit;
|
|
127
139
|
line-height: 1;
|
|
128
140
|
white-space: nowrap;
|
|
@@ -136,7 +148,7 @@ figure.chip {
|
|
|
136
148
|
height: fit-content;
|
|
137
149
|
border: none;
|
|
138
150
|
background: transparent;
|
|
139
|
-
color: var(--color-label-neutral
|
|
151
|
+
color: var(--color-label-neutral);
|
|
140
152
|
cursor: pointer;
|
|
141
153
|
padding: 0;
|
|
142
154
|
transition: color 0.16s ease;
|
|
@@ -144,7 +156,7 @@ figure.chip {
|
|
|
144
156
|
|
|
145
157
|
.chip-remove-button:hover,
|
|
146
158
|
.chip-remove-button:focus-visible {
|
|
147
|
-
color: var(--color-label-strong
|
|
159
|
+
color: var(--color-label-strong);
|
|
148
160
|
}
|
|
149
161
|
|
|
150
162
|
.chip-remove-button svg {
|
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
/* Chip 기본 토큰 래핑 */
|
|
2
2
|
:root {
|
|
3
|
-
--theme-chip-height: var(--theme-size-small-3
|
|
4
|
-
--theme-chip-padding-horizontal: var(--spacing-padding-5
|
|
5
|
-
--theme-chip-gap: var(--spacing-gap-1
|
|
3
|
+
--theme-chip-height: var(--theme-size-small-3);
|
|
4
|
+
--theme-chip-padding-horizontal: var(--spacing-padding-5);
|
|
5
|
+
--theme-chip-gap: var(--spacing-gap-1);
|
|
6
|
+
--theme-chip-assist-gap: var(--spacing-gap-2);
|
|
7
|
+
--theme-chip-input-gap: var(--spacing-gap-1);
|
|
8
|
+
--theme-chip-input-padding-left: var(--spacing-padding-4);
|
|
9
|
+
--theme-chip-input-padding-right: var(--spacing-padding-2);
|
|
10
|
+
--theme-chip-label-gap: var(--spacing-gap-1);
|
|
6
11
|
/* 변경: table chip 수치를 Figma table 액션 셀 기준으로 보정한다. */
|
|
7
12
|
/* 변경: table chip 높이는 button table과 동일하게 24px로 맞춘다. */
|
|
8
13
|
--theme-chip-height-table: 24px;
|
|
9
|
-
--theme-chip-padding-horizontal-table: var(--spacing-padding-5
|
|
10
|
-
--theme-chip-padding-left-table: var(--spacing-padding-5
|
|
11
|
-
--theme-chip-padding-right-table: var(--spacing-padding-4
|
|
14
|
+
--theme-chip-padding-horizontal-table: var(--spacing-padding-5);
|
|
15
|
+
--theme-chip-padding-left-table: var(--spacing-padding-5);
|
|
16
|
+
--theme-chip-padding-right-table: var(--spacing-padding-4);
|
|
12
17
|
/* 변경: table chip은 높이 24px 고정을 위해 수직 padding을 사용하지 않는다. */
|
|
13
18
|
--theme-chip-padding-block-table: 0px;
|
|
14
|
-
--theme-chip-gap-table: var(--spacing-gap-1
|
|
15
|
-
--theme-chip-font-size-table: var(--font-caption-large-size
|
|
19
|
+
--theme-chip-gap-table: var(--spacing-gap-1);
|
|
20
|
+
--theme-chip-font-size-table: var(--font-caption-large-size);
|
|
16
21
|
/* 변경: table chip 텍스트는 font-weight를 400으로 고정한다. */
|
|
17
22
|
--theme-chip-font-weight-table: 400;
|
|
18
|
-
--theme-chip-line-height-table: var(--font-caption-large-line-height
|
|
23
|
+
--theme-chip-line-height-table: var(--font-caption-large-line-height);
|
|
19
24
|
/* 변경: Figma 705:13702 기준으로 table chip radius를 6px로 고정한다. */
|
|
20
|
-
--theme-chip-radius-table: var(--theme-radius-medium-2
|
|
21
|
-
--theme-chip-radius: var(--theme-radius-medium-3
|
|
22
|
-
--theme-chip-rounded-radius: var(--theme-radius-large-2
|
|
23
|
-
--theme-chip-font-family: var(--font-body-medium-family
|
|
24
|
-
--theme-chip-font-size: var(--font-body-xsmall-size
|
|
25
|
-
--theme-chip-font-weight: var(--font-body-xsmall-weight
|
|
25
|
+
--theme-chip-radius-table: var(--theme-radius-medium-2);
|
|
26
|
+
--theme-chip-radius: var(--theme-radius-medium-3);
|
|
27
|
+
--theme-chip-rounded-radius: var(--theme-radius-large-2);
|
|
28
|
+
--theme-chip-font-family: var(--font-body-medium-family);
|
|
29
|
+
--theme-chip-font-size: var(--font-body-xsmall-size);
|
|
30
|
+
--theme-chip-font-weight: var(--font-body-xsmall-weight);
|
|
26
31
|
}
|
|
@@ -64,6 +64,7 @@ export interface ChipInteractiveProps extends ChipCommonProps, ButtonProps {
|
|
|
64
64
|
* @property {string} [removeButtonLabel] input kind 전용 제거 버튼 aria-label.
|
|
65
65
|
* @property {"default" | "table"} [size] chip 사이즈 축.
|
|
66
66
|
* @property {"input"} kind input kind 고정값.
|
|
67
|
+
* @property {boolean} [disabled] input kind 상호작용 비활성화 여부. true이면 remove 버튼을 노출하지 않는다.
|
|
67
68
|
* @property {(event: MouseEvent<HTMLButtonElement>) => void} [onRemove] 제거 버튼 click 핸들러.
|
|
68
69
|
*/
|
|
69
70
|
export interface ChipInputProps extends ChipCommonProps, FigureProps {
|
|
@@ -75,6 +76,11 @@ export interface ChipInputProps extends ChipCommonProps, FigureProps {
|
|
|
75
76
|
* 제거 버튼 click 핸들러.
|
|
76
77
|
*/
|
|
77
78
|
onRemove?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
79
|
+
/**
|
|
80
|
+
* input kind 상호작용 비활성화 여부.
|
|
81
|
+
* true이면 remove 버튼을 노출하지 않는다.
|
|
82
|
+
*/
|
|
83
|
+
disabled?: boolean;
|
|
78
84
|
}
|
|
79
85
|
|
|
80
86
|
/**
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
// 변경: 실사용 캡처 톤에 맞춰 info 배경/보더 대비를 부드럽게 조정한다.
|
|
3
|
-
--info-box-background-color: color-
|
|
4
|
-
|
|
5
|
-
var(--color-feedback-information) 9%,
|
|
6
|
-
var(--color-common-100)
|
|
7
|
-
);
|
|
8
|
-
--info-box-border-color: color-mix(
|
|
9
|
-
in srgb,
|
|
10
|
-
var(--color-feedback-information) 24%,
|
|
11
|
-
var(--color-common-100)
|
|
12
|
-
);
|
|
3
|
+
--info-box-background-color: var(--color-blue-99);
|
|
4
|
+
--info-box-border-color: var(--color-secondary-standard);
|
|
13
5
|
--info-box-icon-color: var(--color-feedback-information);
|
|
14
6
|
--info-box-heading-color: var(--color-feedback-information);
|
|
15
7
|
--info-box-body-color: var(--color-label-strong);
|
|
@@ -13,6 +13,7 @@ import type { InputFileUploadedChipProps } from "../../types";
|
|
|
13
13
|
* @param {(fileId: string) => void} [props.onRemoveFromInput] input file 컨텍스트 제거 핸들러
|
|
14
14
|
* @param {() => void} [props.onClearSelectedFiles] fileId가 없을 때 선택 파일 초기화 핸들러
|
|
15
15
|
* @param {(event: MouseEvent<HTMLButtonElement>) => void} [props.onRemove] 파일 제거 핸들러
|
|
16
|
+
* @param {boolean} [props.disabled] 비활성화 여부. true이면 remove 버튼을 렌더링하지 않는다.
|
|
16
17
|
* @param {string} [props.removeButtonLabel="업로드 파일 삭제"] 제거 버튼 aria-label
|
|
17
18
|
* @example
|
|
18
19
|
* ```tsx
|
|
@@ -234,9 +234,9 @@
|
|
|
234
234
|
.input-field-utilities {
|
|
235
235
|
display: flex;
|
|
236
236
|
align-items: center;
|
|
237
|
-
gap: var(--spacing-gap-2
|
|
237
|
+
gap: var(--spacing-gap-2);
|
|
238
238
|
flex-shrink: 0;
|
|
239
|
-
margin-left: var(--spacing-gap-3
|
|
239
|
+
margin-left: var(--spacing-gap-3);
|
|
240
240
|
|
|
241
241
|
.input-affix {
|
|
242
242
|
margin-left: 0;
|
|
@@ -391,6 +391,8 @@
|
|
|
391
391
|
&[data-priority="table"] {
|
|
392
392
|
// table priority는 disabled 상태에서도 배경을 투명하게 유지한다.
|
|
393
393
|
background-color: transparent;
|
|
394
|
+
// 변경: table priority disabled는 border도 투명하게 유지해 테이블 셀 경계선과 충돌하지 않도록 한다.
|
|
395
|
+
border-color: var(--input-border-table-default-color);
|
|
394
396
|
}
|
|
395
397
|
}
|
|
396
398
|
}
|
|
@@ -70,6 +70,23 @@
|
|
|
70
70
|
background-color: var(--table-grid-head-background-color);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
// 변경: grid 타입의 row-header(th, tbody)는 항상 전용 배경색을 유지한다.
|
|
74
|
+
.table.table-container[data-layout="grid"]
|
|
75
|
+
.table-body
|
|
76
|
+
.table-native-cell.table-th {
|
|
77
|
+
background-color: var(--table-grid-row-header-background-color);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// 변경: grid 타입 highlighted row는 row-header(th)보다 우선해 th/td 모두 blue tint를 적용한다.
|
|
81
|
+
.table.table-container[data-layout="grid"]
|
|
82
|
+
.table-row[data-highlighted="true"]
|
|
83
|
+
.table-native-cell.table-th,
|
|
84
|
+
.table.table-container[data-layout="grid"]
|
|
85
|
+
.table-row[data-highlighted="true"]
|
|
86
|
+
.table-native-cell.table-td {
|
|
87
|
+
background-color: var(--table-grid-row-highlight-background-color);
|
|
88
|
+
}
|
|
89
|
+
|
|
73
90
|
// 변경: tag selector 대신 className selector로 텍스트 스타일 적용 범위를 고정한다.
|
|
74
91
|
.table-native-cell.table-th .table-native-cell-text {
|
|
75
92
|
color: var(--table-th-text-color);
|
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
--table-border-color: var(--color-border-standard-cool-gray);
|
|
4
4
|
--table-line-head-background-color: var(--color-surface-static-cool-gray);
|
|
5
5
|
--table-grid-head-background-color: var(
|
|
6
|
-
--color-
|
|
6
|
+
--color-surface-static-cool-gray-darker
|
|
7
7
|
);
|
|
8
|
+
// 변경: grid body row-header(th)는 Figma 기준으로 static-cool-gray-darker를 유지한다.
|
|
9
|
+
--table-grid-row-header-background-color: var(
|
|
10
|
+
--color-surface-static-cool-gray-darker
|
|
11
|
+
);
|
|
12
|
+
// 변경: grid highlighted row의 데이터 셀(td)은 blue tint(52%)를 사용한다.
|
|
13
|
+
--table-grid-row-highlight-background-color: rgba(229, 238, 255, 0.52);
|
|
8
14
|
--table-cell-background-color: var(--color-surface-static-white);
|
|
9
15
|
|
|
10
16
|
--table-line-cell-height-head: 44px;
|