@bigtablet/design-system 2.2.0 → 2.2.2
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 +26 -19
- package/dist/index.d.ts +1 -0
- package/dist/index.js +37 -35
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1858,22 +1858,29 @@
|
|
|
1858
1858
|
width: 100%;
|
|
1859
1859
|
}
|
|
1860
1860
|
.text_field_container {
|
|
1861
|
-
position: relative;
|
|
1862
|
-
display: flex;
|
|
1863
|
-
align-items: center;
|
|
1864
|
-
gap: 4px;
|
|
1865
|
-
width: 100%;
|
|
1866
|
-
min-height: 52px;
|
|
1867
|
-
padding: 4px 0;
|
|
1868
1861
|
border: 1px solid #E5E5E5;
|
|
1869
1862
|
border-radius: 12px;
|
|
1870
|
-
|
|
1871
|
-
|
|
1863
|
+
padding: 0;
|
|
1864
|
+
margin: 0;
|
|
1865
|
+
min-inline-size: 0;
|
|
1866
|
+
width: 100%;
|
|
1867
|
+
background-color: #FFFFFF;
|
|
1868
|
+
transition: border-color 0.2s ease-in-out, background-color 0.2s ease-in-out;
|
|
1872
1869
|
}
|
|
1873
1870
|
.text_field_container:hover {
|
|
1874
1871
|
border-color: #B3B3B3;
|
|
1875
1872
|
}
|
|
1876
|
-
.
|
|
1873
|
+
.text_field_container:focus-within {
|
|
1874
|
+
border-color: #121212;
|
|
1875
|
+
}
|
|
1876
|
+
.text_field_inner {
|
|
1877
|
+
display: flex;
|
|
1878
|
+
align-items: center;
|
|
1879
|
+
gap: 4px;
|
|
1880
|
+
min-height: 52px;
|
|
1881
|
+
padding: 4px 0;
|
|
1882
|
+
}
|
|
1883
|
+
.text_field_size_sm .text_field_inner {
|
|
1877
1884
|
min-height: 40px;
|
|
1878
1885
|
}
|
|
1879
1886
|
.text_field_size_sm .text_field_input_wrap {
|
|
@@ -1883,24 +1890,23 @@
|
|
|
1883
1890
|
font-size: 14px;
|
|
1884
1891
|
line-height: 20px;
|
|
1885
1892
|
}
|
|
1886
|
-
.text_field_container:focus-within {
|
|
1887
|
-
border-color: #121212;
|
|
1888
|
-
}
|
|
1889
1893
|
.text_field_label {
|
|
1890
|
-
|
|
1891
|
-
top: -8px;
|
|
1892
|
-
left: 16px;
|
|
1894
|
+
margin-inline-start: 12px;
|
|
1893
1895
|
padding: 0 4px;
|
|
1894
|
-
|
|
1896
|
+
color: #121212;
|
|
1897
|
+
transition: color 0.2s ease-in-out;
|
|
1898
|
+
}
|
|
1899
|
+
.text_field_label > label {
|
|
1900
|
+
display: block;
|
|
1895
1901
|
font-family: "Pretendard", sans-serif;
|
|
1896
1902
|
font-size: 12px;
|
|
1897
1903
|
font-weight: 400;
|
|
1898
1904
|
line-height: 16px;
|
|
1899
1905
|
letter-spacing: 0.32px;
|
|
1900
|
-
color:
|
|
1906
|
+
color: inherit;
|
|
1901
1907
|
white-space: nowrap;
|
|
1902
1908
|
pointer-events: none;
|
|
1903
|
-
|
|
1909
|
+
cursor: default;
|
|
1904
1910
|
}
|
|
1905
1911
|
.text_field_input_wrap {
|
|
1906
1912
|
flex: 1;
|
|
@@ -1994,6 +2000,7 @@
|
|
|
1994
2000
|
}
|
|
1995
2001
|
.text_field_disabled .text_field_container {
|
|
1996
2002
|
border-color: rgba(26, 26, 26, 0.12);
|
|
2003
|
+
background-color: #F4F4F4;
|
|
1997
2004
|
}
|
|
1998
2005
|
.text_field_disabled .text_field_container:hover {
|
|
1999
2006
|
border-color: rgba(26, 26, 26, 0.12);
|
package/dist/index.d.ts
CHANGED
|
@@ -958,6 +958,7 @@ interface TextFieldProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEleme
|
|
|
958
958
|
/**
|
|
959
959
|
* 텍스트 필드를 렌더링한다.
|
|
960
960
|
* Figma DS 기준 outlined 스타일 + floating label을 지원한다.
|
|
961
|
+
* fieldset + legend 구조로 배경색 없이 border notch를 자연스럽게 처리한다.
|
|
961
962
|
* @param props 텍스트 필드 속성
|
|
962
963
|
* @returns 렌더링된 텍스트 필드 UI
|
|
963
964
|
*/
|
package/dist/index.js
CHANGED
|
@@ -2351,43 +2351,45 @@ var TextField = ({
|
|
|
2351
2351
|
}
|
|
2352
2352
|
) : trailingIcon ? /* @__PURE__ */ jsx("span", { className: "text_field_icon", "aria-hidden": "true", children: trailingIcon }) : null;
|
|
2353
2353
|
return /* @__PURE__ */ jsxs("div", { className: rootClassName, children: [
|
|
2354
|
-
/* @__PURE__ */ jsxs("
|
|
2355
|
-
|
|
2356
|
-
/* @__PURE__ */
|
|
2357
|
-
"
|
|
2358
|
-
{
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
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);
|
|
2382
2388
|
}
|
|
2383
|
-
const nextValue = applyTransform(rawValue);
|
|
2384
|
-
setInnerValue(nextValue);
|
|
2385
|
-
onChangeAction?.(nextValue);
|
|
2386
2389
|
}
|
|
2387
|
-
}
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
label && showLabel && /* @__PURE__ */ jsx("label", { className: "text_field_label", htmlFor: inputId, children: label })
|
|
2390
|
+
) }),
|
|
2391
|
+
resolvedTrailing
|
|
2392
|
+
] })
|
|
2391
2393
|
] }),
|
|
2392
2394
|
supportingText && /* @__PURE__ */ jsx("div", { id: helperId, className: "text_field_helper", children: supportingText })
|
|
2393
2395
|
] });
|