pds-dev-kit-web 2.2.254 → 2.2.256

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.
@@ -1,3 +1,4 @@
1
1
  export { default as useAbsolutePositioner } from './useAbsolutePositioner';
2
2
  export { default as useDetectOverflow } from './useDetectOverflow';
3
3
  export { default as usePrevious } from './usePrevious';
4
+ export { useScrollbarDetector } from './useScrollbarDetector';
@@ -3,10 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.usePrevious = exports.useDetectOverflow = exports.useAbsolutePositioner = void 0;
6
+ exports.useScrollbarDetector = exports.usePrevious = exports.useDetectOverflow = exports.useAbsolutePositioner = void 0;
7
7
  var useAbsolutePositioner_1 = require("./useAbsolutePositioner");
8
8
  Object.defineProperty(exports, "useAbsolutePositioner", { enumerable: true, get: function () { return __importDefault(useAbsolutePositioner_1).default; } });
9
9
  var useDetectOverflow_1 = require("./useDetectOverflow");
10
10
  Object.defineProperty(exports, "useDetectOverflow", { enumerable: true, get: function () { return __importDefault(useDetectOverflow_1).default; } });
11
11
  var usePrevious_1 = require("./usePrevious");
12
12
  Object.defineProperty(exports, "usePrevious", { enumerable: true, get: function () { return __importDefault(usePrevious_1).default; } });
13
+ var useScrollbarDetector_1 = require("./useScrollbarDetector");
14
+ Object.defineProperty(exports, "useScrollbarDetector", { enumerable: true, get: function () { return useScrollbarDetector_1.useScrollbarDetector; } });
@@ -0,0 +1,9 @@
1
+ import { RefObject } from 'react';
2
+ /**
3
+ * textarea 요소의 스크롤바 존재 여부를 감지하는 훅
4
+ * @param ref - textarea 또는 textarea를 포함하는 컨테이너의 ref
5
+ * @param textLineType - 텍스트 라인 타입 ('multi' | 'auto'일 때만 동작)
6
+ * @param currentValue - 현재 입력값 (값 변경 시 스크롤바 상태 재확인용)
7
+ * @returns hasScrollbar - 스크롤바 존재 여부
8
+ */
9
+ export declare function useScrollbarDetector(ref: RefObject<HTMLElement>, textLineType: 'single' | 'multi' | 'auto', currentValue?: string): boolean;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useScrollbarDetector = void 0;
4
+ var react_1 = require("react");
5
+ /**
6
+ * textarea 요소의 스크롤바 존재 여부를 감지하는 훅
7
+ * @param ref - textarea 또는 textarea를 포함하는 컨테이너의 ref
8
+ * @param textLineType - 텍스트 라인 타입 ('multi' | 'auto'일 때만 동작)
9
+ * @param currentValue - 현재 입력값 (값 변경 시 스크롤바 상태 재확인용)
10
+ * @returns hasScrollbar - 스크롤바 존재 여부
11
+ */
12
+ function useScrollbarDetector(ref, textLineType, currentValue) {
13
+ var _a = (0, react_1.useState)(false), hasScrollbar = _a[0], setHasScrollbar = _a[1];
14
+ (0, react_1.useEffect)(function () {
15
+ if (textLineType === 'single' || !ref.current) {
16
+ setHasScrollbar(false);
17
+ return;
18
+ }
19
+ var checkScrollbar = function () {
20
+ if (!ref.current)
21
+ return;
22
+ var textarea = ref.current;
23
+ if (ref.current.tagName !== 'TEXTAREA') {
24
+ textarea = ref.current.querySelector('textarea');
25
+ }
26
+ if (textarea) {
27
+ var hasVerticalScrollbar = textarea.scrollHeight > textarea.clientHeight;
28
+ setHasScrollbar(hasVerticalScrollbar);
29
+ }
30
+ };
31
+ var timeoutId = setTimeout(checkScrollbar, 100);
32
+ var resizeObserver = null;
33
+ if (window.ResizeObserver && ref.current) {
34
+ resizeObserver = new ResizeObserver(checkScrollbar);
35
+ var textarea = ref.current;
36
+ if (ref.current.tagName !== 'TEXTAREA') {
37
+ textarea = ref.current.querySelector('textarea');
38
+ }
39
+ if (textarea) {
40
+ resizeObserver.observe(textarea);
41
+ }
42
+ }
43
+ return function () {
44
+ clearTimeout(timeoutId);
45
+ if (resizeObserver) {
46
+ resizeObserver.disconnect();
47
+ }
48
+ };
49
+ }, [ref, textLineType]);
50
+ (0, react_1.useEffect)(function () {
51
+ if (textLineType === 'single' || !ref.current) {
52
+ return;
53
+ }
54
+ var timeoutId = setTimeout(function () {
55
+ if (!ref.current)
56
+ return;
57
+ var textarea = ref.current;
58
+ if (ref.current.tagName !== 'TEXTAREA') {
59
+ textarea = ref.current.querySelector('textarea');
60
+ }
61
+ if (textarea) {
62
+ var hasVerticalScrollbar = textarea.scrollHeight > textarea.clientHeight;
63
+ setHasScrollbar(hasVerticalScrollbar);
64
+ }
65
+ }, 0);
66
+ return function () { return clearTimeout(timeoutId); };
67
+ }, [currentValue, textLineType, ref]);
68
+ return hasScrollbar;
69
+ }
70
+ exports.useScrollbarDetector = useScrollbarDetector;
@@ -42,6 +42,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
42
42
  /* eslint-disable react/jsx-no-bind */
43
43
  var react_1 = require("react");
44
44
  var react_hook_form_1 = require("react-hook-form");
45
+ var hooks_1 = require("../../../common/hooks");
45
46
  var scrollbarStyle_1 = require("../../../common/styles/scroll/scrollbarStyle");
46
47
  var styled_components_1 = __importStar(require("styled-components"));
47
48
  var transitionStyle_1 = require("../../../common/styles/movement/transitionStyle");
@@ -59,6 +60,7 @@ function EditApplyTextField(_a) {
59
60
  var currentValue = watch(name);
60
61
  var validateOnChange = register(name, validation).onChange;
61
62
  var isError = Object.keys(errors).some(function (error) { return error === name; });
63
+ var hasScrollbar = (0, hooks_1.useScrollbarDetector)(ref, textLineType, currentValue);
62
64
  (0, react_1.useEffect)(function () {
63
65
  if (defaultText !== undefined && defaultText !== null) {
64
66
  setPrevValue(defaultText);
@@ -161,7 +163,7 @@ function EditApplyTextField(_a) {
161
163
  return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, validation: validation, preventBlankMode: preventBlankMode, enterSubmitMode: "use", textLineType: "single", inputType: inputType, state: state, min: min, max: max, maxLength: maxLength, textSize: size === 'large' || size === 'rlarge' ? 'form2' : 'heading', textWeight: size === 'large' || size === 'rlarge' ? 'normal' : 'bold', onFocus: handleFocus, onBlur: handleBlur, onTarget: handleTarget, onChange: handleChange, onKeyDown: handleKeyDown, inputRef: ref }) }));
162
164
  }
163
165
  };
164
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(S_EditApplyTextFieldWrapper, __assign({ "x-pds-name": "EditApplyTextField", "x-pds-element-type": "component", "x-pds-device-type": "desktop", size: size, responsiveMode: responsiveMode, customWidth: customWidth }, { children: [(0, jsx_runtime_1.jsxs)(S_EditApplyTextField, { children: [(0, jsx_runtime_1.jsx)(S_S_TextFieldBaseWrapper, __assign({ size: size, responsiveMode: responsiveMode, textLineType: textLineType, isFocused: isFocused, isError: isError, state: state, customWidth: customWidth, scrollVisibleType: scrollVisibleType }, { children: S_TextFieldBase() })), isOpen === true && ((0, jsx_runtime_1.jsxs)(S_ButtonBox, { children: [(0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: "ic_xmark", fillType: "line", baseSize: "small", iconSize: 16, shapeType: "circular", shadow: "visible", iconColorKey: "ui_cpnt_button_icon_enabled", baseColorKey: "ui_cpnt_button_fill_base_white", borderColorKey: "ui_cpnt_button_line_border_default", tabIndex: -1, onMouseDown: handleCancel }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: "ic_check", fillType: "fill", baseSize: "small", iconSize: 16, shapeType: "circular", shadow: "visible", iconColorKey: "ui_cpnt_button_icon_on_primary", baseColorKey: "ui_cpnt_button_fill_base_primary", state: isError === true ? 'disabled' : 'normal', tabIndex: -1, onMouseDown: handleMouseDown, type: "submit" })] }))] }), ((_b = errors[name]) === null || _b === void 0 ? void 0 : _b.message) && (0, jsx_runtime_1.jsx)(S_Error, __assign({ isFocused: isFocused }, { children: errors[name].message }))] })) }));
166
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(S_EditApplyTextFieldWrapper, __assign({ "x-pds-name": "EditApplyTextField", "x-pds-element-type": "component", "x-pds-device-type": "desktop", size: size, responsiveMode: responsiveMode, customWidth: customWidth }, { children: [(0, jsx_runtime_1.jsxs)(S_EditApplyTextField, { children: [(0, jsx_runtime_1.jsx)(S_S_TextFieldBaseWrapper, __assign({ size: size, responsiveMode: responsiveMode, textLineType: textLineType, isFocused: isFocused, isError: isError, state: state, customWidth: customWidth, scrollVisibleType: scrollVisibleType, hasScrollbar: hasScrollbar }, { children: S_TextFieldBase() })), isOpen === true && ((0, jsx_runtime_1.jsxs)(S_ButtonBox, { children: [(0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: "ic_xmark", fillType: "line", baseSize: "small", iconSize: 16, shapeType: "circular", shadow: "visible", iconColorKey: "ui_cpnt_button_icon_enabled", baseColorKey: "ui_cpnt_button_fill_base_white", borderColorKey: "ui_cpnt_button_line_border_default", tabIndex: -1, onMouseDown: handleCancel }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: "ic_check", fillType: "fill", baseSize: "small", iconSize: 16, shapeType: "circular", shadow: "visible", iconColorKey: "ui_cpnt_button_icon_on_primary", baseColorKey: "ui_cpnt_button_fill_base_primary", state: isError === true ? 'disabled' : 'normal', tabIndex: -1, onMouseDown: handleMouseDown, type: "submit" })] }))] }), ((_b = errors[name]) === null || _b === void 0 ? void 0 : _b.message) && (0, jsx_runtime_1.jsx)(S_Error, __assign({ isFocused: isFocused }, { children: errors[name].message }))] })) }));
165
167
  }
166
168
  var S_EditApplyTextFieldWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n\n ", "\n"], ["\n width: ", ";\n\n ", "\n"])), function (_a) {
167
169
  var size = _a.size, responsiveMode = _a.responsiveMode;
@@ -277,9 +279,10 @@ var S_S_TextFieldBaseWrapper = styled_components_1.default.div(templateObject_13
277
279
  return (textLineType === 'multi' || textLineType === 'auto') &&
278
280
  scrollVisibleType && (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n textarea {\n ", "\n }\n "], ["\n textarea {\n ", "\n }\n "])), scrollVisibleType === 'visible' ? scrollbarStyle_1.scrollbarStyle : scrollbarStyle_1.scrollInvisible);
279
281
  }, function (_a) {
280
- var textLineType = _a.textLineType, scrollVisibleType = _a.scrollVisibleType;
282
+ var textLineType = _a.textLineType, scrollVisibleType = _a.scrollVisibleType, hasScrollbar = _a.hasScrollbar;
281
283
  return (textLineType === 'multi' || textLineType === 'auto') &&
282
- scrollVisibleType === 'visible' && (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n padding-right: 1px;\n "], ["\n padding-right: 1px;\n "])));
284
+ scrollVisibleType === 'visible' &&
285
+ hasScrollbar && (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n padding-right: 1px;\n "], ["\n padding-right: 1px;\n "])));
283
286
  });
284
287
  var S_Error = styled_components_1.default.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-right: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-right: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"])), function (_a) {
285
288
  var theme = _a.theme;
@@ -42,6 +42,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
42
42
  /* eslint-disable react/jsx-no-bind */
43
43
  var react_1 = require("react");
44
44
  var react_hook_form_1 = require("react-hook-form");
45
+ var hooks_1 = require("../../../common/hooks");
45
46
  var scrollbarStyle_1 = require("../../../common/styles/scroll/scrollbarStyle");
46
47
  var types_1 = require("../../../common/types");
47
48
  var styled_components_1 = __importStar(require("styled-components"));
@@ -69,9 +70,12 @@ function TextField(_a) {
69
70
  disabled: 'ui_cpnt_textfield_icon_colortheme_transparent_disabled'
70
71
  };
71
72
  var _y = (0, react_1.useState)(false), isFocused = _y[0], setIsFocused = _y[1];
72
- var _z = (0, react_hook_form_1.useFormContext)(), register = _z.register, trigger = _z.trigger, errors = _z.formState.errors;
73
+ var ref = (0, react_1.useRef)();
74
+ var _z = (0, react_hook_form_1.useFormContext)(), register = _z.register, trigger = _z.trigger, watch = _z.watch, errors = _z.formState.errors;
75
+ var currentValue = watch(name);
73
76
  var _0 = register(name, validation), validateOnChange = _0.onChange, validateOnBlur = _0.onBlur;
74
77
  var isError = (0, types_1.getErrorByName)(errors, name);
78
+ var hasScrollbar = (0, hooks_1.useScrollbarDetector)(ref, textLineType, currentValue);
75
79
  var handleClickIBtn1 = function () {
76
80
  if (onClickIBtn1) {
77
81
  onClickIBtn1();
@@ -136,7 +140,7 @@ function TextField(_a) {
136
140
  }
137
141
  }
138
142
  if (textLineType === 'multi') {
139
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, textAlign: textAlign, validation: validation, textLineType: "multi", multiRows: multiRows, state: state, colorTheme: colorTheme, maxLength: maxLength, textSize: "form2", textWeight: fontWeight === 'bold' ? 'bold' : 'normal', hintTextWeight: hintTextFontWeight === 'bold' ? 'bold' : 'normal', autoComplete: autoComplete, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown }), (0, jsx_runtime_1.jsxs)(S_RightBox_Multi, { children: [iBtn2IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iBtn2IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: overrideIBtn2IconColorKey ||
143
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, textAlign: textAlign, validation: validation, textLineType: "multi", multiRows: multiRows, state: state, colorTheme: colorTheme, maxLength: maxLength, textSize: "form2", textWeight: fontWeight === 'bold' ? 'bold' : 'normal', hintTextWeight: hintTextFontWeight === 'bold' ? 'bold' : 'normal', autoComplete: autoComplete, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown, inputRef: ref }), (0, jsx_runtime_1.jsxs)(S_RightBox_Multi, { children: [iBtn2IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iBtn2IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: overrideIBtn2IconColorKey ||
140
144
  (colorTheme &&
141
145
  {
142
146
  none: basicThemeIconColors[state],
@@ -151,7 +155,7 @@ function TextField(_a) {
151
155
  }[colorTheme]), iconFillType: iBtn1IconFillType === 'fill' ? 'fill' : 'line', state: state === 'disabled' ? 'disabled' : 'normal', onClick: handleClickIBtn1 }))] })] }));
152
156
  }
153
157
  if (textLineType === 'auto') {
154
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, textAlign: textAlign, validation: validation, textLineType: "auto", autoMinRows: autoMinRows, autoMaxRows: autoMaxRows, state: state, colorTheme: colorTheme, maxLength: maxLength, textSize: "form2", textWeight: fontWeight === 'bold' ? 'bold' : 'normal', hintTextWeight: hintTextFontWeight === 'bold' ? 'bold' : 'normal', autoComplete: autoComplete, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown }), (0, jsx_runtime_1.jsxs)(S_RightBox_Auto, { children: [iBtn2IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iBtn2IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: overrideIBtn2IconColorKey ||
158
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, textAlign: textAlign, validation: validation, textLineType: "auto", autoMinRows: autoMinRows, autoMaxRows: autoMaxRows, state: state, colorTheme: colorTheme, maxLength: maxLength, textSize: "form2", textWeight: fontWeight === 'bold' ? 'bold' : 'normal', hintTextWeight: hintTextFontWeight === 'bold' ? 'bold' : 'normal', autoComplete: autoComplete, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown, inputRef: ref }), (0, jsx_runtime_1.jsxs)(S_RightBox_Auto, { children: [iBtn2IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iBtn2IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: overrideIBtn2IconColorKey ||
155
159
  (colorTheme &&
156
160
  {
157
161
  none: basicThemeIconColors[state],
@@ -166,7 +170,7 @@ function TextField(_a) {
166
170
  }[colorTheme]), iconFillType: iBtn1IconFillType === 'fill' ? 'fill' : 'line', state: state === 'disabled' ? 'disabled' : 'normal', onClick: handleClickIBtn1 }))] })] }));
167
171
  }
168
172
  if (textLineType === 'single') {
169
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [prefixText && ((0, jsx_runtime_1.jsxs)(S_PrefixText, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: prefixText, styleTheme: "caption1Bold", colorTheme: "sysTextTertiary", singleLineMode: "use" }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" })] })), (0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, textAlign: textAlign, validation: validation, preventBlankMode: preventBlankMode, enterSubmitMode: enterSubmitMode, textLineType: "single", inputType: inputType, inputMode: inputMode, state: state, colorTheme: colorTheme, min: min, max: max, maxLength: maxLength, textSize: "form2", textWeight: fontWeight === 'bold' ? 'bold' : 'normal', hintTextWeight: hintTextFontWeight === 'bold' ? 'bold' : 'normal', fieldPaddingRight: size === 'large' || size === 'rlarge' ? 8 : undefined, deleteIconMode: deleteBtnMode, deleteIconSize: size === 'large' || size === 'rlarge' ? 20 : 16, deleteIconColor: deleteIconColor, isFocused: isFocused, autoComplete: autoComplete, stepperMode: inputType === 'number' && numberStepperMode === 'use' ? 'use' : 'none', stepperRightSpacing: size === 'large' || size === 'rlarge' ? 1 : -4, innerSpinButtonSize: size === 'small' ? 12 : 16, step: numberStep, suffixText: suffixText, suffixTextRightSpacingMode: size === 'large' || size === 'rlarge' ? 'use' : 'none', onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown }), (0, jsx_runtime_1.jsxs)(S_RightBox, { children: [iBtn2IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iBtn2IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: overrideIBtn2IconColorKey ||
173
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [prefixText && ((0, jsx_runtime_1.jsxs)(S_PrefixText, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: prefixText, styleTheme: "caption1Bold", colorTheme: "sysTextTertiary", singleLineMode: "use" }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" })] })), (0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, textAlign: textAlign, validation: validation, preventBlankMode: preventBlankMode, enterSubmitMode: enterSubmitMode, textLineType: "single", inputType: inputType, inputMode: inputMode, state: state, colorTheme: colorTheme, min: min, max: max, maxLength: maxLength, textSize: "form2", textWeight: fontWeight === 'bold' ? 'bold' : 'normal', hintTextWeight: hintTextFontWeight === 'bold' ? 'bold' : 'normal', fieldPaddingRight: size === 'large' || size === 'rlarge' ? 8 : undefined, deleteIconMode: deleteBtnMode, deleteIconSize: size === 'large' || size === 'rlarge' ? 20 : 16, deleteIconColor: deleteIconColor, isFocused: isFocused, autoComplete: autoComplete, stepperMode: inputType === 'number' && numberStepperMode === 'use' ? 'use' : 'none', stepperRightSpacing: size === 'large' || size === 'rlarge' ? 1 : -4, innerSpinButtonSize: size === 'small' ? 12 : 16, step: numberStep, suffixText: suffixText, suffixTextRightSpacingMode: size === 'large' || size === 'rlarge' ? 'use' : 'none', onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown, inputRef: ref }), (0, jsx_runtime_1.jsxs)(S_RightBox, { children: [iBtn2IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iBtn2IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: overrideIBtn2IconColorKey ||
170
174
  (colorTheme &&
171
175
  {
172
176
  none: basicThemeIconColors[state],
@@ -181,7 +185,7 @@ function TextField(_a) {
181
185
  }[colorTheme]), iconFillType: iBtn1IconFillType === 'fill' ? 'fill' : 'line', state: state === 'disabled' ? 'disabled' : 'normal', onClick: handleClickIBtn1 }))] })] }));
182
186
  }
183
187
  };
184
- return ((0, jsx_runtime_1.jsxs)(S_TextFieldBox, __assign({ "x-pds-name": "TextField", "x-pds-element-type": "component", "x-pds-device-type": "desktop", size: size, responsiveMode: responsiveMode, customWidth: customWidth }, { children: [(0, jsx_runtime_1.jsx)(S_TextFieldWrapper, __assign({ size: size, responsiveMode: responsiveMode, textLineType: textLineType, isFocused: isFocused, isError: Boolean(isError), state: state, colorTheme: colorTheme, customWidth: customWidth, scrollVisibleType: scrollVisibleType }, { children: S_TextField() })), ((_b = (0, types_1.getErrorByName)(errors, name)) === null || _b === void 0 ? void 0 : _b.message) && state === 'normal' && ((0, jsx_runtime_1.jsx)(S_Error, __assign({ colorTheme: colorTheme }, { children: (0, types_1.getErrorByName)(errors, name).message })))] })));
188
+ return ((0, jsx_runtime_1.jsxs)(S_TextFieldBox, __assign({ "x-pds-name": "TextField", "x-pds-element-type": "component", "x-pds-device-type": "desktop", size: size, responsiveMode: responsiveMode, customWidth: customWidth }, { children: [(0, jsx_runtime_1.jsx)(S_TextFieldWrapper, __assign({ size: size, responsiveMode: responsiveMode, textLineType: textLineType, isFocused: isFocused, isError: Boolean(isError), state: state, colorTheme: colorTheme, customWidth: customWidth, scrollVisibleType: scrollVisibleType, hasScrollbar: hasScrollbar }, { children: S_TextField() })), ((_b = (0, types_1.getErrorByName)(errors, name)) === null || _b === void 0 ? void 0 : _b.message) && state === 'normal' && ((0, jsx_runtime_1.jsx)(S_Error, __assign({ colorTheme: colorTheme }, { children: (0, types_1.getErrorByName)(errors, name).message })))] })));
185
189
  }
186
190
  var S_TextFieldBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", ";\n ", ";\n ", "\n"], ["\n ", ";\n ", ";\n ", "\n"])), function (_a) {
187
191
  var size = _a.size;
@@ -388,9 +392,10 @@ var S_TextFieldWrapper = styled_components_1.default.div(templateObject_21 || (t
388
392
  return (textLineType === 'multi' || textLineType === 'auto') &&
389
393
  scrollVisibleType && (0, styled_components_1.css)(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n textarea {\n ", "\n }\n "], ["\n textarea {\n ", "\n }\n "])), scrollVisibleType === 'visible' ? scrollbarStyle_1.scrollbarStyle : scrollbarStyle_1.scrollInvisible);
390
394
  }, function (_a) {
391
- var textLineType = _a.textLineType, scrollVisibleType = _a.scrollVisibleType;
395
+ var textLineType = _a.textLineType, scrollVisibleType = _a.scrollVisibleType, hasScrollbar = _a.hasScrollbar;
392
396
  return (textLineType === 'multi' || textLineType === 'auto') &&
393
- scrollVisibleType === 'visible' && (0, styled_components_1.css)(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n padding-right: 0px;\n "], ["\n padding-right: 0px;\n "])));
397
+ scrollVisibleType === 'visible' &&
398
+ hasScrollbar && (0, styled_components_1.css)(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n padding-right: 0px;\n "], ["\n padding-right: 0px;\n "])));
394
399
  });
395
400
  var S_RightBox = styled_components_1.default.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n"], ["\n align-items: center;\n display: flex;\n"])));
396
401
  var S_RightBox_Auto = styled_components_1.default.div(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n align-items: center;\n align-self: end;\n display: flex;\n"], ["\n align-items: center;\n align-self: end;\n display: flex;\n"])));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web",
3
- "version": "2.2.254",
3
+ "version": "2.2.256",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/release-note.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # PDS-DEV-KIT-WEB Release Notes
2
- ## [v2.2.254]
2
+ ## [v2.2.256]
3
3
  ## daily|https://design.storybook.publ.biz/
4
4
 
5
5
  ### 업데이트 사항
6
6
 
7
7
  * [PDS-1371] ChatBubbleListItem에 리액션 관련 사항 추가
8
+ * [PDS-1377] EditApplyTextField에서 텍스트 입력 영역 우측에 간격이 없는 현상