pds-dev-kit-web 1.3.27 → 1.4.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.
- package/dist/index.d.ts +6 -6
- package/dist/index.js +7 -3
- package/dist/src/GlobalStyle.js +1 -1
- package/dist/src/common/components/BoxLayout/Col.d.ts +7 -0
- package/dist/src/common/components/BoxLayout/Col.js +48 -0
- package/dist/src/common/components/BoxLayout/Grid.d.ts +9 -0
- package/dist/src/common/components/BoxLayout/Grid.js +51 -0
- package/dist/src/common/components/BoxLayout/Row.d.ts +7 -0
- package/dist/src/common/components/BoxLayout/Row.js +48 -0
- package/dist/src/common/components/BoxLayout/index.d.ts +3 -0
- package/dist/src/common/components/BoxLayout/index.js +12 -0
- package/dist/src/common/components/Navigations/ContextTextLabelNav.d.ts +11 -0
- package/dist/src/common/components/Navigations/ContextTextLabelNav.js +15 -0
- package/dist/src/common/components/Navigations/NavLink.d.ts +13 -0
- package/dist/src/common/components/Navigations/NavLink.js +42 -0
- package/dist/src/common/components/Navigations/Navs.d.ts +10 -0
- package/dist/src/common/components/Navigations/Navs.js +43 -0
- package/dist/src/common/components/Navigations/TextLabelNav.d.ts +11 -0
- package/dist/src/common/components/Navigations/TextLabelNav.js +15 -0
- package/dist/src/common/components/Navigations/index.d.ts +2 -0
- package/dist/src/common/components/Navigations/index.js +10 -0
- package/dist/src/common/decorators/withFormProvider.js +4 -1
- package/dist/src/common/hooks/index.d.ts +1 -0
- package/dist/src/common/hooks/index.js +8 -0
- package/dist/src/common/hooks/useDetectOverflow.d.ts +10 -0
- package/dist/src/common/hooks/useDetectOverflow.js +46 -0
- package/dist/src/common/index.d.ts +2 -2
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +12 -4
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +12 -4
- package/dist/src/common/styles/colorSet/SemanticColor.json +2 -1
- package/dist/src/common/styles/colorSet/UIColor.json +45 -27
- package/dist/src/common/styles/colorSet/index.d.ts +97 -62
- package/dist/src/common/styles/colorSet/index.js +2 -2
- package/dist/src/common/styles/colorSet/ui-type.d.ts +18 -0
- package/dist/src/common/types/components.d.ts +2 -0
- package/dist/src/common/types/icon.d.ts +1 -0
- package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.d.ts +2 -1
- package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.js +29 -11
- package/dist/src/desktop/components/AdminList/AdminList.d.ts +22 -8
- package/dist/src/desktop/components/AdminList/AdminList.js +21 -2
- package/dist/src/desktop/components/AdminList/BulkActionBar.d.ts +8 -8
- package/dist/src/desktop/components/AdminList/BulkActionBar.js +8 -8
- package/dist/src/desktop/components/AdminListHeader/AdminListHeader.js +1 -1
- package/dist/src/desktop/components/BasicListItem/BasicListItem.js +3 -3
- package/dist/src/desktop/components/BlogTextField/BlogTextField.js +7 -4
- package/dist/src/desktop/components/ContextMenu/ContextMenu.js +2 -2
- package/dist/src/desktop/components/DesktopAlertDialog/DesktopAlertDialog.d.ts +7 -1
- package/dist/src/desktop/components/DesktopAlertDialog/DesktopAlertDialog.js +5 -5
- package/dist/src/desktop/components/DesktopHeaderBar/DesktopHeaderBar.js +4 -2
- package/dist/src/desktop/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/src/desktop/components/Dropdown/Dropdown.js +123 -24
- package/dist/src/desktop/components/DynamicDesktopNavBar/DynamicDesktopNavBar.d.ts +27 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/DynamicDesktopNavBar.js +70 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/BrandLogo.d.ts +10 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/BrandLogo.js +20 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/PrimaryMenu.d.ts +10 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/PrimaryMenu.js +109 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/SecondaryMenu.d.ts +10 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/SecondaryMenu.js +19 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/UserProfile.d.ts +9 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/UserProfile.js +22 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/index.d.ts +4 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/index.js +14 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/ContextMenuNavs/ContextMenuItemNav.d.ts +12 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/ContextMenuNavs/ContextMenuItemNav.js +73 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/ContextMenuNavs/ContextMenuNavs.d.ts +7 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/ContextMenuNavs/ContextMenuNavs.js +49 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/ContextMenuNavs/index.d.ts +2 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/ContextMenuNavs/index.js +10 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/IconNav.d.ts +8 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/IconNav.js +14 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/ImageIconNav.d.ts +8 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/ImageIconNav.js +22 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/LogoNav.d.ts +8 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/LogoNav.js +22 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/MenuItemNav.d.ts +8 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/MenuItemNav.js +65 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/components/PAppMenuItemNav.d.ts +11 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/components/PAppMenuItemNav.js +49 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/components/WebMenuItemNav.d.ts +11 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/components/WebMenuItemNav.js +22 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/index.d.ts +1 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/index.js +8 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/ProfileNav.d.ts +7 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/ProfileNav.js +22 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/TextNav.d.ts +10 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/TextNav.js +25 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/index.d.ts +0 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/index.js +0 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/index.d.ts +1 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/index.js +8 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/templates/MenuDesignTemplates.d.ts +102 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/templates/MenuDesignTemplates.js +31 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/templates/constants.d.ts +101 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/templates/constants.js +104 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/templates/index.d.ts +2 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/templates/index.js +19 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/templates/types.d.ts +20 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/templates/types.js +2 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/types.d.ts +12 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/types.js +5 -0
- package/dist/src/desktop/components/EditApplyTextField/EditApplyTextField.js +53 -24
- package/dist/src/desktop/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/dist/src/desktop/components/HorizontalFormGroup/HorizontalFormGroup.d.ts +11 -0
- package/dist/src/desktop/components/HorizontalFormGroup/HorizontalFormGroup.js +62 -0
- package/dist/src/desktop/components/HorizontalFormGroup/index.d.ts +1 -0
- package/dist/src/desktop/components/HorizontalFormGroup/index.js +8 -0
- package/dist/src/desktop/components/MainButton/MainButton.d.ts +3 -1
- package/dist/src/desktop/components/MainButton/MainButton.js +82 -14
- package/dist/src/desktop/components/ReactionButton/ReactionButton.js +9 -5
- package/dist/src/desktop/components/Select/Select.js +28 -10
- package/dist/src/desktop/components/TextButton/TextButton.d.ts +2 -1
- package/dist/src/desktop/components/TextButton/TextButton.js +20 -17
- package/dist/src/desktop/components/TextField/TextField.js +14 -11
- package/dist/src/desktop/components/TextLabel/TextLabel.d.ts +6 -1
- package/dist/src/desktop/components/TextLabel/TextLabel.js +29 -13
- package/dist/src/desktop/components/UploadMainButton/UploadMainButton.d.ts +3 -1
- package/dist/src/desktop/components/UploadMainButton/UploadMainButton.js +80 -11
- package/dist/src/desktop/components/UploadMainButton/types.d.ts +4 -4
- package/dist/src/desktop/components/UploadMainButton/types.js +5 -5
- package/dist/src/desktop/components/UploadTextButton/UploadTextButton.d.ts +2 -1
- package/dist/src/desktop/components/UploadTextButton/UploadTextButton.js +12 -7
- package/dist/src/desktop/components/UserDesktopNavBar/UserDesktopNavBar.js +1 -1
- package/dist/src/desktop/components/index.d.ts +3 -2
- package/dist/src/desktop/components/index.js +5 -3
- package/dist/src/desktop/index.d.ts +4 -2
- package/dist/src/desktop/index.js +7 -2
- package/dist/src/desktop/{components → panels}/DesktopBasicModal/DesktopBasicModal.d.ts +1 -1
- package/dist/src/desktop/{components → panels}/DesktopBasicModal/DesktopBasicModal.js +13 -10
- package/dist/src/desktop/{components → panels}/DesktopBasicModal/index.d.ts +0 -0
- package/dist/src/desktop/{components → panels}/DesktopBasicModal/index.js +0 -0
- package/dist/src/desktop/panels/DesktopHeadlessModal/DesktopHeadlessModal.d.ts +10 -0
- package/dist/src/desktop/panels/DesktopHeadlessModal/DesktopHeadlessModal.js +121 -0
- package/dist/src/desktop/panels/DesktopHeadlessModal/index.d.ts +1 -0
- package/dist/src/desktop/panels/DesktopHeadlessModal/index.js +8 -0
- package/dist/src/desktop/panels/index.d.ts +3 -0
- package/dist/src/desktop/panels/index.js +7 -0
- package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.js +6 -6
- package/dist/src/mobile/components/BasicListItem/BasicListItem.js +3 -3
- package/dist/src/mobile/components/BlogTextField/BlogTextField.js +3 -3
- package/dist/src/mobile/components/ContextMenu/ContextMenu.d.ts +2 -1
- package/dist/src/mobile/components/ContextMenu/ContextMenu.js +6 -3
- package/dist/src/mobile/components/Dropdown/Dropdown.d.ts +7 -3
- package/dist/src/mobile/components/Dropdown/Dropdown.js +127 -29
- package/dist/src/mobile/components/HorizontalFormGroup/HorizontalFormGroup.d.ts +11 -0
- package/dist/src/mobile/components/HorizontalFormGroup/HorizontalFormGroup.js +62 -0
- package/dist/src/mobile/components/HorizontalFormGroup/index.d.ts +1 -0
- package/dist/src/mobile/components/HorizontalFormGroup/index.js +8 -0
- package/dist/src/mobile/components/MainButton/MainButton.d.ts +3 -1
- package/dist/src/mobile/components/MainButton/MainButton.js +82 -14
- package/dist/src/mobile/components/MobileAlertDialog/MobileAlertDialog.d.ts +7 -1
- package/dist/src/mobile/components/MobileAlertDialog/MobileAlertDialog.js +5 -5
- package/dist/src/mobile/components/ReactionButton/ReactionButton.js +7 -6
- package/dist/src/mobile/components/Select/Select.js +18 -10
- package/dist/src/mobile/components/TextButton/TextButton.d.ts +2 -1
- package/dist/src/mobile/components/TextButton/TextButton.js +19 -16
- package/dist/src/mobile/components/TextField/TextField.js +11 -11
- package/dist/src/mobile/components/TextLabel/TextLabel.d.ts +6 -1
- package/dist/src/mobile/components/TextLabel/TextLabel.js +39 -4
- package/dist/src/mobile/components/UploadMainButton/UploadMainButton.d.ts +3 -1
- package/dist/src/mobile/components/UploadMainButton/UploadMainButton.js +80 -11
- package/dist/src/mobile/components/UploadMainButton/types.d.ts +4 -4
- package/dist/src/mobile/components/UploadMainButton/types.js +5 -5
- package/dist/src/mobile/components/UploadTextButton/UploadTextButton.d.ts +2 -1
- package/dist/src/mobile/components/UploadTextButton/UploadTextButton.js +12 -7
- package/dist/src/mobile/components/index.d.ts +2 -2
- package/dist/src/mobile/components/index.js +3 -3
- package/dist/src/mobile/index.d.ts +4 -2
- package/dist/src/mobile/index.js +5 -2
- package/dist/src/mobile/{components → panels}/MobileBasicModal/MobileBasicModal.d.ts +8 -2
- package/dist/src/mobile/{components → panels}/MobileBasicModal/MobileBasicModal.js +25 -14
- package/dist/src/mobile/{components → panels}/MobileBasicModal/index.d.ts +0 -0
- package/dist/src/mobile/{components → panels}/MobileBasicModal/index.js +0 -0
- package/dist/src/mobile/panels/index.d.ts +2 -0
- package/dist/src/mobile/panels/index.js +5 -0
- package/package.json +3 -1
- package/release-note.md +3 -6
|
@@ -34,10 +34,11 @@ function EditApplyTextField(_a) {
|
|
|
34
34
|
var _b;
|
|
35
35
|
var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, validation = _a.validation, _c = _a.preventBlankMode, preventBlankMode = _c === void 0 ? 'none' : _c, _d = _a.size, size = _d === void 0 ? 'large' : _d, _e = _a.responsiveMode, responsiveMode = _e === void 0 ? 'none' : _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, max = _a.max, maxLength = _a.maxLength, min = _a.min, getInputValue = _a.getInputValue, onBlur = _a.onBlur, onChange = _a.onChange, onClickSubmitBtn = _a.onClickSubmitBtn, onFocus = _a.onFocus, onTarget = _a.onTarget;
|
|
36
36
|
var t = (0, react_i18next_1.useTranslation)('translation').t;
|
|
37
|
-
var _l = (0, react_hook_form_1.useFormContext)(), register = _l.register, setValue = _l.setValue, trigger = _l.trigger, watch = _l.watch,
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
37
|
+
var _l = (0, react_hook_form_1.useFormContext)(), register = _l.register, setValue = _l.setValue, trigger = _l.trigger, watch = _l.watch, reset = _l.reset, _m = _l.formState, errors = _m.errors, isSubmitSuccessful = _m.isSubmitSuccessful;
|
|
38
|
+
var _o = (0, react_1.useState)(false), isFocused = _o[0], setIsFocused = _o[1];
|
|
39
|
+
var _p = (0, react_1.useState)(false), isOpen = _p[0], setIsOpen = _p[1];
|
|
40
|
+
var _q = (0, react_1.useState)(defaultText !== null && defaultText !== void 0 ? defaultText : ''), prevValue = _q[0], setPrevValue = _q[1];
|
|
41
|
+
var ref = (0, react_1.useRef)();
|
|
41
42
|
var currentValue = watch(name);
|
|
42
43
|
var validateOnChange = register(name, validation).onChange;
|
|
43
44
|
var isError = Object.keys(errors).some(function (error) { return error === name; });
|
|
@@ -49,6 +50,17 @@ function EditApplyTextField(_a) {
|
|
|
49
50
|
}
|
|
50
51
|
setValue(name, '');
|
|
51
52
|
}, [defaultText]);
|
|
53
|
+
/**
|
|
54
|
+
* @when submit 버튼을 마우스로 클릭한 후 폼 제출에 성공했을 때
|
|
55
|
+
* @expected 인풋을 블러처리하고 인풋의 값은 유지한 채 isSubmitSuccessful을 초기화합니다.
|
|
56
|
+
*/
|
|
57
|
+
(0, react_1.useEffect)(function () {
|
|
58
|
+
var _a;
|
|
59
|
+
if (isSubmitSuccessful) {
|
|
60
|
+
(_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
61
|
+
reset({ name: name }, { keepValues: true });
|
|
62
|
+
}
|
|
63
|
+
}, [isSubmitSuccessful]);
|
|
52
64
|
function handleFocus(e) {
|
|
53
65
|
if (state !== 'read_only') {
|
|
54
66
|
setIsFocused(true);
|
|
@@ -82,44 +94,58 @@ function EditApplyTextField(_a) {
|
|
|
82
94
|
function handleCancel() {
|
|
83
95
|
setValue(name, prevValue);
|
|
84
96
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
97
|
+
/*
|
|
98
|
+
* NOTE
|
|
99
|
+
* preventBlankMode는 input에만 적용 가능
|
|
100
|
+
* 다른 TextField의 경우 'preventBlankMode === 'trim'일 경우에는 무조건 onBlur 시점에 적용'된다고 정의해두었지만,
|
|
101
|
+
* EditApplyTextField는 onBlur 시점에 모든 값이 초기값으로 돌리는 기획이 있기때문에 EditApplyTextField에서는 submit 버튼을 눌렀을 경우에 시행
|
|
102
|
+
*/
|
|
103
|
+
function checkBlankMode() {
|
|
88
104
|
if (textLineType === 'single' && preventBlankMode === 'trim') {
|
|
89
105
|
setValue(name, currentValue.replace(/^\s+|\s+$/gm, ''));
|
|
90
106
|
setPrevValue(currentValue.replace(/^\s+|\s+$/gm, ''));
|
|
91
|
-
if (getInputValue)
|
|
107
|
+
if (getInputValue) {
|
|
92
108
|
getInputValue([name, currentValue.replace(/^\s+|\s+$/gm, '')]);
|
|
109
|
+
}
|
|
93
110
|
}
|
|
94
111
|
if (preventBlankMode !== 'trim') {
|
|
95
112
|
setValue(name, currentValue);
|
|
96
113
|
setPrevValue(currentValue);
|
|
97
|
-
if (getInputValue)
|
|
114
|
+
if (getInputValue) {
|
|
98
115
|
getInputValue([name, currentValue]);
|
|
116
|
+
}
|
|
99
117
|
}
|
|
100
118
|
if (onClickSubmitBtn) {
|
|
101
119
|
onClickSubmitBtn();
|
|
102
120
|
}
|
|
103
121
|
}
|
|
104
|
-
var
|
|
122
|
+
var handleKeyDown = function (e) {
|
|
105
123
|
if (textLineType === 'single' && e.key === 'Enter') {
|
|
106
|
-
|
|
107
|
-
handleSubmit();
|
|
124
|
+
checkBlankMode();
|
|
108
125
|
}
|
|
109
126
|
if (e.key === 'Escape') {
|
|
110
127
|
e.target.blur();
|
|
111
128
|
}
|
|
112
129
|
};
|
|
130
|
+
var handleKeyUp = function (e) {
|
|
131
|
+
if (textLineType === 'single' && e.key === 'Enter') {
|
|
132
|
+
e.target.blur();
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
var handleMouseDown = function (e) {
|
|
136
|
+
e.preventDefault();
|
|
137
|
+
checkBlankMode();
|
|
138
|
+
};
|
|
113
139
|
var S_TextFieldBase = function () {
|
|
114
140
|
if (textLineType === 'multi') {
|
|
115
|
-
return (react_1.default.createElement(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, validation: validation, textLineType: "multi", multiRows: multiRows, state: state, maxLength: maxLength, textSize: size === 'large' || size === 'rlarge' ? 'form2' : 'heading', textWeight: size === 'large' || size === 'rlarge' ? 'normal' : 'bold', onFocus: handleFocus, onBlur: handleBlur, onTarget: handleTarget, onChange: handleChange,
|
|
141
|
+
return (react_1.default.createElement(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, validation: validation, textLineType: "multi", multiRows: multiRows, state: state, maxLength: maxLength, textSize: size === 'large' || size === 'rlarge' ? 'form2' : 'heading', textWeight: size === 'large' || size === 'rlarge' ? 'normal' : 'bold', onFocus: handleFocus, onBlur: handleBlur, onTarget: handleTarget, onChange: handleChange, inputRef: ref }));
|
|
116
142
|
}
|
|
117
143
|
if (textLineType === 'auto') {
|
|
118
|
-
return (react_1.default.createElement(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, validation: validation, textLineType: "auto", autoMinRows: autoMinRows, autoMaxRows: autoMaxRows, state: state, maxLength: maxLength, textSize: size === 'large' || size === 'rlarge' ? 'form2' : 'heading', textWeight: size === 'large' || size === 'rlarge' ? 'normal' : 'bold', onFocus: handleFocus, onBlur: handleBlur, onTarget: handleTarget, onChange: handleChange,
|
|
144
|
+
return (react_1.default.createElement(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, validation: validation, textLineType: "auto", autoMinRows: autoMinRows, autoMaxRows: autoMaxRows, state: state, maxLength: maxLength, textSize: size === 'large' || size === 'rlarge' ? 'form2' : 'heading', textWeight: size === 'large' || size === 'rlarge' ? 'normal' : 'bold', onFocus: handleFocus, onBlur: handleBlur, onTarget: handleTarget, onChange: handleChange, inputRef: ref }));
|
|
119
145
|
}
|
|
120
146
|
if (textLineType === 'single') {
|
|
121
147
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
122
|
-
react_1.default.createElement(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, validation: validation, preventBlankMode: preventBlankMode, 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, onKeyUp: handleKeyUp })));
|
|
148
|
+
react_1.default.createElement(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, onKeyUp: handleKeyUp, inputRef: ref })));
|
|
123
149
|
}
|
|
124
150
|
};
|
|
125
151
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
@@ -127,8 +153,8 @@ function EditApplyTextField(_a) {
|
|
|
127
153
|
react_1.default.createElement(S_EditApplyTextField, null,
|
|
128
154
|
react_1.default.createElement(S_S_TextFieldBaseWrapper, { size: size, responsiveMode: responsiveMode, textLineType: textLineType, isFocused: isFocused, isError: isError, state: state }, S_TextFieldBase()),
|
|
129
155
|
isOpen === true && (react_1.default.createElement(S_ButtonBox, null,
|
|
130
|
-
react_1.default.createElement(IconButton_1.IconButton, { iconName: "ic_xmark", fillType: "
|
|
131
|
-
react_1.default.createElement(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:
|
|
156
|
+
react_1.default.createElement(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 }),
|
|
157
|
+
react_1.default.createElement(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" })))),
|
|
132
158
|
((_b = errors[name]) === null || _b === void 0 ? void 0 : _b.message) && (react_1.default.createElement(S_Error, { isFocused: isFocused }, t(errors[name].message))))));
|
|
133
159
|
}
|
|
134
160
|
var S_EditApplyTextFieldWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n"], ["\n width: ", ";\n"])), function (_a) {
|
|
@@ -150,10 +176,10 @@ var auto = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 =
|
|
|
150
176
|
});
|
|
151
177
|
var xlarge = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n height: 56px;\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n ", "\n ", "\n"], ["\n height: 56px;\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n ", "\n ", "\n"])), function (_a) {
|
|
152
178
|
var theme = _a.theme;
|
|
153
|
-
return theme.spacing.
|
|
179
|
+
return theme.spacing.spacingC;
|
|
154
180
|
}, function (_a) {
|
|
155
181
|
var theme = _a.theme;
|
|
156
|
-
return theme.spacing.
|
|
182
|
+
return theme.spacing.spacingC;
|
|
157
183
|
}, function (_a) {
|
|
158
184
|
var responsiveMode = _a.responsiveMode;
|
|
159
185
|
return (responsiveMode === 'use' ? '100%' : '432px');
|
|
@@ -191,21 +217,24 @@ var normal = (0, styled_components_1.css)(templateObject_7 || (templateObject_7
|
|
|
191
217
|
return "box-shadow: 0 0 0 2px " + theme.ui_cpnt_textfield_border_focus + " inset;";
|
|
192
218
|
return "box-shadow: 0 0 0 1px " + theme.ui_cpnt_textfield_border_normal + " inset;";
|
|
193
219
|
});
|
|
194
|
-
var read_only = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n border: solid
|
|
220
|
+
var read_only = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n border: solid 2px ", ";\n"], ["\n background-color: ", ";\n border: solid 2px ", ";\n"])), function (_a) {
|
|
195
221
|
var theme = _a.theme;
|
|
196
222
|
return theme.ui_cpnt_textfield_base_disabled;
|
|
197
223
|
}, function (_a) {
|
|
198
224
|
var theme = _a.theme;
|
|
199
|
-
return theme.
|
|
225
|
+
return theme.ui_cpnt_textfield_border_disabled;
|
|
200
226
|
});
|
|
201
|
-
var disabled = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n background-color: ", ";\n border: solid
|
|
227
|
+
var disabled = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n background-color: ", ";\n border: solid 2px ", ";\n"], ["\n background-color: ", ";\n border: solid 2px ", ";\n"])), function (_a) {
|
|
202
228
|
var theme = _a.theme;
|
|
203
229
|
return theme.ui_cpnt_textfield_base_disabled;
|
|
204
230
|
}, function (_a) {
|
|
205
231
|
var theme = _a.theme;
|
|
206
|
-
return theme.
|
|
232
|
+
return theme.ui_cpnt_textfield_border_disabled;
|
|
207
233
|
});
|
|
208
|
-
var S_S_TextFieldBaseWrapper = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n align-items: center;\n border-radius:
|
|
234
|
+
var S_S_TextFieldBaseWrapper = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n align-items: center;\n border-radius: 14px;\n box-sizing: border-box;\n cursor: ", ";\n display: flex;\n ", ";\n ", ";\n"], ["\n align-items: center;\n border-radius: 14px;\n box-sizing: border-box;\n cursor: ", ";\n display: flex;\n ", ";\n ", ";\n"])), function (_a) {
|
|
235
|
+
var state = _a.state;
|
|
236
|
+
return (state === 'disabled' ? 'not-allowed' : 'text');
|
|
237
|
+
}, function (_a) {
|
|
209
238
|
var size = _a.size;
|
|
210
239
|
return size &&
|
|
211
240
|
{
|
|
@@ -91,7 +91,7 @@ var S_ButtonIconOnly = styled_components_1.default.button(templateObject_5 || (t
|
|
|
91
91
|
var size = _a.size;
|
|
92
92
|
return size && { large: large, xlarge: xlarge }[size];
|
|
93
93
|
});
|
|
94
|
-
var S_Button = styled_components_1.default.button(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n border-radius:
|
|
94
|
+
var S_Button = styled_components_1.default.button(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n border-radius: 14px;\n height: 48px;\n padding: ", ";\n ", ";\n"], ["\n border-radius: 14px;\n height: 48px;\n padding: ", ";\n ", ";\n"])), function (_a) {
|
|
95
95
|
var theme = _a.theme;
|
|
96
96
|
return "0 " + theme.spacing.spacingE;
|
|
97
97
|
}, floatingActionButtonStyle);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PDSTextType } from '../../../common';
|
|
3
|
+
declare type HorizontalFormGroupProps = {
|
|
4
|
+
labelText: PDSTextType;
|
|
5
|
+
captionText?: PDSTextType;
|
|
6
|
+
inputForm: JSX.Element;
|
|
7
|
+
labelAlignType?: 'top' | 'center';
|
|
8
|
+
labelTopSpacing?: 'small' | 'medium' | 'large';
|
|
9
|
+
};
|
|
10
|
+
declare function HorizontalFormGroup({ labelText, captionText, inputForm, labelAlignType, labelTopSpacing }: HorizontalFormGroupProps): JSX.Element;
|
|
11
|
+
export default HorizontalFormGroup;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
31
|
+
var TextLabel_1 = require("../TextLabel");
|
|
32
|
+
function HorizontalFormGroup(_a) {
|
|
33
|
+
var labelText = _a.labelText, captionText = _a.captionText, inputForm = _a.inputForm, _b = _a.labelAlignType, labelAlignType = _b === void 0 ? 'center' : _b, labelTopSpacing = _a.labelTopSpacing;
|
|
34
|
+
return (react_1.default.createElement(S_HorizontalFormGroupBox, { labelAlignType: labelAlignType },
|
|
35
|
+
react_1.default.createElement(S_LabelWrapper, { labelAlignType: labelAlignType, labelTopSpacing: labelTopSpacing }, labelAlignType === 'center' ? (react_1.default.createElement(TextLabel_1.TextLabel, { text: labelText, styleTheme: "body2Bold", ellipsisMode: "use", lineLimit: 2 })) : (react_1.default.createElement(TextLabel_1.TextLabel, { text: labelText, styleTheme: "body2Bold" }))),
|
|
36
|
+
react_1.default.createElement(S_InputFormWrapper, null, inputForm),
|
|
37
|
+
react_1.default.createElement(S_CaptionWrapper, null,
|
|
38
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: captionText, styleTheme: "caption1Regular" }))));
|
|
39
|
+
}
|
|
40
|
+
var centerArea = "\n'label inputForm'\n'. caption'";
|
|
41
|
+
var topArea = "\n'label inputForm'\n'label caption'";
|
|
42
|
+
var small = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-top: 5px;\n"], ["\n margin-top: 5px;\n"])));
|
|
43
|
+
var medium = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-top: 10px;\n"], ["\n margin-top: 10px;\n"])));
|
|
44
|
+
var large = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-top: 14px;\n"], ["\n margin-top: 14px;\n"])));
|
|
45
|
+
var S_HorizontalFormGroupBox = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: grid;\n gap: ", ";\n grid-template-columns: 112px max-content;\n grid-template-rows: auto 1fr;\n grid-template-areas: ", ";\n"], ["\n display: grid;\n gap: ", ";\n grid-template-columns: 112px max-content;\n grid-template-rows: auto 1fr;\n grid-template-areas: ", ";\n"])), function (_a) {
|
|
46
|
+
var theme = _a.theme;
|
|
47
|
+
return theme.spacing.spacingB;
|
|
48
|
+
}, function (_a) {
|
|
49
|
+
var labelAlignType = _a.labelAlignType;
|
|
50
|
+
return labelAlignType === 'center' ? centerArea : topArea;
|
|
51
|
+
});
|
|
52
|
+
var S_LabelWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-self: ", ";\n grid-area: label;\n overflow: hidden;\n\n ", ";\n"], ["\n align-self: ", ";\n grid-area: label;\n overflow: hidden;\n\n ", ";\n"])), function (_a) {
|
|
53
|
+
var labelAlignType = _a.labelAlignType;
|
|
54
|
+
return labelAlignType === 'center' && labelAlignType;
|
|
55
|
+
}, function (_a) {
|
|
56
|
+
var labelAlignType = _a.labelAlignType, labelTopSpacing = _a.labelTopSpacing;
|
|
57
|
+
return labelAlignType === 'top' && labelTopSpacing && { small: small, medium: medium, large: large }[labelTopSpacing];
|
|
58
|
+
});
|
|
59
|
+
var S_InputFormWrapper = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n grid-area: inputForm;\n"], ["\n grid-area: inputForm;\n"])));
|
|
60
|
+
var S_CaptionWrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n grid-area: caption;\n"], ["\n grid-area: caption;\n"])));
|
|
61
|
+
exports.default = HorizontalFormGroup;
|
|
62
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as HorizontalFormGroup } from './HorizontalFormGroup';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.HorizontalFormGroup = void 0;
|
|
7
|
+
var HorizontalFormGroup_1 = require("./HorizontalFormGroup");
|
|
8
|
+
Object.defineProperty(exports, "HorizontalFormGroup", { enumerable: true, get: function () { return __importDefault(HorizontalFormGroup_1).default; } });
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import { FillIconNameKeys, LineIconNameKeys, PDSTextType } from '../../../common';
|
|
3
3
|
export declare type MainButtonProps = {
|
|
4
4
|
text?: PDSTextType;
|
|
5
|
+
shapeType?: 'round' | 'rectangle';
|
|
5
6
|
fillType?: 'fill' | 'line';
|
|
7
|
+
styleTheme?: 'primary' | 'secondary';
|
|
6
8
|
size?: 'large' | 'medium' | 'small' | 'xsmall' | 'rlarge';
|
|
7
9
|
responsiveMode?: 'none' | 'use';
|
|
8
10
|
fontWeight?: 'bold' | 'regular';
|
|
@@ -15,5 +17,5 @@ export declare type MainButtonProps = {
|
|
|
15
17
|
onClick?: (...args: any) => any;
|
|
16
18
|
onMouseDown?: (...args: any) => any;
|
|
17
19
|
};
|
|
18
|
-
declare function MainButton({ text, fillType, size, responsiveMode, fontWeight, iconMode, iconFillType, iconName, colorTheme, type, state, onClick, onMouseDown }: MainButtonProps): JSX.Element;
|
|
20
|
+
declare function MainButton({ text, shapeType, fillType, styleTheme, size, responsiveMode, fontWeight, iconMode, iconFillType, iconName, colorTheme, type, state, onClick, onMouseDown }: MainButtonProps): JSX.Element;
|
|
19
21
|
export default MainButton;
|
|
@@ -31,13 +31,12 @@ var styled_components_1 = __importStar(require("styled-components"));
|
|
|
31
31
|
var hybrid_1 = require("../../../hybrid");
|
|
32
32
|
var TextLabel_1 = require("../TextLabel");
|
|
33
33
|
// NOTE : 기획상 아직 사용하지 않는 props
|
|
34
|
-
// shapeType?: 'round' | 'circular' | 'rectangle';
|
|
35
34
|
// textColorKey?: string;
|
|
36
35
|
// baseColorKey?: string;
|
|
37
36
|
// borderColorKey?: string;
|
|
38
37
|
// shadow?: 'hidden' | 'visible';
|
|
39
38
|
function MainButton(_a) {
|
|
40
|
-
var text = _a.text, _b = _a.
|
|
39
|
+
var text = _a.text, _b = _a.shapeType, shapeType = _b === void 0 ? 'round' : _b, fillType = _a.fillType, _c = _a.styleTheme, styleTheme = _c === void 0 ? 'primary' : _c, _d = _a.size, size = _d === void 0 ? 'large' : _d, _e = _a.responsiveMode, responsiveMode = _e === void 0 ? 'none' : _e, fontWeight = _a.fontWeight, _f = _a.iconMode, iconMode = _f === void 0 ? 'none' : _f, _g = _a.iconFillType, iconFillType = _g === void 0 ? 'line' : _g, iconName = _a.iconName, _h = _a.colorTheme, colorTheme = _h === void 0 ? 'none' : _h, _j = _a.type, type = _j === void 0 ? 'button' : _j, _k = _a.state, state = _k === void 0 ? 'normal' : _k, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
|
|
41
40
|
var handleClick = function () {
|
|
42
41
|
if (onClick) {
|
|
43
42
|
onClick();
|
|
@@ -60,9 +59,20 @@ function MainButton(_a) {
|
|
|
60
59
|
line2: 'ui_cpnt_button_text_primary',
|
|
61
60
|
line3: 'ui_cpnt_button_text_darktheme_enabled'
|
|
62
61
|
};
|
|
63
|
-
var textColor = {
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
var textColor = function () {
|
|
63
|
+
if (fillType === 'fill') {
|
|
64
|
+
return 'usrTextBrandOnPrimary';
|
|
65
|
+
}
|
|
66
|
+
if (fillType === 'line') {
|
|
67
|
+
return 'sysTextPrimary';
|
|
68
|
+
}
|
|
69
|
+
if (styleTheme === 'primary') {
|
|
70
|
+
return 'usrTextBrandOnPrimary';
|
|
71
|
+
}
|
|
72
|
+
if (styleTheme === 'secondary') {
|
|
73
|
+
return 'usrTextBrandPrimary';
|
|
74
|
+
}
|
|
75
|
+
return 'usrTextBrandOnPrimary';
|
|
66
76
|
};
|
|
67
77
|
var selectTextThemeColor = function () {
|
|
68
78
|
if (colorTheme === 'line3' && state === 'disabled') {
|
|
@@ -77,6 +87,10 @@ function MainButton(_a) {
|
|
|
77
87
|
fill: 'ui_cpnt_button_icon_on_primary',
|
|
78
88
|
line: 'ui_cpnt_button_icon_enabled'
|
|
79
89
|
};
|
|
90
|
+
var iconStyleThemeColorObj = {
|
|
91
|
+
primary: 'ui_cpnt_button_icon_on_primary',
|
|
92
|
+
secondary: 'ui_cpnt_button_icon_primary'
|
|
93
|
+
};
|
|
80
94
|
var iconColorThemeLineColorObj = {
|
|
81
95
|
line1: 'ui_cpnt_button_icon_error',
|
|
82
96
|
line2: 'ui_cpnt_button_icon_primary',
|
|
@@ -92,24 +106,41 @@ function MainButton(_a) {
|
|
|
92
106
|
if (fillType === 'line' && colorTheme !== 'none') {
|
|
93
107
|
return iconColorThemeLineColorObj[colorTheme];
|
|
94
108
|
}
|
|
95
|
-
|
|
109
|
+
if (fillType) {
|
|
110
|
+
return iconFillTypeColorObj[fillType];
|
|
111
|
+
}
|
|
112
|
+
if (styleTheme) {
|
|
113
|
+
return iconStyleThemeColorObj[styleTheme];
|
|
114
|
+
}
|
|
96
115
|
};
|
|
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 },
|
|
116
|
+
return (react_1.default.createElement(S_Button, { shapeType: shapeType, fillType: fillType, styleTheme: styleTheme, size: size, responsiveMode: responsiveMode, fontWeight: fontWeight, colorTheme: colorTheme, type: type, state: state, disabled: state === 'disabled', onClick: handleClick, onMouseDown: handleMouseDown },
|
|
98
117
|
size !== 'xsmall' && iconMode === 'left' && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
99
118
|
react_1.default.createElement(hybrid_1.Icon, { iconName: iconName, size: size === 'large' || size === 'rlarge' ? 20 : 16, colorKey: iconColor(), fillType: iconFillType }),
|
|
100
119
|
react_1.default.createElement(hybrid_1.Spacing, { size: size === 'large' || size === 'rlarge' ? 'spacing_b' : 'spacing_a', spacingType: "width" }))),
|
|
101
|
-
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: textStyle[size], singleLineMode: "use", colorTheme: state === 'disabled' ? 'sysTextTertiary' : textColor
|
|
120
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: textStyle[size], singleLineMode: "use", colorTheme: state === 'disabled' ? 'sysTextTertiary' : textColor(), colorOverride: selectTextThemeColor() }),
|
|
102
121
|
size !== 'xsmall' && iconMode === 'right' && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
103
122
|
react_1.default.createElement(hybrid_1.Spacing, { size: size === 'large' || size === 'rlarge' ? 'spacing_b' : 'spacing_a', spacingType: "width" }),
|
|
104
123
|
react_1.default.createElement(hybrid_1.Icon, { iconName: iconName, size: size === 'large' || size === 'rlarge' ? 20 : 16, colorKey: iconColor(), fillType: iconFillType })))));
|
|
105
124
|
}
|
|
106
|
-
var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n
|
|
125
|
+
var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 48px;\n min-width: 96px;\n padding: 0 24px;\n ", "\n ", ";\n"], ["\n height: 48px;\n min-width: 96px;\n padding: 0 24px;\n ", "\n ", ";\n"])), function (_a) {
|
|
126
|
+
var shapeType = _a.shapeType;
|
|
127
|
+
return shapeType === 'round' && 'border-radius: 14px;';
|
|
128
|
+
}, function (_a) {
|
|
107
129
|
var size = _a.size;
|
|
108
130
|
return size === 'rlarge' && 'width: 100%';
|
|
109
131
|
});
|
|
110
|
-
var medium = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n
|
|
111
|
-
var
|
|
112
|
-
|
|
132
|
+
var medium = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 40px;\n padding: 0 24px;\n ", "\n"], ["\n height: 40px;\n padding: 0 24px;\n ", "\n"])), function (_a) {
|
|
133
|
+
var shapeType = _a.shapeType;
|
|
134
|
+
return shapeType === 'round' && 'border-radius: 14px;';
|
|
135
|
+
});
|
|
136
|
+
var small = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 32px;\n padding: 0 16px;\n ", "\n"], ["\n height: 32px;\n padding: 0 16px;\n ", "\n"])), function (_a) {
|
|
137
|
+
var shapeType = _a.shapeType;
|
|
138
|
+
return shapeType === 'round' && 'border-radius: 10px;';
|
|
139
|
+
});
|
|
140
|
+
var xsmall = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 24px;\n padding: 0 16px;\n ", "\n"], ["\n height: 24px;\n padding: 0 16px;\n ", "\n"])), function (_a) {
|
|
141
|
+
var shapeType = _a.shapeType;
|
|
142
|
+
return shapeType === 'round' && 'border-radius: 8px;';
|
|
143
|
+
});
|
|
113
144
|
var fillDisabled = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (_a) {
|
|
114
145
|
var theme = _a.theme;
|
|
115
146
|
return theme.ui_cpnt_button_fill_base_disabled;
|
|
@@ -179,9 +210,46 @@ var line = (0, styled_components_1.css)(templateObject_12 || (templateObject_12
|
|
|
179
210
|
var state = _a.state;
|
|
180
211
|
return state === 'disabled' && lineDisabled;
|
|
181
212
|
});
|
|
182
|
-
var
|
|
213
|
+
var primaryDisabled = (0, styled_components_1.css)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (_a) {
|
|
214
|
+
var theme = _a.theme;
|
|
215
|
+
return theme.ui_cpnt_button_fill_base_disabled;
|
|
216
|
+
});
|
|
217
|
+
var primary = (0, styled_components_1.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n background-color: ", ";\n border: none;\n\n &:hover:enabled {\n ", "\n }\n\n &:active:enabled {\n ", "\n }\n\n ", "\n"], ["\n background-color: ", ";\n border: none;\n\n &:hover:enabled {\n ", "\n }\n\n &:active:enabled {\n ", "\n }\n\n ", "\n"])), function (_a) {
|
|
218
|
+
var theme = _a.theme;
|
|
219
|
+
return theme.ui_cpnt_button_fill_base_primary;
|
|
220
|
+
}, function (_a) {
|
|
221
|
+
var theme = _a.theme;
|
|
222
|
+
return "background-image: linear-gradient(\n to top,\n " + theme.ui_cpnt_button_fill_on_base_hover + ",\n " + theme.ui_cpnt_button_fill_on_base_hover + "\n );";
|
|
223
|
+
}, function (_a) {
|
|
224
|
+
var theme = _a.theme;
|
|
225
|
+
return "background-image: linear-gradient(\n to top,\n " + theme.ui_cpnt_button_fill_on_base_pressed + ",\n " + theme.ui_cpnt_button_fill_on_base_pressed + "\n );";
|
|
226
|
+
}, function (_a) {
|
|
227
|
+
var state = _a.state;
|
|
228
|
+
return state === 'disabled' && primaryDisabled;
|
|
229
|
+
});
|
|
230
|
+
var secondaryDisabled = (0, styled_components_1.css)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (_a) {
|
|
231
|
+
var theme = _a.theme;
|
|
232
|
+
return theme.ui_cpnt_button_line_base_hover;
|
|
233
|
+
});
|
|
234
|
+
var secondary = (0, styled_components_1.css)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n background-color: ", ";\n border: none;\n\n &:hover:enabled {\n ", "\n }\n\n &:active:enabled {\n ", "\n }\n\n ", "\n"], ["\n background-color: ", ";\n border: none;\n\n &:hover:enabled {\n ", "\n }\n\n &:active:enabled {\n ", "\n }\n\n ", "\n"])), function (_a) {
|
|
235
|
+
var theme = _a.theme;
|
|
236
|
+
return theme.ui_cpnt_button_line_base_hover;
|
|
237
|
+
}, function (_a) {
|
|
238
|
+
var theme = _a.theme;
|
|
239
|
+
return "background-image: linear-gradient(\n to top,\n " + theme.ui_cpnt_button_fill_on_base_hover + ",\n " + theme.ui_cpnt_button_fill_on_base_hover + "\n );";
|
|
240
|
+
}, function (_a) {
|
|
241
|
+
var theme = _a.theme;
|
|
242
|
+
return "background-image: linear-gradient(\n to top,\n " + theme.ui_cpnt_button_fill_on_base_pressed + ",\n " + theme.ui_cpnt_button_fill_on_base_pressed + "\n );";
|
|
243
|
+
}, function (_a) {
|
|
244
|
+
var state = _a.state;
|
|
245
|
+
return state === 'disabled' && secondaryDisabled;
|
|
246
|
+
});
|
|
247
|
+
var S_Button = styled_components_1.default.button(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n cursor: ", ";\n display: inline-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: inline-flex;\n justify-content: center;\n\n &:focus {\n outline: none;\n }\n ", "\n ", "\n ", "\n ", ";\n\n & > div {\n ", ";\n }\n"])), function (_a) {
|
|
183
248
|
var state = _a.state;
|
|
184
249
|
return (state === 'normal' ? 'pointer' : 'default');
|
|
250
|
+
}, function (_a) {
|
|
251
|
+
var styleTheme = _a.styleTheme;
|
|
252
|
+
return styleTheme && { primary: primary, secondary: secondary }[styleTheme];
|
|
185
253
|
}, function (_a) {
|
|
186
254
|
var fillType = _a.fillType;
|
|
187
255
|
return fillType && { fill: fill, line: line }[fillType];
|
|
@@ -200,4 +268,4 @@ var S_Button = styled_components_1.default.button(templateObject_13 || (template
|
|
|
200
268
|
}[fontWeight];
|
|
201
269
|
});
|
|
202
270
|
exports.default = MainButton;
|
|
203
|
-
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;
|
|
271
|
+
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, templateObject_14, templateObject_15, templateObject_16, templateObject_17;
|
|
@@ -97,12 +97,16 @@ function ReactionButton(_a) {
|
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
99
|
return (react_1.default.createElement(S_ReactionButton, { onClick: handleClick, onMouseDown: handleMouseDown },
|
|
100
|
-
react_1.default.createElement(hybrid_1.Spacing, { size: "
|
|
101
|
-
react_1.default.createElement(hybrid_1.Icon, { size:
|
|
102
|
-
react_1.default.createElement(hybrid_1.Spacing, { size: "
|
|
103
|
-
react_1.default.createElement(TextLabel_1.TextLabel, { text: convertFormatHelper(text), styleTheme: "
|
|
100
|
+
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }),
|
|
101
|
+
react_1.default.createElement(hybrid_1.Icon, { size: 20, fillType: "fill", iconName: iconName, colorKey: colorTheme === 'none' ? IconColorByStatus() : IconColorByColorByTheme() }),
|
|
102
|
+
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }),
|
|
103
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: convertFormatHelper(text), styleTheme: "body2Bold", singleLineMode: "use", colorTheme: TextLabelColorBySelect(), colorOverride: TextLabelColorByByColorTheme() }),
|
|
104
|
+
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" })));
|
|
104
105
|
}
|
|
105
|
-
var ReactionButtonStyle = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: none;\n cursor: 'pointer';\n display: flex;\n justify-content: center;\n padding: 0;\n"], ["\n align-items: center;\n background-color: transparent;\n border: none;\n cursor: 'pointer';\n display: flex;\n justify-content: center;\n padding: 0;\n"])))
|
|
106
|
+
var ReactionButtonStyle = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 8px;\n cursor: 'pointer';\n display: flex;\n justify-content: center;\n padding: 0;\n height: 32px;\n\n &:hover:enabled {\n background-color: ", ";\n }\n"], ["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 8px;\n cursor: 'pointer';\n display: flex;\n justify-content: center;\n padding: 0;\n height: 32px;\n\n &:hover:enabled {\n background-color: ", ";\n }\n"])), function (_a) {
|
|
107
|
+
var theme = _a.theme;
|
|
108
|
+
return theme.ui_cpnt_reactionbutton_base_01;
|
|
109
|
+
});
|
|
106
110
|
var S_ReactionButton = styled_components_1.default.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), ReactionButtonStyle);
|
|
107
111
|
exports.default = ReactionButton;
|
|
108
112
|
var templateObject_1, templateObject_2;
|
|
@@ -40,7 +40,7 @@ function Select(_a) {
|
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
var getIconColorKey = function () {
|
|
43
|
-
if (state === 'disabled') {
|
|
43
|
+
if (state === 'disabled' || state === 'read_only') {
|
|
44
44
|
if (colorTheme === 'dark') {
|
|
45
45
|
return 'ui_cpnt_select_icon_darktheme_disabled';
|
|
46
46
|
}
|
|
@@ -66,9 +66,9 @@ var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 =
|
|
|
66
66
|
var medium = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 40px;\n width: 188px;\n"], ["\n height: 40px;\n width: 188px;\n"])));
|
|
67
67
|
var small = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 32px;\n width: 188px;\n"], ["\n height: 32px;\n width: 188px;\n"])));
|
|
68
68
|
var rlarge = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 48px;\n width: 100%;\n"], ["\n height: 48px;\n width: 100%;\n"])));
|
|
69
|
-
var dark = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n border:
|
|
69
|
+
var dark = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n\n :disabled {\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n }\n\n :focus {\n border: 2px solid ", " !important;\n color: ", ";\n }\n"], ["\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n\n :disabled {\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n }\n\n :focus {\n border: 2px solid ", " !important;\n color: ", ";\n }\n"])), function (_a) {
|
|
70
70
|
var theme = _a.theme;
|
|
71
|
-
return theme.
|
|
71
|
+
return theme.ui_cpnt_select_base_darktheme_normal;
|
|
72
72
|
}, function (_a) {
|
|
73
73
|
var theme = _a.theme;
|
|
74
74
|
return theme.ui_cpnt_select_border_darktheme_normal;
|
|
@@ -78,10 +78,13 @@ var dark = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 =
|
|
|
78
78
|
}, function (_a) {
|
|
79
79
|
var theme = _a.theme;
|
|
80
80
|
return theme.ui_cpnt_select_base_darktheme_disabled;
|
|
81
|
+
}, function (_a) {
|
|
82
|
+
var theme = _a.theme;
|
|
83
|
+
return theme.ui_cpnt_select_border_darktheme_disabled;
|
|
81
84
|
}, function (_a) {
|
|
82
85
|
var theme = _a.theme, state = _a.state;
|
|
83
86
|
return state === 'read_only'
|
|
84
|
-
? theme.
|
|
87
|
+
? theme.ui_cpnt_select_text_darktheme_readonly
|
|
85
88
|
: theme.ui_cpnt_select_text_darktheme_disabled;
|
|
86
89
|
}, function (_a) {
|
|
87
90
|
var theme = _a.theme;
|
|
@@ -103,19 +106,19 @@ var S_Box = styled_components_1.default.div(templateObject_6 || (templateObject_
|
|
|
103
106
|
var responsiveMode = _a.responsiveMode;
|
|
104
107
|
return responsiveMode === 'use' && 'width: 100%';
|
|
105
108
|
});
|
|
106
|
-
var S_Icon_Wrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 16px;\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n width: 16px;\n
|
|
109
|
+
var S_Icon_Wrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 16px;\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n width: 16px;\n"], ["\n align-items: center;\n display: flex;\n height: 16px;\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n width: 16px;\n"])), function (_a) {
|
|
107
110
|
var theme = _a.theme;
|
|
108
111
|
return theme.spacing.spacingD;
|
|
109
|
-
}, function (_a) {
|
|
110
|
-
var state = _a.state;
|
|
111
|
-
return state === 'normal' && 'z-index: -1';
|
|
112
112
|
});
|
|
113
|
-
var S_Select = styled_components_1.default.select(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n appearance: none;\n background-color: ", ";\n border:
|
|
113
|
+
var S_Select = styled_components_1.default.select(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n appearance: none;\n background-color: ", ";\n border: 2px solid ", ";\n border-radius: ", ";\n cursor: pointer;\n color: ", ";\n font-family: inherit;\n font-size: ", ";\n height: 100%;\n padding-left: ", ";\n width: 100%;\n\n :disabled {\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n cursor: ", ";\n opacity: 1;\n }\n\n :focus {\n border: 2px solid ", " !important;\n color: ", ";\n outline: 0 !important;\n outline-offset: 0 !important;\n }\n\n ", "\n"], ["\n appearance: none;\n background-color: ", ";\n border: 2px solid ", ";\n border-radius: ", ";\n cursor: pointer;\n color: ", ";\n font-family: inherit;\n font-size: ", ";\n height: 100%;\n padding-left: ", ";\n width: 100%;\n\n :disabled {\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n cursor: ", ";\n opacity: 1;\n }\n\n :focus {\n border: 2px solid ", " !important;\n color: ", ";\n outline: 0 !important;\n outline-offset: 0 !important;\n }\n\n ", "\n"])), function (_a) {
|
|
114
114
|
var theme = _a.theme;
|
|
115
115
|
return theme.ui_cpnt_select_base_normal;
|
|
116
116
|
}, function (_a) {
|
|
117
117
|
var theme = _a.theme;
|
|
118
118
|
return theme.ui_cpnt_select_border_normal;
|
|
119
|
+
}, function (_a) {
|
|
120
|
+
var size = _a.size;
|
|
121
|
+
return (size === 'small' ? '10px' : '14px');
|
|
119
122
|
}, function (_a) {
|
|
120
123
|
var theme = _a.theme;
|
|
121
124
|
return theme.ui_cpnt_select_text_hint;
|
|
@@ -128,9 +131,24 @@ var S_Select = styled_components_1.default.select(templateObject_8 || (templateO
|
|
|
128
131
|
}, function (_a) {
|
|
129
132
|
var theme = _a.theme;
|
|
130
133
|
return theme.ui_cpnt_select_base_disabled;
|
|
134
|
+
}, function (_a) {
|
|
135
|
+
var theme = _a.theme;
|
|
136
|
+
return theme.ui_cpnt_select_border_disabled;
|
|
131
137
|
}, function (_a) {
|
|
132
138
|
var theme = _a.theme, state = _a.state;
|
|
133
|
-
return state === 'read_only'
|
|
139
|
+
return state === 'read_only'
|
|
140
|
+
? theme.ui_cpnt_select_text_readonly
|
|
141
|
+
: theme.ui_cpnt_select_text_disabled;
|
|
142
|
+
}, function (_a) {
|
|
143
|
+
var state = _a.state;
|
|
144
|
+
switch (state) {
|
|
145
|
+
case 'disabled':
|
|
146
|
+
return 'not-allowed';
|
|
147
|
+
case 'read_only':
|
|
148
|
+
return 'auto';
|
|
149
|
+
case 'normal':
|
|
150
|
+
return 'pointer';
|
|
151
|
+
}
|
|
134
152
|
}, function (_a) {
|
|
135
153
|
var theme = _a.theme;
|
|
136
154
|
return theme.ui_cpnt_select_border_focus;
|
|
@@ -7,7 +7,8 @@ export declare type TextButtonProps = {
|
|
|
7
7
|
fontWeight?: 'bold' | 'regular';
|
|
8
8
|
type?: 'submit' | 'reset' | 'button';
|
|
9
9
|
state?: 'normal' | 'disabled';
|
|
10
|
+
colorTheme?: 'none' | 'red' | 'grey_01';
|
|
10
11
|
onClick?: (...args: any) => any;
|
|
11
12
|
};
|
|
12
|
-
declare function TextButton({ text, size, responsiveMode, fontWeight, type, state, onClick, ...rest }: TextButtonProps): JSX.Element;
|
|
13
|
+
declare function TextButton({ text, size, responsiveMode, fontWeight, type, state, colorTheme, onClick, ...rest }: TextButtonProps): JSX.Element;
|
|
13
14
|
export default TextButton;
|