@pega/cosmos-react-demos 3.0.0-dev.4.2 → 3.0.0-dev.7.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.map +1 -1
- package/jsx/build/AppHeader/AppHeader.stories.jsx +6 -1
- package/jsx/build/AppHeader/AppHeader.stories.jsx.map +1 -1
- package/jsx/build/AppShell/AppShell.mocks.d.ts +2 -0
- package/jsx/build/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/jsx/build/AppShell/{AppShell.mocks.js → AppShell.mocks.jsx} +22 -1
- package/jsx/build/AppShell/AppShell.mocks.jsx.map +1 -0
- package/jsx/build/AppShell/AppShell.stories.d.ts +2 -4
- package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.jsx +20 -30
- package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/build/FlowModeller/FlowModeller.mocks.jsx +6 -6
- package/jsx/build/FlowModeller/FlowModeller.mocks.jsx.map +1 -1
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts +1 -5
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -1
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js +5 -10
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts +3 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.mocks.js +106 -18
- package/jsx/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx +111 -27
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
- package/jsx/build/LifeCycle/utils.d.ts.map +1 -1
- package/jsx/build/LifeCycle/utils.js +5 -4
- package/jsx/build/LifeCycle/utils.js.map +1 -1
- package/jsx/build/ObjectPreview/ObjectPreview.mocks.d.ts +4 -0
- package/jsx/build/ObjectPreview/ObjectPreview.mocks.d.ts.map +1 -0
- package/jsx/build/ObjectPreview/ObjectPreview.mocks.jsx +9 -0
- package/jsx/build/ObjectPreview/ObjectPreview.mocks.jsx.map +1 -0
- package/jsx/build/ObjectPreview/ObjectPreview.stories.d.ts +8 -0
- package/jsx/build/ObjectPreview/ObjectPreview.stories.d.ts.map +1 -0
- package/jsx/build/ObjectPreview/ObjectPreview.stories.jsx +93 -0
- package/jsx/build/ObjectPreview/ObjectPreview.stories.jsx.map +1 -0
- package/jsx/build/ObjectPreview/ObjectPreview.styles.d.ts +3 -0
- package/jsx/build/ObjectPreview/ObjectPreview.styles.d.ts.map +1 -0
- package/jsx/build/ObjectPreview/ObjectPreview.styles.js +22 -0
- package/jsx/build/ObjectPreview/ObjectPreview.styles.js.map +1 -0
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts +7 -1
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -1
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx +59 -43
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx.map +1 -1
- package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -1
- package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx +37 -5
- package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx.map +1 -1
- package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts +10 -9
- package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts.map +1 -1
- package/jsx/build/PageTemplates/GalleryPage.mocks.jsx +7 -9
- package/jsx/build/PageTemplates/GalleryPage.mocks.jsx.map +1 -1
- package/jsx/build/PageTemplates/GalleryPage.stories.d.ts +0 -1
- package/jsx/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -1
- package/jsx/build/PageTemplates/GalleryPage.stories.jsx +12 -14
- package/jsx/build/PageTemplates/GalleryPage.stories.jsx.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts +2 -1
- package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.mocks.jsx +17 -2
- package/jsx/build/PageTemplates/PageTemplates.mocks.jsx.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts +2 -4
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx +192 -128
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/core/CreditCard/CreditCard.stories.d.ts +10 -0
- package/jsx/core/CreditCard/CreditCard.stories.d.ts.map +1 -0
- package/jsx/core/CreditCard/CreditCard.stories.jsx +10 -0
- package/jsx/core/CreditCard/CreditCard.stories.jsx.map +1 -0
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.jsx.map +1 -1
- package/jsx/social/Email/Email.mocks.d.ts +3 -3
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
- package/jsx/social/Email/Email.mocks.jsx +17 -7
- package/jsx/social/Email/Email.mocks.jsx.map +1 -1
- package/jsx/social/Email/Email.stories.d.ts.map +1 -1
- package/jsx/social/Email/Email.stories.jsx +11 -24
- package/jsx/social/Email/Email.stories.jsx.map +1 -1
- package/jsx/social/Feed/Feed.mocks.d.ts.map +1 -1
- package/jsx/social/Feed/Feed.mocks.jsx.map +1 -1
- package/jsx/work/Glimpse/Glimpse.stories.d.ts.map +1 -1
- package/jsx/work/Glimpse/Glimpse.stories.jsx.map +1 -1
- package/lib/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
- package/lib/build/AppHeader/AppHeader.stories.js +7 -2
- package/lib/build/AppHeader/AppHeader.stories.js.map +1 -1
- package/lib/build/AppShell/AppShell.mocks.d.ts +2 -0
- package/lib/build/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.mocks.js +20 -0
- package/lib/build/AppShell/AppShell.mocks.js.map +1 -1
- package/lib/build/AppShell/AppShell.stories.d.ts +2 -4
- package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.stories.js +21 -29
- package/lib/build/AppShell/AppShell.stories.js.map +1 -1
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js +2 -2
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js.map +1 -1
- package/lib/build/DynamicContentEditor/FieldSelector.js +1 -1
- package/lib/build/DynamicContentEditor/FieldSelector.js.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.mocks.js +11 -11
- package/lib/build/FlowModeller/FlowModeller.mocks.js.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.stories.js +6 -6
- package/lib/build/FlowModeller/FlowModeller.stories.js.map +1 -1
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts +1 -5
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -1
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js +5 -10
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -1
- package/lib/build/ItemLibrary/LibraryPicker.stories.js +1 -1
- package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.mocks.d.ts +3 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.mocks.js +106 -18
- package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.js +115 -31
- package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
- package/lib/build/LifeCycle/utils.d.ts.map +1 -1
- package/lib/build/LifeCycle/utils.js +5 -4
- package/lib/build/LifeCycle/utils.js.map +1 -1
- package/lib/build/ObjectPreview/ObjectPreview.mocks.d.ts +4 -0
- package/lib/build/ObjectPreview/ObjectPreview.mocks.d.ts.map +1 -0
- package/lib/build/ObjectPreview/ObjectPreview.mocks.js +8 -0
- package/lib/build/ObjectPreview/ObjectPreview.mocks.js.map +1 -0
- package/lib/build/ObjectPreview/ObjectPreview.stories.d.ts +8 -0
- package/lib/build/ObjectPreview/ObjectPreview.stories.d.ts.map +1 -0
- package/lib/build/ObjectPreview/ObjectPreview.stories.js +90 -0
- package/lib/build/ObjectPreview/ObjectPreview.stories.js.map +1 -0
- package/lib/build/ObjectPreview/ObjectPreview.styles.d.ts +3 -0
- package/lib/build/ObjectPreview/ObjectPreview.styles.d.ts.map +1 -0
- package/lib/build/ObjectPreview/ObjectPreview.styles.js +22 -0
- package/lib/build/ObjectPreview/ObjectPreview.styles.js.map +1 -0
- package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts +7 -1
- package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js +62 -30
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.stories.js +34 -6
- package/lib/build/ObjectSelect/ObjectSelect.stories.js.map +1 -1
- package/lib/build/PageTemplates/GalleryPage.mocks.d.ts +10 -9
- package/lib/build/PageTemplates/GalleryPage.mocks.d.ts.map +1 -1
- package/lib/build/PageTemplates/GalleryPage.mocks.js +8 -10
- package/lib/build/PageTemplates/GalleryPage.mocks.js.map +1 -1
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts +0 -1
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -1
- package/lib/build/PageTemplates/GalleryPage.stories.js +13 -15
- package/lib/build/PageTemplates/GalleryPage.stories.js.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.mocks.d.ts +2 -1
- package/lib/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.mocks.js +16 -5
- package/lib/build/PageTemplates/PageTemplates.mocks.js.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts +2 -4
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.js +217 -154
- package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/build/Workbench/Workbench.stories.js +11 -11
- package/lib/build/Workbench/Workbench.stories.js.map +1 -1
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js +7 -7
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js.map +1 -1
- package/lib/core/AppShell/AppShell.mocks.js +5 -5
- package/lib/core/AppShell/AppShell.mocks.js.map +1 -1
- package/lib/core/AppShell/AppShell.stories.js +8 -8
- package/lib/core/AppShell/AppShell.stories.js.map +1 -1
- package/lib/core/Avatar/Avatar.stories.js +6 -6
- package/lib/core/Avatar/Avatar.stories.js.map +1 -1
- package/lib/core/Backdrop/Backdrop.stories.js +2 -2
- package/lib/core/Backdrop/Backdrop.stories.js.map +1 -1
- package/lib/core/Badges/Alert.stories.js +1 -1
- package/lib/core/Badges/Alert.stories.js.map +1 -1
- package/lib/core/Badges/Count.stories.js +1 -1
- package/lib/core/Badges/Count.stories.js.map +1 -1
- package/lib/core/Badges/Selection.stories.js +1 -1
- package/lib/core/Badges/Selection.stories.js.map +1 -1
- package/lib/core/Badges/Status.stories.js +2 -2
- package/lib/core/Badges/Status.stories.js.map +1 -1
- package/lib/core/Badges/Tag.stories.js +1 -1
- package/lib/core/Badges/Tag.stories.js.map +1 -1
- package/lib/core/Banner/Banner.mocks.js +1 -1
- package/lib/core/Banner/Banner.mocks.js.map +1 -1
- package/lib/core/Banner/Banner.stories.js +11 -11
- package/lib/core/Banner/Banner.stories.js.map +1 -1
- package/lib/core/Boolean/BooleanDisplay.stories.js +1 -1
- package/lib/core/Boolean/BooleanDisplay.stories.js.map +1 -1
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.js +2 -2
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.js.map +1 -1
- package/lib/core/Button/Button.stories.js +7 -7
- package/lib/core/Button/Button.stories.js.map +1 -1
- package/lib/core/Card/Card.stories.js +4 -4
- package/lib/core/Card/Card.stories.js.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.js +3 -3
- package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js +3 -3
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js.map +1 -1
- package/lib/core/ColorPicker/ColorPicker.stories.js +5 -5
- package/lib/core/ColorPicker/ColorPicker.stories.js.map +1 -1
- package/lib/core/ComboBox/ComboBox.stories.js +6 -6
- package/lib/core/ComboBox/ComboBox.stories.js.map +1 -1
- package/lib/core/Configuration/Configuration.mocks.js +1 -1
- package/lib/core/Configuration/Configuration.mocks.js.map +1 -1
- package/lib/core/Configuration/Configuration.stories.js +10 -10
- package/lib/core/Configuration/Configuration.stories.js.map +1 -1
- package/lib/core/CreditCard/CreditCard.stories.d.ts +10 -0
- package/lib/core/CreditCard/CreditCard.stories.d.ts.map +1 -0
- package/lib/core/CreditCard/CreditCard.stories.js +11 -0
- package/lib/core/CreditCard/CreditCard.stories.js.map +1 -0
- package/lib/core/Currency/Currency.stories.js +2 -2
- package/lib/core/Currency/Currency.stories.js.map +1 -1
- package/lib/core/DateTime/DateTime.stories.js +9 -9
- package/lib/core/DateTime/DateTime.stories.js.map +1 -1
- package/lib/core/DateTime/DateTimeDisplay.stories.js +2 -2
- package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -1
- package/lib/core/DateTime/DateTimePicker.stories.js +2 -2
- package/lib/core/DateTime/DateTimePicker.stories.js.map +1 -1
- package/lib/core/Drawer/Drawer.stories.js +4 -4
- package/lib/core/Drawer/Drawer.stories.js.map +1 -1
- package/lib/core/Email/EmailDisplay.stories.js +1 -1
- package/lib/core/Email/EmailDisplay.stories.js.map +1 -1
- package/lib/core/EmojiPicker/EmojiPicker.stories.js +3 -3
- package/lib/core/EmojiPicker/EmojiPicker.stories.js.map +1 -1
- package/lib/core/EmptyState/EmptyState.stories.js +1 -1
- package/lib/core/EmptyState/EmptyState.stories.js.map +1 -1
- package/lib/core/ErrorState/ErrorState.stories.js +1 -1
- package/lib/core/ErrorState/ErrorState.stories.js.map +1 -1
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.js +2 -2
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.js +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.js +7 -7
- package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.js +10 -10
- package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
- package/lib/core/FieldValueList/FieldValueList.stories.js +4 -4
- package/lib/core/FieldValueList/FieldValueList.stories.js.map +1 -1
- package/lib/core/File/FileDisplay.stories.js +10 -10
- package/lib/core/File/FileDisplay.stories.js.map +1 -1
- package/lib/core/File/FileInput.stories.js +2 -2
- package/lib/core/File/FileInput.stories.js.map +1 -1
- package/lib/core/Flex/FlexContainer.stories.js +7 -7
- package/lib/core/Flex/FlexContainer.stories.js.map +1 -1
- package/lib/core/Flex/FlexItem.stories.js +3 -3
- package/lib/core/Flex/FlexItem.stories.js.map +1 -1
- package/lib/core/Form/Form.mocks.js +3 -3
- package/lib/core/Form/Form.mocks.js.map +1 -1
- package/lib/core/Form/Form.stories.js +8 -8
- package/lib/core/Form/Form.stories.js.map +1 -1
- package/lib/core/Grid/GridContainer.stories.js +9 -9
- package/lib/core/Grid/GridContainer.stories.js.map +1 -1
- package/lib/core/Grid/GridItem.stories.js +3 -3
- package/lib/core/Grid/GridItem.stories.js.map +1 -1
- package/lib/core/HTML/HTML.stories.js +1 -1
- package/lib/core/HTML/HTML.stories.js.map +1 -1
- package/lib/core/Icon/Icon.mocks.js +1 -1
- package/lib/core/Icon/Icon.mocks.js.map +1 -1
- package/lib/core/Icon/Icon.stories.js +6 -6
- package/lib/core/Icon/Icon.stories.js.map +1 -1
- package/lib/core/IconPicker/IconPicker.stories.js +1 -1
- package/lib/core/IconPicker/IconPicker.stories.js.map +1 -1
- package/lib/core/Image/Image.stories.js +1 -1
- package/lib/core/Image/Image.stories.js.map +1 -1
- package/lib/core/Input/Input.stories.js +2 -2
- package/lib/core/Input/Input.stories.js.map +1 -1
- package/lib/core/Label/Label.stories.js +2 -2
- package/lib/core/Label/Label.stories.js.map +1 -1
- package/lib/core/Lightbox/Lightbox.stories.js +3 -3
- package/lib/core/Lightbox/Lightbox.stories.js.map +1 -1
- package/lib/core/Link/Link.stories.js +3 -3
- package/lib/core/Link/Link.stories.js.map +1 -1
- package/lib/core/List/CommaSeparatedList.stories.js +1 -1
- package/lib/core/List/CommaSeparatedList.stories.js.map +1 -1
- package/lib/core/List/OrderedList.stories.js +1 -1
- package/lib/core/List/OrderedList.stories.js.map +1 -1
- package/lib/core/List/UnorderedList.stories.js +1 -1
- package/lib/core/List/UnorderedList.stories.js.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.mocks.js +5 -5
- package/lib/core/ListToolbar/ListToolbar.mocks.js.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.stories.js +2 -2
- package/lib/core/ListToolbar/ListToolbar.stories.js.map +1 -1
- package/lib/core/Location/Location.stories.js +4 -4
- package/lib/core/Location/Location.stories.js.map +1 -1
- package/lib/core/Menu/Menu.stories.js +5 -5
- package/lib/core/Menu/Menu.stories.js.map +1 -1
- package/lib/core/MenuButton/MenuButton.stories.js +9 -9
- package/lib/core/MenuButton/MenuButton.stories.js.map +1 -1
- package/lib/core/MetaList/MetaList.stories.js +3 -3
- package/lib/core/MetaList/MetaList.stories.js.map +1 -1
- package/lib/core/Modal/Modal.mocks.js +8 -8
- package/lib/core/Modal/Modal.mocks.js.map +1 -1
- package/lib/core/Modal/Modal.stories.js +29 -29
- package/lib/core/Modal/Modal.stories.js.map +1 -1
- package/lib/core/MultiStep/MultiStep.stories.js +3 -3
- package/lib/core/MultiStep/MultiStep.stories.js.map +1 -1
- package/lib/core/Number/Number.stories.js +3 -3
- package/lib/core/Number/Number.stories.js.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.js +27 -27
- package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/core/Pagination/Pagination.stories.js +1 -1
- package/lib/core/Pagination/Pagination.stories.js.map +1 -1
- package/lib/core/Paragraph/ParagraphDisplay.stories.js +1 -1
- package/lib/core/Paragraph/ParagraphDisplay.stories.js.map +1 -1
- package/lib/core/Phone/Phone.stories.js +2 -2
- package/lib/core/Phone/Phone.stories.js.map +1 -1
- package/lib/core/Popover/Popover.stories.js +2 -2
- package/lib/core/Popover/Popover.stories.js.map +1 -1
- package/lib/core/Progress/Progress.stories.js +3 -3
- package/lib/core/Progress/Progress.stories.js.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.js +3 -3
- package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js +3 -3
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js.map +1 -1
- package/lib/core/Rating/Rating.stories.js +2 -2
- package/lib/core/Rating/Rating.stories.js.map +1 -1
- package/lib/core/SearchInput/SearchInput.stories.js +2 -2
- package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
- package/lib/core/Select/Select.stories.js +2 -2
- package/lib/core/Select/Select.stories.js.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.js +2 -2
- package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
- package/lib/core/Slider/Slider.stories.js +1 -1
- package/lib/core/Slider/Slider.stories.js.map +1 -1
- package/lib/core/SummaryItem/SummaryItem.stories.js +4 -4
- package/lib/core/SummaryItem/SummaryItem.stories.js.map +1 -1
- package/lib/core/SummaryList/SummaryList.mocks.js +2 -2
- package/lib/core/SummaryList/SummaryList.mocks.js.map +1 -1
- package/lib/core/SummaryList/SummaryList.stories.js +5 -5
- package/lib/core/SummaryList/SummaryList.stories.js.map +1 -1
- package/lib/core/Switch/Switch.stories.js +3 -3
- package/lib/core/Switch/Switch.stories.js.map +1 -1
- package/lib/core/Table/Table.mocks.js +1 -1
- package/lib/core/Table/Table.mocks.js.map +1 -1
- package/lib/core/Table/Table.stories.js +9 -9
- package/lib/core/Table/Table.stories.js.map +1 -1
- package/lib/core/Tabs/Tabs.stories.js +3 -3
- package/lib/core/Tabs/Tabs.stories.js.map +1 -1
- package/lib/core/Text/Text.stories.js +2 -2
- package/lib/core/Text/Text.stories.js.map +1 -1
- package/lib/core/TextArea/TextArea.stories.js +2 -2
- package/lib/core/TextArea/TextArea.stories.js.map +1 -1
- package/lib/core/Toaster/Toaster.stories.js +2 -2
- package/lib/core/Toaster/Toaster.stories.js.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.js +2 -2
- package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
- package/lib/core/Tree/Tree.stories.js +3 -3
- package/lib/core/Tree/Tree.stories.js.map +1 -1
- package/lib/core/URL/URL.stories.js +1 -1
- package/lib/core/URL/URL.stories.js.map +1 -1
- package/lib/cs/Article/Article.stories.js +9 -9
- package/lib/cs/Article/Article.stories.js.map +1 -1
- package/lib/cs/ArticleList/ArticleList.stories.js +11 -11
- package/lib/cs/ArticleList/ArticleList.stories.js.map +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.js +12 -12
- package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
- package/lib/cs/CSCaseView/CSCaseView.mocks.js +3 -3
- package/lib/cs/CSCaseView/CSCaseView.mocks.js.map +1 -1
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js +2 -2
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js.map +1 -1
- package/lib/cs/DialPad/DialPad.stories.js +1 -1
- package/lib/cs/DialPad/DialPad.stories.js.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +15 -15
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js +1 -1
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js.map +1 -1
- package/lib/cs/InteractionTimer/InteractionTimer.stories.js +1 -1
- package/lib/cs/InteractionTimer/InteractionTimer.stories.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.js +8 -8
- package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
- package/lib/dnd/DragDropList/DragDropList.mocks.js +2 -2
- package/lib/dnd/DragDropList/DragDropList.mocks.js.map +1 -1
- package/lib/dnd/DragDropList/DragDropList.stories.js +4 -4
- package/lib/dnd/DragDropList/DragDropList.stories.js.map +1 -1
- package/lib/rte/Editor/Editor.mocks.js +2 -2
- package/lib/rte/Editor/Editor.mocks.js.map +1 -1
- package/lib/rte/Editor/Editor.stories.js +6 -6
- package/lib/rte/Editor/Editor.stories.js.map +1 -1
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.js +5 -5
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.js.map +1 -1
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js +5 -5
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -1
- package/lib/rte/RichTextEditor/RichTextViewer.stories.js +5 -5
- package/lib/rte/RichTextEditor/RichTextViewer.stories.js.map +1 -1
- package/lib/social/Chat/Chat.stories.js +27 -27
- package/lib/social/Chat/Chat.stories.js.map +1 -1
- package/lib/social/Chat/RepeatingView.stories.js +2 -2
- package/lib/social/Chat/RepeatingView.stories.js.map +1 -1
- package/lib/social/Email/Email.mocks.d.ts +3 -3
- package/lib/social/Email/Email.mocks.d.ts.map +1 -1
- package/lib/social/Email/Email.mocks.js +21 -10
- package/lib/social/Email/Email.mocks.js.map +1 -1
- package/lib/social/Email/Email.stories.d.ts.map +1 -1
- package/lib/social/Email/Email.stories.js +24 -36
- package/lib/social/Email/Email.stories.js.map +1 -1
- package/lib/social/Feed/Feed.mocks.d.ts.map +1 -1
- package/lib/social/Feed/Feed.mocks.js +40 -40
- package/lib/social/Feed/Feed.mocks.js.map +1 -1
- package/lib/social/Feed/Feed.stories.js +6 -6
- package/lib/social/Feed/Feed.stories.js.map +1 -1
- package/lib/social/Feed/FeedNewPost.stories.js +2 -2
- package/lib/social/Feed/FeedNewPost.stories.js.map +1 -1
- package/lib/social/Feed/FeedPost.stories.js +8 -8
- package/lib/social/Feed/FeedPost.stories.js.map +1 -1
- package/lib/social/Feed/FeedReply.stories.js +5 -5
- package/lib/social/Feed/FeedReply.stories.js.map +1 -1
- package/lib/social/Feed/FeedReplyInput.stories.js +2 -2
- package/lib/social/Feed/FeedReplyInput.stories.js.map +1 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js +1 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js.map +1 -1
- package/lib/work/CaseView/Attachments.mocks.js +15 -15
- package/lib/work/CaseView/Attachments.mocks.js.map +1 -1
- package/lib/work/CaseView/CaseView.mocks.js +7 -7
- package/lib/work/CaseView/CaseView.mocks.js.map +1 -1
- package/lib/work/CaseView/CaseView.stories.js +21 -21
- package/lib/work/CaseView/CaseView.stories.js.map +1 -1
- package/lib/work/CaseView/Details.mocks.js +1 -1
- package/lib/work/CaseView/Details.mocks.js.map +1 -1
- package/lib/work/CaseView/FileService.mock.js +1 -1
- package/lib/work/CaseView/FileService.mock.js.map +1 -1
- package/lib/work/CaseView/MobileCaseView.stories.js +1 -1
- package/lib/work/CaseView/MobileCaseView.stories.js.map +1 -1
- package/lib/work/CaseView/Pulse.mocks.js +2 -2
- package/lib/work/CaseView/Pulse.mocks.js.map +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.js +21 -21
- package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.js.map +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js +2 -2
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js.map +1 -1
- package/lib/work/Confirmation/Confirmation.stories.js +2 -2
- package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
- package/lib/work/Details/Details.stories.js +15 -15
- package/lib/work/Details/Details.stories.js.map +1 -1
- package/lib/work/Glimpse/Glimpse.stories.d.ts.map +1 -1
- package/lib/work/Glimpse/Glimpse.stories.js +3 -3
- package/lib/work/Glimpse/Glimpse.stories.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.mocks.js +4 -4
- package/lib/work/SearchResults/SearchResults.mocks.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js +11 -11
- package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
- package/lib/work/Stages/Stages.stories.js +2 -2
- package/lib/work/Stages/Stages.stories.js.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.mocks.js +2 -2
- package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.stories.js +1 -1
- package/lib/work/Stakeholders/Stakeholders.stories.js.map +1 -1
- package/lib/work/Tags/Tags.stories.js +1 -1
- package/lib/work/Tags/Tags.stories.js.map +1 -1
- package/lib/work/Tasks/TaskList.stories.js +3 -3
- package/lib/work/Tasks/TaskList.stories.js.map +1 -1
- package/lib/work/Tasks/Tasks.stories.js +11 -11
- package/lib/work/Tasks/Tasks.stories.js.map +1 -1
- package/lib/work/Timeline/Timeline.mocks.js +8 -8
- package/lib/work/Timeline/Timeline.mocks.js.map +1 -1
- package/lib/work/Timeline/Timeline.stories.js +2 -2
- package/lib/work/Timeline/Timeline.stories.js.map +1 -1
- package/package.json +10 -10
- package/jsx/build/AppShell/AppShell.mocks.js.map +0 -1
|
@@ -28,43 +28,43 @@ export const TableDemo = (args) => {
|
|
|
28
28
|
{ renderer: 'email', label: 'Email' },
|
|
29
29
|
{ renderer: 'balance', label: 'Account Balance', align: 'right' }
|
|
30
30
|
];
|
|
31
|
-
return (_jsx(Table, { title: args.title, hoverHighlight: args.hoverHighlight, loading: args.loading, loadingMessage: args.loadingMessage, data: args.emptyTable ? [] : tableData, columns: columns }
|
|
31
|
+
return (_jsx(Table, { title: args.title, hoverHighlight: args.hoverHighlight, loading: args.loading, loadingMessage: args.loadingMessage, data: args.emptyTable ? [] : tableData, columns: columns }));
|
|
32
32
|
};
|
|
33
33
|
export const StyledTableDemo = (args) => {
|
|
34
34
|
const columns = [
|
|
35
|
-
{ renderer: data => _jsx("b", { children: data.name }
|
|
35
|
+
{ renderer: data => _jsx("b", { children: data.name }), label: 'Name' },
|
|
36
36
|
{ renderer: 'dob', label: 'Date of Birth' },
|
|
37
37
|
{ renderer: 'address', label: 'Address' },
|
|
38
38
|
{
|
|
39
39
|
renderer: data => {
|
|
40
|
-
return (_jsxs(_Fragment, { children: [data.email && data.emailVerified && _jsx(Status, { variant: 'success', children: data.email }
|
|
40
|
+
return (_jsxs(_Fragment, { children: [data.email && data.emailVerified && _jsx(Status, { variant: 'success', children: data.email }), data.email && !data.emailVerified && _jsx(Status, { variant: 'urgent', children: data.email })] }));
|
|
41
41
|
},
|
|
42
42
|
label: 'Email'
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
renderer: data => {
|
|
46
|
-
return (_jsx(StyledBalance, { negativeBalance: data.balance.startsWith('-'), children: data.balance }
|
|
46
|
+
return (_jsx(StyledBalance, { negativeBalance: data.balance.startsWith('-'), children: data.balance }));
|
|
47
47
|
},
|
|
48
48
|
label: 'Account Balance',
|
|
49
49
|
align: 'right'
|
|
50
50
|
}
|
|
51
51
|
];
|
|
52
|
-
return (_jsx(Table, { title: args.title, hoverHighlight: args.hoverHighlight, loading: args.loading, loadingMessage: args.loadingMessage, data: args.emptyTable ? [] : tableData, columns: columns }
|
|
52
|
+
return (_jsx(Table, { title: args.title, hoverHighlight: args.hoverHighlight, loading: args.loading, loadingMessage: args.loadingMessage, data: args.emptyTable ? [] : tableData, columns: columns }));
|
|
53
53
|
};
|
|
54
54
|
export const ConfigurableTable = (args) => {
|
|
55
55
|
const columns = [
|
|
56
|
-
{ renderer: data => _jsx("b", { children: data.name }
|
|
56
|
+
{ renderer: data => _jsx("b", { children: data.name }), label: 'Name' },
|
|
57
57
|
{ renderer: 'dob', label: 'Date of Birth' },
|
|
58
58
|
{ renderer: 'address', label: 'Address' },
|
|
59
59
|
{
|
|
60
60
|
renderer: data => {
|
|
61
|
-
return (_jsxs(_Fragment, { children: [data.email && data.emailVerified && _jsx(Status, { variant: 'success', children: data.email }
|
|
61
|
+
return (_jsxs(_Fragment, { children: [data.email && data.emailVerified && _jsx(Status, { variant: 'success', children: data.email }), data.email && !data.emailVerified && _jsx(Status, { variant: 'urgent', children: data.email })] }));
|
|
62
62
|
},
|
|
63
63
|
label: 'Email'
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
renderer: data => {
|
|
67
|
-
return (_jsx(StyledBalance, { negativeBalance: data.balance.startsWith('-'), children: data.balance }
|
|
67
|
+
return (_jsx(StyledBalance, { negativeBalance: data.balance.startsWith('-'), children: data.balance }));
|
|
68
68
|
},
|
|
69
69
|
label: 'Account Balance',
|
|
70
70
|
align: 'right'
|
|
@@ -105,7 +105,7 @@ export const ConfigurableTable = (args) => {
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
}, children: _jsx(Table, { title: 'Accounts', data: tableData, columns: columns }
|
|
108
|
+
}, children: _jsx(Table, { title: 'Accounts', data: tableData, columns: columns }) }));
|
|
109
109
|
};
|
|
110
110
|
ConfigurableTable.args = {
|
|
111
111
|
headerFontSize: 's',
|
|
@@ -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,aAAa,EAA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OAAO,EAAE,IAAI,EAAE,EAAE;IACnC,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,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: '#71baff',\n headerVerticalSpacing: 1,\n headerHorizontalSpacing: 2,\n headerBorderWidth: '0.0625rem',\n headerBorderColor: '#cfcfcf',\n bodyForegroundColor: '#000000',\n bodyBackgroundColor: '#e2f1ff',\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"]}
|
|
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;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,eAAe;IACb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AAE,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: '#71baff',\n headerVerticalSpacing: 1,\n headerHorizontalSpacing: 2,\n headerBorderWidth: '0.0625rem',\n headerBorderColor: '#cfcfcf',\n bodyForegroundColor: '#000000',\n bodyBackgroundColor: '#e2f1ff',\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"]}
|
|
@@ -23,7 +23,7 @@ export const TabsDemo = (args) => {
|
|
|
23
23
|
{ name: 'Tab 4', id: '4', disabled: true },
|
|
24
24
|
{ name: 'Tab 5', id: '5' }
|
|
25
25
|
];
|
|
26
|
-
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 }
|
|
26
|
+
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 }) }), _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"] }) }, tab.id))) })] }));
|
|
27
27
|
};
|
|
28
28
|
export const TabsCountDemo = (args) => {
|
|
29
29
|
const [panelShown, changePanel] = useState('1');
|
|
@@ -37,7 +37,7 @@ export const TabsCountDemo = (args) => {
|
|
|
37
37
|
{ name: 'Tab 4', id: '4', count: 56, disabled: true },
|
|
38
38
|
{ name: 'Tab 5', id: '5', count: 150 }
|
|
39
39
|
];
|
|
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 }
|
|
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 }) }), _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"] }) }, tab.id))) })] }));
|
|
41
41
|
};
|
|
42
42
|
export const ConfigurableTabs = (args) => {
|
|
43
43
|
const [panelShown, changePanel] = useState('1');
|
|
@@ -59,7 +59,7 @@ export const ConfigurableTabs = (args) => {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
}, children: [_jsx(Flex, { item: { grow: 1 }, children: _jsx(Tabs, { tabs: tabs, onTabClick: handleTabChange, currentTabId: panelShown }
|
|
62
|
+
}, children: [_jsx(Flex, { item: { grow: 1 }, children: _jsx(Tabs, { tabs: tabs, onTabClick: handleTabChange, currentTabId: panelShown }) }), _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"] }) }, tab.id))) })] }));
|
|
63
63
|
};
|
|
64
64
|
ConfigurableTabs.args = {
|
|
65
65
|
foreground: '#076bc9'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.stories.js","sourceRoot":"","sources":["../../../src/core/Tabs/Tabs.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAa,MAAM,yBAAyB,CAAC;AAEzF,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;KACnB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;KAC3E;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,QAAQ,GAAqB,CAAC,IAAe,EAAE,EAAE;IAC5D,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEhD,MAAM,eAAe,GAAG,CAAC,EAAU,EAAE,EAAE;QACrC,WAAW,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,MAAM,IAAI,GAAG;QACX,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE;QAC1B,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE;QAC1B,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE;QAC1B,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAA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Q,IAAC,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,YAAY,EAAE,UAAU,YAC/C,0BAAM,GAAG,CAAC,IAAI,gBAAe,IADyB,GAAG,CAAC,EAAE,CAEnD,CACZ,CAAC,GACG,IACO,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,IAAI,GAAG;IACtB,UAAU,EAAE,SAAS;CACtB,CAAC;AAEF,gBAAgB,CAAC,QAAQ,GAAG;IAC1B,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC1C,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACnC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Configuration, Flex, TabPanel, Tabs, TabsProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Tabs',\n component: Tabs,\n args: {\n type: 'horizontal'\n },\n argTypes: {\n type: { options: ['horizontal', 'vertical'], control: { type: 'select' } }\n }\n} as Meta;\n\nexport const TabsDemo: Story<TabsProps> = (args: TabsProps) => {\n const [panelShown, changePanel] = useState('1');\n\n const handleTabChange = (id: string) => {\n changePanel(id);\n };\n\n const tabs = [\n { name: 'Tab 1', id: '1' },\n { name: 'Tab 2', id: '2' },\n { name: 'Tab 3', id: '3' },\n { name: 'Tab 4', id: '4', disabled: true },\n { name: 'Tab 5', id: '5' }\n ];\n\n return (\n <Flex container={{ direction: args.type === 'horizontal' ? 'column' : 'row' }}>\n <Flex item={{ grow: 1 }}>\n <Tabs tabs={tabs} type={args.type} onTabClick={handleTabChange} currentTabId={panelShown} />\n </Flex>\n <Flex container={{ pad: [1, 2] }} item={{ grow: 1 }}>\n {tabs.map(tab => (\n <TabPanel tabId={tab.id} currentTabId={panelShown} key={tab.id}>\n <div>{tab.name} content</div>\n </TabPanel>\n ))}\n </Flex>\n </Flex>\n );\n};\n\nexport const TabsCountDemo: Story<TabsProps> = (args: TabsProps) => {\n const [panelShown, changePanel] = useState('1');\n\n const handleTabChange = (id: string) => {\n changePanel(id);\n };\n\n const tabs = [\n { name: 'Tab 1', id: '1', count: 5 },\n { name: 'Tab 2', id: '2', count: 14 },\n { name: 'Tab 3', id: '3', count: 0 },\n { name: 'Tab 4', id: '4', count: 56, disabled: true },\n { name: 'Tab 5', id: '5', count: 150 }\n ];\n\n return (\n <Flex container={{ direction: args.type === 'horizontal' ? 'column' : 'row' }}>\n <Flex item={{ grow: 1 }}>\n <Tabs tabs={tabs} type={args.type} onTabClick={handleTabChange} currentTabId={panelShown} />\n </Flex>\n <Flex container={{ pad: [1, 2] }} item={{ grow: 1 }}>\n {tabs.map(tab => (\n <TabPanel tabId={tab.id} currentTabId={panelShown} key={tab.id}>\n <div>{tab.name} content</div>\n </TabPanel>\n ))}\n </Flex>\n </Flex>\n );\n};\n\ninterface ConfigurableTabsProps {\n foreground?: string;\n type?: TabsProps['type'];\n}\n\nexport const ConfigurableTabs: Story<ConfigurableTabsProps> = (args: ConfigurableTabsProps) => {\n const [panelShown, changePanel] = useState('1');\n\n const handleTabChange = (id: string) => {\n changePanel(id);\n };\n\n const tabs = [\n { name: 'Tab 1', id: '1' },\n { name: 'Tab 2', id: '2' },\n { name: 'Tab 3', id: '3' },\n { name: 'Tab 4', id: '4', disabled: true },\n { name: 'Tab 5', id: '5' }\n ];\n\n return (\n <Configuration\n theme={{\n components: {\n tabs: {\n base: {\n foreground: args.foreground\n }\n }\n }\n }}\n >\n <Flex item={{ grow: 1 }}>\n <Tabs tabs={tabs} onTabClick={handleTabChange} currentTabId={panelShown} />\n </Flex>\n <Flex container={{ pad: [1, 2] }} item={{ grow: 1 }}>\n {tabs.map(tab => (\n <TabPanel tabId={tab.id} currentTabId={panelShown} key={tab.id}>\n <div>{tab.name} content</div>\n </TabPanel>\n ))}\n </Flex>\n </Configuration>\n );\n};\n\nConfigurableTabs.args = {\n foreground: '#076bc9'\n};\n\nConfigurableTabs.argTypes = {\n foreground: { control: { type: 'color' } },\n type: { table: { disable: true } }\n};\n"]}
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
component: Text
|
|
6
6
|
};
|
|
7
7
|
export const TextDemo = (args) => {
|
|
8
|
-
return (_jsx(Text, { variant: args.variant, status: args.status, children: "Pega Cosmos" }
|
|
8
|
+
return (_jsx(Text, { variant: args.variant, status: args.status, children: "Pega Cosmos" }));
|
|
9
9
|
};
|
|
10
10
|
TextDemo.args = {
|
|
11
11
|
variant: 'primary',
|
|
@@ -56,7 +56,7 @@ export const ConfigurableText = (args) => {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
}, children: _jsxs(Flex, { container: { gap: 2, alignItems: 'end' }, children: [_jsx(Text, { variant: 'primary', children: "Primary" }
|
|
59
|
+
}, children: _jsxs(Flex, { container: { gap: 2, alignItems: 'end' }, children: [_jsx(Text, { variant: 'primary', children: "Primary" }), _jsx(Text, { variant: 'secondary', children: "Secondary" }), _jsx(Text, { variant: 'h1', children: "h1" }), _jsx(Text, { variant: 'h2', children: "h2" }), _jsx(Text, { variant: 'h3', children: "h3" }), _jsx(Text, { variant: 'h4', children: "h4" }), _jsx(Text, { variant: 'h5', children: "h5" }), _jsx(Text, { variant: 'h6', children: "h6" })] }) }));
|
|
60
60
|
};
|
|
61
61
|
ConfigurableText.args = {
|
|
62
62
|
primaryFontSize: 's',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.stories.js","sourceRoot":"","sources":["../../../src/core/Text/Text.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAa,MAAM,yBAAyB,CAAC;AAE/E,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;CACR,CAAC;AAEV,MAAM,CAAC,MAAM,QAAQ,GAAqB,CAAC,IAAe,EAAE,EAAE;IAC5D,OAAO,CACL,KAAC,IAA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YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, Flex, Text, TextProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Text',\n component: Text\n} as Meta;\n\nexport const TextDemo: Story<TextProps> = (args: TextProps) => {\n return (\n <Text variant={args.variant} status={args.status}>\n Pega Cosmos\n </Text>\n );\n};\n\nTextDemo.args = {\n variant: 'primary',\n status: undefined\n};\n\nTextDemo.argTypes = {\n variant: {\n options: ['primary', 'secondary', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n control: { type: 'select' }\n },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } }\n};\n\ninterface ConfigurableTextProps {\n primaryFontSize?: string;\n primaryFontWeight?: string;\n secondaryFontSize?: string;\n secondaryFontWeight?: string;\n h1FontSize?: string;\n h1FontWeight?: string;\n h2FontSize?: string;\n h2FontWeight?: string;\n h3FontSize?: string;\n h3FontWeight?: string;\n h4FontSize?: string;\n h4FontWeight?: string;\n h5FontSize?: string;\n h5FontWeight?: string;\n h6FontSize?: string;\n h6FontWeight?: string;\n}\n\nexport const ConfigurableText: Story<ConfigurableTextProps> = (args: ConfigurableTextProps) => {\n return (\n <Configuration\n theme={{\n components: {\n text: {\n primary: {\n 'font-size': args.primaryFontSize,\n 'font-weight': args.primaryFontWeight\n },\n secondary: {\n 'font-size': args.secondaryFontSize,\n 'font-weight': args.secondaryFontWeight\n },\n h1: {\n 'font-size': args.h1FontSize,\n 'font-weight': args.h1FontWeight\n },\n h2: {\n 'font-size': args.h2FontSize,\n 'font-weight': args.h2FontWeight\n },\n h3: {\n 'font-size': args.h3FontSize,\n 'font-weight': args.h3FontWeight\n },\n h4: {\n 'font-size': args.h4FontSize,\n 'font-weight': args.h4FontWeight\n },\n h5: {\n 'font-size': args.h5FontSize,\n 'font-weight': args.h5FontWeight\n },\n h6: {\n 'font-size': args.h6FontSize,\n 'font-weight': args.h6FontWeight\n }\n }\n }\n }}\n >\n <Flex container={{ gap: 2, alignItems: 'end' }}>\n <Text variant='primary'>Primary</Text>\n <Text variant='secondary'>Secondary</Text>\n <Text variant='h1'>h1</Text>\n <Text variant='h2'>h2</Text>\n <Text variant='h3'>h3</Text>\n <Text variant='h4'>h4</Text>\n <Text variant='h5'>h5</Text>\n <Text variant='h6'>h6</Text>\n </Flex>\n </Configuration>\n );\n};\n\nConfigurableText.args = {\n primaryFontSize: 's',\n primaryFontWeight: '400',\n secondaryFontSize: 'xs',\n secondaryFontWeight: '400',\n h1FontSize: 'xl',\n h1FontWeight: '600',\n h2FontSize: 'l',\n h2FontWeight: '600',\n h3FontSize: 'm',\n h3FontWeight: '600',\n h4FontSize: 's',\n h4FontWeight: '600',\n h5FontSize: 'xs',\n h5FontWeight: '600',\n h6FontSize: 'xxs',\n h6FontWeight: '600'\n};\n\nConfigurableText.argTypes = {\n primaryFontSize: {\n options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],\n control: { type: 'select' }\n },\n primaryFontWeight: { control: { type: 'text' } },\n secondaryFontSize: {\n options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],\n control: { type: 'select' }\n },\n secondaryFontWeight: { control: { type: 'text' } },\n h1FontSize: {\n options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],\n control: { type: 'select' }\n },\n h1FontWeight: { control: { type: 'text' } },\n h2FontSize: {\n options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],\n control: { type: 'select' }\n },\n h2FontWeight: { control: { type: 'text' } },\n h3FontSize: {\n options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],\n control: { type: 'select' }\n },\n h3FontWeight: { control: { type: 'text' } },\n h4FontSize: {\n options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],\n control: { type: 'select' }\n },\n h4FontWeight: { control: { type: 'text' } },\n h5FontSize: {\n options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],\n control: { type: 'select' }\n },\n h5FontWeight: { control: { type: 'text' } },\n h6FontSize: {\n options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],\n control: { type: 'select' }\n },\n h6FontWeight: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
};
|
|
8
8
|
export const TextAreaDemo = (args) => {
|
|
9
9
|
const [value, setValue] = useState('');
|
|
10
|
-
return (_jsx(TextArea, { id: 'text-area', value: value, onChange: (e) => setValue(e.target.value), minLength: args.minLength, maxLength: args.maxLength, displayCharCount: args.displayCharCount, hardStop: args.hardStop, resizable: args.resizable, autoResize: args.autoResize, label: args.label, labelHidden: args.labelHidden, info: args.info, placeholder: args.placeholder, status: args.status, required: args.required, disabled: args.disabled, readOnly: args.readOnly }
|
|
10
|
+
return (_jsx(TextArea, { id: 'text-area', value: value, onChange: (e) => setValue(e.target.value), minLength: args.minLength, maxLength: args.maxLength, displayCharCount: args.displayCharCount, hardStop: args.hardStop, resizable: args.resizable, autoResize: args.autoResize, label: args.label, labelHidden: args.labelHidden, info: args.info, placeholder: args.placeholder, status: args.status, required: args.required, disabled: args.disabled, readOnly: args.readOnly }));
|
|
11
11
|
};
|
|
12
12
|
TextAreaDemo.args = {
|
|
13
13
|
minLength: 0,
|
|
@@ -50,7 +50,7 @@ export const ConfigurableTextArea = (args) => {
|
|
|
50
50
|
padding: args.padding
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
}, children: _jsx(TextArea, { value: value, onChange: (e) => setValue(e.target.value), resizable: true, autoResize: true, label: 'Configurable Text Area', info: 'Enter a large amount of text', placeholder: 'Tell us a story\u2026' }
|
|
53
|
+
}, children: _jsx(TextArea, { value: value, onChange: (e) => setValue(e.target.value), resizable: true, autoResize: true, label: 'Configurable Text Area', info: 'Enter a large amount of text', placeholder: 'Tell us a story\u2026' }) }));
|
|
54
54
|
};
|
|
55
55
|
ConfigurableTextArea.args = {
|
|
56
56
|
minHeight: '3.75rem',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.stories.js","sourceRoot":"","sources":["../../../src/core/TextArea/TextArea.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAe,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAiB,MAAM,yBAAyB,CAAC;AAEjF,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;CACZ,CAAC;AAEV,MAAM,CAAC,MAAM,YAAY,GAAyB,CAAC,IAAmB,EAAE,EAAE;IACxE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEvC,OAAO,CACL,KAAC,QAAQ,IACP,EAAE,EAAC,WAAW,EACd,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAmC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC3E,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"TextArea.stories.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E,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC3C,CAAC;AAOF,MAAM,CAAC,MAAM,oBAAoB,GAAqC,CACpE,IAA+B,EAC/B,EAAE;IACF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEvC,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE;YACL,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,YAAY,EAAE,IAAI,CAAC,SAAS;oBAC5B,OAAO,EAAE,IAAI,CAAC,OAAO;iBACtB;aACF;SACF,YAED,KAAC,QAAQ,IACP,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAmC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC3E,SAAS,QACT,UAAU,QACV,KAAK,EAAC,wBAAwB,EAC9B,IAAI,EAAC,8BAA8B,EACnC,WAAW,EAAC,uBAAkB,GAC9B,GACY,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,oBAAoB,CAAC,IAAI,GAAG;IAC1B,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,QAAQ;CAClB,CAAC;AAEF,oBAAoB,CAAC,QAAQ,GAAG;IAC9B,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACxC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, ChangeEvent } from 'react';\n\nimport { Configuration, TextArea, TextAreaProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Textarea',\n component: TextArea\n} as Meta;\n\nexport const TextAreaDemo: Story<TextAreaProps> = (args: TextAreaProps) => {\n const [value, setValue] = useState('');\n\n return (\n <TextArea\n id='text-area'\n value={value}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setValue(e.target.value)}\n minLength={args.minLength}\n maxLength={args.maxLength}\n displayCharCount={args.displayCharCount}\n hardStop={args.hardStop}\n resizable={args.resizable}\n autoResize={args.autoResize}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n placeholder={args.placeholder}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\nTextAreaDemo.args = {\n minLength: 0,\n maxLength: 300,\n displayCharCount: false,\n hardStop: true,\n resizable: false,\n autoResize: false,\n label: 'Text Area',\n labelHidden: false,\n info: 'Enter a large amount of text',\n placeholder: 'Tell us a story…',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nTextAreaDemo.argTypes = {\n minLength: { control: { type: 'number' } },\n maxLength: { control: { type: 'number' } },\n displayCharCount: { control: { type: 'boolean' } },\n hardStop: { control: { type: 'boolean' } },\n resizable: { control: { type: 'boolean' } },\n autoResize: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n placeholder: { 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 ConfigurableTextAreaProps {\n minHeight?: string;\n padding?: string;\n}\n\nexport const ConfigurableTextArea: Story<ConfigurableTextAreaProps> = (\n args: ConfigurableTextAreaProps\n) => {\n const [value, setValue] = useState('');\n\n return (\n <Configuration\n theme={{\n components: {\n 'text-area': {\n 'min-height': args.minHeight,\n padding: args.padding\n }\n }\n }}\n >\n <TextArea\n value={value}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setValue(e.target.value)}\n resizable\n autoResize\n label='Configurable Text Area'\n info='Enter a large amount of text'\n placeholder='Tell us a story…'\n />\n </Configuration>\n );\n};\n\nConfigurableTextArea.args = {\n minHeight: '3.75rem',\n padding: '0.5rem'\n};\n\nConfigurableTextArea.argTypes = {\n minHeight: { control: { type: 'text' } },\n padding: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -19,8 +19,8 @@ export const ToasterDemo = () => {
|
|
|
19
19
|
content: messages[count % 2]
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
|
-
return _jsx(Button, { onClick: pushToaster, children: "Make some Toast" }
|
|
22
|
+
return _jsx(Button, { onClick: pushToaster, children: "Make some Toast" });
|
|
23
23
|
};
|
|
24
|
-
return (_jsx(Toaster, { dismissAfter: 5000, children: _jsx(MakeToastButton, {}
|
|
24
|
+
return (_jsx(Toaster, { dismissAfter: 5000, children: _jsx(MakeToastButton, {}) }));
|
|
25
25
|
};
|
|
26
26
|
//# sourceMappingURL=Toaster.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toaster.stories.js","sourceRoot":"","sources":["../../../src/core/Toaster/Toaster.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE1E,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,OAAO;CACX,CAAC;AAEV,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,MAAM,eAAe,GAAG,GAAG,EAAE;QAC3B,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;QAC5C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAEtC,MAAM,QAAQ,GAAG;YACf,gCAAgC;YAChC,sIAAsI;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IAAI,YACzB,KAAC,eAAe,KAAG,GACX,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useContext, useState } from 'react';\n\nimport { Button, Toaster, ToasterContext } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Toaster',\n component: Toaster\n} as Meta;\n\nexport const ToasterDemo = () => {\n const MakeToastButton = () => {\n const { push } = useContext(ToasterContext);\n const [count, setCount] = useState(0);\n\n const messages = [\n 'This is a short toast message!',\n 'This toast message is much longer and will need to be trimmed with an ellipsis in order to fit within the confines of the component.'\n ];\n\n const pushToaster = () => {\n setCount(curr => curr + 1);\n push({\n content: messages[count % 2]\n });\n };\n\n return <Button onClick={pushToaster}>Make some Toast</Button>;\n };\n\n return (\n <Toaster dismissAfter={5000}>\n <MakeToastButton />\n </Toaster>\n );\n};\n"]}
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
};
|
|
7
7
|
export const TooltipDemo = () => {
|
|
8
8
|
const [el, setEl] = useElement();
|
|
9
|
-
return (_jsxs(_Fragment, { children: [_jsx(Button, { ref: setEl, children: "Hover me" }
|
|
9
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { ref: setEl, children: "Hover me" }), el && (_jsx(Tooltip, { target: el, children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur finibus scelerisque viverra. Fusce consequat, justo at laoreet lobortis, mauris ipsum aliquet arcu, non convallis nisl elit id erat. Pellentesque posuere sagittis velit a molestie." }))] }));
|
|
10
10
|
};
|
|
11
11
|
export const ConfigurableTooltip = (args) => {
|
|
12
12
|
const [el, setEl] = useElement();
|
|
@@ -17,7 +17,7 @@ export const ConfigurableTooltip = (args) => {
|
|
|
17
17
|
'background-color': args.backgroundColor
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
}, children: [_jsx(Button, { ref: setEl, children: "Hover me" }
|
|
20
|
+
}, children: [_jsx(Button, { ref: setEl, children: "Hover me" }), el && (_jsx(Tooltip, { target: el, children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur finibus scelerisque viverra. Fusce consequat, justo at laoreet lobortis, mauris ipsum aliquet arcu, non convallis nisl elit id erat. Pellentesque posuere sagittis velit a molestie." }))] }));
|
|
21
21
|
};
|
|
22
22
|
ConfigurableTooltip.args = {
|
|
23
23
|
foregroundColor: '#f5f5f5',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.stories.js","sourceRoot":"","sources":["../../../src/core/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErF,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,OAAO;CACX,CAAC;AAEV,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,UAAU,EAAE,CAAC;IAEjC,OAAO,CACL,8BACE,KAAC,MAAM,IAAC,GAAG,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"Tooltip.stories.js","sourceRoot":"","sources":["../../../src/core/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErF,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,OAAO;CACX,CAAC;AAEV,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,UAAU,EAAE,CAAC;IAEjC,OAAO,CACL,8BACE,KAAC,MAAM,IAAC,GAAG,EAAE,KAAK,yBAAmB,EAEpC,EAAE,IAAI,CACL,KAAC,OAAO,IAAC,MAAM,EAAE,EAAE,wQAIT,CACX,IACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAOF,MAAM,CAAC,MAAM,mBAAmB,GAAoC,CAClE,IAA8B,EAC9B,EAAE;IACF,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,UAAU,EAAE,CAAC;IAEjC,OAAO,CACL,MAAC,aAAa,IACZ,KAAK,EAAE;YACL,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,kBAAkB,EAAE,IAAI,CAAC,eAAe;oBACxC,kBAAkB,EAAE,IAAI,CAAC,eAAe;iBACzC;aACF;SACF,aAED,KAAC,MAAM,IAAC,GAAG,EAAE,KAAK,yBAAmB,EAEpC,EAAE,IAAI,CACL,KAAC,OAAO,IAAC,MAAM,EAAE,EAAE,wQAIT,CACX,IACa,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,mBAAmB,CAAC,IAAI,GAAG;IACzB,eAAe,EAAE,SAAS;IAC1B,eAAe,EAAE,SAAS;CAC3B,CAAC;AAEF,mBAAmB,CAAC,QAAQ,GAAG;IAC7B,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC/C,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CAChD,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Button, Configuration, Tooltip, useElement } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Tooltip',\n component: Tooltip\n} as Meta;\n\nexport const TooltipDemo = () => {\n const [el, setEl] = useElement();\n\n return (\n <>\n <Button ref={setEl}>Hover me</Button>\n\n {el && (\n <Tooltip target={el}>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur finibus scelerisque\n viverra. Fusce consequat, justo at laoreet lobortis, mauris ipsum aliquet arcu, non\n convallis nisl elit id erat. Pellentesque posuere sagittis velit a molestie.\n </Tooltip>\n )}\n </>\n );\n};\n\ninterface ConfigurableTooltipProps {\n foregroundColor?: string;\n backgroundColor?: string;\n}\n\nexport const ConfigurableTooltip: Story<ConfigurableTooltipProps> = (\n args: ConfigurableTooltipProps\n) => {\n const [el, setEl] = useElement();\n\n return (\n <Configuration\n theme={{\n components: {\n tooltip: {\n 'foreground-color': args.foregroundColor,\n 'background-color': args.backgroundColor\n }\n }\n }}\n >\n <Button ref={setEl}>Hover me</Button>\n\n {el && (\n <Tooltip target={el}>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur finibus scelerisque\n viverra. Fusce consequat, justo at laoreet lobortis, mauris ipsum aliquet arcu, non\n convallis nisl elit id erat. Pellentesque posuere sagittis velit a molestie.\n </Tooltip>\n )}\n </Configuration>\n );\n};\n\nConfigurableTooltip.args = {\n foregroundColor: '#f5f5f5',\n backgroundColor: '#3f3f3f'\n};\n\nConfigurableTooltip.argTypes = {\n foregroundColor: { control: { type: 'color' } },\n backgroundColor: { control: { type: 'color' } }\n};\n"]}
|
|
@@ -10,8 +10,8 @@ export default {
|
|
|
10
10
|
};
|
|
11
11
|
export const BaseTree = () => {
|
|
12
12
|
return (_jsx(StyledBaseTree, { nodes: themeToTree(themeDefinition), nodeRenderer: ({ id, subTree }) => {
|
|
13
|
-
return (_jsxs(_Fragment, { children: [_jsx("span", { children: id }
|
|
14
|
-
} }
|
|
13
|
+
return (_jsxs(_Fragment, { children: [_jsx("span", { children: id }), subTree] }));
|
|
14
|
+
} }));
|
|
15
15
|
};
|
|
16
16
|
export const StandardTreeDemo = (args) => {
|
|
17
17
|
const getMockNodes = ({ length = 5, parent = true } = {}) => {
|
|
@@ -74,7 +74,7 @@ export const StandardTreeDemo = (args) => {
|
|
|
74
74
|
if (clickedNode?.nodes?.length > 0)
|
|
75
75
|
return;
|
|
76
76
|
loadChildNodes(id);
|
|
77
|
-
} }
|
|
77
|
+
} }), _jsx(Button, { onClick: () => expandTo(''), children: "Collapse All" }), _jsx(Button, { onClick: () => expandTo(currentNodeId || ''), children: "Expand to active item" })] }));
|
|
78
78
|
};
|
|
79
79
|
StandardTreeDemo.args = {
|
|
80
80
|
lined: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.stories.js","sourceRoot":"","sources":["../../../src/core/Tree/Tree.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EACL,MAAM,EACN,YAAY,EAEZ,IAAI,EAEJ,WAAW,EACX,SAAS,EACT,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;CACR,CAAC;AAEV,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,OAAO,CACL,KAAC,cAAc,IACb,KAAK,EAAE,WAAW,CAAC,eAAe,CAAC,EACnC,YAAY,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;YAChC,OAAO,CACL,8BACE,yBAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Tree.stories.js","sourceRoot":"","sources":["../../../src/core/Tree/Tree.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EACL,MAAM,EACN,YAAY,EAEZ,IAAI,EAEJ,WAAW,EACX,SAAS,EACT,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;CACR,CAAC;AAEV,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG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,GAAG,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;oBACtD,gBAAgB,CAAC,EAAE,CAAC,CAAC;oBACrB,sCAAsC;oBACtC,IAAI,CAAC,WAAW,EAAE,KAAK;wBAAE,OAAO;oBAEhC,WAAW,CAAC,IAAI,CAAC,EAAE,CACjB,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE;wBACnC,OAAO;4BACL,GAAG,IAAI;4BACP,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ;4BACxB,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,KAAK,CAAC;yBAClC,CAAC;oBACJ,CAAC,CAAC,CACH,CAAC;oBAEF,6DAA6D;oBAC7D,IAAI,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;wBAAE,OAAO;oBAE3C,cAAc,CAAC,EAAE,CAAC,CAAC;gBACrB,CAAC,GACD,EACF,KAAC,MAAM,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,6BAAuB,EAC1D,KAAC,MAAM,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,aAAa,IAAI,EAAE,CAAC,sCAAgC,IACnF,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,IAAI,GAAG;IACtB,KAAK,EAAE,KAAK;CACb,CAAC;AAEF,gBAAgB,CAAC,QAAQ,GAAG;IAC1B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CACxC,CAAC","sourcesContent":["import { useState } from 'react';\nimport { action } from '@storybook/addon-actions';\nimport { Meta, Story } from '@storybook/react';\n\nimport {\n Button,\n StandardTree,\n StandardTreeProps,\n Tree,\n TreeNode,\n treeHelpers,\n createUID,\n themeDefinition\n} from '@pega/cosmos-react-core';\n\nimport { themeToTree } from './Tree.mocks';\nimport { StyledBaseTree } from './Tree.styles';\n\nexport default {\n title: 'Core/Tree',\n component: Tree\n} as Meta;\n\nexport const BaseTree = () => {\n return (\n <StyledBaseTree\n nodes={themeToTree(themeDefinition)}\n nodeRenderer={({ id, subTree }) => {\n return (\n <>\n <span>{id}</span>\n {subTree}\n </>\n );\n }}\n />\n );\n};\n\nexport const StandardTreeDemo: Story<Pick<StandardTreeProps, 'lined'>> = (\n args: Pick<StandardTreeProps, 'lined'>\n) => {\n const getMockNodes = ({\n length = 5,\n parent = true\n }: { length?: number; parent?: boolean } = {}): StandardTreeProps['nodes'] => {\n return Array.from({ length }, (_, i) => {\n const isParent = parent && i !== 2;\n const id = createUID();\n return {\n id,\n label: isParent ? 'Parent' : 'Leaf',\n icon: isParent ? 'folder-solid' : 'document-solid',\n nodes: isParent ? [] : undefined,\n actions: [\n { id: 'star', text: 'Star', icon: 'star', onClick: action(`Star node: ${id}`) },\n { id: 'pin', text: 'Pin', icon: 'pin', onClick: action(`Pin node: ${id}`) }\n ],\n onClick: isParent\n ? undefined\n : nodeId => {\n action(`Action for node: ${nodeId}`)();\n }\n };\n });\n };\n\n const [currentNodeId, setCurrentNodeId] = useState<string | undefined>();\n const [allNodes, setAllNodes] = useState<StandardTreeProps['nodes']>(() => {\n return getMockNodes({ length: 10 });\n });\n\n const loadChildNodes = (id: string) => {\n setTimeout(() => {\n setAllNodes(tree => {\n return treeHelpers.mapNode(tree, id, node => {\n return {\n ...node,\n loading: false,\n nodes: [...(node.nodes ?? []), ...getMockNodes()]\n };\n });\n });\n }, 1000);\n };\n\n const expandTo = (id: TreeNode['id']) => {\n setAllNodes(tree => {\n return treeHelpers.expandTo(tree, id);\n });\n };\n\n return (\n <>\n <StandardTree\n lined={args.lined}\n currentNodeId={currentNodeId}\n nodes={allNodes}\n onNodeClick={id => {\n const clickedNode = treeHelpers.getNode(allNodes, id);\n setCurrentNodeId(id);\n // If a leaf node, just set to current\n if (!clickedNode?.nodes) return;\n\n setAllNodes(tree =>\n treeHelpers.mapNode(tree, id, node => {\n return {\n ...node,\n expanded: !node.expanded,\n loading: node.nodes?.length === 0\n };\n })\n );\n\n // If a parent node with children already loaded, we're done.\n if (clickedNode?.nodes?.length > 0) return;\n\n loadChildNodes(id);\n }}\n />\n <Button onClick={() => expandTo('')}>Collapse All</Button>\n <Button onClick={() => expandTo(currentNodeId || '')}>Expand to active item</Button>\n </>\n );\n};\n\nStandardTreeDemo.args = {\n lined: false\n};\n\nStandardTreeDemo.argTypes = {\n lined: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
title: 'Core/URL',
|
|
5
5
|
component: URLDisplay
|
|
6
6
|
};
|
|
7
|
-
export const URLDisplayDemo = (args) => (_jsx(URLDisplay, { value: args.value, displayText: args.displayText, variant: args.variant }
|
|
7
|
+
export const URLDisplayDemo = (args) => (_jsx(URLDisplay, { value: args.value, displayText: args.displayText, variant: args.variant }));
|
|
8
8
|
URLDisplayDemo.args = {
|
|
9
9
|
value: 'https://www.google.com/',
|
|
10
10
|
displayText: 'Example URL',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"URL.stories.js","sourceRoot":"","sources":["../../../src/core/URL/URL.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AAEtE,eAAe;IACb,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,UAAU;CACd,CAAC;AAEV,MAAM,CAAC,MAAM,cAAc,GAA2B,CAAC,IAAqB,EAAE,EAAE,CAAC,CAC/E,KAAC,UAAU,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"URL.stories.js","sourceRoot":"","sources":["../../../src/core/URL/URL.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AAEtE,eAAe;IACb,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,UAAU;CACd,CAAC;AAEV,MAAM,CAAC,MAAM,cAAc,GAA2B,CAAC,IAAqB,EAAE,EAAE,CAAC,CAC/E,KAAC,UAAU,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,GAAI,CACxF,CAAC;AAEF,cAAc,CAAC,IAAI,GAAG;IACpB,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,MAAM;CAChB,CAAC;AAEF,cAAc,CAAC,QAAQ,GAAG;IACxB,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACpC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC1C,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CACpE,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { URLDisplay, URLDisplayProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/URL',\n component: URLDisplay\n} as Meta;\n\nexport const URLDisplayDemo: Story<URLDisplayProps> = (args: URLDisplayProps) => (\n <URLDisplay value={args.value} displayText={args.displayText} variant={args.variant} />\n);\n\nURLDisplayDemo.args = {\n value: 'https://www.google.com/',\n displayText: 'Example URL',\n variant: 'link'\n};\n\nURLDisplayDemo.argTypes = {\n value: { control: { type: 'text' } },\n displayText: { control: { type: 'text' } },\n variant: { options: ['link', 'text'], control: { type: 'select' } }\n};\n"]}
|
|
@@ -24,7 +24,7 @@ export const ArticleStory = () => {
|
|
|
24
24
|
return (_jsx("div", { style: {
|
|
25
25
|
maxWidth: '31.25rem',
|
|
26
26
|
maxHeight: '100vh'
|
|
27
|
-
}, children: _jsx(Article, { navigation: _jsx(Link, { href: '/', onClick: onBackToArticlesClick, children: _jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [_jsx(Icon, { name: 'caret-left' }
|
|
27
|
+
}, children: _jsx(Article, { navigation: _jsx(Link, { href: '/', onClick: onBackToArticlesClick, children: _jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [_jsx(Icon, { name: 'caret-left' }), _jsx(Text, { children: "Back to all articles" })] }) }), primaryActions: _jsxs(_Fragment, { children: [_jsx(Button, { "aria-label": 'star', variant: 'simple', icon: true, children: _jsx(Icon, { name: 'star' }) }), _jsx(Button, { "aria-label": 'open', variant: 'simple', icon: true, children: _jsx(Icon, { name: 'open' }) })] }), secondaryActions: [
|
|
28
28
|
{
|
|
29
29
|
text: 'Filter 1',
|
|
30
30
|
id: 'f1a'
|
|
@@ -36,11 +36,11 @@ export const ArticleStory = () => {
|
|
|
36
36
|
], content:
|
|
37
37
|
// TODO : Container components need to ensure that html being sent to the __html below needs to be free from XSS attack
|
|
38
38
|
// eslint-disable-next-line react/no-danger
|
|
39
|
-
_jsx("div", { dangerouslySetInnerHTML: { __html: ArticleMockData.fullArticleContent.content } }
|
|
40
|
-
_jsx(Text, { variant: 'secondary', "aria-label": 'category', children: ArticleMockData.fullArticleContent.meta.category }
|
|
41
|
-
_jsx(Text, { variant: 'secondary', "aria-label": 'published date', children: ArticleMockData.fullArticleContent.meta.publishedDate }
|
|
42
|
-
_jsxs(Flex, { container: { gap: 2, alignItems: 'center' }, children: [_jsxs(Flex, { container: { gap: 1, alignItems: 'center' }, children: [_jsx(Icon, { name: 'thumbs-up-solid' }
|
|
43
|
-
], footer: _jsx(ArticleFooter, { content: _jsxs(Flex, { container: { gap: 1 }, children: [_jsx(Text, { children: "Was this helpful ?" }
|
|
39
|
+
_jsx("div", { dangerouslySetInnerHTML: { __html: ArticleMockData.fullArticleContent.content } }), skeletonize: false, title: ArticleMockData.fullArticleContent.header, meta: [
|
|
40
|
+
_jsx(Text, { variant: 'secondary', "aria-label": 'category', children: ArticleMockData.fullArticleContent.meta.category }),
|
|
41
|
+
_jsx(Text, { variant: 'secondary', "aria-label": 'published date', children: ArticleMockData.fullArticleContent.meta.publishedDate }),
|
|
42
|
+
_jsxs(Flex, { container: { gap: 2, alignItems: 'center' }, children: [_jsxs(Flex, { container: { gap: 1, alignItems: 'center' }, children: [_jsx(Icon, { name: 'thumbs-up-solid' }), _jsxs(Text, { "aria-label": 'likes', children: ["(", ArticleMockData.fullArticleContent.meta.likes, ")"] })] }), _jsxs(Flex, { container: { gap: 1, alignItems: 'center' }, children: [_jsx(Icon, { name: 'thumbs-down-solid' }), _jsxs(Text, { "aria-label": 'dislikes', children: ["(", ArticleMockData.fullArticleContent.meta.disLikes, ")"] })] })] })
|
|
43
|
+
], footer: _jsx(ArticleFooter, { content: _jsxs(Flex, { container: { gap: 1 }, children: [_jsx(Text, { children: "Was this helpful ?" }), " ", _jsx(Button, { children: "Yes" }), " ", _jsx(Button, { children: "No" })] }), tags: [
|
|
44
44
|
{
|
|
45
45
|
id: 'Retail banking',
|
|
46
46
|
tagName: '#Retail_banking'
|
|
@@ -65,13 +65,13 @@ export const ArticleStory = () => {
|
|
|
65
65
|
id: '223448',
|
|
66
66
|
tagName: '#Finance_Customers'
|
|
67
67
|
}
|
|
68
|
-
], onTagClick: action('Tag clicked') }
|
|
68
|
+
], onTagClick: action('Tag clicked') }) }) }));
|
|
69
69
|
};
|
|
70
70
|
export const ArticleStorySkeletonize = () => {
|
|
71
71
|
const onBackToArticlesClick = (event) => {
|
|
72
72
|
event.preventDefault();
|
|
73
73
|
};
|
|
74
|
-
return (_jsx("div", { style: { maxWidth: '31.25rem', maxHeight: '100vh' }, children: _jsx(Article, { skeletonize: true, navigation: _jsx(Link, { href: '/', onClick: onBackToArticlesClick, children: _jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [_jsx(Icon, { name: 'caret-left' }
|
|
74
|
+
return (_jsx("div", { style: { maxWidth: '31.25rem', maxHeight: '100vh' }, children: _jsx(Article, { skeletonize: true, navigation: _jsx(Link, { href: '/', onClick: onBackToArticlesClick, children: _jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [_jsx(Icon, { name: 'caret-left' }), _jsx(Text, { children: "Back to articles" })] }) }), primaryActions: _jsxs(_Fragment, { children: [_jsx(Button, { variant: 'simple', icon: true, children: _jsx(Icon, { name: 'star' }) }), _jsx(Button, { variant: 'simple', icon: true, children: _jsx(Icon, { name: 'open' }) })] }), secondaryActions: [
|
|
75
75
|
{
|
|
76
76
|
text: 'Filter 1',
|
|
77
77
|
id: 'f1a'
|
|
@@ -80,6 +80,6 @@ export const ArticleStorySkeletonize = () => {
|
|
|
80
80
|
text: 'Filter 2',
|
|
81
81
|
id: 'f2a'
|
|
82
82
|
}
|
|
83
|
-
] }
|
|
83
|
+
] }) }));
|
|
84
84
|
};
|
|
85
85
|
//# sourceMappingURL=Article.stories.js.map
|