@pega/cosmos-react-demos 2.0.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/LICENSE +185 -0
- package/lib/build/AppHeader/AppHeader.stories.d.ts +8 -0
- package/lib/build/AppHeader/AppHeader.stories.d.ts.map +1 -0
- package/lib/build/AppHeader/AppHeader.stories.jsx +65 -0
- package/lib/build/AppHeader/AppHeader.stories.jsx.map +1 -0
- package/lib/build/AppShell/AppShell.mocks.d.ts +50 -0
- package/lib/build/AppShell/AppShell.mocks.d.ts.map +1 -0
- package/lib/build/AppShell/AppShell.mocks.js +503 -0
- package/lib/build/AppShell/AppShell.mocks.js.map +1 -0
- package/lib/build/AppShell/AppShell.stories.d.ts +12 -0
- package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -0
- package/lib/build/AppShell/AppShell.stories.jsx +194 -0
- package/lib/build/AppShell/AppShell.stories.jsx.map +1 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.d.ts +45 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.d.ts.map +1 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.js +291 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.js.map +1 -0
- package/lib/build/FlowModeller/FlowModeller.mocks.d.ts +9 -0
- package/lib/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -0
- package/lib/build/FlowModeller/FlowModeller.mocks.js +411 -0
- package/lib/build/FlowModeller/FlowModeller.mocks.js.map +1 -0
- package/lib/build/FlowModeller/FlowModeller.stories.d.ts +12 -0
- package/lib/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -0
- package/lib/build/FlowModeller/FlowModeller.stories.jsx +214 -0
- package/lib/build/FlowModeller/FlowModeller.stories.jsx.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.d.ts +201 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.js +1128 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts +11 -0
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.stories.jsx +491 -0
- package/lib/build/LifeCycle/LifeCycle.stories.jsx.map +1 -0
- package/lib/build/LifeCycle/utils.d.ts +65 -0
- package/lib/build/LifeCycle/utils.d.ts.map +1 -0
- package/lib/build/LifeCycle/utils.js +218 -0
- package/lib/build/LifeCycle/utils.js.map +1 -0
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts +12 -0
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -0
- package/lib/build/PageTemplates/GalleryPage.stories.jsx +126 -0
- package/lib/build/PageTemplates/GalleryPage.stories.jsx.map +1 -0
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts +26 -0
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -0
- package/lib/build/PageTemplates/PageTemplates.stories.jsx +434 -0
- package/lib/build/PageTemplates/PageTemplates.stories.jsx.map +1 -0
- package/lib/build/Workbench/Workbench.mocks.d.ts +9 -0
- package/lib/build/Workbench/Workbench.mocks.d.ts.map +1 -0
- package/lib/build/Workbench/Workbench.mocks.js +67 -0
- package/lib/build/Workbench/Workbench.mocks.js.map +1 -0
- package/lib/build/Workbench/Workbench.stories.d.ts +10 -0
- package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -0
- package/lib/build/Workbench/Workbench.stories.jsx +124 -0
- package/lib/build/Workbench/Workbench.stories.jsx.map +1 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +10 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx +263 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx.map +1 -0
- package/lib/condition-builder/ConditionBuilder/props.mock.d.ts +6 -0
- package/lib/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -0
- package/lib/condition-builder/ConditionBuilder/props.mock.js +113 -0
- package/lib/condition-builder/ConditionBuilder/props.mock.js.map +1 -0
- package/lib/core/AppShell/AppShell.mocks.d.ts +15 -0
- package/lib/core/AppShell/AppShell.mocks.d.ts.map +1 -0
- package/lib/core/AppShell/AppShell.mocks.jsx +147 -0
- package/lib/core/AppShell/AppShell.mocks.jsx.map +1 -0
- package/lib/core/AppShell/AppShell.stories.d.ts +31 -0
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -0
- package/lib/core/AppShell/AppShell.stories.jsx +222 -0
- package/lib/core/AppShell/AppShell.stories.jsx.map +1 -0
- package/lib/core/AppShell/AppShell.styles.d.ts +2 -0
- package/lib/core/AppShell/AppShell.styles.d.ts.map +1 -0
- package/lib/core/AppShell/AppShell.styles.js +5 -0
- package/lib/core/AppShell/AppShell.styles.js.map +1 -0
- package/lib/core/Avatar/Avatar.stories.d.ts +10 -0
- package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -0
- package/lib/core/Avatar/Avatar.stories.jsx +50 -0
- package/lib/core/Avatar/Avatar.stories.jsx.map +1 -0
- package/lib/core/Backdrop/Backdrop.stories.d.ts +7 -0
- package/lib/core/Backdrop/Backdrop.stories.d.ts.map +1 -0
- package/lib/core/Backdrop/Backdrop.stories.jsx +43 -0
- package/lib/core/Backdrop/Backdrop.stories.jsx.map +1 -0
- package/lib/core/Badges/Alert.stories.d.ts +6 -0
- package/lib/core/Badges/Alert.stories.d.ts.map +1 -0
- package/lib/core/Badges/Alert.stories.jsx +15 -0
- package/lib/core/Badges/Alert.stories.jsx.map +1 -0
- package/lib/core/Badges/Count.stories.d.ts +6 -0
- package/lib/core/Badges/Count.stories.d.ts.map +1 -0
- package/lib/core/Badges/Count.stories.jsx +20 -0
- package/lib/core/Badges/Count.stories.jsx.map +1 -0
- package/lib/core/Badges/Selection.stories.d.ts +6 -0
- package/lib/core/Badges/Selection.stories.d.ts.map +1 -0
- package/lib/core/Badges/Selection.stories.jsx +9 -0
- package/lib/core/Badges/Selection.stories.jsx.map +1 -0
- package/lib/core/Badges/Status.stories.d.ts +6 -0
- package/lib/core/Badges/Status.stories.d.ts.map +1 -0
- package/lib/core/Badges/Status.stories.jsx +18 -0
- package/lib/core/Badges/Status.stories.jsx.map +1 -0
- package/lib/core/Badges/Tag.stories.d.ts +6 -0
- package/lib/core/Badges/Tag.stories.d.ts.map +1 -0
- package/lib/core/Badges/Tag.stories.jsx +9 -0
- package/lib/core/Badges/Tag.stories.jsx.map +1 -0
- package/lib/core/Banner/Banner.stories.d.ts +22 -0
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -0
- package/lib/core/Banner/Banner.stories.jsx +125 -0
- package/lib/core/Banner/Banner.stories.jsx.map +1 -0
- package/lib/core/Boolean/BooleanDisplay.stories.d.ts +6 -0
- package/lib/core/Boolean/BooleanDisplay.stories.d.ts.map +1 -0
- package/lib/core/Boolean/BooleanDisplay.stories.jsx +19 -0
- package/lib/core/Boolean/BooleanDisplay.stories.jsx.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.d.ts +7 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.jsx +29 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.jsx.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.styles.d.ts +2 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.styles.js +12 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.styles.js.map +1 -0
- package/lib/core/Button/Button.stories.d.ts +12 -0
- package/lib/core/Button/Button.stories.d.ts.map +1 -0
- package/lib/core/Button/Button.stories.jsx +103 -0
- package/lib/core/Button/Button.stories.jsx.map +1 -0
- package/lib/core/Card/Card.stories.d.ts +8 -0
- package/lib/core/Card/Card.stories.d.ts.map +1 -0
- package/lib/core/Card/Card.stories.jsx +55 -0
- package/lib/core/Card/Card.stories.jsx.map +1 -0
- package/lib/core/Card/Card.styles.d.ts +2 -0
- package/lib/core/Card/Card.styles.d.ts.map +1 -0
- package/lib/core/Card/Card.styles.js +5 -0
- package/lib/core/Card/Card.styles.js.map +1 -0
- package/lib/core/Checkbox/Checkbox.stories.d.ts +7 -0
- package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/lib/core/Checkbox/Checkbox.stories.jsx +28 -0
- package/lib/core/Checkbox/Checkbox.stories.jsx.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts +7 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.jsx +60 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.jsx.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.d.ts +4 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.d.ts.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.js +9 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.js.map +1 -0
- package/lib/core/ColorPicker/ColorPicker.stories.d.ts +8 -0
- package/lib/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -0
- package/lib/core/ColorPicker/ColorPicker.stories.jsx +91 -0
- package/lib/core/ColorPicker/ColorPicker.stories.jsx.map +1 -0
- package/lib/core/ComboBox/ComboBox.mocks.d.ts +24 -0
- package/lib/core/ComboBox/ComboBox.mocks.d.ts.map +1 -0
- package/lib/core/ComboBox/ComboBox.mocks.js +54 -0
- package/lib/core/ComboBox/ComboBox.mocks.js.map +1 -0
- package/lib/core/ComboBox/ComboBox.stories.d.ts +21 -0
- package/lib/core/ComboBox/ComboBox.stories.d.ts.map +1 -0
- package/lib/core/ComboBox/ComboBox.stories.jsx +323 -0
- package/lib/core/ComboBox/ComboBox.stories.jsx.map +1 -0
- package/lib/core/Configuration/Configuration.stories.d.ts +10 -0
- package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -0
- package/lib/core/Configuration/Configuration.stories.jsx +125 -0
- package/lib/core/Configuration/Configuration.stories.jsx.map +1 -0
- package/lib/core/Currency/Currency.stories.d.ts +11 -0
- package/lib/core/Currency/Currency.stories.d.ts.map +1 -0
- package/lib/core/Currency/Currency.stories.jsx +65 -0
- package/lib/core/Currency/Currency.stories.jsx.map +1 -0
- package/lib/core/DateTime/DateTime.stories.d.ts +20 -0
- package/lib/core/DateTime/DateTime.stories.d.ts.map +1 -0
- package/lib/core/DateTime/DateTime.stories.jsx +127 -0
- package/lib/core/DateTime/DateTime.stories.jsx.map +1 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.d.ts +7 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.d.ts.map +1 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.jsx +46 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -0
- package/lib/core/DateTime/DateTimePicker.stories.d.ts +7 -0
- package/lib/core/DateTime/DateTimePicker.stories.d.ts.map +1 -0
- package/lib/core/DateTime/DateTimePicker.stories.jsx +34 -0
- package/lib/core/DateTime/DateTimePicker.stories.jsx.map +1 -0
- package/lib/core/Drawer/Drawer.stories.d.ts +7 -0
- package/lib/core/Drawer/Drawer.stories.d.ts.map +1 -0
- package/lib/core/Drawer/Drawer.stories.jsx +98 -0
- package/lib/core/Drawer/Drawer.stories.jsx.map +1 -0
- package/lib/core/Drawer/Drawer.styles.d.ts +2 -0
- package/lib/core/Drawer/Drawer.styles.d.ts.map +1 -0
- package/lib/core/Drawer/Drawer.styles.js +11 -0
- package/lib/core/Drawer/Drawer.styles.js.map +1 -0
- package/lib/core/Email/EmailDisplay.stories.d.ts +6 -0
- package/lib/core/Email/EmailDisplay.stories.d.ts.map +1 -0
- package/lib/core/Email/EmailDisplay.stories.jsx +19 -0
- package/lib/core/Email/EmailDisplay.stories.jsx.map +1 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.d.ts +8 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.d.ts.map +1 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.jsx +52 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.jsx.map +1 -0
- package/lib/core/EmptyState/EmptyState.stories.d.ts +6 -0
- package/lib/core/EmptyState/EmptyState.stories.d.ts.map +1 -0
- package/lib/core/EmptyState/EmptyState.stories.jsx +18 -0
- package/lib/core/EmptyState/EmptyState.stories.jsx.map +1 -0
- package/lib/core/ErrorState/ErrorState.stories.d.ts +9 -0
- package/lib/core/ErrorState/ErrorState.stories.d.ts.map +1 -0
- package/lib/core/ErrorState/ErrorState.stories.jsx +20 -0
- package/lib/core/ErrorState/ErrorState.stories.jsx.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.d.ts +7 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.d.ts.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.jsx +73 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.jsx.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts +4 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js +12 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -0
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts +11 -0
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -0
- package/lib/core/FieldGroup/FieldGroup.stories.jsx +52 -0
- package/lib/core/FieldGroup/FieldGroup.stories.jsx.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts +10 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.jsx +183 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -0
- package/lib/core/FieldValueList/FieldValueList.stories.d.ts +10 -0
- package/lib/core/FieldValueList/FieldValueList.stories.d.ts.map +1 -0
- package/lib/core/FieldValueList/FieldValueList.stories.jsx +54 -0
- package/lib/core/FieldValueList/FieldValueList.stories.jsx.map +1 -0
- package/lib/core/File/FileDisplay.stories.d.ts +13 -0
- package/lib/core/File/FileDisplay.stories.d.ts.map +1 -0
- package/lib/core/File/FileDisplay.stories.jsx +100 -0
- package/lib/core/File/FileDisplay.stories.jsx.map +1 -0
- package/lib/core/File/FileInput.stories.d.ts +9 -0
- package/lib/core/File/FileInput.stories.d.ts.map +1 -0
- package/lib/core/File/FileInput.stories.jsx +76 -0
- package/lib/core/File/FileInput.stories.jsx.map +1 -0
- package/lib/core/Flex/Flex.styles.d.ts +10 -0
- package/lib/core/Flex/Flex.styles.d.ts.map +1 -0
- package/lib/core/Flex/Flex.styles.js +41 -0
- package/lib/core/Flex/Flex.styles.js.map +1 -0
- package/lib/core/Flex/FlexContainer.stories.d.ts +20 -0
- package/lib/core/Flex/FlexContainer.stories.d.ts.map +1 -0
- package/lib/core/Flex/FlexContainer.stories.jsx +151 -0
- package/lib/core/Flex/FlexContainer.stories.jsx.map +1 -0
- package/lib/core/Flex/FlexItem.stories.d.ts +13 -0
- package/lib/core/Flex/FlexItem.stories.d.ts.map +1 -0
- package/lib/core/Flex/FlexItem.stories.jsx +71 -0
- package/lib/core/Flex/FlexItem.stories.jsx.map +1 -0
- package/lib/core/Form/Form.stories.d.ts +21 -0
- package/lib/core/Form/Form.stories.d.ts.map +1 -0
- package/lib/core/Form/Form.stories.jsx +196 -0
- package/lib/core/Form/Form.stories.jsx.map +1 -0
- package/lib/core/Grid/Grid.styles.d.ts +6 -0
- package/lib/core/Grid/Grid.styles.d.ts.map +1 -0
- package/lib/core/Grid/Grid.styles.js +36 -0
- package/lib/core/Grid/Grid.styles.js.map +1 -0
- package/lib/core/Grid/GridContainer.stories.d.ts +23 -0
- package/lib/core/Grid/GridContainer.stories.d.ts.map +1 -0
- package/lib/core/Grid/GridContainer.stories.jsx +161 -0
- package/lib/core/Grid/GridContainer.stories.jsx.map +1 -0
- package/lib/core/Grid/GridItem.stories.d.ts +13 -0
- package/lib/core/Grid/GridItem.stories.d.ts.map +1 -0
- package/lib/core/Grid/GridItem.stories.jsx +74 -0
- package/lib/core/Grid/GridItem.stories.jsx.map +1 -0
- package/lib/core/Icon/Icon.stories.d.ts +8 -0
- package/lib/core/Icon/Icon.stories.d.ts.map +1 -0
- package/lib/core/Icon/Icon.stories.jsx +84 -0
- package/lib/core/Icon/Icon.stories.jsx.map +1 -0
- package/lib/core/IconPicker/IconPicker.stories.d.ts +6 -0
- package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -0
- package/lib/core/IconPicker/IconPicker.stories.jsx +39 -0
- package/lib/core/IconPicker/IconPicker.stories.jsx.map +1 -0
- package/lib/core/Image/Image.stories.d.ts +6 -0
- package/lib/core/Image/Image.stories.d.ts.map +1 -0
- package/lib/core/Image/Image.stories.jsx +9 -0
- package/lib/core/Image/Image.stories.jsx.map +1 -0
- package/lib/core/Input/Input.stories.d.ts +9 -0
- package/lib/core/Input/Input.stories.d.ts.map +1 -0
- package/lib/core/Input/Input.stories.jsx +44 -0
- package/lib/core/Input/Input.stories.jsx.map +1 -0
- package/lib/core/Label/Label.stories.d.ts +6 -0
- package/lib/core/Label/Label.stories.d.ts.map +1 -0
- package/lib/core/Label/Label.stories.jsx +15 -0
- package/lib/core/Label/Label.stories.jsx.map +1 -0
- package/lib/core/Lightbox/Lightbox.stories.d.ts +9 -0
- package/lib/core/Lightbox/Lightbox.stories.d.ts.map +1 -0
- package/lib/core/Lightbox/Lightbox.stories.jsx +106 -0
- package/lib/core/Lightbox/Lightbox.stories.jsx.map +1 -0
- package/lib/core/Link/Link.stories.d.ts +8 -0
- package/lib/core/Link/Link.stories.d.ts.map +1 -0
- package/lib/core/Link/Link.stories.jsx +32 -0
- package/lib/core/Link/Link.stories.jsx.map +1 -0
- package/lib/core/List/CommaSeparatedList.stories.d.ts +6 -0
- package/lib/core/List/CommaSeparatedList.stories.d.ts.map +1 -0
- package/lib/core/List/CommaSeparatedList.stories.jsx +33 -0
- package/lib/core/List/CommaSeparatedList.stories.jsx.map +1 -0
- package/lib/core/List/OrderedList.stories.d.ts +10 -0
- package/lib/core/List/OrderedList.stories.d.ts.map +1 -0
- package/lib/core/List/OrderedList.stories.jsx +38 -0
- package/lib/core/List/OrderedList.stories.jsx.map +1 -0
- package/lib/core/List/UnorderedList.stories.d.ts +10 -0
- package/lib/core/List/UnorderedList.stories.d.ts.map +1 -0
- package/lib/core/List/UnorderedList.stories.jsx +38 -0
- package/lib/core/List/UnorderedList.stories.jsx.map +1 -0
- package/lib/core/Location/Location.stories.d.ts +12 -0
- package/lib/core/Location/Location.stories.d.ts.map +1 -0
- package/lib/core/Location/Location.stories.jsx +130 -0
- package/lib/core/Location/Location.stories.jsx.map +1 -0
- package/lib/core/Menu/Menu.mocks.d.ts +4 -0
- package/lib/core/Menu/Menu.mocks.d.ts.map +1 -0
- package/lib/core/Menu/Menu.mocks.js +179 -0
- package/lib/core/Menu/Menu.mocks.js.map +1 -0
- package/lib/core/Menu/Menu.stories.d.ts +17 -0
- package/lib/core/Menu/Menu.stories.d.ts.map +1 -0
- package/lib/core/Menu/Menu.stories.jsx +166 -0
- package/lib/core/Menu/Menu.stories.jsx.map +1 -0
- package/lib/core/Menu/Menu.styles.d.ts +2 -0
- package/lib/core/Menu/Menu.styles.d.ts.map +1 -0
- package/lib/core/Menu/Menu.styles.js +6 -0
- package/lib/core/Menu/Menu.styles.js.map +1 -0
- package/lib/core/MenuButton/MenuButton.stories.d.ts +15 -0
- package/lib/core/MenuButton/MenuButton.stories.d.ts.map +1 -0
- package/lib/core/MenuButton/MenuButton.stories.jsx +188 -0
- package/lib/core/MenuButton/MenuButton.stories.jsx.map +1 -0
- package/lib/core/MetaList/MetaList.stories.d.ts +9 -0
- package/lib/core/MetaList/MetaList.stories.d.ts.map +1 -0
- package/lib/core/MetaList/MetaList.stories.jsx +24 -0
- package/lib/core/MetaList/MetaList.stories.jsx.map +1 -0
- package/lib/core/Modal/Modal.mocks.d.ts +4 -0
- package/lib/core/Modal/Modal.mocks.d.ts.map +1 -0
- package/lib/core/Modal/Modal.mocks.jsx +44 -0
- package/lib/core/Modal/Modal.mocks.jsx.map +1 -0
- package/lib/core/Modal/Modal.stories.d.ts +20 -0
- package/lib/core/Modal/Modal.stories.d.ts.map +1 -0
- package/lib/core/Modal/Modal.stories.jsx +305 -0
- package/lib/core/Modal/Modal.stories.jsx.map +1 -0
- package/lib/core/MultiStep/MultiStep.stories.d.ts +6 -0
- package/lib/core/MultiStep/MultiStep.stories.d.ts.map +1 -0
- package/lib/core/MultiStep/MultiStep.stories.jsx +56 -0
- package/lib/core/MultiStep/MultiStep.stories.jsx.map +1 -0
- package/lib/core/Number/Number.stories.d.ts +13 -0
- package/lib/core/Number/Number.stories.d.ts.map +1 -0
- package/lib/core/Number/Number.stories.jsx +110 -0
- package/lib/core/Number/Number.stories.jsx.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.mocks.d.ts +3 -0
- package/lib/core/PageTemplates/PageTemplates.mocks.d.ts.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.mocks.js +10 -0
- package/lib/core/PageTemplates/PageTemplates.mocks.js.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts +28 -0
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.stories.jsx +233 -0
- package/lib/core/PageTemplates/PageTemplates.stories.jsx.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.styles.d.ts +4 -0
- package/lib/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.styles.js +31 -0
- package/lib/core/PageTemplates/PageTemplates.styles.js.map +1 -0
- package/lib/core/Pagination/Pagination.stories.d.ts +6 -0
- package/lib/core/Pagination/Pagination.stories.d.ts.map +1 -0
- package/lib/core/Pagination/Pagination.stories.jsx +19 -0
- package/lib/core/Pagination/Pagination.stories.jsx.map +1 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.d.ts +6 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.d.ts.map +1 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.jsx +12 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.jsx.map +1 -0
- package/lib/core/Phone/Phone.stories.d.ts +7 -0
- package/lib/core/Phone/Phone.stories.d.ts.map +1 -0
- package/lib/core/Phone/Phone.stories.jsx +42 -0
- package/lib/core/Phone/Phone.stories.jsx.map +1 -0
- package/lib/core/Popover/Popover.stories.d.ts +8 -0
- package/lib/core/Popover/Popover.stories.d.ts.map +1 -0
- package/lib/core/Popover/Popover.stories.jsx +184 -0
- package/lib/core/Popover/Popover.stories.jsx.map +1 -0
- package/lib/core/Progress/Progress.stories.d.ts +7 -0
- package/lib/core/Progress/Progress.stories.d.ts.map +1 -0
- package/lib/core/Progress/Progress.stories.jsx +71 -0
- package/lib/core/Progress/Progress.stories.jsx.map +1 -0
- package/lib/core/Progress/Progress.styles.d.ts +2 -0
- package/lib/core/Progress/Progress.styles.d.ts.map +1 -0
- package/lib/core/Progress/Progress.styles.js +13 -0
- package/lib/core/Progress/Progress.styles.js.map +1 -0
- package/lib/core/RadioButton/RadioButton.stories.d.ts +7 -0
- package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -0
- package/lib/core/RadioButton/RadioButton.stories.jsx +26 -0
- package/lib/core/RadioButton/RadioButton.stories.jsx.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts +7 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.jsx +62 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.jsx.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts +4 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.js +9 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.js.map +1 -0
- package/lib/core/Rating/Rating.stories.d.ts +6 -0
- package/lib/core/Rating/Rating.stories.d.ts.map +1 -0
- package/lib/core/Rating/Rating.stories.jsx +21 -0
- package/lib/core/Rating/Rating.stories.jsx.map +1 -0
- package/lib/core/SearchInput/SearchInput.stories.d.ts +6 -0
- package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -0
- package/lib/core/SearchInput/SearchInput.stories.jsx +15 -0
- package/lib/core/SearchInput/SearchInput.stories.jsx.map +1 -0
- package/lib/core/Select/Select.stories.d.ts +9 -0
- package/lib/core/Select/Select.stories.d.ts.map +1 -0
- package/lib/core/Select/Select.stories.jsx +42 -0
- package/lib/core/Select/Select.stories.jsx.map +1 -0
- package/lib/core/Sentiment/Sentiment.stories.d.ts +14 -0
- package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -0
- package/lib/core/Sentiment/Sentiment.stories.jsx +39 -0
- package/lib/core/Sentiment/Sentiment.stories.jsx.map +1 -0
- package/lib/core/Slider/Slider.stories.d.ts +11 -0
- package/lib/core/Slider/Slider.stories.d.ts.map +1 -0
- package/lib/core/Slider/Slider.stories.jsx +58 -0
- package/lib/core/Slider/Slider.stories.jsx.map +1 -0
- package/lib/core/SummaryItem/SummaryItem.stories.d.ts +11 -0
- package/lib/core/SummaryItem/SummaryItem.stories.d.ts.map +1 -0
- package/lib/core/SummaryItem/SummaryItem.stories.jsx +36 -0
- package/lib/core/SummaryItem/SummaryItem.stories.jsx.map +1 -0
- package/lib/core/SummaryList/SummaryList.mocks.d.ts +32 -0
- package/lib/core/SummaryList/SummaryList.mocks.d.ts.map +1 -0
- package/lib/core/SummaryList/SummaryList.mocks.jsx +35 -0
- package/lib/core/SummaryList/SummaryList.mocks.jsx.map +1 -0
- package/lib/core/SummaryList/SummaryList.stories.d.ts +13 -0
- package/lib/core/SummaryList/SummaryList.stories.d.ts.map +1 -0
- package/lib/core/SummaryList/SummaryList.stories.jsx +131 -0
- package/lib/core/SummaryList/SummaryList.stories.jsx.map +1 -0
- package/lib/core/Switch/Switch.stories.d.ts +7 -0
- package/lib/core/Switch/Switch.stories.d.ts.map +1 -0
- package/lib/core/Switch/Switch.stories.jsx +26 -0
- package/lib/core/Switch/Switch.stories.jsx.map +1 -0
- package/lib/core/Switch/Switch.styles.d.ts +2 -0
- package/lib/core/Switch/Switch.styles.d.ts.map +1 -0
- package/lib/core/Switch/Switch.styles.js +13 -0
- package/lib/core/Switch/Switch.styles.js.map +1 -0
- package/lib/core/Table/Table.mocks.d.ts +19 -0
- package/lib/core/Table/Table.mocks.d.ts.map +1 -0
- package/lib/core/Table/Table.mocks.jsx +32 -0
- package/lib/core/Table/Table.mocks.jsx.map +1 -0
- package/lib/core/Table/Table.stories.d.ts +14 -0
- package/lib/core/Table/Table.stories.d.ts.map +1 -0
- package/lib/core/Table/Table.stories.jsx +58 -0
- package/lib/core/Table/Table.stories.jsx.map +1 -0
- package/lib/core/Table/Table.styles.d.ts +4 -0
- package/lib/core/Table/Table.styles.d.ts.map +1 -0
- package/lib/core/Table/Table.styles.js +9 -0
- package/lib/core/Table/Table.styles.js.map +1 -0
- package/lib/core/Tabs/Tabs.stories.d.ts +7 -0
- package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -0
- package/lib/core/Tabs/Tabs.stories.jsx +59 -0
- package/lib/core/Tabs/Tabs.stories.jsx.map +1 -0
- package/lib/core/Text/Text.stories.d.ts +6 -0
- package/lib/core/Text/Text.stories.d.ts.map +1 -0
- package/lib/core/Text/Text.stories.jsx +22 -0
- package/lib/core/Text/Text.stories.jsx.map +1 -0
- package/lib/core/TextArea/TextArea.stories.d.ts +6 -0
- package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -0
- package/lib/core/TextArea/TextArea.stories.jsx +43 -0
- package/lib/core/TextArea/TextArea.stories.jsx.map +1 -0
- package/lib/core/Toaster/Toaster.stories.d.ts +6 -0
- package/lib/core/Toaster/Toaster.stories.d.ts.map +1 -0
- package/lib/core/Toaster/Toaster.stories.jsx +17 -0
- package/lib/core/Toaster/Toaster.stories.jsx.map +1 -0
- package/lib/core/Tooltip/Tooltip.stories.d.ts +8 -0
- package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -0
- package/lib/core/Tooltip/Tooltip.stories.jsx +18 -0
- package/lib/core/Tooltip/Tooltip.stories.jsx.map +1 -0
- package/lib/core/Tree/Tree.mocks.d.ts +2 -0
- package/lib/core/Tree/Tree.mocks.d.ts.map +1 -0
- package/lib/core/Tree/Tree.mocks.js +20 -0
- package/lib/core/Tree/Tree.mocks.js.map +1 -0
- package/lib/core/Tree/Tree.stories.d.ts +8 -0
- package/lib/core/Tree/Tree.stories.d.ts.map +1 -0
- package/lib/core/Tree/Tree.stories.jsx +89 -0
- package/lib/core/Tree/Tree.stories.jsx.map +1 -0
- package/lib/core/Tree/Tree.styles.d.ts +3 -0
- package/lib/core/Tree/Tree.styles.d.ts.map +1 -0
- package/lib/core/Tree/Tree.styles.js +10 -0
- package/lib/core/Tree/Tree.styles.js.map +1 -0
- package/lib/core/URL/URL.stories.d.ts +6 -0
- package/lib/core/URL/URL.stories.d.ts.map +1 -0
- package/lib/core/URL/URL.stories.jsx +17 -0
- package/lib/core/URL/URL.stories.jsx.map +1 -0
- package/lib/cs/Article/Article.mocks.d.ts +14 -0
- package/lib/cs/Article/Article.mocks.d.ts.map +1 -0
- package/lib/cs/Article/Article.mocks.js +14 -0
- package/lib/cs/Article/Article.mocks.js.map +1 -0
- package/lib/cs/Article/Article.stories.d.ts +15 -0
- package/lib/cs/Article/Article.stories.d.ts.map +1 -0
- package/lib/cs/Article/Article.stories.jsx +126 -0
- package/lib/cs/Article/Article.stories.jsx.map +1 -0
- package/lib/cs/ArticleList/ArticleList.mocks.d.ts +21 -0
- package/lib/cs/ArticleList/ArticleList.mocks.d.ts.map +1 -0
- package/lib/cs/ArticleList/ArticleList.mocks.js +102 -0
- package/lib/cs/ArticleList/ArticleList.mocks.js.map +1 -0
- package/lib/cs/ArticleList/ArticleList.stories.d.ts +16 -0
- package/lib/cs/ArticleList/ArticleList.stories.d.ts.map +1 -0
- package/lib/cs/ArticleList/ArticleList.stories.jsx +110 -0
- package/lib/cs/ArticleList/ArticleList.stories.jsx.map +1 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.d.ts +45 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.jsx +275 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts +57 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts.map +1 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.js +224 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.js.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts +16 -0
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.js +110 -0
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.js.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts +13 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.jsx +188 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.jsx.map +1 -0
- package/lib/cs/DialPad/DialPad.stories.d.ts +9 -0
- package/lib/cs/DialPad/DialPad.stories.d.ts.map +1 -0
- package/lib/cs/DialPad/DialPad.stories.jsx +18 -0
- package/lib/cs/DialPad/DialPad.stories.jsx.map +1 -0
- package/lib/cs/DialPad/DialPadKeyboardData.mock.d.ts +11 -0
- package/lib/cs/DialPad/DialPadKeyboardData.mock.d.ts.map +1 -0
- package/lib/cs/DialPad/DialPadKeyboardData.mock.js +20 -0
- package/lib/cs/DialPad/DialPadKeyboardData.mock.js.map +1 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts +13 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +356 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts +8 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.jsx +32 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.jsx.map +1 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts +14 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.jsx +85 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.jsx.map +1 -0
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts +13 -0
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -0
- package/lib/cs/TaskManager/TaskManager.mocks.js +140 -0
- package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -0
- package/lib/cs/TaskManager/TaskManager.stories.d.ts +8 -0
- package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -0
- package/lib/cs/TaskManager/TaskManager.stories.jsx +314 -0
- package/lib/cs/TaskManager/TaskManager.stories.jsx.map +1 -0
- package/lib/dnd/DragDropList/DragDropList.stories.d.ts +11 -0
- package/lib/dnd/DragDropList/DragDropList.stories.d.ts.map +1 -0
- package/lib/dnd/DragDropList/DragDropList.stories.jsx +119 -0
- package/lib/dnd/DragDropList/DragDropList.stories.jsx.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.d.ts +3 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.d.ts.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.jsx +34 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.jsx.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts +10 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.jsx +145 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts +7 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.jsx +62 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -0
- package/lib/social/Chat/Chat.mocks.d.ts +385 -0
- package/lib/social/Chat/Chat.mocks.d.ts.map +1 -0
- package/lib/social/Chat/Chat.mocks.js +648 -0
- package/lib/social/Chat/Chat.mocks.js.map +1 -0
- package/lib/social/Chat/Chat.stories.d.ts +25 -0
- package/lib/social/Chat/Chat.stories.d.ts.map +1 -0
- package/lib/social/Chat/Chat.stories.jsx +537 -0
- package/lib/social/Chat/Chat.stories.jsx.map +1 -0
- package/lib/social/Chat/RepeatingView.stories.d.ts +20 -0
- package/lib/social/Chat/RepeatingView.stories.d.ts.map +1 -0
- package/lib/social/Chat/RepeatingView.stories.jsx +90 -0
- package/lib/social/Chat/RepeatingView.stories.jsx.map +1 -0
- package/lib/social/Email/Email.mocks.d.ts +87 -0
- package/lib/social/Email/Email.mocks.d.ts.map +1 -0
- package/lib/social/Email/Email.mocks.jsx +349 -0
- package/lib/social/Email/Email.mocks.jsx.map +1 -0
- package/lib/social/Email/Email.stories.d.ts +28 -0
- package/lib/social/Email/Email.stories.d.ts.map +1 -0
- package/lib/social/Email/Email.stories.jsx +798 -0
- package/lib/social/Email/Email.stories.jsx.map +1 -0
- package/lib/social/Feed/Feed.mocks.d.ts +52 -0
- package/lib/social/Feed/Feed.mocks.d.ts.map +1 -0
- package/lib/social/Feed/Feed.mocks.jsx +315 -0
- package/lib/social/Feed/Feed.mocks.jsx.map +1 -0
- package/lib/social/Feed/Feed.stories.d.ts +15 -0
- package/lib/social/Feed/Feed.stories.d.ts.map +1 -0
- package/lib/social/Feed/Feed.stories.jsx +146 -0
- package/lib/social/Feed/Feed.stories.jsx.map +1 -0
- package/lib/social/Feed/FeedNewPost.stories.d.ts +17 -0
- package/lib/social/Feed/FeedNewPost.stories.d.ts.map +1 -0
- package/lib/social/Feed/FeedNewPost.stories.jsx +80 -0
- package/lib/social/Feed/FeedNewPost.stories.jsx.map +1 -0
- package/lib/social/Feed/FeedPost.stories.d.ts +9 -0
- package/lib/social/Feed/FeedPost.stories.d.ts.map +1 -0
- package/lib/social/Feed/FeedPost.stories.jsx +248 -0
- package/lib/social/Feed/FeedPost.stories.jsx.map +1 -0
- package/lib/social/Feed/FeedReply.stories.d.ts +16 -0
- package/lib/social/Feed/FeedReply.stories.d.ts.map +1 -0
- package/lib/social/Feed/FeedReply.stories.jsx +99 -0
- package/lib/social/Feed/FeedReply.stories.jsx.map +1 -0
- package/lib/social/Feed/FeedReplyInput.stories.d.ts +15 -0
- package/lib/social/Feed/FeedReplyInput.stories.d.ts.map +1 -0
- package/lib/social/Feed/FeedReplyInput.stories.jsx +59 -0
- package/lib/social/Feed/FeedReplyInput.stories.jsx.map +1 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts +6 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.jsx +30 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +1 -0
- package/lib/work/CaseView/Attachments.mocks.d.ts +3 -0
- package/lib/work/CaseView/Attachments.mocks.d.ts.map +1 -0
- package/lib/work/CaseView/Attachments.mocks.jsx +388 -0
- package/lib/work/CaseView/Attachments.mocks.jsx.map +1 -0
- package/lib/work/CaseView/CaseView.mocks.d.ts +11 -0
- package/lib/work/CaseView/CaseView.mocks.d.ts.map +1 -0
- package/lib/work/CaseView/CaseView.mocks.jsx +126 -0
- package/lib/work/CaseView/CaseView.mocks.jsx.map +1 -0
- package/lib/work/CaseView/CaseView.stories.d.ts +34 -0
- package/lib/work/CaseView/CaseView.stories.d.ts.map +1 -0
- package/lib/work/CaseView/CaseView.stories.jsx +264 -0
- package/lib/work/CaseView/CaseView.stories.jsx.map +1 -0
- package/lib/work/CaseView/Details.mocks.d.ts +3 -0
- package/lib/work/CaseView/Details.mocks.d.ts.map +1 -0
- package/lib/work/CaseView/Details.mocks.jsx +21 -0
- package/lib/work/CaseView/Details.mocks.jsx.map +1 -0
- package/lib/work/CaseView/FileService.mock.d.ts +28 -0
- package/lib/work/CaseView/FileService.mock.d.ts.map +1 -0
- package/lib/work/CaseView/FileService.mock.jsx +139 -0
- package/lib/work/CaseView/FileService.mock.jsx.map +1 -0
- package/lib/work/CaseView/MobileCaseView.stories.d.ts +11 -0
- package/lib/work/CaseView/MobileCaseView.stories.d.ts.map +1 -0
- package/lib/work/CaseView/MobileCaseView.stories.jsx +27 -0
- package/lib/work/CaseView/MobileCaseView.stories.jsx.map +1 -0
- package/lib/work/CaseView/Pulse.mocks.d.ts +6 -0
- package/lib/work/CaseView/Pulse.mocks.d.ts.map +1 -0
- package/lib/work/CaseView/Pulse.mocks.jsx +35 -0
- package/lib/work/CaseView/Pulse.mocks.jsx.map +1 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +10 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +195 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +1 -0
- package/lib/work/Confirmation/Confirmation.stories.d.ts +9 -0
- package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -0
- package/lib/work/Confirmation/Confirmation.stories.jsx +17 -0
- package/lib/work/Confirmation/Confirmation.stories.jsx.map +1 -0
- package/lib/work/Details/Details.stories.d.ts +5 -0
- package/lib/work/Details/Details.stories.d.ts.map +1 -0
- package/lib/work/Details/Details.stories.jsx +65 -0
- package/lib/work/Details/Details.stories.jsx.map +1 -0
- package/lib/work/Glimpse/Glimpse.stories.d.ts +10 -0
- package/lib/work/Glimpse/Glimpse.stories.d.ts.map +1 -0
- package/lib/work/Glimpse/Glimpse.stories.jsx +39 -0
- package/lib/work/Glimpse/Glimpse.stories.jsx.map +1 -0
- package/lib/work/SearchResults/SearchResults.mocks.d.ts +8 -0
- package/lib/work/SearchResults/SearchResults.mocks.d.ts.map +1 -0
- package/lib/work/SearchResults/SearchResults.mocks.jsx +96 -0
- package/lib/work/SearchResults/SearchResults.mocks.jsx.map +1 -0
- package/lib/work/SearchResults/SearchResults.stories.d.ts +8 -0
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -0
- package/lib/work/SearchResults/SearchResults.stories.jsx +205 -0
- package/lib/work/SearchResults/SearchResults.stories.jsx.map +1 -0
- package/lib/work/Stages/Stages.stories.d.ts +11 -0
- package/lib/work/Stages/Stages.stories.d.ts.map +1 -0
- package/lib/work/Stages/Stages.stories.jsx +65 -0
- package/lib/work/Stages/Stages.stories.jsx.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts +9 -0
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.stories.jsx +118 -0
- package/lib/work/Stakeholders/Stakeholders.stories.jsx.map +1 -0
- package/lib/work/Tags/Tags.mocks.d.ts +3 -0
- package/lib/work/Tags/Tags.mocks.d.ts.map +1 -0
- package/lib/work/Tags/Tags.mocks.js +76 -0
- package/lib/work/Tags/Tags.mocks.js.map +1 -0
- package/lib/work/Tags/Tags.stories.d.ts +10 -0
- package/lib/work/Tags/Tags.stories.d.ts.map +1 -0
- package/lib/work/Tags/Tags.stories.jsx +61 -0
- package/lib/work/Tags/Tags.stories.jsx.map +1 -0
- package/lib/work/Tasks/TaskList.stories.d.ts +5 -0
- package/lib/work/Tasks/TaskList.stories.d.ts.map +1 -0
- package/lib/work/Tasks/TaskList.stories.jsx +17 -0
- package/lib/work/Tasks/TaskList.stories.jsx.map +1 -0
- package/lib/work/Tasks/Tasks.stories.d.ts +9 -0
- package/lib/work/Tasks/Tasks.stories.d.ts.map +1 -0
- package/lib/work/Tasks/Tasks.stories.jsx +101 -0
- package/lib/work/Tasks/Tasks.stories.jsx.map +1 -0
- package/lib/work/Timeline/Timeline.mocks.d.ts +3 -0
- package/lib/work/Timeline/Timeline.mocks.d.ts.map +1 -0
- package/lib/work/Timeline/Timeline.mocks.jsx +129 -0
- package/lib/work/Timeline/Timeline.mocks.jsx.map +1 -0
- package/lib/work/Timeline/Timeline.stories.d.ts +7 -0
- package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -0
- package/lib/work/Timeline/Timeline.stories.jsx +43 -0
- package/lib/work/Timeline/Timeline.stories.jsx.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { Avatar, Card, CardContent, Flex, Text } from '@pega/cosmos-react-core';
|
|
2
|
+
import { StyledMainContent } from './AppShell.styles';
|
|
3
|
+
export const defaultLinks = [
|
|
4
|
+
{
|
|
5
|
+
id: '01',
|
|
6
|
+
name: 'Home',
|
|
7
|
+
href: '#home',
|
|
8
|
+
icon: 'home-solid',
|
|
9
|
+
active: true
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: '02',
|
|
13
|
+
name: 'My Dashboard',
|
|
14
|
+
href: '#dashboard',
|
|
15
|
+
icon: 'gauge-solid'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: '03',
|
|
19
|
+
name: 'Collaboration',
|
|
20
|
+
href: '#collaboration',
|
|
21
|
+
icon: 'social-solid',
|
|
22
|
+
links: [
|
|
23
|
+
{ id: '3-01', name: 'Spaces', href: '#spaces' },
|
|
24
|
+
{ id: '3-02', name: 'Documents', href: '#documents' }
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: '04',
|
|
29
|
+
name: 'Bugs',
|
|
30
|
+
href: '#bugs',
|
|
31
|
+
icon: 'users-solid'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: '05',
|
|
35
|
+
name: 'Epics',
|
|
36
|
+
href: '#epics',
|
|
37
|
+
icon: 'book-solid'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: '06',
|
|
41
|
+
name: 'Goals',
|
|
42
|
+
href: '#goals',
|
|
43
|
+
icon: 'analytics-good'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: '07',
|
|
47
|
+
name: 'More',
|
|
48
|
+
href: '#more',
|
|
49
|
+
icon: 'more-alt',
|
|
50
|
+
active: false,
|
|
51
|
+
links: [
|
|
52
|
+
{ id: '7-01', name: 'Item A', href: '#itemA' },
|
|
53
|
+
{ id: '7-02', name: 'Option 1', href: '#option1' }
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
];
|
|
57
|
+
export const defaultNotifications = [
|
|
58
|
+
{
|
|
59
|
+
id: '123',
|
|
60
|
+
primary: "Dean Thomas mentioned your team in a bug 'Button does not initiate onClick event handler'.",
|
|
61
|
+
secondary: ['BUG-12345', new Date(2020, 8, 31, 13, 23).toDateString()],
|
|
62
|
+
visual: <Avatar name='Dean Thomas'/>,
|
|
63
|
+
unread: true
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: '456',
|
|
67
|
+
primary: "Seth DeAngelo mentioned your team in a bug 'Text variant h1 renders as h3 in DOM'.",
|
|
68
|
+
visual: <Avatar name='Seth DeAngelo'/>,
|
|
69
|
+
unread: true
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: '789',
|
|
73
|
+
primary: "Janet Moore mentioned your team in a bug 'Tree expanded state does not match the state that was set on the component'.",
|
|
74
|
+
secondary: ['BUG-12345', new Date(2020, 9, 2, 9, 22).toDateString()],
|
|
75
|
+
visual: <Avatar name='Janet Moore'/>,
|
|
76
|
+
unread: true
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: '000',
|
|
80
|
+
primary: 'You have been awarded Employee of the Month! Congratulations!',
|
|
81
|
+
secondary: [new Date(2020, 9, 8, 14, 46).toDateString()],
|
|
82
|
+
unread: true
|
|
83
|
+
}
|
|
84
|
+
];
|
|
85
|
+
export const defaultRecents = [
|
|
86
|
+
{
|
|
87
|
+
id: '123',
|
|
88
|
+
primary: "BUG-12345: 'Button does not initiate onClick event handler'.",
|
|
89
|
+
secondary: ['BUG-12345', new Date(2020, 8, 31, 13, 23).toDateString()]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: '456',
|
|
93
|
+
primary: "BUG-54321: 'Text variant h1 renders as h3 in DOM'."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: '789',
|
|
97
|
+
primary: "BUG-00000: 'Tree expanded state does not match the state that was set on the component'.",
|
|
98
|
+
secondary: ['BUG-00000', new Date(2020, 9, 2, 9, 22).toDateString()]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: '111',
|
|
102
|
+
primary: "BUG-12345: 'Button does not initiate onClick event handler'.",
|
|
103
|
+
secondary: ['BUG-12345', new Date(2020, 8, 31, 13, 23).toDateString()]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: '222',
|
|
107
|
+
primary: "BUG-54321: 'Text variant h1 renders as h3 in DOM'."
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: '333',
|
|
111
|
+
primary: "BUG-00000: 'Tree expanded state does not match the state that was set on the component'.",
|
|
112
|
+
secondary: ['BUG-00000', new Date(2020, 9, 2, 9, 22).toDateString()]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: '444',
|
|
116
|
+
primary: "BUG-12345: 'Button does not initiate onClick event handler'.",
|
|
117
|
+
secondary: ['BUG-12345', new Date(2020, 8, 31, 13, 23).toDateString()]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: '555',
|
|
121
|
+
primary: "BUG-54321: 'Text variant h1 renders as h3 in DOM'."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: '666',
|
|
125
|
+
primary: "BUG-00000: 'Tree expanded state does not match the state that was set on the component'.",
|
|
126
|
+
secondary: ['BUG-00000', new Date(2020, 9, 2, 9, 22).toDateString()]
|
|
127
|
+
}
|
|
128
|
+
];
|
|
129
|
+
export const defaultMainContent = (<Flex container={{ justify: 'center', alignItems: 'center' }} as={StyledMainContent}>
|
|
130
|
+
<Card>
|
|
131
|
+
<CardContent>
|
|
132
|
+
<Text variant='h2'>This is the main content</Text>
|
|
133
|
+
</CardContent>
|
|
134
|
+
</Card>
|
|
135
|
+
</Flex>);
|
|
136
|
+
export const operatorData = {
|
|
137
|
+
avatar: <Avatar name='Cindy Turner'/>,
|
|
138
|
+
actions: [
|
|
139
|
+
{ text: 'Profile', id: 'profile' },
|
|
140
|
+
{ text: 'Settings', id: 'settings' },
|
|
141
|
+
{ text: 'My applications', id: 'apps' },
|
|
142
|
+
{ text: 'Help center', id: 'help' },
|
|
143
|
+
{ text: 'Log out', id: 'logout' }
|
|
144
|
+
],
|
|
145
|
+
name: 'Cindy Turner'
|
|
146
|
+
};
|
|
147
|
+
//# sourceMappingURL=AppShell.mocks.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppShell.mocks.jsx","sourceRoot":"","sources":["../../../src/core/AppShell/AppShell.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,IAAI,EACJ,WAAW,EAEX,IAAI,EAEJ,IAAI,EACL,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM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AO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,iBAAiB,CAAC,CAClF;IAAA,CAAC,IAAI,CACH;MAAA,CAAC,WAAW,CACV;QAAA,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,IAAI,CACnD;MAAA,EAAE,WAAW,CACf;IAAA,EAAE,IAAI,CACR;EAAA,EAAE,IAAI,CAAC,CACR,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAG;IACtC,OAAO,EAAE;QACP,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE;QAClC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE;QACpC,EAAE,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,MAAM,EAAE;QACvC,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE;QACnC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE;KAClC;IACD,IAAI,EAAE,cAAc;CACrB,CAAC","sourcesContent":["import {\n AppShellProps,\n Avatar,\n Card,\n CardContent,\n DrawerItemProps,\n Flex,\n ForwardProps,\n Text\n} from '@pega/cosmos-react-core';\n\nimport { StyledMainContent } from './AppShell.styles';\n\nexport const defaultLinks: AppShellProps['links'] = [\n {\n id: '01',\n name: 'Home',\n href: '#home',\n icon: 'home-solid',\n active: true\n },\n {\n id: '02',\n name: 'My Dashboard',\n href: '#dashboard',\n icon: 'gauge-solid'\n },\n {\n id: '03',\n name: 'Collaboration',\n href: '#collaboration',\n icon: 'social-solid',\n links: [\n { id: '3-01', name: 'Spaces', href: '#spaces' },\n { id: '3-02', name: 'Documents', href: '#documents' }\n ]\n },\n\n {\n id: '04',\n name: 'Bugs',\n href: '#bugs',\n icon: 'users-solid'\n },\n {\n id: '05',\n name: 'Epics',\n href: '#epics',\n icon: 'book-solid'\n },\n {\n id: '06',\n name: 'Goals',\n href: '#goals',\n icon: 'analytics-good'\n },\n {\n id: '07',\n name: 'More',\n href: '#more',\n icon: 'more-alt',\n active: false,\n links: [\n { id: '7-01', name: 'Item A', href: '#itemA' },\n { id: '7-02', name: 'Option 1', href: '#option1' }\n ]\n }\n];\n\nexport const defaultNotifications: (DrawerItemProps & ForwardProps)[] = [\n {\n id: '123',\n primary:\n \"Dean Thomas mentioned your team in a bug 'Button does not initiate onClick event handler'.\",\n secondary: ['BUG-12345', new Date(2020, 8, 31, 13, 23).toDateString()],\n visual: <Avatar name='Dean Thomas' />,\n unread: true\n },\n {\n id: '456',\n primary: \"Seth DeAngelo mentioned your team in a bug 'Text variant h1 renders as h3 in DOM'.\",\n visual: <Avatar name='Seth DeAngelo' />,\n unread: true\n },\n {\n id: '789',\n primary:\n \"Janet Moore mentioned your team in a bug 'Tree expanded state does not match the state that was set on the component'.\",\n secondary: ['BUG-12345', new Date(2020, 9, 2, 9, 22).toDateString()],\n visual: <Avatar name='Janet Moore' />,\n unread: true\n },\n {\n id: '000',\n primary: 'You have been awarded Employee of the Month! Congratulations!',\n secondary: [new Date(2020, 9, 8, 14, 46).toDateString()],\n unread: true\n }\n];\n\nexport const defaultRecents: (DrawerItemProps & ForwardProps)[] = [\n {\n id: '123',\n primary: \"BUG-12345: 'Button does not initiate onClick event handler'.\",\n secondary: ['BUG-12345', new Date(2020, 8, 31, 13, 23).toDateString()]\n },\n {\n id: '456',\n primary: \"BUG-54321: 'Text variant h1 renders as h3 in DOM'.\"\n },\n {\n id: '789',\n primary:\n \"BUG-00000: 'Tree expanded state does not match the state that was set on the component'.\",\n secondary: ['BUG-00000', new Date(2020, 9, 2, 9, 22).toDateString()]\n },\n {\n id: '111',\n primary: \"BUG-12345: 'Button does not initiate onClick event handler'.\",\n secondary: ['BUG-12345', new Date(2020, 8, 31, 13, 23).toDateString()]\n },\n {\n id: '222',\n primary: \"BUG-54321: 'Text variant h1 renders as h3 in DOM'.\"\n },\n {\n id: '333',\n primary:\n \"BUG-00000: 'Tree expanded state does not match the state that was set on the component'.\",\n secondary: ['BUG-00000', new Date(2020, 9, 2, 9, 22).toDateString()]\n },\n {\n id: '444',\n primary: \"BUG-12345: 'Button does not initiate onClick event handler'.\",\n secondary: ['BUG-12345', new Date(2020, 8, 31, 13, 23).toDateString()]\n },\n {\n id: '555',\n primary: \"BUG-54321: 'Text variant h1 renders as h3 in DOM'.\"\n },\n {\n id: '666',\n primary:\n \"BUG-00000: 'Tree expanded state does not match the state that was set on the component'.\",\n secondary: ['BUG-00000', new Date(2020, 9, 2, 9, 22).toDateString()]\n }\n];\n\nexport const defaultMainContent = (\n <Flex container={{ justify: 'center', alignItems: 'center' }} as={StyledMainContent}>\n <Card>\n <CardContent>\n <Text variant='h2'>This is the main content</Text>\n </CardContent>\n </Card>\n </Flex>\n);\n\nexport const operatorData = {\n avatar: <Avatar name='Cindy Turner' />,\n actions: [\n { text: 'Profile', id: 'profile' },\n { text: 'Settings', id: 'settings' },\n { text: 'My applications', id: 'apps' },\n { text: 'Help center', id: 'help' },\n { text: 'Log out', id: 'logout' }\n ],\n name: 'Cindy Turner'\n};\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { AppShellProps } from '@pega/cosmos-react-core';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
interface AppShellStoryProps {
|
|
6
|
+
main?: AppShellProps['main'];
|
|
7
|
+
appInfo?: AppShellProps['appInfo'];
|
|
8
|
+
banners?: AppShellProps['banners'];
|
|
9
|
+
cases?: AppShellProps['cases'];
|
|
10
|
+
caseLinks?: AppShellProps['links'];
|
|
11
|
+
createLinks?: any[];
|
|
12
|
+
recentItems?: any[];
|
|
13
|
+
utils?: AppShellProps['utils'];
|
|
14
|
+
onLinkClick?: (name: string) => void;
|
|
15
|
+
appName?: AppShellProps['appInfo']['appName'];
|
|
16
|
+
portalName?: AppShellProps['appInfo']['portalName'];
|
|
17
|
+
href?: AppShellProps['appInfo']['href'];
|
|
18
|
+
imageSrc?: AppShellProps['appInfo']['imageSrc'];
|
|
19
|
+
fullImageSrc?: AppShellProps['appInfo']['fullImageSrc'];
|
|
20
|
+
withSearch?: boolean;
|
|
21
|
+
appHeader?: AppShellProps['appHeader'];
|
|
22
|
+
environmentName?: string;
|
|
23
|
+
environmentColor?: string;
|
|
24
|
+
notificationsEmpty?: boolean;
|
|
25
|
+
notificationsLoading?: boolean;
|
|
26
|
+
recentsEmpty?: boolean;
|
|
27
|
+
recentsLoading?: boolean;
|
|
28
|
+
pinsLoading?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const AppShellDemo: Story<AppShellStoryProps>;
|
|
31
|
+
//# sourceMappingURL=AppShell.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppShell.stories.d.ts","sourceRoot":"","sources":["../../../src/core/AppShell/AppShell.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAEL,aAAa,EAkBd,MAAM,yBAAyB,CAAC;;AAcjC,wBAOU;AAEV,UAAU,kBAAkB;IAE1B,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAGrC,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC;IACpD,IAAI,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;IAChD,YAAY,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAC;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,kBAAkB,CAqPlD,CAAC"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { useContext, useState, useMemo, useRef } from 'react';
|
|
2
|
+
import { AppShell, AppShellList, Button, DateInput, Grid, Icon, registerIcon, Input, Select, Option, Modal, ModalManagerContext, TextArea, ToasterContext, useAfterInitialEffect, windowIsAvailable } from '@pega/cosmos-react-core';
|
|
3
|
+
import * as bellSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/bell-solid.icon';
|
|
4
|
+
import * as clockSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/clock-solid.icon';
|
|
5
|
+
import { defaultLinks, defaultMainContent, defaultNotifications, defaultRecents, operatorData } from './AppShell.mocks';
|
|
6
|
+
registerIcon(bellSolidIcon, clockSolidIcon);
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Core/App Shell',
|
|
9
|
+
component: AppShell,
|
|
10
|
+
id: 'App Shell',
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'fullscreen'
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export const AppShellDemo = (args) => {
|
|
16
|
+
const CreateCaseModal = ({ caseType }) => {
|
|
17
|
+
const { ModalContext } = useContext(ModalManagerContext);
|
|
18
|
+
const { dismiss } = useContext(ModalContext);
|
|
19
|
+
const { push: pushToaster } = useContext(ToasterContext);
|
|
20
|
+
return (<Modal as='form' heading={`New ${caseType}`} actions={<>
|
|
21
|
+
<Button onClick={dismiss}>Cancel</Button>
|
|
22
|
+
<Button variant='primary' type='submit' onClick={(e) => {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
dismiss();
|
|
25
|
+
pushToaster({ content: `${caseType} requested` });
|
|
26
|
+
}}>
|
|
27
|
+
Request
|
|
28
|
+
</Button>
|
|
29
|
+
</>}>
|
|
30
|
+
<Grid container={{ rowGap: 2 }}>
|
|
31
|
+
<DateInput label='Date Requested' info={null}/>
|
|
32
|
+
<Select label='Department'>
|
|
33
|
+
<Option value=''>Select…</Option>
|
|
34
|
+
<Option value='Fire'>Fire</Option>
|
|
35
|
+
<Option value='Facilities'>Facilities</Option>
|
|
36
|
+
<Option value='Parks'>Parks</Option>
|
|
37
|
+
<Option value='Sanitation'>Sanitation</Option>
|
|
38
|
+
<Option value='Parking & Traffic'>Parking & Traffic</Option>
|
|
39
|
+
<Option value='Police'>Police</Option>
|
|
40
|
+
<Option value='Courts'>Courts</Option>
|
|
41
|
+
<Option value='Healthcare'>Healthcare</Option>
|
|
42
|
+
<Option value='Energy'>Energy</Option>
|
|
43
|
+
<Option value='Justice department'>Justice department</Option>
|
|
44
|
+
<Option value='Environmental'>Environmental</Option>
|
|
45
|
+
</Select>
|
|
46
|
+
<TextArea label='Purpose of Purchase'/>
|
|
47
|
+
<Select label='Desired Make'>
|
|
48
|
+
<Option value=''>Select...</Option>
|
|
49
|
+
<Option value='Ford'>Ford</Option>
|
|
50
|
+
<Option value='Dodge'>Dodge</Option>
|
|
51
|
+
<Option value='Toyota'>Toyota</Option>
|
|
52
|
+
<Option value='Tesla'>Tesla</Option>
|
|
53
|
+
</Select>
|
|
54
|
+
<Input label='Desired Make'/>
|
|
55
|
+
<Input type='number' min='2016' max='2021' label='Year' info='Must be within last 5 years'/>
|
|
56
|
+
<Input type='number' min='0.01' step='0.01' max='50000' label='Estimated Cost' info='May not exceed $50,000.00'/>
|
|
57
|
+
</Grid>
|
|
58
|
+
</Modal>);
|
|
59
|
+
};
|
|
60
|
+
const caseLinks = args.caseLinks || defaultLinks;
|
|
61
|
+
const showSearch = args.withSearch !== undefined ? args.withSearch : true;
|
|
62
|
+
const { create: createModal } = useContext(ModalManagerContext);
|
|
63
|
+
const [links, setLinks] = useState(caseLinks);
|
|
64
|
+
const [notifications, setNotifications] = useState(defaultNotifications);
|
|
65
|
+
const [recents, setRecents] = useState(args.recentItems || defaultRecents);
|
|
66
|
+
const [numNewNotifications, setNumNewNotifications] = useState(notifications.filter(x => x.unread).length);
|
|
67
|
+
const [searchVal, setSearchVal] = useState('');
|
|
68
|
+
useAfterInitialEffect(() => {
|
|
69
|
+
setLinks(caseLinks);
|
|
70
|
+
}, [caseLinks]);
|
|
71
|
+
const linksWithHandlers = useMemo(() => {
|
|
72
|
+
return (links || []).map(link => ({
|
|
73
|
+
...link,
|
|
74
|
+
onClick(e) {
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
setLinks((prevLinks = []) => {
|
|
77
|
+
return prevLinks.map(prevLink => {
|
|
78
|
+
return { ...link, active: prevLink.name === link.name };
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
args.onLinkClick?.(link.name);
|
|
82
|
+
}
|
|
83
|
+
}));
|
|
84
|
+
}, [links]);
|
|
85
|
+
const defaultCreateLinks = ['Vehicle Purchase'].map(name => ({
|
|
86
|
+
name,
|
|
87
|
+
onClick: () => {
|
|
88
|
+
createModal(CreateCaseModal, { caseType: name });
|
|
89
|
+
}
|
|
90
|
+
}));
|
|
91
|
+
const handleNotificationClick = (passedId) => {
|
|
92
|
+
setNotifications(cur => cur.map(({ id, unread, ...item }) => ({
|
|
93
|
+
id,
|
|
94
|
+
unread: passedId === id ? false : unread,
|
|
95
|
+
...item
|
|
96
|
+
})));
|
|
97
|
+
};
|
|
98
|
+
const handlePinToggle = (passedId) => {
|
|
99
|
+
setRecents(cur => cur.map(({ id, pinned, ...item }) => ({
|
|
100
|
+
id,
|
|
101
|
+
pinned: passedId === id ? !pinned : pinned,
|
|
102
|
+
...item
|
|
103
|
+
})));
|
|
104
|
+
};
|
|
105
|
+
const notificationViewItems = [
|
|
106
|
+
{
|
|
107
|
+
id: '234',
|
|
108
|
+
items: args.notificationsEmpty ? [] : notifications,
|
|
109
|
+
loading: args.notificationsLoading,
|
|
110
|
+
onItemClick: handleNotificationClick,
|
|
111
|
+
viewAll: {
|
|
112
|
+
href: '#'
|
|
113
|
+
},
|
|
114
|
+
emptyText: 'No notifications'
|
|
115
|
+
}
|
|
116
|
+
];
|
|
117
|
+
const recentViewItems = [
|
|
118
|
+
{
|
|
119
|
+
id: '456',
|
|
120
|
+
items: recents.filter(x => x.pinned),
|
|
121
|
+
loading: args.pinsLoading,
|
|
122
|
+
onItemPinToggle: handlePinToggle,
|
|
123
|
+
viewAll: {
|
|
124
|
+
href: '#'
|
|
125
|
+
},
|
|
126
|
+
displayPins: true,
|
|
127
|
+
headingText: 'Pinned items',
|
|
128
|
+
emptyText: 'No pinned items'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: '789',
|
|
132
|
+
items: args.recentsEmpty ? [] : recents,
|
|
133
|
+
loading: args.recentsLoading,
|
|
134
|
+
onItemPinToggle: handlePinToggle,
|
|
135
|
+
viewAll: {
|
|
136
|
+
href: '#'
|
|
137
|
+
},
|
|
138
|
+
displayPins: true,
|
|
139
|
+
headingText: 'Recently viewed',
|
|
140
|
+
emptyText: 'No recents'
|
|
141
|
+
}
|
|
142
|
+
];
|
|
143
|
+
const newNotificationCountTimerRef = useRef(NaN);
|
|
144
|
+
const defaultUtils = [
|
|
145
|
+
{
|
|
146
|
+
name: 'Notifications',
|
|
147
|
+
visual: <Icon name='bell-solid'/>,
|
|
148
|
+
count: args.notificationsEmpty ? 0 : numNewNotifications,
|
|
149
|
+
drawerView: <AppShellList listView={notificationViewItems}/>,
|
|
150
|
+
onDrawerOpen: () => {
|
|
151
|
+
clearInterval(newNotificationCountTimerRef.current);
|
|
152
|
+
setNumNewNotifications(0);
|
|
153
|
+
},
|
|
154
|
+
onDrawerClose: () => {
|
|
155
|
+
if (windowIsAvailable) {
|
|
156
|
+
newNotificationCountTimerRef.current = window.setInterval(() => {
|
|
157
|
+
setNumNewNotifications(cur => cur + 2);
|
|
158
|
+
}, 60000);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: 'Recents',
|
|
164
|
+
visual: <Icon name='clock-solid'/>,
|
|
165
|
+
drawerView: <AppShellList listView={recentViewItems}/>
|
|
166
|
+
}
|
|
167
|
+
];
|
|
168
|
+
return (<AppShell appInfo={args.appInfo || {
|
|
169
|
+
href: args.href || 'https://www.pega.com/',
|
|
170
|
+
imageSrc: args.imageSrc ||
|
|
171
|
+
'https://pbs.twimg.com/profile_images/1410341211978752004/pLYjGIa8_bigger.jpg',
|
|
172
|
+
fullImageSrc: args.fullImageSrc ||
|
|
173
|
+
'https://www.pega.com/themes/custom/pegawww_theme/images/pega-logo.svg',
|
|
174
|
+
appName: args.appName || 'Cosmos AppShell',
|
|
175
|
+
portalName: args.portalName || 'Demo'
|
|
176
|
+
}} searchInput={showSearch
|
|
177
|
+
? {
|
|
178
|
+
onSearchChange: (value) => {
|
|
179
|
+
setSearchVal(value);
|
|
180
|
+
},
|
|
181
|
+
value: searchVal
|
|
182
|
+
}
|
|
183
|
+
: undefined} appHeader={args.appHeader} caseTypes={args.createLinks || defaultCreateLinks} links={linksWithHandlers} main={args.main || defaultMainContent} cases={args.cases} banners={args.banners} operator={operatorData} utils={args.utils || defaultUtils} environment={args.environmentName
|
|
184
|
+
? {
|
|
185
|
+
name: args.environmentName,
|
|
186
|
+
color: args.environmentColor
|
|
187
|
+
}
|
|
188
|
+
: undefined}/>);
|
|
189
|
+
};
|
|
190
|
+
AppShellDemo.args = {
|
|
191
|
+
appName: 'Cosmos AppShell',
|
|
192
|
+
portalName: 'Demo',
|
|
193
|
+
href: 'https://www.pega.com/',
|
|
194
|
+
imageSrc: 'https://pbs.twimg.com/profile_images/1410341211978752004/pLYjGIa8_bigger.jpg',
|
|
195
|
+
fullImageSrc: 'https://www.pega.com/themes/custom/pegawww_theme/images/pega-logo.svg',
|
|
196
|
+
withSearch: true,
|
|
197
|
+
appHeader: true,
|
|
198
|
+
environmentName: 'dev',
|
|
199
|
+
environmentColor: '#FFDBDE',
|
|
200
|
+
notificationsEmpty: false,
|
|
201
|
+
notificationsLoading: false,
|
|
202
|
+
recentsEmpty: false,
|
|
203
|
+
recentsLoading: false,
|
|
204
|
+
pinsLoading: false
|
|
205
|
+
};
|
|
206
|
+
AppShellDemo.argTypes = {
|
|
207
|
+
appName: { control: { type: 'text' } },
|
|
208
|
+
portalName: { control: { type: 'text' } },
|
|
209
|
+
href: { control: { type: 'text' } },
|
|
210
|
+
imageSrc: { control: { type: 'text' } },
|
|
211
|
+
fullImageSrc: { control: { type: 'text' } },
|
|
212
|
+
withSearch: { control: { type: 'boolean' } },
|
|
213
|
+
appHeader: { control: { type: 'boolean' } },
|
|
214
|
+
environmentName: { control: { type: 'text' } },
|
|
215
|
+
environmentColor: { control: { type: 'color' } },
|
|
216
|
+
notificationsEmpty: { control: { type: 'boolean' } },
|
|
217
|
+
notificationsLoading: { control: { type: 'boolean' } },
|
|
218
|
+
recentsEmpty: { control: { type: 'boolean' } },
|
|
219
|
+
recentsLoading: { control: { type: 'boolean' } },
|
|
220
|
+
pinsLoading: { control: { type: 'boolean' } }
|
|
221
|
+
};
|
|
222
|
+
//# sourceMappingURL=AppShell.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppShell.stories.jsx","sourceRoot":"","sources":["../../../src/core/AppShell/AppShell.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,UAAU,EAAa,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAErF,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,MAAM,EACN,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,mBAAmB,EACnB,QAAQ,EACR,cAAc,EAEd,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,mEAAmE,CAAC;AACnG,OAAO,KAAK,cAAc,MAAM,oEAAoE,CAAC;AAErG,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,YAAY,EACb,MAAM,kBAAkB,CAAC;AAE1B,YAAY,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;AAE5C,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,QAAQ;IACnB,EAAE,EAAE,WAAW;IACf,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AA+BV,MAAM,CAAC,MAAM,YAAY,GAA8B,CAAC,IAAwB,EAAE,EAAE;IAClF,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,EAAwB,EAAE,EAAE;QAC7D,MAAM,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;QACzD,MAAM,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AC;AAEF,YAAY,CAAC,QAAQ,GAAG;IACtB,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACtC,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACzC,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACnC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvC,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC3C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC5C,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC3C,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC9C,gBAAgB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAChD,kBAAkB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACpD,oBAAoB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACtD,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC9C,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAChD,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC9C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { MouseEvent, useContext, FormEvent, useState, useMemo, useRef } from 'react';\n\nimport {\n AppShell,\n AppShellProps,\n AppShellList,\n DrawerItemProps,\n Button,\n DateInput,\n Grid,\n Icon,\n registerIcon,\n Input,\n Select,\n Option,\n Modal,\n ModalManagerContext,\n TextArea,\n ToasterContext,\n ForwardProps,\n useAfterInitialEffect,\n windowIsAvailable\n} from '@pega/cosmos-react-core';\nimport * as bellSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/bell-solid.icon';\nimport * as clockSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/clock-solid.icon';\n\nimport {\n defaultLinks,\n defaultMainContent,\n defaultNotifications,\n defaultRecents,\n operatorData\n} from './AppShell.mocks';\n\nregisterIcon(bellSolidIcon, clockSolidIcon);\n\nexport default {\n title: 'Core/App Shell',\n component: AppShell,\n id: 'App Shell',\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface AppShellStoryProps {\n /** Demo props */\n main?: AppShellProps['main'];\n appInfo?: AppShellProps['appInfo'];\n banners?: AppShellProps['banners'];\n cases?: AppShellProps['cases'];\n caseLinks?: AppShellProps['links'];\n createLinks?: any[];\n recentItems?: any[];\n utils?: AppShellProps['utils'];\n onLinkClick?: (name: string) => void;\n\n /** Storybook controls */\n appName?: AppShellProps['appInfo']['appName'];\n portalName?: AppShellProps['appInfo']['portalName'];\n href?: AppShellProps['appInfo']['href'];\n imageSrc?: AppShellProps['appInfo']['imageSrc'];\n fullImageSrc?: AppShellProps['appInfo']['fullImageSrc'];\n withSearch?: boolean;\n appHeader?: AppShellProps['appHeader'];\n environmentName?: string;\n environmentColor?: string;\n notificationsEmpty?: boolean;\n notificationsLoading?: boolean;\n recentsEmpty?: boolean;\n recentsLoading?: boolean;\n pinsLoading?: boolean;\n}\n\nexport const AppShellDemo: Story<AppShellStoryProps> = (args: AppShellStoryProps) => {\n const CreateCaseModal = ({ caseType }: { caseType: string }) => {\n const { ModalContext } = useContext(ModalManagerContext);\n const { dismiss } = useContext(ModalContext);\n const { push: pushToaster } = useContext(ToasterContext);\n\n return (\n <Modal\n as='form'\n heading={`New ${caseType}`}\n actions={\n <>\n <Button onClick={dismiss}>Cancel</Button>\n <Button\n variant='primary'\n type='submit'\n onClick={(e: FormEvent) => {\n e.preventDefault();\n dismiss();\n pushToaster({ content: `${caseType} requested` });\n }}\n >\n Request\n </Button>\n </>\n }\n >\n <Grid container={{ rowGap: 2 }}>\n <DateInput label='Date Requested' info={null} />\n <Select label='Department'>\n <Option value=''>Select…</Option>\n <Option value='Fire'>Fire</Option>\n <Option value='Facilities'>Facilities</Option>\n <Option value='Parks'>Parks</Option>\n <Option value='Sanitation'>Sanitation</Option>\n <Option value='Parking & Traffic'>Parking & Traffic</Option>\n <Option value='Police'>Police</Option>\n <Option value='Courts'>Courts</Option>\n <Option value='Healthcare'>Healthcare</Option>\n <Option value='Energy'>Energy</Option>\n <Option value='Justice department'>Justice department</Option>\n <Option value='Environmental'>Environmental</Option>\n </Select>\n <TextArea label='Purpose of Purchase' />\n <Select label='Desired Make'>\n <Option value=''>Select...</Option>\n <Option value='Ford'>Ford</Option>\n <Option value='Dodge'>Dodge</Option>\n <Option value='Toyota'>Toyota</Option>\n <Option value='Tesla'>Tesla</Option>\n </Select>\n <Input label='Desired Make' />\n <Input\n type='number'\n min='2016'\n max='2021'\n label='Year'\n info='Must be within last 5 years'\n />\n <Input\n type='number'\n min='0.01'\n step='0.01'\n max='50000'\n label='Estimated Cost'\n info='May not exceed $50,000.00'\n />\n </Grid>\n </Modal>\n );\n };\n\n const caseLinks = args.caseLinks || defaultLinks;\n const showSearch = args.withSearch !== undefined ? args.withSearch : true;\n\n const { create: createModal } = useContext(ModalManagerContext);\n const [links, setLinks] = useState<AppShellProps['links']>(caseLinks);\n const [notifications, setNotifications] =\n useState<(DrawerItemProps & ForwardProps)[]>(defaultNotifications);\n const [recents, setRecents] = useState<(DrawerItemProps & ForwardProps)[]>(\n args.recentItems || defaultRecents\n );\n const [numNewNotifications, setNumNewNotifications] = useState(\n notifications.filter(x => x.unread).length\n );\n const [searchVal, setSearchVal] = useState('');\n\n useAfterInitialEffect(() => {\n setLinks(caseLinks);\n }, [caseLinks]);\n\n const linksWithHandlers = useMemo<AppShellProps['links']>(() => {\n return (links || []).map(link => ({\n ...link,\n onClick(e: MouseEvent<HTMLAnchorElement>) {\n e.preventDefault();\n setLinks((prevLinks = []) => {\n return prevLinks.map(prevLink => {\n return { ...link, active: prevLink.name === link.name };\n });\n });\n args.onLinkClick?.(link.name);\n }\n }));\n }, [links]);\n\n const defaultCreateLinks = ['Vehicle Purchase'].map(name => ({\n name,\n onClick: () => {\n createModal(CreateCaseModal, { caseType: name });\n }\n }));\n\n const handleNotificationClick = (passedId: string) => {\n setNotifications(cur =>\n cur.map(({ id, unread, ...item }) => ({\n id,\n unread: passedId === id ? false : unread,\n ...item\n }))\n );\n };\n\n const handlePinToggle = (passedId: string) => {\n setRecents(cur =>\n cur.map(({ id, pinned, ...item }) => ({\n id,\n pinned: passedId === id ? !pinned : pinned,\n ...item\n }))\n );\n };\n\n const notificationViewItems = [\n {\n id: '234',\n items: args.notificationsEmpty ? [] : notifications,\n loading: args.notificationsLoading,\n onItemClick: handleNotificationClick,\n viewAll: {\n href: '#'\n },\n emptyText: 'No notifications'\n }\n ];\n\n const recentViewItems = [\n {\n id: '456',\n items: recents.filter(x => x.pinned),\n loading: args.pinsLoading,\n onItemPinToggle: handlePinToggle,\n viewAll: {\n href: '#'\n },\n displayPins: true,\n headingText: 'Pinned items',\n emptyText: 'No pinned items'\n },\n {\n id: '789',\n items: args.recentsEmpty ? [] : recents,\n loading: args.recentsLoading,\n onItemPinToggle: handlePinToggle,\n viewAll: {\n href: '#'\n },\n displayPins: true,\n headingText: 'Recently viewed',\n emptyText: 'No recents'\n }\n ];\n\n const newNotificationCountTimerRef = useRef(NaN);\n\n const defaultUtils = [\n {\n name: 'Notifications',\n visual: <Icon name='bell-solid' />,\n count: args.notificationsEmpty ? 0 : numNewNotifications,\n drawerView: <AppShellList listView={notificationViewItems} />,\n onDrawerOpen: () => {\n clearInterval(newNotificationCountTimerRef.current);\n setNumNewNotifications(0);\n },\n onDrawerClose: () => {\n if (windowIsAvailable) {\n // Mock new notifications arriving on a minute interval after the drawer closes.\n // Let's face it, you're popular.\n newNotificationCountTimerRef.current = window.setInterval(() => {\n setNumNewNotifications(cur => cur + 2);\n }, 60000);\n }\n }\n },\n {\n name: 'Recents',\n visual: <Icon name='clock-solid' />,\n drawerView: <AppShellList listView={recentViewItems} />\n }\n ];\n\n return (\n <AppShell\n appInfo={\n args.appInfo || {\n href: args.href || 'https://www.pega.com/',\n imageSrc:\n args.imageSrc ||\n 'https://pbs.twimg.com/profile_images/1410341211978752004/pLYjGIa8_bigger.jpg',\n fullImageSrc:\n args.fullImageSrc ||\n 'https://www.pega.com/themes/custom/pegawww_theme/images/pega-logo.svg',\n appName: args.appName || 'Cosmos AppShell',\n portalName: args.portalName || 'Demo'\n }\n }\n searchInput={\n showSearch\n ? {\n onSearchChange: (value: string) => {\n setSearchVal(value);\n },\n value: searchVal\n }\n : undefined\n }\n appHeader={args.appHeader}\n caseTypes={args.createLinks || defaultCreateLinks}\n links={linksWithHandlers}\n main={args.main || defaultMainContent}\n cases={args.cases}\n banners={args.banners}\n operator={operatorData}\n utils={args.utils || defaultUtils}\n environment={\n args.environmentName\n ? {\n name: args.environmentName,\n color: args.environmentColor\n }\n : undefined\n }\n />\n );\n};\n\nAppShellDemo.args = {\n appName: 'Cosmos AppShell',\n portalName: 'Demo',\n href: 'https://www.pega.com/',\n imageSrc: 'https://pbs.twimg.com/profile_images/1410341211978752004/pLYjGIa8_bigger.jpg',\n fullImageSrc: 'https://www.pega.com/themes/custom/pegawww_theme/images/pega-logo.svg',\n withSearch: true,\n appHeader: true,\n environmentName: 'dev',\n environmentColor: '#FFDBDE',\n notificationsEmpty: false,\n notificationsLoading: false,\n recentsEmpty: false,\n recentsLoading: false,\n pinsLoading: false\n};\n\nAppShellDemo.argTypes = {\n appName: { control: { type: 'text' } },\n portalName: { control: { type: 'text' } },\n href: { control: { type: 'text' } },\n imageSrc: { control: { type: 'text' } },\n fullImageSrc: { control: { type: 'text' } },\n withSearch: { control: { type: 'boolean' } },\n appHeader: { control: { type: 'boolean' } },\n environmentName: { control: { type: 'text' } },\n environmentColor: { control: { type: 'color' } },\n notificationsEmpty: { control: { type: 'boolean' } },\n notificationsLoading: { control: { type: 'boolean' } },\n recentsEmpty: { control: { type: 'boolean' } },\n recentsLoading: { control: { type: 'boolean' } },\n pinsLoading: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppShell.styles.d.ts","sourceRoot":"","sources":["../../../src/core/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,yGAE7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppShell.styles.js","sourceRoot":"","sources":["../../../src/core/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;;CAE1C,CAAC","sourcesContent":["import styled from 'styled-components';\n\nexport const StyledMainContent = styled.div`\n min-height: inherit;\n`;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { AvatarProps } from '@pega/cosmos-react-core';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const DefaultAvatar: Story<AvatarProps>;
|
|
6
|
+
export declare const TextOnlyAvatar: Story<AvatarProps>;
|
|
7
|
+
export declare const TransparentAvatar: Story<AvatarProps>;
|
|
8
|
+
export declare const IconAvatar: Story<AvatarProps>;
|
|
9
|
+
export declare const StatusAvatar: Story<AvatarProps>;
|
|
10
|
+
//# sourceMappingURL=Avatar.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Avatar/Avatar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAU,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAE9D,wBAaU;AAEV,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,WAAW,CAE5C,CAAC;AAWF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,WAAW,CAE7C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,WAAW,CAShD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,WAAW,CAEzC,CAAC;AAUF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,WAAW,CAE3C,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Avatar } from '@pega/cosmos-react-core';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Core/Avatar',
|
|
4
|
+
component: Avatar,
|
|
5
|
+
args: {
|
|
6
|
+
shape: 'circle',
|
|
7
|
+
size: 'm',
|
|
8
|
+
name: 'John Doe'
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
shape: { options: ['circle', 'squircle'], control: { type: 'select' } },
|
|
12
|
+
size: { options: ['s', 'm', 'l'], control: { type: 'select' } },
|
|
13
|
+
name: { control: { type: 'text' } }
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export const DefaultAvatar = (args) => {
|
|
17
|
+
return <Avatar shape={args.shape} size={args.size} name={args.name} imageSrc={args.imageSrc}/>;
|
|
18
|
+
};
|
|
19
|
+
DefaultAvatar.args = {
|
|
20
|
+
name: 'Pegasystems',
|
|
21
|
+
imageSrc: 'https://www.pega.com/sites/default/files/media/images/2018-12/Pega.com-og.png'
|
|
22
|
+
};
|
|
23
|
+
DefaultAvatar.argTypes = {
|
|
24
|
+
imageSrc: { control: { type: 'text' } }
|
|
25
|
+
};
|
|
26
|
+
export const TextOnlyAvatar = (args) => {
|
|
27
|
+
return <Avatar shape={args.shape} size={args.size} name={args.name}/>;
|
|
28
|
+
};
|
|
29
|
+
export const TransparentAvatar = (args) => {
|
|
30
|
+
return (<Avatar shape={args.shape} size={args.size} name={args.name} imageSrc='https://socialistmodernism.com/wp-content/uploads/2017/07/placeholder-image.png'/>);
|
|
31
|
+
};
|
|
32
|
+
export const IconAvatar = (args) => {
|
|
33
|
+
return <Avatar shape={args.shape} size={args.size} name={args.name} icon={args.icon}/>;
|
|
34
|
+
};
|
|
35
|
+
IconAvatar.args = {
|
|
36
|
+
icon: 'headset'
|
|
37
|
+
};
|
|
38
|
+
IconAvatar.argTypes = {
|
|
39
|
+
icon: { control: { type: 'text' } }
|
|
40
|
+
};
|
|
41
|
+
export const StatusAvatar = (args) => {
|
|
42
|
+
return <Avatar shape={args.shape} size={args.size} name={args.name} status={args.status}/>;
|
|
43
|
+
};
|
|
44
|
+
StatusAvatar.args = {
|
|
45
|
+
status: 'active'
|
|
46
|
+
};
|
|
47
|
+
StatusAvatar.argTypes = {
|
|
48
|
+
status: { options: ['active', undefined], control: { type: 'select' } }
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=Avatar.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.stories.jsx","sourceRoot":"","sources":["../../../src/core/Avatar/Avatar.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAE9D,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,GAAG;QACT,IAAI,EAAE,UAAU;KACjB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QACvE,IAAI,EAAE,EAAE,O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,CAAC,iFAAiF,EAC1F,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAuB,CAAC,IAAiB,EAAE,EAAE;IAClE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAG,CAAC;AAC1F,CAAC,CAAC;AAEF,UAAU,CAAC,IAAI,GAAG;IAChB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,UAAU,CAAC,QAAQ,GAAG;IACpB,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAuB,CAAC,IAAiB,EAAE,EAAE;IACpE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAG,CAAC;AAC9F,CAAC,CAAC;AAEF,YAAY,CAAC,IAAI,GAAG;IAClB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,YAAY,CAAC,QAAQ,GAAG;IACtB,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CACxE,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Avatar, AvatarProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Avatar',\n component: Avatar,\n args: {\n shape: 'circle',\n size: 'm',\n name: 'John Doe'\n },\n argTypes: {\n shape: { options: ['circle', 'squircle'], control: { type: 'select' } },\n size: { options: ['s', 'm', 'l'], control: { type: 'select' } },\n name: { control: { type: 'text' } }\n }\n} as Meta;\n\nexport const DefaultAvatar: Story<AvatarProps> = (args: AvatarProps) => {\n return <Avatar shape={args.shape} size={args.size} name={args.name} imageSrc={args.imageSrc} />;\n};\n\nDefaultAvatar.args = {\n name: 'Pegasystems',\n imageSrc: 'https://www.pega.com/sites/default/files/media/images/2018-12/Pega.com-og.png'\n};\n\nDefaultAvatar.argTypes = {\n imageSrc: { control: { type: 'text' } }\n};\n\nexport const TextOnlyAvatar: Story<AvatarProps> = (args: AvatarProps) => {\n return <Avatar shape={args.shape} size={args.size} name={args.name} />;\n};\n\nexport const TransparentAvatar: Story<AvatarProps> = (args: AvatarProps) => {\n return (\n <Avatar\n shape={args.shape}\n size={args.size}\n name={args.name}\n imageSrc='https://socialistmodernism.com/wp-content/uploads/2017/07/placeholder-image.png'\n />\n );\n};\n\nexport const IconAvatar: Story<AvatarProps> = (args: AvatarProps) => {\n return <Avatar shape={args.shape} size={args.size} name={args.name} icon={args.icon} />;\n};\n\nIconAvatar.args = {\n icon: 'headset'\n};\n\nIconAvatar.argTypes = {\n icon: { control: { type: 'text' } }\n};\n\nexport const StatusAvatar: Story<AvatarProps> = (args: AvatarProps) => {\n return <Avatar shape={args.shape} size={args.size} name={args.name} status={args.status} />;\n};\n\nStatusAvatar.args = {\n status: 'active'\n};\n\nStatusAvatar.argTypes = {\n status: { options: ['active', undefined], control: { type: 'select' } }\n};\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { BackdropProps } from '@pega/cosmos-react-core';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const BackdropDemo: Story<BackdropProps>;
|
|
6
|
+
export declare const DismissibleBackdropDemo: Story<BackdropProps>;
|
|
7
|
+
//# sourceMappingURL=Backdrop.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Backdrop.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Backdrop/Backdrop.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAY,aAAa,EAAmC,MAAM,yBAAyB,CAAC;;AAEnG,wBAaU;AAEV,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,aAAa,CAqB7C,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,aAAa,CAwBxD,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Backdrop, Button, Card, CardContent, Text } from '@pega/cosmos-react-core';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Core/Backdrop',
|
|
5
|
+
component: Backdrop,
|
|
6
|
+
args: {
|
|
7
|
+
alpha: 0.4,
|
|
8
|
+
variant: 'dark',
|
|
9
|
+
transitionSpeed: 'medium'
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
alpha: { control: { type: 'number' } },
|
|
13
|
+
variant: { options: ['dark', 'light'], control: { type: 'select' } },
|
|
14
|
+
transitionSpeed: { options: ['slow', 'medium', 'fast', 'none'], control: { type: 'select' } }
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
export const BackdropDemo = (args) => {
|
|
18
|
+
const [open, setOpen] = useState(false);
|
|
19
|
+
return (<>
|
|
20
|
+
<Button onClick={() => setOpen(true)}>Open Backdrop</Button>
|
|
21
|
+
|
|
22
|
+
{open && (<Backdrop open={open} alpha={args.alpha} variant={args.variant} transitionSpeed={args.transitionSpeed}>
|
|
23
|
+
<Button variant='primary' onClick={() => setOpen(false)}>
|
|
24
|
+
Close Backdrop
|
|
25
|
+
</Button>
|
|
26
|
+
</Backdrop>)}
|
|
27
|
+
</>);
|
|
28
|
+
};
|
|
29
|
+
export const DismissibleBackdropDemo = (args) => {
|
|
30
|
+
const [open, setOpen] = useState(false);
|
|
31
|
+
return (<>
|
|
32
|
+
<Button onClick={() => setOpen(true)}>Open Backdrop</Button>
|
|
33
|
+
|
|
34
|
+
{open && (<Backdrop onClick={() => setOpen(false)} open={open} alpha={args.alpha} variant={args.variant} transitionSpeed={args.transitionSpeed}>
|
|
35
|
+
<Card>
|
|
36
|
+
<CardContent>
|
|
37
|
+
<Text>This Backdrop can be dismissed by clicking anywhere in the viewport.</Text>
|
|
38
|
+
</CardContent>
|
|
39
|
+
</Card>
|
|
40
|
+
</Backdrop>)}
|
|
41
|
+
</>);
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=Backdrop.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Backdrop.stories.jsx","sourceRoot":"","sources":["../../../src/core/Backdrop/Backdrop.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAiB,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEnG,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,OAAO,EAAE,MAAM;QACf,eAAe,EAAE,QAAQ;KAC1B;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QACtC,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QACpE,eAAe,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE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AAI,CAAC,CACX,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CACtB,eAAe,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAEtC;UAAA,CAAC,IAAI,CACH;YAAA,CAAC,WAAW,CACV;cAAA,CAAC,IAAI,CAAC,oEAAoE,EAAE,IAAI,CAClF;YAAA,EAAE,WAAW,CACf;UAAA,EAAE,IAAI,CACR;QAAA,EAAE,QAAQ,CAAC,CACZ,CACH;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Backdrop, BackdropProps, Button, Card, CardContent, Text } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Backdrop',\n component: Backdrop,\n args: {\n alpha: 0.4,\n variant: 'dark',\n transitionSpeed: 'medium'\n },\n argTypes: {\n alpha: { control: { type: 'number' } },\n variant: { options: ['dark', 'light'], control: { type: 'select' } },\n transitionSpeed: { options: ['slow', 'medium', 'fast', 'none'], control: { type: 'select' } }\n }\n} as Meta;\n\nexport const BackdropDemo: Story<BackdropProps> = (args: BackdropProps) => {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n <Button onClick={() => setOpen(true)}>Open Backdrop</Button>\n\n {open && (\n <Backdrop\n open={open}\n alpha={args.alpha}\n variant={args.variant}\n transitionSpeed={args.transitionSpeed}\n >\n <Button variant='primary' onClick={() => setOpen(false)}>\n Close Backdrop\n </Button>\n </Backdrop>\n )}\n </>\n );\n};\n\nexport const DismissibleBackdropDemo: Story<BackdropProps> = (args: BackdropProps) => {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n <Button onClick={() => setOpen(true)}>Open Backdrop</Button>\n\n {open && (\n <Backdrop\n onClick={() => setOpen(false)}\n open={open}\n alpha={args.alpha}\n variant={args.variant}\n transitionSpeed={args.transitionSpeed}\n >\n <Card>\n <CardContent>\n <Text>This Backdrop can be dismissed by clicking anywhere in the viewport.</Text>\n </CardContent>\n </Card>\n </Backdrop>\n )}\n </>\n );\n};\n"]}
|