@pega/cosmos-react-demos 3.0.0-dev.4.2 → 3.0.0-dev.5.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/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/jsx/build/AppShell/AppShell.mocks.js.map +1 -1
- package/jsx/build/FlowModeller/FlowModeller.mocks.jsx +6 -6
- package/jsx/build/FlowModeller/FlowModeller.mocks.jsx.map +1 -1
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts +1 -5
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -1
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js +5 -10
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts +3 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.mocks.js +106 -18
- 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 +111 -27
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
- package/jsx/build/LifeCycle/utils.d.ts.map +1 -1
- package/jsx/build/LifeCycle/utils.js +5 -4
- package/jsx/build/LifeCycle/utils.js.map +1 -1
- package/jsx/core/CreditCard/CreditCard.stories.d.ts +10 -0
- package/jsx/core/CreditCard/CreditCard.stories.d.ts.map +1 -0
- package/jsx/core/CreditCard/CreditCard.stories.jsx +10 -0
- package/jsx/core/CreditCard/CreditCard.stories.jsx.map +1 -0
- package/jsx/core/SearchInput/SearchInput.mocks.d.ts +11 -0
- package/jsx/core/SearchInput/SearchInput.mocks.d.ts.map +1 -0
- package/jsx/core/SearchInput/SearchInput.mocks.js +25 -0
- package/jsx/core/SearchInput/SearchInput.mocks.js.map +1 -0
- package/jsx/core/SearchInput/SearchInput.stories.d.ts +1 -0
- package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx +28 -0
- package/jsx/core/SearchInput/SearchInput.stories.jsx.map +1 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.jsx.map +1 -1
- package/jsx/social/Email/Email.mocks.d.ts +3 -3
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
- package/jsx/social/Email/Email.mocks.jsx +17 -7
- package/jsx/social/Email/Email.mocks.jsx.map +1 -1
- package/jsx/social/Email/Email.stories.d.ts.map +1 -1
- package/jsx/social/Email/Email.stories.jsx +11 -24
- package/jsx/social/Email/Email.stories.jsx.map +1 -1
- package/jsx/social/Feed/Feed.mocks.d.ts.map +1 -1
- package/jsx/social/Feed/Feed.mocks.jsx.map +1 -1
- package/jsx/work/Glimpse/Glimpse.stories.d.ts.map +1 -1
- package/jsx/work/Glimpse/Glimpse.stories.jsx.map +1 -1
- package/lib/build/AppHeader/AppHeader.stories.js +1 -1
- package/lib/build/AppHeader/AppHeader.stories.js.map +1 -1
- package/lib/build/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.mocks.js.map +1 -1
- package/lib/build/AppShell/AppShell.stories.js +4 -4
- package/lib/build/AppShell/AppShell.stories.js.map +1 -1
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js +2 -2
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js.map +1 -1
- package/lib/build/DynamicContentEditor/FieldSelector.js +1 -1
- package/lib/build/DynamicContentEditor/FieldSelector.js.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.mocks.js +11 -11
- package/lib/build/FlowModeller/FlowModeller.mocks.js.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.stories.js +6 -6
- package/lib/build/FlowModeller/FlowModeller.stories.js.map +1 -1
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts +1 -5
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -1
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js +5 -10
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -1
- package/lib/build/ItemLibrary/LibraryPicker.stories.js +1 -1
- package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.mocks.d.ts +3 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.mocks.js +106 -18
- 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 +115 -31
- package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
- package/lib/build/LifeCycle/utils.d.ts.map +1 -1
- package/lib/build/LifeCycle/utils.js +5 -4
- package/lib/build/LifeCycle/utils.js.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js +6 -6
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.stories.js +5 -5
- package/lib/build/ObjectSelect/ObjectSelect.stories.js.map +1 -1
- package/lib/build/PageTemplates/GalleryPage.mocks.js +1 -1
- package/lib/build/PageTemplates/GalleryPage.mocks.js.map +1 -1
- package/lib/build/PageTemplates/GalleryPage.stories.js +2 -2
- package/lib/build/PageTemplates/GalleryPage.stories.js.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.mocks.js +3 -3
- package/lib/build/PageTemplates/PageTemplates.mocks.js.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.js +14 -14
- package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/build/Workbench/Workbench.stories.js +11 -11
- package/lib/build/Workbench/Workbench.stories.js.map +1 -1
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js +7 -7
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js.map +1 -1
- package/lib/core/AppShell/AppShell.mocks.js +5 -5
- package/lib/core/AppShell/AppShell.mocks.js.map +1 -1
- package/lib/core/AppShell/AppShell.stories.js +8 -8
- package/lib/core/AppShell/AppShell.stories.js.map +1 -1
- package/lib/core/Avatar/Avatar.stories.js +6 -6
- package/lib/core/Avatar/Avatar.stories.js.map +1 -1
- package/lib/core/Backdrop/Backdrop.stories.js +2 -2
- package/lib/core/Backdrop/Backdrop.stories.js.map +1 -1
- package/lib/core/Badges/Alert.stories.js +1 -1
- package/lib/core/Badges/Alert.stories.js.map +1 -1
- package/lib/core/Badges/Count.stories.js +1 -1
- package/lib/core/Badges/Count.stories.js.map +1 -1
- package/lib/core/Badges/Selection.stories.js +1 -1
- package/lib/core/Badges/Selection.stories.js.map +1 -1
- package/lib/core/Badges/Status.stories.js +2 -2
- package/lib/core/Badges/Status.stories.js.map +1 -1
- package/lib/core/Badges/Tag.stories.js +1 -1
- package/lib/core/Badges/Tag.stories.js.map +1 -1
- package/lib/core/Banner/Banner.mocks.js +1 -1
- package/lib/core/Banner/Banner.mocks.js.map +1 -1
- package/lib/core/Banner/Banner.stories.js +11 -11
- package/lib/core/Banner/Banner.stories.js.map +1 -1
- package/lib/core/Boolean/BooleanDisplay.stories.js +1 -1
- package/lib/core/Boolean/BooleanDisplay.stories.js.map +1 -1
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.js +2 -2
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.js.map +1 -1
- package/lib/core/Button/Button.stories.js +7 -7
- package/lib/core/Button/Button.stories.js.map +1 -1
- package/lib/core/Card/Card.stories.js +4 -4
- package/lib/core/Card/Card.stories.js.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.js +3 -3
- package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js +3 -3
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js.map +1 -1
- package/lib/core/ColorPicker/ColorPicker.stories.js +5 -5
- package/lib/core/ColorPicker/ColorPicker.stories.js.map +1 -1
- package/lib/core/ComboBox/ComboBox.stories.js +6 -6
- package/lib/core/ComboBox/ComboBox.stories.js.map +1 -1
- package/lib/core/Configuration/Configuration.mocks.js +1 -1
- package/lib/core/Configuration/Configuration.mocks.js.map +1 -1
- package/lib/core/Configuration/Configuration.stories.js +10 -10
- package/lib/core/Configuration/Configuration.stories.js.map +1 -1
- package/lib/core/CreditCard/CreditCard.stories.d.ts +10 -0
- package/lib/core/CreditCard/CreditCard.stories.d.ts.map +1 -0
- package/lib/core/CreditCard/CreditCard.stories.js +11 -0
- package/lib/core/CreditCard/CreditCard.stories.js.map +1 -0
- package/lib/core/Currency/Currency.stories.js +2 -2
- package/lib/core/Currency/Currency.stories.js.map +1 -1
- package/lib/core/DateTime/DateTime.stories.js +9 -9
- package/lib/core/DateTime/DateTime.stories.js.map +1 -1
- package/lib/core/DateTime/DateTimeDisplay.stories.js +2 -2
- package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -1
- package/lib/core/DateTime/DateTimePicker.stories.js +2 -2
- package/lib/core/DateTime/DateTimePicker.stories.js.map +1 -1
- package/lib/core/Drawer/Drawer.stories.js +4 -4
- package/lib/core/Drawer/Drawer.stories.js.map +1 -1
- package/lib/core/Email/EmailDisplay.stories.js +1 -1
- package/lib/core/Email/EmailDisplay.stories.js.map +1 -1
- package/lib/core/EmojiPicker/EmojiPicker.stories.js +3 -3
- package/lib/core/EmojiPicker/EmojiPicker.stories.js.map +1 -1
- package/lib/core/EmptyState/EmptyState.stories.js +1 -1
- package/lib/core/EmptyState/EmptyState.stories.js.map +1 -1
- package/lib/core/ErrorState/ErrorState.stories.js +1 -1
- package/lib/core/ErrorState/ErrorState.stories.js.map +1 -1
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.js +2 -2
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.js +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.js +7 -7
- package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.js +10 -10
- package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
- package/lib/core/FieldValueList/FieldValueList.stories.js +4 -4
- package/lib/core/FieldValueList/FieldValueList.stories.js.map +1 -1
- package/lib/core/File/FileDisplay.stories.js +10 -10
- package/lib/core/File/FileDisplay.stories.js.map +1 -1
- package/lib/core/File/FileInput.stories.js +2 -2
- package/lib/core/File/FileInput.stories.js.map +1 -1
- package/lib/core/Flex/FlexContainer.stories.js +7 -7
- package/lib/core/Flex/FlexContainer.stories.js.map +1 -1
- package/lib/core/Flex/FlexItem.stories.js +3 -3
- package/lib/core/Flex/FlexItem.stories.js.map +1 -1
- package/lib/core/Form/Form.mocks.js +3 -3
- package/lib/core/Form/Form.mocks.js.map +1 -1
- package/lib/core/Form/Form.stories.js +8 -8
- package/lib/core/Form/Form.stories.js.map +1 -1
- package/lib/core/Grid/GridContainer.stories.js +9 -9
- package/lib/core/Grid/GridContainer.stories.js.map +1 -1
- package/lib/core/Grid/GridItem.stories.js +3 -3
- package/lib/core/Grid/GridItem.stories.js.map +1 -1
- package/lib/core/HTML/HTML.stories.js +1 -1
- package/lib/core/HTML/HTML.stories.js.map +1 -1
- package/lib/core/Icon/Icon.mocks.js +1 -1
- package/lib/core/Icon/Icon.mocks.js.map +1 -1
- package/lib/core/Icon/Icon.stories.js +6 -6
- package/lib/core/Icon/Icon.stories.js.map +1 -1
- package/lib/core/IconPicker/IconPicker.stories.js +1 -1
- package/lib/core/IconPicker/IconPicker.stories.js.map +1 -1
- package/lib/core/Image/Image.stories.js +1 -1
- package/lib/core/Image/Image.stories.js.map +1 -1
- package/lib/core/Input/Input.stories.js +2 -2
- package/lib/core/Input/Input.stories.js.map +1 -1
- package/lib/core/Label/Label.stories.js +2 -2
- package/lib/core/Label/Label.stories.js.map +1 -1
- package/lib/core/Lightbox/Lightbox.stories.js +3 -3
- package/lib/core/Lightbox/Lightbox.stories.js.map +1 -1
- package/lib/core/Link/Link.stories.js +3 -3
- package/lib/core/Link/Link.stories.js.map +1 -1
- package/lib/core/List/CommaSeparatedList.stories.js +1 -1
- package/lib/core/List/CommaSeparatedList.stories.js.map +1 -1
- package/lib/core/List/OrderedList.stories.js +1 -1
- package/lib/core/List/OrderedList.stories.js.map +1 -1
- package/lib/core/List/UnorderedList.stories.js +1 -1
- package/lib/core/List/UnorderedList.stories.js.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.mocks.js +5 -5
- package/lib/core/ListToolbar/ListToolbar.mocks.js.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.stories.js +2 -2
- package/lib/core/ListToolbar/ListToolbar.stories.js.map +1 -1
- package/lib/core/Location/Location.stories.js +4 -4
- package/lib/core/Location/Location.stories.js.map +1 -1
- package/lib/core/Menu/Menu.stories.js +5 -5
- package/lib/core/Menu/Menu.stories.js.map +1 -1
- package/lib/core/MenuButton/MenuButton.stories.js +9 -9
- package/lib/core/MenuButton/MenuButton.stories.js.map +1 -1
- package/lib/core/MetaList/MetaList.stories.js +3 -3
- package/lib/core/MetaList/MetaList.stories.js.map +1 -1
- package/lib/core/Modal/Modal.mocks.js +8 -8
- package/lib/core/Modal/Modal.mocks.js.map +1 -1
- package/lib/core/Modal/Modal.stories.js +29 -29
- package/lib/core/Modal/Modal.stories.js.map +1 -1
- package/lib/core/MultiStep/MultiStep.stories.js +3 -3
- package/lib/core/MultiStep/MultiStep.stories.js.map +1 -1
- package/lib/core/Number/Number.stories.js +3 -3
- package/lib/core/Number/Number.stories.js.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.js +27 -27
- package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/core/Pagination/Pagination.stories.js +1 -1
- package/lib/core/Pagination/Pagination.stories.js.map +1 -1
- package/lib/core/Paragraph/ParagraphDisplay.stories.js +1 -1
- package/lib/core/Paragraph/ParagraphDisplay.stories.js.map +1 -1
- package/lib/core/Phone/Phone.stories.js +2 -2
- package/lib/core/Phone/Phone.stories.js.map +1 -1
- package/lib/core/Popover/Popover.stories.js +2 -2
- package/lib/core/Popover/Popover.stories.js.map +1 -1
- package/lib/core/Progress/Progress.stories.js +3 -3
- package/lib/core/Progress/Progress.stories.js.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.js +3 -3
- package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js +3 -3
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js.map +1 -1
- package/lib/core/Rating/Rating.stories.js +2 -2
- package/lib/core/Rating/Rating.stories.js.map +1 -1
- package/lib/core/SearchInput/SearchInput.mocks.d.ts +11 -0
- package/lib/core/SearchInput/SearchInput.mocks.d.ts.map +1 -0
- package/lib/core/SearchInput/SearchInput.mocks.js +25 -0
- package/lib/core/SearchInput/SearchInput.mocks.js.map +1 -0
- package/lib/core/SearchInput/SearchInput.stories.d.ts +1 -0
- package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/lib/core/SearchInput/SearchInput.stories.js +30 -2
- package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
- package/lib/core/Select/Select.stories.js +2 -2
- package/lib/core/Select/Select.stories.js.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.js +2 -2
- package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
- package/lib/core/Slider/Slider.stories.js +1 -1
- package/lib/core/Slider/Slider.stories.js.map +1 -1
- package/lib/core/SummaryItem/SummaryItem.stories.js +4 -4
- package/lib/core/SummaryItem/SummaryItem.stories.js.map +1 -1
- package/lib/core/SummaryList/SummaryList.mocks.js +2 -2
- package/lib/core/SummaryList/SummaryList.mocks.js.map +1 -1
- package/lib/core/SummaryList/SummaryList.stories.js +5 -5
- package/lib/core/SummaryList/SummaryList.stories.js.map +1 -1
- package/lib/core/Switch/Switch.stories.js +3 -3
- package/lib/core/Switch/Switch.stories.js.map +1 -1
- package/lib/core/Table/Table.mocks.js +1 -1
- package/lib/core/Table/Table.mocks.js.map +1 -1
- package/lib/core/Table/Table.stories.js +9 -9
- package/lib/core/Table/Table.stories.js.map +1 -1
- package/lib/core/Tabs/Tabs.stories.js +3 -3
- package/lib/core/Tabs/Tabs.stories.js.map +1 -1
- package/lib/core/Text/Text.stories.js +2 -2
- package/lib/core/Text/Text.stories.js.map +1 -1
- package/lib/core/TextArea/TextArea.stories.js +2 -2
- package/lib/core/TextArea/TextArea.stories.js.map +1 -1
- package/lib/core/Toaster/Toaster.stories.js +2 -2
- package/lib/core/Toaster/Toaster.stories.js.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.js +2 -2
- package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
- package/lib/core/Tree/Tree.stories.js +3 -3
- package/lib/core/Tree/Tree.stories.js.map +1 -1
- package/lib/core/URL/URL.stories.js +1 -1
- package/lib/core/URL/URL.stories.js.map +1 -1
- package/lib/cs/Article/Article.stories.js +9 -9
- package/lib/cs/Article/Article.stories.js.map +1 -1
- package/lib/cs/ArticleList/ArticleList.stories.js +11 -11
- package/lib/cs/ArticleList/ArticleList.stories.js.map +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.js +12 -12
- package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
- package/lib/cs/CSCaseView/CSCaseView.mocks.js +3 -3
- package/lib/cs/CSCaseView/CSCaseView.mocks.js.map +1 -1
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js +2 -2
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js.map +1 -1
- package/lib/cs/DialPad/DialPad.stories.js +1 -1
- package/lib/cs/DialPad/DialPad.stories.js.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +15 -15
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js +1 -1
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js.map +1 -1
- package/lib/cs/InteractionTimer/InteractionTimer.stories.js +1 -1
- package/lib/cs/InteractionTimer/InteractionTimer.stories.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.js +8 -8
- package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
- package/lib/dnd/DragDropList/DragDropList.mocks.js +2 -2
- package/lib/dnd/DragDropList/DragDropList.mocks.js.map +1 -1
- package/lib/dnd/DragDropList/DragDropList.stories.js +4 -4
- package/lib/dnd/DragDropList/DragDropList.stories.js.map +1 -1
- package/lib/rte/Editor/Editor.mocks.js +2 -2
- package/lib/rte/Editor/Editor.mocks.js.map +1 -1
- package/lib/rte/Editor/Editor.stories.js +6 -6
- package/lib/rte/Editor/Editor.stories.js.map +1 -1
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.js +5 -5
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.js.map +1 -1
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js +5 -5
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -1
- package/lib/rte/RichTextEditor/RichTextViewer.stories.js +5 -5
- package/lib/rte/RichTextEditor/RichTextViewer.stories.js.map +1 -1
- package/lib/social/Chat/Chat.stories.js +27 -27
- package/lib/social/Chat/Chat.stories.js.map +1 -1
- package/lib/social/Chat/RepeatingView.stories.js +2 -2
- package/lib/social/Chat/RepeatingView.stories.js.map +1 -1
- package/lib/social/Email/Email.mocks.d.ts +3 -3
- package/lib/social/Email/Email.mocks.d.ts.map +1 -1
- package/lib/social/Email/Email.mocks.js +21 -10
- 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 +24 -36
- package/lib/social/Email/Email.stories.js.map +1 -1
- package/lib/social/Feed/Feed.mocks.d.ts.map +1 -1
- package/lib/social/Feed/Feed.mocks.js +40 -40
- package/lib/social/Feed/Feed.mocks.js.map +1 -1
- package/lib/social/Feed/Feed.stories.js +6 -6
- package/lib/social/Feed/Feed.stories.js.map +1 -1
- package/lib/social/Feed/FeedNewPost.stories.js +2 -2
- package/lib/social/Feed/FeedNewPost.stories.js.map +1 -1
- package/lib/social/Feed/FeedPost.stories.js +8 -8
- package/lib/social/Feed/FeedPost.stories.js.map +1 -1
- package/lib/social/Feed/FeedReply.stories.js +5 -5
- package/lib/social/Feed/FeedReply.stories.js.map +1 -1
- package/lib/social/Feed/FeedReplyInput.stories.js +2 -2
- package/lib/social/Feed/FeedReplyInput.stories.js.map +1 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js +1 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js.map +1 -1
- package/lib/work/CaseView/Attachments.mocks.js +15 -15
- package/lib/work/CaseView/Attachments.mocks.js.map +1 -1
- package/lib/work/CaseView/CaseView.mocks.js +7 -7
- package/lib/work/CaseView/CaseView.mocks.js.map +1 -1
- package/lib/work/CaseView/CaseView.stories.js +21 -21
- package/lib/work/CaseView/CaseView.stories.js.map +1 -1
- package/lib/work/CaseView/Details.mocks.js +1 -1
- package/lib/work/CaseView/Details.mocks.js.map +1 -1
- package/lib/work/CaseView/FileService.mock.js +1 -1
- package/lib/work/CaseView/FileService.mock.js.map +1 -1
- package/lib/work/CaseView/MobileCaseView.stories.js +1 -1
- package/lib/work/CaseView/MobileCaseView.stories.js.map +1 -1
- package/lib/work/CaseView/Pulse.mocks.js +2 -2
- package/lib/work/CaseView/Pulse.mocks.js.map +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.js +21 -21
- package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.js.map +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js +2 -2
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js.map +1 -1
- package/lib/work/Confirmation/Confirmation.stories.js +2 -2
- package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
- package/lib/work/Details/Details.stories.js +15 -15
- package/lib/work/Details/Details.stories.js.map +1 -1
- package/lib/work/Glimpse/Glimpse.stories.d.ts.map +1 -1
- package/lib/work/Glimpse/Glimpse.stories.js +3 -3
- package/lib/work/Glimpse/Glimpse.stories.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.mocks.js +4 -4
- package/lib/work/SearchResults/SearchResults.mocks.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js +11 -11
- package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
- package/lib/work/Stages/Stages.stories.js +2 -2
- package/lib/work/Stages/Stages.stories.js.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.mocks.js +2 -2
- package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.stories.js +1 -1
- package/lib/work/Stakeholders/Stakeholders.stories.js.map +1 -1
- package/lib/work/Tags/Tags.stories.js +1 -1
- package/lib/work/Tags/Tags.stories.js.map +1 -1
- package/lib/work/Tasks/TaskList.stories.js +3 -3
- package/lib/work/Tasks/TaskList.stories.js.map +1 -1
- package/lib/work/Tasks/Tasks.stories.js +11 -11
- package/lib/work/Tasks/Tasks.stories.js.map +1 -1
- package/lib/work/Timeline/Timeline.mocks.js +8 -8
- package/lib/work/Timeline/Timeline.mocks.js.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 +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.stories.js","sourceRoot":"","sources":["../../../src/core/Badges/Tag.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAE9C,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,GAAG;CACP,CAAC;AAEV,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,OAAO,KAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"Tag.stories.js","sourceRoot":"","sources":["../../../src/core/Badges/Tag.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAE9C,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,GAAG;CACP,CAAC;AAEV,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,OAAO,KAAC,GAAG,8BAAkB,CAAC;AAChC,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\n\nimport { Tag } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Badges/Tag',\n component: Tag\n} as Meta;\n\nexport const TagBadge = () => {\n return <Tag>#PegaCosmos</Tag>;\n};\n"]}
|
|
@@ -23,7 +23,7 @@ export const demoFields = [
|
|
|
23
23
|
validator: (value) => value === 'Field 3'
|
|
24
24
|
}
|
|
25
25
|
];
|
|
26
|
-
export const formActions = (_jsxs(_Fragment, { children: [_jsx(Button, { name: 'Cancel', variant: 'secondary', children: "Cancel" }
|
|
26
|
+
export const formActions = (_jsxs(_Fragment, { children: [_jsx(Button, { name: 'Cancel', variant: 'secondary', children: "Cancel" }), _jsx(Button, { name: 'Submit', type: 'submit', variant: 'primary', children: "Submit" })] }));
|
|
27
27
|
// Handles setting of state for all fields
|
|
28
28
|
export const fieldReducer = (fields, inputEl) => {
|
|
29
29
|
return fields.map(field => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.mocks.js","sourceRoot":"","sources":["../../../src/core/Banner/Banner.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAUjD,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,mCAAmC;QACzC,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS;KAClD;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,mCAAmC;QACzC,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS;KAClD;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,mCAAmC;QACzC,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS;KAClD;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,8BACE,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,WAAW
|
|
1
|
+
{"version":3,"file":"Banner.mocks.js","sourceRoot":"","sources":["../../../src/core/Banner/Banner.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAUjD,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,mCAAmC;QACzC,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS;KAClD;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,mCAAmC;QACzC,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS;KAClD;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,mCAAmC;QACzC,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS;KAClD;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,8BACE,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,WAAW,uBAEhC,EACT,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,SAAS,uBAE5C,IACR,CACJ,CAAC;AAEF,0CAA0C;AAC1C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAuB,EAAE,OAAY,EAAE,EAAE;IACpE,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QACxB,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,EAAE;YAC/B,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;SAC7B;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { Button } from '@pega/cosmos-react-core';\n\nexport interface DemoFormField {\n name: string;\n label: string;\n info: string;\n value: string;\n validator: (value: string) => boolean;\n}\n\nexport const demoFields = [\n {\n name: 'field-1',\n label: 'Field 1',\n info: 'Hint: type exact label text above',\n value: '',\n validator: (value: string) => value === 'Field 1'\n },\n {\n name: 'field-2',\n label: 'Field 2',\n info: 'Hint: type exact label text above',\n value: '',\n validator: (value: string) => value === 'Field 2'\n },\n {\n name: 'field-3',\n label: 'Field 3',\n info: 'Hint: type exact label text above',\n value: '',\n validator: (value: string) => value === 'Field 3'\n }\n];\n\nexport const formActions = (\n <>\n <Button name='Cancel' variant='secondary'>\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary'>\n Submit\n </Button>\n </>\n);\n\n// Handles setting of state for all fields\nexport const fieldReducer = (fields: DemoFormField[], inputEl: any) => {\n return fields.map(field => {\n if (inputEl.name === field.name) {\n field.value = inputEl.value;\n }\n return field;\n });\n};\n"]}
|
|
@@ -10,19 +10,19 @@ export default {
|
|
|
10
10
|
};
|
|
11
11
|
export const SuccessBanner = () => {
|
|
12
12
|
const [showBanner, setShowBanner] = useState(true);
|
|
13
|
-
return (_jsxs(_Fragment, { children: [!showBanner && _jsx(Button, { onClick: () => setShowBanner(true), children: "Open banner" }
|
|
13
|
+
return (_jsxs(_Fragment, { children: [!showBanner && _jsx(Button, { onClick: () => setShowBanner(true), children: "Open banner" }), showBanner && (_jsx(Banner, { id: 'success', variant: 'success', onDismiss: () => setShowBanner(false), heading: '2 items uploaded successfully', messages: ['pega_data.json', 'business-earnings.xlsx'] }))] }));
|
|
14
14
|
};
|
|
15
15
|
export const ErrorBanner = () => {
|
|
16
|
-
return (_jsx(Banner, { id: 'error', variant: 'urgent', heading: 'Error', action: _jsx("div", { children: _jsx(Button, { variant: 'link', children: "Try again" }
|
|
16
|
+
return (_jsx(Banner, { id: 'error', variant: 'urgent', heading: 'Error', action: _jsx("div", { children: _jsx(Button, { variant: 'link', children: "Try again" }) }), messages: ['Your request failed to send!', 'Please review your request and try again'] }));
|
|
17
17
|
};
|
|
18
18
|
export const WarningBanner = () => {
|
|
19
|
-
return (_jsx(Banner, { id: 'warning', variant: 'warning', action: _jsx("div", { children: _jsx(Button, { variant: 'link', children: "Why this matters" }
|
|
19
|
+
return (_jsx(Banner, { id: 'warning', variant: 'warning', action: _jsx("div", { children: _jsx(Button, { variant: 'link', children: "Why this matters" }) }), messages: ['Your submission is missing some important documents.'] }));
|
|
20
20
|
};
|
|
21
21
|
export const InfoBanner = () => {
|
|
22
22
|
const [showBanner, setShowBanner] = useState(true);
|
|
23
|
-
return (_jsxs(_Fragment, { children: [!showBanner && _jsx(Button, { onClick: () => setShowBanner(true), children: "Open banner" }
|
|
23
|
+
return (_jsxs(_Fragment, { children: [!showBanner && _jsx(Button, { onClick: () => setShowBanner(true), children: "Open banner" }), showBanner && (_jsx(Banner, { id: 'info', variant: 'info', onDismiss: () => setShowBanner(false), messages: [
|
|
24
24
|
'US-123456 is currently being modified by Jane Smith and may not be edited simultaneously.'
|
|
25
|
-
] }
|
|
25
|
+
] }))] }));
|
|
26
26
|
};
|
|
27
27
|
export const ConfigurableErrorBanner = (args) => {
|
|
28
28
|
return (_jsx(Configuration, { theme: {
|
|
@@ -33,7 +33,7 @@ export const ConfigurableErrorBanner = (args) => {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
}, children: _jsx(Banner, { id: 'error', variant: 'urgent', heading: 'Error', action: _jsx("div", { children: _jsx(Button, { variant: 'link', children: "Try again" }
|
|
36
|
+
}, children: _jsx(Banner, { id: 'error', variant: 'urgent', heading: 'Error', action: _jsx("div", { children: _jsx(Button, { variant: 'link', children: "Try again" }) }), messages: ['Your request failed to send!', 'Please review your request and try again'] }) }));
|
|
37
37
|
};
|
|
38
38
|
ConfigurableErrorBanner.args = {
|
|
39
39
|
background: '#d91c29'
|
|
@@ -58,7 +58,7 @@ export const ShownInForm = () => {
|
|
|
58
58
|
heading = "I'm sorry you're having trouble";
|
|
59
59
|
variant = 'urgent';
|
|
60
60
|
messages = errorFields.map(f => `${f.name} was not typed correctly`);
|
|
61
|
-
bannerAction = (_jsx(Link, { href: 'https://community.pega.com/support', target: '_blank', children: "Visit Pega support for assistance" }
|
|
61
|
+
bannerAction = (_jsx(Link, { href: 'https://community.pega.com/support', target: '_blank', children: "Visit Pega support for assistance" }));
|
|
62
62
|
}
|
|
63
63
|
setBanner(_jsx(Banner, { ...{
|
|
64
64
|
heading,
|
|
@@ -69,18 +69,18 @@ export const ShownInForm = () => {
|
|
|
69
69
|
onDismiss() {
|
|
70
70
|
setBanner(false);
|
|
71
71
|
}
|
|
72
|
-
} }
|
|
72
|
+
} }));
|
|
73
73
|
}, []);
|
|
74
74
|
return (_jsx(Form, { banners: banner, actions: formActions, onSubmit: onSubmit, style: { margin: 'auto', padding: '2.5rem', maxWidth: '37.5rem' }, children: fields.map((field) => {
|
|
75
75
|
return (_jsx(Input, { autoComplete: 'off', name: field.name, label: field.label, info: field.info, value: field.value, onChange: (e) => setField(e.target) }, field.name));
|
|
76
|
-
}) }
|
|
76
|
+
}) }));
|
|
77
77
|
};
|
|
78
78
|
// -----------------------------------------------------------------------------
|
|
79
79
|
// CaseView story
|
|
80
80
|
// -----------------------------------------------------------------------------
|
|
81
81
|
export const ShownInCaseView = () => {
|
|
82
82
|
const [hasBanner, setHasBanner] = useState(true);
|
|
83
|
-
return (_jsx(CaseViewDemo, { banners: hasBanner && (_jsx(Banner, { id: 'case-view-error', heading: 'Waring', onDismiss: () => setHasBanner(false), variant: 'warning', messages: ['Your submission is missing some important documents.'] }
|
|
83
|
+
return (_jsx(CaseViewDemo, { banners: hasBanner && (_jsx(Banner, { id: 'case-view-error', heading: 'Waring', onDismiss: () => setHasBanner(false), variant: 'warning', messages: ['Your submission is missing some important documents.'] })) }));
|
|
84
84
|
};
|
|
85
85
|
ShownInCaseView.parameters = {
|
|
86
86
|
layout: 'fullscreen'
|
|
@@ -90,7 +90,7 @@ ShownInCaseView.parameters = {
|
|
|
90
90
|
// -----------------------------------------------------------------------------
|
|
91
91
|
export const ShownInAppShell = () => {
|
|
92
92
|
const [hasBanner, setHasBanner] = useState([]);
|
|
93
|
-
return (_jsx(AppShellDemo, { banners: hasBanner && (_jsx(Banner, { id: 'app-shell-banner-success', heading: '2 items uploaded successfully', onDismiss: () => setHasBanner([]), variant: 'success', messages: ['pega_data.json', 'business-earnings.xlsx'], action: _jsx(Link, { target: '_blank', href: 'https://www.pega.com', children: "Link Here!" }
|
|
93
|
+
return (_jsx(AppShellDemo, { banners: hasBanner && (_jsx(Banner, { id: 'app-shell-banner-success', heading: '2 items uploaded successfully', onDismiss: () => setHasBanner([]), variant: 'success', messages: ['pega_data.json', 'business-earnings.xlsx'], action: _jsx(Link, { target: '_blank', href: 'https://www.pega.com', children: "Link Here!" }) })) }));
|
|
94
94
|
};
|
|
95
95
|
ShownInAppShell.parameters = {
|
|
96
96
|
layout: 'fullscreen'
|
|
@@ -1 +1 @@
|
|
|
1
|
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IACL,EAAE,EAAC,iBAAiB,EACpB,OAAO,EAAC,QAAQ,EAChB,SAAS,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EACpC,OAAO,EAAC,SAAS,EACjB,QAAQ,EAAE,CAAC,sDAAsD,CAAC,WAClE,CACH,WAEH,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,CAAC,UAAU,GAAG;IAC3B,MAAM,EAAE,YAAY;CACrB,CAAC;AAEF,gFAAgF;AAChF,iBAAiB;AACjB,gFAAgF;AAChF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC/C,OAAO,CACL,KAAC,YAAY,IACX,OAAO,EACL,SAAS,IAAI,CACX,KAAC,MAAM,IACL,EAAE,EAAC,0BAA0B,EAC7B,OAAO,EAAC,+BAA+B,EACvC,SAAS,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,EACjC,OAAO,EAAC,SAAS,EACjB,QAAQ,EAAE,CAAC,gBAAgB,EAAE,wBAAwB,CAAC,EACtD,MAAM,EACJ,KAAC,IAAI,IAAC,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,sBAAsB,mCAE1C,WAET,CACH,WAEH,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,CAAC,UAAU,GAAG;IAC3B,MAAM,EAAE,YAAY;CACrB,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, useCallback, FormEvent, useReducer } from 'react';\n\nimport { Banner, Button, Configuration, Form, Input, Link } from '@pega/cosmos-react-core';\n\nimport { AppShellDemo } from '../AppShell/AppShell.stories';\nimport { CaseViewDemo } from '../../work/CaseView/CaseView.stories';\n\nimport { demoFields, DemoFormField, fieldReducer, formActions } from './Banner.mocks';\n\nexport default {\n title: 'Core/Banner',\n component: Banner\n} as Meta;\n\nexport const SuccessBanner = () => {\n const [showBanner, setShowBanner] = useState(true);\n\n return (\n <>\n {!showBanner && <Button onClick={() => setShowBanner(true)}>Open banner</Button>}\n {showBanner && (\n <Banner\n id='success'\n variant='success'\n onDismiss={() => setShowBanner(false)}\n heading='2 items uploaded successfully'\n messages={['pega_data.json', 'business-earnings.xlsx']}\n />\n )}\n </>\n );\n};\n\nexport const ErrorBanner = () => {\n return (\n <Banner\n id='error'\n variant='urgent'\n heading='Error'\n action={\n <div>\n <Button variant='link'>Try again</Button>\n </div>\n }\n messages={['Your request failed to send!', 'Please review your request and try again']}\n />\n );\n};\n\nexport const WarningBanner = () => {\n return (\n <Banner\n id='warning'\n variant='warning'\n action={\n <div>\n <Button variant='link'>Why this matters</Button>\n </div>\n }\n messages={['Your submission is missing some important documents.']}\n />\n );\n};\n\nexport const InfoBanner = () => {\n const [showBanner, setShowBanner] = useState(true);\n\n return (\n <>\n {!showBanner && <Button onClick={() => setShowBanner(true)}>Open banner</Button>}\n {showBanner && (\n <Banner\n id='info'\n variant='info'\n onDismiss={() => setShowBanner(false)}\n messages={[\n 'US-123456 is currently being modified by Jane Smith and may not be edited simultaneously.'\n ]}\n />\n )}\n </>\n );\n};\n\ninterface ConfigurableErrorBannerProps {\n background?: string;\n}\n\nexport const ConfigurableErrorBanner: Story<ConfigurableErrorBannerProps> = (\n args: ConfigurableErrorBannerProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n banner: {\n urgent: {\n background: args.background\n }\n }\n }\n }}\n >\n <Banner\n id='error'\n variant='urgent'\n heading='Error'\n action={\n <div>\n <Button variant='link'>Try again</Button>\n </div>\n }\n messages={['Your request failed to send!', 'Please review your request and try again']}\n />\n </Configuration>\n );\n};\n\nConfigurableErrorBanner.args = {\n background: '#d91c29'\n};\n\nConfigurableErrorBanner.argTypes = {\n background: { control: { type: 'color' } }\n};\n\n// -----------------------------------------------------------------------------\n// Form story\n// -----------------------------------------------------------------------------\n\nexport const ShownInForm = () => {\n const [fields, setField] = useReducer(fieldReducer, demoFields);\n const [banner, setBanner] = useState<any>();\n\n const onSubmit = useCallback((e: FormEvent) => {\n e.preventDefault();\n const errorFields = fields.filter(field => !field.validator(field.value));\n let heading = 'Wow, great job!';\n let variant: 'success' | 'urgent' = 'success';\n let messages = fields.map(f => `${f.name} was typed perfectly`);\n let bannerAction;\n\n if (errorFields.length > 0) {\n heading = \"I'm sorry you're having trouble\";\n variant = 'urgent';\n messages = errorFields.map(f => `${f.name} was not typed correctly`);\n bannerAction = (\n <Link href='https://community.pega.com/support' target='_blank'>\n Visit Pega support for assistance\n </Link>\n );\n }\n\n setBanner(\n <Banner\n {...{\n heading,\n variant,\n messages,\n id: 'formBanner',\n action: bannerAction,\n onDismiss() {\n setBanner(false);\n }\n }}\n />\n );\n }, []);\n\n return (\n <Form\n banners={banner}\n actions={formActions}\n onSubmit={onSubmit}\n style={{ margin: 'auto', padding: '2.5rem', maxWidth: '37.5rem' }}\n >\n {fields.map((field: DemoFormField) => {\n return (\n <Input\n key={field.name}\n autoComplete='off'\n name={field.name}\n label={field.label}\n info={field.info}\n value={field.value}\n onChange={(e: InputEvent) => setField(e.target as any)}\n />\n );\n })}\n </Form>\n );\n};\n\n// -----------------------------------------------------------------------------\n// CaseView story\n// -----------------------------------------------------------------------------\nexport const ShownInCaseView = () => {\n const [hasBanner, setHasBanner] = useState(true);\n return (\n <CaseViewDemo\n banners={\n hasBanner && (\n <Banner\n id='case-view-error'\n heading='Waring'\n onDismiss={() => setHasBanner(false)}\n variant='warning'\n messages={['Your submission is missing some important documents.']}\n />\n )\n }\n />\n );\n};\n\nShownInCaseView.parameters = {\n layout: 'fullscreen'\n};\n\n// -----------------------------------------------------------------------------\n// AppShell story\n// -----------------------------------------------------------------------------\nexport const ShownInAppShell = () => {\n const [hasBanner, setHasBanner] = useState([]);\n return (\n <AppShellDemo\n banners={\n hasBanner && (\n <Banner\n id='app-shell-banner-success'\n heading='2 items uploaded successfully'\n onDismiss={() => setHasBanner([])}\n variant='success'\n messages={['pega_data.json', 'business-earnings.xlsx']}\n action={\n <Link target='_blank' href='https://www.pega.com'>\n Link Here!\n </Link>\n }\n />\n )\n }\n />\n );\n};\n\nShownInAppShell.parameters = {\n layout: 'fullscreen'\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Banner.stories.js","sourceRoot":"","sources":["../../../src/core/Banner/Banner.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAa,UAAU,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE3F,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAiB,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEtF,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AAEV,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEnD,OAAO,CACL,8BACG,CAAC,UAAU,IAAI,KAAC,MAAM,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,4BAAsB,EAC/E,UAAU,IAAI,CACb,KAAC,MAAM,IACL,EAAE,EAAC,SAAS,EACZ,OAAO,EAAC,SAAS,EACjB,SAAS,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EACrC,OAAO,EAAC,+BAA+B,EACvC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,wBAAwB,CAAC,GACtD,CACH,IACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE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C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjD,OAAO,CACL,KAAC,YAAY,IACX,OAAO,EACL,SAAS,IAAI,CACX,KAAC,MAAM,IACL,EAAE,EAAC,iBAAiB,EACpB,OAAO,EAAC,QAAQ,EAChB,SAAS,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EACpC,OAAO,EAAC,SAAS,EACjB,QAAQ,EAAE,CAAC,sDAAsD,CAAC,GAClE,CACH,GAEH,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,CAAC,UAAU,GAAG;IAC3B,MAAM,EAAE,YAAY;CACrB,CAAC;AAEF,gFAAgF;AAChF,iBAAiB;AACjB,gFAAgF;AAChF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC/C,OAAO,CACL,KAAC,YAAY,IACX,OAAO,EACL,SAAS,IAAI,CACX,KAAC,MAAM,IACL,EAAE,EAAC,0BAA0B,EAC7B,OAAO,EAAC,+BAA+B,EACvC,SAAS,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,EACjC,OAAO,EAAC,SAAS,EACjB,QAAQ,EAAE,CAAC,gBAAgB,EAAE,wBAAwB,CAAC,EACtD,MAAM,EACJ,KAAC,IAAI,IAAC,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,sBAAsB,2BAE1C,GAET,CACH,GAEH,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,CAAC,UAAU,GAAG;IAC3B,MAAM,EAAE,YAAY;CACrB,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, useCallback, FormEvent, useReducer } from 'react';\n\nimport { Banner, Button, Configuration, Form, Input, Link } from '@pega/cosmos-react-core';\n\nimport { AppShellDemo } from '../AppShell/AppShell.stories';\nimport { CaseViewDemo } from '../../work/CaseView/CaseView.stories';\n\nimport { demoFields, DemoFormField, fieldReducer, formActions } from './Banner.mocks';\n\nexport default {\n title: 'Core/Banner',\n component: Banner\n} as Meta;\n\nexport const SuccessBanner = () => {\n const [showBanner, setShowBanner] = useState(true);\n\n return (\n <>\n {!showBanner && <Button onClick={() => setShowBanner(true)}>Open banner</Button>}\n {showBanner && (\n <Banner\n id='success'\n variant='success'\n onDismiss={() => setShowBanner(false)}\n heading='2 items uploaded successfully'\n messages={['pega_data.json', 'business-earnings.xlsx']}\n />\n )}\n </>\n );\n};\n\nexport const ErrorBanner = () => {\n return (\n <Banner\n id='error'\n variant='urgent'\n heading='Error'\n action={\n <div>\n <Button variant='link'>Try again</Button>\n </div>\n }\n messages={['Your request failed to send!', 'Please review your request and try again']}\n />\n );\n};\n\nexport const WarningBanner = () => {\n return (\n <Banner\n id='warning'\n variant='warning'\n action={\n <div>\n <Button variant='link'>Why this matters</Button>\n </div>\n }\n messages={['Your submission is missing some important documents.']}\n />\n );\n};\n\nexport const InfoBanner = () => {\n const [showBanner, setShowBanner] = useState(true);\n\n return (\n <>\n {!showBanner && <Button onClick={() => setShowBanner(true)}>Open banner</Button>}\n {showBanner && (\n <Banner\n id='info'\n variant='info'\n onDismiss={() => setShowBanner(false)}\n messages={[\n 'US-123456 is currently being modified by Jane Smith and may not be edited simultaneously.'\n ]}\n />\n )}\n </>\n );\n};\n\ninterface ConfigurableErrorBannerProps {\n background?: string;\n}\n\nexport const ConfigurableErrorBanner: Story<ConfigurableErrorBannerProps> = (\n args: ConfigurableErrorBannerProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n banner: {\n urgent: {\n background: args.background\n }\n }\n }\n }}\n >\n <Banner\n id='error'\n variant='urgent'\n heading='Error'\n action={\n <div>\n <Button variant='link'>Try again</Button>\n </div>\n }\n messages={['Your request failed to send!', 'Please review your request and try again']}\n />\n </Configuration>\n );\n};\n\nConfigurableErrorBanner.args = {\n background: '#d91c29'\n};\n\nConfigurableErrorBanner.argTypes = {\n background: { control: { type: 'color' } }\n};\n\n// -----------------------------------------------------------------------------\n// Form story\n// -----------------------------------------------------------------------------\n\nexport const ShownInForm = () => {\n const [fields, setField] = useReducer(fieldReducer, demoFields);\n const [banner, setBanner] = useState<any>();\n\n const onSubmit = useCallback((e: FormEvent) => {\n e.preventDefault();\n const errorFields = fields.filter(field => !field.validator(field.value));\n let heading = 'Wow, great job!';\n let variant: 'success' | 'urgent' = 'success';\n let messages = fields.map(f => `${f.name} was typed perfectly`);\n let bannerAction;\n\n if (errorFields.length > 0) {\n heading = \"I'm sorry you're having trouble\";\n variant = 'urgent';\n messages = errorFields.map(f => `${f.name} was not typed correctly`);\n bannerAction = (\n <Link href='https://community.pega.com/support' target='_blank'>\n Visit Pega support for assistance\n </Link>\n );\n }\n\n setBanner(\n <Banner\n {...{\n heading,\n variant,\n messages,\n id: 'formBanner',\n action: bannerAction,\n onDismiss() {\n setBanner(false);\n }\n }}\n />\n );\n }, []);\n\n return (\n <Form\n banners={banner}\n actions={formActions}\n onSubmit={onSubmit}\n style={{ margin: 'auto', padding: '2.5rem', maxWidth: '37.5rem' }}\n >\n {fields.map((field: DemoFormField) => {\n return (\n <Input\n key={field.name}\n autoComplete='off'\n name={field.name}\n label={field.label}\n info={field.info}\n value={field.value}\n onChange={(e: InputEvent) => setField(e.target as any)}\n />\n );\n })}\n </Form>\n );\n};\n\n// -----------------------------------------------------------------------------\n// CaseView story\n// -----------------------------------------------------------------------------\nexport const ShownInCaseView = () => {\n const [hasBanner, setHasBanner] = useState(true);\n return (\n <CaseViewDemo\n banners={\n hasBanner && (\n <Banner\n id='case-view-error'\n heading='Waring'\n onDismiss={() => setHasBanner(false)}\n variant='warning'\n messages={['Your submission is missing some important documents.']}\n />\n )\n }\n />\n );\n};\n\nShownInCaseView.parameters = {\n layout: 'fullscreen'\n};\n\n// -----------------------------------------------------------------------------\n// AppShell story\n// -----------------------------------------------------------------------------\nexport const ShownInAppShell = () => {\n const [hasBanner, setHasBanner] = useState([]);\n return (\n <AppShellDemo\n banners={\n hasBanner && (\n <Banner\n id='app-shell-banner-success'\n heading='2 items uploaded successfully'\n onDismiss={() => setHasBanner([])}\n variant='success'\n messages={['pega_data.json', 'business-earnings.xlsx']}\n action={\n <Link target='_blank' href='https://www.pega.com'>\n Link Here!\n </Link>\n }\n />\n )\n }\n />\n );\n};\n\nShownInAppShell.parameters = {\n layout: 'fullscreen'\n};\n"]}
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
component: BooleanDisplay
|
|
6
6
|
};
|
|
7
7
|
export const BooleanDisplayDemo = (args) => {
|
|
8
|
-
return (_jsx(BooleanDisplay, { value: args.value, trueLabel: args.trueLabel, falseLabel: args.falseLabel }
|
|
8
|
+
return (_jsx(BooleanDisplay, { value: args.value, trueLabel: args.trueLabel, falseLabel: args.falseLabel }));
|
|
9
9
|
};
|
|
10
10
|
BooleanDisplayDemo.args = {
|
|
11
11
|
value: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanDisplay.stories.js","sourceRoot":"","sources":["../../../src/core/Boolean/BooleanDisplay.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAuB,MAAM,yBAAyB,CAAC;AAE9E,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,cAAc;CAClB,CAAC;AAEV,MAAM,CAAC,MAAM,kBAAkB,GAA+B,CAAC,IAAyB,EAAE,EAAE;IAC1F,OAAO,CACL,KAAC,cAAc,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"BooleanDisplay.stories.js","sourceRoot":"","sources":["../../../src/core/Boolean/BooleanDisplay.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAuB,MAAM,yBAAyB,CAAC;AAE9E,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,cAAc;CAClB,CAAC;AAEV,MAAM,CAAC,MAAM,kBAAkB,GAA+B,CAAC,IAAyB,EAAE,EAAE;IAC1F,OAAO,CACL,KAAC,cAAc,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,GAAI,CAC9F,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAkB,CAAC,IAAI,GAAG;IACxB,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,IAAI;CACjB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACvC,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACxC,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC1C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { BooleanDisplay, BooleanDisplayProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Boolean',\n component: BooleanDisplay\n} as Meta;\n\nexport const BooleanDisplayDemo: Story<BooleanDisplayProps> = (args: BooleanDisplayProps) => {\n return (\n <BooleanDisplay value={args.value} trueLabel={args.trueLabel} falseLabel={args.falseLabel} />\n );\n};\n\nBooleanDisplayDemo.args = {\n value: true,\n trueLabel: 'Yes',\n falseLabel: 'No'\n};\n\nBooleanDisplayDemo.argTypes = {\n value: { control: { type: 'boolean' } },\n trueLabel: { control: { type: 'text' } },\n falseLabel: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -13,7 +13,7 @@ export const BreadcrumbsDemo = () => {
|
|
|
13
13
|
{ id: 'Plan claims', primary: 'Plan claims', href: '#plan-claims' },
|
|
14
14
|
{ id: 'View benefit claims', primary: 'View benefit claims' }
|
|
15
15
|
];
|
|
16
|
-
return _jsx(Breadcrumbs, { path: crumbs }
|
|
16
|
+
return _jsx(Breadcrumbs, { path: crumbs });
|
|
17
17
|
};
|
|
18
18
|
export const ContainedBreadcrumbs = () => {
|
|
19
19
|
const crumbs = [
|
|
@@ -23,6 +23,6 @@ export const ContainedBreadcrumbs = () => {
|
|
|
23
23
|
{ id: 'Plan claims', primary: 'Plan claims', href: '#plan-claims' },
|
|
24
24
|
{ id: 'View benefit claims', primary: 'View benefit claims' }
|
|
25
25
|
];
|
|
26
|
-
return (_jsx(Card, { as: StyledCard, children: _jsx(Breadcrumbs, { path: crumbs }
|
|
26
|
+
return (_jsx(Card, { as: StyledCard, children: _jsx(Breadcrumbs, { path: crumbs }) }));
|
|
27
27
|
};
|
|
28
28
|
//# sourceMappingURL=Breadcrumbs.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.stories.js","sourceRoot":"","sources":["../../../src/core/Breadcrumbs/Breadcrumbs.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;CACf,CAAC;AAEV,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,MAAM,GAAG;QACb,EAAE,EAAE,EAAE,kBAAkB,EAAE,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,mBAAmB,EAAE;QAClF,EAAE,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,eAAe,EAAE;QACtE,EAAE,EAAE,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,gBAAgB,EAAE;QACzE,EAAE,EAAE,EAAE,aAAa,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E,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,eAAe,EAAE;QACtE,EAAE,EAAE,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,gBAAgB,EAAE;QACzE,EAAE,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE;QACnE,EAAE,EAAE,EAAE,qBAAqB,EAAE,OAAO,EAAE,qBAAqB,EAAE;KAC9D,CAAC;IAEF,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAE,UAAU,YAClB,KAAC,WAAW,IAAC,IAAI,EAAE,MAAM,GAAI,GACxB,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\n\nimport { Breadcrumbs, Card } from '@pega/cosmos-react-core';\n\nimport { StyledCard } from './Breadcrumbs.styles';\n\nexport default {\n title: 'Core/Breadcrumbs',\n component: Breadcrumbs\n} as Meta;\n\nexport const BreadcrumbsDemo = () => {\n const crumbs = [\n { id: 'Plan information', primary: 'Plan information', href: '#plan-information' },\n { id: 'View benefit', primary: 'View benefit', href: '#view-benefit' },\n { id: 'Benefit usage', primary: 'Benefit usage', href: '#benefit-usage' },\n { id: 'Plan claims', primary: 'Plan claims', href: '#plan-claims' },\n { id: 'View benefit claims', primary: 'View benefit claims' }\n ];\n\n return <Breadcrumbs path={crumbs} />;\n};\n\nexport const ContainedBreadcrumbs = () => {\n const crumbs = [\n { id: 'Plan information', primary: 'Plan information', href: '#plan-information' },\n { id: 'View benefit', primary: 'View benefit', href: '#view-benefit' },\n { id: 'Benefit usage', primary: 'Benefit usage', href: '#benefit-usage' },\n { id: 'Plan claims', primary: 'Plan claims', href: '#plan-claims' },\n { id: 'View benefit claims', primary: 'View benefit claims' }\n ];\n\n return (\n <Card as={StyledCard}>\n <Breadcrumbs path={crumbs} />\n </Card>\n );\n};\n"]}
|
|
@@ -11,7 +11,7 @@ export default {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
export const ButtonVariants = (args) => {
|
|
14
|
-
return (_jsx(Button, { variant: args.variant, compact: args.compact, children: "Click me" }
|
|
14
|
+
return (_jsx(Button, { variant: args.variant, compact: args.compact, children: "Click me" }));
|
|
15
15
|
};
|
|
16
16
|
ButtonVariants.args = {
|
|
17
17
|
variant: 'primary',
|
|
@@ -25,10 +25,10 @@ ButtonVariants.argTypes = {
|
|
|
25
25
|
compact: { control: { type: 'boolean' } }
|
|
26
26
|
};
|
|
27
27
|
export const DisabledButtons = () => {
|
|
28
|
-
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: 'primary', disabled: true, children: "Primary disabled" }
|
|
28
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: 'primary', disabled: true, children: "Primary disabled" }), _jsx(Button, { variant: 'secondary', disabled: true, children: "Secondary disabled" }), _jsx(Button, { variant: 'simple', disabled: true, children: "Simple disabled" }), _jsx(Button, { variant: 'link', disabled: true, children: "Link disabled" }), _jsx(Button, { variant: 'text', disabled: true, children: "Text disabled" })] }));
|
|
29
29
|
};
|
|
30
30
|
export const IconButtons = (args) => {
|
|
31
|
-
return (_jsxs(Flex, { container: { alignItems: 'center' }, children: [_jsx(Button, { variant: 'primary', label: 'Icon button primary', icon: true, compact: args.compact, children: _jsx(Icon, { name: 'plus' }
|
|
31
|
+
return (_jsxs(Flex, { container: { alignItems: 'center' }, children: [_jsx(Button, { variant: 'primary', label: 'Icon button primary', icon: true, compact: args.compact, children: _jsx(Icon, { name: 'plus' }) }), _jsx(Button, { variant: 'secondary', label: 'Icon button secondary', icon: true, compact: args.compact, children: _jsx(Icon, { name: 'plus' }) }), _jsx(Button, { variant: 'simple', label: 'Icon button simple', icon: true, compact: args.compact, children: _jsx(Icon, { name: 'plus' }) }), _jsx(Button, { variant: 'link', label: 'Icon button link', icon: true, compact: args.compact, children: _jsx(Icon, { name: 'plus' }) }), _jsx(Button, { variant: 'text', label: 'Icon button text', icon: true, compact: args.compact, children: _jsx(Icon, { name: 'plus' }) })] }));
|
|
32
32
|
};
|
|
33
33
|
IconButtons.args = {
|
|
34
34
|
compact: false
|
|
@@ -37,7 +37,7 @@ IconButtons.argTypes = {
|
|
|
37
37
|
compact: { control: { type: 'boolean' } }
|
|
38
38
|
};
|
|
39
39
|
export const LoadingButtons = (args) => {
|
|
40
|
-
return (_jsx(Button, { variant: args.variant, icon: args.icon, label: 'Loading', loading: true, children: args.icon ? _jsx(Icon, { name: 'plus' }
|
|
40
|
+
return (_jsx(Button, { variant: args.variant, icon: args.icon, label: 'Loading', loading: true, children: args.icon ? _jsx(Icon, { name: 'plus' }) : 'Loading' }));
|
|
41
41
|
};
|
|
42
42
|
LoadingButtons.args = {
|
|
43
43
|
variant: 'primary',
|
|
@@ -48,10 +48,10 @@ LoadingButtons.argTypes = {
|
|
|
48
48
|
icon: { control: { type: 'boolean' } }
|
|
49
49
|
};
|
|
50
50
|
export const ButtonAsLink = () => {
|
|
51
|
-
return (_jsx(Button, { variant: 'primary', href: 'https://www.pega.com', target: '_blank', children: "Go to pega.com" }
|
|
51
|
+
return (_jsx(Button, { variant: 'primary', href: 'https://www.pega.com', target: '_blank', children: "Go to pega.com" }));
|
|
52
52
|
};
|
|
53
53
|
export const BareButtonDemo = (args) => {
|
|
54
|
-
return (_jsx(BareButton, { disabled: args.disabled, href: args.href || undefined, children: "Click me" }
|
|
54
|
+
return (_jsx(BareButton, { disabled: args.disabled, href: args.href || undefined, children: "Click me" }));
|
|
55
55
|
};
|
|
56
56
|
BareButtonDemo.args = {
|
|
57
57
|
disabled: false,
|
|
@@ -72,7 +72,7 @@ export const ConfigurableButton = (args) => {
|
|
|
72
72
|
padding: args.padding
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
}, children: _jsx(Button, { children: "Configurable Button" }
|
|
75
|
+
}, children: _jsx(Button, { children: "Configurable Button" }) }));
|
|
76
76
|
};
|
|
77
77
|
ConfigurableButton.args = {
|
|
78
78
|
borderWidth: '0.0625rem',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.js","sourceRoot":"","sources":["../../../src/core/Button/Button.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,MAAM,EAEN,aAAa,EACb,IAAI,EACJ,IAAI,EACJ,YAAY,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AACxF,OAAO,UAAU,MAAM,0DAA0D,CAAC;AAElF,YAAY,CAAC,QAAQ,CAAC,CAAC;AAEvB,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,cAAc,GAAuB,CAAC,IAAiB,EAAE,EAAE;IACtE,OAAO,CACL,KAAC,MAAM,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"Button.stories.js","sourceRoot":"","sources":["../../../src/core/Button/Button.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,MAAM,EAEN,aAAa,EACb,IAAI,EACJ,IAAI,EACJ,YAAY,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AACxF,OAAO,UAAU,MAAM,0DAA0D,CAAC;AAElF,YAAY,CAAC,QAAQ,CAAC,CAAC;AAEvB,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,cAAc,GAAuB,CAAC,IAAiB,EAAE,EAAE;IACtE,OAAO,CACL,KAAC,MAAM,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,yBAE3C,CACV,CAAC;AACJ,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ACF;SACF,YAED,KAAC,MAAM,sCAA6B,GACtB,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAkB,CAAC,IAAI,GAAG;IACxB,WAAW,EAAE,WAAW;IACxB,YAAY,EAAE,IAAI;IAClB,KAAK,EAAE,SAAS;IAChB,cAAc,EAAE,SAAS;IACzB,OAAO,EAAE,WAAW;CACrB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC1C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC7C,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACrC,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC9C,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport {\n Button,\n ButtonProps,\n Configuration,\n Flex,\n Icon,\n registerIcon\n} from '@pega/cosmos-react-core';\nimport * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\n\nregisterIcon(plusIcon);\n\nexport default {\n title: 'Core/Button',\n component: Button,\n parameters: {\n layout: 'centered'\n }\n} as Meta;\n\nexport const ButtonVariants: Story<ButtonProps> = (args: ButtonProps) => {\n return (\n <Button variant={args.variant} compact={args.compact}>\n Click me\n </Button>\n );\n};\n\nButtonVariants.args = {\n variant: 'primary',\n compact: false\n};\n\nButtonVariants.argTypes = {\n variant: {\n options: ['primary', 'secondary', 'simple', 'link', 'text'],\n control: { type: 'select' }\n },\n compact: { control: { type: 'boolean' } }\n};\n\nexport const DisabledButtons = () => {\n return (\n <>\n <Button variant='primary' disabled>\n Primary disabled\n </Button>\n <Button variant='secondary' disabled>\n Secondary disabled\n </Button>\n <Button variant='simple' disabled>\n Simple disabled\n </Button>\n <Button variant='link' disabled>\n Link disabled\n </Button>\n <Button variant='text' disabled>\n Text disabled\n </Button>\n </>\n );\n};\n\nexport const IconButtons: Story<ButtonProps> = (args: ButtonProps) => {\n return (\n <Flex container={{ alignItems: 'center' }}>\n <Button variant='primary' label='Icon button primary' icon compact={args.compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='secondary' label='Icon button secondary' icon compact={args.compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='simple' label='Icon button simple' icon compact={args.compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='link' label='Icon button link' icon compact={args.compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='text' label='Icon button text' icon compact={args.compact}>\n <Icon name='plus' />\n </Button>\n </Flex>\n );\n};\n\nIconButtons.args = {\n compact: false\n};\n\nIconButtons.argTypes = {\n compact: { control: { type: 'boolean' } }\n};\n\nexport const LoadingButtons: Story<ButtonProps> = (args: ButtonProps) => {\n return (\n <Button variant={args.variant} icon={args.icon} label='Loading' loading>\n {args.icon ? <Icon name='plus' /> : 'Loading'}\n </Button>\n );\n};\n\nLoadingButtons.args = {\n variant: 'primary',\n icon: false\n};\n\nLoadingButtons.argTypes = {\n variant: { options: ['primary', 'secondary'], control: { type: 'select' } },\n icon: { control: { type: 'boolean' } }\n};\n\nexport const ButtonAsLink = () => {\n return (\n <Button variant='primary' href='https://www.pega.com' target='_blank'>\n Go to pega.com\n </Button>\n );\n};\n\nexport const BareButtonDemo: Story<ButtonProps> = (args: ButtonProps) => {\n return (\n <BareButton disabled={args.disabled} href={args.href || undefined}>\n Click me\n </BareButton>\n );\n};\n\nBareButtonDemo.args = {\n disabled: false,\n href: ''\n};\n\nBareButtonDemo.argTypes = {\n disabled: { control: { type: 'boolean' } },\n href: { control: { type: 'text' } }\n};\n\ninterface ConfigurableButtonProps {\n borderWidth?: string;\n borderRadius?: number;\n color?: string;\n secondaryColor?: string;\n padding?: string;\n}\n\nexport const ConfigurableButton: Story<ConfigurableButtonProps> = (\n args: ConfigurableButtonProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n button: {\n 'border-width': args.borderWidth,\n 'border-radius': args.borderRadius,\n color: args.color,\n 'secondary-color': args.secondaryColor,\n padding: args.padding\n }\n }\n }}\n >\n <Button>Configurable Button</Button>\n </Configuration>\n );\n};\n\nConfigurableButton.args = {\n borderWidth: '0.0625rem',\n borderRadius: 9999,\n color: '#076bc9',\n secondaryColor: '#ffffff',\n padding: '0rem 1rem'\n};\n\nConfigurableButton.argTypes = {\n borderWidth: { control: { type: 'text' } },\n borderRadius: { control: { type: 'number' } },\n color: { control: { type: 'color' } },\n secondaryColor: { control: { type: 'color' } },\n padding: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -9,16 +9,16 @@ export default {
|
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
11
|
export const SimpleCard = () => {
|
|
12
|
-
return (_jsxs(Card, { as: StyledCard, children: [_jsx(CardHeader, { children: _jsx(Text, { variant: 'h2', children: "Simple Card" }
|
|
12
|
+
return (_jsxs(Card, { as: StyledCard, children: [_jsx(CardHeader, { children: _jsx(Text, { variant: 'h2', children: "Simple Card" }) }), _jsx(CardContent, { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." })] }));
|
|
13
13
|
};
|
|
14
14
|
export const FullCard = (args) => {
|
|
15
|
-
return (_jsxs(Card, { as: StyledCard, children: [_jsx(CardMedia, { children: _jsx(Image, { src: 'https://www.pega.com/sites/default/files/default-og.jpg', height: '100', alt: 'Media' }
|
|
15
|
+
return (_jsxs(Card, { as: StyledCard, children: [_jsx(CardMedia, { children: _jsx(Image, { src: 'https://www.pega.com/sites/default/files/default-og.jpg', height: '100', alt: 'Media' }) }), _jsx(CardHeader, { actions: _jsx(MenuButton, { portal: true, variant: 'simple', text: 'Card actions', icon: 'more', iconOnly: true, menu: {
|
|
16
16
|
items: [
|
|
17
17
|
{ id: 'action-1', primary: 'Card action 1' },
|
|
18
18
|
{ id: 'action-2', primary: 'Card action 2' },
|
|
19
19
|
{ id: 'action-3', primary: 'Card action 3' }
|
|
20
20
|
]
|
|
21
|
-
} }
|
|
21
|
+
} }), children: _jsx(Text, { variant: 'h2', children: "Full Card" }) }), _jsx(CardContent, { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." }), _jsx(CardFooter, { justify: args.justify, children: _jsx(Text, { variant: 'secondary', children: "This is the CardFooter" }) })] }));
|
|
22
22
|
};
|
|
23
23
|
FullCard.args = {
|
|
24
24
|
justify: 'start'
|
|
@@ -37,7 +37,7 @@ export const ConfigurableCard = (args) => {
|
|
|
37
37
|
background: args.background
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
}, children: _jsxs(Card, { as: StyledCard, children: [_jsx(CardHeader, { children: _jsx(Text, { variant: 'h2', children: "Simple Card" }
|
|
40
|
+
}, children: _jsxs(Card, { as: StyledCard, children: [_jsx(CardHeader, { children: _jsx(Text, { variant: 'h2', children: "Simple Card" }) }), _jsx(CardContent, { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." })] }) }));
|
|
41
41
|
};
|
|
42
42
|
ConfigurableCard.args = {
|
|
43
43
|
borderRadius: '0.5rem',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.stories.js","sourceRoot":"","sources":["../../../src/core/Card/Card.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,EAEV,KAAK,EACL,UAAU,EACV,IAAI,EACJ,aAAa,EACd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,OAAO,CACL,MAAC,IAAI,IAAC,EAAE,EAAE,UAAU,aAClB,KAAC,UAAU,cACT,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"Card.stories.js","sourceRoot":"","sources":["../../../src/core/Card/Card.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,EAEV,KAAK,EACL,UAAU,EACV,IAAI,EACJ,aAAa,EACd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,OAAO,CACL,MAAC,IAAI,IAAC,EAAE,EAAE,UAAU,aAClB,KAAC,UAAU,cACT,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,4BAAmB,GAC1B,EACb,KAAC,WAAW,0PAIE,IACT,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAA2B,CAAC,IAAqB,EAAE,EAAE;IACxE,OAAO,CACL,MAAC,IAAI,IAAC,EAAE,EAAE,UAAU,aAClB,KAAC,SAAS,cACR,KAAC,KAAK,IACJ,GAAG,EAAC,yDA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UAAU,aAClB,KAAC,UAAU,cACT,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,4BAAmB,GAC1B,EACb,KAAC,WAAW,0PAIE,IACT,GACO,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,IAAI,GAAG;IACtB,YAAY,EAAE,QAAQ;IACtB,UAAU,EAAE,SAAS;CACtB,CAAC;AAEF,gBAAgB,CAAC,QAAQ,GAAG;IAC1B,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC3C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CAC3C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport {\n Card,\n CardHeader,\n CardMedia,\n CardContent,\n CardFooter,\n CardFooterProps,\n Image,\n MenuButton,\n Text,\n Configuration\n} from '@pega/cosmos-react-core';\n\nimport { StyledCard } from './Card.styles';\n\nexport default {\n title: 'Core/Card',\n component: Card,\n parameters: {\n layout: 'centered'\n }\n} as Meta;\n\nexport const SimpleCard = () => {\n return (\n <Card as={StyledCard}>\n <CardHeader>\n <Text variant='h2'>Simple Card</Text>\n </CardHeader>\n <CardContent>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut\n labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco\n laboris nisi ut aliquip ex ea commodo consequat.\n </CardContent>\n </Card>\n );\n};\n\nexport const FullCard: Story<CardFooterProps> = (args: CardFooterProps) => {\n return (\n <Card as={StyledCard}>\n <CardMedia>\n <Image\n src='https://www.pega.com/sites/default/files/default-og.jpg'\n height='100'\n alt='Media'\n />\n </CardMedia>\n <CardHeader\n actions={\n <MenuButton\n portal\n variant='simple'\n text='Card actions'\n icon='more'\n iconOnly\n menu={{\n items: [\n { id: 'action-1', primary: 'Card action 1' },\n { id: 'action-2', primary: 'Card action 2' },\n { id: 'action-3', primary: 'Card action 3' }\n ]\n }}\n />\n }\n >\n <Text variant='h2'>Full Card</Text>\n </CardHeader>\n <CardContent>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut\n labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco\n laboris nisi ut aliquip ex ea commodo consequat.\n </CardContent>\n <CardFooter justify={args.justify}>\n <Text variant='secondary'>This is the CardFooter</Text>\n </CardFooter>\n </Card>\n );\n};\n\nFullCard.args = {\n justify: 'start'\n};\n\nFullCard.argTypes = {\n justify: {\n options: ['start', 'end', 'center', 'between', 'around', 'evenly'],\n control: { type: 'select' }\n }\n};\n\ninterface ConfigurableCardProps {\n borderRadius?: string;\n background?: string;\n}\n\nexport const ConfigurableCard: Story<ConfigurableCardProps> = (args: ConfigurableCardProps) => {\n return (\n <Configuration\n theme={{\n components: {\n card: {\n 'border-radius': args.borderRadius,\n background: args.background\n }\n }\n }}\n >\n <Card as={StyledCard}>\n <CardHeader>\n <Text variant='h2'>Simple Card</Text>\n </CardHeader>\n <CardContent>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt\n ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation\n ullamco laboris nisi ut aliquip ex ea commodo consequat.\n </CardContent>\n </Card>\n </Configuration>\n );\n};\n\nConfigurableCard.args = {\n borderRadius: '0.5rem',\n background: '#71baff'\n};\n\nConfigurableCard.argTypes = {\n borderRadius: { control: { type: 'text' } },\n background: { control: { type: 'color' } }\n};\n"]}
|
|
@@ -21,10 +21,10 @@ export default {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
export const DefaultCheckbox = (args) => {
|
|
24
|
-
return (_jsx(Checkbox, { status: args.status, label: args.label, required: args.required, disabled: args.disabled, readOnly: args.readOnly, indeterminate: args.indeterminate }
|
|
24
|
+
return (_jsx(Checkbox, { status: args.status, label: args.label, required: args.required, disabled: args.disabled, readOnly: args.readOnly, indeterminate: args.indeterminate }));
|
|
25
25
|
};
|
|
26
26
|
export const CheckboxCard = (args) => {
|
|
27
|
-
return (_jsx(Checkbox, { variant: 'card', status: args.status, label: args.label, required: args.required, disabled: args.disabled, readOnly: args.readOnly, indeterminate: args.indeterminate }
|
|
27
|
+
return (_jsx(Checkbox, { variant: 'card', status: args.status, label: args.label, required: args.required, disabled: args.disabled, readOnly: args.readOnly, indeterminate: args.indeterminate }));
|
|
28
28
|
};
|
|
29
29
|
export const ConfigurableCheckbox = (args) => {
|
|
30
30
|
return (_jsx(Configuration, { theme: {
|
|
@@ -47,7 +47,7 @@ export const ConfigurableCheckbox = (args) => {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
}, children: _jsx(Checkbox, { label: 'Configurable Checkbox' }
|
|
50
|
+
}, children: _jsx(Checkbox, { label: 'Configurable Checkbox' }) }));
|
|
51
51
|
};
|
|
52
52
|
ConfigurableCheckbox.args = {
|
|
53
53
|
size: '1.25rem',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.stories.js","sourceRoot":"","sources":["../../../src/core/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAmB,MAAM,yBAAyB,CAAC;AAEnF,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE;QACJ,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,kBAAkB;QACzB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,aAAa,EAAE,KAAK;KACrB;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC5F,KAAK,EAAE,EAAE,OAAO,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E,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;IACtC,aAAa,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Checkbox, Configuration, RadioCheckProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Checkbox',\n component: Checkbox,\n args: {\n status: undefined,\n label: 'Check me, please',\n required: false,\n disabled: false,\n readOnly: false,\n indeterminate: 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 indeterminate: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const DefaultCheckbox: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <Checkbox\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n indeterminate={args.indeterminate}\n />\n );\n};\n\nexport const CheckboxCard: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <Checkbox\n variant='card'\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n indeterminate={args.indeterminate}\n />\n );\n};\n\ninterface ConfigurableCheckboxProps 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 ConfigurableCheckbox: Story<ConfigurableCheckboxProps> = (\n args: ConfigurableCheckboxProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n checkbox: {\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 <Checkbox label='Configurable Checkbox' />\n </Configuration>\n );\n};\n\nConfigurableCheckbox.args = {\n size: '1.25rem',\n backgroundColor: '#ffffff',\n borderColor: '#939393',\n borderWidth: '0.0625rem',\n borderRadius: '0.5',\n labelColor: '#939393',\n labelFontWeight: '400',\n checkedBackgroundColor: '#076bc9',\n checkedBorderColor: '#076bc9'\n};\n\nConfigurableCheckbox.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 indeterminate: { table: { disable: true } }\n};\n"]}
|
|
@@ -20,13 +20,13 @@ export default {
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
export const CheckboxGroupDemo = (args) => {
|
|
23
|
-
return (_jsxs(CheckboxGroup, { label: 'What do you want to eat?', name: 'Fruit', labelHidden: args.labelHidden, inline: args.inline, required: args.required, disabled: args.disabled, readOnly: args.readOnly, children: [_jsx(Checkbox, { label: 'Banana', id: 'Banana', defaultChecked: true }
|
|
23
|
+
return (_jsxs(CheckboxGroup, { label: 'What do you want to eat?', name: 'Fruit', labelHidden: args.labelHidden, inline: args.inline, required: args.required, disabled: args.disabled, readOnly: args.readOnly, children: [_jsx(Checkbox, { label: 'Banana', id: 'Banana', defaultChecked: true }), _jsx(Checkbox, { label: 'Apple', id: 'Apple' }), _jsx(Checkbox, { label: 'Mango', id: 'Mango' }), _jsx(Checkbox, { label: 'Orange', id: 'Orange' })] }));
|
|
24
24
|
};
|
|
25
25
|
export const CheckboxCardGroup = (args) => {
|
|
26
|
-
return (_jsxs(CheckboxGroup, { variant: 'card', label: 'Which visuals appear satisfying?', labelHidden: args.labelHidden, inline: args.inline, required: args.required, disabled: args.disabled, readOnly: args.readOnly, children: [_jsx(Checkbox, { label: _jsxs(Flex, { container: { direction: 'column', gap: 1 }, children: [_jsx(Text, { variant: 'h4', children: "A paragraph" }
|
|
26
|
+
return (_jsxs(CheckboxGroup, { variant: 'card', label: 'Which visuals appear satisfying?', labelHidden: args.labelHidden, inline: args.inline, required: args.required, disabled: args.disabled, readOnly: args.readOnly, children: [_jsx(Checkbox, { label: _jsxs(Flex, { container: { direction: 'column', gap: 1 }, children: [_jsx(Text, { variant: 'h4', children: "A paragraph" }), _jsx(Paragraph, { children: "This is a paragraph of text. It is meant to appear visually satisfying amongst the other options in this group." })] }), id: 'paragraph', defaultChecked: true }), _jsx(Checkbox, { label: _jsxs(Flex, { container: { direction: 'column', gap: 1 }, children: [_jsx(Text, { variant: 'h4', children: "Space" }), _jsx(StyledImage, { src: 'https://thumbor.forbes.com/thumbor/960x0/https%3A%2F%2Fspecials-images.forbesimg.com%2Fdam%2Fimageserve%2F765877054%2F960x0.jpg%3Ffit%3Dscale', alt: 'space' })] }), id: 'space-photo' }), _jsx(Checkbox, { label: _jsxs(Flex, { container: { gap: 1, alignItems: 'start' }, children: [_jsx(StyledImage, { src: 'https://thumbor.forbes.com/thumbor/960x0/https%3A%2F%2Fspecials-images.forbesimg.com%2Fdam%2Fimageserve%2F765877054%2F960x0.jpg%3Ffit%3Dscale', alt: 'space' }), _jsxs(Flex, { container: { direction: 'column', gap: 1 }, children: [_jsx(Text, { variant: 'h4', children: "Space" }), _jsx(Paragraph, { children: "Space is the final frontier. There is so much to discover within Cosmos!" })] })] }), id: 'cosmos' }), _jsx(Checkbox, { label: _jsx(FieldGroup, { name: 'Gold service plan', children: _jsx(FieldValueList, { fields: [
|
|
27
27
|
{ id: 'service', name: 'Service length', value: '1 year' },
|
|
28
28
|
{ id: 'monthly-cost', name: 'Monthly cost', value: '$180.00' },
|
|
29
29
|
{ id: 'total-cost', name: 'Total cost', value: '$2,160.00' }
|
|
30
|
-
] }
|
|
30
|
+
] }) }), id: 'phone-plan' })] }));
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=CheckboxGroup.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.stories.js","sourceRoot":"","sources":["../../../src/core/CheckboxGroup/CheckboxGroup.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,cAAc,EACd,IAAI,EAEJ,IAAI,EACL,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEhE,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE;QACJ,WAAW,EAA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B,KAAC,SAAS,2FAEE,IACP,IACF,EAET,EAAE,EAAC,QAAQ,GACX,EACF,KAAC,QAAQ,IACP,KAAK,EACH,KAAC,UAAU,IAAC,IAAI,EAAC,mBAAmB,YAClC,KAAC,cAAc,IACb,MAAM,EAAE;4BACN,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE;4BAC1D,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,EAAE;4BAC9D,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE;yBAC7D,GACD,GACS,EAEf,EAAE,EAAC,YAAY,GACf,IACY,CACjB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport {\n Checkbox,\n CheckboxGroup,\n FieldGroup,\n FieldValueList,\n Flex,\n RadioCheckGroupProps,\n Text\n} from '@pega/cosmos-react-core';\n\nimport { Paragraph, StyledImage } from './CheckboxGroup.styles';\n\nexport default {\n title: 'Core/CheckboxGroup',\n component: CheckboxGroup,\n args: {\n labelHidden: false,\n inline: false,\n required: false,\n disabled: false,\n readOnly: false\n },\n argTypes: {\n labelHidden: { control: { type: 'boolean' } },\n inline: { control: { type: 'boolean' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const CheckboxGroupDemo: Story<RadioCheckGroupProps> = (args: RadioCheckGroupProps) => {\n return (\n <CheckboxGroup\n label='What do you want to eat?'\n name='Fruit'\n labelHidden={args.labelHidden}\n inline={args.inline}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n >\n <Checkbox label='Banana' id='Banana' defaultChecked />\n <Checkbox label='Apple' id='Apple' />\n <Checkbox label='Mango' id='Mango' />\n <Checkbox label='Orange' id='Orange' />\n </CheckboxGroup>\n );\n};\n\nexport const CheckboxCardGroup: Story<RadioCheckGroupProps> = (args: RadioCheckGroupProps) => {\n return (\n <CheckboxGroup\n variant='card'\n label='Which visuals appear satisfying?'\n labelHidden={args.labelHidden}\n inline={args.inline}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n >\n <Checkbox\n label={\n <Flex container={{ direction: 'column', gap: 1 }}>\n <Text variant='h4'>A paragraph</Text>\n <Paragraph>\n This is a paragraph of text. It is meant to appear visually satisfying amongst the\n other options in this group.\n </Paragraph>\n </Flex>\n }\n id='paragraph'\n defaultChecked\n />\n <Checkbox\n label={\n <Flex container={{ direction: 'column', gap: 1 }}>\n <Text variant='h4'>Space</Text>\n <StyledImage\n src='https://thumbor.forbes.com/thumbor/960x0/https%3A%2F%2Fspecials-images.forbesimg.com%2Fdam%2Fimageserve%2F765877054%2F960x0.jpg%3Ffit%3Dscale'\n alt='space'\n />\n </Flex>\n }\n id='space-photo'\n />\n <Checkbox\n label={\n <Flex container={{ gap: 1, alignItems: 'start' }}>\n <StyledImage\n src='https://thumbor.forbes.com/thumbor/960x0/https%3A%2F%2Fspecials-images.forbesimg.com%2Fdam%2Fimageserve%2F765877054%2F960x0.jpg%3Ffit%3Dscale'\n alt='space'\n />\n <Flex container={{ direction: 'column', gap: 1 }}>\n <Text variant='h4'>Space</Text>\n <Paragraph>\n Space is the final frontier. There is so much to discover within Cosmos!\n </Paragraph>\n </Flex>\n </Flex>\n }\n id='cosmos'\n />\n <Checkbox\n label={\n <FieldGroup name='Gold service plan'>\n <FieldValueList\n fields={[\n { id: 'service', name: 'Service length', value: '1 year' },\n { id: 'monthly-cost', name: 'Monthly cost', value: '$180.00' },\n { id: 'total-cost', name: 'Total cost', value: '$2,160.00' }\n ]}\n />\n </FieldGroup>\n }\n id='phone-plan'\n />\n </CheckboxGroup>\n );\n};\n"]}
|
|
@@ -10,7 +10,7 @@ export const ColorPickerDemo = (args) => {
|
|
|
10
10
|
const [value, setValue] = useState('#10a5ac');
|
|
11
11
|
return (_jsx(ColorPicker, { label: args.label, labelHidden: args.labelHidden, info: args.info, status: args.status, swatchOnly: args.swatchOnly, inline: args.inline, required: args.required, disabled: args.disabled, readOnly: args.readOnly, value: value, onChange: e => {
|
|
12
12
|
setValue(e.hex);
|
|
13
|
-
} }
|
|
13
|
+
} }));
|
|
14
14
|
};
|
|
15
15
|
ColorPickerDemo.args = {
|
|
16
16
|
label: 'ColorPicker label',
|
|
@@ -56,13 +56,13 @@ export const MultiColor = () => {
|
|
|
56
56
|
return c;
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
|
-
} }
|
|
60
|
-
}) }
|
|
59
|
+
} }) }, key));
|
|
60
|
+
}) }) }), _jsx(Grid, { container: {
|
|
61
61
|
cols: '1fr 1fr 1fr 1fr',
|
|
62
62
|
gap: 0.125
|
|
63
63
|
}, children: values.map((color, i) => {
|
|
64
64
|
const key = `color-${i}`;
|
|
65
|
-
return (_jsx(Flex, { container: { justify: 'center', alignItems: 'center' }, as: StyledColorPane, color: color, children: _jsx(Text, { variant: 'h1', as: 'span', children: color }
|
|
66
|
-
}) }
|
|
65
|
+
return (_jsx(Flex, { container: { justify: 'center', alignItems: 'center' }, as: StyledColorPane, color: color, children: _jsx(Text, { variant: 'h1', as: 'span', children: color }) }, key));
|
|
66
|
+
}) })] }));
|
|
67
67
|
};
|
|
68
68
|
//# sourceMappingURL=ColorPicker.stories.js.map
|