@bigtablet/design-system 2.1.0 → 2.2.1
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 +49 -21
- package/dist/index.d.ts +5 -1
- package/dist/index.js +48 -37
- 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 {
|
|
@@ -1845,16 +1858,12 @@
|
|
|
1845
1858
|
width: 100%;
|
|
1846
1859
|
}
|
|
1847
1860
|
.text_field_container {
|
|
1848
|
-
position: relative;
|
|
1849
|
-
display: flex;
|
|
1850
|
-
align-items: center;
|
|
1851
|
-
gap: 4px;
|
|
1852
|
-
width: 100%;
|
|
1853
|
-
min-height: 52px;
|
|
1854
|
-
padding: 4px 0;
|
|
1855
1861
|
border: 1px solid #E5E5E5;
|
|
1856
1862
|
border-radius: 12px;
|
|
1857
|
-
|
|
1863
|
+
padding: 0;
|
|
1864
|
+
margin: 0;
|
|
1865
|
+
min-inline-size: 0;
|
|
1866
|
+
width: 100%;
|
|
1858
1867
|
transition: border-color 0.2s ease-in-out;
|
|
1859
1868
|
}
|
|
1860
1869
|
.text_field_container:hover {
|
|
@@ -1863,21 +1872,40 @@
|
|
|
1863
1872
|
.text_field_container:focus-within {
|
|
1864
1873
|
border-color: #121212;
|
|
1865
1874
|
}
|
|
1875
|
+
.text_field_inner {
|
|
1876
|
+
display: flex;
|
|
1877
|
+
align-items: center;
|
|
1878
|
+
gap: 4px;
|
|
1879
|
+
min-height: 52px;
|
|
1880
|
+
padding: 4px 0;
|
|
1881
|
+
}
|
|
1882
|
+
.text_field_size_sm .text_field_inner {
|
|
1883
|
+
min-height: 40px;
|
|
1884
|
+
}
|
|
1885
|
+
.text_field_size_sm .text_field_input_wrap {
|
|
1886
|
+
padding: 8px 16px;
|
|
1887
|
+
}
|
|
1888
|
+
.text_field_size_sm .text_field_input {
|
|
1889
|
+
font-size: 14px;
|
|
1890
|
+
line-height: 20px;
|
|
1891
|
+
}
|
|
1866
1892
|
.text_field_label {
|
|
1867
|
-
|
|
1868
|
-
top: -8px;
|
|
1869
|
-
left: 16px;
|
|
1893
|
+
margin-inline-start: 12px;
|
|
1870
1894
|
padding: 0 4px;
|
|
1871
|
-
|
|
1895
|
+
color: #121212;
|
|
1896
|
+
transition: color 0.2s ease-in-out;
|
|
1897
|
+
}
|
|
1898
|
+
.text_field_label > label {
|
|
1899
|
+
display: block;
|
|
1872
1900
|
font-family: "Pretendard", sans-serif;
|
|
1873
1901
|
font-size: 12px;
|
|
1874
1902
|
font-weight: 400;
|
|
1875
1903
|
line-height: 16px;
|
|
1876
1904
|
letter-spacing: 0.32px;
|
|
1877
|
-
color:
|
|
1905
|
+
color: inherit;
|
|
1878
1906
|
white-space: nowrap;
|
|
1879
1907
|
pointer-events: none;
|
|
1880
|
-
|
|
1908
|
+
cursor: default;
|
|
1881
1909
|
}
|
|
1882
1910
|
.text_field_input_wrap {
|
|
1883
1911
|
flex: 1;
|
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) */
|
|
@@ -955,11 +958,12 @@ interface TextFieldProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEleme
|
|
|
955
958
|
/**
|
|
956
959
|
* 텍스트 필드를 렌더링한다.
|
|
957
960
|
* Figma DS 기준 outlined 스타일 + floating label을 지원한다.
|
|
961
|
+
* fieldset + legend 구조로 배경색 없이 border notch를 자연스럽게 처리한다.
|
|
958
962
|
* @param props 텍스트 필드 속성
|
|
959
963
|
* @returns 렌더링된 텍스트 필드 UI
|
|
960
964
|
*/
|
|
961
965
|
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;
|
|
966
|
+
({ id, label, showLabel, supportingText, error, leadingIcon, trailingIcon, clearable, fullWidth, size, className, onChangeAction, value, defaultValue, transformValue, ref, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element;
|
|
963
967
|
displayName: string;
|
|
964
968
|
};
|
|
965
969
|
|
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",
|
|
@@ -2342,43 +2351,45 @@ var TextField = ({
|
|
|
2342
2351
|
}
|
|
2343
2352
|
) : trailingIcon ? /* @__PURE__ */ jsx("span", { className: "text_field_icon", "aria-hidden": "true", children: trailingIcon }) : null;
|
|
2344
2353
|
return /* @__PURE__ */ jsxs("div", { className: rootClassName, children: [
|
|
2345
|
-
/* @__PURE__ */ jsxs("
|
|
2346
|
-
|
|
2347
|
-
/* @__PURE__ */
|
|
2348
|
-
"
|
|
2349
|
-
{
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2354
|
+
/* @__PURE__ */ jsxs("fieldset", { className: "text_field_container", children: [
|
|
2355
|
+
label && showLabel && /* @__PURE__ */ jsx("legend", { className: "text_field_label", children: /* @__PURE__ */ jsx("label", { htmlFor: inputId, children: label }) }),
|
|
2356
|
+
/* @__PURE__ */ jsxs("div", { className: "text_field_inner", children: [
|
|
2357
|
+
leadingIcon && /* @__PURE__ */ jsx("span", { className: "text_field_icon", "aria-hidden": "true", children: leadingIcon }),
|
|
2358
|
+
/* @__PURE__ */ jsx("div", { className: cn("text_field_input_wrap", resolvedTrailing && "text_field_input_wrap_no_pad_right"), children: /* @__PURE__ */ jsx(
|
|
2359
|
+
"input",
|
|
2360
|
+
{
|
|
2361
|
+
id: inputId,
|
|
2362
|
+
ref,
|
|
2363
|
+
className: "text_field_input",
|
|
2364
|
+
"aria-invalid": !!error,
|
|
2365
|
+
"aria-describedby": helperId,
|
|
2366
|
+
"aria-label": !showLabel ? label : void 0,
|
|
2367
|
+
...props,
|
|
2368
|
+
value: innerValue,
|
|
2369
|
+
onCompositionStart: () => {
|
|
2370
|
+
isComposingRef.current = true;
|
|
2371
|
+
},
|
|
2372
|
+
onCompositionEnd: (event) => {
|
|
2373
|
+
isComposingRef.current = false;
|
|
2374
|
+
const rawValue = event.currentTarget.value;
|
|
2375
|
+
const nextValue = applyTransform(rawValue);
|
|
2376
|
+
setInnerValue(nextValue);
|
|
2377
|
+
onChangeAction?.(nextValue);
|
|
2378
|
+
},
|
|
2379
|
+
onChange: (event) => {
|
|
2380
|
+
const rawValue = event.target.value;
|
|
2381
|
+
if (isComposingRef.current) {
|
|
2382
|
+
setInnerValue(rawValue);
|
|
2383
|
+
return;
|
|
2384
|
+
}
|
|
2385
|
+
const nextValue = applyTransform(rawValue);
|
|
2386
|
+
setInnerValue(nextValue);
|
|
2387
|
+
onChangeAction?.(nextValue);
|
|
2373
2388
|
}
|
|
2374
|
-
const nextValue = applyTransform(rawValue);
|
|
2375
|
-
setInnerValue(nextValue);
|
|
2376
|
-
onChangeAction?.(nextValue);
|
|
2377
2389
|
}
|
|
2378
|
-
}
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
label && showLabel && /* @__PURE__ */ jsx("label", { className: "text_field_label", htmlFor: inputId, children: label })
|
|
2390
|
+
) }),
|
|
2391
|
+
resolvedTrailing
|
|
2392
|
+
] })
|
|
2382
2393
|
] }),
|
|
2383
2394
|
supportingText && /* @__PURE__ */ jsx("div", { id: helperId, className: "text_field_helper", children: supportingText })
|
|
2384
2395
|
] });
|