pds-dev-kit-web 1.3.11 → 1.3.14
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/src/common/assets/icons/fill/Question.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Question.js +34 -0
- package/dist/src/common/assets/icons/fill/index.d.ts +1 -0
- package/dist/src/common/assets/icons/fill/index.js +2 -0
- package/dist/src/common/assets/icons/line/Requirement.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Requirement.js +34 -0
- package/dist/src/common/assets/icons/line/index.d.ts +1 -0
- package/dist/src/common/assets/icons/line/index.js +2 -0
- package/dist/src/common/styles/colorSet/UIColor.json +1 -1
- package/dist/src/common/styles/colorSet/index.d.ts +211 -211
- package/dist/src/common/styles/colorSet/index.js +4 -4
- package/dist/src/common/types/{comopnents.d.ts → components.d.ts} +5 -0
- package/dist/src/common/types/{comopnents.js → components.js} +0 -0
- package/dist/src/common/types/index.d.ts +1 -1
- package/dist/src/common/types/index.js +1 -1
- package/dist/src/desktop/components/AdminListItem/AdminListItem.js +12 -9
- package/dist/src/desktop/components/DesktopTabBar/DesktopTabBar.d.ts +9 -4
- package/dist/src/desktop/components/DesktopTabBar/DesktopTabBar.js +81 -38
- package/dist/src/desktop/components/FloatingActionButton/FloatingActionButton.js +4 -4
- package/dist/src/desktop/components/TextLabel/TextLabel.d.ts +3 -1
- package/dist/src/desktop/components/TextLabel/TextLabel.js +12 -5
- package/dist/src/desktop/components/UserDesktopTabBar/UserDesktopTabBar.d.ts +6 -4
- package/dist/src/desktop/components/UserDesktopTabBar/UserDesktopTabBar.js +38 -16
- package/dist/src/desktop/layout/LayoutWS/LayoutWS.js +1 -1
- package/dist/src/desktop/layout/LayoutWT/Containers/PageMenuContainer/variation/TopPageMenu.js +1 -1
- package/dist/src/mobile/components/MobileTabBar/MobileTabBar.d.ts +6 -4
- package/dist/src/mobile/components/MobileTabBar/MobileTabBar.js +21 -12
- package/dist/src/mobile/components/TextLabel/TextLabel.d.ts +3 -1
- package/dist/src/mobile/components/TextLabel/TextLabel.js +10 -3
- package/package.json +1 -1
- package/release-note.md +6 -5
|
@@ -124,9 +124,10 @@ function AdminListItem(_a) {
|
|
|
124
124
|
react_1.default.createElement(S_SelectionColumn, { rowSize: rowSize }, selectionMode === 'multi' && (react_1.default.createElement(S_Selection, null,
|
|
125
125
|
react_1.default.createElement(Checkbox_1.Checkbox, { name: id.toString(), state: selectedState === 'maintain' ? 'disabled' : 'normal' })))),
|
|
126
126
|
react_1.default.createElement(S_ImageColumn, { rowSize: rowSize },
|
|
127
|
-
column2Type === 'image_text' && (rowSize === 'high' || rowSize === 'medium') && (react_1.default.createElement(S_ImageWrapper,
|
|
127
|
+
column2Type === 'image_text' && (rowSize === 'high' || rowSize === 'medium') && (react_1.default.createElement(S_ImageWrapper, { rowSize: rowSize },
|
|
128
128
|
react_1.default.createElement(hybrid_1.ImageView, { src: imageSrc, shapeType: imageShapeType, width: imageShapeType === 'circular' ? 64 : 120, ratio: imageRatio, scaleType: "cover", radius: imageShapeType === 'round' ? imageRadius : undefined }))),
|
|
129
|
-
(rowSize === 'low' || rowSize === 'medium') && (react_1.default.createElement(
|
|
129
|
+
(rowSize === 'low' || rowSize === 'medium') && (react_1.default.createElement(S_Column, null,
|
|
130
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: column2Text, styleTheme: "body2Bold", colorTheme: "sysTextPrimary", ellipsisMode: "use", lineLimit: 2 }))),
|
|
130
131
|
rowSize === 'high' && (react_1.default.createElement(S_TextWrapper, { ref: contentRef, hasScroll: hasScroll },
|
|
131
132
|
react_1.default.createElement(TextLabel_1.TextLabel, { text: column2Text, styleTheme: "body2Bold", colorTheme: "sysTextPrimary" })))),
|
|
132
133
|
column3Text && (react_1.default.createElement(S_Column, { columnSize: column3TextWidth },
|
|
@@ -180,11 +181,14 @@ var S_QuickActionButton = styled_components_1.default.div(templateObject_12 || (
|
|
|
180
181
|
return (disabled ? 'default' : 'pointer');
|
|
181
182
|
});
|
|
182
183
|
var S_Selection = styled_components_1.default.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 40px;\n justify-content: center;\n width: 40px;\n"], ["\n align-items: center;\n display: flex;\n height: 40px;\n justify-content: center;\n width: 40px;\n"])));
|
|
183
|
-
var S_ImageWrapper = styled_components_1.default.div(
|
|
184
|
+
var S_ImageWrapper = styled_components_1.default.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n margin-right: ", ";\n\n ", "\n"], ["\n margin-right: ", ";\n\n ", "\n"])), function (_a) {
|
|
184
185
|
var theme = _a.theme;
|
|
185
186
|
return theme.spacing.spacingD;
|
|
187
|
+
}, function (_a) {
|
|
188
|
+
var rowSize = _a.rowSize;
|
|
189
|
+
return rowSize === 'high' && (0, styled_components_1.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 100%;\n "], ["\n align-items: center;\n display: flex;\n height: 100%;\n "])));
|
|
186
190
|
});
|
|
187
|
-
var S_ImageColumn = styled_components_1.default.div(
|
|
191
|
+
var S_ImageColumn = styled_components_1.default.div(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n flex: 1;\n overflow: auto;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n\n ", "\n"], ["\n flex: 1;\n overflow: auto;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n\n ", "\n"])), function (_a) {
|
|
188
192
|
var theme = _a.theme, rowSize = _a.rowSize;
|
|
189
193
|
return (rowSize === 'high' || rowSize === 'medium') && theme.spacing.spacingC;
|
|
190
194
|
}, function (_a) {
|
|
@@ -199,14 +203,13 @@ var S_ImageColumn = styled_components_1.default.div(templateObject_17 || (templa
|
|
|
199
203
|
}, function (_a) {
|
|
200
204
|
var rowSize = _a.rowSize;
|
|
201
205
|
return rowSize === 'high'
|
|
202
|
-
? (0, styled_components_1.css)(
|
|
206
|
+
? (0, styled_components_1.css)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n height: 200px;\n "], ["\n box-sizing: border-box;\n display: flex;\n height: 200px;\n "]))) : (0, styled_components_1.css)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n "], ["\n align-items: center;\n display: flex;\n "])));
|
|
203
207
|
});
|
|
204
|
-
var S_TextWrapper = styled_components_1.default.div(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n height: 100%;\n\n ", "\n"], ["\n height: 100%;\n\n ", "\n"])), function (_a) {
|
|
208
|
+
var S_TextWrapper = styled_components_1.default.div(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n height: 100%;\n overflow: auto;\n\n ", "\n"], ["\n height: 100%;\n overflow: auto;\n\n ", "\n"])), function (_a) {
|
|
205
209
|
var hasScroll = _a.hasScroll;
|
|
206
|
-
return hasScroll
|
|
207
|
-
? (0, styled_components_1.css)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n & > div {\n height: 100%;\n overflow-y: auto;\n }\n "], ["\n & > div {\n height: 100%;\n overflow-y: auto;\n }\n "]))) : (0, styled_components_1.css)(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n "], ["\n align-items: center;\n display: flex;\n "])));
|
|
210
|
+
return !hasScroll && (0, styled_components_1.css)(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n "], ["\n align-items: center;\n display: flex;\n "])));
|
|
208
211
|
});
|
|
209
|
-
var S_Column = styled_components_1.default.div(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n padding: ", ";\n\n ", ";\n ", ";\n"], ["\n align-items: center;\n display: flex;\n padding: ", ";\n\n ", ";\n ", ";\n"])), function (_a) {
|
|
212
|
+
var S_Column = styled_components_1.default.div(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n overflow: auto;\n padding: ", ";\n\n ", ";\n ", ";\n"], ["\n align-items: center;\n display: flex;\n overflow: auto;\n padding: ", ";\n\n ", ";\n ", ";\n"])), function (_a) {
|
|
210
213
|
var theme = _a.theme;
|
|
211
214
|
return theme.spacing.spacingC;
|
|
212
215
|
}, function (_a) {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PDSTextType } from '../../../common';
|
|
2
|
+
import { PDSTabItemOption, PDSTextType } from '../../../common/types';
|
|
3
|
+
declare type ItemArray = PDSTabItemOption & {
|
|
4
|
+
subArray?: PDSTabItemOption[];
|
|
5
|
+
};
|
|
3
6
|
declare type TextObj = {
|
|
4
7
|
title: PDSTextType;
|
|
5
8
|
path: string;
|
|
@@ -8,9 +11,11 @@ declare type TextObj = {
|
|
|
8
11
|
path: string;
|
|
9
12
|
}[];
|
|
10
13
|
};
|
|
11
|
-
declare type
|
|
12
|
-
|
|
14
|
+
declare type DesktopTabBarProps = {
|
|
15
|
+
itemArray?: ItemArray[];
|
|
13
16
|
styleTheme?: 'main' | 'content';
|
|
17
|
+
/** @deprecated v1.5 해당 필드 대신 itemArray를 사용하세요. */
|
|
18
|
+
textArray?: TextObj[];
|
|
14
19
|
};
|
|
15
|
-
declare function DesktopTabBar({
|
|
20
|
+
declare function DesktopTabBar({ itemArray, styleTheme, textArray }: DesktopTabBarProps): JSX.Element;
|
|
16
21
|
export default DesktopTabBar;
|
|
@@ -31,36 +31,62 @@ var react_router_dom_1 = require("react-router-dom");
|
|
|
31
31
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
32
|
var TextLabel_1 = require("../TextLabel");
|
|
33
33
|
function DesktopTabBar(_a) {
|
|
34
|
-
var
|
|
34
|
+
var itemArray = _a.itemArray, _b = _a.styleTheme, styleTheme = _b === void 0 ? 'main' : _b, textArray = _a.textArray;
|
|
35
35
|
var history = (0, react_router_dom_1.useHistory)();
|
|
36
|
-
var pathname =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
react_1.default.createElement(
|
|
56
|
-
|
|
57
|
-
} },
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
36
|
+
var pathname = (0, react_router_dom_1.useLocation)().pathname;
|
|
37
|
+
if (itemArray) {
|
|
38
|
+
var handelClickTabItem_1 = function (item) {
|
|
39
|
+
if (item.onClick) {
|
|
40
|
+
item.onClick();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var textLabel_1 = function (item, isSubText) {
|
|
44
|
+
if (isSubText) {
|
|
45
|
+
return (react_1.default.createElement(TextLabel_1.TextLabel, { text: item.title, textAlign: "center", styleTheme: item.isActive ? 'caption1Bold' : 'caption1Regular', colorTheme: item.isActive ? 'sysTextPrimary' : 'sysTextSecondary', singleLineMode: "use" }));
|
|
46
|
+
}
|
|
47
|
+
if (styleTheme === 'content') {
|
|
48
|
+
return (react_1.default.createElement(TextLabel_1.TextLabel, { text: item.title, textAlign: "center", styleTheme: item.isActive ? 'caption1Bold' : 'caption1Regular', colorTheme: item.isActive ? 'sysTextPrimary' : 'sysTextSecondary', singleLineMode: "use" }));
|
|
49
|
+
}
|
|
50
|
+
if (styleTheme === 'main') {
|
|
51
|
+
return (react_1.default.createElement(TextLabel_1.TextLabel, { text: item.title, textAlign: "center", styleTheme: item.isActive ? 'caption1Bold' : 'caption1Regular', colorTheme: item.isActive ? 'usrTextBrandPrimary' : 'sysTextSecondary', singleLineMode: "use" }));
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
return (react_1.default.createElement(S_TabBox, null,
|
|
55
|
+
itemArray.map(function (item, index) { return (react_1.default.createElement(S_TabWrapper, { key: index, isActive: item.isActive, styleTheme: styleTheme },
|
|
56
|
+
react_1.default.createElement(S_TitleWrapper, { text: item.title, onClick: function () { return handelClickTabItem_1(item); } }, textLabel_1(item, false)),
|
|
57
|
+
item.isActive && item.subArray && (react_1.default.createElement(S_SubTabBox, null, item.subArray.map(function (subItem) { return (react_1.default.createElement(S_SubWrapper, { key: subItem.title, text: subItem.title, onClick: function () { return handelClickTabItem_1(subItem); } }, textLabel_1(subItem, true))); }))))); }),
|
|
58
|
+
itemArray.map(function (item) { return item.isActive && item.subArray && react_1.default.createElement(S_SubBackground, { key: item.title }); })));
|
|
59
|
+
}
|
|
60
|
+
if (textArray) {
|
|
61
|
+
var handleClick_1 = function (value) {
|
|
62
|
+
if (value) {
|
|
63
|
+
history.push(value.path);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var textLabel_2 = function (item, isSubText) {
|
|
67
|
+
if (isSubText) {
|
|
68
|
+
return (react_1.default.createElement(TextLabel_1.TextLabel, { text: item.title, textAlign: "center", styleTheme: pathname.includes(item.path) ? 'caption1Bold' : 'caption1Regular', colorTheme: pathname.includes(item.path) ? 'sysTextPrimary' : 'sysTextSecondary', singleLineMode: "use" }));
|
|
69
|
+
}
|
|
70
|
+
if (styleTheme === 'content') {
|
|
71
|
+
return (react_1.default.createElement(TextLabel_1.TextLabel, { text: item.title, textAlign: "center", styleTheme: pathname.includes(item.path) ? 'caption1Bold' : 'caption1Regular', colorTheme: pathname.includes(item.path) ? 'sysTextPrimary' : 'sysTextSecondary', singleLineMode: "use" }));
|
|
72
|
+
}
|
|
73
|
+
if (styleTheme === 'main') {
|
|
74
|
+
return (react_1.default.createElement(TextLabel_1.TextLabel, { text: item.title, textAlign: "center", styleTheme: pathname.includes(item.path) ? 'caption1Bold' : 'caption1Regular', colorTheme: pathname.includes(item.path) ? 'usrTextBrandPrimary' : 'sysTextSecondary', singleLineMode: "use" }));
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
return (react_1.default.createElement(S_TabBox, null,
|
|
78
|
+
textArray.map(function (item) { return (react_1.default.createElement(S_TabWrapper, { key: item.path, isActive: pathname.includes(item.path), styleTheme: styleTheme },
|
|
79
|
+
react_1.default.createElement(S_TitleWrapper, { text: item.title, onClick: function () {
|
|
80
|
+
handleClick_1(item);
|
|
81
|
+
} }, textLabel_2(item, false)),
|
|
82
|
+
item.subArray && pathname.includes(item.path) && (react_1.default.createElement(S_SubTabBox, null, item.subArray.map(function (subItem) { return (react_1.default.createElement(S_SubWrapper, { key: subItem.path, text: subItem.title, onClick: function () {
|
|
83
|
+
handleClick_1(subItem);
|
|
84
|
+
} }, textLabel_2(subItem, true))); }))))); }),
|
|
85
|
+
textArray.map(function (item) {
|
|
86
|
+
return item.subArray && pathname.includes(item.path) && react_1.default.createElement(S_SubBackground, { key: item.path });
|
|
87
|
+
})));
|
|
88
|
+
}
|
|
89
|
+
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
64
90
|
}
|
|
65
91
|
var mediumStyle = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: flex-end;\n box-sizing: border-box;\n justify-content: center;\n display: flex;\n margin-right: ", ";\n position: relative;\n\n &:last-child {\n margin-right: 0;\n }\n\n &::after {\n background-color: ", ";\n bottom: -1px;\n content: '';\n height: 2px;\n position: absolute;\n width: 100%;\n ", ";\n }\n"], ["\n align-items: flex-end;\n box-sizing: border-box;\n justify-content: center;\n display: flex;\n margin-right: ", ";\n position: relative;\n\n &:last-child {\n margin-right: 0;\n }\n\n &::after {\n background-color: ", ";\n bottom: -1px;\n content: '';\n height: 2px;\n position: absolute;\n width: 100%;\n ", ";\n }\n"])), function (_a) {
|
|
66
92
|
var theme = _a.theme;
|
|
@@ -74,15 +100,26 @@ var mediumStyle = (0, styled_components_1.css)(templateObject_1 || (templateObje
|
|
|
74
100
|
var isActive = _a.isActive;
|
|
75
101
|
return !isActive && "display: none;";
|
|
76
102
|
});
|
|
77
|
-
|
|
78
|
-
var
|
|
103
|
+
// NOTE: Tab item 활성화 시 text에 bold가 적용되는데, 이때 font-family에 따라 text 영역의 너비가 변경되어 시각적 변동을 일으키는 문제를 해결하기 위한 처리입니다.
|
|
104
|
+
var textOffset = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: block;\n content: ", ";\n height: 0;\n overflow: hidden;\n visibility: hidden;\n"], ["\n display: block;\n content: ", ";\n height: 0;\n overflow: hidden;\n visibility: hidden;\n"])), function (_a) {
|
|
105
|
+
var text = _a.text;
|
|
106
|
+
return "'" + text + "'";
|
|
107
|
+
});
|
|
108
|
+
var S_TabWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n ", "\n"], ["\n position: relative;\n ", "\n"])), mediumStyle);
|
|
109
|
+
var S_TitleWrapper = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n cursor: pointer;\n padding: 0 ", ";\n padding-bottom: ", ";\n\n & > div::before {\n font-weight: ", ";\n ", "\n }\n\n & > div::after {\n font-weight: ", ";\n ", "\n }\n"], ["\n cursor: pointer;\n padding: 0 ", ";\n padding-bottom: ", ";\n\n & > div::before {\n font-weight: ", ";\n ", "\n }\n\n & > div::after {\n font-weight: ", ";\n ", "\n }\n"])), function (_a) {
|
|
79
110
|
var theme = _a.theme;
|
|
80
111
|
return theme.spacing.spacingA;
|
|
81
112
|
}, function (_a) {
|
|
82
113
|
var theme = _a.theme;
|
|
83
114
|
return theme.spacing.spacingB;
|
|
84
|
-
})
|
|
85
|
-
var
|
|
115
|
+
}, function (_a) {
|
|
116
|
+
var theme = _a.theme;
|
|
117
|
+
return theme.fontWeight.normal;
|
|
118
|
+
}, textOffset, function (_a) {
|
|
119
|
+
var theme = _a.theme;
|
|
120
|
+
return theme.fontWeight.bold;
|
|
121
|
+
}, textOffset);
|
|
122
|
+
var S_TabBox = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n border-bottom: 1px solid ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n padding-left: ", ";\n position: relative;\n height: 40px;\n"], ["\n background-color: ", ";\n border-bottom: 1px solid ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n padding-left: ", ";\n position: relative;\n height: 40px;\n"])), function (_a) {
|
|
86
123
|
var theme = _a.theme;
|
|
87
124
|
return theme.ui_cpnt_tabbar_base_area;
|
|
88
125
|
}, function (_a) {
|
|
@@ -92,17 +129,23 @@ var S_TabBox = styled_components_1.default.div(templateObject_4 || (templateObje
|
|
|
92
129
|
var theme = _a.theme;
|
|
93
130
|
return theme.spacing.spacingE;
|
|
94
131
|
});
|
|
95
|
-
var S_SubBackground = styled_components_1.default.div(
|
|
132
|
+
var S_SubBackground = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 100%;\n height: 32px;\n background-color: ", ";\n position: absolute;\n bottom: -33px;\n left: 0px;\n"], ["\n width: 100%;\n height: 32px;\n background-color: ", ";\n position: absolute;\n bottom: -33px;\n left: 0px;\n"])), function (_a) {
|
|
96
133
|
var theme = _a.theme;
|
|
97
134
|
return theme.ui_cpnt_tabbar_base_area_sub;
|
|
98
135
|
});
|
|
99
|
-
var S_SubTabBox = styled_components_1.default.div(
|
|
100
|
-
var S_SubWrapper = styled_components_1.default.div(
|
|
136
|
+
var S_SubTabBox = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width: 100vw;\n position: absolute;\n bottom: -33px;\n left: 0px;\n height: 32px;\n display: flex;\n z-index: 1;\n"], ["\n width: 100vw;\n position: absolute;\n bottom: -33px;\n left: 0px;\n height: 32px;\n display: flex;\n z-index: 1;\n"])));
|
|
137
|
+
var S_SubWrapper = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n align-items: center;\n justify-content: center;\n cursor: pointer;\n display: flex;\n margin-right: ", ";\n position: relative;\n padding: 0 ", ";\n\n &:last-child {\n margin-right: 0;\n }\n\n & > div::before {\n font-weight: ", ";\n ", "\n }\n\n & > div::after {\n font-weight: ", ";\n ", "\n }\n"], ["\n align-items: center;\n justify-content: center;\n cursor: pointer;\n display: flex;\n margin-right: ", ";\n position: relative;\n padding: 0 ", ";\n\n &:last-child {\n margin-right: 0;\n }\n\n & > div::before {\n font-weight: ", ";\n ", "\n }\n\n & > div::after {\n font-weight: ", ";\n ", "\n }\n"])), function (_a) {
|
|
101
138
|
var theme = _a.theme;
|
|
102
139
|
return theme.spacing.spacingE;
|
|
103
140
|
}, function (_a) {
|
|
104
141
|
var theme = _a.theme;
|
|
105
142
|
return theme.spacing.spacingA;
|
|
106
|
-
})
|
|
143
|
+
}, function (_a) {
|
|
144
|
+
var theme = _a.theme;
|
|
145
|
+
return theme.fontWeight.normal;
|
|
146
|
+
}, textOffset, function (_a) {
|
|
147
|
+
var theme = _a.theme;
|
|
148
|
+
return theme.fontWeight.bold;
|
|
149
|
+
}, textOffset);
|
|
107
150
|
exports.default = DesktopTabBar;
|
|
108
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
151
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
@@ -34,9 +34,6 @@ var TextLabel_1 = require("../TextLabel");
|
|
|
34
34
|
// textColorKey?: string;
|
|
35
35
|
// baseColorKey?: string;
|
|
36
36
|
// borderColorKey?: string;
|
|
37
|
-
// NOTE : PDS 문서 1.2 버전에서 업데이트 예정인 props
|
|
38
|
-
// displayType?: 'icon_only' | 'text_only' | 'icon_text';
|
|
39
|
-
// state?: 'normal' | 'disabled';
|
|
40
37
|
function FloatingActionButton(_a) {
|
|
41
38
|
var text = _a.text, _b = _a.displayType, displayType = _b === void 0 ? 'icon_text' : _b, _c = _a.size, size = _c === void 0 ? 'large' : _c, _d = _a.fontWeight, fontWeight = _d === void 0 ? 'bold' : _d, _e = _a.iconFillType, iconFillType = _e === void 0 ? 'line' : _e, iconName = _a.iconName, _f = _a.colorTheme, colorTheme = _f === void 0 ? 'none' : _f, _g = _a.state, state = _g === void 0 ? 'normal' : _g, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
|
|
42
39
|
var handleClick = function () {
|
|
@@ -71,9 +68,12 @@ var disabled = (0, styled_components_1.css)(templateObject_3 || (templateObject_
|
|
|
71
68
|
var theme = _a.theme;
|
|
72
69
|
return theme.ui_cpnt_button_fill_base_disabled;
|
|
73
70
|
});
|
|
74
|
-
var floatingActionButtonStyle = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border: none;\n bottom: 24px;\n cursor: ", ";\n display: flex;\n justify-content: center;\n position: fixed;\n right: 24px;\n /* NOTE : \uB808\uC774\uC5B4 \uB3C4\uC785 \uD6C4 \uC81C\uAC70\uB420 \uAC00\uB2A5\uC131 \uB18D\uD6C4 */\n z-index: 101;\n\n &:focus {\n outline: none;\n }\n\n &:hover:enabled {\n ", "\n }\n\n &:active:enabled {\n ", "\n }\n\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n border: none;\n bottom: 24px;\n cursor: ", ";\n display: flex;\n justify-content: center;\n position: fixed;\n right: 24px;\n /* NOTE : \uB808\uC774\uC5B4 \uB3C4\uC785 \uD6C4 \uC81C\uAC70\uB420 \uAC00\uB2A5\uC131 \uB18D\uD6C4 */\n z-index: 101;\n\n &:focus {\n outline: none;\n }\n\n &:hover:enabled {\n ", "\n }\n\n &:active:enabled {\n ", "\n }\n\n ", "\n"])), function (_a) {
|
|
71
|
+
var floatingActionButtonStyle = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border: none;\n bottom: 24px;\n box-shadow: ", ";\n cursor: ", ";\n display: flex;\n justify-content: center;\n position: fixed;\n right: 24px;\n /* NOTE : \uB808\uC774\uC5B4 \uB3C4\uC785 \uD6C4 \uC81C\uAC70\uB420 \uAC00\uB2A5\uC131 \uB18D\uD6C4 */\n z-index: 101;\n\n &:focus {\n outline: none;\n }\n\n &:hover:enabled {\n ", "\n }\n\n &:active:enabled {\n ", "\n }\n\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n border: none;\n bottom: 24px;\n box-shadow: ", ";\n cursor: ", ";\n display: flex;\n justify-content: center;\n position: fixed;\n right: 24px;\n /* NOTE : \uB808\uC774\uC5B4 \uB3C4\uC785 \uD6C4 \uC81C\uAC70\uB420 \uAC00\uB2A5\uC131 \uB18D\uD6C4 */\n z-index: 101;\n\n &:focus {\n outline: none;\n }\n\n &:hover:enabled {\n ", "\n }\n\n &:active:enabled {\n ", "\n }\n\n ", "\n"])), function (_a) {
|
|
75
72
|
var theme = _a.theme;
|
|
76
73
|
return theme.ui_cpnt_button_fill_base_primary;
|
|
74
|
+
}, function (_a) {
|
|
75
|
+
var theme = _a.theme;
|
|
76
|
+
return theme.boxShadow.elevation3;
|
|
77
77
|
}, function (_a) {
|
|
78
78
|
var state = _a.state;
|
|
79
79
|
return (state === 'normal' ? 'pointer' : 'default');
|
|
@@ -14,6 +14,7 @@ export declare type TextLabelProps = {
|
|
|
14
14
|
userSelectMode?: 'none' | 'use';
|
|
15
15
|
customFontSize?: string;
|
|
16
16
|
customFontWeight?: 'bold' | 'regular';
|
|
17
|
+
textDecorationType?: 'none' | 'line_through';
|
|
17
18
|
};
|
|
18
19
|
export declare type TextStyleProps = {
|
|
19
20
|
textAlign?: 'left' | 'center' | 'right';
|
|
@@ -27,6 +28,7 @@ export declare type TextStyleProps = {
|
|
|
27
28
|
userSelectMode?: 'none' | 'use';
|
|
28
29
|
customFontSize?: string;
|
|
29
30
|
customFontWeight?: 'bold' | 'regular';
|
|
31
|
+
textDecorationType?: 'none' | 'line_through';
|
|
30
32
|
};
|
|
31
|
-
declare function TextLabel({ text, tooltipText, tooltipPosition, textAlign, styleTheme, colorOverride, colorTheme, singleLineMode, ellipsisMode, lineLimit, userSelectMode, customFontSize, customFontWeight }: TextLabelProps): JSX.Element;
|
|
33
|
+
declare function TextLabel({ text, tooltipText, tooltipPosition, textAlign, styleTheme, colorOverride, colorTheme, singleLineMode, ellipsisMode, lineLimit, userSelectMode, customFontSize, customFontWeight, textDecorationType }: TextLabelProps): JSX.Element;
|
|
32
34
|
export default TextLabel;
|
|
@@ -28,16 +28,16 @@ var styled_components_1 = __importStar(require("styled-components"));
|
|
|
28
28
|
var common_1 = require("../../../common");
|
|
29
29
|
var hybrid_1 = require("../../../hybrid");
|
|
30
30
|
function TextLabel(_a) {
|
|
31
|
-
var text = _a.text, tooltipText = _a.tooltipText, _b = _a.tooltipPosition, tooltipPosition = _b === void 0 ? 'right_bottom' : _b, _c = _a.textAlign, textAlign = _c === void 0 ? 'left' : _c, _d = _a.styleTheme, styleTheme = _d === void 0 ? 'body2Bold' : _d, colorOverride = _a.colorOverride, _e = _a.colorTheme, colorTheme = _e === void 0 ? 'sysTextPrimary' : _e, _f = _a.singleLineMode, singleLineMode = _f === void 0 ? 'none' : _f, _g = _a.ellipsisMode, ellipsisMode = _g === void 0 ? 'none' : _g, lineLimit = _a.lineLimit, _h = _a.userSelectMode, userSelectMode = _h === void 0 ? 'none' : _h, customFontSize = _a.customFontSize, customFontWeight = _a.customFontWeight;
|
|
32
|
-
var
|
|
31
|
+
var text = _a.text, tooltipText = _a.tooltipText, _b = _a.tooltipPosition, tooltipPosition = _b === void 0 ? 'right_bottom' : _b, _c = _a.textAlign, textAlign = _c === void 0 ? 'left' : _c, _d = _a.styleTheme, styleTheme = _d === void 0 ? 'body2Bold' : _d, colorOverride = _a.colorOverride, _e = _a.colorTheme, colorTheme = _e === void 0 ? 'sysTextPrimary' : _e, _f = _a.singleLineMode, singleLineMode = _f === void 0 ? 'none' : _f, _g = _a.ellipsisMode, ellipsisMode = _g === void 0 ? 'none' : _g, lineLimit = _a.lineLimit, _h = _a.userSelectMode, userSelectMode = _h === void 0 ? 'none' : _h, customFontSize = _a.customFontSize, customFontWeight = _a.customFontWeight, _j = _a.textDecorationType, textDecorationType = _j === void 0 ? 'none' : _j;
|
|
32
|
+
var _k = (0, react_1.useState)(false), isTooltipOpen = _k[0], setIsTooltipOpen = _k[1];
|
|
33
33
|
var handleTooltipToggle = function (value) {
|
|
34
34
|
setIsTooltipOpen(value);
|
|
35
35
|
};
|
|
36
|
-
return (react_1.default.createElement(S_TextLabel, { textAlign: textAlign, styleTheme: styleTheme, colorOverride: colorOverride, colorTheme: colorTheme, singleLineMode: singleLineMode, ellipsisMode: ellipsisMode, lineLimit: lineLimit, userSelectMode: userSelectMode, customFontSize: customFontSize, customFontWeight: customFontWeight },
|
|
36
|
+
return (react_1.default.createElement(S_TextLabel, { textAlign: textAlign, styleTheme: styleTheme, colorOverride: colorOverride, colorTheme: colorTheme, singleLineMode: singleLineMode, ellipsisMode: ellipsisMode, lineLimit: lineLimit, userSelectMode: userSelectMode, customFontSize: customFontSize, customFontWeight: customFontWeight, textDecorationType: textDecorationType },
|
|
37
37
|
text,
|
|
38
38
|
tooltipText && (react_1.default.createElement(S_TooltipBox, { styleTheme: styleTheme },
|
|
39
39
|
react_1.default.createElement(S_IconWrapper, { onMouseEnter: function () { return handleTooltipToggle(true); }, onMouseLeave: function () { return handleTooltipToggle(false); } },
|
|
40
|
-
react_1.default.createElement(hybrid_1.Icon, { iconName: "ic_question", size: 16, fillType: "
|
|
40
|
+
react_1.default.createElement(hybrid_1.Icon, { iconName: "ic_question", size: 16, fillType: "fill", colorKey: "ui_cpnt_icon_sys_grey_03" })),
|
|
41
41
|
react_1.default.createElement(S_TooltipWrapper, { className: "TooltipWrapper", isTooltipOpen: isTooltipOpen, tooltipPosition: tooltipPosition }, "" + tooltipText)))));
|
|
42
42
|
}
|
|
43
43
|
var displayBold = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n"], ["\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n"])), function (_a) {
|
|
@@ -270,7 +270,7 @@ var tooltipLeftTop = (0, styled_components_1.css)(templateObject_32 || (template
|
|
|
270
270
|
var tooltipLeftBottom = (0, styled_components_1.css)(templateObject_33 || (templateObject_33 = __makeTemplateObject(["\n right: 0;\n top: 20px;\n"], ["\n right: 0;\n top: 20px;\n"])));
|
|
271
271
|
var tooltipRightTop = (0, styled_components_1.css)(templateObject_34 || (templateObject_34 = __makeTemplateObject(["\n left: 0;\n bottom: 20px;\n"], ["\n left: 0;\n bottom: 20px;\n"])));
|
|
272
272
|
var tooltipRightBottom = (0, styled_components_1.css)(templateObject_35 || (templateObject_35 = __makeTemplateObject(["\n left: 0;\n top: 20px;\n"], ["\n left: 0;\n top: 20px;\n"])));
|
|
273
|
-
var S_TextLabel = styled_components_1.default.div(templateObject_36 || (templateObject_36 = __makeTemplateObject(["\n box-sizing: border-box;\n text-align: ", ";\n white-space: pre-wrap;\n word-break: keep-all;\n overflow-wrap: break-word;\n hyphens: auto;\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n"], ["\n box-sizing: border-box;\n text-align: ", ";\n white-space: pre-wrap;\n word-break: keep-all;\n overflow-wrap: break-word;\n hyphens: auto;\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n"])), function (_a) {
|
|
273
|
+
var S_TextLabel = styled_components_1.default.div(templateObject_36 || (templateObject_36 = __makeTemplateObject(["\n box-sizing: border-box;\n text-align: ", ";\n white-space: pre-wrap;\n word-break: keep-all;\n overflow-wrap: break-word;\n hyphens: auto;\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n"], ["\n box-sizing: border-box;\n text-align: ", ";\n white-space: pre-wrap;\n word-break: keep-all;\n overflow-wrap: break-word;\n hyphens: auto;\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n"])), function (_a) {
|
|
274
274
|
var textAlign = _a.textAlign;
|
|
275
275
|
return textAlign;
|
|
276
276
|
}, function (_a) {
|
|
@@ -327,6 +327,13 @@ var S_TextLabel = styled_components_1.default.div(templateObject_36 || (template
|
|
|
327
327
|
}, function (_a) {
|
|
328
328
|
var userSelectMode = _a.userSelectMode;
|
|
329
329
|
return userSelectMode === 'none' && userSelectModeStyle;
|
|
330
|
+
}, function (_a) {
|
|
331
|
+
var textDecorationType = _a.textDecorationType;
|
|
332
|
+
return textDecorationType &&
|
|
333
|
+
{
|
|
334
|
+
none: '',
|
|
335
|
+
line_through: 'text-decoration: line-through;'
|
|
336
|
+
}[textDecorationType];
|
|
330
337
|
});
|
|
331
338
|
var S_TooltipBox = styled_components_1.default.div(templateObject_37 || (templateObject_37 = __makeTemplateObject(["\n display: inline-block;\n margin-left: ", ";\n position: relative;\n\n ", ";\n"], ["\n display: inline-block;\n margin-left: ", ";\n position: relative;\n\n ", ";\n"])), function (_a) {
|
|
332
339
|
var theme = _a.theme;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PDSTextType } from '../../../common';
|
|
2
|
+
import { PDSTabItemOption, PDSTextType } from '../../../common/types';
|
|
3
3
|
declare type TextObj = {
|
|
4
4
|
path: string;
|
|
5
5
|
title: PDSTextType;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
declare type UserDesktopTabBarProps = {
|
|
8
|
+
itemArray?: PDSTabItemOption[];
|
|
9
9
|
styleTheme?: 'main';
|
|
10
|
+
/** @deprecated v1.5 해당 필드 대신 itemArray를 사용하세요. */
|
|
11
|
+
textArray?: TextObj[];
|
|
10
12
|
};
|
|
11
|
-
declare function UserDesktopTabBar({
|
|
13
|
+
declare function UserDesktopTabBar({ itemArray, styleTheme, textArray }: UserDesktopTabBarProps): JSX.Element;
|
|
12
14
|
export default UserDesktopTabBar;
|
|
@@ -31,21 +31,37 @@ var react_router_dom_1 = require("react-router-dom");
|
|
|
31
31
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
32
|
var TextLabel_1 = require("../TextLabel");
|
|
33
33
|
function UserDesktopTabBar(_a) {
|
|
34
|
-
var
|
|
34
|
+
var itemArray = _a.itemArray, _b = _a.styleTheme, styleTheme = _b === void 0 ? 'main' : _b, textArray = _a.textArray;
|
|
35
35
|
var history = (0, react_router_dom_1.useHistory)();
|
|
36
|
-
var pathname =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
react_1.default.createElement(S_TabBar, null,
|
|
44
|
-
|
|
36
|
+
var pathname = (0, react_router_dom_1.useLocation)().pathname;
|
|
37
|
+
if (itemArray) {
|
|
38
|
+
var handleClickTabItem_1 = function (item) {
|
|
39
|
+
if (item.onClick) {
|
|
40
|
+
item.onClick();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
return (react_1.default.createElement(S_TabBar, null, itemArray.map(function (item, index) { return (react_1.default.createElement(S_TabWrapper, { key: index, isActive: item.isActive, styleTheme: styleTheme, text: item.title, onClick: function () { return handleClickTabItem_1(item); } },
|
|
44
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: item.title, textAlign: "center", styleTheme: item.isActive ? 'body2Bold' : 'body2Regular', colorTheme: item.isActive ? 'usrTextBrandPrimary' : 'sysTextSecondary', singleLineMode: "use" }))); })));
|
|
45
|
+
}
|
|
46
|
+
if (textArray) {
|
|
47
|
+
var handleClick_1 = function (value) {
|
|
48
|
+
if (value) {
|
|
49
|
+
history.push(value.path);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
return (react_1.default.createElement(S_TabBar, null, textArray.map(function (item) { return (react_1.default.createElement(S_TabWrapper, { key: item.path, styleTheme: styleTheme, isActive: pathname === item.path, onClick: function () {
|
|
53
|
+
handleClick_1(item);
|
|
45
54
|
} },
|
|
46
|
-
react_1.default.createElement(TextLabel_1.TextLabel, { text:
|
|
55
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: item.title, styleTheme: pathname === item.path ? 'body2Bold' : 'body2Regular', colorTheme: pathname === item.path ? 'usrTextBrandPrimary' : 'sysTextSecondary', singleLineMode: "use" }))); })));
|
|
56
|
+
}
|
|
57
|
+
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
47
58
|
}
|
|
48
|
-
|
|
59
|
+
// NOTE: Tab item 활성화 시 text에 bold가 적용되는데, 이때 font-family에 따라 text 영역의 너비가 변경되어 시각적 변동을 일으키는 문제를 해결하기 위한 처리입니다.
|
|
60
|
+
var textOffset = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: block;\n content: ", ";\n height: 0;\n overflow: hidden;\n visibility: hidden;\n"], ["\n display: block;\n content: ", ";\n height: 0;\n overflow: hidden;\n visibility: hidden;\n"])), function (_a) {
|
|
61
|
+
var text = _a.text;
|
|
62
|
+
return "'" + text + "'";
|
|
63
|
+
});
|
|
64
|
+
var S_TabWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n\n & > div::before {\n font-weight: ", ";\n ", "\n }\n\n & > div::after {\n font-weight: ", ";\n ", "\n }\n"], ["\n ", "\n\n & > div::before {\n font-weight: ", ";\n ", "\n }\n\n & > div::after {\n font-weight: ", ";\n ", "\n }\n"])), function (_a) {
|
|
49
65
|
var styleTheme = _a.styleTheme;
|
|
50
66
|
switch (styleTheme) {
|
|
51
67
|
case 'main':
|
|
@@ -53,8 +69,14 @@ var S_TabWrapper = styled_components_1.default.div(templateObject_1 || (template
|
|
|
53
69
|
default:
|
|
54
70
|
return mainStyle;
|
|
55
71
|
}
|
|
56
|
-
})
|
|
57
|
-
var
|
|
72
|
+
}, function (_a) {
|
|
73
|
+
var theme = _a.theme;
|
|
74
|
+
return theme.fontWeight.normal;
|
|
75
|
+
}, textOffset, function (_a) {
|
|
76
|
+
var theme = _a.theme;
|
|
77
|
+
return theme.fontWeight.bold;
|
|
78
|
+
}, textOffset);
|
|
79
|
+
var mainStyle = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n align-items: center;\n cursor: pointer;\n display: flex;\n margin-right: ", ";\n position: relative;\n background-color: ", ";\n\n &:last-child {\n margin-right: 0;\n }\n\n &::after {\n background-color: ", ";\n bottom: -1px;\n content: '';\n height: 2px;\n position: absolute;\n width: 100%;\n ", ";\n }\n"], ["\n align-items: center;\n cursor: pointer;\n display: flex;\n margin-right: ", ";\n position: relative;\n background-color: ", ";\n\n &:last-child {\n margin-right: 0;\n }\n\n &::after {\n background-color: ", ";\n bottom: -1px;\n content: '';\n height: 2px;\n position: absolute;\n width: 100%;\n ", ";\n }\n"])), function (_a) {
|
|
58
80
|
var theme = _a.theme;
|
|
59
81
|
return theme.spacing.spacingE;
|
|
60
82
|
}, function (_a) {
|
|
@@ -67,7 +89,7 @@ var mainStyle = (0, styled_components_1.css)(templateObject_2 || (templateObject
|
|
|
67
89
|
var isActive = _a.isActive;
|
|
68
90
|
return !isActive && "display: none;";
|
|
69
91
|
});
|
|
70
|
-
var S_TabBar = styled_components_1.default.div(
|
|
92
|
+
var S_TabBar = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background-color: ", ";\n border-bottom: 1px solid ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n height: 48px;\n justify-content: center;\n"], ["\n background-color: ", ";\n border-bottom: 1px solid ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n height: 48px;\n justify-content: center;\n"])), function (_a) {
|
|
71
93
|
var theme = _a.theme;
|
|
72
94
|
return theme.ui_cpnt_tabbar_base_area;
|
|
73
95
|
}, function (_a) {
|
|
@@ -75,4 +97,4 @@ var S_TabBar = styled_components_1.default.div(templateObject_3 || (templateObje
|
|
|
75
97
|
return theme.ui_cpnt_divider;
|
|
76
98
|
});
|
|
77
99
|
exports.default = UserDesktopTabBar;
|
|
78
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
|
100
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -17,6 +17,6 @@ var LayoutWS = function (_a) {
|
|
|
17
17
|
};
|
|
18
18
|
var S_LayoutWS = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n height: 100vh;\n width: 100vw;\n min-width: 1200px;\n"], ["\n display: flex;\n height: 100vh;\n width: 100vw;\n min-width: 1200px;\n"])));
|
|
19
19
|
var S_LeftWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 100%;\n"], ["\n height: 100%;\n"])));
|
|
20
|
-
var S_RightWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n
|
|
20
|
+
var S_RightWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex: 1;\n overflow: hidden;\n"], ["\n flex: 1;\n overflow: hidden;\n"])));
|
|
21
21
|
exports.default = LayoutWS;
|
|
22
22
|
var templateObject_1, templateObject_2, templateObject_3;
|
package/dist/src/desktop/layout/LayoutWT/Containers/PageMenuContainer/variation/TopPageMenu.js
CHANGED
|
@@ -65,6 +65,6 @@ var S_TopPageMenuArea = styled_components_1.default.div(templateObject_3 || (tem
|
|
|
65
65
|
var areaLine = _a.areaLine;
|
|
66
66
|
return areaLine && areaLineStyle;
|
|
67
67
|
});
|
|
68
|
-
var S_TopPageMenuContent = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n min-height:
|
|
68
|
+
var S_TopPageMenuContent = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n min-height: 48px;\n"], ["\n min-height: 48px;\n"])));
|
|
69
69
|
exports.default = TopPageMenu;
|
|
70
70
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PDSTextType } from '../../../common';
|
|
2
|
+
import { PDSTabItemOption, PDSTextType } from '../../../common/types';
|
|
3
3
|
declare type TextObj = {
|
|
4
4
|
path: string;
|
|
5
5
|
title: PDSTextType;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
declare type MobileTabBarProps = {
|
|
8
|
+
itemArray?: PDSTabItemOption[];
|
|
9
|
+
/** @deprecated v1.5 해당 필드 대신 itemArray를 사용하세요. */
|
|
10
|
+
textArray?: TextObj[];
|
|
9
11
|
};
|
|
10
|
-
declare function MobileTabBar({ textArray }: MobileTabBarProps): JSX.Element;
|
|
12
|
+
declare function MobileTabBar({ itemArray, textArray }: MobileTabBarProps): JSX.Element;
|
|
11
13
|
export default MobileTabBar;
|
|
@@ -12,19 +12,28 @@ var react_router_dom_1 = require("react-router-dom");
|
|
|
12
12
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
13
13
|
var TextLabel_1 = require("../TextLabel");
|
|
14
14
|
function MobileTabBar(_a) {
|
|
15
|
-
var textArray = _a.textArray;
|
|
15
|
+
var itemArray = _a.itemArray, textArray = _a.textArray;
|
|
16
16
|
var history = (0, react_router_dom_1.useHistory)();
|
|
17
|
-
var pathname =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
react_1.default.createElement(S_TabBar, null,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
var pathname = (0, react_router_dom_1.useLocation)().pathname;
|
|
18
|
+
if (itemArray) {
|
|
19
|
+
var handleClickTabItem_1 = function (item) {
|
|
20
|
+
if (item.onClick) {
|
|
21
|
+
item.onClick();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return (react_1.default.createElement(S_TabBar, null, itemArray.map(function (item, index) { return (react_1.default.createElement(S_TabWrapper, { key: index, isActive: item.isActive, onClick: function () { return handleClickTabItem_1(item); } },
|
|
25
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: item.title, textAlign: "center", styleTheme: "body2Bold", colorTheme: item.isActive ? 'usrTextBrandPrimary' : 'sysTextTertiary', singleLineMode: "use" }))); })));
|
|
26
|
+
}
|
|
27
|
+
if (textArray) {
|
|
28
|
+
var handleClick_1 = function (value) {
|
|
29
|
+
if (value) {
|
|
30
|
+
history.push(value.path);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
return (react_1.default.createElement(S_TabBar, null, textArray.map(function (value) { return (react_1.default.createElement(S_TabWrapper, { key: value.path, isActive: pathname === value.path, onClick: function () { return handleClick_1(value); } },
|
|
34
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: value.title, textAlign: "center", styleTheme: "body2Bold", colorTheme: pathname === value.path ? 'usrTextBrandPrimary' : 'sysTextTertiary', singleLineMode: "use" }))); })));
|
|
35
|
+
}
|
|
36
|
+
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
28
37
|
}
|
|
29
38
|
var S_TabWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n justify-content: center;\n cursor: pointer;\n display: flex;\n position: relative;\n background-color: ", ";\n padding: 0 ", ";\n flex: 1;\n\n &:last-child {\n margin-right: 0;\n }\n\n &::after {\n background-color: ", ";\n bottom: -1px;\n content: '';\n height: 2px;\n position: absolute;\n width: 100%;\n ", ";\n }\n"], ["\n align-items: center;\n justify-content: center;\n cursor: pointer;\n display: flex;\n position: relative;\n background-color: ", ";\n padding: 0 ", ";\n flex: 1;\n\n &:last-child {\n margin-right: 0;\n }\n\n &::after {\n background-color: ", ";\n bottom: -1px;\n content: '';\n height: 2px;\n position: absolute;\n width: 100%;\n ", ";\n }\n"])), function (_a) {
|
|
30
39
|
var isActive = _a.isActive, theme = _a.theme;
|
|
@@ -12,6 +12,7 @@ export declare type TextLabelProps = {
|
|
|
12
12
|
userSelectMode?: 'none' | 'use';
|
|
13
13
|
customFontSize?: string;
|
|
14
14
|
customFontWeight?: 'bold' | 'regular';
|
|
15
|
+
textDecorationType?: 'none' | 'line_through';
|
|
15
16
|
};
|
|
16
17
|
export declare type TextStyleProps = {
|
|
17
18
|
textAlign?: 'left' | 'center' | 'right';
|
|
@@ -24,6 +25,7 @@ export declare type TextStyleProps = {
|
|
|
24
25
|
userSelectMode?: 'none' | 'use';
|
|
25
26
|
customFontSize?: string;
|
|
26
27
|
customFontWeight?: 'bold' | 'regular';
|
|
28
|
+
textDecorationType?: 'none' | 'line_through';
|
|
27
29
|
};
|
|
28
|
-
declare function TextLabel({ text, textAlign, styleTheme, colorOverride, colorTheme, singleLineMode, ellipsisMode, lineLimit, userSelectMode, customFontSize, customFontWeight }: TextLabelProps): JSX.Element;
|
|
30
|
+
declare function TextLabel({ text, textAlign, styleTheme, colorOverride, colorTheme, singleLineMode, ellipsisMode, lineLimit, userSelectMode, customFontSize, customFontWeight, textDecorationType }: TextLabelProps): JSX.Element;
|
|
29
31
|
export default TextLabel;
|
|
@@ -30,8 +30,8 @@ var react_1 = __importDefault(require("react"));
|
|
|
30
30
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
31
31
|
var common_1 = require("../../../common");
|
|
32
32
|
function TextLabel(_a) {
|
|
33
|
-
var text = _a.text, _b = _a.textAlign, textAlign = _b === void 0 ? 'left' : _b, _c = _a.styleTheme, styleTheme = _c === void 0 ? 'body2Bold' : _c, colorOverride = _a.colorOverride, _d = _a.colorTheme, colorTheme = _d === void 0 ? 'sysTextPrimary' : _d, _e = _a.singleLineMode, singleLineMode = _e === void 0 ? 'none' : _e, _f = _a.ellipsisMode, ellipsisMode = _f === void 0 ? 'none' : _f, lineLimit = _a.lineLimit, _g = _a.userSelectMode, userSelectMode = _g === void 0 ? 'none' : _g, customFontSize = _a.customFontSize, customFontWeight = _a.customFontWeight;
|
|
34
|
-
return (react_1.default.createElement(S_TextLabel, { textAlign: textAlign, styleTheme: styleTheme, colorOverride: colorOverride, colorTheme: colorTheme, singleLineMode: singleLineMode, ellipsisMode: ellipsisMode, lineLimit: lineLimit, userSelectMode: userSelectMode, customFontSize: customFontSize, customFontWeight: customFontWeight }, text));
|
|
33
|
+
var text = _a.text, _b = _a.textAlign, textAlign = _b === void 0 ? 'left' : _b, _c = _a.styleTheme, styleTheme = _c === void 0 ? 'body2Bold' : _c, colorOverride = _a.colorOverride, _d = _a.colorTheme, colorTheme = _d === void 0 ? 'sysTextPrimary' : _d, _e = _a.singleLineMode, singleLineMode = _e === void 0 ? 'none' : _e, _f = _a.ellipsisMode, ellipsisMode = _f === void 0 ? 'none' : _f, lineLimit = _a.lineLimit, _g = _a.userSelectMode, userSelectMode = _g === void 0 ? 'none' : _g, customFontSize = _a.customFontSize, customFontWeight = _a.customFontWeight, _h = _a.textDecorationType, textDecorationType = _h === void 0 ? 'none' : _h;
|
|
34
|
+
return (react_1.default.createElement(S_TextLabel, { textAlign: textAlign, styleTheme: styleTheme, colorOverride: colorOverride, colorTheme: colorTheme, singleLineMode: singleLineMode, ellipsisMode: ellipsisMode, lineLimit: lineLimit, userSelectMode: userSelectMode, customFontSize: customFontSize, customFontWeight: customFontWeight, textDecorationType: textDecorationType }, text));
|
|
35
35
|
}
|
|
36
36
|
var displayBold = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n"], ["\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n"])), function (_a) {
|
|
37
37
|
var theme = _a.theme;
|
|
@@ -259,7 +259,7 @@ var ellipsisStyle = (0, styled_components_1.css)(templateObject_30 || (templateO
|
|
|
259
259
|
return lineLimit;
|
|
260
260
|
});
|
|
261
261
|
var userSelectModeStyle = (0, styled_components_1.css)(templateObject_31 || (templateObject_31 = __makeTemplateObject(["\n -ms-user-select: none;\n -moz-user-select: -moz-none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n"], ["\n -ms-user-select: none;\n -moz-user-select: -moz-none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n"])));
|
|
262
|
-
var S_TextLabel = styled_components_1.default.div(templateObject_32 || (templateObject_32 = __makeTemplateObject(["\n box-sizing: border-box;\n text-align: ", ";\n white-space: pre-wrap;\n word-break: keep-all;\n overflow-wrap: break-word;\n hyphens: auto;\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n"], ["\n box-sizing: border-box;\n text-align: ", ";\n white-space: pre-wrap;\n word-break: keep-all;\n overflow-wrap: break-word;\n hyphens: auto;\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n"])), function (_a) {
|
|
262
|
+
var S_TextLabel = styled_components_1.default.div(templateObject_32 || (templateObject_32 = __makeTemplateObject(["\n box-sizing: border-box;\n text-align: ", ";\n white-space: pre-wrap;\n word-break: keep-all;\n overflow-wrap: break-word;\n hyphens: auto;\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n"], ["\n box-sizing: border-box;\n text-align: ", ";\n white-space: pre-wrap;\n word-break: keep-all;\n overflow-wrap: break-word;\n hyphens: auto;\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n"])), function (_a) {
|
|
263
263
|
var textAlign = _a.textAlign;
|
|
264
264
|
return textAlign;
|
|
265
265
|
}, function (_a) {
|
|
@@ -316,6 +316,13 @@ var S_TextLabel = styled_components_1.default.div(templateObject_32 || (template
|
|
|
316
316
|
}, function (_a) {
|
|
317
317
|
var userSelectMode = _a.userSelectMode;
|
|
318
318
|
return userSelectMode === 'none' && userSelectModeStyle;
|
|
319
|
+
}, function (_a) {
|
|
320
|
+
var textDecorationType = _a.textDecorationType;
|
|
321
|
+
return textDecorationType &&
|
|
322
|
+
{
|
|
323
|
+
none: '',
|
|
324
|
+
line_through: 'text-decoration: line-through;'
|
|
325
|
+
}[textDecorationType];
|
|
319
326
|
});
|
|
320
327
|
exports.default = TextLabel;
|
|
321
328
|
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, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32;
|