@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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { SearchFieldProps } from "./SearchField.props";
|
|
2
2
|
|
|
3
3
|
const searchfield: SearchFieldProps = {
|
|
4
|
-
callback:
|
|
4
|
+
callback: () => {},
|
|
5
5
|
input: {
|
|
6
|
-
callback:
|
|
6
|
+
callback: () => {},
|
|
7
7
|
disabled: false,
|
|
8
8
|
name: "search",
|
|
9
9
|
placeholder: "Search Field",
|
|
@@ -12,9 +12,9 @@ const searchfield: SearchFieldProps = {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
const searchfielderror: SearchFieldProps = {
|
|
15
|
-
callback:
|
|
15
|
+
callback: () => {},
|
|
16
16
|
input: {
|
|
17
|
-
callback:
|
|
17
|
+
callback: () => {},
|
|
18
18
|
disabled: false,
|
|
19
19
|
error: "Error message",
|
|
20
20
|
name: "search",
|
|
@@ -24,9 +24,9 @@ const searchfielderror: SearchFieldProps = {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const searchfielddisabled: SearchFieldProps = {
|
|
27
|
-
callback:
|
|
27
|
+
callback: () => {},
|
|
28
28
|
input: {
|
|
29
|
-
callback:
|
|
29
|
+
callback: () => {},
|
|
30
30
|
disabled: true,
|
|
31
31
|
name: "search",
|
|
32
32
|
placeholder: "Search Field",
|
|
@@ -35,7 +35,7 @@ const searchfielddisabled: SearchFieldProps = {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
const searchfieldlabel: SearchFieldProps = {
|
|
38
|
-
callback:
|
|
38
|
+
callback: () => {},
|
|
39
39
|
input: {
|
|
40
40
|
label: "Search Field",
|
|
41
41
|
name: "search",
|
|
@@ -45,7 +45,7 @@ const searchfieldlabel: SearchFieldProps = {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
const searchfieldhelper: SearchFieldProps = {
|
|
48
|
-
callback:
|
|
48
|
+
callback: () => {},
|
|
49
49
|
input: {
|
|
50
50
|
helper: "Search Field Helper text",
|
|
51
51
|
name: "search",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputProps } from "../Input.props";
|
|
1
|
+
import { InputProps } from "../Input/Input.props";
|
|
2
2
|
|
|
3
3
|
export interface ButtonProps {
|
|
4
4
|
/**
|
|
@@ -21,7 +21,7 @@ export interface SearchFieldProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* The search field submit button's click function.
|
|
23
23
|
*/
|
|
24
|
-
callback:
|
|
24
|
+
callback?: (e: React.MouseEvent<HTMLInputElement, MouseEvent>) => any;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Specify an optional className to be added to your Button.
|
|
@@ -31,5 +31,5 @@ export interface SearchFieldProps {
|
|
|
31
31
|
/**
|
|
32
32
|
* Specify the properties of the search field input
|
|
33
33
|
*/
|
|
34
|
-
input?:
|
|
34
|
+
input?: InputProps;
|
|
35
35
|
}
|
|
@@ -16,39 +16,46 @@ const SearchField: FC<SearchFieldProps> = ({
|
|
|
16
16
|
|
|
17
17
|
const SearchFieldClasses = classNames(className, {
|
|
18
18
|
[baseClass]: true,
|
|
19
|
-
[`haslabel`]: input
|
|
19
|
+
[`haslabel`]: input?.label,
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* On click, if there is a callback, call it
|
|
24
24
|
*/
|
|
25
|
-
const
|
|
25
|
+
const handleClick: React.MouseEventHandler<HTMLInputElement> = (e) => {
|
|
26
26
|
if (callback) {
|
|
27
27
|
callback(e);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
const inputHasType = !!input?.type;
|
|
32
|
+
|
|
33
|
+
if (!inputHasType) {
|
|
34
|
+
throw new Error("SearchField: Input must have type prop");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return inputHasType ? (
|
|
38
|
+
<form className={SearchFieldClasses} action={action}>
|
|
37
39
|
<Input
|
|
38
|
-
id={input
|
|
39
|
-
name={input
|
|
40
|
-
disabled={input
|
|
41
|
-
callback={input
|
|
42
|
-
error={input
|
|
43
|
-
helper={input
|
|
44
|
-
label={input
|
|
45
|
-
placeholder={input
|
|
46
|
-
type={input
|
|
40
|
+
id={input?.id}
|
|
41
|
+
name={input?.name}
|
|
42
|
+
disabled={input?.disabled}
|
|
43
|
+
callback={input?.callback}
|
|
44
|
+
error={input?.error}
|
|
45
|
+
helper={input?.helper}
|
|
46
|
+
label={input?.label}
|
|
47
|
+
placeholder={input?.placeholder}
|
|
48
|
+
type={input?.type}
|
|
47
49
|
className={`${prefix}--input`}
|
|
48
50
|
/>
|
|
49
|
-
<input
|
|
51
|
+
<input
|
|
52
|
+
className={buttonClass}
|
|
53
|
+
disabled={input?.disabled}
|
|
54
|
+
type="submit"
|
|
55
|
+
onClick={handleClick}
|
|
56
|
+
/>
|
|
50
57
|
</form>
|
|
51
|
-
);
|
|
58
|
+
) : null;
|
|
52
59
|
};
|
|
53
60
|
|
|
54
61
|
export default SearchField;
|
package/src/components/TableOfContents/{TableOfContents.props.d.ts → TableOfContents.props.ts}
RENAMED
|
File without changes
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { TagTypes } from "../../types";
|
|
3
3
|
|
|
4
4
|
export interface TagProps {
|
|
5
5
|
/**
|
|
6
6
|
* Callback to event;
|
|
7
7
|
*/
|
|
8
|
-
callback?:
|
|
8
|
+
callback?: (e: React.MouseEvent<HTMLButtonElement>) => any;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Specify the label for the tag
|
|
12
12
|
*/
|
|
13
|
-
children
|
|
13
|
+
children?: ReactNode;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* The tag's unique id.
|
|
@@ -25,7 +25,7 @@ export interface TagProps {
|
|
|
25
25
|
/**
|
|
26
26
|
* Specify a tag type
|
|
27
27
|
*/
|
|
28
|
-
type?:
|
|
28
|
+
type?: TagTypes;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Specify an optional url to be added to your Tag.
|
|
@@ -2,8 +2,9 @@ import { useContext, FC } from "react";
|
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import useGlobalSettings from "../../hooks/useGlobalSettings";
|
|
4
4
|
import { TagProps } from "./Tag.props";
|
|
5
|
-
import { TagSetContext } from "./TagSet";
|
|
6
5
|
import { Icon } from "../Icon";
|
|
6
|
+
import { getUpdatedItems } from "@ilo-org/utils";
|
|
7
|
+
import { TagSetContext } from "./TagCtx";
|
|
7
8
|
|
|
8
9
|
const Tag: FC<TagProps> = ({
|
|
9
10
|
className,
|
|
@@ -15,7 +16,7 @@ const Tag: FC<TagProps> = ({
|
|
|
15
16
|
...rest
|
|
16
17
|
}) => {
|
|
17
18
|
const { prefix } = useGlobalSettings();
|
|
18
|
-
const { activeItems, setActiveItems,
|
|
19
|
+
const { activeItems, setActiveItems, allowMultipleActive } =
|
|
19
20
|
useContext(TagSetContext);
|
|
20
21
|
const active = activeItems.indexOf(id) > -1;
|
|
21
22
|
|
|
@@ -36,7 +37,11 @@ const Tag: FC<TagProps> = ({
|
|
|
36
37
|
*/
|
|
37
38
|
const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {
|
|
38
39
|
setActiveItems(
|
|
39
|
-
getUpdatedItems({
|
|
40
|
+
getUpdatedItems({
|
|
41
|
+
id,
|
|
42
|
+
itemStatuses: activeItems,
|
|
43
|
+
allowMultipleExpanded: allowMultipleActive,
|
|
44
|
+
})
|
|
40
45
|
);
|
|
41
46
|
visible = false;
|
|
42
47
|
if (callback) {
|
|
@@ -5,7 +5,6 @@ const tag: TagSetProps = {
|
|
|
5
5
|
onButtonClick: (e) => {
|
|
6
6
|
console.log(e.target);
|
|
7
7
|
},
|
|
8
|
-
children: "",
|
|
9
8
|
defaultTagActive: ["tag1", "tag2"],
|
|
10
9
|
};
|
|
11
10
|
|
|
@@ -14,7 +13,6 @@ const buttonTag: TagSetProps = {
|
|
|
14
13
|
onButtonClick: (e) => {
|
|
15
14
|
console.log(e.target);
|
|
16
15
|
},
|
|
17
|
-
children: "",
|
|
18
16
|
defaultTagActive: [
|
|
19
17
|
"tag1",
|
|
20
18
|
"tag2",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Dispatch, ReactElement, SetStateAction } from "react";
|
|
2
|
+
|
|
1
3
|
export { default as TagSet } from "./TagSet";
|
|
2
4
|
|
|
3
5
|
export interface TagSetProps {
|
|
@@ -9,12 +11,12 @@ export interface TagSetProps {
|
|
|
9
11
|
/**
|
|
10
12
|
* Callback to onButtonClick event;
|
|
11
13
|
*/
|
|
12
|
-
onButtonClick?: (e: MouseEvent<HTMLButtonElement>, i:
|
|
14
|
+
onButtonClick?: (e: React.MouseEvent<HTMLButtonElement>, i: number) => any;
|
|
13
15
|
|
|
14
16
|
/**
|
|
15
17
|
* Specify the content of your Tag.
|
|
16
18
|
*/
|
|
17
|
-
children
|
|
19
|
+
children?: ReactElement<TagSetProps> | ReactElement<TagSetProps>[];
|
|
18
20
|
|
|
19
21
|
/**
|
|
20
22
|
* Specify an optional className to be added to your accordion.
|
|
@@ -29,8 +31,7 @@ export interface TagSetProps {
|
|
|
29
31
|
|
|
30
32
|
export interface TagSetContextProps {
|
|
31
33
|
activeItems: string[];
|
|
32
|
-
getUpdatedItems: getUpdatedItems;
|
|
33
34
|
setActiveItems: Dispatch<SetStateAction<string[]>>;
|
|
34
35
|
allowMultipleActive: boolean;
|
|
35
|
-
onButtonClick?: (e: MouseEvent<HTMLButtonElement>, i:
|
|
36
|
+
onButtonClick?: (e: React.MouseEvent<HTMLButtonElement>, i: number) => void;
|
|
36
37
|
}
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useState,
|
|
3
|
-
useEffect,
|
|
4
|
-
createContext,
|
|
5
|
-
FC,
|
|
6
|
-
ReactElement,
|
|
7
|
-
Children,
|
|
8
|
-
} from "react";
|
|
9
1
|
import classNames from "classnames";
|
|
2
|
+
import { Children, FC, ReactElement, useEffect, useState } from "react";
|
|
10
3
|
import useGlobalSettings from "../../hooks/useGlobalSettings";
|
|
11
|
-
import { TagSetContextProps, TagSetProps } from "./TagSet.props";
|
|
12
|
-
import { getUpdatedItems } from "@ilo-org/utils";
|
|
13
4
|
import { checkArrayDuplicates } from "../../utils/checkArrayDuplicates";
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
import { TagSetContext } from "./TagCtx";
|
|
6
|
+
import { TagSetProps } from "./TagSet.props";
|
|
16
7
|
|
|
17
8
|
const TagSet: FC<TagSetProps> = ({
|
|
18
9
|
className,
|
|
@@ -56,7 +47,6 @@ const TagSet: FC<TagSetProps> = ({
|
|
|
56
47
|
value={{
|
|
57
48
|
activeItems,
|
|
58
49
|
setActiveItems,
|
|
59
|
-
getUpdatedItems,
|
|
60
50
|
allowMultipleActive,
|
|
61
51
|
onButtonClick,
|
|
62
52
|
}}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { TextareaProps } from "./Textarea.props";
|
|
2
2
|
|
|
3
3
|
const basic: TextareaProps = {
|
|
4
|
-
callback: "",
|
|
5
4
|
disabled: false,
|
|
6
|
-
error: false,
|
|
7
|
-
helper: false,
|
|
8
5
|
label: "Textarea",
|
|
9
6
|
name: "textarea",
|
|
10
7
|
placeholder: "Textarea",
|
|
@@ -13,9 +10,7 @@ const basic: TextareaProps = {
|
|
|
13
10
|
};
|
|
14
11
|
|
|
15
12
|
const hashelper: TextareaProps = {
|
|
16
|
-
callback: "",
|
|
17
13
|
disabled: false,
|
|
18
|
-
error: false,
|
|
19
14
|
helper: "This one has helper text",
|
|
20
15
|
label: "Textarea",
|
|
21
16
|
name: "textarea",
|
|
@@ -25,10 +20,8 @@ const hashelper: TextareaProps = {
|
|
|
25
20
|
};
|
|
26
21
|
|
|
27
22
|
const haserror: TextareaProps = {
|
|
28
|
-
callback: "",
|
|
29
23
|
disabled: false,
|
|
30
24
|
error: "This one has an error",
|
|
31
|
-
helper: false,
|
|
32
25
|
label: "Textarea",
|
|
33
26
|
name: "textarea",
|
|
34
27
|
placeholder: "Textarea",
|
|
@@ -37,10 +30,7 @@ const haserror: TextareaProps = {
|
|
|
37
30
|
};
|
|
38
31
|
|
|
39
32
|
const hastooltip: TextareaProps = {
|
|
40
|
-
callback: "",
|
|
41
33
|
disabled: false,
|
|
42
|
-
error: false,
|
|
43
|
-
helper: false,
|
|
44
34
|
label: "Textarea",
|
|
45
35
|
name: "textarea",
|
|
46
36
|
placeholder: "Textarea",
|
|
@@ -2,7 +2,7 @@ export interface TextareaProps {
|
|
|
2
2
|
/**
|
|
3
3
|
* The Textarea's onChange callback.
|
|
4
4
|
*/
|
|
5
|
-
callback:
|
|
5
|
+
callback?: (e: React.ChangeEvent<HTMLTextAreaElement>) => any;
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Specify an optional className to be added to your Textarea.
|
|
@@ -17,12 +17,12 @@ export interface TextareaProps {
|
|
|
17
17
|
/**
|
|
18
18
|
* Does the Textarea have an error?
|
|
19
19
|
*/
|
|
20
|
-
error?: string
|
|
20
|
+
error?: string;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* The Textarea's helper text
|
|
24
24
|
*/
|
|
25
|
-
helper
|
|
25
|
+
helper?: string;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* The Textarea's id attribute
|
|
@@ -68,4 +68,6 @@ export interface TextareaProps {
|
|
|
68
68
|
* Does this Textarea have a tooltip?
|
|
69
69
|
*/
|
|
70
70
|
tooltip?: string;
|
|
71
|
+
|
|
72
|
+
type?: never;
|
|
71
73
|
}
|
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
import { TooltipProps } from "./Tooltip.props";
|
|
2
2
|
|
|
3
3
|
const light: TooltipProps = {
|
|
4
|
-
|
|
5
|
-
label: "This is a tooltip",
|
|
4
|
+
label: "This is a light tooltip",
|
|
6
5
|
theme: "light", // "light" | "dark" ;
|
|
7
6
|
isVisible: false,
|
|
8
7
|
};
|
|
9
8
|
|
|
10
9
|
const lighticon: TooltipProps = {
|
|
11
|
-
children: "<button>test<button>",
|
|
12
10
|
icon: true,
|
|
13
|
-
label: "This is a tooltip",
|
|
11
|
+
label: "This is a light tooltip",
|
|
14
12
|
theme: "light", // "light" | "dark" ;
|
|
15
13
|
isVisible: false,
|
|
16
14
|
};
|
|
17
15
|
|
|
18
16
|
const dark: TooltipProps = {
|
|
19
|
-
|
|
20
|
-
label: "This is a tooltip",
|
|
17
|
+
label: "This is a dark tooltip",
|
|
21
18
|
theme: "dark", // "light" | "dark" ;
|
|
22
19
|
isVisible: false,
|
|
23
20
|
};
|
|
24
21
|
|
|
25
22
|
const darkicon: TooltipProps = {
|
|
26
|
-
children: "<button>test<button>",
|
|
27
23
|
icon: true,
|
|
28
|
-
label: "This is a tooltip",
|
|
24
|
+
label: "This is a tooltip for an icon",
|
|
29
25
|
theme: "dark", // "light" | "dark" ;
|
|
30
26
|
isVisible: false,
|
|
31
27
|
};
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TooltipThemes } from "../../types";
|
|
2
2
|
|
|
3
3
|
export interface TooltipProps {
|
|
4
|
-
/**
|
|
5
|
-
* Specify the content of your Tooltip.
|
|
6
|
-
*/
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
|
|
9
4
|
/**
|
|
10
5
|
* Specify an optional className to be added to your Tooltip.
|
|
11
6
|
*/
|
|
@@ -29,17 +24,17 @@ export interface TooltipProps {
|
|
|
29
24
|
/**
|
|
30
25
|
* Callback fired onMouseOver
|
|
31
26
|
*/
|
|
32
|
-
onMouseOver?:
|
|
27
|
+
onMouseOver?: (e: React.MouseEventHandler<HTMLDivElement>) => any;
|
|
33
28
|
|
|
34
29
|
/**
|
|
35
30
|
* Callback fired onMouseOut
|
|
36
31
|
*/
|
|
37
|
-
onMouseOut?:
|
|
32
|
+
onMouseOut?: (e: React.MouseEventHandler<HTMLDivElement>) => any;
|
|
38
33
|
|
|
39
34
|
/**
|
|
40
35
|
* Describe the theme of the tooltip
|
|
41
36
|
*/
|
|
42
|
-
theme?: Required<
|
|
37
|
+
theme?: Required<TooltipThemes>;
|
|
43
38
|
|
|
44
39
|
/**
|
|
45
40
|
* Set a width for the tooltip
|
|
@@ -35,11 +35,12 @@ const Tooltip: FC<TooltipProps> = ({
|
|
|
35
35
|
[`${baseClass}--arrow--placement-${arrowPlacement}`]: arrowPlacement,
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
const handleOnMouseOver
|
|
38
|
+
const handleOnMouseOver: React.MouseEventHandler<HTMLDivElement> &
|
|
39
|
+
React.FocusEventHandler<HTMLDivElement> = (e) => {
|
|
39
40
|
// get hovered element reference
|
|
40
41
|
const target = e.currentTarget;
|
|
41
42
|
|
|
42
|
-
if (target
|
|
43
|
+
if (target) {
|
|
43
44
|
const rect = target.getBoundingClientRect();
|
|
44
45
|
setIsVisible(true);
|
|
45
46
|
postMouseOver(rect);
|
|
@@ -1,27 +1,14 @@
|
|
|
1
1
|
import { VideoProps } from "./Video.props";
|
|
2
2
|
|
|
3
3
|
const videofile: VideoProps = {
|
|
4
|
-
alt: "
|
|
4
|
+
alt: "The ILO logo on a blue background",
|
|
5
5
|
className: "image",
|
|
6
|
-
caption:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
breakpoint: 800,
|
|
14
|
-
src: "https://placekitten.com/g/800/600",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
breakpoint: 1200,
|
|
18
|
-
src: "https://placekitten.com/g/1200/900",
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
breakpoint: 1440,
|
|
22
|
-
src: "https://placekitten.com/g/1600/1200",
|
|
23
|
-
},
|
|
24
|
-
],
|
|
6
|
+
caption:
|
|
7
|
+
"The ILO brings together governments, employers and workers to set labour standards and promote decent work.",
|
|
8
|
+
poster: {
|
|
9
|
+
url: [{ src: "/media-file-poster.jpg" }],
|
|
10
|
+
alt: "",
|
|
11
|
+
},
|
|
25
12
|
video: {
|
|
26
13
|
controls: {
|
|
27
14
|
fullscreen: "Fullscreen",
|
|
@@ -29,34 +16,20 @@ const videofile: VideoProps = {
|
|
|
29
16
|
pause: "Pause",
|
|
30
17
|
volume: "Volume",
|
|
31
18
|
},
|
|
32
|
-
src: "
|
|
33
|
-
tracks: null,
|
|
19
|
+
src: "/video-example.mp4",
|
|
34
20
|
youtube: false,
|
|
35
21
|
},
|
|
36
22
|
};
|
|
37
23
|
|
|
38
24
|
const videoyt: VideoProps = {
|
|
39
|
-
alt: "
|
|
40
|
-
caption:
|
|
25
|
+
alt: "An smiling woman with gray hair holds a bowl full of corn in front of her home.",
|
|
26
|
+
caption:
|
|
27
|
+
"Indigenous entrepreneur Celestina Ábalos runs a tourism business in the UNESCO World Heritage site of Quebrada de Humahuaca in northern Argentina. ©ILO/Ivar Velasquez",
|
|
41
28
|
className: "image",
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
breakpoint: 800,
|
|
49
|
-
src: "https://placekitten.com/800/600",
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
breakpoint: 1200,
|
|
53
|
-
src: "https://placekitten.com/1200/900",
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
breakpoint: 1440,
|
|
57
|
-
src: "https://placekitten.com/1600/1200",
|
|
58
|
-
},
|
|
59
|
-
],
|
|
29
|
+
poster: {
|
|
30
|
+
url: [{ src: "/youtube-video-poster.avif" }],
|
|
31
|
+
alt: "",
|
|
32
|
+
},
|
|
60
33
|
video: {
|
|
61
34
|
controls: {
|
|
62
35
|
fullscreen: "Fullscreen",
|
|
@@ -64,8 +37,7 @@ const videoyt: VideoProps = {
|
|
|
64
37
|
pause: "Pause",
|
|
65
38
|
volume: "Volume",
|
|
66
39
|
},
|
|
67
|
-
src: "https://youtu.be/
|
|
68
|
-
tracks: null,
|
|
40
|
+
src: "https://youtu.be/X72_A4_6zjU",
|
|
69
41
|
youtube: true,
|
|
70
42
|
},
|
|
71
43
|
};
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Specify the breakpoint at which this image src should be used
|
|
4
|
-
*/
|
|
5
|
-
breakpoint?: number;
|
|
1
|
+
import { TracksConfig } from "./VideoPlayer.props";
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
src?: string;
|
|
3
|
+
export interface Poster {
|
|
4
|
+
url: { src: string }[];
|
|
5
|
+
alt: string;
|
|
11
6
|
}
|
|
12
7
|
|
|
13
8
|
interface VideoPlayerControls {
|
|
@@ -46,7 +41,7 @@ interface Video {
|
|
|
46
41
|
/**
|
|
47
42
|
* if there are closed-caption tracks,
|
|
48
43
|
*/
|
|
49
|
-
tracks?:
|
|
44
|
+
tracks?: TracksConfig[];
|
|
50
45
|
|
|
51
46
|
/**
|
|
52
47
|
* if YouTube, set to true
|
|
@@ -58,7 +53,7 @@ export interface VideoProps {
|
|
|
58
53
|
/**
|
|
59
54
|
* Specify the alt for the image
|
|
60
55
|
*/
|
|
61
|
-
alt
|
|
56
|
+
alt: String;
|
|
62
57
|
|
|
63
58
|
/**
|
|
64
59
|
* Specify the caption for the image/video
|
|
@@ -73,10 +68,10 @@ export interface VideoProps {
|
|
|
73
68
|
/**
|
|
74
69
|
* Specify the image src for the image
|
|
75
70
|
*/
|
|
76
|
-
|
|
71
|
+
poster?: Poster;
|
|
77
72
|
|
|
78
73
|
/**
|
|
79
74
|
* Specify whether there is a video being shown
|
|
80
75
|
*/
|
|
81
|
-
video
|
|
76
|
+
video: Video;
|
|
82
77
|
}
|
|
@@ -4,7 +4,7 @@ import useGlobalSettings from "../../hooks/useGlobalSettings";
|
|
|
4
4
|
import { VideoProps } from "./Video.props";
|
|
5
5
|
import VideoPlayer from "./VideoPlayer";
|
|
6
6
|
|
|
7
|
-
const Video: FC<VideoProps> = ({
|
|
7
|
+
const Video: FC<VideoProps> = ({ className, caption, poster, video }) => {
|
|
8
8
|
const { prefix } = useGlobalSettings();
|
|
9
9
|
const baseClass = `${prefix}--video`;
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ const Video: FC<VideoProps> = ({ alt, className, caption, url, video }) => {
|
|
|
19
19
|
return (
|
|
20
20
|
<figure className={videoClasses}>
|
|
21
21
|
<div className={`${videoClasses}--wrapper`}>
|
|
22
|
-
{video && <VideoPlayer {...video} poster={
|
|
22
|
+
{video && <VideoPlayer {...video} poster={poster} />}
|
|
23
23
|
</div>
|
|
24
24
|
{caption && <figcaption className={captionClasses}>{caption}</figcaption>}
|
|
25
25
|
</figure>
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
+
import { Poster } from "./Video.props";
|
|
2
|
+
|
|
1
3
|
export interface VideoPlayerControls {
|
|
2
4
|
/**
|
|
3
5
|
* Specify the label for the fullscreen button
|
|
4
6
|
*/
|
|
5
|
-
fullscreen
|
|
7
|
+
fullscreen: string;
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* Specify the label for the play button
|
|
9
11
|
*/
|
|
10
|
-
play
|
|
12
|
+
play: string;
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* Specify the label for the pause button
|
|
14
16
|
*/
|
|
15
|
-
pause
|
|
17
|
+
pause: string;
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* Specify the label for the volume button
|
|
19
21
|
*/
|
|
20
|
-
volume
|
|
22
|
+
volume: string;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export interface TracksConfig {
|
|
@@ -61,7 +63,7 @@ export interface VideoPlayerProps {
|
|
|
61
63
|
/**
|
|
62
64
|
* poster image for video
|
|
63
65
|
*/
|
|
64
|
-
poster?:
|
|
66
|
+
poster?: Poster;
|
|
65
67
|
|
|
66
68
|
/**
|
|
67
69
|
* if self-hosted, specify the url of this video
|
|
@@ -188,7 +188,7 @@ const VideoPlayer: FC<VideoPlayerProps> = ({
|
|
|
188
188
|
onEnded={handleEnded}
|
|
189
189
|
/>
|
|
190
190
|
<picture className={`${baseClass}--poster ${showposter ? "show" : ""}`}>
|
|
191
|
-
{poster
|
|
191
|
+
{poster?.url &&
|
|
192
192
|
poster.url
|
|
193
193
|
.sort(
|
|
194
194
|
(a: any, b: any) =>
|
|
@@ -203,7 +203,7 @@ const VideoPlayer: FC<VideoPlayerProps> = ({
|
|
|
203
203
|
key={index}
|
|
204
204
|
/>
|
|
205
205
|
))}
|
|
206
|
-
<img src={poster
|
|
206
|
+
<img src={poster?.url[0]?.src} alt={poster?.alt} />
|
|
207
207
|
</picture>
|
|
208
208
|
<div className={`${controlsClasses} ${showposter ? "notplayed" : ""}`}>
|
|
209
209
|
<label
|
|
Binary file
|