@zohodesk/components 1.0.0-alpha-248 → 1.0.0-alpha-250
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -1
- package/assets/Appearance/default/themes/blue/blueDefaultCTATheme.module.css +1 -1
- package/assets/Appearance/default/themes/green/greenDefaultCTATheme.module.css +1 -1
- package/assets/Appearance/default/themes/orange/orangeDefaultCTATheme.module.css +1 -1
- package/assets/Appearance/default/themes/red/redDefaultCTATheme.module.css +1 -1
- package/assets/Appearance/default/themes/yellow/yellowDefaultCTATheme.module.css +1 -1
- package/es/Accordion/Accordion.js +4 -20
- package/es/Accordion/AccordionItem.js +4 -19
- package/es/Accordion/props/defaultProps.js +8 -0
- package/es/Accordion/props/propTypes.js +30 -0
- package/es/Animation/Animation.js +4 -25
- package/es/Animation/props/defaultProps.js +7 -0
- package/es/Animation/props/propTypes.js +12 -0
- package/es/AppContainer/AppContainer.js +4 -23
- package/es/AppContainer/props/defaultProps.js +8 -0
- package/es/AppContainer/props/propTypes.js +15 -0
- package/es/Avatar/Avatar.js +38 -70
- package/es/Avatar/Avatar.module.css +18 -0
- package/es/Avatar/props/defaultProps.js +14 -0
- package/es/Avatar/props/propTypes.js +23 -0
- package/es/AvatarTeam/AvatarTeam.js +4 -36
- package/es/AvatarTeam/props/defaultProps.js +13 -0
- package/es/AvatarTeam/props/propTypes.js +23 -0
- package/es/Button/Button.js +4 -47
- package/es/Button/props/defaultProps.js +15 -0
- package/es/Button/props/propTypes.js +22 -0
- package/es/Buttongroup/Buttongroup.js +4 -11
- package/es/Buttongroup/props/defaultProps.js +4 -0
- package/es/Buttongroup/props/propTypes.js +7 -0
- package/es/Card/Card.js +8 -61
- package/es/Card/props/defaultProps.js +15 -0
- package/es/Card/props/propTypes.js +43 -0
- package/es/CheckBox/CheckBox.js +4 -59
- package/es/CheckBox/props/defaultProps.js +18 -0
- package/es/CheckBox/props/propTypes.js +41 -0
- package/es/DateTime/CalendarView.js +6 -26
- package/es/DateTime/DateTime.js +4 -62
- package/es/DateTime/DateWidget.js +4 -83
- package/es/DateTime/YearView.js +4 -12
- package/es/DateTime/props/defaultProps.js +50 -0
- package/es/DateTime/props/propTypes.js +130 -0
- package/es/DropBox/DropBox.js +4 -71
- package/es/DropBox/props/defaultProps.js +20 -0
- package/es/DropBox/props/propTypes.js +47 -0
- package/es/DropDown/DropDown.js +7 -34
- package/es/DropDown/DropDownHeading.js +4 -19
- package/es/DropDown/DropDownItem.js +4 -18
- package/es/DropDown/DropDownSearch.js +4 -24
- package/es/DropDown/DropDownSeparator.js +2 -4
- package/es/DropDown/props/defaultProps.js +18 -0
- package/es/DropDown/props/propTypes.js +77 -0
- package/es/Heading/Heading.js +36 -0
- package/es/Heading/Heading.module.css +5 -0
- package/es/Heading/docs/Heading__default.docs.js +21 -0
- package/es/Heading/props/defaultProps.js +5 -0
- package/es/Heading/props/propTypes.js +11 -0
- package/es/Label/Label.js +4 -24
- package/es/Label/props/defaultProps.js +10 -0
- package/es/Label/props/propTypes.js +14 -0
- package/es/ListItem/ListContainer.js +4 -41
- package/es/ListItem/ListItem.js +4 -50
- package/es/ListItem/ListItemWithAvatar.js +4 -56
- package/es/ListItem/ListItemWithCheckBox.js +4 -40
- package/es/ListItem/ListItemWithIcon.js +4 -47
- package/es/ListItem/ListItemWithRadio.js +4 -41
- package/es/ListItem/props/defaultProps.js +85 -0
- package/es/ListItem/props/propTypes.js +185 -0
- package/es/Modal/Modal.js +4 -9
- package/es/Modal/props/defaultProps.js +3 -0
- package/es/Modal/props/propTypes.js +6 -0
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +4 -90
- package/es/MultiSelect/AdvancedMultiSelect.js +4 -113
- package/es/MultiSelect/EmptyState.js +4 -29
- package/es/MultiSelect/MultiSelect.js +4 -113
- package/es/MultiSelect/MultiSelectHeader.js +4 -12
- package/es/MultiSelect/MultiSelectWithAvatar.js +4 -99
- package/es/MultiSelect/SelectedOptions.js +4 -19
- package/es/MultiSelect/Suggestions.js +5 -34
- package/es/MultiSelect/props/defaultProps.js +140 -0
- package/es/MultiSelect/props/propTypes.js +360 -0
- package/es/PopOver/PopOver.js +7 -78
- package/es/PopOver/props/defaultProps.js +7 -0
- package/es/PopOver/props/propTypes.js +53 -0
- package/es/Radio/Radio.js +4 -46
- package/es/Radio/props/defaultProps.js +14 -0
- package/es/Radio/props/propTypes.js +32 -0
- package/es/Responsive/CustomResponsive.js +8 -19
- package/es/Responsive/Responsive.js +8 -23
- package/es/Responsive/props/defaultProps.js +13 -0
- package/es/Responsive/props/propTypes.js +25 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +4 -11
- package/es/ResponsiveDropBox/props/defaultProps.js +4 -0
- package/es/ResponsiveDropBox/props/propTypes.js +7 -0
- package/es/Ribbon/Ribbon.js +4 -25
- package/es/Ribbon/props/defaultProps.js +8 -0
- package/es/Ribbon/props/propTypes.js +10 -0
- package/es/RippleEffect/RippleEffect.js +4 -20
- package/es/RippleEffect/props/defaultProps.js +9 -0
- package/es/RippleEffect/props/propTypes.js +11 -0
- package/es/Select/GroupSelect.js +4 -109
- package/es/Select/Select.js +4 -120
- package/es/Select/SelectWithAvatar.js +4 -80
- package/es/Select/SelectWithIcon.js +4 -70
- package/es/Select/props/defaultProps.js +110 -0
- package/es/Select/props/propTypes.js +266 -0
- package/es/Stencils/Stencils.js +4 -17
- package/es/Stencils/props/defaultProps.js +6 -0
- package/es/Stencils/props/propTypes.js +7 -0
- package/es/Switch/Switch.js +4 -37
- package/es/Switch/props/defaultProps.js +10 -0
- package/es/Switch/props/propTypes.js +27 -0
- package/es/Tab/Tab.js +4 -31
- package/es/Tab/TabContent.js +4 -10
- package/es/Tab/TabContentWrapper.js +4 -12
- package/es/Tab/TabWrapper.js +4 -25
- package/es/Tab/Tabs.js +6 -68
- package/es/Tab/props/defaultProps.js +39 -0
- package/es/Tab/props/propTypes.js +102 -0
- package/es/Tag/Tag.js +4 -47
- package/es/Tag/props/defaultProps.js +13 -0
- package/es/Tag/props/propTypes.js +34 -0
- package/es/TextBox/TextBox.js +4 -72
- package/es/TextBox/props/defaultProps.js +19 -0
- package/es/TextBox/props/propTypes.js +53 -0
- package/es/TextBoxIcon/TextBoxIcon.js +4 -70
- package/es/TextBoxIcon/props/defaultProps.js +21 -0
- package/es/TextBoxIcon/props/propTypes.js +49 -0
- package/es/Textarea/Textarea.js +4 -47
- package/es/Textarea/props/defaultProps.js +16 -0
- package/es/Textarea/props/propTypes.js +31 -0
- package/es/Tooltip/Tooltip.js +4 -12
- package/es/Tooltip/props/defaultProps.js +4 -0
- package/es/Tooltip/props/propTypes.js +8 -0
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +4 -23
- package/es/VelocityAnimation/VelocityAnimation/props/defaultProps.js +7 -0
- package/es/VelocityAnimation/VelocityAnimation/props/propTypes.js +12 -0
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -37
- package/es/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +15 -0
- package/es/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +19 -0
- package/es/deprecated/PortalLayer/PortalLayer.js +4 -16
- package/es/deprecated/PortalLayer/props/defaultProps.js +5 -0
- package/es/deprecated/PortalLayer/props/propTypes.js +11 -0
- package/es/index.js +3 -1
- package/es/semantic/Button/Button.js +4 -38
- package/es/semantic/Button/props/defaultProps.js +12 -0
- package/es/semantic/Button/props/propTypes.js +26 -0
- package/lib/Accordion/Accordion.js +5 -20
- package/lib/Accordion/AccordionItem.js +5 -19
- package/lib/Accordion/props/defaultProps.js +16 -0
- package/lib/Accordion/props/propTypes.js +42 -0
- package/lib/Animation/Animation.js +5 -25
- package/lib/Animation/props/defaultProps.js +14 -0
- package/lib/Animation/props/propTypes.js +23 -0
- package/lib/AppContainer/AppContainer.js +5 -23
- package/lib/AppContainer/props/defaultProps.js +15 -0
- package/lib/AppContainer/props/propTypes.js +26 -0
- package/lib/Avatar/Avatar.js +31 -68
- package/lib/Avatar/Avatar.module.css +18 -0
- package/lib/Avatar/props/defaultProps.js +21 -0
- package/lib/Avatar/props/propTypes.js +34 -0
- package/lib/AvatarTeam/AvatarTeam.js +5 -36
- package/lib/AvatarTeam/props/defaultProps.js +20 -0
- package/lib/AvatarTeam/props/propTypes.js +34 -0
- package/lib/Button/Button.js +5 -48
- package/lib/Button/props/defaultProps.js +24 -0
- package/lib/Button/props/propTypes.js +33 -0
- package/lib/Buttongroup/Buttongroup.js +5 -11
- package/lib/Buttongroup/props/defaultProps.js +11 -0
- package/lib/Buttongroup/props/propTypes.js +18 -0
- package/lib/Card/Card.js +9 -61
- package/lib/Card/props/defaultProps.js +23 -0
- package/lib/Card/props/propTypes.js +57 -0
- package/lib/CheckBox/CheckBox.js +5 -59
- package/lib/CheckBox/props/defaultProps.js +25 -0
- package/lib/CheckBox/props/propTypes.js +52 -0
- package/lib/DateTime/CalendarView.js +7 -26
- package/lib/DateTime/DateTime.js +5 -62
- package/lib/DateTime/DateWidget.js +5 -83
- package/lib/DateTime/YearView.js +5 -12
- package/lib/DateTime/props/defaultProps.js +61 -0
- package/lib/DateTime/props/propTypes.js +145 -0
- package/lib/DropBox/DropBox.js +5 -71
- package/lib/DropBox/props/defaultProps.js +27 -0
- package/lib/DropBox/props/propTypes.js +58 -0
- package/lib/DropDown/DropDown.js +8 -34
- package/lib/DropDown/DropDownHeading.js +5 -19
- package/lib/DropDown/DropDownItem.js +5 -18
- package/lib/DropDown/DropDownSearch.js +5 -23
- package/lib/DropDown/DropDownSeparator.js +2 -4
- package/lib/DropDown/props/defaultProps.js +28 -0
- package/lib/DropDown/props/propTypes.js +94 -0
- package/lib/Heading/Heading.js +91 -0
- package/lib/Heading/Heading.module.css +5 -0
- package/lib/Heading/docs/Heading__default.docs.js +74 -0
- package/lib/Heading/props/defaultProps.js +12 -0
- package/lib/Heading/props/propTypes.js +22 -0
- package/lib/Label/Label.js +5 -24
- package/lib/Label/props/defaultProps.js +17 -0
- package/lib/Label/props/propTypes.js +25 -0
- package/lib/ListItem/ListContainer.js +6 -42
- package/lib/ListItem/ListItem.js +6 -51
- package/lib/ListItem/ListItemWithAvatar.js +6 -37
- package/lib/ListItem/ListItemWithCheckBox.js +6 -41
- package/lib/ListItem/ListItemWithIcon.js +6 -48
- package/lib/ListItem/ListItemWithRadio.js +6 -42
- package/lib/ListItem/props/defaultProps.js +97 -0
- package/lib/ListItem/props/propTypes.js +181 -0
- package/lib/Modal/Modal.js +5 -9
- package/lib/Modal/props/defaultProps.js +10 -0
- package/lib/Modal/props/propTypes.js +17 -0
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +5 -91
- package/lib/MultiSelect/AdvancedMultiSelect.js +5 -113
- package/lib/MultiSelect/EmptyState.js +5 -29
- package/lib/MultiSelect/MultiSelect.js +5 -113
- package/lib/MultiSelect/MultiSelectHeader.js +5 -12
- package/lib/MultiSelect/MultiSelectWithAvatar.js +5 -99
- package/lib/MultiSelect/SelectedOptions.js +5 -19
- package/lib/MultiSelect/Suggestions.js +6 -34
- package/lib/MultiSelect/props/defaultProps.js +156 -0
- package/lib/MultiSelect/props/propTypes.js +378 -0
- package/lib/PopOver/PopOver.js +8 -78
- package/lib/PopOver/props/defaultProps.js +15 -0
- package/lib/PopOver/props/propTypes.js +66 -0
- package/lib/Radio/Radio.js +5 -46
- package/lib/Radio/props/defaultProps.js +21 -0
- package/lib/Radio/props/propTypes.js +43 -0
- package/lib/Responsive/CustomResponsive.js +11 -21
- package/lib/Responsive/Responsive.js +17 -24
- package/lib/Responsive/props/defaultProps.js +23 -0
- package/lib/Responsive/props/propTypes.js +39 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +5 -11
- package/lib/ResponsiveDropBox/props/defaultProps.js +11 -0
- package/lib/ResponsiveDropBox/props/propTypes.js +18 -0
- package/lib/Ribbon/Ribbon.js +5 -25
- package/lib/Ribbon/props/defaultProps.js +15 -0
- package/lib/Ribbon/props/propTypes.js +21 -0
- package/lib/RippleEffect/RippleEffect.js +5 -20
- package/lib/RippleEffect/props/defaultProps.js +16 -0
- package/lib/RippleEffect/props/propTypes.js +22 -0
- package/lib/Select/GroupSelect.js +5 -109
- package/lib/Select/Select.js +5 -120
- package/lib/Select/SelectWithAvatar.js +5 -80
- package/lib/Select/SelectWithIcon.js +5 -60
- package/lib/Select/props/defaultProps.js +113 -0
- package/lib/Select/props/propTypes.js +280 -0
- package/lib/Stencils/Stencils.js +5 -17
- package/lib/Stencils/props/defaultProps.js +13 -0
- package/lib/Stencils/props/propTypes.js +18 -0
- package/lib/Switch/Switch.js +5 -37
- package/lib/Switch/props/defaultProps.js +17 -0
- package/lib/Switch/props/propTypes.js +38 -0
- package/lib/Tab/Tab.js +5 -31
- package/lib/Tab/TabContent.js +5 -10
- package/lib/Tab/TabContentWrapper.js +5 -12
- package/lib/Tab/TabWrapper.js +5 -27
- package/lib/Tab/Tabs.js +13 -70
- package/lib/Tab/props/defaultProps.js +50 -0
- package/lib/Tab/props/propTypes.js +117 -0
- package/lib/Tag/Tag.js +5 -47
- package/lib/Tag/props/defaultProps.js +20 -0
- package/lib/Tag/props/propTypes.js +45 -0
- package/lib/TextBox/TextBox.js +5 -70
- package/lib/TextBox/props/defaultProps.js +26 -0
- package/lib/TextBox/props/propTypes.js +62 -0
- package/lib/TextBoxIcon/TextBoxIcon.js +5 -70
- package/lib/TextBoxIcon/props/defaultProps.js +28 -0
- package/lib/TextBoxIcon/props/propTypes.js +60 -0
- package/lib/Textarea/Textarea.js +5 -47
- package/lib/Textarea/props/defaultProps.js +23 -0
- package/lib/Textarea/props/propTypes.js +42 -0
- package/lib/Tooltip/Tooltip.js +5 -12
- package/lib/Tooltip/props/defaultProps.js +11 -0
- package/lib/Tooltip/props/propTypes.js +19 -0
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +5 -23
- package/lib/VelocityAnimation/VelocityAnimation/props/defaultProps.js +14 -0
- package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +23 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +12 -38
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +22 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +30 -0
- package/lib/deprecated/PortalLayer/PortalLayer.js +5 -16
- package/lib/deprecated/PortalLayer/props/defaultProps.js +12 -0
- package/lib/deprecated/PortalLayer/props/propTypes.js +22 -0
- package/lib/index.js +19 -1
- package/lib/semantic/Button/Button.js +5 -38
- package/lib/semantic/Button/props/defaultProps.js +19 -0
- package/lib/semantic/Button/props/propTypes.js +37 -0
- package/package.json +2 -2
package/es/DateTime/YearView.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**** Libraries ****/
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { YearView_propTypes } from './props/propTypes';
|
|
4
|
+
import { YearView_defaultProps } from './props/defaultProps';
|
|
4
5
|
/**** Components ****/
|
|
5
6
|
|
|
6
7
|
import { Virtualizer } from '@zohodesk/virtualizer';
|
|
@@ -252,14 +253,5 @@ export default class YearView extends React.PureComponent {
|
|
|
252
253
|
}
|
|
253
254
|
|
|
254
255
|
}
|
|
255
|
-
YearView.propTypes =
|
|
256
|
-
|
|
257
|
-
needBorder: PropTypes.bool,
|
|
258
|
-
onSelectMonth: PropTypes.func,
|
|
259
|
-
onSelectYear: PropTypes.func,
|
|
260
|
-
viewedYear: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
261
|
-
};
|
|
262
|
-
YearView.defaultProps = {
|
|
263
|
-
dataId: 'dateContainer',
|
|
264
|
-
needBorder: true
|
|
265
|
-
};
|
|
256
|
+
YearView.propTypes = YearView_propTypes;
|
|
257
|
+
YearView.defaultProps = YearView_defaultProps;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export const CalendarView_defaultProps = {
|
|
2
|
+
dataId: 'dateContainer',
|
|
3
|
+
needBorder: true
|
|
4
|
+
};
|
|
5
|
+
export const Span_defaultProps = {
|
|
6
|
+
dataId: 'calendar-view'
|
|
7
|
+
};
|
|
8
|
+
export const DateTime_defaultProps = {
|
|
9
|
+
isDateTimeField: true,
|
|
10
|
+
dataId: 'dateTime',
|
|
11
|
+
needDefaultTime: true,
|
|
12
|
+
isAbsolute: true,
|
|
13
|
+
isAnimate: true,
|
|
14
|
+
needAction: true,
|
|
15
|
+
boxSize: 'large',
|
|
16
|
+
className: '',
|
|
17
|
+
innerClass: '',
|
|
18
|
+
dateFormat: 'dd/MM/yyyy',
|
|
19
|
+
isPadding: false,
|
|
20
|
+
i18nKeys: {},
|
|
21
|
+
is24Hour: false,
|
|
22
|
+
isDefaultPosition: false
|
|
23
|
+
};
|
|
24
|
+
export const DateWidget_defaultProps = {
|
|
25
|
+
borderColor: 'default',
|
|
26
|
+
dataId: 'dateWidget',
|
|
27
|
+
dateFormat: 'MM/dd/yyyy',
|
|
28
|
+
isDateTime: false,
|
|
29
|
+
isDisabled: false,
|
|
30
|
+
isPopupOpenOnEnter: false,
|
|
31
|
+
isReadOnly: false,
|
|
32
|
+
needBorder: true,
|
|
33
|
+
needDefaultTime: true,
|
|
34
|
+
placeholder: '-None-',
|
|
35
|
+
textBoxSize: 'medium',
|
|
36
|
+
textBoxVariant: 'default',
|
|
37
|
+
timeZone: null,
|
|
38
|
+
isPopupOpenOnClick: true,
|
|
39
|
+
isPopupCloseOnClick: false,
|
|
40
|
+
cantEditOnPopupOpen: true,
|
|
41
|
+
i18nKeys: {},
|
|
42
|
+
needErrorOnBlur: false,
|
|
43
|
+
isEditable: false,
|
|
44
|
+
iconOnHover: false,
|
|
45
|
+
is24Hour: false
|
|
46
|
+
};
|
|
47
|
+
export const YearView_defaultProps = {
|
|
48
|
+
dataId: 'dateContainer',
|
|
49
|
+
needBorder: true
|
|
50
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export const CalendarView_propTypes = {
|
|
3
|
+
dataId: PropTypes.string,
|
|
4
|
+
date: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
5
|
+
month: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
6
|
+
needBorder: PropTypes.bool,
|
|
7
|
+
onSelect: PropTypes.func,
|
|
8
|
+
year: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
9
|
+
};
|
|
10
|
+
export const Span_propTypes = {
|
|
11
|
+
dataId: PropTypes.string,
|
|
12
|
+
handleSelect: PropTypes.func,
|
|
13
|
+
i: PropTypes.number,
|
|
14
|
+
incremday: PropTypes.number,
|
|
15
|
+
isActive: PropTypes.bool,
|
|
16
|
+
tdclass: PropTypes.string,
|
|
17
|
+
userSeeMonth: PropTypes.number,
|
|
18
|
+
userSeeYear: PropTypes.number
|
|
19
|
+
};
|
|
20
|
+
export const DateTime_propTypes = {
|
|
21
|
+
boxSize: PropTypes.string,
|
|
22
|
+
className: PropTypes.string,
|
|
23
|
+
dataId: PropTypes.string,
|
|
24
|
+
dateFormat: PropTypes.string,
|
|
25
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
26
|
+
defaultTime: PropTypes.string,
|
|
27
|
+
getMethods: PropTypes.func,
|
|
28
|
+
getRef: PropTypes.func,
|
|
29
|
+
i18nKeys: PropTypes.shape({
|
|
30
|
+
timeText: PropTypes.string.isRequired,
|
|
31
|
+
submitText: PropTypes.string.isRequired,
|
|
32
|
+
cancelText: PropTypes.string.isRequired,
|
|
33
|
+
hourEmptyText: PropTypes.string.isRequired,
|
|
34
|
+
minuteEmptyText: PropTypes.string.isRequired,
|
|
35
|
+
nextMonthTitleText: PropTypes.string.isRequired,
|
|
36
|
+
prevMonthTitleText: PropTypes.string.isRequired
|
|
37
|
+
}),
|
|
38
|
+
innerClass: PropTypes.string,
|
|
39
|
+
isAbsolute: PropTypes.bool,
|
|
40
|
+
isActive: PropTypes.bool,
|
|
41
|
+
isAnimate: PropTypes.bool,
|
|
42
|
+
isDateTimeField: PropTypes.bool,
|
|
43
|
+
isPadding: PropTypes.bool,
|
|
44
|
+
isReady: PropTypes.bool,
|
|
45
|
+
max: PropTypes.string,
|
|
46
|
+
maxErrorText: PropTypes.string,
|
|
47
|
+
min: PropTypes.string,
|
|
48
|
+
minErrorText: PropTypes.string,
|
|
49
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
50
|
+
needAction: PropTypes.bool,
|
|
51
|
+
needDefaultTime: PropTypes.bool,
|
|
52
|
+
needResponsive: PropTypes.bool,
|
|
53
|
+
onChange: PropTypes.func,
|
|
54
|
+
onClear: PropTypes.func,
|
|
55
|
+
onClick: PropTypes.func,
|
|
56
|
+
onDateSelect: PropTypes.func,
|
|
57
|
+
onError: PropTypes.func,
|
|
58
|
+
onSelect: PropTypes.func,
|
|
59
|
+
position: PropTypes.string,
|
|
60
|
+
timeZone: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
|
61
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
62
|
+
is24Hour: PropTypes.bool,
|
|
63
|
+
isDefaultPosition: PropTypes.bool
|
|
64
|
+
};
|
|
65
|
+
export const DateWidget_propTypes = {
|
|
66
|
+
borderColor: PropTypes.oneOf(['transparent', 'default']),
|
|
67
|
+
cantEditOnPopupOpen: PropTypes.bool,
|
|
68
|
+
children: PropTypes.object,
|
|
69
|
+
className: PropTypes.string,
|
|
70
|
+
closePopupOnly: PropTypes.func,
|
|
71
|
+
dataId: PropTypes.string,
|
|
72
|
+
dateFormat: PropTypes.oneOf(['yyyy/MM/dd', 'MM/dd/yyyy', 'dd/MM/yyyy', 'yyyy-MM-dd', 'MM-dd-yyyy', 'dd-MM-yyyy', 'yyyy.MM.dd', 'MM.dd.yyyy', 'dd.MM.yyyy', 'dd/MMMM/YY', 'dd/MMM/YY']),
|
|
73
|
+
defaultPosition: PropTypes.oneOf(['top', 'bottom', 'right', 'left']),
|
|
74
|
+
defaultTime: PropTypes.string,
|
|
75
|
+
getContainerRef: PropTypes.func,
|
|
76
|
+
getMethods: PropTypes.func,
|
|
77
|
+
getRef: PropTypes.func,
|
|
78
|
+
getTargetRef: PropTypes.func,
|
|
79
|
+
i18nKeys: PropTypes.object,
|
|
80
|
+
id: PropTypes.string,
|
|
81
|
+
isDateTime: PropTypes.bool,
|
|
82
|
+
isDisabled: PropTypes.bool,
|
|
83
|
+
isEditable: PropTypes.bool,
|
|
84
|
+
isPopupCloseOnClick: PropTypes.bool,
|
|
85
|
+
isPopupOpen: PropTypes.bool,
|
|
86
|
+
isPopupOpenOnClick: PropTypes.bool,
|
|
87
|
+
isPopupOpenOnEnter: PropTypes.bool,
|
|
88
|
+
isPopupReady: PropTypes.bool,
|
|
89
|
+
isReadOnly: PropTypes.bool,
|
|
90
|
+
max: PropTypes.string,
|
|
91
|
+
maxErrorText: PropTypes.string,
|
|
92
|
+
min: PropTypes.string,
|
|
93
|
+
minErrorText: PropTypes.string,
|
|
94
|
+
needBorder: PropTypes.bool,
|
|
95
|
+
needDefaultTime: PropTypes.bool,
|
|
96
|
+
needErrorOnBlur: PropTypes.bool,
|
|
97
|
+
needResponsive: PropTypes.bool,
|
|
98
|
+
onFailValidation: PropTypes.func,
|
|
99
|
+
onKeyDown: PropTypes.func,
|
|
100
|
+
onPassValidation: PropTypes.func,
|
|
101
|
+
onSelect: PropTypes.func,
|
|
102
|
+
placeholder: PropTypes.string,
|
|
103
|
+
position: PropTypes.string,
|
|
104
|
+
removeClose: PropTypes.func,
|
|
105
|
+
textBoxSize: PropTypes.string,
|
|
106
|
+
textBoxVariant: PropTypes.string,
|
|
107
|
+
timeZone: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
|
108
|
+
togglePopup: PropTypes.func,
|
|
109
|
+
validation: PropTypes.shape({
|
|
110
|
+
validate: PropTypes.bool,
|
|
111
|
+
validateOn: PropTypes.string,
|
|
112
|
+
rulesOrder: PropTypes.arrayOf(PropTypes.string),
|
|
113
|
+
rules: PropTypes.object,
|
|
114
|
+
messages: PropTypes.object
|
|
115
|
+
}),
|
|
116
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
117
|
+
htmlId: PropTypes.string,
|
|
118
|
+
iconOnHover: PropTypes.bool,
|
|
119
|
+
is24Hour: PropTypes.bool,
|
|
120
|
+
isHideCurrentYear: PropTypes.bool,
|
|
121
|
+
onFocus: PropTypes.func,
|
|
122
|
+
onBlur: PropTypes.func
|
|
123
|
+
};
|
|
124
|
+
export const YearView_propTypes = {
|
|
125
|
+
dataId: PropTypes.string,
|
|
126
|
+
needBorder: PropTypes.bool,
|
|
127
|
+
onSelectMonth: PropTypes.func,
|
|
128
|
+
onSelectYear: PropTypes.func,
|
|
129
|
+
viewedYear: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
130
|
+
};
|
package/es/DropBox/DropBox.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React, { Fragment } from 'react';
|
|
4
|
-
import
|
|
4
|
+
import { defaultProps } from './props/defaultProps';
|
|
5
|
+
import { propTypes } from './props/propTypes';
|
|
5
6
|
import { remConvert } from '../utils/Common';
|
|
6
7
|
import Modal from '../Modal/Modal';
|
|
7
8
|
import style from './DropBox.module.css';
|
|
@@ -235,77 +236,9 @@ export default class DropBox extends React.Component {
|
|
|
235
236
|
}
|
|
236
237
|
|
|
237
238
|
}
|
|
238
|
-
DropBox.propTypes =
|
|
239
|
-
animationStyle: PropTypes.oneOf(['default', 'bounce']),
|
|
240
|
-
arrowBottom: PropTypes.number,
|
|
241
|
-
arrowLeft: PropTypes.number,
|
|
242
|
-
arrowPosition: PropTypes.oneOf(['start', 'mid', 'end']),
|
|
243
|
-
arrowRight: PropTypes.number,
|
|
244
|
-
arrowTop: PropTypes.number,
|
|
245
|
-
bottom: PropTypes.number,
|
|
246
|
-
boxPosition: PropTypes.oneOf(['bottomRight', 'bottomLeft', 'bottomCenter', 'topRight', 'topLeft', 'topCenter', 'rightTop', 'rightBottom', 'rightCenter', 'leftTop', 'leftBottom', 'leftCenter']),
|
|
247
|
-
children: PropTypes.element,
|
|
248
|
-
dataId: PropTypes.string,
|
|
249
|
-
forwardRef: PropTypes.object,
|
|
250
|
-
getRef: PropTypes.func,
|
|
251
|
-
isAbsolutePositioningNeeded: PropTypes.bool,
|
|
252
|
-
isActive: PropTypes.bool,
|
|
253
|
-
isAnimate: PropTypes.bool,
|
|
254
|
-
isArrow: PropTypes.bool,
|
|
255
|
-
isBoxPaddingNeed: PropTypes.bool,
|
|
256
|
-
isPadding: PropTypes.bool,
|
|
257
|
-
isRadius: PropTypes.bool,
|
|
258
|
-
left: PropTypes.number,
|
|
259
|
-
needResponsive: PropTypes.bool,
|
|
260
|
-
onClick: PropTypes.func,
|
|
261
|
-
right: PropTypes.number,
|
|
262
|
-
size: PropTypes.oneOf(['mini', 'xmini', 'xsmall', 'small', 'medium', 'large', 'mlarge', 'xlarge', 'xxlarge', 'default']),
|
|
263
|
-
top: PropTypes.number,
|
|
264
|
-
tourId: PropTypes.string,
|
|
265
|
-
htmlId: PropTypes.string,
|
|
266
|
-
tabIndex: PropTypes.number,
|
|
267
|
-
customClass: PropTypes.shape({
|
|
268
|
-
customDropBox: PropTypes.string,
|
|
269
|
-
customMobileDropBox: PropTypes.string,
|
|
270
|
-
customDropBoxWrap: PropTypes.string,
|
|
271
|
-
customMobileDropBoxWrap: PropTypes.string
|
|
272
|
-
}),
|
|
273
|
-
a11y: PropTypes.shape({
|
|
274
|
-
role: PropTypes.string,
|
|
275
|
-
ariaMultiselectable: PropTypes.bool,
|
|
276
|
-
ariaLabelledby: PropTypes.string
|
|
277
|
-
}),
|
|
278
|
-
palette: PropTypes.oneOf(['default', 'dark']),
|
|
279
|
-
needAutoZindex: PropTypes.bool,
|
|
280
|
-
portalId: PropTypes.string,
|
|
281
|
-
isRestrictScroll: PropTypes.bool,
|
|
282
|
-
customStyle: PropTypes.object
|
|
283
|
-
};
|
|
284
|
-
DropBox.contextTypes = {
|
|
285
|
-
direction: PropTypes.string,
|
|
286
|
-
isReducedMotion: PropTypes.bool
|
|
287
|
-
};
|
|
239
|
+
DropBox.propTypes = propTypes;
|
|
288
240
|
DropBox.contextType = LibraryContext;
|
|
289
|
-
DropBox.defaultProps =
|
|
290
|
-
animationStyle: 'default',
|
|
291
|
-
boxPosition: 'bottomLeft',
|
|
292
|
-
dataId: 'dropBox',
|
|
293
|
-
isActive: false,
|
|
294
|
-
isAnimate: false,
|
|
295
|
-
isArrow: true,
|
|
296
|
-
isRadius: true,
|
|
297
|
-
size: 'default',
|
|
298
|
-
needResponsive: true,
|
|
299
|
-
isAbsolutePositioningNeeded: true,
|
|
300
|
-
isBoxPaddingNeed: false,
|
|
301
|
-
isPadding: true,
|
|
302
|
-
customClass: {},
|
|
303
|
-
a11y: {},
|
|
304
|
-
palette: 'default',
|
|
305
|
-
needAutoZindex: true,
|
|
306
|
-
portalId: 'portal1',
|
|
307
|
-
isRestrictScroll: false
|
|
308
|
-
};
|
|
241
|
+
DropBox.defaultProps = defaultProps;
|
|
309
242
|
|
|
310
243
|
if (false) {
|
|
311
244
|
DropBox.docs = {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const defaultProps = {
|
|
2
|
+
animationStyle: 'default',
|
|
3
|
+
boxPosition: 'bottomLeft',
|
|
4
|
+
dataId: 'dropBox',
|
|
5
|
+
isActive: false,
|
|
6
|
+
isAnimate: false,
|
|
7
|
+
isArrow: true,
|
|
8
|
+
isRadius: true,
|
|
9
|
+
size: 'default',
|
|
10
|
+
needResponsive: true,
|
|
11
|
+
isAbsolutePositioningNeeded: true,
|
|
12
|
+
isBoxPaddingNeed: false,
|
|
13
|
+
isPadding: true,
|
|
14
|
+
customClass: {},
|
|
15
|
+
a11y: {},
|
|
16
|
+
palette: 'default',
|
|
17
|
+
needAutoZindex: true,
|
|
18
|
+
portalId: 'portal1',
|
|
19
|
+
isRestrictScroll: false
|
|
20
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export const propTypes = {
|
|
3
|
+
animationStyle: PropTypes.oneOf(['default', 'bounce']),
|
|
4
|
+
arrowBottom: PropTypes.number,
|
|
5
|
+
arrowLeft: PropTypes.number,
|
|
6
|
+
arrowPosition: PropTypes.oneOf(['start', 'mid', 'end']),
|
|
7
|
+
arrowRight: PropTypes.number,
|
|
8
|
+
arrowTop: PropTypes.number,
|
|
9
|
+
bottom: PropTypes.number,
|
|
10
|
+
boxPosition: PropTypes.oneOf(['bottomRight', 'bottomLeft', 'bottomCenter', 'topRight', 'topLeft', 'topCenter', 'rightTop', 'rightBottom', 'rightCenter', 'leftTop', 'leftBottom', 'leftCenter']),
|
|
11
|
+
children: PropTypes.element,
|
|
12
|
+
dataId: PropTypes.string,
|
|
13
|
+
forwardRef: PropTypes.object,
|
|
14
|
+
getRef: PropTypes.func,
|
|
15
|
+
isAbsolutePositioningNeeded: PropTypes.bool,
|
|
16
|
+
isActive: PropTypes.bool,
|
|
17
|
+
isAnimate: PropTypes.bool,
|
|
18
|
+
isArrow: PropTypes.bool,
|
|
19
|
+
isBoxPaddingNeed: PropTypes.bool,
|
|
20
|
+
isPadding: PropTypes.bool,
|
|
21
|
+
isRadius: PropTypes.bool,
|
|
22
|
+
left: PropTypes.number,
|
|
23
|
+
needResponsive: PropTypes.bool,
|
|
24
|
+
onClick: PropTypes.func,
|
|
25
|
+
right: PropTypes.number,
|
|
26
|
+
size: PropTypes.oneOf(['mini', 'xmini', 'xsmall', 'small', 'medium', 'large', 'mlarge', 'xlarge', 'xxlarge', 'default']),
|
|
27
|
+
top: PropTypes.number,
|
|
28
|
+
tourId: PropTypes.string,
|
|
29
|
+
htmlId: PropTypes.string,
|
|
30
|
+
tabIndex: PropTypes.number,
|
|
31
|
+
customClass: PropTypes.shape({
|
|
32
|
+
customDropBox: PropTypes.string,
|
|
33
|
+
customMobileDropBox: PropTypes.string,
|
|
34
|
+
customDropBoxWrap: PropTypes.string,
|
|
35
|
+
customMobileDropBoxWrap: PropTypes.string
|
|
36
|
+
}),
|
|
37
|
+
a11y: PropTypes.shape({
|
|
38
|
+
role: PropTypes.string,
|
|
39
|
+
ariaMultiselectable: PropTypes.bool,
|
|
40
|
+
ariaLabelledby: PropTypes.string
|
|
41
|
+
}),
|
|
42
|
+
palette: PropTypes.oneOf(['default', 'dark']),
|
|
43
|
+
needAutoZindex: PropTypes.bool,
|
|
44
|
+
portalId: PropTypes.string,
|
|
45
|
+
isRestrictScroll: PropTypes.bool,
|
|
46
|
+
customStyle: PropTypes.object
|
|
47
|
+
};
|
package/es/DropDown/DropDown.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { DropDown_propTypes, DropDownTarget_propTypes, DropDownContainer_propTypes, DropDownItemContainer_propTypes } from './props/propTypes';
|
|
3
|
+
import { DropDownItemContainer_defaultProps } from './props/defaultProps';
|
|
3
4
|
import style from './DropDown.module.css';
|
|
4
5
|
import PopOver, { PopOverTarget, PopOverContainer } from '../PopOver/PopOver';
|
|
5
6
|
/* eslint css-modules/no-unused-class: [2, { markAsUsed: ['dropdown', 'shadow', 'target', 'menu', 'header', 'headertext', 'list', 'padding', 'listHover', 'active', 'children', 'user', 'footer', 'separator', 'small', 'search', 'medium', 'heading'] }] */
|
|
@@ -13,24 +14,7 @@ export default class DropDown extends React.Component {
|
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
}
|
|
16
|
-
DropDown.propTypes =
|
|
17
|
-
arrowBottom: PropTypes.string,
|
|
18
|
-
arrowLeft: PropTypes.string,
|
|
19
|
-
arrowPosition: PropTypes.string,
|
|
20
|
-
arrowRight: PropTypes.string,
|
|
21
|
-
arrowTop: PropTypes.string,
|
|
22
|
-
bottom: PropTypes.string,
|
|
23
|
-
boxPosition: PropTypes.string,
|
|
24
|
-
children: PropTypes.node,
|
|
25
|
-
isAnimate: PropTypes.bool,
|
|
26
|
-
isArrow: PropTypes.bool,
|
|
27
|
-
isPopupOpen: PropTypes.bool,
|
|
28
|
-
left: PropTypes.string,
|
|
29
|
-
onClick: PropTypes.func,
|
|
30
|
-
right: PropTypes.string,
|
|
31
|
-
size: PropTypes.string,
|
|
32
|
-
top: PropTypes.string
|
|
33
|
-
};
|
|
17
|
+
DropDown.propTypes = DropDown_propTypes;
|
|
34
18
|
|
|
35
19
|
if (false) {
|
|
36
20
|
DropDown.docs = {
|
|
@@ -48,9 +32,7 @@ export class DropDownTarget extends React.Component {
|
|
|
48
32
|
}
|
|
49
33
|
|
|
50
34
|
}
|
|
51
|
-
DropDownTarget.propTypes =
|
|
52
|
-
children: PropTypes.node
|
|
53
|
-
};
|
|
35
|
+
DropDownTarget.propTypes = DropDownTarget_propTypes;
|
|
54
36
|
export class DropDownContainer extends React.Component {
|
|
55
37
|
render() {
|
|
56
38
|
let {
|
|
@@ -60,9 +42,7 @@ export class DropDownContainer extends React.Component {
|
|
|
60
42
|
}
|
|
61
43
|
|
|
62
44
|
}
|
|
63
|
-
DropDownContainer.propTypes =
|
|
64
|
-
children: PropTypes.node
|
|
65
|
-
};
|
|
45
|
+
DropDownContainer.propTypes = DropDownContainer_propTypes;
|
|
66
46
|
export class DropDownItemContainer extends React.Component {
|
|
67
47
|
constructor(props) {
|
|
68
48
|
super(props);
|
|
@@ -98,12 +78,5 @@ export class DropDownItemContainer extends React.Component {
|
|
|
98
78
|
}
|
|
99
79
|
|
|
100
80
|
}
|
|
101
|
-
DropDownItemContainer.propTypes =
|
|
102
|
-
|
|
103
|
-
dataId: PropTypes.string,
|
|
104
|
-
getRef: PropTypes.func,
|
|
105
|
-
onScroll: PropTypes.func
|
|
106
|
-
};
|
|
107
|
-
DropDownItemContainer.defaultProps = {
|
|
108
|
-
dataId: 'drpdwnItemContainer'
|
|
109
|
-
};
|
|
81
|
+
DropDownItemContainer.propTypes = DropDownItemContainer_propTypes;
|
|
82
|
+
DropDownItemContainer.defaultProps = DropDownItemContainer_defaultProps;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { DropDownHeading_propTypes } from './props/propTypes';
|
|
3
|
+
import { DropDownHeading_defaultProps } from './props/defaultProps';
|
|
3
4
|
import style from './DropDownHeading.module.css';
|
|
4
5
|
export default class DropDownHeading extends React.Component {
|
|
5
6
|
render() {
|
|
@@ -27,24 +28,8 @@ export default class DropDownHeading extends React.Component {
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
}
|
|
30
|
-
DropDownHeading.propTypes =
|
|
31
|
-
|
|
32
|
-
customClass: PropTypes.string,
|
|
33
|
-
palette: PropTypes.oneOf(['light', 'dark']),
|
|
34
|
-
text: PropTypes.string,
|
|
35
|
-
title: PropTypes.string,
|
|
36
|
-
htmlId: PropTypes.string,
|
|
37
|
-
a11y: PropTypes.shape({
|
|
38
|
-
role: PropTypes.string,
|
|
39
|
-
ariaLabelledby: PropTypes.string
|
|
40
|
-
})
|
|
41
|
-
};
|
|
42
|
-
DropDownHeading.defaultProps = {
|
|
43
|
-
customClass: '',
|
|
44
|
-
children: null,
|
|
45
|
-
palette: 'light',
|
|
46
|
-
a11y: {}
|
|
47
|
-
};
|
|
31
|
+
DropDownHeading.propTypes = DropDownHeading_propTypes;
|
|
32
|
+
DropDownHeading.defaultProps = DropDownHeading_defaultProps;
|
|
48
33
|
|
|
49
34
|
if (false) {
|
|
50
35
|
DropDownHeading.docs = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { DropDownItem_propTypes } from './props/propTypes';
|
|
3
|
+
import { DropDownItem_defaultProps } from './props/defaultProps';
|
|
3
4
|
import style from './DropDownItem.module.css';
|
|
4
5
|
export default class DropDownItem extends React.Component {
|
|
5
6
|
constructor(props) {
|
|
@@ -70,20 +71,5 @@ export default class DropDownItem extends React.Component {
|
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
}
|
|
73
|
-
DropDownItem.propTypes =
|
|
74
|
-
|
|
75
|
-
children: PropTypes.node,
|
|
76
|
-
dataId: PropTypes.string,
|
|
77
|
-
getRef: PropTypes.func,
|
|
78
|
-
hightlight: PropTypes.bool,
|
|
79
|
-
id: PropTypes.string,
|
|
80
|
-
index: PropTypes.number,
|
|
81
|
-
onClick: PropTypes.func,
|
|
82
|
-
onHover: PropTypes.func,
|
|
83
|
-
value: PropTypes.string,
|
|
84
|
-
customClass: PropTypes.string
|
|
85
|
-
};
|
|
86
|
-
DropDownItem.defaultProps = {
|
|
87
|
-
active: false,
|
|
88
|
-
dataId: 'dropDwnItemContainer'
|
|
89
|
-
};
|
|
74
|
+
DropDownItem.propTypes = DropDownItem_propTypes;
|
|
75
|
+
DropDownItem.defaultProps = DropDownItem_defaultProps;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { DropDownSearch_propTypes } from './props/propTypes';
|
|
3
|
+
import { DropDownSearch_defaultProps } from './props/defaultProps';
|
|
3
4
|
import TextBox from '../TextBox/TextBox';
|
|
4
5
|
import style from './DropDownSearch.module.css';
|
|
5
6
|
/* eslint css-modules/no-unused-class: [2, { markAsUsed: ['dropdown', 'menu', 'shadow', 'target', 'header', 'headertext', 'list', 'padding', 'listHover', 'active', 'children', 'user', 'footer', separator, 'small', 'search', 'medium', 'heading', 'listGroup'] }] */
|
|
@@ -60,26 +61,5 @@ export default class DropDownSearch extends React.Component {
|
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
}
|
|
63
|
-
DropDownSearch.defaultProps =
|
|
64
|
-
|
|
65
|
-
textBoxSize: 'medium',
|
|
66
|
-
customClass: {}
|
|
67
|
-
};
|
|
68
|
-
DropDownSearch.propTypes = {
|
|
69
|
-
getRef: PropTypes.func,
|
|
70
|
-
id: PropTypes.string,
|
|
71
|
-
maxLength: PropTypes.string,
|
|
72
|
-
name: PropTypes.string,
|
|
73
|
-
onBlur: PropTypes.func,
|
|
74
|
-
onChange: PropTypes.func,
|
|
75
|
-
onKeyDown: PropTypes.func,
|
|
76
|
-
placeHolder: PropTypes.string,
|
|
77
|
-
placeHolder: PropTypes.string,
|
|
78
|
-
size: PropTypes.oneOf(['small', 'medium']),
|
|
79
|
-
textBoxSize: PropTypes.string,
|
|
80
|
-
value: PropTypes.string,
|
|
81
|
-
customClass: PropTypes.shape({
|
|
82
|
-
searchClass: PropTypes.string,
|
|
83
|
-
customTextBox: PropTypes.string
|
|
84
|
-
})
|
|
85
|
-
};
|
|
64
|
+
DropDownSearch.defaultProps = DropDownSearch_defaultProps;
|
|
65
|
+
DropDownSearch.propTypes = DropDownSearch_propTypes;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { DropDownSeparator_propTypes } from './props/propTypes';
|
|
3
3
|
import style from './DropDownSeparator.module.css';
|
|
4
4
|
export default class DropDownSeparator extends React.Component {
|
|
5
5
|
render() {
|
|
@@ -12,6 +12,4 @@ export default class DropDownSeparator extends React.Component {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
}
|
|
15
|
-
DropDownSeparator.propTypes =
|
|
16
|
-
customClass: PropTypes.string
|
|
17
|
-
};
|
|
15
|
+
DropDownSeparator.propTypes = DropDownSeparator_propTypes;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const DropDownItemContainer_defaultProps = {
|
|
2
|
+
dataId: 'drpdwnItemContainer'
|
|
3
|
+
};
|
|
4
|
+
export const DropDownHeading_defaultProps = {
|
|
5
|
+
customClass: '',
|
|
6
|
+
children: null,
|
|
7
|
+
palette: 'light',
|
|
8
|
+
a11y: {}
|
|
9
|
+
};
|
|
10
|
+
export const DropDownItem_defaultProps = {
|
|
11
|
+
active: false,
|
|
12
|
+
dataId: 'dropDwnItemContainer'
|
|
13
|
+
};
|
|
14
|
+
export const DropDownSearch_defaultProps = {
|
|
15
|
+
size: 'medium',
|
|
16
|
+
textBoxSize: 'medium',
|
|
17
|
+
customClass: {}
|
|
18
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export const DropDown_propTypes = {
|
|
3
|
+
arrowBottom: PropTypes.string,
|
|
4
|
+
arrowLeft: PropTypes.string,
|
|
5
|
+
arrowPosition: PropTypes.string,
|
|
6
|
+
arrowRight: PropTypes.string,
|
|
7
|
+
arrowTop: PropTypes.string,
|
|
8
|
+
bottom: PropTypes.string,
|
|
9
|
+
boxPosition: PropTypes.string,
|
|
10
|
+
children: PropTypes.node,
|
|
11
|
+
isAnimate: PropTypes.bool,
|
|
12
|
+
isArrow: PropTypes.bool,
|
|
13
|
+
isPopupOpen: PropTypes.bool,
|
|
14
|
+
left: PropTypes.string,
|
|
15
|
+
onClick: PropTypes.func,
|
|
16
|
+
right: PropTypes.string,
|
|
17
|
+
size: PropTypes.string,
|
|
18
|
+
top: PropTypes.string
|
|
19
|
+
};
|
|
20
|
+
export const DropDownTarget_propTypes = {
|
|
21
|
+
children: PropTypes.node
|
|
22
|
+
};
|
|
23
|
+
export const DropDownContainer_propTypes = {
|
|
24
|
+
children: PropTypes.node
|
|
25
|
+
};
|
|
26
|
+
export const DropDownItemContainer_propTypes = {
|
|
27
|
+
children: PropTypes.node,
|
|
28
|
+
dataId: PropTypes.string,
|
|
29
|
+
getRef: PropTypes.func,
|
|
30
|
+
onScroll: PropTypes.func
|
|
31
|
+
};
|
|
32
|
+
export const DropDownHeading_propTypes = {
|
|
33
|
+
children: PropTypes.node,
|
|
34
|
+
customClass: PropTypes.string,
|
|
35
|
+
palette: PropTypes.oneOf(['light', 'dark']),
|
|
36
|
+
text: PropTypes.string,
|
|
37
|
+
title: PropTypes.string,
|
|
38
|
+
htmlId: PropTypes.string,
|
|
39
|
+
a11y: PropTypes.shape({
|
|
40
|
+
role: PropTypes.string,
|
|
41
|
+
ariaLabelledby: PropTypes.string
|
|
42
|
+
})
|
|
43
|
+
};
|
|
44
|
+
export const DropDownItem_propTypes = {
|
|
45
|
+
active: PropTypes.bool,
|
|
46
|
+
children: PropTypes.node,
|
|
47
|
+
dataId: PropTypes.string,
|
|
48
|
+
getRef: PropTypes.func,
|
|
49
|
+
hightlight: PropTypes.bool,
|
|
50
|
+
id: PropTypes.string,
|
|
51
|
+
index: PropTypes.number,
|
|
52
|
+
onClick: PropTypes.func,
|
|
53
|
+
onHover: PropTypes.func,
|
|
54
|
+
value: PropTypes.string,
|
|
55
|
+
customClass: PropTypes.string
|
|
56
|
+
};
|
|
57
|
+
export const DropDownSearch_propTypes = {
|
|
58
|
+
getRef: PropTypes.func,
|
|
59
|
+
id: PropTypes.string,
|
|
60
|
+
maxLength: PropTypes.string,
|
|
61
|
+
name: PropTypes.string,
|
|
62
|
+
onBlur: PropTypes.func,
|
|
63
|
+
onChange: PropTypes.func,
|
|
64
|
+
onKeyDown: PropTypes.func,
|
|
65
|
+
placeHolder: PropTypes.string,
|
|
66
|
+
placeHolder: PropTypes.string,
|
|
67
|
+
size: PropTypes.oneOf(['small', 'medium']),
|
|
68
|
+
textBoxSize: PropTypes.string,
|
|
69
|
+
value: PropTypes.string,
|
|
70
|
+
customClass: PropTypes.shape({
|
|
71
|
+
searchClass: PropTypes.string,
|
|
72
|
+
customTextBox: PropTypes.string
|
|
73
|
+
})
|
|
74
|
+
};
|
|
75
|
+
export const DropDownSeparator_propTypes = {
|
|
76
|
+
customClass: PropTypes.string
|
|
77
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { defaultProps } from './props/defaultProps';
|
|
3
|
+
import { propTypes } from './props/propTypes';
|
|
4
|
+
import style from './Heading.module.css';
|
|
5
|
+
export default class Heading extends React.Component {
|
|
6
|
+
render() {
|
|
7
|
+
let {
|
|
8
|
+
tagName,
|
|
9
|
+
className,
|
|
10
|
+
onClick,
|
|
11
|
+
onDoubleClick,
|
|
12
|
+
title,
|
|
13
|
+
dataTitle,
|
|
14
|
+
dataId,
|
|
15
|
+
a11y
|
|
16
|
+
} = this.props;
|
|
17
|
+
return /*#__PURE__*/React.createElement(tagName, {
|
|
18
|
+
className: `${style.reset} ${className}`,
|
|
19
|
+
onClick,
|
|
20
|
+
onDoubleClick,
|
|
21
|
+
'data-title': dataTitle || title,
|
|
22
|
+
'data-id': dataId,
|
|
23
|
+
...a11y
|
|
24
|
+
}, title);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
Heading.propTypes = propTypes;
|
|
29
|
+
Heading.defaultProps = defaultProps;
|
|
30
|
+
|
|
31
|
+
if (false) {
|
|
32
|
+
Heading.docs = {
|
|
33
|
+
folderName: 'Style Guide',
|
|
34
|
+
componentGroup: 'Accessibility'
|
|
35
|
+
};
|
|
36
|
+
}
|