@pega/cosmos-react-demos 4.0.0-dev.1.2 → 4.0.0-dev.10.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 +18 -55
- package/jsx/build/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/jsx/build/AppShell/AppShell.mocks.jsx +249 -376
- package/jsx/build/AppShell/AppShell.mocks.jsx.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.d.ts +13 -10
- package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.jsx +72 -98
- package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts +2 -0
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts.map +1 -1
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.js +23 -0
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.js.map +1 -1
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts.map +1 -1
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.jsx +4 -4
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.jsx.map +1 -1
- package/jsx/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -1
- package/jsx/build/FlowModeller/FlowModeller.stories.jsx +125 -9
- package/jsx/build/FlowModeller/FlowModeller.stories.jsx.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx +44 -3
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
- package/jsx/build/MobileBuildSummary/MobileBuildSummary.mocks.d.ts +1 -0
- package/jsx/build/MobileBuildSummary/MobileBuildSummary.mocks.d.ts.map +1 -1
- package/jsx/build/MobileBuildSummary/MobileBuildSummary.mocks.js +2 -1
- package/jsx/build/MobileBuildSummary/MobileBuildSummary.mocks.js.map +1 -1
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts +3 -2
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -1
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx +2 -0
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx.map +1 -1
- package/jsx/build/PageBanner/PageBanner.stories.d.ts +15 -0
- package/jsx/build/PageBanner/PageBanner.stories.d.ts.map +1 -0
- package/jsx/build/PageBanner/PageBanner.stories.jsx +41 -0
- package/jsx/build/PageBanner/PageBanner.stories.jsx.map +1 -0
- package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts +0 -2
- package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts.map +1 -1
- package/jsx/build/PageTemplates/GalleryPage.mocks.jsx +1 -50
- package/jsx/build/PageTemplates/GalleryPage.mocks.jsx.map +1 -1
- package/jsx/build/PageTemplates/GalleryPage.stories.d.ts +7 -3
- package/jsx/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -1
- package/jsx/build/PageTemplates/GalleryPage.stories.jsx +32 -31
- package/jsx/build/PageTemplates/GalleryPage.stories.jsx.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts +0 -1
- package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.mocks.jsx +2 -156
- package/jsx/build/PageTemplates/PageTemplates.mocks.jsx.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx +6 -5
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/build/PageTemplates/ShowcasePage.stories.d.ts +17 -0
- package/jsx/build/PageTemplates/ShowcasePage.stories.d.ts.map +1 -0
- package/jsx/build/PageTemplates/ShowcasePage.stories.jsx +42 -0
- package/jsx/build/PageTemplates/ShowcasePage.stories.jsx.map +1 -0
- package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -1
- package/jsx/condition-builder/ConditionBuilder/props.mock.js +4 -2
- package/jsx/condition-builder/ConditionBuilder/props.mock.js.map +1 -1
- package/jsx/core/AppShell/AppShell.mocks.jsx +1 -1
- package/jsx/core/AppShell/AppShell.mocks.jsx.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.d.ts +1 -0
- package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.jsx +52 -15
- package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/core/Backdrop/Backdrop.stories.d.ts.map +1 -1
- package/jsx/core/Backdrop/Backdrop.stories.jsx +12 -12
- package/jsx/core/Backdrop/Backdrop.stories.jsx.map +1 -1
- package/jsx/core/Badges/Count.stories.jsx +1 -1
- package/jsx/core/Badges/Count.stories.jsx.map +1 -1
- package/jsx/core/Banner/Banner.stories.d.ts +8 -4
- package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
- package/jsx/core/Banner/Banner.stories.jsx +95 -46
- package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
- package/jsx/core/Currency/Currency.stories.d.ts +1 -1
- package/jsx/core/Currency/Currency.stories.d.ts.map +1 -1
- package/jsx/core/Dialog/Dialog.mocks.d.ts +26 -0
- package/jsx/core/Dialog/Dialog.mocks.d.ts.map +1 -0
- package/jsx/core/Dialog/Dialog.mocks.jsx +136 -0
- package/jsx/core/Dialog/Dialog.mocks.jsx.map +1 -0
- package/jsx/core/Dialog/Dialog.stories.d.ts +1 -1
- package/jsx/core/Dialog/Dialog.stories.d.ts.map +1 -1
- package/jsx/core/Dialog/Dialog.stories.jsx +78 -69
- package/jsx/core/Dialog/Dialog.stories.jsx.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
- package/jsx/core/Form/Form.stories.d.ts.map +1 -1
- package/jsx/core/Form/Form.stories.jsx +2 -2
- package/jsx/core/Form/Form.stories.jsx.map +1 -1
- package/jsx/core/Link/Link.stories.d.ts +8 -4
- package/jsx/core/Link/Link.stories.d.ts.map +1 -1
- package/jsx/core/Link/Link.stories.jsx +13 -30
- package/jsx/core/Link/Link.stories.jsx.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.mocks.jsx +47 -52
- package/jsx/core/ListToolbar/ListToolbar.mocks.jsx.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts +1 -2
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx +13 -18
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +1 -1
- package/jsx/core/LiveLog/LiveLog.mocks.d.ts +5 -0
- package/jsx/core/LiveLog/LiveLog.mocks.d.ts.map +1 -0
- package/jsx/core/LiveLog/LiveLog.mocks.jsx +47 -0
- package/jsx/core/LiveLog/LiveLog.mocks.jsx.map +1 -0
- package/jsx/core/LiveLog/LiveLog.stories.d.ts +9 -0
- package/jsx/core/LiveLog/LiveLog.stories.d.ts.map +1 -0
- package/jsx/core/LiveLog/LiveLog.stories.jsx +19 -0
- package/jsx/core/LiveLog/LiveLog.stories.jsx.map +1 -0
- package/jsx/core/Location/Location.stories.jsx +2 -2
- package/jsx/core/Location/Location.stories.jsx.map +1 -1
- package/jsx/core/MenuButton/MenuButton.stories.d.ts +1 -1
- package/jsx/core/MenuButton/MenuButton.stories.d.ts.map +1 -1
- package/jsx/core/Modal/Modal.mocks.d.ts +1 -1
- package/jsx/core/Modal/Modal.mocks.d.ts.map +1 -1
- package/jsx/core/MultiStepForm/MultiStepForm.stories.d.ts.map +1 -1
- package/jsx/core/MultiStepForm/MultiStepForm.stories.jsx +12 -2
- package/jsx/core/MultiStepForm/MultiStepForm.stories.jsx.map +1 -1
- package/jsx/core/Number/Number.stories.d.ts +1 -1
- package/jsx/core/Number/Number.stories.d.ts.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx +2 -2
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/core/Progress/Progress.stories.d.ts +7 -2
- package/jsx/core/Progress/Progress.stories.d.ts.map +1 -1
- package/jsx/core/Progress/Progress.stories.jsx +82 -51
- package/jsx/core/Progress/Progress.stories.jsx.map +1 -1
- package/jsx/core/Progress/Progress.styles.d.ts.map +1 -1
- package/jsx/core/Progress/Progress.styles.js +2 -1
- package/jsx/core/Progress/Progress.styles.js.map +1 -1
- package/jsx/core/QRCode/QRCode.stories.d.ts +9 -0
- package/jsx/core/QRCode/QRCode.stories.d.ts.map +1 -0
- package/jsx/core/QRCode/QRCode.stories.jsx +17 -0
- package/jsx/core/QRCode/QRCode.stories.jsx.map +1 -0
- package/jsx/core/SearchInput/SearchInput.stories.jsx +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx.map +1 -1
- package/jsx/core/Slider/Slider.stories.d.ts +1 -1
- package/jsx/core/Slider/Slider.stories.d.ts.map +1 -1
- package/jsx/core/SummaryItem/SummaryItem.stories.d.ts +1 -1
- package/jsx/core/SummaryItem/SummaryItem.stories.d.ts.map +1 -1
- package/jsx/core/Tree/Tree.stories.d.ts +1 -1
- package/jsx/core/Tree/Tree.stories.d.ts.map +1 -1
- package/jsx/core/Tree/Tree.stories.jsx +10 -18
- package/jsx/core/Tree/Tree.stories.jsx.map +1 -1
- package/jsx/core/URL/URL.stories.jsx +1 -1
- package/jsx/core/URL/URL.stories.jsx.map +1 -1
- package/jsx/cs/CSAppShell/CSAppShell.mocks.d.ts +18 -1
- package/jsx/cs/CSAppShell/CSAppShell.mocks.d.ts.map +1 -1
- package/jsx/cs/CSAppShell/CSAppShell.mocks.jsx +139 -4
- package/jsx/cs/CSAppShell/CSAppShell.mocks.jsx.map +1 -1
- package/jsx/cs/CSAppShell/CSAppShell.stories.d.ts.map +1 -1
- package/jsx/cs/CSAppShell/CSAppShell.stories.jsx +3 -33
- package/jsx/cs/CSAppShell/CSAppShell.stories.jsx.map +1 -1
- package/jsx/cs/CallControlPanel/CallControlPanel.mocks.d.ts +2 -2
- package/jsx/cs/CallControlPanel/CallControlPanel.mocks.d.ts.map +1 -1
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -1
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.jsx +1 -2
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.jsx.map +1 -1
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts +3 -1
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -1
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.jsx +18 -4
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.jsx.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.jsx +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
- package/jsx/dnd/StandardDragDropList/Popover.d.ts +1 -1
- package/jsx/dnd/StandardDragDropList/Popover.d.ts.map +1 -1
- package/jsx/dnd/StandardDragDropList/mockData.d.ts +2 -2
- package/jsx/dnd/StandardDragDropList/mockData.d.ts.map +1 -1
- package/jsx/rte/Editor/Editor.mocks.d.ts +7 -0
- package/jsx/rte/Editor/Editor.mocks.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.mocks.d.ts +2 -1
- package/jsx/social/Chat/Chat.mocks.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.mocks.js +26 -0
- package/jsx/social/Chat/Chat.mocks.js.map +1 -1
- package/jsx/social/Chat/Chat.stories.d.ts +5 -2
- package/jsx/social/Chat/Chat.stories.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.stories.jsx +35 -103
- package/jsx/social/Chat/Chat.stories.jsx.map +1 -1
- package/jsx/social/Email/Email.mocks.d.ts +50 -8
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
- package/jsx/social/Email/Email.mocks.jsx +130 -18
- package/jsx/social/Email/Email.mocks.jsx.map +1 -1
- package/jsx/social/Email/Email.stories.d.ts +10 -0
- package/jsx/social/Email/Email.stories.d.ts.map +1 -1
- package/jsx/social/Email/Email.stories.jsx +143 -23
- 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 +2 -2
- package/jsx/social/Feed/Feed.mocks.jsx.map +1 -1
- package/jsx/social/Feed/FeedPost.stories.d.ts.map +1 -1
- package/jsx/social/Feed/FeedPost.stories.jsx +1 -3
- package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -1
- package/jsx/tools/Clipboard/Clipboard.stories.d.ts.map +1 -1
- package/jsx/tools/Clipboard/Clipboard.stories.jsx +12 -14
- package/jsx/tools/Clipboard/Clipboard.stories.jsx.map +1 -1
- package/jsx/tools/DevTools/DevTools.stories.d.ts.map +1 -1
- package/jsx/tools/DevTools/DevTools.stories.jsx +2 -4
- package/jsx/tools/DevTools/DevTools.stories.jsx.map +1 -1
- package/jsx/tools/PreviewShell/PreviewShell.mocks.d.ts +13 -1
- package/jsx/tools/PreviewShell/PreviewShell.mocks.d.ts.map +1 -1
- package/jsx/tools/PreviewShell/PreviewShell.mocks.jsx +27 -2
- package/jsx/tools/PreviewShell/PreviewShell.mocks.jsx.map +1 -1
- package/jsx/tools/PreviewShell/PreviewShell.stories.d.ts +4 -2
- package/jsx/tools/PreviewShell/PreviewShell.stories.d.ts.map +1 -1
- package/jsx/tools/PreviewShell/PreviewShell.stories.jsx +77 -51
- package/jsx/tools/PreviewShell/PreviewShell.stories.jsx.map +1 -1
- package/jsx/tools/PreviewShell/PreviewShell.styles.d.ts +1 -2
- package/jsx/tools/PreviewShell/PreviewShell.styles.d.ts.map +1 -1
- package/jsx/tools/PreviewShell/PreviewShell.styles.js +1 -2
- package/jsx/tools/PreviewShell/PreviewShell.styles.js.map +1 -1
- package/jsx/work/CaseView/Attachments.mocks.d.ts.map +1 -1
- package/jsx/work/CaseView/Attachments.mocks.jsx +3 -3
- package/jsx/work/CaseView/Attachments.mocks.jsx.map +1 -1
- package/jsx/work/CaseView/CaseView.mocks.d.ts +4 -16
- package/jsx/work/CaseView/CaseView.mocks.d.ts.map +1 -1
- package/jsx/work/CaseView/CaseView.mocks.jsx +25 -13
- package/jsx/work/CaseView/CaseView.mocks.jsx.map +1 -1
- package/jsx/work/CaseView/CaseView.stories.jsx +2 -3
- package/jsx/work/CaseView/CaseView.stories.jsx.map +1 -1
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.jsx +9 -2
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts +1 -1
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.jsx +21 -2
- package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
- package/jsx/work/Stages/Stages.mocks.jsx +6 -6
- package/jsx/work/Stages/Stages.mocks.jsx.map +1 -1
- package/jsx/work/Stages/Stages.stories.d.ts.map +1 -1
- package/jsx/work/Stages/Stages.stories.jsx +22 -8
- package/jsx/work/Stages/Stages.stories.jsx.map +1 -1
- package/jsx/work/Tasks/Tasks.stories.d.ts.map +1 -1
- package/jsx/work/Tasks/Tasks.stories.jsx +15 -13
- package/jsx/work/Tasks/Tasks.stories.jsx.map +1 -1
- package/jsx/work/Timeline/Timeline.stories.jsx +1 -1
- package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -1
- package/jsx/wss/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/wss/AppShell/AppShell.stories.jsx +18 -0
- package/jsx/wss/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/wss/CaseView/CaseView.stories.jsx +1 -1
- package/jsx/wss/CaseView/CaseView.stories.jsx.map +1 -1
- package/lib/build/AppShell/AppShell.mocks.d.ts +18 -55
- package/lib/build/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.mocks.js +249 -376
- package/lib/build/AppShell/AppShell.mocks.js.map +1 -1
- package/lib/build/AppShell/AppShell.stories.d.ts +13 -10
- package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.stories.js +70 -98
- package/lib/build/AppShell/AppShell.stories.js.map +1 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts +2 -0
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts.map +1 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.js +23 -0
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.js.map +1 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts.map +1 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.js +4 -4
- package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.js.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.stories.js +119 -9
- package/lib/build/FlowModeller/FlowModeller.stories.js.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.js +44 -4
- package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
- package/lib/build/MobileBuildSummary/MobileBuildSummary.mocks.d.ts +1 -0
- package/lib/build/MobileBuildSummary/MobileBuildSummary.mocks.d.ts.map +1 -1
- package/lib/build/MobileBuildSummary/MobileBuildSummary.mocks.js +2 -1
- package/lib/build/MobileBuildSummary/MobileBuildSummary.mocks.js.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts +3 -2
- package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js +2 -0
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js.map +1 -1
- package/lib/build/PageBanner/PageBanner.stories.d.ts +15 -0
- package/lib/build/PageBanner/PageBanner.stories.d.ts.map +1 -0
- package/lib/build/PageBanner/PageBanner.stories.js +42 -0
- package/lib/build/PageBanner/PageBanner.stories.js.map +1 -0
- package/lib/build/PageTemplates/GalleryPage.mocks.d.ts +0 -2
- package/lib/build/PageTemplates/GalleryPage.mocks.d.ts.map +1 -1
- package/lib/build/PageTemplates/GalleryPage.mocks.js +1 -50
- package/lib/build/PageTemplates/GalleryPage.mocks.js.map +1 -1
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts +7 -3
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -1
- package/lib/build/PageTemplates/GalleryPage.stories.js +32 -31
- package/lib/build/PageTemplates/GalleryPage.stories.js.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.mocks.d.ts +0 -1
- package/lib/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.mocks.js +2 -154
- package/lib/build/PageTemplates/PageTemplates.mocks.js.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.js +4 -5
- package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/build/PageTemplates/ShowcasePage.stories.d.ts +17 -0
- package/lib/build/PageTemplates/ShowcasePage.stories.d.ts.map +1 -0
- package/lib/build/PageTemplates/ShowcasePage.stories.js +43 -0
- package/lib/build/PageTemplates/ShowcasePage.stories.js.map +1 -0
- package/lib/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -1
- package/lib/condition-builder/ConditionBuilder/props.mock.js +4 -2
- package/lib/condition-builder/ConditionBuilder/props.mock.js.map +1 -1
- package/lib/core/AppShell/AppShell.mocks.js +1 -1
- package/lib/core/AppShell/AppShell.mocks.js.map +1 -1
- package/lib/core/AppShell/AppShell.stories.d.ts +1 -0
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.stories.js +52 -15
- package/lib/core/AppShell/AppShell.stories.js.map +1 -1
- package/lib/core/Backdrop/Backdrop.stories.d.ts.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/Count.stories.js +1 -1
- package/lib/core/Badges/Count.stories.js.map +1 -1
- package/lib/core/Banner/Banner.stories.d.ts +8 -4
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
- package/lib/core/Banner/Banner.stories.js +92 -32
- package/lib/core/Banner/Banner.stories.js.map +1 -1
- package/lib/core/Currency/Currency.stories.d.ts +1 -1
- package/lib/core/Currency/Currency.stories.d.ts.map +1 -1
- package/lib/core/Dialog/Dialog.mocks.d.ts +26 -0
- package/lib/core/Dialog/Dialog.mocks.d.ts.map +1 -0
- package/lib/core/Dialog/Dialog.mocks.js +132 -0
- package/lib/core/Dialog/Dialog.mocks.js.map +1 -0
- package/lib/core/Dialog/Dialog.stories.d.ts +1 -1
- package/lib/core/Dialog/Dialog.stories.d.ts.map +1 -1
- package/lib/core/Dialog/Dialog.stories.js +65 -41
- package/lib/core/Dialog/Dialog.stories.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
- package/lib/core/Form/Form.stories.d.ts.map +1 -1
- package/lib/core/Form/Form.stories.js +2 -2
- package/lib/core/Form/Form.stories.js.map +1 -1
- package/lib/core/Link/Link.stories.d.ts +8 -4
- package/lib/core/Link/Link.stories.d.ts.map +1 -1
- package/lib/core/Link/Link.stories.js +6 -9
- package/lib/core/Link/Link.stories.js.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.mocks.js +26 -33
- package/lib/core/ListToolbar/ListToolbar.mocks.js.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.stories.d.ts +1 -2
- package/lib/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.stories.js +23 -20
- package/lib/core/ListToolbar/ListToolbar.stories.js.map +1 -1
- package/lib/core/LiveLog/LiveLog.mocks.d.ts +5 -0
- package/lib/core/LiveLog/LiveLog.mocks.d.ts.map +1 -0
- package/lib/core/LiveLog/LiveLog.mocks.js +29 -0
- package/lib/core/LiveLog/LiveLog.mocks.js.map +1 -0
- package/lib/core/LiveLog/LiveLog.stories.d.ts +9 -0
- package/lib/core/LiveLog/LiveLog.stories.d.ts.map +1 -0
- package/lib/core/LiveLog/LiveLog.stories.js +20 -0
- package/lib/core/LiveLog/LiveLog.stories.js.map +1 -0
- package/lib/core/Location/Location.stories.js +2 -2
- package/lib/core/Location/Location.stories.js.map +1 -1
- package/lib/core/MenuButton/MenuButton.stories.d.ts +1 -1
- package/lib/core/MenuButton/MenuButton.stories.d.ts.map +1 -1
- package/lib/core/Modal/Modal.mocks.d.ts +1 -1
- package/lib/core/Modal/Modal.mocks.d.ts.map +1 -1
- package/lib/core/MultiStepForm/MultiStepForm.stories.d.ts.map +1 -1
- package/lib/core/MultiStepForm/MultiStepForm.stories.js +12 -2
- package/lib/core/MultiStepForm/MultiStepForm.stories.js.map +1 -1
- package/lib/core/Number/Number.stories.d.ts +1 -1
- package/lib/core/Number/Number.stories.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.js +2 -2
- package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/core/Progress/Progress.stories.d.ts +7 -2
- package/lib/core/Progress/Progress.stories.d.ts.map +1 -1
- package/lib/core/Progress/Progress.stories.js +68 -44
- package/lib/core/Progress/Progress.stories.js.map +1 -1
- package/lib/core/Progress/Progress.styles.d.ts.map +1 -1
- package/lib/core/Progress/Progress.styles.js +2 -1
- package/lib/core/Progress/Progress.styles.js.map +1 -1
- package/lib/core/QRCode/QRCode.stories.d.ts +9 -0
- package/lib/core/QRCode/QRCode.stories.d.ts.map +1 -0
- package/lib/core/QRCode/QRCode.stories.js +18 -0
- package/lib/core/QRCode/QRCode.stories.js.map +1 -0
- package/lib/core/SearchInput/SearchInput.stories.js +1 -1
- package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
- package/lib/core/Slider/Slider.stories.d.ts +1 -1
- package/lib/core/Slider/Slider.stories.d.ts.map +1 -1
- package/lib/core/SummaryItem/SummaryItem.stories.d.ts +1 -1
- package/lib/core/SummaryItem/SummaryItem.stories.d.ts.map +1 -1
- package/lib/core/Tree/Tree.stories.d.ts +1 -1
- package/lib/core/Tree/Tree.stories.d.ts.map +1 -1
- package/lib/core/Tree/Tree.stories.js +10 -20
- 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/CSAppShell/CSAppShell.mocks.d.ts +18 -1
- package/lib/cs/CSAppShell/CSAppShell.mocks.d.ts.map +1 -1
- package/lib/cs/CSAppShell/CSAppShell.mocks.js +109 -4
- package/lib/cs/CSAppShell/CSAppShell.mocks.js.map +1 -1
- package/lib/cs/CSAppShell/CSAppShell.stories.d.ts.map +1 -1
- package/lib/cs/CSAppShell/CSAppShell.stories.js +4 -17
- package/lib/cs/CSAppShell/CSAppShell.stories.js.map +1 -1
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts +2 -2
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts.map +1 -1
- package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -1
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js +1 -2
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js.map +1 -1
- package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts +3 -1
- package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -1
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js +18 -4
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.js +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
- package/lib/dnd/StandardDragDropList/Popover.d.ts +1 -1
- package/lib/dnd/StandardDragDropList/Popover.d.ts.map +1 -1
- package/lib/dnd/StandardDragDropList/mockData.d.ts +2 -2
- package/lib/dnd/StandardDragDropList/mockData.d.ts.map +1 -1
- package/lib/rte/Editor/Editor.mocks.d.ts +7 -0
- package/lib/rte/Editor/Editor.mocks.d.ts.map +1 -1
- package/lib/social/Chat/Chat.mocks.d.ts +2 -1
- package/lib/social/Chat/Chat.mocks.d.ts.map +1 -1
- package/lib/social/Chat/Chat.mocks.js +26 -0
- package/lib/social/Chat/Chat.mocks.js.map +1 -1
- package/lib/social/Chat/Chat.stories.d.ts +5 -2
- package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
- package/lib/social/Chat/Chat.stories.js +36 -78
- package/lib/social/Chat/Chat.stories.js.map +1 -1
- package/lib/social/Email/Email.mocks.d.ts +50 -8
- package/lib/social/Email/Email.mocks.d.ts.map +1 -1
- package/lib/social/Email/Email.mocks.js +130 -18
- package/lib/social/Email/Email.mocks.js.map +1 -1
- package/lib/social/Email/Email.stories.d.ts +10 -0
- package/lib/social/Email/Email.stories.d.ts.map +1 -1
- package/lib/social/Email/Email.stories.js +148 -23
- 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 +2 -2
- package/lib/social/Feed/Feed.mocks.js.map +1 -1
- package/lib/social/Feed/FeedPost.stories.d.ts.map +1 -1
- package/lib/social/Feed/FeedPost.stories.js +1 -1
- package/lib/social/Feed/FeedPost.stories.js.map +1 -1
- package/lib/tools/Clipboard/Clipboard.stories.d.ts.map +1 -1
- package/lib/tools/Clipboard/Clipboard.stories.js +13 -17
- package/lib/tools/Clipboard/Clipboard.stories.js.map +1 -1
- package/lib/tools/DevTools/DevTools.stories.d.ts.map +1 -1
- package/lib/tools/DevTools/DevTools.stories.js +2 -4
- package/lib/tools/DevTools/DevTools.stories.js.map +1 -1
- package/lib/tools/PreviewShell/PreviewShell.mocks.d.ts +13 -1
- package/lib/tools/PreviewShell/PreviewShell.mocks.d.ts.map +1 -1
- package/lib/tools/PreviewShell/PreviewShell.mocks.js +23 -2
- package/lib/tools/PreviewShell/PreviewShell.mocks.js.map +1 -1
- package/lib/tools/PreviewShell/PreviewShell.stories.d.ts +4 -2
- package/lib/tools/PreviewShell/PreviewShell.stories.d.ts.map +1 -1
- package/lib/tools/PreviewShell/PreviewShell.stories.js +72 -52
- package/lib/tools/PreviewShell/PreviewShell.stories.js.map +1 -1
- package/lib/tools/PreviewShell/PreviewShell.styles.d.ts +1 -2
- package/lib/tools/PreviewShell/PreviewShell.styles.d.ts.map +1 -1
- package/lib/tools/PreviewShell/PreviewShell.styles.js +1 -2
- package/lib/tools/PreviewShell/PreviewShell.styles.js.map +1 -1
- package/lib/work/CaseView/Attachments.mocks.d.ts.map +1 -1
- package/lib/work/CaseView/Attachments.mocks.js +3 -3
- package/lib/work/CaseView/Attachments.mocks.js.map +1 -1
- package/lib/work/CaseView/CaseView.mocks.d.ts +4 -16
- package/lib/work/CaseView/CaseView.mocks.d.ts.map +1 -1
- package/lib/work/CaseView/CaseView.mocks.js +25 -13
- package/lib/work/CaseView/CaseView.mocks.js.map +1 -1
- package/lib/work/CaseView/CaseView.stories.js +2 -3
- package/lib/work/CaseView/CaseView.stories.js.map +1 -1
- package/lib/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/lib/work/IntelligentGuidance/IntelligentGuidance.stories.js +9 -2
- package/lib/work/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.mocks.d.ts +1 -1
- package/lib/work/SearchResults/SearchResults.mocks.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js +21 -2
- package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
- package/lib/work/Stages/Stages.mocks.js +6 -6
- package/lib/work/Stages/Stages.mocks.js.map +1 -1
- package/lib/work/Stages/Stages.stories.d.ts.map +1 -1
- package/lib/work/Stages/Stages.stories.js +22 -8
- package/lib/work/Stages/Stages.stories.js.map +1 -1
- package/lib/work/Tasks/Tasks.stories.d.ts.map +1 -1
- package/lib/work/Tasks/Tasks.stories.js +2 -2
- package/lib/work/Tasks/Tasks.stories.js.map +1 -1
- package/lib/work/Timeline/Timeline.stories.js +1 -1
- package/lib/work/Timeline/Timeline.stories.js.map +1 -1
- package/lib/wss/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/wss/AppShell/AppShell.stories.js +18 -0
- package/lib/wss/AppShell/AppShell.stories.js.map +1 -1
- package/lib/wss/CaseView/CaseView.stories.js +1 -1
- package/lib/wss/CaseView/CaseView.stories.js.map +1 -1
- package/package.json +12 -11
- package/jsx/build/AppHeader/AppHeader.stories.d.ts +0 -13
- package/jsx/build/AppHeader/AppHeader.stories.d.ts.map +0 -1
- package/jsx/build/AppHeader/AppHeader.stories.jsx +0 -153
- package/jsx/build/AppHeader/AppHeader.stories.jsx.map +0 -1
- package/lib/build/AppHeader/AppHeader.stories.d.ts +0 -13
- package/lib/build/AppHeader/AppHeader.stories.d.ts.map +0 -1
- package/lib/build/AppHeader/AppHeader.stories.js +0 -152
- package/lib/build/AppHeader/AppHeader.stories.js.map +0 -1
|
@@ -1,79 +1,88 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Button, Flex, Text, useElement, InfoDialog, SummaryList } from '@pega/cosmos-react-core';
|
|
3
|
+
import { FieldValueListDemo } from '../FieldValueList/FieldValueList.stories';
|
|
4
|
+
import { ItemDialog, useMockItems } from './Dialog.mocks';
|
|
4
5
|
export default {
|
|
5
|
-
title: 'Core/Dialog'
|
|
6
|
-
component: Dialog
|
|
6
|
+
title: 'Core/Dialog'
|
|
7
7
|
};
|
|
8
|
-
export const
|
|
9
|
-
const
|
|
8
|
+
export const InfoDialogDemo = () => {
|
|
9
|
+
const [target, setTarget] = useElement(null);
|
|
10
10
|
return (<>
|
|
11
|
-
<Button variant='secondary' {
|
|
11
|
+
<Button variant='secondary' onClick={(e) => {
|
|
12
|
+
setTarget(e.currentTarget);
|
|
13
|
+
}}>
|
|
12
14
|
Open dialog
|
|
13
15
|
</Button>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
{target && (<InfoDialog heading='General information' target={target} onDismiss={() => setTarget(null)}>
|
|
18
|
+
<Flex container={{ direction: 'column', gap: 2 }}>
|
|
19
|
+
<Text as='p'>
|
|
20
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
|
|
21
|
+
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
|
|
22
|
+
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
23
|
+
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
24
|
+
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
|
|
25
|
+
mollit anim id est laborum.
|
|
26
|
+
</Text>
|
|
27
|
+
<FieldValueListDemo name='Demo field' value='demo value'/>
|
|
28
|
+
</Flex>
|
|
29
|
+
</InfoDialog>)}
|
|
17
30
|
</>);
|
|
18
31
|
};
|
|
19
32
|
export const FormDialogDemo = () => {
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
</Flex>
|
|
75
|
-
</Dialog>
|
|
76
|
-
</CardContent>
|
|
77
|
-
</Card>);
|
|
33
|
+
const [dialogTarget, setDialogTarget] = useState(null);
|
|
34
|
+
const [editItem, setEditItem] = useState(null);
|
|
35
|
+
const [items, dispatch] = useMockItems();
|
|
36
|
+
return (<>
|
|
37
|
+
<SummaryList name='Editable items' icon='list' count={items.length} actions={[
|
|
38
|
+
{
|
|
39
|
+
id: 'Add',
|
|
40
|
+
text: 'Add',
|
|
41
|
+
icon: 'plus',
|
|
42
|
+
onClick: (_, e) => {
|
|
43
|
+
setDialogTarget(e.currentTarget);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
]} items={items.map(({ id, name, category }) => {
|
|
47
|
+
return {
|
|
48
|
+
id,
|
|
49
|
+
primary: name,
|
|
50
|
+
secondary: <Text variant='secondary'>{category}</Text>,
|
|
51
|
+
actions: [
|
|
52
|
+
{
|
|
53
|
+
id: 'Edit',
|
|
54
|
+
text: 'Edit',
|
|
55
|
+
icon: 'pencil',
|
|
56
|
+
onClick: (_, e, menuButton) => {
|
|
57
|
+
if (menuButton)
|
|
58
|
+
setDialogTarget(menuButton);
|
|
59
|
+
setEditItem({
|
|
60
|
+
id,
|
|
61
|
+
name,
|
|
62
|
+
category
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'Remove',
|
|
68
|
+
text: 'Remove',
|
|
69
|
+
icon: 'trash',
|
|
70
|
+
onClick: () => {
|
|
71
|
+
dispatch({ type: 'remove', item: { id } });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
};
|
|
76
|
+
})}/>
|
|
77
|
+
|
|
78
|
+
{dialogTarget && (<ItemDialog target={dialogTarget} item={editItem} dispatch={fields => {
|
|
79
|
+
dispatch(editItem
|
|
80
|
+
? { type: 'edit', item: { id: editItem.id, ...fields } }
|
|
81
|
+
: { type: 'add', item: { ...fields } });
|
|
82
|
+
}} onComplete={() => {
|
|
83
|
+
setDialogTarget(null);
|
|
84
|
+
setEditItem(null);
|
|
85
|
+
}}/>)}
|
|
86
|
+
</>);
|
|
78
87
|
};
|
|
79
88
|
//# sourceMappingURL=Dialog.stories.jsx.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.stories.jsx","sourceRoot":"","sources":["../../../src/core/Dialog/Dialog.stories.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"Dialog.stories.jsx","sourceRoot":"","sources":["../../../src/core/Dialog/Dialog.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,QAAQ,EAAE,MAAM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I,EAAE,OAAO;wBACb,OAAO,EAAE,GAAG,EAAE;4BACZ,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;wBAC7C,CAAC;qBACF;iBACF;aACF,CAAC;QACJ,CAAC,CAAC,CAAC,EAGL;;MAAA,CAAC,YAAY,IAAI,CACf,CAAC,UAAU,CACT,MAAM,CAAC,CAAC,YAAY,CAAC,CACrB,IAAI,CAAC,CAAC,QAAQ,CAAC,CAEf,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE;gBACjB,QAAQ,CACN,QAAQ;oBACN,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE;oBACxD,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CACzC,CAAC;YACJ,CAAC,CAAC,CACF,UAAU,CAAC,CAAC,GAAG,EAAE;gBACf,eAAe,CAAC,IAAI,CAAC,CAAC;gBACtB,WAAW,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC,CAAC,EACF,CACH,CACH;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { MouseEvent, useState } from 'react';\n\nimport {\n Button,\n Flex,\n Text,\n useElement,\n InfoDialog,\n SummaryList,\n SummaryListItem\n} from '@pega/cosmos-react-core';\n\nimport { FieldValueListDemo } from '../FieldValueList/FieldValueList.stories';\n\nimport { ItemDialog, MockItem, MockItemDialogProps, useMockItems } from './Dialog.mocks';\n\nexport default {\n title: 'Core/Dialog'\n} as Meta;\n\n// InfoDialogDemo\nexport const InfoDialogDemo: Story = () => {\n const [target, setTarget] = useElement<HTMLButtonElement>(null);\n\n return (\n <>\n <Button\n variant='secondary'\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n setTarget(e.currentTarget);\n }}\n >\n Open dialog\n </Button>\n\n {target && (\n <InfoDialog heading='General information' target={target} onDismiss={() => setTarget(null)}>\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Text as='p'>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\n incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud\n exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure\n dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt\n mollit anim id est laborum.\n </Text>\n <FieldValueListDemo name='Demo field' value='demo value' />\n </Flex>\n </InfoDialog>\n )}\n </>\n );\n};\n\n// FormDialogDemo\nexport const FormDialogDemo: Story = () => {\n const [dialogTarget, setDialogTarget] = useState<MockItemDialogProps['target'] | null>(null);\n const [editItem, setEditItem] = useState<MockItem | null>(null);\n const [items, dispatch] = useMockItems();\n\n return (\n <>\n <SummaryList\n name='Editable items'\n icon='list'\n count={items.length}\n actions={[\n {\n id: 'Add',\n text: 'Add',\n icon: 'plus',\n onClick: (_, e) => {\n setDialogTarget(e.currentTarget);\n }\n }\n ]}\n items={items.map<SummaryListItem>(({ id, name, category }) => {\n return {\n id,\n primary: name,\n secondary: <Text variant='secondary'>{category}</Text>,\n actions: [\n {\n id: 'Edit',\n text: 'Edit',\n icon: 'pencil',\n onClick: (_, e, menuButton) => {\n if (menuButton) setDialogTarget(menuButton);\n\n setEditItem({\n id,\n name,\n category\n });\n }\n },\n {\n id: 'Remove',\n text: 'Remove',\n icon: 'trash',\n onClick: () => {\n dispatch({ type: 'remove', item: { id } });\n }\n }\n ]\n };\n })}\n />\n\n {dialogTarget && (\n <ItemDialog\n target={dialogTarget}\n item={editItem}\n // Wrap dispatch so the dialog can only affect the item it creates or updates.\n dispatch={fields => {\n dispatch(\n editItem\n ? { type: 'edit', item: { id: editItem.id, ...fields } }\n : { type: 'add', item: { ...fields } }\n );\n }}\n onComplete={() => {\n setDialogTarget(null);\n setEditItem(null);\n }}\n />\n )}\n </>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroupList.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroupList.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,uBAAuB,EAMxB,MAAM,yBAAyB,CAAC;AAEjC,
|
|
1
|
+
{"version":3,"file":"FieldGroupList.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroupList.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,uBAAuB,EAMxB,MAAM,yBAAyB,CAAC;AAEjC,KAAK,wBAAwB,GACzB;IACE,MAAM,EAAE,KAAK,CAAC;CACf,GACD;IACE,MAAM,EAAE,QAAQ,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEN,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;CACxD;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,cAChB,SAAS,yBAAyB,SAAS,KAAK,WAAW,GAAG,IAAI,aAErE,uBAAuB,EAAE,WACvB,wBAAwB,KAChC,uBAAuB,EAoBzB,CAAC;AAEJ,eAAO,MAAM,iBAAiB,oBAAqB,SAAS,uBAM3D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,SAQ3B,CAAC;AAEF,eAAO,MAAM,qBAAqB,oBAAqB,SAAS,uBAmC/D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,SAQ/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,oBAAqB,SAAS,uBAoBhE,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,SAOhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Form/Form.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAe/C,wBAeU;AACV,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,cAAc,CASvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,cAAc,CAE/C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,cAAc,CAE/C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,cAAc,CAEjD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,cAAc,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"Form.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Form/Form.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAe/C,wBAeU;AACV,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,cAAc,CASvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,cAAc,CAE/C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,cAAc,CAE/C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,cAAc,CAEjD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,cAAc,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,CAqD5E,CAAC;AAUF,UAAU,qBAAsB,SAAQ,cAAc;IACpD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,qBAAqB,CAwBzD,CAAC"}
|
|
@@ -40,8 +40,8 @@ export const SimpleFormDemo = (args) => {
|
|
|
40
40
|
Submit
|
|
41
41
|
</Button>
|
|
42
42
|
</>);
|
|
43
|
-
const successBanner = (<Banner
|
|
44
|
-
const errorBanner = (<Banner
|
|
43
|
+
const successBanner = (<Banner variant='success' messages={['Form submitted', `Input value: ${success}`]}/>);
|
|
44
|
+
const errorBanner = (<Banner variant='urgent' messages={['All required fields in the form must be completed.']}/>);
|
|
45
45
|
const banner = success ? successBanner : errorBanner;
|
|
46
46
|
return (<Form banners={args.withBanners ? banner : undefined} actions={actions} heading={args.heading} description={args.description} onSubmit={(e) => {
|
|
47
47
|
e.preventDefault();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.stories.jsx","sourceRoot":"","sources":["../../../src/core/Form/Form.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0B,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EACL,MAAM,EACN,MAAM,EACN,aAAa,EACb,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,KAAK,EACN,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEhE,eAAe;IACb,KAAK,EAAE,WAAW;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AC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { ChangeEvent, FormEvent, useState } from 'react';\n\nimport {\n Banner,\n Button,\n Configuration,\n Flex,\n Form,\n FormField,\n Input\n} from '@pega/cosmos-react-core';\n\nimport { FormContent, ReadOnlyFormContent } from './Form.mocks';\n\nexport default {\n title: 'Core/Form',\n component: Form,\n subcomponents: {\n FormField\n },\n excludeStories: ['ConfigurableForm'],\n args: {\n heading: 'Form demo',\n description: ''\n },\n argTypes: {\n heading: { control: { type: 'text' } },\n description: { control: { type: 'text' } }\n }\n} as Meta;\ninterface FormStoryProps {\n heading?: string;\n description?: string;\n}\n\nexport const ReadOnlyOneColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return (\n <ReadOnlyFormContent\n cols={1}\n heading={args.heading}\n description={args.description}\n showActions\n />\n );\n};\n\nexport const OneColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={1} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const TwoColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={2} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const ThreeColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={3} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const SimpleFormDemo: Story<FormStoryProps & { withBanners?: boolean }> = (\n args: FormStoryProps & { withBanners?: boolean }\n) => {\n const [inputValue, setInputValue] = useState('');\n const [success, setSuccess] = useState('');\n\n const actions = (\n <>\n <Button name='Cancel' variant='secondary' onClick={() => setInputValue('')}>\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary'>\n Submit\n </Button>\n </>\n );\n\n const successBanner = (\n <Banner variant='success' messages={['Form submitted', `Input value: ${success}`]} />\n );\n\n const errorBanner = (\n <Banner variant='urgent' messages={['All required fields in the form must be completed.']} />\n );\n\n const banner = success ? successBanner : errorBanner;\n\n return (\n <Form\n banners={args.withBanners ? banner : undefined}\n actions={actions}\n heading={args.heading}\n description={args.description}\n onSubmit={(e: FormEvent) => {\n e.preventDefault();\n setSuccess(inputValue);\n setInputValue('');\n }}\n >\n <Flex container={{ direction: 'column', itemGap: 2 }}>\n <Input\n label='Name'\n info='Enter your first name'\n required\n value={inputValue}\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n setSuccess('');\n setInputValue(e.target.value);\n }}\n />\n </Flex>\n </Form>\n );\n};\n\nSimpleFormDemo.args = {\n withBanners: false\n};\n\nSimpleFormDemo.argTypes = {\n withBanners: { control: { type: 'boolean' } }\n};\n\ninterface ConfigurableFormProps extends FormStoryProps {\n foregroundColor?: string;\n backgroundColor?: string;\n borderColor?: string;\n borderWidth?: string;\n borderRadius?: number;\n hoverBorderColor?: string;\n focusBorderColor?: string;\n}\n\nexport const ConfigurableForm: Story<ConfigurableFormProps> = (args: ConfigurableFormProps) => {\n return (\n <Configuration\n theme={{\n components: {\n 'form-control': {\n 'foreground-color': args.foregroundColor,\n 'background-color': args.backgroundColor,\n 'border-color': args.borderColor,\n 'border-width': args.borderWidth,\n 'border-radius': args.borderRadius,\n ':hover': {\n 'border-color': args.hoverBorderColor\n },\n ':focus': {\n 'border-color': args.focusBorderColor\n }\n }\n }\n }}\n >\n <FormContent cols={2} showActions />\n </Configuration>\n );\n};\n\nConfigurableForm.args = {\n foregroundColor: '#054a8a',\n backgroundColor: '#e2f1ff',\n borderColor: '#939393',\n borderWidth: '0.0625rem',\n borderRadius: 0.5,\n hoverBorderColor: '#3f3f3f',\n focusBorderColor: 'transparent'\n};\n\nConfigurableForm.argTypes = {\n foregroundColor: { control: { type: 'color' } },\n backgroundColor: { control: { type: 'color' } },\n borderColor: { control: { type: 'color' } },\n borderWidth: { control: { type: 'text' } },\n borderRadius: { control: { type: 'number' } },\n hoverBorderColor: { control: { type: 'color' } },\n focusBorderColor: { control: { type: 'color' } },\n heading: { table: { disable: true } },\n description: { table: { disable: true } }\n};\n"]}
|
|
@@ -2,8 +2,12 @@ import { Meta, Story } from '@storybook/react';
|
|
|
2
2
|
import { LinkProps } from '@pega/cosmos-react-core';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
interface LinkStoryArgs extends Pick<LinkProps, 'variant'> {
|
|
6
|
+
}
|
|
7
|
+
interface PreviewableLinkStoryArgs extends LinkStoryArgs, Pick<LinkProps, 'onPreview'> {
|
|
8
|
+
}
|
|
9
|
+
export declare const LinkDemo: Story<LinkStoryArgs>;
|
|
10
|
+
export declare const ExternalLinkDemo: Story<LinkStoryArgs>;
|
|
11
|
+
export declare const PreviewableLink: Story<PreviewableLinkStoryArgs>;
|
|
12
|
+
export declare const MultiplePreviewableLinks: Story<PreviewableLinkStoryArgs>;
|
|
9
13
|
//# sourceMappingURL=Link.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Link/Link.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,
|
|
1
|
+
{"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Link/Link.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAA4B,SAAS,EAAE,MAAM,yBAAyB,CAAC;;AAK9E,wBAYU;AAEV,UAAU,aAAc,SAAQ,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC;CAAG;AAC7D,UAAU,wBAAyB,SAAQ,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC;CAAG;AAEzF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,aAAa,CAMzC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAMjD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,wBAAwB,CAa3D,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,wBAAwB,CAuBpE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { action } from '@storybook/addon-actions';
|
|
2
|
-
import {
|
|
2
|
+
import { registerIcon, Flex, Link } from '@pega/cosmos-react-core';
|
|
3
3
|
import * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';
|
|
4
4
|
registerIcon(plusIcon);
|
|
5
5
|
export default {
|
|
@@ -16,44 +16,27 @@ export default {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
export const LinkDemo = (args) => {
|
|
19
|
-
return (<Link href='
|
|
20
|
-
|
|
19
|
+
return (<Link href='/' variant={args.variant}>
|
|
20
|
+
Link text
|
|
21
21
|
</Link>);
|
|
22
22
|
};
|
|
23
|
-
export const
|
|
24
|
-
return (<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</Link>
|
|
28
|
-
<Link href='http://www.pega.com' variant='secondary' icon target='_blank'>
|
|
29
|
-
<Icon name='plus'/>
|
|
30
|
-
</Link>
|
|
31
|
-
<Link href='http://www.pega.com' variant='simple' icon target='_blank'>
|
|
32
|
-
<Icon name='plus'/>
|
|
33
|
-
</Link>
|
|
34
|
-
<Link href='http://www.pega.com' variant='link' icon target='_blank'>
|
|
35
|
-
<Icon name='plus'/>
|
|
36
|
-
</Link>
|
|
37
|
-
<Link href='http://www.pega.com' variant='text' icon target='_blank'>
|
|
38
|
-
<Icon name='plus'/>
|
|
39
|
-
</Link>
|
|
40
|
-
</Flex>);
|
|
41
|
-
};
|
|
42
|
-
LinkWithIconDemo.argTypes = {
|
|
43
|
-
variant: { table: { disable: true } }
|
|
23
|
+
export const ExternalLinkDemo = (args) => {
|
|
24
|
+
return (<Link href='http://www.pega.com' variant={args.variant}>
|
|
25
|
+
Visit Pega!
|
|
26
|
+
</Link>);
|
|
44
27
|
};
|
|
45
28
|
export const PreviewableLink = (args) => {
|
|
46
|
-
return (<Link href='
|
|
47
|
-
|
|
29
|
+
return (<Link href='#ID-123456' variant={args.variant} previewable onPreview={args.onPreview || action('Preview activated')}>
|
|
30
|
+
ID-123456
|
|
48
31
|
</Link>);
|
|
49
32
|
};
|
|
50
33
|
export const MultiplePreviewableLinks = (args) => {
|
|
51
34
|
return (<Flex container={{ gap: 2 }}>
|
|
52
|
-
<Link href='
|
|
53
|
-
|
|
35
|
+
<Link href='#ID-123456' variant={args.variant} previewable onPreview={args.onPreview || action('Preview activated')}>
|
|
36
|
+
ID-123456
|
|
54
37
|
</Link>
|
|
55
|
-
<Link href='
|
|
56
|
-
|
|
38
|
+
<Link href='#ID-ABCDEF' variant={args.variant} previewable onPreview={args.onPreview || action('Preview activated')}>
|
|
39
|
+
ID-ABCDEF
|
|
57
40
|
</Link>
|
|
58
41
|
</Flex>);
|
|
59
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.stories.jsx","sourceRoot":"","sources":["../../../src/core/Link/Link.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Link.stories.jsx","sourceRoot":"","sources":["../../../src/core/Link/Link.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAa,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AAExF,YAAY,CAAC,QAAQ,CAAC,CAAC;AAEvB,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;KAChB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO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AAC,mBAAmB,CAAC,CAAC,CAEzD;;MACF,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CACH,IAAI,CAAC,YAAY,CACjB,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CACtB,WAAW,CACX,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAEzD;;MACF,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { action } from '@storybook/addon-actions';\n\nimport { registerIcon, Flex, Link, LinkProps } from '@pega/cosmos-react-core';\nimport * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';\n\nregisterIcon(plusIcon);\n\nexport default {\n title: 'Core/Link',\n component: Link,\n args: {\n variant: 'link'\n },\n argTypes: {\n variant: {\n options: ['link', 'primary', 'secondary', 'simple', 'text'],\n control: { type: 'select' }\n }\n }\n} as Meta;\n\ninterface LinkStoryArgs extends Pick<LinkProps, 'variant'> {}\ninterface PreviewableLinkStoryArgs extends LinkStoryArgs, Pick<LinkProps, 'onPreview'> {}\n\nexport const LinkDemo: Story<LinkStoryArgs> = (args: LinkStoryArgs) => {\n return (\n <Link href='/' variant={args.variant}>\n Link text\n </Link>\n );\n};\n\nexport const ExternalLinkDemo: Story<LinkStoryArgs> = (args: LinkStoryArgs) => {\n return (\n <Link href='http://www.pega.com' variant={args.variant}>\n Visit Pega!\n </Link>\n );\n};\n\nexport const PreviewableLink: Story<PreviewableLinkStoryArgs> = (\n args: PreviewableLinkStoryArgs\n) => {\n return (\n <Link\n href='#ID-123456'\n variant={args.variant}\n previewable\n onPreview={args.onPreview || action('Preview activated')}\n >\n ID-123456\n </Link>\n );\n};\n\nexport const MultiplePreviewableLinks: Story<PreviewableLinkStoryArgs> = (\n args: PreviewableLinkStoryArgs\n) => {\n return (\n <Flex container={{ gap: 2 }}>\n <Link\n href='#ID-123456'\n variant={args.variant}\n previewable\n onPreview={args.onPreview || action('Preview activated')}\n >\n ID-123456\n </Link>\n <Link\n href='#ID-ABCDEF'\n variant={args.variant}\n previewable\n onPreview={args.onPreview || action('Preview activated')}\n >\n ID-ABCDEF\n </Link>\n </Flex>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListToolbar.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/ListToolbar/ListToolbar.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ListToolbar.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/ListToolbar/ListToolbar.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAsC,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sEAAsE,CAAC;AAMzG,eAAO,MAAM,OAAO,EAAE,MAAM,EAIzB,CAAC;AAEJ,eAAO,MAAM,SAAS,EAAE,iBAAiB,CAAC,OAAO,CAIhD,CAAC;AAEF,eAAO,MAAM,0BAA0B,2CAA4C,CAAC;AAwDpF,eAAO,MAAM,cAAc,mBAE1B,CAAC;AAEF,eAAO,MAAM,aAAa,mBAEzB,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { createContext
|
|
2
|
-
import {
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
import { Select, Option, Flex, Button, Icon } from '@pega/cosmos-react-core';
|
|
3
|
+
import { ConditionBuilder } from '@pega/cosmos-react-condition-builder';
|
|
4
|
+
import FieldSelector from '@pega/cosmos-react-condition-builder/lib/components/ConditionBuilder/RhsControls/FieldSelector';
|
|
5
|
+
import { demoFields } from '../../condition-builder/ConditionBuilder/props.mock';
|
|
3
6
|
export const actions = ['Action 1', 'Action 2', 'Action 3'].map(text => ({
|
|
4
7
|
text,
|
|
5
8
|
id: text,
|
|
@@ -11,61 +14,53 @@ export const mockViews = [
|
|
|
11
14
|
{ id: '3', text: 'Data view 3', selected: false }
|
|
12
15
|
];
|
|
13
16
|
export const StagedStateDispatchContext = createContext(() => { });
|
|
14
|
-
const
|
|
15
|
-
const MockCondition = () => {
|
|
16
|
-
const setStagedState = useContext(StagedStateDispatchContext);
|
|
17
|
-
const conditionId = useUID();
|
|
18
|
-
const [localState, setLocalState] = useState({
|
|
19
|
-
lhs: 'Field 1',
|
|
20
|
-
comparator: 'Equals',
|
|
21
|
-
rhs: ''
|
|
22
|
-
});
|
|
23
|
-
useAfterInitialEffect(() => {
|
|
24
|
-
setStagedState({
|
|
25
|
-
[conditionId]: localState
|
|
26
|
-
});
|
|
27
|
-
}, [conditionId, localState, setStagedState]);
|
|
28
|
-
return (<Grid container={{ gap: 2, cols: 'repeat(3, minmax(0, 1fr))' }}>
|
|
29
|
-
<Select label='Field' onChange={(e) => {
|
|
30
|
-
setLocalState(cur => ({ ...cur, lhs: e.target.value }));
|
|
31
|
-
}}>
|
|
32
|
-
{mockFields.map(field => {
|
|
33
|
-
return (<Option value={field} key={field}>
|
|
34
|
-
{field}
|
|
35
|
-
</Option>);
|
|
36
|
-
})}
|
|
37
|
-
</Select>
|
|
38
|
-
<Select label='Comparator' onChange={(e) => {
|
|
39
|
-
setLocalState(cur => ({ ...cur, comparator: e.target.value }));
|
|
40
|
-
}}>
|
|
41
|
-
{['Equals', 'Contains', 'Starts with'].map(comparator => {
|
|
42
|
-
return (<Option value={comparator} key={comparator}>
|
|
43
|
-
{comparator}
|
|
44
|
-
</Option>);
|
|
45
|
-
})}
|
|
46
|
-
</Select>
|
|
47
|
-
<Input label='Value' value={localState.rhs} onChange={(e) => {
|
|
48
|
-
setLocalState(cur => ({ ...cur, rhs: e.target.value }));
|
|
49
|
-
}}/>
|
|
50
|
-
</Grid>);
|
|
51
|
-
};
|
|
52
|
-
export const FilterRenderer = () => {
|
|
53
|
-
const [conditions, setConditions] = useState(() => [<MockCondition key={1}/>]);
|
|
17
|
+
const GroupByMock = () => {
|
|
54
18
|
return (<Flex container={{ direction: 'column', gap: 2 }}>
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
19
|
+
<Flex container={{ direction: 'column', gap: 1 }}>
|
|
20
|
+
<Flex container={{
|
|
21
|
+
justify: 'between',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
direction: 'row',
|
|
24
|
+
wrap: 'nowrap',
|
|
25
|
+
itemGap: 0.5
|
|
59
26
|
}}>
|
|
60
|
-
<Flex container={{
|
|
61
|
-
|
|
62
|
-
|
|
27
|
+
<Flex container={{
|
|
28
|
+
justify: 'start',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
direction: 'row',
|
|
31
|
+
wrap: 'nowrap',
|
|
32
|
+
itemGap: 0.5
|
|
33
|
+
}} item={{ grow: 1 }}>
|
|
34
|
+
<Icon name='drag'/>
|
|
35
|
+
<Flex item={{ grow: 1, basis: '50%' }}>
|
|
36
|
+
<FieldSelector fields={[]} value='' onChange={() => { }}/>
|
|
37
|
+
</Flex>
|
|
38
|
+
<Flex as={Select} item={{ basis: '50%' }}>
|
|
39
|
+
<Option> </Option>
|
|
40
|
+
<Option>Item A</Option>
|
|
41
|
+
</Flex>
|
|
63
42
|
</Flex>
|
|
64
|
-
|
|
65
|
-
|
|
43
|
+
<Button aria-label='Delete group' icon variant='simple'>
|
|
44
|
+
<Icon name='trash'/>
|
|
45
|
+
</Button>
|
|
46
|
+
</Flex>
|
|
47
|
+
</Flex>
|
|
48
|
+
<Button variant='link' aria-label='Add a group'>
|
|
49
|
+
<Flex container={{
|
|
50
|
+
inline: true,
|
|
51
|
+
alignItems: 'start',
|
|
52
|
+
gap: 1
|
|
53
|
+
}} as='span'>
|
|
54
|
+
<Icon name='plus'/>
|
|
55
|
+
<span>Add</span>
|
|
56
|
+
</Flex>
|
|
57
|
+
</Button>
|
|
66
58
|
</Flex>);
|
|
67
59
|
};
|
|
60
|
+
export const FilterRenderer = () => {
|
|
61
|
+
return <ConditionBuilder fields={demoFields}/>;
|
|
62
|
+
};
|
|
68
63
|
export const GroupRenderer = () => {
|
|
69
|
-
return
|
|
64
|
+
return <GroupByMock />;
|
|
70
65
|
};
|
|
71
66
|
//# sourceMappingURL=ListToolbar.mocks.jsx.map
|