@pega/cosmos-react-demos 2.1.2 → 3.0.0-dev.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jsx/build/AppHeader/AppHeader.stories.d.ts +2 -1
- package/jsx/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
- package/jsx/build/AppHeader/AppHeader.stories.jsx +46 -13
- package/jsx/build/AppHeader/AppHeader.stories.jsx.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.d.ts +2 -1
- package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.jsx +46 -13
- package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx +45 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.js +1 -1
- package/jsx/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx +52 -34
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx +2 -6
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -1
- package/jsx/build/Workbench/Workbench.stories.jsx +10 -12
- package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.d.ts +5 -0
- package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.jsx +25 -1
- package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/core/Avatar/Avatar.stories.d.ts +5 -0
- package/jsx/core/Avatar/Avatar.stories.d.ts.map +1 -1
- package/jsx/core/Avatar/Avatar.stories.jsx +32 -5
- package/jsx/core/Avatar/Avatar.stories.jsx.map +1 -1
- package/jsx/core/Badges/Status.stories.d.ts +5 -0
- package/jsx/core/Badges/Status.stories.d.ts.map +1 -1
- package/jsx/core/Badges/Status.stories.jsx +25 -1
- package/jsx/core/Badges/Status.stories.jsx.map +1 -1
- package/jsx/core/Banner/Banner.mocks.d.ts +18 -0
- package/jsx/core/Banner/Banner.mocks.d.ts.map +1 -0
- package/jsx/core/Banner/Banner.mocks.jsx +41 -0
- package/jsx/core/Banner/Banner.mocks.jsx.map +1 -0
- package/jsx/core/Banner/Banner.stories.d.ts +5 -1
- package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
- package/jsx/core/Banner/Banner.stories.jsx +22 -39
- package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
- package/jsx/core/Button/Button.stories.d.ts +8 -0
- package/jsx/core/Button/Button.stories.d.ts.map +1 -1
- package/jsx/core/Button/Button.stories.jsx +32 -3
- package/jsx/core/Button/Button.stories.jsx.map +1 -1
- package/jsx/core/Card/Card.stories.d.ts +5 -0
- package/jsx/core/Card/Card.stories.d.ts.map +1 -1
- package/jsx/core/Card/Card.stories.jsx +30 -1
- package/jsx/core/Card/Card.stories.jsx.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.d.ts +12 -0
- package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx +54 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
- package/jsx/core/Configuration/Configuration.stories.d.ts +17 -0
- package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -1
- package/jsx/core/Configuration/Configuration.stories.jsx +94 -3
- package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +1 -0
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +36 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -0
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +1 -34
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -1
- package/jsx/core/File/FileDisplay.stories.d.ts +8 -1
- package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -1
- package/jsx/core/File/FileDisplay.stories.jsx +37 -2
- package/jsx/core/File/FileDisplay.stories.jsx.map +1 -1
- package/jsx/core/Flex/Flex.styles.d.ts +2 -2
- package/jsx/core/Flex/Flex.styles.d.ts.map +1 -1
- package/jsx/core/Flex/Flex.styles.js +17 -17
- package/jsx/core/Flex/Flex.styles.js.map +1 -1
- package/jsx/core/Flex/FlexContainer.stories.d.ts +2 -0
- package/jsx/core/Flex/FlexContainer.stories.d.ts.map +1 -1
- package/jsx/core/Flex/FlexContainer.stories.jsx +45 -32
- package/jsx/core/Flex/FlexContainer.stories.jsx.map +1 -1
- package/jsx/core/Flex/FlexItem.stories.jsx +13 -13
- package/jsx/core/Flex/FlexItem.stories.jsx.map +1 -1
- package/jsx/core/Form/Form.mocks.d.ts +8 -0
- package/jsx/core/Form/Form.mocks.d.ts.map +1 -0
- package/jsx/core/Form/Form.mocks.jsx +138 -0
- package/jsx/core/Form/Form.mocks.jsx.map +1 -0
- package/jsx/core/Form/Form.stories.d.ts +10 -7
- package/jsx/core/Form/Form.stories.d.ts.map +1 -1
- package/jsx/core/Form/Form.stories.jsx +44 -138
- package/jsx/core/Form/Form.stories.jsx.map +1 -1
- package/jsx/core/Grid/Grid.styles.d.ts +2 -2
- package/jsx/core/Grid/Grid.styles.d.ts.map +1 -1
- package/jsx/core/Grid/Grid.styles.js +4 -4
- package/jsx/core/Grid/Grid.styles.js.map +1 -1
- package/jsx/core/Grid/GridContainer.stories.d.ts +6 -5
- package/jsx/core/Grid/GridContainer.stories.d.ts.map +1 -1
- package/jsx/core/Grid/GridContainer.stories.jsx +51 -44
- package/jsx/core/Grid/GridContainer.stories.jsx.map +1 -1
- package/jsx/core/Grid/GridItem.stories.d.ts +2 -2
- package/jsx/core/Grid/GridItem.stories.d.ts.map +1 -1
- package/jsx/core/Grid/GridItem.stories.jsx +28 -28
- package/jsx/core/Grid/GridItem.stories.jsx.map +1 -1
- package/jsx/core/Icon/Icon.mocks.d.ts +3 -0
- package/jsx/core/Icon/Icon.mocks.d.ts.map +1 -0
- package/jsx/core/Icon/Icon.mocks.jsx +9 -0
- package/jsx/core/Icon/Icon.mocks.jsx.map +1 -0
- package/jsx/core/Icon/Icon.stories.d.ts +1 -0
- package/jsx/core/Icon/Icon.stories.d.ts.map +1 -1
- package/jsx/core/Icon/Icon.stories.jsx +7 -1
- package/jsx/core/Icon/Icon.stories.jsx.map +1 -1
- package/jsx/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
- package/jsx/core/IconPicker/IconPicker.stories.jsx +0 -1
- package/jsx/core/IconPicker/IconPicker.stories.jsx.map +1 -1
- package/jsx/core/Input/Input.stories.d.ts +9 -0
- package/jsx/core/Input/Input.stories.d.ts.map +1 -1
- package/jsx/core/Input/Input.stories.jsx +40 -1
- package/jsx/core/Input/Input.stories.jsx.map +1 -1
- package/jsx/core/Label/Label.stories.d.ts +4 -0
- package/jsx/core/Label/Label.stories.d.ts.map +1 -1
- package/jsx/core/Label/Label.stories.jsx +18 -1
- package/jsx/core/Label/Label.stories.jsx.map +1 -1
- package/jsx/core/Lightbox/Lightbox.mocks.d.ts +15 -0
- package/jsx/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
- package/jsx/core/Lightbox/Lightbox.mocks.js +59 -0
- package/jsx/core/Lightbox/Lightbox.mocks.js.map +1 -0
- package/jsx/core/Lightbox/Lightbox.stories.d.ts +7 -6
- package/jsx/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
- package/jsx/core/Lightbox/Lightbox.stories.jsx +14 -65
- package/jsx/core/Lightbox/Lightbox.stories.jsx.map +1 -1
- package/jsx/core/Link/Link.stories.d.ts +11 -1
- package/jsx/core/Link/Link.stories.d.ts.map +1 -1
- package/jsx/core/Link/Link.stories.jsx +22 -5
- package/jsx/core/Link/Link.stories.jsx.map +1 -1
- package/jsx/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
- package/jsx/core/List/CommaSeparatedList.stories.jsx +17 -19
- package/jsx/core/List/CommaSeparatedList.stories.jsx.map +1 -1
- package/jsx/core/List/OrderedList.stories.d.ts.map +1 -1
- package/jsx/core/List/OrderedList.stories.jsx +10 -10
- package/jsx/core/List/OrderedList.stories.jsx.map +1 -1
- package/jsx/core/List/UnorderedList.stories.d.ts.map +1 -1
- package/jsx/core/List/UnorderedList.stories.jsx +10 -10
- package/jsx/core/List/UnorderedList.stories.jsx.map +1 -1
- package/jsx/core/Menu/Menu.stories.d.ts +3 -3
- package/jsx/core/Menu/Menu.stories.d.ts.map +1 -1
- package/jsx/core/Menu/Menu.stories.jsx +8 -12
- package/jsx/core/Menu/Menu.stories.jsx.map +1 -1
- package/jsx/core/Modal/Modal.mocks.jsx +1 -1
- package/jsx/core/Modal/Modal.mocks.jsx.map +1 -1
- package/jsx/core/Number/Number.stories.d.ts.map +1 -1
- package/jsx/core/Number/Number.stories.jsx +1 -4
- package/jsx/core/Number/Number.stories.jsx.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx +3 -3
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx +3 -0
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx.map +1 -1
- package/jsx/core/Popover/Popover.stories.d.ts +1 -2
- package/jsx/core/Popover/Popover.stories.d.ts.map +1 -1
- package/jsx/core/Popover/Popover.stories.jsx +35 -37
- package/jsx/core/Popover/Popover.stories.jsx.map +1 -1
- package/jsx/core/Progress/Progress.stories.d.ts +4 -0
- package/jsx/core/Progress/Progress.stories.d.ts.map +1 -1
- package/jsx/core/Progress/Progress.stories.jsx +22 -1
- package/jsx/core/Progress/Progress.stories.jsx.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.d.ts +12 -0
- package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx +53 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
- package/jsx/core/Rating/Rating.stories.d.ts +8 -1
- package/jsx/core/Rating/Rating.stories.d.ts.map +1 -1
- package/jsx/core/Rating/Rating.stories.jsx +21 -4
- package/jsx/core/Rating/Rating.stories.jsx.map +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.d.ts +4 -0
- package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx +18 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx.map +1 -1
- package/jsx/core/Select/Select.stories.d.ts +8 -0
- package/jsx/core/Select/Select.stories.d.ts.map +1 -1
- package/jsx/core/Select/Select.stories.jsx +35 -1
- package/jsx/core/Select/Select.stories.jsx.map +1 -1
- package/jsx/core/Sentiment/Sentiment.stories.d.ts +6 -0
- package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
- package/jsx/core/Sentiment/Sentiment.stories.jsx +37 -6
- package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -1
- package/jsx/core/SummaryList/SummaryList.stories.jsx +1 -1
- package/jsx/core/SummaryList/SummaryList.stories.jsx.map +1 -1
- package/jsx/core/Switch/Switch.stories.d.ts +7 -0
- package/jsx/core/Switch/Switch.stories.d.ts.map +1 -1
- package/jsx/core/Switch/Switch.stories.jsx +34 -1
- package/jsx/core/Switch/Switch.stories.jsx.map +1 -1
- package/jsx/core/Table/Table.stories.d.ts +25 -0
- package/jsx/core/Table/Table.stories.d.ts.map +1 -1
- package/jsx/core/Table/Table.stories.jsx +120 -1
- package/jsx/core/Table/Table.stories.jsx.map +1 -1
- package/jsx/core/Tabs/Tabs.stories.d.ts +5 -0
- package/jsx/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/jsx/core/Tabs/Tabs.stories.jsx +39 -1
- package/jsx/core/Tabs/Tabs.stories.jsx.map +1 -1
- package/jsx/core/Text/Text.stories.d.ts +19 -0
- package/jsx/core/Text/Text.stories.d.ts.map +1 -1
- package/jsx/core/Text/Text.stories.jsx +112 -1
- package/jsx/core/Text/Text.stories.jsx.map +1 -1
- package/jsx/core/TextArea/TextArea.stories.d.ts +5 -0
- package/jsx/core/TextArea/TextArea.stories.d.ts.map +1 -1
- package/jsx/core/TextArea/TextArea.stories.jsx +22 -1
- package/jsx/core/TextArea/TextArea.stories.jsx.map +1 -1
- package/jsx/core/Toaster/Toaster.stories.d.ts.map +1 -1
- package/jsx/core/Toaster/Toaster.stories.jsx +8 -3
- package/jsx/core/Toaster/Toaster.stories.jsx.map +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.d.ts +6 -0
- package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx +28 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx.map +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.jsx +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -1
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +12 -10
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.mocks.js +5 -10
- package/jsx/cs/TaskManager/TaskManager.mocks.js.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts +8 -3
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.jsx +164 -132
- package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx +1 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -1
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx +19 -2
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -1
- package/jsx/social/Chat/Chat.stories.d.ts +31 -22
- package/jsx/social/Chat/Chat.stories.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.stories.jsx +106 -153
- package/jsx/social/Chat/Chat.stories.jsx.map +1 -1
- package/jsx/social/Email/Email.mocks.d.ts +1 -2
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
- package/jsx/social/Email/{Email.mocks.jsx → Email.mocks.js} +2 -3
- package/jsx/social/Email/Email.mocks.js.map +1 -0
- package/jsx/social/Email/Email.stories.d.ts.map +1 -1
- package/jsx/social/Email/Email.stories.jsx +7 -8
- package/jsx/social/Email/Email.stories.jsx.map +1 -1
- package/jsx/social/Feed/FeedNewPost.stories.jsx +1 -1
- package/jsx/social/Feed/FeedNewPost.stories.jsx.map +1 -1
- package/jsx/social/Feed/FeedPost.stories.jsx +1 -1
- package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -1
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx +6 -7
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +1 -1
- package/jsx/work/CaseView/FileService.mock.d.ts.map +1 -1
- package/jsx/work/CaseView/FileService.mock.jsx +6 -2
- package/jsx/work/CaseView/FileService.mock.jsx.map +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.d.ts +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.jsx +14 -3
- package/jsx/work/Confirmation/Confirmation.stories.jsx.map +1 -1
- package/jsx/work/Confirmation/Confirmation.styles.d.ts +2 -0
- package/jsx/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
- package/jsx/work/Confirmation/Confirmation.styles.js +7 -0
- package/jsx/work/Confirmation/Confirmation.styles.js.map +1 -0
- package/jsx/work/Details/Details.stories.jsx +3 -3
- package/jsx/work/Details/Details.stories.jsx.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.jsx +3 -9
- package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
- package/jsx/work/SearchResults/SearchResults.styles.d.ts +5 -0
- package/jsx/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
- package/jsx/work/SearchResults/SearchResults.styles.js +12 -0
- package/jsx/work/SearchResults/SearchResults.styles.js.map +1 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts +17 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +32 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -0
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx +2 -30
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx.map +1 -1
- package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -1
- package/jsx/work/Timeline/Timeline.stories.jsx +2 -2
- package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -1
- package/lib/build/AppHeader/AppHeader.stories.d.ts +2 -1
- package/lib/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
- package/lib/build/AppHeader/AppHeader.stories.js +46 -13
- package/lib/build/AppHeader/AppHeader.stories.js.map +1 -1
- package/lib/build/AppShell/AppShell.stories.d.ts +2 -1
- package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.stories.js +46 -13
- package/lib/build/AppShell/AppShell.stories.js.map +1 -1
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.js +40 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.js +1 -1
- package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.js +52 -48
- package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.js +2 -2
- package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -1
- package/lib/build/Workbench/Workbench.stories.js +15 -17
- package/lib/build/Workbench/Workbench.stories.js.map +1 -1
- package/lib/core/AppShell/AppShell.stories.d.ts +5 -0
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.stories.js +23 -1
- package/lib/core/AppShell/AppShell.stories.js.map +1 -1
- package/lib/core/Avatar/Avatar.stories.d.ts +5 -0
- package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -1
- package/lib/core/Avatar/Avatar.stories.js +30 -5
- package/lib/core/Avatar/Avatar.stories.js.map +1 -1
- package/lib/core/Badges/Status.stories.d.ts +5 -0
- package/lib/core/Badges/Status.stories.d.ts.map +1 -1
- package/lib/core/Badges/Status.stories.js +23 -1
- package/lib/core/Badges/Status.stories.js.map +1 -1
- package/lib/core/Banner/Banner.mocks.d.ts +18 -0
- package/lib/core/Banner/Banner.mocks.d.ts.map +1 -0
- package/lib/core/Banner/Banner.mocks.js +36 -0
- package/lib/core/Banner/Banner.mocks.js.map +1 -0
- package/lib/core/Banner/Banner.stories.d.ts +5 -1
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
- package/lib/core/Banner/Banner.stories.js +21 -33
- package/lib/core/Banner/Banner.stories.js.map +1 -1
- package/lib/core/Button/Button.stories.d.ts +8 -0
- package/lib/core/Button/Button.stories.d.ts.map +1 -1
- package/lib/core/Button/Button.stories.js +29 -2
- package/lib/core/Button/Button.stories.js.map +1 -1
- package/lib/core/Card/Card.stories.d.ts +5 -0
- package/lib/core/Card/Card.stories.d.ts.map +1 -1
- package/lib/core/Card/Card.stories.js +19 -1
- package/lib/core/Card/Card.stories.js.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.d.ts +12 -0
- package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.js +52 -1
- package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
- package/lib/core/Configuration/Configuration.stories.d.ts +17 -0
- package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -1
- package/lib/core/Configuration/Configuration.stories.js +62 -3
- package/lib/core/Configuration/Configuration.stories.js.map +1 -1
- package/lib/core/DateTime/DateTimeDisplay.stories.js +1 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -1
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.js +38 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.js +1 -35
- package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
- package/lib/core/File/FileDisplay.stories.d.ts +8 -1
- package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
- package/lib/core/File/FileDisplay.stories.js +32 -2
- package/lib/core/File/FileDisplay.stories.js.map +1 -1
- package/lib/core/Flex/Flex.styles.d.ts +2 -2
- package/lib/core/Flex/Flex.styles.d.ts.map +1 -1
- package/lib/core/Flex/Flex.styles.js +17 -17
- package/lib/core/Flex/Flex.styles.js.map +1 -1
- package/lib/core/Flex/FlexContainer.stories.d.ts +2 -0
- package/lib/core/Flex/FlexContainer.stories.d.ts.map +1 -1
- package/lib/core/Flex/FlexContainer.stories.js +10 -7
- package/lib/core/Flex/FlexContainer.stories.js.map +1 -1
- package/lib/core/Flex/FlexItem.stories.js +4 -4
- package/lib/core/Flex/FlexItem.stories.js.map +1 -1
- package/lib/core/Form/Form.mocks.d.ts +8 -0
- package/lib/core/Form/Form.mocks.d.ts.map +1 -0
- package/lib/core/Form/Form.mocks.js +97 -0
- package/lib/core/Form/Form.mocks.js.map +1 -0
- package/lib/core/Form/Form.stories.d.ts +10 -7
- package/lib/core/Form/Form.stories.d.ts.map +1 -1
- package/lib/core/Form/Form.stories.js +42 -96
- package/lib/core/Form/Form.stories.js.map +1 -1
- package/lib/core/Grid/Grid.styles.d.ts +2 -2
- package/lib/core/Grid/Grid.styles.d.ts.map +1 -1
- package/lib/core/Grid/Grid.styles.js +4 -4
- package/lib/core/Grid/Grid.styles.js.map +1 -1
- package/lib/core/Grid/GridContainer.stories.d.ts +6 -5
- package/lib/core/Grid/GridContainer.stories.d.ts.map +1 -1
- package/lib/core/Grid/GridContainer.stories.js +27 -24
- package/lib/core/Grid/GridContainer.stories.js.map +1 -1
- package/lib/core/Grid/GridItem.stories.d.ts +2 -2
- package/lib/core/Grid/GridItem.stories.d.ts.map +1 -1
- package/lib/core/Grid/GridItem.stories.js +10 -10
- package/lib/core/Grid/GridItem.stories.js.map +1 -1
- package/lib/core/Icon/Icon.mocks.d.ts +3 -0
- package/lib/core/Icon/Icon.mocks.d.ts.map +1 -0
- package/lib/core/Icon/Icon.mocks.js +10 -0
- package/lib/core/Icon/Icon.mocks.js.map +1 -0
- package/lib/core/Icon/Icon.stories.d.ts +1 -0
- package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
- package/lib/core/Icon/Icon.stories.js +7 -1
- package/lib/core/Icon/Icon.stories.js.map +1 -1
- package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
- package/lib/core/IconPicker/IconPicker.stories.js +0 -1
- package/lib/core/IconPicker/IconPicker.stories.js.map +1 -1
- package/lib/core/Input/Input.stories.d.ts +9 -0
- package/lib/core/Input/Input.stories.d.ts.map +1 -1
- package/lib/core/Input/Input.stories.js +38 -1
- package/lib/core/Input/Input.stories.js.map +1 -1
- package/lib/core/Label/Label.stories.d.ts +4 -0
- package/lib/core/Label/Label.stories.d.ts.map +1 -1
- package/lib/core/Label/Label.stories.js +16 -1
- package/lib/core/Label/Label.stories.js.map +1 -1
- package/lib/core/Lightbox/Lightbox.mocks.d.ts +15 -0
- package/lib/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
- package/lib/core/Lightbox/Lightbox.mocks.js +67 -0
- package/lib/core/Lightbox/Lightbox.mocks.js.map +1 -0
- package/lib/core/Lightbox/Lightbox.stories.d.ts +7 -6
- package/lib/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
- package/lib/core/Lightbox/Lightbox.stories.js +14 -73
- package/lib/core/Lightbox/Lightbox.stories.js.map +1 -1
- package/lib/core/Link/Link.stories.d.ts +11 -1
- package/lib/core/Link/Link.stories.d.ts.map +1 -1
- package/lib/core/Link/Link.stories.js +7 -4
- package/lib/core/Link/Link.stories.js.map +1 -1
- package/lib/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
- package/lib/core/List/CommaSeparatedList.stories.js +17 -17
- package/lib/core/List/CommaSeparatedList.stories.js.map +1 -1
- package/lib/core/List/OrderedList.stories.d.ts.map +1 -1
- package/lib/core/List/OrderedList.stories.js +10 -10
- package/lib/core/List/OrderedList.stories.js.map +1 -1
- package/lib/core/List/UnorderedList.stories.d.ts.map +1 -1
- package/lib/core/List/UnorderedList.stories.js +10 -10
- package/lib/core/List/UnorderedList.stories.js.map +1 -1
- package/lib/core/Menu/Menu.stories.d.ts +3 -3
- package/lib/core/Menu/Menu.stories.d.ts.map +1 -1
- package/lib/core/Menu/Menu.stories.js +8 -12
- package/lib/core/Menu/Menu.stories.js.map +1 -1
- package/lib/core/Modal/Modal.mocks.js +1 -1
- package/lib/core/Modal/Modal.mocks.js.map +1 -1
- package/lib/core/Number/Number.stories.d.ts.map +1 -1
- package/lib/core/Number/Number.stories.js +1 -4
- package/lib/core/Number/Number.stories.js.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.js +3 -3
- package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/core/Paragraph/ParagraphDisplay.stories.js +3 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.js.map +1 -1
- package/lib/core/Popover/Popover.stories.d.ts +1 -2
- package/lib/core/Popover/Popover.stories.d.ts.map +1 -1
- package/lib/core/Popover/Popover.stories.js +24 -25
- package/lib/core/Popover/Popover.stories.js.map +1 -1
- package/lib/core/Progress/Progress.stories.d.ts +4 -0
- package/lib/core/Progress/Progress.stories.d.ts.map +1 -1
- package/lib/core/Progress/Progress.stories.js +18 -1
- package/lib/core/Progress/Progress.stories.js.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.d.ts +12 -0
- package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.js +51 -1
- package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
- package/lib/core/Rating/Rating.stories.d.ts +8 -1
- package/lib/core/Rating/Rating.stories.d.ts.map +1 -1
- package/lib/core/Rating/Rating.stories.js +19 -4
- package/lib/core/Rating/Rating.stories.js.map +1 -1
- package/lib/core/SearchInput/SearchInput.stories.d.ts +4 -0
- package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/lib/core/SearchInput/SearchInput.stories.js +16 -1
- package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
- package/lib/core/Select/Select.stories.d.ts +8 -0
- package/lib/core/Select/Select.stories.d.ts.map +1 -1
- package/lib/core/Select/Select.stories.js +28 -1
- package/lib/core/Select/Select.stories.js.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.d.ts +6 -0
- package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.js +34 -7
- package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
- package/lib/core/SummaryList/SummaryList.stories.js +1 -1
- package/lib/core/SummaryList/SummaryList.stories.js.map +1 -1
- package/lib/core/Switch/Switch.stories.d.ts +7 -0
- package/lib/core/Switch/Switch.stories.d.ts.map +1 -1
- package/lib/core/Switch/Switch.stories.js +32 -1
- package/lib/core/Switch/Switch.stories.js.map +1 -1
- package/lib/core/Table/Table.stories.d.ts +25 -0
- package/lib/core/Table/Table.stories.d.ts.map +1 -1
- package/lib/core/Table/Table.stories.js +113 -1
- package/lib/core/Table/Table.stories.js.map +1 -1
- package/lib/core/Tabs/Tabs.stories.d.ts +5 -0
- package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/lib/core/Tabs/Tabs.stories.js +30 -1
- package/lib/core/Tabs/Tabs.stories.js.map +1 -1
- package/lib/core/Text/Text.stories.d.ts +19 -0
- package/lib/core/Text/Text.stories.d.ts.map +1 -1
- package/lib/core/Text/Text.stories.js +102 -2
- package/lib/core/Text/Text.stories.js.map +1 -1
- package/lib/core/TextArea/TextArea.stories.d.ts +5 -0
- package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -1
- package/lib/core/TextArea/TextArea.stories.js +20 -1
- package/lib/core/TextArea/TextArea.stories.js.map +1 -1
- package/lib/core/Toaster/Toaster.stories.d.ts.map +1 -1
- package/lib/core/Toaster/Toaster.stories.js +8 -3
- package/lib/core/Toaster/Toaster.stories.js.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.d.ts +6 -0
- package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.js +20 -1
- package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.js +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +12 -10
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.mocks.js +5 -10
- package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.d.ts +8 -3
- package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.js +142 -119
- package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js +1 -1
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -1
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
- package/lib/rte/RichTextEditor/RichTextViewer.stories.js +15 -2
- package/lib/rte/RichTextEditor/RichTextViewer.stories.js.map +1 -1
- package/lib/social/Chat/Chat.stories.d.ts +33 -22
- package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
- package/lib/social/Chat/Chat.stories.js +102 -158
- package/lib/social/Chat/Chat.stories.js.map +1 -1
- package/lib/social/Email/Email.mocks.d.ts +1 -2
- package/lib/social/Email/Email.mocks.d.ts.map +1 -1
- package/lib/social/Email/Email.mocks.js +1 -3
- package/lib/social/Email/Email.mocks.js.map +1 -1
- package/lib/social/Email/Email.stories.d.ts.map +1 -1
- package/lib/social/Email/Email.stories.js +7 -8
- package/lib/social/Email/Email.stories.js.map +1 -1
- package/lib/social/Feed/FeedNewPost.stories.js +1 -1
- package/lib/social/Feed/FeedNewPost.stories.js.map +1 -1
- package/lib/social/Feed/FeedPost.stories.js +1 -1
- package/lib/social/Feed/FeedPost.stories.js.map +1 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js +6 -7
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js.map +1 -1
- package/lib/work/CaseView/FileService.mock.d.ts.map +1 -1
- package/lib/work/CaseView/FileService.mock.js +6 -2
- package/lib/work/CaseView/FileService.mock.js.map +1 -1
- package/lib/work/Confirmation/Confirmation.stories.d.ts +1 -1
- package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
- package/lib/work/Confirmation/Confirmation.stories.js +12 -4
- package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
- package/lib/work/Confirmation/Confirmation.styles.d.ts +2 -0
- package/lib/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
- package/lib/work/Confirmation/Confirmation.styles.js +7 -0
- package/lib/work/Confirmation/Confirmation.styles.js.map +1 -0
- package/lib/work/Details/Details.stories.js +3 -3
- package/lib/work/Details/Details.stories.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js +3 -9
- package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.styles.d.ts +5 -0
- package/lib/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
- package/lib/work/SearchResults/SearchResults.styles.js +12 -0
- package/lib/work/SearchResults/SearchResults.styles.js.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.d.ts +22 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.js +36 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.stories.js +3 -34
- package/lib/work/Stakeholders/Stakeholders.stories.js.map +1 -1
- package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
- package/lib/work/Timeline/Timeline.stories.js +2 -2
- package/lib/work/Timeline/Timeline.stories.js.map +1 -1
- package/package.json +16 -16
- package/jsx/social/Email/Email.mocks.jsx.map +0 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export const mockAPIImageResources = [
|
|
2
|
+
{
|
|
3
|
+
id: 'photo-1497752531616-c3afd9760a11',
|
|
4
|
+
name: 'Image 1',
|
|
5
|
+
description: 'Descriptive text about Image 1',
|
|
6
|
+
mime_type: 'image/avif',
|
|
7
|
+
media_url: 'https://images.unsplash.com/photo-1497752531616-c3afd9760a11?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: 'photo-1470093851219-69951fcbb533',
|
|
11
|
+
name: 'Image 2',
|
|
12
|
+
description: 'Descriptive text about Image 2',
|
|
13
|
+
mime_type: 'image/avif',
|
|
14
|
+
media_url: 'https://images.unsplash.com/photo-1470093851219-69951fcbb533?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: 'photo-1447684808650-354ae64db5b8',
|
|
18
|
+
name: 'Image 3',
|
|
19
|
+
description: 'Descriptive text about Image 3',
|
|
20
|
+
mime_type: 'image/avif',
|
|
21
|
+
media_url: 'https://images.unsplash.com/photo-1447684808650-354ae64db5b8?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2094&q=80'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: 'photo-1425082661705-1834bfd09dca',
|
|
25
|
+
name: 'Image 4',
|
|
26
|
+
description: 'Descriptive text about Image 4',
|
|
27
|
+
mime_type: 'image/avif',
|
|
28
|
+
media_url: 'https://images.unsplash.com/photo-1425082661705-1834bfd09dca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2110&q=80'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: 'photo-1494256997604-768d1f608cac',
|
|
32
|
+
name: 'Image 5',
|
|
33
|
+
description: 'Descriptive text about Image 5',
|
|
34
|
+
mime_type: 'image/avif',
|
|
35
|
+
media_url: 'https://images.unsplash.com/photo-1494256997604-768d1f608cac?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2301&q=80'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'photo-1500694216671-a4e54fc4b513',
|
|
39
|
+
name: 'Image 6',
|
|
40
|
+
description: 'Descriptive text about Image 6',
|
|
41
|
+
mime_type: 'image/avif',
|
|
42
|
+
media_url: 'https://images.unsplash.com/photo-1500694216671-a4e54fc4b513?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2092&q=80'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'photo-1638292597251-6fe6b2ba50f9',
|
|
46
|
+
name: 'Image 7',
|
|
47
|
+
description: 'Descriptive text about Image 7',
|
|
48
|
+
mime_type: 'image/avif',
|
|
49
|
+
media_url: 'https://images.unsplash.com/photo-1638292597251-6fe6b2ba50f9?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80'
|
|
50
|
+
}
|
|
51
|
+
];
|
|
52
|
+
export const mockBadImageResource = {
|
|
53
|
+
id: 'error',
|
|
54
|
+
name: 'Some image',
|
|
55
|
+
description: 'Descriptive text about Some image',
|
|
56
|
+
mime_type: 'image/avif',
|
|
57
|
+
media_url: ''
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=Lightbox.mocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lightbox.mocks.js","sourceRoot":"","sources":["../../../src/core/Lightbox/Lightbox.mocks.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,gKAAgK;KACnK;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,mCAAmC;IAEhD,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,EAAE;CACd,CAAC","sourcesContent":["export const mockAPIImageResources = [\n {\n id: 'photo-1497752531616-c3afd9760a11',\n name: 'Image 1',\n description: 'Descriptive text about Image 1',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1497752531616-c3afd9760a11?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'\n },\n {\n id: 'photo-1470093851219-69951fcbb533',\n name: 'Image 2',\n description: 'Descriptive text about Image 2',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1470093851219-69951fcbb533?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'\n },\n {\n id: 'photo-1447684808650-354ae64db5b8',\n name: 'Image 3',\n description: 'Descriptive text about Image 3',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1447684808650-354ae64db5b8?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2094&q=80'\n },\n {\n id: 'photo-1425082661705-1834bfd09dca',\n name: 'Image 4',\n description: 'Descriptive text about Image 4',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1425082661705-1834bfd09dca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2110&q=80'\n },\n {\n id: 'photo-1494256997604-768d1f608cac',\n name: 'Image 5',\n description: 'Descriptive text about Image 5',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1494256997604-768d1f608cac?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2301&q=80'\n },\n {\n id: 'photo-1500694216671-a4e54fc4b513',\n name: 'Image 6',\n description: 'Descriptive text about Image 6',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1500694216671-a4e54fc4b513?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2092&q=80'\n },\n {\n id: 'photo-1638292597251-6fe6b2ba50f9',\n name: 'Image 7',\n description: 'Descriptive text about Image 7',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1638292597251-6fe6b2ba50f9?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80'\n }\n];\n\nexport const mockBadImageResource = {\n id: 'error',\n name: 'Some image',\n description: 'Descriptive text about Some image',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url: ''\n};\n"]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { Meta } from '@storybook/react';
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
2
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
3
|
export default _default;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
interface LightboxStoryProps {
|
|
5
|
+
limit?: number;
|
|
6
|
+
cycle?: boolean;
|
|
7
|
+
error?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const LightboxDemo: Story<LightboxStoryProps>;
|
|
9
10
|
//# sourceMappingURL=Lightbox.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Lightbox.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Lightbox/Lightbox.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Lightbox.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Lightbox/Lightbox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAa/C,wBAGU;AAEV,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,kBAAkB,CAqDlD,CAAC"}
|
|
@@ -1,72 +1,15 @@
|
|
|
1
1
|
import { useRef, useState } from 'react';
|
|
2
2
|
import { Button, DateTimeDisplay, Lightbox } from '@pega/cosmos-react-core';
|
|
3
|
+
import { mockAPIImageResources, mockBadImageResource } from './Lightbox.mocks';
|
|
3
4
|
export default {
|
|
4
5
|
title: 'Core/Lightbox',
|
|
5
6
|
component: Lightbox
|
|
6
7
|
};
|
|
7
|
-
const
|
|
8
|
-
{
|
|
9
|
-
id: 'photo-1497752531616-c3afd9760a11',
|
|
10
|
-
name: 'Image 1',
|
|
11
|
-
description: 'Descriptive text about Image 1',
|
|
12
|
-
mime_type: 'image/avif',
|
|
13
|
-
media_url: 'https://images.unsplash.com/photo-1497752531616-c3afd9760a11?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
id: 'photo-1470093851219-69951fcbb533',
|
|
17
|
-
name: 'Image 2',
|
|
18
|
-
description: 'Descriptive text about Image 2',
|
|
19
|
-
mime_type: 'image/avif',
|
|
20
|
-
media_url: 'https://images.unsplash.com/photo-1470093851219-69951fcbb533?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: 'photo-1447684808650-354ae64db5b8',
|
|
24
|
-
name: 'Image 3',
|
|
25
|
-
description: 'Descriptive text about Image 3',
|
|
26
|
-
mime_type: 'image/avif',
|
|
27
|
-
media_url: 'https://images.unsplash.com/photo-1447684808650-354ae64db5b8?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2094&q=80'
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: 'photo-1425082661705-1834bfd09dca',
|
|
31
|
-
name: 'Image 4',
|
|
32
|
-
description: 'Descriptive text about Image 4',
|
|
33
|
-
mime_type: 'image/avif',
|
|
34
|
-
media_url: 'https://images.unsplash.com/photo-1425082661705-1834bfd09dca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2110&q=80'
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: 'photo-1494256997604-768d1f608cac',
|
|
38
|
-
name: 'Image 5',
|
|
39
|
-
description: 'Descriptive text about Image 5',
|
|
40
|
-
mime_type: 'image/avif',
|
|
41
|
-
media_url: 'https://images.unsplash.com/photo-1494256997604-768d1f608cac?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2301&q=80'
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: 'photo-1500694216671-a4e54fc4b513',
|
|
45
|
-
name: 'Image 6',
|
|
46
|
-
description: 'Descriptive text about Image 6',
|
|
47
|
-
mime_type: 'image/avif',
|
|
48
|
-
media_url: 'https://images.unsplash.com/photo-1500694216671-a4e54fc4b513?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2092&q=80'
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: 'photo-1638292597251-6fe6b2ba50f9',
|
|
52
|
-
name: 'Image 7',
|
|
53
|
-
description: 'Descriptive text about Image 7',
|
|
54
|
-
mime_type: 'image/avif',
|
|
55
|
-
media_url: 'https://images.unsplash.com/photo-1638292597251-6fe6b2ba50f9?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80'
|
|
56
|
-
}
|
|
57
|
-
];
|
|
58
|
-
const mockBadImageResource = {
|
|
59
|
-
id: 'error',
|
|
60
|
-
name: 'Some image',
|
|
61
|
-
description: 'Descriptive text about Some image',
|
|
62
|
-
mime_type: 'image/avif',
|
|
63
|
-
media_url: ''
|
|
64
|
-
};
|
|
65
|
-
const BaseLightboxDemo = ({ cycle, limit, error }) => {
|
|
8
|
+
export const LightboxDemo = (args) => {
|
|
66
9
|
const demoButtonRef = useRef(null);
|
|
67
10
|
const [images, setImages] = useState(null);
|
|
68
11
|
const onClick = () => {
|
|
69
|
-
setImages((error ? [mockBadImageResource] : mockAPIImageResources.slice(0, limit)).map(({ id, name, description, mime_type, media_url }) => {
|
|
12
|
+
setImages((args.error ? [mockBadImageResource] : mockAPIImageResources.slice(0, args.limit)).map(({ id, name, description, mime_type, media_url }) => {
|
|
70
13
|
return {
|
|
71
14
|
id,
|
|
72
15
|
name,
|
|
@@ -93,14 +36,20 @@ const BaseLightboxDemo = ({ cycle, limit, error }) => {
|
|
|
93
36
|
<Button ref={demoButtonRef} onClick={onClick} autoFocus>
|
|
94
37
|
Open Lightbox
|
|
95
38
|
</Button>
|
|
96
|
-
{images && (<Lightbox items={images} cycle={cycle} onAfterClose={() => {
|
|
39
|
+
{images && (<Lightbox items={images} cycle={args.cycle || undefined} onAfterClose={() => {
|
|
97
40
|
setImages(null);
|
|
98
41
|
demoButtonRef.current?.focus();
|
|
99
42
|
}} onItemDownload={onItemDownload}/>)}
|
|
100
43
|
</>);
|
|
101
44
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
45
|
+
LightboxDemo.args = {
|
|
46
|
+
limit: 7,
|
|
47
|
+
cycle: false,
|
|
48
|
+
error: false
|
|
49
|
+
};
|
|
50
|
+
LightboxDemo.argTypes = {
|
|
51
|
+
limit: { control: { type: 'number' } },
|
|
52
|
+
cycle: { control: { type: 'boolean' } },
|
|
53
|
+
error: { control: { type: 'boolean' } }
|
|
54
|
+
};
|
|
106
55
|
//# sourceMappingURL=Lightbox.stories.jsx.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Lightbox.stories.jsx","sourceRoot":"","sources":["../../../src/core/Lightbox/Lightbox.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,EAGT,MAAM,yBAAyB,CAAC;AAEjC,
|
|
1
|
+
{"version":3,"file":"Lightbox.stories.jsx","sourceRoot":"","sources":["../../../src/core/Lightbox/Lightbox.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,EAGT,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE/E,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;CACZ,CAAC;AAQV,MAAM,CAAC,MAAM,YAAY,GAA8B,CAAC,IAAwB,EAAE,EAAE;IAClF,MAAM,aAAa,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IACtD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAgC,IAAI,CAAC,CAAC;IAE1E,MAAM,OAAO,GAAG,GAAG,EAAE;QACnB,SAAS,CACP,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CACpF,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE;YAClD,OAAO;gBACL,EAAE;gBACF,IAAI;gBACJ,WAAW;gBACX,GAAG,EAAE,SAAS;gBACd,QAAQ,EAAE;oBACR,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE;oBAC1B,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAG;iBACtD;aACF,CAAC;QACJ,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,KAAK,EAAE,EAAsB,EAAE,EAAE;QACtD,MAAM,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QACtC,CAAC,CAAC,IAAI,GAAG,MAAM,KAAK,CAAC,EAAE,CAAC;aACrB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;aACjC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;QAE3C,CAAC,CAAC,QAAQ,GAAG,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC;QAChE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC,CAAC,KAAK,EAAE,CAAC;QACV,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;IAEF,OAAO,CACL,EACE;MAAA,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CACrD;;MACF,EAAE,MAAM,CACR;MAAA,CAAC,MAAM,IAAI,CACT,CAAC,QAAQ,CACP,KAAK,CAAC,CAAC,MAAM,CAAC,CACd,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,SAAS,CAAC,CAC/B,YAAY,CAAC,CAAC,GAAG,EAAE;gBACjB,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChB,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;YACjC,CAAC,CAAC,CACF,cAAc,CAAC,CAAC,cAAc,CAAC,EAC/B,CACH,CACH;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,IAAI,GAAG;IAClB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,KAAK;CACb,CAAC;AAEF,YAAY,CAAC,QAAQ,GAAG;IACtB,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IACtC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACvC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CACxC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useRef, useState } from 'react';\n\nimport {\n Button,\n DateTimeDisplay,\n Lightbox,\n LightboxProps,\n LightboxItem\n} from '@pega/cosmos-react-core';\n\nimport { mockAPIImageResources, mockBadImageResource } from './Lightbox.mocks';\n\nexport default {\n title: 'Core/Lightbox',\n component: Lightbox\n} as Meta;\n\ninterface LightboxStoryProps {\n limit?: number;\n cycle?: boolean;\n error?: boolean;\n}\n\nexport const LightboxDemo: Story<LightboxStoryProps> = (args: LightboxStoryProps) => {\n const demoButtonRef = useRef<HTMLButtonElement>(null);\n const [images, setImages] = useState<LightboxProps['items'] | null>(null);\n\n const onClick = () => {\n setImages(\n (args.error ? [mockBadImageResource] : mockAPIImageResources.slice(0, args.limit)).map(\n ({ id, name, description, mime_type, media_url }) => {\n return {\n id,\n name,\n description,\n src: media_url,\n metadata: [\n mime_type.split('/').pop(),\n <DateTimeDisplay value={new Date()} variant='date' />\n ]\n };\n }\n )\n );\n };\n\n const onItemDownload = async (id: LightboxItem['id']) => {\n const a = document.createElement('a');\n a.href = await fetch(id)\n .then(response => response.blob())\n .then(blob => URL.createObjectURL(blob));\n\n a.download = images?.find(image => image.id === id)?.name ?? id;\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n };\n\n return (\n <>\n <Button ref={demoButtonRef} onClick={onClick} autoFocus>\n Open Lightbox\n </Button>\n {images && (\n <Lightbox\n items={images}\n cycle={args.cycle || undefined}\n onAfterClose={() => {\n setImages(null);\n demoButtonRef.current?.focus();\n }}\n onItemDownload={onItemDownload}\n />\n )}\n </>\n );\n};\n\nLightboxDemo.args = {\n limit: 7,\n cycle: false,\n error: false\n};\n\nLightboxDemo.argTypes = {\n limit: { control: { type: 'number' } },\n cycle: { control: { type: 'boolean' } },\n error: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { Meta, Story } from '@storybook/react';
|
|
2
3
|
import { LinkProps } from '@pega/cosmos-react-core';
|
|
3
4
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
5
|
export default _default;
|
|
5
6
|
export declare const LinkDemo: Story<LinkProps>;
|
|
6
|
-
export declare const LinkWithIconDemo:
|
|
7
|
+
export declare const LinkWithIconDemo: {
|
|
8
|
+
(): JSX.Element;
|
|
9
|
+
argTypes: {
|
|
10
|
+
variant: {
|
|
11
|
+
table: {
|
|
12
|
+
disable: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
7
17
|
export declare const PreviewableLink: Story<LinkProps>;
|
|
8
18
|
//# sourceMappingURL=Link.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Link/Link.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,
|
|
1
|
+
{"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Link/Link.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAkC,SAAS,EAAE,MAAM,yBAAyB,CAAC;;AAKpF,wBAYU;AAEV,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,SAAS,CAMrC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;CAoB5B,CAAC;AAMF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,SAAS,CAM5C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Icon, registerIcon, Link } from '@pega/cosmos-react-core';
|
|
1
|
+
import { Icon, registerIcon, Flex, Link } from '@pega/cosmos-react-core';
|
|
2
2
|
import * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';
|
|
3
3
|
registerIcon(plusIcon);
|
|
4
4
|
export default {
|
|
@@ -19,10 +19,27 @@ export const LinkDemo = (args) => {
|
|
|
19
19
|
Visit Pega!
|
|
20
20
|
</Link>);
|
|
21
21
|
};
|
|
22
|
-
export const LinkWithIconDemo = (
|
|
23
|
-
return (<
|
|
24
|
-
<
|
|
25
|
-
|
|
22
|
+
export const LinkWithIconDemo = () => {
|
|
23
|
+
return (<Flex container={{ alignItems: 'center' }}>
|
|
24
|
+
<Link href='http://www.pega.com' variant='primary' icon target='_blank'>
|
|
25
|
+
<Icon name='plus'/>
|
|
26
|
+
</Link>
|
|
27
|
+
<Link href='http://www.pega.com' variant='secondary' icon target='_blank'>
|
|
28
|
+
<Icon name='plus'/>
|
|
29
|
+
</Link>
|
|
30
|
+
<Link href='http://www.pega.com' variant='simple' icon target='_blank'>
|
|
31
|
+
<Icon name='plus'/>
|
|
32
|
+
</Link>
|
|
33
|
+
<Link href='http://www.pega.com' variant='link' icon target='_blank'>
|
|
34
|
+
<Icon name='plus'/>
|
|
35
|
+
</Link>
|
|
36
|
+
<Link href='http://www.pega.com' variant='text' icon target='_blank'>
|
|
37
|
+
<Icon name='plus'/>
|
|
38
|
+
</Link>
|
|
39
|
+
</Flex>);
|
|
40
|
+
};
|
|
41
|
+
LinkWithIconDemo.argTypes = {
|
|
42
|
+
variant: { table: { disable: true } }
|
|
26
43
|
};
|
|
27
44
|
export const PreviewableLink = (args) => {
|
|
28
45
|
return (<Link href='http://www.pega.com' variant={args.variant} previewable target='_blank'>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.stories.jsx","sourceRoot":"","sources":["../../../src/core/Link/Link.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAa,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"Link.stories.jsx","sourceRoot":"","sources":["../../../src/core/Link/Link.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAa,MAAM,yBAAyB,CAAC;AACpF,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AAExF,YAAY,CAAC,QAAQ,CAAC,CAAC;AAEvB,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;KAChB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC;YAC3D,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC5B;KACF;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,QAAQ,GAAqB,CAAC,IAAe,EAAE,EAAE;IAC5D,OAAO,CACL,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,QAAQ,CACrE;;IACF,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,OAAO,CACL,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CACxC;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CACrE;QAAA,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EACnB;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CACvE;QAAA,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EACnB;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CACpE;QAAA,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EACnB;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAClE;QAAA,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EACnB;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAClE;QAAA,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EACnB;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,QAAQ,GAAG;IAC1B,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAqB,CAAC,IAAe,EAAE,EAAE;IACnE,OAAO,CACL,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,CACjF;;IACF,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Icon, registerIcon, Flex, Link, LinkProps } from '@pega/cosmos-react-core';\nimport * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';\n\nregisterIcon(plusIcon);\n\nexport default {\n title: 'Core/Link',\n component: Link,\n args: {\n variant: 'link'\n },\n argTypes: {\n variant: {\n options: ['link', 'primary', 'secondary', 'simple', 'text'],\n control: { type: 'select' }\n }\n }\n} as Meta;\n\nexport const LinkDemo: Story<LinkProps> = (args: LinkProps) => {\n return (\n <Link href='http://www.pega.com' variant={args.variant} target='_blank'>\n Visit Pega!\n </Link>\n );\n};\n\nexport const LinkWithIconDemo = () => {\n return (\n <Flex container={{ alignItems: 'center' }}>\n <Link href='http://www.pega.com' variant='primary' icon target='_blank'>\n <Icon name='plus' />\n </Link>\n <Link href='http://www.pega.com' variant='secondary' icon target='_blank'>\n <Icon name='plus' />\n </Link>\n <Link href='http://www.pega.com' variant='simple' icon target='_blank'>\n <Icon name='plus' />\n </Link>\n <Link href='http://www.pega.com' variant='link' icon target='_blank'>\n <Icon name='plus' />\n </Link>\n <Link href='http://www.pega.com' variant='text' icon target='_blank'>\n <Icon name='plus' />\n </Link>\n </Flex>\n );\n};\n\nLinkWithIconDemo.argTypes = {\n variant: { table: { disable: true } }\n};\n\nexport const PreviewableLink: Story<LinkProps> = (args: LinkProps) => {\n return (\n <Link href='http://www.pega.com' variant={args.variant} previewable target='_blank'>\n Visit Pega!\n </Link>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommaSeparatedList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/List/CommaSeparatedList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAsB,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;;AAEtF,wBAGU;
|
|
1
|
+
{"version":3,"file":"CommaSeparatedList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/List/CommaSeparatedList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAsB,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;;AAEtF,wBAGU;AAEV,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,uBAAuB,CAqBjE,CAAC"}
|
|
@@ -3,26 +3,24 @@ export default {
|
|
|
3
3
|
title: 'Core/List',
|
|
4
4
|
component: CommaSeparatedList
|
|
5
5
|
};
|
|
6
|
-
const arr = [
|
|
7
|
-
'Value1',
|
|
8
|
-
'Value2',
|
|
9
|
-
'Value3',
|
|
10
|
-
'Value4',
|
|
11
|
-
'Value5',
|
|
12
|
-
'Value6',
|
|
13
|
-
'Value7',
|
|
14
|
-
'Value8',
|
|
15
|
-
'Value9',
|
|
16
|
-
'Value10',
|
|
17
|
-
'Value11',
|
|
18
|
-
'Value12',
|
|
19
|
-
'Value13',
|
|
20
|
-
'Value14'
|
|
21
|
-
];
|
|
22
6
|
export const CommaSeparatedListDemo = (args) => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
7
|
+
const items = [
|
|
8
|
+
'Value 1',
|
|
9
|
+
'Value 2',
|
|
10
|
+
'Value 3',
|
|
11
|
+
'Value 4',
|
|
12
|
+
'Value 5',
|
|
13
|
+
'Value 6',
|
|
14
|
+
'Value 7',
|
|
15
|
+
'Value 8',
|
|
16
|
+
'Value 9',
|
|
17
|
+
'Value 10',
|
|
18
|
+
'Value 11',
|
|
19
|
+
'Value 12',
|
|
20
|
+
'Value 13',
|
|
21
|
+
'Value 14'
|
|
22
|
+
];
|
|
23
|
+
return <CommaSeparatedList heading={args.heading} items={items}/>;
|
|
26
24
|
};
|
|
27
25
|
CommaSeparatedListDemo.args = {
|
|
28
26
|
heading: 'List Heading'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommaSeparatedList.stories.jsx","sourceRoot":"","sources":["../../../src/core/List/CommaSeparatedList.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAA2B,MAAM,yBAAyB,CAAC;AAEtF,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,kBAAkB;CACtB,CAAC;AAEV,MAAM,
|
|
1
|
+
{"version":3,"file":"CommaSeparatedList.stories.jsx","sourceRoot":"","sources":["../../../src/core/List/CommaSeparatedList.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAA2B,MAAM,yBAAyB,CAAC;AAEtF,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,kBAAkB;CACtB,CAAC;AAEV,MAAM,CAAC,MAAM,sBAAsB,GAAmC,CACpE,IAA6B,EAC7B,EAAE;IACF,MAAM,KAAK,GAAG;QACZ,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,UAAU;QACV,UAAU;QACV,UAAU;QACV,UAAU;QACV,UAAU;KACX,CAAC;IAEF,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAG,CAAC;AACrE,CAAC,CAAC;AAEF,sBAAsB,CAAC,IAAI,GAAG;IAC5B,OAAO,EAAE,cAAc;CACxB,CAAC;AAEF,sBAAsB,CAAC,QAAQ,GAAG;IAChC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { CommaSeparatedList, CommaSeparatedListProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/List',\n component: CommaSeparatedList\n} as Meta;\n\nexport const CommaSeparatedListDemo: Story<CommaSeparatedListProps> = (\n args: CommaSeparatedListProps\n) => {\n const items = [\n 'Value 1',\n 'Value 2',\n 'Value 3',\n 'Value 4',\n 'Value 5',\n 'Value 6',\n 'Value 7',\n 'Value 8',\n 'Value 9',\n 'Value 10',\n 'Value 11',\n 'Value 12',\n 'Value 13',\n 'Value 14'\n ];\n\n return <CommaSeparatedList heading={args.heading} items={items} />;\n};\n\nCommaSeparatedListDemo.args = {\n heading: 'List Heading'\n};\n\nCommaSeparatedListDemo.argTypes = {\n heading: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderedList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/List/OrderedList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;;AAExE,wBAGU;
|
|
1
|
+
{"version":3,"file":"OrderedList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/List/OrderedList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;;AAExE,wBAGU;AAEV,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;CACtC;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,qBAAqB,CA+BxD,CAAC"}
|
|
@@ -4,28 +4,28 @@ export default {
|
|
|
4
4
|
title: 'Core/List',
|
|
5
5
|
component: OrderedList
|
|
6
6
|
};
|
|
7
|
-
const arr = [
|
|
8
|
-
'Hello',
|
|
9
|
-
['val1', 'val2', 'val3', ['a', 'b', 'c', 'd']],
|
|
10
|
-
'Hi',
|
|
11
|
-
'How are you?',
|
|
12
|
-
'Hey',
|
|
13
|
-
'Whatsup'
|
|
14
|
-
];
|
|
15
7
|
export const OrderedListDemo = (args) => {
|
|
16
8
|
const [limit, setLimit] = useState(0);
|
|
9
|
+
const items = [
|
|
10
|
+
'Value 1',
|
|
11
|
+
['Value 2', 'Value 3', 'Value 4', ['Value 5', 'Value 6', 'Value 7', 'Value 8']],
|
|
12
|
+
'Value 9',
|
|
13
|
+
'Value 10',
|
|
14
|
+
'Value 11',
|
|
15
|
+
'Value 12'
|
|
16
|
+
];
|
|
17
17
|
useEffect(() => {
|
|
18
18
|
setLimit(args.itemsToShow);
|
|
19
19
|
}, [args.itemsToShow]);
|
|
20
20
|
const handleToggleShow = () => {
|
|
21
21
|
if (limit === args.itemsToShow) {
|
|
22
|
-
setLimit(
|
|
22
|
+
setLimit(items.flat().length);
|
|
23
23
|
}
|
|
24
24
|
else {
|
|
25
25
|
setLimit(args.itemsToShow);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
return (<OrderedList onToggleShow={handleToggleShow} heading={args.heading} items={
|
|
28
|
+
return (<OrderedList onToggleShow={handleToggleShow} heading={args.heading} items={items.slice(0, limit)} count={items.flat().length}/>);
|
|
29
29
|
};
|
|
30
30
|
OrderedListDemo.args = {
|
|
31
31
|
heading: 'List Heading',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderedList.stories.jsx","sourceRoot":"","sources":["../../../src/core/List/OrderedList.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAoB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAExE,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,WAAW;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"OrderedList.stories.jsx","sourceRoot":"","sources":["../../../src/core/List/OrderedList.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAoB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAExE,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,WAAW;CACf,CAAC;AAOV,MAAM,CAAC,MAAM,eAAe,GAAiC,CAAC,IAA2B,EAAE,EAAE;IAC3F,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG;QACZ,SAAS;QACT,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;QAC/E,SAAS;QACT,UAAU;QACV,UAAU;QACV,UAAU;KACX,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7B,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAEvB,MAAM,gBAAgB,GAAG,GAAG,EAAE;QAC5B,IAAI,KAAK,KAAK,IAAI,CAAC,WAAW,EAAE;YAC9B,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;SAC/B;aAAM;YACL,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAC5B;IACH,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,WAAW,CACV,YAAY,CAAC,CAAC,gBAAgB,CAAC,CAC/B,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CACtB,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAC7B,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,EAC3B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,CAAC,IAAI,GAAG;IACrB,OAAO,EAAE,cAAc;IACvB,WAAW,EAAE,CAAC;CACf,CAAC;AAEF,eAAe,CAAC,QAAQ,GAAG;IACzB,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACtC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC7C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, useEffect } from 'react';\n\nimport { OrderedListProps, OrderedList } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/List',\n component: OrderedList\n} as Meta;\n\ninterface OrderedListStoryProps {\n itemsToShow: number;\n heading: OrderedListProps['heading'];\n}\n\nexport const OrderedListDemo: Story<OrderedListStoryProps> = (args: OrderedListStoryProps) => {\n const [limit, setLimit] = useState(0);\n const items = [\n 'Value 1',\n ['Value 2', 'Value 3', 'Value 4', ['Value 5', 'Value 6', 'Value 7', 'Value 8']],\n 'Value 9',\n 'Value 10',\n 'Value 11',\n 'Value 12'\n ];\n\n useEffect(() => {\n setLimit(args.itemsToShow);\n }, [args.itemsToShow]);\n\n const handleToggleShow = () => {\n if (limit === args.itemsToShow) {\n setLimit(items.flat().length);\n } else {\n setLimit(args.itemsToShow);\n }\n };\n\n return (\n <OrderedList\n onToggleShow={handleToggleShow}\n heading={args.heading}\n items={items.slice(0, limit)}\n count={items.flat().length}\n />\n );\n};\n\nOrderedListDemo.args = {\n heading: 'List Heading',\n itemsToShow: 3\n};\n\nOrderedListDemo.argTypes = {\n heading: { control: { type: 'text' } },\n itemsToShow: { control: { type: 'number' } }\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnorderedList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/List/UnorderedList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,kBAAkB,EAAiB,MAAM,yBAAyB,CAAC;;AAE5E,wBAGU;
|
|
1
|
+
{"version":3,"file":"UnorderedList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/List/UnorderedList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,kBAAkB,EAAiB,MAAM,yBAAyB,CAAC;;AAE5E,wBAGU;AAEV,UAAU,uBAAuB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,uBAAuB,CAiC5D,CAAC"}
|
|
@@ -4,28 +4,28 @@ export default {
|
|
|
4
4
|
title: 'Core/List',
|
|
5
5
|
component: UnorderedList
|
|
6
6
|
};
|
|
7
|
-
const arr = [
|
|
8
|
-
'Hello',
|
|
9
|
-
['val1', 'val2', 'val3', ['a', 'b', 'c', 'd']],
|
|
10
|
-
'Hi',
|
|
11
|
-
'How are you?',
|
|
12
|
-
'Hey',
|
|
13
|
-
'Whatsup'
|
|
14
|
-
];
|
|
15
7
|
export const UnorderedListDemo = (args) => {
|
|
16
8
|
const [limit, setLimit] = useState(0);
|
|
9
|
+
const items = [
|
|
10
|
+
'Value 1',
|
|
11
|
+
['Value 2', 'Value 3', 'Value 4', ['Value 5', 'Value 6', 'Value 7', 'Value 8']],
|
|
12
|
+
'Value 9',
|
|
13
|
+
'Value 10',
|
|
14
|
+
'Value 11',
|
|
15
|
+
'Value 12'
|
|
16
|
+
];
|
|
17
17
|
useEffect(() => {
|
|
18
18
|
setLimit(args.itemsToShow);
|
|
19
19
|
}, [args.itemsToShow]);
|
|
20
20
|
const handleToggleShow = () => {
|
|
21
21
|
if (limit === args.itemsToShow) {
|
|
22
|
-
setLimit(
|
|
22
|
+
setLimit(items.flat().length);
|
|
23
23
|
}
|
|
24
24
|
else {
|
|
25
25
|
setLimit(args.itemsToShow);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
return (<UnorderedList onToggleShow={handleToggleShow} heading={args.heading} items={
|
|
28
|
+
return (<UnorderedList onToggleShow={handleToggleShow} heading={args.heading} items={items.slice(0, limit)} count={items.flat().length}/>);
|
|
29
29
|
};
|
|
30
30
|
UnorderedListDemo.args = {
|
|
31
31
|
heading: 'List Heading',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnorderedList.stories.jsx","sourceRoot":"","sources":["../../../src/core/List/UnorderedList.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAsB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE5E,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,aAAa;CACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"UnorderedList.stories.jsx","sourceRoot":"","sources":["../../../src/core/List/UnorderedList.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAsB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE5E,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,aAAa;CACjB,CAAC;AAOV,MAAM,CAAC,MAAM,iBAAiB,GAAmC,CAC/D,IAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG;QACZ,SAAS;QACT,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;QAC/E,SAAS;QACT,UAAU;QACV,UAAU;QACV,UAAU;KACX,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7B,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAEvB,MAAM,gBAAgB,GAAG,GAAG,EAAE;QAC5B,IAAI,KAAK,KAAK,IAAI,CAAC,WAAW,EAAE;YAC9B,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;SAC/B;aAAM;YACL,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAC5B;IACH,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,aAAa,CACZ,YAAY,CAAC,CAAC,gBAAgB,CAAC,CAC/B,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CACtB,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAC7B,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,EAC3B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,iBAAiB,CAAC,IAAI,GAAG;IACvB,OAAO,EAAE,cAAc;IACvB,WAAW,EAAE,CAAC;CACf,CAAC;AAEF,iBAAiB,CAAC,QAAQ,GAAG;IAC3B,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACtC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC7C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, useEffect } from 'react';\n\nimport { UnorderedListProps, UnorderedList } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/List',\n component: UnorderedList\n} as Meta;\n\ninterface UnorderedListStoryProps {\n itemsToShow: number;\n heading: UnorderedListProps['heading'];\n}\n\nexport const UnorderedListDemo: Story<UnorderedListStoryProps> = (\n args: UnorderedListStoryProps\n) => {\n const [limit, setLimit] = useState(0);\n const items = [\n 'Value 1',\n ['Value 2', 'Value 3', 'Value 4', ['Value 5', 'Value 6', 'Value 7', 'Value 8']],\n 'Value 9',\n 'Value 10',\n 'Value 11',\n 'Value 12'\n ];\n\n useEffect(() => {\n setLimit(args.itemsToShow);\n }, [args.itemsToShow]);\n\n const handleToggleShow = () => {\n if (limit === args.itemsToShow) {\n setLimit(items.flat().length);\n } else {\n setLimit(args.itemsToShow);\n }\n };\n\n return (\n <UnorderedList\n onToggleShow={handleToggleShow}\n heading={args.heading}\n items={items.slice(0, limit)}\n count={items.flat().length}\n />\n );\n};\n\nUnorderedListDemo.args = {\n heading: 'List Heading',\n itemsToShow: 3\n};\n\nUnorderedListDemo.argTypes = {\n heading: { control: { type: 'text' } },\n itemsToShow: { control: { type: 'number' } }\n};\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
|
2
|
-
import { MenuProps } from '@pega/cosmos-react-core';
|
|
2
|
+
import { MenuProps, OmitStrict } from '@pega/cosmos-react-core';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
interface MenuStoryProps extends MenuProps {
|
|
5
|
+
interface MenuStoryProps extends OmitStrict<MenuProps, 'items'> {
|
|
6
6
|
showItemSecondary?: boolean;
|
|
7
7
|
showItemVisual?: boolean;
|
|
8
8
|
showItemCount?: boolean;
|
|
@@ -10,7 +10,7 @@ interface MenuStoryProps extends MenuProps {
|
|
|
10
10
|
filterPattern?: 'contains' | 'starts with';
|
|
11
11
|
infiniteScroll?: boolean;
|
|
12
12
|
noItems?: boolean;
|
|
13
|
-
|
|
13
|
+
useFlatData?: boolean;
|
|
14
14
|
}
|
|
15
15
|
export declare const MenuDemo: Story<MenuStoryProps>;
|
|
16
16
|
export declare const FlatMenuDemo: Story<MenuStoryProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Menu/Menu.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAOL,SAAS,
|
|
1
|
+
{"version":3,"file":"Menu.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Menu/Menu.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAOL,SAAS,EAOT,UAAU,EACX,MAAM,yBAAyB,CAAC;;AAKjC,wBA6BU;AAEV,UAAU,cAAe,SAAQ,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC;IAC7D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,UAAU,GAAG,aAAa,CAAC;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,cAAc,CAgM1C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,cAAc,CAE9C,CAAC"}
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
infiniteScroll: false,
|
|
17
17
|
noItems: false,
|
|
18
18
|
emptyText: 'No items',
|
|
19
|
-
|
|
19
|
+
useFlatData: false
|
|
20
20
|
},
|
|
21
21
|
argTypes: {
|
|
22
22
|
variant: { options: ['drill-down', 'flyout'], control: { type: 'select' } },
|
|
@@ -29,18 +29,18 @@ export default {
|
|
|
29
29
|
infiniteScroll: { control: { type: 'boolean' } },
|
|
30
30
|
noItems: { control: { type: 'boolean' } },
|
|
31
31
|
emptyText: { control: { type: 'text' } },
|
|
32
|
-
|
|
33
|
-
loadMore: { table: { disable: true } }
|
|
32
|
+
useFlatData: { control: { type: 'boolean' } }
|
|
34
33
|
}
|
|
35
34
|
};
|
|
36
35
|
export const MenuDemo = (args) => {
|
|
37
36
|
const menuID = createUID();
|
|
37
|
+
const data = args.useFlatData ? cars : countries;
|
|
38
38
|
const searchEleRef = useRef(null);
|
|
39
39
|
const { push } = useContext(ToasterContext);
|
|
40
40
|
const [isOpen, setIsOpen] = useState(false);
|
|
41
41
|
const [isLoading, setIsLoading] = useState(false);
|
|
42
42
|
const [hasMore, setHasMore] = useState(true);
|
|
43
|
-
const [items, setItems] = useState(args.infiniteScroll ?
|
|
43
|
+
const [items, setItems] = useState(args.infiniteScroll ? data.slice(0, 10) : data);
|
|
44
44
|
const [buttonEl, setButtonEl] = useElement(null);
|
|
45
45
|
const [popoverEl, setPopoverEl] = useElement(null);
|
|
46
46
|
const [search, setSearch] = useState('');
|
|
@@ -71,7 +71,7 @@ export const MenuDemo = (args) => {
|
|
|
71
71
|
}, [search, items, searchRegex, args.showItemVisual]);
|
|
72
72
|
const resetMenu = useCallback(() => {
|
|
73
73
|
setIsOpen(false);
|
|
74
|
-
setItems(
|
|
74
|
+
setItems(data.slice(0, 10));
|
|
75
75
|
setSearch('');
|
|
76
76
|
}, []);
|
|
77
77
|
const onKeydown = useCallback(({ key }) => {
|
|
@@ -84,15 +84,14 @@ export const MenuDemo = (args) => {
|
|
|
84
84
|
setTimeout(() => {
|
|
85
85
|
setIsLoading(false);
|
|
86
86
|
setItems(prevItems => {
|
|
87
|
-
const newItems =
|
|
87
|
+
const newItems = data.slice(prevItems.length, prevItems.length + 10);
|
|
88
88
|
if (newItems.length === 0)
|
|
89
89
|
setHasMore(false);
|
|
90
90
|
return menuHelpers.appendTo(prevItems, newItems, expandedItemId);
|
|
91
91
|
});
|
|
92
92
|
}, 2000);
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
}, [items, isLoading, args.loadMore]);
|
|
94
|
+
}, [items, isLoading]);
|
|
96
95
|
useOuterEvent('mousedown', [popoverEl, buttonEl], e => {
|
|
97
96
|
if (args.variant === 'flyout') {
|
|
98
97
|
const path = e.composedPath();
|
|
@@ -158,9 +157,6 @@ export const MenuDemo = (args) => {
|
|
|
158
157
|
</Flex>);
|
|
159
158
|
};
|
|
160
159
|
export const FlatMenuDemo = (args) => {
|
|
161
|
-
return <MenuDemo {...args}/>;
|
|
162
|
-
};
|
|
163
|
-
FlatMenuDemo.args = {
|
|
164
|
-
items: cars
|
|
160
|
+
return <MenuDemo {...args} useFlatData/>;
|
|
165
161
|
};
|
|
166
162
|
//# sourceMappingURL=Menu.stories.jsx.map
|