@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,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const tableData: ({
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
dob: string;
|
|
6
|
+
address: string;
|
|
7
|
+
email: string;
|
|
8
|
+
emailVerified: boolean;
|
|
9
|
+
balance: string;
|
|
10
|
+
} | {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
dob: string;
|
|
14
|
+
address: JSX.Element;
|
|
15
|
+
email: string;
|
|
16
|
+
balance: string;
|
|
17
|
+
emailVerified?: undefined;
|
|
18
|
+
})[];
|
|
19
|
+
//# sourceMappingURL=Table.mocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/Table/Table.mocks.tsx"],"names":[],"mappings":";AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;IAgCrB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const tableData = [
|
|
2
|
+
{
|
|
3
|
+
id: '1234',
|
|
4
|
+
name: 'Jane Smith',
|
|
5
|
+
dob: '12/31/1990',
|
|
6
|
+
address: 'Boston, MA',
|
|
7
|
+
email: 'jsmith@email.com',
|
|
8
|
+
emailVerified: true,
|
|
9
|
+
balance: '$2,200'
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: '5678',
|
|
13
|
+
name: 'Joe Smith',
|
|
14
|
+
dob: '01/01/1980',
|
|
15
|
+
address: '',
|
|
16
|
+
email: 'joe.smith@email.com',
|
|
17
|
+
emailVerified: true,
|
|
18
|
+
balance: '$1,350'
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: '0000',
|
|
22
|
+
name: 'Mary Lou',
|
|
23
|
+
dob: '06/15/1985',
|
|
24
|
+
address: (<>
|
|
25
|
+
<div>100 Main St.</div>
|
|
26
|
+
<div>Springfield, USA</div>
|
|
27
|
+
</>),
|
|
28
|
+
email: '',
|
|
29
|
+
balance: '-$175'
|
|
30
|
+
}
|
|
31
|
+
];
|
|
32
|
+
//# sourceMappingURL=Table.mocks.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.mocks.jsx","sourceRoot":"","sources":["../../../src/core/Table/Table.mocks.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,YAAY;QACrB,KAAK,EAAE,kBAAkB;QACzB,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,qBAAqB;QAC5B,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,CACP,EACE;QAAA,CAAC,GAAG,CAAC,YAAY,EAAE,GAAG,CACtB;QAAA,CAAC,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAC5B;MAAA,GAAG,CACJ;QACD,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,OAAO;KACjB;CACF,CAAC","sourcesContent":["export const tableData = [\n {\n id: '1234',\n name: 'Jane Smith',\n dob: '12/31/1990',\n address: 'Boston, MA',\n email: 'jsmith@email.com',\n emailVerified: true,\n balance: '$2,200'\n },\n {\n id: '5678',\n name: 'Joe Smith',\n dob: '01/01/1980',\n address: '',\n email: 'joe.smith@email.com',\n emailVerified: true,\n balance: '$1,350'\n },\n {\n id: '0000',\n name: 'Mary Lou',\n dob: '06/15/1985',\n address: (\n <>\n <div>100 Main St.</div>\n <div>Springfield, USA</div>\n </>\n ),\n email: '',\n balance: '-$175'\n }\n];\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { TableProps } from '@pega/cosmos-react-core';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
interface TableStoryProps {
|
|
6
|
+
title?: TableProps['title'];
|
|
7
|
+
hoverHighlight?: TableProps['hoverHighlight'];
|
|
8
|
+
loading?: TableProps['loading'];
|
|
9
|
+
loadingMessage?: TableProps['loadingMessage'];
|
|
10
|
+
emptyTable?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const TableDemo: Story<TableStoryProps>;
|
|
13
|
+
export declare const StyledTableDemo: Story<TableStoryProps>;
|
|
14
|
+
//# sourceMappingURL=Table.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA8B,UAAU,EAAE,MAAM,yBAAyB,CAAC;;AAKjF,wBAiBU;AAEV,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,eAAe,CAmB5C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,eAAe,CAuClD,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Status, Table } from '@pega/cosmos-react-core';
|
|
2
|
+
import { tableData } from './Table.mocks';
|
|
3
|
+
import { StyledBalance } from './Table.styles';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Core/Table',
|
|
6
|
+
component: Table,
|
|
7
|
+
args: {
|
|
8
|
+
title: 'Accounts',
|
|
9
|
+
hoverHighlight: false,
|
|
10
|
+
loading: false,
|
|
11
|
+
loadingMessage: 'Loading data',
|
|
12
|
+
emptyTable: false
|
|
13
|
+
},
|
|
14
|
+
argTypes: {
|
|
15
|
+
title: { control: { type: 'text' } },
|
|
16
|
+
hoverHighlight: { control: { type: 'boolean' } },
|
|
17
|
+
loading: { control: { type: 'boolean' } },
|
|
18
|
+
loadingMessage: { control: { type: 'text' } },
|
|
19
|
+
emptyTable: { control: { type: 'boolean' } }
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export const TableDemo = (args) => {
|
|
23
|
+
const columns = [
|
|
24
|
+
{ renderer: 'name', label: 'Name' },
|
|
25
|
+
{ renderer: 'dob', label: 'Date of Birth' },
|
|
26
|
+
{ renderer: 'address', label: 'Address' },
|
|
27
|
+
{ renderer: 'email', label: 'Email' },
|
|
28
|
+
{ renderer: 'balance', label: 'Account Balance', align: 'right' }
|
|
29
|
+
];
|
|
30
|
+
return (<Table title={args.title} hoverHighlight={args.hoverHighlight} loading={args.loading} loadingMessage={args.loadingMessage} data={args.emptyTable ? [] : tableData} columns={columns}/>);
|
|
31
|
+
};
|
|
32
|
+
export const StyledTableDemo = (args) => {
|
|
33
|
+
const columns = [
|
|
34
|
+
{ renderer: data => <b>{data.name}</b>, label: 'Name' },
|
|
35
|
+
{ renderer: 'dob', label: 'Date of Birth' },
|
|
36
|
+
{ renderer: 'address', label: 'Address' },
|
|
37
|
+
{
|
|
38
|
+
renderer: data => {
|
|
39
|
+
return (<>
|
|
40
|
+
{data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}
|
|
41
|
+
{data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}
|
|
42
|
+
</>);
|
|
43
|
+
},
|
|
44
|
+
label: 'Email'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
renderer: data => {
|
|
48
|
+
return (<StyledBalance negativeBalance={data.balance.startsWith('-')}>
|
|
49
|
+
{data.balance}
|
|
50
|
+
</StyledBalance>);
|
|
51
|
+
},
|
|
52
|
+
label: 'Account Balance',
|
|
53
|
+
align: 'right'
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
return (<Table title={args.title} hoverHighlight={args.hoverHighlight} loading={args.loading} loadingMessage={args.loadingMessage} data={args.emptyTable ? [] : tableData} columns={columns}/>);
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=Table.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.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ACE,QAAQ,EAAE,IAAI,CAAC,EAAE;gBACf,OAAO,CACL,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAC3D;YAAA,CAAC,IAAI,CAAC,OAAO,CACf;UAAA,EAAE,aAAa,CAAC,CACjB,CAAC;YACJ,CAAC;YACD,KAAK,EAAE,iBAAiB;YACxB,KAAK,EAAE,OAAO;SACf;KACF,CAAC;IAEF,OAAO,CACL,CAAC,KAAK,CACJ,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,cAAc,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CACpC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CACtB,cAAc,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CACpC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CACvC,OAAO,CAAC,CAAC,OAAO,CAAC,EACjB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Status, Table, ColumnProps, TableProps } from '@pega/cosmos-react-core';\n\nimport { tableData } from './Table.mocks';\nimport { StyledBalance } from './Table.styles';\n\nexport default {\n title: 'Core/Table',\n component: Table,\n args: {\n title: 'Accounts',\n hoverHighlight: false,\n loading: false,\n loadingMessage: 'Loading data',\n emptyTable: false\n },\n argTypes: {\n title: { control: { type: 'text' } },\n hoverHighlight: { control: { type: 'boolean' } },\n loading: { control: { type: 'boolean' } },\n loadingMessage: { control: { type: 'text' } },\n emptyTable: { control: { type: 'boolean' } }\n }\n} as Meta;\n\ninterface TableStoryProps {\n title?: TableProps['title'];\n hoverHighlight?: TableProps['hoverHighlight'];\n loading?: TableProps['loading'];\n loadingMessage?: TableProps['loadingMessage'];\n emptyTable?: boolean;\n}\n\nexport const TableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: 'name', label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n { renderer: 'email', label: 'Email' },\n { renderer: 'balance', label: 'Account Balance', align: 'right' }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n\nexport const StyledTableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: data => <b>{data.name}</b>, label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n {\n renderer: data => {\n return (\n <>\n {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}\n {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}\n </>\n );\n },\n label: 'Email'\n },\n {\n renderer: data => {\n return (\n <StyledBalance negativeBalance={data.balance.startsWith('-')}>\n {data.balance}\n </StyledBalance>\n );\n },\n label: 'Account Balance',\n align: 'right'\n }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Table/Table.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;qBAAgC,OAAO;SAMhE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { defaultThemeProp } from '@pega/cosmos-react-core';
|
|
3
|
+
export const StyledBalance = styled.h4(({ negativeBalance, theme }) => {
|
|
4
|
+
return css `
|
|
5
|
+
color: ${negativeBalance ? theme.base.colors.red.medium : theme.base.colors.black};
|
|
6
|
+
`;
|
|
7
|
+
});
|
|
8
|
+
StyledBalance.defaultProps = defaultThemeProp;
|
|
9
|
+
//# sourceMappingURL=Table.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.styles.js","sourceRoot":"","sources":["../../../src/core/Table/Table.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,aAAa,GAAG,MAAM,CAAC,EAAE,CACpC,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7B,OAAO,GAAG,CAAA;eACC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;KAClF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,aAAa,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '@pega/cosmos-react-core';\n\nexport const StyledBalance = styled.h4<{ negativeBalance: boolean }>(\n ({ negativeBalance, theme }) => {\n return css`\n color: ${negativeBalance ? theme.base.colors.red.medium : theme.base.colors.black};\n `;\n }\n);\n\nStyledBalance.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { TabsProps } from '@pega/cosmos-react-core';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const TabsDemo: Story<TabsProps>;
|
|
6
|
+
export declare const TabsCountDemo: Story<TabsProps>;
|
|
7
|
+
//# sourceMappingURL=Tabs.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Tabs/Tabs.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAwB,SAAS,EAAE,MAAM,yBAAyB,CAAC;;AAE1E,wBASU;AAEV,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,SAAS,CA6BrC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,SAAS,CA6B1C,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Flex, TabPanel, Tabs } from '@pega/cosmos-react-core';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Core/Tabs',
|
|
5
|
+
component: Tabs,
|
|
6
|
+
args: {
|
|
7
|
+
type: 'horizontal'
|
|
8
|
+
},
|
|
9
|
+
argTypes: {
|
|
10
|
+
type: { options: ['horizontal', 'vertical'], control: { type: 'select' } }
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export const TabsDemo = (args) => {
|
|
14
|
+
const [panelShown, changePanel] = useState('1');
|
|
15
|
+
const handleTabChange = (id) => {
|
|
16
|
+
changePanel(id);
|
|
17
|
+
};
|
|
18
|
+
const tabs = [
|
|
19
|
+
{ name: 'Tab 1', id: '1' },
|
|
20
|
+
{ name: 'Tab 2', id: '2' },
|
|
21
|
+
{ name: 'Tab 3', id: '3' },
|
|
22
|
+
{ name: 'Tab 4', id: '4', disabled: true },
|
|
23
|
+
{ name: 'Tab 5', id: '5' }
|
|
24
|
+
];
|
|
25
|
+
return (<Flex container={{ direction: args.type === 'horizontal' ? 'column' : 'row' }}>
|
|
26
|
+
<Flex item={{ grow: 1 }}>
|
|
27
|
+
<Tabs tabs={tabs} type={args.type} onTabClick={handleTabChange} currentTabId={panelShown}/>
|
|
28
|
+
</Flex>
|
|
29
|
+
<Flex container={{ pad: [1, 2] }} item={{ grow: 1 }}>
|
|
30
|
+
{tabs.map(tab => (<TabPanel tabId={tab.id} currentTabId={panelShown} key={tab.id}>
|
|
31
|
+
<div>{tab.name} content</div>
|
|
32
|
+
</TabPanel>))}
|
|
33
|
+
</Flex>
|
|
34
|
+
</Flex>);
|
|
35
|
+
};
|
|
36
|
+
export const TabsCountDemo = (args) => {
|
|
37
|
+
const [panelShown, changePanel] = useState('1');
|
|
38
|
+
const handleTabChange = (id) => {
|
|
39
|
+
changePanel(id);
|
|
40
|
+
};
|
|
41
|
+
const tabs = [
|
|
42
|
+
{ name: 'Tab 1', id: '1', count: 5 },
|
|
43
|
+
{ name: 'Tab 2', id: '2', count: 14 },
|
|
44
|
+
{ name: 'Tab 3', id: '3', count: 0 },
|
|
45
|
+
{ name: 'Tab 4', id: '4', count: 56, disabled: true },
|
|
46
|
+
{ name: 'Tab 5', id: '5', count: 150 }
|
|
47
|
+
];
|
|
48
|
+
return (<Flex container={{ direction: args.type === 'horizontal' ? 'column' : 'row' }}>
|
|
49
|
+
<Flex item={{ grow: 1 }}>
|
|
50
|
+
<Tabs tabs={tabs} type={args.type} onTabClick={handleTabChange} currentTabId={panelShown}/>
|
|
51
|
+
</Flex>
|
|
52
|
+
<Flex container={{ pad: [1, 2] }} item={{ grow: 1 }}>
|
|
53
|
+
{tabs.map(tab => (<TabPanel tabId={tab.id} currentTabId={panelShown} key={tab.id}>
|
|
54
|
+
<div>{tab.name} content</div>
|
|
55
|
+
</TabPanel>))}
|
|
56
|
+
</Flex>
|
|
57
|
+
</Flex>);
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=Tabs.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.stories.jsx","sourceRoot":"","sources":["../../../src/core/Tabs/Tabs.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,I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A,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Flex, TabPanel, Tabs, TabsProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Tabs',\n component: Tabs,\n args: {\n type: 'horizontal'\n },\n argTypes: {\n type: { options: ['horizontal', 'vertical'], control: { type: 'select' } }\n }\n} as Meta;\n\nexport const TabsDemo: Story<TabsProps> = (args: TabsProps) => {\n const [panelShown, changePanel] = useState('1');\n\n const handleTabChange = (id: string) => {\n changePanel(id);\n };\n\n const tabs = [\n { name: 'Tab 1', id: '1' },\n { name: 'Tab 2', id: '2' },\n { name: 'Tab 3', id: '3' },\n { name: 'Tab 4', id: '4', disabled: true },\n { name: 'Tab 5', id: '5' }\n ];\n\n return (\n <Flex container={{ direction: args.type === 'horizontal' ? 'column' : 'row' }}>\n <Flex item={{ grow: 1 }}>\n <Tabs tabs={tabs} type={args.type} onTabClick={handleTabChange} currentTabId={panelShown} />\n </Flex>\n <Flex container={{ pad: [1, 2] }} item={{ grow: 1 }}>\n {tabs.map(tab => (\n <TabPanel tabId={tab.id} currentTabId={panelShown} key={tab.id}>\n <div>{tab.name} content</div>\n </TabPanel>\n ))}\n </Flex>\n </Flex>\n );\n};\n\nexport const TabsCountDemo: Story<TabsProps> = (args: TabsProps) => {\n const [panelShown, changePanel] = useState('1');\n\n const handleTabChange = (id: string) => {\n changePanel(id);\n };\n\n const tabs = [\n { name: 'Tab 1', id: '1', count: 5 },\n { name: 'Tab 2', id: '2', count: 14 },\n { name: 'Tab 3', id: '3', count: 0 },\n { name: 'Tab 4', id: '4', count: 56, disabled: true },\n { name: 'Tab 5', id: '5', count: 150 }\n ];\n\n return (\n <Flex container={{ direction: args.type === 'horizontal' ? 'column' : 'row' }}>\n <Flex item={{ grow: 1 }}>\n <Tabs tabs={tabs} type={args.type} onTabClick={handleTabChange} currentTabId={panelShown} />\n </Flex>\n <Flex container={{ pad: [1, 2] }} item={{ grow: 1 }}>\n {tabs.map(tab => (\n <TabPanel tabId={tab.id} currentTabId={panelShown} key={tab.id}>\n <div>{tab.name} content</div>\n </TabPanel>\n ))}\n </Flex>\n </Flex>\n );\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { TextProps } from '@pega/cosmos-react-core';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const TextDemo: Story<TextProps>;
|
|
6
|
+
//# sourceMappingURL=Text.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Text/Text.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAQ,SAAS,EAAE,MAAM,yBAAyB,CAAC;;AAE1D,wBAGU;AAEV,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,SAAS,CAMrC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Text } from '@pega/cosmos-react-core';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Core/Text',
|
|
4
|
+
component: Text
|
|
5
|
+
};
|
|
6
|
+
export const TextDemo = (args) => {
|
|
7
|
+
return (<Text variant={args.variant} status={args.status}>
|
|
8
|
+
Pega Cosmos
|
|
9
|
+
</Text>);
|
|
10
|
+
};
|
|
11
|
+
TextDemo.args = {
|
|
12
|
+
variant: 'primary',
|
|
13
|
+
status: undefined
|
|
14
|
+
};
|
|
15
|
+
TextDemo.argTypes = {
|
|
16
|
+
variant: {
|
|
17
|
+
options: ['primary', 'secondary', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
|
|
18
|
+
control: { type: 'select' }
|
|
19
|
+
},
|
|
20
|
+
status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } }
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=Text.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.stories.jsx","sourceRoot":"","sources":["../../../src/core/Text/Text.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAa,MAAM,yBAAyB,CAAC;AAE1D,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;CACR,CAAC;AAEV,MAAM,CAAC,MAAM,QAAQ,GAAqB,CAAC,IAAe,EAAE,EAAE;IAC5D,OAAO,CACL,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAC/C;;IACF,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,IAAI,GAAG;IACd,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,SAAS;CAClB,CAAC;AAEF,QAAQ,CAAC,QAAQ,GAAG;IAClB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;QACrE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;IACD,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC7F,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Text, TextProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Text',\n component: Text\n} as Meta;\n\nexport const TextDemo: Story<TextProps> = (args: TextProps) => {\n return (\n <Text variant={args.variant} status={args.status}>\n Pega Cosmos\n </Text>\n );\n};\n\nTextDemo.args = {\n variant: 'primary',\n status: undefined\n};\n\nTextDemo.argTypes = {\n variant: {\n options: ['primary', 'secondary', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n control: { type: 'select' }\n },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } }\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { TextAreaProps } from '@pega/cosmos-react-core';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const TextAreaDemo: Story<TextAreaProps>;
|
|
6
|
+
//# sourceMappingURL=TextArea.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.stories.d.ts","sourceRoot":"","sources":["../../../src/core/TextArea/TextArea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAY,aAAa,EAAE,MAAM,yBAAyB,CAAC;;AAElE,wBAGU;AAEV,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,aAAa,CAwB7C,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { TextArea } from '@pega/cosmos-react-core';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Core/Textarea',
|
|
5
|
+
component: TextArea
|
|
6
|
+
};
|
|
7
|
+
export const TextAreaDemo = (args) => {
|
|
8
|
+
const [value, setValue] = useState('');
|
|
9
|
+
return (<TextArea id='text-area' value={value} onChange={(e) => setValue(e.target.value)} minLength={args.minLength} maxLength={args.maxLength} displayCharCount={args.displayCharCount} hardStop={args.hardStop} resizable={args.resizable} autoResize={args.autoResize} label={args.label} labelHidden={args.labelHidden} info={args.info} placeholder={args.placeholder} status={args.status} required={args.required} disabled={args.disabled} readOnly={args.readOnly}/>);
|
|
10
|
+
};
|
|
11
|
+
TextAreaDemo.args = {
|
|
12
|
+
minLength: 0,
|
|
13
|
+
maxLength: 300,
|
|
14
|
+
displayCharCount: false,
|
|
15
|
+
hardStop: true,
|
|
16
|
+
resizable: false,
|
|
17
|
+
autoResize: false,
|
|
18
|
+
label: 'Text Area',
|
|
19
|
+
labelHidden: false,
|
|
20
|
+
info: 'Enter a large amount of text',
|
|
21
|
+
placeholder: 'Tell us a story…',
|
|
22
|
+
status: undefined,
|
|
23
|
+
required: false,
|
|
24
|
+
disabled: false,
|
|
25
|
+
readOnly: false
|
|
26
|
+
};
|
|
27
|
+
TextAreaDemo.argTypes = {
|
|
28
|
+
minLength: { control: { type: 'number' } },
|
|
29
|
+
maxLength: { control: { type: 'number' } },
|
|
30
|
+
displayCharCount: { control: { type: 'boolean' } },
|
|
31
|
+
hardStop: { control: { type: 'boolean' } },
|
|
32
|
+
resizable: { control: { type: 'boolean' } },
|
|
33
|
+
autoResize: { control: { type: 'boolean' } },
|
|
34
|
+
label: { control: { type: 'text' } },
|
|
35
|
+
labelHidden: { control: { type: 'boolean' } },
|
|
36
|
+
info: { control: { type: 'text' } },
|
|
37
|
+
placeholder: { control: { type: 'text' } },
|
|
38
|
+
status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },
|
|
39
|
+
required: { control: { type: 'boolean' } },
|
|
40
|
+
disabled: { control: { type: 'boolean' } },
|
|
41
|
+
readOnly: { control: { type: 'boolean' } }
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=TextArea.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.stories.jsx","sourceRoot":"","sources":["../../../src/core/TextArea/TextArea.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAe,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAiB,MAAM,yBAAyB,CAAC;AAElE,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,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AAS,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';\nimport { useState, ChangeEvent } from 'react';\n\nimport { TextArea, TextAreaProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Textarea',\n component: TextArea\n} as Meta;\n\nexport const TextAreaDemo: Story<TextAreaProps> = (args: TextAreaProps) => {\n const [value, setValue] = useState('');\n\n return (\n <TextArea\n id='text-area'\n value={value}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setValue(e.target.value)}\n minLength={args.minLength}\n maxLength={args.maxLength}\n displayCharCount={args.displayCharCount}\n hardStop={args.hardStop}\n resizable={args.resizable}\n autoResize={args.autoResize}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n placeholder={args.placeholder}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\nTextAreaDemo.args = {\n minLength: 0,\n maxLength: 300,\n displayCharCount: false,\n hardStop: true,\n resizable: false,\n autoResize: false,\n label: 'Text Area',\n labelHidden: false,\n info: 'Enter a large amount of text',\n placeholder: 'Tell us a story…',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nTextAreaDemo.argTypes = {\n minLength: { control: { type: 'number' } },\n maxLength: { control: { type: 'number' } },\n displayCharCount: { control: { type: 'boolean' } },\n hardStop: { control: { type: 'boolean' } },\n resizable: { control: { type: 'boolean' } },\n autoResize: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n placeholder: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toaster.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Toaster/Toaster.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;;AAKxC,wBAGU;AAKV,eAAO,MAAM,WAAW,mBAkBvB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { Button, Toaster, ToasterContext } from '@pega/cosmos-react-core';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Core/Toaster',
|
|
5
|
+
component: Toaster
|
|
6
|
+
};
|
|
7
|
+
const msg = 'Lorem ipsum dolor sit amet consectetur adipiscing elit Praesent hendrerit finibus diam sed convallis';
|
|
8
|
+
export const ToasterDemo = () => {
|
|
9
|
+
const { push } = useContext(ToasterContext);
|
|
10
|
+
const pushToaster = () => {
|
|
11
|
+
push({
|
|
12
|
+
content: msg.slice(0, Math.floor(Math.random() * (msg.length - 26 + 1)) + 26)
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
return <Button onClick={pushToaster}>Make some Toast</Button>;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=Toaster.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toaster.stories.jsx","sourceRoot":"","sources":["../../../src/core/Toaster/Toaster.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE1E,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,OAAO;CACX,CAAC;AAEV,MAAM,GAAG,GACP,sGAAsG,CAAC;AAEzG,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAS9B,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE5C,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,IAAI,CAAC;YACH,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;SAC9E,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;AAChE,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useContext } from 'react';\n\nimport { Button, Toaster, ToasterContext } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Toaster',\n component: Toaster\n} as Meta;\n\nconst msg =\n 'Lorem ipsum dolor sit amet consectetur adipiscing elit Praesent hendrerit finibus diam sed convallis';\n\nexport const ToasterDemo = () => {\n /*\n * The <Toaster> component should be wrapped around the entire portion of an application that utilizes it.\n * For most apps that is once near the root of the app's React tree.\n * Descendant components can utilize the Toaster's push context method via a useContext hook, as demonstrated here.\n * This story component represents an component rendered somewhere in an app's tree.\n * Note, a Toaster provider is already rendered at the root of the Cosmos Storybook, allowing for the use of context here.\n */\n\n const { push } = useContext(ToasterContext);\n\n const pushToaster = () => {\n push({\n content: msg.slice(0, Math.floor(Math.random() * (msg.length - 26 + 1)) + 26)\n });\n };\n\n return <Button onClick={pushToaster}>Make some Toast</Button>;\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").FunctionComponent<import("@pega/cosmos-react-core").TooltipProps & import("@pega/cosmos-react-core").ForwardProps>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const TooltipDemo: () => JSX.Element;
|
|
8
|
+
//# sourceMappingURL=Tooltip.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":";;;;;AAEA,wBAGE;AAEF,eAAO,MAAM,WAAW,mBAgBvB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Button, Tooltip, useElement } from '@pega/cosmos-react-core';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Core/Tooltip',
|
|
4
|
+
component: Tooltip
|
|
5
|
+
};
|
|
6
|
+
export const TooltipDemo = () => {
|
|
7
|
+
const [el, setEl] = useElement();
|
|
8
|
+
return (<>
|
|
9
|
+
<Button ref={setEl}>Hover me</Button>
|
|
10
|
+
|
|
11
|
+
{el && (<Tooltip target={el}>
|
|
12
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur finibus scelerisque
|
|
13
|
+
viverra. Fusce consequat, justo at laoreet lobortis, mauris ipsum aliquet arcu, non
|
|
14
|
+
convallis nisl elit id erat. Pellentesque posuere sagittis velit a molestie.
|
|
15
|
+
</Tooltip>)}
|
|
16
|
+
</>);
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=Tooltip.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.stories.jsx","sourceRoot":"","sources":["../../../src/core/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEtE,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,OAAO;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,UAAU,EAAE,CAAC;IAEjC,OAAO,CACL,EACE;MAAA,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,MAAM,CAEpC;;MAAA,CAAC,EAAE,IAAI,CACL,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAClB;;;;QAGF,EAAE,OAAO,CAAC,CACX,CACH;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Button, Tooltip, useElement } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Tooltip',\n component: Tooltip\n};\n\nexport const TooltipDemo = () => {\n const [el, setEl] = useElement();\n\n return (\n <>\n <Button ref={setEl}>Hover me</Button>\n\n {el && (\n <Tooltip target={el}>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur finibus scelerisque\n viverra. Fusce consequat, justo at laoreet lobortis, mauris ipsum aliquet arcu, non\n convallis nisl elit id erat. Pellentesque posuere sagittis velit a molestie.\n </Tooltip>\n )}\n </>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tree.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/Tree/Tree.mocks.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,cAAe,MAAM,kFAsB5C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const themeToTree = (themeNode, parentPath) => {
|
|
2
|
+
const dataArray = [];
|
|
3
|
+
Object.entries(themeNode).forEach(([childKey, childValue]) => {
|
|
4
|
+
const id = parentPath ? `${parentPath}.${childKey}` : childKey;
|
|
5
|
+
const label = childKey;
|
|
6
|
+
if (childValue.$type) {
|
|
7
|
+
dataArray.push({
|
|
8
|
+
id,
|
|
9
|
+
label,
|
|
10
|
+
data: { ...childValue }
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
const nodes = themeToTree(childValue, id);
|
|
15
|
+
dataArray.push({ id, label, nodes });
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return dataArray;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=Tree.mocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tree.mocks.js","sourceRoot":"","sources":["../../../src/core/Tree/Tree.mocks.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,SAAiB,EAAE,UAAmB,EAAE,EAAE;IACpE,MAAM,SAAS,GAAuB,EAAE,CAAC;IACzC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAE;QAC3D,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC/D,MAAM,KAAK,GAAG,QAAQ,CAAC;QAGvB,IAAI,UAAU,CAAC,KAAK,EAAE;YACpB,SAAS,CAAC,IAAI,CAAC;gBACb,EAAE;gBACF,KAAK;gBACL,IAAI,EAAE,EAAE,GAAG,UAAU,EAAE;aACxB,CAAC,CAAC;SACJ;aAEI;YACH,MAAM,KAAK,GAAuB,WAAW,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAC9D,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;SACtC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["import { TreeProps } from '@pega/cosmos-react-core';\n\nexport const themeToTree = (themeNode: object, parentPath?: string) => {\n const dataArray: TreeProps['nodes'] = [];\n Object.entries(themeNode).forEach(([childKey, childValue]) => {\n const id = parentPath ? `${parentPath}.${childKey}` : childKey;\n const label = childKey;\n\n // Is a leaf\n if (childValue.$type) {\n dataArray.push({\n id,\n label,\n data: { ...childValue }\n });\n }\n // Is a parent\n else {\n const nodes: TreeProps['nodes'] = themeToTree(childValue, id);\n dataArray.push({ id, label, nodes });\n }\n });\n\n return dataArray;\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import { StandardTreeProps } from '@pega/cosmos-react-core';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const BaseTree: () => JSX.Element;
|
|
7
|
+
export declare const StandardTreeDemo: Story<Pick<StandardTreeProps, 'lined'>>;
|
|
8
|
+
//# sourceMappingURL=Tree.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tree.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Tree/Tree.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAGL,iBAAiB,EAMlB,MAAM,yBAAyB,CAAC;;AAKjC,wBAGU;AAEV,eAAO,MAAM,QAAQ,mBAcpB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAmFpE,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { action } from '@storybook/addon-actions';
|
|
3
|
+
import { Button, StandardTree, Tree, treeHelpers, createUID, themeDefinition } from '@pega/cosmos-react-core';
|
|
4
|
+
import { themeToTree } from './Tree.mocks';
|
|
5
|
+
import { StyledBaseTree } from './Tree.styles';
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Core/Tree',
|
|
8
|
+
component: Tree
|
|
9
|
+
};
|
|
10
|
+
export const BaseTree = () => {
|
|
11
|
+
return (<StyledBaseTree nodes={themeToTree(themeDefinition)} nodeRenderer={({ id, subTree }) => {
|
|
12
|
+
return (<>
|
|
13
|
+
<span>{id}</span>
|
|
14
|
+
{subTree}
|
|
15
|
+
</>);
|
|
16
|
+
}}/>);
|
|
17
|
+
};
|
|
18
|
+
export const StandardTreeDemo = ({ lined }) => {
|
|
19
|
+
const getMockNodes = ({ length = 5, parent = true } = {}) => {
|
|
20
|
+
return Array.from({ length }, (_, i) => {
|
|
21
|
+
const isParent = parent && i !== 2;
|
|
22
|
+
const id = createUID();
|
|
23
|
+
return {
|
|
24
|
+
id,
|
|
25
|
+
label: isParent ? 'Parent' : 'Leaf',
|
|
26
|
+
icon: isParent ? 'folder-solid' : 'document-solid',
|
|
27
|
+
nodes: isParent ? [] : undefined,
|
|
28
|
+
actions: [
|
|
29
|
+
{ id: 'star', text: 'Star', icon: 'star', onClick: action(`Star node: ${id}`) },
|
|
30
|
+
{ id: 'pin', text: 'Pin', icon: 'pin', onClick: action(`Pin node: ${id}`) }
|
|
31
|
+
],
|
|
32
|
+
onClick: isParent
|
|
33
|
+
? undefined
|
|
34
|
+
: nodeId => {
|
|
35
|
+
action(`Action for node: ${nodeId}`)();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const [currentNodeId, setCurrentNodeId] = useState();
|
|
41
|
+
const [allNodes, setAllNodes] = useState(() => {
|
|
42
|
+
return getMockNodes({ length: 10 });
|
|
43
|
+
});
|
|
44
|
+
const loadChildNodes = (id) => {
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
setAllNodes(tree => {
|
|
47
|
+
return treeHelpers.mapNode(tree, id, node => {
|
|
48
|
+
return {
|
|
49
|
+
...node,
|
|
50
|
+
loading: false,
|
|
51
|
+
nodes: [...(node.nodes ?? []), ...getMockNodes()]
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}, 1000);
|
|
56
|
+
};
|
|
57
|
+
const expandTo = (id) => {
|
|
58
|
+
setAllNodes(tree => {
|
|
59
|
+
return treeHelpers.expandTo(tree, id);
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
return (<>
|
|
63
|
+
<StandardTree lined={lined} currentNodeId={currentNodeId} nodes={allNodes} onNodeClick={id => {
|
|
64
|
+
const clickedNode = treeHelpers.getNode(allNodes, id);
|
|
65
|
+
setCurrentNodeId(id);
|
|
66
|
+
if (!clickedNode?.nodes)
|
|
67
|
+
return;
|
|
68
|
+
setAllNodes(tree => treeHelpers.mapNode(tree, id, node => {
|
|
69
|
+
return {
|
|
70
|
+
...node,
|
|
71
|
+
expanded: !node.expanded,
|
|
72
|
+
loading: node.nodes?.length === 0
|
|
73
|
+
};
|
|
74
|
+
}));
|
|
75
|
+
if (clickedNode?.nodes?.length > 0)
|
|
76
|
+
return;
|
|
77
|
+
loadChildNodes(id);
|
|
78
|
+
}}/>
|
|
79
|
+
<Button onClick={() => expandTo('')}>Collapse All</Button>
|
|
80
|
+
<Button onClick={() => expandTo(currentNodeId || '')}>Expand to active item</Button>
|
|
81
|
+
</>);
|
|
82
|
+
};
|
|
83
|
+
StandardTreeDemo.args = {
|
|
84
|
+
lined: false
|
|
85
|
+
};
|
|
86
|
+
StandardTreeDemo.argTypes = {
|
|
87
|
+
lined: { control: { type: 'boolean' } }
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=Tree.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tree.stories.jsx","sourceRoot":"","sources":["../../../src/core/Tree/Tree.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EACL,MAAM,EACN,YAAY,EAEZ,IAAI,EAEJ,WAAW,EACX,SAAS,EACT,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,cAAc,E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IAC1B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CACxC,CAAC","sourcesContent":["import { useState } from 'react';\nimport { action } from '@storybook/addon-actions';\nimport { Meta, Story } from '@storybook/react';\n\nimport {\n Button,\n StandardTree,\n StandardTreeProps,\n Tree,\n TreeNode,\n treeHelpers,\n createUID,\n themeDefinition\n} from '@pega/cosmos-react-core';\n\nimport { themeToTree } from './Tree.mocks';\nimport { StyledBaseTree } from './Tree.styles';\n\nexport default {\n title: 'Core/Tree',\n component: Tree\n} as Meta;\n\nexport const BaseTree = () => {\n return (\n <StyledBaseTree\n nodes={themeToTree(themeDefinition)}\n nodeRenderer={({ id, subTree }) => {\n return (\n <>\n <span>{id}</span>\n {subTree}\n </>\n );\n }}\n />\n );\n};\n\nexport const StandardTreeDemo: Story<Pick<StandardTreeProps, 'lined'>> = ({ lined }) => {\n const getMockNodes = ({\n length = 5,\n parent = true\n }: { length?: number; parent?: boolean } = {}): StandardTreeProps['nodes'] => {\n return Array.from({ length }, (_, i) => {\n const isParent = parent && i !== 2;\n const id = createUID();\n return {\n id,\n label: isParent ? 'Parent' : 'Leaf',\n icon: isParent ? 'folder-solid' : 'document-solid',\n nodes: isParent ? [] : undefined,\n actions: [\n { id: 'star', text: 'Star', icon: 'star', onClick: action(`Star node: ${id}`) },\n { id: 'pin', text: 'Pin', icon: 'pin', onClick: action(`Pin node: ${id}`) }\n ],\n onClick: isParent\n ? undefined\n : nodeId => {\n action(`Action for node: ${nodeId}`)();\n }\n };\n });\n };\n\n const [currentNodeId, setCurrentNodeId] = useState<string | undefined>();\n const [allNodes, setAllNodes] = useState<StandardTreeProps['nodes']>(() => {\n return getMockNodes({ length: 10 });\n });\n\n const loadChildNodes = (id: string) => {\n setTimeout(() => {\n setAllNodes(tree => {\n return treeHelpers.mapNode(tree, id, node => {\n return {\n ...node,\n loading: false,\n nodes: [...(node.nodes ?? []), ...getMockNodes()]\n };\n });\n });\n }, 1000);\n };\n\n const expandTo = (id: TreeNode['id']) => {\n setAllNodes(tree => {\n return treeHelpers.expandTo(tree, id);\n });\n };\n\n return (\n <>\n <StandardTree\n lined={lined}\n currentNodeId={currentNodeId}\n nodes={allNodes}\n onNodeClick={id => {\n const clickedNode = treeHelpers.getNode(allNodes, id);\n setCurrentNodeId(id);\n // If a leaf node, just set to current\n if (!clickedNode?.nodes) return;\n\n setAllNodes(tree =>\n treeHelpers.mapNode(tree, id, node => {\n return {\n ...node,\n expanded: !node.expanded,\n loading: node.nodes?.length === 0\n };\n })\n );\n\n // If a parent node with children already loaded, we're done.\n if (clickedNode?.nodes?.length > 0) return;\n\n loadChildNodes(id);\n }}\n />\n <Button onClick={() => expandTo('')}>Collapse All</Button>\n <Button onClick={() => expandTo(currentNodeId || '')}>Expand to active item</Button>\n </>\n );\n};\n\nStandardTreeDemo.args = {\n lined: false\n};\n\nStandardTreeDemo.argTypes = {\n lined: { control: { type: 'boolean' } }\n};\n"]}
|