@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,196 @@
|
|
|
1
|
+
import { useReducer, useRef, useContext, useState } from 'react';
|
|
2
|
+
import { RichTextEditor } from '@pega/cosmos-react-rte';
|
|
3
|
+
import { Banner, Button, Checkbox, CheckboxGroup, Flex, Form, FormField, Grid, Input, RadioButton, RadioButtonGroup, Select, Option, TextArea, ToasterContext } from '@pega/cosmos-react-core';
|
|
4
|
+
import { FileInputDemo } from '@pega/cosmos-react-demos/lib/core/File/FileInput.stories';
|
|
5
|
+
import { FilterableSingleSelect as ComboboxFilterableStory } from '@pega/cosmos-react-demos/lib/core/ComboBox/ComboBox.stories';
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Core/Form',
|
|
8
|
+
component: Form,
|
|
9
|
+
subcomponents: {
|
|
10
|
+
FormField
|
|
11
|
+
},
|
|
12
|
+
includeStories: ['OneColumnForm', 'TwoColumnForm', 'ThreeColumnForm', 'SimpleFormDemo'],
|
|
13
|
+
args: {
|
|
14
|
+
heading: 'Form demo',
|
|
15
|
+
description: ''
|
|
16
|
+
},
|
|
17
|
+
argTypes: {
|
|
18
|
+
heading: { control: { type: 'text' } },
|
|
19
|
+
description: { control: { type: 'text' } }
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const initFields = () => {
|
|
23
|
+
const common = { value: undefined, status: undefined };
|
|
24
|
+
return [
|
|
25
|
+
{
|
|
26
|
+
...common,
|
|
27
|
+
name: 'name',
|
|
28
|
+
required: true,
|
|
29
|
+
error: 'Please enter first and last name',
|
|
30
|
+
validator() {
|
|
31
|
+
if (!this.value)
|
|
32
|
+
return false;
|
|
33
|
+
return /^[a-z]+\s[a-z]+$/i.test(this.value);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
...common,
|
|
38
|
+
name: 'email',
|
|
39
|
+
required: true,
|
|
40
|
+
error: 'Enter a @pega.com address',
|
|
41
|
+
validator() {
|
|
42
|
+
if (!this.value)
|
|
43
|
+
return false;
|
|
44
|
+
return /^\S+@pega\.com$/.test(this.value);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
...common,
|
|
49
|
+
name: 'notes',
|
|
50
|
+
required: true,
|
|
51
|
+
help: 'See how fast you can type 20 characters…go',
|
|
52
|
+
error: 'You need to tell us more than 20 characters',
|
|
53
|
+
validator() {
|
|
54
|
+
if (!this.value)
|
|
55
|
+
return false;
|
|
56
|
+
return this.value.length >= 20;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
];
|
|
60
|
+
};
|
|
61
|
+
const fieldReducer = (fields, { target, type }) => {
|
|
62
|
+
return fields.map(field => {
|
|
63
|
+
if (field.name === target.name) {
|
|
64
|
+
field.value = target.value;
|
|
65
|
+
if (type === 'blur' || field.status === 'error') {
|
|
66
|
+
if ((field.required || field.value) && !field.validator()) {
|
|
67
|
+
field.status = 'error';
|
|
68
|
+
field.info = field.error;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
field.status = undefined;
|
|
72
|
+
field.info = field.help;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return field;
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
export const FormContent = ({ cols, heading, description, showActions }) => {
|
|
80
|
+
const editorRef = useRef(null);
|
|
81
|
+
const [fields, setField] = useReducer(fieldReducer, undefined, initFields);
|
|
82
|
+
const { push } = useContext(ToasterContext);
|
|
83
|
+
const name = fields.find(field => field.name === 'name');
|
|
84
|
+
const email = fields.find(field => field.name === 'email');
|
|
85
|
+
const notes = fields.find(field => field.name === 'notes');
|
|
86
|
+
if (!name || !email || !notes)
|
|
87
|
+
return null;
|
|
88
|
+
const canSubmit = fields.every(field => field.value && field.validator());
|
|
89
|
+
const actions = (<>
|
|
90
|
+
<Button name='Cancel' variant='secondary' onClick={() => {
|
|
91
|
+
push({ content: 'Form cancelled!' });
|
|
92
|
+
}}>
|
|
93
|
+
Cancel
|
|
94
|
+
</Button>
|
|
95
|
+
<Button name='Submit' type='submit' variant='primary' disabled={!canSubmit}>
|
|
96
|
+
Submit
|
|
97
|
+
</Button>
|
|
98
|
+
</>);
|
|
99
|
+
const onImageAdded = (image, id) => {
|
|
100
|
+
const src = URL.createObjectURL(image);
|
|
101
|
+
editorRef.current?.appendImage({ src, alt: image.name }, id);
|
|
102
|
+
};
|
|
103
|
+
return (<Form actions={showActions ? actions : undefined} description={description} heading={heading} onSubmit={(e) => {
|
|
104
|
+
e.preventDefault();
|
|
105
|
+
push({ content: 'Form submitted!' });
|
|
106
|
+
}} style={{ margin: 'auto', maxWidth: '37.5rem' }}>
|
|
107
|
+
<Grid container={{ gap: 1, cols: `repeat(${cols}, minmax(0, 1fr))` }}>
|
|
108
|
+
<Input name='name' label='Name' value={name.value} required={name.required} status={name.status} info='some help text here' onChange={(e) => setField({ ...e })} onBlur={(e) => setField({ ...e })} autoComplete='off'/>
|
|
109
|
+
|
|
110
|
+
<Input name='email' value={email.value} type='email' label='Email' required={email.required} status={email.status} info='some help text here' onChange={(e) => setField({ ...e })} onBlur={(e) => setField({ ...e })} autoComplete='off'/>
|
|
111
|
+
|
|
112
|
+
<Grid item={{ colStartEnd: '1/-1' }}>
|
|
113
|
+
<CheckboxGroup name='visited' label='Places you have worked'>
|
|
114
|
+
{['Cambridge', 'Krakow', 'Hyderabad', 'Bangalore'].map(office => (<Checkbox key={office} label={office} onChange={(e) => setField({ ...e })}/>))}
|
|
115
|
+
</CheckboxGroup>
|
|
116
|
+
</Grid>
|
|
117
|
+
|
|
118
|
+
<Grid item={{ colStartEnd: '1/-1' }}>
|
|
119
|
+
<RadioButtonGroup name='meetings' label='Do you enjoy early morning meetings?'>
|
|
120
|
+
{['Yes', "No… no I don't"].map(option => (<RadioButton key={option} label={option} onChange={(e) => setField({ ...e })}/>))}
|
|
121
|
+
</RadioButtonGroup>
|
|
122
|
+
</Grid>
|
|
123
|
+
|
|
124
|
+
<Select label='What would you like to eat?' info='FYI: options are limited'>
|
|
125
|
+
<Option>choose meal…</Option>
|
|
126
|
+
<Option>Pizza</Option>
|
|
127
|
+
<Option>Sandwich</Option>
|
|
128
|
+
<Option>Salad</Option>
|
|
129
|
+
</Select>
|
|
130
|
+
|
|
131
|
+
<Grid item={{ colStartEnd: '1/-1' }}>
|
|
132
|
+
<TextArea name='notes' required={notes.required} label='Meeting Notes' status={notes.status} info={notes.info || notes.help} onChange={(e) => setField({ ...e })} onBlur={(e) => setField({ ...e })}/>
|
|
133
|
+
</Grid>
|
|
134
|
+
|
|
135
|
+
<Grid item={{ colStartEnd: '1/-1' }}>
|
|
136
|
+
<RichTextEditor label='Detailed meeting notes' info='The rich text editor can be used in forms, comments, and documents' toolbar={[
|
|
137
|
+
'inline-styling',
|
|
138
|
+
'headers',
|
|
139
|
+
'tables',
|
|
140
|
+
'links',
|
|
141
|
+
'images',
|
|
142
|
+
'lists',
|
|
143
|
+
'cut-copy-paste',
|
|
144
|
+
'indentation'
|
|
145
|
+
]} onImageAdded={onImageAdded} ref={editorRef}/>
|
|
146
|
+
</Grid>
|
|
147
|
+
<Grid item={{ colStartEnd: '1/-1' }}>
|
|
148
|
+
<FileInputDemo />
|
|
149
|
+
</Grid>
|
|
150
|
+
<ComboboxFilterableStory />
|
|
151
|
+
</Grid>
|
|
152
|
+
</Form>);
|
|
153
|
+
};
|
|
154
|
+
export const OneColumnForm = (args) => {
|
|
155
|
+
return <FormContent cols={1} heading={args.heading} description={args.description} showActions/>;
|
|
156
|
+
};
|
|
157
|
+
export const TwoColumnForm = (args) => {
|
|
158
|
+
return <FormContent cols={2} heading={args.heading} description={args.description} showActions/>;
|
|
159
|
+
};
|
|
160
|
+
export const ThreeColumnForm = (args) => {
|
|
161
|
+
return <FormContent cols={3} heading={args.heading} description={args.description} showActions/>;
|
|
162
|
+
};
|
|
163
|
+
export const SimpleFormDemo = (args) => {
|
|
164
|
+
const [inputValue, setInputValue] = useState('');
|
|
165
|
+
const [success, setSuccess] = useState('');
|
|
166
|
+
const actions = (<>
|
|
167
|
+
<Button name='Cancel' variant='secondary' onClick={() => setInputValue('')}>
|
|
168
|
+
Cancel
|
|
169
|
+
</Button>
|
|
170
|
+
<Button name='Submit' type='submit' variant='primary'>
|
|
171
|
+
Submit
|
|
172
|
+
</Button>
|
|
173
|
+
</>);
|
|
174
|
+
const successBanner = (<Banner id='success' variant='success' heading='Success' messages={['Form submitted', `Input value: ${success}`]}/>);
|
|
175
|
+
const errorBanner = (<Banner id='error' variant='urgent' heading='Error' messages={['All required fields in the form must be completed.']}/>);
|
|
176
|
+
const banner = success ? successBanner : errorBanner;
|
|
177
|
+
return (<Form banners={args.withBanners ? banner : undefined} actions={actions} heading={args.heading} description={args.description} onSubmit={(e) => {
|
|
178
|
+
e.preventDefault();
|
|
179
|
+
setSuccess(inputValue);
|
|
180
|
+
setInputValue('');
|
|
181
|
+
}}>
|
|
182
|
+
<Flex container={{ direction: 'column', itemGap: 2 }}>
|
|
183
|
+
<Input label='Name' info='Enter your first name' required value={inputValue} onChange={(e) => {
|
|
184
|
+
setSuccess('');
|
|
185
|
+
setInputValue(e.target.value);
|
|
186
|
+
}}/>
|
|
187
|
+
</Flex>
|
|
188
|
+
</Form>);
|
|
189
|
+
};
|
|
190
|
+
SimpleFormDemo.args = {
|
|
191
|
+
withBanners: false
|
|
192
|
+
};
|
|
193
|
+
SimpleFormDemo.argTypes = {
|
|
194
|
+
withBanners: { control: { type: 'boolean' } }
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=Form.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.stories.jsx","sourceRoot":"","sources":["../../../src/core/Form/Form.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EAIV,MAAM,EACN,UAAU,EACV,QAAQ,EACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,cAAc,EAAuB,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,IAAI,EAEJ,SAAS,EACT,IAAI,EACJ,KAAK,EACL,WAAW,EACX,gBAAgB,EAChB,MAAM,EACN,MAAM,EACN,QAAQ,EACR,cAAc,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,0DAA0D,CAAC;AACzF,OAAO,EAAE,sBAAsB,IAAI,uBAAuB,EAAE,MAAM,6DAA6D,CAAC;AAEhI,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE;QACb,SAAS;KACV;IACD,cAAc,EAAE,CAAC,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,CAAC;IACvF,IAAI,EAAE;QACJ,OAAO,EAAE,WAAW;QACpB,WAAW,EAAE,EAAE;KAChB;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I,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CACnD;QAAA,CAAC,KAAK,CACJ,KAAK,CAAC,MAAM,CACZ,IAAI,CAAC,uBAAuB,CAC5B,QAAQ,CACR,KAAK,CAAC,CAAC,UAAU,CAAC,CAClB,QAAQ,CAAC,CAAC,CAAC,CAAgC,EAAE,EAAE;YAC7C,UAAU,CAAC,EAAE,CAAC,CAAC;YACf,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC,CAAC,EAEN;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,IAAI,GAAG;IACpB,WAAW,EAAE,KAAK;CACnB,CAAC;AAEF,cAAc,CAAC,QAAQ,GAAG;IACxB,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC9C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport {\n useReducer,\n ChangeEvent,\n FocusEvent,\n FormEvent,\n useRef,\n useContext,\n useState\n} from 'react';\n\nimport { RichTextEditor, RichTextEditorState } from '@pega/cosmos-react-rte';\nimport {\n Banner,\n Button,\n Checkbox,\n CheckboxGroup,\n Flex,\n Form,\n FormControlProps,\n FormField,\n Grid,\n Input,\n RadioButton,\n RadioButtonGroup,\n Select,\n Option,\n TextArea,\n ToasterContext\n} from '@pega/cosmos-react-core';\nimport { FileInputDemo } from '@pega/cosmos-react-demos/lib/core/File/FileInput.stories';\nimport { FilterableSingleSelect as ComboboxFilterableStory } from '@pega/cosmos-react-demos/lib/core/ComboBox/ComboBox.stories';\n\nexport default {\n title: 'Core/Form',\n component: Form,\n subcomponents: {\n FormField\n },\n includeStories: ['OneColumnForm', 'TwoColumnForm', 'ThreeColumnForm', 'SimpleFormDemo'],\n args: {\n heading: 'Form demo',\n description: ''\n },\n argTypes: {\n heading: { control: { type: 'text' } },\n description: { control: { type: 'text' } }\n }\n} as Meta;\n\ninterface Field extends FormControlProps {\n help?: string;\n error?: string;\n validator: (this: Field) => boolean;\n}\n\n// Get initial field properties\nconst initFields = (): Field[] => {\n const common = { value: undefined, status: undefined };\n return [\n {\n ...common,\n name: 'name',\n required: true,\n error: 'Please enter first and last name',\n validator() {\n if (!this.value) return false;\n return /^[a-z]+\\s[a-z]+$/i.test(this.value);\n }\n },\n {\n ...common,\n name: 'email',\n required: true,\n error: 'Enter a @pega.com address',\n validator() {\n if (!this.value) return false;\n return /^\\S+@pega\\.com$/.test(this.value);\n }\n },\n {\n ...common,\n name: 'notes',\n required: true,\n help: 'See how fast you can type 20 characters…go',\n error: 'You need to tell us more than 20 characters',\n validator() {\n if (!this.value) return false;\n return this.value.length >= 20;\n }\n }\n ];\n};\n\n// Handles setting of state for all fields\nconst fieldReducer = (\n fields: Field[],\n {\n target,\n type\n }:\n | ChangeEvent<HTMLInputElement | HTMLTextAreaElement>\n | FocusEvent<HTMLInputElement | HTMLTextAreaElement>\n) => {\n return fields.map(field => {\n if (field.name === target.name) {\n field.value = target.value;\n if (type === 'blur' || field.status === 'error') {\n if ((field.required || field.value) && !field.validator()) {\n field.status = 'error';\n field.info = field.error;\n } else {\n field.status = undefined;\n field.info = field.help;\n }\n }\n }\n return field;\n });\n};\n\nexport const FormContent = ({\n cols,\n heading,\n description,\n showActions\n}: {\n cols: number;\n showActions: boolean;\n heading?: string;\n description?: string;\n}) => {\n const editorRef = useRef<RichTextEditorState>(null);\n const [fields, setField] = useReducer(fieldReducer, undefined, initFields);\n const { push } = useContext(ToasterContext);\n\n const name = fields.find(field => field.name === 'name');\n const email = fields.find(field => field.name === 'email');\n const notes = fields.find(field => field.name === 'notes');\n\n if (!name || !email || !notes) return null;\n\n const canSubmit = fields.every(field => field.value && field.validator());\n\n const actions = (\n <>\n <Button\n name='Cancel'\n variant='secondary'\n onClick={() => {\n push({ content: 'Form cancelled!' });\n }}\n >\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary' disabled={!canSubmit}>\n Submit\n </Button>\n </>\n );\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n return (\n <Form\n actions={showActions ? actions : undefined}\n description={description}\n heading={heading}\n onSubmit={(e: FormEvent) => {\n e.preventDefault();\n push({ content: 'Form submitted!' });\n }}\n style={{ margin: 'auto', maxWidth: '37.5rem' }}\n >\n <Grid container={{ gap: 1, cols: `repeat(${cols}, minmax(0, 1fr))` }}>\n <Input\n name='name'\n label='Name'\n value={name.value}\n required={name.required}\n status={name.status}\n info='some help text here'\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n autoComplete='off'\n />\n\n <Input\n name='email'\n value={email.value}\n type='email'\n label='Email'\n required={email.required}\n status={email.status}\n info='some help text here'\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n autoComplete='off'\n />\n\n <Grid item={{ colStartEnd: '1/-1' }}>\n <CheckboxGroup name='visited' label='Places you have worked'>\n {['Cambridge', 'Krakow', 'Hyderabad', 'Bangalore'].map(office => (\n <Checkbox\n key={office}\n label={office}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n />\n ))}\n </CheckboxGroup>\n </Grid>\n\n <Grid item={{ colStartEnd: '1/-1' }}>\n <RadioButtonGroup name='meetings' label='Do you enjoy early morning meetings?'>\n {['Yes', \"No… no I don't\"].map(option => (\n <RadioButton\n key={option}\n label={option}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n />\n ))}\n </RadioButtonGroup>\n </Grid>\n\n <Select label='What would you like to eat?' info='FYI: options are limited'>\n <Option>choose meal…</Option>\n <Option>Pizza</Option>\n <Option>Sandwich</Option>\n <Option>Salad</Option>\n </Select>\n\n <Grid item={{ colStartEnd: '1/-1' }}>\n <TextArea\n name='notes'\n required={notes.required}\n label='Meeting Notes'\n status={notes.status}\n info={notes.info || notes.help}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n />\n </Grid>\n\n <Grid item={{ colStartEnd: '1/-1' }}>\n <RichTextEditor\n label='Detailed meeting notes'\n info='The rich text editor can be used in forms, comments, and documents'\n toolbar={[\n 'inline-styling',\n 'headers',\n 'tables',\n 'links',\n 'images',\n 'lists',\n 'cut-copy-paste',\n 'indentation'\n ]}\n onImageAdded={onImageAdded}\n ref={editorRef}\n />\n </Grid>\n <Grid item={{ colStartEnd: '1/-1' }}>\n <FileInputDemo />\n </Grid>\n <ComboboxFilterableStory />\n </Grid>\n </Form>\n );\n};\n\ninterface FormStoryProps {\n heading?: string;\n description?: string;\n}\n\nexport const OneColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={1} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const TwoColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={2} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const ThreeColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={3} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const SimpleFormDemo: Story<FormStoryProps & { withBanners?: boolean }> = (\n args: FormStoryProps & { withBanners?: boolean }\n) => {\n const [inputValue, setInputValue] = useState('');\n const [success, setSuccess] = useState('');\n\n const actions = (\n <>\n <Button name='Cancel' variant='secondary' onClick={() => setInputValue('')}>\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary'>\n Submit\n </Button>\n </>\n );\n\n const successBanner = (\n <Banner\n id='success'\n variant='success'\n heading='Success'\n messages={['Form submitted', `Input value: ${success}`]}\n />\n );\n\n const errorBanner = (\n <Banner\n id='error'\n variant='urgent'\n heading='Error'\n messages={['All required fields in the form must be completed.']}\n />\n );\n\n const banner = success ? successBanner : errorBanner;\n\n return (\n <Form\n banners={args.withBanners ? banner : undefined}\n actions={actions}\n heading={args.heading}\n description={args.description}\n onSubmit={(e: FormEvent) => {\n e.preventDefault();\n setSuccess(inputValue);\n setInputValue('');\n }}\n >\n <Flex container={{ direction: 'column', itemGap: 2 }}>\n <Input\n label='Name'\n info='Enter your first name'\n required\n value={inputValue}\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n setSuccess('');\n setInputValue(e.target.value);\n }}\n />\n </Flex>\n </Form>\n );\n};\n\nSimpleFormDemo.args = {\n withBanners: false\n};\n\nSimpleFormDemo.argTypes = {\n withBanners: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const StyledContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
2
|
+
fitContent?: boolean | undefined;
|
|
3
|
+
height?: number | undefined;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const StyledItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
//# sourceMappingURL=Grid.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Grid/Grid.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;;;SAiB3B,CAAC;AAIF,eAAO,MAAM,UAAU,yGAerB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { calculateFontSize, defaultThemeProp } from '@pega/cosmos-react-core';
|
|
3
|
+
export const StyledContainer = styled.div(({ fitContent, height, theme }) => {
|
|
4
|
+
return css `
|
|
5
|
+
border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};
|
|
6
|
+
background-color: ${theme.base.colors.blue.light};
|
|
7
|
+
|
|
8
|
+
${height &&
|
|
9
|
+
css `
|
|
10
|
+
height: ${height}rem;
|
|
11
|
+
`}
|
|
12
|
+
|
|
13
|
+
${fitContent &&
|
|
14
|
+
css `
|
|
15
|
+
width: fit-content;
|
|
16
|
+
`}
|
|
17
|
+
`;
|
|
18
|
+
});
|
|
19
|
+
StyledContainer.defaultProps = defaultThemeProp;
|
|
20
|
+
export const StyledItem = styled.div(({ theme }) => {
|
|
21
|
+
const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
|
|
22
|
+
return css `
|
|
23
|
+
border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};
|
|
24
|
+
padding: ${theme.base.spacing};
|
|
25
|
+
text-align: center;
|
|
26
|
+
background-color: ${theme.base.colors.orange.light};
|
|
27
|
+
color: ${theme.base.colors.black};
|
|
28
|
+
|
|
29
|
+
span {
|
|
30
|
+
font-size: ${fontSize.xl};
|
|
31
|
+
font-weight: ${theme.base['font-weight'].bold};
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
34
|
+
});
|
|
35
|
+
StyledItem.defaultProps = defaultThemeProp;
|
|
36
|
+
//# sourceMappingURL=Grid.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.styles.js","sourceRoot":"","sources":["../../../src/core/Grid/Grid.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE9E,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CACvC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;IAChC,OAAO,GAAG,CAAA;2BACa,KAAK,CAAC,IAAI,CAAC,OAAO,WAAW,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;0BACrD,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK;;QAE9C,MAAM;QACR,GAAG,CAAA;kBACS,MAAM;OACjB;;QAEC,UAAU;QACZ,GAAG,CAAA;;OAEF;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACjD,MAAM,QAAQ,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAEtF,OAAO,GAAG,CAAA;yBACa,KAAK,CAAC,IAAI,CAAC,OAAO,WAAW,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;eAC9D,KAAK,CAAC,IAAI,CAAC,OAAO;;wBAET,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK;aACzC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;;mBAGjB,QAAQ,CAAC,EAAE;qBACT,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI;;GAEhD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { calculateFontSize, defaultThemeProp } from '@pega/cosmos-react-core';\n\nexport const StyledContainer = styled.div<{ fitContent?: boolean; height?: number }>(\n ({ fitContent, height, theme }) => {\n return css`\n border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};\n background-color: ${theme.base.colors.blue.light};\n\n ${height &&\n css`\n height: ${height}rem;\n `}\n\n ${fitContent &&\n css`\n width: fit-content;\n `}\n `;\n }\n);\n\nStyledContainer.defaultProps = defaultThemeProp;\n\nexport const StyledItem = styled.div(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};\n padding: ${theme.base.spacing};\n text-align: center;\n background-color: ${theme.base.colors.orange.light};\n color: ${theme.base.colors.black};\n\n span {\n font-size: ${fontSize.xl};\n font-weight: ${theme.base['font-weight'].bold};\n }\n `;\n});\n\nStyledItem.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import { GridContainerProps } from '@pega/cosmos-react-core';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
interface GridStoryProps {
|
|
7
|
+
colGap?: GridContainerProps['colGap'];
|
|
8
|
+
rowGap?: GridContainerProps['rowGap'];
|
|
9
|
+
pad?: GridContainerProps['pad'];
|
|
10
|
+
justifyItems?: GridContainerProps['justifyItems'];
|
|
11
|
+
justifyContent?: GridContainerProps['justifyContent'];
|
|
12
|
+
alignItems?: GridContainerProps['alignItems'];
|
|
13
|
+
alignContent?: GridContainerProps['alignContent'];
|
|
14
|
+
}
|
|
15
|
+
export declare const ColumnsAndRows: () => JSX.Element;
|
|
16
|
+
export declare const Areas: () => JSX.Element;
|
|
17
|
+
export declare const Template: () => JSX.Element;
|
|
18
|
+
export declare const GapAndPadding: Story<GridStoryProps>;
|
|
19
|
+
export declare const JustifyItems: Story<GridStoryProps>;
|
|
20
|
+
export declare const JustifyContent: Story<GridStoryProps>;
|
|
21
|
+
export declare const AlignItems: Story<GridStoryProps>;
|
|
22
|
+
export declare const AlignContent: Story<GridStoryProps>;
|
|
23
|
+
//# sourceMappingURL=GridContainer.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridContainer.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Grid/GridContainer.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAQ,kBAAkB,EAAQ,MAAM,yBAAyB,CAAC;;AAIzE,wBAMU;AAEV,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,GAAG,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAClD,cAAc,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACtD,UAAU,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,eAAO,MAAM,cAAc,mBAkB1B,CAAC;AAEF,eAAO,MAAM,KAAK,mBA0BjB,CAAC;AAEF,eAAO,MAAM,QAAQ,mBAyBpB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,cAAc,CAoB/C,CAAC;AAcF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,cAAc,CAmB9C,CAAC;AAUF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,cAAc,CAkBhD,CAAC;AAaF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,cAAc,CAmB5C,CAAC;AAUF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,cAAc,CAoB9C,CAAC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { Grid, Text } from '@pega/cosmos-react-core';
|
|
2
|
+
import { StyledContainer, StyledItem } from './Grid.styles';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Core/Grid/Container',
|
|
5
|
+
component: Grid,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'fullscreen'
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export const ColumnsAndRows = () => {
|
|
11
|
+
return (<Grid container={{
|
|
12
|
+
cols: '7rem [line1] 1fr [line2] 3fr [line3]',
|
|
13
|
+
rows: 'repeat(3, 3rem) auto',
|
|
14
|
+
pad: 2
|
|
15
|
+
}} as={StyledContainer} height={20}>
|
|
16
|
+
{[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (<StyledItem key={`colRows-${index}`}>
|
|
17
|
+
<Text>Item {index}</Text>
|
|
18
|
+
</StyledItem>))}
|
|
19
|
+
</Grid>);
|
|
20
|
+
};
|
|
21
|
+
export const Areas = () => {
|
|
22
|
+
return (<Grid container={{
|
|
23
|
+
cols: '5rem 1fr 3fr',
|
|
24
|
+
rows: 'repeat(3, 3rem) auto',
|
|
25
|
+
areas: '"sidebar header header" "sidebar . main" "sidebar . main" "sidebar footer footer"',
|
|
26
|
+
pad: 2
|
|
27
|
+
}} as={StyledContainer} height={20}>
|
|
28
|
+
<Grid item={{ area: 'header' }} as={StyledItem}>
|
|
29
|
+
<Text>Header</Text>
|
|
30
|
+
</Grid>
|
|
31
|
+
<Grid item={{ area: 'sidebar' }} as={StyledItem}>
|
|
32
|
+
<Text>Side</Text>
|
|
33
|
+
</Grid>
|
|
34
|
+
<Grid item={{ area: 'main' }} as={StyledItem}>
|
|
35
|
+
<Text>Main</Text>
|
|
36
|
+
</Grid>
|
|
37
|
+
<Grid item={{ area: 'footer' }} as={StyledItem}>
|
|
38
|
+
<Text>Footer</Text>
|
|
39
|
+
</Grid>
|
|
40
|
+
</Grid>);
|
|
41
|
+
};
|
|
42
|
+
export const Template = () => {
|
|
43
|
+
const rowsAndAreas = '"sidebar header header" 3rem "sidebar . main" 3rem "sidebar . main" 3rem "sidebar footer footer" auto';
|
|
44
|
+
const columns = '5rem 1fr 3fr';
|
|
45
|
+
return (<Grid container={{ template: `${rowsAndAreas} / ${columns}`, pad: 2 }} as={StyledContainer} height={20}>
|
|
46
|
+
<Grid item={{ area: 'header' }} as={StyledItem}>
|
|
47
|
+
<Text>Header</Text>
|
|
48
|
+
</Grid>
|
|
49
|
+
<Grid item={{ area: 'sidebar' }} as={StyledItem}>
|
|
50
|
+
<Text>Side</Text>
|
|
51
|
+
</Grid>
|
|
52
|
+
<Grid item={{ area: 'main' }} as={StyledItem}>
|
|
53
|
+
<Text>Main</Text>
|
|
54
|
+
</Grid>
|
|
55
|
+
<Grid item={{ area: 'footer' }} as={StyledItem}>
|
|
56
|
+
<Text>Footer</Text>
|
|
57
|
+
</Grid>
|
|
58
|
+
</Grid>);
|
|
59
|
+
};
|
|
60
|
+
export const GapAndPadding = (args) => {
|
|
61
|
+
return (<Grid container={{
|
|
62
|
+
cols: '7rem 1fr 3fr',
|
|
63
|
+
colGap: args.colGap,
|
|
64
|
+
rows: 'repeat(3, 3rem) auto',
|
|
65
|
+
rowGap: args.rowGap,
|
|
66
|
+
pad: args.pad
|
|
67
|
+
}} as={StyledContainer} height={20}>
|
|
68
|
+
{[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (<StyledItem key={`colRowGap-${index}`}>
|
|
69
|
+
<Text>Item {index}</Text>
|
|
70
|
+
</StyledItem>))}
|
|
71
|
+
</Grid>);
|
|
72
|
+
};
|
|
73
|
+
GapAndPadding.args = {
|
|
74
|
+
pad: 1,
|
|
75
|
+
colGap: 1,
|
|
76
|
+
rowGap: 1
|
|
77
|
+
};
|
|
78
|
+
GapAndPadding.argTypes = {
|
|
79
|
+
pad: { control: { type: 'number' } },
|
|
80
|
+
colGap: { control: { type: 'number' } },
|
|
81
|
+
rowGap: { control: { type: 'number' } }
|
|
82
|
+
};
|
|
83
|
+
export const JustifyItems = (args) => {
|
|
84
|
+
return (<Grid container={{
|
|
85
|
+
cols: '7rem 1fr 3fr',
|
|
86
|
+
rows: 'repeat(3, 3rem) auto',
|
|
87
|
+
justifyItems: args.justifyItems,
|
|
88
|
+
pad: 2
|
|
89
|
+
}} as={StyledContainer} height={20}>
|
|
90
|
+
{[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (<StyledItem key={`justifyItems-${index}`}>
|
|
91
|
+
<Text>Item {index}</Text>
|
|
92
|
+
</StyledItem>))}
|
|
93
|
+
</Grid>);
|
|
94
|
+
};
|
|
95
|
+
JustifyItems.args = {
|
|
96
|
+
justifyItems: 'stretch'
|
|
97
|
+
};
|
|
98
|
+
JustifyItems.argTypes = {
|
|
99
|
+
justifyItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }
|
|
100
|
+
};
|
|
101
|
+
export const JustifyContent = (args) => {
|
|
102
|
+
return (<Grid container={{
|
|
103
|
+
cols: 'repeat(3, 7rem)',
|
|
104
|
+
rows: 'repeat(4, 3rem)',
|
|
105
|
+
justifyContent: args.justifyContent,
|
|
106
|
+
pad: 2
|
|
107
|
+
}} as={StyledContainer}>
|
|
108
|
+
{[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (<StyledItem key={`justifyContent-${index}`}>
|
|
109
|
+
<Text>Item {index}</Text>
|
|
110
|
+
</StyledItem>))}
|
|
111
|
+
</Grid>);
|
|
112
|
+
};
|
|
113
|
+
JustifyContent.args = {
|
|
114
|
+
justifyContent: 'start'
|
|
115
|
+
};
|
|
116
|
+
JustifyContent.argTypes = {
|
|
117
|
+
justifyContent: {
|
|
118
|
+
options: ['start', 'end', 'center', 'around', 'between', 'evenly'],
|
|
119
|
+
control: { type: 'select' }
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
export const AlignItems = (args) => {
|
|
123
|
+
return (<Grid container={{
|
|
124
|
+
cols: '7rem 1fr 3fr',
|
|
125
|
+
rows: 'repeat(3, 5rem) auto',
|
|
126
|
+
alignItems: args.alignItems,
|
|
127
|
+
pad: 2
|
|
128
|
+
}} as={StyledContainer} height={20}>
|
|
129
|
+
{[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (<StyledItem key={`alignItems-${index}`}>
|
|
130
|
+
<Text>Item {index}</Text>
|
|
131
|
+
</StyledItem>))}
|
|
132
|
+
</Grid>);
|
|
133
|
+
};
|
|
134
|
+
AlignItems.args = {
|
|
135
|
+
alignItems: 'stretch'
|
|
136
|
+
};
|
|
137
|
+
AlignItems.argTypes = {
|
|
138
|
+
alignItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }
|
|
139
|
+
};
|
|
140
|
+
export const AlignContent = (args) => {
|
|
141
|
+
return (<Grid container={{
|
|
142
|
+
cols: 'repeat(3, 7rem)',
|
|
143
|
+
rows: 'repeat(4, 3rem)',
|
|
144
|
+
alignContent: args.alignContent,
|
|
145
|
+
pad: 2
|
|
146
|
+
}} as={StyledContainer} height={30} fitContent>
|
|
147
|
+
{[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (<StyledItem key={`alignContent-${index}`}>
|
|
148
|
+
<Text>Item {index}</Text>
|
|
149
|
+
</StyledItem>))}
|
|
150
|
+
</Grid>);
|
|
151
|
+
};
|
|
152
|
+
AlignContent.args = {
|
|
153
|
+
alignContent: 'start'
|
|
154
|
+
};
|
|
155
|
+
AlignContent.argTypes = {
|
|
156
|
+
alignContent: {
|
|
157
|
+
options: ['start', 'end', 'center', 'around', 'between', 'evenly'],
|
|
158
|
+
control: { type: 'select' }
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
//# sourceMappingURL=GridContainer.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridContainer.stories.jsx","sourceRoot":"","sources":["../../../src/core/Grid/GridContainer.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAsB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE5D,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,MAAM,EAA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AAE,IAAI,CAAC,YAAY;YAC/B,GAAG,EAAE,CAAC;SACP,CAAC,CACF,EAAE,CAAC,CAAC,eAAe,CAAC,CACpB,MAAM,CAAC,CAAC,EAAE,CAAC,CACX,UAAU,CAEV;MAAA,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CACpD,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,gBAAgB,KAAK,EAAE,CAAC,CACvC;UAAA,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,CAC1B;QAAA,EAAE,UAAU,CAAC,CACd,CAAC,CACJ;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,IAAI,GAAG;IAClB,YAAY,EAAE,OAAO;CACtB,CAAC;AAEF,YAAY,CAAC,QAAQ,GAAG;IACtB,YAAY,EAAE;QACZ,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC;QAClE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;CACF,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Grid, GridContainerProps, Text } from '@pega/cosmos-react-core';\n\nimport { StyledContainer, StyledItem } from './Grid.styles';\n\nexport default {\n title: 'Core/Grid/Container',\n component: Grid,\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface GridStoryProps {\n colGap?: GridContainerProps['colGap'];\n rowGap?: GridContainerProps['rowGap'];\n pad?: GridContainerProps['pad'];\n justifyItems?: GridContainerProps['justifyItems'];\n justifyContent?: GridContainerProps['justifyContent'];\n alignItems?: GridContainerProps['alignItems'];\n alignContent?: GridContainerProps['alignContent'];\n}\n\nexport const ColumnsAndRows = () => {\n return (\n <Grid\n container={{\n cols: '7rem [line1] 1fr [line2] 3fr [line3]',\n rows: 'repeat(3, 3rem) auto',\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`colRows-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nexport const Areas = () => {\n return (\n <Grid\n container={{\n cols: '5rem 1fr 3fr',\n rows: 'repeat(3, 3rem) auto',\n areas: '\"sidebar header header\" \"sidebar . main\" \"sidebar . main\" \"sidebar footer footer\"',\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n <Grid item={{ area: 'header' }} as={StyledItem}>\n <Text>Header</Text>\n </Grid>\n <Grid item={{ area: 'sidebar' }} as={StyledItem}>\n <Text>Side</Text>\n </Grid>\n <Grid item={{ area: 'main' }} as={StyledItem}>\n <Text>Main</Text>\n </Grid>\n <Grid item={{ area: 'footer' }} as={StyledItem}>\n <Text>Footer</Text>\n </Grid>\n </Grid>\n );\n};\n\nexport const Template = () => {\n const rowsAndAreas =\n '\"sidebar header header\" 3rem \"sidebar . main\" 3rem \"sidebar . main\" 3rem \"sidebar footer footer\" auto';\n const columns = '5rem 1fr 3fr';\n\n return (\n <Grid\n container={{ template: `${rowsAndAreas} / ${columns}`, pad: 2 }}\n as={StyledContainer}\n height={20}\n >\n <Grid item={{ area: 'header' }} as={StyledItem}>\n <Text>Header</Text>\n </Grid>\n <Grid item={{ area: 'sidebar' }} as={StyledItem}>\n <Text>Side</Text>\n </Grid>\n <Grid item={{ area: 'main' }} as={StyledItem}>\n <Text>Main</Text>\n </Grid>\n <Grid item={{ area: 'footer' }} as={StyledItem}>\n <Text>Footer</Text>\n </Grid>\n </Grid>\n );\n};\n\nexport const GapAndPadding: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: '7rem 1fr 3fr',\n colGap: args.colGap,\n rows: 'repeat(3, 3rem) auto',\n rowGap: args.rowGap,\n pad: args.pad\n }}\n as={StyledContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`colRowGap-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nGapAndPadding.args = {\n pad: 1,\n colGap: 1,\n rowGap: 1\n};\n\nGapAndPadding.argTypes = {\n pad: { control: { type: 'number' } },\n colGap: { control: { type: 'number' } },\n rowGap: { control: { type: 'number' } }\n};\n\nexport const JustifyItems: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: '7rem 1fr 3fr',\n rows: 'repeat(3, 3rem) auto',\n justifyItems: args.justifyItems,\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`justifyItems-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nJustifyItems.args = {\n justifyItems: 'stretch'\n};\n\nJustifyItems.argTypes = {\n justifyItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n\nexport const JustifyContent: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: 'repeat(3, 7rem)',\n rows: 'repeat(4, 3rem)',\n justifyContent: args.justifyContent,\n pad: 2\n }}\n as={StyledContainer}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`justifyContent-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nJustifyContent.args = {\n justifyContent: 'start'\n};\n\nJustifyContent.argTypes = {\n justifyContent: {\n options: ['start', 'end', 'center', 'around', 'between', 'evenly'],\n control: { type: 'select' }\n }\n};\n\nexport const AlignItems: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: '7rem 1fr 3fr',\n rows: 'repeat(3, 5rem) auto',\n alignItems: args.alignItems,\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`alignItems-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nAlignItems.args = {\n alignItems: 'stretch'\n};\n\nAlignItems.argTypes = {\n alignItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n\nexport const AlignContent: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: 'repeat(3, 7rem)',\n rows: 'repeat(4, 3rem)',\n alignContent: args.alignContent,\n pad: 2\n }}\n as={StyledContainer}\n height={30}\n fitContent\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`alignContent-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nAlignContent.args = {\n alignContent: 'start'\n};\n\nAlignContent.argTypes = {\n alignContent: {\n options: ['start', 'end', 'center', 'around', 'between', 'evenly'],\n control: { type: 'select' }\n }\n};\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import { GridItemProps } from '@pega/cosmos-react-core';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
interface GridStoryProps {
|
|
7
|
+
justifySelf?: GridItemProps['justifySelf'];
|
|
8
|
+
alignSelf?: GridItemProps['alignSelf'];
|
|
9
|
+
}
|
|
10
|
+
export declare const StartAndEnd: () => JSX.Element;
|
|
11
|
+
export declare const JustifySelf: Story<GridStoryProps>;
|
|
12
|
+
export declare const AlignSelf: Story<GridStoryProps>;
|
|
13
|
+
//# sourceMappingURL=GridItem.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridItem.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Grid/GridItem.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAQ,aAAa,EAAQ,MAAM,yBAAyB,CAAC;;AAIpE,wBAMU;AAEV,UAAU,cAAc;IACtB,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,WAAW,mBAkCvB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,cAAc,CAc7C,CAAC;AAUF,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,cAAc,CAc3C,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Grid, Text } from '@pega/cosmos-react-core';
|
|
2
|
+
import { StyledContainer, StyledItem } from './Grid.styles';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Core/Grid/Item',
|
|
5
|
+
component: Grid,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'fullscreen'
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export const StartAndEnd = () => {
|
|
11
|
+
return (<Grid container={{
|
|
12
|
+
cols: '[line0] 7rem [line1] 1fr [col2-end col3-start] 3fr [line3]',
|
|
13
|
+
rows: 'repeat(3, 3rem) auto',
|
|
14
|
+
pad: 2
|
|
15
|
+
}} as={StyledContainer} height={20}>
|
|
16
|
+
<Grid item={{ colStart: 'line0', colEnd: 'col3-start' }} as={StyledItem}>
|
|
17
|
+
<Text>Item 1</Text>
|
|
18
|
+
</Grid>
|
|
19
|
+
<StyledItem>
|
|
20
|
+
<Text>Item 2</Text>
|
|
21
|
+
</StyledItem>
|
|
22
|
+
<StyledItem>
|
|
23
|
+
<Text>Item 3</Text>
|
|
24
|
+
</StyledItem>
|
|
25
|
+
<Grid item={{ colStart: 'line1', colEnd: 'line3' }} as={StyledItem}>
|
|
26
|
+
<Text>Item 4</Text>
|
|
27
|
+
</Grid>
|
|
28
|
+
<Grid item={{ rowStart: '3', rowEnd: '5' }} as={StyledItem}>
|
|
29
|
+
<Text>Item 5</Text>
|
|
30
|
+
</Grid>
|
|
31
|
+
<Grid item={{ colStart: '2', colEnd: 'span line3', rowStart: '3', rowEnd: 'span 2' }} as={StyledItem}>
|
|
32
|
+
<Text>Item 6</Text>
|
|
33
|
+
</Grid>
|
|
34
|
+
</Grid>);
|
|
35
|
+
};
|
|
36
|
+
export const JustifySelf = (args) => {
|
|
37
|
+
return (<Grid container={{ cols: '7rem 1fr 3fr', pad: 2 }} as={StyledContainer}>
|
|
38
|
+
<StyledItem>
|
|
39
|
+
<Text>Item 1</Text>
|
|
40
|
+
</StyledItem>
|
|
41
|
+
<Grid item={{ justifySelf: args.justifySelf }} as={StyledItem} editable>
|
|
42
|
+
<Text>Item 2</Text>
|
|
43
|
+
</Grid>
|
|
44
|
+
<StyledItem>
|
|
45
|
+
<Text>Item 3</Text>
|
|
46
|
+
</StyledItem>
|
|
47
|
+
</Grid>);
|
|
48
|
+
};
|
|
49
|
+
JustifySelf.args = {
|
|
50
|
+
justifySelf: 'stretch'
|
|
51
|
+
};
|
|
52
|
+
JustifySelf.argTypes = {
|
|
53
|
+
justifySelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }
|
|
54
|
+
};
|
|
55
|
+
export const AlignSelf = (args) => {
|
|
56
|
+
return (<Grid container={{ cols: '7rem 1fr 3fr', pad: 2 }} as={StyledContainer} height={10} fitContent>
|
|
57
|
+
<StyledItem>
|
|
58
|
+
<Text>Item 1</Text>
|
|
59
|
+
</StyledItem>
|
|
60
|
+
<Grid item={{ alignSelf: args.alignSelf }} as={StyledItem} editable>
|
|
61
|
+
<Text>Item 2</Text>
|
|
62
|
+
</Grid>
|
|
63
|
+
<StyledItem>
|
|
64
|
+
<Text>Item 3</Text>
|
|
65
|
+
</StyledItem>
|
|
66
|
+
</Grid>);
|
|
67
|
+
};
|
|
68
|
+
AlignSelf.args = {
|
|
69
|
+
alignSelf: 'stretch'
|
|
70
|
+
};
|
|
71
|
+
AlignSelf.argTypes = {
|
|
72
|
+
alignSelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=GridItem.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridItem.stories.jsx","sourceRoot":"","sources":["../../../src/core/Grid/GridItem.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAiB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE5D,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAOV,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,OAAO,CACL,CAAC,IAAI,CACH,SAAS,CAAC,CAAC;YACT,IAAI,EAAE,4DAA4D;YAClE,IAAI,EAAE,sBAAsB;YAC5B,GAAG,EAAE,CAAC;SACP,CAAC,CACF,EAAE,CAAC,CAAC,eAAe,CAAC,CACpB,MAAM,CAAC,CAAC,EAAE,CAAC,CAEX;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CACtE;QAAA,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CACpB;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,UAAU,CACT;Q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C,IAAI,CAAC,MAAM,EAAE,IAAI,CACpB;MAAA,EAAE,UAAU,CACd;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,CAAC,IAAI,GAAG;IACf,SAAS,EAAE,SAAS;CACrB,CAAC;AAEF,SAAS,CAAC,QAAQ,GAAG;IACnB,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC3F,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Grid, GridItemProps, Text } from '@pega/cosmos-react-core';\n\nimport { StyledContainer, StyledItem } from './Grid.styles';\n\nexport default {\n title: 'Core/Grid/Item',\n component: Grid,\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface GridStoryProps {\n justifySelf?: GridItemProps['justifySelf'];\n alignSelf?: GridItemProps['alignSelf'];\n}\n\nexport const StartAndEnd = () => {\n return (\n <Grid\n container={{\n cols: '[line0] 7rem [line1] 1fr [col2-end col3-start] 3fr [line3]',\n rows: 'repeat(3, 3rem) auto',\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n <Grid item={{ colStart: 'line0', colEnd: 'col3-start' }} as={StyledItem}>\n <Text>Item 1</Text>\n </Grid>\n <StyledItem>\n <Text>Item 2</Text>\n </StyledItem>\n <StyledItem>\n <Text>Item 3</Text>\n </StyledItem>\n <Grid item={{ colStart: 'line1', colEnd: 'line3' }} as={StyledItem}>\n <Text>Item 4</Text>\n </Grid>\n <Grid item={{ rowStart: '3', rowEnd: '5' }} as={StyledItem}>\n <Text>Item 5</Text>\n </Grid>\n <Grid\n item={{ colStart: '2', colEnd: 'span line3', rowStart: '3', rowEnd: 'span 2' }}\n as={StyledItem}\n >\n <Text>Item 6</Text>\n </Grid>\n </Grid>\n );\n};\n\nexport const JustifySelf: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid container={{ cols: '7rem 1fr 3fr', pad: 2 }} as={StyledContainer}>\n <StyledItem>\n <Text>Item 1</Text>\n </StyledItem>\n <Grid item={{ justifySelf: args.justifySelf }} as={StyledItem} editable>\n <Text>Item 2</Text>\n </Grid>\n <StyledItem>\n <Text>Item 3</Text>\n </StyledItem>\n </Grid>\n );\n};\n\nJustifySelf.args = {\n justifySelf: 'stretch'\n};\n\nJustifySelf.argTypes = {\n justifySelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n\nexport const AlignSelf: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid container={{ cols: '7rem 1fr 3fr', pad: 2 }} as={StyledContainer} height={10} fitContent>\n <StyledItem>\n <Text>Item 1</Text>\n </StyledItem>\n <Grid item={{ alignSelf: args.alignSelf }} as={StyledItem} editable>\n <Text>Item 2</Text>\n </Grid>\n <StyledItem>\n <Text>Item 3</Text>\n </StyledItem>\n </Grid>\n );\n};\n\nAlignSelf.args = {\n alignSelf: 'stretch'\n};\n\nAlignSelf.argTypes = {\n alignSelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const StaticIcon: () => JSX.Element;
|
|
6
|
+
export declare const DynamicIcon: () => JSX.Element;
|
|
7
|
+
export declare const IconList: () => JSX.Element;
|
|
8
|
+
//# sourceMappingURL=Icon.stories.d.ts.map
|