pds-dev-kit-web 0.4.1 → 0.5.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/.vscode/settings.json +49 -0
- package/README.md +1 -1
- package/dist/index.d.ts +9 -8
- package/dist/index.js +46 -1
- package/dist/src/common/assets/icons/line/PostWelcome.d.ts +4 -0
- package/dist/src/common/assets/icons/line/PostWelcome.js +37 -0
- package/dist/src/common/assets/icons/line/TenSecBack.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TenSecBack.js +34 -0
- package/dist/src/common/assets/icons/line/TenSecBackArrow.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TenSecBackArrow.js +34 -0
- package/dist/src/common/assets/icons/line/TenSecForward.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TenSecForward.js +34 -0
- package/dist/src/common/assets/icons/line/TenSecForwardArrow.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TenSecForwardArrow.js +34 -0
- package/dist/src/common/assets/icons/line/index.d.ts +5 -0
- package/dist/src/common/assets/icons/line/index.js +10 -0
- package/dist/src/common/components/Form/Form.d.ts +16 -0
- package/dist/src/common/components/Form/Form.js +40 -0
- package/dist/src/common/components/Form/index.d.ts +1 -0
- package/dist/src/common/components/Form/index.js +8 -0
- package/dist/src/common/components/index.d.ts +2 -0
- package/dist/src/common/components/index.js +5 -0
- package/dist/src/common/decorators/withFormProvider.d.ts +4 -0
- package/dist/src/common/decorators/withFormProvider.js +28 -0
- package/dist/src/common/index.d.ts +6 -1
- package/dist/src/common/index.js +4 -1
- package/dist/src/common/services/i18n/resources/en.json +2794 -2569
- package/dist/src/common/services/i18n/resources/es.json +280 -55
- package/dist/src/common/services/i18n/resources/index.d.ts +936 -36
- package/dist/src/common/services/i18n/resources/jp.json +280 -55
- package/dist/src/common/services/i18n/resources/ko.json +277 -52
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +10 -7
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +4 -1
- package/dist/src/common/styles/colorSet/UIColor.json +11 -3
- package/dist/src/common/styles/colorSet/index.d.ts +70 -56
- package/dist/src/common/styles/colorSet/index.js +2 -2
- package/dist/src/common/styles/colorSet/ui-type.d.ts +9 -1
- package/dist/src/common/styles/index.d.ts +2 -0
- package/dist/src/common/styles/theme.d.ts +2 -0
- package/dist/src/common/styles/theme.js +4 -2
- package/dist/src/common/styles/ui-colors.js +1 -1
- package/dist/src/common/types/form.d.ts +3 -0
- package/dist/src/common/types/form.js +2 -0
- package/dist/src/common/types/icon.d.ts +4 -0
- package/dist/src/common/types/icon.js +2 -0
- package/dist/src/common/types/styled-components.d.ts +2 -0
- package/dist/src/common/types/uiColors.d.ts +2 -0
- package/dist/src/common/types/uiColors.js +2 -0
- package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.d.ts +45 -0
- package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.js +265 -0
- package/dist/src/desktop/common/components/TextFieldBase/index.d.ts +1 -0
- package/dist/src/desktop/common/components/TextFieldBase/index.js +8 -0
- package/dist/src/desktop/common/components/index.d.ts +2 -0
- package/dist/src/desktop/common/components/index.js +5 -0
- package/dist/src/desktop/components/Card/Card.d.ts +11 -0
- package/dist/src/desktop/components/Card/Card.js +50 -0
- package/dist/src/desktop/components/Card/index.d.ts +1 -0
- package/dist/src/desktop/components/Card/index.js +8 -0
- package/dist/src/desktop/components/CardList/CardList.d.ts +10 -0
- package/dist/src/desktop/components/CardList/CardList.js +30 -0
- package/dist/src/desktop/components/CardList/index.d.ts +1 -0
- package/dist/src/desktop/components/CardList/index.js +8 -0
- package/dist/src/desktop/components/Checkbox/Checkbox.d.ts +11 -0
- package/dist/src/desktop/components/Checkbox/Checkbox.js +65 -0
- package/dist/src/desktop/components/Checkbox/index.d.ts +1 -0
- package/dist/src/desktop/components/Checkbox/index.js +8 -0
- package/dist/src/desktop/components/Chip/Chip.d.ts +19 -0
- package/dist/src/desktop/components/Chip/Chip.js +131 -0
- package/dist/src/desktop/components/Chip/index.d.ts +1 -0
- package/dist/src/desktop/components/Chip/index.js +8 -0
- package/dist/src/desktop/components/ContextMenu/ContextMenu.d.ts +7 -0
- package/dist/src/desktop/components/ContextMenu/ContextMenu.js +33 -0
- package/dist/src/desktop/components/ContextMenu/index.d.ts +1 -0
- package/dist/src/desktop/components/ContextMenu/index.js +8 -0
- package/dist/src/desktop/components/ContextMenuItem/ContextMenuItem.d.ts +10 -0
- package/dist/src/desktop/components/ContextMenuItem/ContextMenuItem.js +65 -0
- package/dist/src/desktop/components/ContextMenuItem/index.d.ts +1 -0
- package/dist/src/desktop/components/ContextMenuItem/index.js +8 -0
- package/dist/src/desktop/components/DesktopHeaderBar/DesktopHeaderBar.d.ts +39 -0
- package/dist/src/desktop/components/DesktopHeaderBar/DesktopHeaderBar.js +81 -0
- package/dist/src/desktop/components/DesktopHeaderBar/index.d.ts +1 -0
- package/dist/src/desktop/components/DesktopHeaderBar/index.js +8 -0
- package/dist/src/desktop/components/DesktopTabBar/DesktopTabBar.d.ts +15 -0
- package/dist/src/desktop/components/DesktopTabBar/DesktopTabBar.js +125 -0
- package/dist/src/desktop/components/DesktopTabBar/index.d.ts +1 -0
- package/dist/src/desktop/components/DesktopTabBar/index.js +8 -0
- package/dist/src/desktop/components/EditApplyTextField/EditApplyTextField.d.ts +32 -0
- package/dist/src/desktop/components/EditApplyTextField/EditApplyTextField.js +238 -0
- package/dist/src/desktop/components/EditApplyTextField/index.d.ts +1 -0
- package/dist/src/desktop/components/EditApplyTextField/index.js +8 -0
- package/dist/src/desktop/components/FilterBar/FilterBar.d.ts +19 -0
- package/dist/src/desktop/components/FilterBar/FilterBar.js +53 -0
- package/dist/src/desktop/components/FilterBar/index.d.ts +1 -0
- package/dist/src/desktop/components/FilterBar/index.js +8 -0
- package/dist/src/desktop/components/FloatingActionButton/FloatingActionButton.d.ts +19 -0
- package/dist/src/desktop/components/FloatingActionButton/FloatingActionButton.js +96 -0
- package/dist/src/desktop/components/FloatingActionButton/index.d.ts +1 -0
- package/dist/src/desktop/components/FloatingActionButton/index.js +8 -0
- package/dist/src/desktop/components/IconButton/IconButton.js +3 -3
- package/dist/src/desktop/components/ImageSlide/ImageSlide.d.ts +13 -0
- package/dist/src/desktop/components/ImageSlide/ImageSlide.js +97 -0
- package/dist/src/desktop/components/ImageSlide/index.d.ts +1 -0
- package/dist/src/desktop/components/ImageSlide/index.js +8 -0
- package/dist/src/desktop/components/MainButton/MainButton.d.ts +21 -0
- package/dist/src/desktop/components/MainButton/MainButton.js +190 -0
- package/dist/src/desktop/components/MainButton/index.d.ts +1 -0
- package/dist/src/desktop/components/MainButton/index.js +8 -0
- package/dist/src/desktop/components/Radio/Radio.d.ts +12 -0
- package/dist/src/desktop/components/Radio/Radio.js +45 -0
- package/dist/src/desktop/components/Radio/index.d.ts +1 -0
- package/dist/src/desktop/components/Radio/index.js +8 -0
- package/dist/src/desktop/components/ReactionButton/ReactionButton.d.ts +11 -0
- package/dist/src/desktop/components/ReactionButton/ReactionButton.js +108 -0
- package/dist/src/desktop/components/ReactionButton/index.d.ts +1 -0
- package/dist/src/desktop/components/ReactionButton/index.js +8 -0
- package/dist/src/desktop/components/Select/Select.d.ts +16 -0
- package/dist/src/desktop/components/Select/Select.js +136 -0
- package/dist/src/desktop/components/Select/index.d.ts +1 -0
- package/dist/src/desktop/components/Select/index.js +8 -0
- package/dist/src/desktop/components/StatusBlock/StatusBlock.js +1 -1
- package/dist/src/desktop/components/TextButton/TextButton.d.ts +11 -0
- package/dist/src/desktop/components/TextButton/TextButton.js +103 -0
- package/dist/src/desktop/components/TextButton/index.d.ts +1 -0
- package/dist/src/desktop/components/TextButton/index.js +8 -0
- package/dist/src/desktop/components/TextField/TextField.d.ts +42 -0
- package/dist/src/desktop/components/TextField/TextField.js +252 -0
- package/dist/src/desktop/components/TextField/index.d.ts +1 -0
- package/dist/src/desktop/components/TextField/index.js +8 -0
- package/dist/src/desktop/components/TextLabel/TextLabel.d.ts +3 -1
- package/dist/src/desktop/components/TextLabel/TextLabel.js +7 -4
- package/dist/src/desktop/components/UploadIconButton/UploadIconButton.d.ts +21 -0
- package/dist/src/desktop/components/UploadIconButton/UploadIconButton.js +149 -0
- package/dist/src/desktop/components/UploadIconButton/index.d.ts +1 -0
- package/dist/src/desktop/components/UploadIconButton/index.js +8 -0
- package/dist/src/desktop/components/UploadIconButton/types.d.ts +8 -0
- package/dist/src/desktop/components/UploadIconButton/types.js +11 -0
- package/dist/src/desktop/components/UploadMainButton/UploadMainButton.d.ts +18 -0
- package/dist/src/desktop/components/UploadMainButton/UploadMainButton.js +173 -0
- package/dist/src/desktop/components/UploadMainButton/index.d.ts +1 -0
- package/dist/src/desktop/components/UploadMainButton/index.js +8 -0
- package/dist/src/desktop/components/UploadMainButton/types.d.ts +25 -0
- package/dist/src/desktop/components/UploadMainButton/types.js +28 -0
- package/dist/src/desktop/components/UploadTextButton/UploadTextButton.d.ts +12 -0
- package/dist/src/desktop/components/UploadTextButton/UploadTextButton.js +83 -0
- package/dist/src/desktop/components/UploadTextButton/index.d.ts +1 -0
- package/dist/src/desktop/components/UploadTextButton/index.js +8 -0
- package/dist/src/desktop/components/UserDesktopNavBar/UserDesktopNavBar.d.ts +20 -0
- package/dist/src/desktop/components/UserDesktopNavBar/UserDesktopNavBar.js +104 -0
- package/dist/src/desktop/components/UserDesktopNavBar/index.d.ts +1 -0
- package/dist/src/desktop/components/UserDesktopNavBar/index.js +8 -0
- package/dist/src/desktop/components/UserDesktopTabBar/UserDesktopTabBar.d.ts +11 -0
- package/dist/src/desktop/components/UserDesktopTabBar/UserDesktopTabBar.js +74 -0
- package/dist/src/desktop/components/UserDesktopTabBar/index.d.ts +1 -0
- package/dist/src/desktop/components/UserDesktopTabBar/index.js +8 -0
- package/dist/src/desktop/components/index.d.ts +24 -1
- package/dist/src/desktop/components/index.js +47 -1
- package/dist/src/desktop/index.d.ts +2 -2
- package/dist/src/desktop/index.js +24 -1
- package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/variation/WSF.js +1 -1
- package/dist/src/hybrid/components/Icon/Icon.d.ts +2 -2
- package/dist/src/hybrid/components/Icon/Icon.js +1 -1
- package/dist/src/hybrid/components/ImageView/ImageView.d.ts +4 -2
- package/dist/src/hybrid/components/ImageView/ImageView.js +110 -28
- package/dist/src/hybrid/components/Switch/Switch.d.ts +9 -0
- package/dist/src/hybrid/components/Switch/Switch.js +75 -0
- package/dist/src/hybrid/components/Switch/index.d.ts +1 -0
- package/dist/src/hybrid/components/Switch/index.js +8 -0
- package/dist/src/hybrid/components/index.d.ts +2 -1
- package/dist/src/hybrid/components/index.js +3 -1
- package/dist/src/hybrid/index.d.ts +2 -2
- package/dist/src/hybrid/index.js +2 -1
- package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.d.ts +45 -0
- package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.js +265 -0
- package/dist/src/mobile/common/components/TextFieldBase/index.d.ts +1 -0
- package/dist/src/mobile/common/components/TextFieldBase/index.js +8 -0
- package/dist/src/mobile/common/components/index.d.ts +2 -0
- package/dist/src/mobile/common/components/index.js +5 -0
- package/dist/src/mobile/components/BlogTextField/BlogTextField.d.ts +29 -0
- package/dist/src/mobile/components/BlogTextField/BlogTextField.js +105 -0
- package/dist/src/mobile/components/BlogTextField/index.d.ts +1 -0
- package/dist/src/mobile/components/BlogTextField/index.js +8 -0
- package/dist/src/mobile/components/Card/Card.d.ts +11 -0
- package/dist/src/mobile/components/Card/Card.js +50 -0
- package/dist/src/mobile/components/Card/index.d.ts +1 -0
- package/dist/src/mobile/components/Card/index.js +8 -0
- package/dist/src/mobile/components/CardList/CardList.d.ts +10 -0
- package/dist/src/mobile/components/CardList/CardList.js +30 -0
- package/dist/src/mobile/components/CardList/index.d.ts +1 -0
- package/dist/src/mobile/components/CardList/index.js +8 -0
- package/dist/src/mobile/components/Checkbox/Checkbox.d.ts +11 -0
- package/dist/src/mobile/components/Checkbox/Checkbox.js +62 -0
- package/dist/src/mobile/components/Checkbox/index.d.ts +1 -0
- package/dist/src/mobile/components/Checkbox/index.js +8 -0
- package/dist/src/mobile/components/Chip/Chip.d.ts +19 -0
- package/dist/src/mobile/components/Chip/Chip.js +131 -0
- package/dist/src/mobile/components/Chip/index.d.ts +1 -0
- package/dist/src/mobile/components/Chip/index.js +8 -0
- package/dist/src/mobile/components/ContextMenu/ContextMenu.d.ts +7 -0
- package/dist/src/mobile/components/ContextMenu/ContextMenu.js +33 -0
- package/dist/src/mobile/components/ContextMenu/index.d.ts +1 -0
- package/dist/src/mobile/components/ContextMenu/index.js +8 -0
- package/dist/src/mobile/components/ContextMenuItem/ContextMenuItem.d.ts +10 -0
- package/dist/src/mobile/components/ContextMenuItem/ContextMenuItem.js +62 -0
- package/dist/src/mobile/components/ContextMenuItem/index.d.ts +1 -0
- package/dist/src/mobile/components/ContextMenuItem/index.js +8 -0
- package/dist/src/mobile/components/IconButton/IconButton.d.ts +1 -6
- package/dist/src/mobile/components/IconButton/IconButton.js +3 -3
- package/dist/src/mobile/components/ImageSlide/ImageSlide.d.ts +13 -0
- package/dist/src/mobile/components/ImageSlide/ImageSlide.js +97 -0
- package/dist/src/mobile/components/ImageSlide/index.d.ts +1 -0
- package/dist/src/mobile/components/ImageSlide/index.js +8 -0
- package/dist/src/mobile/components/MainButton/MainButton.d.ts +21 -0
- package/dist/src/mobile/components/MainButton/MainButton.js +181 -0
- package/dist/src/mobile/components/MainButton/index.d.ts +1 -0
- package/dist/src/mobile/components/MainButton/index.js +8 -0
- package/dist/src/mobile/components/MobileHeaderBar/MobileHeaderBar.d.ts +19 -0
- package/dist/src/mobile/components/MobileHeaderBar/MobileHeaderBar.js +97 -0
- package/dist/src/mobile/components/MobileHeaderBar/index.d.ts +1 -0
- package/dist/src/mobile/components/MobileHeaderBar/index.js +8 -0
- package/dist/src/mobile/components/MobileTabBar/MobileTabBar.d.ts +10 -0
- package/dist/src/mobile/components/MobileTabBar/MobileTabBar.js +46 -0
- package/dist/src/mobile/components/MobileTabBar/index.d.ts +1 -0
- package/dist/src/mobile/components/MobileTabBar/index.js +8 -0
- package/dist/src/mobile/components/Radio/Radio.d.ts +12 -0
- package/dist/src/mobile/components/Radio/Radio.js +45 -0
- package/dist/src/mobile/components/Radio/index.d.ts +1 -0
- package/dist/src/mobile/components/Radio/index.js +8 -0
- package/dist/src/mobile/components/ReactionButton/ReactionButton.d.ts +11 -0
- package/dist/src/mobile/components/ReactionButton/ReactionButton.js +108 -0
- package/dist/src/mobile/components/ReactionButton/index.d.ts +1 -0
- package/dist/src/mobile/components/ReactionButton/index.js +8 -0
- package/dist/src/mobile/components/Select/Select.d.ts +16 -0
- package/dist/src/mobile/components/Select/Select.js +132 -0
- package/dist/src/mobile/components/Select/index.d.ts +1 -0
- package/dist/src/mobile/components/Select/index.js +8 -0
- package/dist/src/mobile/components/StatusBlock/StatusBlock.js +1 -1
- package/dist/src/mobile/components/TextButton/TextButton.d.ts +11 -0
- package/dist/src/mobile/components/TextButton/TextButton.js +100 -0
- package/dist/src/mobile/components/TextButton/index.d.ts +1 -0
- package/dist/src/mobile/components/TextButton/index.js +8 -0
- package/dist/src/mobile/components/TextField/TextField.d.ts +42 -0
- package/dist/src/mobile/components/TextField/TextField.js +252 -0
- package/dist/src/mobile/components/TextField/index.d.ts +1 -0
- package/dist/src/mobile/components/TextField/index.js +8 -0
- package/dist/src/mobile/components/TextLabel/TextLabel.d.ts +3 -1
- package/dist/src/mobile/components/TextLabel/TextLabel.js +7 -4
- package/dist/src/mobile/components/UploadIconButton/UploadIconButton.d.ts +21 -0
- package/dist/src/mobile/components/UploadIconButton/UploadIconButton.js +138 -0
- package/dist/src/mobile/components/UploadIconButton/index.d.ts +1 -0
- package/dist/src/mobile/components/UploadIconButton/index.js +8 -0
- package/dist/src/mobile/components/UploadIconButton/types.d.ts +8 -0
- package/dist/src/mobile/components/UploadIconButton/types.js +11 -0
- package/dist/src/mobile/components/UploadMainButton/UploadMainButton.d.ts +18 -0
- package/dist/src/mobile/components/UploadMainButton/UploadMainButton.js +161 -0
- package/dist/src/mobile/components/UploadMainButton/index.d.ts +1 -0
- package/dist/src/mobile/components/UploadMainButton/index.js +8 -0
- package/dist/src/mobile/components/UploadMainButton/types.d.ts +25 -0
- package/dist/src/mobile/components/UploadMainButton/types.js +28 -0
- package/dist/src/mobile/components/UploadTextButton/UploadTextButton.d.ts +12 -0
- package/dist/src/mobile/components/UploadTextButton/UploadTextButton.js +77 -0
- package/dist/src/mobile/components/UploadTextButton/index.d.ts +1 -0
- package/dist/src/mobile/components/UploadTextButton/index.js +8 -0
- package/dist/src/mobile/components/index.d.ts +20 -1
- package/dist/src/mobile/components/index.js +39 -1
- package/dist/src/mobile/index.d.ts +2 -2
- package/dist/src/mobile/index.js +20 -1
- package/dist/src/mobile/layout/LayoutMP/Containers/ContentsContainer/variation/MPA.js +3 -3
- package/dist/src/mobile/layout/LayoutMP/Containers/ContentsContainer/variation/MPB.js +3 -3
- package/dist/src/mobile/layout/LayoutMP/Containers/ContentsContainer/variation/MPC.js +2 -2
- package/dist/src/mobile/layout/LayoutMP/Containers/ContentsContainer/variation/MPD.js +2 -2
- package/dist/src/mobile/layout/LayoutMP/Containers/ContentsContainer/variation/MPE.js +2 -2
- package/dist/src/mobile/layout/LayoutMP/Containers/ContentsContainer/variation/MPF.js +3 -3
- package/dist/src/mobile/layout/LayoutMP/Containers/NavigationContainer/variation/Navigation.js +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,108 @@
|
|
|
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 hybrid_1 = require("../../../hybrid");
|
|
32
|
+
var TextLabel_1 = require("../TextLabel");
|
|
33
|
+
function ReactionButton(_a) {
|
|
34
|
+
var text = _a.text, _b = _a.iconName, iconName = _b === void 0 ? 'ic_thumb_up' : _b, _c = _a.status, status = _c === void 0 ? 'default' : _c, _d = _a.colorTheme, colorTheme = _d === void 0 ? 'none' : _d, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
|
|
35
|
+
var handleClick = function () {
|
|
36
|
+
if (onClick) {
|
|
37
|
+
onClick();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var handleMouseDown = function () {
|
|
41
|
+
if (onMouseDown) {
|
|
42
|
+
onMouseDown();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var IconColorByStatus = function () {
|
|
46
|
+
switch (status) {
|
|
47
|
+
case 'default':
|
|
48
|
+
return 'ui_cpnt_button_icon_default';
|
|
49
|
+
case 'select':
|
|
50
|
+
return 'ui_cpnt_button_icon_primary';
|
|
51
|
+
default:
|
|
52
|
+
return 'ui_cpnt_button_icon_default';
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
var IconColorByColorByTheme = function () {
|
|
56
|
+
if (status === 'default' && colorTheme === 'dark') {
|
|
57
|
+
return 'ui_cpnt_button_icon_darktheme_default';
|
|
58
|
+
}
|
|
59
|
+
if (status === 'select' && colorTheme === 'dark') {
|
|
60
|
+
return 'ui_cpnt_button_icon_darktheme_primary';
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var TextLabelColorBySelect = function () {
|
|
64
|
+
switch (true) {
|
|
65
|
+
case status === 'default' && colorTheme === 'none':
|
|
66
|
+
return 'sysTextSecondary';
|
|
67
|
+
case status === 'select' && colorTheme === 'none':
|
|
68
|
+
return 'sysTextBrandPrimary';
|
|
69
|
+
default:
|
|
70
|
+
return 'sysTextSecondary';
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var TextLabelColorByByColorTheme = function () {
|
|
74
|
+
if (status === 'default' && colorTheme === 'dark') {
|
|
75
|
+
return 'ui_cpnt_button_text_darktheme_default';
|
|
76
|
+
}
|
|
77
|
+
if (status === 'select' && colorTheme === 'dark') {
|
|
78
|
+
return 'ui_cpnt_button_text_darktheme_primary';
|
|
79
|
+
}
|
|
80
|
+
return;
|
|
81
|
+
};
|
|
82
|
+
// TODO : 추 후 유틸로 편성 예정
|
|
83
|
+
var convertFormatHelper = function (value) {
|
|
84
|
+
if (typeof value !== 'number')
|
|
85
|
+
return value;
|
|
86
|
+
switch (true) {
|
|
87
|
+
case value >= 1000 && value < 1000000:
|
|
88
|
+
return Math.floor(value / 1000)
|
|
89
|
+
.toString()
|
|
90
|
+
.replace(/\.0$/, '') + "K";
|
|
91
|
+
case value >= 1000000:
|
|
92
|
+
return Math.floor(value / 1000000)
|
|
93
|
+
.toString()
|
|
94
|
+
.replace(/\.0$/, '') + "M";
|
|
95
|
+
default:
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
return (react_1.default.createElement(S_ReactionButton, { onClick: handleClick, onMouseDown: handleMouseDown },
|
|
100
|
+
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }),
|
|
101
|
+
react_1.default.createElement(hybrid_1.Icon, { size: 16, fillType: "fill", iconName: iconName, colorKey: colorTheme === 'none' ? IconColorByStatus() : IconColorByColorByTheme() }),
|
|
102
|
+
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }),
|
|
103
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: convertFormatHelper(text), styleTheme: "body2Regular", btnMode: "use", colorTheme: TextLabelColorBySelect(), colorOverride: TextLabelColorByByColorTheme() })));
|
|
104
|
+
}
|
|
105
|
+
var ReactionButtonStyle = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: none;\n cursor: 'pointer';\n display: flex;\n justify-content: center;\n padding: 0;\n"], ["\n align-items: center;\n background-color: transparent;\n border: none;\n cursor: 'pointer';\n display: flex;\n justify-content: center;\n padding: 0;\n"])));
|
|
106
|
+
var S_ReactionButton = styled_components_1.default.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), ReactionButtonStyle);
|
|
107
|
+
exports.default = ReactionButton;
|
|
108
|
+
var templateObject_1, templateObject_2;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ReactionButton } from './ReactionButton';
|
|
@@ -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.ReactionButton = void 0;
|
|
7
|
+
var ReactionButton_1 = require("./ReactionButton");
|
|
8
|
+
Object.defineProperty(exports, "ReactionButton", { enumerable: true, get: function () { return __importDefault(ReactionButton_1).default; } });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Value = {
|
|
3
|
+
text: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
};
|
|
6
|
+
declare type SelectProps = {
|
|
7
|
+
hintText?: string;
|
|
8
|
+
defaultValue?: Value;
|
|
9
|
+
valueArray: Value[];
|
|
10
|
+
size?: 'large' | 'medium' | 'small' | 'rlarge';
|
|
11
|
+
state?: 'normal' | 'read_only' | 'disabled';
|
|
12
|
+
onChange?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
13
|
+
colorTheme?: 'none' | 'dark';
|
|
14
|
+
};
|
|
15
|
+
declare function Select({ hintText, defaultValue, valueArray, size, state, onChange, colorTheme }: SelectProps): JSX.Element;
|
|
16
|
+
export default Select;
|
|
@@ -0,0 +1,136 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
var react_1 = __importStar(require("react"));
|
|
27
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
28
|
+
var hybrid_1 = require("../../../hybrid");
|
|
29
|
+
function Select(_a) {
|
|
30
|
+
var hintText = _a.hintText, defaultValue = _a.defaultValue, valueArray = _a.valueArray, _b = _a.size, size = _b === void 0 ? 'large' : _b, _c = _a.state, state = _c === void 0 ? 'normal' : _c, onChange = _a.onChange, _d = _a.colorTheme, colorTheme = _d === void 0 ? 'none' : _d;
|
|
31
|
+
var _e = (0, react_1.useState)(false), isFocused = _e[0], setIsFocused = _e[1];
|
|
32
|
+
var handleClick = function () { return setIsFocused(true); };
|
|
33
|
+
var handleBlur = function () { return setIsFocused(false); };
|
|
34
|
+
var handleChange = function (e) {
|
|
35
|
+
setIsFocused(false);
|
|
36
|
+
if (onChange) {
|
|
37
|
+
onChange(e);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var getIconColorKey = function () {
|
|
41
|
+
if (state === 'disabled') {
|
|
42
|
+
if (colorTheme === 'dark') {
|
|
43
|
+
return 'ui_cpnt_select_icon_darktheme_disabled';
|
|
44
|
+
}
|
|
45
|
+
if (colorTheme === 'none') {
|
|
46
|
+
return 'ui_cpnt_select_icon_02';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (colorTheme === 'dark') {
|
|
50
|
+
return 'ui_cpnt_select_icon_darktheme_default';
|
|
51
|
+
}
|
|
52
|
+
if (colorTheme === 'none') {
|
|
53
|
+
return 'ui_cpnt_select_icon_01';
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
return (react_1.default.createElement(S_Box, { size: size, onClick: handleClick, onBlur: handleBlur, tabIndex: 0 },
|
|
57
|
+
react_1.default.createElement(S_Icon, { size: 16, fillType: "line", iconName: isFocused ? 'ic_arrow_up' : 'ic_arrow_down', colorKey: getIconColorKey() }),
|
|
58
|
+
react_1.default.createElement(S_Select, { disabled: state === 'disabled' || state === 'read_only', defaultValue: (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.value) || '', state: state, colorTheme: colorTheme, onChange: handleChange },
|
|
59
|
+
react_1.default.createElement("option", { disabled: true, value: (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.value) || '' }, (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.text) || hintText),
|
|
60
|
+
valueArray.map(function (el) { return (react_1.default.createElement("option", { key: el.value, value: el.value }, el.text)); }))));
|
|
61
|
+
}
|
|
62
|
+
var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 48px;\n width: 432px;\n"], ["\n height: 48px;\n width: 432px;\n"])));
|
|
63
|
+
var medium = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 40px;\n width: 188px;\n"], ["\n height: 40px;\n width: 188px;\n"])));
|
|
64
|
+
var small = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 32px;\n width: 188px;\n"], ["\n height: 32px;\n width: 188px;\n"])));
|
|
65
|
+
var rlarge = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 48px;\n width: 100%;\n"], ["\n height: 48px;\n width: 100%;\n"])));
|
|
66
|
+
var dark = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n color: ", ";\n\n :disabled {\n background-color: ", ";\n color: ", ";\n }\n\n :focus {\n border: 0.5px solid ", " !important;\n color: ", ";\n }\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n color: ", ";\n\n :disabled {\n background-color: ", ";\n color: ", ";\n }\n\n :focus {\n border: 0.5px solid ", " !important;\n color: ", ";\n }\n"])), function (_a) {
|
|
67
|
+
var theme = _a.theme;
|
|
68
|
+
return theme.ui_cpnt_select_base_normal;
|
|
69
|
+
}, function (_a) {
|
|
70
|
+
var theme = _a.theme;
|
|
71
|
+
return theme.ui_cpnt_select_border_darktheme_normal;
|
|
72
|
+
}, function (_a) {
|
|
73
|
+
var theme = _a.theme;
|
|
74
|
+
return theme.ui_cpnt_select_text_darktheme_hint;
|
|
75
|
+
}, function (_a) {
|
|
76
|
+
var theme = _a.theme;
|
|
77
|
+
return theme.ui_cpnt_select_base_darktheme_disabled;
|
|
78
|
+
}, function (_a) {
|
|
79
|
+
var theme = _a.theme, state = _a.state;
|
|
80
|
+
return state === 'read_only'
|
|
81
|
+
? theme.ui_cpnt_select_text_darktheme_enabled
|
|
82
|
+
: theme.ui_cpnt_select_text_darktheme_disabled;
|
|
83
|
+
}, function (_a) {
|
|
84
|
+
var theme = _a.theme;
|
|
85
|
+
return theme.ui_cpnt_select_border_darktheme_focus;
|
|
86
|
+
}, function (_a) {
|
|
87
|
+
var theme = _a.theme;
|
|
88
|
+
return theme.ui_cpnt_select_text_darktheme_enabled;
|
|
89
|
+
});
|
|
90
|
+
var S_Box = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: relative;\n z-index: 0;\n\n ", "\n"], ["\n position: relative;\n z-index: 0;\n\n ", "\n"])), function (_a) {
|
|
91
|
+
var size = _a.size;
|
|
92
|
+
return size &&
|
|
93
|
+
{
|
|
94
|
+
large: large,
|
|
95
|
+
medium: medium,
|
|
96
|
+
small: small,
|
|
97
|
+
rlarge: rlarge
|
|
98
|
+
}[size];
|
|
99
|
+
});
|
|
100
|
+
var S_Icon = (0, styled_components_1.default)(hybrid_1.Icon)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n z-index: 2;\n"], ["\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n z-index: 2;\n"])), function (_a) {
|
|
101
|
+
var theme = _a.theme;
|
|
102
|
+
return theme.spacing.spacingD;
|
|
103
|
+
});
|
|
104
|
+
var S_Select = styled_components_1.default.select(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n appearance: none;\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 8px;\n color: ", ";\n font-family: inherit;\n font-size: ", ";\n height: 100%;\n padding-left: ", ";\n width: 100%;\n\n :disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n :focus {\n border: 0.5px solid ", " !important;\n color: ", ";\n outline: 0 !important;\n outline-offset: 0 !important;\n }\n\n ", "\n"], ["\n appearance: none;\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 8px;\n color: ", ";\n font-family: inherit;\n font-size: ", ";\n height: 100%;\n padding-left: ", ";\n width: 100%;\n\n :disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n :focus {\n border: 0.5px solid ", " !important;\n color: ", ";\n outline: 0 !important;\n outline-offset: 0 !important;\n }\n\n ", "\n"])), function (_a) {
|
|
105
|
+
var theme = _a.theme;
|
|
106
|
+
return theme.ui_cpnt_select_base_normal;
|
|
107
|
+
}, function (_a) {
|
|
108
|
+
var theme = _a.theme;
|
|
109
|
+
return theme.ui_cpnt_select_border_normal;
|
|
110
|
+
}, function (_a) {
|
|
111
|
+
var theme = _a.theme;
|
|
112
|
+
return theme.ui_cpnt_select_text_hint;
|
|
113
|
+
}, function (_a) {
|
|
114
|
+
var theme = _a.theme;
|
|
115
|
+
return theme.desktopFontSize.form2;
|
|
116
|
+
}, function (_a) {
|
|
117
|
+
var theme = _a.theme;
|
|
118
|
+
return theme.spacing.spacingD;
|
|
119
|
+
}, function (_a) {
|
|
120
|
+
var theme = _a.theme;
|
|
121
|
+
return theme.ui_cpnt_select_base_disabled;
|
|
122
|
+
}, function (_a) {
|
|
123
|
+
var theme = _a.theme, state = _a.state;
|
|
124
|
+
return state === 'read_only' ? theme.ui_cpnt_select_text_hint : theme.ui_cpnt_select_text_disabled;
|
|
125
|
+
}, function (_a) {
|
|
126
|
+
var theme = _a.theme;
|
|
127
|
+
return theme.ui_cpnt_select_border_focus;
|
|
128
|
+
}, function (_a) {
|
|
129
|
+
var theme = _a.theme;
|
|
130
|
+
return theme.ui_cpnt_select_text_selected;
|
|
131
|
+
}, function (_a) {
|
|
132
|
+
var colorTheme = _a.colorTheme;
|
|
133
|
+
return colorTheme === 'dark' && dark;
|
|
134
|
+
});
|
|
135
|
+
exports.default = Select;
|
|
136
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Select } from './Select';
|
|
@@ -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.Select = void 0;
|
|
7
|
+
var Select_1 = require("./Select");
|
|
8
|
+
Object.defineProperty(exports, "Select", { enumerable: true, get: function () { return __importDefault(Select_1).default; } });
|
|
@@ -37,7 +37,7 @@ function StatusBlock(_a) {
|
|
|
37
37
|
small: 'body2Bold'
|
|
38
38
|
};
|
|
39
39
|
return (react_1.default.createElement(S_StatusBlock, { size: size, state: state, "$width": width },
|
|
40
|
-
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: textLabelStyleThemeObj[size], textAlign: "center",
|
|
40
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: textLabelStyleThemeObj[size], textAlign: "center", btnMode: "use", colorTheme: "sysTextWhite" })));
|
|
41
41
|
}
|
|
42
42
|
var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 8px;\n height: 48px;\n"], ["\n border-radius: 8px;\n height: 48px;\n"])));
|
|
43
43
|
var medium = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-radius: 8px;\n height: 40px;\n"], ["\n border-radius: 8px;\n height: 40px;\n"])));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type TextButtonProps = {
|
|
3
|
+
text?: string;
|
|
4
|
+
size?: 'rlarge' | 'large' | 'medium' | 'small' | 'xsmall';
|
|
5
|
+
fontWeight?: 'bold' | 'regular';
|
|
6
|
+
type?: 'submit' | 'reset' | 'button';
|
|
7
|
+
state?: 'normal' | 'disabled';
|
|
8
|
+
onClick?: (...args: any) => any;
|
|
9
|
+
};
|
|
10
|
+
declare function TextButton({ text, size, fontWeight, type, state, onClick, ...rest }: TextButtonProps): JSX.Element;
|
|
11
|
+
export default TextButton;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
37
|
+
var t = {};
|
|
38
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
39
|
+
t[p] = s[p];
|
|
40
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
41
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
42
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
43
|
+
t[p[i]] = s[p[i]];
|
|
44
|
+
}
|
|
45
|
+
return t;
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
var react_1 = __importDefault(require("react"));
|
|
52
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
53
|
+
var TextLabel_1 = require("../TextLabel");
|
|
54
|
+
// NOTE : 기획상 아직 사용하지 않는 props
|
|
55
|
+
// colorTheme?: 'none';
|
|
56
|
+
function TextButton(_a) {
|
|
57
|
+
var text = _a.text, _b = _a.size, size = _b === void 0 ? 'large' : _b, fontWeight = _a.fontWeight, _c = _a.type, type = _c === void 0 ? 'button' : _c, _d = _a.state, state = _d === void 0 ? 'normal' : _d, onClick = _a.onClick, rest = __rest(_a, ["text", "size", "fontWeight", "type", "state", "onClick"]);
|
|
58
|
+
var textStyle = {
|
|
59
|
+
rlarge: 'body1Bold',
|
|
60
|
+
large: 'body1Bold',
|
|
61
|
+
medium: 'body2Bold',
|
|
62
|
+
small: 'caption1Bold',
|
|
63
|
+
xsmall: 'caption1Regular'
|
|
64
|
+
};
|
|
65
|
+
return (react_1.default.createElement(S_Button, __assign({}, rest, { size: size, onClick: onClick, type: type, fontWeight: fontWeight, disabled: state === 'disabled' }),
|
|
66
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: textStyle[size], colorTheme: state === 'disabled' ? 'sysTextTertiary' : 'usrTextBrandPrimary', btnMode: "use" })));
|
|
67
|
+
}
|
|
68
|
+
var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 48px;\n ", ";\n"], ["\n height: 48px;\n ", ";\n"])), function (_a) {
|
|
69
|
+
var size = _a.size;
|
|
70
|
+
return size === 'rlarge' && 'width: 100%';
|
|
71
|
+
});
|
|
72
|
+
var medium = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 40px;\n"], ["\n height: 40px;\n"])));
|
|
73
|
+
var small = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 32px;\n"], ["\n height: 32px;\n"])));
|
|
74
|
+
var xsmall = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 24px;\n"], ["\n height: 24px;\n"])));
|
|
75
|
+
var S_Button = styled_components_1.default.button(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 8px;\n cursor: ", ";\n display: flex;\n justify-content: center;\n padding-left: 8px;\n padding-right: 8px;\n\n &:hover:enabled {\n background-color: ", ";\n }\n &:active:enabled {\n background-color: ", ";\n }\n ", ";\n\n & > div {\n ", ";\n }\n"], ["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 8px;\n cursor: ", ";\n display: flex;\n justify-content: center;\n padding-left: 8px;\n padding-right: 8px;\n\n &:hover:enabled {\n background-color: ", ";\n }\n &:active:enabled {\n background-color: ", ";\n }\n ", ";\n\n & > div {\n ", ";\n }\n"])), function (_a) {
|
|
76
|
+
var state = _a.state;
|
|
77
|
+
return (state === 'normal' ? 'pointer' : 'default');
|
|
78
|
+
}, function (_a) {
|
|
79
|
+
var theme = _a.theme;
|
|
80
|
+
return theme.ui_cpnt_button_line_base_hover;
|
|
81
|
+
}, function (_a) {
|
|
82
|
+
var theme = _a.theme;
|
|
83
|
+
return theme.ui_cpnt_button_line_base_pressed;
|
|
84
|
+
}, function (_a) {
|
|
85
|
+
var size = _a.size;
|
|
86
|
+
return size &&
|
|
87
|
+
{
|
|
88
|
+
rlarge: large,
|
|
89
|
+
large: large,
|
|
90
|
+
medium: medium,
|
|
91
|
+
small: small,
|
|
92
|
+
xsmall: xsmall
|
|
93
|
+
}[size];
|
|
94
|
+
}, function (_a) {
|
|
95
|
+
var theme = _a.theme, fontWeight = _a.fontWeight;
|
|
96
|
+
return fontWeight &&
|
|
97
|
+
{
|
|
98
|
+
bold: "font-weight: " + theme.fontWeight.bold,
|
|
99
|
+
regular: "font-weight: " + theme.fontWeight.normal
|
|
100
|
+
}[fontWeight];
|
|
101
|
+
});
|
|
102
|
+
exports.default = TextButton;
|
|
103
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TextButton } from './TextButton';
|
|
@@ -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.TextButton = void 0;
|
|
7
|
+
var TextButton_1 = require("./TextButton");
|
|
8
|
+
Object.defineProperty(exports, "TextButton", { enumerable: true, get: function () { return __importDefault(TextButton_1).default; } });
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { TFunctionResult } from 'i18next';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Path } from 'react-hook-form';
|
|
4
|
+
import fillIcons from '../../../common/assets/icons/fill';
|
|
5
|
+
import lineIcons from '../../../common/assets/icons/line';
|
|
6
|
+
import { IFormValues } from '../../../common/types/form';
|
|
7
|
+
export declare type FillIconNameKeys = keyof typeof fillIcons;
|
|
8
|
+
export declare type LineIconNameKeys = keyof typeof lineIcons;
|
|
9
|
+
export declare type TextFieldProps = {
|
|
10
|
+
name: Path<IFormValues>;
|
|
11
|
+
hintText?: string | number | null | TFunctionResult;
|
|
12
|
+
defaultText?: string | number | null | TFunctionResult;
|
|
13
|
+
validation?: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
16
|
+
validationPoint?: 'onChange' | 'onBlur';
|
|
17
|
+
preventBlankMode?: 'none' | 'trim' | 'all';
|
|
18
|
+
size?: 'small' | 'medium' | 'large' | 'rlarge';
|
|
19
|
+
textLineType?: 'single' | 'multi' | 'auto';
|
|
20
|
+
multiRows?: number;
|
|
21
|
+
autoMinRows?: number;
|
|
22
|
+
autoMaxRows?: number;
|
|
23
|
+
inputType?: string;
|
|
24
|
+
state?: 'normal' | 'read_only' | 'disabled';
|
|
25
|
+
iBtn1IconName?: FillIconNameKeys | LineIconNameKeys;
|
|
26
|
+
iBtn2IconName?: FillIconNameKeys | LineIconNameKeys;
|
|
27
|
+
iBtn1IconFillType?: 'line' | 'fill';
|
|
28
|
+
iBtn2IconFillType?: 'line' | 'fill';
|
|
29
|
+
colorTheme?: 'none' | 'dark';
|
|
30
|
+
max?: number;
|
|
31
|
+
maxLength?: number;
|
|
32
|
+
min?: number;
|
|
33
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
34
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
35
|
+
onClickIBtn1?: () => void;
|
|
36
|
+
onClickIBtn2?: () => void;
|
|
37
|
+
onFocus?: () => void;
|
|
38
|
+
onKeyUp?: (e: React.KeyboardEvent<HTMLInputElement> | React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
39
|
+
onTarget?: () => void;
|
|
40
|
+
};
|
|
41
|
+
declare function TextField({ name, hintText, defaultText, validation, validationPoint, preventBlankMode, size, textLineType, multiRows, autoMinRows, autoMaxRows, inputType, state, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, colorTheme, max, maxLength, min, onBlur, onChange, onClickIBtn1, onClickIBtn2, onFocus, onKeyUp, onTarget }: TextFieldProps): JSX.Element;
|
|
42
|
+
export default TextField;
|