pds-dev-kit-web 1.3.0 → 1.3.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.
@@ -45,5 +45,6 @@
45
45
  },
46
46
  "files.associations": {
47
47
  "*.stylelintrc": "jsonc"
48
- }
48
+ },
49
+ "cSpell.words": ["singleline"]
49
50
  }
@@ -9,6 +9,7 @@ export declare type TextFieldBaseProps = {
9
9
  [key: string]: any;
10
10
  };
11
11
  preventBlankMode?: 'none' | 'trim' | 'all';
12
+ enterSubmitMode?: 'none' | 'use';
12
13
  textLineType: 'single' | 'multi' | 'auto';
13
14
  multiRows?: number;
14
15
  autoMinRows?: number;
@@ -35,5 +36,5 @@ export declare type TextFieldBaseProps = {
35
36
  onTarget?: () => void;
36
37
  [x: string]: any;
37
38
  } & Record<string, any>;
38
- declare function TextFieldBase({ name, hintText, defaultText, validation, preventBlankMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, colorTheme, min, max, maxLength, textSize, textWeight, textPadding, fieldHeight, deleteIconMode, deleteIconSize, deleteIconColor, isFocused, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onTarget, ...rest }: TextFieldBaseProps): JSX.Element;
39
+ declare function TextFieldBase({ name, hintText, defaultText, validation, preventBlankMode, enterSubmitMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, colorTheme, min, max, maxLength, textSize, textWeight, textPadding, fieldHeight, deleteIconMode, deleteIconSize, deleteIconColor, isFocused, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onTarget, ...rest }: TextFieldBaseProps): JSX.Element;
39
40
  export default TextFieldBase;
@@ -52,8 +52,8 @@ var styled_components_1 = __importStar(require("styled-components"));
52
52
  var common_1 = require("../../../../common");
53
53
  var IconButton_1 = require("../../../components/IconButton");
54
54
  function TextFieldBase(_a) {
55
- var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, validation = _a.validation, _b = _a.preventBlankMode, preventBlankMode = _b === void 0 ? 'none' : _b, _c = _a.textLineType, textLineType = _c === void 0 ? 'single' : _c, multiRows = _a.multiRows, autoMinRows = _a.autoMinRows, autoMaxRows = _a.autoMaxRows, _d = _a.inputType, inputType = _d === void 0 ? 'text' : _d, _e = _a.state, state = _e === void 0 ? 'normal' : _e, _f = _a.colorTheme, colorTheme = _f === void 0 ? 'none' : _f, min = _a.min, max = _a.max, _g = _a.maxLength, maxLength = _g === void 0 ? Infinity : _g, _h = _a.textSize, textSize = _h === void 0 ? 'form2' : _h, _j = _a.textWeight, textWeight = _j === void 0 ? 'normal' : _j, textPadding = _a.textPadding, _k = _a.fieldHeight, fieldHeight = _k === void 0 ? 48 : _k, _l = _a.deleteIconMode, deleteIconMode = _l === void 0 ? 'use' : _l, _m = _a.deleteIconSize, deleteIconSize = _m === void 0 ? 20 : _m, _o = _a.deleteIconColor, deleteIconColor = _o === void 0 ? 'ui_cpnt_button_icon_disabled' : _o, isFocused = _a.isFocused, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, onKeyDown = _a.onKeyDown, onKeyUp = _a.onKeyUp, onTarget = _a.onTarget, rest = __rest(_a, ["name", "hintText", "defaultText", "validation", "preventBlankMode", "textLineType", "multiRows", "autoMinRows", "autoMaxRows", "inputType", "state", "colorTheme", "min", "max", "maxLength", "textSize", "textWeight", "textPadding", "fieldHeight", "deleteIconMode", "deleteIconSize", "deleteIconColor", "isFocused", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "onTarget"]);
56
- var _p = (0, react_hook_form_1.useFormContext)(), register = _p.register, setValue = _p.setValue, getValues = _p.getValues, clearErrors = _p.clearErrors;
55
+ var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, validation = _a.validation, _b = _a.preventBlankMode, preventBlankMode = _b === void 0 ? 'none' : _b, _c = _a.enterSubmitMode, enterSubmitMode = _c === void 0 ? 'none' : _c, _d = _a.textLineType, textLineType = _d === void 0 ? 'single' : _d, multiRows = _a.multiRows, autoMinRows = _a.autoMinRows, autoMaxRows = _a.autoMaxRows, _e = _a.inputType, inputType = _e === void 0 ? 'text' : _e, _f = _a.state, state = _f === void 0 ? 'normal' : _f, _g = _a.colorTheme, colorTheme = _g === void 0 ? 'none' : _g, min = _a.min, max = _a.max, _h = _a.maxLength, maxLength = _h === void 0 ? Infinity : _h, _j = _a.textSize, textSize = _j === void 0 ? 'form2' : _j, _k = _a.textWeight, textWeight = _k === void 0 ? 'normal' : _k, textPadding = _a.textPadding, _l = _a.fieldHeight, fieldHeight = _l === void 0 ? 48 : _l, _m = _a.deleteIconMode, deleteIconMode = _m === void 0 ? 'use' : _m, _o = _a.deleteIconSize, deleteIconSize = _o === void 0 ? 20 : _o, _p = _a.deleteIconColor, deleteIconColor = _p === void 0 ? 'ui_cpnt_button_icon_disabled' : _p, isFocused = _a.isFocused, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, onKeyDown = _a.onKeyDown, onKeyUp = _a.onKeyUp, onTarget = _a.onTarget, rest = __rest(_a, ["name", "hintText", "defaultText", "validation", "preventBlankMode", "enterSubmitMode", "textLineType", "multiRows", "autoMinRows", "autoMaxRows", "inputType", "state", "colorTheme", "min", "max", "maxLength", "textSize", "textWeight", "textPadding", "fieldHeight", "deleteIconMode", "deleteIconSize", "deleteIconColor", "isFocused", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "onTarget"]);
56
+ var _q = (0, react_hook_form_1.useFormContext)(), register = _q.register, setValue = _q.setValue, getValues = _q.getValues, clearErrors = _q.clearErrors;
57
57
  var timeout;
58
58
  (0, react_1.useEffect)(function () {
59
59
  return function () { return clearTimeout(timeout); };
@@ -65,7 +65,7 @@ function TextFieldBase(_a) {
65
65
  clearErrors(name);
66
66
  }
67
67
  function handleKeyDown(e) {
68
- if (textLineType === 'single' && e.code === 'Enter') {
68
+ if (textLineType === 'single' && enterSubmitMode === 'none' && e.code === 'Enter') {
69
69
  e.preventDefault();
70
70
  }
71
71
  if (inputType === 'number') {
@@ -111,7 +111,7 @@ function TextFieldBase(_a) {
111
111
  }
112
112
  }
113
113
  var textAreaRef = (0, react_1.useRef)(null);
114
- var _q = register(name, validation), ref = _q.ref, refRest = __rest(_q, ["ref"]);
114
+ var _r = register(name, validation), ref = _r.ref, refRest = __rest(_r, ["ref"]);
115
115
  (0, react_1.useEffect)(function () {
116
116
  if (textAreaRef === null || textAreaRef.current === null) {
117
117
  return;
@@ -7,11 +7,14 @@ declare type DesktopBasicModalProps = {
7
7
  mBtn1Text: PDSTextType;
8
8
  mBtn2Text?: PDSTextType;
9
9
  mBtn3Text?: PDSTextType;
10
+ mBtn1State: 'normal' | 'disabled';
11
+ mBtn2State?: 'normal' | 'disabled';
12
+ mBtn3State?: 'normal' | 'disabled';
10
13
  size?: 'large' | 'medium' | 'small';
11
14
  onClickMBtn1?: () => void;
12
15
  onClickMBtn2?: () => void;
13
16
  onClickMBtn3?: () => void;
14
17
  children?: React.ReactNode;
15
18
  };
16
- declare function DesktopBasicModal({ titleText, contentText, btnMode, mBtn1Text, mBtn2Text, mBtn3Text, onClickMBtn1, onClickMBtn2, onClickMBtn3, size, children }: DesktopBasicModalProps): React.ReactPortal;
19
+ declare function DesktopBasicModal({ titleText, contentText, btnMode, mBtn1Text, mBtn2Text, mBtn3Text, mBtn1State, mBtn2State, mBtn3State, onClickMBtn1, onClickMBtn2, onClickMBtn3, size, children }: DesktopBasicModalProps): React.ReactPortal;
17
20
  export default DesktopBasicModal;
@@ -33,7 +33,7 @@ var hybrid_1 = require("../../../hybrid");
33
33
  var MainButton_1 = require("../MainButton");
34
34
  var TextLabel_1 = require("../TextLabel");
35
35
  function DesktopBasicModal(_a) {
36
- var titleText = _a.titleText, contentText = _a.contentText, _b = _a.btnMode, btnMode = _b === void 0 ? 'mbtn_amount2' : _b, mBtn1Text = _a.mBtn1Text, mBtn2Text = _a.mBtn2Text, mBtn3Text = _a.mBtn3Text, onClickMBtn1 = _a.onClickMBtn1, onClickMBtn2 = _a.onClickMBtn2, onClickMBtn3 = _a.onClickMBtn3, _c = _a.size, size = _c === void 0 ? 'large' : _c, children = _a.children;
36
+ var titleText = _a.titleText, contentText = _a.contentText, _b = _a.btnMode, btnMode = _b === void 0 ? 'mbtn_amount2' : _b, mBtn1Text = _a.mBtn1Text, mBtn2Text = _a.mBtn2Text, mBtn3Text = _a.mBtn3Text, _c = _a.mBtn1State, mBtn1State = _c === void 0 ? 'normal' : _c, _d = _a.mBtn2State, mBtn2State = _d === void 0 ? 'normal' : _d, _e = _a.mBtn3State, mBtn3State = _e === void 0 ? 'normal' : _e, onClickMBtn1 = _a.onClickMBtn1, onClickMBtn2 = _a.onClickMBtn2, onClickMBtn3 = _a.onClickMBtn3, _f = _a.size, size = _f === void 0 ? 'large' : _f, children = _a.children;
37
37
  var container = (0, react_1.useState)(function () {
38
38
  var modalRoot = document.createElement('div');
39
39
  modalRoot.setAttribute('id', 'DesktopBasicModal');
@@ -62,16 +62,16 @@ function DesktopBasicModal(_a) {
62
62
  children && children),
63
63
  react_1.default.createElement(hybrid_1.Divider, null),
64
64
  react_1.default.createElement(S_Footer, null,
65
- react_1.default.createElement(S_Left, null, btn3Mode.includes(btnMode) && mBtn3Text && (react_1.default.createElement(MainButton_1.MainButton, { fillType: "line", text: mBtn3Text, size: "medium", onClick: onClickMBtn3 }))),
65
+ react_1.default.createElement(S_Left, null, btn3Mode.includes(btnMode) && mBtn3Text && (react_1.default.createElement(MainButton_1.MainButton, { fillType: "line", text: mBtn3Text, state: mBtn3State, size: "medium", onClick: onClickMBtn3 }))),
66
66
  react_1.default.createElement(S_Right, null,
67
- react_1.default.createElement(S_Btn2Wrapper, null, btn2Mode.includes(btnMode) && mBtn2Text && (react_1.default.createElement(MainButton_1.MainButton, { fillType: "line", text: mBtn2Text, size: "medium", onClick: onClickMBtn2 }))),
68
- btn1Mode.includes(btnMode) && mBtn1Text && (react_1.default.createElement(MainButton_1.MainButton, { text: mBtn1Text, size: "medium", onClick: onClickMBtn1 })))))), container);
67
+ react_1.default.createElement(S_Btn2Wrapper, null, btn2Mode.includes(btnMode) && mBtn2Text && (react_1.default.createElement(MainButton_1.MainButton, { fillType: "line", text: mBtn2Text, state: mBtn2State, size: "medium", onClick: onClickMBtn2 }))),
68
+ btn1Mode.includes(btnMode) && mBtn1Text && (react_1.default.createElement(MainButton_1.MainButton, { text: mBtn1Text, state: mBtn1State, size: "medium", onClick: onClickMBtn1 })))))), container);
69
69
  }
70
70
  var S_ModalOverlay = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n height: 100vh;\n left: 0;\n position: fixed;\n top: 0;\n width: 100vw;\n"], ["\n background-color: ", ";\n height: 100vh;\n left: 0;\n position: fixed;\n top: 0;\n width: 100vw;\n"])), function (_a) {
71
71
  var theme = _a.theme;
72
72
  return theme.ui_cpnt_modal_dimmed;
73
73
  });
74
- var S_ModalWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 8px;\n box-shadow: ", ";\n left: 50%;\n max-height: 720px;\n position: fixed;\n top: 50%;\n transform: translate(-50%, -50%);\n width: ", ";\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 8px;\n box-shadow: ", ";\n left: 50%;\n max-height: 720px;\n position: fixed;\n top: 50%;\n transform: translate(-50%, -50%);\n width: ", ";\n"])), function (_a) {
74
+ var S_ModalWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 8px;\n box-shadow: ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n left: 50%;\n max-height: 720px;\n position: fixed;\n top: 50%;\n transform: translate(-50%, -50%);\n width: ", ";\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 8px;\n box-shadow: ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n left: 50%;\n max-height: 720px;\n position: fixed;\n top: 50%;\n transform: translate(-50%, -50%);\n width: ", ";\n"])), function (_a) {
75
75
  var theme = _a.theme;
76
76
  return theme.ui_cpnt_modal_base;
77
77
  }, function (_a) {
@@ -108,7 +108,7 @@ var S_Header = styled_components_1.default.div(templateObject_6 || (templateObje
108
108
  var theme = _a.theme;
109
109
  return theme.spacing.spacingC;
110
110
  });
111
- var S_Body = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n overflow: scroll;\n max-height: 480px;\n"], ["\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n overflow: scroll;\n max-height: 480px;\n"])), function (_a) {
111
+ var S_Body = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n flex: 1;\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n overflow: auto;\n"], ["\n flex: 1;\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n overflow: auto;\n"])), function (_a) {
112
112
  var theme = _a.theme;
113
113
  return theme.spacing.spacingD;
114
114
  }, function (_a) {
@@ -10,6 +10,7 @@ export declare type TextFieldProps = {
10
10
  };
11
11
  validationPoint?: 'onChange' | 'onBlur';
12
12
  preventBlankMode?: 'none' | 'trim' | 'all';
13
+ enterSubmitMode?: 'none' | 'use';
13
14
  size?: 'small' | 'medium' | 'large' | 'rlarge';
14
15
  responsiveMode?: 'none' | 'use';
15
16
  textLineType?: 'single' | 'multi' | 'auto';
@@ -34,5 +35,5 @@ export declare type TextFieldProps = {
34
35
  onKeyUp?: (e: React.KeyboardEvent<HTMLInputElement> | React.KeyboardEvent<HTMLTextAreaElement>) => void;
35
36
  onTarget?: () => void;
36
37
  };
37
- declare function TextField({ name, hintText, defaultText, validation, validationPoint, preventBlankMode, size, responsiveMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, colorTheme, max, maxLength, min, onBlur, onChange, onClickIBtn1, onClickIBtn2, onFocus, onKeyUp, onTarget }: TextFieldProps): JSX.Element;
38
+ declare function TextField({ name, hintText, defaultText, validation, validationPoint, preventBlankMode, enterSubmitMode, size, responsiveMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, colorTheme, max, maxLength, min, onBlur, onChange, onClickIBtn1, onClickIBtn2, onFocus, onKeyUp, onTarget }: TextFieldProps): JSX.Element;
38
39
  export default TextField;
@@ -32,7 +32,7 @@ var components_1 = require("../../common/components");
32
32
  var IconButton_1 = require("../IconButton");
33
33
  function TextField(_a) {
34
34
  var _b;
35
- var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, validation = _a.validation, _c = _a.validationPoint, validationPoint = _c === void 0 ? 'onBlur' : _c, _d = _a.preventBlankMode, preventBlankMode = _d === void 0 ? 'none' : _d, _e = _a.size, size = _e === void 0 ? 'large' : _e, _f = _a.responsiveMode, responsiveMode = _f === void 0 ? 'none' : _f, _g = _a.textLineType, textLineType = _g === void 0 ? 'single' : _g, _h = _a.multiRows, multiRows = _h === void 0 ? 8 : _h, _j = _a.autoMinRows, autoMinRows = _j === void 0 ? 8 : _j, autoMaxRows = _a.autoMaxRows, _k = _a.inputType, inputType = _k === void 0 ? 'text' : _k, _l = _a.state, state = _l === void 0 ? 'normal' : _l, iBtn1IconName = _a.iBtn1IconName, _m = _a.iBtn1IconFillType, iBtn1IconFillType = _m === void 0 ? 'line' : _m, iBtn2IconName = _a.iBtn2IconName, _o = _a.iBtn2IconFillType, iBtn2IconFillType = _o === void 0 ? 'line' : _o, _p = _a.colorTheme, colorTheme = _p === void 0 ? 'none' : _p, max = _a.max, maxLength = _a.maxLength, min = _a.min, onBlur = _a.onBlur, onChange = _a.onChange, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onFocus = _a.onFocus, onKeyUp = _a.onKeyUp, onTarget = _a.onTarget;
35
+ var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, validation = _a.validation, _c = _a.validationPoint, validationPoint = _c === void 0 ? 'onBlur' : _c, _d = _a.preventBlankMode, preventBlankMode = _d === void 0 ? 'none' : _d, _e = _a.enterSubmitMode, enterSubmitMode = _e === void 0 ? 'none' : _e, _f = _a.size, size = _f === void 0 ? 'large' : _f, _g = _a.responsiveMode, responsiveMode = _g === void 0 ? 'none' : _g, _h = _a.textLineType, textLineType = _h === void 0 ? 'single' : _h, _j = _a.multiRows, multiRows = _j === void 0 ? 8 : _j, _k = _a.autoMinRows, autoMinRows = _k === void 0 ? 8 : _k, autoMaxRows = _a.autoMaxRows, _l = _a.inputType, inputType = _l === void 0 ? 'text' : _l, _m = _a.state, state = _m === void 0 ? 'normal' : _m, iBtn1IconName = _a.iBtn1IconName, _o = _a.iBtn1IconFillType, iBtn1IconFillType = _o === void 0 ? 'line' : _o, iBtn2IconName = _a.iBtn2IconName, _p = _a.iBtn2IconFillType, iBtn2IconFillType = _p === void 0 ? 'line' : _p, _q = _a.colorTheme, colorTheme = _q === void 0 ? 'none' : _q, max = _a.max, maxLength = _a.maxLength, min = _a.min, onBlur = _a.onBlur, onChange = _a.onChange, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onFocus = _a.onFocus, onKeyUp = _a.onKeyUp, onTarget = _a.onTarget;
36
36
  var iconThemeColorNoneObj = {
37
37
  normal: 'ui_cpnt_button_icon_default',
38
38
  read_only: 'ui_cpnt_button_icon_default',
@@ -44,9 +44,9 @@ function TextField(_a) {
44
44
  disabled: 'ui_cpnt_textfield_icon_darktheme_disabled'
45
45
  };
46
46
  var t = (0, react_i18next_1.useTranslation)('translation').t;
47
- var _q = (0, react_1.useState)(false), isFocused = _q[0], setIsFocused = _q[1];
48
- var _r = (0, react_hook_form_1.useFormContext)(), register = _r.register, trigger = _r.trigger, errors = _r.formState.errors;
49
- var _s = register(name, validation), validateOnChange = _s.onChange, validateOnBlur = _s.onBlur;
47
+ var _r = (0, react_1.useState)(false), isFocused = _r[0], setIsFocused = _r[1];
48
+ var _s = (0, react_hook_form_1.useFormContext)(), register = _s.register, trigger = _s.trigger, errors = _s.formState.errors;
49
+ var _t = register(name, validation), validateOnChange = _t.onChange, validateOnBlur = _t.onBlur;
50
50
  var isError = Object.keys(errors).some(function (error) { return error === name; });
51
51
  var handleClickIBtn1 = function () {
52
52
  if (onClickIBtn1) {
@@ -103,7 +103,7 @@ function TextField(_a) {
103
103
  }
104
104
  if (textLineType === 'single') {
105
105
  return (react_1.default.createElement(react_1.default.Fragment, null,
106
- react_1.default.createElement(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, validation: validation, preventBlankMode: preventBlankMode, textLineType: "single", inputType: inputType, state: state, colorTheme: colorTheme, min: min, max: max, maxLength: maxLength, textSize: "form2", textWeight: "normal", deleteIconMode: "use", deleteIconSize: size === 'large' || size === 'rlarge' ? 20 : 16, isFocused: isFocused, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp }),
106
+ react_1.default.createElement(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, validation: validation, preventBlankMode: preventBlankMode, enterSubmitMode: enterSubmitMode, textLineType: "single", inputType: inputType, state: state, colorTheme: colorTheme, min: min, max: max, maxLength: maxLength, textSize: "form2", textWeight: "normal", deleteIconMode: "use", deleteIconSize: size === 'large' || size === 'rlarge' ? 20 : 16, isFocused: isFocused, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp }),
107
107
  react_1.default.createElement(S_IconBox, null,
108
108
  iBtn2IconName && (react_1.default.createElement(IconButton_1.IconButton, { iconName: iBtn2IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: colorTheme &&
109
109
  {
@@ -9,6 +9,7 @@ export declare type TextFieldBaseProps = {
9
9
  [key: string]: any;
10
10
  };
11
11
  preventBlankMode?: 'none' | 'trim' | 'all';
12
+ enterSubmitMode?: 'none' | 'use';
12
13
  textLineType: 'single' | 'multi' | 'auto';
13
14
  multiRows?: number;
14
15
  autoMinRows?: number;
@@ -35,5 +36,5 @@ export declare type TextFieldBaseProps = {
35
36
  onTarget?: () => void;
36
37
  [x: string]: any;
37
38
  } & Record<string, any>;
38
- declare function TextFieldBase({ name, hintText, defaultText, validation, preventBlankMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, colorTheme, min, max, maxLength, textSize, textWeight, textPadding, fieldHeight, deleteIconMode, deleteIconSize, deleteIconColor, isFocused, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onTarget, ...rest }: TextFieldBaseProps): JSX.Element;
39
+ declare function TextFieldBase({ name, hintText, defaultText, validation, preventBlankMode, enterSubmitMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, colorTheme, min, max, maxLength, textSize, textWeight, textPadding, fieldHeight, deleteIconMode, deleteIconSize, deleteIconColor, isFocused, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onTarget, ...rest }: TextFieldBaseProps): JSX.Element;
39
40
  export default TextFieldBase;
@@ -52,8 +52,8 @@ var styled_components_1 = __importStar(require("styled-components"));
52
52
  var common_1 = require("../../../../common");
53
53
  var IconButton_1 = require("../../../components/IconButton");
54
54
  function TextFieldBase(_a) {
55
- var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, validation = _a.validation, _b = _a.preventBlankMode, preventBlankMode = _b === void 0 ? 'none' : _b, _c = _a.textLineType, textLineType = _c === void 0 ? 'single' : _c, multiRows = _a.multiRows, autoMinRows = _a.autoMinRows, autoMaxRows = _a.autoMaxRows, _d = _a.inputType, inputType = _d === void 0 ? 'text' : _d, _e = _a.state, state = _e === void 0 ? 'normal' : _e, _f = _a.colorTheme, colorTheme = _f === void 0 ? 'none' : _f, min = _a.min, max = _a.max, _g = _a.maxLength, maxLength = _g === void 0 ? Infinity : _g, _h = _a.textSize, textSize = _h === void 0 ? 'form2' : _h, _j = _a.textWeight, textWeight = _j === void 0 ? 'normal' : _j, textPadding = _a.textPadding, _k = _a.fieldHeight, fieldHeight = _k === void 0 ? 48 : _k, _l = _a.deleteIconMode, deleteIconMode = _l === void 0 ? 'use' : _l, _m = _a.deleteIconSize, deleteIconSize = _m === void 0 ? 20 : _m, _o = _a.deleteIconColor, deleteIconColor = _o === void 0 ? 'ui_cpnt_button_icon_disabled' : _o, isFocused = _a.isFocused, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, onKeyDown = _a.onKeyDown, onKeyUp = _a.onKeyUp, onTarget = _a.onTarget, rest = __rest(_a, ["name", "hintText", "defaultText", "validation", "preventBlankMode", "textLineType", "multiRows", "autoMinRows", "autoMaxRows", "inputType", "state", "colorTheme", "min", "max", "maxLength", "textSize", "textWeight", "textPadding", "fieldHeight", "deleteIconMode", "deleteIconSize", "deleteIconColor", "isFocused", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "onTarget"]);
56
- var _p = (0, react_hook_form_1.useFormContext)(), register = _p.register, setValue = _p.setValue, getValues = _p.getValues, clearErrors = _p.clearErrors;
55
+ var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, validation = _a.validation, _b = _a.preventBlankMode, preventBlankMode = _b === void 0 ? 'none' : _b, _c = _a.enterSubmitMode, enterSubmitMode = _c === void 0 ? 'none' : _c, _d = _a.textLineType, textLineType = _d === void 0 ? 'single' : _d, multiRows = _a.multiRows, autoMinRows = _a.autoMinRows, autoMaxRows = _a.autoMaxRows, _e = _a.inputType, inputType = _e === void 0 ? 'text' : _e, _f = _a.state, state = _f === void 0 ? 'normal' : _f, _g = _a.colorTheme, colorTheme = _g === void 0 ? 'none' : _g, min = _a.min, max = _a.max, _h = _a.maxLength, maxLength = _h === void 0 ? Infinity : _h, _j = _a.textSize, textSize = _j === void 0 ? 'form2' : _j, _k = _a.textWeight, textWeight = _k === void 0 ? 'normal' : _k, textPadding = _a.textPadding, _l = _a.fieldHeight, fieldHeight = _l === void 0 ? 48 : _l, _m = _a.deleteIconMode, deleteIconMode = _m === void 0 ? 'use' : _m, _o = _a.deleteIconSize, deleteIconSize = _o === void 0 ? 20 : _o, _p = _a.deleteIconColor, deleteIconColor = _p === void 0 ? 'ui_cpnt_button_icon_disabled' : _p, isFocused = _a.isFocused, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, onKeyDown = _a.onKeyDown, onKeyUp = _a.onKeyUp, onTarget = _a.onTarget, rest = __rest(_a, ["name", "hintText", "defaultText", "validation", "preventBlankMode", "enterSubmitMode", "textLineType", "multiRows", "autoMinRows", "autoMaxRows", "inputType", "state", "colorTheme", "min", "max", "maxLength", "textSize", "textWeight", "textPadding", "fieldHeight", "deleteIconMode", "deleteIconSize", "deleteIconColor", "isFocused", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "onTarget"]);
56
+ var _q = (0, react_hook_form_1.useFormContext)(), register = _q.register, setValue = _q.setValue, getValues = _q.getValues, clearErrors = _q.clearErrors;
57
57
  var timeout;
58
58
  (0, react_1.useEffect)(function () {
59
59
  return function () { return clearTimeout(timeout); };
@@ -65,7 +65,7 @@ function TextFieldBase(_a) {
65
65
  clearErrors(name);
66
66
  }
67
67
  function handleKeyDown(e) {
68
- if (textLineType === 'single' && e.code === 'Enter') {
68
+ if (textLineType === 'single' && enterSubmitMode === 'none' && e.code === 'Enter') {
69
69
  e.preventDefault();
70
70
  }
71
71
  if (inputType === 'number') {
@@ -111,7 +111,7 @@ function TextFieldBase(_a) {
111
111
  }
112
112
  }
113
113
  var textAreaRef = (0, react_1.useRef)(null);
114
- var _q = register(name, validation), ref = _q.ref, refRest = __rest(_q, ["ref"]);
114
+ var _r = register(name, validation), ref = _r.ref, refRest = __rest(_r, ["ref"]);
115
115
  (0, react_1.useEffect)(function () {
116
116
  if (textAreaRef === null || textAreaRef.current === null) {
117
117
  return;
@@ -10,6 +10,7 @@ export declare type TextFieldProps = {
10
10
  };
11
11
  validationPoint?: 'onChange' | 'onBlur';
12
12
  preventBlankMode?: 'none' | 'trim' | 'all';
13
+ enterSubmitMode?: 'none' | 'use';
13
14
  size?: 'small' | 'medium' | 'large' | 'rlarge';
14
15
  responsiveMode?: 'none' | 'use';
15
16
  textLineType?: 'single' | 'multi' | 'auto';
@@ -34,5 +35,5 @@ export declare type TextFieldProps = {
34
35
  onKeyUp?: (e: React.KeyboardEvent<HTMLInputElement> | React.KeyboardEvent<HTMLTextAreaElement>) => void;
35
36
  onTarget?: () => void;
36
37
  };
37
- declare function TextField({ name, hintText, defaultText, validation, validationPoint, preventBlankMode, size, responsiveMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, colorTheme, max, maxLength, min, onBlur, onChange, onClickIBtn1, onClickIBtn2, onFocus, onKeyUp, onTarget }: TextFieldProps): JSX.Element;
38
+ declare function TextField({ name, hintText, defaultText, validation, validationPoint, preventBlankMode, enterSubmitMode, size, responsiveMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, colorTheme, max, maxLength, min, onBlur, onChange, onClickIBtn1, onClickIBtn2, onFocus, onKeyUp, onTarget }: TextFieldProps): JSX.Element;
38
39
  export default TextField;
@@ -32,7 +32,7 @@ var components_1 = require("../../common/components");
32
32
  var IconButton_1 = require("../IconButton");
33
33
  function TextField(_a) {
34
34
  var _b;
35
- var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, validation = _a.validation, _c = _a.validationPoint, validationPoint = _c === void 0 ? 'onBlur' : _c, _d = _a.preventBlankMode, preventBlankMode = _d === void 0 ? 'none' : _d, _e = _a.size, size = _e === void 0 ? 'large' : _e, _f = _a.responsiveMode, responsiveMode = _f === void 0 ? 'none' : _f, _g = _a.textLineType, textLineType = _g === void 0 ? 'single' : _g, _h = _a.multiRows, multiRows = _h === void 0 ? 8 : _h, _j = _a.autoMinRows, autoMinRows = _j === void 0 ? 8 : _j, autoMaxRows = _a.autoMaxRows, _k = _a.inputType, inputType = _k === void 0 ? 'text' : _k, _l = _a.state, state = _l === void 0 ? 'normal' : _l, iBtn1IconName = _a.iBtn1IconName, _m = _a.iBtn1IconFillType, iBtn1IconFillType = _m === void 0 ? 'line' : _m, iBtn2IconName = _a.iBtn2IconName, _o = _a.iBtn2IconFillType, iBtn2IconFillType = _o === void 0 ? 'line' : _o, _p = _a.colorTheme, colorTheme = _p === void 0 ? 'none' : _p, max = _a.max, maxLength = _a.maxLength, min = _a.min, onBlur = _a.onBlur, onChange = _a.onChange, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onFocus = _a.onFocus, onKeyUp = _a.onKeyUp, onTarget = _a.onTarget;
35
+ var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, validation = _a.validation, _c = _a.validationPoint, validationPoint = _c === void 0 ? 'onBlur' : _c, _d = _a.preventBlankMode, preventBlankMode = _d === void 0 ? 'none' : _d, _e = _a.enterSubmitMode, enterSubmitMode = _e === void 0 ? 'none' : _e, _f = _a.size, size = _f === void 0 ? 'large' : _f, _g = _a.responsiveMode, responsiveMode = _g === void 0 ? 'none' : _g, _h = _a.textLineType, textLineType = _h === void 0 ? 'single' : _h, _j = _a.multiRows, multiRows = _j === void 0 ? 8 : _j, _k = _a.autoMinRows, autoMinRows = _k === void 0 ? 8 : _k, autoMaxRows = _a.autoMaxRows, _l = _a.inputType, inputType = _l === void 0 ? 'text' : _l, _m = _a.state, state = _m === void 0 ? 'normal' : _m, iBtn1IconName = _a.iBtn1IconName, _o = _a.iBtn1IconFillType, iBtn1IconFillType = _o === void 0 ? 'line' : _o, iBtn2IconName = _a.iBtn2IconName, _p = _a.iBtn2IconFillType, iBtn2IconFillType = _p === void 0 ? 'line' : _p, _q = _a.colorTheme, colorTheme = _q === void 0 ? 'none' : _q, max = _a.max, maxLength = _a.maxLength, min = _a.min, onBlur = _a.onBlur, onChange = _a.onChange, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onFocus = _a.onFocus, onKeyUp = _a.onKeyUp, onTarget = _a.onTarget;
36
36
  var iconThemeColorNoneObj = {
37
37
  normal: 'ui_cpnt_button_icon_default',
38
38
  read_only: 'ui_cpnt_button_icon_default',
@@ -44,9 +44,9 @@ function TextField(_a) {
44
44
  disabled: 'ui_cpnt_textfield_icon_darktheme_disabled'
45
45
  };
46
46
  var t = (0, react_i18next_1.useTranslation)('translation').t;
47
- var _q = (0, react_1.useState)(false), isFocused = _q[0], setIsFocused = _q[1];
48
- var _r = (0, react_hook_form_1.useFormContext)(), register = _r.register, trigger = _r.trigger, errors = _r.formState.errors;
49
- var _s = register(name, validation), validateOnChange = _s.onChange, validateOnBlur = _s.onBlur;
47
+ var _r = (0, react_1.useState)(false), isFocused = _r[0], setIsFocused = _r[1];
48
+ var _s = (0, react_hook_form_1.useFormContext)(), register = _s.register, trigger = _s.trigger, errors = _s.formState.errors;
49
+ var _t = register(name, validation), validateOnChange = _t.onChange, validateOnBlur = _t.onBlur;
50
50
  var isError = Object.keys(errors).some(function (error) { return error === name; });
51
51
  var handleClickIBtn1 = function () {
52
52
  if (onClickIBtn1) {
@@ -103,7 +103,7 @@ function TextField(_a) {
103
103
  }
104
104
  if (textLineType === 'single') {
105
105
  return (react_1.default.createElement(react_1.default.Fragment, null,
106
- react_1.default.createElement(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, validation: validation, preventBlankMode: preventBlankMode, textLineType: "single", inputType: inputType, state: state, colorTheme: colorTheme, min: min, max: max, maxLength: maxLength, textSize: "form2", textWeight: "normal", deleteIconMode: "use", deleteIconSize: size === 'large' || size === 'rlarge' ? 20 : 16, isFocused: isFocused, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp }),
106
+ react_1.default.createElement(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, validation: validation, preventBlankMode: preventBlankMode, enterSubmitMode: enterSubmitMode, textLineType: "single", inputType: inputType, state: state, colorTheme: colorTheme, min: min, max: max, maxLength: maxLength, textSize: "form2", textWeight: "normal", deleteIconMode: "use", deleteIconSize: size === 'large' || size === 'rlarge' ? 20 : 16, isFocused: isFocused, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp }),
107
107
  react_1.default.createElement(S_IconBox, null,
108
108
  iBtn2IconName && (react_1.default.createElement(IconButton_1.IconButton, { iconName: iBtn2IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: colorTheme &&
109
109
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/release-note.md CHANGED
@@ -1,13 +1,11 @@
1
1
  # PDS-DEV-KIT-WEB Release Notes
2
- ## [v1.3.0]
2
+ ## [v1.3.1]
3
3
 
4
4
  ### Component
5
- * BlogTextField
6
- * desktop최적화 버전 추가
7
- * spacingMode prop추가
8
- * AdminList 생성
9
- * AdminListItem 생성
10
- * AdminListHeader 생성
11
-
12
- ### Color
13
- * 컬러 키 값 22.04.13 00시 13분 기준 싱크
5
+ * DesktopBasicModal
6
+ * mBtn1State, mBtn2State, mBtn3State 추가
7
+ * 전체 높이와 Body부분 높이 관련 css 수정
8
+ * TextFieldBase
9
+ * enterSubmitMode prop 추가
10
+ * TextField
11
+ * enterSubmitMode prop 추가