@pega/cosmos-react-demos 2.1.2 → 3.0.0-dev.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jsx/build/AppHeader/AppHeader.stories.d.ts +2 -1
- package/jsx/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
- package/jsx/build/AppHeader/AppHeader.stories.jsx +46 -13
- package/jsx/build/AppHeader/AppHeader.stories.jsx.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.d.ts +2 -1
- package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.jsx +46 -13
- package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx +45 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.js +1 -1
- package/jsx/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx +52 -34
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx +2 -6
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -1
- package/jsx/build/Workbench/Workbench.stories.jsx +10 -12
- package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.d.ts +5 -0
- package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.jsx +25 -1
- package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/core/Avatar/Avatar.stories.d.ts +5 -0
- package/jsx/core/Avatar/Avatar.stories.d.ts.map +1 -1
- package/jsx/core/Avatar/Avatar.stories.jsx +32 -5
- package/jsx/core/Avatar/Avatar.stories.jsx.map +1 -1
- package/jsx/core/Badges/Status.stories.d.ts +5 -0
- package/jsx/core/Badges/Status.stories.d.ts.map +1 -1
- package/jsx/core/Badges/Status.stories.jsx +25 -1
- package/jsx/core/Badges/Status.stories.jsx.map +1 -1
- package/jsx/core/Banner/Banner.mocks.d.ts +18 -0
- package/jsx/core/Banner/Banner.mocks.d.ts.map +1 -0
- package/jsx/core/Banner/Banner.mocks.jsx +41 -0
- package/jsx/core/Banner/Banner.mocks.jsx.map +1 -0
- package/jsx/core/Banner/Banner.stories.d.ts +5 -1
- package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
- package/jsx/core/Banner/Banner.stories.jsx +22 -39
- package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
- package/jsx/core/Button/Button.stories.d.ts +8 -0
- package/jsx/core/Button/Button.stories.d.ts.map +1 -1
- package/jsx/core/Button/Button.stories.jsx +32 -3
- package/jsx/core/Button/Button.stories.jsx.map +1 -1
- package/jsx/core/Card/Card.stories.d.ts +5 -0
- package/jsx/core/Card/Card.stories.d.ts.map +1 -1
- package/jsx/core/Card/Card.stories.jsx +30 -1
- package/jsx/core/Card/Card.stories.jsx.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.d.ts +12 -0
- package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx +54 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
- package/jsx/core/Configuration/Configuration.stories.d.ts +17 -0
- package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -1
- package/jsx/core/Configuration/Configuration.stories.jsx +94 -3
- package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +1 -0
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +36 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -0
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +1 -34
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -1
- package/jsx/core/File/FileDisplay.stories.d.ts +8 -1
- package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -1
- package/jsx/core/File/FileDisplay.stories.jsx +37 -2
- package/jsx/core/File/FileDisplay.stories.jsx.map +1 -1
- package/jsx/core/Flex/Flex.styles.d.ts +2 -2
- package/jsx/core/Flex/Flex.styles.d.ts.map +1 -1
- package/jsx/core/Flex/Flex.styles.js +17 -17
- package/jsx/core/Flex/Flex.styles.js.map +1 -1
- package/jsx/core/Flex/FlexContainer.stories.d.ts +2 -0
- package/jsx/core/Flex/FlexContainer.stories.d.ts.map +1 -1
- package/jsx/core/Flex/FlexContainer.stories.jsx +45 -32
- package/jsx/core/Flex/FlexContainer.stories.jsx.map +1 -1
- package/jsx/core/Flex/FlexItem.stories.jsx +13 -13
- package/jsx/core/Flex/FlexItem.stories.jsx.map +1 -1
- package/jsx/core/Form/Form.mocks.d.ts +8 -0
- package/jsx/core/Form/Form.mocks.d.ts.map +1 -0
- package/jsx/core/Form/Form.mocks.jsx +138 -0
- package/jsx/core/Form/Form.mocks.jsx.map +1 -0
- package/jsx/core/Form/Form.stories.d.ts +10 -7
- package/jsx/core/Form/Form.stories.d.ts.map +1 -1
- package/jsx/core/Form/Form.stories.jsx +44 -138
- package/jsx/core/Form/Form.stories.jsx.map +1 -1
- package/jsx/core/Grid/Grid.styles.d.ts +2 -2
- package/jsx/core/Grid/Grid.styles.d.ts.map +1 -1
- package/jsx/core/Grid/Grid.styles.js +4 -4
- package/jsx/core/Grid/Grid.styles.js.map +1 -1
- package/jsx/core/Grid/GridContainer.stories.d.ts +6 -5
- package/jsx/core/Grid/GridContainer.stories.d.ts.map +1 -1
- package/jsx/core/Grid/GridContainer.stories.jsx +51 -44
- package/jsx/core/Grid/GridContainer.stories.jsx.map +1 -1
- package/jsx/core/Grid/GridItem.stories.d.ts +2 -2
- package/jsx/core/Grid/GridItem.stories.d.ts.map +1 -1
- package/jsx/core/Grid/GridItem.stories.jsx +28 -28
- package/jsx/core/Grid/GridItem.stories.jsx.map +1 -1
- package/jsx/core/Icon/Icon.mocks.d.ts +3 -0
- package/jsx/core/Icon/Icon.mocks.d.ts.map +1 -0
- package/jsx/core/Icon/Icon.mocks.jsx +9 -0
- package/jsx/core/Icon/Icon.mocks.jsx.map +1 -0
- package/jsx/core/Icon/Icon.stories.d.ts +1 -0
- package/jsx/core/Icon/Icon.stories.d.ts.map +1 -1
- package/jsx/core/Icon/Icon.stories.jsx +7 -1
- package/jsx/core/Icon/Icon.stories.jsx.map +1 -1
- package/jsx/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
- package/jsx/core/IconPicker/IconPicker.stories.jsx +0 -1
- package/jsx/core/IconPicker/IconPicker.stories.jsx.map +1 -1
- package/jsx/core/Input/Input.stories.d.ts +9 -0
- package/jsx/core/Input/Input.stories.d.ts.map +1 -1
- package/jsx/core/Input/Input.stories.jsx +40 -1
- package/jsx/core/Input/Input.stories.jsx.map +1 -1
- package/jsx/core/Label/Label.stories.d.ts +4 -0
- package/jsx/core/Label/Label.stories.d.ts.map +1 -1
- package/jsx/core/Label/Label.stories.jsx +18 -1
- package/jsx/core/Label/Label.stories.jsx.map +1 -1
- package/jsx/core/Lightbox/Lightbox.mocks.d.ts +15 -0
- package/jsx/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
- package/jsx/core/Lightbox/Lightbox.mocks.js +59 -0
- package/jsx/core/Lightbox/Lightbox.mocks.js.map +1 -0
- package/jsx/core/Lightbox/Lightbox.stories.d.ts +7 -6
- package/jsx/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
- package/jsx/core/Lightbox/Lightbox.stories.jsx +14 -65
- package/jsx/core/Lightbox/Lightbox.stories.jsx.map +1 -1
- package/jsx/core/Link/Link.stories.d.ts +11 -1
- package/jsx/core/Link/Link.stories.d.ts.map +1 -1
- package/jsx/core/Link/Link.stories.jsx +22 -5
- package/jsx/core/Link/Link.stories.jsx.map +1 -1
- package/jsx/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
- package/jsx/core/List/CommaSeparatedList.stories.jsx +17 -19
- package/jsx/core/List/CommaSeparatedList.stories.jsx.map +1 -1
- package/jsx/core/List/OrderedList.stories.d.ts.map +1 -1
- package/jsx/core/List/OrderedList.stories.jsx +10 -10
- package/jsx/core/List/OrderedList.stories.jsx.map +1 -1
- package/jsx/core/List/UnorderedList.stories.d.ts.map +1 -1
- package/jsx/core/List/UnorderedList.stories.jsx +10 -10
- package/jsx/core/List/UnorderedList.stories.jsx.map +1 -1
- package/jsx/core/Menu/Menu.stories.d.ts +3 -3
- package/jsx/core/Menu/Menu.stories.d.ts.map +1 -1
- package/jsx/core/Menu/Menu.stories.jsx +8 -12
- package/jsx/core/Menu/Menu.stories.jsx.map +1 -1
- package/jsx/core/Modal/Modal.mocks.jsx +1 -1
- package/jsx/core/Modal/Modal.mocks.jsx.map +1 -1
- package/jsx/core/Number/Number.stories.d.ts.map +1 -1
- package/jsx/core/Number/Number.stories.jsx +1 -4
- package/jsx/core/Number/Number.stories.jsx.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx +3 -3
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx +3 -0
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx.map +1 -1
- package/jsx/core/Popover/Popover.stories.d.ts +1 -2
- package/jsx/core/Popover/Popover.stories.d.ts.map +1 -1
- package/jsx/core/Popover/Popover.stories.jsx +35 -37
- package/jsx/core/Popover/Popover.stories.jsx.map +1 -1
- package/jsx/core/Progress/Progress.stories.d.ts +4 -0
- package/jsx/core/Progress/Progress.stories.d.ts.map +1 -1
- package/jsx/core/Progress/Progress.stories.jsx +22 -1
- package/jsx/core/Progress/Progress.stories.jsx.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.d.ts +12 -0
- package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx +53 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
- package/jsx/core/Rating/Rating.stories.d.ts +8 -1
- package/jsx/core/Rating/Rating.stories.d.ts.map +1 -1
- package/jsx/core/Rating/Rating.stories.jsx +21 -4
- package/jsx/core/Rating/Rating.stories.jsx.map +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.d.ts +4 -0
- package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx +18 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx.map +1 -1
- package/jsx/core/Select/Select.stories.d.ts +8 -0
- package/jsx/core/Select/Select.stories.d.ts.map +1 -1
- package/jsx/core/Select/Select.stories.jsx +35 -1
- package/jsx/core/Select/Select.stories.jsx.map +1 -1
- package/jsx/core/Sentiment/Sentiment.stories.d.ts +6 -0
- package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
- package/jsx/core/Sentiment/Sentiment.stories.jsx +37 -6
- package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -1
- package/jsx/core/SummaryList/SummaryList.stories.jsx +1 -1
- package/jsx/core/SummaryList/SummaryList.stories.jsx.map +1 -1
- package/jsx/core/Switch/Switch.stories.d.ts +7 -0
- package/jsx/core/Switch/Switch.stories.d.ts.map +1 -1
- package/jsx/core/Switch/Switch.stories.jsx +34 -1
- package/jsx/core/Switch/Switch.stories.jsx.map +1 -1
- package/jsx/core/Table/Table.stories.d.ts +25 -0
- package/jsx/core/Table/Table.stories.d.ts.map +1 -1
- package/jsx/core/Table/Table.stories.jsx +120 -1
- package/jsx/core/Table/Table.stories.jsx.map +1 -1
- package/jsx/core/Tabs/Tabs.stories.d.ts +5 -0
- package/jsx/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/jsx/core/Tabs/Tabs.stories.jsx +39 -1
- package/jsx/core/Tabs/Tabs.stories.jsx.map +1 -1
- package/jsx/core/Text/Text.stories.d.ts +19 -0
- package/jsx/core/Text/Text.stories.d.ts.map +1 -1
- package/jsx/core/Text/Text.stories.jsx +112 -1
- package/jsx/core/Text/Text.stories.jsx.map +1 -1
- package/jsx/core/TextArea/TextArea.stories.d.ts +5 -0
- package/jsx/core/TextArea/TextArea.stories.d.ts.map +1 -1
- package/jsx/core/TextArea/TextArea.stories.jsx +22 -1
- package/jsx/core/TextArea/TextArea.stories.jsx.map +1 -1
- package/jsx/core/Toaster/Toaster.stories.d.ts.map +1 -1
- package/jsx/core/Toaster/Toaster.stories.jsx +8 -3
- package/jsx/core/Toaster/Toaster.stories.jsx.map +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.d.ts +6 -0
- package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx +28 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx.map +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.jsx +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -1
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +12 -10
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.mocks.js +5 -10
- package/jsx/cs/TaskManager/TaskManager.mocks.js.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts +8 -3
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.jsx +164 -132
- package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx +1 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -1
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx +19 -2
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -1
- package/jsx/social/Chat/Chat.stories.d.ts +31 -22
- package/jsx/social/Chat/Chat.stories.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.stories.jsx +106 -153
- package/jsx/social/Chat/Chat.stories.jsx.map +1 -1
- package/jsx/social/Email/Email.mocks.d.ts +1 -2
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
- package/jsx/social/Email/{Email.mocks.jsx → Email.mocks.js} +2 -3
- package/jsx/social/Email/Email.mocks.js.map +1 -0
- package/jsx/social/Email/Email.stories.d.ts.map +1 -1
- package/jsx/social/Email/Email.stories.jsx +7 -8
- package/jsx/social/Email/Email.stories.jsx.map +1 -1
- package/jsx/social/Feed/FeedNewPost.stories.jsx +1 -1
- package/jsx/social/Feed/FeedNewPost.stories.jsx.map +1 -1
- package/jsx/social/Feed/FeedPost.stories.jsx +1 -1
- package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -1
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx +6 -7
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +1 -1
- package/jsx/work/CaseView/FileService.mock.d.ts.map +1 -1
- package/jsx/work/CaseView/FileService.mock.jsx +6 -2
- package/jsx/work/CaseView/FileService.mock.jsx.map +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.d.ts +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.jsx +14 -3
- package/jsx/work/Confirmation/Confirmation.stories.jsx.map +1 -1
- package/jsx/work/Confirmation/Confirmation.styles.d.ts +2 -0
- package/jsx/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
- package/jsx/work/Confirmation/Confirmation.styles.js +7 -0
- package/jsx/work/Confirmation/Confirmation.styles.js.map +1 -0
- package/jsx/work/Details/Details.stories.jsx +3 -3
- package/jsx/work/Details/Details.stories.jsx.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.jsx +3 -9
- package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
- package/jsx/work/SearchResults/SearchResults.styles.d.ts +5 -0
- package/jsx/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
- package/jsx/work/SearchResults/SearchResults.styles.js +12 -0
- package/jsx/work/SearchResults/SearchResults.styles.js.map +1 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts +17 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +32 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -0
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx +2 -30
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx.map +1 -1
- package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -1
- package/jsx/work/Timeline/Timeline.stories.jsx +2 -2
- package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -1
- package/lib/build/AppHeader/AppHeader.stories.d.ts +2 -1
- package/lib/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
- package/lib/build/AppHeader/AppHeader.stories.js +46 -13
- package/lib/build/AppHeader/AppHeader.stories.js.map +1 -1
- package/lib/build/AppShell/AppShell.stories.d.ts +2 -1
- package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.stories.js +46 -13
- package/lib/build/AppShell/AppShell.stories.js.map +1 -1
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.js +40 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.js +1 -1
- package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.js +52 -48
- package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.js +2 -2
- package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -1
- package/lib/build/Workbench/Workbench.stories.js +15 -17
- package/lib/build/Workbench/Workbench.stories.js.map +1 -1
- package/lib/core/AppShell/AppShell.stories.d.ts +5 -0
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.stories.js +23 -1
- package/lib/core/AppShell/AppShell.stories.js.map +1 -1
- package/lib/core/Avatar/Avatar.stories.d.ts +5 -0
- package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -1
- package/lib/core/Avatar/Avatar.stories.js +30 -5
- package/lib/core/Avatar/Avatar.stories.js.map +1 -1
- package/lib/core/Badges/Status.stories.d.ts +5 -0
- package/lib/core/Badges/Status.stories.d.ts.map +1 -1
- package/lib/core/Badges/Status.stories.js +23 -1
- package/lib/core/Badges/Status.stories.js.map +1 -1
- package/lib/core/Banner/Banner.mocks.d.ts +18 -0
- package/lib/core/Banner/Banner.mocks.d.ts.map +1 -0
- package/lib/core/Banner/Banner.mocks.js +36 -0
- package/lib/core/Banner/Banner.mocks.js.map +1 -0
- package/lib/core/Banner/Banner.stories.d.ts +5 -1
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
- package/lib/core/Banner/Banner.stories.js +21 -33
- package/lib/core/Banner/Banner.stories.js.map +1 -1
- package/lib/core/Button/Button.stories.d.ts +8 -0
- package/lib/core/Button/Button.stories.d.ts.map +1 -1
- package/lib/core/Button/Button.stories.js +29 -2
- package/lib/core/Button/Button.stories.js.map +1 -1
- package/lib/core/Card/Card.stories.d.ts +5 -0
- package/lib/core/Card/Card.stories.d.ts.map +1 -1
- package/lib/core/Card/Card.stories.js +19 -1
- package/lib/core/Card/Card.stories.js.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.d.ts +12 -0
- package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.js +52 -1
- package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
- package/lib/core/Configuration/Configuration.stories.d.ts +17 -0
- package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -1
- package/lib/core/Configuration/Configuration.stories.js +62 -3
- package/lib/core/Configuration/Configuration.stories.js.map +1 -1
- package/lib/core/DateTime/DateTimeDisplay.stories.js +1 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -1
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.js +38 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.js +1 -35
- package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
- package/lib/core/File/FileDisplay.stories.d.ts +8 -1
- package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
- package/lib/core/File/FileDisplay.stories.js +32 -2
- package/lib/core/File/FileDisplay.stories.js.map +1 -1
- package/lib/core/Flex/Flex.styles.d.ts +2 -2
- package/lib/core/Flex/Flex.styles.d.ts.map +1 -1
- package/lib/core/Flex/Flex.styles.js +17 -17
- package/lib/core/Flex/Flex.styles.js.map +1 -1
- package/lib/core/Flex/FlexContainer.stories.d.ts +2 -0
- package/lib/core/Flex/FlexContainer.stories.d.ts.map +1 -1
- package/lib/core/Flex/FlexContainer.stories.js +10 -7
- package/lib/core/Flex/FlexContainer.stories.js.map +1 -1
- package/lib/core/Flex/FlexItem.stories.js +4 -4
- package/lib/core/Flex/FlexItem.stories.js.map +1 -1
- package/lib/core/Form/Form.mocks.d.ts +8 -0
- package/lib/core/Form/Form.mocks.d.ts.map +1 -0
- package/lib/core/Form/Form.mocks.js +97 -0
- package/lib/core/Form/Form.mocks.js.map +1 -0
- package/lib/core/Form/Form.stories.d.ts +10 -7
- package/lib/core/Form/Form.stories.d.ts.map +1 -1
- package/lib/core/Form/Form.stories.js +42 -96
- package/lib/core/Form/Form.stories.js.map +1 -1
- package/lib/core/Grid/Grid.styles.d.ts +2 -2
- package/lib/core/Grid/Grid.styles.d.ts.map +1 -1
- package/lib/core/Grid/Grid.styles.js +4 -4
- package/lib/core/Grid/Grid.styles.js.map +1 -1
- package/lib/core/Grid/GridContainer.stories.d.ts +6 -5
- package/lib/core/Grid/GridContainer.stories.d.ts.map +1 -1
- package/lib/core/Grid/GridContainer.stories.js +27 -24
- package/lib/core/Grid/GridContainer.stories.js.map +1 -1
- package/lib/core/Grid/GridItem.stories.d.ts +2 -2
- package/lib/core/Grid/GridItem.stories.d.ts.map +1 -1
- package/lib/core/Grid/GridItem.stories.js +10 -10
- package/lib/core/Grid/GridItem.stories.js.map +1 -1
- package/lib/core/Icon/Icon.mocks.d.ts +3 -0
- package/lib/core/Icon/Icon.mocks.d.ts.map +1 -0
- package/lib/core/Icon/Icon.mocks.js +10 -0
- package/lib/core/Icon/Icon.mocks.js.map +1 -0
- package/lib/core/Icon/Icon.stories.d.ts +1 -0
- package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
- package/lib/core/Icon/Icon.stories.js +7 -1
- package/lib/core/Icon/Icon.stories.js.map +1 -1
- package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
- package/lib/core/IconPicker/IconPicker.stories.js +0 -1
- package/lib/core/IconPicker/IconPicker.stories.js.map +1 -1
- package/lib/core/Input/Input.stories.d.ts +9 -0
- package/lib/core/Input/Input.stories.d.ts.map +1 -1
- package/lib/core/Input/Input.stories.js +38 -1
- package/lib/core/Input/Input.stories.js.map +1 -1
- package/lib/core/Label/Label.stories.d.ts +4 -0
- package/lib/core/Label/Label.stories.d.ts.map +1 -1
- package/lib/core/Label/Label.stories.js +16 -1
- package/lib/core/Label/Label.stories.js.map +1 -1
- package/lib/core/Lightbox/Lightbox.mocks.d.ts +15 -0
- package/lib/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
- package/lib/core/Lightbox/Lightbox.mocks.js +67 -0
- package/lib/core/Lightbox/Lightbox.mocks.js.map +1 -0
- package/lib/core/Lightbox/Lightbox.stories.d.ts +7 -6
- package/lib/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
- package/lib/core/Lightbox/Lightbox.stories.js +14 -73
- package/lib/core/Lightbox/Lightbox.stories.js.map +1 -1
- package/lib/core/Link/Link.stories.d.ts +11 -1
- package/lib/core/Link/Link.stories.d.ts.map +1 -1
- package/lib/core/Link/Link.stories.js +7 -4
- package/lib/core/Link/Link.stories.js.map +1 -1
- package/lib/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
- package/lib/core/List/CommaSeparatedList.stories.js +17 -17
- package/lib/core/List/CommaSeparatedList.stories.js.map +1 -1
- package/lib/core/List/OrderedList.stories.d.ts.map +1 -1
- package/lib/core/List/OrderedList.stories.js +10 -10
- package/lib/core/List/OrderedList.stories.js.map +1 -1
- package/lib/core/List/UnorderedList.stories.d.ts.map +1 -1
- package/lib/core/List/UnorderedList.stories.js +10 -10
- package/lib/core/List/UnorderedList.stories.js.map +1 -1
- package/lib/core/Menu/Menu.stories.d.ts +3 -3
- package/lib/core/Menu/Menu.stories.d.ts.map +1 -1
- package/lib/core/Menu/Menu.stories.js +8 -12
- package/lib/core/Menu/Menu.stories.js.map +1 -1
- package/lib/core/Modal/Modal.mocks.js +1 -1
- package/lib/core/Modal/Modal.mocks.js.map +1 -1
- package/lib/core/Number/Number.stories.d.ts.map +1 -1
- package/lib/core/Number/Number.stories.js +1 -4
- package/lib/core/Number/Number.stories.js.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.js +3 -3
- package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/core/Paragraph/ParagraphDisplay.stories.js +3 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.js.map +1 -1
- package/lib/core/Popover/Popover.stories.d.ts +1 -2
- package/lib/core/Popover/Popover.stories.d.ts.map +1 -1
- package/lib/core/Popover/Popover.stories.js +24 -25
- package/lib/core/Popover/Popover.stories.js.map +1 -1
- package/lib/core/Progress/Progress.stories.d.ts +4 -0
- package/lib/core/Progress/Progress.stories.d.ts.map +1 -1
- package/lib/core/Progress/Progress.stories.js +18 -1
- package/lib/core/Progress/Progress.stories.js.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.d.ts +12 -0
- package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.js +51 -1
- package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
- package/lib/core/Rating/Rating.stories.d.ts +8 -1
- package/lib/core/Rating/Rating.stories.d.ts.map +1 -1
- package/lib/core/Rating/Rating.stories.js +19 -4
- package/lib/core/Rating/Rating.stories.js.map +1 -1
- package/lib/core/SearchInput/SearchInput.stories.d.ts +4 -0
- package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/lib/core/SearchInput/SearchInput.stories.js +16 -1
- package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
- package/lib/core/Select/Select.stories.d.ts +8 -0
- package/lib/core/Select/Select.stories.d.ts.map +1 -1
- package/lib/core/Select/Select.stories.js +28 -1
- package/lib/core/Select/Select.stories.js.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.d.ts +6 -0
- package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.js +34 -7
- package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
- package/lib/core/SummaryList/SummaryList.stories.js +1 -1
- package/lib/core/SummaryList/SummaryList.stories.js.map +1 -1
- package/lib/core/Switch/Switch.stories.d.ts +7 -0
- package/lib/core/Switch/Switch.stories.d.ts.map +1 -1
- package/lib/core/Switch/Switch.stories.js +32 -1
- package/lib/core/Switch/Switch.stories.js.map +1 -1
- package/lib/core/Table/Table.stories.d.ts +25 -0
- package/lib/core/Table/Table.stories.d.ts.map +1 -1
- package/lib/core/Table/Table.stories.js +113 -1
- package/lib/core/Table/Table.stories.js.map +1 -1
- package/lib/core/Tabs/Tabs.stories.d.ts +5 -0
- package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/lib/core/Tabs/Tabs.stories.js +30 -1
- package/lib/core/Tabs/Tabs.stories.js.map +1 -1
- package/lib/core/Text/Text.stories.d.ts +19 -0
- package/lib/core/Text/Text.stories.d.ts.map +1 -1
- package/lib/core/Text/Text.stories.js +102 -2
- package/lib/core/Text/Text.stories.js.map +1 -1
- package/lib/core/TextArea/TextArea.stories.d.ts +5 -0
- package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -1
- package/lib/core/TextArea/TextArea.stories.js +20 -1
- package/lib/core/TextArea/TextArea.stories.js.map +1 -1
- package/lib/core/Toaster/Toaster.stories.d.ts.map +1 -1
- package/lib/core/Toaster/Toaster.stories.js +8 -3
- package/lib/core/Toaster/Toaster.stories.js.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.d.ts +6 -0
- package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.js +20 -1
- package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.js +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +12 -10
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.mocks.js +5 -10
- package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.d.ts +8 -3
- package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.js +142 -119
- package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js +1 -1
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -1
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
- package/lib/rte/RichTextEditor/RichTextViewer.stories.js +15 -2
- package/lib/rte/RichTextEditor/RichTextViewer.stories.js.map +1 -1
- package/lib/social/Chat/Chat.stories.d.ts +33 -22
- package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
- package/lib/social/Chat/Chat.stories.js +102 -158
- package/lib/social/Chat/Chat.stories.js.map +1 -1
- package/lib/social/Email/Email.mocks.d.ts +1 -2
- package/lib/social/Email/Email.mocks.d.ts.map +1 -1
- package/lib/social/Email/Email.mocks.js +1 -3
- package/lib/social/Email/Email.mocks.js.map +1 -1
- package/lib/social/Email/Email.stories.d.ts.map +1 -1
- package/lib/social/Email/Email.stories.js +7 -8
- package/lib/social/Email/Email.stories.js.map +1 -1
- package/lib/social/Feed/FeedNewPost.stories.js +1 -1
- package/lib/social/Feed/FeedNewPost.stories.js.map +1 -1
- package/lib/social/Feed/FeedPost.stories.js +1 -1
- package/lib/social/Feed/FeedPost.stories.js.map +1 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js +6 -7
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js.map +1 -1
- package/lib/work/CaseView/FileService.mock.d.ts.map +1 -1
- package/lib/work/CaseView/FileService.mock.js +6 -2
- package/lib/work/CaseView/FileService.mock.js.map +1 -1
- package/lib/work/Confirmation/Confirmation.stories.d.ts +1 -1
- package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
- package/lib/work/Confirmation/Confirmation.stories.js +12 -4
- package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
- package/lib/work/Confirmation/Confirmation.styles.d.ts +2 -0
- package/lib/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
- package/lib/work/Confirmation/Confirmation.styles.js +7 -0
- package/lib/work/Confirmation/Confirmation.styles.js.map +1 -0
- package/lib/work/Details/Details.stories.js +3 -3
- package/lib/work/Details/Details.stories.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js +3 -9
- package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.styles.d.ts +5 -0
- package/lib/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
- package/lib/work/SearchResults/SearchResults.styles.js +12 -0
- package/lib/work/SearchResults/SearchResults.styles.js.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.d.ts +22 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.js +36 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.stories.js +3 -34
- package/lib/work/Stakeholders/Stakeholders.stories.js.map +1 -1
- package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
- package/lib/work/Timeline/Timeline.stories.js +2 -2
- package/lib/work/Timeline/Timeline.stories.js.map +1 -1
- package/package.json +16 -16
- package/jsx/social/Email/Email.mocks.jsx.map +0 -1
|
@@ -6,4 +6,12 @@ interface SelectStoryProps extends SelectProps {
|
|
|
6
6
|
showAction: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const SelectDemo: Story<SelectStoryProps>;
|
|
9
|
+
interface ConfigurableSelectProps {
|
|
10
|
+
height?: string;
|
|
11
|
+
padding?: string;
|
|
12
|
+
borderColor?: string;
|
|
13
|
+
borderWidth?: string;
|
|
14
|
+
borderRadius?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const ConfigurableSelect: Story<ConfigurableSelectProps>;
|
|
9
17
|
//# sourceMappingURL=Select.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAU,WAAW,
|
|
1
|
+
{"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAU,WAAW,EAAyB,MAAM,yBAAyB,CAAC;;AAErF,wBAGU;AAEV,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,gBAAgB,CA6B9C,CAAC;AAwBF,UAAU,uBAAuB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,uBAAuB,CAyB7D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Select, Option } from '@pega/cosmos-react-core';
|
|
2
|
+
import { Select, Option, Configuration } from '@pega/cosmos-react-core';
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Core/Select',
|
|
5
5
|
component: Select
|
|
@@ -35,4 +35,31 @@ SelectDemo.argTypes = {
|
|
|
35
35
|
disabled: { control: { type: 'boolean' } },
|
|
36
36
|
readOnly: { control: { type: 'boolean' } }
|
|
37
37
|
};
|
|
38
|
+
export const ConfigurableSelect = (args) => {
|
|
39
|
+
return (_jsx(Configuration, { theme: {
|
|
40
|
+
components: {
|
|
41
|
+
select: {
|
|
42
|
+
height: args.height,
|
|
43
|
+
padding: args.padding,
|
|
44
|
+
'border-color': args.borderColor,
|
|
45
|
+
'border-width': args.borderWidth,
|
|
46
|
+
'border-radius': args.borderRadius
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}, children: _jsxs(Select, { label: 'Select input', info: 'Choose a value', children: [_jsx(Option, { children: "Choose an option\u2026" }, void 0), _jsx(Option, { children: "Option 1" }, void 0), _jsx(Option, { children: "Option 2" }, void 0), _jsx(Option, { children: "Option 3" }, void 0)] }, void 0) }, void 0));
|
|
50
|
+
};
|
|
51
|
+
ConfigurableSelect.args = {
|
|
52
|
+
height: '2rem',
|
|
53
|
+
padding: '0.5rem',
|
|
54
|
+
borderColor: '#939393',
|
|
55
|
+
borderWidth: '0.0625rem',
|
|
56
|
+
borderRadius: '0.5'
|
|
57
|
+
};
|
|
58
|
+
ConfigurableSelect.argTypes = {
|
|
59
|
+
height: { control: { type: 'text' } },
|
|
60
|
+
padding: { control: { type: 'text' } },
|
|
61
|
+
borderColor: { control: { type: 'color' } },
|
|
62
|
+
borderWidth: { control: { type: 'text' } },
|
|
63
|
+
borderRadius: { control: { type: 'text' } }
|
|
64
|
+
};
|
|
38
65
|
//# sourceMappingURL=Select.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.stories.js","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.stories.js","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAErF,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AAMV,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,IAAsB,EAAE,EAAE;IAC5E,OAAO,CACL,MAAC,MAAM,IACL,EAAE,EAAC,aAAa,EAChB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EACL,IAAI,CAAC,UAAU;YACb,CAAC,CAAC;gBACE;oBACE,EAAE,EAAE,QAAQ;oBACZ,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,MAAM;iBACb;aACF;YACH,CAAC,CAAC,SAAS,aAGf,KAAC,MAAM,iDAA2B,EAClC,KAAC,MAAM,mCAAkB,EACzB,KAAC,MAAM,mCAAkB,EACzB,KAAC,MAAM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,CAAC,WAAW;oBAChC,cAAc,EAAE,IAAI,CAAC,WAAW;oBAChC,eAAe,EAAE,IAAI,CAAC,YAAY;iBACnC;aACF;SACF,YAED,MAAC,MAAM,IAAC,KAAK,EAAC,cAAc,EAAC,IAAI,EAAC,gBAAgB,aAChD,KAAC,MAAM,iDAA2B,EAClC,KAAC,MAAM,mCAAkB,EACzB,KAAC,MAAM,mCAAkB,EACzB,KAAC,MAAM,mCAAkB,YAClB,WACK,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAkB,CAAC,IAAI,GAAG;IACxB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,QAAQ;IACjB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,WAAW;IACxB,YAAY,EAAE,KAAK;CACpB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACrC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACtC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC3C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC1C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Select, SelectProps, Option, Configuration } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Select',\n component: Select\n} as Meta;\n\ninterface SelectStoryProps extends SelectProps {\n showAction: boolean;\n}\n\nexport const SelectDemo: Story<SelectStoryProps> = (args: SelectStoryProps) => {\n return (\n <Select\n id='select-demo'\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n actions={\n args.showAction\n ? [\n {\n id: 'config',\n text: 'Configure',\n icon: 'gear'\n }\n ]\n : undefined\n }\n >\n <Option>Choose an option…</Option>\n <Option>Option 1</Option>\n <Option>Option 2</Option>\n <Option>Option 3</Option>\n </Select>\n );\n};\n\nSelectDemo.args = {\n showAction: false,\n label: 'Select input',\n labelHidden: false,\n info: 'Choose a value',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nSelectDemo.argTypes = {\n showAction: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n\ninterface ConfigurableSelectProps {\n height?: string;\n padding?: string;\n borderColor?: string;\n borderWidth?: string;\n borderRadius?: string;\n}\n\nexport const ConfigurableSelect: Story<ConfigurableSelectProps> = (\n args: ConfigurableSelectProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n select: {\n height: args.height,\n padding: args.padding,\n 'border-color': args.borderColor,\n 'border-width': args.borderWidth,\n 'border-radius': args.borderRadius\n }\n }\n }}\n >\n <Select label='Select input' info='Choose a value'>\n <Option>Choose an option…</Option>\n <Option>Option 1</Option>\n <Option>Option 2</Option>\n <Option>Option 3</Option>\n </Select>\n </Configuration>\n );\n};\n\nConfigurableSelect.args = {\n height: '2rem',\n padding: '0.5rem',\n borderColor: '#939393',\n borderWidth: '0.0625rem',\n borderRadius: '0.5'\n};\n\nConfigurableSelect.argTypes = {\n height: { control: { type: 'text' } },\n padding: { control: { type: 'text' } },\n borderColor: { control: { type: 'color' } },\n borderWidth: { control: { type: 'text' } },\n borderRadius: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -11,4 +11,10 @@ interface SentimentStoryProps extends SentimentProps {
|
|
|
11
11
|
negativeIcon: string;
|
|
12
12
|
}
|
|
13
13
|
export declare const SentimentDemo: Story<SentimentStoryProps>;
|
|
14
|
+
interface ConfigurableSentimentProps {
|
|
15
|
+
positiveColor?: string;
|
|
16
|
+
negativeColor?: string;
|
|
17
|
+
neutralColor?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const ConfigurableSentiment: Story<ConfigurableSentimentProps>;
|
|
14
20
|
//# sourceMappingURL=Sentiment.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sentiment.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,
|
|
1
|
+
{"version":3,"file":"Sentiment.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAmC,cAAc,EAAE,MAAM,yBAAyB,CAAC;;AAE1F,wBAGU;AAEV,UAAU,mBAAoB,SAAQ,cAAc;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,mBAAmB,CAqBpD,CAAC;AAwBF,UAAU,0BAA0B;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,0BAA0B,CA0BnE,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Sentiment } from '@pega/cosmos-react-core';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Configuration, icons, Sentiment } from '@pega/cosmos-react-core';
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Core/Sentiment',
|
|
5
5
|
component: Sentiment
|
|
6
6
|
};
|
|
7
7
|
export const SentimentDemo = (args) => {
|
|
8
|
-
const
|
|
8
|
+
const iconNames = {
|
|
9
9
|
positive: args.positiveIcon,
|
|
10
10
|
neutral: args.neutralIcon,
|
|
11
11
|
negative: args.negativeIcon
|
|
@@ -15,7 +15,7 @@ export const SentimentDemo = (args) => {
|
|
|
15
15
|
neutral: args.neutralLabel,
|
|
16
16
|
negative: args.negativeLabel
|
|
17
17
|
};
|
|
18
|
-
return (_jsx(Sentiment, { variant: args.variant, labelHidden: args.labelHidden, icons:
|
|
18
|
+
return (_jsx(Sentiment, { variant: args.variant, labelHidden: args.labelHidden, icons: iconNames, labels: labels }, void 0));
|
|
19
19
|
};
|
|
20
20
|
SentimentDemo.args = {
|
|
21
21
|
variant: 'positive',
|
|
@@ -31,10 +31,37 @@ SentimentDemo.argTypes = {
|
|
|
31
31
|
variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },
|
|
32
32
|
labelHidden: { control: { type: 'boolean' } },
|
|
33
33
|
positiveLabel: { control: { type: 'text' } },
|
|
34
|
-
positiveIcon: { control: { type: '
|
|
34
|
+
positiveIcon: { options: icons, control: { type: 'select', icons: true } },
|
|
35
35
|
neutralLabel: { control: { type: 'text' } },
|
|
36
|
-
neutralIcon: { control: { type: '
|
|
36
|
+
neutralIcon: { options: icons, control: { type: 'select', icons: true } },
|
|
37
37
|
negativeLabel: { control: { type: 'text' } },
|
|
38
|
-
negativeIcon: { control: { type: '
|
|
38
|
+
negativeIcon: { options: icons, control: { type: 'select', icons: true } }
|
|
39
|
+
};
|
|
40
|
+
export const ConfigurableSentiment = (args) => {
|
|
41
|
+
return (_jsxs(Configuration, { theme: {
|
|
42
|
+
components: {
|
|
43
|
+
sentiment: {
|
|
44
|
+
positive: {
|
|
45
|
+
color: args.positiveColor
|
|
46
|
+
},
|
|
47
|
+
negative: {
|
|
48
|
+
color: args.negativeColor
|
|
49
|
+
},
|
|
50
|
+
neutral: {
|
|
51
|
+
color: args.neutralColor
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}, children: [_jsx(Sentiment, { variant: 'positive' }, void 0), _jsx(Sentiment, { variant: 'negative' }, void 0), _jsx(Sentiment, { variant: 'neutral' }, void 0)] }, void 0));
|
|
56
|
+
};
|
|
57
|
+
ConfigurableSentiment.args = {
|
|
58
|
+
positiveColor: '#20aa50',
|
|
59
|
+
negativeColor: '#d91c29',
|
|
60
|
+
neutralColor: '#000000'
|
|
61
|
+
};
|
|
62
|
+
ConfigurableSentiment.argTypes = {
|
|
63
|
+
positiveColor: { control: { type: 'color' } },
|
|
64
|
+
negativeColor: { control: { type: 'color' } },
|
|
65
|
+
neutralColor: { control: { type: 'color' } }
|
|
39
66
|
};
|
|
40
67
|
//# sourceMappingURL=Sentiment.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sentiment.stories.js","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAkB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"Sentiment.stories.js","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAkB,MAAM,yBAAyB,CAAC;AAE1F,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,SAAS;CACb,CAAC;AAWV,MAAM,CAAC,MAAM,aAAa,GAA+B,CAAC,IAAyB,EAAE,EAAE;IACrF,MAAM,SAAS,GAAG;QAChB,QAAQ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from '@storybook/react';\n\nimport { Configuration, icons, Sentiment, SentimentProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Sentiment',\n component: Sentiment\n} as Meta;\n\ninterface SentimentStoryProps extends SentimentProps {\n positiveLabel: string;\n neutralLabel: string;\n negativeLabel: string;\n positiveIcon: string;\n neutralIcon: string;\n negativeIcon: string;\n}\n\nexport const SentimentDemo: Story<SentimentStoryProps> = (args: SentimentStoryProps) => {\n const iconNames = {\n positive: args.positiveIcon,\n neutral: args.neutralIcon,\n negative: args.negativeIcon\n };\n\n const labels = {\n positive: args.positiveLabel,\n neutral: args.neutralLabel,\n negative: args.negativeLabel\n };\n\n return (\n <Sentiment\n variant={args.variant}\n labelHidden={args.labelHidden}\n icons={iconNames}\n labels={labels}\n />\n );\n};\n\nSentimentDemo.args = {\n variant: 'positive',\n labelHidden: false,\n positiveLabel: 'Yay!',\n positiveIcon: 'face-happy-solid',\n neutralLabel: 'Hm…',\n neutralIcon: 'face-blank-solid',\n negativeLabel: 'Uh-oh!',\n negativeIcon: 'face-sad-solid'\n};\n\nSentimentDemo.argTypes = {\n variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },\n labelHidden: { control: { type: 'boolean' } },\n positiveLabel: { control: { type: 'text' } },\n positiveIcon: { options: icons, control: { type: 'select', icons: true } },\n neutralLabel: { control: { type: 'text' } },\n neutralIcon: { options: icons, control: { type: 'select', icons: true } },\n negativeLabel: { control: { type: 'text' } },\n negativeIcon: { options: icons, control: { type: 'select', icons: true } }\n};\n\ninterface ConfigurableSentimentProps {\n positiveColor?: string;\n negativeColor?: string;\n neutralColor?: string;\n}\n\nexport const ConfigurableSentiment: Story<ConfigurableSentimentProps> = (\n args: ConfigurableSentimentProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n sentiment: {\n positive: {\n color: args.positiveColor\n },\n negative: {\n color: args.negativeColor\n },\n neutral: {\n color: args.neutralColor\n }\n }\n }\n }}\n >\n <Sentiment variant='positive' />\n <Sentiment variant='negative' />\n <Sentiment variant='neutral' />\n </Configuration>\n );\n};\n\nConfigurableSentiment.args = {\n positiveColor: '#20aa50',\n negativeColor: '#d91c29',\n neutralColor: '#000000'\n};\n\nConfigurableSentiment.argTypes = {\n positiveColor: { control: { type: 'color' } },\n negativeColor: { control: { type: 'color' } },\n neutralColor: { control: { type: 'color' } }\n};\n"]}
|
|
@@ -21,7 +21,7 @@ export default {
|
|
|
21
21
|
},
|
|
22
22
|
argTypes: {
|
|
23
23
|
name: { control: { type: 'text' } },
|
|
24
|
-
icon: { options: icons, control: { type: 'select' } },
|
|
24
|
+
icon: { options: icons, control: { type: 'select', icons: true } },
|
|
25
25
|
count: { control: { type: 'number' } },
|
|
26
26
|
loading: { control: { type: 'boolean' } },
|
|
27
27
|
showSecondary: { control: { type: 'boolean' } },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SummaryList.stories.js","sourceRoot":"","sources":["../../../src/core/SummaryList/SummaryList.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,KAAK,EAEL,KAAK,EACL,mBAAmB,EACnB,WAAW,EAEX,OAAO,EACP,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,UAAU;KACxB;IACD,QAAQ,EAAE;QACR,IAA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AAS;gBACzB,IAAI,EAAE,MAAM;gBACZ,OAAO;oBACL,WAAW,CAAC,GAAG,EAAE;wBACf,OAAO,CACL,KAAC,KAAK,IAAC,OAAO,EAAE,WAAW,IAAI,CAAC,IAAI,EAAE,YACnC,0BAA0B,IAAI,CAAC,IAAI,aAAa,WAC3C,CACT,CAAC;oBACJ,CAAC,CAAC,CAAC;gBACL,CAAC;aACF;SACF,EACD,SAAS,EAAE,GAAG,EAAE;YACd,WAAW,CAAC,uBAAuB,EAAE;gBACnC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAC;QACL,CAAC,WACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useContext, useMemo, useState } from 'react';\n\nimport {\n icons,\n OmitStrict,\n Modal,\n ModalManagerContext,\n SummaryList,\n SummaryListProps,\n ViewAll,\n createStringMatcher\n} from '@pega/cosmos-react-core';\n\nimport { useMockListData } from './SummaryList.mocks';\n\nexport default {\n title: 'Core/SummaryList',\n component: SummaryList,\n parameters: {\n layout: 'centered'\n },\n args: {\n name: 'People',\n icon: 'users-solid',\n count: 5,\n loading: false,\n showSecondary: true,\n showVisual: true,\n showActions: true,\n noItems: false,\n noItemsText: 'No items'\n },\n argTypes: {\n name: { control: { type: 'text' } },\n icon: { options: icons, control: { type: 'select' } },\n count: { control: { type: 'number' } },\n loading: { control: { type: 'boolean' } },\n showSecondary: { control: { type: 'boolean' } },\n showVisual: { control: { type: 'boolean' } },\n showActions: { control: { type: 'boolean' } },\n noItems: { control: { type: 'boolean' } },\n noItemsText: { control: { type: 'text' } }\n }\n} as Meta;\n\ninterface SummaryListStoryProps extends SummaryListProps {\n showSecondary?: boolean;\n showVisual?: boolean;\n showActions?: boolean;\n noItems?: boolean;\n}\n\nexport const SummaryListDemo: Story<SummaryListStoryProps> = (args: SummaryListStoryProps) => {\n const { create: createModal } = useContext(ModalManagerContext);\n const [loading, setLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setLoading(false);\n },\n { count: args.count }\n );\n\n const itemsToRender = items.map(item => {\n return {\n ...item,\n secondary: args.showSecondary ? item.secondary : undefined,\n visual: args.showVisual ? item.visual : undefined,\n actions: args.showActions\n ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({\n text,\n id: text\n }))\n : undefined\n };\n });\n\n return (\n <SummaryList\n name={args.name}\n icon={args.icon}\n count={args.loading || loading ? undefined : args.count}\n items={args.noItems ? [] : itemsToRender}\n loading={args.loading || loading}\n noItemsText={args.noItemsText}\n actions={[\n {\n text: `Add new ${args.name}`,\n id: `${args.name}:addNew`,\n icon: 'plus',\n onClick() {\n createModal(() => {\n return (\n <Modal heading={`Add new ${args.name}`}>\n {`Content for adding new ${args.name} goes here…`}\n </Modal>\n );\n });\n }\n }\n ]}\n />\n );\n};\n\nexport const SummaryListViewAll: Story<SummaryListStoryProps> = (args: SummaryListStoryProps) => {\n const SummaryListViewAllModal = ({\n name,\n count,\n loading\n }: OmitStrict<SummaryListProps, 'items'>) => {\n const [search, setSearch] = useState('');\n const [modalLoading, setModalLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setModalLoading(false);\n },\n {\n count\n }\n );\n\n const itemsToRender = useMemo(() => {\n if (search.trim()) {\n const filterRegex = createStringMatcher(search, 'boundary');\n return items.filter(({ primary }) => filterRegex.test(primary));\n }\n\n return items;\n }, [items, search]);\n\n return (\n <Modal heading={args.name}>\n <ViewAll\n loading={loading || modalLoading}\n items={itemsToRender}\n actions={[\n {\n id: 'addNew',\n text: `Add ${name}`\n }\n ]}\n searchInputProps={{ onSearchChange: setSearch }}\n />\n </Modal>\n );\n };\n\n const { create: createModal } = useContext(ModalManagerContext);\n const [loading, setLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setLoading(false);\n },\n { count: 3 }\n );\n\n const itemsToRender = items.map(item => {\n return {\n ...item,\n secondary: args.showSecondary ? item.secondary : undefined,\n visual: args.showVisual ? item.visual : undefined,\n actions: args.showActions\n ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({\n text,\n id: text\n }))\n : undefined\n };\n });\n\n return (\n <SummaryList\n name={args.name}\n icon={args.icon}\n count={args.loading || loading ? undefined : args.count}\n items={args.noItems ? [] : itemsToRender}\n loading={args.loading || loading}\n noItemsText={args.noItemsText}\n actions={[\n {\n text: `Add new ${args.name}`,\n id: `${args.name}:addNew`,\n icon: 'plus',\n onClick() {\n createModal(() => {\n return (\n <Modal heading={`Add new ${args.name}`}>\n {`Content for adding new ${args.name} goes here…`}\n </Modal>\n );\n });\n }\n }\n ]}\n onViewAll={() => {\n createModal(SummaryListViewAllModal, {\n name: args.name,\n count: args.count,\n loading: args.loading\n });\n }}\n />\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"SummaryList.stories.js","sourceRoot":"","sources":["../../../src/core/SummaryList/SummaryList.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,KAAK,EAEL,KAAK,EACL,mBAAmB,EACnB,WAAW,EAEX,OAAO,EACP,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,UAAU;KACxB;IACD,QAAQ,EAAE;QACR,IAA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AAG,IAAI,CAAC,IAAI,SAAS;gBACzB,IAAI,EAAE,MAAM;gBACZ,OAAO;oBACL,WAAW,CAAC,GAAG,EAAE;wBACf,OAAO,CACL,KAAC,KAAK,IAAC,OAAO,EAAE,WAAW,IAAI,CAAC,IAAI,EAAE,YACnC,0BAA0B,IAAI,CAAC,IAAI,aAAa,WAC3C,CACT,CAAC;oBACJ,CAAC,CAAC,CAAC;gBACL,CAAC;aACF;SACF,EACD,SAAS,EAAE,GAAG,EAAE;YACd,WAAW,CAAC,uBAAuB,EAAE;gBACnC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAC;QACL,CAAC,WACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useContext, useMemo, useState } from 'react';\n\nimport {\n icons,\n OmitStrict,\n Modal,\n ModalManagerContext,\n SummaryList,\n SummaryListProps,\n ViewAll,\n createStringMatcher\n} from '@pega/cosmos-react-core';\n\nimport { useMockListData } from './SummaryList.mocks';\n\nexport default {\n title: 'Core/SummaryList',\n component: SummaryList,\n parameters: {\n layout: 'centered'\n },\n args: {\n name: 'People',\n icon: 'users-solid',\n count: 5,\n loading: false,\n showSecondary: true,\n showVisual: true,\n showActions: true,\n noItems: false,\n noItemsText: 'No items'\n },\n argTypes: {\n name: { control: { type: 'text' } },\n icon: { options: icons, control: { type: 'select', icons: true } },\n count: { control: { type: 'number' } },\n loading: { control: { type: 'boolean' } },\n showSecondary: { control: { type: 'boolean' } },\n showVisual: { control: { type: 'boolean' } },\n showActions: { control: { type: 'boolean' } },\n noItems: { control: { type: 'boolean' } },\n noItemsText: { control: { type: 'text' } }\n }\n} as Meta;\n\ninterface SummaryListStoryProps extends SummaryListProps {\n showSecondary?: boolean;\n showVisual?: boolean;\n showActions?: boolean;\n noItems?: boolean;\n}\n\nexport const SummaryListDemo: Story<SummaryListStoryProps> = (args: SummaryListStoryProps) => {\n const { create: createModal } = useContext(ModalManagerContext);\n const [loading, setLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setLoading(false);\n },\n { count: args.count }\n );\n\n const itemsToRender = items.map(item => {\n return {\n ...item,\n secondary: args.showSecondary ? item.secondary : undefined,\n visual: args.showVisual ? item.visual : undefined,\n actions: args.showActions\n ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({\n text,\n id: text\n }))\n : undefined\n };\n });\n\n return (\n <SummaryList\n name={args.name}\n icon={args.icon}\n count={args.loading || loading ? undefined : args.count}\n items={args.noItems ? [] : itemsToRender}\n loading={args.loading || loading}\n noItemsText={args.noItemsText}\n actions={[\n {\n text: `Add new ${args.name}`,\n id: `${args.name}:addNew`,\n icon: 'plus',\n onClick() {\n createModal(() => {\n return (\n <Modal heading={`Add new ${args.name}`}>\n {`Content for adding new ${args.name} goes here…`}\n </Modal>\n );\n });\n }\n }\n ]}\n />\n );\n};\n\nexport const SummaryListViewAll: Story<SummaryListStoryProps> = (args: SummaryListStoryProps) => {\n const SummaryListViewAllModal = ({\n name,\n count,\n loading\n }: OmitStrict<SummaryListProps, 'items'>) => {\n const [search, setSearch] = useState('');\n const [modalLoading, setModalLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setModalLoading(false);\n },\n {\n count\n }\n );\n\n const itemsToRender = useMemo(() => {\n if (search.trim()) {\n const filterRegex = createStringMatcher(search, 'boundary');\n return items.filter(({ primary }) => filterRegex.test(primary));\n }\n\n return items;\n }, [items, search]);\n\n return (\n <Modal heading={args.name}>\n <ViewAll\n loading={loading || modalLoading}\n items={itemsToRender}\n actions={[\n {\n id: 'addNew',\n text: `Add ${name}`\n }\n ]}\n searchInputProps={{ onSearchChange: setSearch }}\n />\n </Modal>\n );\n };\n\n const { create: createModal } = useContext(ModalManagerContext);\n const [loading, setLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setLoading(false);\n },\n { count: 3 }\n );\n\n const itemsToRender = items.map(item => {\n return {\n ...item,\n secondary: args.showSecondary ? item.secondary : undefined,\n visual: args.showVisual ? item.visual : undefined,\n actions: args.showActions\n ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({\n text,\n id: text\n }))\n : undefined\n };\n });\n\n return (\n <SummaryList\n name={args.name}\n icon={args.icon}\n count={args.loading || loading ? undefined : args.count}\n items={args.noItems ? [] : itemsToRender}\n loading={args.loading || loading}\n noItemsText={args.noItemsText}\n actions={[\n {\n text: `Add new ${args.name}`,\n id: `${args.name}:addNew`,\n icon: 'plus',\n onClick() {\n createModal(() => {\n return (\n <Modal heading={`Add new ${args.name}`}>\n {`Content for adding new ${args.name} goes here…`}\n </Modal>\n );\n });\n }\n }\n ]}\n onViewAll={() => {\n createModal(SummaryListViewAllModal, {\n name: args.name,\n count: args.count,\n loading: args.loading\n });\n }}\n />\n );\n};\n"]}
|
|
@@ -4,4 +4,11 @@ declare const _default: Meta<import("@storybook/react").Args>;
|
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const SwitchDemo: Story<SwitchProps>;
|
|
6
6
|
export declare const SwitchInCard: Story<SwitchProps>;
|
|
7
|
+
interface ConfigurableSwitchProps extends SwitchProps {
|
|
8
|
+
height?: string;
|
|
9
|
+
width?: string;
|
|
10
|
+
onColor?: string;
|
|
11
|
+
offColor?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const ConfigurableSwitch: Story<ConfigurableSwitchProps>;
|
|
7
14
|
//# sourceMappingURL=Switch.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,
|
|
1
|
+
{"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAA+B,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAInF,wBAWU;AAEV,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,WAAW,CAYzC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,WAAW,CAc3C,CAAC;AAEF,UAAU,uBAAwB,SAAQ,WAAW;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,uBAAuB,CAyB7D,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { Card, Switch } from '@pega/cosmos-react-core';
|
|
3
|
+
import { Card, Configuration, Switch } from '@pega/cosmos-react-core';
|
|
4
4
|
import { StyledCard } from './Switch.styles';
|
|
5
5
|
export default {
|
|
6
6
|
title: 'Core/Switch',
|
|
@@ -22,4 +22,35 @@ export const SwitchInCard = (args) => {
|
|
|
22
22
|
const [on, setOn] = useState(false);
|
|
23
23
|
return (_jsx(Card, { as: StyledCard, children: _jsx(Switch, { id: 'switch', on: on, onChange: () => setOn(curr => !curr), label: args.label, disabled: args.disabled }, void 0) }, void 0));
|
|
24
24
|
};
|
|
25
|
+
export const ConfigurableSwitch = (args) => {
|
|
26
|
+
const [on, setOn] = useState(false);
|
|
27
|
+
return (_jsx(Configuration, { theme: {
|
|
28
|
+
components: {
|
|
29
|
+
switch: {
|
|
30
|
+
height: args.height,
|
|
31
|
+
width: args.width,
|
|
32
|
+
on: {
|
|
33
|
+
color: args.onColor
|
|
34
|
+
},
|
|
35
|
+
off: {
|
|
36
|
+
color: args.offColor
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}, children: _jsx(Switch, { on: on, onChange: () => setOn(curr => !curr), label: 'Toggle on/off' }, void 0) }, void 0));
|
|
41
|
+
};
|
|
42
|
+
ConfigurableSwitch.args = {
|
|
43
|
+
height: '1.5rem',
|
|
44
|
+
width: '3rem',
|
|
45
|
+
onColor: '#076bc9',
|
|
46
|
+
offColor: '#939393'
|
|
47
|
+
};
|
|
48
|
+
ConfigurableSwitch.argTypes = {
|
|
49
|
+
height: { control: { type: 'text' } },
|
|
50
|
+
width: { control: { type: 'text' } },
|
|
51
|
+
onColor: { control: { type: 'color' } },
|
|
52
|
+
offColor: { control: { type: 'color' } },
|
|
53
|
+
label: { table: { disable: true } },
|
|
54
|
+
disabled: { table: { disable: true } }
|
|
55
|
+
};
|
|
25
56
|
//# sourceMappingURL=Switch.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.stories.js","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"Switch.stories.js","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAEnF,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE;QACJ,KAAK,EAAE,eAAe;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EA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AM,EAAE;oBACN,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,EAAE,EAAE;wBACF,KAAK,EAAE,IAAI,CAAC,OAAO;qBACpB;oBACD,GAAG,EAAE;wBACH,KAAK,EAAE,IAAI,CAAC,QAAQ;qBACrB;iBACF;aACF;SACF,YAED,KAAC,MAAM,IAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAC,eAAe,WAAG,WAChE,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAkB,CAAC,IAAI,GAAG;IACxB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,SAAS;CACpB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACrC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACpC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACvC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACxC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACnC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Card, Configuration, Switch, SwitchProps } from '@pega/cosmos-react-core';\n\nimport { StyledCard } from './Switch.styles';\n\nexport default {\n title: 'Core/Switch',\n component: Switch,\n args: {\n label: 'Toggle on/off',\n disabled: false\n },\n argTypes: {\n label: { control: { type: 'text' } },\n disabled: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const SwitchDemo: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n );\n};\n\nexport const SwitchInCard: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Card as={StyledCard}>\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n </Card>\n );\n};\n\ninterface ConfigurableSwitchProps extends SwitchProps {\n height?: string;\n width?: string;\n onColor?: string;\n offColor?: string;\n}\n\nexport const ConfigurableSwitch: Story<ConfigurableSwitchProps> = (\n args: ConfigurableSwitchProps\n) => {\n const [on, setOn] = useState(false);\n\n return (\n <Configuration\n theme={{\n components: {\n switch: {\n height: args.height,\n width: args.width,\n on: {\n color: args.onColor\n },\n off: {\n color: args.offColor\n }\n }\n }\n }}\n >\n <Switch on={on} onChange={() => setOn(curr => !curr)} label='Toggle on/off' />\n </Configuration>\n );\n};\n\nConfigurableSwitch.args = {\n height: '1.5rem',\n width: '3rem',\n onColor: '#076bc9',\n offColor: '#939393'\n};\n\nConfigurableSwitch.argTypes = {\n height: { control: { type: 'text' } },\n width: { control: { type: 'text' } },\n onColor: { control: { type: 'color' } },\n offColor: { control: { type: 'color' } },\n label: { table: { disable: true } },\n disabled: { table: { disable: true } }\n};\n"]}
|
|
@@ -11,4 +11,29 @@ interface TableStoryProps {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const TableDemo: Story<TableStoryProps>;
|
|
13
13
|
export declare const StyledTableDemo: Story<TableStoryProps>;
|
|
14
|
+
interface ConfigurableTableProps extends TableStoryProps {
|
|
15
|
+
headerFontSize?: string;
|
|
16
|
+
headerFontWeight?: string;
|
|
17
|
+
headerForegroundColor?: string;
|
|
18
|
+
headerBackgroundColor?: string;
|
|
19
|
+
headerVerticalSpacing?: number;
|
|
20
|
+
headerHorizontalSpacing?: number;
|
|
21
|
+
headerBorderWidth?: string;
|
|
22
|
+
headerBorderColor?: string;
|
|
23
|
+
bodyForegroundColor?: string;
|
|
24
|
+
bodyBackgroundColor?: string;
|
|
25
|
+
bodyVerticalSpacing?: number;
|
|
26
|
+
bodyHorizontalSpacing?: number;
|
|
27
|
+
bodyBorderWidth?: string;
|
|
28
|
+
bodyBorderColor?: string;
|
|
29
|
+
borderHorizontalInner?: boolean;
|
|
30
|
+
borderHorizontalOuter?: boolean;
|
|
31
|
+
borderVerticalInner?: boolean;
|
|
32
|
+
borderVerticalOuter?: boolean;
|
|
33
|
+
spacingHorizontalInner?: boolean;
|
|
34
|
+
spacingHorizontalOuter?: boolean;
|
|
35
|
+
spacingVerticalInner?: boolean;
|
|
36
|
+
spacingVerticalOuter?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare const ConfigurableTable: Story<ConfigurableTableProps>;
|
|
14
39
|
//# sourceMappingURL=Table.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA8B,UAAU,
|
|
1
|
+
{"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA8B,UAAU,EAAiB,MAAM,yBAAyB,CAAC;;AAKhG,wBAiBU;AAEV,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,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AuE3D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Status, Table } from '@pega/cosmos-react-core';
|
|
2
|
+
import { Status, Table, Configuration } from '@pega/cosmos-react-core';
|
|
3
3
|
import { tableData } from './Table.mocks';
|
|
4
4
|
import { StyledBalance } from './Table.styles';
|
|
5
5
|
export default {
|
|
@@ -51,4 +51,116 @@ export const StyledTableDemo = (args) => {
|
|
|
51
51
|
];
|
|
52
52
|
return (_jsx(Table, { title: args.title, hoverHighlight: args.hoverHighlight, loading: args.loading, loadingMessage: args.loadingMessage, data: args.emptyTable ? [] : tableData, columns: columns }, void 0));
|
|
53
53
|
};
|
|
54
|
+
export const ConfigurableTable = (args) => {
|
|
55
|
+
const columns = [
|
|
56
|
+
{ renderer: data => _jsx("b", { children: data.name }, void 0), label: 'Name' },
|
|
57
|
+
{ renderer: 'dob', label: 'Date of Birth' },
|
|
58
|
+
{ renderer: 'address', label: 'Address' },
|
|
59
|
+
{
|
|
60
|
+
renderer: data => {
|
|
61
|
+
return (_jsxs(_Fragment, { children: [data.email && data.emailVerified && _jsx(Status, { variant: 'success', children: data.email }, void 0), data.email && !data.emailVerified && _jsx(Status, { variant: 'urgent', children: data.email }, void 0)] }, void 0));
|
|
62
|
+
},
|
|
63
|
+
label: 'Email'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
renderer: data => {
|
|
67
|
+
return (_jsx(StyledBalance, { negativeBalance: data.balance.startsWith('-'), children: data.balance }, void 0));
|
|
68
|
+
},
|
|
69
|
+
label: 'Account Balance',
|
|
70
|
+
align: 'right'
|
|
71
|
+
}
|
|
72
|
+
];
|
|
73
|
+
return (_jsx(Configuration, { theme: {
|
|
74
|
+
components: {
|
|
75
|
+
table: {
|
|
76
|
+
header: {
|
|
77
|
+
'font-size': args.headerFontSize,
|
|
78
|
+
'font-weight': args.headerFontWeight,
|
|
79
|
+
'foreground-color': args.headerForegroundColor,
|
|
80
|
+
'background-color': args.headerBackgroundColor,
|
|
81
|
+
'vertical-spacing': args.headerVerticalSpacing,
|
|
82
|
+
'horizontal-spacing': args.headerHorizontalSpacing,
|
|
83
|
+
'border-width': args.headerBorderWidth,
|
|
84
|
+
'border-color': args.headerBorderColor
|
|
85
|
+
},
|
|
86
|
+
body: {
|
|
87
|
+
'foreground-color': args.bodyForegroundColor,
|
|
88
|
+
'background-color': args.bodyBackgroundColor,
|
|
89
|
+
'vertical-spacing': args.bodyVerticalSpacing,
|
|
90
|
+
'horizontal-spacing': args.bodyHorizontalSpacing,
|
|
91
|
+
'border-width': args.bodyBorderWidth,
|
|
92
|
+
'border-color': args.bodyBorderColor
|
|
93
|
+
},
|
|
94
|
+
border: {
|
|
95
|
+
'horizontal-inner': args.borderHorizontalInner,
|
|
96
|
+
'horizontal-outer': args.borderHorizontalOuter,
|
|
97
|
+
'vertical-inner': args.borderVerticalInner,
|
|
98
|
+
'vertical-outer': args.borderVerticalOuter
|
|
99
|
+
},
|
|
100
|
+
spacing: {
|
|
101
|
+
'horizontal-inner': args.spacingHorizontalInner,
|
|
102
|
+
'horizontal-outer': args.spacingHorizontalOuter,
|
|
103
|
+
'vertical-inner': args.spacingVerticalInner,
|
|
104
|
+
'vertical-outer': args.spacingVerticalOuter
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}, children: _jsx(Table, { title: 'Accounts', data: tableData, columns: columns }, void 0) }, void 0));
|
|
109
|
+
};
|
|
110
|
+
ConfigurableTable.args = {
|
|
111
|
+
headerFontSize: 's',
|
|
112
|
+
headerFontWeight: '600',
|
|
113
|
+
headerForegroundColor: '#000000',
|
|
114
|
+
headerBackgroundColor: '#f5f5f5',
|
|
115
|
+
headerVerticalSpacing: 1,
|
|
116
|
+
headerHorizontalSpacing: 2,
|
|
117
|
+
headerBorderWidth: '0.0625rem',
|
|
118
|
+
headerBorderColor: '#cfcfcf',
|
|
119
|
+
bodyForegroundColor: '#000000',
|
|
120
|
+
bodyBackgroundColor: '#ffffff',
|
|
121
|
+
bodyVerticalSpacing: 1,
|
|
122
|
+
bodyHorizontalSpacing: 1,
|
|
123
|
+
bodyBorderWidth: '0.0625rem',
|
|
124
|
+
bodyBorderColor: '#cfcfcf',
|
|
125
|
+
borderHorizontalInner: true,
|
|
126
|
+
borderHorizontalOuter: true,
|
|
127
|
+
borderVerticalInner: true,
|
|
128
|
+
borderVerticalOuter: true,
|
|
129
|
+
spacingHorizontalInner: true,
|
|
130
|
+
spacingHorizontalOuter: true,
|
|
131
|
+
spacingVerticalInner: true,
|
|
132
|
+
spacingVerticalOuter: true
|
|
133
|
+
};
|
|
134
|
+
ConfigurableTable.argTypes = {
|
|
135
|
+
headerFontSize: {
|
|
136
|
+
options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],
|
|
137
|
+
control: { type: 'select' }
|
|
138
|
+
},
|
|
139
|
+
headerFontWeight: { control: { type: 'text' } },
|
|
140
|
+
headerForegroundColor: { control: { type: 'color' } },
|
|
141
|
+
headerBackgroundColor: { control: { type: 'color' } },
|
|
142
|
+
headerVerticalSpacing: { control: { type: 'number' } },
|
|
143
|
+
headerHorizontalSpacing: { control: { type: 'number' } },
|
|
144
|
+
headerBorderWidth: { control: { type: 'text' } },
|
|
145
|
+
headerBorderColor: { control: { type: 'color' } },
|
|
146
|
+
bodyForegroundColor: { control: { type: 'color' } },
|
|
147
|
+
bodyBackgroundColor: { control: { type: 'color' } },
|
|
148
|
+
bodyVerticalSpacing: { control: { type: 'number' } },
|
|
149
|
+
bodyHorizontalSpacing: { control: { type: 'number' } },
|
|
150
|
+
bodyBorderWidth: { control: { type: 'text' } },
|
|
151
|
+
bodyBorderColor: { control: { type: 'color' } },
|
|
152
|
+
borderHorizontalInner: { control: { type: 'boolean' } },
|
|
153
|
+
borderHorizontalOuter: { control: { type: 'boolean' } },
|
|
154
|
+
borderVerticalInner: { control: { type: 'boolean' } },
|
|
155
|
+
borderVerticalOuter: { control: { type: 'boolean' } },
|
|
156
|
+
spacingHorizontalInner: { control: { type: 'boolean' } },
|
|
157
|
+
spacingHorizontalOuter: { control: { type: 'boolean' } },
|
|
158
|
+
spacingVerticalInner: { control: { type: 'boolean' } },
|
|
159
|
+
spacingVerticalOuter: { control: { type: 'boolean' } },
|
|
160
|
+
title: { table: { disable: true } },
|
|
161
|
+
hoverHighlight: { table: { disable: true } },
|
|
162
|
+
loading: { table: { disable: true } },
|
|
163
|
+
loadingMessage: { table: { disable: true } },
|
|
164
|
+
emptyTable: { table: { disable: true } }
|
|
165
|
+
};
|
|
54
166
|
//# sourceMappingURL=Table.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.stories.js","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,KAAK,EAA2B,MAAM,yBAAyB,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE;QACJ,KAAK,EAAE,UAAU;QACjB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,KAAK;QACd,cAAc,EAAE,cAAc;QAC9B,UAAU,EAAE,KAAK;KAClB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAChD,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QACzC,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAC7C,UAAU,EAAE,EAAE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AAI,CAAC,aAAa,IAAI,KAAC,MAAM,IAAC,OAAO,EAAC,SAAS,YAAE,IAAI,CAAC,KAAK,WAAU,EACnF,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,KAAC,MAAM,IAAC,OAAO,EAAC,QAAQ,YAAE,IAAI,CAAC,KAAK,WAAU,YACnF,CACJ,CAAC;YACJ,CAAC;YACD,KAAK,EAAE,OAAO;SACf;QACD;YACE,QAAQ,EAAE,IAAI,CAAC,EAAE;gBACf,OAAO,CACL,KAAC,aAAa,IAAC,eAAe,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,YACzD,IAAI,CAAC,OAAO,WACC,CACjB,CAAC;YACJ,CAAC;YACD,KAAK,EAAE,iBAAiB;YACxB,KAAK,EAAE,OAAO;SACf;KACF,CAAC;IAEF,OAAO,CACL,KAAC,KAAK,IACJ,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EACtC,OAAO,EAAE,OAAO,WAChB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Status, Table, ColumnProps, TableProps } from '@pega/cosmos-react-core';\n\nimport { tableData } from './Table.mocks';\nimport { StyledBalance } from './Table.styles';\n\nexport default {\n title: 'Core/Table',\n component: Table,\n args: {\n title: 'Accounts',\n hoverHighlight: false,\n loading: false,\n loadingMessage: 'Loading data',\n emptyTable: false\n },\n argTypes: {\n title: { control: { type: 'text' } },\n hoverHighlight: { control: { type: 'boolean' } },\n loading: { control: { type: 'boolean' } },\n loadingMessage: { control: { type: 'text' } },\n emptyTable: { control: { type: 'boolean' } }\n }\n} as Meta;\n\ninterface TableStoryProps {\n title?: TableProps['title'];\n hoverHighlight?: TableProps['hoverHighlight'];\n loading?: TableProps['loading'];\n loadingMessage?: TableProps['loadingMessage'];\n emptyTable?: boolean;\n}\n\nexport const TableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: 'name', label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n { renderer: 'email', label: 'Email' },\n { renderer: 'balance', label: 'Account Balance', align: 'right' }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n\nexport const StyledTableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: data => <b>{data.name}</b>, label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n {\n renderer: data => {\n return (\n <>\n {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}\n {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}\n </>\n );\n },\n label: 'Email'\n },\n {\n renderer: data => {\n return (\n <StyledBalance negativeBalance={data.balance.startsWith('-')}>\n {data.balance}\n </StyledBalance>\n );\n },\n label: 'Account Balance',\n align: 'right'\n }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Table.stories.js","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,KAAK,EAA2B,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEhG,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AA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AO,EAAE,IAAI,EAAE,EAAE;IAC5C,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACrC,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAC5C,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACzC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Status, Table, ColumnProps, TableProps, Configuration } from '@pega/cosmos-react-core';\n\nimport { tableData } from './Table.mocks';\nimport { StyledBalance } from './Table.styles';\n\nexport default {\n title: 'Core/Table',\n component: Table,\n args: {\n title: 'Accounts',\n hoverHighlight: false,\n loading: false,\n loadingMessage: 'Loading data',\n emptyTable: false\n },\n argTypes: {\n title: { control: { type: 'text' } },\n hoverHighlight: { control: { type: 'boolean' } },\n loading: { control: { type: 'boolean' } },\n loadingMessage: { control: { type: 'text' } },\n emptyTable: { control: { type: 'boolean' } }\n }\n} as Meta;\n\ninterface TableStoryProps {\n title?: TableProps['title'];\n hoverHighlight?: TableProps['hoverHighlight'];\n loading?: TableProps['loading'];\n loadingMessage?: TableProps['loadingMessage'];\n emptyTable?: boolean;\n}\n\nexport const TableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: 'name', label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n { renderer: 'email', label: 'Email' },\n { renderer: 'balance', label: 'Account Balance', align: 'right' }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n\nexport const StyledTableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: data => <b>{data.name}</b>, label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n {\n renderer: data => {\n return (\n <>\n {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}\n {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}\n </>\n );\n },\n label: 'Email'\n },\n {\n renderer: data => {\n return (\n <StyledBalance negativeBalance={data.balance.startsWith('-')}>\n {data.balance}\n </StyledBalance>\n );\n },\n label: 'Account Balance',\n align: 'right'\n }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n\ninterface ConfigurableTableProps extends TableStoryProps {\n headerFontSize?: string;\n headerFontWeight?: string;\n headerForegroundColor?: string;\n headerBackgroundColor?: string;\n headerVerticalSpacing?: number;\n headerHorizontalSpacing?: number;\n headerBorderWidth?: string;\n headerBorderColor?: string;\n bodyForegroundColor?: string;\n bodyBackgroundColor?: string;\n bodyVerticalSpacing?: number;\n bodyHorizontalSpacing?: number;\n bodyBorderWidth?: string;\n bodyBorderColor?: string;\n borderHorizontalInner?: boolean;\n borderHorizontalOuter?: boolean;\n borderVerticalInner?: boolean;\n borderVerticalOuter?: boolean;\n spacingHorizontalInner?: boolean;\n spacingHorizontalOuter?: boolean;\n spacingVerticalInner?: boolean;\n spacingVerticalOuter?: boolean;\n}\n\nexport const ConfigurableTable: Story<ConfigurableTableProps> = (args: ConfigurableTableProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: data => <b>{data.name}</b>, label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n {\n renderer: data => {\n return (\n <>\n {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}\n {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}\n </>\n );\n },\n label: 'Email'\n },\n {\n renderer: data => {\n return (\n <StyledBalance negativeBalance={data.balance.startsWith('-')}>\n {data.balance}\n </StyledBalance>\n );\n },\n label: 'Account Balance',\n align: 'right'\n }\n ];\n\n return (\n <Configuration\n theme={{\n components: {\n table: {\n header: {\n 'font-size': args.headerFontSize,\n 'font-weight': args.headerFontWeight,\n 'foreground-color': args.headerForegroundColor,\n 'background-color': args.headerBackgroundColor,\n 'vertical-spacing': args.headerVerticalSpacing,\n 'horizontal-spacing': args.headerHorizontalSpacing,\n 'border-width': args.headerBorderWidth,\n 'border-color': args.headerBorderColor\n },\n body: {\n 'foreground-color': args.bodyForegroundColor,\n 'background-color': args.bodyBackgroundColor,\n 'vertical-spacing': args.bodyVerticalSpacing,\n 'horizontal-spacing': args.bodyHorizontalSpacing,\n 'border-width': args.bodyBorderWidth,\n 'border-color': args.bodyBorderColor\n },\n border: {\n 'horizontal-inner': args.borderHorizontalInner,\n 'horizontal-outer': args.borderHorizontalOuter,\n 'vertical-inner': args.borderVerticalInner,\n 'vertical-outer': args.borderVerticalOuter\n },\n spacing: {\n 'horizontal-inner': args.spacingHorizontalInner,\n 'horizontal-outer': args.spacingHorizontalOuter,\n 'vertical-inner': args.spacingVerticalInner,\n 'vertical-outer': args.spacingVerticalOuter\n }\n }\n }\n }}\n >\n <Table title='Accounts' data={tableData} columns={columns} />\n </Configuration>\n );\n};\n\nConfigurableTable.args = {\n headerFontSize: 's',\n headerFontWeight: '600',\n headerForegroundColor: '#000000',\n headerBackgroundColor: '#f5f5f5',\n headerVerticalSpacing: 1,\n headerHorizontalSpacing: 2,\n headerBorderWidth: '0.0625rem',\n headerBorderColor: '#cfcfcf',\n bodyForegroundColor: '#000000',\n bodyBackgroundColor: '#ffffff',\n bodyVerticalSpacing: 1,\n bodyHorizontalSpacing: 1,\n bodyBorderWidth: '0.0625rem',\n bodyBorderColor: '#cfcfcf',\n borderHorizontalInner: true,\n borderHorizontalOuter: true,\n borderVerticalInner: true,\n borderVerticalOuter: true,\n spacingHorizontalInner: true,\n spacingHorizontalOuter: true,\n spacingVerticalInner: true,\n spacingVerticalOuter: true\n};\n\nConfigurableTable.argTypes = {\n headerFontSize: {\n options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],\n control: { type: 'select' }\n },\n headerFontWeight: { control: { type: 'text' } },\n headerForegroundColor: { control: { type: 'color' } },\n headerBackgroundColor: { control: { type: 'color' } },\n headerVerticalSpacing: { control: { type: 'number' } },\n headerHorizontalSpacing: { control: { type: 'number' } },\n headerBorderWidth: { control: { type: 'text' } },\n headerBorderColor: { control: { type: 'color' } },\n bodyForegroundColor: { control: { type: 'color' } },\n bodyBackgroundColor: { control: { type: 'color' } },\n bodyVerticalSpacing: { control: { type: 'number' } },\n bodyHorizontalSpacing: { control: { type: 'number' } },\n bodyBorderWidth: { control: { type: 'text' } },\n bodyBorderColor: { control: { type: 'color' } },\n borderHorizontalInner: { control: { type: 'boolean' } },\n borderHorizontalOuter: { control: { type: 'boolean' } },\n borderVerticalInner: { control: { type: 'boolean' } },\n borderVerticalOuter: { control: { type: 'boolean' } },\n spacingHorizontalInner: { control: { type: 'boolean' } },\n spacingHorizontalOuter: { control: { type: 'boolean' } },\n spacingVerticalInner: { control: { type: 'boolean' } },\n spacingVerticalOuter: { control: { type: 'boolean' } },\n title: { table: { disable: true } },\n hoverHighlight: { table: { disable: true } },\n loading: { table: { disable: true } },\n loadingMessage: { table: { disable: true } },\n emptyTable: { table: { disable: true } }\n};\n"]}
|
|
@@ -4,4 +4,9 @@ declare const _default: Meta<import("@storybook/react").Args>;
|
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const TabsDemo: Story<TabsProps>;
|
|
6
6
|
export declare const TabsCountDemo: Story<TabsProps>;
|
|
7
|
+
interface ConfigurableTabsProps {
|
|
8
|
+
foreground?: string;
|
|
9
|
+
type?: TabsProps['type'];
|
|
10
|
+
}
|
|
11
|
+
export declare const ConfigurableTabs: Story<ConfigurableTabsProps>;
|
|
7
12
|
//# sourceMappingURL=Tabs.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Tabs/Tabs.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,
|
|
1
|
+
{"version":3,"file":"Tabs.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Tabs/Tabs.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAuC,SAAS,EAAE,MAAM,yBAAyB,CAAC;;AAEzF,wBASU;AAEV,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,SAAS,CA6BrC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,SAAS,CA6B1C,CAAC;AAEF,UAAU,qBAAqB;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;CAC1B;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,qBAAqB,CAuCzD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { Flex, TabPanel, Tabs } from '@pega/cosmos-react-core';
|
|
3
|
+
import { Configuration, Flex, TabPanel, Tabs } from '@pega/cosmos-react-core';
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Core/Tabs',
|
|
6
6
|
component: Tabs,
|
|
@@ -39,4 +39,33 @@ export const TabsCountDemo = (args) => {
|
|
|
39
39
|
];
|
|
40
40
|
return (_jsxs(Flex, { container: { direction: args.type === 'horizontal' ? 'column' : 'row' }, children: [_jsx(Flex, { item: { grow: 1 }, children: _jsx(Tabs, { tabs: tabs, type: args.type, onTabClick: handleTabChange, currentTabId: panelShown }, void 0) }, void 0), _jsx(Flex, { container: { pad: [1, 2] }, item: { grow: 1 }, children: tabs.map(tab => (_jsx(TabPanel, { tabId: tab.id, currentTabId: panelShown, children: _jsxs("div", { children: [tab.name, " content"] }, void 0) }, tab.id))) }, void 0)] }, void 0));
|
|
41
41
|
};
|
|
42
|
+
export const ConfigurableTabs = (args) => {
|
|
43
|
+
const [panelShown, changePanel] = useState('1');
|
|
44
|
+
const handleTabChange = (id) => {
|
|
45
|
+
changePanel(id);
|
|
46
|
+
};
|
|
47
|
+
const tabs = [
|
|
48
|
+
{ name: 'Tab 1', id: '1' },
|
|
49
|
+
{ name: 'Tab 2', id: '2' },
|
|
50
|
+
{ name: 'Tab 3', id: '3' },
|
|
51
|
+
{ name: 'Tab 4', id: '4', disabled: true },
|
|
52
|
+
{ name: 'Tab 5', id: '5' }
|
|
53
|
+
];
|
|
54
|
+
return (_jsxs(Configuration, { theme: {
|
|
55
|
+
components: {
|
|
56
|
+
tabs: {
|
|
57
|
+
base: {
|
|
58
|
+
foreground: args.foreground
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}, children: [_jsx(Flex, { item: { grow: 1 }, children: _jsx(Tabs, { tabs: tabs, onTabClick: handleTabChange, currentTabId: panelShown }, void 0) }, void 0), _jsx(Flex, { container: { pad: [1, 2] }, item: { grow: 1 }, children: tabs.map(tab => (_jsx(TabPanel, { tabId: tab.id, currentTabId: panelShown, children: _jsxs("div", { children: [tab.name, " content"] }, void 0) }, tab.id))) }, void 0)] }, void 0));
|
|
63
|
+
};
|
|
64
|
+
ConfigurableTabs.args = {
|
|
65
|
+
foreground: '#076bc9'
|
|
66
|
+
};
|
|
67
|
+
ConfigurableTabs.argTypes = {
|
|
68
|
+
foreground: { control: { type: 'color' } },
|
|
69
|
+
type: { table: { disable: true } }
|
|
70
|
+
};
|
|
42
71
|
//# sourceMappingURL=Tabs.stories.js.map
|