@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageTemplates.stories.js","sourceRoot":"","sources":["../../../src/core/PageTemplates/PageTemplates.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAc,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,MAAM,EACN,MAAM,EACN,eAAe,EACf,QAAQ,EACR,aAAa,EAEb,UAAU,EACV,aAAa,EACb,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EAEpB,KAAK,EACL,WAAW,EAIX,SAAS,EACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,uDAAuD,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,6DAA6D,CAAC;AAE3F,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAsBV,MAAM,CAAC,MAAM,iBAAiB,GAAmC,CAC/D,IAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEtD,MAAM,OAAO,GAAiC,IAAI,CAAC,WAAW,I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EAAE,WAAI,WACtB,WAEpB,EAEJ,SAAS,iBACT,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,mBAAmB,CAAC,IAAI,GAAG;IACzB,QAAQ,EAAE,gBAAgB;IAC1B,YAAY,EAAE,YAAY;IAC1B,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,KAAK;IAClB,UAAU,EAAE,CAAC;CACd,CAAC;AAEF,mBAAmB,CAAC,QAAQ,GAAG;IAC7B,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvC,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC7D,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, useMemo, MouseEvent } from 'react';\n\nimport {\n Banner,\n Button,\n CategorySubPage,\n ComboBox,\n DashboardPage,\n DashboardPageLayoutProps,\n TabbedPage,\n OneColumnPage,\n TwoColumnPage,\n ThreeColumnPage,\n FourColumnPage,\n WideNarrowPage,\n NarrowWidePage,\n WideWideNarrowPage,\n NarrowWideWidePage,\n NarrowWideNarrowPage,\n PageTemplateProps,\n icons,\n menuHelpers,\n MenuItemProps,\n MenuProps,\n TemplateProps,\n createUID\n} from '@pega/cosmos-react-core';\nimport { FeedDemo } from '@pega/cosmos-react-demos/lib/social/Feed/Feed.stories';\nimport { TasksDemo } from '@pega/cosmos-react-demos/lib/work/Tasks/Tasks.stories';\nimport { MockSummaryList } from '@pega/cosmos-react-demos/lib/work/CaseView/CaseView.mocks';\nimport { AppShellDemo } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';\n\nimport { StyledStoryPage } from './PageTemplates.styles';\nimport { getPath } from './PageTemplates.mocks';\n\nexport default {\n title: 'Core/PageTemplates',\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface PageTemplatesStoryProps extends PageTemplateProps {\n template:\n | 'demo page'\n | 'one column'\n | 'two column'\n | 'three column'\n | 'four column'\n | 'wide narrow'\n | 'narrow wide'\n | 'wide wide narrow'\n | 'narrow wide wide'\n | 'narrow wide narrow'\n | 'tabbed';\n showIcon?: boolean;\n showBreadcrumbs?: boolean;\n pathData?: string;\n showActions?: boolean;\n showBanners?: boolean;\n}\n\nexport const PageTemplatesDemo: Story<PageTemplatesStoryProps> = (\n args: PageTemplatesStoryProps\n) => {\n const [currentTabId, setCurrentTabId] = useState('1');\n\n const actions: PageTemplateProps['actions'] = args.showActions && (\n <>\n <Button>Page action 1</Button>\n <Button>Page action 2</Button>\n </>\n );\n\n const banners: PageTemplateProps['banners'] = args.showBanners && (\n <Banner\n id='warning-banner'\n variant='warning'\n messages={['This is a warning banner. You have been warned!']}\n />\n );\n\n const pageTemplateProps = {\n scrollContent: args.scrollContent,\n title: args.title,\n icon: args.showIcon ? args.icon : undefined,\n actions,\n banners,\n path: getPath(args.showBreadcrumbs, args.pathData),\n as: args.template !== 'demo page' ? StyledStoryPage : undefined\n };\n\n let page;\n\n switch (args.template) {\n case 'demo page':\n page = (\n <TwoColumnPage\n a={<FeedDemo />}\n b={\n <>\n <TasksDemo />\n <MockSummaryList name='My team' limit={10} actions={null} />\n </>\n }\n {...pageTemplateProps}\n />\n );\n break;\n case 'one column':\n page = <OneColumnPage a='a' {...pageTemplateProps} />;\n break;\n case 'two column':\n page = <TwoColumnPage a='a' b='b' {...pageTemplateProps} />;\n break;\n case 'three column':\n page = <ThreeColumnPage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'four column':\n page = <FourColumnPage a='a' b='b' c='c' d='d' {...pageTemplateProps} />;\n break;\n case 'wide narrow':\n page = <WideNarrowPage a='a' b='b' {...pageTemplateProps} />;\n break;\n case 'narrow wide':\n page = <NarrowWidePage a='a' b='b' {...pageTemplateProps} />;\n break;\n case 'wide wide narrow':\n page = <WideWideNarrowPage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'narrow wide wide':\n page = <NarrowWideWidePage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'narrow wide narrow':\n page = <NarrowWideNarrowPage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'tabbed':\n default:\n page = (\n <TabbedPage\n a={`Content for: Tab ${currentTabId}`}\n tabs={{\n tabs: Array.from({ length: 5 }, (_, i) => {\n return {\n id: `${i + 1}`,\n name: `Tab ${i + 1}`\n };\n }),\n type: 'horizontal',\n currentTabId,\n onTabClick: setCurrentTabId\n }}\n {...pageTemplateProps}\n />\n );\n break;\n }\n\n return <AppShellDemo main={page} appHeader />;\n};\n\nPageTemplatesDemo.args = {\n template: 'demo page',\n scrollContent: false,\n title: 'Demo page',\n icon: 'home-solid',\n showIcon: true,\n showBreadcrumbs: true,\n pathData: 'Page 1,Page2,Page 3,Page 4,Page 5',\n showActions: true,\n showBanners: false\n};\n\nPageTemplatesDemo.argTypes = {\n template: {\n options: [\n 'demo page',\n 'one column',\n 'two column',\n 'three column',\n 'four column',\n 'wide narrow',\n 'narrow wide',\n 'wide wide narrow',\n 'narrow wide wide',\n 'narrow wide narrow',\n 'tabbed'\n ],\n control: { type: 'select' }\n },\n scrollContent: { control: { type: 'boolean' } },\n title: { control: { type: 'text' } },\n icon: { options: icons, control: { type: 'select' } },\n showIcon: { control: { type: 'boolean' } },\n showBreadcrumbs: { control: { type: 'boolean' } },\n pathData: { control: { type: 'text' } },\n showActions: { control: { type: 'boolean' } },\n showBanners: { control: { type: 'boolean' } }\n};\n\ninterface DashboardPageStoryProps {\n title?: DashboardPageLayoutProps['title'];\n filterPosition?: DashboardPageLayoutProps['filterPosition'];\n numberOfFilters?: number;\n}\n\nexport const DashboardPageDemo: Story<DashboardPageStoryProps> = (\n args: DashboardPageStoryProps\n) => {\n const FilterComboBox = () => {\n const [filterSearchValue, setFilterSearchValue] = useState('');\n const [filterOptions, setFilterOptions] = useState<MenuProps['items']>(() =>\n Array.from({ length: 10 }, (_, i) => ({\n id: createUID(),\n primary: `Filter ${i + 1}`,\n selected: false\n }))\n );\n\n const selected = useMemo(() => {\n return menuHelpers\n .getSelected(filterOptions)\n .map(item => ({ text: item.primary, id: item.id }));\n }, [filterOptions]);\n\n const toggleItem = (id: MenuItemProps['id']) => {\n setFilterOptions(cur => menuHelpers.toggleSelected(cur, id, 'multi-select'));\n };\n\n return (\n <ComboBox\n mode='multi-select'\n label='Filters'\n placeholder='Choose filters'\n value={filterSearchValue}\n onChange={e => {\n setFilterSearchValue(e.target.value);\n }}\n selected={{ items: selected, onRemove: toggleItem }}\n menu={{\n items: filterSearchValue\n ? menuHelpers\n .flatten(filterOptions)\n .filter(({ primary }) => primary.includes(filterSearchValue))\n : filterOptions,\n emptyText: 'No filters',\n onItemClick: toggleItem\n }}\n />\n );\n };\n\n const filterControls = Array.from({ length: args.numberOfFilters || 3 }, (_, i) => (\n <FilterComboBox key={i} />\n ));\n\n return (\n <AppShellDemo\n main={\n <DashboardPage\n a='a'\n b='b'\n c='c'\n path={getPath()}\n filters={filterControls}\n filterPosition={args.filterPosition}\n fitToViewport\n title={args.title || 'Dashboard'}\n as={StyledStoryPage}\n />\n }\n appHeader\n />\n );\n};\n\nDashboardPageDemo.args = {\n title: 'Dashboard',\n filterPosition: 'block-start',\n numberOfFilters: 3\n};\n\nDashboardPageDemo.argTypes = {\n title: { control: { type: 'text' } },\n filterPosition: {\n options: ['block-start', 'inline-start', 'inline-end'],\n control: { type: 'select' }\n },\n numberOfFilters: { control: { type: 'number' } }\n};\n\ninterface CategorySubPageStoryProps {\n category?: TemplateProps['category'];\n categoryIcon?: TemplateProps['categoryIcon'];\n showIcon?: boolean;\n viewLoading?: TemplateProps['viewLoading'];\n maxActions?: TemplateProps['maxActions'];\n}\n\nexport const CategorySubPageDemo: Story<CategorySubPageStoryProps> = (\n args: CategorySubPageStoryProps\n) => {\n const [activeItem, setActiveItem] = useState('Profile');\n\n const mockNavLinks = (itemTextArray: string[]) => {\n return itemTextArray.map(itemText => {\n return {\n text: itemText,\n active: itemText === activeItem,\n href: '#',\n onClick: (event: MouseEvent) => setActiveItem((event.target as Element).textContent || '')\n };\n });\n };\n\n return (\n <AppShellDemo\n main={\n <CategorySubPage\n viewLoading={args.viewLoading}\n category={args.category || 'Administration'}\n categoryIcon={args.showIcon ? args.categoryIcon : undefined}\n navItemGroups={[\n {\n title: 'General',\n items: useMemo(\n () => mockNavLinks(['Configurations', 'Profile', 'Authentication', 'Connections']),\n [activeItem]\n )\n },\n {\n title: 'Second Group',\n items: useMemo(() => mockNavLinks(['Option 1', 'Option 2']), [activeItem])\n },\n {\n items: useMemo(() => mockNavLinks(['All configurations']), [activeItem])\n },\n {\n items: useMemo(\n () => mockNavLinks(['Visually Grouped SubPage A', 'Visually Grouped SubPage B']),\n [activeItem]\n )\n },\n {\n items: [\n {\n text: 'Button Item'\n }\n ]\n }\n ]}\n pageTitle={activeItem}\n maxActions={args.maxActions}\n pageActions={[\n {\n id: 'saveChanges',\n text: 'Save'\n },\n {\n id: 'cancelChanges',\n text: 'Cancel'\n },\n {\n id: 'goToRule',\n text: 'Go to Rule'\n },\n {\n id: 'viewInClipboard',\n text: 'View in Clipboard'\n }\n ]}\n region={\n <StyledStoryPage secondary>\n <div style={{ minHeight: '150vh' }} />\n </StyledStoryPage>\n }\n />\n }\n appHeader\n />\n );\n};\n\nCategorySubPageDemo.args = {\n category: 'Administration',\n categoryIcon: 'gear-solid',\n showIcon: true,\n viewLoading: false,\n maxActions: 3\n};\n\nCategorySubPageDemo.argTypes = {\n category: { control: { type: 'text' } },\n categoryIcon: { options: icons, control: { type: 'select' } },\n showIcon: { control: { type: 'boolean' } },\n viewLoading: { control: { type: 'boolean' } },\n maxActions: { control: { type: 'number' } }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"PageTemplates.stories.js","sourceRoot":"","sources":["../../../src/core/PageTemplates/PageTemplates.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAc,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,MAAM,EACN,MAAM,EACN,eAAe,EACf,QAAQ,EACR,aAAa,EAEb,UAAU,EACV,aAAa,EACb,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EAEpB,KAAK,EACL,WAAW,EAIX,SAAS,EACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,uDAAuD,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,6DAA6D,CAAC;AAE3F,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAyBV,MAAM,CAAC,MAAM,iBAAiB,GAAmC,CAC/D,IAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEtD,MAAM,OAAO,GAAiC,IAAI,CAAC,WAAW,IAAI,CAChE,8BACE,KAAC,MAAM,wCAAuB,EAC9B,KAAC,MAAM,wCAAuB,YAC7B,CACJ,CAAC;IAEF,MAAM,OAAO,GAAiC,IAAI,CAAC,WAAW,IAAI,CAChE,KAAC,MAAM,IACL,EAAE,EAAC,gBAAgB,EAC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AY,EAAE,YAAY;IAC1B,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,KAAK;IAClB,UAAU,EAAE,CAAC;CACd,CAAC;AAEF,mBAAmB,CAAC,QAAQ,GAAG;IAC7B,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvC,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IAC1E,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, useMemo, MouseEvent } from 'react';\n\nimport {\n Banner,\n Button,\n CategorySubPage,\n ComboBox,\n DashboardPage,\n DashboardPageLayoutProps,\n TabbedPage,\n OneColumnPage,\n TwoColumnPage,\n ThreeColumnPage,\n FourColumnPage,\n WideNarrowPage,\n NarrowWidePage,\n WideWideNarrowPage,\n NarrowWideWidePage,\n NarrowWideNarrowPage,\n PageTemplateProps,\n icons,\n menuHelpers,\n MenuItemProps,\n MenuProps,\n TemplateProps,\n createUID\n} from '@pega/cosmos-react-core';\nimport { FeedDemo } from '@pega/cosmos-react-demos/lib/social/Feed/Feed.stories';\nimport { TasksDemo } from '@pega/cosmos-react-demos/lib/work/Tasks/Tasks.stories';\nimport { MockSummaryList } from '@pega/cosmos-react-demos/lib/work/CaseView/CaseView.mocks';\nimport { AppShellDemo } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';\n\nimport { StyledStoryPage } from './PageTemplates.styles';\nimport { getPath } from './PageTemplates.mocks';\n\nexport default {\n title: 'Core/PageTemplates',\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface PageTemplatesStoryProps {\n template?:\n | 'demo page'\n | 'one column'\n | 'two column'\n | 'three column'\n | 'four column'\n | 'wide narrow'\n | 'narrow wide'\n | 'wide wide narrow'\n | 'narrow wide wide'\n | 'narrow wide narrow'\n | 'tabbed';\n title?: PageTemplateProps['title'];\n icon?: PageTemplateProps['icon'];\n scrollContent?: PageTemplateProps['scrollContent'];\n showIcon?: boolean;\n showBreadcrumbs?: boolean;\n pathData?: string;\n showActions?: boolean;\n showBanners?: boolean;\n}\n\nexport const PageTemplatesDemo: Story<PageTemplatesStoryProps> = (\n args: PageTemplatesStoryProps\n) => {\n const [currentTabId, setCurrentTabId] = useState('1');\n\n const actions: PageTemplateProps['actions'] = args.showActions && (\n <>\n <Button>Page action 1</Button>\n <Button>Page action 2</Button>\n </>\n );\n\n const banners: PageTemplateProps['banners'] = args.showBanners && (\n <Banner\n id='warning-banner'\n variant='warning'\n messages={['This is a warning banner. You have been warned!']}\n />\n );\n\n const pageTemplateProps = {\n scrollContent: args.scrollContent,\n title: args.title || 'Demo page',\n icon: args.showIcon ? args.icon : undefined,\n actions,\n banners,\n path: getPath(args.showBreadcrumbs, args.pathData),\n as: args.template !== 'demo page' ? StyledStoryPage : undefined\n };\n\n let page;\n\n switch (args.template) {\n case 'demo page':\n page = (\n <TwoColumnPage\n a={<FeedDemo />}\n b={\n <>\n <TasksDemo />\n <MockSummaryList name='My team' limit={10} actions={null} />\n </>\n }\n {...pageTemplateProps}\n />\n );\n break;\n case 'one column':\n page = <OneColumnPage a='a' {...pageTemplateProps} />;\n break;\n case 'two column':\n page = <TwoColumnPage a='a' b='b' {...pageTemplateProps} />;\n break;\n case 'three column':\n page = <ThreeColumnPage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'four column':\n page = <FourColumnPage a='a' b='b' c='c' d='d' {...pageTemplateProps} />;\n break;\n case 'wide narrow':\n page = <WideNarrowPage a='a' b='b' {...pageTemplateProps} />;\n break;\n case 'narrow wide':\n page = <NarrowWidePage a='a' b='b' {...pageTemplateProps} />;\n break;\n case 'wide wide narrow':\n page = <WideWideNarrowPage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'narrow wide wide':\n page = <NarrowWideWidePage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'narrow wide narrow':\n page = <NarrowWideNarrowPage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'tabbed':\n default:\n page = (\n <TabbedPage\n a={`Content for: Tab ${currentTabId}`}\n tabs={{\n tabs: Array.from({ length: 5 }, (_, i) => {\n return {\n id: `${i + 1}`,\n name: `Tab ${i + 1}`\n };\n }),\n type: 'horizontal',\n currentTabId,\n onTabClick: setCurrentTabId\n }}\n {...pageTemplateProps}\n />\n );\n break;\n }\n\n return <AppShellDemo main={page} appHeader />;\n};\n\nPageTemplatesDemo.args = {\n template: 'demo page',\n scrollContent: false,\n title: 'Demo page',\n icon: 'home-solid',\n showIcon: true,\n showBreadcrumbs: true,\n pathData: 'Page 1,Page2,Page 3,Page 4,Page 5',\n showActions: true,\n showBanners: false\n};\n\nPageTemplatesDemo.argTypes = {\n template: {\n options: [\n 'demo page',\n 'one column',\n 'two column',\n 'three column',\n 'four column',\n 'wide narrow',\n 'narrow wide',\n 'wide wide narrow',\n 'narrow wide wide',\n 'narrow wide narrow',\n 'tabbed'\n ],\n control: { type: 'select' }\n },\n scrollContent: { control: { type: 'boolean' } },\n title: { control: { type: 'text' } },\n icon: { options: icons, control: { type: 'select', icons: true } },\n showIcon: { control: { type: 'boolean' } },\n showBreadcrumbs: { control: { type: 'boolean' } },\n pathData: { control: { type: 'text' } },\n showActions: { control: { type: 'boolean' } },\n showBanners: { control: { type: 'boolean' } }\n};\n\ninterface DashboardPageStoryProps {\n title?: DashboardPageLayoutProps['title'];\n filterPosition?: DashboardPageLayoutProps['filterPosition'];\n numberOfFilters?: number;\n}\n\nexport const DashboardPageDemo: Story<DashboardPageStoryProps> = (\n args: DashboardPageStoryProps\n) => {\n const FilterComboBox = () => {\n const [filterSearchValue, setFilterSearchValue] = useState('');\n const [filterOptions, setFilterOptions] = useState<MenuProps['items']>(() =>\n Array.from({ length: 10 }, (_, i) => ({\n id: createUID(),\n primary: `Filter ${i + 1}`,\n selected: false\n }))\n );\n\n const selected = useMemo(() => {\n return menuHelpers\n .getSelected(filterOptions)\n .map(item => ({ text: item.primary, id: item.id }));\n }, [filterOptions]);\n\n const toggleItem = (id: MenuItemProps['id']) => {\n setFilterOptions(cur => menuHelpers.toggleSelected(cur, id, 'multi-select'));\n };\n\n return (\n <ComboBox\n mode='multi-select'\n label='Filters'\n placeholder='Choose filters'\n value={filterSearchValue}\n onChange={e => {\n setFilterSearchValue(e.target.value);\n }}\n selected={{ items: selected, onRemove: toggleItem }}\n menu={{\n items: filterSearchValue\n ? menuHelpers\n .flatten(filterOptions)\n .filter(({ primary }) => primary.includes(filterSearchValue))\n : filterOptions,\n emptyText: 'No filters',\n onItemClick: toggleItem\n }}\n />\n );\n };\n\n const filterControls = Array.from({ length: args.numberOfFilters || 3 }, (_, i) => (\n <FilterComboBox key={i} />\n ));\n\n return (\n <AppShellDemo\n main={\n <DashboardPage\n a='a'\n b='b'\n c='c'\n path={getPath()}\n filters={filterControls}\n filterPosition={args.filterPosition}\n fitToViewport\n title={args.title || 'Dashboard'}\n as={StyledStoryPage}\n />\n }\n appHeader\n />\n );\n};\n\nDashboardPageDemo.args = {\n title: 'Dashboard',\n filterPosition: 'block-start',\n numberOfFilters: 3\n};\n\nDashboardPageDemo.argTypes = {\n title: { control: { type: 'text' } },\n filterPosition: {\n options: ['block-start', 'inline-start', 'inline-end'],\n control: { type: 'select' }\n },\n numberOfFilters: { control: { type: 'number' } }\n};\n\ninterface CategorySubPageStoryProps {\n category?: TemplateProps['category'];\n categoryIcon?: TemplateProps['categoryIcon'];\n showIcon?: boolean;\n viewLoading?: TemplateProps['viewLoading'];\n maxActions?: TemplateProps['maxActions'];\n}\n\nexport const CategorySubPageDemo: Story<CategorySubPageStoryProps> = (\n args: CategorySubPageStoryProps\n) => {\n const [activeItem, setActiveItem] = useState('Profile');\n\n const mockNavLinks = (itemTextArray: string[]) => {\n return itemTextArray.map(itemText => {\n return {\n text: itemText,\n active: itemText === activeItem,\n href: '#',\n onClick: (event: MouseEvent) => setActiveItem((event.target as Element).textContent || '')\n };\n });\n };\n\n return (\n <AppShellDemo\n main={\n <CategorySubPage\n viewLoading={args.viewLoading}\n category={args.category || 'Administration'}\n categoryIcon={args.showIcon ? args.categoryIcon : undefined}\n navItemGroups={[\n {\n title: 'General',\n items: useMemo(\n () => mockNavLinks(['Configurations', 'Profile', 'Authentication', 'Connections']),\n [activeItem]\n )\n },\n {\n title: 'Second Group',\n items: useMemo(() => mockNavLinks(['Option 1', 'Option 2']), [activeItem])\n },\n {\n items: useMemo(() => mockNavLinks(['All configurations']), [activeItem])\n },\n {\n items: useMemo(\n () => mockNavLinks(['Visually Grouped SubPage A', 'Visually Grouped SubPage B']),\n [activeItem]\n )\n },\n {\n items: [\n {\n text: 'Button Item'\n }\n ]\n }\n ]}\n pageTitle={activeItem}\n maxActions={args.maxActions}\n pageActions={[\n {\n id: 'saveChanges',\n text: 'Save'\n },\n {\n id: 'cancelChanges',\n text: 'Cancel'\n },\n {\n id: 'goToRule',\n text: 'Go to Rule'\n },\n {\n id: 'viewInClipboard',\n text: 'View in Clipboard'\n }\n ]}\n region={\n <StyledStoryPage secondary>\n <div style={{ minHeight: '150vh' }} />\n </StyledStoryPage>\n }\n />\n }\n appHeader\n />\n );\n};\n\nCategorySubPageDemo.args = {\n category: 'Administration',\n categoryIcon: 'gear-solid',\n showIcon: true,\n viewLoading: false,\n maxActions: 3\n};\n\nCategorySubPageDemo.argTypes = {\n category: { control: { type: 'text' } },\n categoryIcon: { options: icons, control: { type: 'select', icons: true } },\n showIcon: { control: { type: 'boolean' } },\n viewLoading: { control: { type: 'boolean' } },\n maxActions: { control: { type: 'number' } }\n};\n"]}
|
|
@@ -10,4 +10,7 @@ export const ParagraphDisplayDemo = (args) => {
|
|
|
10
10
|
ParagraphDisplayDemo.args = {
|
|
11
11
|
value: "Here's a string with\na new line in it."
|
|
12
12
|
};
|
|
13
|
+
ParagraphDisplayDemo.argTypes = {
|
|
14
|
+
value: { control: { type: 'text', multiLine: true } }
|
|
15
|
+
};
|
|
13
16
|
//# sourceMappingURL=ParagraphDisplay.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParagraphDisplay.stories.js","sourceRoot":"","sources":["../../../src/core/Paragraph/ParagraphDisplay.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAyB,MAAM,yBAAyB,CAAC;AAElF,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,gBAAgB;CACpB,CAAC;AAEV,MAAM,CAAC,MAAM,oBAAoB,GAAiC,CAAC,IAA2B,EAAE,EAAE;IAChG,OAAO,KAAC,gBAAgB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAAI,CAAC;AACjD,CAAC,CAAC;AAEF,oBAAoB,CAAC,IAAI,GAAG;IAC1B,KAAK,EAAE,yCAAyC;CACjD,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { ParagraphDisplay, ParagraphDisplayProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Paragraph',\n component: ParagraphDisplay\n} as Meta;\n\nexport const ParagraphDisplayDemo: Story<ParagraphDisplayProps> = (args: ParagraphDisplayProps) => {\n return <ParagraphDisplay value={args.value} />;\n};\n\nParagraphDisplayDemo.args = {\n value: \"Here's a string with\\na new line in it.\"\n};\n\
|
|
1
|
+
{"version":3,"file":"ParagraphDisplay.stories.js","sourceRoot":"","sources":["../../../src/core/Paragraph/ParagraphDisplay.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAyB,MAAM,yBAAyB,CAAC;AAElF,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,gBAAgB;CACpB,CAAC;AAEV,MAAM,CAAC,MAAM,oBAAoB,GAAiC,CAAC,IAA2B,EAAE,EAAE;IAChG,OAAO,KAAC,gBAAgB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAAI,CAAC;AACjD,CAAC,CAAC;AAEF,oBAAoB,CAAC,IAAI,GAAG;IAC1B,KAAK,EAAE,yCAAyC;CACjD,CAAC;AAEF,oBAAoB,CAAC,QAAQ,GAAG;IAC9B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE;CACtD,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { ParagraphDisplay, ParagraphDisplayProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Paragraph',\n component: ParagraphDisplay\n} as Meta;\n\nexport const ParagraphDisplayDemo: Story<ParagraphDisplayProps> = (args: ParagraphDisplayProps) => {\n return <ParagraphDisplay value={args.value} />;\n};\n\nParagraphDisplayDemo.args = {\n value: \"Here's a string with\\na new line in it.\"\n};\n\nParagraphDisplayDemo.argTypes = {\n value: { control: { type: 'text', multiLine: true } }\n};\n"]}
|
|
@@ -2,7 +2,6 @@ import { Meta, Story } from '@storybook/react';
|
|
|
2
2
|
import { PopoverProps } from '@pega/cosmos-react-core';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const ClickPopover: Story<PopoverProps>;
|
|
5
|
+
export declare const PopoverDemo: Story<PopoverProps>;
|
|
7
6
|
export declare const PopoverGroups: Story;
|
|
8
7
|
//# sourceMappingURL=Popover.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Popover/Popover.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAOL,YAAY,EAIb,MAAM,yBAAyB,CAAC;;AAEjC,wBAkCU;AAEV,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"Popover.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Popover/Popover.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAOL,YAAY,EAIb,MAAM,yBAAyB,CAAC;;AAEjC,wBAkCU;AAEV,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,YAAY,CAoF3C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAmF3B,CAAC"}
|
|
@@ -36,44 +36,43 @@ export default {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
export const
|
|
40
|
-
const [
|
|
41
|
-
const
|
|
39
|
+
export const PopoverDemo = (args) => {
|
|
40
|
+
const [mountHoverPopover, setMountHoverPopover] = useState(false);
|
|
41
|
+
const setHoverPopoverEl = useElement()[1];
|
|
42
42
|
const [textEl, setTextEl] = useElement();
|
|
43
|
-
const
|
|
43
|
+
const [mountClickPopover, setMountClickPopover] = useState(false);
|
|
44
|
+
const setClickPopoverEl = useElement()[1];
|
|
45
|
+
const [buttonEl, setButtonEl] = useElement();
|
|
46
|
+
const toggleHoverPopover = ({ type, key }) => {
|
|
44
47
|
if (type === 'keydown') {
|
|
45
48
|
if (key === 'Escape')
|
|
46
|
-
|
|
49
|
+
setMountHoverPopover(false);
|
|
47
50
|
return;
|
|
48
51
|
}
|
|
49
|
-
|
|
52
|
+
setMountHoverPopover(type === 'mouseover' || type === 'focus');
|
|
50
53
|
};
|
|
51
|
-
const
|
|
52
|
-
onMouseOver:
|
|
53
|
-
onMouseOut:
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
const hoverMountingHandlers = {
|
|
55
|
+
onMouseOver: toggleHoverPopover,
|
|
56
|
+
onMouseOut: toggleHoverPopover,
|
|
57
|
+
onKeyDown: toggleHoverPopover,
|
|
58
|
+
onFocus: toggleHoverPopover,
|
|
59
|
+
onBlur: toggleHoverPopover
|
|
56
60
|
};
|
|
57
|
-
|
|
58
|
-
};
|
|
59
|
-
export const ClickPopover = (args) => {
|
|
60
|
-
const [mountPopover, setMountPopover] = useState(false);
|
|
61
|
-
const setPopoverEl = useElement()[1];
|
|
62
|
-
const [buttonEl, setButtonEl] = useElement();
|
|
63
|
-
const togglePopover = ({ type, key }) => {
|
|
61
|
+
const toggleClickPopover = ({ type, key }) => {
|
|
64
62
|
if (type === 'keydown') {
|
|
65
63
|
if (key === 'Escape')
|
|
66
|
-
|
|
64
|
+
setMountClickPopover(false);
|
|
67
65
|
return;
|
|
68
66
|
}
|
|
69
|
-
|
|
67
|
+
setMountClickPopover(type === 'click' || type === 'focus');
|
|
70
68
|
};
|
|
71
|
-
const
|
|
72
|
-
onClick:
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
const clickMountingHandlers = {
|
|
70
|
+
onClick: toggleClickPopover,
|
|
71
|
+
onKeyDown: toggleClickPopover,
|
|
72
|
+
onFocus: toggleClickPopover,
|
|
73
|
+
onBlur: toggleClickPopover
|
|
75
74
|
};
|
|
76
|
-
return (_jsxs(Flex, { container: { justify: 'center', pad: 4 }, children: [_jsx(Button, { ref: setButtonEl, ...
|
|
75
|
+
return (_jsxs(Flex, { container: { justify: 'center', pad: 4, gap: 4, alignItems: 'center' }, children: [_jsx(Text, { ref: setTextEl, variant: 'h1', ...hoverMountingHandlers, children: "Hover Over Me" }, void 0), _jsx(Popover, { ref: setHoverPopoverEl, show: mountHoverPopover, target: textEl, portal: true, arrow: args.arrow, showDelay: args.showDelay, hideDelay: args.hideDelay, placement: args.placement, ...hoverMountingHandlers, children: _jsx(Card, { children: _jsx(CardContent, { children: _jsx(Text, { children: "This Popover appears on hover!" }, void 0) }, void 0) }, void 0) }, void 0), _jsx(Button, { ref: setButtonEl, ...clickMountingHandlers, children: "Click Me" }, void 0), _jsx(Popover, { ref: setClickPopoverEl, show: mountClickPopover, target: buttonEl, portal: true, arrow: args.arrow, showDelay: args.showDelay, hideDelay: args.hideDelay, placement: args.placement, ...clickMountingHandlers, children: _jsx(Card, { children: _jsx(CardContent, { children: _jsx(Text, { children: "This Popover appears on click!" }, void 0) }, void 0) }, void 0) }, void 0)] }, void 0));
|
|
77
76
|
};
|
|
78
77
|
export const PopoverGroups = () => {
|
|
79
78
|
const [firstTooltipButton, setFirstTooltipButton] = useElement();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.stories.js","sourceRoot":"","sources":["../../../src/core/Popover/Popover.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,IAAI,EACJ,OAAO,EAEP,IAAI,EACJ,OAAO,EACP,UAAU,EACX,MAAM,yBAAyB,CAAC;AAEjC,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE;QACJ,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,MAAM;QACjB,SAAS,EAAE,MAAM;QACjB,SAAS,EAAE,QAAQ;KACpB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QACvC,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC9E,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC9E,SAAS,EAAE;YACT,OAAO,EAAE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C,IAAI,qCAAkB,WACX,WACT,WACC,EACV,KAAC,MAAM,IAAC,GAAG,EAAE,qBAAqB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,iCAE5E,EACT,KAAC,OAAO,IAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,kBAAkB,YACzD,KAAC,IAAI,cACH,KAAC,WAAW,cACV,KAAC,IAAI,qCAAkB,WACX,WACT,WACC,YACL,YACF,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,QAAQ,GAAG;IACvB,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACnC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACvC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACvC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACxC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport {\n Button,\n Card,\n CardContent,\n Flex,\n Link,\n Popover,\n PopoverProps,\n Text,\n Tooltip,\n useElement\n} from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Popover',\n component: Popover,\n args: {\n arrow: false,\n showDelay: 'none',\n hideDelay: 'none',\n placement: 'bottom'\n },\n argTypes: {\n arrow: { control: { type: 'boolean' } },\n showDelay: { options: ['none', 'short', 'long'], control: { type: 'select' } },\n hideDelay: { options: ['none', 'short', 'long'], control: { type: 'select' } },\n placement: {\n options: [\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n 'top',\n 'top-start',\n 'top-end',\n 'left',\n 'left-start',\n 'left-end',\n 'right',\n 'right-start',\n 'right-end',\n 'auto',\n 'auto-start',\n 'auto-end'\n ],\n control: { type: 'select' }\n }\n }\n} as Meta;\n\nexport const HoverPopover: Story<PopoverProps> = (args: PopoverProps) => {\n const [mountPopover, setMountPopover] = useState(false);\n const setPopoverEl = useElement<HTMLDivElement>()[1];\n const [textEl, setTextEl] = useElement<HTMLDivElement>();\n\n const togglePopover = ({ type, key }: { type: string; key: string }) => {\n if (type === 'keydown') {\n if (key === 'Escape') setMountPopover(false);\n return;\n }\n setMountPopover(type === 'mouseover' || type === 'focus');\n };\n\n const mountingHandlers = {\n onMouseOver: togglePopover,\n onMouseOut: togglePopover,\n onFocus: togglePopover,\n onBlur: togglePopover\n };\n\n return (\n <Flex container={{ justify: 'center', pad: 4 }}>\n <Text ref={setTextEl} variant='h1' {...mountingHandlers}>\n Hover Over Me\n </Text>\n <Popover\n ref={setPopoverEl}\n show={mountPopover}\n target={textEl}\n arrow={args.arrow}\n showDelay={args.showDelay}\n hideDelay={args.hideDelay}\n placement={args.placement}\n {...mountingHandlers}\n >\n <Card>\n <CardContent>\n <Text>This Popover appears on hover!</Text>\n </CardContent>\n </Card>\n </Popover>\n </Flex>\n );\n};\n\nexport const ClickPopover: Story<PopoverProps> = (args: PopoverProps) => {\n const [mountPopover, setMountPopover] = useState(false);\n const setPopoverEl = useElement<HTMLDivElement>()[1];\n const [buttonEl, setButtonEl] = useElement<HTMLButtonElement>();\n\n const togglePopover = ({ type, key }: { type: string; key: string }) => {\n if (type === 'keydown') {\n if (key === 'Escape') setMountPopover(false);\n return;\n }\n setMountPopover(type === 'click' || type === 'focus');\n };\n\n const mountingHandlers = {\n onClick: togglePopover,\n onFocus: togglePopover,\n onBlur: togglePopover\n };\n\n return (\n <Flex container={{ justify: 'center', pad: 4 }}>\n <Button ref={setButtonEl} {...mountingHandlers}>\n Click Me\n </Button>\n <Popover\n ref={setPopoverEl}\n show={mountPopover}\n target={buttonEl}\n arrow={args.arrow}\n showDelay={args.showDelay}\n hideDelay={args.hideDelay}\n placement={args.placement}\n {...mountingHandlers}\n >\n <Card>\n <CardContent>\n <Text>This Popover appears on hover!</Text>\n </CardContent>\n </Card>\n </Popover>\n </Flex>\n );\n};\n\nexport const PopoverGroups: Story = () => {\n const [firstTooltipButton, setFirstTooltipButton] = useElement<HTMLButtonElement>();\n const [secondTooltipButton, setSecondTooltipButton] = useElement<HTMLButtonElement>();\n const [thirdTooltipButton, setThirdTooltipButton] = useElement<HTMLButtonElement>();\n\n const [firstPopoverButton, setFirstPopoverButton] = useElement<HTMLButtonElement>();\n const [secondPopoverButton, setSecondPopoverButton] = useElement<HTMLButtonElement>();\n const [thirdPopoverButton, setThirdPopoverButton] = useElement<HTMLButtonElement>();\n\n const [showFirstPopover, setShowFirstPopover] = useState(false);\n const [showSecondPopover, setShowSecondPopover] = useState(false);\n const [showThirdPopover, setShowThirdPopover] = useState(false);\n\n return (\n <Flex container={{ direction: 'column', gap: 4 }}>\n <Text variant='h2'>groupId: link_preview</Text>\n <Flex>\n <Link href='http://www.google.com' previewable>\n Previewable Link\n </Link>\n <Link href='http://www.google.com' previewable>\n Previewable Link\n </Link>\n <Link href='http://www.google.com' previewable>\n Previewable Link\n </Link>\n </Flex>\n <Text variant='h2'>groupId: tooltip</Text>\n <Flex>\n <Button ref={setFirstTooltipButton} aria-describedby='first-tooltip'>\n Hover me\n </Button>\n <Tooltip target={firstTooltipButton} id='first-tooltip'>\n This is a tooltip for the first button.\n </Tooltip>\n <Button ref={setSecondTooltipButton} aria-describedby='second-tooltip'>\n Hover me\n </Button>\n <Tooltip target={secondTooltipButton} id='second-tooltip'>\n This is a tooltip for the second button.\n </Tooltip>\n <Button ref={setThirdTooltipButton} aria-describedby='third-tooltip'>\n Hover me\n </Button>\n <Tooltip target={thirdTooltipButton} id='third-tooltip'>\n This is a tooltip for the third button.\n </Tooltip>\n </Flex>\n <Text variant='h2'>No groupId</Text>\n <Flex>\n <Button ref={setFirstPopoverButton} onClick={() => setShowFirstPopover(curr => !curr)}>\n Click me\n </Button>\n <Popover show={showFirstPopover} target={firstPopoverButton}>\n <Card>\n <CardContent>\n <Text>Popover #1</Text>\n </CardContent>\n </Card>\n </Popover>\n <Button ref={setSecondPopoverButton} onClick={() => setShowSecondPopover(curr => !curr)}>\n Click me\n </Button>\n <Popover show={showSecondPopover} target={secondPopoverButton}>\n <Card>\n <CardContent>\n <Text>Popover #2</Text>\n </CardContent>\n </Card>\n </Popover>\n <Button ref={setThirdPopoverButton} onClick={() => setShowThirdPopover(curr => !curr)}>\n Click me\n </Button>\n <Popover show={showThirdPopover} target={thirdPopoverButton}>\n <Card>\n <CardContent>\n <Text>Popover #3</Text>\n </CardContent>\n </Card>\n </Popover>\n </Flex>\n </Flex>\n );\n};\n\nPopoverGroups.argTypes = {\n arrow: { table: { disable: true } },\n showDelay: { table: { disable: true } },\n hideDelay: { table: { disable: true } },\n placement: { table: { disable: true } }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Popover.stories.js","sourceRoot":"","sources":["../../../src/core/Popover/Popover.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,IAAI,EACJ,OAAO,EAEP,IAAI,EACJ,OAAO,EACP,UAAU,EACX,MAAM,yBAAyB,CAAC;AAEjC,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE;QACJ,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,MAAM;QACjB,SAAS,EAAE,MAAM;QACjB,SAAS,EAAE,QAAQ;KACpB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QACvC,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC9E,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,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ACT,KAAC,OAAO,IAAC,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,mBAAmB,YAC3D,KAAC,IAAI,cACH,KAAC,WAAW,cACV,KAAC,IAAI,qCAAkB,WACX,WACT,WACC,EACV,KAAC,MAAM,IAAC,GAAG,EAAE,qBAAqB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,iCAE5E,EACT,KAAC,OAAO,IAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,kBAAkB,YACzD,KAAC,IAAI,cACH,KAAC,WAAW,cACV,KAAC,IAAI,qCAAkB,WACX,WACT,WACC,YACL,YACF,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,QAAQ,GAAG;IACvB,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACnC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACvC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACvC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACxC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport {\n Button,\n Card,\n CardContent,\n Flex,\n Link,\n Popover,\n PopoverProps,\n Text,\n Tooltip,\n useElement\n} from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Popover',\n component: Popover,\n args: {\n arrow: false,\n showDelay: 'none',\n hideDelay: 'none',\n placement: 'bottom'\n },\n argTypes: {\n arrow: { control: { type: 'boolean' } },\n showDelay: { options: ['none', 'short', 'long'], control: { type: 'select' } },\n hideDelay: { options: ['none', 'short', 'long'], control: { type: 'select' } },\n placement: {\n options: [\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n 'top',\n 'top-start',\n 'top-end',\n 'left',\n 'left-start',\n 'left-end',\n 'right',\n 'right-start',\n 'right-end',\n 'auto',\n 'auto-start',\n 'auto-end'\n ],\n control: { type: 'select' }\n }\n }\n} as Meta;\n\nexport const PopoverDemo: Story<PopoverProps> = (args: PopoverProps) => {\n const [mountHoverPopover, setMountHoverPopover] = useState(false);\n const setHoverPopoverEl = useElement<HTMLDivElement>()[1];\n const [textEl, setTextEl] = useElement<HTMLDivElement>();\n\n const [mountClickPopover, setMountClickPopover] = useState(false);\n const setClickPopoverEl = useElement<HTMLDivElement>()[1];\n const [buttonEl, setButtonEl] = useElement<HTMLButtonElement>();\n\n const toggleHoverPopover = ({ type, key }: { type: string; key: string }) => {\n if (type === 'keydown') {\n if (key === 'Escape') setMountHoverPopover(false);\n return;\n }\n setMountHoverPopover(type === 'mouseover' || type === 'focus');\n };\n\n const hoverMountingHandlers = {\n onMouseOver: toggleHoverPopover,\n onMouseOut: toggleHoverPopover,\n onKeyDown: toggleHoverPopover,\n onFocus: toggleHoverPopover,\n onBlur: toggleHoverPopover\n };\n\n const toggleClickPopover = ({ type, key }: { type: string; key: string }) => {\n if (type === 'keydown') {\n if (key === 'Escape') setMountClickPopover(false);\n return;\n }\n setMountClickPopover(type === 'click' || type === 'focus');\n };\n\n const clickMountingHandlers = {\n onClick: toggleClickPopover,\n onKeyDown: toggleClickPopover,\n onFocus: toggleClickPopover,\n onBlur: toggleClickPopover\n };\n\n return (\n <Flex container={{ justify: 'center', pad: 4, gap: 4, alignItems: 'center' }}>\n <Text ref={setTextEl} variant='h1' {...hoverMountingHandlers}>\n Hover Over Me\n </Text>\n <Popover\n ref={setHoverPopoverEl}\n show={mountHoverPopover}\n target={textEl}\n portal\n arrow={args.arrow}\n showDelay={args.showDelay}\n hideDelay={args.hideDelay}\n placement={args.placement}\n {...hoverMountingHandlers}\n >\n <Card>\n <CardContent>\n <Text>This Popover appears on hover!</Text>\n </CardContent>\n </Card>\n </Popover>\n <Button ref={setButtonEl} {...clickMountingHandlers}>\n Click Me\n </Button>\n <Popover\n ref={setClickPopoverEl}\n show={mountClickPopover}\n target={buttonEl}\n portal\n arrow={args.arrow}\n showDelay={args.showDelay}\n hideDelay={args.hideDelay}\n placement={args.placement}\n {...clickMountingHandlers}\n >\n <Card>\n <CardContent>\n <Text>This Popover appears on click!</Text>\n </CardContent>\n </Card>\n </Popover>\n </Flex>\n );\n};\n\nexport const PopoverGroups: Story = () => {\n const [firstTooltipButton, setFirstTooltipButton] = useElement<HTMLButtonElement>();\n const [secondTooltipButton, setSecondTooltipButton] = useElement<HTMLButtonElement>();\n const [thirdTooltipButton, setThirdTooltipButton] = useElement<HTMLButtonElement>();\n\n const [firstPopoverButton, setFirstPopoverButton] = useElement<HTMLButtonElement>();\n const [secondPopoverButton, setSecondPopoverButton] = useElement<HTMLButtonElement>();\n const [thirdPopoverButton, setThirdPopoverButton] = useElement<HTMLButtonElement>();\n\n const [showFirstPopover, setShowFirstPopover] = useState(false);\n const [showSecondPopover, setShowSecondPopover] = useState(false);\n const [showThirdPopover, setShowThirdPopover] = useState(false);\n\n return (\n <Flex container={{ direction: 'column', gap: 4 }}>\n <Text variant='h2'>groupId: link_preview</Text>\n <Flex>\n <Link href='http://www.google.com' previewable>\n Previewable Link\n </Link>\n <Link href='http://www.google.com' previewable>\n Previewable Link\n </Link>\n <Link href='http://www.google.com' previewable>\n Previewable Link\n </Link>\n </Flex>\n <Text variant='h2'>groupId: tooltip</Text>\n <Flex>\n <Button ref={setFirstTooltipButton} aria-describedby='first-tooltip'>\n Hover me\n </Button>\n <Tooltip target={firstTooltipButton} id='first-tooltip'>\n This is a tooltip for the first button.\n </Tooltip>\n <Button ref={setSecondTooltipButton} aria-describedby='second-tooltip'>\n Hover me\n </Button>\n <Tooltip target={secondTooltipButton} id='second-tooltip'>\n This is a tooltip for the second button.\n </Tooltip>\n <Button ref={setThirdTooltipButton} aria-describedby='third-tooltip'>\n Hover me\n </Button>\n <Tooltip target={thirdTooltipButton} id='third-tooltip'>\n This is a tooltip for the third button.\n </Tooltip>\n </Flex>\n <Text variant='h2'>No groupId</Text>\n <Flex>\n <Button ref={setFirstPopoverButton} onClick={() => setShowFirstPopover(curr => !curr)}>\n Click me\n </Button>\n <Popover show={showFirstPopover} target={firstPopoverButton}>\n <Card>\n <CardContent>\n <Text>Popover #1</Text>\n </CardContent>\n </Card>\n </Popover>\n <Button ref={setSecondPopoverButton} onClick={() => setShowSecondPopover(curr => !curr)}>\n Click me\n </Button>\n <Popover show={showSecondPopover} target={secondPopoverButton}>\n <Card>\n <CardContent>\n <Text>Popover #2</Text>\n </CardContent>\n </Card>\n </Popover>\n <Button ref={setThirdPopoverButton} onClick={() => setShowThirdPopover(curr => !curr)}>\n Click me\n </Button>\n <Popover show={showThirdPopover} target={thirdPopoverButton}>\n <Card>\n <CardContent>\n <Text>Popover #3</Text>\n </CardContent>\n </Card>\n </Popover>\n </Flex>\n </Flex>\n );\n};\n\nPopoverGroups.argTypes = {\n arrow: { table: { disable: true } },\n showDelay: { table: { disable: true } },\n hideDelay: { table: { disable: true } },\n placement: { table: { disable: true } }\n};\n"]}
|
|
@@ -4,4 +4,8 @@ declare const _default: Meta<import("@storybook/react").Args>;
|
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const IndeterminateProgress: Story<ProgressProps>;
|
|
6
6
|
export declare const DeterminateProgress: Story<ProgressProps>;
|
|
7
|
+
interface ConfigurableProgressProps extends ProgressProps {
|
|
8
|
+
progressColor?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const ConfigurableProgress: Story<ConfigurableProgressProps>;
|
|
7
11
|
//# sourceMappingURL=Progress.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Progress/Progress.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,
|
|
1
|
+
{"version":3,"file":"Progress.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Progress/Progress.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAKL,aAAa,EAEd,MAAM,yBAAyB,CAAC;;AAIjC,wBAaU;AAEV,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,aAAa,CA+BtD,CAAC;AAMF,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,aAAa,CAgCpD,CAAC;AAUF,UAAU,yBAA0B,SAAQ,aAAa;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,yBAAyB,CAkBjE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
-
import { Button, Flex, Progress, Text } from '@pega/cosmos-react-core';
|
|
3
|
+
import { Button, Configuration, Flex, Progress, Text } from '@pega/cosmos-react-core';
|
|
4
4
|
import { StyledDemoWrap } from './Progress.styles';
|
|
5
5
|
export default {
|
|
6
6
|
title: 'Core/Progress',
|
|
@@ -61,4 +61,21 @@ DeterminateProgress.args = {
|
|
|
61
61
|
DeterminateProgress.argTypes = {
|
|
62
62
|
value: { control: { type: 'number' } }
|
|
63
63
|
};
|
|
64
|
+
export const ConfigurableProgress = (args) => {
|
|
65
|
+
return (_jsx(Configuration, { theme: {
|
|
66
|
+
components: {
|
|
67
|
+
progress: {
|
|
68
|
+
'progress-color': args.progressColor
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}, children: _jsx(Flex, { container: { justify: 'center', alignItems: 'center' }, as: StyledDemoWrap, children: _jsx(Progress, { variant: args.variant, placement: 'local', message: 'Loading', visible: true }, void 0) }, void 0) }, void 0));
|
|
72
|
+
};
|
|
73
|
+
ConfigurableProgress.args = {
|
|
74
|
+
progressColor: '#076bc9'
|
|
75
|
+
};
|
|
76
|
+
ConfigurableProgress.argTypes = {
|
|
77
|
+
progressColor: { control: { type: 'color' } },
|
|
78
|
+
placement: { table: { disable: true } },
|
|
79
|
+
message: { table: { disable: true } }
|
|
80
|
+
};
|
|
64
81
|
//# sourceMappingURL=Progress.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.stories.js","sourceRoot":"","sources":["../../../src/core/Progress/Progress.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,
|
|
1
|
+
{"version":3,"file":"Progress.stories.js","sourceRoot":"","sources":["../../../src/core/Progress/Progress.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EACL,MAAM,EACN,aAAa,EACb,IAAI,EACJ,QAAQ,EAER,IAAI,EACL,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;QACf,SAAS,EAAE,OAAO;QAClB,OAAO,EAAE,EAAE;KACZ;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC9E,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAClF,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;KACvC;CACM,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C/B,EAAE;IACF,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE;YACL,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,gBAAgB,EAAE,IAAI,CAAC,aAAa;iBACrC;aACF;SACF,YAED,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,cAAc,YAC9E,KAAC,QAAQ,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,EAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,OAAO,iBAAG,WAC1E,WACO,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,oBAAoB,CAAC,IAAI,GAAG;IAC1B,aAAa,EAAE,SAAS;CACzB,CAAC;AAEF,oBAAoB,CAAC,QAAQ,GAAG;IAC9B,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC7C,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACvC,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACtC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useEffect, useState } from 'react';\n\nimport {\n Button,\n Configuration,\n Flex,\n Progress,\n ProgressProps,\n Text\n} from '@pega/cosmos-react-core';\n\nimport { StyledDemoWrap } from './Progress.styles';\n\nexport default {\n title: 'Core/Progress',\n component: Progress,\n args: {\n variant: 'ring',\n placement: 'local',\n message: ''\n },\n argTypes: {\n variant: { options: ['ring', 'bar', 'ellipsis'], control: { type: 'select' } },\n placement: { options: ['local', 'global', 'inline'], control: { type: 'select' } },\n message: { control: { type: 'text' } }\n }\n} as Meta;\n\nexport const IndeterminateProgress: Story<ProgressProps> = (args: ProgressProps) => {\n const [loading, setLoading] = useState(false);\n\n const handleClick = () => {\n setLoading(true);\n\n setTimeout(() => {\n setLoading(false);\n }, 2000);\n };\n\n useEffect(() => {\n if (args.placement === 'global') {\n setLoading(false);\n } else {\n setLoading(true);\n }\n }, [args.placement]);\n\n return (\n <Flex container={{ justify: 'center', alignItems: 'center' }} as={StyledDemoWrap}>\n {args.placement === 'global' && <Button onClick={handleClick}>Start loading</Button>}\n {args.placement === 'inline' && <Text>Progress demo</Text>}\n <Progress\n variant={args.variant}\n placement={args.placement}\n message={args.message}\n visible={loading}\n />\n </Flex>\n );\n};\n\nIndeterminateProgress.args = {\n message: 'Loading'\n};\n\nexport const DeterminateProgress: Story<ProgressProps> = (args: ProgressProps) => {\n const [loading, setLoading] = useState(false);\n\n const handleClick = () => {\n setLoading(true);\n\n setTimeout(() => {\n setLoading(false);\n }, 2000);\n };\n\n useEffect(() => {\n if (args.placement === 'global') {\n setLoading(false);\n } else {\n setLoading(true);\n }\n }, [args.placement]);\n\n return (\n <Flex container={{ justify: 'center', alignItems: 'center' }} as={StyledDemoWrap}>\n {args.placement === 'global' && <Button onClick={handleClick}>Start loading</Button>}\n {args.placement === 'inline' && <Text>Progress demo</Text>}\n <Progress\n value={args.value}\n variant={args.variant}\n placement={args.placement}\n message={args.message || `${args.value}%`}\n visible={loading}\n />\n </Flex>\n );\n};\n\nDeterminateProgress.args = {\n value: 67\n};\n\nDeterminateProgress.argTypes = {\n value: { control: { type: 'number' } }\n};\n\ninterface ConfigurableProgressProps extends ProgressProps {\n progressColor?: string;\n}\n\nexport const ConfigurableProgress: Story<ConfigurableProgressProps> = (\n args: ConfigurableProgressProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n progress: {\n 'progress-color': args.progressColor\n }\n }\n }}\n >\n <Flex container={{ justify: 'center', alignItems: 'center' }} as={StyledDemoWrap}>\n <Progress variant={args.variant} placement='local' message='Loading' visible />\n </Flex>\n </Configuration>\n );\n};\n\nConfigurableProgress.args = {\n progressColor: '#076bc9'\n};\n\nConfigurableProgress.argTypes = {\n progressColor: { control: { type: 'color' } },\n placement: { table: { disable: true } },\n message: { table: { disable: true } }\n};\n"]}
|
|
@@ -4,4 +4,16 @@ declare const _default: Meta<import("@storybook/react").Args>;
|
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const DefaultRadioButton: Story<RadioCheckProps>;
|
|
6
6
|
export declare const RadioButtonCard: Story<RadioCheckProps>;
|
|
7
|
+
interface ConfigurableRadioButtonProps extends RadioCheckProps {
|
|
8
|
+
size?: string;
|
|
9
|
+
backgroundColor?: string;
|
|
10
|
+
borderColor?: string;
|
|
11
|
+
borderWidth?: string;
|
|
12
|
+
borderRadius?: string;
|
|
13
|
+
labelColor?: string;
|
|
14
|
+
labelFontWeight?: string;
|
|
15
|
+
checkedBackgroundColor?: string;
|
|
16
|
+
checkedBorderColor?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const ConfigurableRadioButton: Story<ConfigurableRadioButtonProps>;
|
|
7
19
|
//# sourceMappingURL=RadioButton.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.stories.d.ts","sourceRoot":"","sources":["../../../src/core/RadioButton/RadioButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,
|
|
1
|
+
{"version":3,"file":"RadioButton.stories.d.ts","sourceRoot":"","sources":["../../../src/core/RadioButton/RadioButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA8B,eAAe,EAAE,MAAM,yBAAyB,CAAC;;AAEtF,wBAiBU;AAEV,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,eAAe,CAUrD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,eAAe,CAWlD,CAAC;AAEF,UAAU,4BAA6B,SAAQ,eAAe;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,4BAA4B,CA8BvE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { RadioButton } from '@pega/cosmos-react-core';
|
|
2
|
+
import { Configuration, RadioButton } from '@pega/cosmos-react-core';
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Core/RadioButton',
|
|
5
5
|
component: RadioButton,
|
|
@@ -24,4 +24,54 @@ export const DefaultRadioButton = (args) => {
|
|
|
24
24
|
export const RadioButtonCard = (args) => {
|
|
25
25
|
return (_jsx(RadioButton, { variant: 'card', status: args.status, label: args.label, required: args.required, disabled: args.disabled, readOnly: args.readOnly }, void 0));
|
|
26
26
|
};
|
|
27
|
+
export const ConfigurableRadioButton = (args) => {
|
|
28
|
+
return (_jsx(Configuration, { theme: {
|
|
29
|
+
components: {
|
|
30
|
+
'radio-button': {
|
|
31
|
+
'border-radius': args.borderRadius
|
|
32
|
+
},
|
|
33
|
+
'radio-check': {
|
|
34
|
+
'border-color': args.borderColor,
|
|
35
|
+
'border-width': args.borderWidth,
|
|
36
|
+
'background-color': args.backgroundColor,
|
|
37
|
+
label: {
|
|
38
|
+
color: args.labelColor,
|
|
39
|
+
'font-weight': args.labelFontWeight
|
|
40
|
+
},
|
|
41
|
+
size: args.size,
|
|
42
|
+
':checked': {
|
|
43
|
+
'background-color': args.checkedBackgroundColor,
|
|
44
|
+
'border-color': args.checkedBorderColor
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}, children: _jsx(RadioButton, { label: 'Configurable Radio Button' }, void 0) }, void 0));
|
|
49
|
+
};
|
|
50
|
+
ConfigurableRadioButton.args = {
|
|
51
|
+
size: '1.25rem',
|
|
52
|
+
backgroundColor: '#ffffff',
|
|
53
|
+
borderColor: '#939393',
|
|
54
|
+
borderWidth: '0.0625rem',
|
|
55
|
+
borderRadius: '50%',
|
|
56
|
+
labelColor: '#000000',
|
|
57
|
+
labelFontWeight: '400',
|
|
58
|
+
checkedBackgroundColor: '#076bc9',
|
|
59
|
+
checkedBorderColor: '#076bc9'
|
|
60
|
+
};
|
|
61
|
+
ConfigurableRadioButton.argTypes = {
|
|
62
|
+
size: { control: { type: 'text' } },
|
|
63
|
+
backgroundColor: { control: { type: 'color' } },
|
|
64
|
+
borderColor: { control: { type: 'color' } },
|
|
65
|
+
borderWidth: { control: { type: 'text' } },
|
|
66
|
+
borderRadius: { control: { type: 'text' } },
|
|
67
|
+
labelColor: { control: { type: 'color' } },
|
|
68
|
+
labelFontWeight: { control: { type: 'text' } },
|
|
69
|
+
checkedBackgroundColor: { control: { type: 'color' } },
|
|
70
|
+
checkedBorderColor: { control: { type: 'color' } },
|
|
71
|
+
status: { table: { disable: true } },
|
|
72
|
+
label: { table: { disable: true } },
|
|
73
|
+
required: { table: { disable: true } },
|
|
74
|
+
disabled: { table: { disable: true } },
|
|
75
|
+
readOnly: { table: { disable: true } }
|
|
76
|
+
};
|
|
27
77
|
//# sourceMappingURL=RadioButton.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.stories.js","sourceRoot":"","sources":["../../../src/core/RadioButton/RadioButton.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAmB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioButton.stories.js","sourceRoot":"","sources":["../../../src/core/RadioButton/RadioButton.stories.tsx"],"names":[],"mappings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E,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC/C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC3C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC1C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC3C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC1C,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC9C,sBAAsB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACtD,kBAAkB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAClD,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACpC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACnC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, RadioButton, RadioCheckProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/RadioButton',\n component: RadioButton,\n args: {\n status: undefined,\n label: 'Choose me',\n required: false,\n disabled: false,\n readOnly: false\n },\n argTypes: {\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n label: { control: { type: 'text' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const DefaultRadioButton: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <RadioButton\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\nexport const RadioButtonCard: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <RadioButton\n variant='card'\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\ninterface ConfigurableRadioButtonProps extends RadioCheckProps {\n size?: string;\n backgroundColor?: string;\n borderColor?: string;\n borderWidth?: string;\n borderRadius?: string;\n labelColor?: string;\n labelFontWeight?: string;\n checkedBackgroundColor?: string;\n checkedBorderColor?: string;\n}\n\nexport const ConfigurableRadioButton: Story<ConfigurableRadioButtonProps> = (\n args: ConfigurableRadioButtonProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n 'radio-button': {\n 'border-radius': args.borderRadius\n },\n 'radio-check': {\n 'border-color': args.borderColor,\n 'border-width': args.borderWidth,\n 'background-color': args.backgroundColor,\n label: {\n color: args.labelColor,\n 'font-weight': args.labelFontWeight\n },\n size: args.size,\n ':checked': {\n 'background-color': args.checkedBackgroundColor,\n 'border-color': args.checkedBorderColor\n }\n }\n }\n }}\n >\n <RadioButton label='Configurable Radio Button' />\n </Configuration>\n );\n};\n\nConfigurableRadioButton.args = {\n size: '1.25rem',\n backgroundColor: '#ffffff',\n borderColor: '#939393',\n borderWidth: '0.0625rem',\n borderRadius: '50%',\n labelColor: '#000000',\n labelFontWeight: '400',\n checkedBackgroundColor: '#076bc9',\n checkedBorderColor: '#076bc9'\n};\n\nConfigurableRadioButton.argTypes = {\n size: { control: { type: 'text' } },\n backgroundColor: { control: { type: 'color' } },\n borderColor: { control: { type: 'color' } },\n borderWidth: { control: { type: 'text' } },\n borderRadius: { control: { type: 'text' } },\n labelColor: { control: { type: 'color' } },\n labelFontWeight: { control: { type: 'text' } },\n checkedBackgroundColor: { control: { type: 'color' } },\n checkedBorderColor: { control: { type: 'color' } },\n status: { table: { disable: true } },\n label: { table: { disable: true } },\n required: { table: { disable: true } },\n disabled: { table: { disable: true } },\n readOnly: { table: { disable: true } }\n};\n"]}
|
|
@@ -2,5 +2,12 @@ import { Meta, Story } from '@storybook/react';
|
|
|
2
2
|
import { RatingProps } from '@pega/cosmos-react-core';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
|
|
5
|
+
interface RatingStoryProps extends RatingProps {
|
|
6
|
+
ariaLabel?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const RatingDemo: Story<RatingStoryProps>;
|
|
9
|
+
interface ConfigurableRatingProps {
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const ConfigurableRating: Story<ConfigurableRatingProps>;
|
|
6
13
|
//# sourceMappingURL=Rating.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rating.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Rating/Rating.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,
|
|
1
|
+
{"version":3,"file":"Rating.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Rating/Rating.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAyB,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAE7E,wBAGU;AAEV,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,gBAAgB,CAU9C,CAAC;AAgBF,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,uBAAuB,CAqB7D,CAAC"}
|
|
@@ -1,22 +1,37 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Rating } from '@pega/cosmos-react-core';
|
|
2
|
+
import { Configuration, Rating } from '@pega/cosmos-react-core';
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Core/Rating',
|
|
5
5
|
component: Rating
|
|
6
6
|
};
|
|
7
7
|
export const RatingDemo = (args) => {
|
|
8
|
-
return (_jsx(Rating, { ...args, maxRating: args.maxRating, value: args.value, metaInfo: args.metaInfo, "aria-label": args
|
|
8
|
+
return (_jsx(Rating, { ...args, maxRating: args.maxRating, value: args.value, metaInfo: args.metaInfo, "aria-label": args.ariaLabel }, void 0));
|
|
9
9
|
};
|
|
10
10
|
RatingDemo.args = {
|
|
11
11
|
maxRating: 5,
|
|
12
12
|
value: 3.6,
|
|
13
13
|
metaInfo: '52 reviews',
|
|
14
|
-
|
|
14
|
+
ariaLabel: '3.6 out of 5 stars based on 52 reviews'
|
|
15
15
|
};
|
|
16
16
|
RatingDemo.argTypes = {
|
|
17
17
|
maxRating: { control: { type: 'number' } },
|
|
18
18
|
value: { control: { type: 'number' } },
|
|
19
19
|
metaInfo: { control: { type: 'text' } },
|
|
20
|
-
|
|
20
|
+
ariaLabel: { control: { type: 'text' } }
|
|
21
|
+
};
|
|
22
|
+
export const ConfigurableRating = (args) => {
|
|
23
|
+
return (_jsx(Configuration, { theme: {
|
|
24
|
+
components: {
|
|
25
|
+
rating: {
|
|
26
|
+
color: args.color
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}, children: _jsx(Rating, { maxRating: 5, value: 3.6, metaInfo: '52 reviews', "aria-label": '3.6 out of 5 stars based on 52 reviews' }, void 0) }, void 0));
|
|
30
|
+
};
|
|
31
|
+
ConfigurableRating.args = {
|
|
32
|
+
color: '#000000'
|
|
33
|
+
};
|
|
34
|
+
ConfigurableRating.argTypes = {
|
|
35
|
+
color: { control: { type: 'color' } }
|
|
21
36
|
};
|
|
22
37
|
//# sourceMappingURL=Rating.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rating.stories.js","sourceRoot":"","sources":["../../../src/core/Rating/Rating.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"Rating.stories.js","sourceRoot":"","sources":["../../../src/core/Rating/Rating.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAE7E,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AAMV,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,IAAsB,EAAE,EAAE;IAC5E,OAAO,CACL,KAAC,MAAM,OACD,IAAI,EACR,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,gBACX,IAAI,CAAC,SAAS,WAC1B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,IAAI,GAAG;IAChB,SAAS,EAAE,CAAC;IACZ,KAAK,EAAE,GAAG;IACV,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,wCAAwC;CACpD,CAAC;AAEF,UAAU,CAAC,QAAQ,GAAG;IACpB,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC1C,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IACtC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvC,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACzC,CAAC;AAMF,MAAM,CAAC,MAAM,kBAAkB,GAAmC,CAChE,IAA6B,EAC7B,EAAE;IACF,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE;YACL,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,KAAK,EAAE,IAAI,CAAC,KAAK;iBAClB;aACF;SACF,YAED,KAAC,MAAM,IACL,SAAS,EAAE,CAAC,EACZ,KAAK,EAAE,GAAG,EACV,QAAQ,EAAC,YAAY,gBACV,wCAAwC,WACnD,WACY,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAkB,CAAC,IAAI,GAAG;IACxB,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CACtC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, Rating, RatingProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Rating',\n component: Rating\n} as Meta;\n\ninterface RatingStoryProps extends RatingProps {\n ariaLabel?: string;\n}\n\nexport const RatingDemo: Story<RatingStoryProps> = (args: RatingStoryProps) => {\n return (\n <Rating\n {...args}\n maxRating={args.maxRating}\n value={args.value}\n metaInfo={args.metaInfo}\n aria-label={args.ariaLabel}\n />\n );\n};\n\nRatingDemo.args = {\n maxRating: 5,\n value: 3.6,\n metaInfo: '52 reviews',\n ariaLabel: '3.6 out of 5 stars based on 52 reviews'\n};\n\nRatingDemo.argTypes = {\n maxRating: { control: { type: 'number' } },\n value: { control: { type: 'number' } },\n metaInfo: { control: { type: 'text' } },\n ariaLabel: { control: { type: 'text' } }\n};\n\ninterface ConfigurableRatingProps {\n color?: string;\n}\n\nexport const ConfigurableRating: Story<ConfigurableRatingProps> = (\n args: ConfigurableRatingProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n rating: {\n color: args.color\n }\n }\n }}\n >\n <Rating\n maxRating={5}\n value={3.6}\n metaInfo='52 reviews'\n aria-label='3.6 out of 5 stars based on 52 reviews'\n />\n </Configuration>\n );\n};\n\nConfigurableRating.args = {\n color: '#000000'\n};\n\nConfigurableRating.argTypes = {\n color: { control: { type: 'color' } }\n};\n"]}
|
|
@@ -3,4 +3,8 @@ import { SearchInputProps } from '@pega/cosmos-react-core';
|
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const SearchInputDemo: Story<SearchInputProps>;
|
|
6
|
+
interface ConfigurableSearchInputProps {
|
|
7
|
+
borderRadius?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const ConfigurableSearchInput: Story<ConfigurableSearchInputProps>;
|
|
6
10
|
//# sourceMappingURL=SearchInput.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.stories.d.ts","sourceRoot":"","sources":["../../../src/core/SearchInput/SearchInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,
|
|
1
|
+
{"version":3,"file":"SearchInput.stories.d.ts","sourceRoot":"","sources":["../../../src/core/SearchInput/SearchInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA8B,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;;AAEvF,wBAGU;AAEV,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAEnD,CAAC;AAUF,UAAU,4BAA4B;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,4BAA4B,CAgBvE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { SearchInput } from '@pega/cosmos-react-core';
|
|
2
|
+
import { Configuration, SearchInput } from '@pega/cosmos-react-core';
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Core/SearchInput',
|
|
5
5
|
component: SearchInput
|
|
@@ -13,4 +13,19 @@ SearchInputDemo.args = {
|
|
|
13
13
|
SearchInputDemo.argTypes = {
|
|
14
14
|
placeholder: { control: { type: 'text' } }
|
|
15
15
|
};
|
|
16
|
+
export const ConfigurableSearchInput = (args) => {
|
|
17
|
+
return (_jsx(Configuration, { theme: {
|
|
18
|
+
components: {
|
|
19
|
+
'search-input': {
|
|
20
|
+
'border-radius': args.borderRadius
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}, children: _jsx(SearchInput, {}, void 0) }, void 0));
|
|
24
|
+
};
|
|
25
|
+
ConfigurableSearchInput.args = {
|
|
26
|
+
borderRadius: 9999
|
|
27
|
+
};
|
|
28
|
+
ConfigurableSearchInput.argTypes = {
|
|
29
|
+
borderRadius: { control: { type: 'number' } }
|
|
30
|
+
};
|
|
16
31
|
//# sourceMappingURL=SearchInput.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.stories.js","sourceRoot":"","sources":["../../../src/core/SearchInput/SearchInput.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAoB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchInput.stories.js","sourceRoot":"","sources":["../../../src/core/SearchInput/SearchInput.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAoB,MAAM,yBAAyB,CAAC;AAEvF,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;CACf,CAAC;AAEV,MAAM,CAAC,MAAM,eAAe,GAA4B,CAAC,IAAsB,EAAE,EAAE;IACjF,OAAO,KAAC,WAAW,OAAK,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,WAAI,CAAC;AAClE,CAAC,CAAC;AAEF,eAAe,CAAC,IAAI,GAAG;IACrB,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,eAAe,CAAC,QAAQ,GAAG;IACzB,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC3C,CAAC;AAMF,MAAM,CAAC,MAAM,uBAAuB,GAAwC,CAC1E,IAAkC,EAClC,EAAE;IACF,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE;YACL,UAAU,EAAE;gBACV,cAAc,EAAE;oBACd,eAAe,EAAE,IAAI,CAAC,YAAY;iBACnC;aACF;SACF,YAED,KAAC,WAAW,aAAG,WACD,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,uBAAuB,CAAC,IAAI,GAAG;IAC7B,YAAY,EAAE,IAAI;CACnB,CAAC;AAEF,uBAAuB,CAAC,QAAQ,GAAG;IACjC,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC9C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, SearchInput, SearchInputProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/SearchInput',\n component: SearchInput\n} as Meta;\n\nexport const SearchInputDemo: Story<SearchInputProps> = (args: SearchInputProps) => {\n return <SearchInput {...args} placeholder={args.placeholder} />;\n};\n\nSearchInputDemo.args = {\n placeholder: 'Search…'\n};\n\nSearchInputDemo.argTypes = {\n placeholder: { control: { type: 'text' } }\n};\n\ninterface ConfigurableSearchInputProps {\n borderRadius?: number;\n}\n\nexport const ConfigurableSearchInput: Story<ConfigurableSearchInputProps> = (\n args: ConfigurableSearchInputProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n 'search-input': {\n 'border-radius': args.borderRadius\n }\n }\n }}\n >\n <SearchInput />\n </Configuration>\n );\n};\n\nConfigurableSearchInput.args = {\n borderRadius: 9999\n};\n\nConfigurableSearchInput.argTypes = {\n borderRadius: { control: { type: 'number' } }\n};\n"]}
|