@seed-design/lynx-react 0.3.1 → 0.4.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.
Files changed (91) hide show
  1. package/lib/components/Field/Field.d.ts +47 -0
  2. package/lib/components/Field/Field.d.ts.map +1 -0
  3. package/lib/components/Field/Field.jsx +121 -0
  4. package/lib/components/Field/Field.namespace.d.ts +2 -0
  5. package/lib/components/Field/Field.namespace.d.ts.map +1 -0
  6. package/lib/components/Field/Field.namespace.js +16 -0
  7. package/lib/components/Field/context.d.ts +19 -0
  8. package/lib/components/Field/context.d.ts.map +1 -0
  9. package/lib/components/Field/context.js +10 -0
  10. package/lib/components/Field/index.d.ts +3 -0
  11. package/lib/components/Field/index.d.ts.map +1 -0
  12. package/lib/components/KeyboardAvoidingScrollView/KeyboardAvoidingScrollView.d.ts +42 -0
  13. package/lib/components/KeyboardAvoidingScrollView/KeyboardAvoidingScrollView.d.ts.map +1 -0
  14. package/lib/components/KeyboardAvoidingScrollView/KeyboardAvoidingScrollView.jsx +140 -0
  15. package/lib/components/KeyboardAvoidingScrollView/context.d.ts +17 -0
  16. package/lib/components/KeyboardAvoidingScrollView/context.d.ts.map +1 -0
  17. package/lib/components/KeyboardAvoidingScrollView/context.js +12 -0
  18. package/lib/components/KeyboardAvoidingScrollView/engine.d.ts +50 -0
  19. package/lib/components/KeyboardAvoidingScrollView/engine.d.ts.map +1 -0
  20. package/lib/components/KeyboardAvoidingScrollView/engine.js +259 -0
  21. package/lib/components/KeyboardAvoidingScrollView/geometry.d.ts +50 -0
  22. package/lib/components/KeyboardAvoidingScrollView/geometry.d.ts.map +1 -0
  23. package/lib/components/KeyboardAvoidingScrollView/geometry.js +90 -0
  24. package/lib/components/KeyboardAvoidingScrollView/index.d.ts +2 -0
  25. package/lib/components/KeyboardAvoidingScrollView/index.d.ts.map +1 -0
  26. package/lib/components/KeyboardAvoidingScrollView/keyboard-event-source.d.ts +11 -0
  27. package/lib/components/KeyboardAvoidingScrollView/keyboard-event-source.d.ts.map +1 -0
  28. package/lib/components/KeyboardAvoidingScrollView/keyboard-event-source.js +43 -0
  29. package/lib/components/KeyboardAvoidingScrollView/native-driver.d.ts +34 -0
  30. package/lib/components/KeyboardAvoidingScrollView/native-driver.d.ts.map +1 -0
  31. package/lib/components/KeyboardAvoidingScrollView/native-driver.js +133 -0
  32. package/lib/components/ProgressCircle/ProgressCircle.d.ts.map +1 -1
  33. package/lib/components/ProgressCircle/ProgressCircle.jsx +36 -5
  34. package/lib/components/Stack/Stack.d.ts.map +1 -1
  35. package/lib/components/Stack/Stack.jsx +10 -1
  36. package/lib/components/TagGroup/TagGroup.d.ts +2 -1
  37. package/lib/components/TagGroup/TagGroup.d.ts.map +1 -1
  38. package/lib/components/TagGroup/TagGroup.jsx +2 -1
  39. package/lib/components/TextField/TextField.d.ts +131 -0
  40. package/lib/components/TextField/TextField.d.ts.map +1 -0
  41. package/lib/components/TextField/TextField.jsx +434 -0
  42. package/lib/components/TextField/TextField.namespace.d.ts +2 -0
  43. package/lib/components/TextField/TextField.namespace.d.ts.map +1 -0
  44. package/lib/components/TextField/TextField.namespace.js +14 -0
  45. package/lib/components/TextField/context.d.ts +22 -0
  46. package/lib/components/TextField/context.d.ts.map +1 -0
  47. package/lib/components/TextField/context.js +7 -0
  48. package/lib/components/TextField/index.d.ts +4 -0
  49. package/lib/components/TextField/index.d.ts.map +1 -0
  50. package/lib/components/TextField/useTextFieldWithGraphemes.d.ts +24 -0
  51. package/lib/components/TextField/useTextFieldWithGraphemes.d.ts.map +1 -0
  52. package/lib/components/TextField/useTextFieldWithGraphemes.js +47 -0
  53. package/lib/components/index.d.ts +3 -0
  54. package/lib/components/index.d.ts.map +1 -1
  55. package/lib/index.js +7 -1
  56. package/lib/node_modules/.bun/unicode-segmenter@0.14.5/node_modules/unicode-segmenter/_grapheme_data.js +8 -0
  57. package/lib/node_modules/.bun/unicode-segmenter@0.14.5/node_modules/unicode-segmenter/_incb_data.js +14 -0
  58. package/lib/node_modules/.bun/unicode-segmenter@0.14.5/node_modules/unicode-segmenter/core.js +68 -0
  59. package/lib/node_modules/.bun/unicode-segmenter@0.14.5/node_modules/unicode-segmenter/grapheme.js +175 -0
  60. package/package.json +7 -5
  61. package/src/components/Field/Field.namespace.ts +19 -0
  62. package/src/components/Field/Field.test.tsx +81 -0
  63. package/src/components/Field/Field.tsx +252 -0
  64. package/src/components/Field/context.ts +26 -0
  65. package/src/components/Field/index.ts +21 -0
  66. package/src/components/KeyboardAvoidingScrollView/KeyboardAvoidingScrollView.test.tsx +267 -0
  67. package/src/components/KeyboardAvoidingScrollView/KeyboardAvoidingScrollView.tsx +299 -0
  68. package/src/components/KeyboardAvoidingScrollView/context.ts +24 -0
  69. package/src/components/KeyboardAvoidingScrollView/engine.test.ts +451 -0
  70. package/src/components/KeyboardAvoidingScrollView/engine.ts +417 -0
  71. package/src/components/KeyboardAvoidingScrollView/geometry.test.ts +315 -0
  72. package/src/components/KeyboardAvoidingScrollView/geometry.ts +194 -0
  73. package/src/components/KeyboardAvoidingScrollView/index.ts +5 -0
  74. package/src/components/KeyboardAvoidingScrollView/keyboard-event-source.test.ts +122 -0
  75. package/src/components/KeyboardAvoidingScrollView/keyboard-event-source.ts +75 -0
  76. package/src/components/KeyboardAvoidingScrollView/native-driver.test.ts +223 -0
  77. package/src/components/KeyboardAvoidingScrollView/native-driver.ts +248 -0
  78. package/src/components/ProgressCircle/ProgressCircle.test.tsx +58 -0
  79. package/src/components/ProgressCircle/ProgressCircle.tsx +42 -5
  80. package/src/components/Stack/Stack.test.tsx +67 -0
  81. package/src/components/Stack/Stack.tsx +15 -1
  82. package/src/components/TagGroup/TagGroup.test.tsx +73 -0
  83. package/src/components/TagGroup/TagGroup.tsx +4 -2
  84. package/src/components/TextField/TextField.namespace.ts +16 -0
  85. package/src/components/TextField/TextField.test.tsx +1052 -0
  86. package/src/components/TextField/TextField.tsx +954 -0
  87. package/src/components/TextField/context.ts +33 -0
  88. package/src/components/TextField/index.ts +23 -0
  89. package/src/components/TextField/useTextFieldWithGraphemes.test.tsx +80 -0
  90. package/src/components/TextField/useTextFieldWithGraphemes.ts +78 -0
  91. package/src/components/index.ts +3 -0
@@ -18,6 +18,34 @@ function computeRingGeometry(numSize) {
18
18
  capSize: halfSize - innerR
19
19
  };
20
20
  }
21
+ function bgCubicBezier(rawT, x1, y1, x2, y2) {
22
+ const t = Math.max(0, Math.min(1, rawT));
23
+ const cx = 3 * x1;
24
+ const bx = 3 * (x2 - x1) - cx;
25
+ const ax = 1 - cx - bx;
26
+ let currentT = t;
27
+ for (let i = 0; i < 8; i++) {
28
+ const currentX = ((ax * currentT + bx) * currentT + cx) * currentT - t;
29
+ const currentDx = (3 * ax * currentT + 2 * bx) * currentT + cx;
30
+ if (Math.abs(currentDx) < 1e-6) break;
31
+ currentT = currentT - currentX / currentDx;
32
+ }
33
+ const cy = 3 * y1;
34
+ const by = 3 * (y2 - y1) - cy;
35
+ return (((1 - cy - by) * currentT + by) * currentT + cy) * currentT;
36
+ }
37
+ function bgSampleIndeterminate(t) {
38
+ const containerEased = bgCubicBezier(t, .35, .25, .65, .75);
39
+ const headEased = bgCubicBezier(t, .35, 0, .65, 1);
40
+ const tailEased = bgCubicBezier(t, .35, 0, .65, .6);
41
+ const headLength = headEased <= .75 ? headEased / .75 * 360 : 360;
42
+ const tailOffset = tailEased <= 1 / 3 ? 0 : (tailEased - 1 / 3) / (2 / 3) * 360;
43
+ const arcLength = Math.max(0, headLength - tailOffset);
44
+ return {
45
+ containerDeg: containerEased * 360 + tailOffset,
46
+ arcLength
47
+ };
48
+ }
21
49
  function bgPieClipPath(size, angleDeg) {
22
50
  if (angleDeg >= 360) return void 0;
23
51
  if (angleDeg <= 0) return "path(\"M 0 0 Z\")";
@@ -72,6 +100,7 @@ function sampleIndeterminate(t) {
72
100
  };
73
101
  }
74
102
  var INDETERMINATE_DURATION = 1200;
103
+ var INDETERMINATE_INITIAL_PHASE = 1 / 6;
75
104
  var TRANSITION_DURATION = 300;
76
105
  /**
77
106
  * Lynx에서 SVG를 사용할 수 없어 CSS clip-path 기반 pie sector로 구현.
@@ -220,7 +249,7 @@ function IndeterminateRange({ numSize, classes }) {
220
249
  let startTs = 0;
221
250
  function tick(ts) {
222
251
  if (!startTs) startTs = Number(ts);
223
- const state = sampleIndeterminate((ts - startTs) % INDETERMINATE_DURATION / INDETERMINATE_DURATION);
252
+ const state = sampleIndeterminate((ts - startTs + INDETERMINATE_DURATION * INDETERMINATE_INITIAL_PHASE) % INDETERMINATE_DURATION / INDETERMINATE_DURATION);
224
253
  containerEl?.setStyleProperty("transform", `rotate(${state.containerDeg}deg)`);
225
254
  const clipPath = pieClipPath(numSize, state.arcLength);
226
255
  if (clipPath) rangeEl?.setStyleProperty("clip-path", clipPath);
@@ -247,12 +276,14 @@ function IndeterminateRange({ numSize, classes }) {
247
276
  runOnMainThread(stopLoop)();
248
277
  };
249
278
  }, [numSize]);
250
- const initialClipPath = "path(\"M 0 0 Z\")";
279
+ const initialState = bgSampleIndeterminate(INDETERMINATE_INITIAL_PHASE);
280
+ const initialClipPath = bgPieClipPath(numSize, initialState.arcLength);
281
+ const initialHeadRad = initialState.arcLength * Math.PI / 180;
251
282
  return <view main-thread:ref={containerRef} style={{
252
283
  position: "absolute",
253
284
  width: `${numSize}px`,
254
285
  height: `${numSize}px`,
255
- transform: "rotate(0deg)"
286
+ transform: `rotate(${initialState.containerDeg}deg)`
256
287
  }}>
257
288
  <view main-thread:ref={rangeRef} className={classes.range} style={{
258
289
  position: "absolute",
@@ -270,8 +301,8 @@ function IndeterminateRange({ numSize, classes }) {
270
301
  <view main-thread:ref={headCapRef} className={classes.cap} style={{
271
302
  width: `${capSize}px`,
272
303
  height: `${capSize}px`,
273
- left: `${halfSize - capSize / 2}px`,
274
- top: `${halfSize - ringCenterR - capSize / 2}px`
304
+ left: `${halfSize + ringCenterR * Math.sin(initialHeadRad) - capSize / 2}px`,
305
+ top: `${halfSize - ringCenterR * Math.cos(initialHeadRad) - capSize / 2}px`
275
306
  }} />
276
307
  </view>;
277
308
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../src/components/Stack/Stack.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEpE,KAAK,eAAe,GAChB,SAAS,GACT,eAAe,GACf,YAAY,GACZ,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,YAAY,CAAC;AAEjB,UAAU,cAAe,SAAQ,UAAU,EAAE,sBAAsB,EAAE,kBAAkB;IACrF,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC;IACvE,KAAK,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IAClC,IAAI,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU;CAAG;AAElD,MAAM,WAAW,WAAY,SAAQ,UAAU;CAAG;AA0ClD,eAAO,MAAM,MAAM,6EAIjB,CAAC;AAIH,eAAO,MAAM,MAAM,6EAIjB,CAAC"}
1
+ {"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../src/components/Stack/Stack.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEpE,KAAK,eAAe,GAChB,SAAS,GACT,eAAe,GACf,YAAY,GACZ,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,YAAY,CAAC;AAEjB,UAAU,cAAe,SAAQ,UAAU,EAAE,sBAAsB,EAAE,kBAAkB;IACrF,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC;IACvE,KAAK,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IAClC,IAAI,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU;CAAG;AAElD,MAAM,WAAW,WAAY,SAAQ,UAAU;CAAG;AAwDlD,eAAO,MAAM,MAAM,6EAIjB,CAAC;AAIH,eAAO,MAAM,MAAM,6EAIjB,CAAC"}
@@ -14,11 +14,20 @@ function getStackProps(props) {
14
14
  };
15
15
  }
16
16
  function useStackStyleProps(props, flexDirection) {
17
- return useStyleProps({
17
+ const stackStyleProps = useStyleProps({
18
18
  display: "flex",
19
19
  flexDirection,
20
20
  ...getStackProps(props)
21
21
  });
22
+ const { gap, ...style } = stackStyleProps.style;
23
+ if (gap == null) return stackStyleProps;
24
+ return {
25
+ ...stackStyleProps,
26
+ style: {
27
+ [flexDirection === "column" ? "rowGap" : "columnGap"]: gap,
28
+ ...style
29
+ }
30
+ };
22
31
  }
23
32
  function renderStackView(stackStyleProps, ref) {
24
33
  const { style, restProps } = stackStyleProps;
@@ -14,7 +14,8 @@ import * as React from "@lynx-js/react";
14
14
  */
15
15
  export interface TagGroupRootProps extends TagGroupVariantProps, TagGroupItemVariantProps, LynxStyledElementProps {
16
16
  /**
17
- * children 사이에 삽입되는 구분자. 기본값 `" · "`.
17
+ * children 사이에 삽입되는 구분자. 기본값 `"·"`.
18
+ * 문자열을 전달하면 앞뒤 공백을 제거합니다.
18
19
  */
19
20
  separator?: React.ReactNode;
20
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TagGroup.d.ts","sourceRoot":"","sources":["../../../src/components/TagGroup/TagGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAY,KAAK,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC9F,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,8CAA8C,CAAC;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAA4B,MAAM,aAAa,CAAC;AAIpF,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAOpE;;;;;;;;GAQG;AACH,MAAM,WAAW,iBACf,SAAQ,oBAAoB,EAC1B,wBAAwB,EACxB,sBAAsB;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY,mFAiCvB,CAAC;AAKH;;;;;GAKG;AACH,MAAM,WAAW,iBACf,SAAQ,wBAAwB,EAC9B,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,EAC9B,sBAAsB;CAAG;AAE7B,eAAO,MAAM,YAAY,mFAmBvB,CAAC;AAKH,MAAM,WAAW,sBAAuB,SAAQ,sBAAsB;CAAG;AAEzE,eAAO,MAAM,iBAAiB,wFAY5B,CAAC"}
1
+ {"version":3,"file":"TagGroup.d.ts","sourceRoot":"","sources":["../../../src/components/TagGroup/TagGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAY,KAAK,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC9F,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,8CAA8C,CAAC;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAA4B,MAAM,aAAa,CAAC;AAIpF,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAOpE;;;;;;;;GAQG;AACH,MAAM,WAAW,iBACf,SAAQ,oBAAoB,EAC1B,wBAAwB,EACxB,sBAAsB;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY,mFAkCvB,CAAC;AAKH;;;;;GAKG;AACH,MAAM,WAAW,iBACf,SAAQ,wBAAwB,EAC9B,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,EAC9B,sBAAsB;CAAG;AAE7B,eAAO,MAAM,YAAY,mFAmBvB,CAAC;AAKH,MAAM,WAAW,sBAAuB,SAAQ,sBAAsB;CAAG;AAEzE,eAAO,MAAM,iBAAiB,wFAY5B,CAAC"}
@@ -15,13 +15,14 @@ var TagGroupRoot = React.forwardRef((props, ref) => {
15
15
  });
16
16
  const { children, className, separator = " · ", ...nativeProps } = otherProps;
17
17
  const classes = tagGroup(tagGroupVariantProps);
18
+ const normalizedSeparator = typeof separator === "string" ? separator.trim() : separator;
18
19
  const visibleChildren = toArray(children);
19
20
  return <PropsProvider value={tagGroupItemVariantProps}>
20
21
  <view {...ref ? { ref } : {}} className={clsx(classes.root, className)} {...nativeProps}>
21
22
  {visibleChildren.map((child, index) => {
22
23
  if (index === 0) return child;
23
24
  return <view key={child.key ?? index} className={classes.separatorWrapper}>
24
- <text className={classes.separator}>{separator}</text>
25
+ <text className={classes.separator}>{normalizedSeparator}</text>
25
26
  {child}
26
27
  </view>;
27
28
  })}
@@ -0,0 +1,131 @@
1
+ import { IntrinsicElements, NodesRef } from '@lynx-js/types';
2
+ import { TextInputVariantProps } from '@seed-design/lynx-css/recipes/text-input';
3
+ import { LynxAccessibilityProps, LynxStyledElementProps } from '../../types';
4
+ import { InternalIconProps } from '../Icon/Icon';
5
+ import * as React from "@lynx-js/react";
6
+ /**
7
+ * @platform Lynx
8
+ *
9
+ * native `<input>`과 `<textarea>`의 값 상태를 소유한다.
10
+ * Lynx native 입력은 value attribute를 제공하지 않으므로 하위 입력 슬롯이
11
+ * `setValue` UI method로 controlled value를 동기화한다.
12
+ */
13
+ export interface TextFieldRootProps extends Omit<TextInputVariantProps, "focused">, LynxStyledElementProps {
14
+ value?: string;
15
+ defaultValue?: string;
16
+ onValueChange?: (value: string) => void;
17
+ /** @internal `useTextFieldWithGraphemes`가 전달하는 네이티브 입력 사전 제한 값. */
18
+ nativeInsertionMaxLength?: number;
19
+ required?: boolean;
20
+ name?: string;
21
+ }
22
+ export declare const TextFieldRoot: React.ForwardRefExoticComponent<TextFieldRootProps & React.RefAttributes<NodesRef>>;
23
+ type NativeInputProps = IntrinsicElements["input"];
24
+ type NativeTextareaProps = IntrinsicElements["textarea"];
25
+ interface NativeTextControlProps extends Omit<LynxStyledElementProps, "children">, LynxAccessibilityProps {
26
+ id?: NativeInputProps["id"];
27
+ name?: NativeInputProps["name"];
28
+ hidden?: NativeInputProps["hidden"];
29
+ flatten?: NativeInputProps["flatten"];
30
+ focusable?: NativeInputProps["focusable"];
31
+ bindlayoutchange?: NativeInputProps["bindlayoutchange"];
32
+ "main-thread:bindlayoutchange"?: NativeInputProps["main-thread:bindlayoutchange"];
33
+ }
34
+ type AndroidSetSoftInputMode = "unspecified" | "nothing" | "pan" | "resize";
35
+ /**
36
+ * @platform Lynx
37
+ *
38
+ * `readOnly` 상태에서는 native focus·selection·편집 메뉴를 제거하기 위해 `<text>`로 렌더링한다.
39
+ * 이때 ref는 `<text>`를 가리키며 input 전용 UI method와 이벤트는 사용할 수 없다.
40
+ */
41
+ export interface TextFieldInputProps extends NativeTextControlProps {
42
+ placeholder?: NativeInputProps["placeholder"];
43
+ "confirm-type"?: NativeInputProps["confirm-type"];
44
+ maxlength?: NativeInputProps["maxlength"];
45
+ readonly?: NativeInputProps["readonly"];
46
+ disabled?: NativeInputProps["disabled"];
47
+ /**
48
+ * 포커스할 때 시스템 키보드를 표시한다.
49
+ * `undefined`가 native attribute로 전달되지 않도록 `true`를 명시적으로 적용한다.
50
+ * @defaultValue true
51
+ */
52
+ "show-soft-input-on-focus"?: NativeInputProps["show-soft-input-on-focus"];
53
+ "input-filter"?: NativeInputProps["input-filter"];
54
+ type?: NativeInputProps["type"];
55
+ "ios-auto-correct"?: NativeInputProps["ios-auto-correct"];
56
+ "ios-spell-check"?: NativeInputProps["ios-spell-check"];
57
+ "android-fullscreen-mode"?: NativeInputProps["android-fullscreen-mode"];
58
+ /**
59
+ * Android host window의 soft input mode를 지정한다.
60
+ * `undefined`가 native attribute로 전달되지 않도록 `"unspecified"`를 명시적으로 적용한다.
61
+ * @defaultValue "unspecified"
62
+ */
63
+ "android-set-soft-input-mode"?: AndroidSetSoftInputMode;
64
+ bindfocus?: NativeInputProps["bindfocus"];
65
+ bindblur?: NativeInputProps["bindblur"];
66
+ bindconfirm?: NativeInputProps["bindconfirm"];
67
+ bindinput?: NativeInputProps["bindinput"];
68
+ bindselection?: NativeInputProps["bindselection"];
69
+ }
70
+ export declare const TextFieldInput: React.ForwardRefExoticComponent<TextFieldInputProps & React.RefAttributes<NodesRef>>;
71
+ /**
72
+ * @platform Lynx
73
+ *
74
+ * `readOnly` 상태에서는 native focus·selection·편집 메뉴를 제거하기 위해 `<text>`로 렌더링한다.
75
+ * 이때 ref는 `<text>`를 가리키며 textarea 전용 UI method와 이벤트는 사용할 수 없다.
76
+ */
77
+ export interface TextFieldTextareaProps extends NativeTextControlProps {
78
+ /** 내용에 맞춰 높이를 자동으로 조절한다. @defaultValue true */
79
+ autoresize?: boolean;
80
+ placeholder?: NativeTextareaProps["placeholder"];
81
+ "confirm-type"?: NativeTextareaProps["confirm-type"];
82
+ maxlength?: NativeTextareaProps["maxlength"];
83
+ maxlines?: NativeTextareaProps["maxlines"];
84
+ bounces?: NativeTextareaProps["bounces"];
85
+ /**
86
+ * native 줄 간격을 지정한다. 생략하면 Android에서 SEED 기본 typography를 맞추기 위해
87
+ * `3.2px`를 적용하고 iOS에는 전달하지 않는다. Android 기본 보정은 `0`으로 해제할 수 있다.
88
+ */
89
+ "line-spacing"?: NativeTextareaProps["line-spacing"];
90
+ readonly?: NativeTextareaProps["readonly"];
91
+ disabled?: NativeTextareaProps["disabled"];
92
+ /**
93
+ * 포커스할 때 시스템 키보드를 표시한다.
94
+ * `undefined`가 native attribute로 전달되지 않도록 `true`를 명시적으로 적용한다.
95
+ * @defaultValue true
96
+ */
97
+ "show-soft-input-on-focus"?: NativeTextareaProps["show-soft-input-on-focus"];
98
+ "input-filter"?: NativeTextareaProps["input-filter"];
99
+ "enable-scroll-bar"?: NativeTextareaProps["enable-scroll-bar"];
100
+ type?: NativeTextareaProps["type"];
101
+ "ios-auto-correct"?: NativeTextareaProps["ios-auto-correct"];
102
+ "ios-spell-check"?: NativeTextareaProps["ios-spell-check"];
103
+ /** Android의 fullscreen extract input을 활성화한다. @defaultValue false */
104
+ "android-fullscreen-mode"?: NativeTextareaProps["android-fullscreen-mode"];
105
+ /**
106
+ * Android host window의 soft input mode를 지정한다.
107
+ * `undefined`가 native attribute로 전달되지 않도록 `"unspecified"`를 명시적으로 적용한다.
108
+ * @defaultValue "unspecified"
109
+ */
110
+ "android-set-soft-input-mode"?: AndroidSetSoftInputMode;
111
+ bindfocus?: NativeTextareaProps["bindfocus"];
112
+ bindblur?: NativeTextareaProps["bindblur"];
113
+ bindconfirm?: NativeTextareaProps["bindconfirm"];
114
+ bindinput?: NativeTextareaProps["bindinput"];
115
+ bindselection?: NativeTextareaProps["bindselection"];
116
+ }
117
+ export declare const TextFieldTextarea: React.ForwardRefExoticComponent<TextFieldTextareaProps & React.RefAttributes<NodesRef>>;
118
+ export interface TextFieldPrefixIconProps extends InternalIconProps {
119
+ }
120
+ export declare const TextFieldPrefixIcon: React.ForwardRefExoticComponent<TextFieldPrefixIconProps & React.RefAttributes<unknown>>;
121
+ export interface TextFieldPrefixTextProps extends LynxStyledElementProps {
122
+ }
123
+ export declare const TextFieldPrefixText: React.ForwardRefExoticComponent<TextFieldPrefixTextProps & React.RefAttributes<unknown>>;
124
+ export interface TextFieldSuffixIconProps extends InternalIconProps {
125
+ }
126
+ export declare const TextFieldSuffixIcon: React.ForwardRefExoticComponent<TextFieldSuffixIconProps & React.RefAttributes<unknown>>;
127
+ export interface TextFieldSuffixTextProps extends LynxStyledElementProps {
128
+ }
129
+ export declare const TextFieldSuffixText: React.ForwardRefExoticComponent<TextFieldSuffixTextProps & React.RefAttributes<unknown>>;
130
+ export {};
131
+ //# sourceMappingURL=TextField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAa,KAAK,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAIjG,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAC;AAG/F,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AA+BpE;;;;;;GAMG;AACH,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAC5C,sBAAsB;IACxB,KAAK,CAAC,E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