@zohodesk/components 1.0.0-temp-79 → 1.0.0-temp-80
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 +1084 -1079
- package/assets/Appearance/dark/mode/contrast/darkContrast.module.css +343 -0
- package/assets/Appearance/dark/themes/blue/contrast/blueDarkCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/dark/themes/green/contrast/greenDarkCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/dark/themes/orange/contrast/orangeDarkCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/dark/themes/red/contrast/redDarkCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/dark/themes/yellow/contrast/yellowDarkCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/default/mode/contrast/defaultContrast.module.css +343 -0
- package/assets/Appearance/default/themes/blue/contrast/blueDefaultCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/default/themes/green/contrast/greenDefaultCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/default/themes/orange/contrast/orangeDefaultCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/default/themes/red/contrast/redDefaultCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/default/themes/yellow/contrast/yellowDefaultCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/pureDark/mode/contrast/pureDarkContrast.module.css +343 -0
- package/assets/Appearance/pureDark/themes/blue/contrast/bluePureDarkCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/pureDark/themes/green/contrast/greenPureDarkCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/pureDark/themes/orange/contrast/orangePureDarkCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/pureDark/themes/red/contrast/redPureDarkCTAThemeContrast.module.css +34 -0
- package/assets/Appearance/pureDark/themes/yellow/contrast/yellowPureDarkCTAThemeContrast.module.css +34 -0
- package/docs/external/active-line.js +72 -72
- package/docs/external/autorefresh.js +47 -47
- package/docs/external/codemirror.js +9681 -9681
- package/docs/external/css/hopscotch.css +576 -576
- package/docs/external/css/styleGuide.css +1100 -1100
- package/docs/external/css.js +466 -466
- package/docs/external/designTokens.js +1 -1
- package/docs/external/foldcode.js +151 -151
- package/docs/external/format.js +129 -129
- package/docs/external/htmlmixed.js +84 -84
- package/docs/external/index.html +127 -127
- package/docs/external/javascript.js +422 -422
- package/docs/external/jsx.js +147 -147
- package/docs/external/matchbrackets.js +145 -145
- package/docs/external/xml.js +322 -322
- package/docs/package.json +41 -41
- package/docs/src/index.js +1311 -1311
- package/es/Accordion/Accordion.js +0 -7
- package/es/Accordion/AccordionItem.js +0 -4
- package/es/Accordion/docs/Accordion__Demo.docs.js +0 -2
- package/es/Animation/Animation.js +0 -3
- package/es/Animation/docs/Animation__default.docs.js +0 -2
- package/es/Animation/docs/Animation__fadeIn.docs.js +0 -2
- package/es/Animation/docs/Animation__scaleIn.docs.js +0 -2
- package/es/Animation/docs/Animation__skewIn.docs.js +0 -2
- package/es/Animation/docs/Animation__slideDown.docs.js +0 -2
- package/es/Animation/docs/Animation__slideLeft.docs.js +0 -2
- package/es/Animation/docs/Animation__zoomIn.docs.js +0 -2
- package/es/AppContainer/AppContainer.js +3 -14
- package/es/AppContainer/AppContainer.module.css +18 -18
- package/es/AppContainer/docs/AppContainer__default.docs.js +0 -2
- package/es/Avatar/Avatar.js +45 -51
- package/es/Avatar/Avatar.module.css +135 -115
- package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +288 -288
- package/es/Avatar/docs/Avatar__custom.docs.js +1 -3
- package/es/Avatar/docs/Avatar__default.docs.js +1 -3
- package/es/Avatar/docs/Avatar__palette.docs.js +1 -3
- package/es/Avatar/docs/Avatar__text.docs.js +1 -3
- package/es/Avatar/props/defaultProps.js +2 -1
- package/es/Avatar/props/propTypes.js +2 -1
- package/es/AvatarTeam/AvatarTeam.js +8 -11
- package/es/AvatarTeam/AvatarTeam.module.css +161 -147
- package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +226 -226
- package/es/AvatarTeam/docs/AvatarTeam__custom.docs.js +0 -2
- package/es/AvatarTeam/docs/AvatarTeam__default.docs.js +0 -2
- package/es/AvatarTeam/docs/AvatarTeam__palette.docs.js +0 -2
- package/es/AvatarTeam/docs/AvatarTeam__size.docs.js +0 -2
- package/es/Button/Button.js +4 -8
- package/es/Button/Button.module.css +521 -448
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +191 -191
- package/es/Button/docs/Button__custom.docs.js +11 -13
- package/es/Button/docs/Button__default.docs.js +11 -13
- package/es/Buttongroup/Buttongroup.js +1 -4
- package/es/Buttongroup/Buttongroup.module.css +89 -60
- package/es/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +146 -146
- package/es/Buttongroup/docs/Buttongroup__custom.docs.js +0 -2
- package/es/Buttongroup/docs/Buttongroup__footer.docs.js +0 -2
- package/es/Buttongroup/docs/Buttongroup__header.docs.js +0 -2
- package/es/Card/Card.js +11 -26
- package/es/Card/Card.module.css +20 -20
- package/es/Card/docs/Card__Custom.docs.js +0 -2
- package/es/Card/docs/Card__Default.docs.js +0 -2
- package/es/Card/docs/Card__Scroll.docs.js +0 -3
- package/es/CheckBox/CheckBox.js +1 -6
- package/es/CheckBox/CheckBox.module.css +157 -151
- package/es/CheckBox/docs/CheckBox__custom.docs.js +12 -16
- package/es/CheckBox/docs/CheckBox__default.docs.js +12 -16
- package/es/DateTime/CalendarView.js +4 -23
- package/es/DateTime/DateTime.js +6 -74
- package/es/DateTime/DateTime.module.css +187 -160
- package/es/DateTime/DateTimePopupFooter.js +2 -4
- package/es/DateTime/DateTimePopupHeader.js +2 -8
- package/es/DateTime/DateWidget.js +34 -101
- package/es/DateTime/DateWidget.module.css +38 -34
- package/es/DateTime/DaysRow.js +2 -4
- package/es/DateTime/Time.js +2 -10
- package/es/DateTime/YearView.js +4 -28
- package/es/DateTime/YearView.module.css +81 -71
- package/es/DateTime/__tests__/CalendarView.spec.js +0 -1
- package/es/DateTime/__tests__/DateTime.spec.js +0 -1
- package/es/DateTime/__tests__/DateWidget.spec.js +3 -2
- package/es/DateTime/common.js +0 -3
- package/es/DateTime/constants.js +0 -1
- package/es/DateTime/dateFormatUtils/dateFormat.js +30 -63
- package/es/DateTime/dateFormatUtils/dayChange.js +4 -13
- package/es/DateTime/dateFormatUtils/index.js +2 -28
- package/es/DateTime/dateFormatUtils/monthChange.js +0 -8
- package/es/DateTime/dateFormatUtils/timeChange.js +6 -22
- package/es/DateTime/dateFormatUtils/yearChange.js +2 -11
- package/es/DateTime/docs/DateTime__default.docs.js +6 -9
- package/es/DateTime/docs/DateWidget__default.docs.js +0 -5
- package/es/DateTime/index.js +0 -0
- package/es/DateTime/objectUtils.js +20 -14
- package/es/DateTime/typeChecker.js +0 -3
- package/es/DateTime/validator.js +6 -58
- package/es/DropBox/DropBox.js +6 -29
- package/es/DropBox/DropBox.module.css +406 -370
- package/es/DropBox/DropBoxPositionMapping.json +144 -144
- package/es/DropBox/docs/DropBox__custom.docs.js +25 -27
- package/es/DropBox/docs/DropBox__customOrder.docs.js +0 -7
- package/es/DropBox/docs/DropBox__fixedPosition.docs.js +0 -7
- package/es/DropBox/docs/DropBox__position.docs.js +35 -37
- package/es/DropBox/docs/DropBox__size.docs.js +28 -30
- package/es/DropDown/DropDown.js +1 -9
- package/es/DropDown/DropDown.module.css +5 -5
- package/es/DropDown/DropDownHeading.js +2 -4
- package/es/DropDown/DropDownHeading.module.css +53 -49
- package/es/DropDown/DropDownItem.js +0 -6
- package/es/DropDown/DropDownItem.module.css +94 -68
- package/es/DropDown/DropDownSearch.js +0 -4
- package/es/DropDown/DropDownSearch.module.css +14 -14
- package/es/DropDown/DropDownSeparator.js +0 -1
- package/es/DropDown/DropDownSeparator.module.css +7 -7
- package/es/DropDown/__tests__/DropDown.spec.js +2 -1
- package/es/DropDown/docs/DropDownHeading__custom.docs.js +0 -2
- package/es/DropDown/docs/DropDownHeading__default.docs.js +0 -2
- package/es/Heading/Heading.js +2 -13
- package/es/Heading/Heading.module.css +5 -5
- package/es/Heading/docs/Heading__default.docs.js +3 -6
- package/es/Heading/props/propTypes.js +1 -4
- package/es/Label/Label.js +2 -4
- package/es/Label/Label.module.css +52 -52
- package/es/Label/LabelColors.module.css +20 -20
- package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +101 -101
- package/es/Label/docs/Label__clipped.docs.js +0 -2
- package/es/Label/docs/Label__custom.docs.js +0 -2
- package/es/Label/docs/Label__palette.docs.js +0 -2
- package/es/Label/docs/Label__size.docs.js +0 -2
- package/es/Label/docs/Label__type.docs.js +0 -2
- package/es/Layout/Box.js +0 -13
- package/es/Layout/Container.js +1 -12
- package/es/Layout/Layout.module.css +335 -335
- package/es/Layout/docs/Layout__Hidden.docs.js +0 -1
- package/es/Layout/docs/Layout__default.docs.js +0 -1
- package/es/Layout/docs/Layout__four_Column.docs.js +0 -1
- package/es/Layout/docs/Layout__three_Column.docs.js +0 -1
- package/es/Layout/docs/Layout__two_Column.docs.js +0 -1
- package/es/Layout/utils.js +0 -0
- package/es/LightNightMode/Colors.json +496 -496
- package/es/LightNightMode/docs/AlternativeColors.docs.js +0 -2
- package/es/ListItem/ListContainer.js +1 -9
- package/es/ListItem/ListItem.js +1 -10
- package/es/ListItem/ListItem.module.css +209 -177
- package/es/ListItem/ListItemWithAvatar.js +2 -10
- package/es/ListItem/ListItemWithCheckBox.js +1 -8
- package/es/ListItem/ListItemWithIcon.js +1 -9
- package/es/ListItem/ListItemWithRadio.js +1 -8
- package/es/ListItem/docs/ListItemWithAvatar__custom.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithAvatar__default.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithCheckBox__custom.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithCheckBox__default.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithIcon__custom.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithIcon__default.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithRadio__custom.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithRadio__default.docs.js +0 -2
- package/es/ListItem/docs/ListItem__custom.docs.js +0 -2
- package/es/ListItem/docs/ListItem__default.docs.js +0 -2
- package/es/Modal/Modal.js +9 -29
- package/es/Modal/__docs__/Modal__default.docs.js +1 -5
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +16 -95
- package/es/MultiSelect/AdvancedMultiSelect.js +11 -37
- package/es/MultiSelect/EmptyState.js +0 -2
- package/es/MultiSelect/MultiSelect.js +36 -105
- package/es/MultiSelect/MultiSelect.module.css +205 -188
- package/es/MultiSelect/MultiSelectHeader.js +0 -3
- package/es/MultiSelect/MultiSelectWithAvatar.js +5 -14
- package/es/MultiSelect/SelectedOptions.js +4 -7
- package/es/MultiSelect/SelectedOptions.module.css +15 -9
- package/es/MultiSelect/Suggestions.js +4 -8
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +6 -4
- package/es/MultiSelect/docs/AdvancedGroupMultiSelect__default.docs.js +0 -7
- package/es/MultiSelect/docs/AdvancedMultiSelect__default.docs.js +1 -7
- package/es/MultiSelect/docs/MultiSelectWithAvatar__default.docs.js +1 -5
- package/es/MultiSelect/docs/MultiSelect__default.docs.js +1 -6
- package/es/MultiSelect/props/propTypes.js +0 -2
- package/es/PopOver/PopOver.js +0 -18
- package/es/PopOver/PopOver.module.css +8 -8
- package/es/PopOver/__tests__/PopOver.spec.js +1 -2
- package/es/PopOver/docs/PopOver__default.docs.js +0 -2
- package/es/Popup/Popup.js +25 -78
- package/es/Popup/PositionMapping.json +73 -73
- package/es/Popup/__tests__/Popup.spec.js +5 -17
- package/es/Popup/viewPort.js +4 -16
- package/es/Provider/IdProvider.js +2 -9
- package/es/Provider/LibraryContext.js +4 -6
- package/es/Provider/NumberGenerator/NumberGenerator.js +7 -21
- package/es/Provider/ZindexProvider.js +2 -9
- package/es/Provider/docs/Provider_Id__Class.docs.js +3 -4
- package/es/Provider/docs/Provider_Id__Function.docs.js +0 -1
- package/es/Provider/docs/Provider_Zindex__Class.docs.js +3 -4
- package/es/Provider/docs/Provider_Zindex__Function.docs.js +0 -1
- package/es/Provider.js +36 -11
- package/es/Radio/Radio.js +0 -4
- package/es/Radio/Radio.module.css +112 -106
- package/es/Radio/docs/Radio__custom.docs.js +12 -16
- package/es/Radio/docs/Radio__default.docs.js +12 -16
- package/es/Responsive/CustomResponsive.js +18 -28
- package/es/Responsive/RefWrapper.js +7 -6
- package/es/Responsive/ResizeComponent.js +25 -35
- package/es/Responsive/ResizeObserver.js +6 -26
- package/es/Responsive/Responsive.js +20 -35
- package/es/Responsive/docs/Responsive__Custom.docs.js +22 -14
- package/es/Responsive/docs/Responsive__default.docs.js +1 -3
- package/es/Responsive/docs/style.module.css +55 -46
- package/es/Responsive/sizeObservers.js +7 -28
- package/es/Responsive/utils/index.js +5 -7
- package/es/Responsive/utils/shallowCompare.js +2 -7
- package/es/Responsive/windowResizeObserver.js +0 -7
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +1 -5
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -6
- package/es/Ribbon/Ribbon.js +0 -3
- package/es/Ribbon/Ribbon.module.css +376 -311
- package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +163 -163
- package/es/Ribbon/docs/Ribbon__custom.docs.js +13 -14
- package/es/Ribbon/docs/Ribbon__default.docs.js +13 -14
- package/es/RippleEffect/RippleEffect.js +0 -1
- package/es/RippleEffect/RippleEffect.module.css +92 -110
- package/es/RippleEffect/docs/RippleEffect__default.docs.js +12 -14
- package/es/Select/GroupSelect.js +13 -60
- package/es/Select/Select.js +35 -85
- package/es/Select/Select.module.css +106 -96
- package/es/Select/SelectWithAvatar.js +3 -20
- package/es/Select/SelectWithIcon.js +2 -41
- package/es/Select/__tests__/Select.spec.js +8 -6
- package/es/Select/docs/GroupSelect__default.docs.js +1 -6
- package/es/Select/docs/SelectWithAvatar__default.docs.js +0 -4
- package/es/Select/docs/SelectWithIcon__default.docs.js +0 -4
- package/es/Select/docs/Select__default.docs.js +0 -5
- package/es/Select/props/propTypes.js +0 -1
- package/es/Stencils/Stencils.js +0 -3
- package/es/Stencils/Stencils.module.css +96 -78
- package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +49 -49
- package/es/Stencils/docs/Stencils__custom.docs.js +0 -2
- package/es/Stencils/docs/Stencils__default.docs.js +0 -2
- package/es/Switch/Switch.js +1 -6
- package/es/Switch/Switch.module.css +110 -111
- package/es/Switch/docs/Switch__custom.docs.js +12 -14
- package/es/Switch/docs/Switch__default.docs.js +12 -14
- package/es/Tab/Tab.js +2 -5
- package/es/Tab/Tab.module.css +101 -92
- package/es/Tab/TabContent.js +0 -1
- package/es/Tab/TabContent.module.css +4 -4
- package/es/Tab/TabContentWrapper.js +0 -2
- package/es/Tab/TabWrapper.js +3 -6
- package/es/Tab/Tabs.js +25 -72
- package/es/Tab/Tabs.module.css +141 -107
- package/es/Tab/__tests__/Tab.spec.js +2 -1
- package/es/Tab/__tests__/TabWrapper.spec.js +0 -1
- package/es/Tab/docs/Tab__default.docs.js +0 -5
- package/es/Tab/docs/tabdocs.module.css +29 -29
- package/es/Tag/Tag.js +9 -14
- package/es/Tag/Tag.module.css +254 -232
- package/es/Tag/docs/Tag__custom.docs.js +11 -13
- package/es/Tag/docs/Tag__default.docs.js +11 -13
- package/es/TextBox/TextBox.js +1 -16
- package/es/TextBox/TextBox.module.css +157 -161
- package/es/TextBox/__tests__/TextBox.spec.js +4 -1
- package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +127 -127
- package/es/TextBox/docs/TextBox__custom.docs.js +0 -2
- package/es/TextBox/docs/TextBox__default.docs.js +0 -2
- package/es/TextBox/docs/TextBox__size.docs.js +0 -2
- package/es/TextBox/docs/TextBox__variant.docs.js +0 -2
- package/es/TextBoxIcon/TextBoxIcon.js +1 -8
- package/es/TextBoxIcon/TextBoxIcon.module.css +78 -71
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +7 -2
- package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +334 -334
- package/es/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +0 -2
- package/es/TextBoxIcon/docs/TextBoxIcon__default.docs.js +0 -2
- package/es/Textarea/Textarea.js +1 -13
- package/es/Textarea/Textarea.module.css +139 -140
- package/es/Textarea/__tests__/Textarea.spec.js +2 -2
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +97 -97
- package/es/Textarea/docs/Textarea__animated.docs.js +0 -2
- package/es/Textarea/docs/Textarea__custom.docs.js +0 -2
- package/es/Textarea/docs/Textarea__default.docs.js +0 -2
- package/es/Textarea/docs/Textarea__disabled.docs.js +0 -2
- package/es/Tooltip/Tooltip.js +11 -58
- package/es/Tooltip/Tooltip.module.css +109 -108
- package/es/Tooltip/__tests__/Tooltip.spec.js +0 -5
- package/es/Tooltip/docs/Tooltip__default.docs.js +63 -67
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -3
- package/es/VelocityAnimation/VelocityAnimation/docs/VelocityAnimation__demo.docs.js +0 -5
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +3 -8
- package/es/VelocityAnimation/VelocityAnimationGroup/docs/VelocityAnimationGroup__demo.docs.js +17 -28
- package/es/common/animation.module.css +624 -426
- package/es/common/avatarsizes.module.css +44 -44
- package/es/common/basic.module.css +33 -33
- package/es/common/basicReset.module.css +40 -50
- package/es/common/common.module.css +524 -478
- package/es/common/customscroll.module.css +89 -93
- package/es/common/docStyle.module.css +887 -719
- package/es/common/reset.module.css +12 -12
- package/es/common/transition.module.css +146 -106
- package/es/deprecated/AdvancedMultiSelect.module.css +126 -112
- package/es/deprecated/PortalLayer/PortalLayer.js +17 -25
- package/es/deprecated/PortalLayer/docs/PortalLayer__default.docs.js +0 -7
- package/es/index.js +2 -1
- package/es/semantic/Button/Button.js +0 -3
- package/es/semantic/Button/docs/Button__default.docs.js +0 -3
- package/es/semantic/Button/semanticButton.module.css +9 -9
- package/es/utils/Common.js +5 -47
- package/es/utils/ContextOptimizer.js +5 -4
- package/es/utils/__tests__/debounce.spec.js +2 -2
- package/es/utils/constructFullName.js +0 -2
- package/es/utils/datetime/common.js +5 -16
- package/es/utils/debounce.js +1 -5
- package/es/utils/dropDownUtils.js +11 -67
- package/es/utils/getInitial.js +0 -4
- package/es/utils/shallowEqual.js +0 -6
- package/lib/Accordion/Accordion.js +102 -0
- package/lib/Accordion/AccordionItem.js +84 -0
- package/lib/Accordion/__tests__/Accordion.spec.js +82 -0
- package/lib/Accordion/docs/Accordion__Demo.docs.js +104 -0
- package/lib/Accordion/index.js +20 -0
- package/lib/Accordion/props/defaultProps.js +16 -0
- package/lib/Accordion/props/propTypes.js +39 -0
- package/lib/Animation/Animation.js +161 -0
- package/lib/Animation/__tests__/Animation.spec.js +19 -0
- package/lib/Animation/docs/Animation__default.docs.js +61 -0
- package/lib/Animation/docs/Animation__fadeIn.docs.js +61 -0
- package/lib/Animation/docs/Animation__scaleIn.docs.js +61 -0
- package/lib/Animation/docs/Animation__skewIn.docs.js +61 -0
- package/lib/Animation/docs/Animation__slideDown.docs.js +61 -0
- package/lib/Animation/docs/Animation__slideLeft.docs.js +61 -0
- package/lib/Animation/docs/Animation__zoomIn.docs.js +61 -0
- package/lib/Animation/props/defaultProps.js +14 -0
- package/lib/Animation/props/propTypes.js +20 -0
- package/lib/AppContainer/AppContainer.js +156 -0
- package/lib/AppContainer/AppContainer.module.css +18 -0
- package/lib/AppContainer/docs/AppContainer__default.docs.js +47 -0
- package/lib/AppContainer/props/defaultProps.js +15 -0
- package/lib/AppContainer/props/propTypes.js +23 -0
- package/lib/Avatar/Avatar.js +199 -0
- package/lib/Avatar/Avatar.module.css +135 -0
- package/lib/Avatar/__tests__/Avatar.spec.js +164 -0
- package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +288 -0
- package/lib/Avatar/docs/Avatar__custom.docs.js +62 -0
- package/lib/Avatar/docs/Avatar__default.docs.js +60 -0
- package/lib/Avatar/docs/Avatar__palette.docs.js +82 -0
- package/lib/Avatar/docs/Avatar__text.docs.js +61 -0
- package/lib/Avatar/props/defaultProps.js +21 -0
- package/lib/Avatar/props/propTypes.js +31 -0
- package/lib/AvatarTeam/AvatarTeam.js +99 -0
- package/lib/AvatarTeam/AvatarTeam.module.css +161 -0
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +79 -0
- package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +226 -0
- package/lib/AvatarTeam/docs/AvatarTeam__custom.docs.js +100 -0
- package/lib/AvatarTeam/docs/AvatarTeam__default.docs.js +58 -0
- package/lib/AvatarTeam/docs/AvatarTeam__palette.docs.js +77 -0
- package/lib/AvatarTeam/docs/AvatarTeam__size.docs.js +76 -0
- package/lib/AvatarTeam/props/defaultProps.js +20 -0
- package/lib/AvatarTeam/props/propTypes.js +31 -0
- package/lib/Button/Button.js +90 -0
- package/lib/Button/Button.module.css +522 -0
- package/lib/Button/__tests__/Button.spec.js +193 -0
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +191 -0
- package/lib/Button/docs/Button__custom.docs.js +800 -0
- package/lib/Button/docs/Button__default.docs.js +565 -0
- package/lib/Button/props/defaultProps.js +22 -0
- package/lib/Button/props/propTypes.js +30 -0
- package/lib/Buttongroup/Buttongroup.js +69 -0
- package/lib/Buttongroup/Buttongroup.module.css +89 -0
- package/lib/Buttongroup/__test__/Buttongroup.spec.js +76 -0
- package/lib/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +146 -0
- package/lib/Buttongroup/docs/Buttongroup__custom.docs.js +64 -0
- package/lib/Buttongroup/docs/Buttongroup__footer.docs.js +60 -0
- package/lib/Buttongroup/docs/Buttongroup__header.docs.js +71 -0
- package/lib/Buttongroup/props/defaultProps.js +11 -0
- package/lib/Buttongroup/props/propTypes.js +15 -0
- package/lib/Card/Card.js +301 -0
- package/lib/Card/Card.module.css +20 -0
- package/lib/Card/__tests__/Card.spec.js +47 -0
- package/lib/Card/docs/Card__Custom.docs.js +63 -0
- package/lib/Card/docs/Card__Default.docs.js +66 -0
- package/lib/Card/docs/Card__Scroll.docs.js +87 -0
- package/lib/Card/index.js +33 -0
- package/lib/Card/props/defaultProps.js +23 -0
- package/lib/Card/props/propTypes.js +54 -0
- package/lib/CheckBox/CheckBox.js +183 -0
- package/lib/CheckBox/CheckBox.module.css +157 -0
- package/lib/CheckBox/__tests__/CheckBox.spec.js +15 -0
- package/lib/CheckBox/docs/CheckBox__custom.docs.js +323 -0
- package/lib/CheckBox/docs/CheckBox__default.docs.js +249 -0
- package/lib/CheckBox/props/defaultProps.js +25 -0
- package/lib/CheckBox/props/propTypes.js +49 -0
- package/lib/DateTime/CalendarView.js +216 -0
- package/lib/DateTime/DateTime.js +766 -0
- package/lib/DateTime/DateTime.module.css +188 -0
- package/lib/DateTime/DateTimePopupFooter.js +65 -0
- package/lib/DateTime/DateTimePopupHeader.js +117 -0
- package/lib/DateTime/DateWidget.js +1015 -0
- package/lib/DateTime/DateWidget.module.css +38 -0
- package/lib/DateTime/DaysRow.js +52 -0
- package/lib/DateTime/Time.js +205 -0
- package/lib/DateTime/YearView.js +267 -0
- package/lib/DateTime/YearView.module.css +81 -0
- package/lib/DateTime/__tests__/CalendarView.spec.js +37 -0
- package/lib/DateTime/__tests__/DateTime.spec.js +113 -0
- package/lib/DateTime/__tests__/DateWidget.spec.js +79 -0
- package/lib/DateTime/common.js +30 -0
- package/lib/DateTime/constants.js +76 -0
- package/lib/DateTime/dateFormatUtils/dateFormat.js +551 -0
- package/lib/DateTime/dateFormatUtils/dayChange.js +74 -0
- package/lib/DateTime/dateFormatUtils/index.js +225 -0
- package/lib/DateTime/dateFormatUtils/monthChange.js +84 -0
- package/lib/DateTime/dateFormatUtils/timeChange.js +208 -0
- package/lib/DateTime/dateFormatUtils/yearChange.js +108 -0
- package/lib/DateTime/docs/DateTime__default.docs.js +119 -0
- package/lib/DateTime/docs/DateWidget__default.docs.js +212 -0
- package/lib/DateTime/docs/timezonedata.json +1 -0
- package/lib/DateTime/index.js +13 -0
- package/lib/DateTime/objectUtils.js +72 -0
- package/lib/DateTime/props/defaultProps.js +61 -0
- package/lib/DateTime/props/propTypes.js +142 -0
- package/lib/DateTime/typeChecker.js +22 -0
- package/lib/DateTime/validator.js +290 -0
- package/lib/DropBox/DropBox.js +266 -0
- package/lib/DropBox/DropBox.module.css +406 -0
- package/lib/DropBox/DropBoxPositionMapping.json +145 -0
- package/lib/DropBox/__tests__/DropBox.spec.js +83 -0
- package/lib/DropBox/docs/DropBox__custom.docs.js +97 -0
- package/lib/DropBox/docs/DropBox__customOrder.docs.js +114 -0
- package/lib/DropBox/docs/DropBox__fixedPosition.docs.js +113 -0
- package/lib/DropBox/docs/DropBox__position.docs.js +118 -0
- package/lib/DropBox/docs/DropBox__size.docs.js +92 -0
- package/lib/DropBox/props/defaultProps.js +27 -0
- package/lib/DropBox/props/propTypes.js +55 -0
- package/lib/DropDown/DropDown.js +127 -0
- package/lib/DropDown/DropDown.module.css +5 -0
- package/lib/DropDown/DropDownHeading.js +64 -0
- package/lib/DropDown/DropDownHeading.module.css +53 -0
- package/lib/DropDown/DropDownItem.js +102 -0
- package/lib/DropDown/DropDownItem.module.css +94 -0
- package/lib/DropDown/DropDownSearch.js +88 -0
- package/lib/DropDown/DropDownSearch.module.css +14 -0
- package/lib/DropDown/DropDownSeparator.js +42 -0
- package/lib/DropDown/DropDownSeparator.module.css +7 -0
- package/lib/DropDown/__tests__/DropDown.spec.js +44 -0
- package/lib/DropDown/__tests__/DropDownItem.spec.js +46 -0
- package/lib/DropDown/__tests__/DropDownSearch.spec.js +14 -0
- package/lib/DropDown/docs/DropDownHeading__custom.docs.js +50 -0
- package/lib/DropDown/docs/DropDownHeading__default.docs.js +48 -0
- package/lib/DropDown/props/defaultProps.js +28 -0
- package/lib/DropDown/props/propTypes.js +89 -0
- package/lib/Heading/Heading.js +64 -0
- package/lib/Heading/Heading.module.css +5 -0
- package/lib/Heading/docs/Heading__default.docs.js +50 -0
- package/lib/Heading/props/defaultProps.js +12 -0
- package/lib/Heading/props/propTypes.js +19 -0
- package/lib/Label/Label.js +65 -0
- package/lib/Label/Label.module.css +52 -0
- package/lib/Label/LabelColors.module.css +21 -0
- package/lib/Label/__tests__/Label.spec.js +124 -0
- package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +101 -0
- package/lib/Label/docs/Label__clipped.docs.js +56 -0
- package/lib/Label/docs/Label__custom.docs.js +59 -0
- package/lib/Label/docs/Label__palette.docs.js +71 -0
- package/lib/Label/docs/Label__size.docs.js +58 -0
- package/lib/Label/docs/Label__type.docs.js +66 -0
- package/lib/Label/props/defaultProps.js +17 -0
- package/lib/Label/props/propTypes.js +22 -0
- package/lib/Layout/Box.js +104 -0
- package/lib/Layout/Container.js +122 -0
- package/lib/Layout/Layout.module.css +336 -0
- package/lib/Layout/__tests__/Box.spec.js +105 -0
- package/lib/Layout/__tests__/Container.spec.js +110 -0
- package/lib/Layout/docs/Layout__Hidden.docs.js +105 -0
- package/lib/Layout/docs/Layout__default.docs.js +77 -0
- package/lib/Layout/docs/Layout__four_Column.docs.js +107 -0
- package/lib/Layout/docs/Layout__three_Column.docs.js +104 -0
- package/lib/Layout/docs/Layout__two_Column.docs.js +97 -0
- package/lib/Layout/index.js +30 -0
- package/lib/Layout/props/defaultProps.js +20 -0
- package/lib/Layout/props/propTypes.js +51 -0
- package/lib/Layout/utils.js +45 -0
- package/lib/LightNightMode/Colors.json +497 -0
- package/lib/LightNightMode/docs/AlternativeColors.docs.js +128 -0
- package/lib/ListItem/ListContainer.js +93 -0
- package/lib/ListItem/ListItem.js +153 -0
- package/lib/ListItem/ListItem.module.css +209 -0
- package/lib/ListItem/ListItemWithAvatar.js +175 -0
- package/lib/ListItem/ListItemWithCheckBox.js +141 -0
- package/lib/ListItem/ListItemWithIcon.js +158 -0
- package/lib/ListItem/ListItemWithRadio.js +143 -0
- package/lib/ListItem/docs/ListItemWithAvatar__custom.docs.js +182 -0
- package/lib/ListItem/docs/ListItemWithAvatar__default.docs.js +139 -0
- package/lib/ListItem/docs/ListItemWithCheckBox__custom.docs.js +118 -0
- package/lib/ListItem/docs/ListItemWithCheckBox__default.docs.js +92 -0
- package/lib/ListItem/docs/ListItemWithIcon__custom.docs.js +95 -0
- package/lib/ListItem/docs/ListItemWithIcon__default.docs.js +89 -0
- package/lib/ListItem/docs/ListItemWithRadio__custom.docs.js +118 -0
- package/lib/ListItem/docs/ListItemWithRadio__default.docs.js +92 -0
- package/lib/ListItem/docs/ListItem__custom.docs.js +141 -0
- package/lib/ListItem/docs/ListItem__default.docs.js +109 -0
- package/lib/ListItem/props/defaultProps.js +97 -0
- package/lib/ListItem/props/propTypes.js +176 -0
- package/lib/Modal/Modal.js +174 -0
- package/lib/Modal/__docs__/Modal__default.docs.js +65 -0
- package/lib/Modal/props/defaultProps.js +10 -0
- package/lib/Modal/props/propTypes.js +14 -0
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +1032 -0
- package/lib/MultiSelect/AdvancedMultiSelect.js +544 -0
- package/lib/MultiSelect/EmptyState.js +85 -0
- package/lib/MultiSelect/MultiSelect.js +1035 -0
- package/lib/MultiSelect/MultiSelect.module.css +206 -0
- package/lib/MultiSelect/MultiSelectHeader.js +55 -0
- package/lib/MultiSelect/MultiSelectWithAvatar.js +296 -0
- package/lib/MultiSelect/SelectedOptions.js +97 -0
- package/lib/MultiSelect/SelectedOptions.module.css +15 -0
- package/lib/MultiSelect/Suggestions.js +158 -0
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +159 -0
- package/lib/MultiSelect/docs/AdvancedGroupMultiSelect__default.docs.js +154 -0
- package/lib/MultiSelect/docs/AdvancedMultiSelect__default.docs.js +140 -0
- package/lib/MultiSelect/docs/MultiSelectWithAvatar__default.docs.js +165 -0
- package/lib/MultiSelect/docs/MultiSelect__default.docs.js +186 -0
- package/lib/MultiSelect/props/defaultProps.js +154 -0
- package/lib/MultiSelect/props/propTypes.js +373 -0
- package/lib/PopOver/PopOver.js +252 -0
- package/lib/PopOver/PopOver.module.css +8 -0
- package/lib/PopOver/__tests__/PopOver.spec.js +17 -0
- package/lib/PopOver/docs/PopOver__default.docs.js +61 -0
- package/lib/PopOver/props/defaultProps.js +15 -0
- package/lib/PopOver/props/propTypes.js +63 -0
- package/lib/Popup/Popup.js +640 -0
- package/lib/Popup/PositionMapping.json +74 -0
- package/lib/Popup/__tests__/Popup.spec.js +155 -0
- package/lib/Popup/viewPort.js +354 -0
- package/lib/Provider/AvatarSize.js +19 -0
- package/lib/Provider/Config.js +25 -0
- package/lib/Provider/CssProvider.js +23 -0
- package/lib/Provider/IdProvider.js +68 -0
- package/lib/Provider/LibraryContext.js +54 -0
- package/lib/Provider/LibraryContextInit.js +11 -0
- package/lib/Provider/NumberGenerator/NumberGenerator.js +145 -0
- package/lib/Provider/ZindexProvider.js +57 -0
- package/lib/Provider/docs/Provider_Id__Class.docs.js +56 -0
- package/lib/Provider/docs/Provider_Id__Function.docs.js +24 -0
- package/lib/Provider/docs/Provider_Zindex__Class.docs.js +59 -0
- package/lib/Provider/docs/Provider_Zindex__Function.docs.js +29 -0
- package/lib/Provider.js +149 -0
- package/lib/Radio/Radio.js +146 -0
- package/lib/Radio/Radio.module.css +112 -0
- package/lib/Radio/__tests__/Radiospec.js +25 -0
- package/lib/Radio/docs/Radio__custom.docs.js +273 -0
- package/lib/Radio/docs/Radio__default.docs.js +197 -0
- package/lib/Radio/props/defaultProps.js +21 -0
- package/lib/Radio/props/propTypes.js +40 -0
- package/lib/Responsive/CustomResponsive.js +192 -0
- package/lib/Responsive/RefWrapper.js +47 -0
- package/lib/Responsive/ResizeComponent.js +237 -0
- package/lib/Responsive/ResizeObserver.js +151 -0
- package/lib/Responsive/Responsive.js +222 -0
- package/lib/Responsive/docs/Responsive__Custom.docs.js +247 -0
- package/lib/Responsive/docs/Responsive__default.docs.js +118 -0
- package/lib/Responsive/docs/style.module.css +56 -0
- package/lib/Responsive/index.js +28 -0
- package/lib/Responsive/props/defaultProps.js +23 -0
- package/lib/Responsive/props/propTypes.js +36 -0
- package/lib/Responsive/sizeObservers.js +176 -0
- package/lib/Responsive/utils/index.js +62 -0
- package/lib/Responsive/utils/shallowCompare.js +29 -0
- package/lib/Responsive/windowResizeObserver.js +55 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +94 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
- package/lib/ResponsiveDropBox/props/defaultProps.js +11 -0
- package/lib/ResponsiveDropBox/props/propTypes.js +15 -0
- package/lib/Ribbon/Ribbon.js +71 -0
- package/lib/Ribbon/Ribbon.module.css +377 -0
- package/lib/Ribbon/__tests__/Ribbon.spec.js +171 -0
- package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +163 -0
- package/lib/Ribbon/docs/Ribbon__custom.docs.js +414 -0
- package/lib/Ribbon/docs/Ribbon__default.docs.js +370 -0
- package/lib/Ribbon/props/defaultProps.js +15 -0
- package/lib/Ribbon/props/propTypes.js +18 -0
- package/lib/RippleEffect/RippleEffect.js +35 -0
- package/lib/RippleEffect/RippleEffect.module.css +92 -0
- package/lib/RippleEffect/docs/RippleEffect__default.docs.js +462 -0
- package/lib/RippleEffect/props/defaultProps.js +16 -0
- package/lib/RippleEffect/props/propTypes.js +19 -0
- package/lib/Select/GroupSelect.js +763 -0
- package/lib/Select/Select.js +909 -0
- package/lib/Select/Select.module.css +106 -0
- package/lib/Select/SelectWithAvatar.js +332 -0
- package/lib/Select/SelectWithIcon.js +466 -0
- package/lib/Select/__tests__/Select.spec.js +341 -0
- package/lib/Select/docs/GroupSelect__default.docs.js +173 -0
- package/lib/Select/docs/SelectWithAvatar__default.docs.js +124 -0
- package/lib/Select/docs/SelectWithIcon__default.docs.js +165 -0
- package/lib/Select/docs/Select__default.docs.js +313 -0
- package/lib/Select/props/defaultProps.js +109 -0
- package/lib/Select/props/propTypes.js +276 -0
- package/lib/Stencils/Stencils.js +57 -0
- package/lib/Stencils/Stencils.module.css +96 -0
- package/lib/Stencils/__tests__/Stencils.spec.js +72 -0
- package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +49 -0
- package/lib/Stencils/docs/Stencils__custom.docs.js +72 -0
- package/lib/Stencils/docs/Stencils__default.docs.js +77 -0
- package/lib/Stencils/props/defaultProps.js +13 -0
- package/lib/Stencils/props/propTypes.js +15 -0
- package/lib/Switch/Switch.js +123 -0
- package/lib/Switch/Switch.module.css +111 -0
- package/lib/Switch/docs/Switch__custom.docs.js +180 -0
- package/lib/Switch/docs/Switch__default.docs.js +134 -0
- package/lib/Switch/props/defaultProps.js +17 -0
- package/lib/Switch/props/propTypes.js +35 -0
- package/lib/Tab/Tab.js +116 -0
- package/lib/Tab/Tab.module.css +101 -0
- package/lib/Tab/TabContent.js +33 -0
- package/lib/Tab/TabContent.module.css +4 -0
- package/lib/Tab/TabContentWrapper.js +33 -0
- package/lib/Tab/TabWrapper.js +69 -0
- package/lib/Tab/Tabs.js +581 -0
- package/lib/Tab/Tabs.module.css +141 -0
- package/lib/Tab/__tests__/Tab.spec.js +119 -0
- package/lib/Tab/__tests__/TabContent.spec.js +18 -0
- package/lib/Tab/__tests__/TabContentWrapper.spec.js +51 -0
- package/lib/Tab/__tests__/TabWrapper.spec.js +88 -0
- package/lib/Tab/__tests__/Tabs.spec.js +109 -0
- package/lib/Tab/docs/Tab__default.docs.js +283 -0
- package/lib/Tab/docs/tabdocs.module.css +29 -0
- package/lib/Tab/index.js +41 -0
- package/lib/Tab/props/defaultProps.js +50 -0
- package/lib/Tab/props/propTypes.js +114 -0
- package/lib/Tag/Tag.js +177 -0
- package/lib/Tag/Tag.module.css +255 -0
- package/lib/Tag/__tests__/Tag.spec.js +29 -0
- package/lib/Tag/docs/Tag__custom.docs.js +397 -0
- package/lib/Tag/docs/Tag__default.docs.js +352 -0
- package/lib/Tag/props/defaultProps.js +20 -0
- package/lib/Tag/props/propTypes.js +42 -0
- package/lib/TextBox/TextBox.js +193 -0
- package/lib/TextBox/TextBox.module.css +157 -0
- package/lib/TextBox/__tests__/TextBox.spec.js +195 -0
- package/lib/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +127 -0
- package/lib/TextBox/docs/TextBox__custom.docs.js +72 -0
- package/lib/TextBox/docs/TextBox__default.docs.js +69 -0
- package/lib/TextBox/docs/TextBox__size.docs.js +67 -0
- package/lib/TextBox/docs/TextBox__variant.docs.js +67 -0
- package/lib/TextBox/props/defaultProps.js +26 -0
- package/lib/TextBox/props/propTypes.js +57 -0
- package/lib/TextBoxIcon/TextBoxIcon.js +187 -0
- package/lib/TextBoxIcon/TextBoxIcon.module.css +78 -0
- package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +219 -0
- package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +334 -0
- package/lib/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +118 -0
- package/lib/TextBoxIcon/docs/TextBoxIcon__default.docs.js +90 -0
- package/lib/TextBoxIcon/props/defaultProps.js +28 -0
- package/lib/TextBoxIcon/props/propTypes.js +57 -0
- package/lib/Textarea/Textarea.js +130 -0
- package/lib/Textarea/Textarea.module.css +139 -0
- package/lib/Textarea/__tests__/Textarea.spec.js +174 -0
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +97 -0
- package/lib/Textarea/docs/Textarea__animated.docs.js +70 -0
- package/lib/Textarea/docs/Textarea__custom.docs.js +111 -0
- package/lib/Textarea/docs/Textarea__default.docs.js +105 -0
- package/lib/Textarea/docs/Textarea__disabled.docs.js +58 -0
- package/lib/Textarea/props/defaultProps.js +23 -0
- package/lib/Textarea/props/propTypes.js +39 -0
- package/lib/Tooltip/Tooltip.js +516 -0
- package/lib/Tooltip/Tooltip.module.css +109 -0
- package/lib/Tooltip/__tests__/Tooltip.spec.js +75 -0
- package/lib/Tooltip/docs/Tooltip__default.docs.js +402 -0
- package/lib/Tooltip/props/defaultProps.js +11 -0
- package/lib/Tooltip/props/propTypes.js +16 -0
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +100 -0
- package/lib/VelocityAnimation/VelocityAnimation/docs/VelocityAnimation__demo.docs.js +123 -0
- package/lib/VelocityAnimation/VelocityAnimation/props/defaultProps.js +14 -0
- package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +20 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +131 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/docs/VelocityAnimationGroup__demo.docs.js +174 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +22 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +27 -0
- package/lib/common/animation.module.css +624 -0
- package/lib/common/avatarsizes.module.css +45 -0
- package/lib/common/basic.module.css +33 -0
- package/lib/common/basicReset.module.css +40 -0
- package/lib/common/common.module.css +525 -0
- package/lib/common/customscroll.module.css +89 -0
- package/lib/common/docStyle.module.css +887 -0
- package/lib/common/reset.module.css +12 -0
- package/lib/common/transition.module.css +146 -0
- package/lib/css.js +42 -0
- package/lib/deprecated/AdvancedMultiSelect.module.css +127 -0
- package/lib/deprecated/PortalLayer/PortalLayer.js +126 -0
- package/lib/deprecated/PortalLayer/docs/PortalLayer__default.docs.js +111 -0
- package/lib/deprecated/PortalLayer/props/defaultProps.js +12 -0
- package/lib/deprecated/PortalLayer/props/propTypes.js +19 -0
- package/lib/deprecated/advancedMultiSelectVariableJson.js +82 -0
- package/lib/index.js +1245 -0
- package/lib/semantic/Button/Button.js +81 -0
- package/lib/semantic/Button/docs/Button__default.docs.js +43 -0
- package/lib/semantic/Button/props/defaultProps.js +19 -0
- package/lib/semantic/Button/props/propTypes.js +34 -0
- package/lib/semantic/Button/semanticButton.module.css +9 -0
- package/lib/utils/Common.js +373 -0
- package/lib/utils/ContextOptimizer.js +43 -0
- package/lib/utils/__tests__/constructFullName.spec.js +11 -0
- package/lib/utils/__tests__/debounce.spec.js +39 -0
- package/lib/utils/__tests__/getInitial.spec.js +25 -0
- package/lib/utils/constant.js +10 -0
- package/lib/utils/constructFullName.js +25 -0
- package/lib/utils/datetime/common.js +206 -0
- package/lib/utils/debounce.js +25 -0
- package/lib/utils/dropDownUtils.js +491 -0
- package/lib/utils/dummyFunction.js +8 -0
- package/lib/utils/getHTMLFontSize.js +10 -0
- package/lib/utils/getInitial.js +27 -0
- package/lib/utils/scrollTo.js +20 -0
- package/lib/utils/shallowEqual.js +33 -0
- package/package.json +76 -76
- package/es/FramerAnimation/FramerAnimation.js +0 -206
- package/es/FramerAnimation/docs/FramerAnimation__default.docs.js +0 -123
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ResponsiveReceiver = ResponsiveReceiver;
|
|
8
|
+
exports.ResponsiveSender = ResponsiveSender;
|
|
9
|
+
exports.useResponsiveReceiver = useResponsiveReceiver;
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _defaultProps = require("./props/defaultProps");
|
|
12
|
+
var _propTypes = require("./props/propTypes");
|
|
13
|
+
var _ResizeObserver = _interopRequireDefault(require("./ResizeObserver"));
|
|
14
|
+
var _RefWrapper = _interopRequireDefault(require("./RefWrapper"));
|
|
15
|
+
var _shallowCompare = _interopRequireDefault(require("./utils/shallowCompare"));
|
|
16
|
+
var _sizeObservers = require("./sizeObservers");
|
|
17
|
+
var _ContextOptimizer = require("../utils/ContextOptimizer");
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
22
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
24
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
25
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
26
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
28
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
30
|
+
// const commonBreakPoints = [ 480, 640, 768, 1024, 1440 ];
|
|
31
|
+
// const otherBreakPoints = [320, 360, 375, 720, 1280, 1600, 1920];
|
|
32
|
+
|
|
33
|
+
// defaultResponsiveId means if ResponsiveSender do not recive id This will be id
|
|
34
|
+
var defaultResponsiveId = 'parent_sender';
|
|
35
|
+
|
|
36
|
+
// validSizeResponsiveId means in some parent's height and with is caluclated ( readed )
|
|
37
|
+
var validSizeResponsiveId = 'valid_sender';
|
|
38
|
+
var ResponsiveContext = /*#__PURE__*/_react["default"].createContext(_defineProperty({}, validSizeResponsiveId, _sizeObservers.windowResizeObserver));
|
|
39
|
+
function ResponsiveSender(props) {
|
|
40
|
+
// variables
|
|
41
|
+
var children = props.children,
|
|
42
|
+
domRefKey = props.domRefKey,
|
|
43
|
+
responsiveId = props.responsiveId;
|
|
44
|
+
function init() {
|
|
45
|
+
var size = {
|
|
46
|
+
height: 0,
|
|
47
|
+
width: 0
|
|
48
|
+
};
|
|
49
|
+
function getSize() {
|
|
50
|
+
return size;
|
|
51
|
+
}
|
|
52
|
+
var childContext = {
|
|
53
|
+
resize: new _sizeObservers.Subscribale(),
|
|
54
|
+
getSize: getSize,
|
|
55
|
+
// TODO: rename isParentSize ==> isSizeReaded (or) isMySize (or) isOriginalSize
|
|
56
|
+
isParentSize: false
|
|
57
|
+
};
|
|
58
|
+
function onResize(newSize) {
|
|
59
|
+
childContext.isParentSize = true;
|
|
60
|
+
size = newSize;
|
|
61
|
+
setTimeout(function () {
|
|
62
|
+
childContext.resize.dispatch(newSize);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
var observer = new _ResizeObserver["default"](onResize);
|
|
66
|
+
function containerRef(node) {
|
|
67
|
+
observer.replaceObservationElement(node);
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
containerRef: containerRef,
|
|
71
|
+
childContext: childContext
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
var _useMemo = (0, _react.useMemo)(init, []),
|
|
75
|
+
containerRef = _useMemo.containerRef,
|
|
76
|
+
childContext = _useMemo.childContext;
|
|
77
|
+
function contextSelector(context) {
|
|
78
|
+
var totalContext = _objectSpread({}, context);
|
|
79
|
+
totalContext[responsiveId] = childContext;
|
|
80
|
+
// NOTE: this for fallback of if responsive receiver id wrong or not avelable Responcive id
|
|
81
|
+
totalContext[defaultResponsiveId] = childContext;
|
|
82
|
+
if (childContext.isParentSize) {
|
|
83
|
+
totalContext[validSizeResponsiveId] = childContext;
|
|
84
|
+
}
|
|
85
|
+
return totalContext;
|
|
86
|
+
}
|
|
87
|
+
return /*#__PURE__*/_react["default"].createElement(_ContextOptimizer.ContextOptimizer, {
|
|
88
|
+
Context: ResponsiveContext,
|
|
89
|
+
calculation: contextSelector
|
|
90
|
+
}, function (totalContext) {
|
|
91
|
+
return /*#__PURE__*/_react["default"].createElement(ResponsiveContext.Provider, {
|
|
92
|
+
value: totalContext
|
|
93
|
+
}, /*#__PURE__*/_react["default"].createElement(_RefWrapper["default"], {
|
|
94
|
+
domRefKey: domRefKey,
|
|
95
|
+
ref: containerRef
|
|
96
|
+
}, children));
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
ResponsiveSender.defaultProps = _objectSpread(_objectSpread({}, _defaultProps.CustomResponsiveSender_defaultProps), {}, {
|
|
100
|
+
responsiveId: defaultResponsiveId
|
|
101
|
+
});
|
|
102
|
+
ResponsiveSender.contextType = ResponsiveContext;
|
|
103
|
+
ResponsiveSender.propTypes = _propTypes.CustomResponsiveSender_propTypes;
|
|
104
|
+
function useResponsiveReceiver() {
|
|
105
|
+
var responsiveId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultResponsiveId;
|
|
106
|
+
var query = arguments.length > 1 ? arguments[1] : undefined;
|
|
107
|
+
var _useState = (0, _react.useState)(),
|
|
108
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
109
|
+
forceUpdate = _useState2[1];
|
|
110
|
+
var totalContextData = (0, _react.useContext)(ResponsiveContext);
|
|
111
|
+
var validSizeContextData = totalContextData[validSizeResponsiveId];
|
|
112
|
+
var contextData = totalContextData[responsiveId] || totalContextData[defaultResponsiveId] || validSizeContextData; // NOTE: this for fallback of if responsive receiver id wrong
|
|
113
|
+
|
|
114
|
+
var resizeHandlerRef = (0, _react.useRef)();
|
|
115
|
+
var data = (0, _react.useRef)();
|
|
116
|
+
function updateLatestData() {
|
|
117
|
+
var size = contextData.isParentSize ? contextData.getSize() : validSizeContextData.getSize();
|
|
118
|
+
data.current = query({
|
|
119
|
+
isTouchDevice: _sizeObservers.isTouchDevice,
|
|
120
|
+
isParentSize: contextData.isParentSize,
|
|
121
|
+
currentScreenSize: size,
|
|
122
|
+
mediaQueryOR: function mediaQueryOR(breakPointArray) {
|
|
123
|
+
return breakPointArray.some(function (breakPoint) {
|
|
124
|
+
var _isBreackPointMatched = (0, _sizeObservers.isBreackPointMatched)(breakPoint, size),
|
|
125
|
+
isHeight = _isBreackPointMatched.isHeight,
|
|
126
|
+
isWidth = _isBreackPointMatched.isWidth;
|
|
127
|
+
return isHeight || isWidth;
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
mediaQueryAND: function mediaQueryAND(breakPointArray) {
|
|
131
|
+
return breakPointArray.every(function (breakPoint) {
|
|
132
|
+
var _isBreackPointMatched2 = (0, _sizeObservers.isBreackPointMatched)(breakPoint, size),
|
|
133
|
+
isHeight = _isBreackPointMatched2.isHeight,
|
|
134
|
+
isWidth = _isBreackPointMatched2.isWidth;
|
|
135
|
+
return (isHeight === undefined ? true : isHeight) && (isWidth === undefined ? true : isWidth);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
resizeHandlerRef.current = updateLatestData;
|
|
141
|
+
(0, _react.useEffect)(function () {
|
|
142
|
+
function handleResize(size) {
|
|
143
|
+
var prevData = data.current;
|
|
144
|
+
resizeHandlerRef.current(size);
|
|
145
|
+
var isSameValues = (0, _shallowCompare["default"])(data.current, prevData);
|
|
146
|
+
!isSameValues && forceUpdate({});
|
|
147
|
+
}
|
|
148
|
+
contextData.resize.subscribe(handleResize);
|
|
149
|
+
return function () {
|
|
150
|
+
return contextData.resize.unsubscribe(handleResize);
|
|
151
|
+
};
|
|
152
|
+
}, [contextData]);
|
|
153
|
+
// const prevContextDataRef = useRef();
|
|
154
|
+
// function handleResize(size) {
|
|
155
|
+
// const prevData = data.current;
|
|
156
|
+
// resizeHandlerRef.current(size);
|
|
157
|
+
// const isSammeValues = shallowCompare(data.current, prevData);
|
|
158
|
+
// !isSammeValues && forceUpdate({});
|
|
159
|
+
// }
|
|
160
|
+
// if(prevContextDataRef.current !== contextData) {
|
|
161
|
+
// prevContextDataRef.current = contextData;
|
|
162
|
+
// contextData.resize.unsubscribe(handleResize);
|
|
163
|
+
// windowResizeObserver.unobserve(handleResize);
|
|
164
|
+
// if (contextData) {
|
|
165
|
+
// contextData.resize.subscribe(handleResize);
|
|
166
|
+
// } else {
|
|
167
|
+
// windowResizeObserver.observe(handleResize);
|
|
168
|
+
|
|
169
|
+
// }
|
|
170
|
+
|
|
171
|
+
// }
|
|
172
|
+
// NOTE: this call for we must give updated value
|
|
173
|
+
updateLatestData();
|
|
174
|
+
return data.current;
|
|
175
|
+
}
|
|
176
|
+
function ResponsiveReceiver(_ref) {
|
|
177
|
+
var children = _ref.children,
|
|
178
|
+
responsiveId = _ref.responsiveId,
|
|
179
|
+
query = _ref.query,
|
|
180
|
+
eleRef = _ref.eleRef,
|
|
181
|
+
domRefKey = _ref.domRefKey;
|
|
182
|
+
var data = useResponsiveReceiver(responsiveId, query);
|
|
183
|
+
var child = children(data);
|
|
184
|
+
return eleRef ? /*#__PURE__*/_react["default"].createElement(_RefWrapper["default"], {
|
|
185
|
+
domRefKey: domRefKey,
|
|
186
|
+
ref: eleRef
|
|
187
|
+
}, child) : child;
|
|
188
|
+
}
|
|
189
|
+
ResponsiveReceiver.defaultProps = _objectSpread(_objectSpread({}, _defaultProps.CustomResponsiveReceiver_defaultProps), {}, {
|
|
190
|
+
responsiveId: defaultResponsiveId
|
|
191
|
+
});
|
|
192
|
+
ResponsiveReceiver.propTypes = _propTypes.CustomResponsiveReceiver_propTypes;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
+
function setRef(refFunc, value) {
|
|
15
|
+
if (typeof refFunc === 'function') {
|
|
16
|
+
refFunc(value);
|
|
17
|
+
} else if (refFunc instanceof Object) {
|
|
18
|
+
refFunc.current = value;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
var DOMRefWrapper = /*#__PURE__*/(0, _react.forwardRef)(function (props, refFunc) {
|
|
22
|
+
var ele = _react.Children.only(props.children);
|
|
23
|
+
var _props$domRefKey = props.domRefKey,
|
|
24
|
+
domRefKey = _props$domRefKey === void 0 ? 'eleRef' : _props$domRefKey;
|
|
25
|
+
|
|
26
|
+
// NOTE: need to check for forward Ref function, Because in Froward Ref case refKey is "ref"
|
|
27
|
+
var refKey = typeof ele.type !== 'string' ? domRefKey : 'ref';
|
|
28
|
+
// const setAttribute = useCallback(node => {
|
|
29
|
+
var eleRealRefFunc = ele.props[refKey];
|
|
30
|
+
var setAttribute = (0, _react.useCallback)(function (ref) {
|
|
31
|
+
setRef(refFunc, ref);
|
|
32
|
+
setRef(eleRealRefFunc, ref);
|
|
33
|
+
}, [refFunc, eleRealRefFunc]);
|
|
34
|
+
|
|
35
|
+
// let refKey = typeof ele.type === 'string' ? 'ref' : 'eleRef';
|
|
36
|
+
|
|
37
|
+
var childProps = _defineProperty({}, refKey, setAttribute);
|
|
38
|
+
return /*#__PURE__*/(0, _react.cloneElement)(ele, childProps);
|
|
39
|
+
});
|
|
40
|
+
DOMRefWrapper.defaultProps = {
|
|
41
|
+
domRefKey: 'eleRef'
|
|
42
|
+
};
|
|
43
|
+
DOMRefWrapper.propTypes = {
|
|
44
|
+
domRefKey: _propTypes["default"].any
|
|
45
|
+
};
|
|
46
|
+
var _default = DOMRefWrapper;
|
|
47
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _ResizeObserver = _interopRequireDefault(require("./ResizeObserver"));
|
|
11
|
+
var _Common = require("../utils/Common");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
14
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
15
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
16
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
18
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
19
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
20
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
22
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
23
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
25
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
+
var ResizeComponent = /*#__PURE__*/function (_React$Component) {
|
|
27
|
+
_inherits(ResizeComponent, _React$Component);
|
|
28
|
+
var _super = _createSuper(ResizeComponent);
|
|
29
|
+
function ResizeComponent(props) {
|
|
30
|
+
var _this;
|
|
31
|
+
_classCallCheck(this, ResizeComponent);
|
|
32
|
+
_this = _super.call(this, props);
|
|
33
|
+
_this.noSpaceForChildren = false;
|
|
34
|
+
_this.childrenCurrentList = [];
|
|
35
|
+
_this.widthCheck = (0, _Common.debounce)(_this.widthCheck.bind(_assertThisInitialized(_this)), 10);
|
|
36
|
+
// this.widthCheck = this.widthCheck.bind(this);
|
|
37
|
+
_this.onResize = _this.onResize.bind(_assertThisInitialized(_this));
|
|
38
|
+
_this.onResizeMutation = _this.onResizeMutation.bind(_assertThisInitialized(_this));
|
|
39
|
+
_this.tabsObserver = new _ResizeObserver["default"](_this.onResize);
|
|
40
|
+
_this.tabObserver = new MutationObserver(_this.onResizeMutation);
|
|
41
|
+
_this.reset = _this.reset.bind(_assertThisInitialized(_this));
|
|
42
|
+
_this.constructChildren = _this.constructChildren.bind(_assertThisInitialized(_this));
|
|
43
|
+
_this.querySelector = _this.querySelector.bind(_assertThisInitialized(_this));
|
|
44
|
+
return _this;
|
|
45
|
+
}
|
|
46
|
+
_createClass(ResizeComponent, [{
|
|
47
|
+
key: "querySelector",
|
|
48
|
+
value: function querySelector() {
|
|
49
|
+
if (this.props.wrapperDivRef && this.props.wrapperDivRef.current) {
|
|
50
|
+
return this.props.wrapperDivRef.current.querySelectorAll('[data-responsive="true"]');
|
|
51
|
+
} else {
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
key: "onResizeMutation",
|
|
57
|
+
value: function onResizeMutation(mutations) {
|
|
58
|
+
var _this2 = this;
|
|
59
|
+
// console.log(mutations);
|
|
60
|
+
var childrenList = this.props.childrenList;
|
|
61
|
+
var _iterator = _createForOfIteratorHelper(mutations),
|
|
62
|
+
_step;
|
|
63
|
+
try {
|
|
64
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
65
|
+
var mutation = _step.value;
|
|
66
|
+
if (mutation.type === 'childList') {
|
|
67
|
+
if (mutation.addedNodes.length) {
|
|
68
|
+
var newAdded = false;
|
|
69
|
+
mutation.addedNodes.forEach(function (mut) {
|
|
70
|
+
// Here we can listen for icon nodes. Confirm with bk
|
|
71
|
+
if (mut.attributes && mut.attributes['data-responsive'] && (childrenList.length !== _this2.querySelector().length || _this2.childrenCurrentList.length !== _this2.querySelector().length)) {
|
|
72
|
+
newAdded = true;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
if (newAdded) {
|
|
76
|
+
//console.log('A child node has been added ', mutation);
|
|
77
|
+
|
|
78
|
+
this.onResize();
|
|
79
|
+
}
|
|
80
|
+
} else if (mutation.removedNodes.length) {
|
|
81
|
+
// ?? removed nodes ku check pannanum ah ??
|
|
82
|
+
// console.log('A child node has been removed ', mutation);
|
|
83
|
+
}
|
|
84
|
+
} else if (mutation.type === 'attributes') {
|
|
85
|
+
//console.log('The ' + mutation.attributeName + ' attribute was modified.', mutation);
|
|
86
|
+
} else if (mutation.type === 'characterData') {
|
|
87
|
+
// To Call While Changing InnerText, Remove Below line If Required. But It might affect Performance.
|
|
88
|
+
// this.onResize();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// mutations.forEach(mutation => {
|
|
93
|
+
// if (mutation.target === foo &&
|
|
94
|
+
// mutation.attributeName === 'style' &&
|
|
95
|
+
// oldWidth !== foo.style.width) {
|
|
96
|
+
// foo.textContent = 'Width changed from ' +
|
|
97
|
+
// oldWidth + ' to ' + foo.style.width;
|
|
98
|
+
// oldWidth = foo.style.width;
|
|
99
|
+
// }
|
|
100
|
+
// });
|
|
101
|
+
} catch (err) {
|
|
102
|
+
_iterator.e(err);
|
|
103
|
+
} finally {
|
|
104
|
+
_iterator.f();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}, {
|
|
108
|
+
key: "componentDidMount",
|
|
109
|
+
value: function componentDidMount() {
|
|
110
|
+
if (this.props.wrapperDivRef && this.props.wrapperDivRef.current) {
|
|
111
|
+
this.tabsObserver.observe(this.props.wrapperDivRef.current);
|
|
112
|
+
this.tabObserver.observe(this.props.wrapperDivRef.current, {
|
|
113
|
+
characterData: true,
|
|
114
|
+
attributes: true,
|
|
115
|
+
childList: true,
|
|
116
|
+
subtree: true,
|
|
117
|
+
attributeFilter: ['data-responsive']
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}, {
|
|
122
|
+
key: "componentWillUnmount",
|
|
123
|
+
value: function componentWillUnmount() {
|
|
124
|
+
this.reset();
|
|
125
|
+
}
|
|
126
|
+
}, {
|
|
127
|
+
key: "reset",
|
|
128
|
+
value: function reset() {
|
|
129
|
+
this.childrenCurrentList = [];
|
|
130
|
+
this.tabsObserver.disconnect();
|
|
131
|
+
this.tabObserver && this.tabObserver.disconnect();
|
|
132
|
+
}
|
|
133
|
+
}, {
|
|
134
|
+
key: "componentDidUpdate",
|
|
135
|
+
value: function componentDidUpdate(prevProps) {
|
|
136
|
+
if (this.childrenCurrentList.length === 0) {
|
|
137
|
+
this.childrenCurrentList = this.querySelector();
|
|
138
|
+
this.widthCheck();
|
|
139
|
+
}
|
|
140
|
+
if (this.props.resizeId !== prevProps.resizeId) {
|
|
141
|
+
// Completely reset the observers and set new observer if id is changed
|
|
142
|
+
this.reset();
|
|
143
|
+
if (this.props.wrapperDivRef && this.props.wrapperDivRef.current) {
|
|
144
|
+
this.tabsObserver.observe(this.props.wrapperDivRef.current);
|
|
145
|
+
this.tabObserver.observe(this.props.wrapperDivRef.current, {
|
|
146
|
+
characterData: true,
|
|
147
|
+
attributes: true,
|
|
148
|
+
childList: true,
|
|
149
|
+
subtree: true,
|
|
150
|
+
attributeFilter: ['data-responsive']
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}, {
|
|
156
|
+
key: "onResize",
|
|
157
|
+
value: function onResize() {
|
|
158
|
+
// if (this.childrenCurrentList.length !== 0) {
|
|
159
|
+
this.childrenCurrentList = [];
|
|
160
|
+
this.constructChildren(0, false);
|
|
161
|
+
//}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// shouldComponentUpdate() {
|
|
165
|
+
// return this.childrenCurrentList.length === 0
|
|
166
|
+
// }
|
|
167
|
+
}, {
|
|
168
|
+
key: "widthCheck",
|
|
169
|
+
value: function widthCheck() {
|
|
170
|
+
var wrapperDivRef = this.props.wrapperDivRef.current;
|
|
171
|
+
var moreDivRef = this.props.moreDivRef.current;
|
|
172
|
+
if (wrapperDivRef && this.childrenCurrentList.length > 0) {
|
|
173
|
+
var childrenWidthList = this.childrenCurrentList;
|
|
174
|
+
// this.childrenCurrentList = childrenWidthList;
|
|
175
|
+
var moreWidth = (0, _Common.getElementSpace)(moreDivRef).neededSpace;
|
|
176
|
+
//console.log(moreWidth,'moreWidth');
|
|
177
|
+
var totalWidth = (0, _Common.getElementSpace)(wrapperDivRef).availableInsideSpace - moreWidth;
|
|
178
|
+
var _childrenTotalWidth = 0;
|
|
179
|
+
var dataCount = 0;
|
|
180
|
+
this.noSpaceForChildren = false;
|
|
181
|
+
if (totalWidth <= moreWidth) {
|
|
182
|
+
this.noSpaceForChildren = true;
|
|
183
|
+
} else {
|
|
184
|
+
for (var i = 0; i < childrenWidthList.length; i++) {
|
|
185
|
+
var currentWidth = (0, _Common.getElementSpace)(childrenWidthList[i]).neededSpace;
|
|
186
|
+
_childrenTotalWidth += currentWidth;
|
|
187
|
+
// console.log(_childrenTotalWidth, currentWidth, totalWidth)
|
|
188
|
+
if (i === childrenWidthList.length - 1 && moreWidth >= currentWidth) {
|
|
189
|
+
totalWidth += moreWidth;
|
|
190
|
+
}
|
|
191
|
+
if (totalWidth <= _childrenTotalWidth) {
|
|
192
|
+
dataCount = i;
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
this.constructChildren(dataCount, true);
|
|
198
|
+
} else {
|
|
199
|
+
this.constructChildren(0, false);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}, {
|
|
203
|
+
key: "constructChildren",
|
|
204
|
+
value: function constructChildren() {
|
|
205
|
+
var dataCount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
206
|
+
var responsive = arguments.length > 1 ? arguments[1] : undefined;
|
|
207
|
+
var _this$props = this.props,
|
|
208
|
+
childrenList = _this$props.childrenList,
|
|
209
|
+
getData = _this$props.getData;
|
|
210
|
+
// If the data count is zero we assume that we can render all the items - data count will be zero only when we want to calculate the whole list width
|
|
211
|
+
dataCount = dataCount || childrenList && childrenList.length;
|
|
212
|
+
getData({
|
|
213
|
+
responsiveHook: responsive,
|
|
214
|
+
validListCount: this.noSpaceForChildren ? 0 : dataCount
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}, {
|
|
218
|
+
key: "render",
|
|
219
|
+
value: function render() {
|
|
220
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, this.props.children);
|
|
221
|
+
}
|
|
222
|
+
}]);
|
|
223
|
+
return ResizeComponent;
|
|
224
|
+
}(_react["default"].Component);
|
|
225
|
+
exports["default"] = ResizeComponent;
|
|
226
|
+
ResizeComponent.propTypes = {
|
|
227
|
+
children: _propTypes["default"].node,
|
|
228
|
+
getData: _propTypes["default"].func,
|
|
229
|
+
resizeId: _propTypes["default"].number,
|
|
230
|
+
childrenList: _propTypes["default"].array,
|
|
231
|
+
wrapperDivRef: _propTypes["default"].any,
|
|
232
|
+
moreDivRef: _propTypes["default"].any
|
|
233
|
+
};
|
|
234
|
+
ResizeComponent.defaultProps = {
|
|
235
|
+
getData: function getData() {},
|
|
236
|
+
resizeId: null
|
|
237
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
9
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
10
|
+
var hasResizeObserver = !!window.ResizeObserver;
|
|
11
|
+
var mutationObserverOptions = {
|
|
12
|
+
//NOTE: we donot consider child Count
|
|
13
|
+
// childList: true,
|
|
14
|
+
attributes: true
|
|
15
|
+
};
|
|
16
|
+
function getSize(element) {
|
|
17
|
+
var offsetHeight = element.offsetHeight,
|
|
18
|
+
offsetWidth = element.offsetWidth;
|
|
19
|
+
// const { height, width } = element.getBoundingClientRect();
|
|
20
|
+
return {
|
|
21
|
+
height: offsetHeight,
|
|
22
|
+
width: offsetWidth
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function dispatch() {
|
|
26
|
+
var resizeResponsive = new Event('resizeResponsive');
|
|
27
|
+
window.dispatchEvent(resizeResponsive);
|
|
28
|
+
}
|
|
29
|
+
if (!hasResizeObserver) {
|
|
30
|
+
var interval = null;
|
|
31
|
+
window.addEventListener('resize', function () {
|
|
32
|
+
clearTimeout(interval);
|
|
33
|
+
interval = setTimeout(dispatch, 100);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// NOTE: this is not full polyfill , we just wrote what types of changes wlli
|
|
38
|
+
var ResizeObserverPolyfill = /*#__PURE__*/function () {
|
|
39
|
+
function ResizeObserverPolyfill(onResize) {
|
|
40
|
+
_classCallCheck(this, ResizeObserverPolyfill);
|
|
41
|
+
// method finding
|
|
42
|
+
this.transitionEndHandler = this.transitionEndHandler.bind(this);
|
|
43
|
+
this.resizeHandlerDispatch = this.resizeHandlerDispatch.bind(this);
|
|
44
|
+
this.resizeHandler = this.resizeHandler.bind(this);
|
|
45
|
+
this.replaceResizeHandler = this.replaceResizeHandler.bind(this);
|
|
46
|
+
this.debounce = this.debounce.bind(this);
|
|
47
|
+
this.onResize = onResize;
|
|
48
|
+
this.targetNode = null;
|
|
49
|
+
this.size = {
|
|
50
|
+
height: 0,
|
|
51
|
+
width: 0
|
|
52
|
+
};
|
|
53
|
+
if (hasResizeObserver) {
|
|
54
|
+
this.resizeObserverInstance = new window.ResizeObserver(this.resizeHandlerDispatch);
|
|
55
|
+
} else {
|
|
56
|
+
this.mutationObserverInstance = new window.MutationObserver(this.resizeHandlerDispatch);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
_createClass(ResizeObserverPolyfill, [{
|
|
60
|
+
key: "replaceResizeHandler",
|
|
61
|
+
value: function replaceResizeHandler(onResize) {
|
|
62
|
+
this.onResize = onResize;
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
65
|
+
key: "resizeHandler",
|
|
66
|
+
value: function resizeHandler() {
|
|
67
|
+
if (!this.targetNode) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
var currentSize = getSize(this.targetNode);
|
|
71
|
+
// if (this.size && shallowCompare(currentSize, this.size)) {
|
|
72
|
+
if (this.size && currentSize.height === this.size.height && currentSize.width === this.size.width) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this.size = currentSize;
|
|
76
|
+
this.onResize(this.size, this.targetNode);
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
}, {
|
|
80
|
+
key: "resizeHandlerDispatch",
|
|
81
|
+
value: function resizeHandlerDispatch() {
|
|
82
|
+
if (!this.resizeHandler() || hasResizeObserver) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
dispatch();
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "debounce",
|
|
89
|
+
value: function debounce() {
|
|
90
|
+
clearTimeout(this.interval);
|
|
91
|
+
this.interval = setTimeout(this.resizeHandler, 100);
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
key: "transitionEndHandler",
|
|
95
|
+
value: function transitionEndHandler(event) {
|
|
96
|
+
if (event.propertyName.indexOf('color') === -1) {
|
|
97
|
+
this.resizeHandlerDispatch();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
key: "addEventListeners",
|
|
102
|
+
value: function addEventListeners(targetNode) {
|
|
103
|
+
targetNode.addEventListener('transitionend', this.transitionEndHandler);
|
|
104
|
+
window.addEventListener('resizeResponsive', this.debounce);
|
|
105
|
+
targetNode.addEventListener('animationend', this.resizeHandlerDispatch);
|
|
106
|
+
targetNode.addEventListener('webkitAnimationEnd', this.resizeHandlerDispatch);
|
|
107
|
+
}
|
|
108
|
+
}, {
|
|
109
|
+
key: "removeEventListeners",
|
|
110
|
+
value: function removeEventListeners(targetNode) {
|
|
111
|
+
targetNode.removeEventListener('transitionend', this.transitionEndHandler);
|
|
112
|
+
window.removeEventListener('resizeResponsive', this.debounce);
|
|
113
|
+
targetNode.removeEventListener('animationend', this.resizeHandlerDispatch);
|
|
114
|
+
targetNode.removeEventListener('webkitAnimationEnd', this.resizeHandlerDispatch);
|
|
115
|
+
}
|
|
116
|
+
}, {
|
|
117
|
+
key: "observe",
|
|
118
|
+
value: function observe(targetNode) {
|
|
119
|
+
this.targetNode = targetNode;
|
|
120
|
+
if (hasResizeObserver) {
|
|
121
|
+
this.resizeObserverInstance.observe(targetNode);
|
|
122
|
+
} else {
|
|
123
|
+
this.addEventListeners(targetNode);
|
|
124
|
+
this.mutationObserverInstance.observe(targetNode, mutationObserverOptions);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}, {
|
|
128
|
+
key: "replaceObservationElement",
|
|
129
|
+
value: function replaceObservationElement(targetNode) {
|
|
130
|
+
if (this.targetNode === targetNode) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
this.targetNode && this.disconnect();
|
|
134
|
+
targetNode && this.observe(targetNode);
|
|
135
|
+
targetNode && this.resizeHandlerDispatch();
|
|
136
|
+
}
|
|
137
|
+
}, {
|
|
138
|
+
key: "disconnect",
|
|
139
|
+
value: function disconnect() {
|
|
140
|
+
this.targetNode && this.removeEventListeners(this.targetNode);
|
|
141
|
+
hasResizeObserver ? this.resizeObserverInstance.disconnect() : this.mutationObserverInstance.disconnect();
|
|
142
|
+
this.targetNode = null;
|
|
143
|
+
this.size = {
|
|
144
|
+
height: 0,
|
|
145
|
+
width: 0
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
}]);
|
|
149
|
+
return ResizeObserverPolyfill;
|
|
150
|
+
}();
|
|
151
|
+
exports["default"] = ResizeObserverPolyfill;
|