@bigtablet/design-system 2.1.0 → 2.2.0
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/index.css +32 -9
- package/dist/index.d.ts +4 -1
- package/dist/index.js +11 -2
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1523,16 +1523,22 @@
|
|
|
1523
1523
|
display: inline-flex;
|
|
1524
1524
|
flex-direction: column;
|
|
1525
1525
|
width: 100%;
|
|
1526
|
-
gap: 4px;
|
|
1527
1526
|
font-family: "Pretendard", sans-serif;
|
|
1528
1527
|
}
|
|
1529
1528
|
.select_label {
|
|
1529
|
+
position: absolute;
|
|
1530
|
+
top: -8px;
|
|
1531
|
+
left: 16px;
|
|
1532
|
+
padding: 0 4px;
|
|
1533
|
+
background: var(--select-surface, #FFFFFF);
|
|
1534
|
+
font-family: "Pretendard", sans-serif;
|
|
1530
1535
|
font-size: 12px;
|
|
1531
1536
|
font-weight: 400;
|
|
1532
1537
|
line-height: 16px;
|
|
1533
|
-
letter-spacing:
|
|
1534
|
-
font-weight: 500;
|
|
1538
|
+
letter-spacing: 0.32px;
|
|
1535
1539
|
color: #121212;
|
|
1540
|
+
white-space: nowrap;
|
|
1541
|
+
pointer-events: none;
|
|
1536
1542
|
}
|
|
1537
1543
|
.select_control {
|
|
1538
1544
|
width: 100%;
|
|
@@ -1542,8 +1548,8 @@
|
|
|
1542
1548
|
gap: 8px;
|
|
1543
1549
|
cursor: pointer;
|
|
1544
1550
|
color: #121212;
|
|
1545
|
-
background: #FFFFFF;
|
|
1546
|
-
border-radius:
|
|
1551
|
+
background: var(--select-surface, #FFFFFF);
|
|
1552
|
+
border-radius: 12px;
|
|
1547
1553
|
transition:
|
|
1548
1554
|
border-color 0.2s ease-in-out,
|
|
1549
1555
|
box-shadow 0.2s ease-in-out,
|
|
@@ -1578,7 +1584,7 @@
|
|
|
1578
1584
|
background: rgb(251.7, 251.7, 251.7);
|
|
1579
1585
|
}
|
|
1580
1586
|
.select_variant_filled.is_open {
|
|
1581
|
-
background: #FFFFFF;
|
|
1587
|
+
background: var(--select-surface, #FFFFFF);
|
|
1582
1588
|
border-color: #121212;
|
|
1583
1589
|
box-shadow: 0 0 0 3px rgba(18, 18, 18, 0.15);
|
|
1584
1590
|
}
|
|
@@ -1590,11 +1596,12 @@
|
|
|
1590
1596
|
background: rgba(0, 0, 0, 0.05);
|
|
1591
1597
|
}
|
|
1592
1598
|
.select_variant_ghost.is_open {
|
|
1593
|
-
background: #FFFFFF;
|
|
1599
|
+
background: var(--select-surface, #FFFFFF);
|
|
1594
1600
|
border-color: #121212;
|
|
1595
1601
|
box-shadow: 0 0 0 3px rgba(18, 18, 18, 0.15);
|
|
1596
1602
|
}
|
|
1597
1603
|
.select_size_sm {
|
|
1604
|
+
min-height: 40px;
|
|
1598
1605
|
padding: 8px 16px;
|
|
1599
1606
|
font-size: 12px;
|
|
1600
1607
|
font-weight: 400;
|
|
@@ -1602,6 +1609,7 @@
|
|
|
1602
1609
|
letter-spacing: 0px;
|
|
1603
1610
|
}
|
|
1604
1611
|
.select_size_md {
|
|
1612
|
+
min-height: 52px;
|
|
1605
1613
|
padding: 12px 20px;
|
|
1606
1614
|
font-size: 15px;
|
|
1607
1615
|
font-weight: 400;
|
|
@@ -1609,6 +1617,7 @@
|
|
|
1609
1617
|
letter-spacing: 0px;
|
|
1610
1618
|
}
|
|
1611
1619
|
.select_size_lg {
|
|
1620
|
+
min-height: 52px;
|
|
1612
1621
|
padding: 16px 24px;
|
|
1613
1622
|
font-size: 16px;
|
|
1614
1623
|
font-weight: 400;
|
|
@@ -1703,6 +1712,10 @@
|
|
|
1703
1712
|
cursor: not-allowed;
|
|
1704
1713
|
color: #888888;
|
|
1705
1714
|
}
|
|
1715
|
+
.select:has(.select_control:disabled) .select_label,
|
|
1716
|
+
.select:has(.select_control.is_disabled) .select_label {
|
|
1717
|
+
color: rgba(26, 26, 26, 0.38);
|
|
1718
|
+
}
|
|
1706
1719
|
|
|
1707
1720
|
/* src/ui/spinner/style.scss */
|
|
1708
1721
|
@keyframes skeleton_loading {
|
|
@@ -1854,12 +1867,22 @@
|
|
|
1854
1867
|
padding: 4px 0;
|
|
1855
1868
|
border: 1px solid #E5E5E5;
|
|
1856
1869
|
border-radius: 12px;
|
|
1857
|
-
background:
|
|
1870
|
+
background: inherit;
|
|
1858
1871
|
transition: border-color 0.2s ease-in-out;
|
|
1859
1872
|
}
|
|
1860
1873
|
.text_field_container:hover {
|
|
1861
1874
|
border-color: #B3B3B3;
|
|
1862
1875
|
}
|
|
1876
|
+
.text_field_size_sm .text_field_container {
|
|
1877
|
+
min-height: 40px;
|
|
1878
|
+
}
|
|
1879
|
+
.text_field_size_sm .text_field_input_wrap {
|
|
1880
|
+
padding: 8px 16px;
|
|
1881
|
+
}
|
|
1882
|
+
.text_field_size_sm .text_field_input {
|
|
1883
|
+
font-size: 14px;
|
|
1884
|
+
line-height: 20px;
|
|
1885
|
+
}
|
|
1863
1886
|
.text_field_container:focus-within {
|
|
1864
1887
|
border-color: #121212;
|
|
1865
1888
|
}
|
|
@@ -1868,7 +1891,7 @@
|
|
|
1868
1891
|
top: -8px;
|
|
1869
1892
|
left: 16px;
|
|
1870
1893
|
padding: 0 4px;
|
|
1871
|
-
background: #FFFFFF;
|
|
1894
|
+
background: var(--text-field-surface, #FFFFFF);
|
|
1872
1895
|
font-family: "Pretendard", sans-serif;
|
|
1873
1896
|
font-size: 12px;
|
|
1874
1897
|
font-weight: 400;
|
package/dist/index.d.ts
CHANGED
|
@@ -924,7 +924,10 @@ declare const Toggle: {
|
|
|
924
924
|
displayName: string;
|
|
925
925
|
};
|
|
926
926
|
|
|
927
|
+
type TextFieldSize = "sm" | "md";
|
|
927
928
|
interface TextFieldProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange" | "value" | "defaultValue"> {
|
|
929
|
+
/** 입력 필드 크기 (기본값: "md") */
|
|
930
|
+
size?: TextFieldSize;
|
|
928
931
|
/** 입력 필드 위에 표시할 라벨 텍스트 */
|
|
929
932
|
label?: string;
|
|
930
933
|
/** 라벨 표시 여부 (기본값: true) */
|
|
@@ -959,7 +962,7 @@ interface TextFieldProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEleme
|
|
|
959
962
|
* @returns 렌더링된 텍스트 필드 UI
|
|
960
963
|
*/
|
|
961
964
|
declare const TextField: {
|
|
962
|
-
({ id, label, showLabel, supportingText, error, leadingIcon, trailingIcon, clearable, fullWidth, className, onChangeAction, value, defaultValue, transformValue, ref, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element;
|
|
965
|
+
({ id, label, showLabel, supportingText, error, leadingIcon, trailingIcon, clearable, fullWidth, size, className, onChangeAction, value, defaultValue, transformValue, ref, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element;
|
|
963
966
|
displayName: string;
|
|
964
967
|
};
|
|
965
968
|
|
package/dist/index.js
CHANGED
|
@@ -1789,6 +1789,12 @@ var OtpInput = ({
|
|
|
1789
1789
|
focusInput(index + 1);
|
|
1790
1790
|
}
|
|
1791
1791
|
};
|
|
1792
|
+
const handleFocus = (index) => {
|
|
1793
|
+
const firstEmpty = digits.findIndex((d) => d === "");
|
|
1794
|
+
if (firstEmpty !== -1 && firstEmpty < index) {
|
|
1795
|
+
focusInput(firstEmpty);
|
|
1796
|
+
}
|
|
1797
|
+
};
|
|
1792
1798
|
const handleKeyDown = (index, e) => {
|
|
1793
1799
|
if (e.key === "Backspace") {
|
|
1794
1800
|
if (digits[index]) {
|
|
@@ -1838,8 +1844,9 @@ var OtpInput = ({
|
|
|
1838
1844
|
maxLength: 1,
|
|
1839
1845
|
value: digit,
|
|
1840
1846
|
onChange: (e) => handleChange(i, e),
|
|
1847
|
+
onFocus: () => handleFocus(i),
|
|
1841
1848
|
onKeyDown: (e) => handleKeyDown(i, e),
|
|
1842
|
-
onPaste:
|
|
1849
|
+
onPaste: handlePaste,
|
|
1843
1850
|
disabled,
|
|
1844
1851
|
autoFocus: autoFocus && i === 0,
|
|
1845
1852
|
"aria-label": `${i + 1}\uBC88\uC9F8 \uC790\uB9AC`,
|
|
@@ -2149,7 +2156,7 @@ var Select = ({
|
|
|
2149
2156
|
const spaceAbove = rect.top;
|
|
2150
2157
|
setDropUp(spaceBelow < listHeight && spaceAbove > spaceBelow);
|
|
2151
2158
|
}, [isOpen, options.length]);
|
|
2152
|
-
const rootClassName = cn("select", className);
|
|
2159
|
+
const rootClassName = cn("select", { select_has_label: !!label }, className);
|
|
2153
2160
|
const controlClassName = cn(
|
|
2154
2161
|
"select_control",
|
|
2155
2162
|
`select_variant_${variant}`,
|
|
@@ -2298,6 +2305,7 @@ var TextField = ({
|
|
|
2298
2305
|
trailingIcon,
|
|
2299
2306
|
clearable,
|
|
2300
2307
|
fullWidth,
|
|
2308
|
+
size = "md",
|
|
2301
2309
|
className,
|
|
2302
2310
|
onChangeAction,
|
|
2303
2311
|
value,
|
|
@@ -2326,6 +2334,7 @@ var TextField = ({
|
|
|
2326
2334
|
}, [onChangeAction]);
|
|
2327
2335
|
const rootClassName = cn(
|
|
2328
2336
|
"text_field",
|
|
2337
|
+
size === "sm" && "text_field_size_sm",
|
|
2329
2338
|
fullWidth && "text_field_full_width",
|
|
2330
2339
|
error && "text_field_error",
|
|
2331
2340
|
props.disabled && "text_field_disabled",
|