pds-dev-kit-web 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/common/styles/theme.js +1 -1
- package/dist/src/common/styles/ui-colors.d.ts +5 -0
- package/dist/src/common/styles/ui-colors.js +4 -0
- package/dist/src/desktop/components/IconButton/IconButton.js +6 -2
- package/dist/src/desktop/components/TextLabel/TextLabel.js +1 -1
- package/dist/src/desktop/components/UploadIconButton/UploadIconButton.js +6 -2
- package/dist/src/hybrid/components/Icon/Icon.d.ts +1 -6
- package/dist/src/hybrid/components/Icon/Icon.js +2 -2
- package/dist/src/mobile/components/IconButton/IconButton.js +6 -2
- package/dist/src/mobile/components/MobileHeaderBar/MobileHeaderBar.js +1 -1
- package/dist/src/mobile/components/TextLabel/TextLabel.js +1 -1
- package/dist/src/mobile/components/UploadIconButton/UploadIconButton.js +6 -2
- package/package.json +1 -1
|
@@ -97,5 +97,5 @@ exports.spacing = {
|
|
|
97
97
|
spacingM: '288px',
|
|
98
98
|
spacingN: '320px'
|
|
99
99
|
};
|
|
100
|
-
var theme = __assign({ fontWeight: exports.fontWeight, desktopFontSize: exports.desktopFontSize, desktopLineHeight: exports.desktopLineHeight, mobileFontSize: exports.mobileFontSize, mobileLineHeight: exports.mobileLineHeight, boxShadow: exports.boxShadow, spacing: exports.spacing }, ui_colors_1.
|
|
100
|
+
var theme = __assign({ fontWeight: exports.fontWeight, desktopFontSize: exports.desktopFontSize, desktopLineHeight: exports.desktopLineHeight, mobileFontSize: exports.mobileFontSize, mobileLineHeight: exports.mobileLineHeight, boxShadow: exports.boxShadow, spacing: exports.spacing }, (0, ui_colors_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK'));
|
|
101
101
|
exports.default = theme;
|
|
@@ -36,7 +36,11 @@ var phaseTwoJSON = colorSetting.tone === 'LIGHT' ? colorSet_1.default.PaletteCol
|
|
|
36
36
|
// ui-color-build-phase
|
|
37
37
|
var paletteColors = buildCascadedColors(colorSet_1.default.SemanticColor, phaseTwoJSON, colorSetting.customPalette);
|
|
38
38
|
exports.uiColors = buildCascadedColors(paletteColors, colorSet_1.default.UIColor);
|
|
39
|
+
window.PdsUtils = {
|
|
40
|
+
tone: 'DARK'
|
|
41
|
+
};
|
|
39
42
|
var customTheme = function (tone) {
|
|
43
|
+
window.PdsUtils.tone = tone;
|
|
40
44
|
var buildedColors = buildCascadedColors(buildCascadedColors(colorSet_1.default.SemanticColor, tone === 'LIGHT' ? colorSet_1.default.PaletteColor_light : colorSet_1.default.PaletteColor_Dark, colorSetting.customPalette), colorSet_1.default.UIColor);
|
|
41
45
|
return buildedColors;
|
|
42
46
|
};
|
|
@@ -73,7 +73,9 @@ var fillDisabled = (0, styled_components_1.css)(templateObject_1 || (templateObj
|
|
|
73
73
|
});
|
|
74
74
|
var fill = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n\n &:hover:enabled {\n ", "\n }\n\n &:active:enabled {\n ", "\n }\n\n ", ";\n"], ["\n background-color: ", ";\n\n &:hover:enabled {\n ", "\n }\n\n &:active:enabled {\n ", "\n }\n\n ", ";\n"])), function (_a) {
|
|
75
75
|
var theme = _a.theme, baseColorKey = _a.baseColorKey;
|
|
76
|
-
return baseColorKey
|
|
76
|
+
return baseColorKey
|
|
77
|
+
? (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK')[baseColorKey]
|
|
78
|
+
: theme.ui_cpnt_button_fill_base_primary;
|
|
77
79
|
}, function (_a) {
|
|
78
80
|
var theme = _a.theme, baseColorKey = _a.baseColorKey;
|
|
79
81
|
return baseColorKey === 'ui_cpnt_button_fill_base_transparent'
|
|
@@ -100,7 +102,9 @@ var line = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 =
|
|
|
100
102
|
return theme.ui_cpnt_button_line_base_default;
|
|
101
103
|
}, function (_a) {
|
|
102
104
|
var theme = _a.theme, borderColorKey = _a.borderColorKey;
|
|
103
|
-
return borderColorKey
|
|
105
|
+
return borderColorKey
|
|
106
|
+
? (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK')[borderColorKey]
|
|
107
|
+
: theme.ui_cpnt_button_line_border_enabled;
|
|
104
108
|
}, function (_a) {
|
|
105
109
|
var colorTheme = _a.colorTheme;
|
|
106
110
|
switch (colorTheme) {
|
|
@@ -245,7 +245,7 @@ var usrTextBrandOnPrimary = (0, styled_components_1.css)(templateObject_27 || (t
|
|
|
245
245
|
});
|
|
246
246
|
var colorOverrideStyle = (0, styled_components_1.css)(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
247
247
|
var colorOverride = _a.colorOverride;
|
|
248
|
-
return colorOverride && common_1.
|
|
248
|
+
return colorOverride && (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK')[colorOverride];
|
|
249
249
|
});
|
|
250
250
|
var ellipsisStyle = (0, styled_components_1.css)(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n -webkit-box-orient: vertical;\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n -webkit-box-orient: vertical;\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (_a) {
|
|
251
251
|
var lineLimit = _a.lineLimit;
|
|
@@ -62,7 +62,9 @@ var fillDisabled = (0, styled_components_1.css)(templateObject_1 || (templateObj
|
|
|
62
62
|
});
|
|
63
63
|
var fill = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n\n &:hover:not([disabled]) {\n ", "\n }\n\n &:active:not([disabled]) {\n background-image: ", ";\n }\n\n ", ";\n"], ["\n background-color: ", ";\n\n &:hover:not([disabled]) {\n ", "\n }\n\n &:active:not([disabled]) {\n background-image: ", ";\n }\n\n ", ";\n"])), function (_a) {
|
|
64
64
|
var theme = _a.theme, baseColorKey = _a.baseColorKey;
|
|
65
|
-
return baseColorKey
|
|
65
|
+
return baseColorKey
|
|
66
|
+
? (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK')[baseColorKey]
|
|
67
|
+
: theme.ui_cpnt_button_fill_base_primary;
|
|
66
68
|
}, function (_a) {
|
|
67
69
|
var theme = _a.theme, baseColorKey = _a.baseColorKey;
|
|
68
70
|
return baseColorKey === 'ui_cpnt_button_fill_base_transparent'
|
|
@@ -97,7 +99,9 @@ var line = (0, styled_components_1.css)(templateObject_6 || (templateObject_6 =
|
|
|
97
99
|
return theme.ui_cpnt_button_line_base_default;
|
|
98
100
|
}, function (_a) {
|
|
99
101
|
var theme = _a.theme, borderColorKey = _a.borderColorKey;
|
|
100
|
-
return borderColorKey
|
|
102
|
+
return borderColorKey
|
|
103
|
+
? (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK')[borderColorKey]
|
|
104
|
+
: theme.ui_cpnt_button_line_border_enabled;
|
|
101
105
|
}, function (_a) {
|
|
102
106
|
var colorTheme = _a.colorTheme;
|
|
103
107
|
switch (colorTheme) {
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
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;
|
|
2
|
+
import { FillIconNameKeys, LineIconNameKeys, UiColors } from '../../../common';
|
|
8
3
|
export declare type IconProps = {
|
|
9
4
|
iconName?: FillIconNameKeys | LineIconNameKeys;
|
|
10
5
|
size?: 12 | 16 | 20 | 24 | 32 | 48 | 56 | 64 | 72;
|
|
@@ -4,14 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var common_1 = require("../../../common");
|
|
7
8
|
var fill_1 = __importDefault(require("../../../common/assets/icons/fill"));
|
|
8
9
|
var line_1 = __importDefault(require("../../../common/assets/icons/line"));
|
|
9
|
-
var ui_colors_1 = require("../../../common/styles/ui-colors");
|
|
10
10
|
var Icon = function (_a) {
|
|
11
11
|
var _b = _a.iconName, iconName = _b === void 0 ? 'ic_unavailable' : _b, _c = _a.size, size = _c === void 0 ? 24 : _c, _d = _a.colorKey, colorKey = _d === void 0 ? 'ui_cpnt_icon_sys_grey_01' : _d, _e = _a.fillType, fillType = _e === void 0 ? 'line' : _e;
|
|
12
12
|
var SelectedIcon = fillType === 'line'
|
|
13
13
|
? line_1.default[iconName] || fill_1.default[iconName]
|
|
14
14
|
: fill_1.default[iconName] || line_1.default[iconName];
|
|
15
|
-
return react_1.default.createElement(SelectedIcon, { color:
|
|
15
|
+
return (react_1.default.createElement(SelectedIcon, { color: (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK')[colorKey], size: size }));
|
|
16
16
|
};
|
|
17
17
|
exports.default = Icon;
|
|
@@ -73,7 +73,9 @@ var fillDisabled = (0, styled_components_1.css)(templateObject_1 || (templateObj
|
|
|
73
73
|
});
|
|
74
74
|
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) {
|
|
75
75
|
var theme = _a.theme, baseColorKey = _a.baseColorKey;
|
|
76
|
-
return baseColorKey
|
|
76
|
+
return baseColorKey
|
|
77
|
+
? (0, ui_colors_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK')[baseColorKey]
|
|
78
|
+
: theme.ui_cpnt_button_fill_base_primary;
|
|
77
79
|
}, function (_a) {
|
|
78
80
|
var theme = _a.theme, baseColorKey = _a.baseColorKey;
|
|
79
81
|
return baseColorKey === 'ui_cpnt_button_fill_base_transparent'
|
|
@@ -95,7 +97,9 @@ var line = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 =
|
|
|
95
97
|
return theme.ui_cpnt_button_line_base_default;
|
|
96
98
|
}, function (_a) {
|
|
97
99
|
var theme = _a.theme, borderColorKey = _a.borderColorKey;
|
|
98
|
-
return borderColorKey
|
|
100
|
+
return borderColorKey
|
|
101
|
+
? (0, ui_colors_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK')[borderColorKey]
|
|
102
|
+
: theme.ui_cpnt_button_line_border_enabled;
|
|
99
103
|
}, function (_a) {
|
|
100
104
|
var colorTheme = _a.colorTheme;
|
|
101
105
|
switch (colorTheme) {
|
|
@@ -47,7 +47,7 @@ function MobileHeaderBar(_a) {
|
|
|
47
47
|
return react_1.default.createElement("div", null);
|
|
48
48
|
}
|
|
49
49
|
return (react_1.default.createElement(S_LeftButtonBox, null,
|
|
50
|
-
react_1.default.createElement(IconButton_1.IconButton, { iconName: iconName, fillType: "fill", iconFillType: "line", baseSize: "large", iconSize: 24, shapeType: "rectangle", onClick: handleClickLeftBtn, baseColorKey: "ui_cpnt_button_fill_base_transparent" })));
|
|
50
|
+
react_1.default.createElement(IconButton_1.IconButton, { iconName: iconName, fillType: "fill", iconFillType: "line", baseSize: "large", iconSize: 24, shapeType: "rectangle", onClick: handleClickLeftBtn, iconColorKey: "ui_cpnt_button_icon_enabled", baseColorKey: "ui_cpnt_button_fill_base_transparent" })));
|
|
51
51
|
};
|
|
52
52
|
var title = function () {
|
|
53
53
|
switch (titleType) {
|
|
@@ -245,7 +245,7 @@ var usrTextBrandOnPrimary = (0, styled_components_1.css)(templateObject_27 || (t
|
|
|
245
245
|
});
|
|
246
246
|
var colorOverrideStyle = (0, styled_components_1.css)(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
247
247
|
var colorOverride = _a.colorOverride;
|
|
248
|
-
return colorOverride && common_1.
|
|
248
|
+
return colorOverride && (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK')[colorOverride];
|
|
249
249
|
});
|
|
250
250
|
var ellipsisStyle = (0, styled_components_1.css)(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n -webkit-box-orient: vertical;\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n -webkit-box-orient: vertical;\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (_a) {
|
|
251
251
|
var lineLimit = _a.lineLimit;
|
|
@@ -62,7 +62,9 @@ var fillDisabled = (0, styled_components_1.css)(templateObject_1 || (templateObj
|
|
|
62
62
|
});
|
|
63
63
|
var fill = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n\n &:active:not([disabled]) {\n background-image: ", ";\n }\n\n ", ";\n"], ["\n background-color: ", ";\n\n &:active:not([disabled]) {\n background-image: ", ";\n }\n\n ", ";\n"])), function (_a) {
|
|
64
64
|
var theme = _a.theme, baseColorKey = _a.baseColorKey;
|
|
65
|
-
return baseColorKey
|
|
65
|
+
return baseColorKey
|
|
66
|
+
? (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK')[baseColorKey]
|
|
67
|
+
: theme.ui_cpnt_button_fill_base_primary;
|
|
66
68
|
}, function (_a) {
|
|
67
69
|
var theme = _a.theme, baseColorKey = _a.baseColorKey;
|
|
68
70
|
return baseColorKey === 'ui_cpnt_button_fill_base_transparent'
|
|
@@ -92,7 +94,9 @@ var line = (0, styled_components_1.css)(templateObject_6 || (templateObject_6 =
|
|
|
92
94
|
return theme.ui_cpnt_button_line_base_default;
|
|
93
95
|
}, function (_a) {
|
|
94
96
|
var theme = _a.theme, borderColorKey = _a.borderColorKey;
|
|
95
|
-
return borderColorKey
|
|
97
|
+
return borderColorKey
|
|
98
|
+
? (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK')[borderColorKey]
|
|
99
|
+
: theme.ui_cpnt_button_line_border_enabled;
|
|
96
100
|
}, function (_a) {
|
|
97
101
|
var colorTheme = _a.colorTheme;
|
|
98
102
|
switch (colorTheme) {
|