pds-dev-kit-web 2.1.5 → 2.1.7
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/README.md +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/src/common/index.d.ts +1 -1
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +6 -5
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +6 -5
- package/dist/src/common/styles/colorSet/SemanticColor.json +3 -1
- package/dist/src/common/styles/colorSet/UIColor.json +2 -1
- package/dist/src/common/styles/colorSet/index.d.ts +326 -321
- package/dist/src/common/styles/colorSet/index.js +2 -2
- package/dist/src/common/styles/colorSet/ui-type.d.ts +1 -0
- package/dist/src/common/types/components.d.ts +8 -1
- package/dist/src/desktop/components/AdminList/AdminList.d.ts +13 -13
- package/dist/src/desktop/components/AdminList/BulkActionBar.d.ts +13 -13
- package/dist/src/desktop/components/AdminListHeader/AdminListHeader.d.ts +4 -4
- package/dist/src/desktop/components/AdminListHeader/HeaderBar.d.ts +4 -4
- package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.js +11 -4
- package/dist/src/desktop/components/ContextMenuItem/ContextMenuItem.d.ts +4 -4
- package/dist/src/desktop/components/ContextMenuItem/ContextMenuItem.js +1 -1
- package/dist/src/desktop/components/IconButton/IconButton.d.ts +1 -1
- package/dist/src/desktop/components/IconButton/IconButton.js +19 -14
- package/dist/src/desktop/components/SegmentedButtonGroup/SegmentedButtonGroup.d.ts +1 -0
- package/dist/src/desktop/components/SegmentedButtonGroup/SegmentedButtonGroup.js +6 -3
- package/dist/src/desktop/components/Slider/Slider.js +1 -1
- package/dist/src/desktop/components/TextField/TextField.d.ts +2 -1
- package/dist/src/desktop/components/TextField/TextField.js +5 -5
- package/dist/src/desktop/components/TextLabel/TextLabel.js +6 -18
- package/dist/src/desktop/components/UploadIconButton/UploadIconButton.d.ts +1 -1
- package/dist/src/desktop/components/UploadIconButton/UploadIconButton.js +18 -13
- package/dist/src/mobile/components/BasicButtonGroup/BasicButtonGroup.js +11 -4
- package/dist/src/mobile/components/ContextMenuItem/ContextMenuItem.d.ts +4 -4
- package/dist/src/mobile/components/ContextMenuItem/ContextMenuItem.js +2 -4
- package/dist/src/mobile/components/IconButton/IconButton.d.ts +1 -1
- package/dist/src/mobile/components/IconButton/IconButton.js +11 -6
- package/dist/src/mobile/components/SegmentedButtonGroup/SegmentedButtonGroup.d.ts +1 -0
- package/dist/src/mobile/components/SegmentedButtonGroup/SegmentedButtonGroup.js +6 -3
- package/dist/src/mobile/components/TextField/TextField.d.ts +2 -1
- package/dist/src/mobile/components/TextField/TextField.js +5 -5
- package/dist/src/mobile/components/UploadIconButton/UploadIconButton.d.ts +1 -1
- package/dist/src/mobile/components/UploadIconButton/UploadIconButton.js +10 -5
- package/dist/src/sub/AdminList/AdminListHeader/AdminListHeader.d.ts +4 -4
- package/dist/src/sub/AdminList/AdminListHeader/HeaderBar.d.ts +4 -4
- package/dist/src/sub/AdminList/BulkActionBar/BulkActionBar.d.ts +13 -13
- package/package.json +1 -1
- package/release-note.md +19 -8
|
@@ -10,17 +10,24 @@ export declare type PDSTabItemOption = {
|
|
|
10
10
|
isActive: boolean;
|
|
11
11
|
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
12
12
|
};
|
|
13
|
-
export declare type
|
|
13
|
+
export declare type ContextMenuItemValueOption = {
|
|
14
14
|
text?: PDSTextType;
|
|
15
15
|
value: string | number | null | boolean;
|
|
16
16
|
iconName?: FillIconNameKeys | LineIconNameKeys;
|
|
17
17
|
iconFillType?: 'fill' | 'line';
|
|
18
|
+
};
|
|
19
|
+
export declare type DropdownValueOption = ContextMenuItemValueOption & {
|
|
18
20
|
state?: 'normal' | 'disabled';
|
|
19
21
|
};
|
|
22
|
+
export declare type AdminListDropdownValueOption = {
|
|
23
|
+
text: DropdownValueOption['text'];
|
|
24
|
+
value: DropdownValueOption['value'];
|
|
25
|
+
};
|
|
20
26
|
export declare type BasicButtonGroupValueOption = {
|
|
21
27
|
iconName: FillIconNameKeys | LineIconNameKeys;
|
|
22
28
|
iconFillType?: 'fill' | 'line';
|
|
23
29
|
state?: 'normal' | 'disabled';
|
|
30
|
+
iconColorTheme?: 'none' | 'red';
|
|
24
31
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
25
32
|
onMouseDown?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
26
33
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AdminListDropdownValueOption } from '../../../common';
|
|
3
3
|
import type { TFunctionResult } from 'i18next';
|
|
4
4
|
declare type ColumnWidthType = 'small' | 'medium' | 'large' | 'xlarge';
|
|
5
5
|
declare type Props = {
|
|
@@ -23,18 +23,18 @@ declare type Props = {
|
|
|
23
23
|
column10HeaderText?: TFunctionResult;
|
|
24
24
|
column10Width?: ColumnWidthType;
|
|
25
25
|
dropdownMode?: 'none' | 'dropdown_amount1' | 'dropdown_amount2' | 'dropdown_amount3';
|
|
26
|
-
dropdown1Value?:
|
|
27
|
-
dropdown2Value?:
|
|
28
|
-
dropdown3Value?:
|
|
29
|
-
dropdown1DefaultText?:
|
|
30
|
-
dropdown2DefaultText?:
|
|
31
|
-
dropdown3DefaultText?:
|
|
26
|
+
dropdown1Value?: AdminListDropdownValueOption;
|
|
27
|
+
dropdown2Value?: AdminListDropdownValueOption;
|
|
28
|
+
dropdown3Value?: AdminListDropdownValueOption;
|
|
29
|
+
dropdown1DefaultText?: AdminListDropdownValueOption;
|
|
30
|
+
dropdown2DefaultText?: AdminListDropdownValueOption;
|
|
31
|
+
dropdown3DefaultText?: AdminListDropdownValueOption;
|
|
32
32
|
dropdown1HintText?: TFunctionResult;
|
|
33
33
|
dropdown2HintText?: TFunctionResult;
|
|
34
34
|
dropdown3HintText?: TFunctionResult;
|
|
35
|
-
dropdown1ValueArray?:
|
|
36
|
-
dropdown2ValueArray?:
|
|
37
|
-
dropdown3ValueArray?:
|
|
35
|
+
dropdown1ValueArray?: AdminListDropdownValueOption[];
|
|
36
|
+
dropdown2ValueArray?: AdminListDropdownValueOption[];
|
|
37
|
+
dropdown3ValueArray?: AdminListDropdownValueOption[];
|
|
38
38
|
quickActionBtnMode?: 'none' | 'btn_amount1' | 'btn_amount2' | 'btn_amount3';
|
|
39
39
|
quickActionBtn1Text?: TFunctionResult;
|
|
40
40
|
quickActionBtn2Text?: TFunctionResult;
|
|
@@ -49,9 +49,9 @@ declare type Props = {
|
|
|
49
49
|
scrollVisibleType?: 'moving' | 'hidden' | 'visible';
|
|
50
50
|
headerRowCheckboxName?: string;
|
|
51
51
|
flexibleHideInfoMode?: 'use' | 'none';
|
|
52
|
-
onChangeDropdown1?: (value:
|
|
53
|
-
onChangeDropdown2?: (value:
|
|
54
|
-
onChangeDropdown3?: (value:
|
|
52
|
+
onChangeDropdown1?: (value: AdminListDropdownValueOption) => void;
|
|
53
|
+
onChangeDropdown2?: (value: AdminListDropdownValueOption) => void;
|
|
54
|
+
onChangeDropdown3?: (value: AdminListDropdownValueOption) => void;
|
|
55
55
|
onClickTBtn1?: () => void;
|
|
56
56
|
onClickTBtn2?: () => void;
|
|
57
57
|
onClickTBtn3?: () => void;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
2
|
+
import type { AdminListDropdownValueOption } from '../../../common/types';
|
|
3
3
|
import type { TFunctionResult } from 'i18next';
|
|
4
4
|
declare type Props = {
|
|
5
5
|
itemCount?: number;
|
|
6
6
|
dropdownMode: 'none' | 'dropdown_amount1' | 'dropdown_amount2' | 'dropdown_amount3';
|
|
7
|
-
dropdown1Value?:
|
|
8
|
-
dropdown2Value?:
|
|
9
|
-
dropdown3Value?:
|
|
10
|
-
dropdown1DefaultText?:
|
|
11
|
-
dropdown2DefaultText?:
|
|
12
|
-
dropdown3DefaultText?:
|
|
7
|
+
dropdown1Value?: AdminListDropdownValueOption;
|
|
8
|
+
dropdown2Value?: AdminListDropdownValueOption;
|
|
9
|
+
dropdown3Value?: AdminListDropdownValueOption;
|
|
10
|
+
dropdown1DefaultText?: AdminListDropdownValueOption;
|
|
11
|
+
dropdown2DefaultText?: AdminListDropdownValueOption;
|
|
12
|
+
dropdown3DefaultText?: AdminListDropdownValueOption;
|
|
13
13
|
dropdown1HintText?: TFunctionResult;
|
|
14
14
|
dropdown2HintText?: TFunctionResult;
|
|
15
15
|
dropdown3HintText?: TFunctionResult;
|
|
16
|
-
dropdown1ValueArray?:
|
|
17
|
-
dropdown2ValueArray?:
|
|
18
|
-
dropdown3ValueArray?:
|
|
16
|
+
dropdown1ValueArray?: AdminListDropdownValueOption[];
|
|
17
|
+
dropdown2ValueArray?: AdminListDropdownValueOption[];
|
|
18
|
+
dropdown3ValueArray?: AdminListDropdownValueOption[];
|
|
19
19
|
tBtnMode?: 'none' | 'tbtn_amount1' | 'tbtn_amount2' | 'tbtn_amount3';
|
|
20
20
|
tBtn1Text?: TFunctionResult;
|
|
21
21
|
tBtn2Text?: TFunctionResult;
|
|
22
22
|
tBtn3Text?: TFunctionResult;
|
|
23
|
-
onChangeDropdown1?: (value:
|
|
24
|
-
onChangeDropdown2?: (value:
|
|
25
|
-
onChangeDropdown3?: (value:
|
|
23
|
+
onChangeDropdown1?: (value: AdminListDropdownValueOption) => void;
|
|
24
|
+
onChangeDropdown2?: (value: AdminListDropdownValueOption) => void;
|
|
25
|
+
onChangeDropdown3?: (value: AdminListDropdownValueOption) => void;
|
|
26
26
|
onClickTBtn1?: () => void;
|
|
27
27
|
onClickTBtn2?: () => void;
|
|
28
28
|
onClickTBtn3?: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
2
|
+
import type { AdminListDropdownValueOption } from '../../../common';
|
|
3
3
|
import type { TFunctionResult } from 'i18next';
|
|
4
4
|
declare type Props = {
|
|
5
5
|
headerBarSize?: 'regular' | 'small';
|
|
@@ -8,9 +8,9 @@ declare type Props = {
|
|
|
8
8
|
totalPage?: number;
|
|
9
9
|
contentText?: TFunctionResult;
|
|
10
10
|
filterBar?: React.ReactNode;
|
|
11
|
-
dropdownTextArray?:
|
|
12
|
-
dropdownDefaultValue?:
|
|
13
|
-
onChangeCount?: (option:
|
|
11
|
+
dropdownTextArray?: AdminListDropdownValueOption[];
|
|
12
|
+
dropdownDefaultValue?: AdminListDropdownValueOption;
|
|
13
|
+
onChangeCount?: (option: AdminListDropdownValueOption) => void;
|
|
14
14
|
onClickNextButton?: () => void;
|
|
15
15
|
onClickPrevButton?: () => void;
|
|
16
16
|
/** @deprecated v1.5 totalPage를 받아오기 때문에 deprecated 될 예정입니다. */
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
2
|
+
import type { AdminListDropdownValueOption } from '../../../common/types';
|
|
3
3
|
import type { TFunctionResult } from 'i18next';
|
|
4
4
|
declare type Props = {
|
|
5
5
|
titleText?: TFunctionResult;
|
|
6
6
|
size?: 'regular' | 'small';
|
|
7
7
|
currentPage?: number;
|
|
8
8
|
totalPage?: number;
|
|
9
|
-
dropdownTextArray:
|
|
10
|
-
dropdownDefaultValue?:
|
|
11
|
-
onChangeDropdown?: (option:
|
|
9
|
+
dropdownTextArray: AdminListDropdownValueOption[];
|
|
10
|
+
dropdownDefaultValue?: AdminListDropdownValueOption;
|
|
11
|
+
onChangeDropdown?: (option: AdminListDropdownValueOption) => void;
|
|
12
12
|
onClickIBtn1?: () => void;
|
|
13
13
|
onClickIBtn2?: () => void;
|
|
14
14
|
};
|
|
@@ -39,11 +39,18 @@ var components_1 = require("../../../hybrid/components");
|
|
|
39
39
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
40
40
|
function BasicButtonGroup(_a) {
|
|
41
41
|
var _b = _a.size, size = _b === void 0 ? 'medium' : _b, valueArray = _a.valueArray, _c = _a.state, state = _c === void 0 ? 'normal' : _c;
|
|
42
|
+
var getColorKey = function (buttonState, iconColorTheme) {
|
|
43
|
+
if (state === 'disabled' || buttonState === 'disabled') {
|
|
44
|
+
return 'ui_cpnt_button_icon_disabled';
|
|
45
|
+
}
|
|
46
|
+
if (iconColorTheme === 'red') {
|
|
47
|
+
return 'ui_cpnt_button_icon_error';
|
|
48
|
+
}
|
|
49
|
+
return 'ui_cpnt_button_icon_enabled';
|
|
50
|
+
};
|
|
42
51
|
return ((0, jsx_runtime_1.jsx)(S_BasicButtonGroup, __assign({ "x-pds-name": "BasicButtonGroup", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, { children: valueArray.map(function (_a, index) {
|
|
43
|
-
var iconName = _a.iconName, _b = _a.iconFillType, iconFillType = _b === void 0 ? 'line' : _b, _c = _a.state, buttonState = _c === void 0 ? 'normal' : _c, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
|
|
44
|
-
return ((0, jsx_runtime_1.jsx)(S_BasicButton, __assign({ size: size, onClick: function (e) { return onClick && onClick(e); }, onMouseDown: function (e) { return onMouseDown && onMouseDown(e); }, disabled: state === 'disabled' || buttonState === 'disabled' }, { children: (0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, iconFillType: iconFillType, colorKey:
|
|
45
|
-
? 'ui_cpnt_button_icon_disabled'
|
|
46
|
-
: 'ui_cpnt_button_icon_enabled' }, void 0) }), iconName + index));
|
|
52
|
+
var iconName = _a.iconName, _b = _a.iconFillType, iconFillType = _b === void 0 ? 'line' : _b, _c = _a.state, buttonState = _c === void 0 ? 'normal' : _c, _d = _a.iconColorTheme, iconColorTheme = _d === void 0 ? 'none' : _d, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(S_BasicButton, __assign({ size: size, onClick: function (e) { return onClick && onClick(e); }, onMouseDown: function (e) { return onMouseDown && onMouseDown(e); }, disabled: state === 'disabled' || buttonState === 'disabled' }, { children: (0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, iconFillType: iconFillType, colorKey: getColorKey(buttonState, iconColorTheme) }, void 0) }), iconName + index));
|
|
47
54
|
}) }), void 0));
|
|
48
55
|
}
|
|
49
56
|
var S_BasicButtonGroup = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"], ["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"])), function (_a) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { PDSTextType
|
|
3
|
-
import type {
|
|
2
|
+
import type { PDSTextType } from '../../../common';
|
|
3
|
+
import type { ContextMenuItemValueOption } from '../../../common/types';
|
|
4
4
|
export declare type ContextMenuItemProps = {
|
|
5
|
-
option?:
|
|
5
|
+
option?: ContextMenuItemValueOption;
|
|
6
6
|
size?: 'large' | 'medium' | 'small';
|
|
7
7
|
isSelected?: boolean;
|
|
8
8
|
state?: 'normal' | 'disabled';
|
|
9
9
|
displayType?: 'text_only' | 'icon_only' | 'icon_text';
|
|
10
|
-
onClick?: (value:
|
|
10
|
+
onClick?: (value: ContextMenuItemValueOption | string | number | boolean) => void;
|
|
11
11
|
/** @deprecated option 필드를 대신 사용하세요. */
|
|
12
12
|
text?: PDSTextType;
|
|
13
13
|
/** @deprecated option 필드를 대신 사용하세요. */
|
|
@@ -39,7 +39,7 @@ var components_1 = require("../../../hybrid/components");
|
|
|
39
39
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
40
40
|
var TextLabel_1 = require("../TextLabel");
|
|
41
41
|
function ContextMenuItem(_a) {
|
|
42
|
-
var option = _a.option, _b = _a.size, size = _b === void 0 ? 'small' : _b, _c = _a.isSelected, isSelected = _c === void 0 ? false : _c, _d = _a.state, state = _d === void 0 ? 'normal' : _d,
|
|
42
|
+
var option = _a.option, _b = _a.size, size = _b === void 0 ? 'small' : _b, _c = _a.isSelected, isSelected = _c === void 0 ? false : _c, _d = _a.state, state = _d === void 0 ? 'normal' : _d, _e = _a.displayType, displayType = _e === void 0 ? 'text_only' : _e, onClick = _a.onClick, text = _a.text, value = _a.value;
|
|
43
43
|
var handleClick = function () {
|
|
44
44
|
if (state === 'disabled') {
|
|
45
45
|
return;
|
|
@@ -4,7 +4,7 @@ export declare type IconButtonProps = {
|
|
|
4
4
|
tooltipText?: PDSTextType;
|
|
5
5
|
tooltipPosition?: 'left_top' | 'left_bottom' | 'center_top' | 'center_bottom' | 'right_top' | 'right_bottom';
|
|
6
6
|
fillType?: 'fill' | 'line';
|
|
7
|
-
shapeType?: 'circular' | 'rectangle';
|
|
7
|
+
shapeType?: 'circular' | 'rectangle' | 'round';
|
|
8
8
|
baseSize?: 'xxlarge' | 'large' | 'medium' | 'small' | 'xsmall';
|
|
9
9
|
baseColorKey?: UiColors;
|
|
10
10
|
borderColorKey?: UiColors;
|
|
@@ -143,20 +143,25 @@ var large = (0, styled_components_1.css)(templateObject_6 || (templateObject_6 =
|
|
|
143
143
|
var medium = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n height: 40px;\n width: 40px;\n"], ["\n height: 40px;\n width: 40px;\n"])));
|
|
144
144
|
var small = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n height: 32px;\n width: 32px;\n"], ["\n height: 32px;\n width: 32px;\n"])));
|
|
145
145
|
var xsmall = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n height: 24px;\n width: 24px;\n"], ["\n height: 24px;\n width: 24px;\n"])));
|
|
146
|
-
var
|
|
146
|
+
var roundStyle = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), function (_a) {
|
|
147
|
+
var baseSize = _a.baseSize;
|
|
148
|
+
return baseSize &&
|
|
149
|
+
{ xxlarge: '24px', large: '14px', medium: '12px', small: '10px', xsmall: '8px' }[baseSize];
|
|
150
|
+
});
|
|
151
|
+
var line1ColorTheme = (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n border-color: ", ";\n"], ["\n border-color: ", ";\n"])), function (_a) {
|
|
147
152
|
var theme = _a.theme;
|
|
148
153
|
return theme.ui_cpnt_button_line_border_error;
|
|
149
154
|
});
|
|
150
|
-
var line2ColorTheme = (0, styled_components_1.css)(
|
|
155
|
+
var line2ColorTheme = (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n border-color: ", ";\n"], ["\n border-color: ", ";\n"])), function (_a) {
|
|
151
156
|
var theme = _a.theme;
|
|
152
157
|
return theme.ui_cpnt_button_line_border_primary;
|
|
153
158
|
});
|
|
154
|
-
var iconButtonStyle = (0, styled_components_1.css)(
|
|
159
|
+
var iconButtonStyle = (0, styled_components_1.css)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n box-sizing: border-box;\n cursor: ", ";\n display: flex;\n justify-content: center;\n ", ";\n ", ";\n ", ";\n ", ";\n"], ["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n box-sizing: border-box;\n cursor: ", ";\n display: flex;\n justify-content: center;\n ", ";\n ", ";\n ", ";\n ", ";\n"])), function (_a) {
|
|
155
160
|
var state = _a.state;
|
|
156
161
|
return (state === 'normal' ? 'pointer' : 'default');
|
|
157
162
|
}, function (_a) {
|
|
158
163
|
var shapeType = _a.shapeType;
|
|
159
|
-
return shapeType && { circular: 'border-radius: 50%', rectangle: '' }[shapeType];
|
|
164
|
+
return shapeType && { circular: 'border-radius: 50%', rectangle: '', round: roundStyle }[shapeType];
|
|
160
165
|
}, function (_a) {
|
|
161
166
|
var theme = _a.theme, shadow = _a.shadow;
|
|
162
167
|
return shadow === 'visible' && "box-shadow: " + theme.boxShadow.elevation2;
|
|
@@ -178,8 +183,8 @@ var iconButtonStyle = (0, styled_components_1.css)(templateObject_12 || (templat
|
|
|
178
183
|
xsmall: xsmall
|
|
179
184
|
}[baseSize];
|
|
180
185
|
});
|
|
181
|
-
var S_IconButton = styled_components_1.default.button(
|
|
182
|
-
var tooltipPositionSpacing = (0, styled_components_1.css)(
|
|
186
|
+
var S_IconButton = styled_components_1.default.button(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), iconButtonStyle);
|
|
187
|
+
var tooltipPositionSpacing = (0, styled_components_1.css)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), function (_a) {
|
|
183
188
|
var baseSize = _a.baseSize;
|
|
184
189
|
return baseSize &&
|
|
185
190
|
{
|
|
@@ -190,13 +195,13 @@ var tooltipPositionSpacing = (0, styled_components_1.css)(templateObject_14 || (
|
|
|
190
195
|
xsmall: constants_1.TOOLTIP_POSITION_SPACING.xsmall
|
|
191
196
|
}[baseSize];
|
|
192
197
|
});
|
|
193
|
-
var tooltipLeftTop = (0, styled_components_1.css)(
|
|
194
|
-
var tooltipLeftBottom = (0, styled_components_1.css)(
|
|
195
|
-
var tooltipCenterTop = (0, styled_components_1.css)(
|
|
196
|
-
var tooltipCenterBottom = (0, styled_components_1.css)(
|
|
197
|
-
var tooltipRightTop = (0, styled_components_1.css)(
|
|
198
|
-
var tooltipRightBottom = (0, styled_components_1.css)(
|
|
199
|
-
var S_TooltipWrapper = styled_components_1.default.div(
|
|
198
|
+
var tooltipLeftTop = (0, styled_components_1.css)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n bottom: ", ";\n right: 0;\n"], ["\n bottom: ", ";\n right: 0;\n"])), tooltipPositionSpacing);
|
|
199
|
+
var tooltipLeftBottom = (0, styled_components_1.css)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n right: 0;\n top: ", ";\n"], ["\n right: 0;\n top: ", ";\n"])), tooltipPositionSpacing);
|
|
200
|
+
var tooltipCenterTop = (0, styled_components_1.css)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n bottom: ", ";\n"], ["\n bottom: ", ";\n"])), tooltipPositionSpacing);
|
|
201
|
+
var tooltipCenterBottom = (0, styled_components_1.css)(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n top: ", ";\n"], ["\n top: ", ";\n"])), tooltipPositionSpacing);
|
|
202
|
+
var tooltipRightTop = (0, styled_components_1.css)(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n bottom: ", ";\n left: 0;\n"], ["\n bottom: ", ";\n left: 0;\n"])), tooltipPositionSpacing);
|
|
203
|
+
var tooltipRightBottom = (0, styled_components_1.css)(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n left: 0;\n top: ", ";\n"], ["\n left: 0;\n top: ", ";\n"])), tooltipPositionSpacing);
|
|
204
|
+
var S_TooltipWrapper = styled_components_1.default.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n padding: ", ";\n position: absolute;\n width: max-content;\n z-index: 400;\n\n ", ";\n\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n padding: ", ";\n position: absolute;\n width: max-content;\n z-index: 400;\n\n ", ";\n\n ", "\n"])), function (_a) {
|
|
200
205
|
var theme = _a.theme;
|
|
201
206
|
return theme.ui_cpnt_button_tooltip_base;
|
|
202
207
|
}, function (_a) {
|
|
@@ -221,4 +226,4 @@ var S_TooltipWrapper = styled_components_1.default.div(templateObject_21 || (tem
|
|
|
221
226
|
}[tooltipPosition];
|
|
222
227
|
});
|
|
223
228
|
exports.default = IconButton;
|
|
224
|
-
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;
|
|
229
|
+
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;
|
|
@@ -4,6 +4,7 @@ declare type SegmentedButtonGroupValueOption = Pick<PDSValueOption, 'value'> & {
|
|
|
4
4
|
iconName: FillIconNameKeys | LineIconNameKeys;
|
|
5
5
|
iconFillType?: 'fill' | 'line';
|
|
6
6
|
state?: 'normal' | 'disabled';
|
|
7
|
+
iconColorTheme?: 'none' | 'red';
|
|
7
8
|
};
|
|
8
9
|
export declare type SegmentedButtonGroupProps = {
|
|
9
10
|
size?: 'large' | 'medium' | 'small';
|
|
@@ -55,18 +55,21 @@ function SegmentedButtonGroup(_a) {
|
|
|
55
55
|
}
|
|
56
56
|
return value === currentButtonValue;
|
|
57
57
|
};
|
|
58
|
-
var getIconColorKey = function (isSelected, isDisabled) {
|
|
58
|
+
var getIconColorKey = function (isSelected, isDisabled, iconColorTheme) {
|
|
59
59
|
if (isDisabled) {
|
|
60
60
|
return 'ui_cpnt_button_icon_disabled';
|
|
61
61
|
}
|
|
62
62
|
if (isSelected) {
|
|
63
63
|
return 'ui_cpnt_button_icon_white';
|
|
64
64
|
}
|
|
65
|
+
if (iconColorTheme === 'red') {
|
|
66
|
+
return 'ui_cpnt_button_icon_error';
|
|
67
|
+
}
|
|
65
68
|
return 'ui_cpnt_button_icon_enabled';
|
|
66
69
|
};
|
|
67
70
|
return ((0, jsx_runtime_1.jsx)(S_SegmentedButtonGroupGroups, __assign({ "x-pds-name": "SegmentedButtonGroup", "x-pds-element-type": "component", "x-pds-device-type": "desktop", selectedType: selectedType }, { children: valueArray.map(function (_a) {
|
|
68
|
-
var currentButtonValue = _a.value, iconName = _a.iconName, _b = _a.iconFillType, iconFillType = _b === void 0 ? 'line' : _b, _c = _a.state, buttonState = _c === void 0 ? 'normal' : _c;
|
|
69
|
-
return ((0, jsx_runtime_1.jsx)(S_BasicButton, __assign({ size: size, onClick: function () { return handleClick(currentButtonValue); }, onMouseDown: function () { return handleMouseDown(currentButtonValue); }, disabled: state === 'disabled' || buttonState === 'disabled', selectedType: selectedType, isSelected: checkSelection(currentButtonValue) }, { children: (0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, iconFillType: iconFillType, colorKey: getIconColorKey(checkSelection(currentButtonValue), state === 'disabled' || buttonState === 'disabled') }, void 0) }), String(currentButtonValue)));
|
|
71
|
+
var currentButtonValue = _a.value, iconName = _a.iconName, _b = _a.iconFillType, iconFillType = _b === void 0 ? 'line' : _b, _c = _a.state, buttonState = _c === void 0 ? 'normal' : _c, _d = _a.iconColorTheme, iconColorTheme = _d === void 0 ? 'none' : _d;
|
|
72
|
+
return ((0, jsx_runtime_1.jsx)(S_BasicButton, __assign({ size: size, onClick: function () { return handleClick(currentButtonValue); }, onMouseDown: function () { return handleMouseDown(currentButtonValue); }, disabled: state === 'disabled' || buttonState === 'disabled', selectedType: selectedType, isSelected: checkSelection(currentButtonValue) }, { children: (0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, iconFillType: iconFillType, colorKey: getIconColorKey(checkSelection(currentButtonValue), state === 'disabled' || buttonState === 'disabled', iconColorTheme) }, void 0) }), String(currentButtonValue)));
|
|
70
73
|
}) }), void 0));
|
|
71
74
|
}
|
|
72
75
|
var S_SegmentedButtonGroupGroups = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"], ["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"])), function (_a) {
|
|
@@ -137,7 +137,7 @@ function Slider(_a, ref) {
|
|
|
137
137
|
}
|
|
138
138
|
inputRef.current = node;
|
|
139
139
|
};
|
|
140
|
-
return ((0, jsx_runtime_1.jsxs)(S_SliderBox, __assign({ "x-pds-name": "Slider", "x-pds-element-type": "component", "x-pds-device-type": "
|
|
140
|
+
return ((0, jsx_runtime_1.jsxs)(S_SliderBox, __assign({ "x-pds-name": "Slider", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, { children: [prefixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: prefixText, styleTheme: "caption2Bold", colorTheme: state === 'normal' ? 'sysTextSecondary' : 'sysTextTertiary', singleLineMode: "use", textAlign: "right" }, void 0), (0, jsx_runtime_1.jsx)(components_1.Spacing, { spacingType: "width", size: "spacing_b" }, void 0)] }, void 0)), (0, jsx_runtime_1.jsx)(S_SliderWrapper, __assign({ customWidth: customWidth, responsiveMode: responsiveMode }, { children: (0, jsx_runtime_1.jsxs)(S_Slider, __assign({ customWidth: customWidth, isDisabled: state === 'disabled', responsiveMode: responsiveMode, thumbPercentage: defaultThumbPercentage, onMouseDown: handleMouseDown }, { children: [(0, jsx_runtime_1.jsx)(S_Track, { ref: trackRef, thumbPercentage: defaultThumbPercentage, isDisabled: state === 'disabled' }, void 0), (0, jsx_runtime_1.jsxs)(S_Thumb, __assign({ ref: thumbRef, thumbPercentage: defaultThumbPercentage, isDragging: isDragging, isDisabled: state === 'disabled' }, { children: [(0, jsx_runtime_1.jsx)(S_Range, { ref: handleRangeRef, type: "range", name: name, min: min, max: max, step: step, defaultValue: defaultValue, onInput: handleChange, onClick: handleClick }, void 0), tooltipText && isTooltipVisible && ((0, jsx_runtime_1.jsx)(S_Tooltip, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, styleTheme: "caption2Regular", colorOverride: "ui_cpnt_textlabel_button_tooltip", singleLineMode: "use" }, void 0) }, void 0))] }), void 0)] }), void 0) }), void 0), suffixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { spacingType: "width", size: "spacing_b" }, void 0), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: suffixText, styleTheme: "caption2Bold", colorTheme: state === 'normal' ? 'sysTextSecondary' : 'sysTextTertiary', singleLineMode: "use" }, void 0)] }, void 0))] }), void 0));
|
|
141
141
|
}
|
|
142
142
|
var S_SliderBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n flex-direction: row;\n"], ["\n align-items: center;\n display: flex;\n flex-direction: row;\n"])));
|
|
143
143
|
var S_SliderWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n position: relative;\n width: ", ";\n"], ["\n display: flex;\n position: relative;\n width: ", ";\n"])), function (_a) {
|
|
@@ -34,6 +34,7 @@ export declare type TextFieldProps = {
|
|
|
34
34
|
autoComplete?: string;
|
|
35
35
|
numberStepperMode?: 'none' | 'use';
|
|
36
36
|
numberStep?: number;
|
|
37
|
+
deleteBtnMode?: 'none' | 'use';
|
|
37
38
|
onBlur?: (e: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
38
39
|
onChange?: (e: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
39
40
|
onClickIBtn1?: () => void;
|
|
@@ -43,5 +44,5 @@ export declare type TextFieldProps = {
|
|
|
43
44
|
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement> | React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
44
45
|
onTarget?: () => void;
|
|
45
46
|
};
|
|
46
|
-
declare function TextField({ name, hintText, defaultText, textAlign, prefixText, suffixText, validation, validationPoint, preventBlankMode, enterSubmitMode, size, responsiveMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, colorTheme, max, maxLength, min, customWidth, autoComplete, numberStepperMode, numberStep, onBlur, onChange, onClickIBtn1, onClickIBtn2, onFocus, onKeyUp, onKeyDown, onTarget }: TextFieldProps): JSX.Element;
|
|
47
|
+
declare function TextField({ name, hintText, defaultText, textAlign, prefixText, suffixText, validation, validationPoint, preventBlankMode, enterSubmitMode, size, responsiveMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, colorTheme, max, maxLength, min, customWidth, autoComplete, numberStepperMode, numberStep, deleteBtnMode, onBlur, onChange, onClickIBtn1, onClickIBtn2, onFocus, onKeyUp, onKeyDown, onTarget }: TextFieldProps): JSX.Element;
|
|
47
48
|
export default TextField;
|
|
@@ -46,7 +46,7 @@ var IconButton_1 = require("../IconButton");
|
|
|
46
46
|
var TextLabel_1 = require("../TextLabel");
|
|
47
47
|
function TextField(_a) {
|
|
48
48
|
var _b;
|
|
49
|
-
var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, _c = _a.textAlign, textAlign = _c === void 0 ? 'left' : _c, prefixText = _a.prefixText, suffixText = _a.suffixText, validation = _a.validation, _d = _a.validationPoint, validationPoint = _d === void 0 ? 'onBlur' : _d, _e = _a.preventBlankMode, preventBlankMode = _e === void 0 ? 'none' : _e, _f = _a.enterSubmitMode, enterSubmitMode = _f === void 0 ? 'none' : _f, _g = _a.size, size = _g === void 0 ? 'large' : _g, _h = _a.responsiveMode, responsiveMode = _h === void 0 ? 'none' : _h, _j = _a.textLineType, textLineType = _j === void 0 ? 'single' : _j, _k = _a.multiRows, multiRows = _k === void 0 ? 8 : _k, _l = _a.autoMinRows, autoMinRows = _l === void 0 ? 8 : _l, autoMaxRows = _a.autoMaxRows, _m = _a.inputType, inputType = _m === void 0 ? 'text' : _m, _o = _a.state, state = _o === void 0 ? 'normal' : _o, iBtn1IconName = _a.iBtn1IconName, _p = _a.iBtn1IconFillType, iBtn1IconFillType = _p === void 0 ? 'line' : _p, iBtn2IconName = _a.iBtn2IconName, _q = _a.iBtn2IconFillType, iBtn2IconFillType = _q === void 0 ? 'line' : _q, _r = _a.colorTheme, colorTheme = _r === void 0 ? 'none' : _r, max = _a.max, maxLength = _a.maxLength, min = _a.min, customWidth = _a.customWidth, _s = _a.autoComplete, autoComplete = _s === void 0 ? 'on' : _s, _t = _a.numberStepperMode, numberStepperMode = _t === void 0 ? 'none' : _t, numberStep = _a.numberStep, onBlur = _a.onBlur, onChange = _a.onChange, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onFocus = _a.onFocus, onKeyUp = _a.onKeyUp, onKeyDown = _a.onKeyDown, onTarget = _a.onTarget;
|
|
49
|
+
var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, _c = _a.textAlign, textAlign = _c === void 0 ? 'left' : _c, prefixText = _a.prefixText, suffixText = _a.suffixText, validation = _a.validation, _d = _a.validationPoint, validationPoint = _d === void 0 ? 'onBlur' : _d, _e = _a.preventBlankMode, preventBlankMode = _e === void 0 ? 'none' : _e, _f = _a.enterSubmitMode, enterSubmitMode = _f === void 0 ? 'none' : _f, _g = _a.size, size = _g === void 0 ? 'large' : _g, _h = _a.responsiveMode, responsiveMode = _h === void 0 ? 'none' : _h, _j = _a.textLineType, textLineType = _j === void 0 ? 'single' : _j, _k = _a.multiRows, multiRows = _k === void 0 ? 8 : _k, _l = _a.autoMinRows, autoMinRows = _l === void 0 ? 8 : _l, autoMaxRows = _a.autoMaxRows, _m = _a.inputType, inputType = _m === void 0 ? 'text' : _m, _o = _a.state, state = _o === void 0 ? 'normal' : _o, iBtn1IconName = _a.iBtn1IconName, _p = _a.iBtn1IconFillType, iBtn1IconFillType = _p === void 0 ? 'line' : _p, iBtn2IconName = _a.iBtn2IconName, _q = _a.iBtn2IconFillType, iBtn2IconFillType = _q === void 0 ? 'line' : _q, _r = _a.colorTheme, colorTheme = _r === void 0 ? 'none' : _r, max = _a.max, maxLength = _a.maxLength, min = _a.min, customWidth = _a.customWidth, _s = _a.autoComplete, autoComplete = _s === void 0 ? 'on' : _s, _t = _a.numberStepperMode, numberStepperMode = _t === void 0 ? 'none' : _t, numberStep = _a.numberStep, _u = _a.deleteBtnMode, deleteBtnMode = _u === void 0 ? 'use' : _u, onBlur = _a.onBlur, onChange = _a.onChange, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onFocus = _a.onFocus, onKeyUp = _a.onKeyUp, onKeyDown = _a.onKeyDown, onTarget = _a.onTarget;
|
|
50
50
|
var basicThemeIconColors = {
|
|
51
51
|
normal: 'ui_cpnt_button_icon_default',
|
|
52
52
|
read_only: 'ui_cpnt_button_icon_default',
|
|
@@ -62,9 +62,9 @@ function TextField(_a) {
|
|
|
62
62
|
read_only: 'ui_cpnt_textfield_icon_colortheme_transparent_readonly',
|
|
63
63
|
disabled: 'ui_cpnt_textfield_icon_colortheme_transparent_disabled'
|
|
64
64
|
};
|
|
65
|
-
var
|
|
66
|
-
var
|
|
67
|
-
var
|
|
65
|
+
var _v = (0, react_1.useState)(false), isFocused = _v[0], setIsFocused = _v[1];
|
|
66
|
+
var _w = (0, react_hook_form_1.useFormContext)(), register = _w.register, trigger = _w.trigger, errors = _w.formState.errors;
|
|
67
|
+
var _x = register(name, validation), validateOnChange = _x.onChange, validateOnBlur = _x.onBlur;
|
|
68
68
|
var isError = Object.keys(errors).some(function (error) { return error === name; });
|
|
69
69
|
var handleClickIBtn1 = function () {
|
|
70
70
|
if (onClickIBtn1) {
|
|
@@ -136,7 +136,7 @@ function TextField(_a) {
|
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [prefixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: prefixText, styleTheme: "caption1Bold", colorTheme: "sysTextTertiary", singleLineMode: "use" }, void 0), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0)] }, void 0)), (0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, textAlign: inputType === 'number' && numberStepperMode === 'use' ? 'right' : textAlign, validation: validation, preventBlankMode: preventBlankMode, enterSubmitMode: enterSubmitMode, textLineType: "single", inputType: inputType, state: state, colorTheme: colorTheme, min: min, max: max, maxLength: maxLength, textSize: "form2", textWeight: "normal", deleteIconMode:
|
|
139
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [prefixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: prefixText, styleTheme: "caption1Bold", colorTheme: "sysTextTertiary", singleLineMode: "use" }, void 0), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0)] }, void 0)), (0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, textAlign: inputType === 'number' && numberStepperMode === 'use' ? 'right' : textAlign, validation: validation, preventBlankMode: preventBlankMode, enterSubmitMode: enterSubmitMode, textLineType: "single", inputType: inputType, state: state, colorTheme: colorTheme, min: min, max: max, maxLength: maxLength, textSize: "form2", textWeight: "normal", deleteIconMode: deleteBtnMode, deleteIconSize: size === 'large' || size === 'rlarge' ? 20 : 16, deleteIconColor: deleteIconColor, isFocused: isFocused, autoComplete: autoComplete, stepperMode: inputType === 'number' && numberStepperMode === 'use' ? 'use' : 'none', innerSpinButtonSize: size === 'small' ? 12 : 16, step: numberStep, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown }, void 0), (0, jsx_runtime_1.jsxs)(S_RightBox, { children: [suffixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: suffixText, styleTheme: "caption1Bold", colorTheme: "sysTextTertiary", textAlign: "right", singleLineMode: "use" }, void 0), size === 'large' ? ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0)) : ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }, void 0))] }, void 0)), iBtn2IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iBtn2IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: colorTheme &&
|
|
140
140
|
{
|
|
141
141
|
none: basicThemeIconColors[state],
|
|
142
142
|
dark: darkThemeIconColors[state],
|
|
@@ -395,31 +395,19 @@ var S_AfterTextBox = styled_components_1.default.div(templateObject_41 || (templ
|
|
|
395
395
|
}
|
|
396
396
|
});
|
|
397
397
|
var S_IconWrapper = styled_components_1.default.div(templateObject_42 || (templateObject_42 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 16px;\n height: 100%;\n justify-content: center;\n width: 16px;\n"], ["\n align-items: center;\n display: flex;\n height: 16px;\n height: 100%;\n justify-content: center;\n width: 16px;\n"])));
|
|
398
|
-
var S_TooltipWrapper = styled_components_1.default.div(templateObject_43 || (templateObject_43 = __makeTemplateObject(["\n
|
|
398
|
+
var S_TooltipWrapper = styled_components_1.default.div(templateObject_43 || (templateObject_43 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n color: ", ";\n display: flex;\n justify-content: center;\n max-width: 320px;\n overflow-wrap: break-word;\n padding: ", ";\n position: absolute;\n text-align: left;\n white-space: pre-wrap;\n width: max-content;\n word-break: keep-all;\n z-index: 400;\n ", "\n\n ", ";\n\n ", ";\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n color: ", ";\n display: flex;\n justify-content: center;\n max-width: 320px;\n overflow-wrap: break-word;\n padding: ", ";\n position: absolute;\n text-align: left;\n white-space: pre-wrap;\n width: max-content;\n word-break: keep-all;\n z-index: 400;\n ", "\n\n ", ";\n\n ", ";\n"])), function (_a) {
|
|
399
399
|
var theme = _a.theme;
|
|
400
|
-
return theme.
|
|
400
|
+
return theme.ui_cpnt_button_tooltip_base;
|
|
401
401
|
}, function (_a) {
|
|
402
402
|
var theme = _a.theme;
|
|
403
|
-
return theme.
|
|
404
|
-
}, function (_a) {
|
|
405
|
-
var theme = _a.theme;
|
|
406
|
-
return theme.boxShadow.elevation2;
|
|
407
|
-
}, function (_a) {
|
|
408
|
-
var theme = _a.theme;
|
|
409
|
-
return theme.ui_cpnt_textlabel_sys_secondary;
|
|
410
|
-
}, function (_a) {
|
|
411
|
-
var theme = _a.theme;
|
|
412
|
-
return theme.desktopFontSize.caption2;
|
|
413
|
-
}, function (_a) {
|
|
414
|
-
var theme = _a.theme;
|
|
415
|
-
return theme.fontWeight.normal;
|
|
403
|
+
return theme.spacing.spacingA;
|
|
416
404
|
}, function (_a) {
|
|
417
405
|
var theme = _a.theme;
|
|
418
|
-
return theme.
|
|
406
|
+
return theme.ui_cpnt_textlabel_button_tooltip;
|
|
419
407
|
}, function (_a) {
|
|
420
408
|
var theme = _a.theme;
|
|
421
|
-
return theme.spacing.
|
|
422
|
-
}, function (_a) {
|
|
409
|
+
return theme.spacing.spacingA + " " + theme.spacing.spacingB;
|
|
410
|
+
}, caption2Regular, function (_a) {
|
|
423
411
|
var isTooltipOpen = _a.isTooltipOpen;
|
|
424
412
|
return !isTooltipOpen && 'display: none';
|
|
425
413
|
}, function (_a) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { FillIconNameKeys, LineIconNameKeys, PDSTextType, UiColors } from '../../../common';
|
|
3
3
|
export declare type UploadIconButtonProps = {
|
|
4
4
|
fillType?: 'fill' | 'line';
|
|
5
|
-
shapeType?: 'circular' | 'rectangle';
|
|
5
|
+
shapeType?: 'circular' | 'rectangle' | 'round';
|
|
6
6
|
baseSize?: 'xxlarge' | 'large' | 'medium' | 'small' | 'xsmall';
|
|
7
7
|
baseColorKey?: UiColors;
|
|
8
8
|
borderColorKey?: UiColors;
|
|
@@ -137,15 +137,20 @@ var large = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 =
|
|
|
137
137
|
var medium = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n height: 40px;\n width: 40px;\n"], ["\n height: 40px;\n width: 40px;\n"])));
|
|
138
138
|
var small = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n height: 32px;\n width: 32px;\n"], ["\n height: 32px;\n width: 32px;\n"])));
|
|
139
139
|
var xsmall = (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n height: 24px;\n width: 24px;\n"], ["\n height: 24px;\n width: 24px;\n"])));
|
|
140
|
-
var
|
|
141
|
-
var
|
|
142
|
-
return
|
|
143
|
-
|
|
140
|
+
var roundStyle = (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), function (_a) {
|
|
141
|
+
var baseSize = _a.baseSize;
|
|
142
|
+
return baseSize &&
|
|
143
|
+
{ xxlarge: '24px', large: '14px', medium: '12px', small: '10px', xsmall: '8px' }[baseSize];
|
|
144
|
+
});
|
|
145
|
+
var S_UploadIconButton = styled_components_1.default.label(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n box-shadow: ", ";\n box-sizing: border-box;\n cursor: ", ";\n display: inline-flex;\n justify-content: center;\n ", ";\n\n ", ";\n\n ", ";\n"], ["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n box-shadow: ", ";\n box-sizing: border-box;\n cursor: ", ";\n display: inline-flex;\n justify-content: center;\n ", ";\n\n ", ";\n\n ", ";\n"])), function (_a) {
|
|
144
146
|
var theme = _a.theme, shadow = _a.shadow;
|
|
145
147
|
return shadow === 'visible' && theme.boxShadow.elevation2;
|
|
146
148
|
}, function (_a) {
|
|
147
149
|
var isDisabled = _a.isDisabled;
|
|
148
150
|
return (isDisabled ? 'default' : 'pointer');
|
|
151
|
+
}, function (_a) {
|
|
152
|
+
var shapeType = _a.shapeType;
|
|
153
|
+
return shapeType && { circular: 'border-radius: 50%', rectangle: '', round: roundStyle }[shapeType];
|
|
149
154
|
}, function (_a) {
|
|
150
155
|
var fillType = _a.fillType;
|
|
151
156
|
return fillType &&
|
|
@@ -164,7 +169,7 @@ var S_UploadIconButton = styled_components_1.default.label(templateObject_12 ||
|
|
|
164
169
|
xsmall: xsmall
|
|
165
170
|
}[baseSize];
|
|
166
171
|
});
|
|
167
|
-
var tooltipPositionSpacing = (0, styled_components_1.css)(
|
|
172
|
+
var tooltipPositionSpacing = (0, styled_components_1.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), function (_a) {
|
|
168
173
|
var baseSize = _a.baseSize;
|
|
169
174
|
return baseSize &&
|
|
170
175
|
{
|
|
@@ -175,13 +180,13 @@ var tooltipPositionSpacing = (0, styled_components_1.css)(templateObject_13 || (
|
|
|
175
180
|
xsmall: constants_1.TOOLTIP_POSITION_SPACING.xsmall
|
|
176
181
|
}[baseSize];
|
|
177
182
|
});
|
|
178
|
-
var tooltipLeftTop = (0, styled_components_1.css)(
|
|
179
|
-
var tooltipLeftBottom = (0, styled_components_1.css)(
|
|
180
|
-
var tooltipCenterTop = (0, styled_components_1.css)(
|
|
181
|
-
var tooltipCenterBottom = (0, styled_components_1.css)(
|
|
182
|
-
var tooltipRightTop = (0, styled_components_1.css)(
|
|
183
|
-
var tooltipRightBottom = (0, styled_components_1.css)(
|
|
184
|
-
var S_TooltipWrapper = styled_components_1.default.div(
|
|
183
|
+
var tooltipLeftTop = (0, styled_components_1.css)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n bottom: ", ";\n right: 0;\n"], ["\n bottom: ", ";\n right: 0;\n"])), tooltipPositionSpacing);
|
|
184
|
+
var tooltipLeftBottom = (0, styled_components_1.css)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n right: 0;\n top: ", ";\n"], ["\n right: 0;\n top: ", ";\n"])), tooltipPositionSpacing);
|
|
185
|
+
var tooltipCenterTop = (0, styled_components_1.css)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n bottom: ", ";\n"], ["\n bottom: ", ";\n"])), tooltipPositionSpacing);
|
|
186
|
+
var tooltipCenterBottom = (0, styled_components_1.css)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n top: ", ";\n"], ["\n top: ", ";\n"])), tooltipPositionSpacing);
|
|
187
|
+
var tooltipRightTop = (0, styled_components_1.css)(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n bottom: ", ";\n left: 0;\n"], ["\n bottom: ", ";\n left: 0;\n"])), tooltipPositionSpacing);
|
|
188
|
+
var tooltipRightBottom = (0, styled_components_1.css)(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n left: 0;\n top: ", ";\n"], ["\n left: 0;\n top: ", ";\n"])), tooltipPositionSpacing);
|
|
189
|
+
var S_TooltipWrapper = styled_components_1.default.div(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n padding: ", ";\n position: absolute;\n width: max-content;\n z-index: 400;\n\n ", ";\n\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n padding: ", ";\n position: absolute;\n width: max-content;\n z-index: 400;\n\n ", ";\n\n ", "\n"])), function (_a) {
|
|
185
190
|
var theme = _a.theme;
|
|
186
191
|
return theme.ui_cpnt_button_tooltip_base;
|
|
187
192
|
}, function (_a) {
|
|
@@ -206,4 +211,4 @@ var S_TooltipWrapper = styled_components_1.default.div(templateObject_20 || (tem
|
|
|
206
211
|
}[tooltipPosition];
|
|
207
212
|
});
|
|
208
213
|
exports.default = UploadIconButton;
|
|
209
|
-
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;
|
|
214
|
+
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;
|
|
@@ -39,11 +39,18 @@ var components_1 = require("../../../hybrid/components");
|
|
|
39
39
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
40
40
|
function BasicButtonGroup(_a) {
|
|
41
41
|
var _b = _a.size, size = _b === void 0 ? 'medium' : _b, valueArray = _a.valueArray, _c = _a.state, state = _c === void 0 ? 'normal' : _c;
|
|
42
|
+
var getColorKey = function (buttonState, iconColorTheme) {
|
|
43
|
+
if (state === 'disabled' || buttonState === 'disabled') {
|
|
44
|
+
return 'ui_cpnt_button_icon_disabled';
|
|
45
|
+
}
|
|
46
|
+
if (iconColorTheme === 'red') {
|
|
47
|
+
return 'ui_cpnt_button_icon_error';
|
|
48
|
+
}
|
|
49
|
+
return 'ui_cpnt_button_icon_enabled';
|
|
50
|
+
};
|
|
42
51
|
return ((0, jsx_runtime_1.jsx)(S_BasicButtonGroup, __assign({ "x-pds-name": "BasicButtonGroup", "x-pds-element-type": "component", "x-pds-device-type": "mobile" }, { children: valueArray.map(function (_a, index) {
|
|
43
|
-
var iconName = _a.iconName, _b = _a.iconFillType, iconFillType = _b === void 0 ? 'line' : _b, _c = _a.state, buttonState = _c === void 0 ? 'normal' : _c, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
|
|
44
|
-
return ((0, jsx_runtime_1.jsx)(S_BasicButton, __assign({ size: size, onClick: function (e) { return onClick && onClick(e); }, onMouseDown: function (e) { return onMouseDown && onMouseDown(e); }, disabled: state === 'disabled' || buttonState === 'disabled' }, { children: (0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, iconFillType: iconFillType, colorKey:
|
|
45
|
-
? 'ui_cpnt_button_icon_disabled'
|
|
46
|
-
: 'ui_cpnt_button_icon_enabled' }, void 0) }), iconName + index));
|
|
52
|
+
var iconName = _a.iconName, _b = _a.iconFillType, iconFillType = _b === void 0 ? 'line' : _b, _c = _a.state, buttonState = _c === void 0 ? 'normal' : _c, _d = _a.iconColorTheme, iconColorTheme = _d === void 0 ? 'none' : _d, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(S_BasicButton, __assign({ size: size, onClick: function (e) { return onClick && onClick(e); }, onMouseDown: function (e) { return onMouseDown && onMouseDown(e); }, disabled: state === 'disabled' || buttonState === 'disabled' }, { children: (0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, iconFillType: iconFillType, colorKey: getColorKey(buttonState, iconColorTheme) }, void 0) }), iconName + index));
|
|
47
54
|
}) }), void 0));
|
|
48
55
|
}
|
|
49
56
|
var S_BasicButtonGroup = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"], ["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"])), function (_a) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { PDSTextType
|
|
3
|
-
import type {
|
|
2
|
+
import type { PDSTextType } from '../../../common';
|
|
3
|
+
import type { ContextMenuItemValueOption } from '../../../common/types';
|
|
4
4
|
export declare type ContextMenuItemProps = {
|
|
5
|
-
option?:
|
|
5
|
+
option?: ContextMenuItemValueOption;
|
|
6
6
|
size?: 'large' | 'medium' | 'small';
|
|
7
7
|
isSelected?: boolean;
|
|
8
8
|
state?: 'normal' | 'disabled';
|
|
9
9
|
displayType?: 'text_only' | 'icon_only' | 'icon_text';
|
|
10
|
-
onClick?: (value:
|
|
10
|
+
onClick?: (value: ContextMenuItemValueOption | string | number | boolean) => void;
|
|
11
11
|
/** @deprecated option 필드를 대신 사용하세요. */
|
|
12
12
|
text?: PDSTextType;
|
|
13
13
|
/** @deprecated option 필드를 대신 사용하세요. */
|