pds-dev-kit-web 2.0.14-alpha.0 → 2.1.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 +4 -4
- package/dist/index.js +9 -3
- package/dist/src/common/assets/icons/line/DottedCircle.d.ts +4 -0
- package/dist/src/common/assets/icons/line/DottedCircle.js +30 -0
- package/dist/src/common/assets/icons/line/index.d.ts +1 -0
- package/dist/src/common/assets/icons/line/index.js +2 -0
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +14 -2
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +13 -1
- package/dist/src/common/styles/colorSet/UIColor.json +26 -1
- package/dist/src/common/styles/colorSet/index.d.ts +51 -2
- package/dist/src/common/styles/colorSet/index.js +2 -2
- package/dist/src/common/styles/colorSet/ui-type.d.ts +25 -0
- package/dist/src/common/types/components.d.ts +15 -0
- package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.d.ts +4 -1
- package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.js +36 -11
- package/dist/src/desktop/common/components/TextFieldBase/constants.d.ts +1 -0
- package/dist/src/desktop/common/components/TextFieldBase/constants.js +4 -0
- package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.d.ts +9 -0
- package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.js +73 -0
- package/dist/src/desktop/components/BasicButtonGroup/index.d.ts +1 -0
- package/dist/src/desktop/components/BasicButtonGroup/index.js +8 -0
- package/dist/src/desktop/components/ContextMenuItem/ContextMenuItem.d.ts +5 -3
- package/dist/src/desktop/components/ContextMenuItem/ContextMenuItem.js +15 -3
- package/dist/src/desktop/components/Dropdown/Dropdown.d.ts +9 -10
- package/dist/src/desktop/components/Dropdown/Dropdown.js +71 -26
- package/dist/src/desktop/components/IconButton/IconButton.d.ts +4 -2
- package/dist/src/desktop/components/IconButton/IconButton.js +52 -4
- package/dist/src/desktop/components/IconButton/constants.d.ts +15 -0
- package/dist/src/desktop/components/IconButton/constants.js +19 -0
- package/dist/src/desktop/components/SegmentedButtonGroup/SegmentedButtonGroup.d.ts +18 -0
- package/dist/src/desktop/components/SegmentedButtonGroup/SegmentedButtonGroup.js +143 -0
- package/dist/src/desktop/components/SegmentedButtonGroup/index.d.ts +1 -0
- package/dist/src/desktop/components/SegmentedButtonGroup/index.js +8 -0
- package/dist/src/desktop/components/Slider/Slider.d.ts +19 -0
- package/dist/src/desktop/components/Slider/Slider.js +200 -0
- package/dist/src/desktop/components/Slider/index.d.ts +1 -0
- package/dist/src/desktop/components/Slider/index.js +8 -0
- package/dist/src/desktop/components/TextField/TextField.d.ts +3 -1
- package/dist/src/desktop/components/TextField/TextField.js +5 -5
- package/dist/src/desktop/components/index.d.ts +4 -1
- package/dist/src/desktop/components/index.js +7 -1
- package/dist/src/desktop/index.d.ts +1 -1
- package/dist/src/desktop/index.js +5 -2
- package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/ContentsContainer.d.ts +1 -1
- package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/ContentsContainer.js +2 -1
- package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/variation/WSG.js +57 -32
- package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/variation/WSI.d.ts +15 -0
- package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/variation/WSI.js +117 -0
- package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/variation/index.d.ts +1 -0
- package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/variation/index.js +3 -1
- package/dist/src/desktop/layout/LayoutWS/ContainersBox/ContainersBox.d.ts +1 -1
- package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.d.ts +4 -1
- package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.js +35 -10
- package/dist/src/mobile/common/components/TextFieldBase/constants.d.ts +1 -0
- package/dist/src/mobile/common/components/TextFieldBase/constants.js +4 -0
- package/dist/src/mobile/components/BasicButtonGroup/BasicButtonGroup.d.ts +9 -0
- package/dist/src/mobile/components/BasicButtonGroup/BasicButtonGroup.js +73 -0
- package/dist/src/mobile/components/BasicButtonGroup/index.d.ts +1 -0
- package/dist/src/mobile/components/BasicButtonGroup/index.js +8 -0
- package/dist/src/mobile/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/src/mobile/components/ContextMenuItem/ContextMenuItem.d.ts +5 -3
- package/dist/src/mobile/components/ContextMenuItem/ContextMenuItem.js +15 -3
- package/dist/src/mobile/components/Dropdown/Dropdown.d.ts +9 -10
- package/dist/src/mobile/components/Dropdown/Dropdown.js +70 -25
- package/dist/src/mobile/components/SegmentedButtonGroup/SegmentedButtonGroup.d.ts +18 -0
- package/dist/src/mobile/components/SegmentedButtonGroup/SegmentedButtonGroup.js +143 -0
- package/dist/src/mobile/components/SegmentedButtonGroup/index.d.ts +1 -0
- package/dist/src/mobile/components/SegmentedButtonGroup/index.js +8 -0
- package/dist/src/mobile/components/Slider/Slider.d.ts +19 -0
- package/dist/src/mobile/components/Slider/Slider.js +197 -0
- package/dist/src/mobile/components/Slider/index.d.ts +1 -0
- package/dist/src/mobile/components/Slider/index.js +8 -0
- package/dist/src/mobile/components/TextField/TextField.d.ts +3 -1
- package/dist/src/mobile/components/TextField/TextField.js +5 -5
- package/dist/src/mobile/components/index.d.ts +4 -1
- package/dist/src/mobile/components/index.js +7 -1
- package/dist/src/mobile/index.d.ts +1 -1
- package/dist/src/mobile/index.js +5 -1
- package/dist/src/sub/DynamicLayout/mock_storybook.js +20 -112
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/mobile/components/SectionContents.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateB/mobile/components/SectionContents.js +1 -1
- package/package.json +1 -1
- package/release-note.md +8 -7
|
@@ -0,0 +1,197 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
22
|
+
var react_1 = require("react");
|
|
23
|
+
var components_1 = require("../../../hybrid/components");
|
|
24
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
25
|
+
var TextLabel_1 = require("../TextLabel");
|
|
26
|
+
function Slider(_a, ref) {
|
|
27
|
+
var min = _a.min, max = _a.max, _b = _a.step, step = _b === void 0 ? 1 : _b, name = _a.name, defaultValue = _a.defaultValue, tooltipText = _a.tooltipText, _c = _a.state, state = _c === void 0 ? 'normal' : _c, prefixText = _a.prefixText, suffixText = _a.suffixText, customWidth = _a.customWidth, _d = _a.responsiveMode, responsiveMode = _d === void 0 ? 'none' : _d, onChange = _a.onChange, onClick = _a.onClick;
|
|
28
|
+
var _e = (0, react_1.useState)(false), isTooltipVisible = _e[0], setIsTooltipVisible = _e[1];
|
|
29
|
+
var _f = (0, react_1.useState)(false), isTouching = _f[0], setIsTouching = _f[1];
|
|
30
|
+
var trackRef = (0, react_1.useRef)(null);
|
|
31
|
+
var thumbRef = (0, react_1.useRef)(null);
|
|
32
|
+
var inputRef = (0, react_1.useRef)(null);
|
|
33
|
+
var defaultThumbPercentage = ((Number(defaultValue || (max - min) / 2 + min) - min) / (max - min)) * 100;
|
|
34
|
+
function getPercent(pointValue, width) {
|
|
35
|
+
if (pointValue <= 0) {
|
|
36
|
+
return 0;
|
|
37
|
+
}
|
|
38
|
+
if (pointValue >= width) {
|
|
39
|
+
return 1;
|
|
40
|
+
}
|
|
41
|
+
return pointValue / width;
|
|
42
|
+
}
|
|
43
|
+
function percentToValue(percent, min, max) {
|
|
44
|
+
return (max - min) * percent + min;
|
|
45
|
+
}
|
|
46
|
+
function getInputValue(inputRef, trackValue) {
|
|
47
|
+
var result = { prevInputValue: '', newInputValue: '' };
|
|
48
|
+
if (inputRef.current === null) {
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
result.prevInputValue = inputRef.current.value;
|
|
52
|
+
inputRef.current.value = String(trackValue);
|
|
53
|
+
result.newInputValue = inputRef.current.value;
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
function getThumbOffset(percent, width) {
|
|
57
|
+
return ((width * percent - width / 2) / (width / 2)) * -10;
|
|
58
|
+
}
|
|
59
|
+
var getNewInputValue = function (clientX, left, width) {
|
|
60
|
+
var percent = getPercent(clientX - (left + 10), width - 20);
|
|
61
|
+
var newValue = percentToValue(percent, min, max);
|
|
62
|
+
var _a = getInputValue(inputRef, newValue), prevInputValue = _a.prevInputValue, newInputValue = _a.newInputValue;
|
|
63
|
+
if (prevInputValue === newInputValue) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return newInputValue;
|
|
67
|
+
};
|
|
68
|
+
var getThumbPositionOnTrack = function (percent, value, width) {
|
|
69
|
+
var thumbOffset = getThumbOffset(percent, width);
|
|
70
|
+
return "calc(" + (Number(value) / (max - min)) * 100 + "% + " + thumbOffset + "px)";
|
|
71
|
+
};
|
|
72
|
+
var updateFillTrackAndThumb = function (trackElement, thumbElement, thumbPosition) {
|
|
73
|
+
trackElement.style.backgroundSize = thumbPosition + " 100%";
|
|
74
|
+
thumbElement.style.left = thumbPosition;
|
|
75
|
+
};
|
|
76
|
+
var changeSliderValue = function (clientX) {
|
|
77
|
+
if (inputRef.current === null || thumbRef.current === null || trackRef.current === null) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
var _a = trackRef.current.getBoundingClientRect(), left = _a.left, width = _a.width;
|
|
81
|
+
var newInputValue = getNewInputValue(clientX, left, width);
|
|
82
|
+
if (newInputValue === null) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
var thumbPosition = getThumbPositionOnTrack(Number(newInputValue) / (max - min), newInputValue, width);
|
|
86
|
+
updateFillTrackAndThumb(trackRef.current, thumbRef.current, thumbPosition);
|
|
87
|
+
inputRef.current.dispatchEvent(new Event('input', { bubbles: true }));
|
|
88
|
+
};
|
|
89
|
+
var handleTouchMove = function (e) {
|
|
90
|
+
changeSliderValue(e.changedTouches[0].clientX);
|
|
91
|
+
};
|
|
92
|
+
var handleTouchEnd = function () {
|
|
93
|
+
document.removeEventListener('touchmove', handleTouchMove);
|
|
94
|
+
setIsTouching(false);
|
|
95
|
+
if (tooltipText) {
|
|
96
|
+
setIsTooltipVisible(false);
|
|
97
|
+
}
|
|
98
|
+
if (inputRef.current !== null) {
|
|
99
|
+
inputRef.current.dispatchEvent(new Event('click', { bubbles: true }));
|
|
100
|
+
inputRef.current.focus();
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
var handleTouchStart = function (e) {
|
|
104
|
+
if (state === 'disabled') {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
setIsTouching(true);
|
|
108
|
+
changeSliderValue(e.changedTouches[0].clientX);
|
|
109
|
+
if (tooltipText) {
|
|
110
|
+
setIsTooltipVisible(true);
|
|
111
|
+
}
|
|
112
|
+
document.addEventListener('touchmove', handleTouchMove);
|
|
113
|
+
document.addEventListener('touchend', handleTouchEnd, { once: true });
|
|
114
|
+
};
|
|
115
|
+
var handleChange = function (e) {
|
|
116
|
+
if (trackRef.current === null || thumbRef.current === null) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
var width = trackRef.current.getBoundingClientRect().width;
|
|
120
|
+
var thumbPosition = getThumbPositionOnTrack(Number(e.currentTarget.value) / (max - min), e.currentTarget.value, width);
|
|
121
|
+
updateFillTrackAndThumb(trackRef.current, thumbRef.current, thumbPosition);
|
|
122
|
+
if (onChange) {
|
|
123
|
+
onChange(e);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
var handleClick = function (e) {
|
|
127
|
+
if (onClick) {
|
|
128
|
+
onClick(e);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
var handleRangeRef = function (node) {
|
|
132
|
+
if (typeof ref === 'function') {
|
|
133
|
+
ref(node);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
ref && (ref.current = node);
|
|
137
|
+
}
|
|
138
|
+
inputRef.current = node;
|
|
139
|
+
};
|
|
140
|
+
return ((0, jsx_runtime_1.jsxs)(S_SliderBox, __assign({ "x-pds-name": "Slider", "x-pds-element-type": "component", "x-pds-device-type": "mobile" }, { children: [prefixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: prefixText, styleTheme: "caption2Bold", colorTheme: state === 'normal' ? 'sysTextSecondary' : 'sysTextTertiary', singleLineMode: "use", textAlign: "right" }, void 0), (0, jsx_runtime_1.jsx)(components_1.Spacing, { spacingType: "width", size: "spacing_b" }, void 0)] }, void 0)), (0, jsx_runtime_1.jsx)(S_SliderWrapper, __assign({ customWidth: customWidth, responsiveMode: responsiveMode }, { children: (0, jsx_runtime_1.jsxs)(S_Slider, __assign({ customWidth: customWidth, isDisabled: state === 'disabled', responsiveMode: responsiveMode, thumbPercentage: defaultThumbPercentage, onTouchStart: handleTouchStart }, { children: [(0, jsx_runtime_1.jsx)(S_Track, { ref: trackRef, thumbPercentage: defaultThumbPercentage, isDisabled: state === 'disabled' }, void 0), (0, jsx_runtime_1.jsxs)(S_Thumb, __assign({ ref: thumbRef, thumbPercentage: defaultThumbPercentage, isTouching: isTouching, isDisabled: state === 'disabled' }, { children: [(0, jsx_runtime_1.jsx)(S_Range, { ref: handleRangeRef, type: "range", name: name, min: min, max: max, step: step, defaultValue: defaultValue, onInput: handleChange, onClick: handleClick }, void 0), tooltipText && isTooltipVisible && ((0, jsx_runtime_1.jsx)(S_Tooltip, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, styleTheme: "caption2Regular", colorOverride: "ui_cpnt_textlabel_button_tooltip", singleLineMode: "use" }, void 0) }, void 0))] }), void 0)] }), void 0) }), void 0), suffixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { spacingType: "width", size: "spacing_b" }, void 0), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: suffixText, styleTheme: "caption2Bold", colorTheme: state === 'normal' ? 'sysTextSecondary' : 'sysTextTertiary', singleLineMode: "use" }, void 0)] }, void 0))] }), void 0));
|
|
141
|
+
}
|
|
142
|
+
var S_SliderBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n flex-direction: row;\n"], ["\n align-items: center;\n display: flex;\n flex-direction: row;\n"])));
|
|
143
|
+
var S_SliderWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n position: relative;\n width: ", ";\n"], ["\n display: flex;\n position: relative;\n width: ", ";\n"])), function (_a) {
|
|
144
|
+
var responsiveMode = _a.responsiveMode, customWidth = _a.customWidth;
|
|
145
|
+
if (customWidth) {
|
|
146
|
+
return customWidth;
|
|
147
|
+
}
|
|
148
|
+
if (responsiveMode === 'use') {
|
|
149
|
+
return '100%';
|
|
150
|
+
}
|
|
151
|
+
return '324px';
|
|
152
|
+
});
|
|
153
|
+
var S_Tooltip = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 4px;\n padding: ", ";\n position: absolute;\n top: -10px;\n transform: translateY(-100%);\n"], ["\n background-color: ", ";\n border-radius: 4px;\n padding: ", ";\n position: absolute;\n top: -10px;\n transform: translateY(-100%);\n"])), function (_a) {
|
|
154
|
+
var theme = _a.theme;
|
|
155
|
+
return theme.ui_cpnt_button_tooltip_base;
|
|
156
|
+
}, function (_a) {
|
|
157
|
+
var theme = _a.theme;
|
|
158
|
+
return theme.spacing.spacingA + " " + theme.spacing.spacingB;
|
|
159
|
+
});
|
|
160
|
+
var S_Slider = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n cursor: ", ";\n display: flex;\n height: 20px;\n width: ", ";\n"], ["\n align-items: center;\n cursor: ", ";\n display: flex;\n height: 20px;\n width: ", ";\n"])), function (_a) {
|
|
161
|
+
var isDisabled = _a.isDisabled;
|
|
162
|
+
return (isDisabled ? 'auto' : 'pointer');
|
|
163
|
+
}, function (_a) {
|
|
164
|
+
var responsiveMode = _a.responsiveMode, customWidth = _a.customWidth;
|
|
165
|
+
if (customWidth) {
|
|
166
|
+
return customWidth;
|
|
167
|
+
}
|
|
168
|
+
if (responsiveMode === 'use') {
|
|
169
|
+
return '100%';
|
|
170
|
+
}
|
|
171
|
+
return '324px';
|
|
172
|
+
});
|
|
173
|
+
var S_Track = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n background-size: ", ";\n border-radius: 2px;\n height: 4px;\n position: absolute;\n width: inherit;\n"], ["\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n background-size: ", ";\n border-radius: 2px;\n height: 4px;\n position: absolute;\n width: inherit;\n"])), function (_a) {
|
|
174
|
+
var theme = _a.theme;
|
|
175
|
+
return theme.ui_cpnt_slider_track;
|
|
176
|
+
}, function (_a) {
|
|
177
|
+
var theme = _a.theme, isDisabled = _a.isDisabled;
|
|
178
|
+
return isDisabled
|
|
179
|
+
? "linear-gradient(" + theme.ui_cpnt_slider_track_disabled + ", " + theme.ui_cpnt_slider_track_disabled + ")"
|
|
180
|
+
: "linear-gradient(" + theme.ui_cpnt_slider_track_active + ", " + theme.ui_cpnt_slider_track_active + ")";
|
|
181
|
+
}, function (_a) {
|
|
182
|
+
var thumbPercentage = _a.thumbPercentage;
|
|
183
|
+
return thumbPercentage + "% 100%";
|
|
184
|
+
});
|
|
185
|
+
var S_Thumb = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 100%;\n box-shadow: ", ";\n display: flex;\n height: 20px;\n justify-content: center;\n left: ", "%;\n position: absolute;\n transform: translateX(-10px);\n width: 20px;\n"], ["\n background-color: ", ";\n border-radius: 100%;\n box-shadow: ", ";\n display: flex;\n height: 20px;\n justify-content: center;\n left: ", "%;\n position: absolute;\n transform: translateX(-10px);\n width: 20px;\n"])), function (_a) {
|
|
186
|
+
var theme = _a.theme, isDisabled = _a.isDisabled;
|
|
187
|
+
return isDisabled ? theme.ui_cpnt_slider_thumb_disabled : theme.ui_cpnt_slider_thumb_normal;
|
|
188
|
+
}, function (_a) {
|
|
189
|
+
var theme = _a.theme, isTouching = _a.isTouching, isDisabled = _a.isDisabled;
|
|
190
|
+
return isTouching && !isDisabled ? "0 0 0 8px " + theme.ui_cpnt_slider_thumb_pressed_circle : 'none';
|
|
191
|
+
}, function (_a) {
|
|
192
|
+
var thumbPercentage = _a.thumbPercentage;
|
|
193
|
+
return thumbPercentage;
|
|
194
|
+
});
|
|
195
|
+
var S_Range = styled_components_1.default.input(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n clip: rect(0 0 0 0);\n height: 100%;\n margin: 0;\n outline: none;\n position: absolute;\n width: 100%;\n"], ["\n clip: rect(0 0 0 0);\n height: 100%;\n margin: 0;\n outline: none;\n position: absolute;\n width: 100%;\n"])));
|
|
196
|
+
exports.default = (0, react_1.forwardRef)(Slider);
|
|
197
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Slider } from './Slider';
|
|
@@ -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.Slider = void 0;
|
|
7
|
+
var Slider_1 = require("./Slider");
|
|
8
|
+
Object.defineProperty(exports, "Slider", { enumerable: true, get: function () { return __importDefault(Slider_1).default; } });
|
|
@@ -32,6 +32,8 @@ export declare type TextFieldProps = {
|
|
|
32
32
|
min?: number;
|
|
33
33
|
customWidth?: string;
|
|
34
34
|
autoComplete?: string;
|
|
35
|
+
numberStepperMode?: 'none' | 'use';
|
|
36
|
+
numberStep?: number;
|
|
35
37
|
onBlur?: (e: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
36
38
|
onChange?: (e: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
37
39
|
onClickIBtn1?: () => void;
|
|
@@ -41,5 +43,5 @@ export declare type TextFieldProps = {
|
|
|
41
43
|
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement> | React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
42
44
|
onTarget?: () => void;
|
|
43
45
|
};
|
|
44
|
-
declare function TextField({ name, hintText, defaultText, textAlign, prefixText, suffixText, validation, validationPoint, preventBlankMode, enterSubmitMode, size, responsiveMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, colorTheme, max, maxLength, min, customWidth, autoComplete, onBlur, onChange, onClickIBtn1, onClickIBtn2, onFocus, onKeyUp, onKeyDown, onTarget }: TextFieldProps): JSX.Element;
|
|
46
|
+
declare function TextField({ name, hintText, defaultText, textAlign, prefixText, suffixText, validation, validationPoint, preventBlankMode, enterSubmitMode, size, responsiveMode, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, colorTheme, max, maxLength, min, customWidth, autoComplete, numberStepperMode, numberStep, onBlur, onChange, onClickIBtn1, onClickIBtn2, onFocus, onKeyUp, onKeyDown, onTarget }: TextFieldProps): JSX.Element;
|
|
45
47
|
export default TextField;
|
|
@@ -46,7 +46,7 @@ var IconButton_1 = require("../IconButton");
|
|
|
46
46
|
var TextLabel_1 = require("../TextLabel");
|
|
47
47
|
function TextField(_a) {
|
|
48
48
|
var _b;
|
|
49
|
-
var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, _c = _a.textAlign, textAlign = _c === void 0 ? 'left' : _c, prefixText = _a.prefixText, suffixText = _a.suffixText, validation = _a.validation, _d = _a.validationPoint, validationPoint = _d === void 0 ? 'onBlur' : _d, _e = _a.preventBlankMode, preventBlankMode = _e === void 0 ? 'none' : _e, _f = _a.enterSubmitMode, enterSubmitMode = _f === void 0 ? 'none' : _f, _g = _a.size, size = _g === void 0 ? 'large' : _g, _h = _a.responsiveMode, responsiveMode = _h === void 0 ? 'none' : _h, _j = _a.textLineType, textLineType = _j === void 0 ? 'single' : _j, _k = _a.multiRows, multiRows = _k === void 0 ? 8 : _k, _l = _a.autoMinRows, autoMinRows = _l === void 0 ? 8 : _l, autoMaxRows = _a.autoMaxRows, _m = _a.inputType, inputType = _m === void 0 ? 'text' : _m, _o = _a.state, state = _o === void 0 ? 'normal' : _o, iBtn1IconName = _a.iBtn1IconName, _p = _a.iBtn1IconFillType, iBtn1IconFillType = _p === void 0 ? 'line' : _p, iBtn2IconName = _a.iBtn2IconName, _q = _a.iBtn2IconFillType, iBtn2IconFillType = _q === void 0 ? 'line' : _q, _r = _a.colorTheme, colorTheme = _r === void 0 ? 'none' : _r, max = _a.max, maxLength = _a.maxLength, min = _a.min, customWidth = _a.customWidth, _s = _a.autoComplete, autoComplete = _s === void 0 ? 'on' : _s, onBlur = _a.onBlur, onChange = _a.onChange, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onFocus = _a.onFocus, onKeyUp = _a.onKeyUp, onKeyDown = _a.onKeyDown, onTarget = _a.onTarget;
|
|
49
|
+
var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, _c = _a.textAlign, textAlign = _c === void 0 ? 'left' : _c, prefixText = _a.prefixText, suffixText = _a.suffixText, validation = _a.validation, _d = _a.validationPoint, validationPoint = _d === void 0 ? 'onBlur' : _d, _e = _a.preventBlankMode, preventBlankMode = _e === void 0 ? 'none' : _e, _f = _a.enterSubmitMode, enterSubmitMode = _f === void 0 ? 'none' : _f, _g = _a.size, size = _g === void 0 ? 'large' : _g, _h = _a.responsiveMode, responsiveMode = _h === void 0 ? 'none' : _h, _j = _a.textLineType, textLineType = _j === void 0 ? 'single' : _j, _k = _a.multiRows, multiRows = _k === void 0 ? 8 : _k, _l = _a.autoMinRows, autoMinRows = _l === void 0 ? 8 : _l, autoMaxRows = _a.autoMaxRows, _m = _a.inputType, inputType = _m === void 0 ? 'text' : _m, _o = _a.state, state = _o === void 0 ? 'normal' : _o, iBtn1IconName = _a.iBtn1IconName, _p = _a.iBtn1IconFillType, iBtn1IconFillType = _p === void 0 ? 'line' : _p, iBtn2IconName = _a.iBtn2IconName, _q = _a.iBtn2IconFillType, iBtn2IconFillType = _q === void 0 ? 'line' : _q, _r = _a.colorTheme, colorTheme = _r === void 0 ? 'none' : _r, max = _a.max, maxLength = _a.maxLength, min = _a.min, customWidth = _a.customWidth, _s = _a.autoComplete, autoComplete = _s === void 0 ? 'on' : _s, _t = _a.numberStepperMode, numberStepperMode = _t === void 0 ? 'none' : _t, numberStep = _a.numberStep, onBlur = _a.onBlur, onChange = _a.onChange, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onFocus = _a.onFocus, onKeyUp = _a.onKeyUp, onKeyDown = _a.onKeyDown, onTarget = _a.onTarget;
|
|
50
50
|
var basicThemeIconColors = {
|
|
51
51
|
normal: 'ui_cpnt_button_icon_default',
|
|
52
52
|
read_only: 'ui_cpnt_button_icon_default',
|
|
@@ -62,9 +62,9 @@ function TextField(_a) {
|
|
|
62
62
|
read_only: 'ui_cpnt_textfield_icon_colortheme_transparent_readonly',
|
|
63
63
|
disabled: 'ui_cpnt_textfield_icon_colortheme_transparent_disabled'
|
|
64
64
|
};
|
|
65
|
-
var
|
|
66
|
-
var
|
|
67
|
-
var
|
|
65
|
+
var _u = (0, react_1.useState)(false), isFocused = _u[0], setIsFocused = _u[1];
|
|
66
|
+
var _v = (0, react_hook_form_1.useFormContext)(), register = _v.register, trigger = _v.trigger, errors = _v.formState.errors;
|
|
67
|
+
var _w = register(name, validation), validateOnChange = _w.onChange, validateOnBlur = _w.onBlur;
|
|
68
68
|
var isError = Object.keys(errors).some(function (error) { return error === name; });
|
|
69
69
|
var handleClickIBtn1 = function () {
|
|
70
70
|
if (onClickIBtn1) {
|
|
@@ -136,7 +136,7 @@ function TextField(_a) {
|
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [prefixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: prefixText, styleTheme: "caption1Bold", colorTheme: "sysTextTertiary", singleLineMode: "use" }, void 0), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0)] }, void 0)), (0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, textAlign: textAlign, validation: validation, preventBlankMode: preventBlankMode, enterSubmitMode: enterSubmitMode, textLineType: "single", inputType: inputType, state: state, colorTheme: colorTheme, min: min, max: max, maxLength: maxLength, textSize: "form2", textWeight: "normal", deleteIconMode: "use", deleteIconSize: size === 'large' || size === 'rlarge' ? 20 : 16, deleteIconColor: deleteIconColor, isFocused: isFocused, autoComplete: autoComplete, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown }, void 0), (0, jsx_runtime_1.jsxs)(S_RightBox, { children: [suffixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: suffixText, styleTheme: "caption1Bold", colorTheme: "sysTextTertiary", textAlign: "right", singleLineMode: "use" }, void 0), size === 'large' ? ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0)) : ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }, void 0))] }, void 0)), iBtn2IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iBtn2IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: colorTheme &&
|
|
139
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [prefixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: prefixText, styleTheme: "caption1Bold", colorTheme: "sysTextTertiary", singleLineMode: "use" }, void 0), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0)] }, void 0)), (0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, textAlign: inputType === 'number' && numberStepperMode === 'use' ? 'right' : textAlign, validation: validation, preventBlankMode: preventBlankMode, enterSubmitMode: enterSubmitMode, textLineType: "single", inputType: inputType, state: state, colorTheme: colorTheme, min: min, max: max, maxLength: maxLength, textSize: "form2", textWeight: "normal", deleteIconMode: "use", deleteIconSize: size === 'large' || size === 'rlarge' ? 20 : 16, deleteIconColor: deleteIconColor, isFocused: isFocused, autoComplete: autoComplete, stepperMode: inputType === 'number' && numberStepperMode === 'use' ? 'use' : 'none', innerSpinButtonSize: size === 'small' ? 12 : 16, step: numberStep, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown }, void 0), (0, jsx_runtime_1.jsxs)(S_RightBox, { children: [suffixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: suffixText, styleTheme: "caption1Bold", colorTheme: "sysTextTertiary", textAlign: "right", singleLineMode: "use" }, void 0), size === 'large' ? ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0)) : ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }, void 0))] }, void 0)), iBtn2IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iBtn2IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: colorTheme &&
|
|
140
140
|
{
|
|
141
141
|
none: basicThemeIconColors[state],
|
|
142
142
|
dark: darkThemeIconColors[state],
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BasicButtonGroup } from './BasicButtonGroup';
|
|
1
2
|
import { BasicChatListItem } from './BasicChatListItem';
|
|
2
3
|
import { BasicFormGroup } from './BasicFormGroup';
|
|
3
4
|
import { BasicList } from './BasicList';
|
|
@@ -24,7 +25,9 @@ import { MobileHeaderBar } from './MobileHeaderBar';
|
|
|
24
25
|
import { MobileTabBar } from './MobileTabBar';
|
|
25
26
|
import { Radio } from './Radio';
|
|
26
27
|
import { ReactionButton } from './ReactionButton';
|
|
28
|
+
import { SegmentedButtonGroup } from './SegmentedButtonGroup';
|
|
27
29
|
import { Select } from './Select';
|
|
30
|
+
import { Slider } from './Slider';
|
|
28
31
|
import { StatusBlock } from './StatusBlock';
|
|
29
32
|
import { TextButton } from './TextButton';
|
|
30
33
|
import { TextField } from './TextField';
|
|
@@ -32,4 +35,4 @@ import { TextLabel } from './TextLabel';
|
|
|
32
35
|
import { UploadIconButton } from './UploadIconButton';
|
|
33
36
|
import { UploadMainButton } from './UploadMainButton';
|
|
34
37
|
import { UploadTextButton } from './UploadTextButton';
|
|
35
|
-
export { BasicChatListItem, BasicFormGroup, BasicList, BasicListItem, BlogTextField, BodyTextGroup, Card, CardList, ChatBubbleListItem, ChatList, Checkbox, Chip, ContextMenu, ContextMenuItem, Dropdown, FloatingActionButton, HorizontalFormGroup, IconButton, ImageSlide, LottieReactionButton, MainButton, MobileAlertDialog, MobileHeaderBar, MobileTabBar, Radio, ReactionButton, Select, StatusBlock, TextButton, TextField, TextLabel, UploadIconButton, UploadMainButton, UploadTextButton };
|
|
38
|
+
export { BasicButtonGroup, BasicChatListItem, BasicFormGroup, BasicList, BasicListItem, BlogTextField, BodyTextGroup, Card, CardList, ChatBubbleListItem, ChatList, Checkbox, Chip, ContextMenu, ContextMenuItem, Dropdown, FloatingActionButton, HorizontalFormGroup, IconButton, ImageSlide, LottieReactionButton, MainButton, MobileAlertDialog, MobileHeaderBar, MobileTabBar, Radio, ReactionButton, SegmentedButtonGroup, Select, Slider, StatusBlock, TextButton, TextField, TextLabel, UploadIconButton, UploadMainButton, UploadTextButton };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UploadTextButton = exports.UploadMainButton = exports.UploadIconButton = exports.TextLabel = exports.TextField = exports.TextButton = exports.StatusBlock = exports.Select = exports.ReactionButton = exports.Radio = exports.MobileTabBar = exports.MobileHeaderBar = exports.MobileAlertDialog = exports.MainButton = exports.LottieReactionButton = exports.ImageSlide = exports.IconButton = exports.HorizontalFormGroup = exports.FloatingActionButton = exports.Dropdown = exports.ContextMenuItem = exports.ContextMenu = exports.Chip = exports.Checkbox = exports.ChatList = exports.ChatBubbleListItem = exports.CardList = exports.Card = exports.BodyTextGroup = exports.BlogTextField = exports.BasicListItem = exports.BasicList = exports.BasicFormGroup = exports.BasicChatListItem = void 0;
|
|
3
|
+
exports.UploadTextButton = exports.UploadMainButton = exports.UploadIconButton = exports.TextLabel = exports.TextField = exports.TextButton = exports.StatusBlock = exports.Slider = exports.Select = exports.SegmentedButtonGroup = exports.ReactionButton = exports.Radio = exports.MobileTabBar = exports.MobileHeaderBar = exports.MobileAlertDialog = exports.MainButton = exports.LottieReactionButton = exports.ImageSlide = exports.IconButton = exports.HorizontalFormGroup = exports.FloatingActionButton = exports.Dropdown = exports.ContextMenuItem = exports.ContextMenu = exports.Chip = exports.Checkbox = exports.ChatList = exports.ChatBubbleListItem = exports.CardList = exports.Card = exports.BodyTextGroup = exports.BlogTextField = exports.BasicListItem = exports.BasicList = exports.BasicFormGroup = exports.BasicChatListItem = exports.BasicButtonGroup = void 0;
|
|
4
|
+
var BasicButtonGroup_1 = require("./BasicButtonGroup");
|
|
5
|
+
Object.defineProperty(exports, "BasicButtonGroup", { enumerable: true, get: function () { return BasicButtonGroup_1.BasicButtonGroup; } });
|
|
4
6
|
var BasicChatListItem_1 = require("./BasicChatListItem");
|
|
5
7
|
Object.defineProperty(exports, "BasicChatListItem", { enumerable: true, get: function () { return BasicChatListItem_1.BasicChatListItem; } });
|
|
6
8
|
var BasicFormGroup_1 = require("./BasicFormGroup");
|
|
@@ -53,8 +55,12 @@ var Radio_1 = require("./Radio");
|
|
|
53
55
|
Object.defineProperty(exports, "Radio", { enumerable: true, get: function () { return Radio_1.Radio; } });
|
|
54
56
|
var ReactionButton_1 = require("./ReactionButton");
|
|
55
57
|
Object.defineProperty(exports, "ReactionButton", { enumerable: true, get: function () { return ReactionButton_1.ReactionButton; } });
|
|
58
|
+
var SegmentedButtonGroup_1 = require("./SegmentedButtonGroup");
|
|
59
|
+
Object.defineProperty(exports, "SegmentedButtonGroup", { enumerable: true, get: function () { return SegmentedButtonGroup_1.SegmentedButtonGroup; } });
|
|
56
60
|
var Select_1 = require("./Select");
|
|
57
61
|
Object.defineProperty(exports, "Select", { enumerable: true, get: function () { return Select_1.Select; } });
|
|
62
|
+
var Slider_1 = require("./Slider");
|
|
63
|
+
Object.defineProperty(exports, "Slider", { enumerable: true, get: function () { return Slider_1.Slider; } });
|
|
58
64
|
var StatusBlock_1 = require("./StatusBlock");
|
|
59
65
|
Object.defineProperty(exports, "StatusBlock", { enumerable: true, get: function () { return StatusBlock_1.StatusBlock; } });
|
|
60
66
|
var TextButton_1 = require("./TextButton");
|
|
@@ -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 { BasicChatListItem as M_BasicChatListItem, BasicFormGroup as M_BasicFormGroup, BasicList as M_BasicList, BasicListItem as M_BasicListItem, BlogTextField as M_BlogTextField, BodyTextGroup as M_BodyTextGroup, Card as M_Card, CardList as M_CardList, ChatBubbleListItem as M_ChatBubbleListItem, ChatList as M_ChatList, Checkbox as M_Checkbox, Chip as M_Chip, ContextMenu as M_ContextMenu, ContextMenuItem as M_ContextMenuItem, 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, Select as M_Select, StatusBlock as M_StatusBlock, TextButton as M_TextButton, TextField as M_TextField, TextLabel as M_TextLabel, UploadIconButton as M_UploadIconButton, UploadMainButton as M_UploadMainButton, UploadTextButton as M_UploadTextButton } 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, Card as M_Card, CardList as M_CardList, ChatBubbleListItem as M_ChatBubbleListItem, ChatList as M_ChatList, Checkbox as M_Checkbox, Chip as M_Chip, ContextMenu as M_ContextMenu, ContextMenuItem as M_ContextMenuItem, 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, StatusBlock as M_StatusBlock, TextButton as M_TextButton, TextField as M_TextField, TextLabel as M_TextLabel, UploadIconButton as M_UploadIconButton, UploadMainButton as M_UploadMainButton, UploadTextButton as M_UploadTextButton } 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,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.M_AnnotationSheet = exports.M_UploadTextButton = exports.M_UploadMainButton = exports.M_UploadIconButton = exports.M_TextLabel = exports.M_TextField = exports.M_TextButton = exports.M_StatusBlock = 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_ContextMenuItem = exports.M_ContextMenu = exports.M_Chip = exports.M_Checkbox = exports.M_ChatList = exports.M_ChatBubbleListItem = exports.M_CardList = exports.M_Card = 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 = void 0;
|
|
4
5
|
// layoutMF
|
|
5
6
|
var LayoutMF_1 = require("./layout/LayoutMF");
|
|
6
7
|
Object.defineProperty(exports, "LayoutMF", { enumerable: true, get: function () { return LayoutMF_1.LayoutMF; } });
|
|
@@ -30,6 +31,7 @@ var ContainersBox_4 = require("./layout/LayoutMS/ContainersBox");
|
|
|
30
31
|
Object.defineProperty(exports, "MSContainersBox", { enumerable: true, get: function () { return ContainersBox_4.ContainersBox; } });
|
|
31
32
|
// components
|
|
32
33
|
var components_1 = require("./components");
|
|
34
|
+
Object.defineProperty(exports, "M_BasicButtonGroup", { enumerable: true, get: function () { return components_1.BasicButtonGroup; } });
|
|
33
35
|
Object.defineProperty(exports, "M_BasicChatListItem", { enumerable: true, get: function () { return components_1.BasicChatListItem; } });
|
|
34
36
|
Object.defineProperty(exports, "M_BasicFormGroup", { enumerable: true, get: function () { return components_1.BasicFormGroup; } });
|
|
35
37
|
Object.defineProperty(exports, "M_BasicList", { enumerable: true, get: function () { return components_1.BasicList; } });
|
|
@@ -56,7 +58,9 @@ Object.defineProperty(exports, "M_MobileHeaderBar", { enumerable: true, get: fun
|
|
|
56
58
|
Object.defineProperty(exports, "M_MobileTabBar", { enumerable: true, get: function () { return components_1.MobileTabBar; } });
|
|
57
59
|
Object.defineProperty(exports, "M_Radio", { enumerable: true, get: function () { return components_1.Radio; } });
|
|
58
60
|
Object.defineProperty(exports, "M_ReactionButton", { enumerable: true, get: function () { return components_1.ReactionButton; } });
|
|
61
|
+
Object.defineProperty(exports, "M_SegmentedButtonGroup", { enumerable: true, get: function () { return components_1.SegmentedButtonGroup; } });
|
|
59
62
|
Object.defineProperty(exports, "M_Select", { enumerable: true, get: function () { return components_1.Select; } });
|
|
63
|
+
Object.defineProperty(exports, "M_Slider", { enumerable: true, get: function () { return components_1.Slider; } });
|
|
60
64
|
Object.defineProperty(exports, "M_StatusBlock", { enumerable: true, get: function () { return components_1.StatusBlock; } });
|
|
61
65
|
Object.defineProperty(exports, "M_TextButton", { enumerable: true, get: function () { return components_1.TextButton; } });
|
|
62
66
|
Object.defineProperty(exports, "M_TextField", { enumerable: true, get: function () { return components_1.TextField; } });
|
|
@@ -1146,18 +1146,21 @@ exports.SampleSectionsMock = [
|
|
|
1146
1146
|
updatedAt: '2023-01-12T08:03:48'
|
|
1147
1147
|
},
|
|
1148
1148
|
{
|
|
1149
|
-
display: true,
|
|
1150
1149
|
type: 'PROGRAMMED',
|
|
1151
1150
|
program: 'MEMBERSHIP_DISPLAY',
|
|
1152
|
-
|
|
1151
|
+
display: true,
|
|
1152
|
+
dynamicLayoutSectionItems: null,
|
|
1153
1153
|
id: 6010,
|
|
1154
|
+
insertedAt: '2023-01-06T09:05:45',
|
|
1154
1155
|
manifest: {
|
|
1155
1156
|
availableProperties: [
|
|
1156
1157
|
'title',
|
|
1157
1158
|
'description',
|
|
1158
1159
|
'button_alpha_label',
|
|
1159
1160
|
'button_alpha_link_type',
|
|
1160
|
-
'button_alpha_link_src'
|
|
1161
|
+
'button_alpha_link_src',
|
|
1162
|
+
'section_content_media_type',
|
|
1163
|
+
'section_content_media_src'
|
|
1161
1164
|
],
|
|
1162
1165
|
availableStyles: [
|
|
1163
1166
|
'title_color_in_hex',
|
|
@@ -1176,7 +1179,7 @@ exports.SampleSectionsMock = [
|
|
|
1176
1179
|
availableTemplates: ['PRG_MEMBERSHIP_DISPLAY_A', 'PRG_MEMBERSHIP_DISPLAY_B'],
|
|
1177
1180
|
schema: 'PRG_MEMBERSHIP_DISPLAY'
|
|
1178
1181
|
},
|
|
1179
|
-
order:
|
|
1182
|
+
order: 10,
|
|
1180
1183
|
properties: {
|
|
1181
1184
|
buttonAlphaLabel: 'Lorem Ipsum',
|
|
1182
1185
|
buttonAlphaLinkSrc: 'https://team.publ.space',
|
|
@@ -1197,140 +1200,45 @@ exports.SampleSectionsMock = [
|
|
|
1197
1200
|
carouselAutoplayTime: 3,
|
|
1198
1201
|
carouselInfiniteLoopMode: 'NO_USE',
|
|
1199
1202
|
description: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.",
|
|
1203
|
+
itemLinkMethod: 'CLICK_BUTTON_IN_ITEM',
|
|
1200
1204
|
sectionContentMediaSrc: '',
|
|
1201
1205
|
sectionContentMediaType: 'IMAGE',
|
|
1202
1206
|
title: 'Lorem Ipsum',
|
|
1203
|
-
multiPurposeUrl: 'https://app.publr.co/'
|
|
1204
|
-
itemLinkMethod: 'NONE'
|
|
1207
|
+
multiPurposeUrl: 'https://app.publr.co/'
|
|
1205
1208
|
},
|
|
1206
1209
|
styles: {
|
|
1207
|
-
backgroundColorInHex: '#
|
|
1210
|
+
backgroundColorInHex: '#FF1D973B',
|
|
1208
1211
|
backgroundMediaSrc: '',
|
|
1209
1212
|
backgroundMediaType: 'IMAGE',
|
|
1210
1213
|
backgroundOverlayColorInHex: '#FFFFFF00',
|
|
1211
|
-
buttonAlphaBackgroundColorInHex: '#
|
|
1214
|
+
buttonAlphaBackgroundColorInHex: '#FFC0CBFF',
|
|
1212
1215
|
buttonAlphaDesignType: 'C',
|
|
1213
1216
|
buttonAlphaLabelColorInHex: '#f5efd9FF',
|
|
1214
|
-
buttonBravoBackgroundColorInHex: '#
|
|
1217
|
+
buttonBravoBackgroundColorInHex: '#FFC0CBFF',
|
|
1215
1218
|
buttonBravoDesignType: 'E',
|
|
1216
1219
|
buttonBravoLabelColorInHex: '#FFFFFFFF',
|
|
1217
1220
|
buttonCharlieBackgroundColorInHex: '#465FF000',
|
|
1218
1221
|
buttonCharlieDesignType: 'E',
|
|
1219
1222
|
buttonCharlieLabelColorInHex: '#FFFFFFFF',
|
|
1220
|
-
buttonDeltaBackgroundColorInHex: '#
|
|
1223
|
+
buttonDeltaBackgroundColorInHex: '#FFC0CBFF',
|
|
1221
1224
|
buttonDeltaDesignType: 'A',
|
|
1222
1225
|
buttonDeltaLabelColorInHex: '#FFFFFFFF',
|
|
1223
|
-
buttonEchoBackgroundColorInHex: '#
|
|
1226
|
+
buttonEchoBackgroundColorInHex: '#FFC0CBFF',
|
|
1224
1227
|
buttonEchoDesignType: 'A',
|
|
1225
1228
|
buttonEchoLabelColorInHex: '#FFFFFFFF',
|
|
1226
|
-
descriptionColorInHex: '#
|
|
1227
|
-
itemButtonBackgroundColorInHex: '#
|
|
1229
|
+
descriptionColorInHex: '#FEECD8FF',
|
|
1230
|
+
itemButtonBackgroundColorInHex: '#FFC0CBFF',
|
|
1228
1231
|
itemButtonDesignType: 'A',
|
|
1229
1232
|
itemButtonLabelColorInHex: '#FFFFFFFF',
|
|
1230
1233
|
itemDescriptionColorInHex: '#68686BFF',
|
|
1231
1234
|
itemTitleColorInHex: '#1E1E20FF',
|
|
1232
|
-
|
|
1233
|
-
itemHighlightingColorInHex: '#ff7f50FF',
|
|
1235
|
+
itemHighlightingColorInHex: '#FF1D97FF',
|
|
1234
1236
|
itemToneType: 'LIGHT',
|
|
1237
|
+
titleColorInHex: '#F8FFACFF',
|
|
1235
1238
|
programmedItemActionButtonTextType: 'A'
|
|
1236
1239
|
},
|
|
1237
|
-
template: '
|
|
1238
|
-
|
|
1239
|
-
mdid: 'mdid',
|
|
1240
|
-
preview: {
|
|
1241
|
-
availableResources: ['REAL.MEMBERSHIP_DISPLAY'],
|
|
1242
|
-
resources: {
|
|
1243
|
-
mock: {},
|
|
1244
|
-
real: {
|
|
1245
|
-
membershipDisplay: {
|
|
1246
|
-
id: 1,
|
|
1247
|
-
mdid: "MEMBERSHIP_DISPLAY_MD_ID",
|
|
1248
|
-
title: "MEMBERSHIP_DISPLAY_MD_TITLE",
|
|
1249
|
-
isDefault: true,
|
|
1250
|
-
connectedMemberships: Array.from({ length: 6 }, function (_, i) {
|
|
1251
|
-
var alphabet = ['A', 'B', 'C', 'D', 'E', 'F'];
|
|
1252
|
-
var cardImage = [
|
|
1253
|
-
'https://cdn.dev.publishingkit.net/7f3f7a31-023b-4852-9a11-cbac31d25d93',
|
|
1254
|
-
'https://cdn.dev.publishingkit.net/c8973261-6c2a-4833-9b9f-20ee355647e4',
|
|
1255
|
-
'https://cdn.dev.publishingkit.net/8e585c93-9591-4300-ad93-d002560cbeae',
|
|
1256
|
-
'https://cdn.dev.publishingkit.net/4aaa2811-b3ff-435c-b50a-9486376ab230',
|
|
1257
|
-
'https://cdn.dev.publishingkit.net/5111c33c-07ba-4b91-8eb6-9975f4cd906a',
|
|
1258
|
-
'https://cdn.dev.publishingkit.net/16ac0a8a-acb1-465b-960c-6be66f2a04e8.jpg'
|
|
1259
|
-
];
|
|
1260
|
-
var getOverlayType = function () {
|
|
1261
|
-
if (i % 3 === 1)
|
|
1262
|
-
return 'SOLID';
|
|
1263
|
-
if (i % 3 === 2)
|
|
1264
|
-
return 'GRADIENT';
|
|
1265
|
-
return 'NONE';
|
|
1266
|
-
};
|
|
1267
|
-
var getDesignSchema = function () {
|
|
1268
|
-
if (i % 3 === 1)
|
|
1269
|
-
return 'B';
|
|
1270
|
-
if (i % 3 === 2)
|
|
1271
|
-
return 'C';
|
|
1272
|
-
return 'A';
|
|
1273
|
-
};
|
|
1274
|
-
return {
|
|
1275
|
-
id: i + 1,
|
|
1276
|
-
order: i,
|
|
1277
|
-
mdid: "CONNECTED_MEMBERSHIPS_" + alphabet[i] + "_MD_ID",
|
|
1278
|
-
mid: "CONNECTED_MEMBERSHIPS_" + alphabet[i] + "_M_ID",
|
|
1279
|
-
membership: {
|
|
1280
|
-
id: i + 1,
|
|
1281
|
-
type: 'GENERAL',
|
|
1282
|
-
mid: "MEMBERSHIP_" + alphabet[i] + "_MID",
|
|
1283
|
-
title: '청춘이 황금시대를 우리의 같은 무엇을 쓸쓸한 돋고, 장식하는 칼이다. 동산에는 투명하되!',
|
|
1284
|
-
insertedAt: '2023-01-06T09:05:45',
|
|
1285
|
-
updatedAt: '2023-01-06T09:05:45',
|
|
1286
|
-
membershipCardTemplate: {
|
|
1287
|
-
backgroundImageSrc: cardImage[i],
|
|
1288
|
-
logoImageSrc: 'https://publ-upload-local.s3.ap-northeast-2.amazonaws.com/e11d1a92-a1c0-4faa-b341-13a32f21828d_image',
|
|
1289
|
-
overlayType: getOverlayType(),
|
|
1290
|
-
overlayColorPrimary: '#FFC0CB49',
|
|
1291
|
-
overlayColorSecondary: '#31313149',
|
|
1292
|
-
designSchema: getDesignSchema()
|
|
1293
|
-
},
|
|
1294
|
-
membershipBenefitInfo: {
|
|
1295
|
-
benefitAlpha: '청춘이 황금시대를 우리의 같은 무엇을 쓸쓸한 돋고, 장식하는 칼이다. 동산에는 투명하되!',
|
|
1296
|
-
benefitBravo: 'Lorem ipsum dolor sit amet. Et magnam molestiae.',
|
|
1297
|
-
benefitCharlie: '청춘이 황금시대를 우리의 같은 무엇을 쓸쓸한 돋고, 장식하는 칼이다. 동산에는 투명하되!',
|
|
1298
|
-
benefitDelta: 'Lorem ipsum dolor sit amet. Et magnam molestiae.',
|
|
1299
|
-
benefitEcho: 'Lorem ipsum dolor sit amet. Et magnam molestiae.'
|
|
1300
|
-
},
|
|
1301
|
-
totalSubscriptionProducts: 3
|
|
1302
|
-
},
|
|
1303
|
-
connectedSubscriptionProducts: Array.from({ length: 1 }, function () {
|
|
1304
|
-
return {
|
|
1305
|
-
id: i + 1,
|
|
1306
|
-
order: i,
|
|
1307
|
-
connectedMembershipId: i + 1,
|
|
1308
|
-
subscriptionProductId: i + 1,
|
|
1309
|
-
subscriptionProduct: {
|
|
1310
|
-
id: i + 1,
|
|
1311
|
-
type: 'COUPON_ONCE_FINITE',
|
|
1312
|
-
title: '청춘이 황금시대를 우리의 같은 무엇을',
|
|
1313
|
-
alias: "CONNECTED_SUBSCRIPTION_PRODUCTS_" + alphabet[i] + "_ALIAS",
|
|
1314
|
-
expiryPeriodInDays: 7,
|
|
1315
|
-
isDeactivated: i % 2 === 0,
|
|
1316
|
-
fee: {
|
|
1317
|
-
currency: 'KRW',
|
|
1318
|
-
amount: 10000
|
|
1319
|
-
},
|
|
1320
|
-
insertedAt: '2023-01-06T09:05:45',
|
|
1321
|
-
updatedAt: '2023-01-06T09:05:45'
|
|
1322
|
-
}
|
|
1323
|
-
};
|
|
1324
|
-
})
|
|
1325
|
-
};
|
|
1326
|
-
})
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
},
|
|
1332
|
-
insertedAt: '2023-01-30T10:24:35',
|
|
1333
|
-
updatedAt: '2023-01-30T10:24:35'
|
|
1240
|
+
template: 'PRG_MEMBERSHIP_DISPLAY_B',
|
|
1241
|
+
updatedAt: '2023-01-06T09:05:45'
|
|
1334
1242
|
}
|
|
1335
1243
|
];
|
|
1336
1244
|
var MembershipSectionsMock = function (templateType) { return [
|
|
@@ -30,7 +30,7 @@ function SectionContents() {
|
|
|
30
30
|
}
|
|
31
31
|
var _a = section.styles, buttonAlphaBackgroundColorInHex = _a.buttonAlphaBackgroundColorInHex, buttonAlphaLabelColorInHex = _a.buttonAlphaLabelColorInHex, buttonAlphaDesignType = _a.buttonAlphaDesignType, descriptionColorInHex = _a.descriptionColorInHex, titleColorInHex = _a.titleColorInHex;
|
|
32
32
|
var _b = section.properties, title = _b.title, description = _b.description, buttonAlphaLabel = _b.buttonAlphaLabel, buttonAlphaLinkSrc = _b.buttonAlphaLinkSrc, buttonAlphaLinkType = _b.buttonAlphaLinkType;
|
|
33
|
-
return ((0, jsx_runtime_1.jsxs)(S_SectionDataBox, __assign({ isEmptySectionData: !title && !description && !buttonAlphaLinkSrc }, { children: [title && ((0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.Title, { text: title,
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)(S_SectionDataBox, __assign({ isEmptySectionData: !title && !description && !buttonAlphaLinkSrc }, { children: [title && ((0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.Title, { text: title, textAlign: "center", color: titleColorInHex, styleTheme: "headingBold" }, void 0)), description && ((0, jsx_runtime_1.jsx)(S_DescriptionWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.Description, { text: description, textAlign: "center", color: descriptionColorInHex, styleTheme: "body1Regular" }, void 0) }, void 0)), buttonAlphaLinkSrc && ((0, jsx_runtime_1.jsx)(S_ButtonWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.DesignedSectionButton, { buttonType: buttonAlphaDesignType, text: buttonAlphaLabel, linkType: buttonAlphaLinkType, src: buttonAlphaLinkSrc, textColor: buttonAlphaLabelColorInHex, backgroundColor: buttonAlphaBackgroundColorInHex, borderColor: buttonAlphaLabelColorInHex }, void 0) }, void 0))] }), void 0));
|
|
34
34
|
}
|
|
35
35
|
var S_SectionDataBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-bottom: ", ";\n"], ["\n margin-bottom: ", ";\n"])), function (_a) {
|
|
36
36
|
var isEmptySectionData = _a.isEmptySectionData, theme = _a.theme;
|
|
@@ -30,7 +30,7 @@ function SectionContents() {
|
|
|
30
30
|
}
|
|
31
31
|
var _a = section.styles, buttonAlphaBackgroundColorInHex = _a.buttonAlphaBackgroundColorInHex, buttonAlphaLabelColorInHex = _a.buttonAlphaLabelColorInHex, buttonAlphaDesignType = _a.buttonAlphaDesignType, descriptionColorInHex = _a.descriptionColorInHex, titleColorInHex = _a.titleColorInHex;
|
|
32
32
|
var _b = section.properties, title = _b.title, description = _b.description, buttonAlphaLabel = _b.buttonAlphaLabel, buttonAlphaLinkSrc = _b.buttonAlphaLinkSrc, buttonAlphaLinkType = _b.buttonAlphaLinkType;
|
|
33
|
-
return ((0, jsx_runtime_1.jsxs)(S_SectionDataBox, __assign({ isEmptySectionData: !title && !description && !buttonAlphaLinkSrc }, { children: [title && ((0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.Title, { text: title,
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)(S_SectionDataBox, __assign({ isEmptySectionData: !title && !description && !buttonAlphaLinkSrc }, { children: [title && ((0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.Title, { text: title, textAlign: "center", color: titleColorInHex, styleTheme: "headingBold" }, void 0)), description && ((0, jsx_runtime_1.jsx)(S_DescriptionWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.Description, { text: description, textAlign: "center", color: descriptionColorInHex, styleTheme: "body1Regular" }, void 0) }, void 0)), buttonAlphaLinkSrc && ((0, jsx_runtime_1.jsx)(S_ButtonWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.DesignedSectionButton, { buttonType: buttonAlphaDesignType, text: buttonAlphaLabel, linkType: buttonAlphaLinkType, src: buttonAlphaLinkSrc, textColor: buttonAlphaLabelColorInHex, backgroundColor: buttonAlphaBackgroundColorInHex, borderColor: buttonAlphaLabelColorInHex }, void 0) }, void 0))] }), void 0));
|
|
34
34
|
}
|
|
35
35
|
var S_SectionDataBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-bottom: ", ";\n"], ["\n margin-bottom: ", ";\n"])), function (_a) {
|
|
36
36
|
var isEmptySectionData = _a.isEmptySectionData, theme = _a.theme;
|
package/package.json
CHANGED
package/release-note.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# PDS-DEV-KIT-WEB Release Notes
|
|
2
|
-
## [v2.
|
|
2
|
+
## [v2.1.0]
|
|
3
|
+
## release|https://design.storybook.publ.biz/
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
### components
|
|
6
|
+
* BasicButtonGroup 생성
|
|
7
|
+
* Dropdown
|
|
8
|
+
* displayType prop 추가 (icon 활용 가능하게 업데이트)
|
|
9
|
+
* SegmentedButtonGroup 생성
|
|
10
|
+
* Slider 생성
|