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,132 @@
|
|
|
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
|
+
return 'ui_cpnt_select_icon_02';
|
|
46
|
+
}
|
|
47
|
+
if (colorTheme === 'dark') {
|
|
48
|
+
return 'ui_cpnt_select_icon_darktheme_default';
|
|
49
|
+
}
|
|
50
|
+
return 'ui_cpnt_select_icon_01';
|
|
51
|
+
};
|
|
52
|
+
return (react_1.default.createElement(S_Box, { size: size, onClick: handleClick, onBlur: handleBlur, tabIndex: 0 },
|
|
53
|
+
react_1.default.createElement(S_Icon, { size: 16, fillType: "line", iconName: isFocused ? 'ic_arrow_up' : 'ic_arrow_down', colorKey: getIconColorKey() }),
|
|
54
|
+
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 },
|
|
55
|
+
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),
|
|
56
|
+
valueArray.map(function (el) { return (react_1.default.createElement("option", { key: el.value, value: el.value }, el.text)); }))));
|
|
57
|
+
}
|
|
58
|
+
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"])));
|
|
59
|
+
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"])));
|
|
60
|
+
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"])));
|
|
61
|
+
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"])));
|
|
62
|
+
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) {
|
|
63
|
+
var theme = _a.theme;
|
|
64
|
+
return theme.ui_cpnt_select_base_normal;
|
|
65
|
+
}, function (_a) {
|
|
66
|
+
var theme = _a.theme;
|
|
67
|
+
return theme.ui_cpnt_select_border_darktheme_normal;
|
|
68
|
+
}, function (_a) {
|
|
69
|
+
var theme = _a.theme;
|
|
70
|
+
return theme.ui_cpnt_select_text_darktheme_hint;
|
|
71
|
+
}, function (_a) {
|
|
72
|
+
var theme = _a.theme;
|
|
73
|
+
return theme.ui_cpnt_select_base_darktheme_disabled;
|
|
74
|
+
}, function (_a) {
|
|
75
|
+
var theme = _a.theme, state = _a.state;
|
|
76
|
+
return state === 'read_only'
|
|
77
|
+
? theme.ui_cpnt_select_text_darktheme_enabled
|
|
78
|
+
: theme.ui_cpnt_select_text_darktheme_disabled;
|
|
79
|
+
}, function (_a) {
|
|
80
|
+
var theme = _a.theme;
|
|
81
|
+
return theme.ui_cpnt_select_border_darktheme_focus;
|
|
82
|
+
}, function (_a) {
|
|
83
|
+
var theme = _a.theme;
|
|
84
|
+
return theme.ui_cpnt_select_text_darktheme_enabled;
|
|
85
|
+
});
|
|
86
|
+
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) {
|
|
87
|
+
var size = _a.size;
|
|
88
|
+
return size &&
|
|
89
|
+
{
|
|
90
|
+
large: large,
|
|
91
|
+
medium: medium,
|
|
92
|
+
small: small,
|
|
93
|
+
rlarge: rlarge
|
|
94
|
+
}[size];
|
|
95
|
+
});
|
|
96
|
+
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) {
|
|
97
|
+
var theme = _a.theme;
|
|
98
|
+
return theme.spacing.spacingD;
|
|
99
|
+
});
|
|
100
|
+
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) {
|
|
101
|
+
var theme = _a.theme;
|
|
102
|
+
return theme.ui_cpnt_select_base_normal;
|
|
103
|
+
}, function (_a) {
|
|
104
|
+
var theme = _a.theme;
|
|
105
|
+
return theme.ui_cpnt_select_border_normal;
|
|
106
|
+
}, function (_a) {
|
|
107
|
+
var theme = _a.theme;
|
|
108
|
+
return theme.ui_cpnt_select_text_hint;
|
|
109
|
+
}, function (_a) {
|
|
110
|
+
var theme = _a.theme;
|
|
111
|
+
return theme.mobileFontSize.form2;
|
|
112
|
+
}, function (_a) {
|
|
113
|
+
var theme = _a.theme;
|
|
114
|
+
return theme.spacing.spacingD;
|
|
115
|
+
}, function (_a) {
|
|
116
|
+
var theme = _a.theme;
|
|
117
|
+
return theme.ui_cpnt_select_base_disabled;
|
|
118
|
+
}, function (_a) {
|
|
119
|
+
var theme = _a.theme, state = _a.state;
|
|
120
|
+
return state === 'read_only' ? theme.ui_cpnt_select_text_hint : theme.ui_cpnt_select_text_disabled;
|
|
121
|
+
}, function (_a) {
|
|
122
|
+
var theme = _a.theme;
|
|
123
|
+
return theme.ui_cpnt_select_border_focus;
|
|
124
|
+
}, function (_a) {
|
|
125
|
+
var theme = _a.theme;
|
|
126
|
+
return theme.ui_cpnt_select_text_selected;
|
|
127
|
+
}, function (_a) {
|
|
128
|
+
var colorTheme = _a.colorTheme;
|
|
129
|
+
return colorTheme === 'dark' && dark;
|
|
130
|
+
});
|
|
131
|
+
exports.default = Select;
|
|
132
|
+
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,100 @@
|
|
|
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 &: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 &: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_pressed;
|
|
81
|
+
}, function (_a) {
|
|
82
|
+
var size = _a.size;
|
|
83
|
+
return size &&
|
|
84
|
+
{
|
|
85
|
+
rlarge: large,
|
|
86
|
+
large: large,
|
|
87
|
+
medium: medium,
|
|
88
|
+
small: small,
|
|
89
|
+
xsmall: xsmall
|
|
90
|
+
}[size];
|
|
91
|
+
}, function (_a) {
|
|
92
|
+
var theme = _a.theme, fontWeight = _a.fontWeight;
|
|
93
|
+
return fontWeight &&
|
|
94
|
+
{
|
|
95
|
+
bold: "font-weight: " + theme.fontWeight.bold,
|
|
96
|
+
regular: "font-weight: " + theme.fontWeight.normal
|
|
97
|
+
}[fontWeight];
|
|
98
|
+
});
|
|
99
|
+
exports.default = TextButton;
|
|
100
|
+
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;
|
|
@@ -0,0 +1,252 @@
|
|
|
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 react_hook_form_1 = require("react-hook-form");
|
|
28
|
+
var react_i18next_1 = require("react-i18next");
|
|
29
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
30
|
+
var components_1 = require("../../common/components");
|
|
31
|
+
var IconButton_1 = require("../IconButton");
|
|
32
|
+
function TextField(_a) {
|
|
33
|
+
var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, validation = _a.validation, _b = _a.validationPoint, validationPoint = _b === void 0 ? 'onBlur' : _b, _c = _a.preventBlankMode, preventBlankMode = _c === void 0 ? 'none' : _c, _d = _a.size, size = _d === void 0 ? 'large' : _d, _e = _a.textLineType, textLineType = _e === void 0 ? 'single' : _e, _f = _a.multiRows, multiRows = _f === void 0 ? 8 : _f, _g = _a.autoMinRows, autoMinRows = _g === void 0 ? 8 : _g, autoMaxRows = _a.autoMaxRows, _h = _a.inputType, inputType = _h === void 0 ? 'text' : _h, _j = _a.state, state = _j === void 0 ? 'normal' : _j, iBtn1IconName = _a.iBtn1IconName, _k = _a.iBtn1IconFillType, iBtn1IconFillType = _k === void 0 ? 'line' : _k, iBtn2IconName = _a.iBtn2IconName, _l = _a.iBtn2IconFillType, iBtn2IconFillType = _l === void 0 ? 'line' : _l, _m = _a.colorTheme, colorTheme = _m === void 0 ? 'none' : _m, max = _a.max, maxLength = _a.maxLength, min = _a.min, onBlur = _a.onBlur, onChange = _a.onChange, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onFocus = _a.onFocus, onKeyUp = _a.onKeyUp, onTarget = _a.onTarget;
|
|
34
|
+
var iconThemeColorNoneObj = {
|
|
35
|
+
normal: 'ui_cpnt_button_icon_default',
|
|
36
|
+
read_only: 'ui_cpnt_button_icon_default',
|
|
37
|
+
disabled: 'ui_cpnt_button_icon_disabled'
|
|
38
|
+
};
|
|
39
|
+
var iconThemeColorDarkObj = {
|
|
40
|
+
normal: 'ui_cpnt_textfield_icon_darktheme_default',
|
|
41
|
+
read_only: 'ui_cpnt_textfield_icon_darktheme_default',
|
|
42
|
+
disabled: 'ui_cpnt_textfield_icon_darktheme_disabled'
|
|
43
|
+
};
|
|
44
|
+
var t = (0, react_i18next_1.useTranslation)('translation').t;
|
|
45
|
+
var _o = (0, react_1.useState)(false), isFocused = _o[0], setIsFocused = _o[1];
|
|
46
|
+
var _p = (0, react_hook_form_1.useFormContext)(), register = _p.register, trigger = _p.trigger, errors = _p.formState.errors;
|
|
47
|
+
var _q = register(name, validation), validateOnChange = _q.onChange, validateOnBlur = _q.onBlur;
|
|
48
|
+
var isError = Object.keys(errors).some(function (error) { return error === name; });
|
|
49
|
+
function handleFocus() {
|
|
50
|
+
if (state !== 'read_only') {
|
|
51
|
+
setIsFocused(true);
|
|
52
|
+
}
|
|
53
|
+
if (onFocus) {
|
|
54
|
+
onFocus();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function handleTarget() {
|
|
58
|
+
if (onTarget) {
|
|
59
|
+
onTarget();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function handleKeyUp(e) {
|
|
63
|
+
if (onKeyUp) {
|
|
64
|
+
onKeyUp(e);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function handleChange(e) {
|
|
68
|
+
if (validationPoint === 'onChange') {
|
|
69
|
+
validateOnChange(e);
|
|
70
|
+
}
|
|
71
|
+
if (onChange) {
|
|
72
|
+
onChange(e);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function handleBlur(e) {
|
|
76
|
+
if (validationPoint === 'onBlur') {
|
|
77
|
+
validateOnBlur(e);
|
|
78
|
+
}
|
|
79
|
+
if (onBlur) {
|
|
80
|
+
onBlur(e);
|
|
81
|
+
}
|
|
82
|
+
setIsFocused(false);
|
|
83
|
+
trigger(name);
|
|
84
|
+
}
|
|
85
|
+
var S_TextField = function () {
|
|
86
|
+
if (textLineType === 'multi') {
|
|
87
|
+
return (react_1.default.createElement(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, validation: validation, textLineType: "multi", multiRows: multiRows, state: state, colorTheme: colorTheme, maxLength: maxLength, textSize: "form2", textWeight: "normal", onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp }));
|
|
88
|
+
}
|
|
89
|
+
if (textLineType === 'auto') {
|
|
90
|
+
return (react_1.default.createElement(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, validation: validation, textLineType: "auto", autoMinRows: autoMinRows, autoMaxRows: autoMaxRows, state: state, colorTheme: colorTheme, maxLength: maxLength, textSize: "form2", textWeight: "normal", onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp }));
|
|
91
|
+
}
|
|
92
|
+
if (textLineType === 'single') {
|
|
93
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
94
|
+
react_1.default.createElement(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, validation: validation, preventBlankMode: preventBlankMode, textLineType: "single", inputType: inputType, state: state, colorTheme: colorTheme, min: min, max: max, maxLength: maxLength, textSize: "form2", textWeight: "normal", deleteIconMode: "use", deleteIconSize: size === 'large' || size === 'rlarge' ? 20 : 16, isFocused: isFocused, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp }),
|
|
95
|
+
react_1.default.createElement(S_IconBox, null,
|
|
96
|
+
iBtn2IconName && (react_1.default.createElement(IconButton_1.IconButton, { iconName: iBtn2IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: colorTheme &&
|
|
97
|
+
{
|
|
98
|
+
none: iconThemeColorNoneObj[state],
|
|
99
|
+
dark: iconThemeColorDarkObj[state]
|
|
100
|
+
}[colorTheme], iconFillType: iBtn2IconFillType === 'fill' ? 'fill' : 'line', state: state === 'disabled' ? 'disabled' : 'normal', onClick: onClickIBtn2 })),
|
|
101
|
+
iBtn1IconName && (react_1.default.createElement(IconButton_1.IconButton, { iconName: iBtn1IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: colorTheme &&
|
|
102
|
+
{
|
|
103
|
+
none: iconThemeColorNoneObj[state],
|
|
104
|
+
dark: iconThemeColorDarkObj[state]
|
|
105
|
+
}[colorTheme], iconFillType: iBtn1IconFillType === 'fill' ? 'fill' : 'line', state: state === 'disabled' ? 'disabled' : 'normal', onClick: onClickIBtn1 })))));
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
109
|
+
react_1.default.createElement(S_TextFieldWrapper, { size: size, textLineType: textLineType, isFocused: isFocused, isError: isError, state: state, colorTheme: colorTheme }, S_TextField()),
|
|
110
|
+
errors[name] && react_1.default.createElement(S_Error, null, t(errors[name].message))));
|
|
111
|
+
}
|
|
112
|
+
var multi = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: auto;\n padding: 14px;\n"], ["\n height: auto;\n padding: 14px;\n"])));
|
|
113
|
+
var auto = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: auto;\n padding-bottom: ", "px;\n padding-top: ", "px;\n"], ["\n height: auto;\n padding-bottom: ", "px;\n padding-top: ", "px;\n"])), function (_a) {
|
|
114
|
+
var theme = _a.theme;
|
|
115
|
+
return (46 -
|
|
116
|
+
Number(theme.desktopFontSize.form2.substring(0, 2)) * Number(theme.desktopLineHeight.form2)) /
|
|
117
|
+
2;
|
|
118
|
+
}, function (_a) {
|
|
119
|
+
var theme = _a.theme;
|
|
120
|
+
return (46 -
|
|
121
|
+
Number(theme.desktopFontSize.form2.substring(0, 2)) * Number(theme.desktopLineHeight.form2)) /
|
|
122
|
+
2;
|
|
123
|
+
});
|
|
124
|
+
var small = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 32px;\n padding-left: ", ";\n padding-right: ", ";\n width: 188px;\n"], ["\n height: 32px;\n padding-left: ", ";\n padding-right: ", ";\n width: 188px;\n"])), function (_a) {
|
|
125
|
+
var theme = _a.theme;
|
|
126
|
+
return theme.spacing.spacingC;
|
|
127
|
+
}, function (_a) {
|
|
128
|
+
var theme = _a.theme;
|
|
129
|
+
return theme.spacing.spacingC;
|
|
130
|
+
});
|
|
131
|
+
var medium = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 40px;\n padding-left: ", ";\n padding-right: ", ";\n width: 188px;\n"], ["\n height: 40px;\n padding-left: ", ";\n padding-right: ", ";\n width: 188px;\n"])), function (_a) {
|
|
132
|
+
var theme = _a.theme;
|
|
133
|
+
return theme.spacing.spacingC;
|
|
134
|
+
}, function (_a) {
|
|
135
|
+
var theme = _a.theme;
|
|
136
|
+
return theme.spacing.spacingC;
|
|
137
|
+
});
|
|
138
|
+
var large = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n height: 48px;\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n ", "\n ", "\n"], ["\n height: 48px;\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n ", "\n ", "\n"])), function (_a) {
|
|
139
|
+
var theme = _a.theme;
|
|
140
|
+
return theme.spacing.spacingD;
|
|
141
|
+
}, function (_a) {
|
|
142
|
+
var theme = _a.theme;
|
|
143
|
+
return theme.spacing.spacingB;
|
|
144
|
+
}, function (_a) {
|
|
145
|
+
var size = _a.size;
|
|
146
|
+
return (size === 'rlarge' ? '100%' : '432px');
|
|
147
|
+
}, function (_a) {
|
|
148
|
+
var textLineType = _a.textLineType;
|
|
149
|
+
return textLineType === 'multi' && multi;
|
|
150
|
+
}, function (_a) {
|
|
151
|
+
var textLineType = _a.textLineType;
|
|
152
|
+
return textLineType === 'auto' && auto;
|
|
153
|
+
});
|
|
154
|
+
var normal = (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n border: solid 1px\n ", ";\n"], ["\n background-color: ", ";\n border: solid 1px\n ", ";\n"])), function (_a) {
|
|
155
|
+
var theme = _a.theme;
|
|
156
|
+
return theme.ui_cpnt_textfield_base_normal;
|
|
157
|
+
}, function (_a) {
|
|
158
|
+
var theme = _a.theme, isError = _a.isError, isFocused = _a.isFocused;
|
|
159
|
+
if (isError)
|
|
160
|
+
return theme.ui_cpnt_textfield_border_error;
|
|
161
|
+
if (isFocused)
|
|
162
|
+
return theme.ui_cpnt_textfield_border_focus;
|
|
163
|
+
return theme.ui_cpnt_textfield_border_normal;
|
|
164
|
+
});
|
|
165
|
+
var read_only = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n border: solid 1px ", ";\n"], ["\n background-color: ", ";\n border: solid 1px ", ";\n"])), function (_a) {
|
|
166
|
+
var theme = _a.theme;
|
|
167
|
+
return theme.ui_cpnt_textfield_base_disabled;
|
|
168
|
+
}, function (_a) {
|
|
169
|
+
var theme = _a.theme;
|
|
170
|
+
return theme.ui_cpnt_textfield_border_normal;
|
|
171
|
+
});
|
|
172
|
+
var disabled = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n border: solid 1px ", ";\n"], ["\n background-color: ", ";\n border: solid 1px ", ";\n"])), function (_a) {
|
|
173
|
+
var theme = _a.theme;
|
|
174
|
+
return theme.ui_cpnt_textfield_base_disabled;
|
|
175
|
+
}, function (_a) {
|
|
176
|
+
var theme = _a.theme;
|
|
177
|
+
return theme.ui_cpnt_textfield_border_normal;
|
|
178
|
+
});
|
|
179
|
+
var dark_normal = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n background-color: ", ";\n border: solid 1px\n ", ";\n"], ["\n background-color: ", ";\n border: solid 1px\n ", ";\n"])), function (_a) {
|
|
180
|
+
var theme = _a.theme;
|
|
181
|
+
return theme.ui_cpnt_textfield_base_normal;
|
|
182
|
+
}, function (_a) {
|
|
183
|
+
var theme = _a.theme, isError = _a.isError, isFocused = _a.isFocused;
|
|
184
|
+
if (isError)
|
|
185
|
+
return theme.ui_cpnt_textfield_border_darktheme_error;
|
|
186
|
+
if (isFocused)
|
|
187
|
+
return theme.ui_cpnt_textfield_border_darktheme_focus;
|
|
188
|
+
return theme.ui_cpnt_textfield_border_darktheme_normal;
|
|
189
|
+
});
|
|
190
|
+
var dark_read_only = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n background-color: ", ";\n border: solid 1px ", ";\n"], ["\n background-color: ", ";\n border: solid 1px ", ";\n"])), function (_a) {
|
|
191
|
+
var theme = _a.theme;
|
|
192
|
+
return theme.ui_cpnt_textfield_base_darktheme_disabled;
|
|
193
|
+
}, function (_a) {
|
|
194
|
+
var theme = _a.theme;
|
|
195
|
+
return theme.ui_cpnt_textfield_border_darktheme_normal;
|
|
196
|
+
});
|
|
197
|
+
var dark_disabled = (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n background-color: ", ";\n border: solid 1px ", ";\n"], ["\n background-color: ", ";\n border: solid 1px ", ";\n"])), function (_a) {
|
|
198
|
+
var theme = _a.theme;
|
|
199
|
+
return theme.ui_cpnt_textfield_base_darktheme_disabled;
|
|
200
|
+
}, function (_a) {
|
|
201
|
+
var theme = _a.theme;
|
|
202
|
+
return theme.ui_cpnt_textfield_border_darktheme_normal;
|
|
203
|
+
});
|
|
204
|
+
var S_TextFieldWrapper = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: center;\n border-radius: 8px;\n box-sizing: border-box;\n display: flex;\n ", ";\n ", ";\n ", ";\n"], ["\n align-items: center;\n border-radius: 8px;\n box-sizing: border-box;\n display: flex;\n ", ";\n ", ";\n ", ";\n"])), function (_a) {
|
|
205
|
+
var size = _a.size;
|
|
206
|
+
return size &&
|
|
207
|
+
{
|
|
208
|
+
small: small,
|
|
209
|
+
medium: medium,
|
|
210
|
+
large: large,
|
|
211
|
+
rlarge: large
|
|
212
|
+
}[size];
|
|
213
|
+
}, function (_a) {
|
|
214
|
+
var state = _a.state, colorTheme = _a.colorTheme;
|
|
215
|
+
return colorTheme === 'none' &&
|
|
216
|
+
state &&
|
|
217
|
+
{
|
|
218
|
+
normal: normal,
|
|
219
|
+
read_only: read_only,
|
|
220
|
+
disabled: disabled
|
|
221
|
+
}[state];
|
|
222
|
+
}, function (_a) {
|
|
223
|
+
var state = _a.state, colorTheme = _a.colorTheme;
|
|
224
|
+
return colorTheme === 'dark' &&
|
|
225
|
+
state &&
|
|
226
|
+
{
|
|
227
|
+
normal: dark_normal,
|
|
228
|
+
read_only: dark_read_only,
|
|
229
|
+
disabled: dark_disabled
|
|
230
|
+
}[state];
|
|
231
|
+
});
|
|
232
|
+
var S_IconBox = styled_components_1.default.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
233
|
+
var S_Error = styled_components_1.default.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n"])), function (_a) {
|
|
234
|
+
var theme = _a.theme, colorTheme = _a.colorTheme;
|
|
235
|
+
return colorTheme === 'none'
|
|
236
|
+
? theme.ui_cpnt_textfield_text_error
|
|
237
|
+
: theme.ui_cpnt_textfield_text_darktheme_error;
|
|
238
|
+
}, function (_a) {
|
|
239
|
+
var theme = _a.theme;
|
|
240
|
+
return theme.desktopFontSize.caption2;
|
|
241
|
+
}, function (_a) {
|
|
242
|
+
var theme = _a.theme;
|
|
243
|
+
return theme.fontWeight.normal;
|
|
244
|
+
}, function (_a) {
|
|
245
|
+
var theme = _a.theme;
|
|
246
|
+
return theme.desktopLineHeight.caption2;
|
|
247
|
+
}, function (_a) {
|
|
248
|
+
var theme = _a.theme;
|
|
249
|
+
return theme.spacing.spacingA;
|
|
250
|
+
});
|
|
251
|
+
exports.default = TextField;
|
|
252
|
+
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, templateObject_14;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TextField } from './TextField';
|
|
@@ -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.TextField = void 0;
|
|
7
|
+
var TextField_1 = require("./TextField");
|
|
8
|
+
Object.defineProperty(exports, "TextField", { enumerable: true, get: function () { return __importDefault(TextField_1).default; } });
|
|
@@ -12,6 +12,7 @@ export declare type TextLabelProps = {
|
|
|
12
12
|
singleLineMode?: 'none' | 'use';
|
|
13
13
|
ellipsisMode?: 'none' | 'use';
|
|
14
14
|
lineLimit?: number;
|
|
15
|
+
btnMode?: 'none' | 'use';
|
|
15
16
|
};
|
|
16
17
|
export declare type TextStyleProps = {
|
|
17
18
|
textAlign?: 'left' | 'center' | 'right';
|
|
@@ -22,6 +23,7 @@ export declare type TextStyleProps = {
|
|
|
22
23
|
singleLineMode?: 'none' | 'use';
|
|
23
24
|
ellipsisMode?: 'none' | 'use';
|
|
24
25
|
lineLimit?: number;
|
|
26
|
+
btnMode?: 'none' | 'use';
|
|
25
27
|
};
|
|
26
|
-
declare function TextLabel({ text, textAlign, styleTheme, colorOverride, colorTheme, underline, singleLineMode, ellipsisMode, lineLimit }: TextLabelProps): JSX.Element;
|
|
28
|
+
declare function TextLabel({ text, textAlign, styleTheme, colorOverride, colorTheme, underline, singleLineMode, ellipsisMode, lineLimit, btnMode }: TextLabelProps): JSX.Element;
|
|
27
29
|
export default TextLabel;
|