@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,42 @@
|
|
|
1
|
+
import { Select, Option } from '@pega/cosmos-react-core';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Core/Select',
|
|
4
|
+
component: Select
|
|
5
|
+
};
|
|
6
|
+
export const SelectDemo = (args) => {
|
|
7
|
+
return (<Select id='select-demo' label={args.label} labelHidden={args.labelHidden} info={args.info} status={args.status} required={args.required} disabled={args.disabled} readOnly={args.readOnly} actions={args.showAction
|
|
8
|
+
? [
|
|
9
|
+
{
|
|
10
|
+
id: 'config',
|
|
11
|
+
text: 'Configure',
|
|
12
|
+
icon: 'gear'
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
: undefined}>
|
|
16
|
+
<Option>Choose an option…</Option>
|
|
17
|
+
<Option>Option 1</Option>
|
|
18
|
+
<Option>Option 2</Option>
|
|
19
|
+
<Option>Option 3</Option>
|
|
20
|
+
</Select>);
|
|
21
|
+
};
|
|
22
|
+
SelectDemo.args = {
|
|
23
|
+
showAction: false,
|
|
24
|
+
label: 'Select input',
|
|
25
|
+
labelHidden: false,
|
|
26
|
+
info: 'Choose a value',
|
|
27
|
+
status: undefined,
|
|
28
|
+
required: false,
|
|
29
|
+
disabled: false,
|
|
30
|
+
readOnly: false
|
|
31
|
+
};
|
|
32
|
+
SelectDemo.argTypes = {
|
|
33
|
+
showAction: { control: { type: 'boolean' } },
|
|
34
|
+
label: { control: { type: 'text' } },
|
|
35
|
+
labelHidden: { control: { type: 'boolean' } },
|
|
36
|
+
info: { control: { type: 'text' } },
|
|
37
|
+
status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },
|
|
38
|
+
required: { control: { type: 'boolean' } },
|
|
39
|
+
disabled: { control: { type: 'boolean' } },
|
|
40
|
+
readOnly: { control: { type: 'boolean' } }
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=Select.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.stories.jsx","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtE,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AAMV,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,IAAsB,EAAE,EAAE;IAC5E,OAAO,CACL,CAAC,MAAM,CACL,EAAE,CAAC,aAAa,CAChB,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,WAAW,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAC9B,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAChB,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CACpB,QAAQ,CAAC,CAAC,I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AE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC5F,QAAQ,EAAE,EAAE,OAAO,EAAE,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","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Select, SelectProps, Option } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Select',\n component: Select\n} as Meta;\n\ninterface SelectStoryProps extends SelectProps {\n showAction: boolean;\n}\n\nexport const SelectDemo: Story<SelectStoryProps> = (args: SelectStoryProps) => {\n return (\n <Select\n id='select-demo'\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n actions={\n args.showAction\n ? [\n {\n id: 'config',\n text: 'Configure',\n icon: 'gear'\n }\n ]\n : undefined\n }\n >\n <Option>Choose an option…</Option>\n <Option>Option 1</Option>\n <Option>Option 2</Option>\n <Option>Option 3</Option>\n </Select>\n );\n};\n\nSelectDemo.args = {\n showAction: false,\n label: 'Select input',\n labelHidden: false,\n info: 'Choose a value',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nSelectDemo.argTypes = {\n showAction: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { SentimentProps } from '@pega/cosmos-react-core';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
interface SentimentStoryProps extends SentimentProps {
|
|
6
|
+
positiveLabel: string;
|
|
7
|
+
neutralLabel: string;
|
|
8
|
+
negativeLabel: string;
|
|
9
|
+
positiveIcon: string;
|
|
10
|
+
neutralIcon: string;
|
|
11
|
+
negativeIcon: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const SentimentDemo: Story<SentimentStoryProps>;
|
|
14
|
+
//# sourceMappingURL=Sentiment.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sentiment.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAa,cAAc,EAAE,MAAM,yBAAyB,CAAC;;AAEpE,wBAGU;AAEV,UAAU,mBAAoB,SAAQ,cAAc;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,mBAAmB,CAqBpD,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Sentiment } from '@pega/cosmos-react-core';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Core/Sentiment',
|
|
4
|
+
component: Sentiment
|
|
5
|
+
};
|
|
6
|
+
export const SentimentDemo = (args) => {
|
|
7
|
+
const icons = {
|
|
8
|
+
positive: args.positiveIcon,
|
|
9
|
+
neutral: args.neutralIcon,
|
|
10
|
+
negative: args.negativeIcon
|
|
11
|
+
};
|
|
12
|
+
const labels = {
|
|
13
|
+
positive: args.positiveLabel,
|
|
14
|
+
neutral: args.neutralLabel,
|
|
15
|
+
negative: args.negativeLabel
|
|
16
|
+
};
|
|
17
|
+
return (<Sentiment variant={args.variant} labelHidden={args.labelHidden} icons={icons} labels={labels}/>);
|
|
18
|
+
};
|
|
19
|
+
SentimentDemo.args = {
|
|
20
|
+
variant: 'positive',
|
|
21
|
+
labelHidden: false,
|
|
22
|
+
positiveLabel: 'Yay!',
|
|
23
|
+
positiveIcon: 'face-happy-solid',
|
|
24
|
+
neutralLabel: 'Hm…',
|
|
25
|
+
neutralIcon: 'face-blank-solid',
|
|
26
|
+
negativeLabel: 'Uh-oh!',
|
|
27
|
+
negativeIcon: 'face-sad-solid'
|
|
28
|
+
};
|
|
29
|
+
SentimentDemo.argTypes = {
|
|
30
|
+
variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },
|
|
31
|
+
labelHidden: { control: { type: 'boolean' } },
|
|
32
|
+
positiveLabel: { control: { type: 'text' } },
|
|
33
|
+
positiveIcon: { control: { type: 'text' } },
|
|
34
|
+
neutralLabel: { control: { type: 'text' } },
|
|
35
|
+
neutralIcon: { control: { type: 'text' } },
|
|
36
|
+
negativeLabel: { control: { type: 'text' } },
|
|
37
|
+
negativeIcon: { control: { type: 'text' } }
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=Sentiment.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sentiment.stories.jsx","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAkB,MAAM,yBAAyB,CAAC;AAEpE,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,SAAS;CACb,CAAC;AAWV,MAAM,CAAC,MAAM,aAAa,GAA+B,CAAC,IAAyB,EAAE,EAAE;IACrF,MAAM,KAAK,GAAG;QACZ,QAAQ,EAAE,IAAI,CAAC,YAAY;QAC3B,OAAO,EAAE,IAAI,CAAC,WAAW;QACzB,QAAQ,EAAE,IAAI,C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E,MAAM,EAAE,EAAE;IAC5C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Sentiment, SentimentProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Sentiment',\n component: Sentiment\n} as Meta;\n\ninterface SentimentStoryProps extends SentimentProps {\n positiveLabel: string;\n neutralLabel: string;\n negativeLabel: string;\n positiveIcon: string;\n neutralIcon: string;\n negativeIcon: string;\n}\n\nexport const SentimentDemo: Story<SentimentStoryProps> = (args: SentimentStoryProps) => {\n const icons = {\n positive: args.positiveIcon,\n neutral: args.neutralIcon,\n negative: args.negativeIcon\n };\n\n const labels = {\n positive: args.positiveLabel,\n neutral: args.neutralLabel,\n negative: args.negativeLabel\n };\n\n return (\n <Sentiment\n variant={args.variant}\n labelHidden={args.labelHidden}\n icons={icons}\n labels={labels}\n />\n );\n};\n\nSentimentDemo.args = {\n variant: 'positive',\n labelHidden: false,\n positiveLabel: 'Yay!',\n positiveIcon: 'face-happy-solid',\n neutralLabel: 'Hm…',\n neutralIcon: 'face-blank-solid',\n negativeLabel: 'Uh-oh!',\n negativeIcon: 'face-sad-solid'\n};\n\nSentimentDemo.argTypes = {\n variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },\n labelHidden: { control: { type: 'boolean' } },\n positiveLabel: { control: { type: 'text' } },\n positiveIcon: { control: { type: 'text' } },\n neutralLabel: { control: { type: 'text' } },\n neutralIcon: { control: { type: 'text' } },\n negativeLabel: { control: { type: 'text' } },\n negativeIcon: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { SliderProps } from '@pega/cosmos-react-core';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
interface SliderStoryProps extends SliderProps {
|
|
6
|
+
min: number;
|
|
7
|
+
max: number;
|
|
8
|
+
step: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const SliderDemo: Story<SliderStoryProps>;
|
|
11
|
+
//# sourceMappingURL=Slider.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Slider.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Slider/Slider.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAU,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAE9D,wBAGU;AAGV,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,gBAAgB,CAoC9C,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Slider } from '@pega/cosmos-react-core';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Core/Slider',
|
|
5
|
+
component: Slider
|
|
6
|
+
};
|
|
7
|
+
export const SliderDemo = (args) => {
|
|
8
|
+
const [value, setValue] = useState(args.value);
|
|
9
|
+
let ticksObject = args.ticks;
|
|
10
|
+
if (args.max > args.min && !ticksObject) {
|
|
11
|
+
ticksObject = {};
|
|
12
|
+
const numTicks = Math.floor((args.max - args.min) / (args.step || 1)) + 1;
|
|
13
|
+
Array(numTicks)
|
|
14
|
+
.fill(0)
|
|
15
|
+
.map((_, index) => args.min + index * args.step)
|
|
16
|
+
.forEach(tick => {
|
|
17
|
+
ticksObject[tick] = tick.toString();
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return (<Slider orientation={args.orientation} step={args.step} min={args.min} max={args.max} ticks={ticksObject} showProgress={args.showProgress} preview={args.preview} showInput={args.showInput} label={args.label} labelHidden={args.labelHidden} info={args.info} status={args.status} required={args.required} disabled={args.disabled} readOnly={args.readOnly} value={value} onChange={(changeValue) => setValue(changeValue)}/>);
|
|
21
|
+
};
|
|
22
|
+
SliderDemo.args = {
|
|
23
|
+
orientation: 'vertical',
|
|
24
|
+
step: 1,
|
|
25
|
+
min: 0,
|
|
26
|
+
max: 10,
|
|
27
|
+
value: 5,
|
|
28
|
+
ticks: undefined,
|
|
29
|
+
showProgress: true,
|
|
30
|
+
preview: false,
|
|
31
|
+
showInput: true,
|
|
32
|
+
label: 'Slider input',
|
|
33
|
+
labelHidden: false,
|
|
34
|
+
info: 'Pick a value',
|
|
35
|
+
status: undefined,
|
|
36
|
+
required: false,
|
|
37
|
+
disabled: false,
|
|
38
|
+
readOnly: false
|
|
39
|
+
};
|
|
40
|
+
SliderDemo.argTypes = {
|
|
41
|
+
orientation: { options: ['vertical', 'horizontal'], control: { type: 'inline-radio' } },
|
|
42
|
+
step: { control: { type: 'number' } },
|
|
43
|
+
min: { control: { type: 'number' } },
|
|
44
|
+
max: { control: { type: 'number' } },
|
|
45
|
+
value: { control: { type: 'number' } },
|
|
46
|
+
ticks: { control: { type: 'object' } },
|
|
47
|
+
showProgress: { control: { type: 'boolean' } },
|
|
48
|
+
preview: { control: { type: 'boolean' } },
|
|
49
|
+
showInput: { control: { type: 'boolean' } },
|
|
50
|
+
label: { control: { type: 'text' } },
|
|
51
|
+
labelHidden: { control: { type: 'boolean' } },
|
|
52
|
+
info: { control: { type: 'text' } },
|
|
53
|
+
status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },
|
|
54
|
+
required: { control: { type: 'boolean' } },
|
|
55
|
+
disabled: { control: { type: 'boolean' } },
|
|
56
|
+
readOnly: { control: { type: 'boolean' } }
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=Slider.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Slider.stories.jsx","sourceRoot":"","sources":["../../../src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@storybook/react';\nimport { useState } from 'react';\n\nimport { Slider, SliderProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Slider',\n component: Slider\n} as Meta;\n\n// Necessary to prevent linting undefined errors since these will never be undefined in the demo\ninterface SliderStoryProps extends SliderProps {\n min: number;\n max: number;\n step: number;\n}\n\nexport const SliderDemo: Story<SliderStoryProps> = (args: SliderStoryProps) => {\n const [value, setValue] = useState(args.value);\n let ticksObject: SliderProps['ticks'] = args.ticks;\n\n if (args.max > args.min && !ticksObject) {\n ticksObject = {};\n const numTicks = Math.floor((args.max - args.min) / (args.step || 1)) + 1;\n Array(numTicks)\n .fill(0)\n .map((_, index) => args.min + index * args.step)\n .forEach(tick => {\n ticksObject![tick] = tick.toString();\n });\n }\n\n return (\n <Slider\n orientation={args.orientation}\n step={args.step}\n min={args.min}\n max={args.max}\n ticks={ticksObject}\n showProgress={args.showProgress}\n preview={args.preview}\n showInput={args.showInput}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n value={value}\n onChange={(changeValue: number) => setValue(changeValue)}\n />\n );\n};\n\nSliderDemo.args = {\n orientation: 'vertical',\n step: 1,\n min: 0,\n max: 10,\n value: 5,\n ticks: undefined,\n showProgress: true,\n preview: false,\n showInput: true,\n label: 'Slider input',\n labelHidden: false,\n info: 'Pick a value',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nSliderDemo.argTypes = {\n orientation: { options: ['vertical', 'horizontal'], control: { type: 'inline-radio' } },\n step: { control: { type: 'number' } },\n min: { control: { type: 'number' } },\n max: { control: { type: 'number' } },\n value: { control: { type: 'number' } },\n ticks: { control: { type: 'object' } },\n showProgress: { control: { type: 'boolean' } },\n preview: { control: { type: 'boolean' } },\n showInput: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { SummaryItemProps } from '@pega/cosmos-react-core';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
interface SummaryItemStoryProps extends SummaryItemProps {
|
|
6
|
+
showSecondary: boolean;
|
|
7
|
+
showVisual: boolean;
|
|
8
|
+
showActions: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const SummaryItemDemo: Story<SummaryItemStoryProps>;
|
|
11
|
+
//# sourceMappingURL=SummaryItem.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SummaryItem.stories.d.ts","sourceRoot":"","sources":["../../../src/core/SummaryItem/SummaryItem.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAOL,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;;AAEjC,wBAMU;AAEV,UAAU,qBAAsB,SAAQ,gBAAgB;IACtD,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,qBAAqB,CA+CxD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Avatar, Link, MenuButton, MetaList, Status, SummaryItem } from '@pega/cosmos-react-core';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Core/SummaryItem',
|
|
4
|
+
component: SummaryItem,
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'centered'
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
export const SummaryItemDemo = (args) => {
|
|
10
|
+
return (<SummaryItem primary='This is the primary info' secondary={args.showSecondary ? (<MetaList items={[
|
|
11
|
+
'email@example.com',
|
|
12
|
+
<Status variant='success'>Verified</Status>,
|
|
13
|
+
<>
|
|
14
|
+
Go to{' '}
|
|
15
|
+
<Link href='https://www.pega.com' target='_blank'>
|
|
16
|
+
Pega.com
|
|
17
|
+
</Link>
|
|
18
|
+
</>
|
|
19
|
+
]}/>) : undefined} visual={args.showVisual ? (<Avatar size='l' name='Random Man' imageSrc='https://randomuser.me/api/portraits/men/41.jpg'/>) : undefined} actions={args.showActions ? (<MenuButton text='Options' variant='simple' icon='more' iconOnly menu={{
|
|
20
|
+
items: ['Option Number 1', 'Option Number 2', 'Option Number 3'].map(name => ({
|
|
21
|
+
id: name,
|
|
22
|
+
primary: name
|
|
23
|
+
}))
|
|
24
|
+
}}/>) : undefined}/>);
|
|
25
|
+
};
|
|
26
|
+
SummaryItemDemo.args = {
|
|
27
|
+
showSecondary: true,
|
|
28
|
+
showVisual: true,
|
|
29
|
+
showActions: true
|
|
30
|
+
};
|
|
31
|
+
SummaryItemDemo.argTypes = {
|
|
32
|
+
showSecondary: { control: { type: 'boolean' } },
|
|
33
|
+
showVisual: { control: { type: 'boolean' } },
|
|
34
|
+
showActions: { control: { type: 'boolean' } }
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=SummaryItem.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SummaryItem.stories.jsx","sourceRoot":"","sources":["../../../src/core/SummaryItem/SummaryItem.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EACN,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,MAAM,EACN,WAAW,EAEZ,MAAM,yBAAyB,CAAC;AAEjC,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACM,CAAC;AAQV,MAAM,CAAC,MAAM,e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,CAAC;AAEF,eAAe,CAAC,QAAQ,GAAG;IACzB,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC/C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC5C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC9C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport {\n Avatar,\n Link,\n MenuButton,\n MetaList,\n Status,\n SummaryItem,\n SummaryItemProps\n} from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/SummaryItem',\n component: SummaryItem,\n parameters: {\n layout: 'centered'\n }\n} as Meta;\n\ninterface SummaryItemStoryProps extends SummaryItemProps {\n showSecondary: boolean;\n showVisual: boolean;\n showActions: boolean;\n}\n\nexport const SummaryItemDemo: Story<SummaryItemStoryProps> = (args: SummaryItemStoryProps) => {\n return (\n <SummaryItem\n primary='This is the primary info'\n secondary={\n args.showSecondary ? (\n <MetaList\n items={[\n 'email@example.com',\n <Status variant='success'>Verified</Status>,\n <>\n Go to{' '}\n <Link href='https://www.pega.com' target='_blank'>\n Pega.com\n </Link>\n </>\n ]}\n />\n ) : undefined\n }\n visual={\n args.showVisual ? (\n <Avatar\n size='l'\n name='Random Man'\n imageSrc='https://randomuser.me/api/portraits/men/41.jpg'\n />\n ) : undefined\n }\n actions={\n args.showActions ? (\n <MenuButton\n text='Options'\n variant='simple'\n icon='more'\n iconOnly\n menu={{\n items: ['Option Number 1', 'Option Number 2', 'Option Number 3'].map(name => ({\n id: name,\n primary: name\n }))\n }}\n />\n ) : undefined\n }\n />\n );\n};\n\nSummaryItemDemo.args = {\n showSecondary: true,\n showVisual: true,\n showActions: true\n};\n\nSummaryItemDemo.argTypes = {\n showSecondary: { control: { type: 'boolean' } },\n showVisual: { control: { type: 'boolean' } },\n showActions: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
|
+
export interface MockListItem {
|
|
3
|
+
id: string;
|
|
4
|
+
primary: string;
|
|
5
|
+
secondary: ReactNode;
|
|
6
|
+
visual: ReactNode;
|
|
7
|
+
data?: {
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface MockUserAPIResponse {
|
|
13
|
+
results: MockUser[];
|
|
14
|
+
}
|
|
15
|
+
export interface MockUser {
|
|
16
|
+
name: {
|
|
17
|
+
title: string;
|
|
18
|
+
first: string;
|
|
19
|
+
last: string;
|
|
20
|
+
};
|
|
21
|
+
email: string;
|
|
22
|
+
picture: {
|
|
23
|
+
large: string;
|
|
24
|
+
medium: string;
|
|
25
|
+
thumbnail: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export declare const getMockUsers: (limit?: number, fields?: string[]) => Promise<MockUserAPIResponse>;
|
|
29
|
+
export declare const useMockListData: (cb: () => void, { count }?: {
|
|
30
|
+
count?: number | undefined;
|
|
31
|
+
}) => [MockListItem[], Dispatch<SetStateAction<MockListItem[]>>];
|
|
32
|
+
//# sourceMappingURL=SummaryList.mocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SummaryList.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/SummaryList/SummaryList.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AAIjF,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE;QACL,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,QAAQ,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,eAAO,MAAM,YAAY,WAChB,MAAM,WACL,MAAM,EAAE,KACf,QAAQ,mBAAmB,CAI7B,CAAC;AA+BF,eAAO,MAAM,eAAe,OACtB,MAAM,IAAI;;MAEb,CAAC,YAAY,EAAE,EAAE,SAAS,eAAe,YAAY,EAAE,CAAC,CAAC,CAa3D,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { Avatar, EmailDisplay, useAfterInitialEffect } from '@pega/cosmos-react-core';
|
|
3
|
+
export const getMockUsers = async (limit = 3, fields = ['name', 'email', 'picture']) => {
|
|
4
|
+
return fetch(`https://randomuser.me/api/?results=${limit}&inc=${fields.join()}`).then(res => res.json());
|
|
5
|
+
};
|
|
6
|
+
const getMockListItem = ({ name: { first: firstName, last: lastName }, email, picture: { thumbnail } }) => {
|
|
7
|
+
const fullName = `${firstName} ${lastName}`;
|
|
8
|
+
return {
|
|
9
|
+
data: {
|
|
10
|
+
id: email,
|
|
11
|
+
firstName,
|
|
12
|
+
lastName,
|
|
13
|
+
email,
|
|
14
|
+
thumbnail
|
|
15
|
+
},
|
|
16
|
+
id: email,
|
|
17
|
+
primary: fullName,
|
|
18
|
+
secondary: (<div>
|
|
19
|
+
<EmailDisplay value={email}/>
|
|
20
|
+
</div>),
|
|
21
|
+
visual: <Avatar size='l' name={fullName} imageSrc={thumbnail}/>
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export const useMockListData = (cb, { count } = { count: undefined }) => {
|
|
25
|
+
const [items, setItems] = useState([]);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
(async () => {
|
|
28
|
+
const { results } = await getMockUsers(count);
|
|
29
|
+
setItems(results.map(getMockListItem));
|
|
30
|
+
})();
|
|
31
|
+
}, [count]);
|
|
32
|
+
useAfterInitialEffect(cb, [items]);
|
|
33
|
+
return [items, setItems];
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=SummaryList.mocks.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SummaryList.mocks.jsx","sourceRoot":"","sources":["../../../src/core/SummaryList/SummaryList.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AA+BtF,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,QAAgB,CAAC,EACjB,SAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,EACjB,EAAE;IAChC,OAAO,KAAK,CAAC,sCAAsC,KAAK,QAAQ,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAC1F,GAAG,CAAC,IAAI,EAAE,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,EACvB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,EAC1C,KAAK,EACL,OAAO,EAAE,EAAE,SAAS,EAAE,EAKvB,EAAgB,EAAE;IACjB,MAAM,QAAQ,GAAG,GAAG,SAAS,IAAI,QAAQ,EAAE,CAAC;IAC5C,OAAO;QACL,IAAI,EAAE;YACJ,EAAE,EAAE,KAAK;YACT,SAAS;YACT,QAAQ;YACR,KAAK;YACL,SAAS;SACV;QACD,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,QAAQ;QACjB,SAAS,EAAE,CACT,CAAC,GAAG,CACF;QAAA,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAC7B;MAAA,EAAE,GAAG,CAAC,CACP;QACD,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAG;KACjE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,EAAc,EACd,EAAE,KAAK,KAAyB,EAAE,KAAK,EAAE,SAAS,EAAE,EACQ,EAAE;IAC9D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAiB,EAAE,CAAC,CAAC;IAEvD,SAAS,CAAC,GAAG,EAAE;QACb,CAAC,KAAK,IAAI,EAAE;YACV,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,YAAY,CAAC,KAAK,CAAC,CAAC;YAC9C,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC,EAAE,CAAC;IACP,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,qBAAqB,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEnC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAC3B,CAAC,CAAC","sourcesContent":["import { Dispatch, ReactNode, SetStateAction, useEffect, useState } from 'react';\n\nimport { Avatar, EmailDisplay, useAfterInitialEffect } from '@pega/cosmos-react-core';\n\nexport interface MockListItem {\n id: string;\n primary: string;\n secondary: ReactNode;\n visual: ReactNode;\n data?: {\n [key: string]: unknown;\n };\n [key: string]: unknown;\n}\n\nexport interface MockUserAPIResponse {\n results: MockUser[];\n}\n\nexport interface MockUser {\n name: {\n title: string;\n first: string;\n last: string;\n };\n email: string;\n picture: {\n large: string;\n medium: string;\n thumbnail: string;\n };\n}\n\nexport const getMockUsers = async (\n limit: number = 3,\n fields: string[] = ['name', 'email', 'picture']\n): Promise<MockUserAPIResponse> => {\n return fetch(`https://randomuser.me/api/?results=${limit}&inc=${fields.join()}`).then(res =>\n res.json()\n );\n};\n\nconst getMockListItem = ({\n name: { first: firstName, last: lastName },\n email,\n picture: { thumbnail }\n}: {\n name: { first: string; last: string };\n email: string;\n picture: { thumbnail: string };\n}): MockListItem => {\n const fullName = `${firstName} ${lastName}`;\n return {\n data: {\n id: email,\n firstName,\n lastName,\n email,\n thumbnail\n },\n id: email,\n primary: fullName,\n secondary: (\n <div>\n <EmailDisplay value={email} />\n </div>\n ),\n visual: <Avatar size='l' name={fullName} imageSrc={thumbnail} />\n };\n};\n\nexport const useMockListData = (\n cb: () => void,\n { count }: { count?: number } = { count: undefined }\n): [MockListItem[], Dispatch<SetStateAction<MockListItem[]>>] => {\n const [items, setItems] = useState<MockListItem[]>([]);\n\n useEffect(() => {\n (async () => {\n const { results } = await getMockUsers(count);\n setItems(results.map(getMockListItem));\n })();\n }, [count]);\n\n useAfterInitialEffect(cb, [items]);\n\n return [items, setItems];\n};\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { SummaryListProps } from '@pega/cosmos-react-core';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
interface SummaryListStoryProps extends SummaryListProps {
|
|
6
|
+
showSecondary?: boolean;
|
|
7
|
+
showVisual?: boolean;
|
|
8
|
+
showActions?: boolean;
|
|
9
|
+
noItems?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const SummaryListDemo: Story<SummaryListStoryProps>;
|
|
12
|
+
export declare const SummaryListViewAll: Story<SummaryListStoryProps>;
|
|
13
|
+
//# sourceMappingURL=SummaryList.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SummaryList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/SummaryList/SummaryList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAML,gBAAgB,EAGjB,MAAM,yBAAyB,CAAC;;AAIjC,wBA4BU;AAEV,UAAU,qBAAsB,SAAQ,gBAAgB;IACtD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,qBAAqB,CAmDxD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,qBAAqB,CAqG3D,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { useContext, useMemo, useState } from 'react';
|
|
2
|
+
import { icons, Modal, ModalManagerContext, SummaryList, ViewAll, createStringMatcher } from '@pega/cosmos-react-core';
|
|
3
|
+
import { useMockListData } from './SummaryList.mocks';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Core/SummaryList',
|
|
6
|
+
component: SummaryList,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered'
|
|
9
|
+
},
|
|
10
|
+
args: {
|
|
11
|
+
name: 'People',
|
|
12
|
+
icon: 'users-solid',
|
|
13
|
+
count: 5,
|
|
14
|
+
loading: false,
|
|
15
|
+
showSecondary: true,
|
|
16
|
+
showVisual: true,
|
|
17
|
+
showActions: true,
|
|
18
|
+
noItems: false,
|
|
19
|
+
noItemsText: 'No items'
|
|
20
|
+
},
|
|
21
|
+
argTypes: {
|
|
22
|
+
name: { control: { type: 'text' } },
|
|
23
|
+
icon: { options: icons, control: { type: 'select' } },
|
|
24
|
+
count: { control: { type: 'number' } },
|
|
25
|
+
loading: { control: { type: 'boolean' } },
|
|
26
|
+
showSecondary: { control: { type: 'boolean' } },
|
|
27
|
+
showVisual: { control: { type: 'boolean' } },
|
|
28
|
+
showActions: { control: { type: 'boolean' } },
|
|
29
|
+
noItems: { control: { type: 'boolean' } },
|
|
30
|
+
noItemsText: { control: { type: 'text' } }
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export const SummaryListDemo = (args) => {
|
|
34
|
+
const { create: createModal } = useContext(ModalManagerContext);
|
|
35
|
+
const [loading, setLoading] = useState(true);
|
|
36
|
+
const [items] = useMockListData(() => {
|
|
37
|
+
setLoading(false);
|
|
38
|
+
}, { count: args.count });
|
|
39
|
+
const itemsToRender = items.map(item => {
|
|
40
|
+
return {
|
|
41
|
+
...item,
|
|
42
|
+
secondary: args.showSecondary ? item.secondary : undefined,
|
|
43
|
+
visual: args.showVisual ? item.visual : undefined,
|
|
44
|
+
actions: args.showActions
|
|
45
|
+
? ['Action 1', 'Action 2', 'Action 3'].map(text => ({
|
|
46
|
+
text,
|
|
47
|
+
id: text
|
|
48
|
+
}))
|
|
49
|
+
: undefined
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
return (<SummaryList name={args.name} icon={args.icon} count={args.loading || loading ? undefined : args.count} items={args.noItems ? [] : itemsToRender} loading={args.loading || loading} noItemsText={args.noItemsText} actions={[
|
|
53
|
+
{
|
|
54
|
+
text: `Add new ${args.name}`,
|
|
55
|
+
id: `${args.name}:addNew`,
|
|
56
|
+
icon: 'plus',
|
|
57
|
+
onClick() {
|
|
58
|
+
createModal(() => {
|
|
59
|
+
return (<Modal heading={`Add new ${args.name}`}>
|
|
60
|
+
{`Content for adding new ${args.name} goes here…`}
|
|
61
|
+
</Modal>);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]}/>);
|
|
66
|
+
};
|
|
67
|
+
export const SummaryListViewAll = (args) => {
|
|
68
|
+
const SummaryListViewAllModal = ({ name, count, loading }) => {
|
|
69
|
+
const [search, setSearch] = useState('');
|
|
70
|
+
const [modalLoading, setModalLoading] = useState(true);
|
|
71
|
+
const [items] = useMockListData(() => {
|
|
72
|
+
setModalLoading(false);
|
|
73
|
+
}, {
|
|
74
|
+
count
|
|
75
|
+
});
|
|
76
|
+
const itemsToRender = useMemo(() => {
|
|
77
|
+
if (search.trim()) {
|
|
78
|
+
const filterRegex = createStringMatcher(search, 'boundary');
|
|
79
|
+
return items.filter(({ primary }) => filterRegex.test(primary));
|
|
80
|
+
}
|
|
81
|
+
return items;
|
|
82
|
+
}, [items, search]);
|
|
83
|
+
return (<Modal heading={args.name}>
|
|
84
|
+
<ViewAll loading={loading || modalLoading} items={itemsToRender} actions={[
|
|
85
|
+
{
|
|
86
|
+
id: 'addNew',
|
|
87
|
+
text: `Add ${name}`
|
|
88
|
+
}
|
|
89
|
+
]} searchInputProps={{ onSearchChange: setSearch }}/>
|
|
90
|
+
</Modal>);
|
|
91
|
+
};
|
|
92
|
+
const { create: createModal } = useContext(ModalManagerContext);
|
|
93
|
+
const [loading, setLoading] = useState(true);
|
|
94
|
+
const [items] = useMockListData(() => {
|
|
95
|
+
setLoading(false);
|
|
96
|
+
}, { count: 3 });
|
|
97
|
+
const itemsToRender = items.map(item => {
|
|
98
|
+
return {
|
|
99
|
+
...item,
|
|
100
|
+
secondary: args.showSecondary ? item.secondary : undefined,
|
|
101
|
+
visual: args.showVisual ? item.visual : undefined,
|
|
102
|
+
actions: args.showActions
|
|
103
|
+
? ['Action 1', 'Action 2', 'Action 3'].map(text => ({
|
|
104
|
+
text,
|
|
105
|
+
id: text
|
|
106
|
+
}))
|
|
107
|
+
: undefined
|
|
108
|
+
};
|
|
109
|
+
});
|
|
110
|
+
return (<SummaryList name={args.name} icon={args.icon} count={args.loading || loading ? undefined : args.count} items={args.noItems ? [] : itemsToRender} loading={args.loading || loading} noItemsText={args.noItemsText} actions={[
|
|
111
|
+
{
|
|
112
|
+
text: `Add new ${args.name}`,
|
|
113
|
+
id: `${args.name}:addNew`,
|
|
114
|
+
icon: 'plus',
|
|
115
|
+
onClick() {
|
|
116
|
+
createModal(() => {
|
|
117
|
+
return (<Modal heading={`Add new ${args.name}`}>
|
|
118
|
+
{`Content for adding new ${args.name} goes here…`}
|
|
119
|
+
</Modal>);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
]} onViewAll={() => {
|
|
124
|
+
createModal(SummaryListViewAllModal, {
|
|
125
|
+
name: args.name,
|
|
126
|
+
count: args.count,
|
|
127
|
+
loading: args.loading
|
|
128
|
+
});
|
|
129
|
+
}}/>);
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=SummaryList.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SummaryList.stories.jsx","sourceRoot":"","sources":["../../../src/core/SummaryList/SummaryList.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,KAAK,EAEL,KAAK,EACL,mBAAmB,EACnB,WAAW,EAEX,OAAO,EACP,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,UA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K,CAAC,CACxD,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CACzC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,CACjC,WAAW,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAC9B,OAAO,CAAC,CAAC;YACP;gBACE,IAAI,EAAE,WAAW,IAAI,CAAC,IAAI,EAAE;gBAC5B,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,SAAS;gBACzB,IAAI,EAAE,MAAM;gBACZ,OAAO;oBACL,WAAW,CAAC,GAAG,EAAE;wBACf,OAAO,CACL,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,WAAW,IAAI,CAAC,IAAI,EAAE,CAAC,CACrC;kBAAA,CAAC,0BAA0B,IAAI,CAAC,IAAI,aAAa,CACnD;gBAAA,EAAE,KAAK,CAAC,CACT,CAAC;oBACJ,CAAC,CAAC,CAAC;gBACL,CAAC;aACF;SACF,CAAC,CACF,SAAS,CAAC,CAAC,GAAG,EAAE;YACd,WAAW,CAAC,uBAAuB,EAAE;gBACnC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAC;QACL,CAAC,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useContext, useMemo, useState } from 'react';\n\nimport {\n icons,\n OmitStrict,\n Modal,\n ModalManagerContext,\n SummaryList,\n SummaryListProps,\n ViewAll,\n createStringMatcher\n} from '@pega/cosmos-react-core';\n\nimport { useMockListData } from './SummaryList.mocks';\n\nexport default {\n title: 'Core/SummaryList',\n component: SummaryList,\n parameters: {\n layout: 'centered'\n },\n args: {\n name: 'People',\n icon: 'users-solid',\n count: 5,\n loading: false,\n showSecondary: true,\n showVisual: true,\n showActions: true,\n noItems: false,\n noItemsText: 'No items'\n },\n argTypes: {\n name: { control: { type: 'text' } },\n icon: { options: icons, control: { type: 'select' } },\n count: { control: { type: 'number' } },\n loading: { control: { type: 'boolean' } },\n showSecondary: { control: { type: 'boolean' } },\n showVisual: { control: { type: 'boolean' } },\n showActions: { control: { type: 'boolean' } },\n noItems: { control: { type: 'boolean' } },\n noItemsText: { control: { type: 'text' } }\n }\n} as Meta;\n\ninterface SummaryListStoryProps extends SummaryListProps {\n showSecondary?: boolean;\n showVisual?: boolean;\n showActions?: boolean;\n noItems?: boolean;\n}\n\nexport const SummaryListDemo: Story<SummaryListStoryProps> = (args: SummaryListStoryProps) => {\n const { create: createModal } = useContext(ModalManagerContext);\n const [loading, setLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setLoading(false);\n },\n { count: args.count }\n );\n\n const itemsToRender = items.map(item => {\n return {\n ...item,\n secondary: args.showSecondary ? item.secondary : undefined,\n visual: args.showVisual ? item.visual : undefined,\n actions: args.showActions\n ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({\n text,\n id: text\n }))\n : undefined\n };\n });\n\n return (\n <SummaryList\n name={args.name}\n icon={args.icon}\n count={args.loading || loading ? undefined : args.count}\n items={args.noItems ? [] : itemsToRender}\n loading={args.loading || loading}\n noItemsText={args.noItemsText}\n actions={[\n {\n text: `Add new ${args.name}`,\n id: `${args.name}:addNew`,\n icon: 'plus',\n onClick() {\n createModal(() => {\n return (\n <Modal heading={`Add new ${args.name}`}>\n {`Content for adding new ${args.name} goes here…`}\n </Modal>\n );\n });\n }\n }\n ]}\n />\n );\n};\n\nexport const SummaryListViewAll: Story<SummaryListStoryProps> = (args: SummaryListStoryProps) => {\n const SummaryListViewAllModal = ({\n name,\n count,\n loading\n }: OmitStrict<SummaryListProps, 'items'>) => {\n const [search, setSearch] = useState('');\n const [modalLoading, setModalLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setModalLoading(false);\n },\n {\n count\n }\n );\n\n const itemsToRender = useMemo(() => {\n if (search.trim()) {\n const filterRegex = createStringMatcher(search, 'boundary');\n return items.filter(({ primary }) => filterRegex.test(primary));\n }\n\n return items;\n }, [items, search]);\n\n return (\n <Modal heading={args.name}>\n <ViewAll\n loading={loading || modalLoading}\n items={itemsToRender}\n actions={[\n {\n id: 'addNew',\n text: `Add ${name}`\n }\n ]}\n searchInputProps={{ onSearchChange: setSearch }}\n />\n </Modal>\n );\n };\n\n const { create: createModal } = useContext(ModalManagerContext);\n const [loading, setLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setLoading(false);\n },\n { count: 3 }\n );\n\n const itemsToRender = items.map(item => {\n return {\n ...item,\n secondary: args.showSecondary ? item.secondary : undefined,\n visual: args.showVisual ? item.visual : undefined,\n actions: args.showActions\n ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({\n text,\n id: text\n }))\n : undefined\n };\n });\n\n return (\n <SummaryList\n name={args.name}\n icon={args.icon}\n count={args.loading || loading ? undefined : args.count}\n items={args.noItems ? [] : itemsToRender}\n loading={args.loading || loading}\n noItemsText={args.noItemsText}\n actions={[\n {\n text: `Add new ${args.name}`,\n id: `${args.name}:addNew`,\n icon: 'plus',\n onClick() {\n createModal(() => {\n return (\n <Modal heading={`Add new ${args.name}`}>\n {`Content for adding new ${args.name} goes here…`}\n </Modal>\n );\n });\n }\n }\n ]}\n onViewAll={() => {\n createModal(SummaryListViewAllModal, {\n name: args.name,\n count: args.count,\n loading: args.loading\n });\n }}\n />\n );\n};\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { SwitchProps } from '@pega/cosmos-react-core';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const SwitchDemo: Story<SwitchProps>;
|
|
6
|
+
export declare const SwitchInCard: Story<SwitchProps>;
|
|
7
|
+
//# sourceMappingURL=Switch.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAgB,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAIpE,wBAWU;AAEV,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,WAAW,CAYzC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,WAAW,CAc3C,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Card, Switch } from '@pega/cosmos-react-core';
|
|
3
|
+
import { StyledCard } from './Switch.styles';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Core/Switch',
|
|
6
|
+
component: Switch,
|
|
7
|
+
args: {
|
|
8
|
+
label: 'Toggle on/off',
|
|
9
|
+
disabled: false
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
label: { control: { type: 'text' } },
|
|
13
|
+
disabled: { control: { type: 'boolean' } }
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export const SwitchDemo = (args) => {
|
|
17
|
+
const [on, setOn] = useState(false);
|
|
18
|
+
return (<Switch id='switch' on={on} onChange={() => setOn(curr => !curr)} label={args.label} disabled={args.disabled}/>);
|
|
19
|
+
};
|
|
20
|
+
export const SwitchInCard = (args) => {
|
|
21
|
+
const [on, setOn] = useState(false);
|
|
22
|
+
return (<Card as={StyledCard}>
|
|
23
|
+
<Switch id='switch' on={on} onChange={() => setOn(curr => !curr)} label={args.label} disabled={args.disabled}/>
|
|
24
|
+
</Card>);
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=Switch.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.stories.jsx","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.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AAC,CAAC,EAAE,CAAC,CACP,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CACrC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAE5B;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Card, Switch, SwitchProps } from '@pega/cosmos-react-core';\n\nimport { StyledCard } from './Switch.styles';\n\nexport default {\n title: 'Core/Switch',\n component: Switch,\n args: {\n label: 'Toggle on/off',\n disabled: false\n },\n argTypes: {\n label: { control: { type: 'text' } },\n disabled: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const SwitchDemo: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n );\n};\n\nexport const SwitchInCard: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Card as={StyledCard}>\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n </Card>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Switch/Switch.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,6GAarB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { defaultThemeProp } from '@pega/cosmos-react-core';
|
|
3
|
+
export const StyledCard = styled.article(props => {
|
|
4
|
+
const { theme: { base: { spacing } } } = props;
|
|
5
|
+
return css `
|
|
6
|
+
margin: calc(2 * ${spacing});
|
|
7
|
+
padding: ${spacing};
|
|
8
|
+
height: max-content;
|
|
9
|
+
width: max-content;
|
|
10
|
+
`;
|
|
11
|
+
});
|
|
12
|
+
StyledCard.defaultProps = defaultThemeProp;
|
|
13
|
+
//# sourceMappingURL=Switch.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.styles.js","sourceRoot":"","sources":["../../../src/core/Switch/Switch.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;IAC/C,MAAM,EACJ,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACF,GAAG,KAAK,CAAC;IAEV,OAAO,GAAG,CAAA;uBACW,OAAO;eACf,OAAO;;;GAGnB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '@pega/cosmos-react-core';\n\nexport const StyledCard = styled.article(props => {\n const {\n theme: {\n base: { spacing }\n }\n } = props;\n\n return css`\n margin: calc(2 * ${spacing});\n padding: ${spacing};\n height: max-content;\n width: max-content;\n `;\n});\n\nStyledCard.defaultProps = defaultThemeProp;\n"]}
|