@bigtablet/design-system 2.2.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 +23 -18
- 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,28 @@
|
|
|
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
|
-
|
|
1863
|
+
padding: 0;
|
|
1864
|
+
margin: 0;
|
|
1865
|
+
min-inline-size: 0;
|
|
1866
|
+
width: 100%;
|
|
1871
1867
|
transition: border-color 0.2s ease-in-out;
|
|
1872
1868
|
}
|
|
1873
1869
|
.text_field_container:hover {
|
|
1874
1870
|
border-color: #B3B3B3;
|
|
1875
1871
|
}
|
|
1876
|
-
.
|
|
1872
|
+
.text_field_container:focus-within {
|
|
1873
|
+
border-color: #121212;
|
|
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 {
|
|
1877
1883
|
min-height: 40px;
|
|
1878
1884
|
}
|
|
1879
1885
|
.text_field_size_sm .text_field_input_wrap {
|
|
@@ -1883,24 +1889,23 @@
|
|
|
1883
1889
|
font-size: 14px;
|
|
1884
1890
|
line-height: 20px;
|
|
1885
1891
|
}
|
|
1886
|
-
.text_field_container:focus-within {
|
|
1887
|
-
border-color: #121212;
|
|
1888
|
-
}
|
|
1889
1892
|
.text_field_label {
|
|
1890
|
-
|
|
1891
|
-
top: -8px;
|
|
1892
|
-
left: 16px;
|
|
1893
|
+
margin-inline-start: 12px;
|
|
1893
1894
|
padding: 0 4px;
|
|
1894
|
-
|
|
1895
|
+
color: #121212;
|
|
1896
|
+
transition: color 0.2s ease-in-out;
|
|
1897
|
+
}
|
|
1898
|
+
.text_field_label > label {
|
|
1899
|
+
display: block;
|
|
1895
1900
|
font-family: "Pretendard", sans-serif;
|
|
1896
1901
|
font-size: 12px;
|
|
1897
1902
|
font-weight: 400;
|
|
1898
1903
|
line-height: 16px;
|
|
1899
1904
|
letter-spacing: 0.32px;
|
|
1900
|
-
color:
|
|
1905
|
+
color: inherit;
|
|
1901
1906
|
white-space: nowrap;
|
|
1902
1907
|
pointer-events: none;
|
|
1903
|
-
|
|
1908
|
+
cursor: default;
|
|
1904
1909
|
}
|
|
1905
1910
|
.text_field_input_wrap {
|
|
1906
1911
|
flex: 1;
|
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
|
] });
|