pds-dev-kit-web 0.5.18 → 0.6.0

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 (45) hide show
  1. package/dist/index.d.ts +2 -2
  2. package/dist/index.js +3 -2
  3. package/dist/src/common/assets/icons/line/Lock.d.ts +4 -0
  4. package/dist/src/common/assets/icons/line/Lock.js +36 -0
  5. package/dist/src/common/assets/icons/line/index.d.ts +1 -0
  6. package/dist/src/common/assets/icons/line/index.js +2 -0
  7. package/dist/src/common/index.d.ts +2 -2
  8. package/dist/src/common/index.js +2 -1
  9. package/dist/src/common/styles/ui-colors.d.ts +1 -0
  10. package/dist/src/common/styles/ui-colors.js +10 -5
  11. package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.d.ts +1 -1
  12. package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.js +6 -11
  13. package/dist/src/desktop/components/EditApplyTextField/EditApplyTextField.d.ts +3 -2
  14. package/dist/src/desktop/components/EditApplyTextField/EditApplyTextField.js +17 -14
  15. package/dist/src/desktop/components/MainButton/MainButton.d.ts +2 -1
  16. package/dist/src/desktop/components/MainButton/MainButton.js +6 -3
  17. package/dist/src/desktop/components/Select/Select.d.ts +2 -1
  18. package/dist/src/desktop/components/Select/Select.js +7 -4
  19. package/dist/src/desktop/components/TextButton/TextButton.d.ts +2 -1
  20. package/dist/src/desktop/components/TextButton/TextButton.js +6 -3
  21. package/dist/src/desktop/components/TextField/TextField.d.ts +3 -2
  22. package/dist/src/desktop/components/TextField/TextField.js +12 -9
  23. package/dist/src/desktop/components/UploadMainButton/UploadMainButton.d.ts +2 -1
  24. package/dist/src/desktop/components/UploadMainButton/UploadMainButton.js +6 -3
  25. package/dist/src/desktop/components/UploadTextButton/UploadTextButton.d.ts +2 -1
  26. package/dist/src/desktop/components/UploadTextButton/UploadTextButton.js +6 -3
  27. package/dist/src/hybrid/components/Icon/Icon.d.ts +1 -1
  28. package/dist/src/hybrid/components/Icon/Icon.js +2 -24
  29. package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.d.ts +1 -1
  30. package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.js +6 -11
  31. package/dist/src/mobile/components/BlogTextField/BlogTextField.d.ts +1 -1
  32. package/dist/src/mobile/components/BlogTextField/BlogTextField.js +2 -2
  33. package/dist/src/mobile/components/MainButton/MainButton.d.ts +2 -1
  34. package/dist/src/mobile/components/MainButton/MainButton.js +6 -3
  35. package/dist/src/mobile/components/Select/Select.d.ts +2 -1
  36. package/dist/src/mobile/components/Select/Select.js +7 -4
  37. package/dist/src/mobile/components/TextButton/TextButton.d.ts +2 -1
  38. package/dist/src/mobile/components/TextButton/TextButton.js +6 -3
  39. package/dist/src/mobile/components/TextField/TextField.d.ts +3 -2
  40. package/dist/src/mobile/components/TextField/TextField.js +12 -9
  41. package/dist/src/mobile/components/UploadMainButton/UploadMainButton.d.ts +2 -1
  42. package/dist/src/mobile/components/UploadMainButton/UploadMainButton.js +6 -3
  43. package/dist/src/mobile/components/UploadTextButton/UploadTextButton.d.ts +2 -1
  44. package/dist/src/mobile/components/UploadTextButton/UploadTextButton.js +6 -3
  45. package/package.json +1 -1
@@ -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.textLineType, textLineType = _f === void 0 ? 'single' : _f, _g = _a.multiRows, multiRows = _g === void 0 ? 8 : _g, _h = _a.autoMinRows, autoMinRows = _h === void 0 ? 8 : _h, autoMaxRows = _a.autoMaxRows, _j = _a.inputType, inputType = _j === void 0 ? 'text' : _j, _k = _a.state, state = _k === void 0 ? 'normal' : _k, iBtn1IconName = _a.iBtn1IconName, _l = _a.iBtn1IconFillType, iBtn1IconFillType = _l === void 0 ? 'line' : _l, iBtn2IconName = _a.iBtn2IconName, _m = _a.iBtn2IconFillType, iBtn2IconFillType = _m === void 0 ? 'line' : _m, _o = _a.colorTheme, colorTheme = _o === void 0 ? 'none' : _o, 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.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;
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 _p = (0, react_1.useState)(false), isFocused = _p[0], setIsFocused = _p[1];
48
- var _q = (0, react_hook_form_1.useFormContext)(), register = _q.register, trigger = _q.trigger, errors = _q.formState.errors;
49
- var _r = register(name, validation), validateOnChange = _r.onChange, validateOnBlur = _r.onBlur;
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;
50
50
  var isError = Object.keys(errors).some(function (error) { return error === name; });
51
51
  var handleClickIBtn1 = function () {
52
52
  if (onClickIBtn1) {
@@ -58,12 +58,12 @@ function TextField(_a) {
58
58
  onClickIBtn2();
59
59
  }
60
60
  };
61
- function handleFocus() {
61
+ function handleFocus(e) {
62
62
  if (state !== 'read_only') {
63
63
  setIsFocused(true);
64
64
  }
65
65
  if (onFocus) {
66
- onFocus();
66
+ onFocus(e);
67
67
  }
68
68
  }
69
69
  function handleTarget() {
@@ -117,8 +117,8 @@ function TextField(_a) {
117
117
  }[colorTheme], iconFillType: iBtn1IconFillType === 'fill' ? 'fill' : 'line', state: state === 'disabled' ? 'disabled' : 'normal', onClick: handleClickIBtn1 })))));
118
118
  }
119
119
  };
120
- return (react_1.default.createElement(react_1.default.Fragment, null,
121
- react_1.default.createElement(S_TextFieldWrapper, { size: size, textLineType: textLineType, isFocused: isFocused, isError: isError, state: state, colorTheme: colorTheme }, S_TextField()),
120
+ return (react_1.default.createElement("div", null,
121
+ react_1.default.createElement(S_TextFieldWrapper, { size: size, responsiveMode: responsiveMode, textLineType: textLineType, isFocused: isFocused, isError: isError, state: state, colorTheme: colorTheme }, S_TextField()),
122
122
  ((_b = errors[name]) === null || _b === void 0 ? void 0 : _b.message) && react_1.default.createElement(S_Error, null, t(errors[name].message))));
123
123
  }
124
124
  var multi = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: auto;\n padding: 14px;\n"], ["\n height: auto;\n padding: 14px;\n"])));
@@ -213,7 +213,7 @@ var dark_disabled = (0, styled_components_1.css)(templateObject_11 || (templateO
213
213
  var theme = _a.theme;
214
214
  return theme.ui_cpnt_textfield_border_darktheme_normal;
215
215
  });
216
- var S_TextFieldWrapper = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: center;\n border-radius: 8px;\n box-sizing: border-box;\n display: flex;\n ", ";\n ", ";\n ", ";\n"], ["\n align-items: center;\n border-radius: 8px;\n box-sizing: border-box;\n display: flex;\n ", ";\n ", ";\n ", ";\n"])), function (_a) {
216
+ var S_TextFieldWrapper = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: center;\n border-radius: 8px;\n box-sizing: border-box;\n display: flex;\n ", ";\n ", ";\n ", ";\n ", ";\n"], ["\n align-items: center;\n border-radius: 8px;\n box-sizing: border-box;\n display: flex;\n ", ";\n ", ";\n ", ";\n ", ";\n"])), function (_a) {
217
217
  var size = _a.size;
218
218
  return size &&
219
219
  {
@@ -240,6 +240,9 @@ var S_TextFieldWrapper = styled_components_1.default.div(templateObject_12 || (t
240
240
  read_only: dark_read_only,
241
241
  disabled: dark_disabled
242
242
  }[state];
243
+ }, function (_a) {
244
+ var responsiveMode = _a.responsiveMode;
245
+ return responsiveMode === 'use' && 'width: 100%';
243
246
  });
244
247
  var S_IconBox = styled_components_1.default.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
245
248
  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-top: ", ";\n text-align: left;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n"])), function (_a) {
@@ -4,6 +4,7 @@ declare type UploadMainButtonProps = {
4
4
  text?: PDSTextType;
5
5
  fillType?: 'fill' | 'line';
6
6
  size?: 'large' | 'medium' | 'small' | 'xsmall' | 'rlarge';
7
+ responsiveMode?: 'none' | 'use';
7
8
  fontWeight?: 'bold' | 'regular';
8
9
  iconMode?: 'none' | 'left' | 'right';
9
10
  iconFillType?: 'fill' | 'line';
@@ -14,5 +15,5 @@ declare type UploadMainButtonProps = {
14
15
  multipleMode?: 'none' | 'use';
15
16
  onClick?: (e: React.ChangeEvent<HTMLInputElement>) => void;
16
17
  };
17
- declare function UploadMainButton({ text, fillType, size, fontWeight, iconMode, iconFillType, iconName, colorTheme, state, accept, multipleMode, onClick }: UploadMainButtonProps): JSX.Element;
18
+ declare function UploadMainButton({ text, fillType, size, responsiveMode, fontWeight, iconMode, iconFillType, iconName, colorTheme, state, accept, multipleMode, onClick }: UploadMainButtonProps): JSX.Element;
18
19
  export default UploadMainButton;
@@ -32,7 +32,7 @@ var hybrid_1 = require("../../../hybrid");
32
32
  var TextLabel_1 = require("../TextLabel");
33
33
  var types_1 = require("./types");
34
34
  function UploadMainButton(_a) {
35
- var text = _a.text, _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.size, size = _c === void 0 ? 'large' : _c, fontWeight = _a.fontWeight, _d = _a.iconMode, iconMode = _d === void 0 ? 'none' : _d, _e = _a.iconFillType, iconFillType = _e === void 0 ? 'line' : _e, _f = _a.iconName, iconName = _f === void 0 ? 'ic_upload' : _f, _g = _a.colorTheme, colorTheme = _g === void 0 ? 'none' : _g, _h = _a.state, state = _h === void 0 ? 'normal' : _h, _j = _a.accept, accept = _j === void 0 ? '*' : _j, _k = _a.multipleMode, multipleMode = _k === void 0 ? 'none' : _k, onClick = _a.onClick;
35
+ var text = _a.text, _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.size, size = _c === void 0 ? 'large' : _c, _d = _a.responsiveMode, responsiveMode = _d === void 0 ? 'none' : _d, fontWeight = _a.fontWeight, _e = _a.iconMode, iconMode = _e === void 0 ? 'none' : _e, _f = _a.iconFillType, iconFillType = _f === void 0 ? 'line' : _f, _g = _a.iconName, iconName = _g === void 0 ? 'ic_upload' : _g, _h = _a.colorTheme, colorTheme = _h === void 0 ? 'none' : _h, _j = _a.state, state = _j === void 0 ? 'normal' : _j, _k = _a.accept, accept = _k === void 0 ? '*' : _k, _l = _a.multipleMode, multipleMode = _l === void 0 ? 'none' : _l, onClick = _a.onClick;
36
36
  var handleClick = function (e) {
37
37
  if (onClick) {
38
38
  onClick(e);
@@ -59,7 +59,7 @@ function UploadMainButton(_a) {
59
59
  }
60
60
  return types_1.iconFillTypeColors[fillType];
61
61
  };
62
- return (react_1.default.createElement(S_UploadMainButton, { fillType: fillType, size: size, fontWeight: fontWeight, colorTheme: colorTheme, disabled: state === 'disabled' },
62
+ return (react_1.default.createElement(S_UploadMainButton, { fillType: fillType, size: size, responsiveMode: responsiveMode, fontWeight: fontWeight, colorTheme: colorTheme, disabled: state === 'disabled' },
63
63
  react_1.default.createElement("input", { type: "file", hidden: true, disabled: state === 'disabled', accept: accept, multiple: multipleMode === 'use', onChange: handleClick }),
64
64
  size !== 'xsmall' && iconMode === 'left' && (react_1.default.createElement(react_1.default.Fragment, null,
65
65
  react_1.default.createElement(hybrid_1.Icon, { iconName: iconName, size: size === 'large' || size === 'rlarge' ? 20 : 16, colorKey: iconColor(), fillType: iconFillType }),
@@ -157,7 +157,7 @@ var line = (0, styled_components_1.css)(templateObject_12 || (templateObject_12
157
157
  var disabled = _a.disabled;
158
158
  return disabled && lineDisabled;
159
159
  });
160
- var S_UploadMainButton = styled_components_1.default.label(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n box-sizing: border-box;\n cursor: ", ";\n display: inline-flex;\n justify-content: center;\n\n & > div {\n font-weight: ", ";\n }\n\n ", "\n ", "\n"], ["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n box-sizing: border-box;\n cursor: ", ";\n display: inline-flex;\n justify-content: center;\n\n & > div {\n font-weight: ", ";\n }\n\n ", "\n ", "\n"])), function (_a) {
160
+ var S_UploadMainButton = styled_components_1.default.label(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n box-sizing: border-box;\n cursor: ", ";\n display: inline-flex;\n justify-content: center;\n\n & > div {\n font-weight: ", ";\n }\n\n ", "\n ", "\n ", ";\n"], ["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n box-sizing: border-box;\n cursor: ", ";\n display: inline-flex;\n justify-content: center;\n\n & > div {\n font-weight: ", ";\n }\n\n ", "\n ", "\n ", ";\n"])), function (_a) {
161
161
  var disabled = _a.disabled;
162
162
  return (disabled ? 'default' : 'pointer');
163
163
  }, function (_a) {
@@ -173,6 +173,9 @@ var S_UploadMainButton = styled_components_1.default.label(templateObject_13 ||
173
173
  }, function (_a) {
174
174
  var size = _a.size;
175
175
  return size && { large: large, medium: medium, small: small, xsmall: xsmall, rlarge: large }[size];
176
+ }, function (_a) {
177
+ var responsiveMode = _a.responsiveMode;
178
+ return responsiveMode === 'use' && 'width: 100%';
176
179
  });
177
180
  exports.default = UploadMainButton;
178
181
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
@@ -3,11 +3,12 @@ import { PDSTextType } from '../../../common';
3
3
  declare type UploadTextButtonProps = {
4
4
  text?: PDSTextType;
5
5
  size?: 'rlarge' | 'large' | 'medium' | 'small' | 'xsmall';
6
+ responsiveMode?: 'none' | 'use';
6
7
  fontWeight?: 'bold' | 'regular';
7
8
  state?: 'normal' | 'disabled';
8
9
  accept?: string;
9
10
  multipleMode?: 'none' | 'use';
10
11
  onClick?: (e: React.ChangeEvent<HTMLInputElement>) => void;
11
12
  };
12
- declare function UploadTextButton({ text, size, fontWeight, state, accept, multipleMode, onClick }: UploadTextButtonProps): JSX.Element;
13
+ declare function UploadTextButton({ text, size, responsiveMode, fontWeight, state, accept, multipleMode, onClick }: UploadTextButtonProps): JSX.Element;
13
14
  export default UploadTextButton;
@@ -37,13 +37,13 @@ var textStyle = {
37
37
  xsmall: 'caption1Regular'
38
38
  };
39
39
  function UploadTextButton(_a) {
40
- var text = _a.text, _b = _a.size, size = _b === void 0 ? 'large' : _b, fontWeight = _a.fontWeight, _c = _a.state, state = _c === void 0 ? 'normal' : _c, _d = _a.accept, accept = _d === void 0 ? '*' : _d, _e = _a.multipleMode, multipleMode = _e === void 0 ? 'none' : _e, onClick = _a.onClick;
40
+ var text = _a.text, _b = _a.size, size = _b === void 0 ? 'large' : _b, _c = _a.responsiveMode, responsiveMode = _c === void 0 ? 'none' : _c, fontWeight = _a.fontWeight, _d = _a.state, state = _d === void 0 ? 'normal' : _d, _e = _a.accept, accept = _e === void 0 ? '*' : _e, _f = _a.multipleMode, multipleMode = _f === void 0 ? 'none' : _f, onClick = _a.onClick;
41
41
  var handleClick = function (e) {
42
42
  if (onClick) {
43
43
  onClick(e);
44
44
  }
45
45
  };
46
- return (react_1.default.createElement(S_UploadTextButton, { size: size, fontWeight: fontWeight, disabled: state === 'disabled' },
46
+ return (react_1.default.createElement(S_UploadTextButton, { size: size, responsiveMode: responsiveMode, fontWeight: fontWeight, disabled: state === 'disabled' },
47
47
  react_1.default.createElement("input", { type: "file", hidden: true, disabled: state === 'disabled', accept: accept, multiple: multipleMode === 'use', onChange: handleClick }),
48
48
  react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: textStyle[size], colorTheme: state === 'disabled' ? 'sysTextTertiary' : 'usrTextBrandPrimary', btnMode: "use" })));
49
49
  }
@@ -54,7 +54,7 @@ var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 =
54
54
  var medium = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 40px;\n"], ["\n height: 40px;\n"])));
55
55
  var small = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 32px;\n"], ["\n height: 32px;\n"])));
56
56
  var xsmall = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 24px;\n"], ["\n height: 24px;\n"])));
57
- var S_UploadTextButton = styled_components_1.default.label(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 8px;\n box-sizing: border-box;\n cursor: ", ";\n display: inline-flex;\n justify-content: center;\n padding: 0 ", ";\n\n &:hover:not([disabled]) {\n background-color: ", ";\n }\n\n &:active:not([disabled]) {\n background-color: ", ";\n }\n\n & > div {\n font-weight: ", ";\n }\n\n ", ";\n"], ["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 8px;\n box-sizing: border-box;\n cursor: ", ";\n display: inline-flex;\n justify-content: center;\n padding: 0 ", ";\n\n &:hover:not([disabled]) {\n background-color: ", ";\n }\n\n &:active:not([disabled]) {\n background-color: ", ";\n }\n\n & > div {\n font-weight: ", ";\n }\n\n ", ";\n"])), function (_a) {
57
+ var S_UploadTextButton = styled_components_1.default.label(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 8px;\n box-sizing: border-box;\n cursor: ", ";\n display: inline-flex;\n justify-content: center;\n padding: 0 ", ";\n\n &:hover:not([disabled]) {\n background-color: ", ";\n }\n\n &:active:not([disabled]) {\n background-color: ", ";\n }\n\n & > div {\n font-weight: ", ";\n }\n\n ", ";\n ", ";\n"], ["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 8px;\n box-sizing: border-box;\n cursor: ", ";\n display: inline-flex;\n justify-content: center;\n padding: 0 ", ";\n\n &:hover:not([disabled]) {\n background-color: ", ";\n }\n\n &:active:not([disabled]) {\n background-color: ", ";\n }\n\n & > div {\n font-weight: ", ";\n }\n\n ", ";\n ", ";\n"])), function (_a) {
58
58
  var disabled = _a.disabled;
59
59
  return (disabled ? 'default' : 'pointer');
60
60
  }, function (_a) {
@@ -83,6 +83,9 @@ var S_UploadTextButton = styled_components_1.default.label(templateObject_5 || (
83
83
  small: small,
84
84
  xsmall: xsmall
85
85
  }[size];
86
+ }, function (_a) {
87
+ var responsiveMode = _a.responsiveMode;
88
+ return responsiveMode === 'use' && 'width: 100%';
86
89
  });
87
90
  exports.default = UploadTextButton;
88
91
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -11,5 +11,5 @@ export declare type IconProps = {
11
11
  colorKey?: UiColors;
12
12
  fillType?: 'line' | 'fill';
13
13
  } & Record<string, any>;
14
- declare const Icon: ({ iconName, size, colorKey, fillType, ...rest }: IconProps) => JSX.Element;
14
+ declare const Icon: ({ iconName, size, colorKey, fillType }: IconProps) => JSX.Element;
15
15
  export default Icon;
@@ -1,26 +1,4 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __rest = (this && this.__rest) || function (s, e) {
14
- var t = {};
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
- t[p] = s[p];
17
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
- t[p[i]] = s[p[i]];
21
- }
22
- return t;
23
- };
24
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
25
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
26
4
  };
@@ -30,10 +8,10 @@ var fill_1 = __importDefault(require("../../../common/assets/icons/fill"));
30
8
  var line_1 = __importDefault(require("../../../common/assets/icons/line"));
31
9
  var ui_colors_1 = require("../../../common/styles/ui-colors");
32
10
  var Icon = function (_a) {
33
- var _b = _a.iconName, iconName = _b === void 0 ? 'ic_unavailable' : _b, _c = _a.size, size = _c === void 0 ? 24 : _c, _d = _a.colorKey, colorKey = _d === void 0 ? 'ui_cpnt_icon_sys_grey_01' : _d, _e = _a.fillType, fillType = _e === void 0 ? 'line' : _e, rest = __rest(_a, ["iconName", "size", "colorKey", "fillType"]);
11
+ var _b = _a.iconName, iconName = _b === void 0 ? 'ic_unavailable' : _b, _c = _a.size, size = _c === void 0 ? 24 : _c, _d = _a.colorKey, colorKey = _d === void 0 ? 'ui_cpnt_icon_sys_grey_01' : _d, _e = _a.fillType, fillType = _e === void 0 ? 'line' : _e;
34
12
  var SelectedIcon = fillType === 'line'
35
13
  ? line_1.default[iconName] || fill_1.default[iconName]
36
14
  : fill_1.default[iconName] || line_1.default[iconName];
37
- return react_1.default.createElement(SelectedIcon, __assign({ color: ui_colors_1.uiColors[colorKey], size: size }, rest));
15
+ return react_1.default.createElement(SelectedIcon, { color: ui_colors_1.uiColors[colorKey], size: size });
38
16
  };
39
17
  exports.default = Icon;
@@ -29,7 +29,7 @@ export declare type TextFieldBaseProps = {
29
29
  isFocused?: boolean;
30
30
  onBlur?: (e: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement>) => void;
31
31
  onChange?: (e: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>) => void;
32
- onFocus?: () => void;
32
+ onFocus?: (e: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement>) => void;
33
33
  onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement> | React.KeyboardEvent<HTMLTextAreaElement>) => void;
34
34
  onKeyUp?: (e: React.KeyboardEvent<HTMLInputElement> | React.KeyboardEvent<HTMLTextAreaElement>) => void;
35
35
  onTarget?: () => void;
@@ -58,17 +58,12 @@ function TextFieldBase(_a) {
58
58
  (0, react_1.useEffect)(function () {
59
59
  return function () { return clearTimeout(timeout); };
60
60
  }, []);
61
- function handleFocus() {
61
+ function handleFocus(e) {
62
62
  if (onFocus) {
63
- onFocus();
63
+ onFocus(e);
64
64
  }
65
65
  clearErrors(name);
66
66
  }
67
- function handleTarget() {
68
- if (onTarget) {
69
- onTarget();
70
- }
71
- }
72
67
  function handleKeyDown(e) {
73
68
  if (onKeyDown) {
74
69
  onKeyDown(e);
@@ -175,14 +170,14 @@ function TextFieldBase(_a) {
175
170
  var S_TextFieldBase = function () {
176
171
  if (textLineType === 'single') {
177
172
  return (react_1.default.createElement(S_InputWrapper, null,
178
- react_1.default.createElement(S_Input, __assign({}, register(name, validation), rest, { name: name, defaultValue: defaultText, placeholder: hintText, type: inputType, state: state, readOnly: state === 'read_only', disabled: state === 'disabled', maxLength: maxLength, textSize: textSize, textWeight: textWeight, textPadding: textPadding, colorTheme: colorTheme, min: min, max: max, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: ref })),
173
+ react_1.default.createElement(S_Input, __assign({}, register(name, validation), rest, { name: name, defaultValue: defaultText, placeholder: hintText, type: inputType, state: state, readOnly: state === 'read_only', disabled: state === 'disabled', maxLength: maxLength, textSize: textSize, textWeight: textWeight, textPadding: textPadding, colorTheme: colorTheme, min: min, max: max, onFocus: handleFocus, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: ref })),
179
174
  deleteIconMode === 'use' && isFocused && (react_1.default.createElement(IconButton_1.IconButton, { iconName: "ic_delete", baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: deleteIconSize, iconColorKey: deleteIconColor, iconFillType: "fill", state: state === 'disabled' ? 'disabled' : 'normal', onMouseDown: deleteValue }))));
180
175
  }
181
176
  if (textLineType === 'multi') {
182
- return (react_1.default.createElement(S_Multi, __assign({}, register(name, validation), rest, { name: name, defaultValue: defaultText, placeholder: hintText, state: state, readOnly: state === 'read_only' && true, disabled: state === 'disabled' && true, maxLength: maxLength, rows: multiRows, textSize: textSize, textWeight: textWeight, textPadding: textPadding, colorTheme: colorTheme, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: ref })));
177
+ return (react_1.default.createElement(S_Multi, __assign({}, register(name, validation), rest, { name: name, defaultValue: defaultText, placeholder: hintText, state: state, readOnly: state === 'read_only' && true, disabled: state === 'disabled' && true, maxLength: maxLength, rows: multiRows, textSize: textSize, textWeight: textWeight, textPadding: textPadding, colorTheme: colorTheme, onFocus: handleFocus, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: ref })));
183
178
  }
184
179
  if (textLineType === 'auto') {
185
- return (react_1.default.createElement(S_Auto, __assign({}, refRest, rest, { name: name, defaultValue: defaultText, autoMinRows: autoMinRows, autoMaxRows: autoMaxRows, placeholder: hintText, state: state, readOnly: state === 'read_only' && true, disabled: state === 'disabled' && true, maxLength: maxLength, textSize: textSize, textWeight: textWeight, textPadding: textPadding, fieldHeight: fieldHeight, colorTheme: colorTheme, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: function (e) {
180
+ return (react_1.default.createElement(S_Auto, __assign({}, refRest, rest, { name: name, defaultValue: defaultText, autoMinRows: autoMinRows, autoMaxRows: autoMaxRows, placeholder: hintText, state: state, readOnly: state === 'read_only' && true, disabled: state === 'disabled' && true, maxLength: maxLength, textSize: textSize, textWeight: textWeight, textPadding: textPadding, fieldHeight: fieldHeight, colorTheme: colorTheme, onFocus: handleFocus, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: function (e) {
186
181
  ref(e);
187
182
  textAreaRef.current = e;
188
183
  }, onInput: handleResizeHeight })));
@@ -246,7 +241,7 @@ var S_Input = styled_components_1.default.input(templateObject_5 || (templateObj
246
241
  var theme = _a.theme;
247
242
  return theme.desktopLineHeight.singleLine;
248
243
  });
249
- var S_Auto = styled_components_1.default.textarea(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", "\n resize: none;\n ", "\n ", ";\n"], ["\n ", "\n resize: none;\n ", "\n ", ";\n"])), basicStyle, function (_a) {
244
+ var S_Auto = styled_components_1.default.textarea(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", "\n display: block;\n overflow-y: auto;\n resize: none;\n ", "\n ", ";\n"], ["\n ", "\n display: block;\n overflow-y: auto;\n resize: none;\n ", "\n ", ";\n"])), basicStyle, function (_a) {
250
245
  var autoMaxRows = _a.autoMaxRows, textSize = _a.textSize, fieldHeight = _a.fieldHeight;
251
246
  return autoMaxRows &&
252
247
  fieldHeight &&
@@ -17,7 +17,7 @@ export declare type BlogTextFieldProps = {
17
17
  };
18
18
  onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
19
19
  onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
20
- onFocus?: () => void;
20
+ onFocus?: (e: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement>) => void;
21
21
  onTarget?: () => void;
22
22
  };
23
23
  declare function BlogTextField({ hintText, defaultText, size, textLineType, multiRows, autoMinRows, autoMaxRows, state, maxLength, name, validation, onBlur, onChange, onFocus, onTarget }: BlogTextFieldProps): JSX.Element;
@@ -32,9 +32,9 @@ var styled_components_1 = __importStar(require("styled-components"));
32
32
  var components_1 = require("../../common/components");
33
33
  function BlogTextField(_a) {
34
34
  var hintText = _a.hintText, defaultText = _a.defaultText, _b = _a.size, size = _b === void 0 ? 'rlarge' : _b, _c = _a.textLineType, textLineType = _c === void 0 ? 'auto' : _c, _d = _a.multiRows, multiRows = _d === void 0 ? 8 : _d, _e = _a.autoMinRows, autoMinRows = _e === void 0 ? 8 : _e, autoMaxRows = _a.autoMaxRows, _f = _a.state, state = _f === void 0 ? 'normal' : _f, maxLength = _a.maxLength, name = _a.name, validation = _a.validation, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, onTarget = _a.onTarget;
35
- function handleFocus() {
35
+ function handleFocus(e) {
36
36
  if (onFocus) {
37
- onFocus();
37
+ onFocus(e);
38
38
  }
39
39
  }
40
40
  function handleBlur(e) {
@@ -4,6 +4,7 @@ export declare type MainButtonProps = {
4
4
  text?: PDSTextType;
5
5
  fillType?: 'fill' | 'line';
6
6
  size?: 'large' | 'medium' | 'small' | 'xsmall' | 'rlarge';
7
+ responsiveMode?: 'none' | 'use';
7
8
  fontWeight?: 'bold' | 'regular';
8
9
  iconMode?: 'none' | 'left' | 'right';
9
10
  iconFillType?: 'fill' | 'line';
@@ -14,5 +15,5 @@ export declare type MainButtonProps = {
14
15
  onClick?: (...args: any) => any;
15
16
  onMouseDown?: (...args: any) => any;
16
17
  };
17
- declare function MainButton({ text, fillType, size, fontWeight, iconMode, iconFillType, iconName, colorTheme, type, state, onClick, onMouseDown }: MainButtonProps): JSX.Element;
18
+ declare function MainButton({ text, fillType, size, responsiveMode, fontWeight, iconMode, iconFillType, iconName, colorTheme, type, state, onClick, onMouseDown }: MainButtonProps): JSX.Element;
18
19
  export default MainButton;
@@ -37,7 +37,7 @@ var TextLabel_1 = require("../TextLabel");
37
37
  // borderColorKey?: string;
38
38
  // shadow?: 'hidden' | 'visible';
39
39
  function MainButton(_a) {
40
- var text = _a.text, _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.size, size = _c === void 0 ? 'large' : _c, fontWeight = _a.fontWeight, _d = _a.iconMode, iconMode = _d === void 0 ? 'none' : _d, _e = _a.iconFillType, iconFillType = _e === void 0 ? 'line' : _e, iconName = _a.iconName, _f = _a.colorTheme, colorTheme = _f === void 0 ? 'none' : _f, _g = _a.type, type = _g === void 0 ? 'button' : _g, _h = _a.state, state = _h === void 0 ? 'normal' : _h, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
40
+ var text = _a.text, _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.size, size = _c === void 0 ? 'large' : _c, _d = _a.responsiveMode, responsiveMode = _d === void 0 ? 'none' : _d, fontWeight = _a.fontWeight, _e = _a.iconMode, iconMode = _e === void 0 ? 'none' : _e, _f = _a.iconFillType, iconFillType = _f === void 0 ? 'line' : _f, iconName = _a.iconName, _g = _a.colorTheme, colorTheme = _g === void 0 ? 'none' : _g, _h = _a.type, type = _h === void 0 ? 'button' : _h, _j = _a.state, state = _j === void 0 ? 'normal' : _j, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
41
41
  var handleClick = function () {
42
42
  if (onClick) {
43
43
  onClick();
@@ -94,7 +94,7 @@ function MainButton(_a) {
94
94
  }
95
95
  return iconFillTypeColorObj[fillType];
96
96
  };
97
- return (react_1.default.createElement(S_Button, { fillType: fillType, size: size, fontWeight: fontWeight, colorTheme: colorTheme, type: type, state: state, disabled: state === 'disabled', onClick: handleClick, onMouseDown: handleMouseDown },
97
+ return (react_1.default.createElement(S_Button, { fillType: fillType, size: size, responsiveMode: responsiveMode, fontWeight: fontWeight, colorTheme: colorTheme, type: type, state: state, disabled: state === 'disabled', onClick: handleClick, onMouseDown: handleMouseDown },
98
98
  size !== 'xsmall' && iconMode === 'left' && (react_1.default.createElement(react_1.default.Fragment, null,
99
99
  react_1.default.createElement(hybrid_1.Icon, { iconName: iconName, size: size === 'large' || size === 'rlarge' ? 20 : 16, colorKey: iconColor(), fillType: iconFillType }),
100
100
  react_1.default.createElement(hybrid_1.Spacing, { size: size === 'large' || size === 'rlarge' ? 'spacing_b' : 'spacing_a', spacingType: "width" }))),
@@ -170,7 +170,7 @@ var line = (0, styled_components_1.css)(templateObject_12 || (templateObject_12
170
170
  var state = _a.state;
171
171
  return state === 'disabled' && lineDisabled;
172
172
  });
173
- var S_Button = styled_components_1.default.button(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n cursor: ", ";\n display: flex;\n justify-content: center;\n\n &:focus {\n outline: none;\n }\n\n ", "\n ", "\n\n & > div {\n ", ";\n }\n"], ["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n cursor: ", ";\n display: flex;\n justify-content: center;\n\n &:focus {\n outline: none;\n }\n\n ", "\n ", "\n\n & > div {\n ", ";\n }\n"])), function (_a) {
173
+ var S_Button = styled_components_1.default.button(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n cursor: ", ";\n display: flex;\n justify-content: center;\n\n &:focus {\n outline: none;\n }\n\n ", "\n ", "\n ", ";\n\n & > div {\n ", ";\n }\n"], ["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n cursor: ", ";\n display: flex;\n justify-content: center;\n\n &:focus {\n outline: none;\n }\n\n ", "\n ", "\n ", ";\n\n & > div {\n ", ";\n }\n"])), function (_a) {
174
174
  var state = _a.state;
175
175
  return (state === 'normal' ? 'pointer' : 'default');
176
176
  }, function (_a) {
@@ -179,6 +179,9 @@ var S_Button = styled_components_1.default.button(templateObject_13 || (template
179
179
  }, function (_a) {
180
180
  var size = _a.size;
181
181
  return size && { large: large, medium: medium, small: small, xsmall: xsmall, rlarge: large }[size];
182
+ }, function (_a) {
183
+ var responsiveMode = _a.responsiveMode;
184
+ return responsiveMode === 'use' && 'width: 100%';
182
185
  }, function (_a) {
183
186
  var theme = _a.theme, fontWeight = _a.fontWeight;
184
187
  return fontWeight &&
@@ -9,9 +9,10 @@ declare type SelectProps = {
9
9
  defaultValue?: Value;
10
10
  valueArray: Value[];
11
11
  size?: 'large' | 'medium' | 'small' | 'rlarge';
12
+ responsiveMode?: 'none' | 'use';
12
13
  state?: 'normal' | 'read_only' | 'disabled';
13
14
  onChange?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
14
15
  colorTheme?: 'none' | 'dark';
15
16
  };
16
- declare function Select({ hintText, defaultValue, valueArray, size, state, onChange, colorTheme }: SelectProps): JSX.Element;
17
+ declare function Select({ hintText, defaultValue, valueArray, size, responsiveMode, state, onChange, colorTheme }: SelectProps): JSX.Element;
17
18
  export default Select;
@@ -27,8 +27,8 @@ var react_1 = __importStar(require("react"));
27
27
  var styled_components_1 = __importStar(require("styled-components"));
28
28
  var hybrid_1 = require("../../../hybrid");
29
29
  function Select(_a) {
30
- var hintText = _a.hintText, defaultValue = _a.defaultValue, valueArray = _a.valueArray, _b = _a.size, size = _b === void 0 ? 'large' : _b, _c = _a.state, state = _c === void 0 ? 'normal' : _c, onChange = _a.onChange, _d = _a.colorTheme, colorTheme = _d === void 0 ? 'none' : _d;
31
- var _e = (0, react_1.useState)(false), isFocused = _e[0], setIsFocused = _e[1];
30
+ var hintText = _a.hintText, defaultValue = _a.defaultValue, valueArray = _a.valueArray, _b = _a.size, size = _b === void 0 ? 'large' : _b, _c = _a.responsiveMode, responsiveMode = _c === void 0 ? 'none' : _c, _d = _a.state, state = _d === void 0 ? 'normal' : _d, onChange = _a.onChange, _e = _a.colorTheme, colorTheme = _e === void 0 ? 'none' : _e;
31
+ var _f = (0, react_1.useState)(false), isFocused = _f[0], setIsFocused = _f[1];
32
32
  var handleClick = function () { return setIsFocused(true); };
33
33
  var handleBlur = function () { return setIsFocused(false); };
34
34
  var handleChange = function (e) {
@@ -49,7 +49,7 @@ function Select(_a) {
49
49
  }
50
50
  return 'ui_cpnt_select_icon_01';
51
51
  };
52
- return (react_1.default.createElement(S_Box, { size: size, onClick: handleClick, onBlur: handleBlur, tabIndex: 0 },
52
+ return (react_1.default.createElement(S_Box, { size: size, responsiveMode: responsiveMode, onClick: handleClick, onBlur: handleBlur, tabIndex: 0 },
53
53
  react_1.default.createElement(S_Icon, { size: 16, fillType: "line", iconName: isFocused ? 'ic_arrow_up' : 'ic_arrow_down', colorKey: getIconColorKey() }),
54
54
  react_1.default.createElement(S_Select, { disabled: state === 'disabled' || state === 'read_only', defaultValue: (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.value) || '', state: state, colorTheme: colorTheme, onChange: handleChange },
55
55
  react_1.default.createElement("option", { disabled: true, value: (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.value) || '' }, (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.text) || hintText),
@@ -83,7 +83,7 @@ var dark = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 =
83
83
  var theme = _a.theme;
84
84
  return theme.ui_cpnt_select_text_darktheme_enabled;
85
85
  });
86
- var S_Box = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: relative;\n z-index: 0;\n\n ", "\n"], ["\n position: relative;\n z-index: 0;\n\n ", "\n"])), function (_a) {
86
+ var S_Box = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: relative;\n z-index: 0;\n\n ", "\n ", ";\n"], ["\n position: relative;\n z-index: 0;\n\n ", "\n ", ";\n"])), function (_a) {
87
87
  var size = _a.size;
88
88
  return size &&
89
89
  {
@@ -92,6 +92,9 @@ var S_Box = styled_components_1.default.div(templateObject_6 || (templateObject_
92
92
  small: small,
93
93
  rlarge: rlarge
94
94
  }[size];
95
+ }, function (_a) {
96
+ var responsiveMode = _a.responsiveMode;
97
+ return responsiveMode === 'use' && 'width: 100%';
95
98
  });
96
99
  var S_Icon = (0, styled_components_1.default)(hybrid_1.Icon)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n z-index: 2;\n"], ["\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n z-index: 2;\n"])), function (_a) {
97
100
  var theme = _a.theme;
@@ -3,10 +3,11 @@ import { PDSTextType } from '../../../common';
3
3
  export declare type TextButtonProps = {
4
4
  text?: PDSTextType;
5
5
  size?: 'rlarge' | 'large' | 'medium' | 'small' | 'xsmall';
6
+ responsiveMode?: 'none' | 'use';
6
7
  fontWeight?: 'bold' | 'regular';
7
8
  type?: 'submit' | 'reset' | 'button';
8
9
  state?: 'normal' | 'disabled';
9
10
  onClick?: (...args: any) => any;
10
11
  };
11
- declare function TextButton({ text, size, fontWeight, type, state, onClick, ...rest }: TextButtonProps): JSX.Element;
12
+ declare function TextButton({ text, size, responsiveMode, fontWeight, type, state, onClick, ...rest }: TextButtonProps): JSX.Element;
12
13
  export default TextButton;
@@ -54,7 +54,7 @@ var TextLabel_1 = require("../TextLabel");
54
54
  // NOTE : 기획상 아직 사용하지 않는 props
55
55
  // colorTheme?: 'none';
56
56
  function TextButton(_a) {
57
- var text = _a.text, _b = _a.size, size = _b === void 0 ? 'large' : _b, fontWeight = _a.fontWeight, _c = _a.type, type = _c === void 0 ? 'button' : _c, _d = _a.state, state = _d === void 0 ? 'normal' : _d, onClick = _a.onClick, rest = __rest(_a, ["text", "size", "fontWeight", "type", "state", "onClick"]);
57
+ var text = _a.text, _b = _a.size, size = _b === void 0 ? 'large' : _b, _c = _a.responsiveMode, responsiveMode = _c === void 0 ? 'none' : _c, fontWeight = _a.fontWeight, _d = _a.type, type = _d === void 0 ? 'button' : _d, _e = _a.state, state = _e === void 0 ? 'normal' : _e, onClick = _a.onClick, rest = __rest(_a, ["text", "size", "responsiveMode", "fontWeight", "type", "state", "onClick"]);
58
58
  var handleClick = function () {
59
59
  if (onClick) {
60
60
  onClick();
@@ -67,7 +67,7 @@ function TextButton(_a) {
67
67
  small: 'caption1Bold',
68
68
  xsmall: 'caption1Regular'
69
69
  };
70
- return (react_1.default.createElement(S_Button, __assign({}, rest, { size: size, onClick: handleClick, type: type, fontWeight: fontWeight, disabled: state === 'disabled' }),
70
+ return (react_1.default.createElement(S_Button, __assign({}, rest, { size: size, responsiveMode: responsiveMode, onClick: handleClick, type: type, fontWeight: fontWeight, disabled: state === 'disabled' }),
71
71
  react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: textStyle[size], colorTheme: state === 'disabled' ? 'sysTextTertiary' : 'usrTextBrandPrimary', btnMode: "use" })));
72
72
  }
73
73
  var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 48px;\n ", ";\n"], ["\n height: 48px;\n ", ";\n"])), function (_a) {
@@ -77,7 +77,7 @@ var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 =
77
77
  var medium = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 40px;\n"], ["\n height: 40px;\n"])));
78
78
  var small = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 32px;\n"], ["\n height: 32px;\n"])));
79
79
  var xsmall = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 24px;\n"], ["\n height: 24px;\n"])));
80
- var S_Button = styled_components_1.default.button(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 8px;\n cursor: ", ";\n display: flex;\n justify-content: center;\n padding-left: 8px;\n padding-right: 8px;\n\n &:active:enabled {\n background-color: ", ";\n }\n ", ";\n\n & > div {\n ", ";\n }\n"], ["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 8px;\n cursor: ", ";\n display: flex;\n justify-content: center;\n padding-left: 8px;\n padding-right: 8px;\n\n &:active:enabled {\n background-color: ", ";\n }\n ", ";\n\n & > div {\n ", ";\n }\n"])), function (_a) {
80
+ var S_Button = styled_components_1.default.button(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 8px;\n cursor: ", ";\n display: flex;\n justify-content: center;\n padding-left: 8px;\n padding-right: 8px;\n\n &:active:enabled {\n background-color: ", ";\n }\n ", ";\n\n & > div {\n ", ";\n }\n ", ";\n"], ["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 8px;\n cursor: ", ";\n display: flex;\n justify-content: center;\n padding-left: 8px;\n padding-right: 8px;\n\n &:active:enabled {\n background-color: ", ";\n }\n ", ";\n\n & > div {\n ", ";\n }\n ", ";\n"])), function (_a) {
81
81
  var state = _a.state;
82
82
  return (state === 'normal' ? 'pointer' : 'default');
83
83
  }, function (_a) {
@@ -100,6 +100,9 @@ var S_Button = styled_components_1.default.button(templateObject_5 || (templateO
100
100
  bold: "font-weight: " + theme.fontWeight.bold,
101
101
  regular: "font-weight: " + theme.fontWeight.normal
102
102
  }[fontWeight];
103
+ }, function (_a) {
104
+ var responsiveMode = _a.responsiveMode;
105
+ return responsiveMode === 'use' && 'width: 100%';
103
106
  });
104
107
  exports.default = TextButton;
105
108
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -11,6 +11,7 @@ export declare type TextFieldProps = {
11
11
  validationPoint?: 'onChange' | 'onBlur';
12
12
  preventBlankMode?: 'none' | 'trim' | 'all';
13
13
  size?: 'small' | 'medium' | 'large' | 'rlarge';
14
+ responsiveMode?: 'none' | 'use';
14
15
  textLineType?: 'single' | 'multi' | 'auto';
15
16
  multiRows?: number;
16
17
  autoMinRows?: number;
@@ -29,9 +30,9 @@ export declare type TextFieldProps = {
29
30
  onChange?: (e: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>) => void;
30
31
  onClickIBtn1?: () => void;
31
32
  onClickIBtn2?: () => void;
32
- onFocus?: () => void;
33
+ onFocus?: (e: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement>) => void;
33
34
  onKeyUp?: (e: React.KeyboardEvent<HTMLInputElement> | React.KeyboardEvent<HTMLTextAreaElement>) => void;
34
35
  onTarget?: () => void;
35
36
  };
36
- declare function TextField({ name, hintText, defaultText, validation, validationPoint, preventBlankMode, size, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, colorTheme, max, maxLength, min, onBlur, onChange, onClickIBtn1, onClickIBtn2, onFocus, onKeyUp, onTarget }: TextFieldProps): JSX.Element;
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;
37
38
  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.textLineType, textLineType = _f === void 0 ? 'single' : _f, _g = _a.multiRows, multiRows = _g === void 0 ? 8 : _g, _h = _a.autoMinRows, autoMinRows = _h === void 0 ? 8 : _h, autoMaxRows = _a.autoMaxRows, _j = _a.inputType, inputType = _j === void 0 ? 'text' : _j, _k = _a.state, state = _k === void 0 ? 'normal' : _k, iBtn1IconName = _a.iBtn1IconName, _l = _a.iBtn1IconFillType, iBtn1IconFillType = _l === void 0 ? 'line' : _l, iBtn2IconName = _a.iBtn2IconName, _m = _a.iBtn2IconFillType, iBtn2IconFillType = _m === void 0 ? 'line' : _m, _o = _a.colorTheme, colorTheme = _o === void 0 ? 'none' : _o, 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.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;
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 _p = (0, react_1.useState)(false), isFocused = _p[0], setIsFocused = _p[1];
48
- var _q = (0, react_hook_form_1.useFormContext)(), register = _q.register, trigger = _q.trigger, errors = _q.formState.errors;
49
- var _r = register(name, validation), validateOnChange = _r.onChange, validateOnBlur = _r.onBlur;
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;
50
50
  var isError = Object.keys(errors).some(function (error) { return error === name; });
51
51
  var handleClickIBtn1 = function () {
52
52
  if (onClickIBtn1) {
@@ -58,12 +58,12 @@ function TextField(_a) {
58
58
  onClickIBtn2();
59
59
  }
60
60
  };
61
- function handleFocus() {
61
+ function handleFocus(e) {
62
62
  if (state !== 'read_only') {
63
63
  setIsFocused(true);
64
64
  }
65
65
  if (onFocus) {
66
- onFocus();
66
+ onFocus(e);
67
67
  }
68
68
  }
69
69
  function handleTarget() {
@@ -117,8 +117,8 @@ function TextField(_a) {
117
117
  }[colorTheme], iconFillType: iBtn1IconFillType === 'fill' ? 'fill' : 'line', state: state === 'disabled' ? 'disabled' : 'normal', onClick: handleClickIBtn1 })))));
118
118
  }
119
119
  };
120
- return (react_1.default.createElement(react_1.default.Fragment, null,
121
- react_1.default.createElement(S_TextFieldWrapper, { size: size, textLineType: textLineType, isFocused: isFocused, isError: isError, state: state, colorTheme: colorTheme }, S_TextField()),
120
+ return (react_1.default.createElement("div", null,
121
+ react_1.default.createElement(S_TextFieldWrapper, { size: size, responsiveMode: responsiveMode, textLineType: textLineType, isFocused: isFocused, isError: isError, state: state, colorTheme: colorTheme }, S_TextField()),
122
122
  ((_b = errors[name]) === null || _b === void 0 ? void 0 : _b.message) && react_1.default.createElement(S_Error, null, t(errors[name].message))));
123
123
  }
124
124
  var multi = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: auto;\n padding: 14px;\n"], ["\n height: auto;\n padding: 14px;\n"])));
@@ -213,7 +213,7 @@ var dark_disabled = (0, styled_components_1.css)(templateObject_11 || (templateO
213
213
  var theme = _a.theme;
214
214
  return theme.ui_cpnt_textfield_border_darktheme_normal;
215
215
  });
216
- var S_TextFieldWrapper = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: center;\n border-radius: 8px;\n box-sizing: border-box;\n display: flex;\n ", ";\n ", ";\n ", ";\n"], ["\n align-items: center;\n border-radius: 8px;\n box-sizing: border-box;\n display: flex;\n ", ";\n ", ";\n ", ";\n"])), function (_a) {
216
+ var S_TextFieldWrapper = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: center;\n border-radius: 8px;\n box-sizing: border-box;\n display: flex;\n ", ";\n ", ";\n ", ";\n ", ";\n"], ["\n align-items: center;\n border-radius: 8px;\n box-sizing: border-box;\n display: flex;\n ", ";\n ", ";\n ", ";\n ", ";\n"])), function (_a) {
217
217
  var size = _a.size;
218
218
  return size &&
219
219
  {
@@ -240,6 +240,9 @@ var S_TextFieldWrapper = styled_components_1.default.div(templateObject_12 || (t
240
240
  read_only: dark_read_only,
241
241
  disabled: dark_disabled
242
242
  }[state];
243
+ }, function (_a) {
244
+ var responsiveMode = _a.responsiveMode;
245
+ return responsiveMode === 'use' && 'width: 100%';
243
246
  });
244
247
  var S_IconBox = styled_components_1.default.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
245
248
  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-top: ", ";\n text-align: left;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n"])), function (_a) {
@@ -4,6 +4,7 @@ declare type UploadMainButtonProps = {
4
4
  text?: PDSTextType;
5
5
  fillType?: 'fill' | 'line';
6
6
  size?: 'large' | 'medium' | 'small' | 'xsmall' | 'rlarge';
7
+ responsiveMode?: 'none' | 'use';
7
8
  fontWeight?: 'bold' | 'regular';
8
9
  iconMode?: 'none' | 'left' | 'right';
9
10
  iconFillType?: 'fill' | 'line';
@@ -14,5 +15,5 @@ declare type UploadMainButtonProps = {
14
15
  multipleMode?: 'none' | 'use';
15
16
  onClick?: (e: React.ChangeEvent<HTMLInputElement>) => void;
16
17
  };
17
- declare function UploadMainButton({ text, fillType, size, fontWeight, iconMode, iconFillType, iconName, colorTheme, state, accept, multipleMode, onClick }: UploadMainButtonProps): JSX.Element;
18
+ declare function UploadMainButton({ text, fillType, size, responsiveMode, fontWeight, iconMode, iconFillType, iconName, colorTheme, state, accept, multipleMode, onClick }: UploadMainButtonProps): JSX.Element;
18
19
  export default UploadMainButton;