@team-monolith/cds 1.79.6 → 1.79.8

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.
@@ -9,5 +9,5 @@ export interface SelectionRange {
9
9
  export declare const InputControlledSelectionRange: React.ForwardRefExoticComponent<{
10
10
  value: string;
11
11
  selectionRange: SelectionRange | null;
12
- onSelectionChange: (selectionRange: SelectionRange | null) => void;
12
+ onSelectionRangeChange: (selectionRange: SelectionRange | null) => void;
13
13
  } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "value"> & React.RefAttributes<HTMLInputElement>>;
@@ -16,7 +16,7 @@ import { useEffect } from "react";
16
16
  * 입력값과, 선택 범위에 대한 state, setState를 props로 받아 사용합니다.
17
17
  */
18
18
  export const InputControlledSelectionRange = React.forwardRef(function InputControlledSelectionRange(props, ref) {
19
- const { value, selectionRange, onSelectionChange } = props, inputProps = __rest(props, ["value", "selectionRange", "onSelectionChange"]);
19
+ const { value, selectionRange, onSelectionRangeChange } = props, inputProps = __rest(props, ["value", "selectionRange", "onSelectionRangeChange"]);
20
20
  // value 또는 selectionRange가 바뀔 때마다,
21
21
  // 실제 DOM input의 selection range를 동기화
22
22
  useEffect(() => {
@@ -35,7 +35,7 @@ export const InputControlledSelectionRange = React.forwardRef(function InputCont
35
35
  const handleSelect = (e) => {
36
36
  const { selectionStart, selectionEnd } = e.currentTarget;
37
37
  if (selectionStart != null && selectionEnd != null) {
38
- onSelectionChange({
38
+ onSelectionRangeChange({
39
39
  start: selectionStart,
40
40
  end: selectionEnd,
41
41
  });
@@ -49,7 +49,7 @@ export function SegmentedInput(props) {
49
49
  }
50
50
  }, "");
51
51
  };
52
- return (_jsxs(Container, { children: [_jsx(InputControlledSelectionRange, { type: "input", ref: hiddenRef, value: splitedValues.join(""), readOnly: readOnly, selectionRange: selectionRange, onSelectionChange: setSelectionRange, onKeyDown: (e) => {
52
+ return (_jsxs(Container, { children: [_jsx(InputControlledSelectionRange, { type: "input", ref: hiddenRef, value: splitedValues.join(""), readOnly: readOnly, selectionRange: selectionRange, onSelectionRangeChange: setSelectionRange, onKeyDown: (e) => {
53
53
  var _a;
54
54
  if (e.key === "ArrowLeft") {
55
55
  e.preventDefault();
@@ -102,8 +102,8 @@ export function SegmentedInput(props) {
102
102
  onChange(getFormattedValue(e.target.value).slice(0, answerFormat.length));
103
103
  setSelectionRange(null);
104
104
  }, css: css `
105
- opacity: 1;
106
- height: 10;
105
+ opacity: 0;
106
+ height: 0;
107
107
  ` }), _jsxs(InputWrapper, { children: [_jsx("div", Object.assign({ css: css `
108
108
  display: flex;
109
109
  align-items: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-monolith/cds",
3
- "version": "1.79.6",
3
+ "version": "1.79.8",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": false,