pds-dev-kit-web-test 2.5.401 → 2.5.405
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -3
- package/dist/src/common/assets/icons/fill/Video.js +1 -1
- package/dist/src/common/assets/icons/fill/VideoOff.js +1 -1
- package/dist/src/common/assets/icons/fill/VideoType.js +1 -1
- package/dist/src/common/assets/icons/fill/index.d.ts +0 -3
- package/dist/src/common/assets/icons/fill/index.js +1 -7
- package/dist/src/common/assets/icons/line/Video.js +1 -1
- package/dist/src/common/assets/icons/line/VideoOff.js +1 -1
- package/dist/src/common/assets/icons/line/VideoType.js +1 -1
- package/dist/src/common/assets/icons/line/index.d.ts +0 -12
- package/dist/src/common/assets/icons/line/index.js +1 -25
- package/dist/src/common/components/ThreeBarProgress/ThreeBarProgress.d.ts +1 -2
- package/dist/src/common/components/ThreeBarProgress/ThreeBarProgress.js +4 -48
- package/dist/src/common/services/i18n/resources/en.json +1 -9
- package/dist/src/common/services/i18n/resources/es.json +1 -9
- package/dist/src/common/services/i18n/resources/fil.json +1 -9
- package/dist/src/common/services/i18n/resources/index.d.ts +0 -56
- package/dist/src/common/services/i18n/resources/ja.json +1 -9
- package/dist/src/common/services/i18n/resources/ko.json +1 -9
- package/dist/src/common/services/i18n/resources/zh-cn.json +1 -9
- package/dist/src/common/services/i18n/resources/zh-tw.json +1 -9
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +1 -9
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +1 -9
- package/dist/src/common/styles/colorSet/UIColor.json +1 -14
- package/dist/src/common/styles/colorSet/index.d.ts +2 -31
- package/dist/src/common/styles/colorSet/index.js +2 -2
- package/dist/src/common/styles/colorSet/ui-type.d.ts +0 -13
- package/dist/src/desktop/components/AdminListItem/AdminListItem.d.ts +0 -1
- package/dist/src/desktop/components/AdminListItem/AdminListItem.js +13 -27
- package/dist/src/desktop/components/BasicListItem/BasicListItem.d.ts +1 -4
- package/dist/src/desktop/components/BasicListItem/BasicListItem.js +4 -26
- package/dist/src/desktop/components/BasicListItem/Contents.d.ts +1 -3
- package/dist/src/desktop/components/BasicListItem/Contents.js +2 -2
- package/dist/src/desktop/components/BasicListItem/RightBox/IconButton.d.ts +0 -1
- package/dist/src/desktop/components/BasicListItem/RightBox/IconButton.js +2 -2
- package/dist/src/desktop/components/Checkbox/Checkbox.d.ts +1 -3
- package/dist/src/desktop/components/Checkbox/Checkbox.js +3 -17
- package/dist/src/desktop/components/Chip/Chip.d.ts +1 -1
- package/dist/src/desktop/components/Chip/Chip.js +5 -50
- package/dist/src/desktop/components/Radio/Radio.js +2 -2
- package/dist/src/desktop/components/TextField/TextField.js +15 -41
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTU.js +2 -2
- package/dist/src/mobile/components/BasicListItem/BasicListItem.d.ts +1 -4
- package/dist/src/mobile/components/BasicListItem/BasicListItem.js +4 -26
- package/dist/src/mobile/components/BasicListItem/Contents.d.ts +1 -3
- package/dist/src/mobile/components/BasicListItem/Contents.js +2 -2
- package/dist/src/mobile/components/BasicListItem/RightBox/IconButton.d.ts +0 -1
- package/dist/src/mobile/components/BasicListItem/RightBox/IconButton.js +2 -2
- package/dist/src/mobile/components/Checkbox/Checkbox.d.ts +1 -3
- package/dist/src/mobile/components/Checkbox/Checkbox.js +3 -17
- package/dist/src/mobile/components/Chip/Chip.d.ts +1 -1
- package/dist/src/mobile/components/Chip/Chip.js +5 -50
- package/dist/src/mobile/components/Radio/Radio.js +2 -2
- package/dist/src/mobile/components/TextField/TextField.js +15 -41
- package/dist/src/mobile/components/TextLabel/TextLabel.d.ts +1 -6
- package/dist/src/mobile/components/TextLabel/TextLabel.js +3 -83
- package/dist/src/mobile/components/index.d.ts +1 -2
- package/dist/src/mobile/components/index.js +1 -3
- package/dist/src/mobile/index.d.ts +1 -1
- package/dist/src/mobile/index.js +2 -3
- package/dist/src/mobile/layout/LayoutMF/Containers/ContentsContainer/variation/MFA.js +1 -1
- package/dist/src/mobile/layout/LayoutMF/Containers/ContentsContainer/variation/MFB.js +1 -1
- package/dist/src/mobile/layout/LayoutMF/Containers/ContentsContainer/variation/MFC.js +1 -1
- package/dist/src/mobile/layout/LayoutMF/Containers/ContentsContainer/variation/MFD.js +1 -1
- package/dist/src/mobile/layout/LayoutMF/Containers/ContentsContainer/variation/MFE.js +1 -1
- package/dist/src/mobile/layout/LayoutMM/Containers/ContentsContainer/variation/MMA.js +1 -1
- package/dist/src/mobile/layout/LayoutMM/Containers/ContentsContainer/variation/MMB.js +1 -1
- package/dist/src/mobile/layout/LayoutMP/Containers/ContentsContainer/variation/MPA.js +1 -1
- package/dist/src/mobile/layout/LayoutMP/Containers/ContentsContainer/variation/MPB.js +1 -1
- package/dist/src/mobile/layout/LayoutMP/Containers/ContentsContainer/variation/MPC.js +1 -1
- package/dist/src/mobile/layout/LayoutMP/Containers/ContentsContainer/variation/MPD.js +1 -1
- package/dist/src/mobile/layout/LayoutMP/Containers/ContentsContainer/variation/MPE.js +1 -1
- package/dist/src/mobile/layout/LayoutMP/Containers/ContentsContainer/variation/MPF.js +1 -1
- package/dist/src/mobile/layout/LayoutMS/Containers/ContentsContainer/variation/MSA.js +1 -1
- package/dist/src/mobile/layout/LayoutMS/Containers/ContentsContainer/variation/MSB.js +1 -1
- package/dist/src/mobile/layout/LayoutMS/Containers/ContentsContainer/variation/MSC.js +1 -1
- package/dist/src/mobile/layout/LayoutMS/Containers/ContentsContainer/variation/MSD.js +1 -1
- package/dist/src/mobile/layout/LayoutMS/Containers/ContentsContainer/variation/MSE.js +1 -1
- package/dist/src/mobile/layout/LayoutMS/Containers/ContentsContainer/variation/MSF.js +1 -1
- package/dist/src/mobile/layout/LayoutMS/Containers/ContentsContainer/variation/MSG.js +1 -1
- package/dist/src/mobile/layout/LayoutMS/Containers/ContentsContainer/variation/MSH.js +1 -1
- package/dist/src/sub/AdminList/AdminListItem/AdminListItem.js +3 -3
- package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +1 -1
- package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.js +10 -36
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/SectionBox.js +1 -4
- package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js +1 -12
- package/dist/src/sub/DynamicLayout/components/Section/util/parseSectionBackgroundMediaData.js +1 -3
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/index.d.ts +0 -40
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/index.js +177 -36
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/PaletteColor_Dark.json +4 -152
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/PaletteColor_light.json +2 -150
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/SemanticColor.json +1 -45
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/UIColor.json +9 -262
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/index.d.ts +0 -593
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/ui-type.d.ts +0 -253
- package/dist/src/sub/DynamicLayout/mock_composition.js +0 -4
- package/dist/src/sub/DynamicLayout/mock_contentsCarousel.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +274 -1047
- package/dist/src/sub/DynamicLayout/mock_contentsList.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/mock_contentsList.js +222 -1008
- package/dist/src/sub/DynamicLayout/mock_slideBanner.d.ts +2 -810
- package/dist/src/sub/DynamicLayout/mock_slideBanner.js +268 -772
- package/dist/src/sub/DynamicLayout/mocks.d.ts +776 -2
- package/dist/src/sub/DynamicLayout/mocks.js +11 -4266
- package/dist/src/sub/DynamicLayout/sections/CustomSection/FlexGridItem.js +15 -11
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +0 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +4 -25
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +26 -102
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +1 -21
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.js +55 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.d.ts +2 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.js +20 -26
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +23 -46
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.js +98 -84
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.d.ts +6 -6
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +19 -31
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +3 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +132 -59
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.js +30 -24
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +6 -25
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +13 -88
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.js +55 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.d.ts +2 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +20 -26
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +23 -46
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.js +67 -64
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.d.ts +6 -6
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +4 -29
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +7 -16
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +4 -11
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +2 -15
- package/dist/src/sub/DynamicLayout/sections/FlexGridCustomSection.js +1 -1
- package/dist/src/sub/DynamicLayout/types.d.ts +0 -9
- package/package.json +2 -2
- package/release-note.md +3 -3
- package/dist/src/common/assets/icons/fill/Cam.d.ts +0 -4
- package/dist/src/common/assets/icons/fill/Cam.js +0 -30
- package/dist/src/common/assets/icons/fill/CamOff.d.ts +0 -4
- package/dist/src/common/assets/icons/fill/CamOff.js +0 -30
- package/dist/src/common/assets/icons/fill/VideoStop.d.ts +0 -4
- package/dist/src/common/assets/icons/fill/VideoStop.js +0 -30
- package/dist/src/common/assets/icons/line/Cam.d.ts +0 -4
- package/dist/src/common/assets/icons/line/Cam.js +0 -30
- package/dist/src/common/assets/icons/line/CamOff.d.ts +0 -4
- package/dist/src/common/assets/icons/line/CamOff.js +0 -30
- package/dist/src/common/assets/icons/line/CheckBox.d.ts +0 -4
- package/dist/src/common/assets/icons/line/CheckBox.js +0 -30
- package/dist/src/common/assets/icons/line/Dropdown.d.ts +0 -4
- package/dist/src/common/assets/icons/line/Dropdown.js +0 -30
- package/dist/src/common/assets/icons/line/Radio.d.ts +0 -4
- package/dist/src/common/assets/icons/line/Radio.js +0 -30
- package/dist/src/common/assets/icons/line/SectionQuestion32.d.ts +0 -4
- package/dist/src/common/assets/icons/line/SectionQuestion32.js +0 -30
- package/dist/src/common/assets/icons/line/SectionQuestion40.d.ts +0 -4
- package/dist/src/common/assets/icons/line/SectionQuestion40.js +0 -30
- package/dist/src/common/assets/icons/line/SectionQuestionnaire32.d.ts +0 -4
- package/dist/src/common/assets/icons/line/SectionQuestionnaire32.js +0 -30
- package/dist/src/common/assets/icons/line/SectionQuestionnaire40.d.ts +0 -4
- package/dist/src/common/assets/icons/line/SectionQuestionnaire40.js +0 -30
- package/dist/src/common/assets/icons/line/TextLong.d.ts +0 -4
- package/dist/src/common/assets/icons/line/TextLong.js +0 -30
- package/dist/src/common/assets/icons/line/TextShort.d.ts +0 -4
- package/dist/src/common/assets/icons/line/TextShort.js +0 -30
- package/dist/src/common/assets/icons/line/VideoStop.d.ts +0 -4
- package/dist/src/common/assets/icons/line/VideoStop.js +0 -30
- package/dist/src/common/utils/dateHelper.d.ts +0 -13
- package/dist/src/common/utils/dateHelper.js +0 -87
- package/dist/src/mobile/components/DatePicker/DatePicker.d.ts +0 -16
- package/dist/src/mobile/components/DatePicker/DatePicker.js +0 -156
- package/dist/src/mobile/components/DatePicker/DatePickerHeader.d.ts +0 -14
- package/dist/src/mobile/components/DatePicker/DatePickerHeader.js +0 -27
- package/dist/src/mobile/components/DatePicker/Day.d.ts +0 -13
- package/dist/src/mobile/components/DatePicker/Day.js +0 -94
- package/dist/src/mobile/components/DatePicker/index.d.ts +0 -1
- package/dist/src/mobile/components/DatePicker/index.js +0 -8
- package/dist/src/mobile/components/DatePicker/utils.d.ts +0 -16
- package/dist/src/mobile/components/DatePicker/utils.js +0 -68
- package/dist/src/sub/DynamicLayout/components/Section/components/VideoBGMedia.d.ts +0 -8
- package/dist/src/sub/DynamicLayout/components/Section/components/VideoBGMedia.js +0 -77
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/downIcons.d.ts +0 -12
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/downIcons.js +0 -76
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/index.d.ts +0 -4
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/index.js +0 -47
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/leftIcons.d.ts +0 -12
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/leftIcons.js +0 -76
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/rightIcons.d.ts +0 -12
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/rightIcons.js +0 -76
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/upIcons.d.ts +0 -12
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/upIcons.js +0 -76
- package/dist/src/sub/DynamicLayout/mock_video.d.ts +0 -368
- package/dist/src/sub/DynamicLayout/mock_video.js +0 -371
- package/dist/src/sub/DynamicLayout/mock_video_cb.d.ts +0 -368
- package/dist/src/sub/DynamicLayout/mock_video_cb.js +0 -371
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/navigationConfigs.d.ts +0 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/navigationConfigs.js +0 -889
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.d.ts +0 -27
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.js +0 -96
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.d.ts +0 -23
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.js +0 -176
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/navigationConfigs.d.ts +0 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/navigationConfigs.js +0 -889
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.d.ts +0 -27
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.js +0 -96
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/VideoPlayer.d.ts +0 -5
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/VideoPlayer.js +0 -148
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/helper.d.ts +0 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/helper.js +0 -25
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/index.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/index.js +0 -8
@@ -11,8 +11,8 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
12
12
|
var IconButton_1 = require("../../IconButton");
|
13
13
|
var IconButton = function (_a) {
|
14
|
-
var iconName = _a.iconName, fill = _a.fill, onClick = _a.onClick
|
15
|
-
return ((0, jsx_runtime_1.jsx)(S_IconWrapper, { children: iconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iconName, iconFillType: fill ? 'fill' : 'line', baseSize: "medium", iconSize: 20, shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", onClick: onClick, iconColorKey:
|
14
|
+
var iconName = _a.iconName, fill = _a.fill, onClick = _a.onClick;
|
15
|
+
return ((0, jsx_runtime_1.jsx)(S_IconWrapper, { children: iconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iconName, iconFillType: fill ? 'fill' : 'line', baseSize: "medium", iconSize: 20, shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", onClick: onClick, iconColorKey: "ui_cpnt_button_icon_default" })) }));
|
16
16
|
};
|
17
17
|
var S_IconWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: center;\n"], ["\n align-items: center;\n display: flex;\n justify-content: center;\n"])));
|
18
18
|
exports.default = IconButton;
|
@@ -1,14 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { Path } from 'react-hook-form';
|
3
3
|
import type { IFormValues, PDSTextType } from '../../../common';
|
4
|
-
type ColorTheme = 'none' | 'white' | 'grey1';
|
5
4
|
type CheckboxProps = {
|
6
5
|
text?: PDSTextType;
|
7
6
|
fontWeight?: 'bold' | 'regular';
|
8
7
|
state?: 'normal' | 'disabled';
|
9
8
|
name: Path<IFormValues>;
|
10
|
-
colorTheme?: ColorTheme;
|
11
9
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
12
10
|
};
|
13
|
-
declare function Checkbox({ text, fontWeight, state, name,
|
11
|
+
declare function Checkbox({ text, fontWeight, state, name, onChange }: CheckboxProps): JSX.Element;
|
14
12
|
export default Checkbox;
|
@@ -24,7 +24,7 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
24
24
|
var hybrid_1 = require("../../../hybrid");
|
25
25
|
var TextLabel_1 = require("../TextLabel");
|
26
26
|
function Checkbox(_a) {
|
27
|
-
var text = _a.text, _b = _a.fontWeight, fontWeight = _b === void 0 ? 'regular' : _b, _c = _a.state, state = _c === void 0 ? 'normal' : _c, name = _a.name,
|
27
|
+
var text = _a.text, _b = _a.fontWeight, fontWeight = _b === void 0 ? 'regular' : _b, _c = _a.state, state = _c === void 0 ? 'normal' : _c, name = _a.name, onChange = _a.onChange;
|
28
28
|
var register = (0, react_hook_form_1.useFormContext)().register;
|
29
29
|
var checkboxFormRegister = register(name);
|
30
30
|
var isChecked = (0, react_hook_form_1.useWatch)({ name: name });
|
@@ -34,24 +34,10 @@ function Checkbox(_a) {
|
|
34
34
|
onChange(e);
|
35
35
|
}
|
36
36
|
};
|
37
|
-
var colorThemeSet = {
|
38
|
-
none: {
|
39
|
-
iconColorkey: 'ui_cpnt_selcontrols_icon_default',
|
40
|
-
textColorKey: 'ui_cpnt_selcontrols_text_default'
|
41
|
-
},
|
42
|
-
white: {
|
43
|
-
iconColorkey: 'ui_cpnt_selcontrols_icon_white',
|
44
|
-
textColorKey: 'ui_cpnt_selcontrols_text_white'
|
45
|
-
},
|
46
|
-
grey1: {
|
47
|
-
iconColorkey: 'ui_cpnt_selcontrols_icon_grey_01',
|
48
|
-
textColorKey: 'ui_cpnt_selcontrols_text_grey_01'
|
49
|
-
}
|
50
|
-
};
|
51
37
|
var icon = function () {
|
52
38
|
switch (state) {
|
53
39
|
case 'normal': {
|
54
|
-
return isChecked ? ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_primary" })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_off", fillType: "line", colorKey:
|
40
|
+
return isChecked ? ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_primary" })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_off", fillType: "line", colorKey: "ui_cpnt_selcontrols_icon_default" }));
|
55
41
|
}
|
56
42
|
case 'disabled': {
|
57
43
|
return isChecked ? ((0, jsx_runtime_1.jsxs)(S_OverrideIconWrapper, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_primary" }) }), (0, jsx_runtime_1.jsx)(S_OverrideIcon, { children: (0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_on_base_hover" }) })] })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_off", fillType: "line", colorKey: "ui_cpnt_selcontrols_icon_disabled" }));
|
@@ -59,7 +45,7 @@ function Checkbox(_a) {
|
|
59
45
|
}
|
60
46
|
};
|
61
47
|
return ((0, jsx_runtime_1.jsx)(S_Checkbox, __assign({ "x-pds-name": "Checkbox", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, { children: (0, jsx_runtime_1.jsxs)(S_Label, __assign({ htmlFor: name, isDisabled: state === 'disabled' }, { children: [icon(), text && ((0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: fontWeight === 'regular' ? 'body2Regular' : 'body2Bold', colorOverride: state === 'normal'
|
62
|
-
?
|
48
|
+
? 'ui_cpnt_selcontrols_text_default'
|
63
49
|
: 'ui_cpnt_selcontrols_text_disabled' }) })), (0, jsx_runtime_1.jsx)("input", __assign({ hidden: true, type: "checkbox" }, checkboxFormRegister, { id: name, disabled: state === 'disabled', onChange: handleChange }))] })) })));
|
64
50
|
}
|
65
51
|
var S_Checkbox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 24px;\n"], ["\n align-items: center;\n display: flex;\n height: 24px;\n"])));
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import type { PDSIconType, PDSTextType, PDSValueOption, UiColors } from '../../../common';
|
3
|
-
type DisplayType = 'category_choice' | 'filter_single' | 'filter_multi' | 'removable' | 'label' | 'time' | 'information'
|
3
|
+
type DisplayType = 'category_choice' | 'filter_single' | 'filter_multi' | 'removable' | 'label' | 'time' | 'information';
|
4
4
|
export type ChipProps = {
|
5
5
|
displayType?: DisplayType;
|
6
6
|
text?: PDSTextType;
|
@@ -14,33 +14,13 @@ var __assign = (this && this.__assign) || function () {
|
|
14
14
|
};
|
15
15
|
return __assign.apply(this, arguments);
|
16
16
|
};
|
17
|
-
var
|
18
|
-
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
22
|
-
}
|
23
|
-
Object.defineProperty(o, k2, desc);
|
24
|
-
}) : (function(o, m, k, k2) {
|
25
|
-
if (k2 === undefined) k2 = k;
|
26
|
-
o[k2] = m[k];
|
27
|
-
}));
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
30
|
-
}) : function(o, v) {
|
31
|
-
o["default"] = v;
|
32
|
-
});
|
33
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
34
|
-
if (mod && mod.__esModule) return mod;
|
35
|
-
var result = {};
|
36
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
37
|
-
__setModuleDefault(result, mod);
|
38
|
-
return result;
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
39
19
|
};
|
40
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
41
21
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
42
22
|
var react_1 = require("react");
|
43
|
-
var styled_components_1 =
|
23
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
44
24
|
var hybrid_1 = require("../../../hybrid");
|
45
25
|
var Icon_1 = require("../../../hybrid/components/Icon");
|
46
26
|
var TextLabel_1 = require("../TextLabel");
|
@@ -78,10 +58,6 @@ function Chip(_a) {
|
|
78
58
|
return ((0, jsx_runtime_1.jsx)(S_TimeChip, __assign({ onClick: handleClickChip }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: "caption2Bold", singleLineMode: "use", colorTheme: "sysTextWhite", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }) })));
|
79
59
|
case 'removable':
|
80
60
|
return ((0, jsx_runtime_1.jsxs)(S_RemovableChip, __assign({ onClick: handleClickChip }, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: "caption1Regular", singleLineMode: "use", colorTheme: "sysTextSecondary", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }), (0, jsx_runtime_1.jsx)(S_XIconWrapper, __assign({ onClick: handleClickXMarkIcon }, { children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { size: 12, iconName: "ic_xmark", fillType: "line", colorKey: "ui_cpnt_chip_fill_icon_inactive" }) }))] })));
|
81
|
-
case 'information2':
|
82
|
-
return ((0, jsx_runtime_1.jsxs)(S_Information2, { children: [(0, jsx_runtime_1.jsx)(Icon_1.Icon, { fillType: iconFillType, iconName: iconName, size: 16, colorKey: "ui_cpnt_icon_usr_brandprimary" }), text && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: "caption1Bold", singleLineMode: "use", colorTheme: "usrTextBrandPrimary", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" })] }))] }));
|
83
|
-
case 'information3':
|
84
|
-
return ((0, jsx_runtime_1.jsxs)(S_Information3, { children: [(0, jsx_runtime_1.jsx)(Icon_1.Icon, { fillType: iconFillType, iconName: iconName, size: 16, colorKey: "ui_cpnt_icon_sys_white" }), text && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: "caption1Bold", singleLineMode: "use", colorTheme: "sysTextWhite", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" })] }))] }));
|
85
61
|
default:
|
86
62
|
return ((0, jsx_runtime_1.jsxs)(S_FilterSingleChip, __assign({ isActive: isActive, onClick: handleClickChip }, { children: [filterIconMode === 'left' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Icon_1.Icon, { fillType: iconFillType, iconName: iconName, size: 16, colorKey: isActive ? 'ui_cpnt_chip_fill_icon_active_01' : 'ui_cpnt_chip_line_icon_02' }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" })] })), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: "caption1Regular", singleLineMode: "use", colorTheme: isActive ? 'usrTextBrandOnPrimary' : 'sysTextSecondary', ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" })] })));
|
87
63
|
}
|
@@ -155,26 +131,5 @@ var S_TimeChip = styled_components_1.default.div(templateObject_7 || (templateOb
|
|
155
131
|
var theme = _a.theme;
|
156
132
|
return theme.spacing.spacingB;
|
157
133
|
});
|
158
|
-
var
|
159
|
-
|
160
|
-
return theme.spacing.spacingB;
|
161
|
-
}, function (_a) {
|
162
|
-
var theme = _a.theme;
|
163
|
-
return theme.spacing.spacingB;
|
164
|
-
});
|
165
|
-
var S_Information2 = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n ", ";\n\n background-color: ", ";\n border: 1px solid ", ";\n"], ["\n ", ";\n\n background-color: ", ";\n border: 1px solid ", ";\n"])), informationBase, function (_a) {
|
166
|
-
var theme = _a.theme;
|
167
|
-
return theme.ui_67;
|
168
|
-
}, function (_a) {
|
169
|
-
var theme = _a.theme;
|
170
|
-
return theme.ui_140;
|
171
|
-
});
|
172
|
-
var S_Information3 = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n ", ";\n\n background-color: ", ";\n border: 1px solid ", ";\n"], ["\n ", ";\n\n background-color: ", ";\n border: 1px solid ", ";\n"])), informationBase, function (_a) {
|
173
|
-
var theme = _a.theme;
|
174
|
-
return theme.ui_37;
|
175
|
-
}, function (_a) {
|
176
|
-
var theme = _a.theme;
|
177
|
-
return theme.ui_67;
|
178
|
-
});
|
179
|
-
var S_ChipWrapper = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n display: inline-block;\n min-width: fit-content;\n vertical-align: bottom;\n"], ["\n display: inline-block;\n min-width: fit-content;\n vertical-align: bottom;\n"])));
|
180
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
|
134
|
+
var S_ChipWrapper = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: inline-block;\n min-width: fit-content;\n vertical-align: bottom;\n"], ["\n display: inline-block;\n min-width: fit-content;\n vertical-align: bottom;\n"])));
|
135
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
@@ -39,9 +39,9 @@ function Radio(_a) {
|
|
39
39
|
}
|
40
40
|
}
|
41
41
|
};
|
42
|
-
return ((0, jsx_runtime_1.jsxs)(S_Label, __assign({ "x-pds-name": "Radio", "x-pds-element-type": "component", "x-pds-device-type": "desktop", htmlFor:
|
42
|
+
return ((0, jsx_runtime_1.jsxs)(S_Label, __assign({ "x-pds-name": "Radio", "x-pds-element-type": "component", "x-pds-device-type": "desktop", htmlFor: value }, { children: [icon(), text && ((0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: fontWeight === 'regular' ? 'body2Regular' : 'body2Bold', colorOverride: state === 'normal'
|
43
43
|
? 'ui_cpnt_selcontrols_text_default'
|
44
|
-
: 'ui_cpnt_selcontrols_text_disabled' }) })), (0, jsx_runtime_1.jsx)("input", { hidden: true, id:
|
44
|
+
: 'ui_cpnt_selcontrols_text_disabled' }) })), (0, jsx_runtime_1.jsx)("input", { hidden: true, id: value, type: "radio", name: name, value: value, checked: checked, color: value, onChange: handleChange, disabled: state === 'disabled' })] })));
|
45
45
|
}
|
46
46
|
var S_Label = styled_components_1.default.label(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n cursor: pointer;\n display: flex;\n height: 24px;\n"], ["\n align-items: center;\n cursor: pointer;\n display: flex;\n height: 24px;\n"])));
|
47
47
|
var S_OverrideIconWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n position: relative;\n"], ["\n align-items: center;\n display: flex;\n position: relative;\n"])));
|
@@ -123,48 +123,24 @@ function TextField(_a) {
|
|
123
123
|
trigger(name);
|
124
124
|
}
|
125
125
|
var S_TextField = function () {
|
126
|
-
var deleteIconColor = 'ui_cpnt_button_icon_disabled';
|
127
|
-
switch (colorTheme) {
|
128
|
-
case 'dark': {
|
129
|
-
deleteIconColor = 'ui_cpnt_textfield_icon_darktheme_disabled';
|
130
|
-
break;
|
131
|
-
}
|
132
|
-
case 'transparent': {
|
133
|
-
deleteIconColor = 'ui_cpnt_textfield_icon_colortheme_transparent_disabled';
|
134
|
-
break;
|
135
|
-
}
|
136
|
-
}
|
137
126
|
if (textLineType === 'multi') {
|
138
|
-
return ((0, jsx_runtime_1.
|
139
|
-
(colorTheme &&
|
140
|
-
{
|
141
|
-
none: basicThemeIconColors[state],
|
142
|
-
dark: darkThemeIconColors[state],
|
143
|
-
transparent: transparentThemeIconColors[state]
|
144
|
-
}[colorTheme]), iconFillType: iBtn2IconFillType === 'fill' ? 'fill' : 'line', state: state === 'disabled' ? 'disabled' : 'normal', onClick: handleClickIBtn2 })), iBtn1IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iBtn1IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: overrideIBtn1IconColorKey ||
|
145
|
-
(colorTheme &&
|
146
|
-
{
|
147
|
-
none: basicThemeIconColors[state],
|
148
|
-
dark: darkThemeIconColors[state],
|
149
|
-
transparent: transparentThemeIconColors[state]
|
150
|
-
}[colorTheme]), iconFillType: iBtn1IconFillType === 'fill' ? 'fill' : 'line', state: state === 'disabled' ? 'disabled' : 'normal', onClick: handleClickIBtn1 }))] })] }));
|
127
|
+
return ((0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, textAlign: textAlign, validation: validation, textLineType: "multi", multiRows: multiRows, state: state, colorTheme: colorTheme, maxLength: maxLength, textSize: "form2", textWeight: fontWeight === 'bold' ? 'bold' : 'normal', autoComplete: autoComplete, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown }));
|
151
128
|
}
|
152
129
|
if (textLineType === 'auto') {
|
153
|
-
return ((0, jsx_runtime_1.
|
154
|
-
(colorTheme &&
|
155
|
-
{
|
156
|
-
none: basicThemeIconColors[state],
|
157
|
-
dark: darkThemeIconColors[state],
|
158
|
-
transparent: transparentThemeIconColors[state]
|
159
|
-
}[colorTheme]), iconFillType: iBtn2IconFillType === 'fill' ? 'fill' : 'line', state: state === 'disabled' ? 'disabled' : 'normal', onClick: handleClickIBtn2 })), iBtn1IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iBtn1IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: overrideIBtn1IconColorKey ||
|
160
|
-
(colorTheme &&
|
161
|
-
{
|
162
|
-
none: basicThemeIconColors[state],
|
163
|
-
dark: darkThemeIconColors[state],
|
164
|
-
transparent: transparentThemeIconColors[state]
|
165
|
-
}[colorTheme]), iconFillType: iBtn1IconFillType === 'fill' ? 'fill' : 'line', state: state === 'disabled' ? 'disabled' : 'normal', onClick: handleClickIBtn1 }))] })] }));
|
130
|
+
return ((0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, textAlign: textAlign, validation: validation, textLineType: "auto", autoMinRows: autoMinRows, autoMaxRows: autoMaxRows, state: state, colorTheme: colorTheme, maxLength: maxLength, textSize: "form2", textWeight: fontWeight === 'bold' ? 'bold' : 'normal', autoComplete: autoComplete, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown }));
|
166
131
|
}
|
167
132
|
if (textLineType === 'single') {
|
133
|
+
var deleteIconColor = 'ui_cpnt_button_icon_disabled';
|
134
|
+
switch (colorTheme) {
|
135
|
+
case 'dark': {
|
136
|
+
deleteIconColor = 'ui_cpnt_textfield_icon_darktheme_disabled';
|
137
|
+
break;
|
138
|
+
}
|
139
|
+
case 'transparent': {
|
140
|
+
deleteIconColor = 'ui_cpnt_textfield_icon_colortheme_transparent_disabled';
|
141
|
+
break;
|
142
|
+
}
|
143
|
+
}
|
168
144
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [prefixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: prefixText, styleTheme: "caption1Bold", colorTheme: "sysTextTertiary", singleLineMode: "use" }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" })] })), (0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText, defaultText: defaultText, textAlign: textAlign, validation: validation, preventBlankMode: preventBlankMode, enterSubmitMode: enterSubmitMode, textLineType: "single", inputType: inputType, inputMode: inputMode, state: state, colorTheme: colorTheme, min: min, max: max, maxLength: maxLength, textSize: "form2", textWeight: fontWeight === 'bold' ? 'bold' : 'normal', fieldPaddingRight: size === 'large' || size === 'rlarge' ? 8 : undefined, deleteIconMode: deleteBtnMode, deleteIconSize: size === 'large' || size === 'rlarge' ? 20 : 16, deleteIconColor: deleteIconColor, isFocused: isFocused, autoComplete: autoComplete, stepperMode: inputType === 'number' && numberStepperMode === 'use' ? 'use' : 'none', stepperRightSpacing: size === 'large' || size === 'rlarge' ? 1 : -4, innerSpinButtonSize: size === 'small' ? 12 : 16, step: numberStep, suffixText: suffixText, suffixTextRightSpacingMode: size === 'large' || size === 'rlarge' ? 'use' : 'none', onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown }), (0, jsx_runtime_1.jsxs)(S_RightBox, { children: [iBtn2IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iBtn2IconName, baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: size === 'large' || size === 'rlarge' ? 20 : 16, iconColorKey: overrideIBtn2IconColorKey ||
|
169
145
|
(colorTheme &&
|
170
146
|
{
|
@@ -384,9 +360,7 @@ var S_TextFieldWrapper = styled_components_1.default.div(templateObject_19 || (t
|
|
384
360
|
return customWidth && "width: ".concat(customWidth, ";");
|
385
361
|
});
|
386
362
|
var S_RightBox = styled_components_1.default.div(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n"], ["\n align-items: center;\n display: flex;\n"])));
|
387
|
-
var
|
388
|
-
var S_RightBox_Multi = styled_components_1.default.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n align-items: center;\n align-self: end;\n display: flex;\n"], ["\n align-items: center;\n align-self: end;\n display: flex;\n"])));
|
389
|
-
var S_Error = styled_components_1.default.div(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"])), function (_a) {
|
363
|
+
var S_Error = styled_components_1.default.div(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"])), function (_a) {
|
390
364
|
var theme = _a.theme, colorTheme = _a.colorTheme;
|
391
365
|
switch (colorTheme) {
|
392
366
|
case 'none': {
|
@@ -411,4 +385,4 @@ var S_Error = styled_components_1.default.div(templateObject_23 || (templateObje
|
|
411
385
|
return theme.spacing.spacingA;
|
412
386
|
});
|
413
387
|
exports.default = TextField;
|
414
|
-
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, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21
|
388
|
+
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, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21;
|
@@ -98,7 +98,7 @@ var S_ContentsContainer2 = styled_components_1.default.div(templateObject_5 || (
|
|
98
98
|
var containerColor = _a.containerColor;
|
99
99
|
return "background-color: ".concat(containerColor);
|
100
100
|
}, overrideStyleContainer2);
|
101
|
-
var S_ContentsArea1 = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n box-sizing: border-box;\n
|
101
|
+
var S_ContentsArea1 = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n box-sizing: border-box;\n max-width: 480px;\n padding-bottom: 88px;\n padding-left: 24px;\n padding-right: 24px;\n width: 480px;\n ", ";\n"], ["\n box-sizing: border-box;\n max-width: 480px;\n padding-bottom: 88px;\n padding-left: 24px;\n padding-right: 24px;\n width: 480px;\n ", ";\n"])), function (_a) {
|
102
102
|
var areaColor = _a.areaColor;
|
103
103
|
return "background-color: ".concat(areaColor);
|
104
104
|
});
|
@@ -106,7 +106,7 @@ var S_ContentsArea2 = styled_components_1.default.div(templateObject_7 || (templ
|
|
106
106
|
var areaColor = _a.areaColor;
|
107
107
|
return "background-color: ".concat(areaColor);
|
108
108
|
});
|
109
|
-
var S_Content1 = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n
|
109
|
+
var S_Content1 = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
110
110
|
var S_Content2 = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n height: 100%;\n overflow: hidden;\n"], ["\n height: 100%;\n overflow: hidden;\n"])));
|
111
111
|
exports.default = WTU;
|
112
112
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
@@ -2,7 +2,6 @@
|
|
2
2
|
import type { PDSIconType, PDSTextType } from '../../../common';
|
3
3
|
export type BasicListItemProps = {
|
4
4
|
selectionMode?: 'none' | 'check' | 'radio';
|
5
|
-
state?: 'normal' | 'disabled';
|
6
5
|
titleText: PDSTextType;
|
7
6
|
titleTextColorTheme?: 'none' | 'logout';
|
8
7
|
descText?: PDSTextType;
|
@@ -15,7 +14,6 @@ export type BasicListItemProps = {
|
|
15
14
|
iconFillType?: 'fill' | 'line';
|
16
15
|
displayType?: 'none' | 'text' | 'ibtn_text' | 'ibtn_amount1' | 'ibtn_amount2' | 'mbtn' | 'switch';
|
17
16
|
captionText?: PDSTextType;
|
18
|
-
captionTextColorTheme?: 'none' | 'active' | 'inactive';
|
19
17
|
iBtn1IconName?: PDSIconType;
|
20
18
|
iBtn1IconFillType?: 'fill' | 'line';
|
21
19
|
iBtn2IconName?: PDSIconType;
|
@@ -41,7 +39,6 @@ export type BasicListItemProps = {
|
|
41
39
|
};
|
42
40
|
export type StyleProps = {
|
43
41
|
isSelected?: boolean;
|
44
|
-
state?: 'normal' | 'disabled';
|
45
42
|
dividerType?: BasicListItemProps['dividerType'];
|
46
43
|
selectionMode?: 'none' | 'check' | 'radio';
|
47
44
|
captionText?: PDSTextType;
|
@@ -51,5 +48,5 @@ export type StyleProps = {
|
|
51
48
|
spacingMode?: 'none' | 'use';
|
52
49
|
onlyLeftArea?: boolean;
|
53
50
|
};
|
54
|
-
declare function BasicListItem({ selectionMode,
|
51
|
+
declare function BasicListItem({ selectionMode, titleText, titleTextColorTheme, descText, badgeMode, badgeStatus, imageIconMode, imageShapeType, imageSrc, iconName, iconFillType, displayType, captionText, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, mBtnFillType, mBtnText, mBtnState, dividerType, titleFontWeight, checkboxId, radioId, radioValue, switchName, switchState, switchStatus, spacingMode, onClick, onClickRadio, onClickSwitch, onClickIBtn1, onClickIBtn2, onClickMBtn }: BasicListItemProps): JSX.Element;
|
55
52
|
export default BasicListItem;
|
@@ -25,7 +25,7 @@ var Contents_1 = __importDefault(require("./Contents"));
|
|
25
25
|
var LeftBox_1 = require("./LeftBox");
|
26
26
|
var RightBox_1 = require("./RightBox");
|
27
27
|
function BasicListItem(_a) {
|
28
|
-
var _b = _a.selectionMode, selectionMode = _b === void 0 ? 'none' : _b,
|
28
|
+
var _b = _a.selectionMode, selectionMode = _b === void 0 ? 'none' : _b, titleText = _a.titleText, _c = _a.titleTextColorTheme, titleTextColorTheme = _c === void 0 ? 'none' : _c, descText = _a.descText, _d = _a.badgeMode, badgeMode = _d === void 0 ? 'none' : _d, _e = _a.badgeStatus, badgeStatus = _e === void 0 ? 'inactive' : _e, _f = _a.imageIconMode, imageIconMode = _f === void 0 ? 'none' : _f, _g = _a.imageShapeType, imageShapeType = _g === void 0 ? 'round' : _g, imageSrc = _a.imageSrc, iconName = _a.iconName, _h = _a.iconFillType, iconFillType = _h === void 0 ? 'line' : _h, _j = _a.displayType, displayType = _j === void 0 ? 'none' : _j, captionText = _a.captionText, 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.mBtnFillType, mBtnFillType = _m === void 0 ? 'fill' : _m, mBtnText = _a.mBtnText, _o = _a.mBtnState, mBtnState = _o === void 0 ? 'normal' : _o, _p = _a.dividerType, dividerType = _p === void 0 ? 'none' : _p, _q = _a.titleFontWeight, titleFontWeight = _q === void 0 ? 'regular' : _q, checkboxId = _a.checkboxId, radioId = _a.radioId, radioValue = _a.radioValue, switchName = _a.switchName, _r = _a.switchState, switchState = _r === void 0 ? 'normal' : _r, _s = _a.switchStatus, switchStatus = _s === void 0 ? 'off' : _s, _t = _a.spacingMode, spacingMode = _t === void 0 ? 'use' : _t, onClick = _a.onClick, onClickRadio = _a.onClickRadio, onClickSwitch = _a.onClickSwitch, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onClickMBtn = _a.onClickMBtn;
|
29
29
|
var methods = (0, react_hook_form_1.useFormContext)();
|
30
30
|
var isSelected = methods === null || methods === void 0 ? void 0 : methods.watch((checkboxId === null || checkboxId === void 0 ? void 0 : checkboxId.toString()) || '');
|
31
31
|
var handleIBtn1Click = function (e) {
|
@@ -35,8 +35,6 @@ function BasicListItem(_a) {
|
|
35
35
|
}
|
36
36
|
};
|
37
37
|
var handleClick = function (e) {
|
38
|
-
if (state === 'disabled')
|
39
|
-
return;
|
40
38
|
switch (selectionMode) {
|
41
39
|
case 'radio': {
|
42
40
|
if (onClickRadio && radioId) {
|
@@ -66,31 +64,11 @@ function BasicListItem(_a) {
|
|
66
64
|
}
|
67
65
|
}
|
68
66
|
};
|
69
|
-
|
70
|
-
if (state === 'disabled') {
|
71
|
-
return 'sysTextTertiary';
|
72
|
-
}
|
73
|
-
if (titleTextColorTheme === 'none') {
|
74
|
-
return 'sysTextPrimary';
|
75
|
-
}
|
76
|
-
return 'sysTextError';
|
77
|
-
}
|
78
|
-
function captionTextColor() {
|
79
|
-
if (state === 'disabled') {
|
80
|
-
return 'sysTextTertiary';
|
81
|
-
}
|
82
|
-
if (captionTextColorTheme === 'active') {
|
83
|
-
return 'sysTextBrandSeconVariant';
|
84
|
-
}
|
85
|
-
return 'sysTextTertiary';
|
86
|
-
}
|
87
|
-
return ((0, jsx_runtime_1.jsx)(S_BasicListItem, __assign({ "x-pds-name": "BasicListItem", "x-pds-element-type": "component", "x-pds-device-type": "mobile", state: state, isSelected: isSelected, onClick: handleClick, spacingMode: spacingMode }, { children: (0, jsx_runtime_1.jsxs)(S_BasicListItemBox, __assign({ imageIconMode: imageIconMode, captionText: captionText, spacingMode: spacingMode, dividerType: dividerType }, { children: [(0, jsx_runtime_1.jsxs)(LeftBox_1.LeftBox, __assign({ hasRightBox: displayType !== 'none' }, { children: [selectionMode === 'check' && checkboxId && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Checkbox, { id: checkboxId }), selectionMode === 'radio' && radioValue && radioId && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Radio, { id: radioId, value: radioValue, onChange: onClickRadio })), badgeMode === 'left' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Badge, { status: badgeStatus }), imageIconMode === 'image' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Image, { src: imageSrc, shape: imageShapeType }), imageIconMode === 'icon' && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Icon, { name: iconName, fill: iconFillType === 'fill' })), (0, jsx_runtime_1.jsxs)(Contents_1.default, { children: [(0, jsx_runtime_1.jsx)(Contents_1.default.Title, { text: titleText, colorTheme: titleTextColor(), font: titleFontWeight === 'bold' ? 'body2Bold' : 'body2Regular' }), captionText && (0, jsx_runtime_1.jsx)(Contents_1.default.Caption, { text: captionText, colorTheme: captionTextColor() })] })] })), (0, jsx_runtime_1.jsxs)(RightBox_1.RightBox, __assign({ hasFixedHeight: displayType === 'text' }, { children: [(displayType === 'text' || displayType === 'ibtn_text') && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Description, { text: descText, icon: displayType === 'ibtn_text' ? ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })) : undefined })), displayType === 'ibtn_amount1' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })), displayType === 'ibtn_amount2' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn2IconName, fill: iBtn2IconFillType === 'fill', onClick: onClickIBtn2, state: state }), (0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click, state: state })] })), displayType === 'mbtn' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.MainButton, { text: mBtnText, fill: mBtnFillType === 'fill', state: state === 'disabled' ? 'disabled' : mBtnState, onClick: onClickMBtn })), displayType === 'switch' && switchName && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Switch, { name: switchName, state: state === 'disabled' ? 'disabled' : switchState, status: switchStatus, onClick: onClickSwitch }))] }))] })) })));
|
67
|
+
return ((0, jsx_runtime_1.jsx)(S_BasicListItem, __assign({ "x-pds-name": "BasicListItem", "x-pds-element-type": "component", "x-pds-device-type": "mobile", isSelected: isSelected, onClick: handleClick, spacingMode: spacingMode }, { children: (0, jsx_runtime_1.jsxs)(S_BasicListItemBox, __assign({ imageIconMode: imageIconMode, captionText: captionText, spacingMode: spacingMode, dividerType: dividerType }, { children: [(0, jsx_runtime_1.jsxs)(LeftBox_1.LeftBox, __assign({ hasRightBox: displayType !== 'none' }, { children: [selectionMode === 'check' && checkboxId && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Checkbox, { id: checkboxId }), selectionMode === 'radio' && radioValue && radioId && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Radio, { id: radioId, value: radioValue, onChange: onClickRadio })), badgeMode === 'left' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Badge, { status: badgeStatus }), imageIconMode === 'image' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Image, { src: imageSrc, shape: imageShapeType }), imageIconMode === 'icon' && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Icon, { name: iconName, fill: iconFillType === 'fill' })), (0, jsx_runtime_1.jsxs)(Contents_1.default, { children: [(0, jsx_runtime_1.jsx)(Contents_1.default.Title, { text: titleText, colorTheme: titleTextColorTheme === 'none' ? 'sysTextPrimary' : 'sysTextError', font: titleFontWeight === 'bold' ? 'body2Bold' : 'body2Regular' }), captionText && (0, jsx_runtime_1.jsx)(Contents_1.default.Caption, { text: captionText })] })] })), (0, jsx_runtime_1.jsxs)(RightBox_1.RightBox, __assign({ hasFixedHeight: displayType === 'text' }, { children: [(displayType === 'text' || displayType === 'ibtn_text') && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Description, { text: descText, icon: displayType === 'ibtn_text' ? ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })) : undefined })), displayType === 'ibtn_amount1' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })), displayType === 'ibtn_amount2' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn2IconName, fill: iBtn2IconFillType === 'fill', onClick: onClickIBtn2 }), (0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })] })), displayType === 'mbtn' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.MainButton, { text: mBtnText, fill: mBtnFillType === 'fill', state: mBtnState, onClick: onClickMBtn })), displayType === 'switch' && switchName && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Switch, { name: switchName, state: switchState, status: switchStatus, onClick: onClickSwitch }))] }))] })) })));
|
88
68
|
}
|
89
69
|
var S_BasicListItem = styled_components_1.default.li(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: ", ";\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: ", ";\n"])), function (_a) {
|
90
|
-
var theme = _a.theme, isSelected = _a.isSelected
|
91
|
-
return isSelected
|
92
|
-
? theme.ui_cpnt_list_base_area_select
|
93
|
-
: theme.ui_cpnt_list_base_area;
|
70
|
+
var theme = _a.theme, isSelected = _a.isSelected;
|
71
|
+
return isSelected ? theme.ui_cpnt_list_base_area_select : theme.ui_cpnt_list_base_area;
|
94
72
|
}, function (_a) {
|
95
73
|
var spacingMode = _a.spacingMode, theme = _a.theme;
|
96
74
|
return spacingMode === 'use' && "0 ".concat(theme.spacing.spacingE);
|
@@ -1,5 +1,4 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import type { TextLabelProps } from '../TextLabel/TextLabel';
|
3
2
|
import type { PDSTextType } from '../../../common/types';
|
4
3
|
type ContentsPropTypes = React.FunctionComponent & {
|
5
4
|
Title: React.FC<TitlePropTypes>;
|
@@ -7,12 +6,11 @@ type ContentsPropTypes = React.FunctionComponent & {
|
|
7
6
|
};
|
8
7
|
type TitlePropTypes = {
|
9
8
|
text: PDSTextType;
|
10
|
-
colorTheme:
|
9
|
+
colorTheme: 'sysTextPrimary' | 'sysTextSecondary' | 'sysTextTertiary' | 'sysTextWhite' | 'sysTextBlack' | 'sysTextError' | 'sysTextWarning' | 'sysTextBrandPrimary' | 'sysTextBrandSeconVariant' | 'usrTextBrandPrimary' | 'usrTextBrandSeconVariant' | 'usrTextBrandOnPrimary';
|
11
10
|
font: 'body2Bold' | 'body2Regular';
|
12
11
|
};
|
13
12
|
type CaptionPropTypes = {
|
14
13
|
text: PDSTextType;
|
15
|
-
colorTheme: TextLabelProps['colorTheme'];
|
16
14
|
};
|
17
15
|
declare const Contents: ContentsPropTypes;
|
18
16
|
export default Contents;
|
@@ -20,8 +20,8 @@ var Title = function (_a) {
|
|
20
20
|
return ((0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, colorTheme: colorTheme, styleTheme: font, singleLineMode: "use", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }) }));
|
21
21
|
};
|
22
22
|
var Caption = function (_a) {
|
23
|
-
var text = _a.text
|
24
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, colorTheme:
|
23
|
+
var text = _a.text;
|
24
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, colorTheme: "sysTextTertiary", styleTheme: "caption1Regular", textAlign: "left", singleLineMode: "use", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }) })] }));
|
25
25
|
};
|
26
26
|
var S_TextBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: 100%;\n"], ["\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: 100%;\n"])));
|
27
27
|
var S_TextWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n justify-content: center;\n width: 100%;\n"], ["\n justify-content: center;\n width: 100%;\n"])));
|
@@ -11,8 +11,8 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
12
12
|
var IconButton_1 = require("../../IconButton");
|
13
13
|
var IconButton = function (_a) {
|
14
|
-
var iconName = _a.iconName, fill = _a.fill, onClick = _a.onClick
|
15
|
-
return ((0, jsx_runtime_1.jsx)(S_IconWrapper, { children: iconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iconName, iconFillType: fill ? 'fill' : 'line', baseSize: "medium", iconSize: 20, shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", onClick: onClick, iconColorKey:
|
14
|
+
var iconName = _a.iconName, fill = _a.fill, onClick = _a.onClick;
|
15
|
+
return ((0, jsx_runtime_1.jsx)(S_IconWrapper, { children: iconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iconName, iconFillType: fill ? 'fill' : 'line', baseSize: "medium", iconSize: 20, shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", onClick: onClick, iconColorKey: "ui_cpnt_button_icon_default" })) }));
|
16
16
|
};
|
17
17
|
var S_IconWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: center;\n"], ["\n align-items: center;\n display: flex;\n justify-content: center;\n"])));
|
18
18
|
exports.default = IconButton;
|
@@ -1,14 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { Path } from 'react-hook-form';
|
3
3
|
import type { IFormValues, PDSTextType } from '../../../common';
|
4
|
-
type ColorTheme = 'none' | 'white' | 'grey1';
|
5
4
|
type CheckboxProps = {
|
6
5
|
text?: PDSTextType;
|
7
6
|
fontWeight?: 'bold' | 'regular';
|
8
7
|
state?: 'normal' | 'disabled';
|
9
8
|
name: Path<IFormValues>;
|
10
|
-
colorTheme?: ColorTheme;
|
11
9
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
12
10
|
};
|
13
|
-
declare function Checkbox({ text, fontWeight, state, name,
|
11
|
+
declare function Checkbox({ text, fontWeight, state, name, onChange }: CheckboxProps): JSX.Element;
|
14
12
|
export default Checkbox;
|
@@ -24,7 +24,7 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
24
24
|
var hybrid_1 = require("../../../hybrid");
|
25
25
|
var TextLabel_1 = require("../TextLabel");
|
26
26
|
function Checkbox(_a) {
|
27
|
-
var text = _a.text, _b = _a.fontWeight, fontWeight = _b === void 0 ? 'regular' : _b, _c = _a.state, state = _c === void 0 ? 'normal' : _c, name = _a.name,
|
27
|
+
var text = _a.text, _b = _a.fontWeight, fontWeight = _b === void 0 ? 'regular' : _b, _c = _a.state, state = _c === void 0 ? 'normal' : _c, name = _a.name, onChange = _a.onChange;
|
28
28
|
var register = (0, react_hook_form_1.useFormContext)().register;
|
29
29
|
var checkboxFormRegister = register(name);
|
30
30
|
var isChecked = (0, react_hook_form_1.useWatch)({ name: name });
|
@@ -34,24 +34,10 @@ function Checkbox(_a) {
|
|
34
34
|
onChange(e);
|
35
35
|
}
|
36
36
|
};
|
37
|
-
var colorThemeSet = {
|
38
|
-
none: {
|
39
|
-
iconColorkey: 'ui_cpnt_selcontrols_icon_default',
|
40
|
-
textColorKey: 'ui_cpnt_selcontrols_text_default'
|
41
|
-
},
|
42
|
-
white: {
|
43
|
-
iconColorkey: 'ui_cpnt_selcontrols_icon_white',
|
44
|
-
textColorKey: 'ui_cpnt_selcontrols_text_white'
|
45
|
-
},
|
46
|
-
grey1: {
|
47
|
-
iconColorkey: 'ui_cpnt_selcontrols_icon_grey_01',
|
48
|
-
textColorKey: 'ui_cpnt_selcontrols_text_grey_01'
|
49
|
-
}
|
50
|
-
};
|
51
37
|
var icon = function () {
|
52
38
|
switch (state) {
|
53
39
|
case 'normal': {
|
54
|
-
return isChecked ? ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_primary" })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_off", fillType: "line", colorKey:
|
40
|
+
return isChecked ? ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_primary" })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_off", fillType: "line", colorKey: "ui_cpnt_selcontrols_icon_default" }));
|
55
41
|
}
|
56
42
|
case 'disabled': {
|
57
43
|
return isChecked ? ((0, jsx_runtime_1.jsxs)(S_OverrideIconWrapper, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_primary" }), (0, jsx_runtime_1.jsx)(S_OverrideIcon, { children: (0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_on_base_hover" }) })] })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_off", fillType: "line", colorKey: "ui_cpnt_selcontrols_icon_disabled" }));
|
@@ -59,7 +45,7 @@ function Checkbox(_a) {
|
|
59
45
|
}
|
60
46
|
};
|
61
47
|
return ((0, jsx_runtime_1.jsx)(S_Checkbox, __assign({ "x-pds-name": "Checkbox", "x-pds-element-type": "component", "x-pds-device-type": "mobile" }, { children: (0, jsx_runtime_1.jsxs)(S_Label, __assign({ htmlFor: name }, { children: [icon(), text && ((0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: fontWeight === 'regular' ? 'body2Regular' : 'body2Bold', colorOverride: state === 'normal'
|
62
|
-
?
|
48
|
+
? 'ui_cpnt_selcontrols_text_default'
|
63
49
|
: 'ui_cpnt_selcontrols_text_disabled' }) })), (0, jsx_runtime_1.jsx)("input", __assign({ hidden: true, type: "checkbox" }, checkboxFormRegister, { id: name, disabled: state === 'disabled', onChange: handleChange }))] })) })));
|
64
50
|
}
|
65
51
|
var S_Checkbox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 24px;\n"], ["\n align-items: center;\n display: flex;\n height: 24px;\n"])));
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import type { PDSIconType, PDSTextType, PDSValueOption, UiColors } from '../../../common';
|
3
|
-
type DisplayType = 'category_choice' | 'filter_single' | 'filter_multi' | 'removable' | 'label' | 'time' | 'information'
|
3
|
+
type DisplayType = 'category_choice' | 'filter_single' | 'filter_multi' | 'removable' | 'label' | 'time' | 'information';
|
4
4
|
export type ChipProps = {
|
5
5
|
displayType?: DisplayType;
|
6
6
|
text?: PDSTextType;
|