@pega/cosmos-react-demos 4.0.0-dev.2.0 → 4.0.0-dev.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jsx/build/AppShell/AppShell.mocks.d.ts +28 -53
- package/jsx/build/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/jsx/build/AppShell/AppShell.mocks.jsx +260 -376
- package/jsx/build/AppShell/AppShell.mocks.jsx.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.d.ts +14 -11
- package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.jsx +72 -100
- package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +1 -1
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts +2 -0
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts.map +1 -1
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.js +23 -0
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.js.map +1 -1
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts +1 -1
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts.map +1 -1
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.jsx +6 -5
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.jsx.map +1 -1
- package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -1
- package/jsx/build/FlowModeller/FlowModeller.mocks.jsx +17 -21
- package/jsx/build/FlowModeller/FlowModeller.mocks.jsx.map +1 -1
- package/jsx/build/FlowModeller/FlowModeller.stories.d.ts +1 -1
- package/jsx/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -1
- package/jsx/build/FlowModeller/FlowModeller.stories.jsx +125 -9
- package/jsx/build/FlowModeller/FlowModeller.stories.jsx.map +1 -1
- package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx +43 -3
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
- package/jsx/build/MobileBuildSummary/MobileBuildSummary.mocks.d.ts +1 -0
- package/jsx/build/MobileBuildSummary/MobileBuildSummary.mocks.d.ts.map +1 -1
- package/jsx/build/MobileBuildSummary/MobileBuildSummary.mocks.js +2 -1
- package/jsx/build/MobileBuildSummary/MobileBuildSummary.mocks.js.map +1 -1
- package/jsx/build/MobileBuildSummary/MobileBuildSummary.stories.d.ts +1 -1
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts +3 -2
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -1
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx +6 -6
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx.map +1 -1
- package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts +1 -1
- package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -1
- package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx.map +1 -1
- package/jsx/build/PageBanner/PageBanner.stories.d.ts +15 -0
- package/jsx/build/PageBanner/PageBanner.stories.d.ts.map +1 -0
- package/jsx/build/PageBanner/PageBanner.stories.jsx +41 -0
- package/jsx/build/PageBanner/PageBanner.stories.jsx.map +1 -0
- package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts +0 -2
- package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts.map +1 -1
- package/jsx/build/PageTemplates/GalleryPage.mocks.jsx +1 -50
- package/jsx/build/PageTemplates/GalleryPage.mocks.jsx.map +1 -1
- package/jsx/build/PageTemplates/GalleryPage.stories.d.ts +8 -4
- package/jsx/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -1
- package/jsx/build/PageTemplates/GalleryPage.stories.jsx +32 -31
- package/jsx/build/PageTemplates/GalleryPage.stories.jsx.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts +0 -1
- package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.mocks.jsx +2 -156
- package/jsx/build/PageTemplates/PageTemplates.mocks.jsx.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx +6 -7
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/build/PageTemplates/ShowcasePage.stories.d.ts +17 -0
- package/jsx/build/PageTemplates/ShowcasePage.stories.d.ts.map +1 -0
- package/jsx/build/PageTemplates/ShowcasePage.stories.jsx +42 -0
- package/jsx/build/PageTemplates/ShowcasePage.stories.jsx.map +1 -0
- package/jsx/build/Workbench/Workbench.stories.d.ts +1 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +1 -1
- package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -1
- package/jsx/condition-builder/ConditionBuilder/props.mock.js +4 -2
- package/jsx/condition-builder/ConditionBuilder/props.mock.js.map +1 -1
- package/jsx/condition-builder/ConditionInput/ConditionInput.stories.d.ts +1 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts.map +1 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.js +53 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.js.map +1 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.d.ts +1 -1
- package/jsx/core/AIButton/AIButton.mocks.d.ts +22 -0
- package/jsx/core/AIButton/AIButton.mocks.d.ts.map +1 -0
- package/jsx/core/AIButton/AIButton.mocks.js +136 -0
- package/jsx/core/AIButton/AIButton.mocks.js.map +1 -0
- package/jsx/core/AIButton/AIButton.stories.d.ts +23 -0
- package/jsx/core/AIButton/AIButton.stories.d.ts.map +1 -0
- package/jsx/core/AIButton/AIButton.stories.jsx +306 -0
- package/jsx/core/AIButton/AIButton.stories.jsx.map +1 -0
- package/jsx/core/AdditionalInfo/AdditionalInfo.stories.d.ts +1 -1
- package/jsx/core/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/jsx/core/AppShell/AppShell.mocks.jsx +4 -19
- package/jsx/core/AppShell/AppShell.mocks.jsx.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.d.ts +2 -3
- package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.jsx +58 -77
- package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/core/Avatar/Avatar.stories.d.ts +1 -1
- package/jsx/core/Backdrop/Backdrop.stories.d.ts +1 -1
- package/jsx/core/Backdrop/Backdrop.stories.d.ts.map +1 -1
- package/jsx/core/Backdrop/Backdrop.stories.jsx +12 -12
- package/jsx/core/Backdrop/Backdrop.stories.jsx.map +1 -1
- package/jsx/core/Badges/Alert.stories.d.ts +1 -1
- package/jsx/core/Badges/Count.stories.d.ts +1 -1
- package/jsx/core/Badges/Count.stories.jsx +1 -1
- package/jsx/core/Badges/Count.stories.jsx.map +1 -1
- package/jsx/core/Badges/Keyboard.stories.d.ts +1 -1
- package/jsx/core/Badges/Keyboard.stories.jsx +1 -1
- package/jsx/core/Badges/Keyboard.stories.jsx.map +1 -1
- package/jsx/core/Badges/Selection.stories.d.ts +1 -1
- package/jsx/core/Badges/Status.stories.d.ts +1 -1
- package/jsx/core/Badges/Tag.stories.d.ts +1 -1
- package/jsx/core/Banner/Banner.stories.d.ts +9 -5
- package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
- package/jsx/core/Banner/Banner.stories.jsx +109 -54
- package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
- package/jsx/core/Boolean/BooleanDisplay.stories.d.ts +1 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts +7 -3
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.jsx +16 -4
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.jsx.map +1 -1
- package/jsx/core/Button/Button.stories.d.ts +1 -2
- package/jsx/core/Button/Button.stories.d.ts.map +1 -1
- package/jsx/core/Button/Button.stories.jsx +0 -14
- package/jsx/core/Button/Button.stories.jsx.map +1 -1
- package/jsx/core/Card/Card.stories.d.ts +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.d.ts +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx +3 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts +1 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx +8 -5
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx.map +1 -1
- package/jsx/core/ColorPicker/ColorPicker.stories.d.ts +1 -1
- package/jsx/core/ComboBox/ComboBox.stories.d.ts +3 -3
- package/jsx/core/ComboBox/ComboBox.stories.d.ts.map +1 -1
- package/jsx/core/ComboBox/ComboBox.stories.jsx +17 -9
- package/jsx/core/ComboBox/ComboBox.stories.jsx.map +1 -1
- package/jsx/core/CompositeInput/CompositeInput.stories.d.ts +1 -1
- package/jsx/core/Configuration/Configuration.stories.d.ts +1 -1
- package/jsx/core/CreditCard/CreditCard.stories.d.ts +1 -1
- package/jsx/core/Currency/Currency.stories.d.ts +2 -2
- package/jsx/core/Currency/Currency.stories.d.ts.map +1 -1
- package/jsx/core/DangerButton/DangerButton.stories.d.ts +6 -0
- package/jsx/core/DangerButton/DangerButton.stories.d.ts.map +1 -0
- package/jsx/core/DangerButton/DangerButton.stories.jsx +17 -0
- package/jsx/core/DangerButton/DangerButton.stories.jsx.map +1 -0
- package/jsx/core/DateTime/DateTime.stories.d.ts +1 -1
- package/jsx/core/DateTime/DateTime.stories.d.ts.map +1 -1
- package/jsx/core/DateTime/DateTime.stories.jsx +11 -9
- package/jsx/core/DateTime/DateTime.stories.jsx.map +1 -1
- package/jsx/core/DateTime/DateTimeDisplay.stories.d.ts +1 -1
- package/jsx/core/DateTime/DateTimeDisplay.stories.d.ts.map +1 -1
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +5 -3
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -1
- package/jsx/core/DateTime/DateTimePicker.stories.d.ts +1 -1
- package/jsx/core/DateTime/DateTimePicker.stories.jsx +1 -1
- package/jsx/core/DateTime/DateTimePicker.stories.jsx.map +1 -1
- package/jsx/core/Dialog/Dialog.stories.d.ts +3 -2
- package/jsx/core/Dialog/Dialog.stories.d.ts.map +1 -1
- package/jsx/core/Dialog/Dialog.stories.jsx +9 -73
- package/jsx/core/Dialog/Dialog.stories.jsx.map +1 -1
- package/jsx/core/Dialog/FormDialog.mocks.d.ts +27 -0
- package/jsx/core/Dialog/FormDialog.mocks.d.ts.map +1 -0
- package/jsx/core/Dialog/FormDialog.mocks.jsx +194 -0
- package/jsx/core/Dialog/FormDialog.mocks.jsx.map +1 -0
- package/jsx/core/Dialog/InfoDialog.mocks.d.ts +4 -0
- package/jsx/core/Dialog/InfoDialog.mocks.d.ts.map +1 -0
- package/jsx/core/Dialog/InfoDialog.mocks.jsx +64 -0
- package/jsx/core/Dialog/InfoDialog.mocks.jsx.map +1 -0
- package/jsx/core/Drawer/Drawer.stories.d.ts +1 -1
- package/jsx/core/Email/EmailDisplay.stories.d.ts +1 -1
- package/jsx/core/EmojiPicker/EmojiPicker.stories.d.ts +1 -1
- package/jsx/core/EmojiPicker/EmojiPicker.stories.d.ts.map +1 -1
- package/jsx/core/EmojiPicker/EmojiPicker.stories.jsx +6 -5
- package/jsx/core/EmojiPicker/EmojiPicker.stories.jsx.map +1 -1
- package/jsx/core/EmptyState/EmptyState.stories.d.ts +1 -1
- package/jsx/core/ErrorState/ErrorState.stories.d.ts +1 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.stories.d.ts +1 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts +6 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx +28 -3
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +6 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts +2 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +43 -11
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -1
- package/jsx/core/FieldValueList/FieldValueList.stories.d.ts +1 -1
- package/jsx/core/File/FileDisplay.stories.d.ts +1 -1
- package/jsx/core/File/FileInput.stories.d.ts +1 -1
- package/jsx/core/Flex/FlexContainer.stories.d.ts +1 -1
- package/jsx/core/Flex/FlexItem.stories.d.ts +1 -1
- package/jsx/core/Form/Form.stories.d.ts +1 -1
- package/jsx/core/Form/Form.stories.d.ts.map +1 -1
- package/jsx/core/Form/Form.stories.jsx +2 -2
- package/jsx/core/Form/Form.stories.jsx.map +1 -1
- package/jsx/core/Grid/GridContainer.stories.d.ts +1 -1
- package/jsx/core/Grid/GridItem.stories.d.ts +1 -1
- package/jsx/core/HTML/HTML.stories.d.ts +1 -1
- package/jsx/core/Icon/Icon.stories.d.ts +5 -2
- package/jsx/core/Icon/Icon.stories.d.ts.map +1 -1
- package/jsx/core/Icon/Icon.stories.jsx +26 -16
- package/jsx/core/Icon/Icon.stories.jsx.map +1 -1
- package/jsx/core/IconPicker/IconPicker.stories.d.ts +1 -1
- package/jsx/core/Image/Image.stories.d.ts +1 -1
- package/jsx/core/Input/Input.stories.d.ts +1 -1
- package/jsx/core/Label/Label.stories.d.ts +1 -1
- package/jsx/core/Lightbox/Lightbox.mocks.d.ts.map +1 -1
- package/jsx/core/Lightbox/Lightbox.mocks.js.map +1 -1
- package/jsx/core/Lightbox/Lightbox.stories.d.ts +1 -1
- package/jsx/core/Link/Link.stories.d.ts +9 -5
- package/jsx/core/Link/Link.stories.d.ts.map +1 -1
- package/jsx/core/Link/Link.stories.jsx +13 -30
- package/jsx/core/Link/Link.stories.jsx.map +1 -1
- package/jsx/core/List/CommaSeparatedList.stories.d.ts +1 -1
- package/jsx/core/List/OrderedList.stories.d.ts +1 -1
- package/jsx/core/List/UnorderedList.stories.d.ts +1 -1
- package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.mocks.jsx +47 -52
- package/jsx/core/ListToolbar/ListToolbar.mocks.jsx.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts +2 -3
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx +14 -19
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +1 -1
- package/jsx/core/LiveLog/LiveLog.mocks.d.ts +5 -0
- package/jsx/core/LiveLog/LiveLog.mocks.d.ts.map +1 -0
- package/jsx/core/LiveLog/LiveLog.mocks.jsx +47 -0
- package/jsx/core/LiveLog/LiveLog.mocks.jsx.map +1 -0
- package/jsx/core/LiveLog/LiveLog.stories.d.ts +9 -0
- package/jsx/core/LiveLog/LiveLog.stories.d.ts.map +1 -0
- package/jsx/core/LiveLog/LiveLog.stories.jsx +19 -0
- package/jsx/core/LiveLog/LiveLog.stories.jsx.map +1 -0
- package/jsx/core/Location/Location.stories.d.ts +1 -1
- package/jsx/core/Location/Location.stories.d.ts.map +1 -1
- package/jsx/core/Location/Location.stories.jsx +11 -7
- package/jsx/core/Location/Location.stories.jsx.map +1 -1
- package/jsx/core/Menu/Menu.mocks.js.map +1 -1
- package/jsx/core/Menu/Menu.stories.d.ts +2 -1
- package/jsx/core/Menu/Menu.stories.d.ts.map +1 -1
- package/jsx/core/Menu/Menu.stories.jsx +33 -0
- package/jsx/core/Menu/Menu.stories.jsx.map +1 -1
- package/jsx/core/MenuButton/MenuButton.stories.d.ts +3 -2
- package/jsx/core/MenuButton/MenuButton.stories.d.ts.map +1 -1
- package/jsx/core/MenuButton/MenuButton.stories.jsx +1 -1
- package/jsx/core/MenuButton/MenuButton.stories.jsx.map +1 -1
- package/jsx/core/MetaList/MetaList.stories.d.ts +1 -1
- package/jsx/core/Modal/Modal.mocks.d.ts +1 -1
- package/jsx/core/Modal/Modal.mocks.d.ts.map +1 -1
- package/jsx/core/Modal/Modal.stories.d.ts +1 -1
- package/jsx/core/Modal/Modal.stories.d.ts.map +1 -1
- package/jsx/core/Modal/Modal.stories.jsx +5 -6
- package/jsx/core/Modal/Modal.stories.jsx.map +1 -1
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.d.ts +36 -3
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.d.ts.map +1 -1
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.jsx +295 -40
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.jsx.map +1 -1
- package/jsx/core/MultiStepForm/MultiStepForm.stories.d.ts +4 -2
- package/jsx/core/MultiStepForm/MultiStepForm.stories.d.ts.map +1 -1
- package/jsx/core/MultiStepForm/MultiStepForm.stories.jsx +70 -165
- package/jsx/core/MultiStepForm/MultiStepForm.stories.jsx.map +1 -1
- package/jsx/core/NoValue/NoValue.stories.d.ts +6 -0
- package/jsx/core/NoValue/NoValue.stories.d.ts.map +1 -0
- package/jsx/core/NoValue/NoValue.stories.jsx +30 -0
- package/jsx/core/NoValue/NoValue.stories.jsx.map +1 -0
- package/jsx/core/Number/Number.stories.d.ts +2 -2
- package/jsx/core/Number/Number.stories.d.ts.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +2 -2
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx +2 -2
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/core/Pagination/Pagination.stories.d.ts +1 -1
- package/jsx/core/Paragraph/ParagraphDisplay.stories.d.ts +1 -1
- package/jsx/core/Phone/Phone.stories.d.ts +1 -1
- package/jsx/core/Popover/Popover.mocks.d.ts +9 -0
- package/jsx/core/Popover/Popover.mocks.d.ts.map +1 -0
- package/jsx/core/Popover/Popover.mocks.jsx +114 -0
- package/jsx/core/Popover/Popover.mocks.jsx.map +1 -0
- package/jsx/core/Popover/Popover.stories.d.ts +7 -1
- package/jsx/core/Popover/Popover.stories.d.ts.map +1 -1
- package/jsx/core/Popover/Popover.stories.jsx +27 -0
- package/jsx/core/Popover/Popover.stories.jsx.map +1 -1
- package/jsx/core/Progress/Progress.mocks.d.ts +2 -0
- package/jsx/core/Progress/Progress.mocks.d.ts.map +1 -0
- package/jsx/core/Progress/Progress.mocks.js +2 -0
- package/jsx/core/Progress/Progress.mocks.js.map +1 -0
- package/jsx/core/Progress/Progress.stories.d.ts +4 -1
- package/jsx/core/Progress/Progress.stories.d.ts.map +1 -1
- package/jsx/core/Progress/Progress.stories.jsx +81 -14
- package/jsx/core/Progress/Progress.stories.jsx.map +1 -1
- package/jsx/core/QRCode/QRCode.stories.d.ts +9 -0
- package/jsx/core/QRCode/QRCode.stories.d.ts.map +1 -0
- package/jsx/core/QRCode/QRCode.stories.jsx +17 -0
- package/jsx/core/QRCode/QRCode.stories.jsx.map +1 -0
- package/jsx/core/RadioButton/RadioButton.stories.d.ts +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx +3 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts +1 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx +9 -5
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx.map +1 -1
- package/jsx/core/Rating/Rating.stories.d.ts +1 -1
- package/jsx/core/Rating/Rating.stories.d.ts.map +1 -1
- package/jsx/core/Rating/Rating.stories.jsx +1 -1
- package/jsx/core/Rating/Rating.stories.jsx.map +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.d.ts +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx.map +1 -1
- package/jsx/core/Select/Select.stories.d.ts +1 -1
- package/jsx/core/Sentiment/Sentiment.stories.d.ts +1 -1
- package/jsx/core/SkipLinks/SkipLinks.stories.d.ts +1 -1
- package/jsx/core/Slider/Slider.stories.d.ts +2 -2
- package/jsx/core/Slider/Slider.stories.d.ts.map +1 -1
- package/jsx/core/SummaryItem/SummaryItem.stories.d.ts +2 -2
- package/jsx/core/SummaryItem/SummaryItem.stories.d.ts.map +1 -1
- package/jsx/core/SummaryList/SummaryList.mocks.d.ts.map +1 -1
- package/jsx/core/SummaryList/SummaryList.mocks.jsx +10 -2
- package/jsx/core/SummaryList/SummaryList.mocks.jsx.map +1 -1
- package/jsx/core/SummaryList/SummaryList.stories.d.ts +1 -1
- package/jsx/core/SummaryList/SummaryList.stories.jsx +2 -2
- package/jsx/core/SummaryList/SummaryList.stories.jsx.map +1 -1
- package/jsx/core/SummaryList/mockUsers.d.ts.map +1 -1
- package/jsx/core/SummaryList/mockUsers.js.map +1 -1
- package/jsx/core/Switch/Switch.stories.d.ts +1 -1
- package/jsx/core/Table/Table.mocks.jsx +1 -1
- package/jsx/core/Table/Table.mocks.jsx.map +1 -1
- package/jsx/core/Table/Table.stories.d.ts +1 -1
- package/jsx/core/Table/Table.stories.jsx.map +1 -1
- package/jsx/core/Tabs/Tabs.stories.d.ts +1 -7
- package/jsx/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/jsx/core/Tabs/Tabs.stories.jsx +1 -40
- package/jsx/core/Tabs/Tabs.stories.jsx.map +1 -1
- package/jsx/core/Text/Text.stories.d.ts +1 -1
- package/jsx/core/TextArea/TextArea.stories.d.ts +1 -1
- package/jsx/core/TextArea/TextArea.stories.jsx +1 -1
- package/jsx/core/TextArea/TextArea.stories.jsx.map +1 -1
- package/jsx/core/Toaster/Toaster.stories.d.ts +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.d.ts +2 -1
- package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx +21 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx.map +1 -1
- package/jsx/core/Tooltip/Tooltip.styles.d.ts +2 -0
- package/jsx/core/Tooltip/Tooltip.styles.d.ts.map +1 -0
- package/jsx/core/Tooltip/Tooltip.styles.js +23 -0
- package/jsx/core/Tooltip/Tooltip.styles.js.map +1 -0
- package/jsx/core/Tree/Tree.stories.d.ts +2 -2
- package/jsx/core/Tree/Tree.stories.d.ts.map +1 -1
- package/jsx/core/Tree/Tree.stories.jsx +10 -18
- package/jsx/core/Tree/Tree.stories.jsx.map +1 -1
- package/jsx/core/URL/URL.stories.d.ts +1 -1
- package/jsx/core/URL/URL.stories.jsx +1 -1
- package/jsx/core/URL/URL.stories.jsx.map +1 -1
- package/jsx/cs/Article/Article.mocks.js +4 -4
- package/jsx/cs/Article/Article.mocks.js.map +1 -1
- package/jsx/cs/Article/Article.stories.d.ts +14 -3
- package/jsx/cs/Article/Article.stories.d.ts.map +1 -1
- package/jsx/cs/Article/Article.stories.jsx +167 -92
- package/jsx/cs/Article/Article.stories.jsx.map +1 -1
- package/jsx/cs/ArticleList/ArticleList.mocks.d.ts +129 -10
- package/jsx/cs/ArticleList/ArticleList.mocks.d.ts.map +1 -1
- package/jsx/cs/ArticleList/ArticleList.mocks.js +362 -50
- package/jsx/cs/ArticleList/ArticleList.mocks.js.map +1 -1
- package/jsx/cs/ArticleList/ArticleList.stories.d.ts +11 -3
- package/jsx/cs/ArticleList/ArticleList.stories.d.ts.map +1 -1
- package/jsx/cs/ArticleList/ArticleList.stories.jsx +243 -92
- package/jsx/cs/ArticleList/ArticleList.stories.jsx.map +1 -1
- package/jsx/cs/CSAppShell/CSAppShell.mocks.d.ts +18 -1
- package/jsx/cs/CSAppShell/CSAppShell.mocks.d.ts.map +1 -1
- package/jsx/cs/CSAppShell/CSAppShell.mocks.jsx +143 -10
- package/jsx/cs/CSAppShell/CSAppShell.mocks.jsx.map +1 -1
- package/jsx/cs/CSAppShell/CSAppShell.stories.d.ts +1 -1
- package/jsx/cs/CSAppShell/CSAppShell.stories.d.ts.map +1 -1
- package/jsx/cs/CSAppShell/CSAppShell.stories.jsx +9 -37
- package/jsx/cs/CSAppShell/CSAppShell.stories.jsx.map +1 -1
- package/jsx/cs/CallControlPanel/CallControlPanel.mocks.d.ts +2 -2
- package/jsx/cs/CallControlPanel/CallControlPanel.mocks.d.ts.map +1 -1
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts +1 -1
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -1
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.jsx +2 -2
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.jsx.map +1 -1
- package/jsx/cs/DialPad/DialPad.stories.d.ts +1 -1
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts +4 -2
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -1
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.jsx +18 -4
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.jsx.map +1 -1
- package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts +2 -1
- package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -1
- package/jsx/cs/InteractionTimer/InteractionTimer.stories.jsx +12 -5
- package/jsx/cs/InteractionTimer/InteractionTimer.stories.jsx.map +1 -1
- package/jsx/cs/Picker/Picker.stories.d.ts +11 -0
- package/jsx/cs/Picker/Picker.stories.d.ts.map +1 -0
- package/jsx/cs/Picker/Picker.stories.jsx +64 -0
- package/jsx/cs/Picker/Picker.stories.jsx.map +1 -0
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.jsx +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
- package/jsx/dnd/DragDropList/DragDropList.stories.d.ts +1 -1
- package/jsx/dnd/StandardDragDropList/Demo.d.ts.map +1 -1
- package/jsx/dnd/StandardDragDropList/Demo.jsx +6 -8
- package/jsx/dnd/StandardDragDropList/Demo.jsx.map +1 -1
- package/jsx/dnd/StandardDragDropList/Popover.d.ts +1 -1
- package/jsx/dnd/StandardDragDropList/Popover.d.ts.map +1 -1
- package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.d.ts +1 -1
- package/jsx/dnd/StandardDragDropList/mockData.d.ts +2 -2
- package/jsx/dnd/StandardDragDropList/mockData.d.ts.map +1 -1
- package/jsx/dnd/StandardDragDropList/mockData.js.map +1 -1
- package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts +8 -0
- package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -0
- package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.jsx +101 -0
- package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.jsx.map +1 -0
- package/jsx/rte/DynamicContentEditor/FieldSelector.d.ts +11 -0
- package/jsx/rte/DynamicContentEditor/FieldSelector.d.ts.map +1 -0
- package/jsx/rte/DynamicContentEditor/FieldSelector.jsx +80 -0
- package/jsx/rte/DynamicContentEditor/FieldSelector.jsx.map +1 -0
- package/jsx/rte/Editor/Editor.mocks.d.ts +41 -27
- package/jsx/rte/Editor/Editor.mocks.d.ts.map +1 -1
- package/jsx/rte/Editor/Editor.stories.d.ts +1 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts +1 -1
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -1
- package/jsx/social/Chat/Chat.mocks.d.ts +23 -395
- package/jsx/social/Chat/Chat.mocks.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.mocks.js +568 -585
- package/jsx/social/Chat/Chat.mocks.js.map +1 -1
- package/jsx/social/Chat/Chat.stories.d.ts +23 -19
- package/jsx/social/Chat/Chat.stories.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.stories.jsx +220 -301
- package/jsx/social/Chat/Chat.stories.jsx.map +1 -1
- package/jsx/social/Email/Email.mocks.d.ts +50 -8
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
- package/jsx/social/Email/Email.mocks.jsx +130 -18
- package/jsx/social/Email/Email.mocks.jsx.map +1 -1
- package/jsx/social/Email/Email.stories.d.ts +11 -1
- package/jsx/social/Email/Email.stories.d.ts.map +1 -1
- package/jsx/social/Email/Email.stories.jsx +153 -35
- package/jsx/social/Email/Email.stories.jsx.map +1 -1
- package/jsx/social/Feed/Feed.mocks.d.ts +2 -1
- package/jsx/social/Feed/Feed.mocks.d.ts.map +1 -1
- package/jsx/social/Feed/Feed.mocks.jsx +4 -2
- package/jsx/social/Feed/Feed.mocks.jsx.map +1 -1
- package/jsx/social/Feed/Feed.stories.d.ts +1 -1
- package/jsx/social/Feed/Feed.stories.d.ts.map +1 -1
- package/jsx/social/Feed/Feed.stories.jsx +13 -5
- package/jsx/social/Feed/Feed.stories.jsx.map +1 -1
- package/jsx/social/Feed/FeedNewPost.stories.d.ts +1 -1
- package/jsx/social/Feed/FeedNewPost.stories.d.ts.map +1 -1
- package/jsx/social/Feed/FeedNewPost.stories.jsx +2 -2
- package/jsx/social/Feed/FeedNewPost.stories.jsx.map +1 -1
- package/jsx/social/Feed/FeedPost.stories.d.ts +1 -1
- package/jsx/social/Feed/FeedPost.stories.d.ts.map +1 -1
- package/jsx/social/Feed/FeedPost.stories.jsx +16 -9
- package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -1
- package/jsx/social/Feed/FeedReply.stories.d.ts +1 -1
- package/jsx/social/Feed/FeedReply.stories.d.ts.map +1 -1
- package/jsx/social/Feed/FeedReply.stories.jsx +11 -3
- package/jsx/social/Feed/FeedReply.stories.jsx.map +1 -1
- package/jsx/social/Feed/FeedReplyInput.stories.d.ts +1 -1
- package/jsx/social/Feed/FeedReplyInput.stories.d.ts.map +1 -1
- package/jsx/social/Feed/FeedReplyInput.stories.jsx +2 -2
- package/jsx/social/Feed/FeedReplyInput.stories.jsx.map +1 -1
- package/jsx/tools/Clipboard/Clipboard.mocks.d.ts.map +1 -1
- package/jsx/tools/Clipboard/Clipboard.mocks.jsx.map +1 -1
- package/jsx/tools/Clipboard/Clipboard.stories.d.ts +1 -1
- package/jsx/tools/Clipboard/Clipboard.stories.d.ts.map +1 -1
- package/jsx/tools/Clipboard/Clipboard.stories.jsx +12 -14
- package/jsx/tools/Clipboard/Clipboard.stories.jsx.map +1 -1
- package/jsx/tools/DevTools/DevTools.stories.d.ts +1 -1
- package/jsx/tools/DevTools/DevTools.stories.d.ts.map +1 -1
- package/jsx/tools/DevTools/DevTools.stories.jsx +2 -4
- package/jsx/tools/DevTools/DevTools.stories.jsx.map +1 -1
- package/jsx/tools/PreviewShell/PreviewShell.mocks.d.ts +12 -1
- package/jsx/tools/PreviewShell/PreviewShell.mocks.d.ts.map +1 -1
- package/jsx/tools/PreviewShell/PreviewShell.mocks.jsx +24 -2
- package/jsx/tools/PreviewShell/PreviewShell.mocks.jsx.map +1 -1
- package/jsx/tools/PreviewShell/PreviewShell.stories.d.ts +5 -3
- package/jsx/tools/PreviewShell/PreviewShell.stories.d.ts.map +1 -1
- package/jsx/tools/PreviewShell/PreviewShell.stories.jsx +74 -51
- package/jsx/tools/PreviewShell/PreviewShell.stories.jsx.map +1 -1
- package/jsx/tools/PreviewShell/PreviewShell.styles.d.ts +1 -2
- package/jsx/tools/PreviewShell/PreviewShell.styles.d.ts.map +1 -1
- package/jsx/tools/PreviewShell/PreviewShell.styles.js +1 -2
- package/jsx/tools/PreviewShell/PreviewShell.styles.js.map +1 -1
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts +1 -1
- package/jsx/work/Assignments/Assignments.stories.d.ts +11 -0
- package/jsx/work/Assignments/Assignments.stories.d.ts.map +1 -0
- package/jsx/work/Assignments/Assignments.stories.jsx +64 -0
- package/jsx/work/Assignments/Assignments.stories.jsx.map +1 -0
- package/jsx/work/CaseView/Attachments.mocks.d.ts.map +1 -1
- package/jsx/work/CaseView/Attachments.mocks.jsx +81 -71
- package/jsx/work/CaseView/Attachments.mocks.jsx.map +1 -1
- package/jsx/work/CaseView/CaseView.mocks.d.ts +39 -22
- package/jsx/work/CaseView/CaseView.mocks.d.ts.map +1 -1
- package/jsx/work/CaseView/CaseView.mocks.jsx +258 -85
- package/jsx/work/CaseView/CaseView.mocks.jsx.map +1 -1
- package/jsx/work/CaseView/CaseView.stories.d.ts +3 -8
- package/jsx/work/CaseView/CaseView.stories.d.ts.map +1 -1
- package/jsx/work/CaseView/CaseView.stories.jsx +39 -11
- package/jsx/work/CaseView/CaseView.stories.jsx.map +1 -1
- package/jsx/work/CaseView/Details.mocks.jsx +1 -1
- package/jsx/work/CaseView/Details.mocks.jsx.map +1 -1
- package/jsx/work/CaseView/FileService.mock.d.ts +2 -2
- package/jsx/work/CaseView/FileService.mock.d.ts.map +1 -1
- package/jsx/work/CaseView/FileService.mock.jsx +2 -6
- package/jsx/work/CaseView/FileService.mock.jsx.map +1 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.d.ts +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.jsx +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.jsx.map +1 -1
- package/jsx/work/Details/Details.stories.d.ts +1 -1
- package/jsx/work/Details/Details.stories.d.ts.map +1 -1
- package/jsx/work/Details/Details.stories.jsx +6 -1
- package/jsx/work/Details/Details.stories.jsx.map +1 -1
- package/jsx/work/Glimpse/Glimpse.stories.d.ts +2 -7
- package/jsx/work/Glimpse/Glimpse.stories.d.ts.map +1 -1
- package/jsx/work/Glimpse/Glimpse.stories.jsx +16 -13
- package/jsx/work/Glimpse/Glimpse.stories.jsx.map +1 -1
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts +1 -1
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.jsx +89 -12
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
- package/jsx/work/Predictions/Predictions.mocks.d.ts +3 -0
- package/jsx/work/Predictions/Predictions.mocks.d.ts.map +1 -0
- package/jsx/work/Predictions/Predictions.mocks.jsx +18 -0
- package/jsx/work/Predictions/Predictions.mocks.jsx.map +1 -0
- package/jsx/work/Predictions/Predictions.stories.d.ts +5 -0
- package/jsx/work/Predictions/Predictions.stories.d.ts.map +1 -0
- package/jsx/work/Predictions/Predictions.stories.jsx +53 -0
- package/jsx/work/Predictions/Predictions.stories.jsx.map +1 -0
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts +1 -1
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.d.ts +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.jsx +20 -7
- package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
- package/jsx/work/Stages/Stages.mocks.jsx +6 -6
- package/jsx/work/Stages/Stages.mocks.jsx.map +1 -1
- package/jsx/work/Stages/Stages.stories.d.ts +1 -1
- package/jsx/work/Stages/Stages.stories.d.ts.map +1 -1
- package/jsx/work/Stages/Stages.stories.jsx +22 -8
- package/jsx/work/Stages/Stages.stories.jsx.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +6 -2
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts +1 -1
- package/jsx/work/Tags/Tags.stories.d.ts +1 -1
- package/jsx/work/Tags/Tags.stories.d.ts.map +1 -1
- package/jsx/work/Tags/Tags.stories.jsx +6 -1
- package/jsx/work/Tags/Tags.stories.jsx.map +1 -1
- package/jsx/work/Tasks/TaskList.stories.d.ts +1 -1
- package/jsx/work/Tasks/Tasks.mocks.d.ts +22 -0
- package/jsx/work/Tasks/Tasks.mocks.d.ts.map +1 -0
- package/jsx/work/Tasks/Tasks.mocks.js +51 -0
- package/jsx/work/Tasks/Tasks.mocks.js.map +1 -0
- package/jsx/work/Tasks/Tasks.stories.d.ts +6 -4
- package/jsx/work/Tasks/Tasks.stories.d.ts.map +1 -1
- package/jsx/work/Tasks/Tasks.stories.jsx +41 -73
- package/jsx/work/Tasks/Tasks.stories.jsx.map +1 -1
- package/jsx/work/Timeline/Timeline.mocks.d.ts.map +1 -1
- package/jsx/work/Timeline/Timeline.mocks.jsx +16 -1
- package/jsx/work/Timeline/Timeline.mocks.jsx.map +1 -1
- package/jsx/work/Timeline/Timeline.stories.d.ts +1 -1
- package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -1
- package/jsx/work/Timeline/Timeline.stories.jsx +2 -2
- package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -1
- package/jsx/wss/AppShell/AppShell.stories.d.ts +1 -1
- package/jsx/wss/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/wss/AppShell/AppShell.stories.jsx +18 -0
- package/jsx/wss/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/wss/CaseView/CaseView.stories.d.ts +1 -1
- package/jsx/wss/CaseView/CaseView.stories.d.ts.map +1 -1
- package/jsx/wss/CaseView/CaseView.stories.jsx +8 -2
- package/jsx/wss/CaseView/CaseView.stories.jsx.map +1 -1
- package/jsx/wss/PageTemplates/PageTemplates.stories.d.ts +1 -1
- package/jsx/wss/PageTemplates/PageTemplates.stories.jsx +2 -2
- package/jsx/wss/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/wss/QuickCreate/QuickCreate.stories.d.ts +1 -1
- package/lib/build/AppShell/AppShell.mocks.d.ts +28 -53
- package/lib/build/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.mocks.js +260 -376
- package/lib/build/AppShell/AppShell.mocks.js.map +1 -1
- package/lib/build/AppShell/AppShell.stories.d.ts +14 -11
- package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.stories.js +71 -100
- package/lib/build/AppShell/AppShell.stories.js.map +1 -1
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +1 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts +2 -0
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts.map +1 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.js +23 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.js.map +1 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts +1 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts.map +1 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.js +6 -5
- package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.js.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.mocks.js +1 -1
- package/lib/build/FlowModeller/FlowModeller.mocks.js.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.stories.d.ts +1 -1
- package/lib/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.stories.js +119 -9
- package/lib/build/FlowModeller/FlowModeller.stories.js.map +1 -1
- package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.js +43 -4
- package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
- package/lib/build/MobileBuildSummary/MobileBuildSummary.mocks.d.ts +1 -0
- package/lib/build/MobileBuildSummary/MobileBuildSummary.mocks.d.ts.map +1 -1
- package/lib/build/MobileBuildSummary/MobileBuildSummary.mocks.js +2 -1
- package/lib/build/MobileBuildSummary/MobileBuildSummary.mocks.js.map +1 -1
- package/lib/build/MobileBuildSummary/MobileBuildSummary.stories.d.ts +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts +3 -2
- package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js +7 -7
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.stories.js +2 -6
- package/lib/build/ObjectSelect/ObjectSelect.stories.js.map +1 -1
- package/lib/build/PageBanner/PageBanner.stories.d.ts +15 -0
- package/lib/build/PageBanner/PageBanner.stories.d.ts.map +1 -0
- package/lib/build/PageBanner/PageBanner.stories.js +42 -0
- package/lib/build/PageBanner/PageBanner.stories.js.map +1 -0
- package/lib/build/PageTemplates/GalleryPage.mocks.d.ts +0 -2
- package/lib/build/PageTemplates/GalleryPage.mocks.d.ts.map +1 -1
- package/lib/build/PageTemplates/GalleryPage.mocks.js +1 -50
- package/lib/build/PageTemplates/GalleryPage.mocks.js.map +1 -1
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts +8 -4
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -1
- package/lib/build/PageTemplates/GalleryPage.stories.js +32 -31
- package/lib/build/PageTemplates/GalleryPage.stories.js.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.mocks.d.ts +0 -1
- package/lib/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.mocks.js +2 -154
- package/lib/build/PageTemplates/PageTemplates.mocks.js.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.js +4 -8
- package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/build/PageTemplates/ShowcasePage.stories.d.ts +17 -0
- package/lib/build/PageTemplates/ShowcasePage.stories.d.ts.map +1 -0
- package/lib/build/PageTemplates/ShowcasePage.stories.js +43 -0
- package/lib/build/PageTemplates/ShowcasePage.stories.js.map +1 -0
- package/lib/build/Workbench/Workbench.stories.d.ts +1 -1
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +1 -1
- package/lib/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -1
- package/lib/condition-builder/ConditionBuilder/props.mock.js +4 -2
- package/lib/condition-builder/ConditionBuilder/props.mock.js.map +1 -1
- package/lib/condition-builder/ConditionInput/ConditionInput.stories.d.ts +1 -1
- package/lib/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts.map +1 -1
- package/lib/condition-builder/PromotedFilters/PromotedFilters.mocks.js +53 -1
- package/lib/condition-builder/PromotedFilters/PromotedFilters.mocks.js.map +1 -1
- package/lib/condition-builder/PromotedFilters/PromotedFilters.stories.d.ts +1 -1
- package/lib/core/AIButton/AIButton.mocks.d.ts +22 -0
- package/lib/core/AIButton/AIButton.mocks.d.ts.map +1 -0
- package/lib/core/AIButton/AIButton.mocks.js +139 -0
- package/lib/core/AIButton/AIButton.mocks.js.map +1 -0
- package/lib/core/AIButton/AIButton.stories.d.ts +23 -0
- package/lib/core/AIButton/AIButton.stories.d.ts.map +1 -0
- package/lib/core/AIButton/AIButton.stories.js +223 -0
- package/lib/core/AIButton/AIButton.stories.js.map +1 -0
- package/lib/core/AdditionalInfo/AdditionalInfo.stories.d.ts +1 -1
- package/lib/core/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.mocks.js +4 -19
- package/lib/core/AppShell/AppShell.mocks.js.map +1 -1
- package/lib/core/AppShell/AppShell.stories.d.ts +2 -3
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.stories.js +59 -44
- package/lib/core/AppShell/AppShell.stories.js.map +1 -1
- package/lib/core/Avatar/Avatar.stories.d.ts +1 -1
- package/lib/core/Backdrop/Backdrop.stories.d.ts +1 -1
- package/lib/core/Backdrop/Backdrop.stories.d.ts.map +1 -1
- package/lib/core/Backdrop/Backdrop.stories.js +2 -2
- package/lib/core/Backdrop/Backdrop.stories.js.map +1 -1
- package/lib/core/Badges/Alert.stories.d.ts +1 -1
- package/lib/core/Badges/Count.stories.d.ts +1 -1
- package/lib/core/Badges/Count.stories.js +1 -1
- package/lib/core/Badges/Count.stories.js.map +1 -1
- package/lib/core/Badges/Keyboard.stories.d.ts +1 -1
- package/lib/core/Badges/Keyboard.stories.js +1 -1
- package/lib/core/Badges/Keyboard.stories.js.map +1 -1
- package/lib/core/Badges/Selection.stories.d.ts +1 -1
- package/lib/core/Badges/Status.stories.d.ts +1 -1
- package/lib/core/Badges/Tag.stories.d.ts +1 -1
- package/lib/core/Banner/Banner.stories.d.ts +9 -5
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
- package/lib/core/Banner/Banner.stories.js +105 -39
- package/lib/core/Banner/Banner.stories.js.map +1 -1
- package/lib/core/Boolean/BooleanDisplay.stories.d.ts +1 -1
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.d.ts +7 -3
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -1
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.js +16 -4
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.js.map +1 -1
- package/lib/core/Button/Button.stories.d.ts +1 -2
- package/lib/core/Button/Button.stories.d.ts.map +1 -1
- package/lib/core/Button/Button.stories.js +0 -12
- package/lib/core/Button/Button.stories.js.map +1 -1
- package/lib/core/Card/Card.stories.d.ts +1 -1
- package/lib/core/Checkbox/Checkbox.stories.d.ts +1 -1
- package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.js +3 -1
- package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts +1 -1
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -1
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js +8 -5
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js.map +1 -1
- package/lib/core/ColorPicker/ColorPicker.stories.d.ts +1 -1
- package/lib/core/ComboBox/ComboBox.stories.d.ts +3 -3
- package/lib/core/ComboBox/ComboBox.stories.d.ts.map +1 -1
- package/lib/core/ComboBox/ComboBox.stories.js +17 -9
- package/lib/core/ComboBox/ComboBox.stories.js.map +1 -1
- package/lib/core/CompositeInput/CompositeInput.stories.d.ts +1 -1
- package/lib/core/Configuration/Configuration.stories.d.ts +1 -1
- package/lib/core/CreditCard/CreditCard.stories.d.ts +1 -1
- package/lib/core/Currency/Currency.stories.d.ts +2 -2
- package/lib/core/Currency/Currency.stories.d.ts.map +1 -1
- package/lib/core/DangerButton/DangerButton.stories.d.ts +6 -0
- package/lib/core/DangerButton/DangerButton.stories.d.ts.map +1 -0
- package/lib/core/DangerButton/DangerButton.stories.js +18 -0
- package/lib/core/DangerButton/DangerButton.stories.js.map +1 -0
- package/lib/core/DateTime/DateTime.stories.d.ts +1 -1
- package/lib/core/DateTime/DateTime.stories.d.ts.map +1 -1
- package/lib/core/DateTime/DateTime.stories.js +11 -10
- package/lib/core/DateTime/DateTime.stories.js.map +1 -1
- package/lib/core/DateTime/DateTimeDisplay.stories.d.ts +1 -1
- package/lib/core/DateTime/DateTimeDisplay.stories.d.ts.map +1 -1
- package/lib/core/DateTime/DateTimeDisplay.stories.js +5 -3
- package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -1
- package/lib/core/DateTime/DateTimePicker.stories.d.ts +1 -1
- package/lib/core/DateTime/DateTimePicker.stories.js +1 -1
- package/lib/core/DateTime/DateTimePicker.stories.js.map +1 -1
- package/lib/core/Dialog/Dialog.stories.d.ts +3 -2
- package/lib/core/Dialog/Dialog.stories.d.ts.map +1 -1
- package/lib/core/Dialog/Dialog.stories.js +10 -41
- package/lib/core/Dialog/Dialog.stories.js.map +1 -1
- package/lib/core/Dialog/FormDialog.mocks.d.ts +27 -0
- package/lib/core/Dialog/FormDialog.mocks.d.ts.map +1 -0
- package/lib/core/Dialog/FormDialog.mocks.js +188 -0
- package/lib/core/Dialog/FormDialog.mocks.js.map +1 -0
- package/lib/core/Dialog/InfoDialog.mocks.d.ts +4 -0
- package/lib/core/Dialog/InfoDialog.mocks.d.ts.map +1 -0
- package/lib/core/Dialog/InfoDialog.mocks.js +41 -0
- package/lib/core/Dialog/InfoDialog.mocks.js.map +1 -0
- package/lib/core/Drawer/Drawer.stories.d.ts +1 -1
- package/lib/core/Email/EmailDisplay.stories.d.ts +1 -1
- package/lib/core/EmojiPicker/EmojiPicker.stories.d.ts +1 -1
- package/lib/core/EmojiPicker/EmojiPicker.stories.d.ts.map +1 -1
- package/lib/core/EmojiPicker/EmojiPicker.stories.js +6 -5
- package/lib/core/EmojiPicker/EmojiPicker.stories.js.map +1 -1
- package/lib/core/EmptyState/EmptyState.stories.d.ts +1 -1
- package/lib/core/ErrorState/ErrorState.stories.d.ts +1 -1
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.d.ts +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts +6 -1
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.js +27 -2
- package/lib/core/FieldGroup/FieldGroup.stories.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.js +6 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts +2 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.js +43 -11
- package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
- package/lib/core/FieldValueList/FieldValueList.stories.d.ts +1 -1
- package/lib/core/File/FileDisplay.stories.d.ts +1 -1
- package/lib/core/File/FileInput.stories.d.ts +1 -1
- package/lib/core/Flex/FlexContainer.stories.d.ts +1 -1
- package/lib/core/Flex/FlexItem.stories.d.ts +1 -1
- package/lib/core/Form/Form.stories.d.ts +1 -1
- package/lib/core/Form/Form.stories.d.ts.map +1 -1
- package/lib/core/Form/Form.stories.js +2 -2
- package/lib/core/Form/Form.stories.js.map +1 -1
- package/lib/core/Grid/GridContainer.stories.d.ts +1 -1
- package/lib/core/Grid/GridItem.stories.d.ts +1 -1
- package/lib/core/HTML/HTML.stories.d.ts +1 -1
- package/lib/core/Icon/Icon.stories.d.ts +5 -2
- package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
- package/lib/core/Icon/Icon.stories.js +16 -8
- package/lib/core/Icon/Icon.stories.js.map +1 -1
- package/lib/core/IconPicker/IconPicker.stories.d.ts +1 -1
- package/lib/core/Image/Image.stories.d.ts +1 -1
- package/lib/core/Input/Input.stories.d.ts +1 -1
- package/lib/core/Label/Label.stories.d.ts +1 -1
- package/lib/core/Lightbox/Lightbox.mocks.d.ts.map +1 -1
- package/lib/core/Lightbox/Lightbox.mocks.js +0 -8
- package/lib/core/Lightbox/Lightbox.mocks.js.map +1 -1
- package/lib/core/Lightbox/Lightbox.stories.d.ts +1 -1
- package/lib/core/Link/Link.stories.d.ts +9 -5
- package/lib/core/Link/Link.stories.d.ts.map +1 -1
- package/lib/core/Link/Link.stories.js +6 -9
- package/lib/core/Link/Link.stories.js.map +1 -1
- package/lib/core/List/CommaSeparatedList.stories.d.ts +1 -1
- package/lib/core/List/OrderedList.stories.d.ts +1 -1
- package/lib/core/List/UnorderedList.stories.d.ts +1 -1
- package/lib/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.mocks.js +26 -33
- package/lib/core/ListToolbar/ListToolbar.mocks.js.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.stories.d.ts +2 -3
- package/lib/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.stories.js +23 -20
- package/lib/core/ListToolbar/ListToolbar.stories.js.map +1 -1
- package/lib/core/LiveLog/LiveLog.mocks.d.ts +5 -0
- package/lib/core/LiveLog/LiveLog.mocks.d.ts.map +1 -0
- package/lib/core/LiveLog/LiveLog.mocks.js +29 -0
- package/lib/core/LiveLog/LiveLog.mocks.js.map +1 -0
- package/lib/core/LiveLog/LiveLog.stories.d.ts +9 -0
- package/lib/core/LiveLog/LiveLog.stories.d.ts.map +1 -0
- package/lib/core/LiveLog/LiveLog.stories.js +20 -0
- package/lib/core/LiveLog/LiveLog.stories.js.map +1 -0
- package/lib/core/Location/Location.stories.d.ts +1 -1
- package/lib/core/Location/Location.stories.d.ts.map +1 -1
- package/lib/core/Location/Location.stories.js +11 -7
- package/lib/core/Location/Location.stories.js.map +1 -1
- package/lib/core/Menu/Menu.mocks.js.map +1 -1
- package/lib/core/Menu/Menu.stories.d.ts +2 -1
- package/lib/core/Menu/Menu.stories.d.ts.map +1 -1
- package/lib/core/Menu/Menu.stories.js +27 -0
- package/lib/core/Menu/Menu.stories.js.map +1 -1
- package/lib/core/MenuButton/MenuButton.stories.d.ts +3 -2
- package/lib/core/MenuButton/MenuButton.stories.d.ts.map +1 -1
- package/lib/core/MenuButton/MenuButton.stories.js +1 -1
- package/lib/core/MenuButton/MenuButton.stories.js.map +1 -1
- package/lib/core/MetaList/MetaList.stories.d.ts +1 -1
- package/lib/core/Modal/Modal.mocks.d.ts +1 -1
- package/lib/core/Modal/Modal.mocks.d.ts.map +1 -1
- package/lib/core/Modal/Modal.stories.d.ts +1 -1
- package/lib/core/Modal/Modal.stories.d.ts.map +1 -1
- package/lib/core/Modal/Modal.stories.js +7 -6
- package/lib/core/Modal/Modal.stories.js.map +1 -1
- package/lib/core/MultiStepForm/MultiStepForm.mocks.d.ts +36 -3
- package/lib/core/MultiStepForm/MultiStepForm.mocks.d.ts.map +1 -1
- package/lib/core/MultiStepForm/MultiStepForm.mocks.js +269 -31
- package/lib/core/MultiStepForm/MultiStepForm.mocks.js.map +1 -1
- package/lib/core/MultiStepForm/MultiStepForm.stories.d.ts +4 -2
- package/lib/core/MultiStepForm/MultiStepForm.stories.d.ts.map +1 -1
- package/lib/core/MultiStepForm/MultiStepForm.stories.js +65 -163
- package/lib/core/MultiStepForm/MultiStepForm.stories.js.map +1 -1
- package/lib/core/NoValue/NoValue.stories.d.ts +6 -0
- package/lib/core/NoValue/NoValue.stories.d.ts.map +1 -0
- package/lib/core/NoValue/NoValue.stories.js +29 -0
- package/lib/core/NoValue/NoValue.stories.js.map +1 -0
- package/lib/core/Number/Number.stories.d.ts +2 -2
- package/lib/core/Number/Number.stories.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts +2 -2
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.js +2 -2
- package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/core/Pagination/Pagination.stories.d.ts +1 -1
- package/lib/core/Paragraph/ParagraphDisplay.stories.d.ts +1 -1
- package/lib/core/Phone/Phone.stories.d.ts +1 -1
- package/lib/core/Popover/Popover.mocks.d.ts +9 -0
- package/lib/core/Popover/Popover.mocks.d.ts.map +1 -0
- package/lib/core/Popover/Popover.mocks.js +105 -0
- package/lib/core/Popover/Popover.mocks.js.map +1 -0
- package/lib/core/Popover/Popover.stories.d.ts +7 -1
- package/lib/core/Popover/Popover.stories.d.ts.map +1 -1
- package/lib/core/Popover/Popover.stories.js +27 -0
- package/lib/core/Popover/Popover.stories.js.map +1 -1
- package/lib/core/Progress/Progress.mocks.d.ts +2 -0
- package/lib/core/Progress/Progress.mocks.d.ts.map +1 -0
- package/lib/core/Progress/Progress.mocks.js +2 -0
- package/lib/core/Progress/Progress.mocks.js.map +1 -0
- package/lib/core/Progress/Progress.stories.d.ts +4 -1
- package/lib/core/Progress/Progress.stories.d.ts.map +1 -1
- package/lib/core/Progress/Progress.stories.js +66 -3
- package/lib/core/Progress/Progress.stories.js.map +1 -1
- package/lib/core/QRCode/QRCode.stories.d.ts +9 -0
- package/lib/core/QRCode/QRCode.stories.d.ts.map +1 -0
- package/lib/core/QRCode/QRCode.stories.js +18 -0
- package/lib/core/QRCode/QRCode.stories.js.map +1 -0
- package/lib/core/RadioButton/RadioButton.stories.d.ts +1 -1
- package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.js +3 -1
- package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts +1 -1
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -1
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js +9 -5
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js.map +1 -1
- package/lib/core/Rating/Rating.stories.d.ts +1 -1
- package/lib/core/Rating/Rating.stories.d.ts.map +1 -1
- package/lib/core/Rating/Rating.stories.js +1 -1
- package/lib/core/Rating/Rating.stories.js.map +1 -1
- package/lib/core/SearchInput/SearchInput.stories.d.ts +1 -1
- package/lib/core/SearchInput/SearchInput.stories.js +1 -1
- package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
- package/lib/core/Select/Select.stories.d.ts +1 -1
- package/lib/core/Sentiment/Sentiment.stories.d.ts +1 -1
- package/lib/core/SkipLinks/SkipLinks.stories.d.ts +1 -1
- package/lib/core/Slider/Slider.stories.d.ts +2 -2
- package/lib/core/Slider/Slider.stories.d.ts.map +1 -1
- package/lib/core/SummaryItem/SummaryItem.stories.d.ts +2 -2
- package/lib/core/SummaryItem/SummaryItem.stories.d.ts.map +1 -1
- package/lib/core/SummaryList/SummaryList.mocks.d.ts.map +1 -1
- package/lib/core/SummaryList/SummaryList.mocks.js +11 -2
- package/lib/core/SummaryList/SummaryList.mocks.js.map +1 -1
- package/lib/core/SummaryList/SummaryList.stories.d.ts +1 -1
- package/lib/core/SummaryList/SummaryList.stories.js +2 -2
- package/lib/core/SummaryList/SummaryList.stories.js.map +1 -1
- package/lib/core/SummaryList/mockUsers.d.ts.map +1 -1
- package/lib/core/SummaryList/mockUsers.js +2 -0
- package/lib/core/SummaryList/mockUsers.js.map +1 -1
- package/lib/core/Switch/Switch.stories.d.ts +1 -1
- package/lib/core/Table/Table.mocks.js +1 -1
- package/lib/core/Table/Table.mocks.js.map +1 -1
- package/lib/core/Table/Table.stories.d.ts +1 -1
- package/lib/core/Table/Table.stories.js.map +1 -1
- package/lib/core/Tabs/Tabs.stories.d.ts +1 -7
- package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/lib/core/Tabs/Tabs.stories.js +1 -31
- package/lib/core/Tabs/Tabs.stories.js.map +1 -1
- package/lib/core/Text/Text.stories.d.ts +1 -1
- package/lib/core/TextArea/TextArea.stories.d.ts +1 -1
- package/lib/core/TextArea/TextArea.stories.js +1 -1
- package/lib/core/TextArea/TextArea.stories.js.map +1 -1
- package/lib/core/Toaster/Toaster.stories.d.ts +1 -1
- package/lib/core/Tooltip/Tooltip.stories.d.ts +2 -1
- package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.js +9 -1
- package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
- package/lib/core/Tooltip/Tooltip.styles.d.ts +2 -0
- package/lib/core/Tooltip/Tooltip.styles.d.ts.map +1 -0
- package/lib/core/Tooltip/Tooltip.styles.js +23 -0
- package/lib/core/Tooltip/Tooltip.styles.js.map +1 -0
- package/lib/core/Tree/Tree.stories.d.ts +2 -2
- package/lib/core/Tree/Tree.stories.d.ts.map +1 -1
- package/lib/core/Tree/Tree.stories.js +10 -20
- package/lib/core/Tree/Tree.stories.js.map +1 -1
- package/lib/core/URL/URL.stories.d.ts +1 -1
- package/lib/core/URL/URL.stories.js +1 -1
- package/lib/core/URL/URL.stories.js.map +1 -1
- package/lib/cs/Article/Article.mocks.js +4 -4
- package/lib/cs/Article/Article.mocks.js.map +1 -1
- package/lib/cs/Article/Article.stories.d.ts +14 -3
- package/lib/cs/Article/Article.stories.d.ts.map +1 -1
- package/lib/cs/Article/Article.stories.js +168 -53
- package/lib/cs/Article/Article.stories.js.map +1 -1
- package/lib/cs/ArticleList/ArticleList.mocks.d.ts +129 -10
- package/lib/cs/ArticleList/ArticleList.mocks.d.ts.map +1 -1
- package/lib/cs/ArticleList/ArticleList.mocks.js +362 -50
- package/lib/cs/ArticleList/ArticleList.mocks.js.map +1 -1
- package/lib/cs/ArticleList/ArticleList.stories.d.ts +11 -3
- package/lib/cs/ArticleList/ArticleList.stories.d.ts.map +1 -1
- package/lib/cs/ArticleList/ArticleList.stories.js +245 -68
- package/lib/cs/ArticleList/ArticleList.stories.js.map +1 -1
- package/lib/cs/CSAppShell/CSAppShell.mocks.d.ts +18 -1
- package/lib/cs/CSAppShell/CSAppShell.mocks.d.ts.map +1 -1
- package/lib/cs/CSAppShell/CSAppShell.mocks.js +124 -19
- package/lib/cs/CSAppShell/CSAppShell.mocks.js.map +1 -1
- package/lib/cs/CSAppShell/CSAppShell.stories.d.ts +1 -1
- package/lib/cs/CSAppShell/CSAppShell.stories.d.ts.map +1 -1
- package/lib/cs/CSAppShell/CSAppShell.stories.js +10 -21
- package/lib/cs/CSAppShell/CSAppShell.stories.js.map +1 -1
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts +2 -2
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts.map +1 -1
- package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts +1 -1
- package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -1
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js +2 -2
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js.map +1 -1
- package/lib/cs/DialPad/DialPad.stories.d.ts +1 -1
- package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts +4 -2
- package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -1
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js +18 -4
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js.map +1 -1
- package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts +2 -1
- package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -1
- package/lib/cs/InteractionTimer/InteractionTimer.stories.js +12 -5
- package/lib/cs/InteractionTimer/InteractionTimer.stories.js.map +1 -1
- package/lib/cs/Picker/Picker.stories.d.ts +11 -0
- package/lib/cs/Picker/Picker.stories.d.ts.map +1 -0
- package/lib/cs/Picker/Picker.stories.js +56 -0
- package/lib/cs/Picker/Picker.stories.js.map +1 -0
- package/lib/cs/TaskManager/TaskManager.stories.d.ts +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.js +3 -3
- package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
- package/lib/dnd/DragDropList/DragDropList.stories.d.ts +1 -1
- package/lib/dnd/StandardDragDropList/Demo.d.ts.map +1 -1
- package/lib/dnd/StandardDragDropList/Demo.js +1 -1
- package/lib/dnd/StandardDragDropList/Demo.js.map +1 -1
- package/lib/dnd/StandardDragDropList/Popover.d.ts +1 -1
- package/lib/dnd/StandardDragDropList/Popover.d.ts.map +1 -1
- package/lib/dnd/StandardDragDropList/StandardDragDropList.stories.d.ts +1 -1
- package/lib/dnd/StandardDragDropList/mockData.d.ts +2 -2
- package/lib/dnd/StandardDragDropList/mockData.d.ts.map +1 -1
- package/lib/dnd/StandardDragDropList/mockData.js.map +1 -1
- package/lib/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts +8 -0
- package/lib/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -0
- package/lib/rte/DynamicContentEditor/DynamicContentEditor.stories.js +85 -0
- package/lib/rte/DynamicContentEditor/DynamicContentEditor.stories.js.map +1 -0
- package/lib/rte/DynamicContentEditor/FieldSelector.d.ts +14 -0
- package/lib/rte/DynamicContentEditor/FieldSelector.d.ts.map +1 -0
- package/lib/rte/DynamicContentEditor/FieldSelector.js +81 -0
- package/lib/rte/DynamicContentEditor/FieldSelector.js.map +1 -0
- package/lib/rte/Editor/Editor.mocks.d.ts +41 -27
- package/lib/rte/Editor/Editor.mocks.d.ts.map +1 -1
- package/lib/rte/Editor/Editor.stories.d.ts +1 -1
- package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts +1 -1
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -1
- package/lib/social/Chat/Chat.mocks.d.ts +23 -395
- package/lib/social/Chat/Chat.mocks.d.ts.map +1 -1
- package/lib/social/Chat/Chat.mocks.js +568 -585
- package/lib/social/Chat/Chat.mocks.js.map +1 -1
- package/lib/social/Chat/Chat.stories.d.ts +25 -27
- package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
- package/lib/social/Chat/Chat.stories.js +217 -247
- package/lib/social/Chat/Chat.stories.js.map +1 -1
- package/lib/social/Email/Email.mocks.d.ts +50 -8
- package/lib/social/Email/Email.mocks.d.ts.map +1 -1
- package/lib/social/Email/Email.mocks.js +131 -19
- package/lib/social/Email/Email.mocks.js.map +1 -1
- package/lib/social/Email/Email.stories.d.ts +11 -1
- package/lib/social/Email/Email.stories.d.ts.map +1 -1
- package/lib/social/Email/Email.stories.js +160 -38
- package/lib/social/Email/Email.stories.js.map +1 -1
- package/lib/social/Feed/Feed.mocks.d.ts +2 -1
- package/lib/social/Feed/Feed.mocks.d.ts.map +1 -1
- package/lib/social/Feed/Feed.mocks.js +5 -3
- package/lib/social/Feed/Feed.mocks.js.map +1 -1
- package/lib/social/Feed/Feed.stories.d.ts +1 -1
- package/lib/social/Feed/Feed.stories.d.ts.map +1 -1
- package/lib/social/Feed/Feed.stories.js +13 -5
- package/lib/social/Feed/Feed.stories.js.map +1 -1
- package/lib/social/Feed/FeedNewPost.stories.d.ts +1 -1
- package/lib/social/Feed/FeedNewPost.stories.d.ts.map +1 -1
- package/lib/social/Feed/FeedNewPost.stories.js +2 -2
- package/lib/social/Feed/FeedNewPost.stories.js.map +1 -1
- package/lib/social/Feed/FeedPost.stories.d.ts +1 -1
- package/lib/social/Feed/FeedPost.stories.d.ts.map +1 -1
- package/lib/social/Feed/FeedPost.stories.js +16 -7
- package/lib/social/Feed/FeedPost.stories.js.map +1 -1
- package/lib/social/Feed/FeedReply.stories.d.ts +1 -1
- package/lib/social/Feed/FeedReply.stories.d.ts.map +1 -1
- package/lib/social/Feed/FeedReply.stories.js +11 -3
- package/lib/social/Feed/FeedReply.stories.js.map +1 -1
- package/lib/social/Feed/FeedReplyInput.stories.d.ts +1 -1
- package/lib/social/Feed/FeedReplyInput.stories.d.ts.map +1 -1
- package/lib/social/Feed/FeedReplyInput.stories.js +2 -2
- package/lib/social/Feed/FeedReplyInput.stories.js.map +1 -1
- package/lib/tools/Clipboard/Clipboard.mocks.d.ts.map +1 -1
- package/lib/tools/Clipboard/Clipboard.mocks.js +0 -1
- package/lib/tools/Clipboard/Clipboard.mocks.js.map +1 -1
- package/lib/tools/Clipboard/Clipboard.stories.d.ts +1 -1
- package/lib/tools/Clipboard/Clipboard.stories.d.ts.map +1 -1
- package/lib/tools/Clipboard/Clipboard.stories.js +13 -17
- package/lib/tools/Clipboard/Clipboard.stories.js.map +1 -1
- package/lib/tools/DevTools/DevTools.stories.d.ts +1 -1
- package/lib/tools/DevTools/DevTools.stories.d.ts.map +1 -1
- package/lib/tools/DevTools/DevTools.stories.js +2 -4
- package/lib/tools/DevTools/DevTools.stories.js.map +1 -1
- package/lib/tools/PreviewShell/PreviewShell.mocks.d.ts +12 -1
- package/lib/tools/PreviewShell/PreviewShell.mocks.d.ts.map +1 -1
- package/lib/tools/PreviewShell/PreviewShell.mocks.js +22 -2
- package/lib/tools/PreviewShell/PreviewShell.mocks.js.map +1 -1
- package/lib/tools/PreviewShell/PreviewShell.stories.d.ts +5 -3
- package/lib/tools/PreviewShell/PreviewShell.stories.d.ts.map +1 -1
- package/lib/tools/PreviewShell/PreviewShell.stories.js +70 -51
- package/lib/tools/PreviewShell/PreviewShell.stories.js.map +1 -1
- package/lib/tools/PreviewShell/PreviewShell.styles.d.ts +1 -2
- package/lib/tools/PreviewShell/PreviewShell.styles.d.ts.map +1 -1
- package/lib/tools/PreviewShell/PreviewShell.styles.js +1 -2
- package/lib/tools/PreviewShell/PreviewShell.styles.js.map +1 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts +1 -1
- package/lib/work/Assignments/Assignments.stories.d.ts +11 -0
- package/lib/work/Assignments/Assignments.stories.d.ts.map +1 -0
- package/lib/work/Assignments/Assignments.stories.js +63 -0
- package/lib/work/Assignments/Assignments.stories.js.map +1 -0
- package/lib/work/CaseView/Attachments.mocks.d.ts.map +1 -1
- package/lib/work/CaseView/Attachments.mocks.js +96 -80
- package/lib/work/CaseView/Attachments.mocks.js.map +1 -1
- package/lib/work/CaseView/CaseView.mocks.d.ts +39 -22
- package/lib/work/CaseView/CaseView.mocks.d.ts.map +1 -1
- package/lib/work/CaseView/CaseView.mocks.js +241 -103
- package/lib/work/CaseView/CaseView.mocks.js.map +1 -1
- package/lib/work/CaseView/CaseView.stories.d.ts +3 -8
- package/lib/work/CaseView/CaseView.stories.d.ts.map +1 -1
- package/lib/work/CaseView/CaseView.stories.js +39 -11
- package/lib/work/CaseView/CaseView.stories.js.map +1 -1
- package/lib/work/CaseView/Details.mocks.js +1 -1
- package/lib/work/CaseView/Details.mocks.js.map +1 -1
- package/lib/work/CaseView/FileService.mock.d.ts +2 -2
- package/lib/work/CaseView/FileService.mock.d.ts.map +1 -1
- package/lib/work/CaseView/FileService.mock.js +2 -6
- package/lib/work/CaseView/FileService.mock.js.map +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +1 -1
- package/lib/work/Confirmation/Confirmation.stories.d.ts +1 -1
- package/lib/work/Confirmation/Confirmation.stories.js +1 -1
- package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
- package/lib/work/Details/Details.stories.d.ts +1 -1
- package/lib/work/Details/Details.stories.d.ts.map +1 -1
- package/lib/work/Details/Details.stories.js +6 -1
- package/lib/work/Details/Details.stories.js.map +1 -1
- package/lib/work/Glimpse/Glimpse.stories.d.ts +2 -7
- package/lib/work/Glimpse/Glimpse.stories.d.ts.map +1 -1
- package/lib/work/Glimpse/Glimpse.stories.js +12 -14
- package/lib/work/Glimpse/Glimpse.stories.js.map +1 -1
- package/lib/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts +1 -1
- package/lib/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/lib/work/IntelligentGuidance/IntelligentGuidance.stories.js +89 -12
- package/lib/work/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
- package/lib/work/Predictions/Predictions.mocks.d.ts +3 -0
- package/lib/work/Predictions/Predictions.mocks.d.ts.map +1 -0
- package/lib/work/Predictions/Predictions.mocks.js +6 -0
- package/lib/work/Predictions/Predictions.mocks.js.map +1 -0
- package/lib/work/Predictions/Predictions.stories.d.ts +5 -0
- package/lib/work/Predictions/Predictions.stories.d.ts.map +1 -0
- package/lib/work/Predictions/Predictions.stories.js +54 -0
- package/lib/work/Predictions/Predictions.stories.js.map +1 -0
- package/lib/work/SearchResults/SearchResults.mocks.d.ts +1 -1
- package/lib/work/SearchResults/SearchResults.mocks.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.d.ts +1 -1
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js +20 -7
- package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
- package/lib/work/Stages/Stages.mocks.js +6 -6
- package/lib/work/Stages/Stages.mocks.js.map +1 -1
- package/lib/work/Stages/Stages.stories.d.ts +1 -1
- package/lib/work/Stages/Stages.stories.d.ts.map +1 -1
- package/lib/work/Stages/Stages.stories.js +22 -8
- package/lib/work/Stages/Stages.stories.js.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.mocks.js +4 -2
- package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts +1 -1
- package/lib/work/Tags/Tags.stories.d.ts +1 -1
- package/lib/work/Tags/Tags.stories.d.ts.map +1 -1
- package/lib/work/Tags/Tags.stories.js +7 -1
- package/lib/work/Tags/Tags.stories.js.map +1 -1
- package/lib/work/Tasks/TaskList.stories.d.ts +1 -1
- package/lib/work/Tasks/Tasks.mocks.d.ts +22 -0
- package/lib/work/Tasks/Tasks.mocks.d.ts.map +1 -0
- package/lib/work/Tasks/Tasks.mocks.js +51 -0
- package/lib/work/Tasks/Tasks.mocks.js.map +1 -0
- package/lib/work/Tasks/Tasks.stories.d.ts +6 -4
- package/lib/work/Tasks/Tasks.stories.d.ts.map +1 -1
- package/lib/work/Tasks/Tasks.stories.js +40 -54
- package/lib/work/Tasks/Tasks.stories.js.map +1 -1
- package/lib/work/Timeline/Timeline.mocks.d.ts.map +1 -1
- package/lib/work/Timeline/Timeline.mocks.js +16 -1
- package/lib/work/Timeline/Timeline.mocks.js.map +1 -1
- package/lib/work/Timeline/Timeline.stories.d.ts +1 -1
- package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
- package/lib/work/Timeline/Timeline.stories.js +2 -2
- package/lib/work/Timeline/Timeline.stories.js.map +1 -1
- package/lib/wss/AppShell/AppShell.stories.d.ts +1 -1
- package/lib/wss/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/wss/AppShell/AppShell.stories.js +18 -1
- package/lib/wss/AppShell/AppShell.stories.js.map +1 -1
- package/lib/wss/CaseView/CaseView.stories.d.ts +1 -1
- package/lib/wss/CaseView/CaseView.stories.d.ts.map +1 -1
- package/lib/wss/CaseView/CaseView.stories.js +5 -3
- package/lib/wss/CaseView/CaseView.stories.js.map +1 -1
- package/lib/wss/PageTemplates/PageTemplates.stories.d.ts +1 -1
- package/lib/wss/PageTemplates/PageTemplates.stories.js +2 -2
- package/lib/wss/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/wss/QuickCreate/QuickCreate.stories.d.ts +1 -1
- package/package.json +24 -21
- package/jsx/build/AppHeader/AppHeader.stories.d.ts +0 -13
- package/jsx/build/AppHeader/AppHeader.stories.d.ts.map +0 -1
- package/jsx/build/AppHeader/AppHeader.stories.jsx +0 -153
- package/jsx/build/AppHeader/AppHeader.stories.jsx.map +0 -1
- package/jsx/social/Chat/RepeatingView.mocks.d.ts +0 -14
- package/jsx/social/Chat/RepeatingView.mocks.d.ts.map +0 -1
- package/jsx/social/Chat/RepeatingView.mocks.js +0 -11
- package/jsx/social/Chat/RepeatingView.mocks.js.map +0 -1
- package/jsx/social/Chat/RepeatingView.stories.d.ts +0 -9
- package/jsx/social/Chat/RepeatingView.stories.d.ts.map +0 -1
- package/jsx/social/Chat/RepeatingView.stories.jsx +0 -60
- package/jsx/social/Chat/RepeatingView.stories.jsx.map +0 -1
- package/jsx/social/Chat/RepeatingView.styles.d.ts +0 -2
- package/jsx/social/Chat/RepeatingView.styles.d.ts.map +0 -1
- package/jsx/social/Chat/RepeatingView.styles.js +0 -22
- package/jsx/social/Chat/RepeatingView.styles.js.map +0 -1
- package/lib/build/AppHeader/AppHeader.stories.d.ts +0 -13
- package/lib/build/AppHeader/AppHeader.stories.d.ts.map +0 -1
- package/lib/build/AppHeader/AppHeader.stories.js +0 -152
- package/lib/build/AppHeader/AppHeader.stories.js.map +0 -1
- package/lib/social/Chat/RepeatingView.mocks.d.ts +0 -14
- package/lib/social/Chat/RepeatingView.mocks.d.ts.map +0 -1
- package/lib/social/Chat/RepeatingView.mocks.js +0 -11
- package/lib/social/Chat/RepeatingView.mocks.js.map +0 -1
- package/lib/social/Chat/RepeatingView.stories.d.ts +0 -9
- package/lib/social/Chat/RepeatingView.stories.d.ts.map +0 -1
- package/lib/social/Chat/RepeatingView.stories.js +0 -59
- package/lib/social/Chat/RepeatingView.stories.js.map +0 -1
- package/lib/social/Chat/RepeatingView.styles.d.ts +0 -2
- package/lib/social/Chat/RepeatingView.styles.d.ts.map +0 -1
- package/lib/social/Chat/RepeatingView.styles.js +0 -22
- package/lib/social/Chat/RepeatingView.styles.js.map +0 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useReducer, useState } from 'react';
|
|
3
|
+
import { ComboBox, createUID, Flex, FormDialog, Input, SummaryList, Text } from '@pega/cosmos-react-core';
|
|
4
|
+
import { loadingTimeoutMS } from '../Progress/Progress.mocks';
|
|
5
|
+
const errorText = 'Cannot be blank';
|
|
6
|
+
const categories = Array.from({ length: 5 }, (_, i) => `Category ${i + 1}`);
|
|
7
|
+
const initialItems = Array.from({ length: 3 }, (_, i) => {
|
|
8
|
+
return {
|
|
9
|
+
id: createUID(),
|
|
10
|
+
name: `Editable item ${i + 1}`,
|
|
11
|
+
category: categories[i]
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
const itemReducer = (items, payload) => {
|
|
15
|
+
switch (payload.type) {
|
|
16
|
+
case 'add': {
|
|
17
|
+
return [...items, { ...payload.item, id: createUID() }];
|
|
18
|
+
}
|
|
19
|
+
case 'edit': {
|
|
20
|
+
return items.map(item => {
|
|
21
|
+
return item.id === payload.item.id
|
|
22
|
+
? { ...item, name: payload.item.name, category: payload.item.category }
|
|
23
|
+
: item;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
case 'remove': {
|
|
27
|
+
const itemIndex = items.findIndex(item => item.id === payload.item.id);
|
|
28
|
+
if (itemIndex === -1)
|
|
29
|
+
return items;
|
|
30
|
+
items.splice(itemIndex, 1);
|
|
31
|
+
return [...items];
|
|
32
|
+
}
|
|
33
|
+
default: {
|
|
34
|
+
return items;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const progressStates = {
|
|
39
|
+
loading: 'Loading...',
|
|
40
|
+
submitting: 'Submitting...'
|
|
41
|
+
};
|
|
42
|
+
export const useMockItems = () => {
|
|
43
|
+
return useReducer(itemReducer, undefined, () => initialItems);
|
|
44
|
+
};
|
|
45
|
+
export const ItemDialog = ({ target, item: itemProp, dispatch, onComplete }) => {
|
|
46
|
+
const [nameField, setNameField] = useState(() => {
|
|
47
|
+
return {
|
|
48
|
+
value: itemProp?.name ?? null,
|
|
49
|
+
error: null,
|
|
50
|
+
errorOnPriorBlur: false
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
const [categoryField, setCategoryField] = useState(() => {
|
|
54
|
+
return {
|
|
55
|
+
value: itemProp?.category ?? null,
|
|
56
|
+
error: null
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
const [progress, setProgress] = useState(progressStates.loading);
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
let timerId;
|
|
62
|
+
if (progress === progressStates.loading) {
|
|
63
|
+
timerId = window.setTimeout(() => {
|
|
64
|
+
setProgress(false);
|
|
65
|
+
}, loadingTimeoutMS);
|
|
66
|
+
}
|
|
67
|
+
else if (progress === progressStates.submitting) {
|
|
68
|
+
timerId = window.setTimeout(() => {
|
|
69
|
+
setProgress(false);
|
|
70
|
+
dispatch({ name: nameField.value, category: categoryField.value });
|
|
71
|
+
onComplete();
|
|
72
|
+
}, loadingTimeoutMS);
|
|
73
|
+
}
|
|
74
|
+
return () => {
|
|
75
|
+
window.clearTimeout(timerId);
|
|
76
|
+
};
|
|
77
|
+
}, [progress]);
|
|
78
|
+
return (_jsx(FormDialog, { target: target, heading: `${itemProp ? 'Edit' : 'Add'} item`, progress: progress, onCancel: {
|
|
79
|
+
disabled: progress === progressStates.submitting,
|
|
80
|
+
handler: () => {
|
|
81
|
+
setProgress(false);
|
|
82
|
+
onComplete();
|
|
83
|
+
}
|
|
84
|
+
}, onSubmit: {
|
|
85
|
+
disabled: !!progress || [nameField, categoryField].some(field => !field.value || field.error),
|
|
86
|
+
handler: () => {
|
|
87
|
+
setProgress(progressStates.submitting);
|
|
88
|
+
}
|
|
89
|
+
}, children: (!progress || progress !== progressStates.loading) && (_jsxs(Flex, { container: { direction: 'column', gap: 2 }, children: [_jsx(Input, { required: true, label: 'Name', value: nameField.value ?? '', onChange: (e) => {
|
|
90
|
+
setNameField(cur => ({
|
|
91
|
+
...cur,
|
|
92
|
+
value: e.target.value,
|
|
93
|
+
error: !e.target.value && cur.errorOnPriorBlur ? errorText : null
|
|
94
|
+
}));
|
|
95
|
+
}, onBlur: (e) => {
|
|
96
|
+
if (!e.target.value) {
|
|
97
|
+
setNameField(cur => ({
|
|
98
|
+
...cur,
|
|
99
|
+
error: errorText,
|
|
100
|
+
errorOnPriorBlur: true
|
|
101
|
+
}));
|
|
102
|
+
}
|
|
103
|
+
else if (nameField.errorOnPriorBlur) {
|
|
104
|
+
setNameField(cur => ({ ...cur, errorOnPriorBlur: false }));
|
|
105
|
+
}
|
|
106
|
+
}, status: nameField.error ? 'error' : undefined, info: nameField.error }), _jsx(ComboBox, { required: true, label: 'Category', selected: categoryField.value
|
|
107
|
+
? {
|
|
108
|
+
items: {
|
|
109
|
+
id: categoryField.value,
|
|
110
|
+
text: categoryField.value
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
: undefined, menu: {
|
|
114
|
+
mode: 'single-select',
|
|
115
|
+
onItemClick: category => {
|
|
116
|
+
setCategoryField({
|
|
117
|
+
value: category,
|
|
118
|
+
error: null
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
items: categories.map(category => {
|
|
122
|
+
return {
|
|
123
|
+
id: category,
|
|
124
|
+
primary: category,
|
|
125
|
+
selected: category === categoryField.value
|
|
126
|
+
};
|
|
127
|
+
})
|
|
128
|
+
}, onBlur: selected => {
|
|
129
|
+
if (!selected) {
|
|
130
|
+
setCategoryField(cur => ({ ...cur, error: errorText }));
|
|
131
|
+
}
|
|
132
|
+
}, status: categoryField.error ? 'error' : undefined, info: categoryField.error })] })) }));
|
|
133
|
+
};
|
|
134
|
+
export const FormDialogMock = () => {
|
|
135
|
+
const [dialogTarget, setDialogTarget] = useState(null);
|
|
136
|
+
const [editItem, setEditItem] = useState(null);
|
|
137
|
+
const [items, dispatch] = useMockItems();
|
|
138
|
+
return (_jsxs(_Fragment, { children: [_jsx(SummaryList, { name: 'Editable items', icon: 'list', count: items.length, actions: [
|
|
139
|
+
{
|
|
140
|
+
id: 'Add',
|
|
141
|
+
text: 'Add',
|
|
142
|
+
icon: 'plus',
|
|
143
|
+
onClick: (_, e) => {
|
|
144
|
+
setDialogTarget(e.currentTarget);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
], items: items.map(({ id, name, category }) => {
|
|
148
|
+
return {
|
|
149
|
+
id,
|
|
150
|
+
primary: name,
|
|
151
|
+
secondary: _jsx(Text, { variant: 'secondary', children: category }),
|
|
152
|
+
actions: [
|
|
153
|
+
{
|
|
154
|
+
id: 'Edit',
|
|
155
|
+
text: 'Edit',
|
|
156
|
+
icon: 'pencil',
|
|
157
|
+
onClick: (_, e, menuButton) => {
|
|
158
|
+
if (menuButton)
|
|
159
|
+
setDialogTarget(menuButton);
|
|
160
|
+
setEditItem({
|
|
161
|
+
id,
|
|
162
|
+
name,
|
|
163
|
+
category
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
id: 'Remove',
|
|
169
|
+
text: 'Remove',
|
|
170
|
+
icon: 'trash',
|
|
171
|
+
onClick: () => {
|
|
172
|
+
dispatch({ type: 'remove', item: { id } });
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
};
|
|
177
|
+
}) }), dialogTarget && (_jsx(ItemDialog, { target: dialogTarget, item: editItem,
|
|
178
|
+
// Wrap dispatch so the dialog can only affect the item it creates or updates.
|
|
179
|
+
dispatch: fields => {
|
|
180
|
+
dispatch(editItem
|
|
181
|
+
? { type: 'edit', item: { id: editItem.id, ...fields } }
|
|
182
|
+
: { type: 'add', item: { ...fields } });
|
|
183
|
+
}, onComplete: () => {
|
|
184
|
+
setDialogTarget(null);
|
|
185
|
+
setEditItem(null);
|
|
186
|
+
} }))] }));
|
|
187
|
+
};
|
|
188
|
+
//# sourceMappingURL=FormDialog.mocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormDialog.mocks.js","sourceRoot":"","sources":["../../../src/core/Dialog/FormDialog.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA2B,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM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,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;gCAC7C,CAAC;6BACF;yBACF;qBACF,CAAC;gBACJ,CAAC,CAAC,GACF,EAED,YAAY,IAAI,CACf,KAAC,UAAU,IACT,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,QAAQ;gBACd,8EAA8E;gBAC9E,QAAQ,EAAE,MAAM,CAAC,EAAE;oBACjB,QAAQ,CACN,QAAQ;wBACN,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE;wBACxD,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CACzC,CAAC;gBACJ,CAAC,EACD,UAAU,EAAE,GAAG,EAAE;oBACf,eAAe,CAAC,IAAI,CAAC,CAAC;oBACtB,WAAW,CAAC,IAAI,CAAC,CAAC;gBACpB,CAAC,GACD,CACH,IACA,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { ChangeEvent, FocusEvent, useEffect, useReducer, useState } from 'react';\n\nimport {\n ComboBox,\n createUID,\n Flex,\n FormDialog,\n FormDialogProps,\n Input,\n SummaryList,\n SummaryListItem,\n Text\n} from '@pega/cosmos-react-core';\n\nimport { loadingTimeoutMS } from '../Progress/Progress.mocks';\n\nexport type MockCategory = `Category ${number}`;\n\nexport interface MockItem {\n readonly id: string;\n name: string;\n category: MockCategory;\n}\n\nexport type MockReducerPayload =\n | {\n type: 'add';\n item: Pick<MockItem, 'name' | 'category'>;\n }\n | {\n type: 'edit';\n item: MockItem;\n }\n | {\n type: 'remove';\n item: Pick<MockItem, 'id'>;\n };\n\nexport interface MockItemDialogProps extends Pick<FormDialogProps, 'target'> {\n item: MockItem | null;\n dispatch: (fieldValues: Pick<MockItem, 'name' | 'category'>) => void;\n onComplete: () => void;\n}\n\nconst errorText = 'Cannot be blank';\n\nconst categories = Array.from({ length: 5 }, (_, i): MockCategory => `Category ${i + 1}`);\n\nconst initialItems: MockItem[] = Array.from({ length: 3 }, (_, i) => {\n return {\n id: createUID(),\n name: `Editable item ${i + 1}`,\n category: categories[i]\n };\n});\n\nconst itemReducer = (items: MockItem[], payload: MockReducerPayload) => {\n switch (payload.type) {\n case 'add': {\n return [...items, { ...payload.item, id: createUID() }];\n }\n\n case 'edit': {\n return items.map(item => {\n return item.id === payload.item.id\n ? { ...item, name: payload.item.name, category: payload.item.category }\n : item;\n });\n }\n\n case 'remove': {\n const itemIndex = items.findIndex(item => item.id === payload.item.id);\n if (itemIndex === -1) return items;\n items.splice(itemIndex, 1);\n return [...items];\n }\n\n default: {\n return items;\n }\n }\n};\n\nconst progressStates = {\n loading: 'Loading...',\n submitting: 'Submitting...'\n} as const;\n\nexport const useMockItems = () => {\n return useReducer(itemReducer, undefined, () => initialItems);\n};\n\nexport const ItemDialog = ({\n target,\n item: itemProp,\n dispatch,\n onComplete\n}: MockItemDialogProps) => {\n const [nameField, setNameField] = useState<{\n value: string | null;\n error: typeof errorText | null;\n errorOnPriorBlur: boolean;\n }>(() => {\n return {\n value: itemProp?.name ?? null,\n error: null,\n errorOnPriorBlur: false\n };\n });\n\n const [categoryField, setCategoryField] = useState<{\n value: MockCategory | null;\n error: typeof errorText | null;\n }>(() => {\n return {\n value: itemProp?.category ?? null,\n error: null\n };\n });\n\n const [progress, setProgress] = useState<\n (typeof progressStates)[keyof typeof progressStates] | false\n >(progressStates.loading);\n\n useEffect(() => {\n let timerId: number;\n\n if (progress === progressStates.loading) {\n timerId = window.setTimeout(() => {\n setProgress(false);\n }, loadingTimeoutMS);\n } else if (progress === progressStates.submitting) {\n timerId = window.setTimeout(() => {\n setProgress(false);\n dispatch({ name: nameField.value!, category: categoryField.value! });\n onComplete();\n }, loadingTimeoutMS);\n }\n\n return () => {\n window.clearTimeout(timerId);\n };\n }, [progress]);\n\n return (\n <FormDialog\n target={target}\n heading={`${itemProp ? 'Edit' : 'Add'} item`}\n progress={progress}\n onCancel={{\n disabled: progress === progressStates.submitting,\n handler: () => {\n setProgress(false);\n onComplete();\n }\n }}\n onSubmit={{\n disabled:\n !!progress || [nameField, categoryField].some(field => !field.value || field.error),\n handler: () => {\n setProgress(progressStates.submitting);\n }\n }}\n >\n {(!progress || progress !== progressStates.loading) && (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Input\n required\n label='Name'\n value={nameField.value ?? ''}\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n setNameField(cur => ({\n ...cur,\n value: e.target.value,\n error: !e.target.value && cur.errorOnPriorBlur ? errorText : null\n }));\n }}\n onBlur={(e: FocusEvent<HTMLInputElement>) => {\n if (!e.target.value) {\n setNameField(cur => ({\n ...cur,\n error: errorText,\n errorOnPriorBlur: true\n }));\n } else if (nameField.errorOnPriorBlur) {\n setNameField(cur => ({ ...cur, errorOnPriorBlur: false }));\n }\n }}\n status={nameField.error ? 'error' : undefined}\n info={nameField.error}\n />\n <ComboBox\n required\n label='Category'\n selected={\n categoryField.value\n ? {\n items: {\n id: categoryField.value,\n text: categoryField.value\n }\n }\n : undefined\n }\n menu={{\n mode: 'single-select',\n onItemClick: category => {\n setCategoryField({\n value: category as MockCategory,\n error: null\n });\n },\n items: categories.map(category => {\n return {\n id: category,\n primary: category,\n selected: category === categoryField.value\n };\n })\n }}\n onBlur={selected => {\n if (!selected) {\n setCategoryField(cur => ({ ...cur, error: errorText }));\n }\n }}\n status={categoryField.error ? 'error' : undefined}\n info={categoryField.error}\n />\n </Flex>\n )}\n </FormDialog>\n );\n};\n\nexport const FormDialogMock = () => {\n const [dialogTarget, setDialogTarget] = useState<MockItemDialogProps['target'] | null>(null);\n const [editItem, setEditItem] = useState<MockItem | null>(null);\n const [items, dispatch] = useMockItems();\n\n return (\n <>\n <SummaryList\n name='Editable items'\n icon='list'\n count={items.length}\n actions={[\n {\n id: 'Add',\n text: 'Add',\n icon: 'plus',\n onClick: (_, e) => {\n setDialogTarget(e.currentTarget);\n }\n }\n ]}\n items={items.map<SummaryListItem>(({ id, name, category }) => {\n return {\n id,\n primary: name,\n secondary: <Text variant='secondary'>{category}</Text>,\n actions: [\n {\n id: 'Edit',\n text: 'Edit',\n icon: 'pencil',\n onClick: (_, e, menuButton) => {\n if (menuButton) setDialogTarget(menuButton);\n\n setEditItem({\n id,\n name,\n category\n });\n }\n },\n {\n id: 'Remove',\n text: 'Remove',\n icon: 'trash',\n onClick: () => {\n dispatch({ type: 'remove', item: { id } });\n }\n }\n ]\n };\n })}\n />\n\n {dialogTarget && (\n <ItemDialog\n target={dialogTarget}\n item={editItem}\n // Wrap dispatch so the dialog can only affect the item it creates or updates.\n dispatch={fields => {\n dispatch(\n editItem\n ? { type: 'edit', item: { id: editItem.id, ...fields } }\n : { type: 'add', item: { ...fields } }\n );\n }}\n onComplete={() => {\n setDialogTarget(null);\n setEditItem(null);\n }}\n />\n )}\n </>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoDialog.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/Dialog/InfoDialog.mocks.tsx"],"names":[],"mappings":";AAsBA,eAAO,MAAM,cAAc,mBAqB1B,CAAC;AAEF,eAAO,MAAM,sBAAsB,mBAmDlC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { useElement, useAfterInitialEffect } from '@pega/cosmos-react-core/lib/hooks';
|
|
4
|
+
import { Avatar, Button, Flex, InfoDialog, Text } from '@pega/cosmos-react-core';
|
|
5
|
+
import { FieldValueListDemo } from '../FieldValueList/FieldValueList.stories';
|
|
6
|
+
import { loadingTimeoutMS } from '../Progress/Progress.mocks';
|
|
7
|
+
const mockContent = (_jsxs(Flex, { container: { direction: 'column', gap: 2 }, children: [_jsx(Text, { as: 'p', children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." }), _jsx(FieldValueListDemo, { name: 'Demo field', value: 'demo value' })] }));
|
|
8
|
+
export const InfoDialogMock = () => {
|
|
9
|
+
const [target, setTarget] = useElement(null);
|
|
10
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: 'secondary', onClick: (e) => {
|
|
11
|
+
setTarget(e.currentTarget);
|
|
12
|
+
}, children: "Open dialog" }), target ? (_jsx(InfoDialog, { heading: 'General information', target: target, onDismiss: () => setTarget(null), children: mockContent })) : null] }));
|
|
13
|
+
};
|
|
14
|
+
export const InfoDialogProgressMock = () => {
|
|
15
|
+
const [target, setTarget] = useElement(null);
|
|
16
|
+
const [heading, setHeading] = useState();
|
|
17
|
+
const [content, setContent] = useState(null);
|
|
18
|
+
useAfterInitialEffect(() => {
|
|
19
|
+
if (!target) {
|
|
20
|
+
setHeading(undefined);
|
|
21
|
+
setContent(null);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
// Mocking a network request to fetch data
|
|
25
|
+
const timeout = window.setTimeout(() => {
|
|
26
|
+
setHeading({
|
|
27
|
+
primary: 'Primary heading',
|
|
28
|
+
secondary: 'Secondary info',
|
|
29
|
+
visual: _jsx(Avatar, { name: 'Info Dialog' })
|
|
30
|
+
});
|
|
31
|
+
setContent(mockContent);
|
|
32
|
+
}, loadingTimeoutMS);
|
|
33
|
+
return () => {
|
|
34
|
+
window.clearTimeout(timeout);
|
|
35
|
+
};
|
|
36
|
+
}, [target]);
|
|
37
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: 'secondary', onClick: (e) => {
|
|
38
|
+
setTarget(e.currentTarget);
|
|
39
|
+
}, children: "Open dialog" }), target && (_jsx(InfoDialog, { heading: heading, target: target, onDismiss: () => setTarget(null), progress: !content, children: content }))] }));
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=InfoDialog.mocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoDialog.mocks.js","sourceRoot":"","sources":["../../../src/core/Dialog/InfoDialog.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAc,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAGjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,WAAW,GAAG,CAClB,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aAC9C,KAAC,IAAI,IAAC,EAAE,EAAC,GAAG,8cAML,EACP,KAAC,kBAAkB,IAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,YAAY,GAAG,IACtD,CACR,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,UAAU,CAAoB,IAAI,CAAC,CAAC;IAEhE,OAAO,CACL,8BACE,KAAC,MAAM,IACL,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,CAAC,CAAgC,EAAE,EAAE;oBAC5C,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;gBAC7B,CAAC,4BAGM,EAER,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,UAAU,IAAC,OAAO,EAAC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IAAI,CACT,KAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAChC,QAAQ,EAAE,CAAC,OAAO,YAEjB,OAAO,GACG,CACd,IACA,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useState, MouseEvent } from 'react';\n\nimport { useElement, useAfterInitialEffect } from '@pega/cosmos-react-core/lib/hooks';\nimport { Avatar, Button, Flex, InfoDialog, Text } from '@pega/cosmos-react-core';\nimport { InfoDialogProps } from '@pega/cosmos-react-core/lib/components/Dialog/Dialog.types';\n\nimport { FieldValueListDemo } from '../FieldValueList/FieldValueList.stories';\nimport { loadingTimeoutMS } from '../Progress/Progress.mocks';\n\nconst mockContent = (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Text as='p'>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut\n labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco\n laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in\n voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat\n non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n </Text>\n <FieldValueListDemo name='Demo field' value='demo value' />\n </Flex>\n);\n\nexport const InfoDialogMock = () => {\n const [target, setTarget] = useElement<HTMLButtonElement>(null);\n\n return (\n <>\n <Button\n variant='secondary'\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n setTarget(e.currentTarget);\n }}\n >\n Open dialog\n </Button>\n\n {target ? (\n <InfoDialog heading='General information' target={target} onDismiss={() => setTarget(null)}>\n {mockContent}\n </InfoDialog>\n ) : null}\n </>\n );\n};\n\nexport const InfoDialogProgressMock = () => {\n const [target, setTarget] = useElement<HTMLButtonElement>(null);\n const [heading, setHeading] = useState<InfoDialogProps['heading']>();\n const [content, setContent] = useState<InfoDialogProps['children']>(null);\n\n useAfterInitialEffect(() => {\n if (!target) {\n setHeading(undefined);\n setContent(null);\n return;\n }\n\n // Mocking a network request to fetch data\n const timeout = window.setTimeout(() => {\n setHeading({\n primary: 'Primary heading',\n secondary: 'Secondary info',\n visual: <Avatar name='Info Dialog' />\n });\n\n setContent(mockContent);\n }, loadingTimeoutMS);\n\n return () => {\n window.clearTimeout(timeout);\n };\n }, [target]);\n\n return (\n <>\n <Button\n variant='secondary'\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n setTarget(e.currentTarget);\n }}\n >\n Open dialog\n </Button>\n\n {target && (\n <InfoDialog\n heading={heading}\n target={target}\n onDismiss={() => setTarget(null)}\n progress={!content}\n >\n {content}\n </InfoDialog>\n )}\n </>\n );\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
|
2
2
|
import { DrawerProps } from '@pega/cosmos-react-core';
|
|
3
|
-
declare const _default: Meta
|
|
3
|
+
declare const _default: Meta;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const ContainedDrawer: Story<DrawerProps>;
|
|
6
6
|
export declare const ViewportDrawer: Story<DrawerProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
|
2
2
|
import { EmailDisplayProps } from '@pega/cosmos-react-core';
|
|
3
|
-
declare const _default: Meta
|
|
3
|
+
declare const _default: Meta;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const EmailDisplayDemo: Story<EmailDisplayProps>;
|
|
6
6
|
//# sourceMappingURL=EmailDisplay.stories.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
|
2
2
|
import { EmojiPickerProps } from '@pega/cosmos-react-core';
|
|
3
|
-
declare const _default: Meta
|
|
3
|
+
declare const _default: Meta;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const EmojiPickerDemo: Story<EmojiPickerProps>;
|
|
6
6
|
export declare const EmojiPickerExcludeDemo: Story<EmojiPickerProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmojiPicker.stories.d.ts","sourceRoot":"","sources":["../../../src/core/EmojiPicker/EmojiPicker.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAI/C,OAAO,EAA6B,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;;AAEnG,wBAaU;AAEV,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAkBnD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,gBAAgB,CAmB1D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"EmojiPicker.stories.d.ts","sourceRoot":"","sources":["../../../src/core/EmojiPicker/EmojiPicker.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAI/C,OAAO,EAA6B,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;;AAEnG,wBAaU;AAEV,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAkBnD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,gBAAgB,CAmB1D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,gBAAgB,CA8BlD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
2
|
+
import { useMemo, useState } from 'react';
|
|
3
3
|
import { EmojiPicker, EmojiContext, Flex, Input } from '@pega/cosmos-react-core';
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Core/EmojiPicker',
|
|
@@ -34,9 +34,10 @@ export const CustomEmojiSet = (args) => {
|
|
|
34
34
|
const onEmojiSelect = (emoji) => {
|
|
35
35
|
setValue(curr => `${curr}${emoji.native}`);
|
|
36
36
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
const ctx = useMemo(() => ({
|
|
38
|
+
set: 'google',
|
|
39
|
+
spriteSrcResolver: () => 'https://unpkg.com/emoji-datasource-google@5.0.1/img/google/sheets-clean/32.png'
|
|
40
|
+
}), []);
|
|
41
|
+
return (_jsx(EmojiContext.Provider, { value: ctx, children: _jsxs(Flex, { container: { direction: 'column' }, children: [_jsx(Input, { value: value }), _jsx(EmojiPicker, { showFooter: args.showFooter, emojiSize: args.emojiSize, perLine: args.perLine, onSelect: onEmojiSelect })] }) }));
|
|
41
42
|
};
|
|
42
43
|
//# sourceMappingURL=EmojiPicker.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmojiPicker.stories.js","sourceRoot":"","sources":["../../../src/core/EmojiPicker/EmojiPicker.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"EmojiPicker.stories.js","sourceRoot":"","sources":["../../../src/core/EmojiPicker/EmojiPicker.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAoB,IAAI,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEnG,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE;QACJ,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,CAAC;KACX;IACD,QAAQ,EAAE;QACR,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC5C,SAAS,EAAE,EAAE,OAAO,EAAE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CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,EAC3D,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,aAAa,GACvB,IACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAA4B,CAAC,IAAsB,EAAE,EAAE;IAChF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IAE/C,MAAM,aAAa,GAAG,CAAC,KAAgB,EAAE,EAAE;QACzC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC;IAEF,MAAM,GAAG,GAAG,OAAO,CACjB,GAAG,EAAE,CACH,CAAC;QACC,GAAG,EAAE,QAAQ;QACb,iBAAiB,EAAE,GAAG,EAAE,CACtB,gFAAgF;KACzE,CAAA,EACb,EAAE,CACH,CAAC;IAEF,OAAO,CACL,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,GAAG,YAC/B,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,aACtC,KAAC,KAAK,IAAC,KAAK,EAAE,KAAK,GAAI,EACvB,KAAC,WAAW,IACV,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,aAAa,GACvB,IACG,GACe,CACzB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useMemo, useState } from 'react';\nimport { BaseEmoji } from 'emoji-mart';\n\nimport { EmojiPicker, EmojiContext, EmojiPickerProps, Flex, Input } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/EmojiPicker',\n component: EmojiPicker,\n args: {\n showFooter: false,\n emojiSize: 24,\n perLine: 9\n },\n argTypes: {\n showFooter: { control: { type: 'boolean' } },\n emojiSize: { control: { type: 'number' } },\n perLine: { control: { type: 'number' } }\n }\n} as Meta;\n\nexport const EmojiPickerDemo: Story<EmojiPickerProps> = (args: EmojiPickerProps) => {\n const [value, setValue] = useState<string>('');\n\n const onEmojiSelect = (emoji: BaseEmoji) => {\n setValue(curr => `${curr}${emoji.native}`);\n };\n\n return (\n <Flex container={{ direction: 'column' }}>\n <Input value={value} />\n <EmojiPicker\n showFooter={args.showFooter}\n emojiSize={args.emojiSize}\n perLine={args.perLine}\n onSelect={onEmojiSelect}\n />\n </Flex>\n );\n};\n\nexport const EmojiPickerExcludeDemo: Story<EmojiPickerProps> = (args: EmojiPickerProps) => {\n const [value, setValue] = useState<string>('');\n\n const onEmojiSelect = (emoji: BaseEmoji) => {\n setValue(curr => `${curr}${emoji.native}`);\n };\n\n return (\n <Flex container={{ direction: 'column' }}>\n <Input value={value} />\n <EmojiPicker\n exclude={['recent', 'people', 'foods', 'activity', 'flags']}\n showFooter={args.showFooter}\n emojiSize={args.emojiSize}\n perLine={args.perLine}\n onSelect={onEmojiSelect}\n />\n </Flex>\n );\n};\n\nexport const CustomEmojiSet: Story<EmojiPickerProps> = (args: EmojiPickerProps) => {\n const [value, setValue] = useState<string>('');\n\n const onEmojiSelect = (emoji: BaseEmoji) => {\n setValue(curr => `${curr}${emoji.native}`);\n };\n\n const ctx = useMemo(\n () =>\n ({\n set: 'google',\n spriteSrcResolver: () =>\n 'https://unpkg.com/emoji-datasource-google@5.0.1/img/google/sheets-clean/32.png'\n } as const),\n []\n );\n\n return (\n <EmojiContext.Provider value={ctx}>\n <Flex container={{ direction: 'column' }}>\n <Input value={value} />\n <EmojiPicker\n showFooter={args.showFooter}\n emojiSize={args.emojiSize}\n perLine={args.perLine}\n onSelect={onEmojiSelect}\n />\n </Flex>\n </EmojiContext.Provider>\n );\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
|
2
2
|
import { EmptyStateProps } from '@pega/cosmos-react-core';
|
|
3
|
-
declare const _default: Meta
|
|
3
|
+
declare const _default: Meta;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const EmptyStateDemo: Story<EmptyStateProps>;
|
|
6
6
|
//# sourceMappingURL=EmptyState.stories.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
|
2
2
|
import { ErrorStateProps } from '@pega/cosmos-react-core';
|
|
3
|
-
declare const _default: Meta
|
|
3
|
+
declare const _default: Meta;
|
|
4
4
|
export default _default;
|
|
5
5
|
interface ErrorStateStoryProps extends ErrorStateProps {
|
|
6
6
|
displayRetry?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
|
2
2
|
import { ExpandCollapseProps } from '@pega/cosmos-react-core';
|
|
3
|
-
declare const _default: Meta
|
|
3
|
+
declare const _default: Meta;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const VerticalExpandCollapse: Story<ExpandCollapseProps>;
|
|
6
6
|
export declare const HorizontalExpandCollapse: Story<ExpandCollapseProps>;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
|
2
|
-
|
|
2
|
+
import { FieldGroupProps } from '@pega/cosmos-react-core';
|
|
3
|
+
declare const _default: Meta;
|
|
3
4
|
export default _default;
|
|
4
5
|
interface FieldGroupStoryProps {
|
|
5
6
|
firstGroupName?: string;
|
|
7
|
+
firstGroupHeadingTag?: FieldGroupProps['headingTag'];
|
|
8
|
+
showfirstGroupHeadingTag?: boolean;
|
|
6
9
|
firstGroupCollapsible?: boolean;
|
|
7
10
|
firstGroupDescription?: string;
|
|
8
11
|
showFirstAdditionalInfo?: boolean;
|
|
9
12
|
secondGroupName?: string;
|
|
13
|
+
secondGroupHeadingTag?: FieldGroupProps['headingTag'];
|
|
14
|
+
showsecondGroupHeadingTag?: boolean;
|
|
10
15
|
secondGroupCollapsible?: boolean;
|
|
11
16
|
secondGroupDescription?: string;
|
|
12
17
|
showSecondAdditionalInfo?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroup.stories.d.ts","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroup.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldGroup.stories.d.ts","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroup.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAQL,eAAe,EAChB,MAAM,yBAAyB,CAAC;;AAEjC,wBAGU;AAEV,UAAU,oBAAoB;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;IACrD,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;IACtD,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,oBAAoB,CAuEtD,CAAC"}
|
|
@@ -1,32 +1,57 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { DateInput, FieldGroup, Grid, Input, Select, Option, TextArea } from '@pega/cosmos-react-core';
|
|
3
4
|
export default {
|
|
4
5
|
title: 'Core/FieldGroup',
|
|
5
6
|
component: FieldGroup
|
|
6
7
|
};
|
|
7
8
|
export const FieldGroupDemo = (args) => {
|
|
8
|
-
|
|
9
|
+
const [firstGroupCollapsed, setFirstGroupCollapsed] = useState(false);
|
|
10
|
+
const [secondGroupCollapsed, setSecondGroupCollapsed] = useState(false);
|
|
11
|
+
return (_jsxs(Grid, { container: { rowGap: 2 }, children: [_jsx(FieldGroup, { name: args.firstGroupName, headingTag: args.showfirstGroupHeadingTag ? args.firstGroupHeadingTag : undefined, description: args.firstGroupDescription, collapsed: args.firstGroupCollapsible ? firstGroupCollapsed : undefined, onToggleCollapsed: args.firstGroupCollapsible
|
|
12
|
+
? () => {
|
|
13
|
+
setFirstGroupCollapsed(state => !state);
|
|
14
|
+
}
|
|
15
|
+
: undefined, additionalInfo: args.showFirstAdditionalInfo
|
|
9
16
|
? { heading: 'Additional Info', content: 'This is a field group' }
|
|
10
|
-
: undefined, children: _jsxs(Grid, { container: { gap: 1, cols: 'repeat(auto-fit, minmax(min(40ch, 100%), 1fr))' }, children: [_jsx(Input, { type: 'text', label: 'Text 1' }), _jsxs(Select, { label: 'Select 1', children: [_jsx(Option, { value: 'A', children: "Option 1A" }), _jsx(Option, { value: 'B', children: "Option 1B" })] }), _jsx(DateInput, { label: 'Date 1' }), _jsx(Grid, { item: { colStart: '1', colEnd: '-1' }, children: _jsx(TextArea, { label: 'TextArea 1' }) }), _jsx(Input, { required: true, type: 'text', label: 'Required 1' }), _jsx(Input, { disabled: true, type: 'text', label: 'Disabled 1' })] }) }), _jsx(FieldGroup, { name: args.secondGroupName, description: args.secondGroupDescription,
|
|
17
|
+
: undefined, children: _jsxs(Grid, { container: { gap: 1, cols: 'repeat(auto-fit, minmax(min(40ch, 100%), 1fr))' }, children: [_jsx(Input, { type: 'text', label: 'Text 1' }), _jsxs(Select, { label: 'Select 1', children: [_jsx(Option, { value: 'A', children: "Option 1A" }), _jsx(Option, { value: 'B', children: "Option 1B" })] }), _jsx(DateInput, { label: 'Date 1' }), _jsx(Grid, { item: { colStart: '1', colEnd: '-1' }, children: _jsx(TextArea, { label: 'TextArea 1' }) }), _jsx(Input, { required: true, type: 'text', label: 'Required 1' }), _jsx(Input, { disabled: true, type: 'text', label: 'Disabled 1' })] }) }), _jsx(FieldGroup, { name: args.secondGroupName, headingTag: args.showsecondGroupHeadingTag ? args.secondGroupHeadingTag : undefined, description: args.secondGroupDescription, collapsed: args.secondGroupCollapsible ? secondGroupCollapsed : undefined, onToggleCollapsed: args.secondGroupCollapsible
|
|
18
|
+
? () => {
|
|
19
|
+
setSecondGroupCollapsed(state => !state);
|
|
20
|
+
}
|
|
21
|
+
: undefined, additionalInfo: args.showSecondAdditionalInfo
|
|
11
22
|
? { heading: 'Additional Info', content: 'This is another field group' }
|
|
12
23
|
: undefined, children: _jsxs(Grid, { container: { gap: 1, cols: 'repeat(auto-fill, minmax(min(40ch, 100%), 1fr))' }, children: [_jsx(Input, { type: 'text', label: 'Text 2' }), _jsxs(Select, { label: 'Select 2', children: [_jsx(Option, { value: 'A', children: "Option 2A" }), _jsx(Option, { value: 'B', children: "Option 2B" })] }), _jsx(DateInput, { label: 'Date 2' }), _jsx(Grid, { item: { colStart: '1', colEnd: '-1' }, children: _jsx(TextArea, { label: 'TextArea 2' }) }), _jsx(Input, { required: true, type: 'text', label: 'Required 2' }), _jsx(Input, { disabled: true, type: 'text', label: 'Disabled 2' })] }) })] }));
|
|
13
24
|
};
|
|
14
25
|
FieldGroupDemo.args = {
|
|
15
26
|
firstGroupName: 'Field group 1',
|
|
27
|
+
firstGroupHeadingTag: undefined,
|
|
28
|
+
showfirstGroupHeadingTag: true,
|
|
16
29
|
firstGroupCollapsible: true,
|
|
17
30
|
firstGroupDescription: '',
|
|
18
31
|
showFirstAdditionalInfo: true,
|
|
19
32
|
secondGroupName: 'Field group 2',
|
|
33
|
+
secondGroupHeadingTag: undefined,
|
|
34
|
+
showsecondGroupHeadingTag: true,
|
|
20
35
|
secondGroupCollapsible: true,
|
|
21
36
|
secondGroupDescription: '',
|
|
22
37
|
showSecondAdditionalInfo: true
|
|
23
38
|
};
|
|
24
39
|
FieldGroupDemo.argTypes = {
|
|
25
40
|
firstGroupName: { control: { type: 'text' } },
|
|
41
|
+
firstGroupHeadingTag: {
|
|
42
|
+
options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
|
|
43
|
+
control: { type: 'select' }
|
|
44
|
+
},
|
|
45
|
+
showfirstGroupHeadingTag: { control: { type: 'boolean' } },
|
|
26
46
|
firstGroupCollapsible: { control: { type: 'boolean' } },
|
|
27
47
|
firstGroupDescription: { control: { type: 'text' } },
|
|
28
48
|
showFirstAdditionalInfo: { control: { type: 'boolean' } },
|
|
29
49
|
secondGroupName: { control: { type: 'text' } },
|
|
50
|
+
secondGroupHeadingTag: {
|
|
51
|
+
options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
|
|
52
|
+
control: { type: 'select' }
|
|
53
|
+
},
|
|
54
|
+
showsecondGroupHeadingTag: { control: { type: 'boolean' } },
|
|
30
55
|
secondGroupCollapsible: { control: { type: 'boolean' } },
|
|
31
56
|
secondGroupDescription: { control: { type: 'text' } },
|
|
32
57
|
showSecondAdditionalInfo: { control: { type: 'boolean' } }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroup.stories.js","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroup.stories.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"FieldGroup.stories.js","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroup.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EACL,SAAS,EACT,UAAU,EACV,IAAI,EACJ,KAAK,EACL,MAAM,E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E;KAC5B;IACD,wBAAwB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1D,qBAAqB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACvD,qBAAqB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACpD,uBAAuB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACzD,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC9C,qBAAqB,EAAE;QACrB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;QAC7C,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;IACD,yBAAyB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC3D,sBAAsB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACxD,sBAAsB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACrD,wBAAwB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC3D,CAAC","sourcesContent":["import { useState } from 'react';\nimport { Meta, Story } from '@storybook/react';\n\nimport {\n DateInput,\n FieldGroup,\n Grid,\n Input,\n Select,\n Option,\n TextArea,\n FieldGroupProps\n} from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/FieldGroup',\n component: FieldGroup\n} as Meta;\n\ninterface FieldGroupStoryProps {\n firstGroupName?: string;\n firstGroupHeadingTag?: FieldGroupProps['headingTag'];\n showfirstGroupHeadingTag?: boolean;\n firstGroupCollapsible?: boolean;\n firstGroupDescription?: string;\n showFirstAdditionalInfo?: boolean;\n secondGroupName?: string;\n secondGroupHeadingTag?: FieldGroupProps['headingTag'];\n showsecondGroupHeadingTag?: boolean;\n secondGroupCollapsible?: boolean;\n secondGroupDescription?: string;\n showSecondAdditionalInfo?: boolean;\n}\n\nexport const FieldGroupDemo: Story<FieldGroupStoryProps> = (args: FieldGroupStoryProps) => {\n const [firstGroupCollapsed, setFirstGroupCollapsed] = useState(false);\n const [secondGroupCollapsed, setSecondGroupCollapsed] = useState(false);\n return (\n <Grid container={{ rowGap: 2 }}>\n <FieldGroup\n name={args.firstGroupName}\n headingTag={args.showfirstGroupHeadingTag ? args.firstGroupHeadingTag : undefined}\n description={args.firstGroupDescription}\n collapsed={args.firstGroupCollapsible ? firstGroupCollapsed : undefined}\n onToggleCollapsed={\n args.firstGroupCollapsible\n ? () => {\n setFirstGroupCollapsed(state => !state);\n }\n : undefined\n }\n additionalInfo={\n args.showFirstAdditionalInfo\n ? { heading: 'Additional Info', content: 'This is a field group' }\n : undefined\n }\n >\n <Grid container={{ gap: 1, cols: 'repeat(auto-fit, minmax(min(40ch, 100%), 1fr))' }}>\n <Input type='text' label='Text 1' />\n <Select label='Select 1'>\n <Option value='A'>Option 1A</Option>\n <Option value='B'>Option 1B</Option>\n </Select>\n <DateInput label='Date 1' />\n <Grid item={{ colStart: '1', colEnd: '-1' }}>\n <TextArea label='TextArea 1' />\n </Grid>\n <Input required type='text' label='Required 1' />\n <Input disabled type='text' label='Disabled 1' />\n </Grid>\n </FieldGroup>\n <FieldGroup\n name={args.secondGroupName}\n headingTag={args.showsecondGroupHeadingTag ? args.secondGroupHeadingTag : undefined}\n description={args.secondGroupDescription}\n collapsed={args.secondGroupCollapsible ? secondGroupCollapsed : undefined}\n onToggleCollapsed={\n args.secondGroupCollapsible\n ? () => {\n setSecondGroupCollapsed(state => !state);\n }\n : undefined\n }\n additionalInfo={\n args.showSecondAdditionalInfo\n ? { heading: 'Additional Info', content: 'This is another field group' }\n : undefined\n }\n >\n <Grid container={{ gap: 1, cols: 'repeat(auto-fill, minmax(min(40ch, 100%), 1fr))' }}>\n <Input type='text' label='Text 2' />\n <Select label='Select 2'>\n <Option value='A'>Option 2A</Option>\n <Option value='B'>Option 2B</Option>\n </Select>\n <DateInput label='Date 2' />\n <Grid item={{ colStart: '1', colEnd: '-1' }}>\n <TextArea label='TextArea 2' />\n </Grid>\n <Input required type='text' label='Required 2' />\n <Input disabled type='text' label='Disabled 2' />\n </Grid>\n </FieldGroup>\n </Grid>\n );\n};\n\nFieldGroupDemo.args = {\n firstGroupName: 'Field group 1',\n firstGroupHeadingTag: undefined,\n showfirstGroupHeadingTag: true,\n firstGroupCollapsible: true,\n firstGroupDescription: '',\n showFirstAdditionalInfo: true,\n secondGroupName: 'Field group 2',\n secondGroupHeadingTag: undefined,\n showsecondGroupHeadingTag: true,\n secondGroupCollapsible: true,\n secondGroupDescription: '',\n showSecondAdditionalInfo: true\n};\n\nFieldGroupDemo.argTypes = {\n firstGroupName: { control: { type: 'text' } },\n firstGroupHeadingTag: {\n options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n control: { type: 'select' }\n },\n showfirstGroupHeadingTag: { control: { type: 'boolean' } },\n firstGroupCollapsible: { control: { type: 'boolean' } },\n firstGroupDescription: { control: { type: 'text' } },\n showFirstAdditionalInfo: { control: { type: 'boolean' } },\n secondGroupName: { control: { type: 'text' } },\n secondGroupHeadingTag: {\n options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n control: { type: 'select' }\n },\n showsecondGroupHeadingTag: { control: { type: 'boolean' } },\n secondGroupCollapsible: { control: { type: 'boolean' } },\n secondGroupDescription: { control: { type: 'text' } },\n showSecondAdditionalInfo: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroupList.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroupList.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,uBAAuB,EAMxB,MAAM,yBAAyB,CAAC;AAEjC,
|
|
1
|
+
{"version":3,"file":"FieldGroupList.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroupList.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,uBAAuB,EAMxB,MAAM,yBAAyB,CAAC;AAEjC,KAAK,wBAAwB,GACzB;IACE,MAAM,EAAE,KAAK,CAAC;CACf,GACD;IACE,MAAM,EAAE,QAAQ,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEN,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;CACxD;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,cAChB,SAAS,yBAAyB,SAAS,KAAK,WAAW,GAAG,IAAI,aAErE,uBAAuB,EAAE,WACvB,wBAAwB,KAChC,uBAAuB,EAyBzB,CAAC;AAEJ,eAAO,MAAM,iBAAiB,oBAAqB,SAAS,uBAM3D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,SAQ3B,CAAC;AAEF,eAAO,MAAM,qBAAqB,oBAAqB,SAAS,uBAmC/D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,SAQ/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,oBAAqB,SAAS,uBAoBhE,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,SAOhC,CAAC"}
|
|
@@ -8,6 +8,7 @@ export const fieldGroupReducer = (groupMeta, FieldRenderer) => (items, payload)
|
|
|
8
8
|
...items,
|
|
9
9
|
{
|
|
10
10
|
name: `${groupMeta.label} ${items.length + 1}`,
|
|
11
|
+
headingTag: 'h3',
|
|
11
12
|
id: createUID(),
|
|
12
13
|
children: groupMeta.fields.map(props => _createElement(FieldRenderer, { ...props, key: props.label }))
|
|
13
14
|
}
|
|
@@ -15,7 +16,11 @@ export const fieldGroupReducer = (groupMeta, FieldRenderer) => (items, payload)
|
|
|
15
16
|
case 'delete':
|
|
16
17
|
return items
|
|
17
18
|
.filter(group => group.id !== payload.id)
|
|
18
|
-
.map((group, i) => ({
|
|
19
|
+
.map((group, i) => ({
|
|
20
|
+
...group,
|
|
21
|
+
name: `${groupMeta.label} ${i + 1}`,
|
|
22
|
+
headingTag: 'h3'
|
|
23
|
+
}));
|
|
19
24
|
default:
|
|
20
25
|
return items;
|
|
21
26
|
}
|