@pega/cosmos-react-demos 7.11.3 → 7.11.4-10
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/package.json +7 -7
- package/jsx/build/DynamicInput/DynamicInput.mocks.d.ts +0 -22
- package/jsx/build/DynamicInput/DynamicInput.mocks.d.ts.map +0 -1
- package/jsx/build/DynamicInput/DynamicInput.mocks.js +0 -75
- package/jsx/build/DynamicInput/DynamicInput.mocks.js.map +0 -1
- package/jsx/build/DynamicInput/DynamicInput.stories.d.ts +0 -12
- package/jsx/build/DynamicInput/DynamicInput.stories.d.ts.map +0 -1
- package/jsx/build/DynamicInput/DynamicInput.stories.jsx +0 -326
- package/jsx/build/DynamicInput/DynamicInput.stories.jsx.map +0 -1
- package/jsx/build/FieldReference/FieldReference.mocks.d.ts +0 -22
- package/jsx/build/FieldReference/FieldReference.mocks.d.ts.map +0 -1
- package/jsx/build/FieldReference/FieldReference.mocks.js +0 -727
- package/jsx/build/FieldReference/FieldReference.mocks.js.map +0 -1
- package/jsx/build/FieldReference/FieldReference.stories.d.ts +0 -30
- package/jsx/build/FieldReference/FieldReference.stories.d.ts.map +0 -1
- package/jsx/build/FieldReference/FieldReference.stories.jsx +0 -164
- package/jsx/build/FieldReference/FieldReference.stories.jsx.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts +0 -3
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js +0 -15
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +0 -19
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx +0 -297
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts +0 -5
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.js +0 -15
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.js.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts +0 -6
- package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/props.mock.js +0 -230
- package/jsx/condition-builder/ConditionBuilder/props.mock.js.map +0 -1
- package/jsx/condition-builder/ConditionInput/ConditionInput.stories.d.ts +0 -10
- package/jsx/condition-builder/ConditionInput/ConditionInput.stories.d.ts.map +0 -1
- package/jsx/condition-builder/ConditionInput/ConditionInput.stories.jsx +0 -40
- package/jsx/condition-builder/ConditionInput/ConditionInput.stories.jsx.map +0 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts +0 -4
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts.map +0 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.js +0 -233
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.js.map +0 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.d.ts +0 -8
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.d.ts.map +0 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.jsx +0 -31
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.jsx.map +0 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.d.ts +0 -9
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.d.ts.map +0 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.js +0 -35
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.js.map +0 -1
- package/jsx/core/AIButton/AIButton.mocks.d.ts +0 -22
- package/jsx/core/AIButton/AIButton.mocks.d.ts.map +0 -1
- package/jsx/core/AIButton/AIButton.mocks.js +0 -136
- package/jsx/core/AIButton/AIButton.mocks.js.map +0 -1
- package/jsx/core/AIButton/AIButton.stories.d.ts +0 -23
- package/jsx/core/AIButton/AIButton.stories.d.ts.map +0 -1
- package/jsx/core/AIButton/AIButton.stories.jsx +0 -318
- package/jsx/core/AIButton/AIButton.stories.jsx.map +0 -1
- package/jsx/core/AdditionalInfo/AdditionalInfo.stories.d.ts +0 -9
- package/jsx/core/AdditionalInfo/AdditionalInfo.stories.d.ts.map +0 -1
- package/jsx/core/AdditionalInfo/AdditionalInfo.stories.jsx +0 -25
- package/jsx/core/AdditionalInfo/AdditionalInfo.stories.jsx.map +0 -1
- package/jsx/core/AppShell/AppShell.mocks.d.ts +0 -30
- package/jsx/core/AppShell/AppShell.mocks.d.ts.map +0 -1
- package/jsx/core/AppShell/AppShell.mocks.jsx +0 -169
- package/jsx/core/AppShell/AppShell.mocks.jsx.map +0 -1
- package/jsx/core/AppShell/AppShell.stories.d.ts +0 -40
- package/jsx/core/AppShell/AppShell.stories.d.ts.map +0 -1
- package/jsx/core/AppShell/AppShell.stories.jsx +0 -268
- package/jsx/core/AppShell/AppShell.stories.jsx.map +0 -1
- package/jsx/core/AppShell/AppShell.styles.d.ts +0 -2
- package/jsx/core/AppShell/AppShell.styles.d.ts.map +0 -1
- package/jsx/core/AppShell/AppShell.styles.js +0 -5
- package/jsx/core/AppShell/AppShell.styles.js.map +0 -1
- package/jsx/core/Avatar/Avatar.stories.d.ts +0 -15
- package/jsx/core/Avatar/Avatar.stories.d.ts.map +0 -1
- package/jsx/core/Avatar/Avatar.stories.jsx +0 -75
- package/jsx/core/Avatar/Avatar.stories.jsx.map +0 -1
- package/jsx/core/Backdrop/Backdrop.stories.d.ts +0 -7
- package/jsx/core/Backdrop/Backdrop.stories.d.ts.map +0 -1
- package/jsx/core/Backdrop/Backdrop.stories.jsx +0 -43
- package/jsx/core/Backdrop/Backdrop.stories.jsx.map +0 -1
- package/jsx/core/Badges/Alert.stories.d.ts +0 -6
- package/jsx/core/Badges/Alert.stories.d.ts.map +0 -1
- package/jsx/core/Badges/Alert.stories.jsx +0 -15
- package/jsx/core/Badges/Alert.stories.jsx.map +0 -1
- package/jsx/core/Badges/Count.stories.d.ts +0 -6
- package/jsx/core/Badges/Count.stories.d.ts.map +0 -1
- package/jsx/core/Badges/Count.stories.jsx +0 -20
- package/jsx/core/Badges/Count.stories.jsx.map +0 -1
- package/jsx/core/Badges/Keyboard.stories.d.ts +0 -6
- package/jsx/core/Badges/Keyboard.stories.d.ts.map +0 -1
- package/jsx/core/Badges/Keyboard.stories.jsx +0 -17
- package/jsx/core/Badges/Keyboard.stories.jsx.map +0 -1
- package/jsx/core/Badges/Selection.stories.d.ts +0 -5
- package/jsx/core/Badges/Selection.stories.d.ts.map +0 -1
- package/jsx/core/Badges/Selection.stories.jsx +0 -9
- package/jsx/core/Badges/Selection.stories.jsx.map +0 -1
- package/jsx/core/Badges/Status.stories.d.ts +0 -11
- package/jsx/core/Badges/Status.stories.d.ts.map +0 -1
- package/jsx/core/Badges/Status.stories.jsx +0 -43
- package/jsx/core/Badges/Status.stories.jsx.map +0 -1
- package/jsx/core/Badges/Tag.stories.d.ts +0 -5
- package/jsx/core/Badges/Tag.stories.d.ts.map +0 -1
- package/jsx/core/Badges/Tag.stories.jsx +0 -9
- package/jsx/core/Badges/Tag.stories.jsx.map +0 -1
- package/jsx/core/Banner/Banner.mocks.d.ts +0 -18
- package/jsx/core/Banner/Banner.mocks.d.ts.map +0 -1
- package/jsx/core/Banner/Banner.mocks.jsx +0 -41
- package/jsx/core/Banner/Banner.mocks.jsx.map +0 -1
- package/jsx/core/Banner/Banner.stories.d.ts +0 -18
- package/jsx/core/Banner/Banner.stories.d.ts.map +0 -1
- package/jsx/core/Banner/Banner.stories.jsx +0 -156
- package/jsx/core/Banner/Banner.stories.jsx.map +0 -1
- package/jsx/core/Boolean/BooleanDisplay.stories.d.ts +0 -6
- package/jsx/core/Boolean/BooleanDisplay.stories.d.ts.map +0 -1
- package/jsx/core/Boolean/BooleanDisplay.stories.jsx +0 -19
- package/jsx/core/Boolean/BooleanDisplay.stories.jsx.map +0 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.d.ts +0 -2
- package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.d.ts.map +0 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.js +0 -8
- package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.js.map +0 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -11
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts.map +0 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.jsx +0 -69
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.jsx.map +0 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.d.ts +0 -2
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.d.ts.map +0 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.js +0 -12
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.js.map +0 -1
- package/jsx/core/Button/Button.stories.d.ts +0 -18
- package/jsx/core/Button/Button.stories.d.ts.map +0 -1
- package/jsx/core/Button/Button.stories.jsx +0 -119
- package/jsx/core/Button/Button.stories.jsx.map +0 -1
- package/jsx/core/Card/Card.stories.d.ts +0 -12
- package/jsx/core/Card/Card.stories.d.ts.map +0 -1
- package/jsx/core/Card/Card.stories.jsx +0 -85
- package/jsx/core/Card/Card.stories.jsx.map +0 -1
- package/jsx/core/Card/Card.styles.d.ts +0 -2
- package/jsx/core/Card/Card.styles.d.ts.map +0 -1
- package/jsx/core/Card/Card.styles.js +0 -5
- package/jsx/core/Card/Card.styles.js.map +0 -1
- package/jsx/core/Checkbox/Checkbox.stories.d.ts +0 -23
- package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +0 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx +0 -104
- package/jsx/core/Checkbox/Checkbox.stories.jsx.map +0 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts +0 -11
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +0 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx +0 -103
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx.map +0 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.d.ts +0 -4
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.d.ts.map +0 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.js +0 -9
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.js.map +0 -1
- package/jsx/core/ColorPicker/ColorPicker.stories.d.ts +0 -10
- package/jsx/core/ColorPicker/ColorPicker.stories.d.ts.map +0 -1
- package/jsx/core/ColorPicker/ColorPicker.stories.jsx +0 -89
- package/jsx/core/ColorPicker/ColorPicker.stories.jsx.map +0 -1
- package/jsx/core/ColorPicker/ColorPicker.styles.d.ts +0 -4
- package/jsx/core/ColorPicker/ColorPicker.styles.d.ts.map +0 -1
- package/jsx/core/ColorPicker/ColorPicker.styles.js +0 -10
- package/jsx/core/ColorPicker/ColorPicker.styles.js.map +0 -1
- package/jsx/core/ComboBox/ComboBox.mocks.d.ts +0 -26
- package/jsx/core/ComboBox/ComboBox.mocks.d.ts.map +0 -1
- package/jsx/core/ComboBox/ComboBox.mocks.jsx +0 -58
- package/jsx/core/ComboBox/ComboBox.mocks.jsx.map +0 -1
- package/jsx/core/ComboBox/ComboBox.stories.d.ts +0 -25
- package/jsx/core/ComboBox/ComboBox.stories.d.ts.map +0 -1
- package/jsx/core/ComboBox/ComboBox.stories.jsx +0 -418
- package/jsx/core/ComboBox/ComboBox.stories.jsx.map +0 -1
- package/jsx/core/CompositeInput/CompositeInput.mocks.d.ts +0 -8
- package/jsx/core/CompositeInput/CompositeInput.mocks.d.ts.map +0 -1
- package/jsx/core/CompositeInput/CompositeInput.mocks.jsx +0 -8
- package/jsx/core/CompositeInput/CompositeInput.mocks.jsx.map +0 -1
- package/jsx/core/CompositeInput/CompositeInput.stories.d.ts +0 -9
- package/jsx/core/CompositeInput/CompositeInput.stories.d.ts.map +0 -1
- package/jsx/core/CompositeInput/CompositeInput.stories.jsx +0 -52
- package/jsx/core/CompositeInput/CompositeInput.stories.jsx.map +0 -1
- package/jsx/core/Configuration/Configuration.mocks.d.ts +0 -7
- package/jsx/core/Configuration/Configuration.mocks.d.ts.map +0 -1
- package/jsx/core/Configuration/Configuration.mocks.jsx +0 -9
- package/jsx/core/Configuration/Configuration.mocks.jsx.map +0 -1
- package/jsx/core/Configuration/Configuration.stories.d.ts +0 -25
- package/jsx/core/Configuration/Configuration.stories.d.ts.map +0 -1
- package/jsx/core/Configuration/Configuration.stories.jsx +0 -196
- package/jsx/core/Configuration/Configuration.stories.jsx.map +0 -1
- package/jsx/core/Configuration/Configuration.styles.d.ts +0 -6
- package/jsx/core/Configuration/Configuration.styles.d.ts.map +0 -1
- package/jsx/core/Configuration/Configuration.styles.js +0 -12
- package/jsx/core/Configuration/Configuration.styles.js.map +0 -1
- package/jsx/core/CreditCard/CreditCard.stories.d.ts +0 -14
- package/jsx/core/CreditCard/CreditCard.stories.d.ts.map +0 -1
- package/jsx/core/CreditCard/CreditCard.stories.jsx +0 -50
- package/jsx/core/CreditCard/CreditCard.stories.jsx.map +0 -1
- package/jsx/core/Currency/Currency.stories.d.ts +0 -19
- package/jsx/core/Currency/Currency.stories.d.ts.map +0 -1
- package/jsx/core/Currency/Currency.stories.jsx +0 -105
- package/jsx/core/Currency/Currency.stories.jsx.map +0 -1
- package/jsx/core/DangerButton/DangerButton.stories.d.ts +0 -6
- package/jsx/core/DangerButton/DangerButton.stories.d.ts.map +0 -1
- package/jsx/core/DangerButton/DangerButton.stories.jsx +0 -17
- package/jsx/core/DangerButton/DangerButton.stories.jsx.map +0 -1
- package/jsx/core/DateTime/DateTime.stories.d.ts +0 -54
- package/jsx/core/DateTime/DateTime.stories.d.ts.map +0 -1
- package/jsx/core/DateTime/DateTime.stories.jsx +0 -292
- package/jsx/core/DateTime/DateTime.stories.jsx.map +0 -1
- package/jsx/core/DateTime/DateTimeDisplay.stories.d.ts +0 -7
- package/jsx/core/DateTime/DateTimeDisplay.stories.d.ts.map +0 -1
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +0 -54
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +0 -1
- package/jsx/core/DateTime/DateTimePicker.stories.d.ts +0 -7
- package/jsx/core/DateTime/DateTimePicker.stories.d.ts.map +0 -1
- package/jsx/core/DateTime/DateTimePicker.stories.jsx +0 -34
- package/jsx/core/DateTime/DateTimePicker.stories.jsx.map +0 -1
- package/jsx/core/Dialog/Dialog.stories.d.ts +0 -7
- package/jsx/core/Dialog/Dialog.stories.d.ts.map +0 -1
- package/jsx/core/Dialog/Dialog.stories.jsx +0 -15
- package/jsx/core/Dialog/Dialog.stories.jsx.map +0 -1
- package/jsx/core/Dialog/FormDialog.mocks.d.ts +0 -27
- package/jsx/core/Dialog/FormDialog.mocks.d.ts.map +0 -1
- package/jsx/core/Dialog/FormDialog.mocks.jsx +0 -194
- package/jsx/core/Dialog/FormDialog.mocks.jsx.map +0 -1
- package/jsx/core/Dialog/InfoDialog.mocks.d.ts +0 -4
- package/jsx/core/Dialog/InfoDialog.mocks.d.ts.map +0 -1
- package/jsx/core/Dialog/InfoDialog.mocks.jsx +0 -64
- package/jsx/core/Dialog/InfoDialog.mocks.jsx.map +0 -1
- package/jsx/core/Drawer/Drawer.stories.d.ts +0 -7
- package/jsx/core/Drawer/Drawer.stories.d.ts.map +0 -1
- package/jsx/core/Drawer/Drawer.stories.jsx +0 -98
- package/jsx/core/Drawer/Drawer.stories.jsx.map +0 -1
- package/jsx/core/Drawer/Drawer.styles.d.ts +0 -2
- package/jsx/core/Drawer/Drawer.styles.d.ts.map +0 -1
- package/jsx/core/Drawer/Drawer.styles.js +0 -11
- package/jsx/core/Drawer/Drawer.styles.js.map +0 -1
- package/jsx/core/Email/EmailDisplay.stories.d.ts +0 -6
- package/jsx/core/Email/EmailDisplay.stories.d.ts.map +0 -1
- package/jsx/core/Email/EmailDisplay.stories.jsx +0 -19
- package/jsx/core/Email/EmailDisplay.stories.jsx.map +0 -1
- package/jsx/core/EmojiPicker/EmojiPicker.stories.d.ts +0 -8
- package/jsx/core/EmojiPicker/EmojiPicker.stories.d.ts.map +0 -1
- package/jsx/core/EmojiPicker/EmojiPicker.stories.jsx +0 -53
- package/jsx/core/EmojiPicker/EmojiPicker.stories.jsx.map +0 -1
- package/jsx/core/EmptyState/EmptyState.stories.d.ts +0 -6
- package/jsx/core/EmptyState/EmptyState.stories.d.ts.map +0 -1
- package/jsx/core/EmptyState/EmptyState.stories.jsx +0 -18
- package/jsx/core/EmptyState/EmptyState.stories.jsx.map +0 -1
- package/jsx/core/ErrorState/ErrorState.stories.d.ts +0 -9
- package/jsx/core/ErrorState/ErrorState.stories.d.ts.map +0 -1
- package/jsx/core/ErrorState/ErrorState.stories.jsx +0 -20
- package/jsx/core/ErrorState/ErrorState.stories.jsx.map +0 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.stories.d.ts +0 -7
- package/jsx/core/ExpandCollapse/ExpandCollapse.stories.d.ts.map +0 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.stories.jsx +0 -73
- package/jsx/core/ExpandCollapse/ExpandCollapse.stories.jsx.map +0 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts +0 -4
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +0 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js +0 -17
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js.map +0 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts +0 -20
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts.map +0 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx +0 -94
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx.map +0 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +0 -25
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +0 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +0 -109
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +0 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts +0 -13
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +0 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +0 -136
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +0 -1
- package/jsx/core/FieldValueList/FieldValueList.mocks.d.ts +0 -20
- package/jsx/core/FieldValueList/FieldValueList.mocks.d.ts.map +0 -1
- package/jsx/core/FieldValueList/FieldValueList.mocks.jsx +0 -54
- package/jsx/core/FieldValueList/FieldValueList.mocks.jsx.map +0 -1
- package/jsx/core/FieldValueList/FieldValueList.stories.d.ts +0 -11
- package/jsx/core/FieldValueList/FieldValueList.stories.d.ts.map +0 -1
- package/jsx/core/FieldValueList/FieldValueList.stories.jsx +0 -37
- package/jsx/core/FieldValueList/FieldValueList.stories.jsx.map +0 -1
- package/jsx/core/FieldValueList/FieldValueList.styles.d.ts +0 -2
- package/jsx/core/FieldValueList/FieldValueList.styles.d.ts.map +0 -1
- package/jsx/core/FieldValueList/FieldValueList.styles.js +0 -8
- package/jsx/core/FieldValueList/FieldValueList.styles.js.map +0 -1
- package/jsx/core/File/FileDisplay.mocks.d.ts +0 -4
- package/jsx/core/File/FileDisplay.mocks.d.ts.map +0 -1
- package/jsx/core/File/FileDisplay.mocks.js +0 -126
- package/jsx/core/File/FileDisplay.mocks.js.map +0 -1
- package/jsx/core/File/FileDisplay.stories.d.ts +0 -27
- package/jsx/core/File/FileDisplay.stories.d.ts.map +0 -1
- package/jsx/core/File/FileDisplay.stories.jsx +0 -179
- package/jsx/core/File/FileDisplay.stories.jsx.map +0 -1
- package/jsx/core/File/FileInput.stories.d.ts +0 -13
- package/jsx/core/File/FileInput.stories.d.ts.map +0 -1
- package/jsx/core/File/FileInput.stories.jsx +0 -162
- package/jsx/core/File/FileInput.stories.jsx.map +0 -1
- package/jsx/core/File/FileService.mock.d.ts +0 -31
- package/jsx/core/File/FileService.mock.d.ts.map +0 -1
- package/jsx/core/File/FileService.mock.jsx +0 -119
- package/jsx/core/File/FileService.mock.jsx.map +0 -1
- package/jsx/core/File/MockFileInput.d.ts +0 -6
- package/jsx/core/File/MockFileInput.d.ts.map +0 -1
- package/jsx/core/File/MockFileInput.jsx +0 -25
- package/jsx/core/File/MockFileInput.jsx.map +0 -1
- package/jsx/core/Flex/Flex.styles.d.ts +0 -10
- package/jsx/core/Flex/Flex.styles.d.ts.map +0 -1
- package/jsx/core/Flex/Flex.styles.js +0 -41
- package/jsx/core/Flex/Flex.styles.js.map +0 -1
- package/jsx/core/Flex/FlexContainer.stories.d.ts +0 -21
- package/jsx/core/Flex/FlexContainer.stories.d.ts.map +0 -1
- package/jsx/core/Flex/FlexContainer.stories.jsx +0 -164
- package/jsx/core/Flex/FlexContainer.stories.jsx.map +0 -1
- package/jsx/core/Flex/FlexItem.stories.d.ts +0 -13
- package/jsx/core/Flex/FlexItem.stories.d.ts.map +0 -1
- package/jsx/core/Flex/FlexItem.stories.jsx +0 -71
- package/jsx/core/Flex/FlexItem.stories.jsx.map +0 -1
- package/jsx/core/Form/Form.mocks.d.ts +0 -14
- package/jsx/core/Form/Form.mocks.d.ts.map +0 -1
- package/jsx/core/Form/Form.mocks.jsx +0 -276
- package/jsx/core/Form/Form.mocks.jsx.map +0 -1
- package/jsx/core/Form/Form.stories.d.ts +0 -25
- package/jsx/core/Form/Form.stories.d.ts.map +0 -1
- package/jsx/core/Form/Form.stories.jsx +0 -106
- package/jsx/core/Form/Form.stories.jsx.map +0 -1
- package/jsx/core/Fullscreen/Fullscreen.stories.d.ts +0 -5
- package/jsx/core/Fullscreen/Fullscreen.stories.d.ts.map +0 -1
- package/jsx/core/Fullscreen/Fullscreen.stories.jsx +0 -22
- package/jsx/core/Fullscreen/Fullscreen.stories.jsx.map +0 -1
- package/jsx/core/Fullscreen/Fullscreen.styles.d.ts +0 -3
- package/jsx/core/Fullscreen/Fullscreen.styles.d.ts.map +0 -1
- package/jsx/core/Fullscreen/Fullscreen.styles.js +0 -9
- package/jsx/core/Fullscreen/Fullscreen.styles.js.map +0 -1
- package/jsx/core/Grid/Grid.styles.d.ts +0 -6
- package/jsx/core/Grid/Grid.styles.d.ts.map +0 -1
- package/jsx/core/Grid/Grid.styles.js +0 -36
- package/jsx/core/Grid/Grid.styles.js.map +0 -1
- package/jsx/core/Grid/GridContainer.stories.d.ts +0 -23
- package/jsx/core/Grid/GridContainer.stories.d.ts.map +0 -1
- package/jsx/core/Grid/GridContainer.stories.jsx +0 -168
- package/jsx/core/Grid/GridContainer.stories.jsx.map +0 -1
- package/jsx/core/Grid/GridItem.stories.d.ts +0 -12
- package/jsx/core/Grid/GridItem.stories.d.ts.map +0 -1
- package/jsx/core/Grid/GridItem.stories.jsx +0 -74
- package/jsx/core/Grid/GridItem.stories.jsx.map +0 -1
- package/jsx/core/HTML/HTML.stories.d.ts +0 -6
- package/jsx/core/HTML/HTML.stories.d.ts.map +0 -1
- package/jsx/core/HTML/HTML.stories.jsx +0 -13
- package/jsx/core/HTML/HTML.stories.jsx.map +0 -1
- package/jsx/core/Icon/Icon.mocks.d.ts +0 -26
- package/jsx/core/Icon/Icon.mocks.d.ts.map +0 -1
- package/jsx/core/Icon/Icon.mocks.jsx +0 -32
- package/jsx/core/Icon/Icon.mocks.jsx.map +0 -1
- package/jsx/core/Icon/Icon.stories.d.ts +0 -21
- package/jsx/core/Icon/Icon.stories.d.ts.map +0 -1
- package/jsx/core/Icon/Icon.stories.jsx +0 -112
- package/jsx/core/Icon/Icon.stories.jsx.map +0 -1
- package/jsx/core/Icon/Icon.styles.d.ts +0 -4
- package/jsx/core/Icon/Icon.styles.d.ts.map +0 -1
- package/jsx/core/Icon/Icon.styles.js +0 -25
- package/jsx/core/Icon/Icon.styles.js.map +0 -1
- package/jsx/core/IconPicker/IconPicker.mocks.d.ts +0 -2
- package/jsx/core/IconPicker/IconPicker.mocks.d.ts.map +0 -1
- package/jsx/core/IconPicker/IconPicker.mocks.js +0 -3
- package/jsx/core/IconPicker/IconPicker.mocks.js.map +0 -1
- package/jsx/core/IconPicker/IconPicker.stories.d.ts +0 -6
- package/jsx/core/IconPicker/IconPicker.stories.d.ts.map +0 -1
- package/jsx/core/IconPicker/IconPicker.stories.jsx +0 -38
- package/jsx/core/IconPicker/IconPicker.stories.jsx.map +0 -1
- package/jsx/core/Image/Image.stories.d.ts +0 -5
- package/jsx/core/Image/Image.stories.d.ts.map +0 -1
- package/jsx/core/Image/Image.stories.jsx +0 -9
- package/jsx/core/Image/Image.stories.jsx.map +0 -1
- package/jsx/core/Input/Input.stories.d.ts +0 -20
- package/jsx/core/Input/Input.stories.d.ts.map +0 -1
- package/jsx/core/Input/Input.stories.jsx +0 -159
- package/jsx/core/Input/Input.stories.jsx.map +0 -1
- package/jsx/core/Label/Label.stories.d.ts +0 -10
- package/jsx/core/Label/Label.stories.d.ts.map +0 -1
- package/jsx/core/Label/Label.stories.jsx +0 -33
- package/jsx/core/Label/Label.stories.jsx.map +0 -1
- package/jsx/core/Lightbox/Lightbox.mocks.d.ts +0 -28
- package/jsx/core/Lightbox/Lightbox.mocks.d.ts.map +0 -1
- package/jsx/core/Lightbox/Lightbox.mocks.js +0 -118
- package/jsx/core/Lightbox/Lightbox.mocks.js.map +0 -1
- package/jsx/core/Lightbox/Lightbox.stories.d.ts +0 -10
- package/jsx/core/Lightbox/Lightbox.stories.d.ts.map +0 -1
- package/jsx/core/Lightbox/Lightbox.stories.jsx +0 -69
- package/jsx/core/Lightbox/Lightbox.stories.jsx.map +0 -1
- package/jsx/core/Link/Link.stories.d.ts +0 -14
- package/jsx/core/Link/Link.stories.d.ts.map +0 -1
- package/jsx/core/Link/Link.stories.jsx +0 -48
- package/jsx/core/Link/Link.stories.jsx.map +0 -1
- package/jsx/core/List/CommaSeparatedList.stories.d.ts +0 -6
- package/jsx/core/List/CommaSeparatedList.stories.d.ts.map +0 -1
- package/jsx/core/List/CommaSeparatedList.stories.jsx +0 -31
- package/jsx/core/List/CommaSeparatedList.stories.jsx.map +0 -1
- package/jsx/core/List/OrderedList.stories.d.ts +0 -10
- package/jsx/core/List/OrderedList.stories.d.ts.map +0 -1
- package/jsx/core/List/OrderedList.stories.jsx +0 -38
- package/jsx/core/List/OrderedList.stories.jsx.map +0 -1
- package/jsx/core/List/UnorderedList.stories.d.ts +0 -10
- package/jsx/core/List/UnorderedList.stories.d.ts.map +0 -1
- package/jsx/core/List/UnorderedList.stories.jsx +0 -38
- package/jsx/core/List/UnorderedList.stories.jsx.map +0 -1
- package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts +0 -9
- package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts.map +0 -1
- package/jsx/core/ListToolbar/ListToolbar.mocks.jsx +0 -58
- package/jsx/core/ListToolbar/ListToolbar.mocks.jsx.map +0 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts +0 -17
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +0 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx +0 -141
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +0 -1
- package/jsx/core/LiveLog/LiveLog.mocks.d.ts +0 -5
- package/jsx/core/LiveLog/LiveLog.mocks.d.ts.map +0 -1
- package/jsx/core/LiveLog/LiveLog.mocks.jsx +0 -47
- package/jsx/core/LiveLog/LiveLog.mocks.jsx.map +0 -1
- package/jsx/core/LiveLog/LiveLog.stories.d.ts +0 -6
- package/jsx/core/LiveLog/LiveLog.stories.d.ts.map +0 -1
- package/jsx/core/LiveLog/LiveLog.stories.jsx +0 -13
- package/jsx/core/LiveLog/LiveLog.stories.jsx.map +0 -1
- package/jsx/core/Location/Location.stories.d.ts +0 -25
- package/jsx/core/Location/Location.stories.d.ts.map +0 -1
- package/jsx/core/Location/Location.stories.jsx +0 -200
- package/jsx/core/Location/Location.stories.jsx.map +0 -1
- package/jsx/core/Location/locationTestUtils.d.ts +0 -8
- package/jsx/core/Location/locationTestUtils.d.ts.map +0 -1
- package/jsx/core/Location/locationTestUtils.js +0 -73
- package/jsx/core/Location/locationTestUtils.js.map +0 -1
- package/jsx/core/Menu/Menu.mocks.d.ts +0 -4
- package/jsx/core/Menu/Menu.mocks.d.ts.map +0 -1
- package/jsx/core/Menu/Menu.mocks.js +0 -183
- package/jsx/core/Menu/Menu.mocks.js.map +0 -1
- package/jsx/core/Menu/Menu.stories.d.ts +0 -18
- package/jsx/core/Menu/Menu.stories.d.ts.map +0 -1
- package/jsx/core/Menu/Menu.stories.jsx +0 -209
- package/jsx/core/Menu/Menu.stories.jsx.map +0 -1
- package/jsx/core/Menu/Menu.styles.d.ts +0 -2
- package/jsx/core/Menu/Menu.styles.d.ts.map +0 -1
- package/jsx/core/Menu/Menu.styles.js +0 -6
- package/jsx/core/Menu/Menu.styles.js.map +0 -1
- package/jsx/core/MenuButton/MenuButton.stories.d.ts +0 -16
- package/jsx/core/MenuButton/MenuButton.stories.d.ts.map +0 -1
- package/jsx/core/MenuButton/MenuButton.stories.jsx +0 -194
- package/jsx/core/MenuButton/MenuButton.stories.jsx.map +0 -1
- package/jsx/core/MetaList/MetaList.stories.d.ts +0 -9
- package/jsx/core/MetaList/MetaList.stories.d.ts.map +0 -1
- package/jsx/core/MetaList/MetaList.stories.jsx +0 -24
- package/jsx/core/MetaList/MetaList.stories.jsx.map +0 -1
- package/jsx/core/Modal/Modal.mocks.d.ts +0 -45
- package/jsx/core/Modal/Modal.mocks.d.ts.map +0 -1
- package/jsx/core/Modal/Modal.mocks.jsx +0 -204
- package/jsx/core/Modal/Modal.mocks.jsx.map +0 -1
- package/jsx/core/Modal/Modal.stories.d.ts +0 -12
- package/jsx/core/Modal/Modal.stories.d.ts.map +0 -1
- package/jsx/core/Modal/Modal.stories.jsx +0 -175
- package/jsx/core/Modal/Modal.stories.jsx.map +0 -1
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.d.ts +0 -70
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.d.ts.map +0 -1
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.jsx +0 -408
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.jsx.map +0 -1
- package/jsx/core/MultiStepForm/MultiStepForm.stories.d.ts +0 -7
- package/jsx/core/MultiStepForm/MultiStepForm.stories.d.ts.map +0 -1
- package/jsx/core/MultiStepForm/MultiStepForm.stories.jsx +0 -133
- package/jsx/core/MultiStepForm/MultiStepForm.stories.jsx.map +0 -1
- package/jsx/core/NoValue/NoValue.stories.d.ts +0 -6
- package/jsx/core/NoValue/NoValue.stories.d.ts.map +0 -1
- package/jsx/core/NoValue/NoValue.stories.jsx +0 -30
- package/jsx/core/NoValue/NoValue.stories.jsx.map +0 -1
- package/jsx/core/Number/Number.stories.d.ts +0 -19
- package/jsx/core/Number/Number.stories.d.ts.map +0 -1
- package/jsx/core/Number/Number.stories.jsx +0 -303
- package/jsx/core/Number/Number.stories.jsx.map +0 -1
- package/jsx/core/PageTemplates/PageTemplates.mocks.d.ts +0 -3
- package/jsx/core/PageTemplates/PageTemplates.mocks.d.ts.map +0 -1
- package/jsx/core/PageTemplates/PageTemplates.mocks.js +0 -10
- package/jsx/core/PageTemplates/PageTemplates.mocks.js.map +0 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +0 -35
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +0 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx +0 -301
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +0 -1
- package/jsx/core/PageTemplates/PageTemplates.styles.d.ts +0 -5
- package/jsx/core/PageTemplates/PageTemplates.styles.d.ts.map +0 -1
- package/jsx/core/PageTemplates/PageTemplates.styles.js +0 -40
- package/jsx/core/PageTemplates/PageTemplates.styles.js.map +0 -1
- package/jsx/core/Pagination/Pagination.stories.d.ts +0 -6
- package/jsx/core/Pagination/Pagination.stories.d.ts.map +0 -1
- package/jsx/core/Pagination/Pagination.stories.jsx +0 -19
- package/jsx/core/Pagination/Pagination.stories.jsx.map +0 -1
- package/jsx/core/Paragraph/ParagraphDisplay.stories.d.ts +0 -6
- package/jsx/core/Paragraph/ParagraphDisplay.stories.d.ts.map +0 -1
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx +0 -15
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx.map +0 -1
- package/jsx/core/Phone/Phone.stories.d.ts +0 -13
- package/jsx/core/Phone/Phone.stories.d.ts.map +0 -1
- package/jsx/core/Phone/Phone.stories.jsx +0 -52
- package/jsx/core/Phone/Phone.stories.jsx.map +0 -1
- package/jsx/core/Popover/Popover.mocks.d.ts +0 -9
- package/jsx/core/Popover/Popover.mocks.d.ts.map +0 -1
- package/jsx/core/Popover/Popover.mocks.jsx +0 -114
- package/jsx/core/Popover/Popover.mocks.jsx.map +0 -1
- package/jsx/core/Popover/Popover.stories.d.ts +0 -13
- package/jsx/core/Popover/Popover.stories.d.ts.map +0 -1
- package/jsx/core/Popover/Popover.stories.jsx +0 -209
- package/jsx/core/Popover/Popover.stories.jsx.map +0 -1
- package/jsx/core/Progress/Progress.mocks.d.ts +0 -2
- package/jsx/core/Progress/Progress.mocks.d.ts.map +0 -1
- package/jsx/core/Progress/Progress.mocks.js +0 -2
- package/jsx/core/Progress/Progress.mocks.js.map +0 -1
- package/jsx/core/Progress/Progress.stories.d.ts +0 -16
- package/jsx/core/Progress/Progress.stories.d.ts.map +0 -1
- package/jsx/core/Progress/Progress.stories.jsx +0 -124
- package/jsx/core/Progress/Progress.stories.jsx.map +0 -1
- package/jsx/core/Progress/Progress.styles.d.ts +0 -2
- package/jsx/core/Progress/Progress.styles.d.ts.map +0 -1
- package/jsx/core/Progress/Progress.styles.js +0 -14
- package/jsx/core/Progress/Progress.styles.js.map +0 -1
- package/jsx/core/QRCode/QRCode.stories.d.ts +0 -9
- package/jsx/core/QRCode/QRCode.stories.d.ts.map +0 -1
- package/jsx/core/QRCode/QRCode.stories.jsx +0 -17
- package/jsx/core/QRCode/QRCode.stories.jsx.map +0 -1
- package/jsx/core/RadioButton/RadioButton.stories.d.ts +0 -23
- package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +0 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx +0 -99
- package/jsx/core/RadioButton/RadioButton.stories.jsx.map +0 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts +0 -14
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +0 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx +0 -105
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx.map +0 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts +0 -4
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts.map +0 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.js +0 -9
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.js.map +0 -1
- package/jsx/core/Rating/Rating.stories.d.ts +0 -13
- package/jsx/core/Rating/Rating.stories.d.ts.map +0 -1
- package/jsx/core/Rating/Rating.stories.jsx +0 -39
- package/jsx/core/Rating/Rating.stories.jsx.map +0 -1
- package/jsx/core/SearchInput/SearchInput.mocks.d.ts +0 -12
- package/jsx/core/SearchInput/SearchInput.mocks.d.ts.map +0 -1
- package/jsx/core/SearchInput/SearchInput.mocks.js +0 -25
- package/jsx/core/SearchInput/SearchInput.mocks.js.map +0 -1
- package/jsx/core/SearchInput/SearchInput.stories.d.ts +0 -8
- package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +0 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx +0 -63
- package/jsx/core/SearchInput/SearchInput.stories.jsx.map +0 -1
- package/jsx/core/Select/Select.stories.d.ts +0 -18
- package/jsx/core/Select/Select.stories.d.ts.map +0 -1
- package/jsx/core/Select/Select.stories.jsx +0 -83
- package/jsx/core/Select/Select.stories.jsx.map +0 -1
- package/jsx/core/Sentiment/Sentiment.stories.d.ts +0 -20
- package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +0 -1
- package/jsx/core/Sentiment/Sentiment.stories.jsx +0 -71
- package/jsx/core/Sentiment/Sentiment.stories.jsx.map +0 -1
- package/jsx/core/SkipLinks/SkipLinks.stories.d.ts +0 -6
- package/jsx/core/SkipLinks/SkipLinks.stories.d.ts.map +0 -1
- package/jsx/core/SkipLinks/SkipLinks.stories.jsx +0 -29
- package/jsx/core/SkipLinks/SkipLinks.stories.jsx.map +0 -1
- package/jsx/core/SkipLinks/SkipLinks.styles.d.ts +0 -2
- package/jsx/core/SkipLinks/SkipLinks.styles.d.ts.map +0 -1
- package/jsx/core/SkipLinks/SkipLinks.styles.js +0 -16
- package/jsx/core/SkipLinks/SkipLinks.styles.js.map +0 -1
- package/jsx/core/Slider/Slider.stories.d.ts +0 -13
- package/jsx/core/Slider/Slider.stories.d.ts.map +0 -1
- package/jsx/core/Slider/Slider.stories.jsx +0 -78
- package/jsx/core/Slider/Slider.stories.jsx.map +0 -1
- package/jsx/core/SummaryItem/SummaryItem.stories.d.ts +0 -11
- package/jsx/core/SummaryItem/SummaryItem.stories.d.ts.map +0 -1
- package/jsx/core/SummaryItem/SummaryItem.stories.jsx +0 -38
- package/jsx/core/SummaryItem/SummaryItem.stories.jsx.map +0 -1
- package/jsx/core/SummaryList/SummaryList.mocks.d.ts +0 -20
- package/jsx/core/SummaryList/SummaryList.mocks.d.ts.map +0 -1
- package/jsx/core/SummaryList/SummaryList.mocks.jsx +0 -48
- package/jsx/core/SummaryList/SummaryList.mocks.jsx.map +0 -1
- package/jsx/core/SummaryList/SummaryList.stories.d.ts +0 -13
- package/jsx/core/SummaryList/SummaryList.stories.d.ts.map +0 -1
- package/jsx/core/SummaryList/SummaryList.stories.jsx +0 -131
- package/jsx/core/SummaryList/SummaryList.stories.jsx.map +0 -1
- package/jsx/core/SummaryList/mockUsers.d.ts +0 -16
- package/jsx/core/SummaryList/mockUsers.d.ts.map +0 -1
- package/jsx/core/SummaryList/mockUsers.js +0 -904
- package/jsx/core/SummaryList/mockUsers.js.map +0 -1
- package/jsx/core/Switch/Switch.stories.d.ts +0 -14
- package/jsx/core/Switch/Switch.stories.d.ts.map +0 -1
- package/jsx/core/Switch/Switch.stories.jsx +0 -60
- package/jsx/core/Switch/Switch.stories.jsx.map +0 -1
- package/jsx/core/Switch/Switch.styles.d.ts +0 -2
- package/jsx/core/Switch/Switch.styles.d.ts.map +0 -1
- package/jsx/core/Switch/Switch.styles.js +0 -13
- package/jsx/core/Switch/Switch.styles.js.map +0 -1
- package/jsx/core/Table/Table.mocks.d.ts +0 -25
- package/jsx/core/Table/Table.mocks.d.ts.map +0 -1
- package/jsx/core/Table/Table.mocks.jsx +0 -166
- package/jsx/core/Table/Table.mocks.jsx.map +0 -1
- package/jsx/core/Table/Table.stories.d.ts +0 -39
- package/jsx/core/Table/Table.stories.d.ts.map +0 -1
- package/jsx/core/Table/Table.stories.jsx +0 -178
- package/jsx/core/Table/Table.stories.jsx.map +0 -1
- package/jsx/core/Table/Table.styles.d.ts +0 -4
- package/jsx/core/Table/Table.styles.d.ts.map +0 -1
- package/jsx/core/Table/Table.styles.js +0 -9
- package/jsx/core/Table/Table.styles.js.map +0 -1
- package/jsx/core/Tabs/Tabs.mocks.d.ts +0 -6
- package/jsx/core/Tabs/Tabs.mocks.d.ts.map +0 -1
- package/jsx/core/Tabs/Tabs.mocks.jsx +0 -29
- package/jsx/core/Tabs/Tabs.mocks.jsx.map +0 -1
- package/jsx/core/Tabs/Tabs.stories.d.ts +0 -9
- package/jsx/core/Tabs/Tabs.stories.d.ts.map +0 -1
- package/jsx/core/Tabs/Tabs.stories.jsx +0 -51
- package/jsx/core/Tabs/Tabs.stories.jsx.map +0 -1
- package/jsx/core/Text/Text.stories.d.ts +0 -25
- package/jsx/core/Text/Text.stories.d.ts.map +0 -1
- package/jsx/core/Text/Text.stories.jsx +0 -134
- package/jsx/core/Text/Text.stories.jsx.map +0 -1
- package/jsx/core/TextArea/TextArea.stories.d.ts +0 -14
- package/jsx/core/TextArea/TextArea.stories.d.ts.map +0 -1
- package/jsx/core/TextArea/TextArea.stories.jsx +0 -71
- package/jsx/core/TextArea/TextArea.stories.jsx.map +0 -1
- package/jsx/core/Toaster/Toaster.stories.d.ts +0 -6
- package/jsx/core/Toaster/Toaster.stories.d.ts.map +0 -1
- package/jsx/core/Toaster/Toaster.stories.jsx +0 -45
- package/jsx/core/Toaster/Toaster.stories.jsx.map +0 -1
- package/jsx/core/Tooltip/Tooltip.stories.d.ts +0 -11
- package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +0 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx +0 -66
- package/jsx/core/Tooltip/Tooltip.stories.jsx.map +0 -1
- package/jsx/core/Tooltip/Tooltip.styles.d.ts +0 -2
- package/jsx/core/Tooltip/Tooltip.styles.d.ts.map +0 -1
- package/jsx/core/Tooltip/Tooltip.styles.js +0 -23
- package/jsx/core/Tooltip/Tooltip.styles.js.map +0 -1
- package/jsx/core/Tree/Tree.mocks.d.ts +0 -2
- package/jsx/core/Tree/Tree.mocks.d.ts.map +0 -1
- package/jsx/core/Tree/Tree.mocks.js +0 -20
- package/jsx/core/Tree/Tree.mocks.js.map +0 -1
- package/jsx/core/Tree/Tree.stories.d.ts +0 -7
- package/jsx/core/Tree/Tree.stories.d.ts.map +0 -1
- package/jsx/core/Tree/Tree.stories.jsx +0 -95
- package/jsx/core/Tree/Tree.stories.jsx.map +0 -1
- package/jsx/core/Tree/Tree.styles.d.ts +0 -3
- package/jsx/core/Tree/Tree.styles.d.ts.map +0 -1
- package/jsx/core/Tree/Tree.styles.js +0 -10
- package/jsx/core/Tree/Tree.styles.js.map +0 -1
- package/jsx/core/URL/URL.stories.d.ts +0 -6
- package/jsx/core/URL/URL.stories.d.ts.map +0 -1
- package/jsx/core/URL/URL.stories.jsx +0 -17
- package/jsx/core/URL/URL.stories.jsx.map +0 -1
- package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts +0 -15
- package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts.map +0 -1
- package/jsx/dnd/DragDropList/DragDropList.mocks.jsx +0 -33
- package/jsx/dnd/DragDropList/DragDropList.mocks.jsx.map +0 -1
- package/jsx/dnd/DragDropList/DragDropList.stories.d.ts +0 -10
- package/jsx/dnd/DragDropList/DragDropList.stories.d.ts.map +0 -1
- package/jsx/dnd/DragDropList/DragDropList.stories.jsx +0 -55
- package/jsx/dnd/DragDropList/DragDropList.stories.jsx.map +0 -1
- package/jsx/dnd/DragDropList/DragDropList.styles.d.ts +0 -6
- package/jsx/dnd/DragDropList/DragDropList.styles.d.ts.map +0 -1
- package/jsx/dnd/DragDropList/DragDropList.styles.js +0 -32
- package/jsx/dnd/DragDropList/DragDropList.styles.js.map +0 -1
- package/jsx/dnd/StandardDragDropList/Demo.d.ts +0 -13
- package/jsx/dnd/StandardDragDropList/Demo.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/Demo.jsx +0 -168
- package/jsx/dnd/StandardDragDropList/Demo.jsx.map +0 -1
- package/jsx/dnd/StandardDragDropList/GroupConfig.d.ts +0 -10
- package/jsx/dnd/StandardDragDropList/GroupConfig.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/GroupConfig.jsx +0 -26
- package/jsx/dnd/StandardDragDropList/GroupConfig.jsx.map +0 -1
- package/jsx/dnd/StandardDragDropList/ItemConfig.d.ts +0 -12
- package/jsx/dnd/StandardDragDropList/ItemConfig.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/ItemConfig.jsx +0 -21
- package/jsx/dnd/StandardDragDropList/ItemConfig.jsx.map +0 -1
- package/jsx/dnd/StandardDragDropList/Popover.d.ts +0 -14
- package/jsx/dnd/StandardDragDropList/Popover.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/Popover.jsx +0 -51
- package/jsx/dnd/StandardDragDropList/Popover.jsx.map +0 -1
- package/jsx/dnd/StandardDragDropList/SelectionMenu.d.ts +0 -17
- package/jsx/dnd/StandardDragDropList/SelectionMenu.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/SelectionMenu.jsx +0 -104
- package/jsx/dnd/StandardDragDropList/SelectionMenu.jsx.map +0 -1
- package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.d.ts +0 -9
- package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.jsx +0 -31
- package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.jsx.map +0 -1
- package/jsx/dnd/StandardDragDropList/mockData.d.ts +0 -25
- package/jsx/dnd/StandardDragDropList/mockData.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/mockData.js +0 -67
- package/jsx/dnd/StandardDragDropList/mockData.js.map +0 -1
- package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts +0 -8
- package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +0 -1
- package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.jsx +0 -103
- package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.jsx.map +0 -1
- package/jsx/rte/DynamicContentEditor/FieldSelector.d.ts +0 -11
- package/jsx/rte/DynamicContentEditor/FieldSelector.d.ts.map +0 -1
- package/jsx/rte/DynamicContentEditor/FieldSelector.jsx +0 -82
- package/jsx/rte/DynamicContentEditor/FieldSelector.jsx.map +0 -1
- package/jsx/rte/Editor/Editor.mocks.d.ts +0 -334
- package/jsx/rte/Editor/Editor.mocks.d.ts.map +0 -1
- package/jsx/rte/Editor/Editor.mocks.jsx +0 -46
- package/jsx/rte/Editor/Editor.mocks.jsx.map +0 -1
- package/jsx/rte/Editor/Editor.stories.d.ts +0 -15
- package/jsx/rte/Editor/Editor.stories.d.ts.map +0 -1
- package/jsx/rte/Editor/Editor.stories.jsx +0 -197
- package/jsx/rte/Editor/Editor.stories.jsx.map +0 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.d.ts +0 -3
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.d.ts.map +0 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.jsx +0 -34
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.jsx.map +0 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts +0 -7
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +0 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx +0 -108
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +0 -1
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts +0 -13
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +0 -1
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx +0 -155
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx.map +0 -1
- package/jsx/social/Chat/Chat.mocks.d.ts +0 -51
- package/jsx/social/Chat/Chat.mocks.d.ts.map +0 -1
- package/jsx/social/Chat/Chat.mocks.js +0 -756
- package/jsx/social/Chat/Chat.mocks.js.map +0 -1
- package/jsx/social/Chat/Chat.stories.d.ts +0 -57
- package/jsx/social/Chat/Chat.stories.d.ts.map +0 -1
- package/jsx/social/Chat/Chat.stories.jsx +0 -767
- package/jsx/social/Chat/Chat.stories.jsx.map +0 -1
- package/jsx/social/Email/Email.mocks.d.ts +0 -353
- package/jsx/social/Email/Email.mocks.d.ts.map +0 -1
- package/jsx/social/Email/Email.mocks.jsx +0 -1226
- package/jsx/social/Email/Email.mocks.jsx.map +0 -1
- package/jsx/social/Email/Email.stories.d.ts +0 -83
- package/jsx/social/Email/Email.stories.d.ts.map +0 -1
- package/jsx/social/Email/Email.stories.jsx +0 -1268
- package/jsx/social/Email/Email.stories.jsx.map +0 -1
- package/jsx/social/Email/Email.styles.d.ts +0 -3
- package/jsx/social/Email/Email.styles.d.ts.map +0 -1
- package/jsx/social/Email/Email.styles.js +0 -11
- package/jsx/social/Email/Email.styles.js.map +0 -1
- package/jsx/social/Feed/Feed.mocks.d.ts +0 -55
- package/jsx/social/Feed/Feed.mocks.d.ts.map +0 -1
- package/jsx/social/Feed/Feed.mocks.jsx +0 -433
- package/jsx/social/Feed/Feed.mocks.jsx.map +0 -1
- package/jsx/social/Feed/Feed.stories.d.ts +0 -11
- package/jsx/social/Feed/Feed.stories.d.ts.map +0 -1
- package/jsx/social/Feed/Feed.stories.jsx +0 -223
- package/jsx/social/Feed/Feed.stories.jsx.map +0 -1
- package/jsx/social/Feed/FeedNewPost.mocks.d.ts +0 -8
- package/jsx/social/Feed/FeedNewPost.mocks.d.ts.map +0 -1
- package/jsx/social/Feed/FeedNewPost.mocks.jsx +0 -72
- package/jsx/social/Feed/FeedNewPost.mocks.jsx.map +0 -1
- package/jsx/social/Feed/FeedPost.mocks.d.ts +0 -4
- package/jsx/social/Feed/FeedPost.mocks.d.ts.map +0 -1
- package/jsx/social/Feed/FeedPost.mocks.jsx +0 -192
- package/jsx/social/Feed/FeedPost.mocks.jsx.map +0 -1
- package/jsx/social/Feed/FeedReply.mocks.d.ts +0 -13
- package/jsx/social/Feed/FeedReply.mocks.d.ts.map +0 -1
- package/jsx/social/Feed/FeedReply.mocks.jsx +0 -83
- package/jsx/social/Feed/FeedReply.mocks.jsx.map +0 -1
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts +0 -6
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +0 -1
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx +0 -30
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +0 -1
- package/jsx/work/Article/Article.mocks.d.ts +0 -18
- package/jsx/work/Article/Article.mocks.d.ts.map +0 -1
- package/jsx/work/Article/Article.mocks.js +0 -18
- package/jsx/work/Article/Article.mocks.js.map +0 -1
- package/jsx/work/Article/Article.stories.d.ts +0 -18
- package/jsx/work/Article/Article.stories.d.ts.map +0 -1
- package/jsx/work/Article/Article.stories.jsx +0 -272
- package/jsx/work/Article/Article.stories.jsx.map +0 -1
- package/jsx/work/ArticleList/ArticleBuddy.stories.d.ts +0 -12
- package/jsx/work/ArticleList/ArticleBuddy.stories.d.ts.map +0 -1
- package/jsx/work/ArticleList/ArticleBuddy.stories.jsx +0 -143
- package/jsx/work/ArticleList/ArticleBuddy.stories.jsx.map +0 -1
- package/jsx/work/ArticleList/ArticleList.mocks.d.ts +0 -223
- package/jsx/work/ArticleList/ArticleList.mocks.d.ts.map +0 -1
- package/jsx/work/ArticleList/ArticleList.mocks.js +0 -652
- package/jsx/work/ArticleList/ArticleList.mocks.js.map +0 -1
- package/jsx/work/ArticleList/ArticleList.stories.d.ts +0 -18
- package/jsx/work/ArticleList/ArticleList.stories.d.ts.map +0 -1
- package/jsx/work/ArticleList/ArticleList.stories.jsx +0 -882
- package/jsx/work/ArticleList/ArticleList.stories.jsx.map +0 -1
- package/jsx/work/Assignments/Assignments.stories.d.ts +0 -11
- package/jsx/work/Assignments/Assignments.stories.d.ts.map +0 -1
- package/jsx/work/Assignments/Assignments.stories.jsx +0 -64
- package/jsx/work/Assignments/Assignments.stories.jsx.map +0 -1
- package/jsx/work/CaseView/Attachments.mocks.d.ts +0 -3
- package/jsx/work/CaseView/Attachments.mocks.d.ts.map +0 -1
- package/jsx/work/CaseView/Attachments.mocks.jsx +0 -395
- package/jsx/work/CaseView/Attachments.mocks.jsx.map +0 -1
- package/jsx/work/CaseView/CaseView.mocks.d.ts +0 -121
- package/jsx/work/CaseView/CaseView.mocks.d.ts.map +0 -1
- package/jsx/work/CaseView/CaseView.mocks.jsx +0 -693
- package/jsx/work/CaseView/CaseView.mocks.jsx.map +0 -1
- package/jsx/work/CaseView/CaseView.stories.d.ts +0 -6
- package/jsx/work/CaseView/CaseView.stories.d.ts.map +0 -1
- package/jsx/work/CaseView/CaseView.stories.jsx +0 -65
- package/jsx/work/CaseView/CaseView.stories.jsx.map +0 -1
- package/jsx/work/CaseView/Details.mocks.d.ts +0 -3
- package/jsx/work/CaseView/Details.mocks.d.ts.map +0 -1
- package/jsx/work/CaseView/Details.mocks.jsx +0 -21
- package/jsx/work/CaseView/Details.mocks.jsx.map +0 -1
- package/jsx/work/CaseView/Pulse.mocks.d.ts +0 -7
- package/jsx/work/CaseView/Pulse.mocks.d.ts.map +0 -1
- package/jsx/work/CaseView/Pulse.mocks.jsx +0 -36
- package/jsx/work/CaseView/Pulse.mocks.jsx.map +0 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts +0 -45
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts.map +0 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.jsx +0 -166
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.jsx.map +0 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +0 -5
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +0 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +0 -24
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +0 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts +0 -4
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts.map +0 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.js +0 -11
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.js.map +0 -1
- package/jsx/work/Confirmation/Confirmation.stories.d.ts +0 -13
- package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +0 -1
- package/jsx/work/Confirmation/Confirmation.stories.jsx +0 -37
- package/jsx/work/Confirmation/Confirmation.stories.jsx.map +0 -1
- package/jsx/work/Confirmation/Confirmation.styles.d.ts +0 -2
- package/jsx/work/Confirmation/Confirmation.styles.d.ts.map +0 -1
- package/jsx/work/Confirmation/Confirmation.styles.js +0 -7
- package/jsx/work/Confirmation/Confirmation.styles.js.map +0 -1
- package/jsx/work/Details/Details.stories.d.ts +0 -10
- package/jsx/work/Details/Details.stories.d.ts.map +0 -1
- package/jsx/work/Details/Details.stories.jsx +0 -214
- package/jsx/work/Details/Details.stories.jsx.map +0 -1
- package/jsx/work/GenAICoach/GenAICoach.mocks.d.ts +0 -22
- package/jsx/work/GenAICoach/GenAICoach.mocks.d.ts.map +0 -1
- package/jsx/work/GenAICoach/GenAICoach.mocks.js +0 -124
- package/jsx/work/GenAICoach/GenAICoach.mocks.js.map +0 -1
- package/jsx/work/GenAICoach/GenAICoach.stories.d.ts +0 -19
- package/jsx/work/GenAICoach/GenAICoach.stories.d.ts.map +0 -1
- package/jsx/work/GenAICoach/GenAICoach.stories.jsx +0 -133
- package/jsx/work/GenAICoach/GenAICoach.stories.jsx.map +0 -1
- package/jsx/work/GenAICoach/useGenAICoach.d.ts +0 -5
- package/jsx/work/GenAICoach/useGenAICoach.d.ts.map +0 -1
- package/jsx/work/GenAICoach/useGenAICoach.js +0 -90
- package/jsx/work/GenAICoach/useGenAICoach.js.map +0 -1
- package/jsx/work/Glimpse/Glimpse.stories.d.ts +0 -5
- package/jsx/work/Glimpse/Glimpse.stories.d.ts.map +0 -1
- package/jsx/work/Glimpse/Glimpse.stories.jsx +0 -42
- package/jsx/work/Glimpse/Glimpse.stories.jsx.map +0 -1
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.mock.d.ts +0 -24
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.mock.d.ts.map +0 -1
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.mock.jsx +0 -558
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.mock.jsx.map +0 -1
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.stories.d.ts +0 -13
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.stories.d.ts.map +0 -1
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.stories.jsx +0 -134
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.stories.jsx.map +0 -1
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts +0 -5
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +0 -1
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.jsx +0 -115
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +0 -1
- package/jsx/work/InteractionNotification/InteractionNotification.stories.d.ts +0 -12
- package/jsx/work/InteractionNotification/InteractionNotification.stories.d.ts.map +0 -1
- package/jsx/work/InteractionNotification/InteractionNotification.stories.jsx +0 -54
- package/jsx/work/InteractionNotification/InteractionNotification.stories.jsx.map +0 -1
- package/jsx/work/Predictions/Predictions.mocks.d.ts +0 -3
- package/jsx/work/Predictions/Predictions.mocks.d.ts.map +0 -1
- package/jsx/work/Predictions/Predictions.mocks.jsx +0 -18
- package/jsx/work/Predictions/Predictions.mocks.jsx.map +0 -1
- package/jsx/work/Predictions/Predictions.stories.d.ts +0 -5
- package/jsx/work/Predictions/Predictions.stories.d.ts.map +0 -1
- package/jsx/work/Predictions/Predictions.stories.jsx +0 -53
- package/jsx/work/Predictions/Predictions.stories.jsx.map +0 -1
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts +0 -14
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts.map +0 -1
- package/jsx/work/SearchResults/SearchResults.mocks.jsx +0 -97
- package/jsx/work/SearchResults/SearchResults.mocks.jsx.map +0 -1
- package/jsx/work/SearchResults/SearchResults.stories.d.ts +0 -9
- package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +0 -1
- package/jsx/work/SearchResults/SearchResults.stories.jsx +0 -242
- package/jsx/work/SearchResults/SearchResults.stories.jsx.map +0 -1
- package/jsx/work/SearchResults/SearchResults.styles.d.ts +0 -5
- package/jsx/work/SearchResults/SearchResults.styles.d.ts.map +0 -1
- package/jsx/work/SearchResults/SearchResults.styles.js +0 -12
- package/jsx/work/SearchResults/SearchResults.styles.js.map +0 -1
- package/jsx/work/Stages/Stages.mocks.d.ts +0 -14
- package/jsx/work/Stages/Stages.mocks.d.ts.map +0 -1
- package/jsx/work/Stages/Stages.mocks.jsx +0 -40
- package/jsx/work/Stages/Stages.mocks.jsx.map +0 -1
- package/jsx/work/Stages/Stages.stories.d.ts +0 -11
- package/jsx/work/Stages/Stages.stories.d.ts.map +0 -1
- package/jsx/work/Stages/Stages.stories.jsx +0 -48
- package/jsx/work/Stages/Stages.stories.jsx.map +0 -1
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts +0 -17
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +0 -1
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +0 -36
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +0 -1
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts +0 -8
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts.map +0 -1
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx +0 -99
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx.map +0 -1
- package/jsx/work/Tags/Tags.mocks.d.ts +0 -3
- package/jsx/work/Tags/Tags.mocks.d.ts.map +0 -1
- package/jsx/work/Tags/Tags.mocks.js +0 -76
- package/jsx/work/Tags/Tags.mocks.js.map +0 -1
- package/jsx/work/Tags/Tags.stories.d.ts +0 -10
- package/jsx/work/Tags/Tags.stories.d.ts.map +0 -1
- package/jsx/work/Tags/Tags.stories.jsx +0 -66
- package/jsx/work/Tags/Tags.stories.jsx.map +0 -1
- package/jsx/work/Tasks/TaskList.stories.d.ts +0 -5
- package/jsx/work/Tasks/TaskList.stories.d.ts.map +0 -1
- package/jsx/work/Tasks/TaskList.stories.jsx +0 -19
- package/jsx/work/Tasks/TaskList.stories.jsx.map +0 -1
- package/jsx/work/Tasks/Tasks.mocks.d.ts +0 -22
- package/jsx/work/Tasks/Tasks.mocks.d.ts.map +0 -1
- package/jsx/work/Tasks/Tasks.mocks.js +0 -51
- package/jsx/work/Tasks/Tasks.mocks.js.map +0 -1
- package/jsx/work/Tasks/Tasks.stories.d.ts +0 -15
- package/jsx/work/Tasks/Tasks.stories.d.ts.map +0 -1
- package/jsx/work/Tasks/Tasks.stories.jsx +0 -88
- package/jsx/work/Tasks/Tasks.stories.jsx.map +0 -1
- package/jsx/work/Timeline/Timeline.mocks.d.ts +0 -3
- package/jsx/work/Timeline/Timeline.mocks.d.ts.map +0 -1
- package/jsx/work/Timeline/Timeline.mocks.jsx +0 -151
- package/jsx/work/Timeline/Timeline.mocks.jsx.map +0 -1
- package/jsx/work/Timeline/Timeline.stories.d.ts +0 -11
- package/jsx/work/Timeline/Timeline.stories.d.ts.map +0 -1
- package/jsx/work/Timeline/Timeline.stories.jsx +0 -85
- package/jsx/work/Timeline/Timeline.stories.jsx.map +0 -1
- package/jsx/work/UtilitiesLayout/UtilitiesLayout.stories.d.ts +0 -12
- package/jsx/work/UtilitiesLayout/UtilitiesLayout.stories.d.ts.map +0 -1
- package/jsx/work/UtilitiesLayout/UtilitiesLayout.stories.jsx +0 -29
- package/jsx/work/UtilitiesLayout/UtilitiesLayout.stories.jsx.map +0 -1
- package/jsx/wss/AppShell/AppShell.mocks.d.ts +0 -24
- package/jsx/wss/AppShell/AppShell.mocks.d.ts.map +0 -1
- package/jsx/wss/AppShell/AppShell.mocks.jsx +0 -64
- package/jsx/wss/AppShell/AppShell.mocks.jsx.map +0 -1
- package/jsx/wss/AppShell/AppShell.stories.d.ts +0 -19
- package/jsx/wss/AppShell/AppShell.stories.d.ts.map +0 -1
- package/jsx/wss/AppShell/AppShell.stories.jsx +0 -96
- package/jsx/wss/AppShell/AppShell.stories.jsx.map +0 -1
- package/jsx/wss/AppShell/AppShell.styles.d.ts +0 -2
- package/jsx/wss/AppShell/AppShell.styles.d.ts.map +0 -1
- package/jsx/wss/AppShell/AppShell.styles.js +0 -5
- package/jsx/wss/AppShell/AppShell.styles.js.map +0 -1
- package/jsx/wss/CaseView/CaseView.mocks.d.ts +0 -13
- package/jsx/wss/CaseView/CaseView.mocks.d.ts.map +0 -1
- package/jsx/wss/CaseView/CaseView.mocks.jsx +0 -34
- package/jsx/wss/CaseView/CaseView.mocks.jsx.map +0 -1
- package/jsx/wss/CaseView/CaseView.stories.d.ts +0 -12
- package/jsx/wss/CaseView/CaseView.stories.d.ts.map +0 -1
- package/jsx/wss/CaseView/CaseView.stories.jsx +0 -74
- package/jsx/wss/CaseView/CaseView.stories.jsx.map +0 -1
- package/jsx/wss/PageTemplates/PageTemplates.stories.d.ts +0 -16
- package/jsx/wss/PageTemplates/PageTemplates.stories.d.ts.map +0 -1
- package/jsx/wss/PageTemplates/PageTemplates.stories.jsx +0 -47
- package/jsx/wss/PageTemplates/PageTemplates.stories.jsx.map +0 -1
- package/jsx/wss/QuickCreate/QuickCreate.stories.d.ts +0 -11
- package/jsx/wss/QuickCreate/QuickCreate.stories.d.ts.map +0 -1
- package/jsx/wss/QuickCreate/QuickCreate.stories.jsx +0 -28
- package/jsx/wss/QuickCreate/QuickCreate.stories.jsx.map +0 -1
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { StoryFn } from '@storybook/react';
|
|
2
|
-
import type { FileDisplayProps, FileUploadItemProps, FileDisplayListProps } from '@pega/cosmos-react-core';
|
|
3
|
-
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/dist/types-a5624094").ReactRenderer, import("@storybook/csf").Args>;
|
|
4
|
-
export default _default;
|
|
5
|
-
interface FileDisplayDemoProps {
|
|
6
|
-
withDisplayText?: boolean;
|
|
7
|
-
withValue?: boolean;
|
|
8
|
-
withPreview?: boolean;
|
|
9
|
-
withDownload?: boolean;
|
|
10
|
-
compact?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const FileDisplayTypes: StoryFn<FileDisplayDemoProps>;
|
|
13
|
-
export declare const FileDisplayDemo: StoryFn<FileDisplayProps & FileDisplayDemoProps>;
|
|
14
|
-
export declare const FileDisplayListDemo: StoryFn<Pick<FileDisplayListProps, 'variant' | 'compact' | 'items' | 'heading' | 'onDownloadAll'> & {
|
|
15
|
-
enableDownloadAll?: boolean;
|
|
16
|
-
withValue?: boolean;
|
|
17
|
-
withPreview?: boolean;
|
|
18
|
-
withDownload?: boolean;
|
|
19
|
-
}>;
|
|
20
|
-
interface FileUploadItemDemoProps extends FileDisplayDemoProps {
|
|
21
|
-
name: FileUploadItemProps['name'];
|
|
22
|
-
meta?: FileUploadItemProps['meta'];
|
|
23
|
-
error?: FileUploadItemProps['error'];
|
|
24
|
-
progress?: FileUploadItemProps['progress'];
|
|
25
|
-
}
|
|
26
|
-
export declare const FileUploadItemDemo: StoryFn<FileUploadItemDemoProps>;
|
|
27
|
-
//# sourceMappingURL=FileDisplay.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileDisplay.stories.d.ts","sourceRoot":"","sources":["../../../src/core/File/FileDisplay.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAWtD,OAAO,KAAK,EACV,gBAAgB,EAEhB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;;AAIjC,wBAaU;AAEV,UAAU,oBAAoB;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC,oBAAoB,CA+K1D,CAAC;AAUF,eAAO,MAAM,eAAe,EAAE,OAAO,CAAC,gBAAgB,GAAG,oBAAoB,CA4B5E,CAAC;AAcF,eAAO,MAAM,mBAAmB,EAAE,OAAO,CACvC,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,eAAe,CAAC,GAAG;IAC1F,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAoCF,CAAC;AAqBF,UAAU,uBAAwB,SAAQ,oBAAoB;IAC5D,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAClC,IAAI,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;CAC5C;AAED,eAAO,MAAM,kBAAkB,EAAE,OAAO,CAAC,uBAAuB,CA2B/D,CAAC"}
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { useRef, useState } from 'react';
|
|
2
|
-
import { action } from '@storybook/addon-actions';
|
|
3
|
-
import { FileDisplay, FieldValueList, useToaster, FileUploadItem, FileDisplayList } from '@pega/cosmos-react-core';
|
|
4
|
-
import { displayFiles } from './FileDisplay.mocks';
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Core/File/Display',
|
|
7
|
-
component: FileDisplay,
|
|
8
|
-
args: {
|
|
9
|
-
withValue: true,
|
|
10
|
-
withPreview: true,
|
|
11
|
-
withDownload: true
|
|
12
|
-
},
|
|
13
|
-
argTypes: {
|
|
14
|
-
withValue: { control: { type: 'boolean' } },
|
|
15
|
-
withPreview: { control: { type: 'boolean' } },
|
|
16
|
-
withDownload: { control: { type: 'boolean' } }
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export const FileDisplayTypes = (args) => {
|
|
20
|
-
const { push } = useToaster();
|
|
21
|
-
const handlePreview = args.withPreview
|
|
22
|
-
? (id) => push({ content: `Previewed ${id}` })
|
|
23
|
-
: undefined;
|
|
24
|
-
const handleDownload = args.withDownload
|
|
25
|
-
? (id) => push({ content: `Downloaded ${id}` })
|
|
26
|
-
: undefined;
|
|
27
|
-
const imageSrc = 'https://www.pega.com/sites/default/files/styles/480/public/media/images/2021-02/pwi-2021-prevcard.jpg';
|
|
28
|
-
const fields = [
|
|
29
|
-
{
|
|
30
|
-
id: '1',
|
|
31
|
-
name: 'Image file with thumbnail',
|
|
32
|
-
value: (<FileDisplay id='item-1' displayText={args.withDisplayText ? 'image.jpg' : undefined} value={args.withValue ? 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg' : undefined} thumbnail={imageSrc} onPreview={handlePreview} onDownload={handleDownload}/>)
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: '2',
|
|
36
|
-
name: 'Video file',
|
|
37
|
-
value: (<FileDisplay id='item-2' displayText={args.withDisplayText ? 'video.avi' : undefined} value={args.withValue ? 'https://pega.com/media/some-video.avi' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
id: '3',
|
|
41
|
-
name: 'Audio file',
|
|
42
|
-
value: (<FileDisplay id='item-3' displayText={args.withDisplayText ? 'recording.mp3' : undefined} value={args.withValue ? 'https://pega.com/media/sprint-review-recording.mp3' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
id: '4',
|
|
46
|
-
name: 'Document file',
|
|
47
|
-
value: (<FileDisplay id='item-4' displayText={args.withDisplayText ? 'document.doc' : undefined} value={args.withValue ? 'https://pega.com/media/document.doc' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: '5',
|
|
51
|
-
name: 'PDF file',
|
|
52
|
-
value: (<FileDisplay id='item-5' displayText={args.withDisplayText ? 'invoice.pdf' : undefined} value={args.withValue ? 'https://pega.com/media/invoice.pdf' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: '6',
|
|
56
|
-
name: 'Presentation file',
|
|
57
|
-
value: (<FileDisplay id='item-6' displayText={args.withDisplayText ? 'review.pps' : undefined} value={args.withValue ? 'https://pega.com/media/review.pps' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
id: '7',
|
|
61
|
-
name: 'Spreadsheet file',
|
|
62
|
-
value: (<FileDisplay id='item-7' displayText={args.withDisplayText ? 'welfare.xlsx' : undefined} value={args.withValue ? 'https://pega.com/media/welfare.xlsx' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
id: '8',
|
|
66
|
-
name: 'Email',
|
|
67
|
-
value: (<FileDisplay id='item-8' displayText={args.withDisplayText ? 'message.eml' : undefined} value={args.withValue ? 'https://pega.com/media/message.eml' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
id: '9',
|
|
71
|
-
name: 'Database',
|
|
72
|
-
value: (<FileDisplay id='item-9' displayText={args.withDisplayText ? 'data.odb' : undefined} value={args.withValue ? 'https://pega.com/media/data.odb' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: '10',
|
|
76
|
-
name: 'Zip file',
|
|
77
|
-
value: (<FileDisplay id='item-10' displayText={args.withDisplayText ? 'compress.zip' : undefined} value={args.withValue ? 'https://pega.com/media/compress.zip' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
id: '11',
|
|
81
|
-
name: 'Unknown file type',
|
|
82
|
-
value: (<FileDisplay id='item-11' displayText={args.withDisplayText ? 'foo.xyz' : undefined} value={args.withValue ? 'https://pega.com/media/foo.xyz' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: '12',
|
|
86
|
-
name: 'Image file',
|
|
87
|
-
value: (<FileDisplay id='item-12' displayText={args.withDisplayText ? 'image.jpg' : undefined} value={args.withValue ? 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
|
|
88
|
-
}
|
|
89
|
-
];
|
|
90
|
-
return <FieldValueList fields={fields}/>;
|
|
91
|
-
};
|
|
92
|
-
FileDisplayTypes.args = {
|
|
93
|
-
withDisplayText: true
|
|
94
|
-
};
|
|
95
|
-
FileDisplayTypes.argTypes = {
|
|
96
|
-
withDisplayText: { control: { type: 'boolean' } }
|
|
97
|
-
};
|
|
98
|
-
export const FileDisplayDemo = (args) => {
|
|
99
|
-
const { push } = useToaster();
|
|
100
|
-
const handlePreview = args.withPreview
|
|
101
|
-
? (id) => push({ content: `Previewed ${id}` })
|
|
102
|
-
: undefined;
|
|
103
|
-
const handleDownload = args.withDownload
|
|
104
|
-
? (id) => push({ content: `Downloaded ${id}` })
|
|
105
|
-
: undefined;
|
|
106
|
-
const imageSrc = args.withPreview
|
|
107
|
-
? 'https://www.pega.com/sites/default/files/styles/480/public/media/images/2021-02/pwi-2021-prevcard.jpg'
|
|
108
|
-
: 'https://pega.com/media/compress.zip';
|
|
109
|
-
return (<FileDisplay id='item-1' variant={args.variant} displayText={args.displayText} value={args.withValue ? imageSrc : undefined} onPreview={handlePreview} onDownload={handleDownload} compact={args.compact}/>);
|
|
110
|
-
};
|
|
111
|
-
FileDisplayDemo.args = {
|
|
112
|
-
variant: 'file',
|
|
113
|
-
displayText: 'Pega World iNspire',
|
|
114
|
-
compact: false
|
|
115
|
-
};
|
|
116
|
-
FileDisplayDemo.argTypes = {
|
|
117
|
-
variant: { options: ['file', 'text', 'link'], control: { type: 'radio' } },
|
|
118
|
-
displayText: { control: { type: 'text' } },
|
|
119
|
-
compact: { control: { type: 'boolean' } }
|
|
120
|
-
};
|
|
121
|
-
export const FileDisplayListDemo = (args) => {
|
|
122
|
-
const [loading, setLoading] = useState(false);
|
|
123
|
-
const timeout = useRef();
|
|
124
|
-
const items = args.items ?? displayFiles;
|
|
125
|
-
const delayedFiles = !loading ? items : undefined;
|
|
126
|
-
const handleDownloadAll = () => action(`${items.length} files Downloaded`);
|
|
127
|
-
return (<FileDisplayList variant={args.variant} items={args.compact ? delayedFiles : items} compact={args.compact} count={args.compact ? items.length : undefined} heading={args.compact ? args.heading ?? 'Files' : undefined} onDownloadAll={args.enableDownloadAll ? handleDownloadAll : undefined} onDialogOpen={() => {
|
|
128
|
-
setLoading(true);
|
|
129
|
-
timeout.current = setTimeout(() => {
|
|
130
|
-
setLoading(false);
|
|
131
|
-
timeout.current = undefined;
|
|
132
|
-
}, 2000);
|
|
133
|
-
}} onDialogClose={() => {
|
|
134
|
-
clearTimeout(timeout.current);
|
|
135
|
-
timeout.current = undefined;
|
|
136
|
-
setLoading(false);
|
|
137
|
-
}} progress={args.compact && loading}/>);
|
|
138
|
-
};
|
|
139
|
-
FileDisplayListDemo.parameters = {
|
|
140
|
-
controls: { exclude: ['withPreview', 'withDownload', 'withValue'] }
|
|
141
|
-
};
|
|
142
|
-
FileDisplayListDemo.args = {
|
|
143
|
-
variant: 'file',
|
|
144
|
-
compact: false,
|
|
145
|
-
enableDownloadAll: true
|
|
146
|
-
};
|
|
147
|
-
FileDisplayListDemo.argTypes = {
|
|
148
|
-
variant: { options: ['file', 'text', 'link'], control: { type: 'radio' } },
|
|
149
|
-
compact: { control: { type: 'boolean' } },
|
|
150
|
-
enableDownloadAll: { control: { type: 'boolean' } },
|
|
151
|
-
withValue: { table: { disable: true } },
|
|
152
|
-
withPreview: { table: { disable: true } },
|
|
153
|
-
withDownload: { table: { disable: true } }
|
|
154
|
-
};
|
|
155
|
-
export const FileUploadItemDemo = (args) => {
|
|
156
|
-
const { push } = useToaster();
|
|
157
|
-
const handlePreview = args.withPreview
|
|
158
|
-
? (name) => push({ content: `Previewed ${name}` })
|
|
159
|
-
: undefined;
|
|
160
|
-
const handleDownload = args.withDownload
|
|
161
|
-
? (name) => push({ content: `Downloaded ${name}` })
|
|
162
|
-
: undefined;
|
|
163
|
-
const imageSrc = 'https://www.pega.com/sites/default/files/styles/480/public/media/images/2021-02/pwi-2021-prevcard.jpg';
|
|
164
|
-
return (<FileUploadItem name={args.name} meta={args.meta} error={args.error} progress={args.progress} thumbnail={imageSrc} onPreview={handlePreview} onDownload={handleDownload}/>);
|
|
165
|
-
};
|
|
166
|
-
FileUploadItemDemo.args = {
|
|
167
|
-
name: 'Pega World iNspire',
|
|
168
|
-
meta: 'Some additional information',
|
|
169
|
-
error: false,
|
|
170
|
-
progress: 100
|
|
171
|
-
};
|
|
172
|
-
FileUploadItemDemo.argTypes = {
|
|
173
|
-
withValue: { table: { disable: true } },
|
|
174
|
-
name: { control: { type: 'text' } },
|
|
175
|
-
meta: { control: { type: 'text' } },
|
|
176
|
-
error: { control: { type: 'boolean' } },
|
|
177
|
-
progress: { control: { type: 'number' } }
|
|
178
|
-
};
|
|
179
|
-
//# sourceMappingURL=FileDisplay.stories.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileDisplay.stories.jsx","sourceRoot":"","sources":["../../../src/core/File/FileDisplay.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EACL,WAAW,EACX,cAAc,EACd,UAAU,EACV,cAAc,EACd,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAQjC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE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O,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACvC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC1C,CAAC","sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport { useRef, useState } from 'react';\nimport { action } from '@storybook/addon-actions';\n\nimport {\n FileDisplay,\n FieldValueList,\n useToaster,\n FileUploadItem,\n FileDisplayList\n} from '@pega/cosmos-react-core';\nimport type {\n FileDisplayProps,\n FileItemProps,\n FileUploadItemProps,\n FileDisplayListProps\n} from '@pega/cosmos-react-core';\n\nimport { displayFiles } from './FileDisplay.mocks';\n\nexport default {\n title: 'Core/File/Display',\n component: FileDisplay,\n args: {\n withValue: true,\n withPreview: true,\n withDownload: true\n },\n argTypes: {\n withValue: { control: { type: 'boolean' } },\n withPreview: { control: { type: 'boolean' } },\n withDownload: { control: { type: 'boolean' } }\n }\n} as Meta;\n\ninterface FileDisplayDemoProps {\n withDisplayText?: boolean;\n withValue?: boolean;\n withPreview?: boolean;\n withDownload?: boolean;\n compact?: boolean;\n}\n\nexport const FileDisplayTypes: StoryFn<FileDisplayDemoProps> = (args: FileDisplayDemoProps) => {\n const { push } = useToaster();\n\n const handlePreview = args.withPreview\n ? (id: FileItemProps['id']) => push({ content: `Previewed ${id}` })\n : undefined;\n\n const handleDownload = args.withDownload\n ? (id: FileItemProps['id']) => push({ content: `Downloaded ${id}` })\n : undefined;\n\n const imageSrc =\n 'https://www.pega.com/sites/default/files/styles/480/public/media/images/2021-02/pwi-2021-prevcard.jpg';\n\n const fields = [\n {\n id: '1',\n name: 'Image file with thumbnail',\n value: (\n <FileDisplay\n id='item-1'\n displayText={args.withDisplayText ? 'image.jpg' : undefined}\n value={args.withValue ? 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg' : undefined}\n thumbnail={imageSrc}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '2',\n name: 'Video file',\n value: (\n <FileDisplay\n id='item-2'\n displayText={args.withDisplayText ? 'video.avi' : undefined}\n value={args.withValue ? 'https://pega.com/media/some-video.avi' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '3',\n name: 'Audio file',\n value: (\n <FileDisplay\n id='item-3'\n displayText={args.withDisplayText ? 'recording.mp3' : undefined}\n value={args.withValue ? 'https://pega.com/media/sprint-review-recording.mp3' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '4',\n name: 'Document file',\n value: (\n <FileDisplay\n id='item-4'\n displayText={args.withDisplayText ? 'document.doc' : undefined}\n value={args.withValue ? 'https://pega.com/media/document.doc' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '5',\n name: 'PDF file',\n value: (\n <FileDisplay\n id='item-5'\n displayText={args.withDisplayText ? 'invoice.pdf' : undefined}\n value={args.withValue ? 'https://pega.com/media/invoice.pdf' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '6',\n name: 'Presentation file',\n value: (\n <FileDisplay\n id='item-6'\n displayText={args.withDisplayText ? 'review.pps' : undefined}\n value={args.withValue ? 'https://pega.com/media/review.pps' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '7',\n name: 'Spreadsheet file',\n value: (\n <FileDisplay\n id='item-7'\n displayText={args.withDisplayText ? 'welfare.xlsx' : undefined}\n value={args.withValue ? 'https://pega.com/media/welfare.xlsx' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '8',\n name: 'Email',\n value: (\n <FileDisplay\n id='item-8'\n displayText={args.withDisplayText ? 'message.eml' : undefined}\n value={args.withValue ? 'https://pega.com/media/message.eml' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '9',\n name: 'Database',\n value: (\n <FileDisplay\n id='item-9'\n displayText={args.withDisplayText ? 'data.odb' : undefined}\n value={args.withValue ? 'https://pega.com/media/data.odb' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '10',\n name: 'Zip file',\n value: (\n <FileDisplay\n id='item-10'\n displayText={args.withDisplayText ? 'compress.zip' : undefined}\n value={args.withValue ? 'https://pega.com/media/compress.zip' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '11',\n name: 'Unknown file type',\n value: (\n <FileDisplay\n id='item-11'\n displayText={args.withDisplayText ? 'foo.xyz' : undefined}\n value={args.withValue ? 'https://pega.com/media/foo.xyz' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '12',\n name: 'Image file',\n value: (\n <FileDisplay\n id='item-12'\n displayText={args.withDisplayText ? 'image.jpg' : undefined}\n value={args.withValue ? 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n }\n ];\n\n return <FieldValueList fields={fields} />;\n};\n\nFileDisplayTypes.args = {\n withDisplayText: true\n};\n\nFileDisplayTypes.argTypes = {\n withDisplayText: { control: { type: 'boolean' } }\n};\n\nexport const FileDisplayDemo: StoryFn<FileDisplayProps & FileDisplayDemoProps> = (\n args: FileDisplayProps & FileDisplayDemoProps\n) => {\n const { push } = useToaster();\n\n const handlePreview = args.withPreview\n ? (id: FileItemProps['id']) => push({ content: `Previewed ${id}` })\n : undefined;\n\n const handleDownload = args.withDownload\n ? (id: FileItemProps['id']) => push({ content: `Downloaded ${id}` })\n : undefined;\n\n const imageSrc = args.withPreview\n ? 'https://www.pega.com/sites/default/files/styles/480/public/media/images/2021-02/pwi-2021-prevcard.jpg'\n : 'https://pega.com/media/compress.zip';\n\n return (\n <FileDisplay\n id='item-1'\n variant={args.variant}\n displayText={args.displayText}\n value={args.withValue ? imageSrc : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n compact={args.compact}\n />\n );\n};\n\nFileDisplayDemo.args = {\n variant: 'file',\n displayText: 'Pega World iNspire',\n compact: false\n};\n\nFileDisplayDemo.argTypes = {\n variant: { options: ['file', 'text', 'link'], control: { type: 'radio' } },\n displayText: { control: { type: 'text' } },\n compact: { control: { type: 'boolean' } }\n};\n\nexport const FileDisplayListDemo: StoryFn<\n Pick<FileDisplayListProps, 'variant' | 'compact' | 'items' | 'heading' | 'onDownloadAll'> & {\n enableDownloadAll?: boolean;\n withValue?: boolean;\n withPreview?: boolean;\n withDownload?: boolean;\n }\n> = (\n args: Pick<FileDisplayListProps, 'variant' | 'compact' | 'items' | 'heading'> & {\n enableDownloadAll?: boolean;\n }\n) => {\n const [loading, setLoading] = useState(false);\n const timeout = useRef<ReturnType<typeof setTimeout>>();\n const items = args.items ?? displayFiles;\n const delayedFiles = !loading ? items : undefined;\n\n const handleDownloadAll = () => action(`${items.length} files Downloaded`);\n\n return (\n <FileDisplayList\n variant={args.variant}\n items={args.compact ? delayedFiles : items}\n compact={args.compact}\n count={args.compact ? items.length : undefined}\n heading={args.compact ? args.heading ?? 'Files' : undefined}\n onDownloadAll={args.enableDownloadAll ? handleDownloadAll : undefined}\n onDialogOpen={() => {\n setLoading(true);\n timeout.current = setTimeout(() => {\n setLoading(false);\n timeout.current = undefined;\n }, 2000);\n }}\n onDialogClose={() => {\n clearTimeout(timeout.current);\n timeout.current = undefined;\n setLoading(false);\n }}\n progress={args.compact && loading}\n />\n );\n};\n\nFileDisplayListDemo.parameters = {\n controls: { exclude: ['withPreview', 'withDownload', 'withValue'] }\n};\n\nFileDisplayListDemo.args = {\n variant: 'file',\n compact: false,\n enableDownloadAll: true\n};\n\nFileDisplayListDemo.argTypes = {\n variant: { options: ['file', 'text', 'link'], control: { type: 'radio' } },\n compact: { control: { type: 'boolean' } },\n enableDownloadAll: { control: { type: 'boolean' } },\n withValue: { table: { disable: true } },\n withPreview: { table: { disable: true } },\n withDownload: { table: { disable: true } }\n};\n\ninterface FileUploadItemDemoProps extends FileDisplayDemoProps {\n name: FileUploadItemProps['name'];\n meta?: FileUploadItemProps['meta'];\n error?: FileUploadItemProps['error'];\n progress?: FileUploadItemProps['progress'];\n}\n\nexport const FileUploadItemDemo: StoryFn<FileUploadItemDemoProps> = (\n args: FileUploadItemDemoProps\n) => {\n const { push } = useToaster();\n\n const handlePreview = args.withPreview\n ? (name: FileUploadItemProps['name']) => push({ content: `Previewed ${name}` })\n : undefined;\n\n const handleDownload = args.withDownload\n ? (name: FileUploadItemProps['name']) => push({ content: `Downloaded ${name}` })\n : undefined;\n\n const imageSrc =\n 'https://www.pega.com/sites/default/files/styles/480/public/media/images/2021-02/pwi-2021-prevcard.jpg';\n\n return (\n <FileUploadItem\n name={args.name}\n meta={args.meta}\n error={args.error}\n progress={args.progress}\n thumbnail={imageSrc}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n );\n};\n\nFileUploadItemDemo.args = {\n name: 'Pega World iNspire',\n meta: 'Some additional information',\n error: false,\n progress: 100\n};\n\nFileUploadItemDemo.argTypes = {\n withValue: { table: { disable: true } },\n name: { control: { type: 'text' } },\n meta: { control: { type: 'text' } },\n error: { control: { type: 'boolean' } },\n progress: { control: { type: 'number' } }\n};\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { StoryFn } from '@storybook/react';
|
|
2
|
-
import type { FileInputProps, OmitStrict } from '@pega/cosmos-react-core';
|
|
3
|
-
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/dist/types-a5624094").ReactRenderer, import("@storybook/csf").Args>;
|
|
4
|
-
export default _default;
|
|
5
|
-
interface FileInputStoryProps extends OmitStrict<FileInputProps, 'accept'> {
|
|
6
|
-
sizeLimit?: number;
|
|
7
|
-
showAdditionalInfo?: boolean;
|
|
8
|
-
accept?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const FileInputDemo: StoryFn<FileInputStoryProps & {
|
|
11
|
-
enableDownloadAll?: boolean;
|
|
12
|
-
}>;
|
|
13
|
-
//# sourceMappingURL=FileInput.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.stories.d.ts","sourceRoot":"","sources":["../../../src/core/File/FileInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAYtD,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;;AAS1E,wBAGU;AAEV,UAAU,mBAAoB,SAAQ,UAAU,CAAC,cAAc,EAAE,QAAQ,CAAC;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,mBAAmB,GAAG;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAE,CAqKxF,CAAC"}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { useState, useMemo, useCallback, useRef, useContext } from 'react';
|
|
2
|
-
import { action } from '@storybook/addon-actions';
|
|
3
|
-
import { FileInput, useAfterInitialEffect, Flex, Link, createUID, hasProp } from '@pega/cosmos-react-core';
|
|
4
|
-
import { FileServiceContext } from './FileService.mock';
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Core/File/Input',
|
|
7
|
-
component: FileInput
|
|
8
|
-
};
|
|
9
|
-
export const FileInputDemo = (args) => {
|
|
10
|
-
const { files, setFiles, attachFile, deleteFile, cancelFile } = useContext(FileServiceContext);
|
|
11
|
-
const errCounts = useRef({ invalidType: 0, invalidSize: 0 });
|
|
12
|
-
const [hasError, setHasError] = useState(false);
|
|
13
|
-
const [loading, setLoading] = useState(false);
|
|
14
|
-
const [uploadedFileCount, setUploadedFileCount] = useState(0);
|
|
15
|
-
const [filesBeforeCancel, setFilesBeforeCancel] = useState([]);
|
|
16
|
-
const sizeLimit = args.sizeLimit || 100;
|
|
17
|
-
const isMockFileItems = (fileItems) => {
|
|
18
|
-
return fileItems.every(item => hasProp(item, 'format'));
|
|
19
|
-
};
|
|
20
|
-
const onFilesAdded = useCallback((addedFiles) => {
|
|
21
|
-
errCounts.current = { invalidType: 0, invalidSize: 0 };
|
|
22
|
-
const newFiles = addedFiles.filter(f => {
|
|
23
|
-
let isValidSize = true;
|
|
24
|
-
if (f.size / 1000000 > sizeLimit) {
|
|
25
|
-
errCounts.current.invalidSize += 1;
|
|
26
|
-
isValidSize = false;
|
|
27
|
-
}
|
|
28
|
-
return isValidSize;
|
|
29
|
-
});
|
|
30
|
-
setHasError(newFiles.length < addedFiles.length);
|
|
31
|
-
newFiles.forEach((File) => {
|
|
32
|
-
const id = createUID();
|
|
33
|
-
attachFile({
|
|
34
|
-
id,
|
|
35
|
-
thumbnail: File.type.startsWith('image') ? URL.createObjectURL(File) : undefined,
|
|
36
|
-
name: File.name,
|
|
37
|
-
format: File.name.split('.').pop(),
|
|
38
|
-
category: 'category-1',
|
|
39
|
-
File
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
}, [attachFile]);
|
|
43
|
-
useAfterInitialEffect(() => {
|
|
44
|
-
if (files.length === 0)
|
|
45
|
-
setHasError(false);
|
|
46
|
-
}, [files.length]);
|
|
47
|
-
const info = useMemo(() => {
|
|
48
|
-
return hasError
|
|
49
|
-
? errCounts.current.invalidSize > 0 && (<div>{`File size must be less than ${sizeLimit}MB`}</div>)
|
|
50
|
-
: null;
|
|
51
|
-
}, [hasError]);
|
|
52
|
-
const items = isMockFileItems(files)
|
|
53
|
-
? files.map(({ id, name, format, progress, thumbnail }) => {
|
|
54
|
-
const isLoaded = progress === 100;
|
|
55
|
-
return {
|
|
56
|
-
id,
|
|
57
|
-
name,
|
|
58
|
-
format,
|
|
59
|
-
progress: progress ?? 0,
|
|
60
|
-
thumbnail: isLoaded ? thumbnail : undefined,
|
|
61
|
-
onEdit: isLoaded ? action('edit') : undefined,
|
|
62
|
-
onCancel: () => {
|
|
63
|
-
cancelFile(id);
|
|
64
|
-
},
|
|
65
|
-
onPreview: isLoaded ? action('on preview') : undefined,
|
|
66
|
-
onDownload: isLoaded ? action('on download') : undefined,
|
|
67
|
-
onDelete: isLoaded
|
|
68
|
-
? () => {
|
|
69
|
-
setTimeout(() => {
|
|
70
|
-
deleteFile(id);
|
|
71
|
-
}, 1000);
|
|
72
|
-
}
|
|
73
|
-
: undefined
|
|
74
|
-
};
|
|
75
|
-
})
|
|
76
|
-
: [];
|
|
77
|
-
const handleDownloadAll = () => action(`${items.length} files downloaded`);
|
|
78
|
-
return (<FileInput label={args.label} labelHidden={args.labelHidden} multiple={args.multiple} status={hasError ? 'error' : args.status} info={info || args.info} required={args.required} disabled={args.disabled} readOnly={args.readOnly} onFilesAdded={onFilesAdded} onDownloadAll={args.enableDownloadAll ? handleDownloadAll : undefined} files={args.files || items} compact={args.compact} previewFromActions={args.previewFromActions} count={args.compact && args.multiple ? uploadedFileCount : undefined} modal={args.compact && args.multiple
|
|
79
|
-
? {
|
|
80
|
-
onBeforeOpen: () => {
|
|
81
|
-
if (items.length > 0) {
|
|
82
|
-
setLoading(true);
|
|
83
|
-
setFilesBeforeCancel(files);
|
|
84
|
-
setTimeout(() => {
|
|
85
|
-
setLoading(false);
|
|
86
|
-
}, 1000);
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
setFilesBeforeCancel(files);
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
onCancel: ({ close }) => {
|
|
93
|
-
if (filesBeforeCancel)
|
|
94
|
-
setFiles(filesBeforeCancel);
|
|
95
|
-
close();
|
|
96
|
-
},
|
|
97
|
-
onSubmit: ({ close }) => {
|
|
98
|
-
setLoading(true);
|
|
99
|
-
setTimeout(() => {
|
|
100
|
-
setLoading(false);
|
|
101
|
-
setUploadedFileCount(items.length);
|
|
102
|
-
close();
|
|
103
|
-
}, 1000);
|
|
104
|
-
},
|
|
105
|
-
loading
|
|
106
|
-
}
|
|
107
|
-
: undefined} additionalInfo={args.showAdditionalInfo
|
|
108
|
-
? {
|
|
109
|
-
content: (<Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>
|
|
110
|
-
<p>
|
|
111
|
-
Lorem ipsum dolor sit amet, consectetur it, sed do tempor incididunt ut labore
|
|
112
|
-
magna aliqua. Nibh praesent tristique magna sit amet. Nec tincidunt praesent
|
|
113
|
-
semper feugiat nibh sed pulvinar proin gravida.
|
|
114
|
-
</p>
|
|
115
|
-
<p>
|
|
116
|
-
Pharetra pharetra massa massa ultricies mi quis hendrerit dolor. Est velit
|
|
117
|
-
egestas dui id ornare arcu odio ut. Varius sit amet mattis vulputate enim nulla
|
|
118
|
-
aliquet porttitor lacus.
|
|
119
|
-
</p>
|
|
120
|
-
<Link href='/' target='_blank'>
|
|
121
|
-
Neque vitae
|
|
122
|
-
</Link>
|
|
123
|
-
</Flex>)
|
|
124
|
-
}
|
|
125
|
-
: undefined} accept={args.accept?.split(',')}/>);
|
|
126
|
-
};
|
|
127
|
-
FileInputDemo.args = {
|
|
128
|
-
multiple: true,
|
|
129
|
-
sizeLimit: 100,
|
|
130
|
-
label: 'File input label',
|
|
131
|
-
labelHidden: false,
|
|
132
|
-
info: '',
|
|
133
|
-
status: undefined,
|
|
134
|
-
required: false,
|
|
135
|
-
disabled: false,
|
|
136
|
-
readOnly: false,
|
|
137
|
-
showAdditionalInfo: false,
|
|
138
|
-
accept: 'application/pdf, .jpeg, image/png, .doc, .docx',
|
|
139
|
-
compact: false,
|
|
140
|
-
previewFromActions: false,
|
|
141
|
-
enableDownloadAll: true
|
|
142
|
-
};
|
|
143
|
-
FileInputDemo.argTypes = {
|
|
144
|
-
multiple: { control: { type: 'boolean' } },
|
|
145
|
-
sizeLimit: { control: { type: 'number' } },
|
|
146
|
-
label: { control: { type: 'text' } },
|
|
147
|
-
labelHidden: { control: { type: 'boolean' } },
|
|
148
|
-
info: { control: { type: 'text' } },
|
|
149
|
-
status: {
|
|
150
|
-
options: [undefined, 'success', 'warning', 'error', 'pending'],
|
|
151
|
-
control: { type: 'select' }
|
|
152
|
-
},
|
|
153
|
-
required: { control: { type: 'boolean' } },
|
|
154
|
-
disabled: { control: { type: 'boolean' } },
|
|
155
|
-
readOnly: { control: { type: 'boolean' } },
|
|
156
|
-
showAdditionalInfo: { control: { type: 'boolean' } },
|
|
157
|
-
accept: { control: { type: 'text' } },
|
|
158
|
-
compact: { control: { type: 'boolean' } },
|
|
159
|
-
previewFromActions: { control: { type: 'boolean' } },
|
|
160
|
-
enableDownloadAll: { control: { type: 'boolean' } }
|
|
161
|
-
};
|
|
162
|
-
//# sourceMappingURL=FileInput.stories.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.stories.jsx","sourceRoot":"","sources":["../../../src/core/File/FileInput.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EACL,SAAS,EACT,qBAAqB,EACrB,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,OAAO,EACR,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAOxD,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,SAAS;CACb,CAAC;AAQV,MAAM,CAAC,MAAM,aAAa,GAAmE,CAC3F,IAA2D,EAC3D,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAE/F,MAAM,SAAS,GAAG,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC;IAC7D,MAAM,CAAC,QAAQ,EAAE,WAA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O,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACpC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACnC,MAAM,EAAE;QACN,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC;QAC9D,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;IACD,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,kBAAkB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACpD,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACrC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACzC,kBAAkB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACpD,iBAAiB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CACpD,CAAC","sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport { useState, useMemo, useCallback, useRef, useContext } from 'react';\nimport { action } from '@storybook/addon-actions';\n\nimport {\n FileInput,\n useAfterInitialEffect,\n Flex,\n Link,\n createUID,\n hasProp\n} from '@pega/cosmos-react-core';\nimport type { FileInputProps, OmitStrict } from '@pega/cosmos-react-core';\n\nimport { FileServiceContext } from './FileService.mock';\nimport type {\n MockFileItem,\n MockFileAttachmentResource,\n MockFileUploadItem\n} from './FileService.mock';\n\nexport default {\n title: 'Core/File/Input',\n component: FileInput\n} as Meta;\n\ninterface FileInputStoryProps extends OmitStrict<FileInputProps, 'accept'> {\n sizeLimit?: number;\n showAdditionalInfo?: boolean;\n accept?: string;\n}\n\nexport const FileInputDemo: StoryFn<FileInputStoryProps & { enableDownloadAll?: boolean }> = (\n args: FileInputStoryProps & { enableDownloadAll?: boolean }\n) => {\n const { files, setFiles, attachFile, deleteFile, cancelFile } = useContext(FileServiceContext);\n\n const errCounts = useRef({ invalidType: 0, invalidSize: 0 });\n const [hasError, setHasError] = useState(false);\n const [loading, setLoading] = useState(false);\n const [uploadedFileCount, setUploadedFileCount] = useState(0);\n const [filesBeforeCancel, setFilesBeforeCancel] = useState<\n (MockFileAttachmentResource | MockFileUploadItem | MockFileItem)[]\n >([]);\n const sizeLimit = args.sizeLimit || 100;\n\n const isMockFileItems = (\n fileItems: (MockFileAttachmentResource | MockFileUploadItem | MockFileItem)[]\n ): fileItems is MockFileItem[] => {\n return fileItems.every(item => hasProp(item, 'format'));\n };\n\n // Fires anytime files are added to the input either through selection or drop\n const onFilesAdded = useCallback(\n (addedFiles: File[]) => {\n errCounts.current = { invalidType: 0, invalidSize: 0 };\n\n const newFiles = addedFiles.filter(f => {\n let isValidSize = true;\n\n if (f.size / 1000000 > sizeLimit) {\n errCounts.current.invalidSize += 1;\n isValidSize = false;\n }\n\n return isValidSize;\n });\n\n setHasError(newFiles.length < addedFiles.length);\n\n newFiles.forEach((File: File) => {\n const id = createUID();\n attachFile({\n id,\n thumbnail: File.type.startsWith('image') ? URL.createObjectURL(File) : undefined,\n name: File.name,\n format: File.name.split('.').pop(),\n category: 'category-1',\n File\n });\n });\n },\n [attachFile]\n );\n\n useAfterInitialEffect(() => {\n if (files.length === 0) setHasError(false);\n }, [files.length]);\n\n const info = useMemo(() => {\n return hasError\n ? errCounts.current.invalidSize > 0 && (\n <div>{`File size must be less than ${sizeLimit}MB`}</div>\n )\n : null;\n }, [hasError]);\n\n const items = isMockFileItems(files)\n ? files.map(({ id, name, format, progress, thumbnail }) => {\n const isLoaded = progress === 100;\n return {\n id,\n name,\n format,\n progress: progress ?? 0,\n thumbnail: isLoaded ? thumbnail : undefined,\n onEdit: isLoaded ? action('edit') : undefined,\n onCancel: () => {\n cancelFile(id);\n },\n onPreview: isLoaded ? action('on preview') : undefined,\n onDownload: isLoaded ? action('on download') : undefined,\n onDelete: isLoaded\n ? () => {\n setTimeout(() => {\n deleteFile(id);\n }, 1000);\n }\n : undefined\n };\n })\n : [];\n\n const handleDownloadAll = () => action(`${items.length} files downloaded`);\n\n return (\n <FileInput\n label={args.label}\n labelHidden={args.labelHidden}\n multiple={args.multiple}\n status={hasError ? 'error' : args.status}\n info={info || args.info}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n onFilesAdded={onFilesAdded}\n onDownloadAll={args.enableDownloadAll ? handleDownloadAll : undefined}\n files={args.files || items}\n compact={args.compact}\n previewFromActions={args.previewFromActions}\n count={args.compact && args.multiple ? uploadedFileCount : undefined}\n modal={\n args.compact && args.multiple\n ? {\n onBeforeOpen: () => {\n if (items.length > 0) {\n setLoading(true);\n setFilesBeforeCancel(files);\n setTimeout(() => {\n setLoading(false);\n }, 1000);\n } else {\n setFilesBeforeCancel(files);\n }\n },\n onCancel: ({ close }) => {\n if (filesBeforeCancel) setFiles(filesBeforeCancel);\n close();\n },\n onSubmit: ({ close }) => {\n setLoading(true);\n setTimeout(() => {\n setLoading(false);\n setUploadedFileCount(items.length);\n close();\n }, 1000);\n },\n loading\n }\n : undefined\n }\n additionalInfo={\n args.showAdditionalInfo\n ? {\n content: (\n <Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>\n <p>\n Lorem ipsum dolor sit amet, consectetur it, sed do tempor incididunt ut labore\n magna aliqua. Nibh praesent tristique magna sit amet. Nec tincidunt praesent\n semper feugiat nibh sed pulvinar proin gravida.\n </p>\n <p>\n Pharetra pharetra massa massa ultricies mi quis hendrerit dolor. Est velit\n egestas dui id ornare arcu odio ut. Varius sit amet mattis vulputate enim nulla\n aliquet porttitor lacus.\n </p>\n <Link href='/' target='_blank'>\n Neque vitae\n </Link>\n </Flex>\n )\n }\n : undefined\n }\n accept={args.accept?.split(',')}\n />\n );\n};\n\nFileInputDemo.args = {\n multiple: true,\n sizeLimit: 100,\n label: 'File input label',\n labelHidden: false,\n info: '',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false,\n showAdditionalInfo: false,\n accept: 'application/pdf, .jpeg, image/png, .doc, .docx',\n compact: false,\n previewFromActions: false,\n enableDownloadAll: true\n};\n\nFileInputDemo.argTypes = {\n multiple: { control: { type: 'boolean' } },\n sizeLimit: { control: { type: 'number' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n status: {\n options: [undefined, 'success', 'warning', 'error', 'pending'],\n control: { type: 'select' }\n },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } },\n showAdditionalInfo: { control: { type: 'boolean' } },\n accept: { control: { type: 'text' } },\n compact: { control: { type: 'boolean' } },\n previewFromActions: { control: { type: 'boolean' } },\n enableDownloadAll: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { ReactNode, FunctionComponent, Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import type { FileUploadItemProps, FileItemProps, OmitStrict } from '@pega/cosmos-react-core';
|
|
3
|
-
export interface MockFileAttachmentResource {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
category: string;
|
|
7
|
-
thumbnail?: string;
|
|
8
|
-
createDate?: number;
|
|
9
|
-
modifiedDate?: number;
|
|
10
|
-
}
|
|
11
|
-
export interface MockFileUploadItem extends Pick<MockFileAttachmentResource, 'id' | 'category'>, OmitStrict<FileUploadItemProps, 'id'> {
|
|
12
|
-
File: File;
|
|
13
|
-
}
|
|
14
|
-
export interface MockFileItem extends OmitStrict<FileItemProps, 'id'>, Pick<MockFileAttachmentResource, 'id' | 'category'> {
|
|
15
|
-
File: File;
|
|
16
|
-
}
|
|
17
|
-
export interface FileServiceContextValue {
|
|
18
|
-
files: (MockFileAttachmentResource | MockFileUploadItem | MockFileItem)[];
|
|
19
|
-
setFiles: Dispatch<SetStateAction<FileServiceContextValue['files']>>;
|
|
20
|
-
attachFile: (file: MockFileItem) => void;
|
|
21
|
-
cancelFile: (id: MockFileAttachmentResource['id']) => void;
|
|
22
|
-
deleteFile: (id: MockFileAttachmentResource['id']) => void;
|
|
23
|
-
}
|
|
24
|
-
export declare const FileServiceContext: import("react").Context<FileServiceContextValue>;
|
|
25
|
-
export declare const mockCategories: ('HR' | 'Marketing' | 'Sales' | 'Accounting' | 'Engineering')[];
|
|
26
|
-
export declare const mockAttachmentListRequest: () => Promise<MockFileAttachmentResource[]>;
|
|
27
|
-
declare const Provider: FunctionComponent<{
|
|
28
|
-
children: ReactNode;
|
|
29
|
-
}>;
|
|
30
|
-
export default Provider;
|
|
31
|
-
//# sourceMappingURL=FileService.mock.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileService.mock.d.ts","sourceRoot":"","sources":["../../../src/core/File/FileService.mock.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAK9F,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAKD,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,0BAA0B,EAAE,IAAI,GAAG,UAAU,CAAC,EACzD,UAAU,CAAC,mBAAmB,EAAE,IAAI,CAAC;IACvC,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,YACf,SAAQ,UAAU,CAAC,aAAa,EAAE,IAAI,CAAC,EACrC,IAAI,CAAC,0BAA0B,EAAE,IAAI,GAAG,UAAU,CAAC;IACrD,IAAI,EAAE,IAAI,CAAC;CACZ;AAKD,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,CAAC,0BAA0B,GAAG,kBAAkB,GAAG,YAAY,CAAC,EAAE,CAAC;IAC1E,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACrE,UAAU,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACzC,UAAU,EAAE,CAAC,EAAE,EAAE,0BAA0B,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC3D,UAAU,EAAE,CAAC,EAAE,EAAE,0BAA0B,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;CAC5D;AAKD,eAAO,MAAM,kBAAkB,kDAM7B,CAAC;AA8BH,eAAO,MAAM,cAAc,EAAE,CAAC,IAAI,GAAG,WAAW,GAAG,OAAO,GAAG,YAAY,GAAG,aAAa,CAAC,EAMzF,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAAO,QAAQ,0BAA0B,EAAE,CA+BhF,CAAC;AAKF,QAAA,MAAM,QAAQ,EAAE,iBAAiB,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CA4ExD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { createContext, useState, useCallback, useMemo } from 'react';
|
|
2
|
-
import { createUID, hasProp, useAfterInitialEffect } from '@pega/cosmos-react-core';
|
|
3
|
-
export const FileServiceContext = createContext({
|
|
4
|
-
files: [],
|
|
5
|
-
setFiles: () => { },
|
|
6
|
-
attachFile: () => { },
|
|
7
|
-
cancelFile: () => { },
|
|
8
|
-
deleteFile: () => { }
|
|
9
|
-
});
|
|
10
|
-
const postFile = ({ file, onProgress, onLoad, currentProgress }) => {
|
|
11
|
-
onProgress(file, currentProgress);
|
|
12
|
-
setTimeout(() => {
|
|
13
|
-
const progress = currentProgress + 5;
|
|
14
|
-
if (progress <= 100)
|
|
15
|
-
postFile({ file, onProgress, onLoad, currentProgress: progress });
|
|
16
|
-
else
|
|
17
|
-
onLoad(file);
|
|
18
|
-
}, 100);
|
|
19
|
-
};
|
|
20
|
-
const getMockPriorDate = (h) => {
|
|
21
|
-
const d = new Date();
|
|
22
|
-
return d.setHours(d.getHours() - h);
|
|
23
|
-
};
|
|
24
|
-
export const mockCategories = [
|
|
25
|
-
'HR',
|
|
26
|
-
'Marketing',
|
|
27
|
-
'Sales',
|
|
28
|
-
'Accounting',
|
|
29
|
-
'Engineering'
|
|
30
|
-
];
|
|
31
|
-
export const mockAttachmentListRequest = () => {
|
|
32
|
-
return new Promise(resolve => {
|
|
33
|
-
setTimeout(() => {
|
|
34
|
-
resolve([
|
|
35
|
-
{
|
|
36
|
-
id: createUID(),
|
|
37
|
-
name: 'File.doc',
|
|
38
|
-
category: mockCategories[0],
|
|
39
|
-
createDate: getMockPriorDate(1)
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
id: createUID(),
|
|
43
|
-
name: 'File.ppt',
|
|
44
|
-
category: mockCategories[1],
|
|
45
|
-
createDate: getMockPriorDate(4)
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: createUID(),
|
|
49
|
-
name: 'File.xls',
|
|
50
|
-
category: mockCategories[2],
|
|
51
|
-
createDate: getMockPriorDate(30)
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
id: createUID(),
|
|
55
|
-
name: 'emptyFile',
|
|
56
|
-
category: '',
|
|
57
|
-
createDate: getMockPriorDate(144)
|
|
58
|
-
}
|
|
59
|
-
]);
|
|
60
|
-
}, 1000);
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
const Provider = ({ children }) => {
|
|
64
|
-
const [files, setFiles] = useState([]);
|
|
65
|
-
const attachFile = useCallback((file) => {
|
|
66
|
-
if (files.some(f => f.id === file.id))
|
|
67
|
-
return;
|
|
68
|
-
setFiles(current => [file, ...current]);
|
|
69
|
-
}, [files]);
|
|
70
|
-
const cancelFile = (id) => {
|
|
71
|
-
setFiles(current => current.filter(f => f.id !== id));
|
|
72
|
-
};
|
|
73
|
-
const deleteFile = useCallback(async (id) => {
|
|
74
|
-
const file = files.find(f => f.id === id);
|
|
75
|
-
setFiles(current => current.filter(f => f.id !== file.id));
|
|
76
|
-
}, [files]);
|
|
77
|
-
const setProgress = useCallback((file, progress) => {
|
|
78
|
-
setFiles(current => current.map(f => {
|
|
79
|
-
if (file.id === f.id) {
|
|
80
|
-
f.progress = progress;
|
|
81
|
-
}
|
|
82
|
-
return f;
|
|
83
|
-
}));
|
|
84
|
-
}, []);
|
|
85
|
-
useAfterInitialEffect(() => {
|
|
86
|
-
files.forEach(file => {
|
|
87
|
-
if (!hasProp(file, 'File') || typeof file.progress === 'number')
|
|
88
|
-
return;
|
|
89
|
-
postFile({
|
|
90
|
-
file,
|
|
91
|
-
onProgress: setProgress,
|
|
92
|
-
currentProgress: 0,
|
|
93
|
-
onLoad(loadedFile) {
|
|
94
|
-
setFiles(cur => {
|
|
95
|
-
return cur.map(f => {
|
|
96
|
-
if (f.id === loadedFile.id) {
|
|
97
|
-
return {
|
|
98
|
-
...loadedFile,
|
|
99
|
-
createDate: Date.now()
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
return f;
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
}, [files.length, setProgress]);
|
|
109
|
-
const value = useMemo(() => ({
|
|
110
|
-
files,
|
|
111
|
-
setFiles,
|
|
112
|
-
attachFile,
|
|
113
|
-
cancelFile,
|
|
114
|
-
deleteFile
|
|
115
|
-
}), [files, attachFile, cancelFile, deleteFile]);
|
|
116
|
-
return <FileServiceContext.Provider value={value}>{children}</FileServiceContext.Provider>;
|
|
117
|
-
};
|
|
118
|
-
export default Provider;
|
|
119
|
-
//# sourceMappingURL=FileService.mock.jsx.map
|