@ilo-org/react 0.0.18 → 0.1.1
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/CHANGELOG.md +25 -0
- package/lib/cjs/AccordionCtx-fe08ff45.js +9 -0
- package/lib/cjs/Callout.args-bcd5a9f1.js +17 -0
- package/lib/cjs/DailyMotion-97d1831a.js +260 -0
- package/lib/cjs/Facebook-ccb27d1d.js +240 -0
- package/lib/cjs/FilePlayer-81b9fc3f.js +597 -0
- package/lib/cjs/GlobalCtx-97e4b433.js +9 -0
- package/lib/cjs/Kaltura-d6c19814.js +236 -0
- package/lib/cjs/ListCtx-7db7fe04.js +9 -0
- package/lib/cjs/Mixcloud-f02a460e.js +223 -0
- package/lib/cjs/Preview-8238ea6e.js +227 -0
- package/lib/cjs/SoundCloud-cd1b1590.js +250 -0
- package/lib/cjs/Streamable-f47da42a.js +235 -0
- package/lib/cjs/TagCtx-929c7753.js +7 -0
- package/lib/cjs/Twitch-c503e140.js +245 -0
- package/lib/cjs/Vidyard-d9c2f073.js +238 -0
- package/lib/cjs/Vimeo-009601ef.js +286 -0
- package/lib/cjs/Wistia-8c9f4c58.js +289 -0
- package/lib/cjs/YouTube-ec5847d4.js +378 -0
- package/lib/cjs/_commonjsHelpers-9f9f50a8.js +39 -0
- package/lib/cjs/components/Accordion/Accordion.js +47 -0
- package/lib/cjs/components/Accordion/AccordionButton.js +34 -0
- package/lib/cjs/components/Accordion/AccordionItem.js +21 -0
- package/lib/cjs/components/Accordion/AccordionPanel.js +30 -0
- package/lib/cjs/components/Accordion/index.js +22 -0
- package/lib/cjs/components/Button/Button.js +36 -0
- package/lib/cjs/components/Button/index.js +39 -0
- package/lib/cjs/components/Callout/Callout.js +47 -0
- package/lib/cjs/components/Callout/index.js +19 -0
- package/lib/cjs/components/Checkbox/Checkbox.js +34 -0
- package/lib/cjs/components/Checkbox/index.js +17 -0
- package/lib/cjs/components/ChoiceGroup/ChoiceGroup.js +34 -0
- package/lib/cjs/components/ChoiceGroup/index.js +19 -0
- package/lib/cjs/components/Collapse/Collapse.js +725 -0
- package/lib/cjs/components/Collapse/index.js +18 -0
- package/lib/cjs/components/ContextMenu/ContextMenu.js +20 -0
- package/lib/cjs/components/ContextMenu/index.js +13 -0
- package/lib/cjs/components/Credit/Credit.js +33 -0
- package/lib/cjs/components/Credit/index.js +13 -0
- package/lib/cjs/components/DatePicker/DatePicker.js +32 -0
- package/lib/cjs/components/DatePicker/index.js +17 -0
- package/lib/cjs/components/Dropdown/Dropdown.js +35 -0
- package/lib/cjs/components/Dropdown/index.js +17 -0
- package/lib/cjs/components/Empty/Empty.js +19 -0
- package/lib/cjs/components/Empty/index.js +13 -0
- package/lib/cjs/components/Fieldset/Fieldset.js +24 -0
- package/lib/cjs/components/Fieldset/index.js +15 -0
- package/lib/cjs/components/FileUpload/FileUpload.js +35 -0
- package/lib/cjs/components/FileUpload/index.js +17 -0
- package/lib/cjs/components/Form/Form.js +66 -0
- package/lib/cjs/components/Form/index.js +31 -0
- package/lib/cjs/components/FormElement/FormElement.js +19 -0
- package/lib/cjs/components/FormElement/index.js +8 -0
- package/lib/cjs/components/FormGroup/FormGroup.js +58 -0
- package/lib/cjs/components/FormGroup/index.js +26 -0
- package/lib/cjs/components/GlobalProvider/GlobalProvider.js +18 -0
- package/lib/cjs/components/GlobalProvider/index.js +11 -0
- package/lib/cjs/components/Heading/Heading.js +22 -0
- package/lib/cjs/components/Heading/index.js +13 -0
- package/lib/cjs/components/Hero/Hero.js +25 -0
- package/lib/cjs/components/Hero/HeroCard.js +25 -0
- package/lib/cjs/components/Hero/index.js +17 -0
- package/lib/cjs/components/Icon/Icon.js +43 -0
- package/lib/cjs/components/Icon/index.js +13 -0
- package/lib/cjs/components/Image/Image.js +31 -0
- package/lib/cjs/components/Image/index.js +14 -0
- package/lib/cjs/components/Input/Input.js +32 -0
- package/lib/cjs/components/Input/index.js +17 -0
- package/lib/cjs/components/Link/Link.js +23 -0
- package/lib/cjs/components/Link/index.js +13 -0
- package/lib/cjs/components/LinkList/LinkList.js +22 -0
- package/lib/cjs/components/LinkList/index.js +13 -0
- package/lib/cjs/components/List/List.js +25 -0
- package/lib/cjs/components/List/ListItem.js +21 -0
- package/lib/cjs/components/List/index.js +16 -0
- package/lib/cjs/components/Loading/Loading.js +21 -0
- package/lib/cjs/components/Loading/index.js +13 -0
- package/lib/cjs/components/Notification/Notification.js +41 -0
- package/lib/cjs/components/Notification/index.js +17 -0
- package/lib/cjs/components/NumberPicker/NumberPicker.js +32 -0
- package/lib/cjs/components/NumberPicker/index.js +17 -0
- package/lib/cjs/components/Pagination/Pagination.js +49 -0
- package/lib/cjs/components/Pagination/index.js +13 -0
- package/lib/cjs/components/Profile/Profile.js +19 -0
- package/lib/cjs/components/Profile/index.js +13 -0
- package/lib/cjs/components/Radio/Radio.js +29 -0
- package/lib/cjs/components/Radio/index.js +14 -0
- package/lib/cjs/components/ReadMore/ReadMore.js +38 -0
- package/lib/cjs/components/ReadMore/index.js +14 -0
- package/lib/cjs/components/RichText/RichText.js +19 -0
- package/lib/cjs/components/RichText/index.js +13 -0
- package/lib/cjs/components/SearchField/SearchField.js +38 -0
- package/lib/cjs/components/SearchField/index.js +18 -0
- package/lib/cjs/components/TableOfContents/TableOfContents.js +22 -0
- package/lib/cjs/components/TableOfContents/index.js +13 -0
- package/lib/cjs/components/Tag/Tag.js +54 -0
- package/lib/cjs/components/Tag/TagSet.js +46 -0
- package/lib/cjs/components/Tag/index.js +20 -0
- package/lib/cjs/components/Textarea/Textarea.js +32 -0
- package/lib/cjs/components/Textarea/index.js +17 -0
- package/lib/cjs/components/Tooltip/Tooltip.js +103 -0
- package/lib/cjs/components/Tooltip/index.js +14 -0
- package/lib/cjs/components/Video/Video.js +29 -0
- package/lib/cjs/components/Video/VideoPlayer.js +1452 -0
- package/lib/cjs/components/Video/index.js +20 -0
- package/lib/cjs/components/index.js +115 -0
- package/lib/cjs/css-9c93400b.js +81 -0
- package/lib/cjs/hooks/index.js +13 -0
- package/lib/cjs/hooks/useGlobalSettings.js +13 -0
- package/lib/cjs/hooks/useVideoPlayer.js +75 -0
- package/lib/cjs/index-1b6434f0.js +1191 -0
- package/lib/cjs/index.js +115 -0
- package/lib/cjs/patterns-b55db71f.js +579 -0
- package/lib/cjs/utils/checkArrayDuplicates.js +7 -0
- package/lib/cjs/utils/createChainedFunction.js +30 -0
- package/lib/cjs/utils/getDefaultDimensionValue.js +22 -0
- package/lib/cjs/utils/hoursMinutesSeconds.js +12 -0
- package/lib/cjs/utils/index.js +18 -0
- package/lib/cjs/utils/transitionEndListener.js +161 -0
- package/lib/cjs/utils/triggerBrowserReflow.js +8 -0
- package/lib/esm/AccordionCtx-8c051900.js +6 -0
- package/lib/esm/Callout.args-3a0e0416.js +15 -0
- package/lib/esm/DailyMotion-b35dc8bb.js +258 -0
- package/lib/esm/Facebook-c3c77787.js +238 -0
- package/lib/esm/FilePlayer-540e4c5a.js +595 -0
- package/lib/esm/GlobalCtx-7fb23cfa.js +7 -0
- package/lib/esm/Kaltura-4ac3cda3.js +234 -0
- package/lib/esm/ListCtx-da435fdf.js +6 -0
- package/lib/esm/Mixcloud-3d4e0760.js +221 -0
- package/lib/esm/Preview-6d2a6792.js +225 -0
- package/lib/esm/SoundCloud-306d6c78.js +248 -0
- package/lib/esm/Streamable-aa3d544e.js +233 -0
- package/lib/esm/TagCtx-34c545fe.js +5 -0
- package/lib/esm/Twitch-4a1a1565.js +243 -0
- package/lib/esm/Vidyard-fe74c274.js +236 -0
- package/lib/esm/Vimeo-074f2c39.js +284 -0
- package/lib/esm/Wistia-0a2b73b0.js +287 -0
- package/lib/esm/YouTube-d58f130b.js +376 -0
- package/lib/esm/_commonjsHelpers-849bcf65.js +35 -0
- package/lib/esm/components/Accordion/Accordion.js +45 -0
- package/lib/esm/components/Accordion/AccordionButton.js +32 -0
- package/lib/esm/components/Accordion/AccordionItem.js +19 -0
- package/lib/esm/components/Accordion/AccordionPanel.js +28 -0
- package/lib/esm/components/Accordion/index.js +13 -0
- package/lib/esm/components/Button/Button.js +34 -0
- package/lib/esm/components/Button/index.js +36 -0
- package/lib/esm/components/Callout/Callout.js +45 -0
- package/lib/esm/components/Callout/index.js +12 -0
- package/lib/esm/components/Checkbox/Checkbox.js +32 -0
- package/lib/esm/components/Checkbox/index.js +11 -0
- package/lib/esm/components/ChoiceGroup/ChoiceGroup.js +32 -0
- package/lib/esm/components/ChoiceGroup/index.js +13 -0
- package/lib/esm/components/Collapse/Collapse.js +723 -0
- package/lib/esm/components/Collapse/index.js +12 -0
- package/lib/esm/components/ContextMenu/ContextMenu.js +18 -0
- package/lib/esm/components/ContextMenu/index.js +7 -0
- package/lib/esm/components/Credit/Credit.js +31 -0
- package/lib/esm/components/Credit/index.js +7 -0
- package/lib/esm/components/DatePicker/DatePicker.js +30 -0
- package/lib/esm/components/DatePicker/index.js +11 -0
- package/lib/esm/components/Dropdown/Dropdown.js +33 -0
- package/lib/esm/components/Dropdown/index.js +11 -0
- package/lib/esm/components/Empty/Empty.js +17 -0
- package/lib/esm/components/Empty/index.js +7 -0
- package/lib/esm/components/Fieldset/Fieldset.js +22 -0
- package/lib/esm/components/Fieldset/index.js +9 -0
- package/lib/esm/components/FileUpload/FileUpload.js +33 -0
- package/lib/esm/components/FileUpload/index.js +11 -0
- package/lib/esm/components/Form/Form.js +64 -0
- package/lib/esm/components/Form/index.js +25 -0
- package/lib/esm/components/FormElement/FormElement.js +17 -0
- package/lib/esm/components/FormElement/index.js +2 -0
- package/lib/esm/components/FormGroup/FormGroup.js +56 -0
- package/lib/esm/components/FormGroup/index.js +20 -0
- package/lib/esm/components/GlobalProvider/GlobalProvider.js +16 -0
- package/lib/esm/components/GlobalProvider/index.js +4 -0
- package/lib/esm/components/Heading/Heading.js +20 -0
- package/lib/esm/components/Heading/index.js +7 -0
- package/lib/esm/components/Hero/Hero.js +23 -0
- package/lib/esm/components/Hero/HeroCard.js +23 -0
- package/lib/esm/components/Hero/index.js +10 -0
- package/lib/esm/components/Icon/Icon.js +22 -0
- package/lib/esm/components/Icon/index.js +7 -0
- package/lib/esm/components/Image/Image.js +29 -0
- package/lib/esm/components/Image/index.js +8 -0
- package/lib/esm/components/Input/Input.js +30 -0
- package/lib/esm/components/Input/index.js +11 -0
- package/lib/esm/components/Link/Link.js +21 -0
- package/lib/esm/components/Link/index.js +7 -0
- package/lib/esm/components/LinkList/LinkList.js +20 -0
- package/lib/esm/components/LinkList/index.js +7 -0
- package/lib/esm/components/List/List.js +23 -0
- package/lib/esm/components/List/ListItem.js +19 -0
- package/lib/esm/components/List/index.js +9 -0
- package/lib/esm/components/Loading/Loading.js +19 -0
- package/lib/esm/components/Loading/index.js +7 -0
- package/lib/esm/components/Notification/Notification.js +39 -0
- package/lib/esm/components/Notification/index.js +11 -0
- package/lib/esm/components/NumberPicker/NumberPicker.js +30 -0
- package/lib/esm/components/NumberPicker/index.js +11 -0
- package/lib/esm/components/Pagination/Pagination.js +47 -0
- package/lib/esm/components/Pagination/index.js +7 -0
- package/lib/esm/components/Profile/Profile.js +17 -0
- package/lib/esm/components/Profile/index.js +7 -0
- package/lib/esm/components/Radio/Radio.js +27 -0
- package/lib/esm/components/Radio/index.js +8 -0
- package/lib/esm/components/ReadMore/ReadMore.js +36 -0
- package/lib/esm/components/ReadMore/index.js +8 -0
- package/lib/esm/components/RichText/RichText.js +17 -0
- package/lib/esm/components/RichText/index.js +7 -0
- package/lib/esm/components/SearchField/SearchField.js +36 -0
- package/lib/esm/components/SearchField/index.js +12 -0
- package/lib/esm/components/TableOfContents/TableOfContents.js +20 -0
- package/lib/esm/components/TableOfContents/index.js +7 -0
- package/lib/esm/components/Tag/Tag.js +52 -0
- package/lib/esm/components/Tag/TagSet.js +44 -0
- package/lib/esm/components/Tag/index.js +13 -0
- package/lib/esm/components/Textarea/Textarea.js +30 -0
- package/lib/esm/components/Textarea/index.js +11 -0
- package/lib/esm/components/Tooltip/Tooltip.js +101 -0
- package/lib/esm/components/Tooltip/index.js +8 -0
- package/lib/esm/components/Video/Video.js +27 -0
- package/lib/esm/components/Video/VideoPlayer.js +1450 -0
- package/lib/esm/components/Video/index.js +14 -0
- package/lib/esm/components/index.js +68 -0
- package/lib/esm/css-7414f50b.js +79 -0
- package/lib/esm/hooks/index.js +6 -0
- package/lib/esm/hooks/useGlobalSettings.js +11 -0
- package/lib/esm/hooks/useVideoPlayer.js +73 -0
- package/lib/esm/index-8ebb2cc1.js +1191 -0
- package/lib/esm/index.js +68 -0
- package/lib/esm/patterns-3a3fa9d6.js +575 -0
- package/lib/esm/utils/checkArrayDuplicates.js +5 -0
- package/lib/esm/utils/createChainedFunction.js +28 -0
- package/lib/esm/utils/getDefaultDimensionValue.js +20 -0
- package/lib/esm/utils/hoursMinutesSeconds.js +10 -0
- package/lib/esm/utils/index.js +7 -0
- package/lib/esm/utils/transitionEndListener.js +159 -0
- package/lib/esm/utils/triggerBrowserReflow.js +6 -0
- package/lib/types/react/src/components/Accordion/Accordion.d.ts +4 -0
- package/lib/types/react/src/components/Accordion/Accordion.props.d.ts +33 -0
- package/lib/types/react/src/components/Accordion/AccordionButton.d.ts +4 -0
- package/lib/types/react/src/components/Accordion/AccordionButton.props.d.ts +11 -0
- package/lib/types/react/src/components/Accordion/AccordionCtx.d.ts +4 -0
- package/lib/types/react/src/components/Accordion/AccordionItem.d.ts +4 -0
- package/lib/types/react/src/components/Accordion/AccordionItem.props.d.ts +21 -0
- package/lib/types/react/src/components/Accordion/AccordionPanel.d.ts +4 -0
- package/lib/types/react/src/components/Accordion/AccordionPanel.props.d.ts +17 -0
- package/lib/types/react/src/components/Accordion/index.d.ts +4 -0
- package/lib/types/react/src/components/Button/Button.args.d.ts +11 -0
- package/lib/types/react/src/components/Button/Button.d.ts +4 -0
- package/lib/types/react/src/components/Button/Button.props.d.ts +64 -0
- package/lib/types/react/src/components/Button/index.d.ts +2 -0
- package/lib/types/react/src/components/Callout/Callout.args.d.ts +8 -0
- package/lib/types/react/src/components/Callout/Callout.d.ts +4 -0
- package/lib/types/react/src/components/Callout/Callout.props.d.ts +50 -0
- package/lib/types/react/src/components/Callout/index.d.ts +2 -0
- package/lib/types/react/src/components/Checkbox/Checkbox.d.ts +4 -0
- package/lib/types/react/src/components/Checkbox/Checkbox.props.d.ts +13 -0
- package/lib/types/react/src/components/Checkbox/index.d.ts +1 -0
- package/lib/types/react/src/components/ChoiceGroup/ChoiceGroup.d.ts +4 -0
- package/lib/types/react/src/components/ChoiceGroup/ChoiceGroup.props.d.ts +20 -0
- package/lib/types/react/src/components/ChoiceGroup/index.d.ts +1 -0
- package/lib/types/react/src/components/Collapse/Collapse.d.ts +3 -0
- package/lib/types/react/src/components/Collapse/Collapse.props.d.ts +76 -0
- package/lib/types/react/src/components/Collapse/index.d.ts +1 -0
- package/lib/types/react/src/components/ContextMenu/ContextMenu.d.ts +4 -0
- package/lib/types/react/src/components/ContextMenu/ContextMenu.props.d.ts +25 -0
- package/lib/types/react/src/components/ContextMenu/index.d.ts +1 -0
- package/lib/types/react/src/components/Credit/Credit.d.ts +4 -0
- package/lib/types/react/src/components/Credit/Credit.props.d.ts +10 -0
- package/lib/types/react/src/components/Credit/index.d.ts +1 -0
- package/lib/types/react/src/components/DatePicker/DatePicker.d.ts +4 -0
- package/lib/types/react/src/components/DatePicker/DatePicker.props.d.ts +54 -0
- package/lib/types/react/src/components/DatePicker/index.d.ts +1 -0
- package/lib/types/react/src/components/Dropdown/Dropdown.d.ts +4 -0
- package/lib/types/react/src/components/Dropdown/Dropdown.props.d.ts +69 -0
- package/lib/types/react/src/components/Dropdown/index.d.ts +1 -0
- package/lib/types/react/src/components/Empty/Empty.d.ts +4 -0
- package/lib/types/react/src/components/Empty/Empty.props.d.ts +11 -0
- package/lib/types/react/src/components/Empty/index.d.ts +1 -0
- package/lib/types/react/src/components/Fieldset/Fieldset.d.ts +4 -0
- package/lib/types/react/src/components/Fieldset/Fieldset.props.d.ts +35 -0
- package/lib/types/react/src/components/Fieldset/index.d.ts +1 -0
- package/lib/types/react/src/components/FileUpload/FileUpload.d.ts +4 -0
- package/lib/types/react/src/components/FileUpload/FileUpload.props.d.ts +50 -0
- package/lib/types/react/src/components/FileUpload/index.d.ts +1 -0
- package/lib/types/react/src/components/Form/Form.d.ts +4 -0
- package/lib/types/react/src/components/Form/Form.props.d.ts +114 -0
- package/lib/types/react/src/components/Form/index.d.ts +1 -0
- package/lib/types/react/src/components/FormElement/FormElement.d.ts +4 -0
- package/lib/types/react/src/components/FormElement/FormElement.props.d.ts +47 -0
- package/lib/types/react/src/components/FormElement/index.d.ts +1 -0
- package/lib/types/react/src/components/FormGroup/FormGroup.d.ts +4 -0
- package/lib/types/react/src/components/FormGroup/FormGroup.props.d.ts +81 -0
- package/lib/types/react/src/components/FormGroup/index.d.ts +1 -0
- package/lib/types/react/src/components/GlobalProvider/GlobalCtx.d.ts +2 -0
- package/lib/types/react/src/components/GlobalProvider/GlobalProvider.d.ts +4 -0
- package/lib/types/react/src/components/GlobalProvider/GlobalProvider.props.d.ts +13 -0
- package/lib/types/react/src/components/GlobalProvider/index.d.ts +2 -0
- package/lib/types/react/src/components/Heading/Heading.d.ts +4 -0
- package/lib/types/react/src/components/Heading/Heading.props.d.ts +20 -0
- package/lib/types/react/src/components/Heading/index.d.ts +1 -0
- package/lib/types/react/src/components/Hero/Hero.d.ts +4 -0
- package/lib/types/react/src/components/Hero/Hero.props.d.ts +25 -0
- package/lib/types/react/src/components/Hero/HeroCard.d.ts +4 -0
- package/lib/types/react/src/components/Hero/HeroCard.props.d.ts +54 -0
- package/lib/types/react/src/components/Hero/index.d.ts +2 -0
- package/lib/types/react/src/components/Icon/Icon.d.ts +4 -0
- package/lib/types/react/src/components/Icon/Icon.props.d.ts +14 -0
- package/lib/types/react/src/components/Icon/index.d.ts +1 -0
- package/lib/types/react/src/components/Image/Image.d.ts +4 -0
- package/lib/types/react/src/components/Image/Image.props.d.ts +33 -0
- package/lib/types/react/src/components/Image/index.d.ts +1 -0
- package/lib/types/react/src/components/Input/Input.d.ts +4 -0
- package/lib/types/react/src/components/Input/Input.props.d.ts +51 -0
- package/lib/types/react/src/components/Input/index.d.ts +1 -0
- package/lib/types/react/src/components/Link/Link.d.ts +4 -0
- package/lib/types/react/src/components/Link/Link.props.d.ts +32 -0
- package/lib/types/react/src/components/Link/index.d.ts +1 -0
- package/lib/types/react/src/components/LinkList/LinkList.d.ts +4 -0
- package/lib/types/react/src/components/LinkList/LinkList.props.d.ts +44 -0
- package/lib/types/react/src/components/LinkList/index.d.ts +1 -0
- package/lib/types/react/src/components/List/List.d.ts +4 -0
- package/lib/types/react/src/components/List/List.props.d.ts +31 -0
- package/lib/types/react/src/components/List/ListCtx.d.ts +4 -0
- package/lib/types/react/src/components/List/ListItem.d.ts +4 -0
- package/lib/types/react/src/components/List/ListItem.props.d.ts +21 -0
- package/lib/types/react/src/components/List/index.d.ts +2 -0
- package/lib/types/react/src/components/Loading/Loading.d.ts +4 -0
- package/lib/types/react/src/components/Loading/Loading.props.d.ts +19 -0
- package/lib/types/react/src/components/Loading/index.d.ts +1 -0
- package/lib/types/react/src/components/Notification/Notification.d.ts +4 -0
- package/lib/types/react/src/components/Notification/Notification.props.d.ts +56 -0
- package/lib/types/react/src/components/Notification/index.d.ts +1 -0
- package/lib/types/react/src/components/NumberPicker/NumberPicker.d.ts +4 -0
- package/lib/types/react/src/components/NumberPicker/NumberPicker.props.d.ts +46 -0
- package/lib/types/react/src/components/NumberPicker/index.d.ts +1 -0
- package/lib/types/react/src/components/Pagination/Pagination.d.ts +4 -0
- package/lib/types/react/src/components/Pagination/Pagination.props.d.ts +54 -0
- package/lib/types/react/src/components/Pagination/index.d.ts +1 -0
- package/lib/types/react/src/components/Profile/Profile.d.ts +4 -0
- package/lib/types/react/src/components/Profile/Profile.props.d.ts +37 -0
- package/lib/types/react/src/components/Profile/index.d.ts +1 -0
- package/lib/types/react/src/components/Radio/Radio.d.ts +4 -0
- package/lib/types/react/src/components/Radio/Radio.props.d.ts +14 -0
- package/lib/types/react/src/components/Radio/index.d.ts +1 -0
- package/lib/types/react/src/components/ReadMore/ReadMore.d.ts +4 -0
- package/lib/types/react/src/components/ReadMore/ReadMore.props.d.ts +32 -0
- package/lib/types/react/src/components/ReadMore/index.d.ts +1 -0
- package/lib/types/react/src/components/RichText/RichText.d.ts +4 -0
- package/lib/types/react/src/components/RichText/RichText.props.d.ts +10 -0
- package/lib/types/react/src/components/RichText/index.d.ts +1 -0
- package/lib/types/react/src/components/SearchField/SearchField.d.ts +4 -0
- package/lib/types/react/src/components/SearchField/SearchField.props.d.ts +29 -0
- package/lib/types/react/src/components/SearchField/index.d.ts +1 -0
- package/lib/types/react/src/components/TableOfContents/TableOfContents.d.ts +4 -0
- package/lib/types/react/src/components/TableOfContents/TableOfContents.props.d.ts +20 -0
- package/lib/types/react/src/components/TableOfContents/index.d.ts +1 -0
- package/lib/types/react/src/components/Tag/Tag.d.ts +4 -0
- package/lib/types/react/src/components/Tag/Tag.props.d.ts +28 -0
- package/lib/types/react/src/components/Tag/TagCtx.d.ts +2 -0
- package/lib/types/react/src/components/Tag/TagSet.d.ts +4 -0
- package/lib/types/react/src/components/Tag/TagSet.props.d.ts +30 -0
- package/lib/types/react/src/components/Tag/index.d.ts +2 -0
- package/lib/types/react/src/components/Textarea/Textarea.d.ts +4 -0
- package/lib/types/react/src/components/Textarea/Textarea.props.d.ts +59 -0
- package/lib/types/react/src/components/Textarea/index.d.ts +1 -0
- package/lib/types/react/src/components/Tooltip/Tooltip.d.ts +4 -0
- package/lib/types/react/src/components/Tooltip/Tooltip.props.d.ts +35 -0
- package/lib/types/react/src/components/Tooltip/index.d.ts +1 -0
- package/lib/types/react/src/components/Video/Video.d.ts +4 -0
- package/lib/types/react/src/components/Video/Video.props.d.ts +66 -0
- package/lib/types/react/src/components/Video/VideoPlayer.d.ts +4 -0
- package/lib/types/react/src/components/Video/VideoPlayer.props.d.ts +67 -0
- package/lib/types/react/src/components/Video/index.d.ts +1 -0
- package/lib/types/react/src/components/index.d.ts +39 -0
- package/lib/types/react/src/hooks/index.d.ts +2 -0
- package/lib/types/react/src/hooks/useGlobalSettings.d.ts +4 -0
- package/lib/types/react/src/hooks/useVideoPlayer.d.ts +12 -0
- package/lib/types/react/src/index.d.ts +1 -0
- package/lib/types/react/src/types/index.d.ts +26 -0
- package/lib/types/react/src/utils/checkArrayDuplicates.d.ts +1 -0
- package/lib/types/react/src/utils/createChainedFunction.d.ts +11 -0
- package/lib/types/react/src/utils/getDefaultDimensionValue.d.ts +3 -0
- package/lib/types/react/src/utils/hoursMinutesSeconds.d.ts +1 -0
- package/lib/types/react/src/utils/index.d.ts +6 -0
- package/lib/types/react/src/utils/transitionEndListener.d.ts +1 -0
- package/lib/types/react/src/utils/triggerBrowserReflow.d.ts +1 -0
- package/package.json +115 -77
- package/public/hero.jpg +0 -0
- package/public/ilo-dg.jpg +0 -0
- package/public/ilo-headquarters.jpg +0 -0
- package/public/large.jpg +0 -0
- package/public/media-file-poster.jpg +0 -0
- package/public/medium.jpg +0 -0
- package/public/small.jpg +0 -0
- package/public/video-example.mp4 +0 -0
- package/public/youtube-video-poster.avif +0 -0
- package/rollup.config.mjs +70 -0
- package/src/components/Accordion/Accordion.args.ts +1 -1
- package/src/components/Accordion/{Accordion.props.d.ts → Accordion.props.ts} +6 -4
- package/src/components/Accordion/Accordion.tsx +4 -12
- package/src/components/Accordion/{AccordionButton.props.d.ts → AccordionButton.props.ts} +0 -0
- package/src/components/Accordion/AccordionButton.tsx +2 -4
- package/src/components/Accordion/AccordionCtx.ts +9 -0
- package/src/components/Accordion/{AccordionItem.props.d.ts → AccordionItem.props.ts} +0 -0
- package/src/components/Accordion/AccordionItem.tsx +3 -9
- package/src/components/Accordion/{AccordionPanel.props.d.ts → AccordionPanel.props.ts} +0 -0
- package/src/components/Accordion/AccordionPanel.tsx +2 -3
- package/src/components/Accordion/index.ts +0 -0
- package/src/components/Button/Button.args.ts +12 -467
- package/src/components/Button/{Button.props.d.ts → Button.props.ts} +17 -7
- package/src/components/Button/Button.tsx +9 -1
- package/src/components/Button/index.ts +1 -0
- package/src/components/Callout/Callout.args.ts +17 -43
- package/src/components/Callout/{Callout.props.d.ts → Callout.props.ts} +2 -3
- package/src/components/Callout/Callout.tsx +4 -4
- package/src/components/Callout/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.args.ts +1 -3
- package/src/components/Checkbox/Checkbox.props.ts +13 -0
- package/src/components/Checkbox/Checkbox.tsx +1 -1
- package/src/components/ChoiceGroup/ChoiceGroup.args.ts +15 -12
- package/src/components/ChoiceGroup/ChoiceGroup.props.ts +25 -0
- package/src/components/ChoiceGroup/ChoiceGroup.tsx +1 -1
- package/src/components/Collapse/{Collapse.props.d.ts → Collapse.props.ts} +0 -0
- package/src/components/Collapse/Collapse.tsx +4 -4
- package/src/components/ContextMenu/ContextMenu.args.ts +10 -10
- package/src/components/ContextMenu/{ContextMenu.props.d.ts → ContextMenu.props.ts} +0 -0
- package/src/components/Credit/{Credit.props.d.ts → Credit.props.ts} +0 -0
- package/src/components/DatePicker/DatePicker.args.ts +6 -6
- package/src/components/DatePicker/{DatePicker.props.d.ts → DatePicker.props.ts} +1 -3
- package/src/components/DatePicker/DatePicker.tsx +4 -4
- package/src/components/Dropdown/Dropdown.args.ts +5 -5
- package/src/components/Dropdown/{Dropdown.props.d.ts → Dropdown.props.ts} +1 -1
- package/src/components/Dropdown/Dropdown.tsx +1 -1
- package/src/components/Empty/{Empty.props.d.ts → Empty.props.ts} +7 -0
- package/src/components/Empty/Empty.tsx +2 -2
- package/src/components/Fieldset/{Fieldset.props.d.ts → Fieldset.props.ts} +10 -3
- package/src/components/Fieldset/Fieldset.tsx +4 -4
- package/src/components/FileUpload/FileUpload.args.ts +4 -4
- package/src/components/FileUpload/{FileUpload.props.d.ts → FileUpload.props.ts} +1 -3
- package/src/components/FileUpload/FileUpload.tsx +1 -1
- package/src/components/Form/Form.args.ts +4 -82
- package/src/components/Form/Form.props.ts +137 -0
- package/src/components/FormElement/{FormElement.props.d.ts → FormElement.props.ts} +12 -5
- package/src/components/FormElement/FormElement.tsx +9 -16
- package/src/components/FormGroup/FormGroup.args.ts +2 -1
- package/src/components/FormGroup/FormGroup.props.ts +102 -0
- package/src/components/GlobalProvider/GlobalCtx.ts +6 -0
- package/src/components/GlobalProvider/{GlobalProvider.props.d.ts → GlobalProvider.props.ts} +1 -1
- package/src/components/GlobalProvider/GlobalProvider.tsx +3 -9
- package/src/components/GlobalProvider/index.ts +2 -0
- package/src/components/Heading/Heading.args.ts +9 -6
- package/src/components/Heading/{Heading.props.d.ts → Heading.props.ts} +3 -3
- package/src/components/Hero/Hero.args.ts +14 -14
- package/src/components/Hero/{Hero.props.d.ts → Hero.props.ts} +7 -6
- package/src/components/Hero/Hero.tsx +1 -1
- package/src/components/Hero/{HeroCard.props.d.ts → HeroCard.props.ts} +6 -6
- package/src/components/Icon/{Icon.props.d.ts → Icon.props.ts} +1 -1
- package/src/components/Image/Image.args.ts +9 -15
- package/src/components/Image/{Image.props.d.ts → Image.props.ts} +0 -0
- package/src/components/Input/Input.args.ts +10 -10
- package/src/components/Input/{Input.props.d.ts → Input.props.ts} +3 -3
- package/src/components/Input/Input.tsx +1 -1
- package/src/components/Link/{Link.props.d.ts → Link.props.ts} +8 -3
- package/src/components/Link/Link.tsx +3 -10
- package/src/components/LinkList/{LinkList.props.d.ts → LinkList.props.ts} +2 -2
- package/src/components/List/List.args.ts +0 -4
- package/src/components/List/{List.props.d.ts → List.props.ts} +9 -8
- package/src/components/List/List.tsx +3 -4
- package/src/components/List/ListCtx.ts +7 -0
- package/src/components/List/{ListItem.props.d.ts → ListItem.props.ts} +0 -0
- package/src/components/List/ListItem.tsx +3 -4
- package/src/components/Loading/{Loading.props.d.ts → Loading.props.ts} +3 -3
- package/src/components/Notification/{Notification.props.d.ts → Notification.props.ts} +3 -3
- package/src/components/Notification/Notification.tsx +1 -1
- package/src/components/NumberPicker/NumberPicker.args.ts +4 -4
- package/src/components/NumberPicker/{NumberPicker.props.d.ts → NumberPicker.props.ts} +1 -1
- package/src/components/NumberPicker/NumberPicker.tsx +1 -1
- package/src/components/Pagination/Pagination.args.ts +2 -2
- package/src/components/Pagination/{Pagination.props.d.ts → Pagination.props.ts} +1 -1
- package/src/components/Profile/Profile.args.ts +16 -16
- package/src/components/Profile/{Profile.props.d.ts → Profile.props.ts} +0 -0
- package/src/components/Radio/Radio.args.ts +3 -4
- package/src/components/Radio/Radio.props.ts +14 -0
- package/src/components/Radio/Radio.tsx +1 -1
- package/src/components/ReadMore/ReadMore.args.ts +23 -0
- package/src/components/ReadMore/{ReadMore.props.d.ts → ReadMore.props.ts} +2 -2
- package/src/components/RichText/{RichText.props.d.ts → RichText.props.ts} +1 -1
- package/src/components/RichText/richText.args.ts +25 -2
- package/src/components/SearchField/SearchField.args.ts +8 -8
- package/src/components/SearchField/{SearchField.props.d.ts → SearchField.props.ts} +3 -3
- package/src/components/SearchField/SearchField.tsx +26 -19
- package/src/components/TableOfContents/{TableOfContents.props.d.ts → TableOfContents.props.ts} +0 -0
- package/src/components/Tag/{Tag.props.d.ts → Tag.props.ts} +4 -4
- package/src/components/Tag/Tag.tsx +8 -3
- package/src/components/Tag/TagCtx.ts +4 -0
- package/src/components/Tag/TagSet.args.ts +0 -2
- package/src/components/Tag/{TagSet.props.d.ts → TagSet.props.ts} +5 -4
- package/src/components/Tag/TagSet.tsx +3 -13
- package/src/components/Textarea/Textarea.args.ts +0 -10
- package/src/components/Textarea/{Textarea.props.d.ts → Textarea.props.ts} +5 -3
- package/src/components/Textarea/Textarea.tsx +1 -1
- package/src/components/Tooltip/Tooltip.args.ts +4 -8
- package/src/components/Tooltip/{Tooltip.props.d.ts → Tooltip.props.ts} +4 -9
- package/src/components/Tooltip/Tooltip.tsx +3 -2
- package/src/components/Video/Video.args.ts +16 -44
- package/src/components/Video/{Video.props.d.ts → Video.props.ts} +8 -13
- package/src/components/Video/Video.tsx +2 -2
- package/src/components/Video/{VideoPlayer.props.d.ts → VideoPlayer.props.ts} +7 -5
- package/src/components/Video/VideoPlayer.tsx +2 -2
- package/src/components/Video/media-file-poster.jpg +0 -0
- package/src/components/index.ts +44 -0
- package/src/hooks/index.ts +2 -0
- package/src/index.ts +1 -19
- package/src/types/index.ts +27 -26
- package/src/utils/index.ts +6 -0
- package/tsconfig.build.json +7 -3
- package/.eslintrc.js +0 -36
- package/.storybook/main.js +0 -28
- package/.storybook/manager-head.html +0 -2
- package/.storybook/manager.js +0 -6
- package/.storybook/preview.tsx +0 -40
- package/.storybook/styles.scss +0 -1
- package/.storybook/theme.js +0 -11
- package/.turbo/turbo-build.log +0 -525
- package/.turbo/turbo-check.log +0 -4
- package/.turbo/turbo-test.log +0 -889
- package/=6.4.0 +0 -115
- package/=7.21.4 +0 -21
- package/lib/index.esm.js +0 -24
- package/lib/index.esm.js.map +0 -1
- package/lib/index.js +0 -24
- package/lib/index.js.map +0 -1
- package/rollup.config.js +0 -40
- package/src/__tests__/Accordion.test.tsx +0 -52
- package/src/__tests__/Button.test.tsx +0 -60
- package/src/__tests__/Callout.test.tsx +0 -41
- package/src/__tests__/ContextMenu.test.tsx +0 -19
- package/src/__tests__/Dropdown.test.tsx +0 -38
- package/src/__tests__/Form.test.tsx +0 -34
- package/src/__tests__/Heading.test.tsx +0 -51
- package/src/__tests__/Hero.test.tsx +0 -22
- package/src/__tests__/Image.test.tsx +0 -21
- package/src/__tests__/LinkList.test.tsx +0 -17
- package/src/__tests__/List.test.tsx +0 -37
- package/src/__tests__/Loading.text.tsx +0 -33
- package/src/__tests__/Notification.test.tsx +0 -39
- package/src/__tests__/Pagination.test.tsx +0 -58
- package/src/__tests__/Profile.test.tsx +0 -48
- package/src/__tests__/ReadMore.test.tsx +0 -42
- package/src/__tests__/RichText.test.tsx +0 -16
- package/src/__tests__/SearchField.test.tsx +0 -35
- package/src/__tests__/TableOfContents.test.tsx +0 -12
- package/src/__tests__/Tag.test.tsx +0 -10
- package/src/components/Checkbox/Checkbox.props.d.ts +0 -61
- package/src/components/ChoiceGroup/ChoiceGroup.props.d.ts +0 -57
- package/src/components/Empty/Empty.args.ts +0 -14
- package/src/components/Form/Form.props.d.ts +0 -84
- package/src/components/FormGroup/FormGroup.props.d.ts +0 -71
- package/src/components/GlobalProvider/index.js +0 -4
- package/src/components/Link/Link.args.ts +0 -36
- package/src/components/Radio/Radio.props.d.ts +0 -66
- package/src/components/ReadMore/readMore.args.ts +0 -35
- package/src/setup.ts +0 -6
- package/src/stories/Accordion.stories.tsx +0 -99
- package/src/stories/Button.stories.tsx +0 -375
- package/src/stories/Callout.stories.tsx +0 -195
- package/src/stories/ContextMenu.stories.tsx +0 -80
- package/src/stories/Dropdown.stories.tsx +0 -91
- package/src/stories/Empty.stories.tsx +0 -48
- package/src/stories/Form.stories.tsx +0 -67
- package/src/stories/Heading.stories.tsx +0 -191
- package/src/stories/Hero.stories.tsx +0 -194
- package/src/stories/Image.stories.tsx +0 -71
- package/src/stories/Introduction.stories.mdx +0 -258
- package/src/stories/Link.stories.tsx +0 -104
- package/src/stories/LinkList.stories.tsx +0 -74
- package/src/stories/List.stories.tsx +0 -255
- package/src/stories/Loading.stories.tsx +0 -103
- package/src/stories/Notification.stories.tsx +0 -176
- package/src/stories/Pagination.stories.tsx +0 -63
- package/src/stories/Profile.stories.tsx +0 -84
- package/src/stories/ReadMore.stories.tsx +0 -80
- package/src/stories/RichText.stories.tsx +0 -59
- package/src/stories/SearchField.stories.tsx +0 -87
- package/src/stories/TableOfContents.stories.tsx +0 -50
- package/src/stories/Tag.stories.tsx +0 -226
- package/src/stories/Tooltip.stories.tsx +0 -92
- package/src/stories/Video.stories.tsx +0 -69
- package/src/stories/Welcome.stories.mdx +0 -63
- package/src/stories/assets/code-brackets.svg +0 -1
- package/src/stories/assets/colors.svg +0 -1
- package/src/stories/assets/comments.svg +0 -1
- package/src/stories/assets/direction.svg +0 -1
- package/src/stories/assets/flow.svg +0 -1
- package/src/stories/assets/plugin.svg +0 -1
- package/src/stories/assets/repo.svg +0 -1
- package/src/stories/assets/stackalt.svg +0 -1
- package/storybook-static/01daf23af61cc99e9d75.woff2 +0 -0
- package/storybook-static/06a2da828c8b6497ba7a.woff +0 -0
- package/storybook-static/0fa24adac56865ac7e5f.ttf +0 -0
- package/storybook-static/160.a21381a2.iframe.bundle.js +0 -1
- package/storybook-static/1dbed2ef5cef8fcb4cbe.ttf +0 -0
- package/storybook-static/1fa1c16a4a45d13f0df8.ttf +0 -0
- package/storybook-static/212.faba6ad0.iframe.bundle.js +0 -7
- package/storybook-static/212.faba6ad0.iframe.bundle.js.LICENSE.txt +0 -108
- package/storybook-static/212.faba6ad0.iframe.bundle.js.map +0 -1
- package/storybook-static/23cdaa8575b5e003dcde.eot +0 -0
- package/storybook-static/247.21581a11a07ce2f03d0c.manager.bundle.js +0 -2
- package/storybook-static/247.21581a11a07ce2f03d0c.manager.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/247.271b628d.iframe.bundle.js +0 -2
- package/storybook-static/247.271b628d.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/259.03b8a6d8.iframe.bundle.js +0 -1
- package/storybook-static/27d33755a2b827666dc5.woff +0 -0
- package/storybook-static/294.491cce4d5ae7b9c2ffce.manager.bundle.js +0 -1
- package/storybook-static/294.549e3f8d.iframe.bundle.js +0 -1
- package/storybook-static/409a9c398a28ee4d74ff.eot +0 -0
- package/storybook-static/444.6156221a84c3a87f5c02.manager.bundle.js +0 -2
- package/storybook-static/444.6156221a84c3a87f5c02.manager.bundle.js.LICENSE.txt +0 -94
- package/storybook-static/4bf5fc6f93ba10519c82.eot +0 -0
- package/storybook-static/504.f9ef513c.iframe.bundle.js +0 -2
- package/storybook-static/504.f9ef513c.iframe.bundle.js.LICENSE.txt +0 -11
- package/storybook-static/639.044e85595b528d3f28da.manager.bundle.js +0 -2
- package/storybook-static/639.044e85595b528d3f28da.manager.bundle.js.LICENSE.txt +0 -31
- package/storybook-static/639.c568c669.iframe.bundle.js +0 -2
- package/storybook-static/639.c568c669.iframe.bundle.js.LICENSE.txt +0 -31
- package/storybook-static/642.1f308c6d963e823cc20e.manager.bundle.js +0 -2
- package/storybook-static/642.1f308c6d963e823cc20e.manager.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/642.d92dc22b.iframe.bundle.js +0 -2
- package/storybook-static/642.d92dc22b.iframe.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/6a159f0a2005668f1f78.woff +0 -0
- package/storybook-static/720.f44d4e1f5203b6083ae4.manager.bundle.js +0 -1
- package/storybook-static/73ba1c910e0f7bfc6b18.woff2 +0 -0
- package/storybook-static/837.1b65801453b1ce7ef7d1.manager.bundle.js +0 -1
- package/storybook-static/837.95523cc4.iframe.bundle.js +0 -1
- package/storybook-static/8a142c29a318c432117a.woff +0 -0
- package/storybook-static/914.d1f142bbe477c1136f06.manager.bundle.js +0 -1
- package/storybook-static/914.feb1fea5.iframe.bundle.js +0 -1
- package/storybook-static/9db5d05810cb98f2831f.ttf +0 -0
- package/storybook-static/9ff97e342523931a4992.eot +0 -0
- package/storybook-static/a40d436619020fb67db5.woff +0 -0
- package/storybook-static/a46b8d4aa3504103cdde.ttf +0 -0
- package/storybook-static/b53d0e74edc5a5fbef0a.ttf +0 -0
- package/storybook-static/c12a83f816844ff94375.ttf +0 -0
- package/storybook-static/c807e115c00aaffbac11.woff2 +0 -0
- package/storybook-static/cadb6b94d6b0ecc3a86a.woff2 +0 -0
- package/storybook-static/d0cff1b064bcd84324fe.eot +0 -0
- package/storybook-static/d3434771ad7e9030387e.ttf +0 -0
- package/storybook-static/d8610c2a4fe5c177f4f6.woff +0 -0
- package/storybook-static/d970f426740b938f39e1.woff +0 -0
- package/storybook-static/d9c7eba773ff1c8df5bb.eot +0 -0
- package/storybook-static/dd4645bdb2f1e1a47ed7.woff2 +0 -0
- package/storybook-static/e0a63577ac642885f067.eot +0 -0
- package/storybook-static/f632ebfa0d7b7085d542.woff2 +0 -0
- package/storybook-static/f93e2252d7112c3bcca5.woff2 +0 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +0 -364
- package/storybook-static/index.html +0 -59
- package/storybook-static/main.28d30a3024752e90423a.manager.bundle.js +0 -1
- package/storybook-static/main.3ae24e12.iframe.bundle.js +0 -1
- package/storybook-static/project.json +0 -1
- package/storybook-static/reactPlayerDailyMotion.469cc00f.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerFacebook.1423bb15.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerFilePlayer.e19e24a0.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerKaltura.d1eb0868.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerMixcloud.9f1b1691.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerPreview.9295696b.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerSoundCloud.d420395c.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerStreamable.9b655bf3.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerTwitch.e90e6dea.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerVidyard.a37ae6b3.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerVimeo.a7f367ee.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerWistia.fb351944.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerYouTube.3514e11a.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.3bae6a4f.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.e45b096081911dbee3c7.manager.bundle.js +0 -1
- package/storybook-static/static/css/main.19ed5330.css +0 -3
- package/storybook-static/static/css/main.19ed5330.css.map +0 -1
|
@@ -0,0 +1,725 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib = require('tslib');
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var classNames = require('classnames');
|
|
6
|
+
var require$$0 = require('react');
|
|
7
|
+
var index = require('../../index-1b6434f0.js');
|
|
8
|
+
var ReactDOM = require('react-dom');
|
|
9
|
+
var utils_createChainedFunction = require('../../utils/createChainedFunction.js');
|
|
10
|
+
var utils_getDefaultDimensionValue = require('../../utils/getDefaultDimensionValue.js');
|
|
11
|
+
var utils_transitionEndListener = require('../../utils/transitionEndListener.js');
|
|
12
|
+
var utils_triggerBrowserReflow = require('../../utils/triggerBrowserReflow.js');
|
|
13
|
+
require('../../css-9c93400b.js');
|
|
14
|
+
|
|
15
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
16
|
+
if (source == null) return {};
|
|
17
|
+
var target = {};
|
|
18
|
+
var sourceKeys = Object.keys(source);
|
|
19
|
+
var key, i;
|
|
20
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
21
|
+
key = sourceKeys[i];
|
|
22
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
23
|
+
target[key] = source[key];
|
|
24
|
+
}
|
|
25
|
+
return target;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function _setPrototypeOf(o, p) {
|
|
29
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
30
|
+
o.__proto__ = p;
|
|
31
|
+
return o;
|
|
32
|
+
};
|
|
33
|
+
return _setPrototypeOf(o, p);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function _inheritsLoose(subClass, superClass) {
|
|
37
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
38
|
+
subClass.prototype.constructor = subClass;
|
|
39
|
+
_setPrototypeOf(subClass, superClass);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var config = {
|
|
43
|
+
disabled: false
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var timeoutsShape = process.env.NODE_ENV !== 'production' ? index.propTypesExports.oneOfType([index.propTypesExports.number, index.propTypesExports.shape({
|
|
47
|
+
enter: index.propTypesExports.number,
|
|
48
|
+
exit: index.propTypesExports.number,
|
|
49
|
+
appear: index.propTypesExports.number
|
|
50
|
+
}).isRequired]) : null;
|
|
51
|
+
process.env.NODE_ENV !== 'production' ? index.propTypesExports.oneOfType([index.propTypesExports.string, index.propTypesExports.shape({
|
|
52
|
+
enter: index.propTypesExports.string,
|
|
53
|
+
exit: index.propTypesExports.string,
|
|
54
|
+
active: index.propTypesExports.string
|
|
55
|
+
}), index.propTypesExports.shape({
|
|
56
|
+
enter: index.propTypesExports.string,
|
|
57
|
+
enterDone: index.propTypesExports.string,
|
|
58
|
+
enterActive: index.propTypesExports.string,
|
|
59
|
+
exit: index.propTypesExports.string,
|
|
60
|
+
exitDone: index.propTypesExports.string,
|
|
61
|
+
exitActive: index.propTypesExports.string
|
|
62
|
+
})]) : null;
|
|
63
|
+
|
|
64
|
+
var TransitionGroupContext = require$$0.createContext(null);
|
|
65
|
+
|
|
66
|
+
var forceReflow = function forceReflow(node) {
|
|
67
|
+
return node.scrollTop;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
var UNMOUNTED = 'unmounted';
|
|
71
|
+
var EXITED = 'exited';
|
|
72
|
+
var ENTERING = 'entering';
|
|
73
|
+
var ENTERED = 'entered';
|
|
74
|
+
var EXITING = 'exiting';
|
|
75
|
+
/**
|
|
76
|
+
* The Transition component lets you describe a transition from one component
|
|
77
|
+
* state to another _over time_ with a simple declarative API. Most commonly
|
|
78
|
+
* it's used to animate the mounting and unmounting of a component, but can also
|
|
79
|
+
* be used to describe in-place transition states as well.
|
|
80
|
+
*
|
|
81
|
+
* ---
|
|
82
|
+
*
|
|
83
|
+
* **Note**: `Transition` is a platform-agnostic base component. If you're using
|
|
84
|
+
* transitions in CSS, you'll probably want to use
|
|
85
|
+
* [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
|
|
86
|
+
* instead. It inherits all the features of `Transition`, but contains
|
|
87
|
+
* additional features necessary to play nice with CSS transitions (hence the
|
|
88
|
+
* name of the component).
|
|
89
|
+
*
|
|
90
|
+
* ---
|
|
91
|
+
*
|
|
92
|
+
* By default the `Transition` component does not alter the behavior of the
|
|
93
|
+
* component it renders, it only tracks "enter" and "exit" states for the
|
|
94
|
+
* components. It's up to you to give meaning and effect to those states. For
|
|
95
|
+
* example we can add styles to a component when it enters or exits:
|
|
96
|
+
*
|
|
97
|
+
* ```jsx
|
|
98
|
+
* import { Transition } from 'react-transition-group';
|
|
99
|
+
*
|
|
100
|
+
* const duration = 300;
|
|
101
|
+
*
|
|
102
|
+
* const defaultStyle = {
|
|
103
|
+
* transition: `opacity ${duration}ms ease-in-out`,
|
|
104
|
+
* opacity: 0,
|
|
105
|
+
* }
|
|
106
|
+
*
|
|
107
|
+
* const transitionStyles = {
|
|
108
|
+
* entering: { opacity: 1 },
|
|
109
|
+
* entered: { opacity: 1 },
|
|
110
|
+
* exiting: { opacity: 0 },
|
|
111
|
+
* exited: { opacity: 0 },
|
|
112
|
+
* };
|
|
113
|
+
*
|
|
114
|
+
* const Fade = ({ in: inProp }) => (
|
|
115
|
+
* <Transition in={inProp} timeout={duration}>
|
|
116
|
+
* {state => (
|
|
117
|
+
* <div style={{
|
|
118
|
+
* ...defaultStyle,
|
|
119
|
+
* ...transitionStyles[state]
|
|
120
|
+
* }}>
|
|
121
|
+
* I'm a fade Transition!
|
|
122
|
+
* </div>
|
|
123
|
+
* )}
|
|
124
|
+
* </Transition>
|
|
125
|
+
* );
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* There are 4 main states a Transition can be in:
|
|
129
|
+
* - `'entering'`
|
|
130
|
+
* - `'entered'`
|
|
131
|
+
* - `'exiting'`
|
|
132
|
+
* - `'exited'`
|
|
133
|
+
*
|
|
134
|
+
* Transition state is toggled via the `in` prop. When `true` the component
|
|
135
|
+
* begins the "Enter" stage. During this stage, the component will shift from
|
|
136
|
+
* its current transition state, to `'entering'` for the duration of the
|
|
137
|
+
* transition and then to the `'entered'` stage once it's complete. Let's take
|
|
138
|
+
* the following example (we'll use the
|
|
139
|
+
* [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):
|
|
140
|
+
*
|
|
141
|
+
* ```jsx
|
|
142
|
+
* function App() {
|
|
143
|
+
* const [inProp, setInProp] = useState(false);
|
|
144
|
+
* return (
|
|
145
|
+
* <div>
|
|
146
|
+
* <Transition in={inProp} timeout={500}>
|
|
147
|
+
* {state => (
|
|
148
|
+
* // ...
|
|
149
|
+
* )}
|
|
150
|
+
* </Transition>
|
|
151
|
+
* <button onClick={() => setInProp(true)}>
|
|
152
|
+
* Click to Enter
|
|
153
|
+
* </button>
|
|
154
|
+
* </div>
|
|
155
|
+
* );
|
|
156
|
+
* }
|
|
157
|
+
* ```
|
|
158
|
+
*
|
|
159
|
+
* When the button is clicked the component will shift to the `'entering'` state
|
|
160
|
+
* and stay there for 500ms (the value of `timeout`) before it finally switches
|
|
161
|
+
* to `'entered'`.
|
|
162
|
+
*
|
|
163
|
+
* When `in` is `false` the same thing happens except the state moves from
|
|
164
|
+
* `'exiting'` to `'exited'`.
|
|
165
|
+
*/
|
|
166
|
+
|
|
167
|
+
var Transition = /*#__PURE__*/function (_React$Component) {
|
|
168
|
+
_inheritsLoose(Transition, _React$Component);
|
|
169
|
+
|
|
170
|
+
function Transition(props, context) {
|
|
171
|
+
var _this;
|
|
172
|
+
|
|
173
|
+
_this = _React$Component.call(this, props, context) || this;
|
|
174
|
+
var parentGroup = context; // In the context of a TransitionGroup all enters are really appears
|
|
175
|
+
|
|
176
|
+
var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
|
|
177
|
+
var initialStatus;
|
|
178
|
+
_this.appearStatus = null;
|
|
179
|
+
|
|
180
|
+
if (props.in) {
|
|
181
|
+
if (appear) {
|
|
182
|
+
initialStatus = EXITED;
|
|
183
|
+
_this.appearStatus = ENTERING;
|
|
184
|
+
} else {
|
|
185
|
+
initialStatus = ENTERED;
|
|
186
|
+
}
|
|
187
|
+
} else {
|
|
188
|
+
if (props.unmountOnExit || props.mountOnEnter) {
|
|
189
|
+
initialStatus = UNMOUNTED;
|
|
190
|
+
} else {
|
|
191
|
+
initialStatus = EXITED;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
_this.state = {
|
|
196
|
+
status: initialStatus
|
|
197
|
+
};
|
|
198
|
+
_this.nextCallback = null;
|
|
199
|
+
return _this;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
|
|
203
|
+
var nextIn = _ref.in;
|
|
204
|
+
|
|
205
|
+
if (nextIn && prevState.status === UNMOUNTED) {
|
|
206
|
+
return {
|
|
207
|
+
status: EXITED
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return null;
|
|
212
|
+
} // getSnapshotBeforeUpdate(prevProps) {
|
|
213
|
+
// let nextStatus = null
|
|
214
|
+
// if (prevProps !== this.props) {
|
|
215
|
+
// const { status } = this.state
|
|
216
|
+
// if (this.props.in) {
|
|
217
|
+
// if (status !== ENTERING && status !== ENTERED) {
|
|
218
|
+
// nextStatus = ENTERING
|
|
219
|
+
// }
|
|
220
|
+
// } else {
|
|
221
|
+
// if (status === ENTERING || status === ENTERED) {
|
|
222
|
+
// nextStatus = EXITING
|
|
223
|
+
// }
|
|
224
|
+
// }
|
|
225
|
+
// }
|
|
226
|
+
// return { nextStatus }
|
|
227
|
+
// }
|
|
228
|
+
;
|
|
229
|
+
|
|
230
|
+
var _proto = Transition.prototype;
|
|
231
|
+
|
|
232
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
233
|
+
this.updateStatus(true, this.appearStatus);
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
237
|
+
var nextStatus = null;
|
|
238
|
+
|
|
239
|
+
if (prevProps !== this.props) {
|
|
240
|
+
var status = this.state.status;
|
|
241
|
+
|
|
242
|
+
if (this.props.in) {
|
|
243
|
+
if (status !== ENTERING && status !== ENTERED) {
|
|
244
|
+
nextStatus = ENTERING;
|
|
245
|
+
}
|
|
246
|
+
} else {
|
|
247
|
+
if (status === ENTERING || status === ENTERED) {
|
|
248
|
+
nextStatus = EXITING;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
this.updateStatus(false, nextStatus);
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
257
|
+
this.cancelNextCallback();
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
_proto.getTimeouts = function getTimeouts() {
|
|
261
|
+
var timeout = this.props.timeout;
|
|
262
|
+
var exit, enter, appear;
|
|
263
|
+
exit = enter = appear = timeout;
|
|
264
|
+
|
|
265
|
+
if (timeout != null && typeof timeout !== 'number') {
|
|
266
|
+
exit = timeout.exit;
|
|
267
|
+
enter = timeout.enter; // TODO: remove fallback for next major
|
|
268
|
+
|
|
269
|
+
appear = timeout.appear !== undefined ? timeout.appear : enter;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
return {
|
|
273
|
+
exit: exit,
|
|
274
|
+
enter: enter,
|
|
275
|
+
appear: appear
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
_proto.updateStatus = function updateStatus(mounting, nextStatus) {
|
|
280
|
+
if (mounting === void 0) {
|
|
281
|
+
mounting = false;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
if (nextStatus !== null) {
|
|
285
|
+
// nextStatus will always be ENTERING or EXITING.
|
|
286
|
+
this.cancelNextCallback();
|
|
287
|
+
|
|
288
|
+
if (nextStatus === ENTERING) {
|
|
289
|
+
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
290
|
+
var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749
|
|
291
|
+
// With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.
|
|
292
|
+
// To make the animation happen, we have to separate each rendering and avoid being processed as batched.
|
|
293
|
+
|
|
294
|
+
if (node) forceReflow(node);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
this.performEnter(mounting);
|
|
298
|
+
} else {
|
|
299
|
+
this.performExit();
|
|
300
|
+
}
|
|
301
|
+
} else if (this.props.unmountOnExit && this.state.status === EXITED) {
|
|
302
|
+
this.setState({
|
|
303
|
+
status: UNMOUNTED
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
_proto.performEnter = function performEnter(mounting) {
|
|
309
|
+
var _this2 = this;
|
|
310
|
+
|
|
311
|
+
var enter = this.props.enter;
|
|
312
|
+
var appearing = this.context ? this.context.isMounting : mounting;
|
|
313
|
+
|
|
314
|
+
var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],
|
|
315
|
+
maybeNode = _ref2[0],
|
|
316
|
+
maybeAppearing = _ref2[1];
|
|
317
|
+
|
|
318
|
+
var timeouts = this.getTimeouts();
|
|
319
|
+
var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
|
|
320
|
+
// if we are mounting and running this it means appear _must_ be set
|
|
321
|
+
|
|
322
|
+
if (!mounting && !enter || config.disabled) {
|
|
323
|
+
this.safeSetState({
|
|
324
|
+
status: ENTERED
|
|
325
|
+
}, function () {
|
|
326
|
+
_this2.props.onEntered(maybeNode);
|
|
327
|
+
});
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
this.props.onEnter(maybeNode, maybeAppearing);
|
|
332
|
+
this.safeSetState({
|
|
333
|
+
status: ENTERING
|
|
334
|
+
}, function () {
|
|
335
|
+
_this2.props.onEntering(maybeNode, maybeAppearing);
|
|
336
|
+
|
|
337
|
+
_this2.onTransitionEnd(enterTimeout, function () {
|
|
338
|
+
_this2.safeSetState({
|
|
339
|
+
status: ENTERED
|
|
340
|
+
}, function () {
|
|
341
|
+
_this2.props.onEntered(maybeNode, maybeAppearing);
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
_proto.performExit = function performExit() {
|
|
348
|
+
var _this3 = this;
|
|
349
|
+
|
|
350
|
+
var exit = this.props.exit;
|
|
351
|
+
var timeouts = this.getTimeouts();
|
|
352
|
+
var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED
|
|
353
|
+
|
|
354
|
+
if (!exit || config.disabled) {
|
|
355
|
+
this.safeSetState({
|
|
356
|
+
status: EXITED
|
|
357
|
+
}, function () {
|
|
358
|
+
_this3.props.onExited(maybeNode);
|
|
359
|
+
});
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
this.props.onExit(maybeNode);
|
|
364
|
+
this.safeSetState({
|
|
365
|
+
status: EXITING
|
|
366
|
+
}, function () {
|
|
367
|
+
_this3.props.onExiting(maybeNode);
|
|
368
|
+
|
|
369
|
+
_this3.onTransitionEnd(timeouts.exit, function () {
|
|
370
|
+
_this3.safeSetState({
|
|
371
|
+
status: EXITED
|
|
372
|
+
}, function () {
|
|
373
|
+
_this3.props.onExited(maybeNode);
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
_proto.cancelNextCallback = function cancelNextCallback() {
|
|
380
|
+
if (this.nextCallback !== null) {
|
|
381
|
+
this.nextCallback.cancel();
|
|
382
|
+
this.nextCallback = null;
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
_proto.safeSetState = function safeSetState(nextState, callback) {
|
|
387
|
+
// This shouldn't be necessary, but there are weird race conditions with
|
|
388
|
+
// setState callbacks and unmounting in testing, so always make sure that
|
|
389
|
+
// we can cancel any pending setState callbacks after we unmount.
|
|
390
|
+
callback = this.setNextCallback(callback);
|
|
391
|
+
this.setState(nextState, callback);
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
_proto.setNextCallback = function setNextCallback(callback) {
|
|
395
|
+
var _this4 = this;
|
|
396
|
+
|
|
397
|
+
var active = true;
|
|
398
|
+
|
|
399
|
+
this.nextCallback = function (event) {
|
|
400
|
+
if (active) {
|
|
401
|
+
active = false;
|
|
402
|
+
_this4.nextCallback = null;
|
|
403
|
+
callback(event);
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
this.nextCallback.cancel = function () {
|
|
408
|
+
active = false;
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
return this.nextCallback;
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
_proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {
|
|
415
|
+
this.setNextCallback(handler);
|
|
416
|
+
var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);
|
|
417
|
+
var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
|
|
418
|
+
|
|
419
|
+
if (!node || doesNotHaveTimeoutOrListener) {
|
|
420
|
+
setTimeout(this.nextCallback, 0);
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
if (this.props.addEndListener) {
|
|
425
|
+
var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],
|
|
426
|
+
maybeNode = _ref3[0],
|
|
427
|
+
maybeNextCallback = _ref3[1];
|
|
428
|
+
|
|
429
|
+
this.props.addEndListener(maybeNode, maybeNextCallback);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
if (timeout != null) {
|
|
433
|
+
setTimeout(this.nextCallback, timeout);
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
_proto.render = function render() {
|
|
438
|
+
var status = this.state.status;
|
|
439
|
+
|
|
440
|
+
if (status === UNMOUNTED) {
|
|
441
|
+
return null;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
var _this$props = this.props,
|
|
445
|
+
children = _this$props.children;
|
|
446
|
+
_this$props.in;
|
|
447
|
+
_this$props.mountOnEnter;
|
|
448
|
+
_this$props.unmountOnExit;
|
|
449
|
+
_this$props.appear;
|
|
450
|
+
_this$props.enter;
|
|
451
|
+
_this$props.exit;
|
|
452
|
+
_this$props.timeout;
|
|
453
|
+
_this$props.addEndListener;
|
|
454
|
+
_this$props.onEnter;
|
|
455
|
+
_this$props.onEntering;
|
|
456
|
+
_this$props.onEntered;
|
|
457
|
+
_this$props.onExit;
|
|
458
|
+
_this$props.onExiting;
|
|
459
|
+
_this$props.onExited;
|
|
460
|
+
_this$props.nodeRef;
|
|
461
|
+
var childProps = _objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
462
|
+
|
|
463
|
+
return (
|
|
464
|
+
/*#__PURE__*/
|
|
465
|
+
// allows for nested Transitions
|
|
466
|
+
require$$0.createElement(TransitionGroupContext.Provider, {
|
|
467
|
+
value: null
|
|
468
|
+
}, typeof children === 'function' ? children(status, childProps) : require$$0.cloneElement(require$$0.Children.only(children), childProps))
|
|
469
|
+
);
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
return Transition;
|
|
473
|
+
}(require$$0.Component);
|
|
474
|
+
|
|
475
|
+
Transition.contextType = TransitionGroupContext;
|
|
476
|
+
Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
477
|
+
/**
|
|
478
|
+
* A React reference to DOM element that need to transition:
|
|
479
|
+
* https://stackoverflow.com/a/51127130/4671932
|
|
480
|
+
*
|
|
481
|
+
* - When `nodeRef` prop is used, `node` is not passed to callback functions
|
|
482
|
+
* (e.g. `onEnter`) because user already has direct access to the node.
|
|
483
|
+
* - When changing `key` prop of `Transition` in a `TransitionGroup` a new
|
|
484
|
+
* `nodeRef` need to be provided to `Transition` with changed `key` prop
|
|
485
|
+
* (see
|
|
486
|
+
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
487
|
+
*/
|
|
488
|
+
nodeRef: index.propTypesExports.shape({
|
|
489
|
+
current: typeof Element === 'undefined' ? index.propTypesExports.any : function (propValue, key, componentName, location, propFullName, secret) {
|
|
490
|
+
var value = propValue[key];
|
|
491
|
+
return index.propTypesExports.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
|
|
492
|
+
}
|
|
493
|
+
}),
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* A `function` child can be used instead of a React element. This function is
|
|
497
|
+
* called with the current transition status (`'entering'`, `'entered'`,
|
|
498
|
+
* `'exiting'`, `'exited'`), which can be used to apply context
|
|
499
|
+
* specific props to a component.
|
|
500
|
+
*
|
|
501
|
+
* ```jsx
|
|
502
|
+
* <Transition in={this.state.in} timeout={150}>
|
|
503
|
+
* {state => (
|
|
504
|
+
* <MyComponent className={`fade fade-${state}`} />
|
|
505
|
+
* )}
|
|
506
|
+
* </Transition>
|
|
507
|
+
* ```
|
|
508
|
+
*/
|
|
509
|
+
children: index.propTypesExports.oneOfType([index.propTypesExports.func.isRequired, index.propTypesExports.element.isRequired]).isRequired,
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Show the component; triggers the enter or exit states
|
|
513
|
+
*/
|
|
514
|
+
in: index.propTypesExports.bool,
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* By default the child component is mounted immediately along with
|
|
518
|
+
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
|
519
|
+
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
520
|
+
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
521
|
+
*/
|
|
522
|
+
mountOnEnter: index.propTypesExports.bool,
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
526
|
+
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
527
|
+
*/
|
|
528
|
+
unmountOnExit: index.propTypesExports.bool,
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* By default the child component does not perform the enter transition when
|
|
532
|
+
* it first mounts, regardless of the value of `in`. If you want this
|
|
533
|
+
* behavior, set both `appear` and `in` to `true`.
|
|
534
|
+
*
|
|
535
|
+
* > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
|
|
536
|
+
* > only adds an additional enter transition. However, in the
|
|
537
|
+
* > `<CSSTransition>` component that first enter transition does result in
|
|
538
|
+
* > additional `.appear-*` classes, that way you can choose to style it
|
|
539
|
+
* > differently.
|
|
540
|
+
*/
|
|
541
|
+
appear: index.propTypesExports.bool,
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Enable or disable enter transitions.
|
|
545
|
+
*/
|
|
546
|
+
enter: index.propTypesExports.bool,
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Enable or disable exit transitions.
|
|
550
|
+
*/
|
|
551
|
+
exit: index.propTypesExports.bool,
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* The duration of the transition, in milliseconds.
|
|
555
|
+
* Required unless `addEndListener` is provided.
|
|
556
|
+
*
|
|
557
|
+
* You may specify a single timeout for all transitions:
|
|
558
|
+
*
|
|
559
|
+
* ```jsx
|
|
560
|
+
* timeout={500}
|
|
561
|
+
* ```
|
|
562
|
+
*
|
|
563
|
+
* or individually:
|
|
564
|
+
*
|
|
565
|
+
* ```jsx
|
|
566
|
+
* timeout={{
|
|
567
|
+
* appear: 500,
|
|
568
|
+
* enter: 300,
|
|
569
|
+
* exit: 500,
|
|
570
|
+
* }}
|
|
571
|
+
* ```
|
|
572
|
+
*
|
|
573
|
+
* - `appear` defaults to the value of `enter`
|
|
574
|
+
* - `enter` defaults to `0`
|
|
575
|
+
* - `exit` defaults to `0`
|
|
576
|
+
*
|
|
577
|
+
* @type {number | { enter?: number, exit?: number, appear?: number }}
|
|
578
|
+
*/
|
|
579
|
+
timeout: function timeout(props) {
|
|
580
|
+
var pt = timeoutsShape;
|
|
581
|
+
if (!props.addEndListener) pt = pt.isRequired;
|
|
582
|
+
|
|
583
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
584
|
+
args[_key - 1] = arguments[_key];
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
return pt.apply(void 0, [props].concat(args));
|
|
588
|
+
},
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* Add a custom transition end trigger. Called with the transitioning
|
|
592
|
+
* DOM node and a `done` callback. Allows for more fine grained transition end
|
|
593
|
+
* logic. Timeouts are still used as a fallback if provided.
|
|
594
|
+
*
|
|
595
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
596
|
+
*
|
|
597
|
+
* ```jsx
|
|
598
|
+
* addEndListener={(node, done) => {
|
|
599
|
+
* // use the css transitionend event to mark the finish of a transition
|
|
600
|
+
* node.addEventListener('transitionend', done, false);
|
|
601
|
+
* }}
|
|
602
|
+
* ```
|
|
603
|
+
*/
|
|
604
|
+
addEndListener: index.propTypesExports.func,
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Callback fired before the "entering" status is applied. An extra parameter
|
|
608
|
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
609
|
+
*
|
|
610
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
611
|
+
*
|
|
612
|
+
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
613
|
+
*/
|
|
614
|
+
onEnter: index.propTypesExports.func,
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Callback fired after the "entering" status is applied. An extra parameter
|
|
618
|
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
619
|
+
*
|
|
620
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
621
|
+
*
|
|
622
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
623
|
+
*/
|
|
624
|
+
onEntering: index.propTypesExports.func,
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* Callback fired after the "entered" status is applied. An extra parameter
|
|
628
|
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
629
|
+
*
|
|
630
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
631
|
+
*
|
|
632
|
+
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
633
|
+
*/
|
|
634
|
+
onEntered: index.propTypesExports.func,
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Callback fired before the "exiting" status is applied.
|
|
638
|
+
*
|
|
639
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
640
|
+
*
|
|
641
|
+
* @type Function(node: HtmlElement) -> void
|
|
642
|
+
*/
|
|
643
|
+
onExit: index.propTypesExports.func,
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Callback fired after the "exiting" status is applied.
|
|
647
|
+
*
|
|
648
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
649
|
+
*
|
|
650
|
+
* @type Function(node: HtmlElement) -> void
|
|
651
|
+
*/
|
|
652
|
+
onExiting: index.propTypesExports.func,
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Callback fired after the "exited" status is applied.
|
|
656
|
+
*
|
|
657
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
658
|
+
*
|
|
659
|
+
* @type Function(node: HtmlElement) -> void
|
|
660
|
+
*/
|
|
661
|
+
onExited: index.propTypesExports.func
|
|
662
|
+
} : {}; // Name the function so it is clearer in the documentation
|
|
663
|
+
|
|
664
|
+
function noop() {}
|
|
665
|
+
|
|
666
|
+
Transition.defaultProps = {
|
|
667
|
+
in: false,
|
|
668
|
+
mountOnEnter: false,
|
|
669
|
+
unmountOnExit: false,
|
|
670
|
+
appear: false,
|
|
671
|
+
enter: true,
|
|
672
|
+
exit: true,
|
|
673
|
+
onEnter: noop,
|
|
674
|
+
onEntering: noop,
|
|
675
|
+
onEntered: noop,
|
|
676
|
+
onExit: noop,
|
|
677
|
+
onExiting: noop,
|
|
678
|
+
onExited: noop
|
|
679
|
+
};
|
|
680
|
+
Transition.UNMOUNTED = UNMOUNTED;
|
|
681
|
+
Transition.EXITED = EXITED;
|
|
682
|
+
Transition.ENTERING = ENTERING;
|
|
683
|
+
Transition.ENTERED = ENTERED;
|
|
684
|
+
Transition.EXITING = EXITING;
|
|
685
|
+
|
|
686
|
+
const collapseStyles = {
|
|
687
|
+
[EXITED]: "collapse",
|
|
688
|
+
[EXITING]: "collapsing",
|
|
689
|
+
[ENTERING]: "expanding",
|
|
690
|
+
[ENTERED]: "collapse show",
|
|
691
|
+
};
|
|
692
|
+
const Collapse = require$$0.forwardRef((_a, ref) => {
|
|
693
|
+
var { dimension = "height", panelIn = false, getDimensionValue = utils_getDefaultDimensionValue, timeout = 300, onEnter, onEntering, onEntered, onExit, onExiting, className, children, role } = _a, rest = tslib.__rest(_a, ["dimension", "panelIn", "getDimensionValue", "timeout", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "className", "children", "role"]);
|
|
694
|
+
/* Compute dimension */
|
|
695
|
+
const computedDimension = typeof dimension === "function" ? dimension() : dimension;
|
|
696
|
+
/* -- Expanding -- */
|
|
697
|
+
const handleEnter = require$$0.useMemo(() => utils_createChainedFunction((elem) => {
|
|
698
|
+
elem.style[computedDimension] = "0";
|
|
699
|
+
elem.style.transitionDuration = `${timeout + 50}ms`;
|
|
700
|
+
}, onEnter), [computedDimension, onEnter, timeout]);
|
|
701
|
+
const handleEntering = require$$0.useMemo(() => utils_createChainedFunction((elem) => {
|
|
702
|
+
const scroll = `scroll${computedDimension[0].toUpperCase()}${computedDimension.slice(1)}`;
|
|
703
|
+
elem.style[computedDimension] = `${elem[scroll]}px`;
|
|
704
|
+
elem.style.transitionDuration = `${timeout + 50}ms`;
|
|
705
|
+
}, onEntering), [computedDimension, onEntering, timeout]);
|
|
706
|
+
const handleEntered = require$$0.useMemo(() => utils_createChainedFunction((elem) => {
|
|
707
|
+
elem.style[computedDimension] = "none";
|
|
708
|
+
elem.style.transitionDuration = `${timeout + 50}ms`;
|
|
709
|
+
}, onEntered), [computedDimension, onEntered, timeout]);
|
|
710
|
+
/* -- Collapsing -- */
|
|
711
|
+
const handleExit = require$$0.useMemo(() => utils_createChainedFunction((elem) => {
|
|
712
|
+
elem.style[computedDimension] = `${getDimensionValue(computedDimension, elem)}px`;
|
|
713
|
+
utils_triggerBrowserReflow(elem);
|
|
714
|
+
elem.style.transitionDuration = `${timeout + 50}ms`;
|
|
715
|
+
}, onExit), [onExit, getDimensionValue, computedDimension, timeout]);
|
|
716
|
+
const handleExiting = require$$0.useMemo(() => utils_createChainedFunction((elem) => {
|
|
717
|
+
elem.style[computedDimension] = "0px";
|
|
718
|
+
elem.style.transitionDuration = `${timeout + 50}ms`;
|
|
719
|
+
}, onExiting), [computedDimension, onExiting, timeout]);
|
|
720
|
+
return (jsxRuntime.jsx(Transition, Object.assign({ nodeRef: ref, addEndListener: utils_transitionEndListener }, rest, { "aria-expanded": role ? panelIn : null, onEnter: handleEnter, onEntering: handleEntering, onEntered: handleEntered, onExit: handleExit, onExiting: handleExiting, in: panelIn }, { children: (state, innerProps) => {
|
|
721
|
+
return require$$0.cloneElement(children, Object.assign(Object.assign({}, innerProps), { className: classNames(className, children.props.className, collapseStyles[state], computedDimension === "width" && "collapse-horizontal") }));
|
|
722
|
+
} })));
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
module.exports = Collapse;
|