pds-dev-kit-web 2.2.318 → 2.2.319-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -4
- package/dist/index.js +11 -2
- package/dist/src/core/pricing/hooks/useNewPriceTextField.d.ts +68 -0
- package/dist/src/core/pricing/hooks/useNewPriceTextField.js +223 -0
- package/dist/src/core/pricing/index.d.ts +4 -0
- package/dist/src/core/pricing/index.js +4 -0
- package/dist/src/core/pricing/input-utils.d.ts +17 -0
- package/dist/src/core/pricing/input-utils.js +67 -0
- package/dist/src/core/pricing/policy-context.d.ts +14 -0
- package/dist/src/core/pricing/policy-context.js +35 -0
- package/dist/src/core/pricing/policy-model.d.ts +39 -0
- package/dist/src/core/pricing/policy-model.js +77 -0
- package/dist/src/desktop/components/NewPriceTextField/NewPriceTextField.d.ts +8 -0
- package/dist/src/desktop/components/NewPriceTextField/NewPriceTextField.js +240 -0
- package/dist/src/desktop/components/NewPriceTextField/index.d.ts +1 -0
- package/dist/src/desktop/components/NewPriceTextField/index.js +8 -0
- package/dist/src/desktop/components/index.d.ts +2 -1
- package/dist/src/desktop/components/index.js +4 -2
- package/dist/src/desktop/index.d.ts +1 -1
- package/dist/src/desktop/index.js +2 -1
- package/dist/src/mobile/components/NewPriceTextField/NewPriceTextField.d.ts +8 -0
- package/dist/src/mobile/components/NewPriceTextField/NewPriceTextField.js +234 -0
- package/dist/src/mobile/components/NewPriceTextField/index.d.ts +1 -0
- package/dist/src/mobile/components/NewPriceTextField/index.js +8 -0
- package/dist/src/mobile/components/index.d.ts +2 -1
- package/dist/src/mobile/components/index.js +3 -1
- package/dist/src/mobile/index.d.ts +1 -1
- package/dist/src/mobile/index.js +2 -1
- package/dist/storybook-static/0.b73eaee9a88f178d62ed.manager.bundle.d.ts +0 -0
- package/dist/storybook-static/0.b73eaee9a88f178d62ed.manager.bundle.js +74 -0
- package/dist/storybook-static/1.f296d183a17268696d73.manager.bundle.d.ts +0 -0
- package/dist/storybook-static/1.f296d183a17268696d73.manager.bundle.js +190 -0
- package/dist/storybook-static/10.9998ba67d65d81d20896.manager.bundle.d.ts +0 -0
- package/dist/storybook-static/10.9998ba67d65d81d20896.manager.bundle.js +62 -0
- package/dist/storybook-static/11.49c687eaa6261f8b7be2.manager.bundle.d.ts +2 -0
- package/dist/storybook-static/11.49c687eaa6261f8b7be2.manager.bundle.js +534 -0
- package/dist/storybook-static/12.c9538ed3766c96f289e7.manager.bundle.d.ts +2 -0
- package/dist/storybook-static/12.c9538ed3766c96f289e7.manager.bundle.js +2 -0
- package/dist/storybook-static/5.fa71488e730c5c7f885f.manager.bundle.d.ts +18 -0
- package/dist/storybook-static/5.fa71488e730c5c7f885f.manager.bundle.js +527 -0
- package/dist/storybook-static/6.8096ae4aadde0743697b.manager.bundle.d.ts +3 -0
- package/dist/storybook-static/6.8096ae4aadde0743697b.manager.bundle.js +141 -0
- package/dist/storybook-static/7.b34baecbd082bc7b188d.manager.bundle.d.ts +0 -0
- package/dist/storybook-static/7.b34baecbd082bc7b188d.manager.bundle.js +8 -0
- package/dist/storybook-static/8.15577edffecf900a8de2.manager.bundle.d.ts +0 -0
- package/dist/storybook-static/8.15577edffecf900a8de2.manager.bundle.js +25 -0
- package/dist/storybook-static/9.d7d85aa0a49a98f17218.manager.bundle.d.ts +0 -0
- package/dist/storybook-static/9.d7d85aa0a49a98f17218.manager.bundle.js +94 -0
- package/dist/storybook-static/main.ce406c7e93b98325390e.manager.bundle.d.ts +2 -0
- package/dist/storybook-static/main.ce406c7e93b98325390e.manager.bundle.js +3824 -0
- package/dist/storybook-static/runtime~main.909d038f912f063e8837.manager.bundle.d.ts +1 -0
- package/dist/storybook-static/runtime~main.909d038f912f063e8837.manager.bundle.js +34 -0
- package/dist/storybook-static/vendors~main.d3455eed64b243c89325.manager.bundle.d.ts +3 -0
- package/dist/storybook-static/vendors~main.d3455eed64b243c89325.manager.bundle.js +11787 -0
- package/package.json +6 -2
- package/release-note.md +6 -0
- package/storybook-static/0.b73eaee9a88f178d62ed.manager.bundle.js +1 -0
- package/storybook-static/1.f296d183a17268696d73.manager.bundle.js +1 -0
- package/storybook-static/10.9998ba67d65d81d20896.manager.bundle.js +1 -0
- package/storybook-static/11.49c687eaa6261f8b7be2.manager.bundle.js +2 -0
- package/storybook-static/11.49c687eaa6261f8b7be2.manager.bundle.js.LICENSE.txt +12 -0
- package/storybook-static/12.c9538ed3766c96f289e7.manager.bundle.js +1 -0
- package/storybook-static/5.fa71488e730c5c7f885f.manager.bundle.js +2 -0
- package/storybook-static/5.fa71488e730c5c7f885f.manager.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/6.8096ae4aadde0743697b.manager.bundle.js +1 -0
- package/storybook-static/7.b34baecbd082bc7b188d.manager.bundle.js +1 -0
- package/storybook-static/8.15577edffecf900a8de2.manager.bundle.js +1 -0
- package/storybook-static/9.d7d85aa0a49a98f17218.manager.bundle.js +1 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/index.html +47 -0
- package/storybook-static/main.ce406c7e93b98325390e.manager.bundle.js +1 -0
- package/storybook-static/runtime~main.909d038f912f063e8837.manager.bundle.js +1 -0
- package/storybook-static/vendors~main.d3455eed64b243c89325.manager.bundle.js +2 -0
- package/storybook-static/vendors~main.d3455eed64b243c89325.manager.bundle.js.LICENSE.txt +88 -0
- package/vitest.config.ts +8 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
|
+
};
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
45
|
+
/* eslint-disable react/jsx-no-bind */
|
|
46
|
+
var react_1 = require("react");
|
|
47
|
+
var react_dom_1 = require("react-dom");
|
|
48
|
+
var clickTypeSystemUICssGenerator_1 = __importDefault(require("../../../common/utils/SystemUIPositionGenerator/clickTypeSystemUICssGenerator"));
|
|
49
|
+
var pricing_1 = require("../../../core/pricing");
|
|
50
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
51
|
+
var transitionStyle_1 = require("../../../common/styles/movement/transitionStyle");
|
|
52
|
+
var hybrid_1 = require("../../../hybrid");
|
|
53
|
+
var components_1 = require("../../common/components");
|
|
54
|
+
var ContextMenu_1 = require("../ContextMenu");
|
|
55
|
+
var ContextMenuItem_1 = require("../ContextMenuItem");
|
|
56
|
+
var TextLabel_1 = require("../TextLabel");
|
|
57
|
+
/**
|
|
58
|
+
* 문서: Web - PriceTextField (Added in 2.2) — Mobile
|
|
59
|
+
* 통화 정책은 PricingPolicyProvider에서 받고, 값은 react-hook-form 폼이 단일 원천이다.
|
|
60
|
+
*/
|
|
61
|
+
function NewPriceTextField(props) {
|
|
62
|
+
var name = props.name, _a = props.size, size = _a === void 0 ? 'large' : _a, _b = props.state, state = _b === void 0 ? 'normal' : _b, _c = props.responsiveMode, responsiveMode = _c === void 0 ? 'none' : _c, customWidth = props.customWidth, _d = props.deleteBtnMode, deleteBtnMode = _d === void 0 ? 'use' : _d;
|
|
63
|
+
var _e = (0, pricing_1.useNewPriceTextField)(props), hintText = _e.hintText, displayValue = _e.displayValue, rules = _e.rules, errorMessage = _e.errorMessage, isFocused = _e.isFocused, isInputReadOnly = _e.isInputReadOnly, selectedCurrency = _e.selectedCurrency, currencyOptions = _e.currencyOptions, dropdownState = _e.dropdownState, handlers = _e.handlers;
|
|
64
|
+
var _f = (0, react_1.useState)(false), isDropdownOpen = _f[0], setIsDropdownOpen = _f[1];
|
|
65
|
+
var _g = (0, react_1.useState)(null), contextMenuSizeOffset = _g[0], setContextMenuSizeOffset = _g[1];
|
|
66
|
+
var _h = (0, react_1.useState)(null), dropdownPositionOffset = _h[0], setDropdownPositionOffset = _h[1];
|
|
67
|
+
var contextMenuRef = (0, react_1.useRef)(null);
|
|
68
|
+
var dropdownRef = (0, react_1.useRef)(null);
|
|
69
|
+
var isLargeSize = size === 'large' || size === 'rlarge';
|
|
70
|
+
var isError = Boolean(errorMessage);
|
|
71
|
+
var isDropdownReadOnly = dropdownState === 'read_only' || state === 'read_only';
|
|
72
|
+
/** 드롭다운 위치 계산 (포털) */
|
|
73
|
+
(0, react_1.useEffect)(function () {
|
|
74
|
+
if (!isDropdownOpen) {
|
|
75
|
+
setContextMenuSizeOffset(null);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (dropdownRef.current) {
|
|
79
|
+
var _a = dropdownRef.current.getBoundingClientRect(), top_1 = _a.top, right = _a.right, left = _a.left, bottom = _a.bottom;
|
|
80
|
+
setDropdownPositionOffset({
|
|
81
|
+
top: top_1 + window.scrollY,
|
|
82
|
+
right: right + window.scrollX,
|
|
83
|
+
bottom: bottom + window.scrollY,
|
|
84
|
+
left: left + window.scrollX
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
if (contextMenuRef.current) {
|
|
88
|
+
setContextMenuSizeOffset({
|
|
89
|
+
height: contextMenuRef.current.offsetHeight,
|
|
90
|
+
width: contextMenuRef.current.offsetWidth
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}, [isDropdownOpen]);
|
|
94
|
+
var contextMenuPositionCss = (0, clickTypeSystemUICssGenerator_1.default)({
|
|
95
|
+
sizeOffset: contextMenuSizeOffset,
|
|
96
|
+
positionOffset: dropdownPositionOffset
|
|
97
|
+
});
|
|
98
|
+
var handleDropdownClick = function () {
|
|
99
|
+
if (isDropdownReadOnly) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
setIsDropdownOpen(function (open) { return !open; });
|
|
103
|
+
};
|
|
104
|
+
var handleDropdownBlur = function () {
|
|
105
|
+
setIsDropdownOpen(false);
|
|
106
|
+
};
|
|
107
|
+
var handleCurrencySelect = function (option) {
|
|
108
|
+
setIsDropdownOpen(false);
|
|
109
|
+
handlers.selectCurrency(option.currency);
|
|
110
|
+
};
|
|
111
|
+
var contextMenuWidth = customWidth || (dropdownRef.current ? "".concat(dropdownRef.current.offsetWidth, "px") : '');
|
|
112
|
+
return ((0, jsx_runtime_1.jsxs)(S_NewPriceTextField, __assign({ "x-pds-name": "NewPriceTextField", "x-pds-element-type": "component", "x-pds-device-type": "mobile", inputSize: size, responsiveMode: responsiveMode, customWidth: customWidth }, { children: [(0, jsx_runtime_1.jsxs)(S_ComponentBox, __assign({ inputSize: size, responsiveMode: responsiveMode, isFocused: isFocused, isError: isError, state: state, customWidth: customWidth, isInputReadOnly: isInputReadOnly }, { children: [(0, jsx_runtime_1.jsx)(S_TextFieldBaseWrapper, __assign({ state: state, inputSize: size, isInputReadOnly: isInputReadOnly }, { children: (0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, value: displayValue, validation: rules, textAlign: "right", textLineType: "single", inputType: "text", inputMode: "decimal", preventBlankMode: "all", enterSubmitMode: "none", state: isInputReadOnly ? 'read_only' : 'normal', textSize: "form2", textWeight: "bold", hintTextWeight: "normal", fieldPaddingRight: 12, deleteIconMode: isLargeSize && deleteBtnMode === 'use' && !isInputReadOnly ? 'use' : 'none', deleteIconSize: 20, deleteIconColor: "ui_cpnt_button_icon_disabled", isFocused: isFocused, suffixTextRightSpacingMode: isLargeSize ? 'use' : 'none', onChange: handlers.onChange, onFocus: handlers.onFocus, onBlur: handlers.onBlur, onKeyDown: handlers.onKeyDown, onKeyUp: handlers.onKeyUp, onTarget: handlers.onTarget }) })), (0, jsx_runtime_1.jsx)(S_DropdownWrapper, __assign({ ref: dropdownRef, inputSize: size, onClick: handleDropdownClick, onBlur: handleDropdownBlur, tabIndex: 0, isFocused: isDropdownOpen, dropdownState: isDropdownReadOnly ? 'read_only' : 'normal', isError: isError }, { children: (0, jsx_runtime_1.jsxs)(S_Select, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: selectedCurrency, styleTheme: "caption1Bold", singleLineMode: "use", colorTheme: "sysTextPrimary", ellipsisMode: "use", colorOverride: isDropdownReadOnly ? 'ui_cpnt_button_text_disabled' : 'ui_cpnt_button_text_enabled', lineLimit: 1 }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }), (0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, fillType: "line", iconName: isDropdownOpen ? 'ic_arrow_up' : 'ic_arrow_down', colorKey: isDropdownReadOnly ? 'ui_cpnt_dropdown_icon_02' : 'ui_cpnt_dropdown_icon_01' })] }) }))] })), isDropdownOpen &&
|
|
113
|
+
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_ContextMenuWrapper, __assign({ ref: contextMenuRef, contextMenuPositionCss: contextMenuPositionCss }, { children: (0, jsx_runtime_1.jsx)(ContextMenu_1.ContextMenu, __assign({ autoWidthMode: "use", customWidth: contextMenuWidth }, { children: currencyOptions.map(function (option) { return ((0, jsx_runtime_1.jsx)("div", __assign({ onMouseDown: function () { return handleCurrencySelect(option); } }, { children: (0, jsx_runtime_1.jsx)(ContextMenuItem_1.ContextMenuItem, { option: option, size: size === 'rlarge' ? 'large' : size, isSelected: selectedCurrency === option.currency, state: option.state, displayType: "text_only" }) }), option.value)); }) })) })), document.body), errorMessage && state === 'normal' && (0, jsx_runtime_1.jsx)(S_Error, { children: errorMessage })] })));
|
|
114
|
+
}
|
|
115
|
+
var S_NewPriceTextField = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", ";\n ", ";\n ", "\n"], ["\n ", ";\n ", ";\n ", "\n"])), function (_a) {
|
|
116
|
+
var inputSize = _a.inputSize;
|
|
117
|
+
return inputSize &&
|
|
118
|
+
{
|
|
119
|
+
small: 'width: 188px;',
|
|
120
|
+
medium: 'width: 188px;',
|
|
121
|
+
large: 'width: 432px;',
|
|
122
|
+
rlarge: 'width: 100%'
|
|
123
|
+
}[inputSize];
|
|
124
|
+
}, function (_a) {
|
|
125
|
+
var responsiveMode = _a.responsiveMode;
|
|
126
|
+
return responsiveMode === 'use' && 'width: 100%';
|
|
127
|
+
}, function (_a) {
|
|
128
|
+
var customWidth = _a.customWidth;
|
|
129
|
+
return customWidth && "width: ".concat(customWidth, ";");
|
|
130
|
+
});
|
|
131
|
+
var small = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-radius: 10px;\n height: 32px;\n width: 188px;\n"], ["\n border-radius: 10px;\n height: 32px;\n width: 188px;\n"])));
|
|
132
|
+
var medium = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 12px;\n height: 40px;\n width: 188px;\n"], ["\n border-radius: 12px;\n height: 40px;\n width: 188px;\n"])));
|
|
133
|
+
var large = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border-radius: 14px;\n height: 48px;\n width: ", ";\n"], ["\n border-radius: 14px;\n height: 48px;\n width: ", ";\n"])), function (_a) {
|
|
134
|
+
var inputSize = _a.inputSize;
|
|
135
|
+
return (inputSize === 'rlarge' ? '100%' : '432px');
|
|
136
|
+
});
|
|
137
|
+
var S_Select = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: center;\n width: 100%;\n"], ["\n align-items: center;\n display: flex;\n justify-content: center;\n width: 100%;\n"])));
|
|
138
|
+
var S_ContextMenuWrapper = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: block;\n position: absolute;\n ", ";\n"], ["\n display: block;\n position: absolute;\n ", ";\n"])), function (_a) {
|
|
139
|
+
var contextMenuPositionCss = _a.contextMenuPositionCss;
|
|
140
|
+
return contextMenuPositionCss;
|
|
141
|
+
});
|
|
142
|
+
var S_Error = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"])), function (_a) {
|
|
143
|
+
var theme = _a.theme;
|
|
144
|
+
return theme.ui_cpnt_textfield_text_error;
|
|
145
|
+
}, function (_a) {
|
|
146
|
+
var theme = _a.theme;
|
|
147
|
+
return theme.mobileFontSize.caption2;
|
|
148
|
+
}, function (_a) {
|
|
149
|
+
var theme = _a.theme;
|
|
150
|
+
return theme.fontWeight.normal;
|
|
151
|
+
}, function (_a) {
|
|
152
|
+
var theme = _a.theme;
|
|
153
|
+
return theme.mobileLineHeight.caption2;
|
|
154
|
+
}, function (_a) {
|
|
155
|
+
var theme = _a.theme;
|
|
156
|
+
return theme.spacing.spacingA;
|
|
157
|
+
});
|
|
158
|
+
var S_ComponentBox = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n align-items: center;\n border: solid 2px\n ", ";\n box-sizing: border-box;\n ", ";\n display: flex;\n ", "\n ", ";\n ", "\n"], ["\n align-items: center;\n border: solid 2px\n ", ";\n box-sizing: border-box;\n ", ";\n display: flex;\n ", "\n ", ";\n ", "\n"])), function (_a) {
|
|
159
|
+
var theme = _a.theme, isError = _a.isError, isFocused = _a.isFocused, state = _a.state;
|
|
160
|
+
if (state === 'read_only') {
|
|
161
|
+
return theme.ui_cpnt_textfield_border_disabled;
|
|
162
|
+
}
|
|
163
|
+
if (isError) {
|
|
164
|
+
return theme.ui_cpnt_textfield_border_error;
|
|
165
|
+
}
|
|
166
|
+
if (isFocused) {
|
|
167
|
+
return theme.ui_cpnt_textfield_border_focus;
|
|
168
|
+
}
|
|
169
|
+
return theme.ui_cpnt_textfield_border_normal;
|
|
170
|
+
}, function (_a) {
|
|
171
|
+
var inputSize = _a.inputSize;
|
|
172
|
+
return inputSize &&
|
|
173
|
+
{
|
|
174
|
+
small: small,
|
|
175
|
+
medium: medium,
|
|
176
|
+
large: large,
|
|
177
|
+
rlarge: large
|
|
178
|
+
}[inputSize];
|
|
179
|
+
}, transitionStyle_1.InputTransition, function (_a) {
|
|
180
|
+
var responsiveMode = _a.responsiveMode;
|
|
181
|
+
return responsiveMode === 'use' && 'width: 100%';
|
|
182
|
+
}, function (_a) {
|
|
183
|
+
var customWidth = _a.customWidth;
|
|
184
|
+
return customWidth && "width: ".concat(customWidth, ";");
|
|
185
|
+
});
|
|
186
|
+
var S_TextFieldBaseWrapper = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n display: flex;\n flex: 1;\n height: 100%;\n min-width: 0;\n padding-left: ", ";\n\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n display: flex;\n flex: 1;\n height: 100%;\n min-width: 0;\n padding-left: ", ";\n\n ", "\n"])), function (_a) {
|
|
187
|
+
var theme = _a.theme, state = _a.state, isInputReadOnly = _a.isInputReadOnly;
|
|
188
|
+
return isInputReadOnly || state === 'read_only'
|
|
189
|
+
? theme.ui_cpnt_textfield_base_disabled
|
|
190
|
+
: theme.ui_cpnt_textfield_base_normal;
|
|
191
|
+
}, function (_a) {
|
|
192
|
+
var inputSize = _a.inputSize;
|
|
193
|
+
switch (inputSize) {
|
|
194
|
+
case 'small':
|
|
195
|
+
return '8px 0 0 8px';
|
|
196
|
+
case 'medium':
|
|
197
|
+
return '10px 0 0 10px';
|
|
198
|
+
default:
|
|
199
|
+
return '12px 0 0 12px';
|
|
200
|
+
}
|
|
201
|
+
}, function (_a) {
|
|
202
|
+
var theme = _a.theme;
|
|
203
|
+
return theme.spacing.spacingD;
|
|
204
|
+
}, function (_a) {
|
|
205
|
+
var state = _a.state, isInputReadOnly = _a.isInputReadOnly, theme = _a.theme;
|
|
206
|
+
return state === 'normal' &&
|
|
207
|
+
!isInputReadOnly && (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n &:active {\n background-color: ", ";\n }\n "], ["\n &:active {\n background-color: ", ";\n }\n "])), theme.ui_cpnt_textfield_base_pressed);
|
|
208
|
+
});
|
|
209
|
+
var S_DropdownWrapper = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n display: flex;\n height: 100%;\n min-width: 50px;\n outline: none;\n padding: 0\n ", ";\n\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n display: flex;\n height: 100%;\n min-width: 50px;\n outline: none;\n padding: 0\n ", ";\n\n ", "\n"])), function (_a) {
|
|
210
|
+
var theme = _a.theme, dropdownState = _a.dropdownState;
|
|
211
|
+
return dropdownState === 'read_only'
|
|
212
|
+
? theme.ui_cpnt_textfield_base_disabled
|
|
213
|
+
: theme.ui_cpnt_textfield_base_normal;
|
|
214
|
+
}, function (_a) {
|
|
215
|
+
var inputSize = _a.inputSize;
|
|
216
|
+
switch (inputSize) {
|
|
217
|
+
case 'small':
|
|
218
|
+
return '0 8px 8px 0';
|
|
219
|
+
case 'medium':
|
|
220
|
+
return '0 10px 10px 0';
|
|
221
|
+
default:
|
|
222
|
+
return '0 12px 12px 0';
|
|
223
|
+
}
|
|
224
|
+
}, function (_a) {
|
|
225
|
+
var theme = _a.theme, inputSize = _a.inputSize;
|
|
226
|
+
return inputSize === 'small' || inputSize === 'medium'
|
|
227
|
+
? theme.spacing.spacingB
|
|
228
|
+
: theme.spacing.spacingD;
|
|
229
|
+
}, function (_a) {
|
|
230
|
+
var dropdownState = _a.dropdownState, theme = _a.theme;
|
|
231
|
+
return dropdownState === 'normal' && (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n &:active {\n background-color: ", ";\n }\n "], ["\n &:active {\n background-color: ", ";\n }\n "])), theme.ui_cpnt_textfield_base_pressed);
|
|
232
|
+
});
|
|
233
|
+
exports.default = NewPriceTextField;
|
|
234
|
+
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NewPriceTextField } from './NewPriceTextField';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NewPriceTextField = void 0;
|
|
7
|
+
var NewPriceTextField_1 = require("./NewPriceTextField");
|
|
8
|
+
Object.defineProperty(exports, "NewPriceTextField", { enumerable: true, get: function () { return __importDefault(NewPriceTextField_1).default; } });
|
|
@@ -26,6 +26,7 @@ import { MainButton } from './MainButton';
|
|
|
26
26
|
import { MobileAlertDialog } from './MobileAlertDialog';
|
|
27
27
|
import { MobileHeaderBar } from './MobileHeaderBar';
|
|
28
28
|
import { MobileTabBar } from './MobileTabBar';
|
|
29
|
+
import { NewPriceTextField } from './NewPriceTextField';
|
|
29
30
|
import { PriceTextField } from './PriceTextField';
|
|
30
31
|
import { PriceTextLabel } from './PriceTextLabel';
|
|
31
32
|
import { Radio } from './Radio';
|
|
@@ -43,4 +44,4 @@ import { TextLabel } from './TextLabel';
|
|
|
43
44
|
import { UploadIconButton } from './UploadIconButton';
|
|
44
45
|
import { UploadMainButton } from './UploadMainButton';
|
|
45
46
|
import { UploadTextButton } from './UploadTextButton';
|
|
46
|
-
export { BasicButtonGroup, BasicChatListItem, BasicFormGroup, BasicList, BasicListItem, BlogTextField, BodyTextGroup, BoxItem, Card, CardList, ChatBubbleListItem, ChatList, Checkbox, Chip, ComboBox, ContextMenu, ContextMenuItem, DatePicker, Dropdown, FloatingActionButton, HorizontalFormGroup, IconButton, ImageSlide, LottieReactionButton, MainButton, MobileAlertDialog, MobileHeaderBar, MobileTabBar, PriceTextField, PriceTextLabel, Radio, ReactionButton, SegmentedButtonGroup, Select, Slider, Snackbar, SpeechBubble, StatusBlock, TextButton, TextField, TextLabel, UploadIconButton, UploadMainButton, UploadTextButton, RichTextEditor };
|
|
47
|
+
export { BasicButtonGroup, BasicChatListItem, BasicFormGroup, BasicList, BasicListItem, BlogTextField, BodyTextGroup, BoxItem, Card, CardList, ChatBubbleListItem, ChatList, Checkbox, Chip, ComboBox, ContextMenu, ContextMenuItem, DatePicker, Dropdown, FloatingActionButton, HorizontalFormGroup, IconButton, ImageSlide, LottieReactionButton, MainButton, MobileAlertDialog, MobileHeaderBar, MobileTabBar, PriceTextField, NewPriceTextField, PriceTextLabel, Radio, ReactionButton, SegmentedButtonGroup, Select, Slider, Snackbar, SpeechBubble, StatusBlock, TextButton, TextField, TextLabel, UploadIconButton, UploadMainButton, UploadTextButton, RichTextEditor };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RichTextEditor = exports.UploadTextButton = exports.UploadMainButton = exports.UploadIconButton = exports.TextLabel = exports.TextField = exports.TextButton = exports.StatusBlock = exports.SpeechBubble = exports.Snackbar = exports.Slider = exports.Select = exports.SegmentedButtonGroup = exports.ReactionButton = exports.Radio = exports.PriceTextLabel = exports.PriceTextField = exports.MobileTabBar = exports.MobileHeaderBar = exports.MobileAlertDialog = exports.MainButton = exports.LottieReactionButton = exports.ImageSlide = exports.IconButton = exports.HorizontalFormGroup = exports.FloatingActionButton = exports.Dropdown = exports.DatePicker = exports.ContextMenuItem = exports.ContextMenu = exports.ComboBox = exports.Chip = exports.Checkbox = exports.ChatList = exports.ChatBubbleListItem = exports.CardList = exports.Card = exports.BoxItem = exports.BodyTextGroup = exports.BlogTextField = exports.BasicListItem = exports.BasicList = exports.BasicFormGroup = exports.BasicChatListItem = exports.BasicButtonGroup = void 0;
|
|
3
|
+
exports.RichTextEditor = exports.UploadTextButton = exports.UploadMainButton = exports.UploadIconButton = exports.TextLabel = exports.TextField = exports.TextButton = exports.StatusBlock = exports.SpeechBubble = exports.Snackbar = exports.Slider = exports.Select = exports.SegmentedButtonGroup = exports.ReactionButton = exports.Radio = exports.PriceTextLabel = exports.NewPriceTextField = exports.PriceTextField = exports.MobileTabBar = exports.MobileHeaderBar = exports.MobileAlertDialog = exports.MainButton = exports.LottieReactionButton = exports.ImageSlide = exports.IconButton = exports.HorizontalFormGroup = exports.FloatingActionButton = exports.Dropdown = exports.DatePicker = exports.ContextMenuItem = exports.ContextMenu = exports.ComboBox = exports.Chip = exports.Checkbox = exports.ChatList = exports.ChatBubbleListItem = exports.CardList = exports.Card = exports.BoxItem = exports.BodyTextGroup = exports.BlogTextField = exports.BasicListItem = exports.BasicList = exports.BasicFormGroup = exports.BasicChatListItem = exports.BasicButtonGroup = void 0;
|
|
4
4
|
var BasicButtonGroup_1 = require("./BasicButtonGroup");
|
|
5
5
|
Object.defineProperty(exports, "BasicButtonGroup", { enumerable: true, get: function () { return BasicButtonGroup_1.BasicButtonGroup; } });
|
|
6
6
|
var BasicChatListItem_1 = require("./BasicChatListItem");
|
|
@@ -57,6 +57,8 @@ var MobileHeaderBar_1 = require("./MobileHeaderBar");
|
|
|
57
57
|
Object.defineProperty(exports, "MobileHeaderBar", { enumerable: true, get: function () { return MobileHeaderBar_1.MobileHeaderBar; } });
|
|
58
58
|
var MobileTabBar_1 = require("./MobileTabBar");
|
|
59
59
|
Object.defineProperty(exports, "MobileTabBar", { enumerable: true, get: function () { return MobileTabBar_1.MobileTabBar; } });
|
|
60
|
+
var NewPriceTextField_1 = require("./NewPriceTextField");
|
|
61
|
+
Object.defineProperty(exports, "NewPriceTextField", { enumerable: true, get: function () { return NewPriceTextField_1.NewPriceTextField; } });
|
|
60
62
|
var PriceTextField_1 = require("./PriceTextField");
|
|
61
63
|
Object.defineProperty(exports, "PriceTextField", { enumerable: true, get: function () { return PriceTextField_1.PriceTextField; } });
|
|
62
64
|
var PriceTextLabel_1 = require("./PriceTextLabel");
|
|
@@ -9,5 +9,5 @@ export { ContainersBox as MPContainersBox } from './layout/LayoutMP/ContainersBo
|
|
|
9
9
|
export { LayoutMS } from './layout/LayoutMS';
|
|
10
10
|
export { NavigationContainer as MSNavigationContainer } from './layout/LayoutMS/Containers';
|
|
11
11
|
export { ContainersBox as MSContainersBox } from './layout/LayoutMS/ContainersBox';
|
|
12
|
-
export { BasicButtonGroup as M_BasicButtonGroup, BasicChatListItem as M_BasicChatListItem, BasicFormGroup as M_BasicFormGroup, BasicList as M_BasicList, BasicListItem as M_BasicListItem, BlogTextField as M_BlogTextField, BodyTextGroup as M_BodyTextGroup, BoxItem as M_BoxItem, Card as M_Card, CardList as M_CardList, ChatBubbleListItem as M_ChatBubbleListItem, ChatList as M_ChatList, Checkbox as M_Checkbox, Chip as M_Chip, ComboBox as M_ComboBox, ContextMenu as M_ContextMenu, ContextMenuItem as M_ContextMenuItem, DatePicker as M_DatePicker, Dropdown as M_Dropdown, FloatingActionButton as M_FloatingActionButton, HorizontalFormGroup as M_HorizontalFormGroup, IconButton as M_IconButton, ImageSlide as M_ImageSlide, LottieReactionButton as M_LottieReactionButton, MainButton as M_MainButton, MobileAlertDialog as M_MobileAlertDialog, MobileHeaderBar as M_MobileHeaderBar, MobileTabBar as M_MobileTabBar, Radio as M_Radio, ReactionButton as M_ReactionButton, SegmentedButtonGroup as M_SegmentedButtonGroup, Select as M_Select, Slider as M_Slider, Snackbar as M_Snackbar, SpeechBubble as M_SpeechBubble, StatusBlock as M_StatusBlock, TextButton as M_TextButton, PriceTextField as M_PriceTextField, TextField as M_TextField, TextLabel as M_TextLabel, PriceTextLabel as M_PriceTextLabel, UploadIconButton as M_UploadIconButton, UploadMainButton as M_UploadMainButton, UploadTextButton as M_UploadTextButton, RichTextEditor as M_RichTextEditor } from './components';
|
|
12
|
+
export { BasicButtonGroup as M_BasicButtonGroup, BasicChatListItem as M_BasicChatListItem, BasicFormGroup as M_BasicFormGroup, BasicList as M_BasicList, BasicListItem as M_BasicListItem, BlogTextField as M_BlogTextField, BodyTextGroup as M_BodyTextGroup, BoxItem as M_BoxItem, Card as M_Card, CardList as M_CardList, ChatBubbleListItem as M_ChatBubbleListItem, ChatList as M_ChatList, Checkbox as M_Checkbox, Chip as M_Chip, ComboBox as M_ComboBox, ContextMenu as M_ContextMenu, ContextMenuItem as M_ContextMenuItem, DatePicker as M_DatePicker, Dropdown as M_Dropdown, FloatingActionButton as M_FloatingActionButton, HorizontalFormGroup as M_HorizontalFormGroup, IconButton as M_IconButton, ImageSlide as M_ImageSlide, LottieReactionButton as M_LottieReactionButton, MainButton as M_MainButton, MobileAlertDialog as M_MobileAlertDialog, MobileHeaderBar as M_MobileHeaderBar, MobileTabBar as M_MobileTabBar, Radio as M_Radio, ReactionButton as M_ReactionButton, SegmentedButtonGroup as M_SegmentedButtonGroup, Select as M_Select, Slider as M_Slider, Snackbar as M_Snackbar, SpeechBubble as M_SpeechBubble, StatusBlock as M_StatusBlock, TextButton as M_TextButton, PriceTextField as M_PriceTextField, NewPriceTextField as M_NewPriceTextField, TextField as M_TextField, TextLabel as M_TextLabel, PriceTextLabel as M_PriceTextLabel, UploadIconButton as M_UploadIconButton, UploadMainButton as M_UploadMainButton, UploadTextButton as M_UploadTextButton, RichTextEditor as M_RichTextEditor } from './components';
|
|
13
13
|
export { AnnotationSheet as M_AnnotationSheet, ContentSheet as M_ContentSheet, MobileBasicModal as M_MobileBasicModal, SectionSheet as M_SectionSheet } from './panels';
|
package/dist/src/mobile/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.M_PriceTextField = exports.M_TextButton = exports.M_StatusBlock = exports.M_SpeechBubble = exports.M_Snackbar = exports.M_Slider = exports.M_Select = exports.M_SegmentedButtonGroup = exports.M_ReactionButton = exports.M_Radio = exports.M_MobileTabBar = exports.M_MobileHeaderBar = exports.M_MobileAlertDialog = exports.M_MainButton = exports.M_LottieReactionButton = exports.M_ImageSlide = exports.M_IconButton = exports.M_HorizontalFormGroup = exports.M_FloatingActionButton = exports.M_Dropdown = exports.M_DatePicker = exports.M_ContextMenuItem = exports.M_ContextMenu = exports.M_ComboBox = exports.M_Chip = exports.M_Checkbox = exports.M_ChatList = exports.M_ChatBubbleListItem = exports.M_CardList = exports.M_Card = exports.M_BoxItem = exports.M_BodyTextGroup = exports.M_BlogTextField = exports.M_BasicListItem = exports.M_BasicList = exports.M_BasicFormGroup = exports.M_BasicChatListItem = exports.M_BasicButtonGroup = exports.MSContainersBox = exports.MSNavigationContainer = exports.LayoutMS = exports.MPContainersBox = exports.MPTabContainer = exports.MPNavigationContainer = exports.LayoutMP = exports.MMContainersBox = exports.MMNavigationContainer = exports.LayoutMM = exports.MFContainersBox = exports.LayoutMF = void 0;
|
|
4
|
-
exports.M_SectionSheet = exports.M_MobileBasicModal = exports.M_ContentSheet = exports.M_AnnotationSheet = exports.M_RichTextEditor = exports.M_UploadTextButton = exports.M_UploadMainButton = exports.M_UploadIconButton = exports.M_PriceTextLabel = exports.M_TextLabel = exports.M_TextField = void 0;
|
|
4
|
+
exports.M_SectionSheet = exports.M_MobileBasicModal = exports.M_ContentSheet = exports.M_AnnotationSheet = exports.M_RichTextEditor = exports.M_UploadTextButton = exports.M_UploadMainButton = exports.M_UploadIconButton = exports.M_PriceTextLabel = exports.M_TextLabel = exports.M_TextField = exports.M_NewPriceTextField = void 0;
|
|
5
5
|
// layoutMF
|
|
6
6
|
var LayoutMF_1 = require("./layout/LayoutMF");
|
|
7
7
|
Object.defineProperty(exports, "LayoutMF", { enumerable: true, get: function () { return LayoutMF_1.LayoutMF; } });
|
|
@@ -69,6 +69,7 @@ Object.defineProperty(exports, "M_SpeechBubble", { enumerable: true, get: functi
|
|
|
69
69
|
Object.defineProperty(exports, "M_StatusBlock", { enumerable: true, get: function () { return components_1.StatusBlock; } });
|
|
70
70
|
Object.defineProperty(exports, "M_TextButton", { enumerable: true, get: function () { return components_1.TextButton; } });
|
|
71
71
|
Object.defineProperty(exports, "M_PriceTextField", { enumerable: true, get: function () { return components_1.PriceTextField; } });
|
|
72
|
+
Object.defineProperty(exports, "M_NewPriceTextField", { enumerable: true, get: function () { return components_1.NewPriceTextField; } });
|
|
72
73
|
Object.defineProperty(exports, "M_TextField", { enumerable: true, get: function () { return components_1.TextField; } });
|
|
73
74
|
Object.defineProperty(exports, "M_TextLabel", { enumerable: true, get: function () { return components_1.TextLabel; } });
|
|
74
75
|
Object.defineProperty(exports, "M_PriceTextLabel", { enumerable: true, get: function () { return components_1.PriceTextLabel; } });
|
|
File without changes
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
(window.webpackJsonp = window.webpackJsonp || []).push([[0], { 457: function (module, __webpack_exports__, __webpack_require__) {
|
|
2
|
+
"use strict";
|
|
3
|
+
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, "WithTooltipPure", (function () { return WithTooltip_WithTooltipPure; })), __webpack_require__.d(__webpack_exports__, "WithToolTipState", (function () { return WithTooltip_WithToolTipState; })), __webpack_require__.d(__webpack_exports__, "WithTooltip", (function () { return WithTooltip_WithToolTipState; }));
|
|
4
|
+
__webpack_require__(16), __webpack_require__(50), __webpack_require__(23), __webpack_require__(4), __webpack_require__(15), __webpack_require__(9), __webpack_require__(5), __webpack_require__(13), __webpack_require__(7), __webpack_require__(10), __webpack_require__(14), __webpack_require__(17), __webpack_require__(6), __webpack_require__(38);
|
|
5
|
+
var react = __webpack_require__(0), react_default = __webpack_require__.n(react), esm = __webpack_require__(1), global_window = __webpack_require__(8), window_default = __webpack_require__.n(global_window), react_popper_tooltip = __webpack_require__(939), memoizerific = (__webpack_require__(77), __webpack_require__(26), __webpack_require__(168), __webpack_require__(18), __webpack_require__(28)), memoizerific_default = __webpack_require__.n(memoizerific), utils = __webpack_require__(100);
|
|
6
|
+
function _extends() { return (_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) {
|
|
7
|
+
var source = arguments[i];
|
|
8
|
+
for (var key in source)
|
|
9
|
+
Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
|
|
10
|
+
} return target; }).apply(this, arguments); }
|
|
11
|
+
function _objectWithoutProperties(source, excluded) { if (null == source)
|
|
12
|
+
return {}; var key, i, target = function _objectWithoutPropertiesLoose(source, excluded) { if (null == source)
|
|
13
|
+
return {}; var key, i, target = {}, sourceKeys = Object.keys(source); for (i = 0; i < sourceKeys.length; i++)
|
|
14
|
+
key = sourceKeys[i], excluded.indexOf(key) >= 0 || (target[key] = source[key]); return target; }(source, excluded); if (Object.getOwnPropertySymbols) {
|
|
15
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
16
|
+
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
17
|
+
key = sourceSymbolKeys[i], excluded.indexOf(key) >= 0 || Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
18
|
+
} return target; }
|
|
19
|
+
var _templateObject, _templateObject2, match = memoizerific_default()(1e3)((function (requests, actual, value) { var fallback = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0; return actual.split("-")[0] === requests ? value : fallback; })), Arrow = esm.styled.div({ position: "absolute", borderStyle: "solid" }, (function (_ref) { var placement = _ref.placement, x = 0, y = 0; switch (!0) {
|
|
20
|
+
case placement.startsWith("left") || placement.startsWith("right"):
|
|
21
|
+
y = 8;
|
|
22
|
+
break;
|
|
23
|
+
case placement.startsWith("top") || placement.startsWith("bottom"): x = 8;
|
|
24
|
+
} return { transform: "translate3d(".concat(x, "px, ").concat(y, "px, 0px)") }; }), (function (_ref2) { var theme = _ref2.theme, color = _ref2.color, placement = _ref2.placement; return { bottom: "".concat(match("top", placement, -8, "auto"), "px"), top: "".concat(match("bottom", placement, -8, "auto"), "px"), right: "".concat(match("left", placement, -8, "auto"), "px"), left: "".concat(match("right", placement, -8, "auto"), "px"), borderBottomWidth: "".concat(match("top", placement, "0", 8), "px"), borderTopWidth: "".concat(match("bottom", placement, "0", 8), "px"), borderRightWidth: "".concat(match("left", placement, "0", 8), "px"), borderLeftWidth: "".concat(match("right", placement, "0", 8), "px"), borderTopColor: match("top", placement, theme.color[color] || color || "light" === theme.base ? Object(utils.c)(theme.background.app) : Object(utils.a)(theme.background.app), "transparent"), borderBottomColor: match("bottom", placement, theme.color[color] || color || "light" === theme.base ? Object(utils.c)(theme.background.app) : Object(utils.a)(theme.background.app), "transparent"), borderLeftColor: match("left", placement, theme.color[color] || color || "light" === theme.base ? Object(utils.c)(theme.background.app) : Object(utils.a)(theme.background.app), "transparent"), borderRightColor: match("right", placement, theme.color[color] || color || "light" === theme.base ? Object(utils.c)(theme.background.app) : Object(utils.a)(theme.background.app), "transparent") }; })), Wrapper = esm.styled.div((function (_ref3) { return { display: _ref3.hidden ? "none" : "inline-block", zIndex: 2147483647 }; }), (function (_ref4) { var theme = _ref4.theme, color = _ref4.color; return _ref4.hasChrome ? { background: theme.color[color] || color || "light" === theme.base ? Object(utils.c)(theme.background.app) : Object(utils.a)(theme.background.app), filter: "\n drop-shadow(0px 5px 5px rgba(0,0,0,0.05))\n drop-shadow(0 1px 3px rgba(0,0,0,0.1))\n ", borderRadius: 2 * theme.appBorderRadius, fontSize: theme.typography.size.s1 } : {}; })), Tooltip_Tooltip = function Tooltip(_ref5) { var placement = _ref5.placement, hasChrome = _ref5.hasChrome, children = _ref5.children, arrowProps = _ref5.arrowProps, tooltipRef = _ref5.tooltipRef, arrowRef = _ref5.arrowRef, color = _ref5.color, props = _objectWithoutProperties(_ref5, ["placement", "hasChrome", "children", "arrowProps", "tooltipRef", "arrowRef", "color"]); return react_default.a.createElement(Wrapper, _extends({ hasChrome: hasChrome, placement: placement, ref: tooltipRef }, props, { color: color }), hasChrome && react_default.a.createElement(Arrow, _extends({ placement: placement, ref: arrowRef }, arrowProps, { color: color })), children); };
|
|
25
|
+
function _slicedToArray(arr, i) { return function _arrayWithHoles(arr) { if (Array.isArray(arr))
|
|
26
|
+
return arr; }(arr) || function _iterableToArrayLimit(arr, i) { if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(arr)))
|
|
27
|
+
return; var _arr = [], _n = !0, _d = !1, _e = void 0; try {
|
|
28
|
+
for (var _s, _i = arr[Symbol.iterator](); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !i || _arr.length !== i); _n = !0)
|
|
29
|
+
;
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
_d = !0, _e = err;
|
|
33
|
+
}
|
|
34
|
+
finally {
|
|
35
|
+
try {
|
|
36
|
+
_n || null == _i.return || _i.return();
|
|
37
|
+
}
|
|
38
|
+
finally {
|
|
39
|
+
if (_d)
|
|
40
|
+
throw _e;
|
|
41
|
+
}
|
|
42
|
+
} return _arr; }(arr, i) || function _unsupportedIterableToArray(o, minLen) { if (!o)
|
|
43
|
+
return; if ("string" == typeof o)
|
|
44
|
+
return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); "Object" === n && o.constructor && (n = o.constructor.name); if ("Map" === n || "Set" === n)
|
|
45
|
+
return Array.from(o); if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
46
|
+
return _arrayLikeToArray(o, minLen); }(arr, i) || function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }(); }
|
|
47
|
+
function _arrayLikeToArray(arr, len) { (null == len || len > arr.length) && (len = arr.length); for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
48
|
+
arr2[i] = arr[i]; return arr2; }
|
|
49
|
+
function WithTooltip_extends() { return (WithTooltip_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) {
|
|
50
|
+
var source = arguments[i];
|
|
51
|
+
for (var key in source)
|
|
52
|
+
Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
|
|
53
|
+
} return target; }).apply(this, arguments); }
|
|
54
|
+
function WithTooltip_objectWithoutProperties(source, excluded) { if (null == source)
|
|
55
|
+
return {}; var key, i, target = function WithTooltip_objectWithoutPropertiesLoose(source, excluded) { if (null == source)
|
|
56
|
+
return {}; var key, i, target = {}, sourceKeys = Object.keys(source); for (i = 0; i < sourceKeys.length; i++)
|
|
57
|
+
key = sourceKeys[i], excluded.indexOf(key) >= 0 || (target[key] = source[key]); return target; }(source, excluded); if (Object.getOwnPropertySymbols) {
|
|
58
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
59
|
+
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
60
|
+
key = sourceSymbolKeys[i], excluded.indexOf(key) >= 0 || Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
61
|
+
} return target; }
|
|
62
|
+
function _taggedTemplateLiteral(strings, raw) { return raw || (raw = strings.slice(0)), Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
63
|
+
Tooltip_Tooltip.displayName = "Tooltip", Tooltip_Tooltip.defaultProps = { color: void 0, arrowRef: void 0, tooltipRef: void 0, hasChrome: !0, placement: "top", arrowProps: {} };
|
|
64
|
+
var WithTooltip_document = window_default.a.document, TargetContainer = esm.styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block;\n cursor: ", ";\n"])), (function (props) { return "hover" === props.mode ? "default" : "pointer"; })), TargetSvgContainer = esm.styled.g(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: ", ";\n"])), (function (props) { return "hover" === props.mode ? "default" : "pointer"; })), WithTooltip_WithTooltipPure = function WithTooltipPure(_ref) { var svg = _ref.svg, trigger = _ref.trigger, placement = (_ref.closeOnClick, _ref.placement), modifiers = _ref.modifiers, hasChrome = _ref.hasChrome, _tooltip = _ref.tooltip, children = _ref.children, tooltipShown = _ref.tooltipShown, onVisibilityChange = _ref.onVisibilityChange, props = WithTooltip_objectWithoutProperties(_ref, ["svg", "trigger", "closeOnClick", "placement", "modifiers", "hasChrome", "tooltip", "children", "tooltipShown", "onVisibilityChange"]), Container = svg ? TargetSvgContainer : TargetContainer; return react_default.a.createElement(react_popper_tooltip.a, { placement: placement, trigger: trigger, modifiers: modifiers, tooltipShown: tooltipShown, onVisibilityChange: onVisibilityChange, tooltip: function tooltip(_ref2) { var getTooltipProps = _ref2.getTooltipProps, getArrowProps = _ref2.getArrowProps, tooltipRef = _ref2.tooltipRef, arrowRef = _ref2.arrowRef, tooltipPlacement = _ref2.placement; return react_default.a.createElement(Tooltip_Tooltip, WithTooltip_extends({ hasChrome: hasChrome, placement: tooltipPlacement, tooltipRef: tooltipRef, arrowRef: arrowRef, arrowProps: getArrowProps() }, getTooltipProps()), "function" == typeof _tooltip ? _tooltip({ onHide: function onHide() { return onVisibilityChange(!1); } }) : _tooltip); } }, (function (_ref3) { var getTriggerProps = _ref3.getTriggerProps, triggerRef = _ref3.triggerRef; return react_default.a.createElement(Container, WithTooltip_extends({ ref: triggerRef }, getTriggerProps(), props), children); })); };
|
|
65
|
+
WithTooltip_WithTooltipPure.displayName = "WithTooltipPure", WithTooltip_WithTooltipPure.defaultProps = { svg: !1, trigger: "hover", closeOnClick: !1, placement: "top", modifiers: [{ name: "preventOverflow", options: { padding: 8 } }, { name: "offset", options: { offset: [8, 8] } }, { name: "arrow", options: { padding: 8 } }], hasChrome: !0, tooltipShown: !1 };
|
|
66
|
+
var WithTooltip_WithToolTipState = function WithToolTipState(_ref4) { var startOpen = _ref4.startOpen, onChange = _ref4.onVisibilityChange, rest = WithTooltip_objectWithoutProperties(_ref4, ["startOpen", "onVisibilityChange"]), _useState2 = _slicedToArray(Object(react.useState)(startOpen || !1), 2), tooltipShown = _useState2[0], setTooltipShown = _useState2[1], onVisibilityChange = Object(react.useCallback)((function (visibility) { onChange && !1 === onChange(visibility) || setTooltipShown(visibility); }), [onChange]); return Object(react.useEffect)((function () { var hide = function hide() { return onVisibilityChange(!1); }; WithTooltip_document.addEventListener("keydown", hide, !1); var iframes = Array.from(WithTooltip_document.getElementsByTagName("iframe")), unbinders = []; return iframes.forEach((function (iframe) { var bind = function bind() { try {
|
|
67
|
+
iframe.contentWindow.document && (iframe.contentWindow.document.addEventListener("click", hide), unbinders.push((function () { try {
|
|
68
|
+
iframe.contentWindow.document.removeEventListener("click", hide);
|
|
69
|
+
}
|
|
70
|
+
catch (e) { } })));
|
|
71
|
+
}
|
|
72
|
+
catch (e) { } }; bind(), iframe.addEventListener("load", bind), unbinders.push((function () { iframe.removeEventListener("load", bind); })); })), function () { WithTooltip_document.removeEventListener("keydown", hide), unbinders.forEach((function (unbind) { unbind(); })); }; })), react_default.a.createElement(WithTooltip_WithTooltipPure, WithTooltip_extends({}, rest, { tooltipShown: tooltipShown, onVisibilityChange: onVisibilityChange })); };
|
|
73
|
+
WithTooltip_WithToolTipState.displayName = "WithToolTipState";
|
|
74
|
+
} }]);
|
|
File without changes
|