pds-dev-kit-web 2.1.12 → 2.1.13
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/ArrowRoundLeft.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/ArrowRoundLeft.js +30 -0
- package/dist/src/common/assets/icons/fill/Layout.js +1 -1
- package/dist/src/common/assets/icons/fill/LogoYt.js +1 -1
- package/dist/src/common/assets/icons/fill/TextAlignBottom.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/TextAlignBottom.js +30 -0
- package/dist/src/common/assets/icons/fill/TextAlignCenter.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/TextAlignCenter.js +30 -0
- package/dist/src/common/assets/icons/fill/TextAlignLeft.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/TextAlignLeft.js +30 -0
- package/dist/src/common/assets/icons/fill/TextAlignMiddle.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/TextAlignMiddle.js +30 -0
- package/dist/src/common/assets/icons/fill/TextAlignRight.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/TextAlignRight.js +30 -0
- package/dist/src/common/assets/icons/fill/TextAlignTop.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/TextAlignTop.js +30 -0
- package/dist/src/common/assets/icons/fill/index.d.ts +7 -0
- package/dist/src/common/assets/icons/fill/index.js +14 -0
- package/dist/src/common/assets/icons/line/ArrowRoundLeft.js +1 -1
- package/dist/src/common/assets/icons/line/Layout.js +1 -1
- package/dist/src/common/assets/icons/line/TextAlignBottom.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TextAlignBottom.js +30 -0
- package/dist/src/common/assets/icons/line/TextAlignCenter.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TextAlignCenter.js +30 -0
- package/dist/src/common/assets/icons/line/TextAlignLeft.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TextAlignLeft.js +30 -0
- package/dist/src/common/assets/icons/line/TextAlignMiddle.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TextAlignMiddle.js +30 -0
- package/dist/src/common/assets/icons/line/TextAlignRight.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TextAlignRight.js +30 -0
- package/dist/src/common/assets/icons/line/TextAlignTop.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TextAlignTop.js +30 -0
- package/dist/src/common/assets/icons/line/index.d.ts +6 -0
- package/dist/src/common/assets/icons/line/index.js +12 -0
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +2 -1
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +2 -1
- package/dist/src/common/styles/colorSet/UIColor.json +2 -1
- package/dist/src/common/styles/colorSet/index.d.ts +3 -0
- package/dist/src/common/styles/colorSet/ui-type.d.ts +1 -0
- package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.d.ts +6 -2
- package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.js +181 -28
- package/dist/src/desktop/common/components/TextFieldBase/constants.d.ts +1 -0
- package/dist/src/desktop/common/components/TextFieldBase/constants.js +2 -1
- package/dist/src/desktop/components/TextField/TextField.js +1 -1
- package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.d.ts +6 -2
- package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.js +180 -27
- package/dist/src/mobile/common/components/TextFieldBase/constants.d.ts +1 -0
- package/dist/src/mobile/common/components/TextFieldBase/constants.js +2 -1
- package/dist/src/mobile/components/TextField/TextField.js +1 -1
- package/dist/src/sub/AdminList/ToolBar/SearchField.js +1 -1
- package/package.json +1 -1
- package/release-note.md +17 -90
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
|
+
var TextAlignTop = function (_a) {
|
|
27
|
+
var color = _a.color, size = _a.size, rest = __rest(_a, ["color", "size"]);
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)("svg", __assign({ width: size, height: size, viewBox: "0 0 24 24" }, rest, { children: (0, jsx_runtime_1.jsx)("path", { fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M5.8796,4.1679 L18.1206,4.1679 M12,8.7726 L12,19.8316 M7.4133,12.4097 L12.0003,7.8227 L16.5863,12.4097" }, void 0) }), void 0));
|
|
29
|
+
};
|
|
30
|
+
exports.default = TextAlignTop;
|
|
@@ -217,6 +217,12 @@ declare const lineIcons: {
|
|
|
217
217
|
readonly ic_ten_sec_forward: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
218
218
|
readonly ic_ten_sec_forward_arrow: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
219
219
|
readonly ic_text: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
220
|
+
readonly ic_text_align_bottom: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
221
|
+
readonly ic_text_align_center: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
222
|
+
readonly ic_text_align_left: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
223
|
+
readonly ic_text_align_middle: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
224
|
+
readonly ic_text_align_right: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
225
|
+
readonly ic_text_align_top: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
220
226
|
readonly ic_time: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
221
227
|
readonly ic_toggle_down: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
222
228
|
readonly ic_toggle_up: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
@@ -220,6 +220,12 @@ var TenSecBackArrow_1 = __importDefault(require("./TenSecBackArrow"));
|
|
|
220
220
|
var TenSecForward_1 = __importDefault(require("./TenSecForward"));
|
|
221
221
|
var TenSecForwardArrow_1 = __importDefault(require("./TenSecForwardArrow"));
|
|
222
222
|
var Text_1 = __importDefault(require("./Text"));
|
|
223
|
+
var TextAlignBottom_1 = __importDefault(require("./TextAlignBottom"));
|
|
224
|
+
var TextAlignCenter_1 = __importDefault(require("./TextAlignCenter"));
|
|
225
|
+
var TextAlignLeft_1 = __importDefault(require("./TextAlignLeft"));
|
|
226
|
+
var TextAlignMiddle_1 = __importDefault(require("./TextAlignMiddle"));
|
|
227
|
+
var TextAlignRight_1 = __importDefault(require("./TextAlignRight"));
|
|
228
|
+
var TextAlignTop_1 = __importDefault(require("./TextAlignTop"));
|
|
223
229
|
var Time_1 = __importDefault(require("./Time"));
|
|
224
230
|
var ToggleDown_1 = __importDefault(require("./ToggleDown"));
|
|
225
231
|
var ToggleUp_1 = __importDefault(require("./ToggleUp"));
|
|
@@ -464,6 +470,12 @@ var lineIcons = {
|
|
|
464
470
|
ic_ten_sec_forward: TenSecForward_1.default,
|
|
465
471
|
ic_ten_sec_forward_arrow: TenSecForwardArrow_1.default,
|
|
466
472
|
ic_text: Text_1.default,
|
|
473
|
+
ic_text_align_bottom: TextAlignBottom_1.default,
|
|
474
|
+
ic_text_align_center: TextAlignCenter_1.default,
|
|
475
|
+
ic_text_align_left: TextAlignLeft_1.default,
|
|
476
|
+
ic_text_align_middle: TextAlignMiddle_1.default,
|
|
477
|
+
ic_text_align_right: TextAlignRight_1.default,
|
|
478
|
+
ic_text_align_top: TextAlignTop_1.default,
|
|
467
479
|
ic_time: Time_1.default,
|
|
468
480
|
ic_toggle_down: ToggleDown_1.default,
|
|
469
481
|
ic_toggle_up: ToggleUp_1.default,
|
|
@@ -340,5 +340,6 @@
|
|
|
340
340
|
"sys_sw_sidebar_item_base_pressed": "darkgrey100",
|
|
341
341
|
"sys_sw_sidebar_label_icon_normal_02": "darkblue500",
|
|
342
342
|
"sys_text_black_02": "black/opacity60",
|
|
343
|
-
"sys_sw_sidebar_item_text_disabled": "darkgrey400/opacity70"
|
|
343
|
+
"sys_sw_sidebar_item_text_disabled": "darkgrey400/opacity70",
|
|
344
|
+
"sys_text_grey_05": "darkgrey400/opacity20"
|
|
344
345
|
}
|
|
@@ -340,5 +340,6 @@
|
|
|
340
340
|
"sys_sw_sidebar_item_base_pressed": "darkgrey100",
|
|
341
341
|
"sys_sw_sidebar_label_icon_normal_02": "darkblue500",
|
|
342
342
|
"sys_text_black_02": "black/opacity60",
|
|
343
|
-
"sys_sw_sidebar_item_text_disabled": "darkgrey400/opacity70"
|
|
343
|
+
"sys_sw_sidebar_item_text_disabled": "darkgrey400/opacity70",
|
|
344
|
+
"sys_text_grey_05": "grey400/opacity20"
|
|
344
345
|
}
|
|
@@ -828,5 +828,6 @@
|
|
|
828
828
|
"ui_sw_sidebar_item_base_pressed": "sys_sw_sidebar_item_base_pressed",
|
|
829
829
|
"ui_sw_sidebar_label_icon_normal_02": "sys_sw_sidebar_label_icon_normal_02",
|
|
830
830
|
"ui_104": "sys_text_black_02",
|
|
831
|
-
"ui_sw_sidebar_item_text_disabled": "sys_sw_sidebar_item_text_disabled"
|
|
831
|
+
"ui_sw_sidebar_item_text_disabled": "sys_sw_sidebar_item_text_disabled",
|
|
832
|
+
"ui_106": "sys_text_grey_05"
|
|
832
833
|
}
|
|
@@ -462,6 +462,7 @@ declare const colorSet: {
|
|
|
462
462
|
sys_sw_sidebar_label_icon_normal_02: string;
|
|
463
463
|
sys_text_black_02: string;
|
|
464
464
|
sys_sw_sidebar_item_text_disabled: string;
|
|
465
|
+
sys_text_grey_05: string;
|
|
465
466
|
};
|
|
466
467
|
readonly PaletteColor_Dark: {
|
|
467
468
|
sys_container_background_01: string;
|
|
@@ -806,6 +807,7 @@ declare const colorSet: {
|
|
|
806
807
|
sys_sw_sidebar_label_icon_normal_02: string;
|
|
807
808
|
sys_text_black_02: string;
|
|
808
809
|
sys_sw_sidebar_item_text_disabled: string;
|
|
810
|
+
sys_text_grey_05: string;
|
|
809
811
|
};
|
|
810
812
|
readonly UIColor: {
|
|
811
813
|
ui_cpnt_button_fill_base_primary: string;
|
|
@@ -1638,6 +1640,7 @@ declare const colorSet: {
|
|
|
1638
1640
|
ui_sw_sidebar_label_icon_normal_02: string;
|
|
1639
1641
|
ui_104: string;
|
|
1640
1642
|
ui_sw_sidebar_item_text_disabled: string;
|
|
1643
|
+
ui_106: string;
|
|
1641
1644
|
};
|
|
1642
1645
|
};
|
|
1643
1646
|
export default colorSet;
|
|
@@ -23,14 +23,18 @@ export declare type TextFieldBaseProps = {
|
|
|
23
23
|
maxLength?: number;
|
|
24
24
|
textSize: DesktopFontSize;
|
|
25
25
|
textWeight: FontWeight;
|
|
26
|
-
|
|
26
|
+
fieldPaddingRight?: number;
|
|
27
|
+
fieldPaddingLeft?: number;
|
|
27
28
|
fieldHeight?: number;
|
|
28
29
|
deleteIconMode?: 'none' | 'use';
|
|
29
30
|
deleteIconSize?: 12 | 16 | 20 | 24;
|
|
30
31
|
deleteIconColor?: UiColors;
|
|
32
|
+
suffixText?: PDSTextType;
|
|
33
|
+
suffixTextRightSpacingMode?: 'none' | 'use';
|
|
31
34
|
isFocused?: boolean;
|
|
32
35
|
autoComplete?: string;
|
|
33
36
|
stepperMode?: 'none' | 'use';
|
|
37
|
+
stepperRightSpacing?: number;
|
|
34
38
|
innerSpinButtonSize?: 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72;
|
|
35
39
|
step?: number;
|
|
36
40
|
onBlur?: (e: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
@@ -42,5 +46,5 @@ export declare type TextFieldBaseProps = {
|
|
|
42
46
|
inputRef?: any;
|
|
43
47
|
[x: string]: any;
|
|
44
48
|
} & Record<string, any>;
|
|
45
|
-
declare function TextFieldBase({ name, hintText, defaultText, textAlign, validation, preventBlankMode, enterSubmitMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, colorTheme, min, max, maxLength, textSize, textWeight,
|
|
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;
|
|
46
50
|
export default TextFieldBase;
|
|
@@ -50,15 +50,28 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
50
50
|
/* eslint-disable react/jsx-no-bind */
|
|
51
51
|
var react_1 = require("react");
|
|
52
52
|
var react_hook_form_1 = require("react-hook-form");
|
|
53
|
-
var components_1 = require("
|
|
53
|
+
var components_1 = require("../../../components");
|
|
54
|
+
var components_2 = require("../../../../hybrid/components");
|
|
54
55
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
55
56
|
var common_1 = require("../../../../common");
|
|
56
57
|
var IconButton_1 = require("../../../components/IconButton");
|
|
57
58
|
var constants_1 = require("./constants");
|
|
58
59
|
function TextFieldBase(_a) {
|
|
59
|
-
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,
|
|
60
|
-
var
|
|
60
|
+
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"]);
|
|
61
|
+
var _w = (0, react_hook_form_1.useFormContext)(), register = _w.register, setValue = _w.setValue, getValues = _w.getValues, clearErrors = _w.clearErrors;
|
|
61
62
|
var timeout;
|
|
63
|
+
var suffixTextRef = (0, react_1.useRef)(null);
|
|
64
|
+
var _x = (0, react_1.useState)(0), suffixTextWidth = _x[0], setSuffixTextWidth = _x[1];
|
|
65
|
+
// NOTE suffixText가 변할때마다 suffixText가 차지하는 너비를 알아내어 suffixTextWidth에 담는다.
|
|
66
|
+
(0, react_1.useEffect)(function () {
|
|
67
|
+
var calculateDivWidth = function () {
|
|
68
|
+
if (suffixTextRef.current) {
|
|
69
|
+
var width = suffixTextRef.current.offsetWidth;
|
|
70
|
+
setSuffixTextWidth(width);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
calculateDivWidth();
|
|
74
|
+
}, [suffixText]);
|
|
62
75
|
(0, react_1.useEffect)(function () {
|
|
63
76
|
return function () { return clearTimeout(timeout); };
|
|
64
77
|
}, []);
|
|
@@ -119,7 +132,7 @@ function TextFieldBase(_a) {
|
|
|
119
132
|
}
|
|
120
133
|
}
|
|
121
134
|
var textAreaRef = (0, react_1.useRef)(null);
|
|
122
|
-
var
|
|
135
|
+
var _y = register(name, validation), ref = _y.ref, refRest = __rest(_y, ["ref"]);
|
|
123
136
|
(0, react_1.useEffect)(function () {
|
|
124
137
|
if (textAreaRef === null || textAreaRef.current === null) {
|
|
125
138
|
return;
|
|
@@ -180,15 +193,15 @@ function TextFieldBase(_a) {
|
|
|
180
193
|
}
|
|
181
194
|
var S_TextFieldBase = function () {
|
|
182
195
|
if (textLineType === 'single') {
|
|
183
|
-
return ((0, jsx_runtime_1.jsxs)(S_InputWrapper, { children: [stepperMode === 'use' && ((0, jsx_runtime_1.jsxs)(S_IconBox, __assign({ innerSpinButtonSize: innerSpinButtonSize }, { children: [(0, jsx_runtime_1.jsx)(
|
|
196
|
+
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 }, void 0), (0, jsx_runtime_1.jsx)(components_2.Icon, { iconName: "ic_arrow_down_stepper", fillType: "fill", size: innerSpinButtonSize }, void 0)] }), void 0)), (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) {
|
|
184
197
|
ref(e);
|
|
185
198
|
if (inputRef) {
|
|
186
199
|
inputRef.current = e;
|
|
187
200
|
}
|
|
188
|
-
} }), void 0), deleteIconMode === 'use'
|
|
201
|
+
} }), void 0), (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 }, void 0)) }), void 0)), 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" }, void 0), (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" }, void 0), suffixTextRightSpacingMode === 'use' && ((0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_b", spacingType: "width" }, void 0))] }), void 0))] }), void 0))] }, void 0));
|
|
189
202
|
}
|
|
190
203
|
if (textLineType === 'multi') {
|
|
191
|
-
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,
|
|
204
|
+
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) {
|
|
192
205
|
ref(e);
|
|
193
206
|
if (inputRef) {
|
|
194
207
|
inputRef.current = e;
|
|
@@ -196,7 +209,7 @@ function TextFieldBase(_a) {
|
|
|
196
209
|
} }), void 0));
|
|
197
210
|
}
|
|
198
211
|
if (textLineType === 'auto') {
|
|
199
|
-
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,
|
|
212
|
+
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) {
|
|
200
213
|
ref(e);
|
|
201
214
|
if (textAreaRef) {
|
|
202
215
|
textAreaRef.current = e;
|
|
@@ -209,8 +222,54 @@ function TextFieldBase(_a) {
|
|
|
209
222
|
};
|
|
210
223
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: S_TextFieldBase() }, void 0);
|
|
211
224
|
}
|
|
212
|
-
var
|
|
213
|
-
var
|
|
225
|
+
var stepper_and_delete_style = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n"], ["\n position: absolute;\n right: ", ";\n"])), function (_a) {
|
|
226
|
+
var innerSpinButtonSize = _a.innerSpinButtonSize, stepperRightSpacing = _a.stepperRightSpacing;
|
|
227
|
+
return innerSpinButtonSize && stepperRightSpacing && innerSpinButtonSize + stepperRightSpacing + "px";
|
|
228
|
+
});
|
|
229
|
+
var S_IconButtonWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n\n ", "\n"], ["\n ", ";\n\n ", "\n"])), function (_a) {
|
|
230
|
+
var deleteIconMode = _a.deleteIconMode, stepperMode = _a.stepperMode, suffixText = _a.suffixText;
|
|
231
|
+
return deleteIconMode === 'use' && stepperMode === 'use' && !suffixText && stepper_and_delete_style;
|
|
232
|
+
}, function (_a) {
|
|
233
|
+
var innerSpinButtonSize = _a.innerSpinButtonSize, deleteIconMode = _a.deleteIconMode, stepperMode = _a.stepperMode, suffixText = _a.suffixText, isFocused = _a.isFocused, suffixTextWidth = _a.suffixTextWidth, stepperRightSpacing = _a.stepperRightSpacing;
|
|
234
|
+
if (deleteIconMode === 'use' && stepperMode === 'use' && suffixText && stepperRightSpacing) {
|
|
235
|
+
if (isFocused) {
|
|
236
|
+
if (innerSpinButtonSize) {
|
|
237
|
+
if (innerSpinButtonSize + constants_1.DELETE_BUTTON_BASE_SIZE > suffixTextWidth) {
|
|
238
|
+
return "margin-right: " + (innerSpinButtonSize - suffixTextWidth + stepperRightSpacing) + "px;";
|
|
239
|
+
}
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
return;
|
|
247
|
+
});
|
|
248
|
+
var S_RightBox = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: ", ";\n height: 100%;\n display: flex;\n align-items: center;\n right: 0;\n"], ["\n position: ", ";\n height: 100%;\n display: flex;\n align-items: center;\n right: 0;\n"])), function (_a) {
|
|
249
|
+
var deleteIconMode = _a.deleteIconMode, stepperMode = _a.stepperMode, suffixText = _a.suffixText;
|
|
250
|
+
if ((deleteIconMode === 'use' && stepperMode === 'use' && suffixText) ||
|
|
251
|
+
(deleteIconMode === 'use' && stepperMode === 'use') ||
|
|
252
|
+
stepperMode === 'use') {
|
|
253
|
+
return 'absolute';
|
|
254
|
+
}
|
|
255
|
+
return 'relative';
|
|
256
|
+
});
|
|
257
|
+
var S_IconBox = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n flex-direction: column;\n height: ", ";\n justify-content: center;\n position: absolute;\n right: ", ";\n width: ", ";\n visibility: hidden;\n\n ", ";\n"], ["\n align-items: center;\n display: flex;\n flex-direction: column;\n height: ", ";\n justify-content: center;\n position: absolute;\n right: ", ";\n width: ", ";\n visibility: hidden;\n\n ", ";\n"])), function (_a) {
|
|
258
|
+
var innerSpinButtonSize = _a.innerSpinButtonSize;
|
|
259
|
+
return innerSpinButtonSize && innerSpinButtonSize * 2 + "px";
|
|
260
|
+
}, function (_a) {
|
|
261
|
+
var stepperRightSpacing = _a.stepperRightSpacing;
|
|
262
|
+
return stepperRightSpacing && stepperRightSpacing + "px";
|
|
263
|
+
}, function (_a) {
|
|
264
|
+
var innerSpinButtonSize = _a.innerSpinButtonSize;
|
|
265
|
+
return innerSpinButtonSize && innerSpinButtonSize + "px";
|
|
266
|
+
}, function (_a) {
|
|
267
|
+
var isFocused = _a.isFocused;
|
|
268
|
+
return isFocused && 'visibility: visible;';
|
|
269
|
+
});
|
|
270
|
+
var S_SuffixTextBox = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
271
|
+
var S_InputWrapper = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 100%;\n position: relative;\n width: 100%;\n"], ["\n align-items: center;\n display: flex;\n height: 100%;\n position: relative;\n width: 100%;\n"])));
|
|
272
|
+
var read_only = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
214
273
|
var theme = _a.theme, colorTheme = _a.colorTheme;
|
|
215
274
|
return colorTheme &&
|
|
216
275
|
{
|
|
@@ -219,7 +278,7 @@ var read_only = (0, styled_components_1.css)(templateObject_2 || (templateObject
|
|
|
219
278
|
transparent: theme.ui_cpnt_textfield_text_colortheme_transparent_readonly
|
|
220
279
|
}[colorTheme];
|
|
221
280
|
});
|
|
222
|
-
var disabled = (0, styled_components_1.css)(
|
|
281
|
+
var disabled = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n color: ", ";\n pointer-events: none;\n"], ["\n color: ", ";\n pointer-events: none;\n"])), function (_a) {
|
|
223
282
|
var theme = _a.theme, colorTheme = _a.colorTheme;
|
|
224
283
|
return colorTheme &&
|
|
225
284
|
{
|
|
@@ -228,7 +287,7 @@ var disabled = (0, styled_components_1.css)(templateObject_3 || (templateObject_
|
|
|
228
287
|
transparent: theme.ui_cpnt_textfield_text_colortheme_transparent_disabled
|
|
229
288
|
}[colorTheme];
|
|
230
289
|
});
|
|
231
|
-
var basicStyle = (0, styled_components_1.css)(
|
|
290
|
+
var basicStyle = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n background-color: transparent;\n border: none;\n box-sizing: border-box;\n color: ", ";\n cursor: ", ";\n display: inline-flex;\n font-size: ", ";\n font-weight: ", ";\n height: 100%;\n justify-content: center;\n line-height: ", ";\n outline: 0;\n overflow: hidden;\n padding: 0;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n text-align: ", ";\n width: 100%;\n &::placeholder {\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n }\n\n ", ";\n ", "\n ", "\n\n ", "\n"], ["\n background-color: transparent;\n border: none;\n box-sizing: border-box;\n color: ", ";\n cursor: ", ";\n display: inline-flex;\n font-size: ", ";\n font-weight: ", ";\n height: 100%;\n justify-content: center;\n line-height: ", ";\n outline: 0;\n overflow: hidden;\n padding: 0;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n text-align: ", ";\n width: 100%;\n &::placeholder {\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n }\n\n ", ";\n ", "\n ", "\n\n ", "\n"])), function (_a) {
|
|
232
291
|
var theme = _a.theme, colorTheme = _a.colorTheme;
|
|
233
292
|
return colorTheme &&
|
|
234
293
|
{
|
|
@@ -277,10 +336,105 @@ var basicStyle = (0, styled_components_1.css)(templateObject_4 || (templateObjec
|
|
|
277
336
|
disabled: disabled
|
|
278
337
|
}[state];
|
|
279
338
|
}, function (_a) {
|
|
280
|
-
var
|
|
281
|
-
return
|
|
339
|
+
var fieldPaddingRight = _a.fieldPaddingRight;
|
|
340
|
+
return fieldPaddingRight && "padding-right: " + fieldPaddingRight + "px;";
|
|
341
|
+
}, function (_a) {
|
|
342
|
+
var fieldPaddingLeft = _a.fieldPaddingLeft;
|
|
343
|
+
return fieldPaddingLeft && "padding-left: " + fieldPaddingLeft + "px;";
|
|
344
|
+
}, function (_a) {
|
|
345
|
+
var deleteIconMode = _a.deleteIconMode, stepperMode = _a.stepperMode, suffixText = _a.suffixText;
|
|
346
|
+
if (deleteIconMode === 'use' && stepperMode === 'use' && suffixText) {
|
|
347
|
+
return delete_stepper_suffix;
|
|
348
|
+
}
|
|
349
|
+
if (deleteIconMode === 'use' && stepperMode === 'use' && !suffixText) {
|
|
350
|
+
return delete_stepper;
|
|
351
|
+
}
|
|
352
|
+
if (deleteIconMode === 'none' && stepperMode === 'use' && suffixText) {
|
|
353
|
+
return stepper_suffix;
|
|
354
|
+
}
|
|
355
|
+
if (deleteIconMode === 'none' && stepperMode === 'use' && !suffixText) {
|
|
356
|
+
return stepper;
|
|
357
|
+
}
|
|
358
|
+
return;
|
|
282
359
|
});
|
|
283
|
-
var
|
|
360
|
+
var delete_stepper_suffix = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n padding-right: ", ";\n"], ["\n padding-right: ", ";\n"])), function (_a) {
|
|
361
|
+
var innerSpinButtonSize = _a.innerSpinButtonSize, fieldPaddingRight = _a.fieldPaddingRight, isFocused = _a.isFocused, suffixTextWidth = _a.suffixTextWidth, stepperRightSpacing = _a.stepperRightSpacing;
|
|
362
|
+
if (innerSpinButtonSize && stepperRightSpacing) {
|
|
363
|
+
if (isFocused) {
|
|
364
|
+
if (innerSpinButtonSize + constants_1.DELETE_BUTTON_BASE_SIZE + stepperRightSpacing <
|
|
365
|
+
constants_1.DELETE_BUTTON_BASE_SIZE + suffixTextWidth) {
|
|
366
|
+
if (fieldPaddingRight) {
|
|
367
|
+
return constants_1.DELETE_BUTTON_BASE_SIZE + suffixTextWidth + fieldPaddingRight + "px";
|
|
368
|
+
}
|
|
369
|
+
return constants_1.DELETE_BUTTON_BASE_SIZE + suffixTextWidth + "px";
|
|
370
|
+
}
|
|
371
|
+
if (fieldPaddingRight) {
|
|
372
|
+
return constants_1.DELETE_BUTTON_BASE_SIZE + innerSpinButtonSize + fieldPaddingRight + stepperRightSpacing + "px";
|
|
373
|
+
}
|
|
374
|
+
return constants_1.DELETE_BUTTON_BASE_SIZE + innerSpinButtonSize + stepperRightSpacing + "px";
|
|
375
|
+
}
|
|
376
|
+
if (fieldPaddingRight) {
|
|
377
|
+
return suffixTextWidth + fieldPaddingRight + "px";
|
|
378
|
+
}
|
|
379
|
+
return suffixTextWidth + "px";
|
|
380
|
+
}
|
|
381
|
+
return;
|
|
382
|
+
});
|
|
383
|
+
var delete_stepper = (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n padding-right: ", ";\n"], ["\n padding-right: ", ";\n"])), function (_a) {
|
|
384
|
+
var innerSpinButtonSize = _a.innerSpinButtonSize, fieldPaddingRight = _a.fieldPaddingRight, isFocused = _a.isFocused, stepperRightSpacing = _a.stepperRightSpacing;
|
|
385
|
+
if (innerSpinButtonSize && stepperRightSpacing) {
|
|
386
|
+
if (isFocused) {
|
|
387
|
+
if (fieldPaddingRight) {
|
|
388
|
+
return innerSpinButtonSize + constants_1.DELETE_BUTTON_BASE_SIZE + fieldPaddingRight + stepperRightSpacing + "px";
|
|
389
|
+
}
|
|
390
|
+
return innerSpinButtonSize + constants_1.DELETE_BUTTON_BASE_SIZE + stepperRightSpacing + "px";
|
|
391
|
+
}
|
|
392
|
+
if (fieldPaddingRight) {
|
|
393
|
+
return fieldPaddingRight + "px";
|
|
394
|
+
}
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
return;
|
|
398
|
+
});
|
|
399
|
+
var stepper_suffix = (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n padding-right: ", ";\n"], ["\n padding-right: ", ";\n"])), function (_a) {
|
|
400
|
+
var innerSpinButtonSize = _a.innerSpinButtonSize, fieldPaddingRight = _a.fieldPaddingRight, isFocused = _a.isFocused, suffixTextWidth = _a.suffixTextWidth, stepperRightSpacing = _a.stepperRightSpacing;
|
|
401
|
+
if (innerSpinButtonSize && stepperRightSpacing) {
|
|
402
|
+
if (isFocused) {
|
|
403
|
+
if (innerSpinButtonSize + stepperRightSpacing < suffixTextWidth) {
|
|
404
|
+
if (fieldPaddingRight) {
|
|
405
|
+
return suffixTextWidth + fieldPaddingRight + "px";
|
|
406
|
+
}
|
|
407
|
+
return suffixTextWidth + "px";
|
|
408
|
+
}
|
|
409
|
+
if (fieldPaddingRight) {
|
|
410
|
+
return innerSpinButtonSize + stepperRightSpacing + fieldPaddingRight + "px";
|
|
411
|
+
}
|
|
412
|
+
return innerSpinButtonSize + stepperRightSpacing + "px";
|
|
413
|
+
}
|
|
414
|
+
if (fieldPaddingRight) {
|
|
415
|
+
return suffixTextWidth + fieldPaddingRight + "px";
|
|
416
|
+
}
|
|
417
|
+
return suffixTextWidth + "px";
|
|
418
|
+
}
|
|
419
|
+
return;
|
|
420
|
+
});
|
|
421
|
+
var stepper = (0, styled_components_1.css)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n padding-right: ", ";\n"], ["\n padding-right: ", ";\n"])), function (_a) {
|
|
422
|
+
var innerSpinButtonSize = _a.innerSpinButtonSize, fieldPaddingRight = _a.fieldPaddingRight, isFocused = _a.isFocused, stepperRightSpacing = _a.stepperRightSpacing;
|
|
423
|
+
if (innerSpinButtonSize && stepperRightSpacing) {
|
|
424
|
+
if (isFocused) {
|
|
425
|
+
if (fieldPaddingRight) {
|
|
426
|
+
return innerSpinButtonSize + stepperRightSpacing + fieldPaddingRight + "px";
|
|
427
|
+
}
|
|
428
|
+
return innerSpinButtonSize + stepperRightSpacing + "px";
|
|
429
|
+
}
|
|
430
|
+
if (fieldPaddingRight) {
|
|
431
|
+
return fieldPaddingRight + "px";
|
|
432
|
+
}
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
return;
|
|
436
|
+
});
|
|
437
|
+
var inputInnerSpinButtonStyle = (0, styled_components_1.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n -webkit-appearance: none;\n z-index: 1;\n cursor: pointer;\n height: ", ";\n margin-left: ", ";\n opacity: 1;\n width: ", ";\n position: absolute;\n right: ", ";\n top: calc(\n 50% - ", "\n );\n"], ["\n -webkit-appearance: none;\n z-index: 1;\n cursor: pointer;\n height: ", ";\n margin-left: ", ";\n opacity: 1;\n width: ", ";\n position: absolute;\n right: ", ";\n top: calc(\n 50% - ", "\n );\n"])), function (_a) {
|
|
284
438
|
var innerSpinButtonSize = _a.innerSpinButtonSize;
|
|
285
439
|
return innerSpinButtonSize && innerSpinButtonSize * 2 + "px";
|
|
286
440
|
}, function (_a) {
|
|
@@ -289,24 +443,23 @@ var inputInnerSpinButtonStyle = (0, styled_components_1.css)(templateObject_5 ||
|
|
|
289
443
|
}, function (_a) {
|
|
290
444
|
var innerSpinButtonSize = _a.innerSpinButtonSize;
|
|
291
445
|
return innerSpinButtonSize && innerSpinButtonSize + "px";
|
|
446
|
+
}, function (_a) {
|
|
447
|
+
var stepperRightSpacing = _a.stepperRightSpacing;
|
|
448
|
+
return stepperRightSpacing && stepperRightSpacing + "px";
|
|
449
|
+
}, function (_a) {
|
|
450
|
+
var innerSpinButtonSize = _a.innerSpinButtonSize;
|
|
451
|
+
return innerSpinButtonSize && innerSpinButtonSize + "px";
|
|
292
452
|
});
|
|
293
|
-
var S_Input = styled_components_1.default.input(
|
|
453
|
+
var S_Input = styled_components_1.default.input(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n ", "\n flex: 1;\n line-height: ", ";\n position: relative;\n\n ::-webkit-inner-spin-button {\n ", "\n }\n ::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n"], ["\n ", "\n flex: 1;\n line-height: ", ";\n position: relative;\n\n ::-webkit-inner-spin-button {\n ", "\n }\n ::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n"])), basicStyle, function (_a) {
|
|
294
454
|
var theme = _a.theme;
|
|
295
455
|
return theme.desktopLineHeight.singleLine;
|
|
296
456
|
}, function (_a) {
|
|
297
|
-
var stepperMode = _a.stepperMode, type = _a.type;
|
|
298
|
-
return stepperMode === 'use' && type === 'number'
|
|
457
|
+
var stepperMode = _a.stepperMode, type = _a.type, isFocused = _a.isFocused;
|
|
458
|
+
return stepperMode === 'use' && type === 'number' && isFocused
|
|
299
459
|
? inputInnerSpinButtonStyle
|
|
300
460
|
: '-webkit-appearance: none; margin: 0;';
|
|
301
461
|
});
|
|
302
|
-
var
|
|
303
|
-
var innerSpinButtonSize = _a.innerSpinButtonSize;
|
|
304
|
-
return innerSpinButtonSize && innerSpinButtonSize * 2 + "px";
|
|
305
|
-
}, constants_1.PIXEL_FOR_ICONS_CENTER, function (_a) {
|
|
306
|
-
var innerSpinButtonSize = _a.innerSpinButtonSize;
|
|
307
|
-
return innerSpinButtonSize && innerSpinButtonSize + "px";
|
|
308
|
-
});
|
|
309
|
-
var S_Auto = styled_components_1.default.textarea(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n ", "\n display: block;\n overflow-y: auto;\n resize: none;\n ", "\n ", ";\n"], ["\n ", "\n display: block;\n overflow-y: auto;\n resize: none;\n ", "\n ", ";\n"])), basicStyle, function (_a) {
|
|
462
|
+
var S_Auto = styled_components_1.default.textarea(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n ", "\n display: block;\n overflow-y: auto;\n resize: none;\n ", "\n ", ";\n"], ["\n ", "\n display: block;\n overflow-y: auto;\n resize: none;\n ", "\n ", ";\n"])), basicStyle, function (_a) {
|
|
310
463
|
var autoMaxRows = _a.autoMaxRows, textSize = _a.textSize, fieldHeight = _a.fieldHeight;
|
|
311
464
|
return autoMaxRows &&
|
|
312
465
|
fieldHeight &&
|
|
@@ -321,6 +474,6 @@ var S_Auto = styled_components_1.default.textarea(templateObject_8 || (templateO
|
|
|
321
474
|
Number(common_1.desktopLineHeight[textSize]) *
|
|
322
475
|
autoMinRows + "px;";
|
|
323
476
|
});
|
|
324
|
-
var S_Multi = styled_components_1.default.textarea(
|
|
477
|
+
var S_Multi = styled_components_1.default.textarea(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n ", "\n display: block;\n overflow-y: auto;\n resize: none;\n"], ["\n ", "\n display: block;\n overflow-y: auto;\n resize: none;\n"])), basicStyle);
|
|
325
478
|
exports.default = TextFieldBase;
|
|
326
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
479
|
+
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;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PIXEL_FOR_ICONS_CENTER = void 0;
|
|
3
|
+
exports.DELETE_BUTTON_BASE_SIZE = exports.PIXEL_FOR_ICONS_CENTER = void 0;
|
|
4
4
|
exports.PIXEL_FOR_ICONS_CENTER = 1;
|
|
5
|
+
exports.DELETE_BUTTON_BASE_SIZE = 32;
|
|
@@ -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:
|
|
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: textAlign, validation: validation, preventBlankMode: preventBlankMode, enterSubmitMode: enterSubmitMode, textLineType: "single", inputType: inputType, state: state, colorTheme: colorTheme, min: min, max: max, maxLength: maxLength, textSize: "form2", textWeight: fontWeight === 'bold' ? 'bold' : 'normal', fieldPaddingRight: size === 'large' || size === 'rlarge' ? 8 : undefined, deleteIconMode: deleteBtnMode, deleteIconSize: size === 'large' || size === 'rlarge' ? 20 : 16, deleteIconColor: deleteIconColor, isFocused: isFocused, autoComplete: autoComplete, stepperMode: inputType === 'number' && numberStepperMode === 'use' ? 'use' : 'none', stepperRightSpacing: size === 'large' || size === 'rlarge' ? 1 : -4, innerSpinButtonSize: size === 'small' ? 12 : 16, step: numberStep, suffixText: suffixText, suffixTextRightSpacingMode: size === 'large' || size === 'rlarge' ? 'use' : 'none', onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown }, void 0), (0, jsx_runtime_1.jsxs)(S_RightBox, { children: [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],
|
|
@@ -23,14 +23,18 @@ export declare type TextFieldBaseProps = {
|
|
|
23
23
|
maxLength?: number;
|
|
24
24
|
textSize: DesktopFontSize;
|
|
25
25
|
textWeight: FontWeight;
|
|
26
|
-
|
|
26
|
+
fieldPaddingRight?: number;
|
|
27
|
+
fieldPaddingLeft?: number;
|
|
27
28
|
fieldHeight?: number;
|
|
28
29
|
deleteIconMode?: 'none' | 'use';
|
|
29
30
|
deleteIconSize?: 12 | 16 | 20 | 24;
|
|
30
31
|
deleteIconColor?: UiColors;
|
|
32
|
+
suffixText?: PDSTextType;
|
|
33
|
+
suffixTextRightSpacingMode?: 'none' | 'use';
|
|
31
34
|
isFocused?: boolean;
|
|
32
35
|
autoComplete?: string;
|
|
33
36
|
stepperMode?: 'none' | 'use';
|
|
37
|
+
stepperRightSpacing?: number;
|
|
34
38
|
innerSpinButtonSize?: 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72;
|
|
35
39
|
step?: number;
|
|
36
40
|
onBlur?: (e: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
@@ -41,5 +45,5 @@ export declare type TextFieldBaseProps = {
|
|
|
41
45
|
onTarget?: () => void;
|
|
42
46
|
[x: string]: any;
|
|
43
47
|
} & Record<string, any>;
|
|
44
|
-
declare function TextFieldBase({ name, hintText, defaultText, textAlign, validation, preventBlankMode, enterSubmitMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, colorTheme, min, max, maxLength, textSize, textWeight, textPadding, fieldHeight, deleteIconMode, deleteIconSize, deleteIconColor, isFocused, autoComplete, stepperMode, innerSpinButtonSize, step, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onTarget, ...rest }: TextFieldBaseProps): JSX.Element;
|
|
48
|
+
declare function TextFieldBase({ name, hintText, defaultText, textAlign, validation, preventBlankMode, enterSubmitMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, colorTheme, min, max, maxLength, textSize, textWeight, fieldPaddingRight, fieldPaddingLeft, textPadding, fieldHeight, deleteIconMode, deleteIconSize, deleteIconColor, suffixText, suffixTextRightSpacingMode, isFocused, autoComplete, stepperMode, stepperRightSpacing, innerSpinButtonSize, step, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onTarget, ...rest }: TextFieldBaseProps): JSX.Element;
|
|
45
49
|
export default TextFieldBase;
|