@zohodesk/components 1.0.0-test-252 → 1.0.0
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 +161 -1
- package/assets/Appearance/dark/mode/darkMode.module.css +181 -179
- package/assets/Appearance/dark/themes/blue/blueDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/dark/themes/blue/blueDarkCTATheme.module.css +31 -31
- package/assets/Appearance/dark/themes/blue/blueDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/dark/themes/green/greenDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/dark/themes/green/greenDarkCTATheme.module.css +30 -30
- package/assets/Appearance/dark/themes/green/greenDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/dark/themes/orange/orangeDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/dark/themes/orange/orangeDarkCTATheme.module.css +30 -30
- package/assets/Appearance/dark/themes/orange/orangeDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/dark/themes/red/redDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/dark/themes/red/redDarkCTATheme.module.css +30 -30
- package/assets/Appearance/dark/themes/red/redDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/dark/themes/yellow/yellowDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/dark/themes/yellow/yellowDarkCTATheme.module.css +30 -30
- package/assets/Appearance/dark/themes/yellow/yellowDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/default/mode/defaultMode.module.css +177 -175
- package/assets/Appearance/default/themes/blue/blueDefaultCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/default/themes/blue/blueDefaultCTATheme.module.css +31 -31
- package/assets/Appearance/default/themes/blue/blueDefaultComponentTheme.module.css +3 -0
- package/assets/Appearance/default/themes/green/greenDefaultCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/default/themes/green/greenDefaultCTATheme.module.css +30 -30
- package/assets/Appearance/default/themes/green/greenDefaultComponentTheme.module.css +3 -0
- package/assets/Appearance/default/themes/orange/orangeDefaultCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/default/themes/orange/orangeDefaultCTATheme.module.css +30 -30
- package/assets/Appearance/default/themes/orange/orangeDefaultComponentTheme.module.css +3 -0
- package/assets/Appearance/default/themes/red/redDefaultCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/default/themes/red/redDefaultCTATheme.module.css +30 -30
- package/assets/Appearance/default/themes/red/redDefaultComponentTheme.module.css +3 -0
- package/assets/Appearance/default/themes/yellow/yellowDefaultCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/default/themes/yellow/yellowDefaultCTATheme.module.css +30 -30
- package/assets/Appearance/default/themes/yellow/yellowDefaultComponentTheme.module.css +3 -0
- package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +182 -180
- package/assets/Appearance/pureDark/themes/blue/bluePureDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/pureDark/themes/blue/bluePureDarkCTATheme.module.css +31 -31
- package/assets/Appearance/pureDark/themes/blue/bluePureDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/pureDark/themes/green/greenPureDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/pureDark/themes/green/greenPureDarkCTATheme.module.css +30 -30
- package/assets/Appearance/pureDark/themes/green/greenPureDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/pureDark/themes/orange/orangePureDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/pureDark/themes/orange/orangePureDarkCTATheme.module.css +30 -30
- package/assets/Appearance/pureDark/themes/orange/orangePureDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/pureDark/themes/red/redPureDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/pureDark/themes/red/redPureDarkCTATheme.module.css +30 -30
- package/assets/Appearance/pureDark/themes/red/redPureDarkComponentTheme.module.css +3 -0
- package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkCTATheme.module.css +30 -30
- package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkComponentTheme.module.css +3 -0
- package/assets/Contrast/darkContrastLightness.module.css +39 -0
- package/assets/Contrast/defaultContrastLightness.module.css +39 -0
- package/assets/Contrast/pureDarkContrastLightness.module.css +39 -0
- package/css_error.log +1 -0
- package/es/Accordion/Accordion.js +19 -9
- package/es/Accordion/AccordionItem.js +13 -8
- package/es/Accordion/props/defaultProps.js +6 -2
- package/es/Accordion/props/propTypes.js +3 -0
- package/es/Animation/Animation.js +10 -9
- package/es/AppContainer/AppContainer.js +38 -15
- package/es/AppContainer/AppContainer.module.css +2 -2
- package/es/AppContainer/props/defaultProps.js +3 -1
- package/es/AppContainer/props/propTypes.js +2 -0
- package/es/Avatar/Avatar.js +48 -25
- package/es/Avatar/Avatar.module.css +59 -18
- package/es/Avatar/props/defaultProps.js +4 -1
- package/es/Avatar/props/propTypes.js +5 -2
- package/es/AvatarTeam/AvatarTeam.js +21 -11
- package/es/AvatarTeam/AvatarTeam.module.css +49 -21
- package/es/AvatarTeam/props/defaultProps.js +5 -1
- package/es/AvatarTeam/props/propTypes.js +5 -1
- package/es/Button/Button.js +55 -51
- package/{lib/Button → es/Button/css}/Button.module.css +62 -58
- package/es/Button/css/cssJSLogic.js +53 -0
- package/es/Button/index.js +2 -0
- package/es/Button/props/defaultProps.js +3 -1
- package/es/Button/props/propTypes.js +6 -2
- package/es/Buttongroup/Buttongroup.js +24 -16
- package/es/Buttongroup/Buttongroup.module.css +45 -28
- package/es/Buttongroup/props/defaultProps.js +3 -1
- package/es/Buttongroup/props/propTypes.js +3 -1
- package/es/Card/Card.js +48 -26
- package/es/Card/props/defaultProps.js +12 -2
- package/es/Card/props/propTypes.js +2 -2
- package/es/CheckBox/CheckBox.js +13 -9
- package/es/CheckBox/CheckBox.module.css +16 -16
- package/es/CheckBox/props/propTypes.js +1 -0
- package/es/DateTime/CalendarView.js +46 -19
- package/es/DateTime/DateTime.js +139 -77
- package/es/DateTime/DateTime.module.css +51 -48
- package/es/DateTime/DateTimePopupFooter.js +4 -2
- package/es/DateTime/DateTimePopupHeader.js +30 -11
- package/es/DateTime/DateWidget.js +122 -51
- package/es/DateTime/DateWidget.module.css +5 -5
- package/es/DateTime/DaysRow.js +6 -3
- package/es/DateTime/Time.js +10 -2
- package/es/DateTime/YearView.js +41 -9
- package/es/DateTime/YearView.module.css +33 -15
- package/es/DateTime/__tests__/CalendarView.spec.js +1 -0
- package/es/DateTime/__tests__/DateTime.spec.js +1 -0
- package/es/DateTime/__tests__/DateWidget.spec.js +2 -3
- package/es/DateTime/common.js +3 -0
- package/es/DateTime/constants.js +1 -0
- package/es/DateTime/dateFormatUtils/dateFormat.js +63 -30
- package/es/DateTime/dateFormatUtils/dateFormats.js +42 -0
- package/es/DateTime/dateFormatUtils/dayChange.js +13 -4
- package/es/DateTime/dateFormatUtils/index.js +59 -2
- package/es/DateTime/dateFormatUtils/monthChange.js +8 -0
- package/es/DateTime/dateFormatUtils/timeChange.js +22 -6
- package/es/DateTime/dateFormatUtils/yearChange.js +11 -2
- package/es/DateTime/index.js +1 -1
- package/es/DateTime/objectUtils.js +14 -20
- package/es/DateTime/props/defaultProps.js +2 -1
- package/es/DateTime/props/propTypes.js +5 -2
- package/es/DateTime/typeChecker.js +3 -0
- package/es/DateTime/validator.js +58 -6
- package/es/DropBox/DropBox.js +82 -218
- package/es/DropBox/DropBoxElement/DropBoxElement.js +132 -0
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +435 -0
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +91 -0
- package/es/DropBox/DropBoxElement/props/defaultProps.js +18 -0
- package/es/DropBox/DropBoxElement/props/propTypes.js +45 -0
- package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +54 -0
- package/es/DropBox/__tests__/DropBox.spec.js +2 -2
- package/es/DropBox/css/DropBox.module.css +59 -0
- package/es/DropBox/css/cssJSLogic.js +14 -0
- package/es/DropBox/props/defaultProps.js +9 -15
- package/es/DropBox/props/propTypes.js +9 -41
- package/es/DropDown/DropDown.js +16 -9
- package/es/DropDown/DropDown.module.css +2 -2
- package/es/DropDown/DropDownHeading.js +18 -11
- package/es/DropDown/DropDownHeading.module.css +3 -3
- package/es/DropDown/DropDownItem.js +8 -1
- package/es/DropDown/DropDownItem.module.css +9 -9
- package/es/DropDown/DropDownSearch.js +4 -0
- package/es/DropDown/DropDownSeparator.js +1 -0
- package/es/DropDown/DropDownSeparator.module.css +2 -2
- package/es/DropDown/__tests__/DropDown.spec.js +1 -2
- package/es/DropDown/index.js +7 -0
- package/es/DropDown/props/defaultProps.js +3 -1
- package/es/DropDown/props/propTypes.js +2 -1
- package/es/Heading/Heading.js +8 -7
- package/es/Heading/Heading.module.css +2 -2
- package/es/Label/Label.js +14 -9
- package/es/Label/Label.module.css +1 -1
- package/es/Label/props/defaultProps.js +2 -1
- package/es/Label/props/propTypes.js +1 -0
- package/es/Layout/Box.js +19 -4
- package/es/Layout/Container.js +18 -5
- package/es/Layout/Layout.module.css +15 -15
- package/es/Layout/index.js +9 -10
- package/es/Layout/props/defaultProps.js +6 -2
- package/es/Layout/props/propTypes.js +7 -3
- package/es/Layout/utils.js +5 -1
- package/es/ListItem/ListContainer.js +21 -9
- package/es/ListItem/ListItem.js +30 -14
- package/es/ListItem/ListItem.module.css +37 -30
- package/es/ListItem/ListItemWithAvatar.js +30 -15
- package/es/ListItem/ListItemWithCheckBox.js +22 -10
- package/es/ListItem/ListItemWithIcon.js +29 -14
- package/es/ListItem/ListItemWithRadio.js +22 -10
- package/es/ListItem/index.js +6 -0
- package/es/ListItem/props/defaultProps.js +18 -6
- package/es/ListItem/props/propTypes.js +13 -1
- package/es/Modal/Modal.js +35 -17
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +100 -20
- package/es/MultiSelect/AdvancedMultiSelect.js +45 -19
- package/es/MultiSelect/EmptyState.js +6 -0
- package/es/MultiSelect/MultiSelect.js +129 -46
- package/es/MultiSelect/MultiSelect.module.css +32 -31
- package/es/MultiSelect/MultiSelectHeader.js +3 -0
- package/es/MultiSelect/MultiSelectWithAvatar.js +43 -19
- package/es/MultiSelect/SelectedOptions.js +6 -3
- package/es/MultiSelect/SelectedOptions.module.css +5 -5
- package/es/MultiSelect/Suggestions.js +13 -6
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +4 -6
- package/es/MultiSelect/index.js +4 -0
- package/es/MultiSelect/props/defaultProps.js +11 -4
- package/es/MultiSelect/props/propTypes.js +17 -5
- package/es/PopOver/PopOver.js +25 -9
- package/es/PopOver/__tests__/PopOver.spec.js +2 -1
- package/es/PopOver/index.js +3 -0
- package/es/Popup/Popup.js +80 -31
- package/es/Popup/__tests__/Popup.spec.js +17 -5
- package/es/Popup/viewPort.js +16 -4
- package/es/Provider/AvatarSize.js +1 -0
- package/es/Provider/IdProvider.js +16 -10
- package/es/Provider/LibraryContext.js +6 -4
- package/es/Provider/NumberGenerator/NumberGenerator.js +21 -7
- package/es/Provider/ZindexProvider.js +9 -2
- package/es/Provider/index.js +4 -0
- package/es/Radio/Radio.js +9 -7
- package/es/Radio/Radio.module.css +3 -3
- package/es/Responsive/CustomResponsive.js +37 -21
- package/es/Responsive/RefWrapper.js +6 -7
- package/es/Responsive/ResizeComponent.js +35 -25
- package/es/Responsive/ResizeObserver.js +26 -6
- package/es/Responsive/Responsive.js +34 -20
- package/es/Responsive/index.js +9 -8
- package/es/Responsive/sizeObservers.js +28 -7
- package/es/Responsive/utils/index.js +7 -5
- package/es/Responsive/utils/shallowCompare.js +7 -2
- package/es/Responsive/windowResizeObserver.js +7 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +4 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +2 -2
- package/es/Ribbon/Ribbon.js +21 -15
- package/es/Ribbon/Ribbon.module.css +133 -55
- package/es/Ribbon/props/defaultProps.js +2 -1
- package/es/Ribbon/props/propTypes.js +2 -1
- package/es/RippleEffect/RippleEffect.js +6 -7
- package/es/Select/GroupSelect.js +71 -23
- package/es/Select/Select.js +115 -50
- package/es/Select/Select.module.css +23 -23
- package/es/Select/SelectWithAvatar.js +31 -12
- package/es/Select/SelectWithIcon.js +60 -14
- package/es/Select/__tests__/Select.spec.js +6 -8
- package/es/Select/index.js +4 -0
- package/es/Select/props/defaultProps.js +6 -1
- package/es/Select/props/propTypes.js +10 -4
- package/es/Stencils/Stencils.js +10 -9
- package/es/Stencils/Stencils.module.css +2 -2
- package/es/Switch/Switch.js +14 -8
- package/es/Switch/Switch.module.css +49 -32
- package/es/Switch/props/defaultProps.js +2 -1
- package/es/Switch/props/propTypes.js +1 -0
- package/es/Tab/Tab.js +14 -11
- package/es/Tab/Tab.module.css +14 -15
- package/es/Tab/TabContent.js +6 -3
- package/es/Tab/TabContentWrapper.js +6 -2
- package/es/Tab/TabWrapper.js +9 -4
- package/es/Tab/Tabs.js +85 -21
- package/es/Tab/Tabs.module.css +36 -40
- package/es/Tab/__tests__/Tab.spec.js +4 -12
- package/es/Tab/__tests__/TabWrapper.spec.js +1 -0
- package/es/Tab/props/defaultProps.js +10 -5
- package/es/Tab/props/propTypes.js +10 -5
- package/es/Tag/Tag.js +16 -10
- package/es/Tag/Tag.module.css +10 -10
- package/es/Tag/props/defaultProps.js +2 -1
- package/es/Tag/props/propTypes.js +2 -1
- package/es/TextBox/TextBox.js +26 -10
- package/es/TextBox/TextBox.module.css +6 -5
- package/es/TextBox/__tests__/TextBox.spec.js +1 -4
- package/es/TextBox/props/defaultProps.js +2 -1
- package/es/TextBox/props/propTypes.js +2 -1
- package/es/TextBoxIcon/TextBoxIcon.js +39 -13
- package/es/TextBoxIcon/TextBoxIcon.module.css +7 -6
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +2 -7
- package/es/TextBoxIcon/props/defaultProps.js +2 -1
- package/es/TextBoxIcon/props/propTypes.js +1 -0
- package/es/Textarea/Textarea.js +23 -10
- package/es/Textarea/Textarea.module.css +6 -6
- package/es/Textarea/__tests__/Textarea.spec.js +2 -2
- package/es/Textarea/props/defaultProps.js +2 -1
- package/es/Textarea/props/propTypes.js +1 -0
- package/es/Tooltip/Tooltip.js +67 -21
- package/es/Tooltip/Tooltip.module.css +40 -8
- package/es/Tooltip/__tests__/Tooltip.spec.js +5 -0
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +7 -6
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +11 -8
- package/es/VelocityAnimation/index.js +2 -0
- package/es/common/a11y.module.css +4 -0
- package/es/common/animation.module.css +8 -8
- package/es/common/avatarsizes.module.css +6 -2
- package/es/common/basicReset.module.css +3 -3
- package/es/common/boxShadow.module.css +34 -0
- package/es/common/common.module.css +24 -24
- package/es/common/customscroll.module.css +4 -2
- package/es/common/reset.module.css +1 -0
- package/es/css.js +2 -1
- package/es/deprecated/AdvancedMultiSelect.module.css +18 -18
- package/es/deprecated/PortalLayer/PortalLayer.js +30 -24
- package/es/index.js +30 -146
- package/es/semantic/Button/Button.js +9 -7
- package/es/semantic/Button/semanticButton.module.css +1 -1
- package/es/semantic/index.js +1 -0
- package/es/utils/Common.js +74 -7
- package/es/utils/ContextOptimizer.js +4 -5
- package/es/utils/__tests__/debounce.spec.js +2 -2
- package/es/utils/constructFullName.js +2 -0
- package/es/utils/css/compileClassNames.js +28 -0
- package/es/utils/css/mergeStyle.js +57 -0
- package/es/utils/css/utils.js +24 -0
- package/es/utils/datetime/GMTZones.js +48 -0
- package/es/utils/datetime/common.js +31 -7
- package/es/utils/debounce.js +5 -1
- package/es/utils/dropDownUtils.js +71 -13
- package/es/utils/getInitial.js +4 -0
- package/es/utils/index.js +3 -0
- package/es/utils/shallowEqual.js +6 -0
- package/install.md +10 -0
- package/lib/Accordion/Accordion.js +50 -18
- package/lib/Accordion/AccordionItem.js +47 -20
- package/lib/Accordion/__tests__/Accordion.spec.js +3 -0
- package/lib/Accordion/index.js +3 -0
- package/lib/Accordion/props/defaultProps.js +6 -2
- package/lib/Accordion/props/propTypes.js +6 -0
- package/lib/Animation/Animation.js +44 -21
- package/lib/Animation/__tests__/Animation.spec.js +11 -7
- package/lib/Animation/props/propTypes.js +3 -0
- package/lib/AppContainer/AppContainer.js +75 -27
- package/lib/AppContainer/AppContainer.module.css +2 -2
- package/lib/AppContainer/props/defaultProps.js +3 -1
- package/lib/AppContainer/props/propTypes.js +5 -0
- package/lib/Avatar/Avatar.js +97 -44
- package/lib/Avatar/Avatar.module.css +59 -18
- package/lib/Avatar/__tests__/Avatar.spec.js +44 -0
- package/lib/Avatar/props/defaultProps.js +4 -1
- package/lib/Avatar/props/propTypes.js +8 -2
- package/lib/AvatarTeam/AvatarTeam.js +64 -30
- package/lib/AvatarTeam/AvatarTeam.module.css +49 -21
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +13 -0
- package/lib/AvatarTeam/props/defaultProps.js +5 -1
- package/lib/AvatarTeam/props/propTypes.js +8 -1
- package/lib/Button/Button.js +64 -74
- package/{es/Button → lib/Button/css}/Button.module.css +62 -58
- package/lib/Button/css/cssJSLogic.js +41 -0
- package/lib/Button/index.js +23 -0
- package/lib/Button/props/defaultProps.js +5 -1
- package/lib/Button/props/propTypes.js +11 -3
- package/lib/Buttongroup/Buttongroup.js +49 -19
- package/lib/Buttongroup/Buttongroup.module.css +45 -28
- package/lib/Buttongroup/__test__/Buttongroup.spec.js +10 -0
- package/lib/Buttongroup/props/defaultProps.js +3 -1
- package/lib/Buttongroup/props/propTypes.js +6 -1
- package/lib/Card/Card.js +119 -55
- package/lib/Card/__tests__/Card.spec.js +10 -1
- package/lib/Card/index.js +4 -0
- package/lib/Card/props/defaultProps.js +16 -4
- package/lib/Card/props/propTypes.js +5 -2
- package/lib/CheckBox/CheckBox.js +76 -48
- package/lib/CheckBox/CheckBox.module.css +16 -16
- package/lib/CheckBox/__tests__/CheckBox.spec.js +3 -0
- package/lib/CheckBox/props/propTypes.js +4 -0
- package/lib/DateTime/CalendarView.js +95 -38
- package/lib/DateTime/DateTime.js +309 -216
- package/lib/DateTime/DateTime.module.css +51 -48
- package/lib/DateTime/DateTimePopupFooter.js +30 -5
- package/lib/DateTime/DateTimePopupHeader.js +69 -23
- package/lib/DateTime/DateWidget.js +370 -260
- package/lib/DateTime/DateWidget.module.css +5 -5
- package/lib/DateTime/DaysRow.js +28 -3
- package/lib/DateTime/Time.js +72 -29
- package/lib/DateTime/YearView.js +89 -30
- package/lib/DateTime/YearView.module.css +33 -15
- package/lib/DateTime/__tests__/CalendarView.spec.js +13 -5
- package/lib/DateTime/__tests__/DateTime.spec.js +51 -37
- package/lib/DateTime/__tests__/DateWidget.spec.js +10 -8
- package/lib/DateTime/common.js +6 -0
- package/lib/DateTime/constants.js +1 -0
- package/lib/DateTime/dateFormatUtils/dateFormat.js +184 -122
- package/lib/DateTime/dateFormatUtils/dateFormats.js +50 -0
- package/lib/DateTime/dateFormatUtils/dayChange.js +14 -7
- package/lib/DateTime/dateFormatUtils/index.js +99 -13
- package/lib/DateTime/dateFormatUtils/monthChange.js +19 -9
- package/lib/DateTime/dateFormatUtils/timeChange.js +52 -20
- package/lib/DateTime/dateFormatUtils/yearChange.js +22 -11
- package/lib/DateTime/index.js +3 -1
- package/lib/DateTime/objectUtils.js +24 -20
- package/lib/DateTime/props/defaultProps.js +2 -1
- package/lib/DateTime/props/propTypes.js +21 -2
- package/lib/DateTime/typeChecker.js +4 -0
- package/lib/DateTime/validator.js +69 -6
- package/lib/DropBox/DropBox.js +102 -249
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +145 -0
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +435 -0
- package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +81 -0
- package/lib/DropBox/DropBoxElement/props/defaultProps.js +25 -0
- package/lib/DropBox/DropBoxElement/props/propTypes.js +56 -0
- package/lib/DropBox/DropBoxElement/useDropboxPosCalc.js +60 -0
- package/lib/DropBox/__tests__/DropBox.spec.js +8 -4
- package/lib/DropBox/css/DropBox.module.css +59 -0
- package/lib/DropBox/css/cssJSLogic.js +20 -0
- package/lib/DropBox/props/defaultProps.js +20 -17
- package/lib/DropBox/props/propTypes.js +22 -43
- package/lib/DropDown/DropDown.js +58 -10
- package/lib/DropDown/DropDown.module.css +2 -2
- package/lib/DropDown/DropDownHeading.js +47 -18
- package/lib/DropDown/DropDownHeading.module.css +3 -3
- package/lib/DropDown/DropDownItem.js +43 -18
- package/lib/DropDown/DropDownItem.module.css +9 -9
- package/lib/DropDown/DropDownSearch.js +39 -14
- package/lib/DropDown/DropDownSeparator.js +23 -1
- package/lib/DropDown/DropDownSeparator.module.css +2 -2
- package/lib/DropDown/__tests__/DropDown.spec.js +15 -9
- package/lib/DropDown/__tests__/DropDownItem.spec.js +9 -4
- package/lib/DropDown/__tests__/DropDownSearch.spec.js +3 -0
- package/lib/DropDown/index.js +65 -0
- package/lib/DropDown/props/defaultProps.js +3 -1
- package/lib/DropDown/props/propTypes.js +7 -1
- package/lib/Heading/Heading.js +42 -16
- package/lib/Heading/Heading.module.css +2 -2
- package/lib/Heading/props/propTypes.js +3 -0
- package/lib/Label/Label.js +47 -19
- package/lib/Label/Label.module.css +1 -1
- package/lib/Label/__tests__/Label.spec.js +14 -1
- package/lib/Label/props/defaultProps.js +2 -1
- package/lib/Label/props/propTypes.js +4 -0
- package/lib/Layout/Box.js +41 -16
- package/lib/Layout/Container.js +39 -15
- package/lib/Layout/Layout.module.css +15 -15
- package/lib/Layout/__tests__/Box.spec.js +65 -49
- package/lib/Layout/__tests__/Container.spec.js +67 -50
- package/lib/Layout/index.js +4 -11
- package/lib/Layout/props/defaultProps.js +6 -2
- package/lib/Layout/props/propTypes.js +10 -3
- package/lib/Layout/utils.js +15 -1
- package/lib/ListItem/ListContainer.js +61 -34
- package/lib/ListItem/ListItem.js +92 -50
- package/lib/ListItem/ListItem.module.css +37 -30
- package/lib/ListItem/ListItemWithAvatar.js +98 -54
- package/lib/ListItem/ListItemWithCheckBox.js +82 -41
- package/lib/ListItem/ListItemWithIcon.js +92 -50
- package/lib/ListItem/ListItemWithRadio.js +83 -42
- package/lib/ListItem/index.js +55 -0
- package/lib/ListItem/props/defaultProps.js +18 -6
- package/lib/ListItem/props/propTypes.js +18 -3
- package/lib/Modal/Modal.js +51 -13
- package/lib/Modal/props/propTypes.js +3 -0
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +300 -167
- package/lib/MultiSelect/AdvancedMultiSelect.js +212 -130
- package/lib/MultiSelect/EmptyState.js +48 -21
- package/lib/MultiSelect/MultiSelect.js +341 -205
- package/lib/MultiSelect/MultiSelect.module.css +32 -31
- package/lib/MultiSelect/MultiSelectHeader.js +29 -5
- package/lib/MultiSelect/MultiSelectWithAvatar.js +126 -65
- package/lib/MultiSelect/SelectedOptions.js +42 -14
- package/lib/MultiSelect/SelectedOptions.module.css +5 -5
- package/lib/MultiSelect/Suggestions.js +66 -29
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +86 -75
- package/lib/MultiSelect/index.js +39 -0
- package/lib/MultiSelect/props/defaultProps.js +13 -4
- package/lib/MultiSelect/props/propTypes.js +20 -5
- package/lib/PopOver/PopOver.js +101 -53
- package/lib/PopOver/__tests__/PopOver.spec.js +4 -1
- package/lib/PopOver/index.js +31 -0
- package/lib/PopOver/props/propTypes.js +3 -0
- package/lib/Popup/Popup.js +158 -83
- package/lib/Popup/__tests__/Popup.spec.js +42 -5
- package/lib/Popup/viewPort.js +28 -14
- package/lib/Provider/AvatarSize.js +5 -0
- package/lib/Provider/Config.js +2 -0
- package/lib/Provider/CssProvider.js +4 -0
- package/lib/Provider/IdProvider.js +23 -12
- package/lib/Provider/LibraryContext.js +32 -10
- package/lib/Provider/LibraryContextInit.js +4 -0
- package/lib/Provider/NumberGenerator/NumberGenerator.js +43 -14
- package/lib/Provider/ZindexProvider.js +15 -3
- package/lib/Provider/index.js +81 -0
- package/lib/Radio/Radio.js +65 -40
- package/lib/Radio/Radio.module.css +3 -3
- package/lib/Radio/__tests__/Radiospec.js +9 -5
- package/lib/Radio/props/propTypes.js +3 -0
- package/lib/Responsive/CustomResponsive.js +76 -26
- package/lib/Responsive/RefWrapper.js +15 -7
- package/lib/Responsive/ResizeComponent.js +58 -27
- package/lib/Responsive/ResizeObserver.js +23 -6
- package/lib/Responsive/Responsive.js +76 -24
- package/lib/Responsive/index.js +49 -22
- package/lib/Responsive/props/propTypes.js +3 -0
- package/lib/Responsive/sizeObservers.js +51 -13
- package/lib/Responsive/utils/index.js +11 -3
- package/lib/Responsive/utils/shallowCompare.js +11 -2
- package/lib/Responsive/windowResizeObserver.js +8 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +44 -14
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +2 -2
- package/lib/ResponsiveDropBox/props/propTypes.js +3 -0
- package/lib/Ribbon/Ribbon.js +48 -21
- package/lib/Ribbon/Ribbon.module.css +133 -55
- package/lib/Ribbon/__tests__/Ribbon.spec.js +22 -0
- package/lib/Ribbon/props/defaultProps.js +2 -1
- package/lib/Ribbon/props/propTypes.js +5 -1
- package/lib/RippleEffect/RippleEffect.js +23 -14
- package/lib/RippleEffect/props/propTypes.js +3 -0
- package/lib/Select/GroupSelect.js +240 -137
- package/lib/Select/Select.js +320 -220
- package/lib/Select/Select.module.css +23 -23
- package/lib/Select/SelectWithAvatar.js +112 -59
- package/lib/Select/SelectWithIcon.js +145 -82
- package/lib/Select/__tests__/Select.spec.js +131 -89
- package/lib/Select/index.js +39 -0
- package/lib/Select/props/defaultProps.js +10 -2
- package/lib/Select/props/propTypes.js +13 -4
- package/lib/Stencils/Stencils.js +35 -13
- package/lib/Stencils/Stencils.module.css +2 -2
- package/lib/Stencils/__tests__/Stencils.spec.js +12 -0
- package/lib/Stencils/props/propTypes.js +3 -0
- package/lib/Switch/Switch.js +64 -35
- package/lib/Switch/Switch.module.css +49 -32
- package/lib/Switch/props/defaultProps.js +2 -1
- package/lib/Switch/props/propTypes.js +4 -0
- package/lib/Tab/Tab.js +49 -33
- package/lib/Tab/Tab.module.css +14 -15
- package/lib/Tab/TabContent.js +15 -6
- package/lib/Tab/TabContentWrapper.js +15 -6
- package/lib/Tab/TabWrapper.js +37 -17
- package/lib/Tab/Tabs.js +193 -94
- package/lib/Tab/Tabs.module.css +36 -40
- package/lib/Tab/__tests__/Tab.spec.js +74 -70
- package/lib/Tab/__tests__/TabContent.spec.js +10 -6
- package/lib/Tab/__tests__/TabContentWrapper.spec.js +28 -20
- package/lib/Tab/__tests__/TabWrapper.spec.js +12 -0
- package/lib/Tab/__tests__/Tabs.spec.js +53 -39
- package/lib/Tab/index.js +6 -0
- package/lib/Tab/props/defaultProps.js +10 -5
- package/lib/Tab/props/propTypes.js +13 -5
- package/lib/Tag/Tag.js +82 -48
- package/lib/Tag/Tag.module.css +10 -10
- package/lib/Tag/__tests__/Tag.spec.js +14 -8
- package/lib/Tag/props/defaultProps.js +2 -1
- package/lib/Tag/props/propTypes.js +5 -1
- package/lib/TextBox/TextBox.js +93 -61
- package/lib/TextBox/TextBox.module.css +6 -5
- package/lib/TextBox/__tests__/TextBox.spec.js +14 -4
- package/lib/TextBox/props/defaultProps.js +2 -1
- package/lib/TextBox/props/propTypes.js +6 -1
- package/lib/TextBoxIcon/TextBoxIcon.js +108 -60
- package/lib/TextBoxIcon/TextBoxIcon.module.css +7 -6
- package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +14 -5
- package/lib/TextBoxIcon/props/defaultProps.js +2 -1
- package/lib/TextBoxIcon/props/propTypes.js +4 -0
- package/lib/Textarea/Textarea.js +63 -32
- package/lib/Textarea/Textarea.module.css +6 -6
- package/lib/Textarea/__tests__/Textarea.spec.js +14 -2
- package/lib/Textarea/props/defaultProps.js +2 -1
- package/lib/Textarea/props/propTypes.js +4 -0
- package/lib/Tooltip/Tooltip.js +102 -35
- package/lib/Tooltip/Tooltip.module.css +40 -8
- package/lib/Tooltip/__tests__/Tooltip.spec.js +23 -0
- package/lib/Tooltip/props/propTypes.js +3 -0
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +43 -17
- package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +3 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +55 -24
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +3 -0
- package/lib/VelocityAnimation/index.js +23 -0
- package/lib/common/a11y.module.css +4 -0
- package/lib/common/animation.module.css +8 -8
- package/lib/common/avatarsizes.module.css +6 -2
- package/lib/common/basicReset.module.css +3 -3
- package/lib/common/boxShadow.module.css +34 -0
- package/lib/common/common.module.css +24 -24
- package/lib/common/customscroll.module.css +4 -2
- package/lib/common/reset.module.css +1 -0
- package/lib/css.js +42 -1
- package/lib/deprecated/AdvancedMultiSelect.module.css +18 -18
- package/lib/deprecated/PortalLayer/PortalLayer.js +50 -24
- package/lib/deprecated/PortalLayer/props/propTypes.js +3 -0
- package/lib/index.js +214 -210
- package/lib/semantic/Button/Button.js +47 -24
- package/lib/semantic/Button/props/propTypes.js +3 -0
- package/lib/semantic/Button/semanticButton.module.css +1 -1
- package/lib/semantic/index.js +15 -0
- package/lib/utils/Common.js +136 -17
- package/lib/utils/ContextOptimizer.js +16 -10
- package/lib/utils/__tests__/constructFullName.spec.js +1 -0
- package/lib/utils/__tests__/debounce.spec.js +3 -2
- package/lib/utils/__tests__/getInitial.spec.js +1 -0
- package/lib/utils/constructFullName.js +11 -2
- package/lib/utils/css/compileClassNames.js +37 -0
- package/lib/utils/css/mergeStyle.js +69 -0
- package/lib/utils/css/utils.js +41 -0
- package/lib/utils/datetime/GMTZones.js +55 -0
- package/lib/utils/datetime/common.js +52 -7
- package/lib/utils/debounce.js +6 -1
- package/lib/utils/dropDownUtils.js +177 -56
- package/lib/utils/dummyFunction.js +2 -0
- package/lib/utils/getHTMLFontSize.js +1 -0
- package/lib/utils/getInitial.js +6 -0
- package/lib/utils/index.js +121 -0
- package/lib/utils/scrollTo.js +2 -0
- package/lib/utils/shallowEqual.js +8 -0
- package/package.json +61 -26
- package/postPublish.js +8 -0
- package/prePublish.js +70 -0
- package/docs/external/active-line.js +0 -72
- package/docs/external/autorefresh.js +0 -47
- package/docs/external/codemirror.js +0 -9681
- package/docs/external/css/hopscotch.css +0 -576
- package/docs/external/css/styleGuide.css +0 -1100
- package/docs/external/css.js +0 -466
- package/docs/external/designTokens.js +0 -1
- package/docs/external/foldcode.js +0 -152
- package/docs/external/format.js +0 -129
- package/docs/external/htmlmixed.js +0 -84
- package/docs/external/images/bottom.png +0 -0
- package/docs/external/images/bottombg.jpg +0 -0
- package/docs/external/images/desk.png +0 -0
- package/docs/external/images/desklogo.png +0 -0
- package/docs/external/images/menu.png +0 -0
- package/docs/external/index.html +0 -127
- package/docs/external/javascript.js +0 -422
- package/docs/external/jsx.js +0 -148
- package/docs/external/matchbrackets.js +0 -145
- package/docs/external/xml.js +0 -322
- package/docs/package.json +0 -41
- package/docs/src/index.js +0 -1311
- package/es/Button/__tests__/Button.spec.js +0 -190
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -191
- package/es/DropBox/DropBox.module.css +0 -406
- package/lib/Button/__tests__/Button.spec.js +0 -193
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -191
- package/lib/DropBox/DropBox.module.css +0 -406
|
@@ -3,18 +3,18 @@ import React from 'react';
|
|
|
3
3
|
import { DateWidget_propTypes } from './props/propTypes';
|
|
4
4
|
import { DateWidget_defaultProps } from './props/defaultProps';
|
|
5
5
|
import datetime from '@zohodesk/datetimejs';
|
|
6
|
-
|
|
7
6
|
/**** Components ****/
|
|
7
|
+
|
|
8
8
|
import DateTime from './DateTime';
|
|
9
9
|
import Popup from '../Popup/Popup';
|
|
10
|
-
import Icon from '@zohodesk/icons
|
|
10
|
+
import { Icon } from '@zohodesk/icons';
|
|
11
11
|
import { Container } from '../Layout';
|
|
12
12
|
import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
|
|
13
|
-
|
|
14
13
|
/**** CSS ****/
|
|
15
|
-
import style from './DateWidget.module.css';
|
|
16
14
|
|
|
15
|
+
import style from './DateWidget.module.css';
|
|
17
16
|
/**** Methods ****/
|
|
17
|
+
|
|
18
18
|
import validator from './validator';
|
|
19
19
|
import { formatDate } from '../utils/datetime/common';
|
|
20
20
|
import { getIsSupportedKey, arrayIsNotEqual } from './dateFormatUtils';
|
|
@@ -24,11 +24,11 @@ import { getChangedMonth } from './dateFormatUtils/monthChange';
|
|
|
24
24
|
import { getChangedYear } from './dateFormatUtils/yearChange';
|
|
25
25
|
import { getChangedHour, getChangedMinute, getChangedNoon } from './dateFormatUtils/timeChange';
|
|
26
26
|
import { getIsEmptyValue } from '../utils/Common';
|
|
27
|
-
|
|
28
27
|
/** * Constants ** */
|
|
29
|
-
import { INVALID_DATE, i18nShortMonths, i18nMonths } from './constants';
|
|
30
28
|
|
|
29
|
+
import { INVALID_DATE, i18nShortMonths, i18nMonths } from './constants';
|
|
31
30
|
/* eslint-disable react/no-unused-prop-types */
|
|
31
|
+
|
|
32
32
|
/* eslint css-modules/no-unused-class: [0, { markAsUsed: 'inputLine'] }] */
|
|
33
33
|
|
|
34
34
|
class DateWidgetComponent extends React.Component {
|
|
@@ -72,9 +72,12 @@ class DateWidgetComponent extends React.Component {
|
|
|
72
72
|
this.oldFocusOrder = '';
|
|
73
73
|
this.focusOrder = '';
|
|
74
74
|
this.oldKeyDownAction = ''; //'Arrow' || 'valueTyped'
|
|
75
|
+
|
|
75
76
|
this.keyDownAction = ''; //'Arrow' || 'valueTyped'
|
|
77
|
+
|
|
76
78
|
this.isMouseDown = false;
|
|
77
79
|
}
|
|
80
|
+
|
|
78
81
|
componentDidMount() {
|
|
79
82
|
const {
|
|
80
83
|
validation
|
|
@@ -82,9 +85,11 @@ class DateWidgetComponent extends React.Component {
|
|
|
82
85
|
const {
|
|
83
86
|
selected
|
|
84
87
|
} = this.state;
|
|
88
|
+
|
|
85
89
|
if (validation && validation.validate) {
|
|
86
90
|
this.validateOnSelect(selected, this.props);
|
|
87
91
|
}
|
|
92
|
+
|
|
88
93
|
const {
|
|
89
94
|
displayText,
|
|
90
95
|
selected: newSelected
|
|
@@ -95,6 +100,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
95
100
|
});
|
|
96
101
|
this.handleSelectionRangeDetails(this.props);
|
|
97
102
|
}
|
|
103
|
+
|
|
98
104
|
componentDidUpdate(prevProps, prevState) {
|
|
99
105
|
const {
|
|
100
106
|
selected,
|
|
@@ -116,9 +122,11 @@ class DateWidgetComponent extends React.Component {
|
|
|
116
122
|
is24Hour,
|
|
117
123
|
isHideCurrentYear
|
|
118
124
|
} = this.props;
|
|
125
|
+
|
|
119
126
|
if (validation && validation.validate) {
|
|
120
127
|
this.validateOnSelect(selected, this.props);
|
|
121
128
|
}
|
|
129
|
+
|
|
122
130
|
if (value !== prevProps.value || dateFormat !== prevProps.dateFormat || is24Hour !== prevProps.is24Hour || isHideCurrentYear !== prevProps.isHideCurrentYear) {
|
|
123
131
|
const {
|
|
124
132
|
displayText,
|
|
@@ -128,6 +136,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
128
136
|
selected,
|
|
129
137
|
displayText
|
|
130
138
|
});
|
|
139
|
+
|
|
131
140
|
if (value !== INVALID_DATE) {
|
|
132
141
|
this.setState({
|
|
133
142
|
day: '',
|
|
@@ -141,27 +150,28 @@ class DateWidgetComponent extends React.Component {
|
|
|
141
150
|
});
|
|
142
151
|
}
|
|
143
152
|
}
|
|
153
|
+
|
|
144
154
|
if (prevProps.isPopupReady !== isPopupReady) {
|
|
145
155
|
if (isPopupReady) {
|
|
146
156
|
this.resetLocalDate && this.resetLocalDate();
|
|
147
157
|
}
|
|
148
158
|
}
|
|
159
|
+
|
|
149
160
|
const haveLocalValue = [day, month, year, hour, minute, noon].some(value => !getIsEmptyValue(value));
|
|
161
|
+
|
|
150
162
|
if (isDateEdited !== haveLocalValue) {
|
|
151
163
|
this.setState({
|
|
152
164
|
isDateEdited: haveLocalValue
|
|
153
165
|
});
|
|
154
166
|
}
|
|
167
|
+
|
|
155
168
|
if (value !== prevProps.value || dateFormat !== prevProps.dateFormat || is24Hour !== prevProps.is24Hour || arrayIsNotEqual([day, month, year, hour, minute, noon], [prevState.day, prevState.month, prevState.year, prevState.hour, prevState.minute, prevState.noon])) {
|
|
156
169
|
this.handleSelectionRangeDetails(this.props);
|
|
157
|
-
}
|
|
170
|
+
} // if (stateFocusOrder !== prevState.stateFocusOrder) {
|
|
158
171
|
|
|
159
|
-
// if (stateFocusOrder !== prevState.stateFocusOrder) {
|
|
160
172
|
|
|
161
173
|
isFocused && !getIsEmptyValue(stateFocusOrder) && this.handleSelection(stateFocusOrder);
|
|
162
|
-
this.handleBlurSelectionRange(stateFocusOrder, prevState.stateFocusOrder);
|
|
163
|
-
// }
|
|
164
|
-
|
|
174
|
+
this.handleBlurSelectionRange(stateFocusOrder, prevState.stateFocusOrder); // }
|
|
165
175
|
// if (prevProps.isPopupOpen !== isPopupOpen) {
|
|
166
176
|
// if (!isPopupOpen) {
|
|
167
177
|
// this.valueInput && this.valueInput.focus({preventScroll:true});
|
|
@@ -176,18 +186,21 @@ class DateWidgetComponent extends React.Component {
|
|
|
176
186
|
closePopupOnly,
|
|
177
187
|
validation
|
|
178
188
|
} = this.props;
|
|
189
|
+
|
|
179
190
|
if (validation && validation.validateOn) {
|
|
180
191
|
const {
|
|
181
192
|
selected
|
|
182
193
|
} = this.state;
|
|
183
194
|
this.validateOnSelect(selected, this.props);
|
|
184
195
|
}
|
|
196
|
+
|
|
185
197
|
onSelect && onSelect(userZoneSelectedTime, id);
|
|
186
198
|
this.valueInput && this.valueInput.focus({
|
|
187
199
|
preventScroll: true
|
|
188
200
|
});
|
|
189
201
|
closePopupOnly(e);
|
|
190
202
|
}
|
|
203
|
+
|
|
191
204
|
validateOnSelect(value, props) {
|
|
192
205
|
const defaultCheckPropsRules = ['required'];
|
|
193
206
|
const defaultValidateRules = ['required'];
|
|
@@ -198,6 +211,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
198
211
|
onFailValidation
|
|
199
212
|
} = props;
|
|
200
213
|
const targetTag = this.elementRef;
|
|
214
|
+
|
|
201
215
|
if (validation) {
|
|
202
216
|
//validateOn won't work here ...
|
|
203
217
|
const newValidation = validator.combinePropsValidation(this.props, defaultType, 'onSelect', validation, defaultCheckPropsRules, defaultValidateRules);
|
|
@@ -211,6 +225,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
211
225
|
onPassValidation && onPassValidation(value, targetTag);
|
|
212
226
|
}
|
|
213
227
|
}
|
|
228
|
+
|
|
214
229
|
handleTogglePopup(e, isOpenOnly) {
|
|
215
230
|
const {
|
|
216
231
|
togglePopup,
|
|
@@ -219,6 +234,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
219
234
|
isPopupOpen,
|
|
220
235
|
removeClose
|
|
221
236
|
} = this.props;
|
|
237
|
+
|
|
222
238
|
if (isOpenOnly) {
|
|
223
239
|
if (!isPopupOpen) {
|
|
224
240
|
togglePopup(e, `${defaultPosition}Right`);
|
|
@@ -226,8 +242,10 @@ class DateWidgetComponent extends React.Component {
|
|
|
226
242
|
removeClose(e);
|
|
227
243
|
}
|
|
228
244
|
}
|
|
245
|
+
|
|
229
246
|
!isOpenOnly && togglePopup(e, `${defaultPosition}Right`);
|
|
230
247
|
}
|
|
248
|
+
|
|
231
249
|
handleSelectionRangeDetails(props) {
|
|
232
250
|
const {
|
|
233
251
|
timeZone,
|
|
@@ -244,9 +262,8 @@ class DateWidgetComponent extends React.Component {
|
|
|
244
262
|
minute,
|
|
245
263
|
noon
|
|
246
264
|
} = this.state;
|
|
247
|
-
const selected = value === INVALID_DATE ? '' : value;
|
|
265
|
+
const selected = value === INVALID_DATE ? '' : value; //New UI Changes
|
|
248
266
|
|
|
249
|
-
//New UI Changes
|
|
250
267
|
const dateFormatDetails = getDateFormatDetails(dateFormat, {
|
|
251
268
|
isHideCurrentYear: false,
|
|
252
269
|
value,
|
|
@@ -275,6 +292,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
275
292
|
newDateFormat
|
|
276
293
|
});
|
|
277
294
|
}
|
|
295
|
+
|
|
278
296
|
handleGetDisplayText(props) {
|
|
279
297
|
const {
|
|
280
298
|
timeZone,
|
|
@@ -295,22 +313,27 @@ class DateWidgetComponent extends React.Component {
|
|
|
295
313
|
} = dateFormatDetails;
|
|
296
314
|
let displayText = '';
|
|
297
315
|
const selected = value === INVALID_DATE ? '' : value;
|
|
316
|
+
|
|
298
317
|
if (selected) {
|
|
299
318
|
let format = newDateFormat,
|
|
300
|
-
|
|
319
|
+
convertedValue;
|
|
320
|
+
|
|
301
321
|
if (isDateTime) {
|
|
302
322
|
convertedValue = datetime.toDate(datetime.tz.utcToTz(value, timeZone));
|
|
303
323
|
format = `${newDateFormat} ${is24Hour ? 'HH:mm' : 'hh:mm A'}`;
|
|
304
324
|
} else {
|
|
305
325
|
convertedValue = datetime.toDate(value);
|
|
306
326
|
}
|
|
327
|
+
|
|
307
328
|
displayText = formatDate(convertedValue, format);
|
|
308
329
|
}
|
|
330
|
+
|
|
309
331
|
return {
|
|
310
332
|
displayText,
|
|
311
333
|
selected
|
|
312
334
|
};
|
|
313
335
|
}
|
|
336
|
+
|
|
314
337
|
handleKeyDown(e) {
|
|
315
338
|
const {
|
|
316
339
|
keyCode
|
|
@@ -323,12 +346,14 @@ class DateWidgetComponent extends React.Component {
|
|
|
323
346
|
cantEditOnPopupOpen
|
|
324
347
|
} = this.props;
|
|
325
348
|
const isAllowedDateType = this.handleGetAllowedType();
|
|
349
|
+
|
|
326
350
|
if (isPopupOpen) {
|
|
327
351
|
if (keyCode === 9 && !isAllowedDateType) {
|
|
328
352
|
//on tab click popup close
|
|
329
353
|
closePopupOnly(e);
|
|
330
|
-
}
|
|
331
|
-
|
|
354
|
+
} // ~~~~~~~ handle date navigation in dateTime popup ~~~~~
|
|
355
|
+
|
|
356
|
+
|
|
332
357
|
if (isAllowedDateType) {
|
|
333
358
|
cantEditOnPopupOpen && this.handleDateType(e);
|
|
334
359
|
}
|
|
@@ -344,6 +369,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
344
369
|
}
|
|
345
370
|
}
|
|
346
371
|
}
|
|
372
|
+
|
|
347
373
|
getValueInputRef(el) {
|
|
348
374
|
const {
|
|
349
375
|
getRef
|
|
@@ -351,11 +377,13 @@ class DateWidgetComponent extends React.Component {
|
|
|
351
377
|
this.valueInput = el;
|
|
352
378
|
getRef && getRef(el);
|
|
353
379
|
}
|
|
380
|
+
|
|
354
381
|
handleFocus() {
|
|
355
382
|
const isAllowedDateType = this.handleGetAllowedType();
|
|
356
383
|
const {
|
|
357
384
|
isMouseDown
|
|
358
385
|
} = this;
|
|
386
|
+
|
|
359
387
|
if (isAllowedDateType && !isMouseDown) {
|
|
360
388
|
const {
|
|
361
389
|
dateFormatSelection
|
|
@@ -382,11 +410,13 @@ class DateWidgetComponent extends React.Component {
|
|
|
382
410
|
isFocused: true
|
|
383
411
|
});
|
|
384
412
|
}
|
|
413
|
+
|
|
385
414
|
const {
|
|
386
415
|
onFocus
|
|
387
416
|
} = this.props;
|
|
388
417
|
onFocus && onFocus();
|
|
389
418
|
}
|
|
419
|
+
|
|
390
420
|
handleBlur() {
|
|
391
421
|
this.focusOrder = '';
|
|
392
422
|
this.oldFocusOrder = '';
|
|
@@ -394,9 +424,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
394
424
|
this.keyDownAction = '';
|
|
395
425
|
this.setState({
|
|
396
426
|
isFocused: false
|
|
397
|
-
});
|
|
398
|
-
|
|
399
|
-
// const { valueInput } = this;
|
|
427
|
+
}); // const { valueInput } = this;
|
|
400
428
|
// document.getSelection().removeAllRanges();
|
|
401
429
|
// valueInput && valueInput.setSelectionRange(0, 0);
|
|
402
430
|
|
|
@@ -405,6 +433,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
405
433
|
} = this.props;
|
|
406
434
|
onBlur && onBlur();
|
|
407
435
|
}
|
|
436
|
+
|
|
408
437
|
handleGetMethods(methods) {
|
|
409
438
|
const {
|
|
410
439
|
getMethods
|
|
@@ -419,15 +448,18 @@ class DateWidgetComponent extends React.Component {
|
|
|
419
448
|
this.DateTimeYearViewToggle = toggleYearView;
|
|
420
449
|
getMethods && getMethods(methods);
|
|
421
450
|
}
|
|
451
|
+
|
|
422
452
|
handleDateType(e) {
|
|
423
453
|
const {
|
|
424
454
|
keyCode,
|
|
425
455
|
shiftKey
|
|
426
456
|
} = e;
|
|
427
457
|
const input = e.target;
|
|
458
|
+
|
|
428
459
|
if (getIsSupportedKey(e)) {
|
|
429
460
|
e.preventDefault();
|
|
430
461
|
}
|
|
462
|
+
|
|
431
463
|
const {
|
|
432
464
|
isDateTime,
|
|
433
465
|
timeZone,
|
|
@@ -487,6 +519,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
487
519
|
} = order[focusedOrder] || {};
|
|
488
520
|
this.oldFocusOrder = this.focusOrder;
|
|
489
521
|
this.focusOrder = focusedOrder;
|
|
522
|
+
|
|
490
523
|
if (keyCode === 38 || keyCode === 40) {
|
|
491
524
|
//up arrow && down arrow
|
|
492
525
|
this.oldKeyDownAction = this.keyDownAction;
|
|
@@ -495,6 +528,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
495
528
|
this.oldKeyDownAction = this.keyDownAction;
|
|
496
529
|
this.keyDownAction = 'valueTyped';
|
|
497
530
|
}
|
|
531
|
+
|
|
498
532
|
const focusedOrders = {
|
|
499
533
|
focusOrder: this.focusOrder,
|
|
500
534
|
oldFocusOrder: this.oldFocusOrder
|
|
@@ -504,13 +538,14 @@ class DateWidgetComponent extends React.Component {
|
|
|
504
538
|
keyAction: this.keyDownAction
|
|
505
539
|
};
|
|
506
540
|
let newDay = selectedDay,
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
541
|
+
newMonth = selectedMonth,
|
|
542
|
+
newYear = selectedYear,
|
|
543
|
+
newHour = selectedHour,
|
|
544
|
+
newMinute = selectedMinute,
|
|
545
|
+
newNoon = selectedNoon,
|
|
546
|
+
isValueChanged = false,
|
|
547
|
+
newFocusOrder = focusedOrder;
|
|
548
|
+
|
|
514
549
|
if (keyCode === 9 && shiftKey && !getIsEmptyValue(focusedOrder) && focusedOrder !== 0) {
|
|
515
550
|
e.preventDefault();
|
|
516
551
|
this.setState({
|
|
@@ -599,6 +634,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
599
634
|
noon: selectedNoon
|
|
600
635
|
}, e, focusedOrders, keyActions));
|
|
601
636
|
}
|
|
637
|
+
|
|
602
638
|
if (isValueChanged) {
|
|
603
639
|
const currentValue = {
|
|
604
640
|
day: newDay,
|
|
@@ -608,6 +644,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
608
644
|
minute: newMinute,
|
|
609
645
|
noon: newNoon
|
|
610
646
|
};
|
|
647
|
+
|
|
611
648
|
const errorCaseHandle = isEmptyValError => {
|
|
612
649
|
this.setState(() => ({
|
|
613
650
|
day: newDay,
|
|
@@ -623,12 +660,14 @@ class DateWidgetComponent extends React.Component {
|
|
|
623
660
|
const newSelected = isEmptyValError ? '' : INVALID_DATE;
|
|
624
661
|
value !== newSelected && onSelect && onSelect(newSelected, id);
|
|
625
662
|
};
|
|
663
|
+
|
|
626
664
|
const {
|
|
627
665
|
isError,
|
|
628
666
|
isEmptyValError
|
|
629
667
|
} = getIsValidDate(currentValue, isDateTime, {
|
|
630
668
|
is24Hour
|
|
631
669
|
});
|
|
670
|
+
|
|
632
671
|
if (isError) {
|
|
633
672
|
errorCaseHandle(isEmptyValError);
|
|
634
673
|
} else {
|
|
@@ -643,12 +682,14 @@ class DateWidgetComponent extends React.Component {
|
|
|
643
682
|
isDateTime,
|
|
644
683
|
is24Hour
|
|
645
684
|
});
|
|
685
|
+
|
|
646
686
|
if (selectedDateError) {
|
|
647
687
|
if (errorType === 'MIN') {
|
|
648
688
|
onError && onError(minErrorText, true);
|
|
649
689
|
} else if (errorType === 'MAX') {
|
|
650
690
|
onError && onError(maxErrorText, true);
|
|
651
691
|
}
|
|
692
|
+
|
|
652
693
|
errorCaseHandle();
|
|
653
694
|
} else {
|
|
654
695
|
this.setState(() => ({
|
|
@@ -667,9 +708,11 @@ class DateWidgetComponent extends React.Component {
|
|
|
667
708
|
}
|
|
668
709
|
}
|
|
669
710
|
}
|
|
711
|
+
|
|
670
712
|
handleSelection() {
|
|
671
713
|
let focusOrder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
672
714
|
const isAllowedDateType = this.handleGetAllowedType();
|
|
715
|
+
|
|
673
716
|
if (isAllowedDateType) {
|
|
674
717
|
const {
|
|
675
718
|
dateFormatSelection
|
|
@@ -680,18 +723,21 @@ class DateWidgetComponent extends React.Component {
|
|
|
680
723
|
let {
|
|
681
724
|
index
|
|
682
725
|
} = order[focusOrder] || {};
|
|
726
|
+
|
|
683
727
|
if (!index) {
|
|
684
728
|
focusOrder = 0;
|
|
685
729
|
({
|
|
686
730
|
index
|
|
687
731
|
} = order[focusOrder] || {});
|
|
688
732
|
}
|
|
733
|
+
|
|
689
734
|
if (index && this.valueInput) {
|
|
690
735
|
document.getSelection().removeAllRanges();
|
|
691
736
|
this.valueInput.setSelectionRange(index[0], index[1]);
|
|
692
737
|
}
|
|
693
738
|
}
|
|
694
739
|
}
|
|
740
|
+
|
|
695
741
|
handleInputClick(e) {
|
|
696
742
|
this.isMouseDown = false;
|
|
697
743
|
const {
|
|
@@ -707,12 +753,14 @@ class DateWidgetComponent extends React.Component {
|
|
|
707
753
|
} = dateFormatSelection;
|
|
708
754
|
const focusOrder = clickIndex[selectionEnd] || clickIndex[selectionEnd - 1] || 0;
|
|
709
755
|
const isAllowedDateType = this.handleGetAllowedType();
|
|
756
|
+
|
|
710
757
|
if (isAllowedDateType) {
|
|
711
758
|
this.setState({
|
|
712
759
|
stateFocusOrder: focusOrder,
|
|
713
760
|
isFocused: true
|
|
714
761
|
});
|
|
715
762
|
}
|
|
763
|
+
|
|
716
764
|
if (!isAllowedDateType) {
|
|
717
765
|
this.handleTogglePopup(e);
|
|
718
766
|
} else {
|
|
@@ -721,22 +769,27 @@ class DateWidgetComponent extends React.Component {
|
|
|
721
769
|
isReadOnly,
|
|
722
770
|
isDisabled
|
|
723
771
|
} = this.props;
|
|
772
|
+
|
|
724
773
|
if (isPopupOpenOnClick && (!isReadOnly || !isDisabled)) {
|
|
725
774
|
this.handleTogglePopup(e, true);
|
|
726
775
|
}
|
|
776
|
+
|
|
727
777
|
const {
|
|
728
778
|
isPopupCloseOnClick,
|
|
729
779
|
isPopupOpen,
|
|
730
780
|
closePopupOnly
|
|
731
781
|
} = this.props;
|
|
782
|
+
|
|
732
783
|
if (isPopupCloseOnClick && !isPopupOpen) {
|
|
733
784
|
closePopupOnly && closePopupOnly(e);
|
|
734
785
|
}
|
|
735
786
|
}
|
|
736
787
|
}
|
|
788
|
+
|
|
737
789
|
handleMouseDown() {
|
|
738
790
|
this.isMouseDown = true;
|
|
739
791
|
}
|
|
792
|
+
|
|
740
793
|
handleGetShowValue() {
|
|
741
794
|
const {
|
|
742
795
|
day,
|
|
@@ -759,6 +812,7 @@ class DateWidgetComponent extends React.Component {
|
|
|
759
812
|
timeZone,
|
|
760
813
|
isPopupOpen
|
|
761
814
|
} = this.props;
|
|
815
|
+
|
|
762
816
|
if (isDateEdited || isFocused || isPopupReady || isPopupOpen) {
|
|
763
817
|
const {
|
|
764
818
|
day: selectedDay = '',
|
|
@@ -793,24 +847,30 @@ class DateWidgetComponent extends React.Component {
|
|
|
793
847
|
} else if (displayText) {
|
|
794
848
|
return displayText;
|
|
795
849
|
}
|
|
850
|
+
|
|
796
851
|
const timeFormat = is24Hour ? ' HH:mm' : ' hh:mm --';
|
|
797
852
|
const dateTimeFormat = isDateTime ? `${newDateFormat}${timeFormat}` : newDateFormat;
|
|
798
853
|
return dateTimeFormat || '';
|
|
799
854
|
}
|
|
855
|
+
|
|
800
856
|
handleGetAllowedType() {
|
|
801
857
|
const {
|
|
802
858
|
isReadOnly,
|
|
803
859
|
isDisabled,
|
|
804
860
|
isEditable
|
|
805
861
|
} = this.props;
|
|
862
|
+
|
|
806
863
|
if (isEditable) {
|
|
807
864
|
if (isReadOnly || isDisabled) {
|
|
808
865
|
return false;
|
|
809
866
|
}
|
|
867
|
+
|
|
810
868
|
return true;
|
|
811
869
|
}
|
|
870
|
+
|
|
812
871
|
return false;
|
|
813
872
|
}
|
|
873
|
+
|
|
814
874
|
handleDateClear() {
|
|
815
875
|
const {
|
|
816
876
|
id,
|
|
@@ -828,11 +888,9 @@ class DateWidgetComponent extends React.Component {
|
|
|
828
888
|
stateFocusOrder: 0,
|
|
829
889
|
isError: false
|
|
830
890
|
});
|
|
831
|
-
value && onSelect && onSelect('', id);
|
|
832
|
-
this.valueInput && this.valueInput.focus({
|
|
833
|
-
preventScroll: true
|
|
834
|
-
});
|
|
891
|
+
value && onSelect && onSelect('', id); // this.valueInput && this.valueInput.focus({ preventScroll: true });
|
|
835
892
|
}
|
|
893
|
+
|
|
836
894
|
handleDateTimeClear(e) {
|
|
837
895
|
this.handleDateClear();
|
|
838
896
|
const {
|
|
@@ -840,16 +898,19 @@ class DateWidgetComponent extends React.Component {
|
|
|
840
898
|
} = this.props;
|
|
841
899
|
closePopupOnly(e);
|
|
842
900
|
}
|
|
901
|
+
|
|
843
902
|
handleDateIconClick(e) {
|
|
844
903
|
this.handleTogglePopup(e);
|
|
845
904
|
this.valueInput && this.valueInput.focus({
|
|
846
905
|
preventScroll: true
|
|
847
906
|
});
|
|
848
907
|
}
|
|
908
|
+
|
|
849
909
|
handleBlurSelectionRange() {
|
|
850
910
|
let focusOrder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
851
911
|
let oldFocusOrder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
852
912
|
const isAllowedDateType = this.handleGetAllowedType();
|
|
913
|
+
|
|
853
914
|
if (isAllowedDateType) {
|
|
854
915
|
// if (focusOrder !== oldFocusOrder) {
|
|
855
916
|
const {
|
|
@@ -860,26 +921,27 @@ class DateWidgetComponent extends React.Component {
|
|
|
860
921
|
} = dateFormatSelection;
|
|
861
922
|
const {
|
|
862
923
|
isPopupOpen
|
|
863
|
-
} = this.props;
|
|
924
|
+
} = this.props; // const { type: oldFocusedType = '' } = order[oldFocusOrder] || {};
|
|
864
925
|
|
|
865
|
-
// const { type: oldFocusedType = '' } = order[oldFocusOrder] || {};
|
|
866
926
|
const {
|
|
867
927
|
type: focusedType = ''
|
|
868
928
|
} = order[focusOrder] || {};
|
|
869
929
|
const {
|
|
870
|
-
/*isActive,*/
|
|
930
|
+
/*isActive,*/
|
|
931
|
+
isYearView,
|
|
871
932
|
isMonthOpen: oldIsMonthOpen
|
|
872
933
|
} = this.getDateTimeStateValues();
|
|
873
934
|
const yearViewTypes = ['month', 'year'];
|
|
874
935
|
const isMonthOpen = focusedType === 'month';
|
|
936
|
+
|
|
875
937
|
if (isPopupOpen) {
|
|
876
938
|
if (yearViewTypes.indexOf(focusedType) >= 0 && (!isYearView || isMonthOpen !== oldIsMonthOpen)) {
|
|
877
939
|
this.DateTimeYearViewToggle(true, isMonthOpen);
|
|
878
940
|
} else if (yearViewTypes.indexOf(focusedType) === -1 && isYearView) {
|
|
879
941
|
this.DateTimeYearViewToggle(false, false);
|
|
880
942
|
}
|
|
881
|
-
}
|
|
882
|
-
|
|
943
|
+
} // }
|
|
944
|
+
|
|
883
945
|
}
|
|
884
946
|
}
|
|
885
947
|
|
|
@@ -919,7 +981,10 @@ class DateWidgetComponent extends React.Component {
|
|
|
919
981
|
positionsOffset,
|
|
920
982
|
targetOffset,
|
|
921
983
|
isRestrictScroll,
|
|
922
|
-
dropBoxPortalId
|
|
984
|
+
dropBoxPortalId,
|
|
985
|
+
a11y,
|
|
986
|
+
boxSize,
|
|
987
|
+
onError
|
|
923
988
|
} = this.props;
|
|
924
989
|
const {
|
|
925
990
|
selected: value = '',
|
|
@@ -935,11 +1000,13 @@ class DateWidgetComponent extends React.Component {
|
|
|
935
1000
|
className: `${style.container}`
|
|
936
1001
|
}, children ? /*#__PURE__*/React.createElement("div", {
|
|
937
1002
|
"data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : `${dataId}_widget`}`,
|
|
1003
|
+
"data-test-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : `${dataId}_widget`}`,
|
|
938
1004
|
onClick: isDisabled || isReadOnly ? null : this.handleTogglePopup,
|
|
939
1005
|
ref: getTargetRef,
|
|
940
1006
|
className: `${className ? className : ''} ${isDisabled ? style.disabled : style.enabled}`
|
|
941
1007
|
}, children) : /*#__PURE__*/React.createElement("div", {
|
|
942
1008
|
"data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : `${dataId}_widget`}`,
|
|
1009
|
+
"data-test-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : `${dataId}_widget`}`,
|
|
943
1010
|
className: `${className ? className : ''} ${style.textBox} ${isPopupOpen && !isDisabled ? style.textBoxFocus : ''} ${isDisabled ? style.disabled : isReadOnly ? style.readOnly : style.enabled}`,
|
|
944
1011
|
onClick: !isAllowedDateType ? isDisabled || isReadOnly ? null : this.handleTogglePopup : null,
|
|
945
1012
|
ref: getTargetRef
|
|
@@ -969,7 +1036,8 @@ class DateWidgetComponent extends React.Component {
|
|
|
969
1036
|
},
|
|
970
1037
|
iconOnHover: iconOnHover,
|
|
971
1038
|
isFocus: isPopupReady,
|
|
972
|
-
autoComplete: false
|
|
1039
|
+
autoComplete: false,
|
|
1040
|
+
a11y: a11y
|
|
973
1041
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
974
1042
|
align: "both",
|
|
975
1043
|
onClick: isDisabled || isReadOnly ? null : this.handleDateIconClick
|
|
@@ -1004,24 +1072,27 @@ class DateWidgetComponent extends React.Component {
|
|
|
1004
1072
|
positionsOffset: positionsOffset,
|
|
1005
1073
|
targetOffset: targetOffset,
|
|
1006
1074
|
isRestrictScroll: isRestrictScroll,
|
|
1007
|
-
dropBoxPortalId: dropBoxPortalId
|
|
1075
|
+
dropBoxPortalId: dropBoxPortalId,
|
|
1076
|
+
boxSize: boxSize,
|
|
1077
|
+
onError: onError
|
|
1008
1078
|
}));
|
|
1009
1079
|
}
|
|
1080
|
+
|
|
1010
1081
|
}
|
|
1082
|
+
|
|
1011
1083
|
DateWidgetComponent.defaultProps = DateWidget_defaultProps;
|
|
1012
1084
|
DateWidgetComponent.propTypes = DateWidget_propTypes;
|
|
1013
1085
|
const DateWidget = Popup(DateWidgetComponent);
|
|
1014
|
-
DateWidget.defaultProps = DateWidgetComponent.defaultProps;
|
|
1015
|
-
|
|
1016
|
-
//
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
}
|
|
1086
|
+
DateWidget.defaultProps = DateWidgetComponent.defaultProps; // eslint-disable-next-line no-undef
|
|
1087
|
+
// if (__DOCS__) {
|
|
1088
|
+
// DateWidgetComponent.docs = {
|
|
1089
|
+
// componentGroup: 'Form Elements',
|
|
1090
|
+
// folderName: 'Style Guide',
|
|
1091
|
+
// external: true,
|
|
1092
|
+
// description: ' '
|
|
1093
|
+
// };
|
|
1094
|
+
// // eslint-disable-next-line react/forbid-foreign-prop-types
|
|
1095
|
+
// DateWidget.propTypes = DateWidgetComponent.propTypes;
|
|
1096
|
+
// }
|
|
1097
|
+
|
|
1027
1098
|
export default DateWidget;
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
}
|
|
15
15
|
.inputLine {
|
|
16
16
|
position: absolute;
|
|
17
|
-
bottom: 0;
|
|
17
|
+
bottom: 0 ;
|
|
18
18
|
transition: border var(--zd_transition2) linear 0s;
|
|
19
19
|
border-bottom: 1px solid var(--zdt_datewidget_input_border);
|
|
20
20
|
}
|
|
21
21
|
[dir=ltr] .inputLine {
|
|
22
|
-
left: 0;
|
|
23
|
-
right: 0;
|
|
22
|
+
left: 0 ;
|
|
23
|
+
right: 0 ;
|
|
24
24
|
}
|
|
25
25
|
[dir=rtl] .inputLine {
|
|
26
|
-
right: 0;
|
|
27
|
-
left: 0;
|
|
26
|
+
right: 0 ;
|
|
27
|
+
left: 0 ;
|
|
28
28
|
}
|
|
29
29
|
.enabled:hover .inputLine {
|
|
30
30
|
border-bottom-color: var(--zdt_datewidget_enabled_border);
|
package/es/DateTime/DaysRow.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/* eslint-disable react/forbid-component-props */
|
|
2
|
+
|
|
2
3
|
/** ** Libraries *** */
|
|
3
4
|
import React, { PureComponent } from 'react';
|
|
4
|
-
|
|
5
5
|
/** ** CSS *** */
|
|
6
|
-
import style from './DateTime.module.css';
|
|
7
6
|
|
|
7
|
+
import style from './DateTime.module.css';
|
|
8
8
|
/** ** Components *** */
|
|
9
|
+
|
|
9
10
|
import { Container, Box } from '../Layout';
|
|
10
11
|
export default class DaysRow extends PureComponent {
|
|
11
12
|
render() {
|
|
@@ -20,7 +21,9 @@ export default class DaysRow extends PureComponent {
|
|
|
20
21
|
}, dayNames.map((dayName, index) => /*#__PURE__*/React.createElement(Box, {
|
|
21
22
|
key: dayName,
|
|
22
23
|
className: `${style.daysStr} ${style.grid} ${index === 0 ? style.sunday : ''}`,
|
|
23
|
-
"data-title": dayName
|
|
24
|
+
"data-title": dayName,
|
|
25
|
+
"aria-label": dayName
|
|
24
26
|
}, dayNamesShort[index])));
|
|
25
27
|
}
|
|
28
|
+
|
|
26
29
|
}
|