@team-monolith/cds 1.50.0 → 1.50.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.
@@ -24,7 +24,10 @@ function LazyImage({ altText, className, imageRef, src, width, height, maxWidth,
24
24
  return (_jsx("img", { className: className || undefined, src: src, alt: altText, ref: imageRef, style: {
25
25
  height,
26
26
  // 이미지로 인해 좌우로 스크롤이 생기는 것을 방지
27
- maxWidth: `min(${maxWidth}px, 100%)`,
27
+ // maxWidth: `min(${maxWidth}px, 100%)`,
28
+ // 이미지가 maxWidth보다 클 경우 이미지를 줄이지 않기 위해 100%로 변경
29
+ // fixme: maxWidth를 수정할 수 있게 되면 원복합니다.
30
+ maxWidth: "100%",
28
31
  width,
29
32
  }, draggable: "false" }));
30
33
  }
@@ -20,7 +20,7 @@ export default function SegmentedInput(props) {
20
20
  const splitedValues = value.split("").filter((v) => v !== " ");
21
21
  const [focusedIndex, setFocusedIndex] = useState(null);
22
22
  const hiddenRef = useRef(null);
23
- // value의 공백을 제거하고, format에 맞춰 공백을 추가한 값을 리턴합니다.
23
+ /** value의 공백을 제거하고, format에 맞춰 공백을 추가한 값을 리턴합니다. */
24
24
  const getFormattedValue = (value) => {
25
25
  const despacedValue = value.replace(/ /g, "");
26
26
  return despacedValue.split("").reduce((prev, curr, i) => {
@@ -46,7 +46,7 @@ export default function SegmentedInput(props) {
46
46
  }
47
47
  }, onChange: (event) => {
48
48
  var _a;
49
- onChange(getFormattedValue(event.target.value));
49
+ onChange(getFormattedValue(event.target.value).slice(0, answerFormat.length));
50
50
  const selectionStart = (_a = hiddenRef.current) === null || _a === void 0 ? void 0 : _a.selectionStart;
51
51
  setFocusedIndex(selectionStart ? selectionStart - 1 : null);
52
52
  }, onBlur: (e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-monolith/cds",
3
- "version": "1.50.0",
3
+ "version": "1.50.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": false,