pds-dev-kit-web 0.3.47 → 0.4.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/README.md +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +3 -2
- package/dist/src/common/services/i18n/resources/en.json +56 -30
- package/dist/src/common/services/i18n/resources/es.json +56 -30
- package/dist/src/common/services/i18n/resources/index.d.ts +140 -36
- package/dist/src/common/services/i18n/resources/jp.json +56 -30
- package/dist/src/common/services/i18n/resources/ko.json +56 -30
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +2 -1
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +2 -1
- package/dist/src/common/styles/colorSet/SemanticColor.json +2 -1
- package/dist/src/common/styles/colorSet/index.d.ts +57 -54
- package/dist/src/common/styles/colorSet/index.js +2 -2
- package/dist/src/{hybrid → desktop}/components/IconButton/IconButton.d.ts +2 -2
- package/dist/src/{hybrid → desktop}/components/IconButton/IconButton.js +13 -11
- package/dist/src/{hybrid → desktop}/components/IconButton/index.d.ts +0 -0
- package/dist/src/{hybrid → desktop}/components/IconButton/index.js +0 -0
- package/dist/src/desktop/components/index.d.ts +2 -1
- package/dist/src/desktop/components/index.js +3 -1
- package/dist/src/desktop/index.d.ts +2 -2
- package/dist/src/desktop/index.js +2 -1
- package/dist/src/hybrid/components/index.d.ts +1 -2
- package/dist/src/hybrid/components/index.js +1 -3
- package/dist/src/hybrid/index.d.ts +2 -2
- package/dist/src/hybrid/index.js +1 -2
- package/dist/src/mobile/components/IconButton/IconButton.d.ts +26 -0
- package/dist/src/mobile/components/IconButton/IconButton.js +148 -0
- package/dist/src/mobile/components/IconButton/index.d.ts +1 -0
- package/dist/src/mobile/components/IconButton/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 +2 -2
- package/dist/src/mobile/index.js +2 -1
- package/package.json +1 -1
|
@@ -1,4 +1,59 @@
|
|
|
1
1
|
declare const colorSet: {
|
|
2
|
+
readonly SemanticColor: {
|
|
3
|
+
blue500: string;
|
|
4
|
+
blue700: string;
|
|
5
|
+
blue300: string;
|
|
6
|
+
green700: string;
|
|
7
|
+
green500: string;
|
|
8
|
+
green300: string;
|
|
9
|
+
red500: string;
|
|
10
|
+
grey900: string;
|
|
11
|
+
grey500: string;
|
|
12
|
+
grey400: string;
|
|
13
|
+
grey100: string;
|
|
14
|
+
grey50: string;
|
|
15
|
+
white: string;
|
|
16
|
+
black: string;
|
|
17
|
+
darkblue500: string;
|
|
18
|
+
grey950: string;
|
|
19
|
+
darkgrey900: string;
|
|
20
|
+
darkgrey500: string;
|
|
21
|
+
darkgrey400: string;
|
|
22
|
+
darkgrey100: string;
|
|
23
|
+
darkgrey50: string;
|
|
24
|
+
darkred500: string;
|
|
25
|
+
darkgreen700: string;
|
|
26
|
+
orange500: string;
|
|
27
|
+
darkorange500: string;
|
|
28
|
+
opacity00: string;
|
|
29
|
+
opacity20: string;
|
|
30
|
+
opacity30: string;
|
|
31
|
+
opacity65: string;
|
|
32
|
+
darkgreen500: string;
|
|
33
|
+
grey70: string;
|
|
34
|
+
navy500: string;
|
|
35
|
+
lightgreen500: string;
|
|
36
|
+
pink500: string;
|
|
37
|
+
darkgrey70: string;
|
|
38
|
+
darknavy500: string;
|
|
39
|
+
darkpink500: string;
|
|
40
|
+
darklightgreen500: string;
|
|
41
|
+
opacity10: string;
|
|
42
|
+
grey600: string;
|
|
43
|
+
darkgrey600: string;
|
|
44
|
+
skyblue500: string;
|
|
45
|
+
skyblue300: string;
|
|
46
|
+
pink300: string;
|
|
47
|
+
lightpink500: string;
|
|
48
|
+
darkblue300: string;
|
|
49
|
+
darkblue700: string;
|
|
50
|
+
darkgreen300: string;
|
|
51
|
+
darkskyblue500: string;
|
|
52
|
+
navy100: string;
|
|
53
|
+
darknavy100: string;
|
|
54
|
+
opacity80: string;
|
|
55
|
+
opacity50: string;
|
|
56
|
+
};
|
|
2
57
|
readonly PaletteColor_light: {
|
|
3
58
|
sys_container_background_01: string;
|
|
4
59
|
sys_container_background_02: string;
|
|
@@ -119,60 +174,7 @@ declare const colorSet: {
|
|
|
119
174
|
sys_border_line_darktheme_04: string;
|
|
120
175
|
usr_widget_brand_primary_darktheme_01: string;
|
|
121
176
|
usr_text_brand_primary_darktheme_01: string;
|
|
122
|
-
|
|
123
|
-
readonly SemanticColor: {
|
|
124
|
-
blue500: string;
|
|
125
|
-
blue700: string;
|
|
126
|
-
blue300: string;
|
|
127
|
-
green700: string;
|
|
128
|
-
green500: string;
|
|
129
|
-
green300: string;
|
|
130
|
-
red500: string;
|
|
131
|
-
grey900: string;
|
|
132
|
-
grey500: string;
|
|
133
|
-
grey400: string;
|
|
134
|
-
grey100: string;
|
|
135
|
-
grey50: string;
|
|
136
|
-
white: string;
|
|
137
|
-
black: string;
|
|
138
|
-
darkblue500: string;
|
|
139
|
-
grey950: string;
|
|
140
|
-
darkgrey900: string;
|
|
141
|
-
darkgrey500: string;
|
|
142
|
-
darkgrey400: string;
|
|
143
|
-
darkgrey100: string;
|
|
144
|
-
darkgrey50: string;
|
|
145
|
-
darkred500: string;
|
|
146
|
-
darkgreen700: string;
|
|
147
|
-
orange500: string;
|
|
148
|
-
darkorange500: string;
|
|
149
|
-
opacity00: string;
|
|
150
|
-
opacity20: string;
|
|
151
|
-
opacity30: string;
|
|
152
|
-
opacity65: string;
|
|
153
|
-
darkgreen500: string;
|
|
154
|
-
grey70: string;
|
|
155
|
-
navy500: string;
|
|
156
|
-
lightgreen500: string;
|
|
157
|
-
pink500: string;
|
|
158
|
-
darkgrey70: string;
|
|
159
|
-
darknavy500: string;
|
|
160
|
-
darkpink500: string;
|
|
161
|
-
darklightgreen500: string;
|
|
162
|
-
opacity10: string;
|
|
163
|
-
grey600: string;
|
|
164
|
-
darkgrey600: string;
|
|
165
|
-
skyblue500: string;
|
|
166
|
-
skyblue300: string;
|
|
167
|
-
pink300: string;
|
|
168
|
-
lightpink500: string;
|
|
169
|
-
darkblue300: string;
|
|
170
|
-
darkblue700: string;
|
|
171
|
-
darkgreen300: string;
|
|
172
|
-
darkskyblue500: string;
|
|
173
|
-
navy100: string;
|
|
174
|
-
darknavy100: string;
|
|
175
|
-
opacity80: string;
|
|
177
|
+
sys_component_base_black_opacity50: string;
|
|
176
178
|
};
|
|
177
179
|
readonly PaletteColor_Dark: {
|
|
178
180
|
sys_container_background_01: string;
|
|
@@ -294,6 +296,7 @@ declare const colorSet: {
|
|
|
294
296
|
sys_border_line_darktheme_04: string;
|
|
295
297
|
usr_widget_brand_primary_darktheme_01: string;
|
|
296
298
|
usr_text_brand_primary_darktheme_01: string;
|
|
299
|
+
sys_component_base_black_opacity50: string;
|
|
297
300
|
};
|
|
298
301
|
readonly UIColor: {
|
|
299
302
|
ui_cpnt_button_fill_base_primary: string;
|
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
/* eslint-disable import/order */
|
|
7
|
-
var PaletteColor_light_json_1 = __importDefault(require("./PaletteColor_light.json"));
|
|
8
7
|
var SemanticColor_json_1 = __importDefault(require("./SemanticColor.json"));
|
|
8
|
+
var PaletteColor_light_json_1 = __importDefault(require("./PaletteColor_light.json"));
|
|
9
9
|
var PaletteColor_Dark_json_1 = __importDefault(require("./PaletteColor_Dark.json"));
|
|
10
10
|
var UIColor_json_1 = __importDefault(require("./UIColor.json"));
|
|
11
11
|
var colorSet = {
|
|
12
|
-
PaletteColor_light: PaletteColor_light_json_1.default,
|
|
13
12
|
SemanticColor: SemanticColor_json_1.default,
|
|
13
|
+
PaletteColor_light: PaletteColor_light_json_1.default,
|
|
14
14
|
PaletteColor_Dark: PaletteColor_Dark_json_1.default,
|
|
15
15
|
UIColor: UIColor_json_1.default
|
|
16
16
|
};
|
|
@@ -8,10 +8,10 @@ export declare type UiColors = keyof typeof uiColors;
|
|
|
8
8
|
export declare type IconButtonProps = {
|
|
9
9
|
fillType?: 'fill' | 'line';
|
|
10
10
|
shapeType?: 'circular' | 'rectangle';
|
|
11
|
-
baseSize?: 'large' | 'medium' | 'small' | 'xsmall';
|
|
11
|
+
baseSize?: 'xxlarge' | 'large' | 'medium' | 'small' | 'xsmall';
|
|
12
12
|
baseColorKey?: UiColors;
|
|
13
13
|
borderColorKey?: UiColors;
|
|
14
|
-
iconSize?: 12 | 16 | 20 | 24;
|
|
14
|
+
iconSize?: 12 | 16 | 20 | 24 | 48 | 72;
|
|
15
15
|
iconFillType?: 'fill' | 'line';
|
|
16
16
|
iconName: FillIconNameKeys | LineIconNameKeys;
|
|
17
17
|
iconColorKey?: UiColors;
|
|
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
31
31
|
var ui_colors_1 = require("../../../common/styles/ui-colors");
|
|
32
|
-
var
|
|
32
|
+
var hybrid_1 = require("../../../hybrid");
|
|
33
33
|
function IconButton(_a) {
|
|
34
34
|
var _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.shapeType, shapeType = _c === void 0 ? 'rectangle' : _c, _d = _a.baseSize, baseSize = _d === void 0 ? 'small' : _d, baseColorKey = _a.baseColorKey, borderColorKey = _a.borderColorKey, _e = _a.iconSize, iconSize = _e === void 0 ? 24 : _e, _f = _a.iconFillType, iconFillType = _f === void 0 ? 'line' : _f, iconName = _a.iconName, iconColorKey = _a.iconColorKey, _g = _a.shadow, shadow = _g === void 0 ? 'hidden' : _g, _h = _a.colorTheme, colorTheme = _h === void 0 ? 'none' : _h, _j = _a.type, type = _j === void 0 ? 'button' : _j, _k = _a.state, state = _k === void 0 ? 'normal' : _k, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
|
|
35
35
|
var iconStateColorObj = {
|
|
@@ -53,7 +53,7 @@ function IconButton(_a) {
|
|
|
53
53
|
return iconStateColorObj[fillType];
|
|
54
54
|
};
|
|
55
55
|
return (react_1.default.createElement(S_IconButton, { fillType: fillType, shapeType: shapeType, baseSize: baseSize, baseColorKey: baseColorKey, borderColorKey: borderColorKey, shadow: shadow, colorTheme: colorTheme, type: type, state: state, disabled: state === 'disabled', onClick: onClick, onMouseDown: onMouseDown },
|
|
56
|
-
react_1.default.createElement(
|
|
56
|
+
react_1.default.createElement(hybrid_1.Icon, { iconName: iconName, size: iconSize, colorKey: IconColorSelect(), fillType: iconFillType })));
|
|
57
57
|
}
|
|
58
58
|
var fillDisabled = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (_a) {
|
|
59
59
|
var theme = _a.theme, baseColorKey = _a.baseColorKey;
|
|
@@ -111,19 +111,20 @@ var line = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 =
|
|
|
111
111
|
var state = _a.state;
|
|
112
112
|
return state === 'disabled' && lineDisabled;
|
|
113
113
|
});
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
var
|
|
118
|
-
var
|
|
114
|
+
var xxlarge = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n height: 96px;\n width: 96px;\n"], ["\n height: 96px;\n width: 96px;\n"])));
|
|
115
|
+
var large = (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n height: 48px;\n width: 48px;\n"], ["\n height: 48px;\n width: 48px;\n"])));
|
|
116
|
+
var medium = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n height: 40px;\n width: 40px;\n"], ["\n height: 40px;\n width: 40px;\n"])));
|
|
117
|
+
var small = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n height: 32px;\n width: 32px;\n"], ["\n height: 32px;\n width: 32px;\n"])));
|
|
118
|
+
var xsmall = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n height: 24px;\n width: 24px;\n"], ["\n height: 24px;\n width: 24px;\n"])));
|
|
119
|
+
var line1ColorTheme = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n border-color: ", ";\n"], ["\n border-color: ", ";\n"])), function (_a) {
|
|
119
120
|
var theme = _a.theme;
|
|
120
121
|
return theme.ui_cpnt_button_line_border_error;
|
|
121
122
|
});
|
|
122
|
-
var line2ColorTheme = (0, styled_components_1.css)(
|
|
123
|
+
var line2ColorTheme = (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n border-color: ", ";\n"], ["\n border-color: ", ";\n"])), function (_a) {
|
|
123
124
|
var theme = _a.theme;
|
|
124
125
|
return theme.ui_cpnt_button_line_border_primary;
|
|
125
126
|
});
|
|
126
|
-
var iconButtonStyle = (0, styled_components_1.css)(
|
|
127
|
+
var iconButtonStyle = (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n cursor: ", ";\n display: flex;\n justify-content: center;\n ", ";\n ", ";\n ", ";\n ", ";\n"], ["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n cursor: ", ";\n display: flex;\n justify-content: center;\n ", ";\n ", ";\n ", ";\n ", ";\n"])), function (_a) {
|
|
127
128
|
var state = _a.state;
|
|
128
129
|
return (state === 'normal' ? 'pointer' : 'default');
|
|
129
130
|
}, function (_a) {
|
|
@@ -143,12 +144,13 @@ var iconButtonStyle = (0, styled_components_1.css)(templateObject_11 || (templat
|
|
|
143
144
|
var baseSize = _a.baseSize;
|
|
144
145
|
return baseSize &&
|
|
145
146
|
{
|
|
147
|
+
xxlarge: xxlarge,
|
|
146
148
|
large: large,
|
|
147
149
|
medium: medium,
|
|
148
150
|
small: small,
|
|
149
151
|
xsmall: xsmall
|
|
150
152
|
}[baseSize];
|
|
151
153
|
});
|
|
152
|
-
var S_IconButton = styled_components_1.default.button(
|
|
154
|
+
var S_IconButton = styled_components_1.default.button(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), iconButtonStyle);
|
|
153
155
|
exports.default = IconButton;
|
|
154
|
-
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;
|
|
156
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TextLabel = exports.StatusBlock = exports.Hero = void 0;
|
|
3
|
+
exports.TextLabel = exports.StatusBlock = exports.IconButton = exports.Hero = void 0;
|
|
4
4
|
var Hero_1 = require("./Hero");
|
|
5
5
|
Object.defineProperty(exports, "Hero", { enumerable: true, get: function () { return Hero_1.Hero; } });
|
|
6
|
+
var IconButton_1 = require("./IconButton");
|
|
7
|
+
Object.defineProperty(exports, "IconButton", { enumerable: true, get: function () { return IconButton_1.IconButton; } });
|
|
6
8
|
var StatusBlock_1 = require("./StatusBlock");
|
|
7
9
|
Object.defineProperty(exports, "StatusBlock", { enumerable: true, get: function () { return StatusBlock_1.StatusBlock; } });
|
|
8
10
|
var TextLabel_1 = require("./TextLabel");
|
|
@@ -9,5 +9,5 @@ import { LayoutWT } from './layout/LayoutWT';
|
|
|
9
9
|
import { GlobalMenuContainer as WTGlobalMenuContainer } from './layout/LayoutWT/Containers';
|
|
10
10
|
import { ContainersBox as WTContainersBox } from './layout/LayoutWT/ContainersBox';
|
|
11
11
|
export { LayoutWT, WTGlobalMenuContainer, WTContainersBox };
|
|
12
|
-
import { Hero as D_Hero, StatusBlock as D_StatusBlock, TextLabel as D_TextLabel } from './components';
|
|
13
|
-
export { D_Hero, D_StatusBlock, D_TextLabel };
|
|
12
|
+
import { Hero as D_Hero, IconButton as D_IconButton, StatusBlock as D_StatusBlock, TextLabel as D_TextLabel } from './components';
|
|
13
|
+
export { D_Hero, D_IconButton, D_StatusBlock, D_TextLabel };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable import/order */
|
|
3
3
|
/* eslint-disable import/first */
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.D_TextLabel = exports.D_StatusBlock = exports.D_Hero = exports.WTContainersBox = exports.WTGlobalMenuContainer = exports.LayoutWT = exports.WSContainersBox = exports.WSGlobalMenuContainer = exports.LayoutWS = exports.WFContainersBox = exports.LayoutWF = void 0;
|
|
5
|
+
exports.D_TextLabel = exports.D_StatusBlock = exports.D_IconButton = exports.D_Hero = exports.WTContainersBox = exports.WTGlobalMenuContainer = exports.LayoutWT = exports.WSContainersBox = exports.WSGlobalMenuContainer = exports.LayoutWS = exports.WFContainersBox = exports.LayoutWF = void 0;
|
|
6
6
|
// layoutWF
|
|
7
7
|
var LayoutWF_1 = require("./layout/LayoutWF");
|
|
8
8
|
Object.defineProperty(exports, "LayoutWF", { enumerable: true, get: function () { return LayoutWF_1.LayoutWF; } });
|
|
@@ -25,5 +25,6 @@ Object.defineProperty(exports, "WTContainersBox", { enumerable: true, get: funct
|
|
|
25
25
|
// components
|
|
26
26
|
var components_1 = require("./components");
|
|
27
27
|
Object.defineProperty(exports, "D_Hero", { enumerable: true, get: function () { return components_1.Hero; } });
|
|
28
|
+
Object.defineProperty(exports, "D_IconButton", { enumerable: true, get: function () { return components_1.IconButton; } });
|
|
28
29
|
Object.defineProperty(exports, "D_StatusBlock", { enumerable: true, get: function () { return components_1.StatusBlock; } });
|
|
29
30
|
Object.defineProperty(exports, "D_TextLabel", { enumerable: true, get: function () { return components_1.TextLabel; } });
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Divider } from './Divider';
|
|
2
2
|
import { Icon } from './Icon';
|
|
3
|
-
import { IconButton } from './IconButton';
|
|
4
3
|
import { ImageView } from './ImageView';
|
|
5
4
|
import { Spacing } from './Spacing';
|
|
6
|
-
export { Divider, Icon,
|
|
5
|
+
export { Divider, Icon, ImageView, Spacing };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Spacing = exports.ImageView = exports.
|
|
3
|
+
exports.Spacing = exports.ImageView = exports.Icon = exports.Divider = void 0;
|
|
4
4
|
var Divider_1 = require("./Divider");
|
|
5
5
|
Object.defineProperty(exports, "Divider", { enumerable: true, get: function () { return Divider_1.Divider; } });
|
|
6
6
|
var Icon_1 = require("./Icon");
|
|
7
7
|
Object.defineProperty(exports, "Icon", { enumerable: true, get: function () { return Icon_1.Icon; } });
|
|
8
|
-
var IconButton_1 = require("./IconButton");
|
|
9
|
-
Object.defineProperty(exports, "IconButton", { enumerable: true, get: function () { return IconButton_1.IconButton; } });
|
|
10
8
|
var ImageView_1 = require("./ImageView");
|
|
11
9
|
Object.defineProperty(exports, "ImageView", { enumerable: true, get: function () { return ImageView_1.ImageView; } });
|
|
12
10
|
var Spacing_1 = require("./Spacing");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Divider, Icon,
|
|
2
|
-
export { Divider, Icon,
|
|
1
|
+
import { Divider, Icon, ImageView, Spacing } from './components';
|
|
2
|
+
export { Divider, Icon, ImageView, Spacing };
|
package/dist/src/hybrid/index.js
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
/* eslint-disable import/order */
|
|
3
3
|
/* eslint-disable import/first */
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.Spacing = exports.ImageView = exports.
|
|
5
|
+
exports.Spacing = exports.ImageView = exports.Icon = exports.Divider = void 0;
|
|
6
6
|
// component
|
|
7
7
|
var components_1 = require("./components");
|
|
8
8
|
Object.defineProperty(exports, "Divider", { enumerable: true, get: function () { return components_1.Divider; } });
|
|
9
9
|
Object.defineProperty(exports, "Icon", { enumerable: true, get: function () { return components_1.Icon; } });
|
|
10
|
-
Object.defineProperty(exports, "IconButton", { enumerable: true, get: function () { return components_1.IconButton; } });
|
|
11
10
|
Object.defineProperty(exports, "ImageView", { enumerable: true, get: function () { return components_1.ImageView; } });
|
|
12
11
|
Object.defineProperty(exports, "Spacing", { enumerable: true, get: function () { return components_1.Spacing; } });
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import fillIcons from '../../../common/assets/icons/fill';
|
|
3
|
+
import lineIcons from '../../../common/assets/icons/line';
|
|
4
|
+
import { uiColors } from '../../../common/styles/ui-colors';
|
|
5
|
+
export declare type FillIconNameKeys = keyof typeof fillIcons;
|
|
6
|
+
export declare type LineIconNameKeys = keyof typeof lineIcons;
|
|
7
|
+
export declare type UiColors = keyof typeof uiColors;
|
|
8
|
+
export declare type IconButtonProps = {
|
|
9
|
+
fillType?: 'fill' | 'line';
|
|
10
|
+
shapeType?: 'circular' | 'rectangle';
|
|
11
|
+
baseSize?: 'xxlarge' | 'large' | 'medium' | 'small' | 'xsmall';
|
|
12
|
+
baseColorKey?: UiColors;
|
|
13
|
+
borderColorKey?: UiColors;
|
|
14
|
+
iconSize?: 12 | 16 | 20 | 24 | 48 | 72;
|
|
15
|
+
iconFillType?: 'fill' | 'line';
|
|
16
|
+
iconName: FillIconNameKeys | LineIconNameKeys;
|
|
17
|
+
iconColorKey?: UiColors;
|
|
18
|
+
shadow?: 'hidden' | 'visible';
|
|
19
|
+
colorTheme?: 'none' | 'line1' | 'line2';
|
|
20
|
+
type?: 'submit' | 'reset' | 'button';
|
|
21
|
+
state?: 'normal' | 'disabled';
|
|
22
|
+
onClick?: (...args: any) => any;
|
|
23
|
+
onTouchStart?: (...args: any) => any;
|
|
24
|
+
};
|
|
25
|
+
declare function IconButton({ fillType, shapeType, baseSize, baseColorKey, borderColorKey, iconSize, iconFillType, iconName, iconColorKey, shadow, colorTheme, type, state, onClick, onTouchStart }: IconButtonProps): JSX.Element;
|
|
26
|
+
export default IconButton;
|
|
@@ -0,0 +1,148 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
31
|
+
var ui_colors_1 = require("../../../common/styles/ui-colors");
|
|
32
|
+
var hybrid_1 = require("../../../hybrid");
|
|
33
|
+
function IconButton(_a) {
|
|
34
|
+
var _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.shapeType, shapeType = _c === void 0 ? 'rectangle' : _c, _d = _a.baseSize, baseSize = _d === void 0 ? 'small' : _d, baseColorKey = _a.baseColorKey, borderColorKey = _a.borderColorKey, _e = _a.iconSize, iconSize = _e === void 0 ? 24 : _e, _f = _a.iconFillType, iconFillType = _f === void 0 ? 'line' : _f, iconName = _a.iconName, iconColorKey = _a.iconColorKey, _g = _a.shadow, shadow = _g === void 0 ? 'hidden' : _g, _h = _a.colorTheme, colorTheme = _h === void 0 ? 'none' : _h, _j = _a.type, type = _j === void 0 ? 'button' : _j, _k = _a.state, state = _k === void 0 ? 'normal' : _k, onClick = _a.onClick, onTouchStart = _a.onTouchStart;
|
|
35
|
+
var iconStateColorObj = {
|
|
36
|
+
fill: 'ui_cpnt_button_icon_on_primary',
|
|
37
|
+
line: 'ui_cpnt_button_icon_enabled'
|
|
38
|
+
};
|
|
39
|
+
var iconThemeColorLineObj = {
|
|
40
|
+
line1: 'ui_cpnt_button_icon_error',
|
|
41
|
+
line2: 'ui_cpnt_button_icon_primary'
|
|
42
|
+
};
|
|
43
|
+
var IconColorSelect = function () {
|
|
44
|
+
if (state === 'disabled') {
|
|
45
|
+
return 'ui_cpnt_button_icon_disabled';
|
|
46
|
+
}
|
|
47
|
+
if (colorTheme !== 'none' && fillType === 'line') {
|
|
48
|
+
return iconThemeColorLineObj[colorTheme];
|
|
49
|
+
}
|
|
50
|
+
if (iconColorKey) {
|
|
51
|
+
return iconColorKey;
|
|
52
|
+
}
|
|
53
|
+
return iconStateColorObj[fillType];
|
|
54
|
+
};
|
|
55
|
+
return (react_1.default.createElement(S_IconButton, { fillType: fillType, shapeType: shapeType, baseSize: baseSize, baseColorKey: baseColorKey, borderColorKey: borderColorKey, shadow: shadow, colorTheme: colorTheme, type: type, state: state, disabled: state === 'disabled', onClick: onClick, onTouchStart: onTouchStart },
|
|
56
|
+
react_1.default.createElement(hybrid_1.Icon, { iconName: iconName, size: iconSize, colorKey: IconColorSelect(), fillType: iconFillType })));
|
|
57
|
+
}
|
|
58
|
+
var fillDisabled = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (_a) {
|
|
59
|
+
var theme = _a.theme, baseColorKey = _a.baseColorKey;
|
|
60
|
+
return baseColorKey === 'ui_cpnt_button_fill_base_transparent'
|
|
61
|
+
? ''
|
|
62
|
+
: theme.ui_cpnt_button_fill_base_disabled;
|
|
63
|
+
});
|
|
64
|
+
var fill = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n\n &:active:enabled {\n ", "\n }\n\n ", ";\n"], ["\n background-color: ", ";\n\n &:active:enabled {\n ", "\n }\n\n ", ";\n"])), function (_a) {
|
|
65
|
+
var theme = _a.theme, baseColorKey = _a.baseColorKey;
|
|
66
|
+
return baseColorKey ? ui_colors_1.uiColors[baseColorKey] : theme.ui_cpnt_button_fill_base_primary;
|
|
67
|
+
}, function (_a) {
|
|
68
|
+
var theme = _a.theme, baseColorKey = _a.baseColorKey;
|
|
69
|
+
return baseColorKey === 'ui_cpnt_button_fill_base_transparent'
|
|
70
|
+
? ''
|
|
71
|
+
: "background-image: linear-gradient(\n to top,\n " + theme.ui_cpnt_button_fill_on_base_pressed + ",\n " + theme.ui_cpnt_button_fill_on_base_pressed + "\n );";
|
|
72
|
+
}, function (_a) {
|
|
73
|
+
var state = _a.state;
|
|
74
|
+
return state === 'disabled' && fillDisabled;
|
|
75
|
+
});
|
|
76
|
+
var lineDisabled = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-color: ", ";\n background-color: ", ";\n"], ["\n border-color: ", ";\n background-color: ", ";\n"])), function (_a) {
|
|
77
|
+
var theme = _a.theme;
|
|
78
|
+
return theme.ui_cpnt_button_line_border_disabled;
|
|
79
|
+
}, function (_a) {
|
|
80
|
+
var theme = _a.theme;
|
|
81
|
+
return theme.ui_cpnt_button_line_base_default;
|
|
82
|
+
});
|
|
83
|
+
var line = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background-color: ", ";\n border-color: ", ";\n\n ", ";\n\n &:active:enabled {\n ", "\n }\n\n ", ";\n"], ["\n background-color: ", ";\n border-color: ", ";\n\n ", ";\n\n &:active:enabled {\n ", "\n }\n\n ", ";\n"])), function (_a) {
|
|
84
|
+
var theme = _a.theme;
|
|
85
|
+
return theme.ui_cpnt_button_line_base_default;
|
|
86
|
+
}, function (_a) {
|
|
87
|
+
var theme = _a.theme, borderColorKey = _a.borderColorKey;
|
|
88
|
+
return borderColorKey ? ui_colors_1.uiColors[borderColorKey] : theme.ui_cpnt_button_line_border_enabled;
|
|
89
|
+
}, function (_a) {
|
|
90
|
+
var colorTheme = _a.colorTheme;
|
|
91
|
+
switch (colorTheme) {
|
|
92
|
+
case 'line1':
|
|
93
|
+
return line1ColorTheme;
|
|
94
|
+
case 'line2':
|
|
95
|
+
return line2ColorTheme;
|
|
96
|
+
default:
|
|
97
|
+
return '';
|
|
98
|
+
}
|
|
99
|
+
}, function (_a) {
|
|
100
|
+
var theme = _a.theme;
|
|
101
|
+
return "background-color: " + theme.ui_cpnt_button_line_base_pressed + "\n ;";
|
|
102
|
+
}, function (_a) {
|
|
103
|
+
var state = _a.state;
|
|
104
|
+
return state === 'disabled' && lineDisabled;
|
|
105
|
+
});
|
|
106
|
+
var xxlarge = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n height: 96px;\n width: 96px;\n"], ["\n height: 96px;\n width: 96px;\n"])));
|
|
107
|
+
var large = (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n height: 48px;\n width: 48px;\n"], ["\n height: 48px;\n width: 48px;\n"])));
|
|
108
|
+
var medium = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n height: 40px;\n width: 40px;\n"], ["\n height: 40px;\n width: 40px;\n"])));
|
|
109
|
+
var small = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n height: 32px;\n width: 32px;\n"], ["\n height: 32px;\n width: 32px;\n"])));
|
|
110
|
+
var xsmall = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n height: 24px;\n width: 24px;\n"], ["\n height: 24px;\n width: 24px;\n"])));
|
|
111
|
+
var line1ColorTheme = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n border-color: ", ";\n"], ["\n border-color: ", ";\n"])), function (_a) {
|
|
112
|
+
var theme = _a.theme;
|
|
113
|
+
return theme.ui_cpnt_button_line_border_error;
|
|
114
|
+
});
|
|
115
|
+
var line2ColorTheme = (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n border-color: ", ";\n"], ["\n border-color: ", ";\n"])), function (_a) {
|
|
116
|
+
var theme = _a.theme;
|
|
117
|
+
return theme.ui_cpnt_button_line_border_primary;
|
|
118
|
+
});
|
|
119
|
+
var iconButtonStyle = (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n cursor: ", ";\n display: flex;\n justify-content: center;\n ", ";\n ", ";\n ", ";\n ", ";\n"], ["\n align-items: center;\n background-color: transparent;\n border: 1px solid transparent;\n cursor: ", ";\n display: flex;\n justify-content: center;\n ", ";\n ", ";\n ", ";\n ", ";\n"])), function (_a) {
|
|
120
|
+
var state = _a.state;
|
|
121
|
+
return (state === 'normal' ? 'pointer' : 'default');
|
|
122
|
+
}, function (_a) {
|
|
123
|
+
var shapeType = _a.shapeType;
|
|
124
|
+
return shapeType && { circular: 'border-radius: 50%', rectangle: '' }[shapeType];
|
|
125
|
+
}, function (_a) {
|
|
126
|
+
var theme = _a.theme, shadow = _a.shadow;
|
|
127
|
+
return shadow === 'visible' && "box-shadow: " + theme.boxShadow.elevation2;
|
|
128
|
+
}, function (_a) {
|
|
129
|
+
var fillType = _a.fillType;
|
|
130
|
+
return fillType &&
|
|
131
|
+
{
|
|
132
|
+
fill: fill,
|
|
133
|
+
line: line
|
|
134
|
+
}[fillType];
|
|
135
|
+
}, function (_a) {
|
|
136
|
+
var baseSize = _a.baseSize;
|
|
137
|
+
return baseSize &&
|
|
138
|
+
{
|
|
139
|
+
xxlarge: xxlarge,
|
|
140
|
+
large: large,
|
|
141
|
+
medium: medium,
|
|
142
|
+
small: small,
|
|
143
|
+
xsmall: xsmall
|
|
144
|
+
}[baseSize];
|
|
145
|
+
});
|
|
146
|
+
var S_IconButton = styled_components_1.default.button(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), iconButtonStyle);
|
|
147
|
+
exports.default = IconButton;
|
|
148
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as IconButton } from './IconButton';
|
|
@@ -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.IconButton = void 0;
|
|
7
|
+
var IconButton_1 = require("./IconButton");
|
|
8
|
+
Object.defineProperty(exports, "IconButton", { enumerable: true, get: function () { return __importDefault(IconButton_1).default; } });
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TextLabel = exports.StatusBlock = void 0;
|
|
3
|
+
exports.TextLabel = exports.StatusBlock = exports.IconButton = void 0;
|
|
4
|
+
var IconButton_1 = require("./IconButton");
|
|
5
|
+
Object.defineProperty(exports, "IconButton", { enumerable: true, get: function () { return IconButton_1.IconButton; } });
|
|
4
6
|
var StatusBlock_1 = require("./StatusBlock");
|
|
5
7
|
Object.defineProperty(exports, "StatusBlock", { enumerable: true, get: function () { return StatusBlock_1.StatusBlock; } });
|
|
6
8
|
var TextLabel_1 = require("./TextLabel");
|
|
@@ -13,5 +13,5 @@ import { LayoutMS } from './layout/LayoutMS';
|
|
|
13
13
|
import { NavigationContainer as MSNavigationContainer } from './layout/LayoutMS/Containers';
|
|
14
14
|
import { ContainersBox as MSContainersBox } from './layout/LayoutMS/ContainersBox';
|
|
15
15
|
export { LayoutMS, MSNavigationContainer, MSContainersBox };
|
|
16
|
-
import { StatusBlock as M_StatusBlock, TextLabel as M_TextLabel } from './components';
|
|
17
|
-
export { M_StatusBlock, M_TextLabel };
|
|
16
|
+
import { IconButton as M_IconButton, StatusBlock as M_StatusBlock, TextLabel as M_TextLabel } from './components';
|
|
17
|
+
export { M_IconButton, M_StatusBlock, M_TextLabel };
|
package/dist/src/mobile/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable import/order */
|
|
3
3
|
/* eslint-disable import/first */
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.M_TextLabel = exports.M_StatusBlock = 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;
|
|
5
|
+
exports.M_TextLabel = exports.M_StatusBlock = exports.M_IconButton = 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;
|
|
6
6
|
// layoutMF
|
|
7
7
|
var LayoutMF_1 = require("./layout/LayoutMF");
|
|
8
8
|
Object.defineProperty(exports, "LayoutMF", { enumerable: true, get: function () { return LayoutMF_1.LayoutMF; } });
|
|
@@ -32,5 +32,6 @@ var ContainersBox_4 = require("./layout/LayoutMS/ContainersBox");
|
|
|
32
32
|
Object.defineProperty(exports, "MSContainersBox", { enumerable: true, get: function () { return ContainersBox_4.ContainersBox; } });
|
|
33
33
|
// components
|
|
34
34
|
var components_1 = require("./components");
|
|
35
|
+
Object.defineProperty(exports, "M_IconButton", { enumerable: true, get: function () { return components_1.IconButton; } });
|
|
35
36
|
Object.defineProperty(exports, "M_StatusBlock", { enumerable: true, get: function () { return components_1.StatusBlock; } });
|
|
36
37
|
Object.defineProperty(exports, "M_TextLabel", { enumerable: true, get: function () { return components_1.TextLabel; } });
|