pds-dev-kit-web-test 2.5.199 → 2.5.201
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/BringForward.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/BringForward.js +30 -0
- package/dist/src/common/assets/icons/fill/BringToFront.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/BringToFront.js +30 -0
- package/dist/src/common/assets/icons/fill/CheckboxIndeterminate.js +1 -1
- package/dist/src/common/assets/icons/fill/CheckboxOn.js +1 -1
- package/dist/src/common/assets/icons/fill/CloudDownload.js +1 -1
- package/dist/src/common/assets/icons/fill/Cut.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Cut.js +30 -0
- package/dist/src/common/assets/icons/fill/Developer.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Developer.js +30 -0
- package/dist/src/common/assets/icons/fill/Downloaded.js +1 -1
- package/dist/src/common/assets/icons/fill/Group.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Group.js +30 -0
- package/dist/src/common/assets/icons/fill/MenuHome.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/MenuHome.js +30 -0
- package/dist/src/common/assets/icons/fill/MoveBackward.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/MoveBackward.js +30 -0
- package/dist/src/common/assets/icons/fill/MoveForward.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/MoveForward.js +30 -0
- package/dist/src/common/assets/icons/fill/Paste.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Paste.js +30 -0
- package/dist/src/common/assets/icons/fill/PostPost.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/PostPost.js +30 -0
- package/dist/src/common/assets/icons/fill/PostSeries.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/PostSeries.js +30 -0
- package/dist/src/common/assets/icons/fill/SendBackward.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/SendBackward.js +30 -0
- package/dist/src/common/assets/icons/fill/SendToBack.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/SendToBack.js +30 -0
- package/dist/src/common/assets/icons/fill/ToggleDown.js +1 -1
- package/dist/src/common/assets/icons/fill/ToggleUp.js +1 -1
- package/dist/src/common/assets/icons/fill/Ungroup.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Ungroup.js +30 -0
- package/dist/src/common/assets/icons/fill/VideoEpisode.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/VideoEpisode.js +30 -0
- package/dist/src/common/assets/icons/fill/VideoSeries.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/VideoSeries.js +30 -0
- package/dist/src/common/assets/icons/fill/index.d.ts +16 -0
- package/dist/src/common/assets/icons/fill/index.js +33 -1
- package/dist/src/common/assets/icons/line/BookingCompleted.js +1 -1
- package/dist/src/common/assets/icons/line/BringForward.d.ts +4 -0
- package/dist/src/common/assets/icons/line/BringForward.js +30 -0
- package/dist/src/common/assets/icons/line/BringToFront.d.ts +4 -0
- package/dist/src/common/assets/icons/line/BringToFront.js +30 -0
- package/dist/src/common/assets/icons/line/Cut.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Cut.js +30 -0
- package/dist/src/common/assets/icons/line/Group.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Group.js +30 -0
- package/dist/src/common/assets/icons/line/Heart.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Heart.js +30 -0
- package/dist/src/common/assets/icons/line/MenuHome.d.ts +4 -0
- package/dist/src/common/assets/icons/line/MenuHome.js +30 -0
- package/dist/src/common/assets/icons/line/MoveBackward.d.ts +4 -0
- package/dist/src/common/assets/icons/line/MoveBackward.js +30 -0
- package/dist/src/common/assets/icons/line/MoveForward.d.ts +4 -0
- package/dist/src/common/assets/icons/line/MoveForward.js +30 -0
- package/dist/src/common/assets/icons/line/PageCollapse.d.ts +4 -0
- package/dist/src/common/assets/icons/line/PageCollapse.js +30 -0
- package/dist/src/common/assets/icons/line/Paste.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Paste.js +30 -0
- package/dist/src/common/assets/icons/line/PostPost.d.ts +4 -0
- package/dist/src/common/assets/icons/line/PostPost.js +30 -0
- package/dist/src/common/assets/icons/line/PostSeries.d.ts +4 -0
- package/dist/src/common/assets/icons/line/PostSeries.js +31 -0
- package/dist/src/common/assets/icons/line/SendBackward.d.ts +4 -0
- package/dist/src/common/assets/icons/line/SendBackward.js +30 -0
- package/dist/src/common/assets/icons/line/SendToBack.d.ts +4 -0
- package/dist/src/common/assets/icons/line/SendToBack.js +30 -0
- package/dist/src/common/assets/icons/line/Ungroup.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Ungroup.js +30 -0
- package/dist/src/common/assets/icons/line/VideoEpisode.d.ts +4 -0
- package/dist/src/common/assets/icons/line/VideoEpisode.js +30 -0
- package/dist/src/common/assets/icons/line/VideoSeries.d.ts +4 -0
- package/dist/src/common/assets/icons/line/VideoSeries.js +30 -0
- package/dist/src/common/assets/icons/line/index.d.ts +17 -0
- package/dist/src/common/assets/icons/line/index.js +35 -1
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +6 -1
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +6 -1
- package/dist/src/common/styles/colorSet/SemanticColor.json +4 -2
- package/dist/src/common/styles/colorSet/UIColor.json +13 -2
- package/dist/src/common/styles/colorSet/index.d.ts +25 -2
- package/dist/src/common/styles/colorSet/index.js +2 -2
- package/dist/src/common/styles/colorSet/ui-type.d.ts +11 -0
- package/dist/src/common/types/components.d.ts +5 -0
- package/dist/src/common/types/form.d.ts +6 -0
- package/dist/src/common/types/form.js +8 -0
- package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.d.ts +3 -2
- package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.js +33 -4
- package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.js +7 -7
- package/dist/src/desktop/components/DesktopAlertDialog/DesktopAlertDialog.js +9 -10
- package/dist/src/desktop/components/DesktopTabBar/DesktopTabBar.js +14 -8
- package/dist/src/desktop/components/Dropdown/Dropdown.js +14 -6
- package/dist/src/desktop/components/DynamicDesktopNavBar/DynamicDesktopNavBar.d.ts +1 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/DynamicDesktopNavBar.js +1 -1
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/UserProfile.d.ts +1 -0
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/UserProfile.js +2 -2
- package/dist/src/desktop/components/SegmentedButtonGroup/SegmentedButtonGroup.js +8 -6
- package/dist/src/desktop/components/Select/Select.d.ts +7 -2
- package/dist/src/desktop/components/Select/Select.js +90 -27
- package/dist/src/desktop/components/TextButton/TextButton.js +5 -5
- package/dist/src/desktop/components/TextField/TextField.d.ts +3 -28
- package/dist/src/desktop/components/TextField/TextField.js +5 -7
- package/dist/src/desktop/components/TextLabel/TextLabel.d.ts +1 -0
- package/dist/src/desktop/components/TextLabel/TextLabel.js +6 -3
- package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/variation/WSJ.js +2 -2
- package/dist/src/hybrid/components/Switch/Switch.d.ts +3 -1
- package/dist/src/hybrid/components/Switch/Switch.js +11 -5
- package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.d.ts +3 -2
- package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.js +33 -4
- package/dist/src/mobile/components/BasicButtonGroup/BasicButtonGroup.js +6 -4
- package/dist/src/mobile/components/Dropdown/Dropdown.js +14 -6
- package/dist/src/mobile/components/SegmentedButtonGroup/SegmentedButtonGroup.js +8 -6
- package/dist/src/mobile/components/Select/Select.d.ts +7 -2
- package/dist/src/mobile/components/Select/Select.js +87 -20
- package/dist/src/mobile/components/TextField/TextField.d.ts +3 -28
- package/dist/src/mobile/components/TextField/TextField.js +5 -7
- package/dist/src/sub/AdminList/ToolBar/SearchField.js +2 -2
- package/dist/src/sub/DynamicLayout/CompositionRenderer/ComponentBlockMatcher.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/CompositionRenderer/ComponentBlockMatcher.js +1 -1
- package/dist/src/sub/DynamicLayout/DynamicLayout.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/DynamicLayout.js +3 -2
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/fill/CheckboxIndeterminate.js +1 -1
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/fill/CheckboxOn.js +1 -1
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/fill/CloudDownload.js +1 -1
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/fill/Downloaded.js +1 -1
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/BookingCompleted.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +4 -10
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/IframeDenied.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/clsx.js +3 -2
- package/dist/src/sub/DynamicLayout/types.d.ts +1 -0
- package/package.json +7 -8
- package/release-note.md +2 -2
@@ -118,8 +118,10 @@ declare const colorSet: {
|
|
118
118
|
darkgrey20: string;
|
119
119
|
grey300: string;
|
120
120
|
darkgrey300: string;
|
121
|
+
yellow500: string;
|
122
|
+
darkyellow500: string;
|
121
123
|
};
|
122
|
-
readonly
|
124
|
+
readonly PaletteColor_light: {
|
123
125
|
sys_container_background_01: string;
|
124
126
|
sys_container_background_02: string;
|
125
127
|
sys_container_background_03: string;
|
@@ -480,8 +482,13 @@ declare const colorSet: {
|
|
480
482
|
sys_cpnt_sheet_base_15: string;
|
481
483
|
sys_cpnt_sheet_base_16: string;
|
482
484
|
sys_cpnt_sheet_base_17: string;
|
485
|
+
sys_component_base_47: string;
|
486
|
+
sys_cpnt_editor_undefined: string;
|
487
|
+
sys_cpnt_slider_track_active_undefined: string;
|
488
|
+
sys_cpnt_slider_thumb_normal_undefined: string;
|
489
|
+
sys_cpnt_editor_buttongroup_undefined: string;
|
483
490
|
};
|
484
|
-
readonly
|
491
|
+
readonly PaletteColor_Dark: {
|
485
492
|
sys_container_background_01: string;
|
486
493
|
sys_container_background_02: string;
|
487
494
|
sys_container_background_03: string;
|
@@ -842,6 +849,11 @@ declare const colorSet: {
|
|
842
849
|
sys_cpnt_sheet_base_15: string;
|
843
850
|
sys_cpnt_sheet_base_16: string;
|
844
851
|
sys_cpnt_sheet_base_17: string;
|
852
|
+
sys_component_base_47: string;
|
853
|
+
sys_cpnt_editor_undefined: string;
|
854
|
+
sys_cpnt_slider_track_active_undefined: string;
|
855
|
+
sys_cpnt_slider_thumb_normal_undefined: string;
|
856
|
+
sys_cpnt_editor_buttongroup_undefined: string;
|
845
857
|
};
|
846
858
|
readonly UIColor: {
|
847
859
|
ui_cpnt_button_fill_base_primary: string;
|
@@ -1711,6 +1723,17 @@ declare const colorSet: {
|
|
1711
1723
|
ui_126: string;
|
1712
1724
|
ui_127: string;
|
1713
1725
|
ui_128: string;
|
1726
|
+
ui_cpnt_sheet_base_27: string;
|
1727
|
+
ui_cpnt_editor_colorpicker_undefined: string;
|
1728
|
+
ui_cpnt_slider_track_active_undefined: string;
|
1729
|
+
ui_cpnt_slider_thumb_normal_undefined: string;
|
1730
|
+
ui_cpnt_editor_buttongroup_undefined: string;
|
1731
|
+
ui_cpnt_editor_thumbpreview_undefined: string;
|
1732
|
+
ui_cpnt_dropdown_text_darktheme_hinttext: string;
|
1733
|
+
ui_cpnt_select_dropdown_border_error: string;
|
1734
|
+
ui_cpnt_select_dropdown_text_error: string;
|
1735
|
+
ui_cpnt_select_dropdown_text_darktheme_error: string;
|
1736
|
+
ui_cpnt_select_dropdown_border_darktheme_error: string;
|
1714
1737
|
};
|
1715
1738
|
};
|
1716
1739
|
export default colorSet;
|
@@ -5,13 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
/* eslint-disable import/order */
|
7
7
|
var SemanticColor_json_1 = __importDefault(require("./SemanticColor.json"));
|
8
|
-
var PaletteColor_Dark_json_1 = __importDefault(require("./PaletteColor_Dark.json"));
|
9
8
|
var PaletteColor_light_json_1 = __importDefault(require("./PaletteColor_light.json"));
|
9
|
+
var PaletteColor_Dark_json_1 = __importDefault(require("./PaletteColor_Dark.json"));
|
10
10
|
var UIColor_json_1 = __importDefault(require("./UIColor.json"));
|
11
11
|
var colorSet = {
|
12
12
|
SemanticColor: SemanticColor_json_1.default,
|
13
|
-
PaletteColor_Dark: PaletteColor_Dark_json_1.default,
|
14
13
|
PaletteColor_light: PaletteColor_light_json_1.default,
|
14
|
+
PaletteColor_Dark: PaletteColor_Dark_json_1.default,
|
15
15
|
UIColor: UIColor_json_1.default
|
16
16
|
};
|
17
17
|
exports.default = colorSet;
|
@@ -866,4 +866,15 @@ export interface UITheme {
|
|
866
866
|
ui_126: string;
|
867
867
|
ui_127: string;
|
868
868
|
ui_128: string;
|
869
|
+
ui_cpnt_sheet_base_27: string;
|
870
|
+
ui_cpnt_editor_colorpicker_undefined: string;
|
871
|
+
ui_cpnt_slider_track_active_undefined: string;
|
872
|
+
ui_cpnt_slider_thumb_normal_undefined: string;
|
873
|
+
ui_cpnt_editor_buttongroup_undefined: string;
|
874
|
+
ui_cpnt_editor_thumbpreview_undefined: string;
|
875
|
+
ui_cpnt_dropdown_text_darktheme_hinttext: string;
|
876
|
+
ui_cpnt_select_dropdown_border_error: string;
|
877
|
+
ui_cpnt_select_dropdown_text_error: string;
|
878
|
+
ui_cpnt_select_dropdown_text_darktheme_error: string;
|
879
|
+
ui_cpnt_select_dropdown_border_darktheme_error: string;
|
869
880
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { PDSIconType } from './icon';
|
2
2
|
import type { IconCaseTooltipPositionType } from './systemUI';
|
3
3
|
import type { PDSTextType } from './text';
|
4
|
+
import type { UiColors } from './uiColors';
|
4
5
|
import type { ForwardedRef } from 'react';
|
5
6
|
export type PDSValueOption = {
|
6
7
|
text: PDSTextType;
|
@@ -10,6 +11,8 @@ export type PDSTabItemOption = {
|
|
10
11
|
title: PDSTextType;
|
11
12
|
isActive: boolean;
|
12
13
|
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
14
|
+
disabled?: boolean;
|
15
|
+
tooltipText?: PDSTextType;
|
13
16
|
};
|
14
17
|
export type ContextMenuItemValueOption = {
|
15
18
|
text?: PDSTextType;
|
@@ -38,6 +41,7 @@ export type BasicButtonGroupValueOption = {
|
|
38
41
|
tooltipText?: PDSTextType;
|
39
42
|
tooltipPosition?: IconCaseTooltipPositionType;
|
40
43
|
iconColorTheme?: 'none' | 'red';
|
44
|
+
backgroundColorTheme?: UiColors;
|
41
45
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
42
46
|
onMouseDown?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
43
47
|
};
|
@@ -46,6 +50,7 @@ export type SegmentedButtonGroupValueOption = Pick<PDSValueOption, 'value'> & {
|
|
46
50
|
iconFillType?: 'fill' | 'line';
|
47
51
|
state?: 'normal' | 'disabled';
|
48
52
|
iconColorTheme?: 'none' | 'red';
|
53
|
+
backgroundColorTheme?: UiColors;
|
49
54
|
tooltipText?: PDSTextType;
|
50
55
|
tooltipPosition?: IconCaseTooltipPositionType;
|
51
56
|
};
|
@@ -1,2 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getErrorByName = void 0;
|
4
|
+
/**
|
5
|
+
* 중첩된 객체 구조에서 점(.)으로 구분된 경로를 통해 에러 객체를 조회합니다
|
6
|
+
*/
|
7
|
+
var getErrorByName = function (errors, name) {
|
8
|
+
return name.split('.').reduce(function (errors, property) { return errors && errors[property]; }, errors);
|
9
|
+
};
|
10
|
+
exports.getErrorByName = getErrorByName;
|
@@ -11,11 +11,12 @@ export type TextFieldBaseProps = {
|
|
11
11
|
};
|
12
12
|
preventBlankMode?: 'none' | 'trim' | 'all';
|
13
13
|
enterSubmitMode?: 'none' | 'use';
|
14
|
-
textLineType
|
14
|
+
textLineType?: 'single' | 'multi' | 'auto';
|
15
15
|
multiRows?: number;
|
16
16
|
autoMinRows?: number;
|
17
17
|
autoMaxRows?: number;
|
18
18
|
inputType?: string;
|
19
|
+
inputMode?: string;
|
19
20
|
state?: 'normal' | 'read_only' | 'disabled';
|
20
21
|
colorTheme?: 'none' | 'dark' | 'transparent';
|
21
22
|
min?: number;
|
@@ -46,5 +47,5 @@ export type TextFieldBaseProps = {
|
|
46
47
|
inputRef?: any;
|
47
48
|
[x: string]: any;
|
48
49
|
} & Record<string, any>;
|
49
|
-
declare function TextFieldBase({ name, hintText, defaultText, textAlign, validation, preventBlankMode, enterSubmitMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, colorTheme, min, max, maxLength, textSize, textWeight, fieldPaddingRight, fieldPaddingLeft, fieldHeight, deleteIconMode, deleteIconSize, deleteIconColor, suffixText, suffixTextRightSpacingMode, isFocused, autoComplete, stepperMode, stepperRightSpacing, innerSpinButtonSize, step, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onTarget, inputRef, ...rest }: TextFieldBaseProps): JSX.Element;
|
50
|
+
declare function TextFieldBase({ name, hintText, defaultText, textAlign, validation, preventBlankMode, enterSubmitMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, inputMode, state, colorTheme, min, max, maxLength, textSize, textWeight, fieldPaddingRight, fieldPaddingLeft, fieldHeight, deleteIconMode, deleteIconSize, deleteIconColor, suffixText, suffixTextRightSpacingMode, isFocused, autoComplete, stepperMode, stepperRightSpacing, innerSpinButtonSize, step, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onTarget, inputRef, ...rest }: TextFieldBaseProps): JSX.Element;
|
50
51
|
export default TextFieldBase;
|
@@ -61,7 +61,7 @@ var common_1 = require("../../../../common");
|
|
61
61
|
var IconButton_1 = require("../../../components/IconButton");
|
62
62
|
var constants_1 = require("./constants");
|
63
63
|
function TextFieldBase(_a) {
|
64
|
-
var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, _b = _a.textAlign, textAlign = _b === void 0 ? 'left' : _b, validation = _a.validation, _c = _a.preventBlankMode, preventBlankMode = _c === void 0 ? 'none' : _c, _d = _a.enterSubmitMode, enterSubmitMode = _d === void 0 ? 'none' : _d, _e = _a.textLineType, textLineType = _e === void 0 ? 'single' : _e, multiRows = _a.multiRows, autoMinRows = _a.autoMinRows, autoMaxRows = _a.autoMaxRows, _f = _a.inputType, inputType = _f === void 0 ? 'text' : _f, _g = _a.state, state = _g === void 0 ? 'normal' : _g, _h = _a.colorTheme, colorTheme = _h === void 0 ? 'none' : _h, min = _a.min, max = _a.max, _j = _a.maxLength, maxLength = _j === void 0 ? Infinity : _j, _k = _a.textSize, textSize = _k === void 0 ? 'form2' : _k, _l = _a.textWeight, textWeight = _l === void 0 ? 'normal' : _l, fieldPaddingRight = _a.fieldPaddingRight, fieldPaddingLeft = _a.fieldPaddingLeft, _m = _a.fieldHeight, fieldHeight = _m === void 0 ? 48 : _m, _o = _a.deleteIconMode, deleteIconMode = _o === void 0 ? 'use' : _o, _p = _a.deleteIconSize, deleteIconSize = _p === void 0 ? 20 : _p, _q = _a.deleteIconColor, deleteIconColor = _q === void 0 ? 'ui_cpnt_button_icon_disabled' : _q, suffixText = _a.suffixText, _r = _a.suffixTextRightSpacingMode, suffixTextRightSpacingMode = _r === void 0 ? 'none' : _r, isFocused = _a.isFocused, _s = _a.autoComplete, autoComplete = _s === void 0 ? 'on' : _s, _t = _a.stepperMode, stepperMode = _t === void 0 ? 'none' : _t, _u = _a.stepperRightSpacing, stepperRightSpacing = _u === void 0 ? 1 : _u, _v = _a.innerSpinButtonSize, innerSpinButtonSize = _v === void 0 ? 16 : _v, step = _a.step, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, onKeyDown = _a.onKeyDown, onKeyUp = _a.onKeyUp, onTarget = _a.onTarget, inputRef = _a.inputRef, rest = __rest(_a, ["name", "hintText", "defaultText", "textAlign", "validation", "preventBlankMode", "enterSubmitMode", "textLineType", "multiRows", "autoMinRows", "autoMaxRows", "inputType", "state", "colorTheme", "min", "max", "maxLength", "textSize", "textWeight", "fieldPaddingRight", "fieldPaddingLeft", "fieldHeight", "deleteIconMode", "deleteIconSize", "deleteIconColor", "suffixText", "suffixTextRightSpacingMode", "isFocused", "autoComplete", "stepperMode", "stepperRightSpacing", "innerSpinButtonSize", "step", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "onTarget", "inputRef"]);
|
64
|
+
var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, _b = _a.textAlign, textAlign = _b === void 0 ? 'left' : _b, validation = _a.validation, _c = _a.preventBlankMode, preventBlankMode = _c === void 0 ? 'none' : _c, _d = _a.enterSubmitMode, enterSubmitMode = _d === void 0 ? 'none' : _d, _e = _a.textLineType, textLineType = _e === void 0 ? 'single' : _e, multiRows = _a.multiRows, autoMinRows = _a.autoMinRows, autoMaxRows = _a.autoMaxRows, _f = _a.inputType, inputType = _f === void 0 ? 'text' : _f, inputMode = _a.inputMode, _g = _a.state, state = _g === void 0 ? 'normal' : _g, _h = _a.colorTheme, colorTheme = _h === void 0 ? 'none' : _h, min = _a.min, max = _a.max, _j = _a.maxLength, maxLength = _j === void 0 ? Infinity : _j, _k = _a.textSize, textSize = _k === void 0 ? 'form2' : _k, _l = _a.textWeight, textWeight = _l === void 0 ? 'normal' : _l, fieldPaddingRight = _a.fieldPaddingRight, fieldPaddingLeft = _a.fieldPaddingLeft, _m = _a.fieldHeight, fieldHeight = _m === void 0 ? 48 : _m, _o = _a.deleteIconMode, deleteIconMode = _o === void 0 ? 'use' : _o, _p = _a.deleteIconSize, deleteIconSize = _p === void 0 ? 20 : _p, _q = _a.deleteIconColor, deleteIconColor = _q === void 0 ? 'ui_cpnt_button_icon_disabled' : _q, suffixText = _a.suffixText, _r = _a.suffixTextRightSpacingMode, suffixTextRightSpacingMode = _r === void 0 ? 'none' : _r, isFocused = _a.isFocused, _s = _a.autoComplete, autoComplete = _s === void 0 ? 'on' : _s, _t = _a.stepperMode, stepperMode = _t === void 0 ? 'none' : _t, _u = _a.stepperRightSpacing, stepperRightSpacing = _u === void 0 ? 1 : _u, _v = _a.innerSpinButtonSize, innerSpinButtonSize = _v === void 0 ? 16 : _v, step = _a.step, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, onKeyDown = _a.onKeyDown, onKeyUp = _a.onKeyUp, onTarget = _a.onTarget, inputRef = _a.inputRef, rest = __rest(_a, ["name", "hintText", "defaultText", "textAlign", "validation", "preventBlankMode", "enterSubmitMode", "textLineType", "multiRows", "autoMinRows", "autoMaxRows", "inputType", "inputMode", "state", "colorTheme", "min", "max", "maxLength", "textSize", "textWeight", "fieldPaddingRight", "fieldPaddingLeft", "fieldHeight", "deleteIconMode", "deleteIconSize", "deleteIconColor", "suffixText", "suffixTextRightSpacingMode", "isFocused", "autoComplete", "stepperMode", "stepperRightSpacing", "innerSpinButtonSize", "step", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "onTarget", "inputRef"]);
|
65
65
|
var _w = (0, react_hook_form_1.useFormContext)(), register = _w.register, setValue = _w.setValue, getValues = _w.getValues, clearErrors = _w.clearErrors;
|
66
66
|
var timeout;
|
67
67
|
var suffixTextRef = (0, react_1.useRef)(null);
|
@@ -104,6 +104,28 @@ function TextFieldBase(_a) {
|
|
104
104
|
checkMaxLength(e);
|
105
105
|
}
|
106
106
|
}
|
107
|
+
function handleKeyPress(e) {
|
108
|
+
if (textLineType === 'single' && inputType === 'number' && inputMode === 'numeric') {
|
109
|
+
handleNumericKeypress(e);
|
110
|
+
}
|
111
|
+
}
|
112
|
+
/**
|
113
|
+
* 제어키(31 이하) 또는 숫자(0-9)만 입력 허용하는 키보드 이벤트 핸들러
|
114
|
+
* 제어키 예시: Backspace(8), Tab(9), Enter(13)
|
115
|
+
*/
|
116
|
+
var handleNumericKeypress = function (e) {
|
117
|
+
// 제어키(31 이하)는 허용
|
118
|
+
var CONTROL_KEY_CODE = 31;
|
119
|
+
var code = e.which || e.keyCode;
|
120
|
+
if (code <= CONTROL_KEY_CODE) {
|
121
|
+
return;
|
122
|
+
}
|
123
|
+
// 숫자가 아니면 이벤트 중단
|
124
|
+
var char = String.fromCharCode(code);
|
125
|
+
if (!/^\d*$/.test(char)) {
|
126
|
+
e.preventDefault();
|
127
|
+
}
|
128
|
+
};
|
107
129
|
function handleChange(e) {
|
108
130
|
// NOTE: preventBlankMode는 input에만 적용 가능
|
109
131
|
// NOTE: preventBlankMode === 'all'일 경우에는 무조건 onChange 시점에 적용
|
@@ -113,6 +135,13 @@ function TextFieldBase(_a) {
|
|
113
135
|
e.target.value = value.replace(/ /g, '');
|
114
136
|
}
|
115
137
|
}
|
138
|
+
// 숫자만 필터링
|
139
|
+
if (textLineType === 'single' && inputType === 'number' && inputMode === 'numeric') {
|
140
|
+
var value = e.target.value;
|
141
|
+
if (!/^\d*$/.test(value)) {
|
142
|
+
e.target.value = value.replace(/\D/g, '');
|
143
|
+
}
|
144
|
+
}
|
116
145
|
if (onChange) {
|
117
146
|
onChange(e);
|
118
147
|
}
|
@@ -197,7 +226,7 @@ function TextFieldBase(_a) {
|
|
197
226
|
}
|
198
227
|
var S_TextFieldBase = function () {
|
199
228
|
if (textLineType === 'single') {
|
200
|
-
return ((0, jsx_runtime_1.jsxs)(S_InputWrapper, { children: [stepperMode === 'use' && ((0, jsx_runtime_1.jsxs)(S_IconBox, __assign({ innerSpinButtonSize: innerSpinButtonSize, isFocused: isFocused, stepperRightSpacing: stepperRightSpacing }, { children: [(0, jsx_runtime_1.jsx)(components_2.Icon, { iconName: "ic_arrow_up_stepper", fillType: "fill", size: innerSpinButtonSize }), (0, jsx_runtime_1.jsx)(components_2.Icon, { iconName: "ic_arrow_down_stepper", fillType: "fill", size: innerSpinButtonSize })] }))), (0, jsx_runtime_1.jsx)(S_Input, __assign({}, register(name, validation), rest, { name: name, defaultValue: defaultText, placeholder: hintText, textAlign: textAlign, type: inputType, state: state, readOnly: state === 'read_only', disabled: state === 'disabled', maxLength: maxLength, textSize: textSize, textWeight: textWeight, fieldPaddingRight: fieldPaddingRight, fieldPaddingLeft: fieldPaddingLeft, colorTheme: colorTheme, min: min, max: max, autoComplete: autoComplete, stepperMode: stepperMode, innerSpinButtonSize: innerSpinButtonSize, step: step, deleteIconMode: deleteIconMode, suffixText: suffixText, suffixTextWidth: suffixTextWidth, stepperRightSpacing: stepperRightSpacing, isFocused: isFocused, onFocus: handleFocus, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: function (e) {
|
229
|
+
return ((0, jsx_runtime_1.jsxs)(S_InputWrapper, { children: [stepperMode === 'use' && ((0, jsx_runtime_1.jsxs)(S_IconBox, __assign({ innerSpinButtonSize: innerSpinButtonSize, isFocused: isFocused, stepperRightSpacing: stepperRightSpacing }, { children: [(0, jsx_runtime_1.jsx)(components_2.Icon, { iconName: "ic_arrow_up_stepper", fillType: "fill", size: innerSpinButtonSize }), (0, jsx_runtime_1.jsx)(components_2.Icon, { iconName: "ic_arrow_down_stepper", fillType: "fill", size: innerSpinButtonSize })] }))), (0, jsx_runtime_1.jsx)(S_Input, __assign({}, register(name, validation), rest, { name: name, defaultValue: defaultText, placeholder: hintText, textAlign: textAlign, type: inputType, inputMode: inputMode, state: state, readOnly: state === 'read_only', disabled: state === 'disabled', maxLength: maxLength, textSize: textSize, textWeight: textWeight, fieldPaddingRight: fieldPaddingRight, fieldPaddingLeft: fieldPaddingLeft, colorTheme: colorTheme, min: min, max: max, autoComplete: autoComplete, stepperMode: stepperMode, innerSpinButtonSize: innerSpinButtonSize, step: step, deleteIconMode: deleteIconMode, suffixText: suffixText, suffixTextWidth: suffixTextWidth, stepperRightSpacing: stepperRightSpacing, isFocused: isFocused, onFocus: handleFocus, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onKeyPress: handleKeyPress, ref: function (e) {
|
201
230
|
ref(e);
|
202
231
|
if (inputRef) {
|
203
232
|
inputRef.current = e;
|
@@ -205,7 +234,7 @@ function TextFieldBase(_a) {
|
|
205
234
|
} })), (deleteIconMode === 'use' || suffixText) && ((0, jsx_runtime_1.jsxs)(S_RightBox, __assign({ deleteIconMode: deleteIconMode, stepperMode: stepperMode, suffixText: suffixText, innerSpinButtonSize: innerSpinButtonSize }, { children: [deleteIconMode === 'use' && ((0, jsx_runtime_1.jsx)(S_IconButtonWrapper, __assign({ innerSpinButtonSize: innerSpinButtonSize, deleteIconMode: deleteIconMode, stepperMode: stepperMode, suffixText: suffixText, isFocused: isFocused, suffixTextWidth: suffixTextWidth, stepperRightSpacing: stepperRightSpacing }, { children: isFocused && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: "ic_delete", baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: deleteIconSize, iconColorKey: deleteIconColor, iconFillType: "fill", state: state === 'disabled' ? 'disabled' : 'normal', tabIndex: -1, onMouseDown: deleteValue })) }))), suffixText && ((0, jsx_runtime_1.jsxs)(S_SuffixTextBox, __assign({ ref: suffixTextRef }, { children: [(0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_b", spacingType: "width" }), (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: suffixText, styleTheme: "caption1Bold", colorTheme: "sysTextTertiary", colorOverride: stepperMode === 'use' && isFocused ? 'ui_106' : undefined, textAlign: "right", singleLineMode: "use" }), suffixTextRightSpacingMode === 'use' && ((0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_b", spacingType: "width" }))] })))] })))] }));
|
206
235
|
}
|
207
236
|
if (textLineType === 'multi') {
|
208
|
-
return ((0, jsx_runtime_1.jsx)(S_Multi, __assign({}, register(name, validation), rest, { name: name, defaultValue: defaultText, placeholder: hintText, textAlign: textAlign, state: state, readOnly: state === 'read_only' && true, disabled: state === 'disabled' && true, maxLength: maxLength, rows: multiRows, textSize: textSize, textWeight: textWeight, fieldPaddingRight: fieldPaddingRight, fieldPaddingLeft: fieldPaddingLeft, colorTheme: colorTheme, autoComplete: autoComplete, onFocus: handleFocus, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: function (e) {
|
237
|
+
return ((0, jsx_runtime_1.jsx)(S_Multi, __assign({}, register(name, validation), rest, { name: name, defaultValue: defaultText, placeholder: hintText, textAlign: textAlign, state: state, readOnly: state === 'read_only' && true, disabled: state === 'disabled' && true, maxLength: maxLength, rows: multiRows, textSize: textSize, textWeight: textWeight, fieldPaddingRight: fieldPaddingRight, fieldPaddingLeft: fieldPaddingLeft, colorTheme: colorTheme, autoComplete: autoComplete, onFocus: handleFocus, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onKeyPress: handleKeyPress, ref: function (e) {
|
209
238
|
ref(e);
|
210
239
|
if (inputRef) {
|
211
240
|
inputRef.current = e;
|
@@ -213,7 +242,7 @@ function TextFieldBase(_a) {
|
|
213
242
|
} })));
|
214
243
|
}
|
215
244
|
if (textLineType === 'auto') {
|
216
|
-
return ((0, jsx_runtime_1.jsx)(S_Auto, __assign({}, refRest, rest, { name: name, defaultValue: defaultText, placeholder: hintText, textAlign: textAlign, autoMinRows: autoMinRows, autoMaxRows: autoMaxRows, state: state, readOnly: state === 'read_only' && true, disabled: state === 'disabled' && true, maxLength: maxLength, textSize: textSize, textWeight: textWeight, fieldPaddingRight: fieldPaddingRight, fieldPaddingLeft: fieldPaddingLeft, fieldHeight: fieldHeight, colorTheme: colorTheme, autoComplete: autoComplete, onFocus: handleFocus, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: function (e) {
|
245
|
+
return ((0, jsx_runtime_1.jsx)(S_Auto, __assign({}, refRest, rest, { name: name, defaultValue: defaultText, placeholder: hintText, textAlign: textAlign, autoMinRows: autoMinRows, autoMaxRows: autoMaxRows, state: state, readOnly: state === 'read_only' && true, disabled: state === 'disabled' && true, maxLength: maxLength, textSize: textSize, textWeight: textWeight, fieldPaddingRight: fieldPaddingRight, fieldPaddingLeft: fieldPaddingLeft, fieldHeight: fieldHeight, colorTheme: colorTheme, autoComplete: autoComplete, onFocus: handleFocus, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onKeyPress: handleKeyPress, ref: function (e) {
|
217
246
|
ref(e);
|
218
247
|
if (textAreaRef) {
|
219
248
|
textAreaRef.current = e;
|
@@ -93,7 +93,7 @@ function BasicButtonGroup(_a) {
|
|
93
93
|
return 'ui_cpnt_button_icon_enabled';
|
94
94
|
};
|
95
95
|
return ((0, jsx_runtime_1.jsx)(S_BasicButtonGroup, __assign({ "x-pds-name": "BasicButtonGroup", "x-pds-element-type": "component", "x-pds-device-type": "desktop", ref: tooltipPositionTargetRef }, { children: valueArray.map(function (_a, index) {
|
96
|
-
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, tooltipText = _a.tooltipText, _d = _a.tooltipPosition, tooltipPosition = _d === void 0 ? 'bottom' : _d, _e = _a.iconColorTheme, iconColorTheme = _e === void 0 ? 'none' : _e;
|
96
|
+
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, tooltipText = _a.tooltipText, _d = _a.tooltipPosition, tooltipPosition = _d === void 0 ? 'bottom' : _d, _e = _a.iconColorTheme, iconColorTheme = _e === void 0 ? 'none' : _e, _f = _a.backgroundColorTheme, backgroundColorTheme = _f === void 0 ? 'ui_cpnt_basicbuttongroup_base_default' : _f;
|
97
97
|
var tooltipPositionCss = (0, SystemUIPositionGenerator_1.hoverTypeSystemUICssGenerator)({
|
98
98
|
baseSize: constants_1.ICON_BUTTON_SIZE[size],
|
99
99
|
sizeOffset: tooltipSizeOffset,
|
@@ -103,11 +103,9 @@ function BasicButtonGroup(_a) {
|
|
103
103
|
: "center_".concat(tooltipPosition)
|
104
104
|
});
|
105
105
|
var isHoveredButton = index === hoveredButtonIndex;
|
106
|
-
return ((0, jsx_runtime_1.jsxs)(S_BasicButton, __assign({ size: size, onClick: function (e) { return onClick && onClick(e); }, onMouseDown: function (e) { return onMouseDown && onMouseDown(e); }, onPointerEnter: function () { return setHoveredButtonIndex(index); }, onPointerLeave: function () { return setHoveredButtonIndex(null); }, disabled: state === 'disabled' || buttonState === 'disabled' }, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, fillType: iconFillType, colorKey: getColorKey(buttonState, iconColorTheme) }), tooltipText &&
|
106
|
+
return ((0, jsx_runtime_1.jsxs)(S_BasicButton, __assign({ size: size, onClick: function (e) { return onClick && onClick(e); }, onMouseDown: function (e) { return onMouseDown && onMouseDown(e); }, onPointerEnter: function () { return setHoveredButtonIndex(index); }, onPointerLeave: function () { return setHoveredButtonIndex(null); }, disabled: state === 'disabled' || buttonState === 'disabled', backgroundColorTheme: backgroundColorTheme }, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, fillType: iconFillType, colorKey: getColorKey(buttonState, iconColorTheme) }), tooltipText &&
|
107
107
|
isHoveredButton &&
|
108
|
-
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", ref: tooltipRef, tooltipPositionCss: tooltipPositionCss, size: size }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, colorOverride: "ui_cpnt_textlabel_button_tooltip", styleTheme: "caption2Regular", colorTheme: "sysTextSecondary" }) })),
|
109
|
-
// document.getElementById('tooltip-root') as HTMLElement
|
110
|
-
document.body)] }), iconName + index));
|
108
|
+
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", ref: tooltipRef, tooltipPositionCss: tooltipPositionCss, size: size }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, colorOverride: "ui_cpnt_textlabel_button_tooltip", styleTheme: "caption2Regular", colorTheme: "sysTextSecondary" }) })), document.getElementById('tooltip-root'))] }), iconName + index));
|
111
109
|
}) })));
|
112
110
|
}
|
113
111
|
var S_BasicButtonGroup = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"], ["\n align-items: center;\n display: flex;\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"])), function (_a) {
|
@@ -118,8 +116,10 @@ var large = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 =
|
|
118
116
|
var medium = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 12px;\n height: 40px;\n width: 40px;\n"], ["\n border-radius: 12px;\n height: 40px;\n width: 40px;\n"])));
|
119
117
|
var small = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border-radius: 10px;\n height: 32px;\n width: 32px;\n"], ["\n border-radius: 10px;\n height: 32px;\n width: 32px;\n"])));
|
120
118
|
var S_BasicButton = styled_components_1.default.button(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border: none;\n display: inline-flex;\n justify-content: center;\n position: relative;\n\n ", ";\n\n &::before {\n background-color: transparent;\n border-radius: inherit;\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n &:hover:enabled:before {\n background-color: ", ";\n }\n\n &:active:enabled:before {\n background-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: default;\n }\n"], ["\n align-items: center;\n background-color: ", ";\n border: none;\n display: inline-flex;\n justify-content: center;\n position: relative;\n\n ", ";\n\n &::before {\n background-color: transparent;\n border-radius: inherit;\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n &:hover:enabled:before {\n background-color: ", ";\n }\n\n &:active:enabled:before {\n background-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: default;\n }\n"])), function (_a) {
|
121
|
-
var theme = _a.theme;
|
122
|
-
return
|
119
|
+
var theme = _a.theme, backgroundColorTheme = _a.backgroundColorTheme;
|
120
|
+
return backgroundColorTheme
|
121
|
+
? theme[backgroundColorTheme]
|
122
|
+
: theme.ui_cpnt_basicbuttongroup_base_default;
|
123
123
|
}, function (_a) {
|
124
124
|
var size = _a.size;
|
125
125
|
return size && { large: large, medium: medium, small: small }[size];
|
@@ -53,7 +53,7 @@ function DesktopAlertDialog(_a) {
|
|
53
53
|
var btn3Mode = ['tbtn_amount3'];
|
54
54
|
var icon = function () {
|
55
55
|
if (iconMode !== 'none') {
|
56
|
-
return ((0, jsx_runtime_1.jsxs)(
|
56
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [iconMode === 'success' && ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { iconName: "ic_success", size: 72, colorKey: "ui_cpnt_alertdialog_icon_success" })), iconMode === 'error' && ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { iconName: "ic_error", size: 72, colorKey: "ui_cpnt_alertdialog_icon_error" })), iconMode === 'warning' && ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { iconName: "ic_warning", size: 72, colorKey: "ui_cpnt_alertdialog_icon_warning" })), iconMode === 'information' && ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { iconName: "ic_information", size: 72, colorKey: "ui_cpnt_alertdialog_icon_information" }))] }));
|
57
57
|
}
|
58
58
|
};
|
59
59
|
return react_dom_1.default.createPortal((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(S_ModalOverlay, {}), (0, jsx_runtime_1.jsxs)(S_ModalWrapper, __assign({ "x-pds-name": "DesktopAlertDialog", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, { children: [(0, jsx_runtime_1.jsxs)(S_UpperBox, { children: [icon(), iconMode !== 'none' && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_d", spacingType: "width" }), (0, jsx_runtime_1.jsxs)(S_TextBox, { children: [titleText && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: titleText, colorTheme: "sysTextPrimary", styleTheme: "leadParaBold" })), titleText && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_c" }), contentText && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: contentText, colorTheme: "sysTextPrimary", styleTheme: "body1Regular" }))] })] }), (0, jsx_runtime_1.jsxs)(S_Footer, { children: [btn3Mode.includes(btnMode) && tBtn3Text && ((0, jsx_runtime_1.jsx)(TextButton_1.TextButton, { text: tBtn3Text, state: tBtn3State, type: tBtn3Type, size: "large", onClick: onClickTBtn3, colorTheme: "grey_01" })), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }), btn2Mode.includes(btnMode) && tBtn2Text && ((0, jsx_runtime_1.jsx)(TextButton_1.TextButton, { text: tBtn2Text, state: tBtn2State, type: tBtn2Type, size: "large", onClick: onClickTBtn2, colorTheme: "grey_01" })), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }), btn1Mode.includes(btnMode) && tBtn1Text && ((0, jsx_runtime_1.jsx)(TextButton_1.TextButton, { text: tBtn1Text, state: tBtn1State, type: tBtn1Type, size: "large", onClick: onClickTBtn1, onKeyDown: function (e) { return handleKeyDown(e); } }))] })] }))] }), container);
|
@@ -62,13 +62,12 @@ var S_UpperBox = styled_components_1.default.div(templateObject_1 || (templateOb
|
|
62
62
|
var theme = _a.theme;
|
63
63
|
return theme.spacing.spacingE;
|
64
64
|
});
|
65
|
-
var
|
66
|
-
var
|
67
|
-
var S_ModalOverlay = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background-color: ", ";\n height: 100vh;\n left: 0;\n position: fixed;\n top: 0;\n width: 100vw;\n\n ", "\n"], ["\n background-color: ", ";\n height: 100vh;\n left: 0;\n position: fixed;\n top: 0;\n width: 100vw;\n\n ", "\n"])), function (_a) {
|
65
|
+
var S_TextBox = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
66
|
+
var S_ModalOverlay = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n height: 100vh;\n left: 0;\n position: fixed;\n top: 0;\n width: 100vw;\n\n ", "\n"], ["\n background-color: ", ";\n height: 100vh;\n left: 0;\n position: fixed;\n top: 0;\n width: 100vw;\n\n ", "\n"])), function (_a) {
|
68
67
|
var theme = _a.theme;
|
69
68
|
return theme.ui_cpnt_alertdialog_dimmed;
|
70
69
|
}, animationStyle_1.dialogOverlayOnAni);
|
71
|
-
var S_ModalWrapper = styled_components_1.default.div(
|
70
|
+
var S_ModalWrapper = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 24px;\n box-shadow: ", ";\n box-sizing: border-box;\n left: 50%;\n max-width: 560px;\n min-width: 480px;\n position: fixed;\n top: 50%;\n transform: translate(-50%, -50%);\n width: auto;\n\n ", "\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 24px;\n box-shadow: ", ";\n box-sizing: border-box;\n left: 50%;\n max-width: 560px;\n min-width: 480px;\n position: fixed;\n top: 50%;\n transform: translate(-50%, -50%);\n width: auto;\n\n ", "\n"])), function (_a) {
|
72
71
|
var theme = _a.theme;
|
73
72
|
return theme.ui_cpnt_alertdialog_base;
|
74
73
|
}, function (_a) {
|
@@ -78,18 +77,18 @@ var S_ModalWrapper = styled_components_1.default.div(templateObject_5 || (templa
|
|
78
77
|
var theme = _a.theme;
|
79
78
|
return theme.boxShadow.elevation5;
|
80
79
|
}, animationStyle_1.dialogOnAni);
|
81
|
-
var S_Footer = styled_components_1.default.div(
|
80
|
+
var S_Footer = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: flex-end;\n padding: ", " ", "\n ", " ", ";\n"], ["\n align-items: center;\n display: flex;\n justify-content: flex-end;\n padding: ", " ", "\n ", " ", ";\n"])), function (_a) {
|
82
81
|
var theme = _a.theme;
|
83
|
-
return theme.spacing.
|
82
|
+
return theme.spacing.spacingC;
|
84
83
|
}, function (_a) {
|
85
84
|
var theme = _a.theme;
|
86
|
-
return theme.spacing.
|
85
|
+
return theme.spacing.spacingD;
|
87
86
|
}, function (_a) {
|
88
87
|
var theme = _a.theme;
|
89
88
|
return theme.spacing.spacingD;
|
90
89
|
}, function (_a) {
|
91
90
|
var theme = _a.theme;
|
92
|
-
return theme.spacing.
|
91
|
+
return theme.spacing.spacingE;
|
93
92
|
});
|
94
93
|
exports.default = DesktopAlertDialog;
|
95
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5
|
94
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
@@ -60,23 +60,23 @@ function DesktopTabBar(_a) {
|
|
60
60
|
};
|
61
61
|
var textLabel_1 = function (item, isSubText) {
|
62
62
|
if (isSubText) {
|
63
|
-
return ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: item.title, textAlign: "center", styleTheme: "caption1Bold", colorTheme: item.isActive ? 'sysTextPrimary' : 'sysTextTertiary', singleLineMode: "use" }));
|
63
|
+
return ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, __assign({ text: item.title, textAlign: "center", styleTheme: "caption1Bold", colorTheme: item.isActive ? 'sysTextPrimary' : 'sysTextTertiary', singleLineMode: "use" }, (item.tooltipText && { tooltipText: item.tooltipText }))));
|
64
64
|
}
|
65
65
|
if (styleTheme === 'content_black') {
|
66
|
-
return ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: item.title, textAlign: "center", styleTheme: item.isActive ? 'caption1Bold' : 'caption1Regular', colorTheme: item.isActive ? 'sysTextPrimary' : 'sysTextSecondary', singleLineMode: "use" }));
|
66
|
+
return ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, __assign({ text: item.title, textAlign: "center", styleTheme: item.isActive ? 'caption1Bold' : 'caption1Regular', colorTheme: item.isActive ? 'sysTextPrimary' : 'sysTextSecondary', singleLineMode: "use" }, (item.tooltipText && { tooltipText: item.tooltipText }))));
|
67
67
|
}
|
68
68
|
if (styleTheme === 'content') {
|
69
|
-
return ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: item.title, textAlign: "center", styleTheme: item.isActive ? 'caption1Bold' : 'caption1Regular', colorTheme: item.isActive ? 'usrTextBrandPrimary' : 'sysTextSecondary', singleLineMode: "use" }));
|
69
|
+
return ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, __assign({ text: item.title, textAlign: "center", styleTheme: item.isActive ? 'caption1Bold' : 'caption1Regular', colorTheme: item.isActive ? 'usrTextBrandPrimary' : 'sysTextSecondary', singleLineMode: "use" }, (item.tooltipText && { tooltipText: item.tooltipText }))));
|
70
70
|
}
|
71
71
|
if (styleTheme === 'main') {
|
72
|
-
return ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: item.title, textAlign: "center", styleTheme: "leadParaBold", colorTheme: item.isActive ? 'sysTextPrimary' : 'sysTextTertiary', singleLineMode: "use", letterSpacing: "-0.04em" }));
|
72
|
+
return ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, __assign({ text: item.title, textAlign: "center", styleTheme: "leadParaBold", colorTheme: item.isActive ? 'sysTextPrimary' : 'sysTextTertiary', singleLineMode: "use", letterSpacing: "-0.04em" }, (item.tooltipText && { tooltipText: item.tooltipText }))));
|
73
73
|
}
|
74
74
|
};
|
75
|
-
return ((0, jsx_runtime_1.jsxs)(S_TabBarBox, __assign({ "x-pds-name": "DesktopTabBar", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, { children: [(0, jsx_runtime_1.jsx)(S_MainTabBarSpace, __assign({ styleTheme: styleTheme, isSubTabBarActivated: isSubTabBarActivated }, { children: itemArray.map(function (item) { return ((0, jsx_runtime_1.jsxs)(S_MainTabItemBox, __assign({ styleTheme: styleTheme }, { children: [(0, jsx_runtime_1.jsxs)(S_MainTabItemWrapper, __assign({ text: item.title, styleTheme: styleTheme, isActive: item.isActive, onClick: function (e) { return handelClickTabItem_1(item, e); } }, { children: [textLabel_1(item, false), item.iconMode === 'use' && item.iconName && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Spacing_1.default, { size: "spacing_a", spacingType: "width" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { size: styleTheme === 'main' ? 20 : 16, iconName: item.iconName || 'ic_unavailable', fillType: item.iconFillType || 'line', colorKey: item.isActive
|
75
|
+
return ((0, jsx_runtime_1.jsxs)(S_TabBarBox, __assign({ "x-pds-name": "DesktopTabBar", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, { children: [(0, jsx_runtime_1.jsx)(S_MainTabBarSpace, __assign({ styleTheme: styleTheme, isSubTabBarActivated: isSubTabBarActivated }, { children: itemArray.map(function (item) { return ((0, jsx_runtime_1.jsxs)(S_MainTabItemBox, __assign({ styleTheme: styleTheme }, { children: [(0, jsx_runtime_1.jsxs)(S_MainTabItemWrapper, __assign({ text: item.title, styleTheme: styleTheme, isActive: item.isActive, onClick: function (e) { return !item.disabled && handelClickTabItem_1(item, e); }, disabled: item.disabled }, { children: [textLabel_1(item, false), item.iconMode === 'use' && item.iconName && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Spacing_1.default, { size: "spacing_a", spacingType: "width" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { size: styleTheme === 'main' ? 20 : 16, iconName: item.iconName || 'ic_unavailable', fillType: item.iconFillType || 'line', colorKey: item.isActive
|
76
76
|
? styleTheme === 'content'
|
77
77
|
? 'ui_cpnt_textlabel_usr_brandprimary'
|
78
78
|
: 'ui_cpnt_textlabel_sys_primary'
|
79
|
-
: 'ui_cpnt_textlabel_sys_tertiary' })] }))] })), item.isActive && item.subArray && ((0, jsx_runtime_1.jsx)(S_SubTabBarWrapper, { children: item.subArray.map(function (subItem) { return ((0, jsx_runtime_1.jsx)(S_SubTabItemWrapper, __assign({ text: subItem.title, styleTheme: styleTheme, onClick: function (e) { return handelClickTabItem_1(subItem, e); } }, { children: textLabel_1(subItem, true) }), subItem.title)); }) }))] }), item.title)); }) })), isSubTabBarActivated && (0, jsx_runtime_1.jsx)(S_SubTabBarSpace, { styleTheme: styleTheme })] })));
|
79
|
+
: 'ui_cpnt_textlabel_sys_tertiary' })] }))] })), item.isActive && item.subArray && ((0, jsx_runtime_1.jsx)(S_SubTabBarWrapper, { children: item.subArray.map(function (subItem) { return ((0, jsx_runtime_1.jsx)(S_SubTabItemWrapper, __assign({ text: subItem.title, styleTheme: styleTheme, disabled: subItem.disabled, onClick: function (e) { return !subItem.disabled && handelClickTabItem_1(subItem, e); } }, { children: textLabel_1(subItem, true) }), subItem.title)); }) }))] }), item.title)); }) })), isSubTabBarActivated && (0, jsx_runtime_1.jsx)(S_SubTabBarSpace, { styleTheme: styleTheme })] })));
|
80
80
|
}
|
81
81
|
if (textArray) {
|
82
82
|
var isSubTabBarActivated = textArray.some(function (item) { return pathname.includes(item.path) && item.subArray; });
|
@@ -158,7 +158,10 @@ var S_MainTabItemBox = styled_components_1.default.div(templateObject_5 || (temp
|
|
158
158
|
var theme = _a.theme, styleTheme = _a.styleTheme;
|
159
159
|
return styleTheme === 'main' ? '20px' : theme.spacing.spacingD;
|
160
160
|
});
|
161
|
-
var S_MainTabItemWrapper = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n align-items: flex-end;\n box-sizing: border-box;\n cursor:
|
161
|
+
var S_MainTabItemWrapper = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n align-items: flex-end;\n box-sizing: border-box;\n cursor: ", ";\n display: flex;\n height: 100%;\n padding: 0 ", ";\n ", "\n ", "\n & > [x-pds-name=\"TextLabel\"] {\n padding-bottom: ", ";\n }\n & > svg {\n padding-bottom: ", ";\n }\n"], ["\n align-items: flex-end;\n box-sizing: border-box;\n cursor: ", ";\n display: flex;\n height: 100%;\n padding: 0 ", ";\n ", "\n ", "\n & > [x-pds-name=\"TextLabel\"] {\n padding-bottom: ", ";\n }\n & > svg {\n padding-bottom: ", ";\n }\n"])), function (_a) {
|
162
|
+
var disabled = _a.disabled;
|
163
|
+
return (disabled ? 'default' : 'pointer');
|
164
|
+
}, function (_a) {
|
162
165
|
var theme = _a.theme, styleTheme = _a.styleTheme;
|
163
166
|
return (styleTheme === 'main' ? 0 : theme.spacing.spacingA);
|
164
167
|
}, tabIndicator, textOffset, function (_a) {
|
@@ -179,7 +182,10 @@ var S_SubTabBarSpace = styled_components_1.default.div(templateObject_8 || (temp
|
|
179
182
|
var styleTheme = _a.styleTheme;
|
180
183
|
return (styleTheme === 'main' ? '26px' : '32px');
|
181
184
|
});
|
182
|
-
var S_SubTabItemWrapper = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n align-items: center;\n cursor:
|
185
|
+
var S_SubTabItemWrapper = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n align-items: center;\n cursor: ", ";\n display: flex;\n justify-content: center;\n margin-right: ", ";\n ", ";\n ", ";\n\n &:last-child {\n margin-right: 0;\n }\n\n ", "\n"], ["\n align-items: center;\n cursor: ", ";\n display: flex;\n justify-content: center;\n margin-right: ", ";\n ", ";\n ", ";\n\n &:last-child {\n margin-right: 0;\n }\n\n ", "\n"])), function (_a) {
|
186
|
+
var disabled = _a.disabled;
|
187
|
+
return (disabled ? 'default' : 'pointer');
|
188
|
+
}, function (_a) {
|
183
189
|
var theme = _a.theme, styleTheme = _a.styleTheme;
|
184
190
|
return styleTheme === 'main' ? theme.spacing.spacingD : theme.spacing.spacingE;
|
185
191
|
}, function (_a) {
|
@@ -178,10 +178,14 @@ function Dropdown(_a) {
|
|
178
178
|
};
|
179
179
|
var getTextColorTheme = function () {
|
180
180
|
if (colorTheme === 'none') {
|
181
|
-
if (isFocused) {
|
182
|
-
return 'sysTextPrimary';
|
183
|
-
}
|
184
181
|
if (state === 'normal') {
|
182
|
+
var isHintTextShow = !(selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.text) && !(value === null || value === void 0 ? void 0 : value.text) && !(defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.text) && !!hintText;
|
183
|
+
if (isHintTextShow) {
|
184
|
+
return 'sysTextSecondary';
|
185
|
+
}
|
186
|
+
if (isFocused) {
|
187
|
+
return 'sysTextPrimary';
|
188
|
+
}
|
185
189
|
return 'sysTextPrimary';
|
186
190
|
}
|
187
191
|
if (state === 'read_only') {
|
@@ -200,10 +204,14 @@ function Dropdown(_a) {
|
|
200
204
|
};
|
201
205
|
var getTextColorOverride = function () {
|
202
206
|
if (colorTheme === 'dark') {
|
203
|
-
if (isFocused) {
|
204
|
-
return 'ui_cpnt_dropdown_text_darktheme_enabled';
|
205
|
-
}
|
206
207
|
if (state === 'normal') {
|
208
|
+
var isHintTextShow = !(selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.text) && !(value === null || value === void 0 ? void 0 : value.text) && !(defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.text) && !!hintText;
|
209
|
+
if (isHintTextShow) {
|
210
|
+
return 'ui_cpnt_dropdown_text_darktheme_hinttext';
|
211
|
+
}
|
212
|
+
if (isFocused) {
|
213
|
+
return 'ui_cpnt_dropdown_text_darktheme_enabled';
|
214
|
+
}
|
207
215
|
return 'ui_cpnt_dropdown_text_darktheme_hint';
|
208
216
|
}
|
209
217
|
if (state === 'read_only') {
|
@@ -93,7 +93,7 @@ function DynamicDesktopNavBar(_a) {
|
|
93
93
|
function handleClickInternalMenuItemNav(url) {
|
94
94
|
dispatch({ type: 'INTERNAL_CLICKED', payload: { clickedURL: url } });
|
95
95
|
}
|
96
|
-
return ((0, jsx_runtime_1.jsx)(exports.BasePathContext.Provider, __assign({ value: { basePath: basePath, activeMode: state.mode, handleClickInternalMenuItemNav: handleClickInternalMenuItemNav } }, { children: colorTheme === 'transparent' ? ((0, jsx_runtime_1.jsx)(styled_components_1.ThemeProvider, __assign({ theme: __assign(__assign(__assign({}, theme), (0, theme_1.themeByGivenTone)('DARK')), { ui_menu_background: theme.ui_menu_background_transparent, ui_menu_button_base: theme.ui_menu_button_base_transparent }) }, { children: (0, jsx_runtime_1.jsx)(S_DynamicDesktopNavBar, __assign({ "x-pds-name": "DynamicDesktopNavBar", "x-pds-element-type": "component", "x-pds-device-type": "desktop", isFixedWidth: isFixedWidth, isPreview: isPreview, navBarHeight: navBarHeight }, { children: (0, jsx_runtime_1.jsxs)(S_Grid, __assign({ className: "DynamicDesktopNavBarGrid", gridTemplate: gridTemplate, style: style }, { children: [(0, jsx_runtime_1.jsx)(blocks_1.BrandLogo, { to: brandLogo.href, logoSrc: brandLogo.src, fallbackText: brandLogo.text, isCenteredLogo: isCenteredLogo }), (0, jsx_runtime_1.jsx)(blocks_1.PrimaryMenu, { menus: slicedPrimaryMenus, showMenuAsIcon: primaryMenuOptions.showMenuAsIcon, style: primaryMenuOptions.style }), showSecondaryMenu && ((0, jsx_runtime_1.jsx)(blocks_1.SecondaryMenu, { menus: slicedSecondaryMenus, showMenuAsIcon: secondaryMenuOptions.showMenuAsIcon, style: secondaryMenuOptions.style })), (0, jsx_runtime_1.jsx)(blocks_1.UserProfile, { ref: profileArea, src: userProfile.src, to: userProfile.href, leftIconButton: userProfile.leftIconButton, overrideUserProfile: userProfile.overrideUserProfile, style: userProfileOptions.style })] })) })) }))) : ((0, jsx_runtime_1.jsx)(S_DynamicDesktopNavBar, __assign({ "x-pds-name": "DynamicDesktopNavBar", "x-pds-element-type": "component", "x-pds-device-type": "desktop", isPreview: isPreview, isFixedWidth: isFixedWidth, navBarHeight: navBarHeight }, { children: (0, jsx_runtime_1.jsxs)(S_Grid, __assign({ className: "DynamicDesktopNavBarGrid", gridTemplate: gridTemplate, style: style }, { children: [(0, jsx_runtime_1.jsx)(blocks_1.BrandLogo, { to: brandLogo.href, logoSrc: brandLogo.src, fallbackText: brandLogo.text, isCenteredLogo: isCenteredLogo }), (0, jsx_runtime_1.jsx)(blocks_1.PrimaryMenu, { menus: slicedPrimaryMenus, showMenuAsIcon: primaryMenuOptions.showMenuAsIcon, style: primaryMenuOptions.style }), showSecondaryMenu && ((0, jsx_runtime_1.jsx)(blocks_1.SecondaryMenu, { menus: slicedSecondaryMenus, showMenuAsIcon: secondaryMenuOptions.showMenuAsIcon, style: secondaryMenuOptions.style })), (0, jsx_runtime_1.jsx)(blocks_1.UserProfile, { ref: profileArea, src: userProfile.src, to: userProfile.href, leftIconButton: userProfile.leftIconButton, overrideUserProfile: userProfile.overrideUserProfile, style: userProfileOptions.style })] })) }))) })));
|
96
|
+
return ((0, jsx_runtime_1.jsx)(exports.BasePathContext.Provider, __assign({ value: { basePath: basePath, activeMode: state.mode, handleClickInternalMenuItemNav: handleClickInternalMenuItemNav } }, { children: colorTheme === 'transparent' ? ((0, jsx_runtime_1.jsx)(styled_components_1.ThemeProvider, __assign({ theme: __assign(__assign(__assign({}, theme), (0, theme_1.themeByGivenTone)('DARK')), { ui_menu_background: theme.ui_menu_background_transparent, ui_menu_button_base: theme.ui_menu_button_base_transparent }) }, { children: (0, jsx_runtime_1.jsx)(S_DynamicDesktopNavBar, __assign({ "x-pds-name": "DynamicDesktopNavBar", "x-pds-element-type": "component", "x-pds-device-type": "desktop", isFixedWidth: isFixedWidth, isPreview: isPreview, navBarHeight: navBarHeight }, { children: (0, jsx_runtime_1.jsxs)(S_Grid, __assign({ className: "DynamicDesktopNavBarGrid", gridTemplate: gridTemplate, style: style }, { children: [(0, jsx_runtime_1.jsx)(blocks_1.BrandLogo, { to: brandLogo.href, logoSrc: brandLogo.src, fallbackText: brandLogo.text, isCenteredLogo: isCenteredLogo }), (0, jsx_runtime_1.jsx)(blocks_1.PrimaryMenu, { menus: slicedPrimaryMenus, showMenuAsIcon: primaryMenuOptions.showMenuAsIcon, style: primaryMenuOptions.style }), showSecondaryMenu && ((0, jsx_runtime_1.jsx)(blocks_1.SecondaryMenu, { menus: slicedSecondaryMenus, showMenuAsIcon: secondaryMenuOptions.showMenuAsIcon, style: secondaryMenuOptions.style })), (0, jsx_runtime_1.jsx)(blocks_1.UserProfile, { ref: profileArea, src: userProfile.src, to: userProfile.href, leftIconButton: userProfile.leftIconButton, leftIconButton2: userProfile.leftIconButton2, overrideUserProfile: userProfile.overrideUserProfile, style: userProfileOptions.style })] })) })) }))) : ((0, jsx_runtime_1.jsx)(S_DynamicDesktopNavBar, __assign({ "x-pds-name": "DynamicDesktopNavBar", "x-pds-element-type": "component", "x-pds-device-type": "desktop", isPreview: isPreview, isFixedWidth: isFixedWidth, navBarHeight: navBarHeight }, { children: (0, jsx_runtime_1.jsxs)(S_Grid, __assign({ className: "DynamicDesktopNavBarGrid", gridTemplate: gridTemplate, style: style }, { children: [(0, jsx_runtime_1.jsx)(blocks_1.BrandLogo, { to: brandLogo.href, logoSrc: brandLogo.src, fallbackText: brandLogo.text, isCenteredLogo: isCenteredLogo }), (0, jsx_runtime_1.jsx)(blocks_1.PrimaryMenu, { menus: slicedPrimaryMenus, showMenuAsIcon: primaryMenuOptions.showMenuAsIcon, style: primaryMenuOptions.style }), showSecondaryMenu && ((0, jsx_runtime_1.jsx)(blocks_1.SecondaryMenu, { menus: slicedSecondaryMenus, showMenuAsIcon: secondaryMenuOptions.showMenuAsIcon, style: secondaryMenuOptions.style })), (0, jsx_runtime_1.jsx)(blocks_1.UserProfile, { ref: profileArea, src: userProfile.src, to: userProfile.href, leftIconButton: userProfile.leftIconButton, leftIconButton2: userProfile.leftIconButton2, overrideUserProfile: userProfile.overrideUserProfile, style: userProfileOptions.style })] })) }))) })));
|
97
97
|
}
|
98
98
|
var S_Grid = (0, styled_components_1.default)(BoxLayout_1.Grid)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n grid-column-gap: 24px;\n justify-items: center;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n align-items: center;\n grid-column-gap: 24px;\n justify-items: center;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
|
99
99
|
var theme = _a.theme;
|
@@ -24,8 +24,8 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
24
24
|
var Navigations_1 = require("../../../../common/components/Navigations");
|
25
25
|
var hybrid_1 = require("../../../../hybrid");
|
26
26
|
function UserProfile(_a, ref) {
|
27
|
-
var src = _a.src, to = _a.to, overrideUserProfile = _a.overrideUserProfile, leftIconButton = _a.leftIconButton, style = _a.style;
|
28
|
-
return ((0, jsx_runtime_1.jsx)(S_UserProfile, __assign({ style: style, ref: ref }, { children: overrideUserProfile ? ((0, jsx_runtime_1.jsx)(S_OverrideUserProfile, { children: overrideUserProfile })) : ((0, jsx_runtime_1.jsxs)(S_ImageViewWrapper, { children: [leftIconButton && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [leftIconButton, (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" })] })), (0, jsx_runtime_1.jsx)(Navigations_1.NavLink, __assign({ to: to }, { children: (0, jsx_runtime_1.jsx)(hybrid_1.ImageView, { width: 32, ratio: "1_1", scaleType: "cover", shapeType: "circular", src: src, borderMode: "use" }) }))] })) })));
|
27
|
+
var src = _a.src, to = _a.to, overrideUserProfile = _a.overrideUserProfile, leftIconButton = _a.leftIconButton, leftIconButton2 = _a.leftIconButton2, style = _a.style;
|
28
|
+
return ((0, jsx_runtime_1.jsx)(S_UserProfile, __assign({ style: style, ref: ref }, { children: overrideUserProfile ? ((0, jsx_runtime_1.jsx)(S_OverrideUserProfile, { children: overrideUserProfile })) : ((0, jsx_runtime_1.jsxs)(S_ImageViewWrapper, { children: [leftIconButton2 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [leftIconButton2, (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" })] })), leftIconButton && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [leftIconButton, (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" })] })), (0, jsx_runtime_1.jsx)(Navigations_1.NavLink, __assign({ to: to }, { children: (0, jsx_runtime_1.jsx)(hybrid_1.ImageView, { width: 32, ratio: "1_1", scaleType: "cover", shapeType: "circular", src: src, borderMode: "use" }) }))] })) })));
|
29
29
|
}
|
30
30
|
var S_UserProfile = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n grid-area: USER_PROFILE;\n justify-content: flex-end;\n"], ["\n display: flex;\n grid-area: USER_PROFILE;\n justify-content: flex-end;\n"])));
|
31
31
|
var S_OverrideUserProfile = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: max-content;\n"], ["\n width: max-content;\n"])));
|
@@ -112,7 +112,7 @@ function SegmentedButtonGroup(_a) {
|
|
112
112
|
return 'ui_cpnt_button_icon_enabled';
|
113
113
|
};
|
114
114
|
return ((0, jsx_runtime_1.jsx)(S_SegmentedButtonGroupGroups, __assign({ "x-pds-name": "SegmentedButtonGroup", "x-pds-element-type": "component", "x-pds-device-type": "desktop", selectionType: selectionType, ref: tooltipPositionTargetRef }, { children: valueArray.map(function (_a, index) {
|
115
|
-
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, tooltipText = _a.tooltipText, _d = _a.tooltipPosition, tooltipPosition = _d === void 0 ? 'bottom' : _d, _e = _a.iconColorTheme, iconColorTheme = _e === void 0 ? 'none' : _e;
|
115
|
+
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, tooltipText = _a.tooltipText, _d = _a.tooltipPosition, tooltipPosition = _d === void 0 ? 'bottom' : _d, _e = _a.iconColorTheme, iconColorTheme = _e === void 0 ? 'none' : _e, _f = _a.backgroundColorTheme, backgroundColorTheme = _f === void 0 ? 'ui_cpnt_segmentedbuttongroup_base_default' : _f;
|
116
116
|
var tooltipPositionCss = (0, SystemUIPositionGenerator_1.hoverTypeSystemUICssGenerator)({
|
117
117
|
baseSize: constants_1.ICON_BUTTON_SIZE[size],
|
118
118
|
sizeOffset: tooltipSizeOffset,
|
@@ -122,7 +122,7 @@ function SegmentedButtonGroup(_a) {
|
|
122
122
|
: "center_".concat(tooltipPosition)
|
123
123
|
});
|
124
124
|
var isCurrentButton = index === currentButtonIndex;
|
125
|
-
return ((0, jsx_runtime_1.jsxs)(S_BasicButton, __assign({ size: size, onClick: function () { return handleClick(currentButtonValue); }, onMouseDown: function () { return handleMouseDown(currentButtonValue); }, disabled: state === 'disabled' || buttonState === 'disabled', selectionType: selectionType, isSelected: checkSelection(currentButtonValue), onPointerEnter: function () { return setCurrentButtonIndex(index); }, onPointerLeave: function () { return setCurrentButtonIndex(null); } }, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, fillType: iconFillType, colorKey: getIconColorKey(checkSelection(currentButtonValue), state === 'disabled' || buttonState === 'disabled', iconColorTheme) }), tooltipText &&
|
125
|
+
return ((0, jsx_runtime_1.jsxs)(S_BasicButton, __assign({ size: size, onClick: function () { return handleClick(currentButtonValue); }, onMouseDown: function () { return handleMouseDown(currentButtonValue); }, disabled: state === 'disabled' || buttonState === 'disabled', selectionType: selectionType, isSelected: checkSelection(currentButtonValue), backgroundColorTheme: backgroundColorTheme, onPointerEnter: function () { return setCurrentButtonIndex(index); }, onPointerLeave: function () { return setCurrentButtonIndex(null); } }, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, fillType: iconFillType, colorKey: getIconColorKey(checkSelection(currentButtonValue), state === 'disabled' || buttonState === 'disabled', iconColorTheme) }), tooltipText &&
|
126
126
|
isCurrentButton &&
|
127
127
|
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", ref: tooltipRef, tooltipPositionCss: tooltipPositionCss, size: size }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, colorOverride: "ui_cpnt_textlabel_button_tooltip", styleTheme: "caption2Regular", colorTheme: "sysTextSecondary" }) })), document.body)] }), String(currentButtonValue)));
|
128
128
|
}) })));
|
@@ -180,10 +180,12 @@ var small = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 =
|
|
180
180
|
return selectionType === 'single' && '10px';
|
181
181
|
});
|
182
182
|
var S_BasicButton = styled_components_1.default.button(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border: none;\n display: inline-flex;\n justify-content: center;\n position: relative;\n\n ", ";\n\n &::before {\n background-color: transparent;\n border-radius: inherit;\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n &:hover:enabled:before {\n background-color: ", ";\n }\n\n &:active:enabled:before {\n background-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: default;\n }\n"], ["\n align-items: center;\n background-color: ", ";\n border: none;\n display: inline-flex;\n justify-content: center;\n position: relative;\n\n ", ";\n\n &::before {\n background-color: transparent;\n border-radius: inherit;\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n &:hover:enabled:before {\n background-color: ", ";\n }\n\n &:active:enabled:before {\n background-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: default;\n }\n"])), function (_a) {
|
183
|
-
var isSelected = _a.isSelected, theme = _a.theme;
|
184
|
-
|
185
|
-
|
186
|
-
|
183
|
+
var isSelected = _a.isSelected, backgroundColorTheme = _a.backgroundColorTheme, theme = _a.theme;
|
184
|
+
if (isSelected)
|
185
|
+
return theme.ui_cpnt_segmentedbuttongroup_base_selected;
|
186
|
+
if (backgroundColorTheme)
|
187
|
+
return theme[backgroundColorTheme];
|
188
|
+
return theme.ui_cpnt_segmentedbuttongroup_base_default;
|
187
189
|
}, function (_a) {
|
188
190
|
var size = _a.size;
|
189
191
|
return size && { large: large, medium: medium, small: small }[size];
|
@@ -1,10 +1,12 @@
|
|
1
|
-
import
|
1
|
+
import { Path } from 'react-hook-form';
|
2
|
+
import type { IFormValues, PDSTextType } from '../../../common';
|
2
3
|
import type { SelectHTMLAttributes } from 'react';
|
3
4
|
type SelectOption = {
|
4
5
|
text: string;
|
5
6
|
value: SelectHTMLAttributes<HTMLSelectElement>['value'];
|
6
7
|
};
|
7
8
|
type SelectProps = {
|
9
|
+
name?: Path<IFormValues>;
|
8
10
|
hintText?: PDSTextType;
|
9
11
|
defaultValue?: SelectOption;
|
10
12
|
value?: SelectOption['value'];
|
@@ -14,7 +16,10 @@ type SelectProps = {
|
|
14
16
|
state?: 'normal' | 'read_only' | 'disabled';
|
15
17
|
colorTheme?: 'none' | 'dark';
|
16
18
|
customWidth?: string;
|
19
|
+
validation?: {
|
20
|
+
[key: string]: any;
|
21
|
+
};
|
17
22
|
onChange?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
18
23
|
};
|
19
|
-
declare function Select({ hintText, defaultValue, value, valueArray, size, responsiveMode, state, colorTheme, customWidth, onChange }: SelectProps): JSX.Element;
|
24
|
+
declare function Select({ name, hintText, defaultValue, value, valueArray, size, responsiveMode, state, colorTheme, customWidth, validation, onChange }: SelectProps): JSX.Element;
|
20
25
|
export default Select;
|