@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,375 +0,0 @@
|
|
|
1
|
-
import { Meta, Story } from "@storybook/react";
|
|
2
|
-
import {
|
|
3
|
-
Title,
|
|
4
|
-
Subtitle,
|
|
5
|
-
Description,
|
|
6
|
-
Primary,
|
|
7
|
-
ArgsTable,
|
|
8
|
-
Stories,
|
|
9
|
-
Subheading,
|
|
10
|
-
} from "@storybook/addon-docs";
|
|
11
|
-
import { Button } from "../components/Button";
|
|
12
|
-
import { ButtonProps } from "../components/Button/Button.props";
|
|
13
|
-
import buttonArgs from "../components/Button/Button.args";
|
|
14
|
-
|
|
15
|
-
const mainDoc = `
|
|
16
|
-
### Usage
|
|
17
|
-
Buttons are used primarily on action items (for actions like submitting a form, or triggering open a modal) that do not navigate the user to another page or view, though sometimes an anchor element may be styled as a button. (See below regarding the \`url\` prop).
|
|
18
|
-
`;
|
|
19
|
-
|
|
20
|
-
const themeDoc = `
|
|
21
|
-
By changing the \`size\` prop you can change the size of the button. By default this is set to \`large\`.
|
|
22
|
-
|
|
23
|
-
| Size | Description |
|
|
24
|
-
|----------|-------------|
|
|
25
|
-
| \`large\` | Button theme for a large button. |
|
|
26
|
-
| \`medium\` | Button theme for a medium button. |
|
|
27
|
-
| \`small\` | Button theme for a small button. |
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
const typeDoc = `
|
|
31
|
-
By changing the \`type\` prop you can change the type of the button, which affects the design of its default state. By default this is set to \`primary\`.
|
|
32
|
-
|
|
33
|
-
| Type | Description |
|
|
34
|
-
|----------|-------------|
|
|
35
|
-
| \`primary\` | Button type for a primary button. |
|
|
36
|
-
| \`secondary\` | Button type for a secondary button. |
|
|
37
|
-
| \`tertiary\` | Button type for a tertiary button. |
|
|
38
|
-
| \`alert\` | Button type for an alert button. |
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
const iconDoc = `
|
|
42
|
-
By changing the \`icon\` and \`iconPosition\` props you can set the icon to use, and set its position in the button. Additonally, you can set the \`icononly\` prop to \`true\` if you want the button's label to be visually hidden.
|
|
43
|
-
|
|
44
|
-
| Prop | Description |
|
|
45
|
-
|----------|-------------|
|
|
46
|
-
| \`icon\` | Sets the icon. Must match the name of an icon in the @ilo-org icons package. |
|
|
47
|
-
| \`iconPosition\` | left or right. On which side of the label does the icon display? |
|
|
48
|
-
| \`icononly\` | Boolean. If true, no label is shown visually (though one is still provided to screen readers). |
|
|
49
|
-
`;
|
|
50
|
-
|
|
51
|
-
const hrefDoc = `
|
|
52
|
-
Populating the \`url\` prop with a valid url and/or an anchor to an id in the current document (e.g. \`#my-id\`) will result in the same design being displayed, but "under the hood," in the html, an \`<a>\` element will be used, allowing link functionality. When this is populated, the \`target\` prop is also read. Populating this, sets the \`target\` attribute of the anchor tag, which opens the link url in a new tab or window.
|
|
53
|
-
|
|
54
|
-
| Prop | Description |
|
|
55
|
-
|----------|-------------|
|
|
56
|
-
| \`url\` | Should be a valid url or anchor in the page. |
|
|
57
|
-
| \`target\` | Should be a valid value for the anchor tag's target attribute. |
|
|
58
|
-
`;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Button Story
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
export default {
|
|
65
|
-
title: "Components/Button",
|
|
66
|
-
component: Button,
|
|
67
|
-
argTypes: {
|
|
68
|
-
size: {
|
|
69
|
-
options: ["large", "medium", "small"],
|
|
70
|
-
control: { type: "select" },
|
|
71
|
-
},
|
|
72
|
-
type: {
|
|
73
|
-
options: ["primary", "secondary", "tertiary"],
|
|
74
|
-
control: { type: "select" },
|
|
75
|
-
},
|
|
76
|
-
icononly: {
|
|
77
|
-
options: [true, false],
|
|
78
|
-
control: { type: "boolean" },
|
|
79
|
-
},
|
|
80
|
-
iconPosition: {
|
|
81
|
-
options: ["left", "center", "right"],
|
|
82
|
-
control: { type: "select" },
|
|
83
|
-
},
|
|
84
|
-
opensmodal: {
|
|
85
|
-
options: [true, false],
|
|
86
|
-
control: { type: "boolean" },
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
parameters: {
|
|
90
|
-
componentSubtitle: "Component",
|
|
91
|
-
docs: {
|
|
92
|
-
page: () => (
|
|
93
|
-
<>
|
|
94
|
-
<Subtitle />
|
|
95
|
-
<Title />
|
|
96
|
-
<Description>{mainDoc}</Description>
|
|
97
|
-
<Primary />
|
|
98
|
-
<ArgsTable />
|
|
99
|
-
<Subheading>Theme Prop</Subheading>
|
|
100
|
-
<Description>{themeDoc}</Description>
|
|
101
|
-
<Subheading>Type Prop</Subheading>
|
|
102
|
-
<Description>{typeDoc}</Description>
|
|
103
|
-
<Subheading>Icon Props</Subheading>
|
|
104
|
-
<Description>{iconDoc}</Description>
|
|
105
|
-
<Subheading>Link Props</Subheading>
|
|
106
|
-
<Description>{hrefDoc}</Description>
|
|
107
|
-
<Stories title="Examples"></Stories>
|
|
108
|
-
</>
|
|
109
|
-
),
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
} as Meta<typeof Button>;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Base Button Template
|
|
116
|
-
*
|
|
117
|
-
* create a Storybook template for this component
|
|
118
|
-
*
|
|
119
|
-
*@param args (Array) - props to be passed to the component
|
|
120
|
-
*/
|
|
121
|
-
const BaseButtonTemplate: Story<ButtonProps> = (args) => <Button {...args} />;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Base Button Instance
|
|
125
|
-
*
|
|
126
|
-
*/
|
|
127
|
-
export const A_BaseButton = BaseButtonTemplate.bind({});
|
|
128
|
-
// enumerate the props for the base button
|
|
129
|
-
// @ts-ignore
|
|
130
|
-
A_BaseButton.args = buttonArgs.primary;
|
|
131
|
-
A_BaseButton.storyName = "Default Button";
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Primary Button Template
|
|
135
|
-
*
|
|
136
|
-
* create a Storybook template for this component
|
|
137
|
-
*
|
|
138
|
-
*@param args (Object) - props to be passed to the component
|
|
139
|
-
*/
|
|
140
|
-
const PrimaryButtonTemplate: Story<ButtonProps> = (args) => (
|
|
141
|
-
<>
|
|
142
|
-
{primarybuttons.map((button, i) => (
|
|
143
|
-
<Button
|
|
144
|
-
{...args}
|
|
145
|
-
label={button.label}
|
|
146
|
-
size={button.size}
|
|
147
|
-
target={button.target}
|
|
148
|
-
kind={button.kind}
|
|
149
|
-
disabled={button.disabled}
|
|
150
|
-
type={button.type}
|
|
151
|
-
url={button.url}
|
|
152
|
-
icon={button.icon}
|
|
153
|
-
icononly={button.icononly}
|
|
154
|
-
iconPosition={button.iconPosition}
|
|
155
|
-
key={i}
|
|
156
|
-
/>
|
|
157
|
-
))}
|
|
158
|
-
<Button {...primarybuttons[0]} label={`Disabled Primary`} disabled={true} />
|
|
159
|
-
</>
|
|
160
|
-
);
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Primary Button Instance
|
|
164
|
-
*
|
|
165
|
-
*/
|
|
166
|
-
export const B_PrimaryButton = PrimaryButtonTemplate.bind({});
|
|
167
|
-
const primarybuttons = [
|
|
168
|
-
buttonArgs.primary,
|
|
169
|
-
buttonArgs.iconleftlgprimary,
|
|
170
|
-
buttonArgs.iconrightlgprimary,
|
|
171
|
-
buttonArgs.icononlylgprimary,
|
|
172
|
-
buttonArgs.medium,
|
|
173
|
-
buttonArgs.iconleftmprimary,
|
|
174
|
-
buttonArgs.iconrightmprimary,
|
|
175
|
-
buttonArgs.icononlymprimary,
|
|
176
|
-
buttonArgs.small,
|
|
177
|
-
buttonArgs.iconleftsmprimary,
|
|
178
|
-
buttonArgs.iconrightsmprimary,
|
|
179
|
-
buttonArgs.icononlysmprimary,
|
|
180
|
-
];
|
|
181
|
-
// @ts-ignore
|
|
182
|
-
B_PrimaryButton.storyName = "Primary Button";
|
|
183
|
-
B_PrimaryButton.parameters = {
|
|
184
|
-
docs: {
|
|
185
|
-
description: {
|
|
186
|
-
story:
|
|
187
|
-
"Primary buttons are the default button style, most-often used. They usually indicate positive action.",
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Secondary Button Template
|
|
194
|
-
*
|
|
195
|
-
* create a Storybook template for this component
|
|
196
|
-
*
|
|
197
|
-
*@param args (Object) - props to be passed to the component
|
|
198
|
-
*/
|
|
199
|
-
const SecondaryButtonTemplate: Story<ButtonProps> = (args) => (
|
|
200
|
-
<>
|
|
201
|
-
{secondarybuttons.map((button, i) => (
|
|
202
|
-
<Button
|
|
203
|
-
{...args}
|
|
204
|
-
label={button.label}
|
|
205
|
-
size={button.size}
|
|
206
|
-
target={button.target}
|
|
207
|
-
kind={button.kind}
|
|
208
|
-
disabled={button.disabled}
|
|
209
|
-
type={button.type}
|
|
210
|
-
url={button.url}
|
|
211
|
-
icon={button.icon}
|
|
212
|
-
icononly={button.icononly}
|
|
213
|
-
iconPosition={button.iconPosition}
|
|
214
|
-
key={i}
|
|
215
|
-
/>
|
|
216
|
-
))}
|
|
217
|
-
<Button
|
|
218
|
-
{...secondarybuttons[0]}
|
|
219
|
-
label={`Disabled Secondary`}
|
|
220
|
-
disabled={true}
|
|
221
|
-
/>
|
|
222
|
-
</>
|
|
223
|
-
);
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Medium Button Instance
|
|
227
|
-
*
|
|
228
|
-
*/
|
|
229
|
-
export const C_SecondaryButton = SecondaryButtonTemplate.bind({});
|
|
230
|
-
|
|
231
|
-
const secondarybuttons = [
|
|
232
|
-
buttonArgs.secondary,
|
|
233
|
-
buttonArgs.iconleftlgsecondary,
|
|
234
|
-
buttonArgs.iconrightlgsecondary,
|
|
235
|
-
buttonArgs.icononlylgsecondary,
|
|
236
|
-
buttonArgs.secondarym,
|
|
237
|
-
buttonArgs.iconleftmsecondary,
|
|
238
|
-
buttonArgs.iconrightmsecondary,
|
|
239
|
-
buttonArgs.icononlymsecondary,
|
|
240
|
-
buttonArgs.secondarysm,
|
|
241
|
-
buttonArgs.iconleftsmsecondary,
|
|
242
|
-
buttonArgs.iconrightsmsecondary,
|
|
243
|
-
buttonArgs.icononlysmsecondary,
|
|
244
|
-
];
|
|
245
|
-
C_SecondaryButton.storyName = "Secondary Button";
|
|
246
|
-
C_SecondaryButton.parameters = {
|
|
247
|
-
docs: {
|
|
248
|
-
description: {
|
|
249
|
-
story:
|
|
250
|
-
"Secondary buttons are usually seen alongside Primary buttons when there are two action options, especially a positive and a negative option (e.g. a Cancel button next to a Submit button) or when there is a hierarchy of action (for example, the File Upload button in a form is a Secondary Button and the Submit button is a Primary button).",
|
|
251
|
-
},
|
|
252
|
-
},
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Tertiary Button Template
|
|
257
|
-
*
|
|
258
|
-
* create a Storybook template for this component
|
|
259
|
-
*
|
|
260
|
-
*@param args (Object) - props to be passed to the component
|
|
261
|
-
*/
|
|
262
|
-
const TertiaryButtonTemplate: Story<ButtonProps> = (args) => (
|
|
263
|
-
<>
|
|
264
|
-
{tertiarybuttons.map((button, i) => (
|
|
265
|
-
<Button
|
|
266
|
-
{...args}
|
|
267
|
-
label={button.label}
|
|
268
|
-
size={button.size}
|
|
269
|
-
target={button.target}
|
|
270
|
-
kind={button.kind}
|
|
271
|
-
disabled={button.disabled}
|
|
272
|
-
type={button.type}
|
|
273
|
-
url={button.url}
|
|
274
|
-
icon={button.icon}
|
|
275
|
-
icononly={button.icononly}
|
|
276
|
-
iconPosition={button.iconPosition}
|
|
277
|
-
key={i}
|
|
278
|
-
/>
|
|
279
|
-
))}
|
|
280
|
-
<Button
|
|
281
|
-
{...tertiarybuttons[0]}
|
|
282
|
-
label={`Disabled Tertiary`}
|
|
283
|
-
disabled={true}
|
|
284
|
-
/>
|
|
285
|
-
</>
|
|
286
|
-
);
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* Tertiary Button Instance
|
|
290
|
-
*
|
|
291
|
-
*/
|
|
292
|
-
export const D_TertiaryButton = TertiaryButtonTemplate.bind({});
|
|
293
|
-
|
|
294
|
-
const tertiarybuttons = [
|
|
295
|
-
buttonArgs.tertiary,
|
|
296
|
-
buttonArgs.iconleftlgtertiary,
|
|
297
|
-
buttonArgs.iconrightlgtertiary,
|
|
298
|
-
buttonArgs.icononlylgtertiary,
|
|
299
|
-
buttonArgs.tertiarym,
|
|
300
|
-
buttonArgs.iconleftmtertiary,
|
|
301
|
-
buttonArgs.iconrightmtertiary,
|
|
302
|
-
buttonArgs.icononlymtertiary,
|
|
303
|
-
buttonArgs.tertiarysm,
|
|
304
|
-
buttonArgs.iconleftsmtertiary,
|
|
305
|
-
buttonArgs.iconrightsmtertiary,
|
|
306
|
-
buttonArgs.icononlysmtertiary,
|
|
307
|
-
];
|
|
308
|
-
D_TertiaryButton.storyName = "Tertiary Button";
|
|
309
|
-
D_TertiaryButton.parameters = {
|
|
310
|
-
docs: {
|
|
311
|
-
description: {
|
|
312
|
-
story:
|
|
313
|
-
"Tertiary buttons are used when the action taken is not of primary importance to the component functionality, especially when the action is optional (for example, the call to action in a Callout component).",
|
|
314
|
-
},
|
|
315
|
-
},
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Alert Button Template
|
|
320
|
-
*
|
|
321
|
-
* create a Storybook template for this component
|
|
322
|
-
*
|
|
323
|
-
*@param args (Object) - props to be passed to the component
|
|
324
|
-
*/
|
|
325
|
-
const AlertButtonTemplate: Story<ButtonProps> = (args) => (
|
|
326
|
-
<>
|
|
327
|
-
{alertbuttons.map((button, i) => (
|
|
328
|
-
<Button
|
|
329
|
-
{...args}
|
|
330
|
-
label={button.label}
|
|
331
|
-
size={button.size}
|
|
332
|
-
target={button.target}
|
|
333
|
-
kind={button.kind}
|
|
334
|
-
disabled={button.disabled}
|
|
335
|
-
type={button.type}
|
|
336
|
-
url={button.url}
|
|
337
|
-
icon={button.icon}
|
|
338
|
-
icononly={button.icononly}
|
|
339
|
-
iconPosition={button.iconPosition}
|
|
340
|
-
key={i}
|
|
341
|
-
/>
|
|
342
|
-
))}
|
|
343
|
-
<Button {...alertbuttons[0]} label={`Disabled Alert`} disabled={true} />
|
|
344
|
-
</>
|
|
345
|
-
);
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Alert Button Instance
|
|
349
|
-
*
|
|
350
|
-
*/
|
|
351
|
-
export const E_AlertButton = AlertButtonTemplate.bind({});
|
|
352
|
-
|
|
353
|
-
const alertbuttons = [
|
|
354
|
-
buttonArgs.alert,
|
|
355
|
-
buttonArgs.iconleftlgalert,
|
|
356
|
-
buttonArgs.iconrightlgalert,
|
|
357
|
-
buttonArgs.icononlylgalert,
|
|
358
|
-
buttonArgs.alertm,
|
|
359
|
-
buttonArgs.iconleftmalert,
|
|
360
|
-
buttonArgs.iconrightmalert,
|
|
361
|
-
buttonArgs.icononlymalert,
|
|
362
|
-
buttonArgs.alertsm,
|
|
363
|
-
buttonArgs.iconleftsmalert,
|
|
364
|
-
buttonArgs.iconrightsmalert,
|
|
365
|
-
buttonArgs.icononlysmalert,
|
|
366
|
-
];
|
|
367
|
-
E_AlertButton.storyName = "Alert Button";
|
|
368
|
-
E_AlertButton.parameters = {
|
|
369
|
-
docs: {
|
|
370
|
-
description: {
|
|
371
|
-
story:
|
|
372
|
-
"Alert buttons are used when the action resolves an emergecny or responds to an alert.",
|
|
373
|
-
},
|
|
374
|
-
},
|
|
375
|
-
};
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { Story, Meta } from "@storybook/react";
|
|
2
|
-
import {
|
|
3
|
-
Title,
|
|
4
|
-
Subtitle,
|
|
5
|
-
Description,
|
|
6
|
-
Primary,
|
|
7
|
-
ArgsTable,
|
|
8
|
-
Stories,
|
|
9
|
-
Subheading,
|
|
10
|
-
} from "@storybook/addon-docs";
|
|
11
|
-
import { Callout } from "../components/Callout";
|
|
12
|
-
import { CalloutProps } from "../components/Callout/Callout.props";
|
|
13
|
-
import calloutArgs from "../components/Callout/Callout.args";
|
|
14
|
-
|
|
15
|
-
const themeDoc = `
|
|
16
|
-
By changing the \`type\` prop you can change base coloring of the links. By default this is set to \`info\`.
|
|
17
|
-
|
|
18
|
-
| Theme | Description |
|
|
19
|
-
|----------|-------------|
|
|
20
|
-
| \`info\` | Callout color and icon for info block. |
|
|
21
|
-
| \`error\` | Callout color and icon for error block. |
|
|
22
|
-
| \`success\` | Callout color and icon for success block. |
|
|
23
|
-
| \`warning\` | Callout color and icon for warning block. |
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Callout Story
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
export default {
|
|
31
|
-
title: "Components/Callout",
|
|
32
|
-
component: Callout,
|
|
33
|
-
argTypes: {
|
|
34
|
-
isCollapsible: {
|
|
35
|
-
options: [true, false],
|
|
36
|
-
control: { type: "boolean" },
|
|
37
|
-
},
|
|
38
|
-
isOpen: {
|
|
39
|
-
options: [true, false],
|
|
40
|
-
control: { type: "boolean" },
|
|
41
|
-
},
|
|
42
|
-
type: {
|
|
43
|
-
options: ["info", "error", "success", "warning"],
|
|
44
|
-
control: { type: "select" },
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
parameters: {
|
|
48
|
-
componentSubtitle: "Component",
|
|
49
|
-
docs: {
|
|
50
|
-
page: () => (
|
|
51
|
-
<>
|
|
52
|
-
<Subtitle />
|
|
53
|
-
<Title />
|
|
54
|
-
<Description>
|
|
55
|
-
The Callout component provides an inline alert or message to end
|
|
56
|
-
users.
|
|
57
|
-
</Description>
|
|
58
|
-
<Primary />
|
|
59
|
-
<ArgsTable />
|
|
60
|
-
<Subheading>Theme Prop</Subheading>
|
|
61
|
-
<Description>{themeDoc}</Description>
|
|
62
|
-
<Stories title="Examples"></Stories>
|
|
63
|
-
</>
|
|
64
|
-
),
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
} as Meta<typeof Callout>;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Info Callout Template
|
|
71
|
-
*
|
|
72
|
-
* create a Storybook template for this component
|
|
73
|
-
*
|
|
74
|
-
*@param (Object) args - props to be passed to the component
|
|
75
|
-
*/
|
|
76
|
-
const InfoCalloutTemplate: Story<CalloutProps> = (args) => (
|
|
77
|
-
<Callout {...calloutArgs.infoCallout} {...args}>
|
|
78
|
-
That Biff, what a character. Always trying to get away with something. Been
|
|
79
|
-
on top of Biff ever since high school. Although, if it wasn't for him - Yes,
|
|
80
|
-
yes, I'm George, George McFly, and I'm your density. I mean, I'm your
|
|
81
|
-
destiny. Right.
|
|
82
|
-
</Callout>
|
|
83
|
-
);
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Error Callout Template
|
|
87
|
-
*
|
|
88
|
-
* create a Storybook template for this component
|
|
89
|
-
*
|
|
90
|
-
*@param (Object) args - props to be passed to the component
|
|
91
|
-
*/
|
|
92
|
-
const ErrorCalloutTemplate: Story<CalloutProps> = (args) => (
|
|
93
|
-
<Callout {...calloutArgs.errorCallout} {...args}>
|
|
94
|
-
That Biff, what a character. Always trying to get away with something. Been
|
|
95
|
-
on top of Biff ever since high school. Although, if it wasn't for him - Yes,
|
|
96
|
-
yes, I'm George, George McFly, and I'm your density. I mean, I'm your
|
|
97
|
-
destiny. Right.
|
|
98
|
-
</Callout>
|
|
99
|
-
);
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Success Callout Template
|
|
103
|
-
*
|
|
104
|
-
* create a Storybook template for this component
|
|
105
|
-
*
|
|
106
|
-
*@param (Object) args - props to be passed to the component
|
|
107
|
-
*/
|
|
108
|
-
const SuccessCalloutTemplate: Story<CalloutProps> = (args) => (
|
|
109
|
-
<Callout {...calloutArgs.successCallout} {...args}>
|
|
110
|
-
That Biff, what a character. Always trying to get away with something. Been
|
|
111
|
-
on top of Biff ever since high school. Although, if it wasn't for him - Yes,
|
|
112
|
-
yes, I'm George, George McFly, and I'm your density. I mean, I'm your
|
|
113
|
-
destiny. Right.
|
|
114
|
-
</Callout>
|
|
115
|
-
);
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Warning Callout Template
|
|
119
|
-
*
|
|
120
|
-
* create a Storybook template for this component
|
|
121
|
-
*
|
|
122
|
-
*@param (Object) args - props to be passed to the component
|
|
123
|
-
*/
|
|
124
|
-
const WarningCalloutTemplate: Story<CalloutProps> = (args) => (
|
|
125
|
-
<Callout {...calloutArgs.warningCallout} {...args}>
|
|
126
|
-
That Biff, what a character. Always trying to get away with something. Been
|
|
127
|
-
on top of Biff ever since high school. Although, if it wasn't for him - Yes,
|
|
128
|
-
yes, I'm George, George McFly, and I'm your density. I mean, I'm your
|
|
129
|
-
destiny. Right.
|
|
130
|
-
</Callout>
|
|
131
|
-
);
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Info Callout Instance
|
|
135
|
-
*
|
|
136
|
-
*/
|
|
137
|
-
export const InfoCallout = InfoCalloutTemplate.bind({});
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Error Callout Instance
|
|
141
|
-
*
|
|
142
|
-
*/
|
|
143
|
-
export const ErrorCallout = ErrorCalloutTemplate.bind({});
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Success Callout Instance
|
|
147
|
-
*
|
|
148
|
-
*/
|
|
149
|
-
export const SuccessCallout = SuccessCalloutTemplate.bind({});
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Warning Callout Instance
|
|
153
|
-
*
|
|
154
|
-
*/
|
|
155
|
-
export const WarningCallout = WarningCalloutTemplate.bind({});
|
|
156
|
-
|
|
157
|
-
// enumerate the props for the Info Callout
|
|
158
|
-
InfoCallout.storyName = "Info Callout";
|
|
159
|
-
InfoCallout.parameters = {
|
|
160
|
-
docs: {
|
|
161
|
-
description: {
|
|
162
|
-
story: "The Info Callout is for",
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
// enumerate the props Error Callout
|
|
168
|
-
ErrorCallout.storyName = "Error Callout";
|
|
169
|
-
ErrorCallout.parameters = {
|
|
170
|
-
docs: {
|
|
171
|
-
description: {
|
|
172
|
-
story: "The Error Callout is for",
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
// enumerate the props Success Callout
|
|
178
|
-
SuccessCallout.storyName = "Success Callout";
|
|
179
|
-
SuccessCallout.parameters = {
|
|
180
|
-
docs: {
|
|
181
|
-
description: {
|
|
182
|
-
story: "The Success Callout is for",
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
// enumerate the props Warning Callout
|
|
188
|
-
WarningCallout.storyName = "Warning Callout";
|
|
189
|
-
WarningCallout.parameters = {
|
|
190
|
-
docs: {
|
|
191
|
-
description: {
|
|
192
|
-
story: "The Warning Callout is for",
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Story, Meta } from "@storybook/react";
|
|
2
|
-
import {
|
|
3
|
-
Title,
|
|
4
|
-
Subtitle,
|
|
5
|
-
Description,
|
|
6
|
-
Primary,
|
|
7
|
-
Stories,
|
|
8
|
-
Subheading,
|
|
9
|
-
} from "@storybook/addon-docs";
|
|
10
|
-
import { ContextMenu } from "../components/ContextMenu";
|
|
11
|
-
import { ContextMenuProps } from "../components/ContextMenu/ContextMenu.props";
|
|
12
|
-
import contextMenuArgs from "../components/ContextMenu/ContextMenu.args";
|
|
13
|
-
|
|
14
|
-
const propsDoc = `
|
|
15
|
-
The ContextMenu receives a list of urls with labels and an optional prop indicating if this link is at the end of a 'section.'
|
|
16
|
-
|
|
17
|
-
| Prop | Description |
|
|
18
|
-
|----------|-------------|
|
|
19
|
-
| \`endsection\` | Boolean - is this at the end of a 'section'? |
|
|
20
|
-
| \`label\` | Label for this link. |
|
|
21
|
-
| \`url\` | URL for this link. |
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* ContextMenu Story
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
export default {
|
|
29
|
-
title: "Components/ContextMenu",
|
|
30
|
-
component: ContextMenu,
|
|
31
|
-
parameters: {
|
|
32
|
-
componentSubtitle: "Component",
|
|
33
|
-
docs: {
|
|
34
|
-
page: () => (
|
|
35
|
-
<>
|
|
36
|
-
<Subtitle />
|
|
37
|
-
<Title />
|
|
38
|
-
<Description>
|
|
39
|
-
The ContextMenu component is used to display a list of contextual
|
|
40
|
-
links.
|
|
41
|
-
</Description>
|
|
42
|
-
<Primary />
|
|
43
|
-
<Subheading>Props</Subheading>
|
|
44
|
-
<Description>{propsDoc}</Description>
|
|
45
|
-
<Stories title="Examples"></Stories>
|
|
46
|
-
</>
|
|
47
|
-
),
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
} as Meta<typeof ContextMenu>;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* ContextMenu Template
|
|
54
|
-
*
|
|
55
|
-
* create a Storybook template for this component
|
|
56
|
-
*
|
|
57
|
-
*@param (Object) args - props to be passed to the component
|
|
58
|
-
*/
|
|
59
|
-
const ContextMenuTemplate: Story<ContextMenuProps> = (args) => (
|
|
60
|
-
<ContextMenu {...args} />
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
export const Basic = ContextMenuTemplate.bind({});
|
|
64
|
-
|
|
65
|
-
export const WithSection = ContextMenuTemplate.bind({});
|
|
66
|
-
|
|
67
|
-
// enumerate the props for the variations on the ContextMenu component
|
|
68
|
-
Basic.args = contextMenuArgs.basic;
|
|
69
|
-
Basic.storyName = "ContextMenu - Basic";
|
|
70
|
-
|
|
71
|
-
WithSection.args = contextMenuArgs.withsection;
|
|
72
|
-
WithSection.storyName = "ContextMenu - With A 'Section'";
|
|
73
|
-
WithSection.parameters = {
|
|
74
|
-
docs: {
|
|
75
|
-
description: {
|
|
76
|
-
story:
|
|
77
|
-
"The Context menu iteams can each be marked, via the `endsection` prop, as a *section*, which display a 100% width bottom border.",
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
};
|