@pega/cosmos-react-demos 3.0.0-dev.1.0 → 3.0.0-dev.4.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/DynamicContentEditor/DynamicContentEditor.stories.d.ts +9 -0
- package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -0
- package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx +79 -0
- package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx.map +1 -0
- package/jsx/build/DynamicContentEditor/FieldSelector.d.ts +11 -0
- package/jsx/build/DynamicContentEditor/FieldSelector.d.ts.map +1 -0
- package/jsx/build/DynamicContentEditor/FieldSelector.jsx +80 -0
- package/jsx/build/DynamicContentEditor/FieldSelector.jsx.map +1 -0
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts +16 -0
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -0
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.js +136 -0
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.js.map +1 -0
- package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts +14 -0
- package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -0
- package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx +312 -0
- package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx.map +1 -0
- package/jsx/build/ObjectSelect/ObjectSelect.styles.d.ts +4 -0
- package/jsx/build/ObjectSelect/ObjectSelect.styles.d.ts.map +1 -0
- package/jsx/build/ObjectSelect/ObjectSelect.styles.js +27 -0
- package/jsx/build/ObjectSelect/ObjectSelect.styles.js.map +1 -0
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx +6 -10
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -1
- package/jsx/build/Workbench/Workbench.stories.jsx +13 -18
- package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.d.ts +6 -0
- package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.jsx +28 -2
- package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/core/Avatar/Avatar.stories.d.ts +5 -0
- package/jsx/core/Avatar/Avatar.stories.d.ts.map +1 -1
- package/jsx/core/Avatar/Avatar.stories.jsx +27 -2
- package/jsx/core/Avatar/Avatar.stories.jsx.map +1 -1
- package/jsx/core/Badges/Status.stories.d.ts +5 -0
- package/jsx/core/Badges/Status.stories.d.ts.map +1 -1
- package/jsx/core/Badges/Status.stories.jsx +25 -1
- package/jsx/core/Badges/Status.stories.jsx.map +1 -1
- package/jsx/core/Banner/Banner.stories.d.ts +5 -1
- package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
- package/jsx/core/Banner/Banner.stories.jsx +24 -3
- package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
- package/jsx/core/Button/Button.stories.d.ts +8 -0
- package/jsx/core/Button/Button.stories.d.ts.map +1 -1
- package/jsx/core/Button/Button.stories.jsx +30 -1
- package/jsx/core/Button/Button.stories.jsx.map +1 -1
- package/jsx/core/Card/Card.stories.d.ts +5 -0
- package/jsx/core/Card/Card.stories.d.ts.map +1 -1
- package/jsx/core/Card/Card.stories.jsx +30 -1
- package/jsx/core/Card/Card.stories.jsx.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.d.ts +12 -0
- package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx +54 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
- package/jsx/core/Configuration/Configuration.stories.d.ts +17 -0
- package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -1
- package/jsx/core/Configuration/Configuration.stories.jsx +94 -3
- package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
- package/jsx/core/Currency/Currency.stories.d.ts +5 -2
- package/jsx/core/Currency/Currency.stories.d.ts.map +1 -1
- package/jsx/core/Currency/Currency.stories.jsx +30 -12
- package/jsx/core/Currency/Currency.stories.jsx.map +1 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts +2 -0
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx +8 -4
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx.map +1 -1
- package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -1
- package/jsx/core/File/FileDisplay.stories.jsx +16 -38
- package/jsx/core/File/FileDisplay.stories.jsx.map +1 -1
- package/jsx/core/File/FileInput.stories.d.ts.map +1 -1
- package/jsx/core/File/FileInput.stories.jsx +1 -1
- package/jsx/core/File/FileInput.stories.jsx.map +1 -1
- package/jsx/core/Form/Form.mocks.d.ts.map +1 -1
- package/jsx/core/Form/Form.mocks.jsx +2 -2
- package/jsx/core/Form/Form.mocks.jsx.map +1 -1
- package/jsx/core/Form/Form.stories.d.ts +10 -0
- package/jsx/core/Form/Form.stories.d.ts.map +1 -1
- package/jsx/core/Form/Form.stories.jsx +42 -2
- package/jsx/core/Form/Form.stories.jsx.map +1 -1
- package/jsx/core/HTML/HTML.stories.d.ts +6 -0
- package/jsx/core/HTML/HTML.stories.d.ts.map +1 -0
- package/jsx/core/HTML/HTML.stories.jsx +13 -0
- package/jsx/core/HTML/HTML.stories.jsx.map +1 -0
- package/jsx/core/Input/Input.stories.d.ts +9 -0
- package/jsx/core/Input/Input.stories.d.ts.map +1 -1
- package/jsx/core/Input/Input.stories.jsx +40 -1
- package/jsx/core/Input/Input.stories.jsx.map +1 -1
- package/jsx/core/Label/Label.stories.d.ts +4 -0
- package/jsx/core/Label/Label.stories.d.ts.map +1 -1
- package/jsx/core/Label/Label.stories.jsx +18 -1
- package/jsx/core/Label/Label.stories.jsx.map +1 -1
- package/jsx/core/Modal/Modal.mocks.d.ts.map +1 -1
- package/jsx/core/Modal/Modal.mocks.jsx +3 -3
- package/jsx/core/Modal/Modal.mocks.jsx.map +1 -1
- package/jsx/core/Modal/Modal.stories.d.ts.map +1 -1
- package/jsx/core/Modal/Modal.stories.jsx +29 -43
- package/jsx/core/Modal/Modal.stories.jsx.map +1 -1
- package/jsx/core/Number/Number.stories.d.ts +3 -3
- package/jsx/core/Number/Number.stories.d.ts.map +1 -1
- package/jsx/core/Number/Number.stories.jsx +14 -13
- package/jsx/core/Number/Number.stories.jsx.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +5 -3
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx +106 -30
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/core/Progress/Progress.stories.d.ts +4 -0
- package/jsx/core/Progress/Progress.stories.d.ts.map +1 -1
- package/jsx/core/Progress/Progress.stories.jsx +22 -1
- package/jsx/core/Progress/Progress.stories.jsx.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.d.ts +12 -0
- package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx +53 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
- package/jsx/core/Rating/Rating.stories.d.ts +4 -0
- package/jsx/core/Rating/Rating.stories.d.ts.map +1 -1
- package/jsx/core/Rating/Rating.stories.jsx +18 -1
- package/jsx/core/Rating/Rating.stories.jsx.map +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.d.ts +4 -0
- package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx +18 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx.map +1 -1
- package/jsx/core/Select/Select.stories.d.ts +8 -0
- package/jsx/core/Select/Select.stories.d.ts.map +1 -1
- package/jsx/core/Select/Select.stories.jsx +35 -1
- package/jsx/core/Select/Select.stories.jsx.map +1 -1
- package/jsx/core/Sentiment/Sentiment.stories.d.ts +6 -0
- package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
- package/jsx/core/Sentiment/Sentiment.stories.jsx +32 -1
- package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -1
- package/jsx/core/Switch/Switch.stories.d.ts +7 -0
- package/jsx/core/Switch/Switch.stories.d.ts.map +1 -1
- package/jsx/core/Switch/Switch.stories.jsx +34 -1
- package/jsx/core/Switch/Switch.stories.jsx.map +1 -1
- package/jsx/core/Table/Table.mocks.d.ts +6 -0
- package/jsx/core/Table/Table.mocks.d.ts.map +1 -1
- package/jsx/core/Table/Table.mocks.jsx +134 -0
- package/jsx/core/Table/Table.mocks.jsx.map +1 -1
- package/jsx/core/Table/Table.stories.d.ts +25 -0
- package/jsx/core/Table/Table.stories.d.ts.map +1 -1
- package/jsx/core/Table/Table.stories.jsx +120 -1
- package/jsx/core/Table/Table.stories.jsx.map +1 -1
- package/jsx/core/Tabs/Tabs.stories.d.ts +5 -0
- package/jsx/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/jsx/core/Tabs/Tabs.stories.jsx +39 -1
- package/jsx/core/Tabs/Tabs.stories.jsx.map +1 -1
- package/jsx/core/Text/Text.stories.d.ts +19 -0
- package/jsx/core/Text/Text.stories.d.ts.map +1 -1
- package/jsx/core/Text/Text.stories.jsx +112 -1
- package/jsx/core/Text/Text.stories.jsx.map +1 -1
- package/jsx/core/TextArea/TextArea.stories.d.ts +5 -0
- package/jsx/core/TextArea/TextArea.stories.d.ts.map +1 -1
- package/jsx/core/TextArea/TextArea.stories.jsx +22 -1
- package/jsx/core/TextArea/TextArea.stories.jsx.map +1 -1
- package/jsx/core/Toaster/Toaster.stories.jsx +17 -12
- package/jsx/core/Toaster/Toaster.stories.jsx.map +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.d.ts +6 -0
- package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx +28 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx.map +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.jsx +10 -10
- package/jsx/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -1
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +8 -8
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +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/rte/Editor/Editor.stories.jsx +2 -2
- package/jsx/rte/Editor/Editor.stories.jsx.map +1 -1
- package/jsx/social/Email/Email.mocks.d.ts +19 -2
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
- package/jsx/social/Email/Email.mocks.js +48 -1
- package/jsx/social/Email/Email.mocks.js.map +1 -1
- package/jsx/social/Email/Email.stories.d.ts +1 -1
- package/jsx/social/Email/Email.stories.d.ts.map +1 -1
- package/jsx/social/Email/Email.stories.jsx +80 -15
- package/jsx/social/Email/Email.stories.jsx.map +1 -1
- package/jsx/social/Feed/Feed.stories.d.ts.map +1 -1
- package/jsx/social/Feed/Feed.stories.jsx +1 -1
- package/jsx/social/Feed/Feed.stories.jsx.map +1 -1
- package/jsx/work/CaseView/CaseView.mocks.d.ts.map +1 -1
- package/jsx/work/CaseView/CaseView.mocks.jsx +1 -1
- package/jsx/work/CaseView/CaseView.mocks.jsx.map +1 -1
- package/jsx/work/CaseView/CaseView.stories.d.ts.map +1 -1
- package/jsx/work/CaseView/CaseView.stories.jsx +7 -7
- package/jsx/work/CaseView/CaseView.stories.jsx.map +1 -1
- package/jsx/work/CaseView/Details.mocks.d.ts.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/Pulse.mocks.d.ts.map +1 -1
- package/jsx/work/CaseView/Pulse.mocks.jsx +1 -1
- package/jsx/work/CaseView/Pulse.mocks.jsx.map +1 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +1 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.jsx +2 -2
- package/jsx/work/Confirmation/Confirmation.stories.jsx.map +1 -1
- package/jsx/work/Details/Details.stories.d.ts.map +1 -1
- package/jsx/work/Details/Details.stories.jsx +21 -16
- package/jsx/work/Details/Details.stories.jsx.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.jsx +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +2 -2
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -1
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +9 -0
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -0
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js +63 -0
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js.map +1 -0
- package/lib/build/DynamicContentEditor/FieldSelector.d.ts +14 -0
- package/lib/build/DynamicContentEditor/FieldSelector.d.ts.map +1 -0
- package/lib/build/DynamicContentEditor/FieldSelector.js +81 -0
- package/lib/build/DynamicContentEditor/FieldSelector.js.map +1 -0
- package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts +16 -0
- package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -0
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js +136 -0
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js.map +1 -0
- package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts +14 -0
- package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -0
- package/lib/build/ObjectSelect/ObjectSelect.stories.js +247 -0
- package/lib/build/ObjectSelect/ObjectSelect.stories.js.map +1 -0
- package/lib/build/ObjectSelect/ObjectSelect.styles.d.ts +4 -0
- package/lib/build/ObjectSelect/ObjectSelect.styles.d.ts.map +1 -0
- package/lib/build/ObjectSelect/ObjectSelect.styles.js +27 -0
- package/lib/build/ObjectSelect/ObjectSelect.styles.js.map +1 -0
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.js +6 -6
- package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -1
- package/lib/build/Workbench/Workbench.stories.js +17 -22
- package/lib/build/Workbench/Workbench.stories.js.map +1 -1
- package/lib/core/AppShell/AppShell.stories.d.ts +6 -0
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.stories.js +26 -2
- package/lib/core/AppShell/AppShell.stories.js.map +1 -1
- package/lib/core/Avatar/Avatar.stories.d.ts +5 -0
- package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -1
- package/lib/core/Avatar/Avatar.stories.js +25 -2
- package/lib/core/Avatar/Avatar.stories.js.map +1 -1
- package/lib/core/Badges/Status.stories.d.ts +5 -0
- package/lib/core/Badges/Status.stories.d.ts.map +1 -1
- package/lib/core/Badges/Status.stories.js +23 -1
- package/lib/core/Badges/Status.stories.js.map +1 -1
- package/lib/core/Banner/Banner.stories.d.ts +5 -1
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
- package/lib/core/Banner/Banner.stories.js +20 -3
- package/lib/core/Banner/Banner.stories.js.map +1 -1
- package/lib/core/Button/Button.stories.d.ts +8 -0
- package/lib/core/Button/Button.stories.d.ts.map +1 -1
- package/lib/core/Button/Button.stories.js +28 -1
- package/lib/core/Button/Button.stories.js.map +1 -1
- package/lib/core/Card/Card.stories.d.ts +5 -0
- package/lib/core/Card/Card.stories.d.ts.map +1 -1
- package/lib/core/Card/Card.stories.js +19 -1
- package/lib/core/Card/Card.stories.js.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.d.ts +12 -0
- package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.js +52 -1
- package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
- package/lib/core/Configuration/Configuration.stories.d.ts +17 -0
- package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -1
- package/lib/core/Configuration/Configuration.stories.js +62 -3
- package/lib/core/Configuration/Configuration.stories.js.map +1 -1
- package/lib/core/Currency/Currency.stories.d.ts +5 -2
- package/lib/core/Currency/Currency.stories.d.ts.map +1 -1
- package/lib/core/Currency/Currency.stories.js +30 -12
- package/lib/core/Currency/Currency.stories.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts +2 -0
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.js +7 -3
- package/lib/core/FieldGroup/FieldGroup.stories.js.map +1 -1
- package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
- package/lib/core/File/FileDisplay.stories.js +17 -29
- package/lib/core/File/FileDisplay.stories.js.map +1 -1
- package/lib/core/File/FileInput.stories.d.ts.map +1 -1
- package/lib/core/File/FileInput.stories.js +1 -1
- package/lib/core/File/FileInput.stories.js.map +1 -1
- package/lib/core/Form/Form.mocks.d.ts.map +1 -1
- package/lib/core/Form/Form.mocks.js +2 -2
- package/lib/core/Form/Form.mocks.js.map +1 -1
- package/lib/core/Form/Form.stories.d.ts +10 -0
- package/lib/core/Form/Form.stories.d.ts.map +1 -1
- package/lib/core/Form/Form.stories.js +40 -2
- package/lib/core/Form/Form.stories.js.map +1 -1
- package/lib/core/HTML/HTML.stories.d.ts +6 -0
- package/lib/core/HTML/HTML.stories.d.ts.map +1 -0
- package/lib/core/HTML/HTML.stories.js +14 -0
- package/lib/core/HTML/HTML.stories.js.map +1 -0
- package/lib/core/Input/Input.stories.d.ts +9 -0
- package/lib/core/Input/Input.stories.d.ts.map +1 -1
- package/lib/core/Input/Input.stories.js +38 -1
- package/lib/core/Input/Input.stories.js.map +1 -1
- package/lib/core/Label/Label.stories.d.ts +4 -0
- package/lib/core/Label/Label.stories.d.ts.map +1 -1
- package/lib/core/Label/Label.stories.js +16 -1
- package/lib/core/Label/Label.stories.js.map +1 -1
- package/lib/core/Modal/Modal.mocks.d.ts.map +1 -1
- package/lib/core/Modal/Modal.mocks.js +3 -3
- package/lib/core/Modal/Modal.mocks.js.map +1 -1
- package/lib/core/Modal/Modal.stories.d.ts.map +1 -1
- package/lib/core/Modal/Modal.stories.js +14 -14
- package/lib/core/Modal/Modal.stories.js.map +1 -1
- package/lib/core/Number/Number.stories.d.ts +3 -3
- package/lib/core/Number/Number.stories.d.ts.map +1 -1
- package/lib/core/Number/Number.stories.js +14 -13
- package/lib/core/Number/Number.stories.js.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts +5 -3
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.js +95 -27
- package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/core/Progress/Progress.stories.d.ts +4 -0
- package/lib/core/Progress/Progress.stories.d.ts.map +1 -1
- package/lib/core/Progress/Progress.stories.js +18 -1
- package/lib/core/Progress/Progress.stories.js.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.d.ts +12 -0
- package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.js +51 -1
- package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
- package/lib/core/Rating/Rating.stories.d.ts +4 -0
- package/lib/core/Rating/Rating.stories.d.ts.map +1 -1
- package/lib/core/Rating/Rating.stories.js +16 -1
- package/lib/core/Rating/Rating.stories.js.map +1 -1
- package/lib/core/SearchInput/SearchInput.stories.d.ts +4 -0
- package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/lib/core/SearchInput/SearchInput.stories.js +16 -1
- package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
- package/lib/core/Select/Select.stories.d.ts +8 -0
- package/lib/core/Select/Select.stories.d.ts.map +1 -1
- package/lib/core/Select/Select.stories.js +28 -1
- package/lib/core/Select/Select.stories.js.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.d.ts +6 -0
- package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.js +29 -2
- package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
- package/lib/core/Switch/Switch.stories.d.ts +7 -0
- package/lib/core/Switch/Switch.stories.d.ts.map +1 -1
- package/lib/core/Switch/Switch.stories.js +32 -1
- package/lib/core/Switch/Switch.stories.js.map +1 -1
- package/lib/core/Table/Table.mocks.d.ts +6 -0
- package/lib/core/Table/Table.mocks.d.ts.map +1 -1
- package/lib/core/Table/Table.mocks.js +134 -0
- package/lib/core/Table/Table.mocks.js.map +1 -1
- package/lib/core/Table/Table.stories.d.ts +25 -0
- package/lib/core/Table/Table.stories.d.ts.map +1 -1
- package/lib/core/Table/Table.stories.js +113 -1
- package/lib/core/Table/Table.stories.js.map +1 -1
- package/lib/core/Tabs/Tabs.stories.d.ts +5 -0
- package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/lib/core/Tabs/Tabs.stories.js +30 -1
- package/lib/core/Tabs/Tabs.stories.js.map +1 -1
- package/lib/core/Text/Text.stories.d.ts +19 -0
- package/lib/core/Text/Text.stories.d.ts.map +1 -1
- package/lib/core/Text/Text.stories.js +102 -2
- package/lib/core/Text/Text.stories.js.map +1 -1
- package/lib/core/TextArea/TextArea.stories.d.ts +5 -0
- package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -1
- package/lib/core/TextArea/TextArea.stories.js +20 -1
- package/lib/core/TextArea/TextArea.stories.js.map +1 -1
- package/lib/core/Toaster/Toaster.stories.js +15 -19
- package/lib/core/Toaster/Toaster.stories.js.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.d.ts +6 -0
- package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.js +20 -1
- package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.d.ts +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.js +10 -10
- package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +8 -8
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.js +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
- package/lib/rte/Editor/Editor.stories.js +2 -2
- package/lib/rte/Editor/Editor.stories.js.map +1 -1
- package/lib/social/Email/Email.mocks.d.ts +19 -2
- package/lib/social/Email/Email.mocks.d.ts.map +1 -1
- package/lib/social/Email/Email.mocks.js +48 -1
- package/lib/social/Email/Email.mocks.js.map +1 -1
- package/lib/social/Email/Email.stories.d.ts +1 -1
- package/lib/social/Email/Email.stories.d.ts.map +1 -1
- package/lib/social/Email/Email.stories.js +63 -15
- package/lib/social/Email/Email.stories.js.map +1 -1
- package/lib/social/Feed/Feed.stories.d.ts.map +1 -1
- package/lib/social/Feed/Feed.stories.js +1 -1
- package/lib/social/Feed/Feed.stories.js.map +1 -1
- package/lib/work/CaseView/CaseView.mocks.d.ts.map +1 -1
- package/lib/work/CaseView/CaseView.mocks.js +1 -1
- package/lib/work/CaseView/CaseView.mocks.js.map +1 -1
- package/lib/work/CaseView/CaseView.stories.d.ts.map +1 -1
- package/lib/work/CaseView/CaseView.stories.js +7 -7
- package/lib/work/CaseView/CaseView.stories.js.map +1 -1
- package/lib/work/CaseView/Details.mocks.d.ts.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/Pulse.mocks.d.ts.map +1 -1
- package/lib/work/CaseView/Pulse.mocks.js +1 -1
- package/lib/work/CaseView/Pulse.mocks.js.map +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js.map +1 -1
- package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
- package/lib/work/Confirmation/Confirmation.stories.js +2 -2
- package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
- package/lib/work/Details/Details.stories.d.ts.map +1 -1
- package/lib/work/Details/Details.stories.js +56 -53
- package/lib/work/Details/Details.stories.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.mocks.js +2 -2
- package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -1
- package/package.json +16 -16
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, Flex, Icon, registerIcon } from '@pega/cosmos-react-core';
|
|
2
|
+
import { Button, Configuration, Flex, Icon, registerIcon } from '@pega/cosmos-react-core';
|
|
3
3
|
import * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';
|
|
4
4
|
import BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';
|
|
5
5
|
registerIcon(plusIcon);
|
|
@@ -61,4 +61,31 @@ BareButtonDemo.argTypes = {
|
|
|
61
61
|
disabled: { control: { type: 'boolean' } },
|
|
62
62
|
href: { control: { type: 'text' } }
|
|
63
63
|
};
|
|
64
|
+
export const ConfigurableButton = (args) => {
|
|
65
|
+
return (_jsx(Configuration, { theme: {
|
|
66
|
+
components: {
|
|
67
|
+
button: {
|
|
68
|
+
'border-width': args.borderWidth,
|
|
69
|
+
'border-radius': args.borderRadius,
|
|
70
|
+
color: args.color,
|
|
71
|
+
'secondary-color': args.secondaryColor,
|
|
72
|
+
padding: args.padding
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}, children: _jsx(Button, { children: "Configurable Button" }, void 0) }, void 0));
|
|
76
|
+
};
|
|
77
|
+
ConfigurableButton.args = {
|
|
78
|
+
borderWidth: '0.0625rem',
|
|
79
|
+
borderRadius: 9999,
|
|
80
|
+
color: '#076bc9',
|
|
81
|
+
secondaryColor: '#ffffff',
|
|
82
|
+
padding: '0rem 1rem'
|
|
83
|
+
};
|
|
84
|
+
ConfigurableButton.argTypes = {
|
|
85
|
+
borderWidth: { control: { type: 'text' } },
|
|
86
|
+
borderRadius: { control: { type: 'number' } },
|
|
87
|
+
color: { control: { type: 'color' } },
|
|
88
|
+
secondaryColor: { control: { type: 'color' } },
|
|
89
|
+
padding: { control: { type: 'text' } }
|
|
90
|
+
};
|
|
64
91
|
//# sourceMappingURL=Button.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.js","sourceRoot":"","sources":["../../../src/core/Button/Button.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"Button.stories.js","sourceRoot":"","sources":["../../../src/core/Button/Button.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,MAAM,EAEN,aAAa,EACb,IAAI,EACJ,IAAI,EACJ,YAAY,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AACxF,OAAO,UAAU,MAAM,0DAA0D,CAAC;AAElF,YAAY,CAAC,QAAQ,CAAC,CAAC;AAEvB,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,cAAc,GAAuB,CAAC,IAAiB,EAAE,EAAE;IACtE,OAAO,CACL,KAAC,MAAM,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,iCAE3C,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,IAAI,GAAG;IACpB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,KAAK;CACf,CAAC;AAEF,cAAc,CAAC,QAAQ,GAAG;IACxB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;QAC3D,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;IACD,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,OAAO,CAC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;IACrC,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC9C,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport {\n Button,\n ButtonProps,\n Configuration,\n Flex,\n Icon,\n registerIcon\n} from '@pega/cosmos-react-core';\nimport * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\n\nregisterIcon(plusIcon);\n\nexport default {\n title: 'Core/Button',\n component: Button,\n parameters: {\n layout: 'centered'\n }\n} as Meta;\n\nexport const ButtonVariants: Story<ButtonProps> = (args: ButtonProps) => {\n return (\n <Button variant={args.variant} compact={args.compact}>\n Click me\n </Button>\n );\n};\n\nButtonVariants.args = {\n variant: 'primary',\n compact: false\n};\n\nButtonVariants.argTypes = {\n variant: {\n options: ['primary', 'secondary', 'simple', 'link', 'text'],\n control: { type: 'select' }\n },\n compact: { control: { type: 'boolean' } }\n};\n\nexport const DisabledButtons = () => {\n return (\n <>\n <Button variant='primary' disabled>\n Primary disabled\n </Button>\n <Button variant='secondary' disabled>\n Secondary disabled\n </Button>\n <Button variant='simple' disabled>\n Simple disabled\n </Button>\n <Button variant='link' disabled>\n Link disabled\n </Button>\n <Button variant='text' disabled>\n Text disabled\n </Button>\n </>\n );\n};\n\nexport const IconButtons: Story<ButtonProps> = ({ compact }: ButtonProps) => {\n return (\n <Flex container={{ alignItems: 'center' }}>\n <Button variant='primary' label='Icon button primary' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='secondary' label='Icon button secondary' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='simple' label='Icon button simple' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='link' label='Icon button link' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='text' label='Icon button text' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n </Flex>\n );\n};\n\nIconButtons.args = {\n compact: false\n};\n\nIconButtons.argTypes = {\n compact: { control: { type: 'boolean' } }\n};\n\nexport const LoadingButtons: Story<ButtonProps> = (args: ButtonProps) => {\n return (\n <Button variant={args.variant} icon={args.icon} label='Loading' loading>\n {args.icon ? <Icon name='plus' /> : 'Loading'}\n </Button>\n );\n};\n\nLoadingButtons.args = {\n variant: 'primary',\n icon: false\n};\n\nLoadingButtons.argTypes = {\n variant: { options: ['primary', 'secondary'], control: { type: 'select' } },\n icon: { control: { type: 'boolean' } }\n};\n\nexport const ButtonAsLink = () => {\n return (\n <Button variant='primary' href='https://www.pega.com' target='_blank'>\n Go to pega.com\n </Button>\n );\n};\n\nexport const BareButtonDemo: Story<ButtonProps> = (args: ButtonProps) => {\n return (\n <BareButton disabled={args.disabled} href={args.href || undefined}>\n Click me\n </BareButton>\n );\n};\n\nBareButtonDemo.args = {\n disabled: false,\n href: ''\n};\n\nBareButtonDemo.argTypes = {\n disabled: { control: { type: 'boolean' } },\n href: { control: { type: 'text' } }\n};\n\ninterface ConfigurableButtonProps {\n borderWidth?: string;\n borderRadius?: number;\n color?: string;\n secondaryColor?: string;\n padding?: string;\n}\n\nexport const ConfigurableButton: Story<ConfigurableButtonProps> = (\n args: ConfigurableButtonProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n button: {\n 'border-width': args.borderWidth,\n 'border-radius': args.borderRadius,\n color: args.color,\n 'secondary-color': args.secondaryColor,\n padding: args.padding\n }\n }\n }}\n >\n <Button>Configurable Button</Button>\n </Configuration>\n );\n};\n\nConfigurableButton.args = {\n borderWidth: '0.0625rem',\n borderRadius: 9999,\n color: '#076bc9',\n secondaryColor: '#ffffff',\n padding: '0rem 1rem'\n};\n\nConfigurableButton.argTypes = {\n borderWidth: { control: { type: 'text' } },\n borderRadius: { control: { type: 'number' } },\n color: { control: { type: 'color' } },\n secondaryColor: { control: { type: 'color' } },\n padding: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -5,4 +5,9 @@ declare const _default: Meta<import("@storybook/react").Args>;
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const SimpleCard: () => JSX.Element;
|
|
7
7
|
export declare const FullCard: Story<CardFooterProps>;
|
|
8
|
+
interface ConfigurableCardProps {
|
|
9
|
+
borderRadius?: string;
|
|
10
|
+
background?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const ConfigurableCard: Story<ConfigurableCardProps>;
|
|
8
13
|
//# sourceMappingURL=Card.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Card/Card.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAML,eAAe,
|
|
1
|
+
{"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Card/Card.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAML,eAAe,EAKhB,MAAM,yBAAyB,CAAC;;AAIjC,wBAMU;AAEV,eAAO,MAAM,UAAU,mBAatB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,eAAe,CAwC3C,CAAC;AAaF,UAAU,qBAAqB;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,qBAAqB,CAwBzD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Card, CardHeader, CardMedia, CardContent, CardFooter, Image, MenuButton, Text } from '@pega/cosmos-react-core';
|
|
2
|
+
import { Card, CardHeader, CardMedia, CardContent, CardFooter, Image, MenuButton, Text, Configuration } from '@pega/cosmos-react-core';
|
|
3
3
|
import { StyledCard } from './Card.styles';
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Core/Card',
|
|
@@ -29,4 +29,22 @@ FullCard.argTypes = {
|
|
|
29
29
|
control: { type: 'select' }
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
+
export const ConfigurableCard = (args) => {
|
|
33
|
+
return (_jsx(Configuration, { theme: {
|
|
34
|
+
components: {
|
|
35
|
+
card: {
|
|
36
|
+
'border-radius': args.borderRadius,
|
|
37
|
+
background: args.background
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}, children: _jsxs(Card, { as: StyledCard, children: [_jsx(CardHeader, { children: _jsx(Text, { variant: 'h2', children: "Simple Card" }, void 0) }, void 0), _jsx(CardContent, { 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." }, void 0)] }, void 0) }, void 0));
|
|
41
|
+
};
|
|
42
|
+
ConfigurableCard.args = {
|
|
43
|
+
borderRadius: '0.5rem',
|
|
44
|
+
background: '#71baff'
|
|
45
|
+
};
|
|
46
|
+
ConfigurableCard.argTypes = {
|
|
47
|
+
borderRadius: { control: { type: 'text' } },
|
|
48
|
+
background: { control: { type: 'color' } }
|
|
49
|
+
};
|
|
32
50
|
//# sourceMappingURL=Card.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.stories.js","sourceRoot":"","sources":["../../../src/core/Card/Card.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,EAEV,KAAK,EACL,UAAU,EACV,IAAI,
|
|
1
|
+
{"version":3,"file":"Card.stories.js","sourceRoot":"","sources":["../../../src/core/Card/Card.stories.tsx"],"names":[],"m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\n CardFooterProps,\n Image,\n MenuButton,\n Text,\n Configuration\n} from '@pega/cosmos-react-core';\n\nimport { StyledCard } from './Card.styles';\n\nexport default {\n title: 'Core/Card',\n component: Card,\n parameters: {\n layout: 'centered'\n }\n} as Meta;\n\nexport const SimpleCard = () => {\n return (\n <Card as={StyledCard}>\n <CardHeader>\n <Text variant='h2'>Simple Card</Text>\n </CardHeader>\n <CardContent>\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.\n </CardContent>\n </Card>\n );\n};\n\nexport const FullCard: Story<CardFooterProps> = (args: CardFooterProps) => {\n return (\n <Card as={StyledCard}>\n <CardMedia>\n <Image\n src='https://www.pega.com/sites/default/files/default-og.jpg'\n height='100'\n alt='Media'\n />\n </CardMedia>\n <CardHeader\n actions={\n <MenuButton\n portal\n variant='simple'\n text='Card actions'\n icon='more'\n iconOnly\n menu={{\n items: [\n { id: 'action-1', primary: 'Card action 1' },\n { id: 'action-2', primary: 'Card action 2' },\n { id: 'action-3', primary: 'Card action 3' }\n ]\n }}\n />\n }\n >\n <Text variant='h2'>Full Card</Text>\n </CardHeader>\n <CardContent>\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.\n </CardContent>\n <CardFooter justify={args.justify}>\n <Text variant='secondary'>This is the CardFooter</Text>\n </CardFooter>\n </Card>\n );\n};\n\nFullCard.args = {\n justify: 'start'\n};\n\nFullCard.argTypes = {\n justify: {\n options: ['start', 'end', 'center', 'between', 'around', 'evenly'],\n control: { type: 'select' }\n }\n};\n\ninterface ConfigurableCardProps {\n borderRadius?: string;\n background?: string;\n}\n\nexport const ConfigurableCard: Story<ConfigurableCardProps> = (args: ConfigurableCardProps) => {\n return (\n <Configuration\n theme={{\n components: {\n card: {\n 'border-radius': args.borderRadius,\n background: args.background\n }\n }\n }}\n >\n <Card as={StyledCard}>\n <CardHeader>\n <Text variant='h2'>Simple Card</Text>\n </CardHeader>\n <CardContent>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt\n ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation\n ullamco laboris nisi ut aliquip ex ea commodo consequat.\n </CardContent>\n </Card>\n </Configuration>\n );\n};\n\nConfigurableCard.args = {\n borderRadius: '0.5rem',\n background: '#71baff'\n};\n\nConfigurableCard.argTypes = {\n borderRadius: { control: { type: 'text' } },\n background: { control: { type: 'color' } }\n};\n"]}
|
|
@@ -4,4 +4,16 @@ declare const _default: Meta<import("@storybook/react").Args>;
|
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const DefaultCheckbox: Story<RadioCheckProps>;
|
|
6
6
|
export declare const CheckboxCard: Story<RadioCheckProps>;
|
|
7
|
+
interface ConfigurableCheckboxProps extends RadioCheckProps {
|
|
8
|
+
size?: string;
|
|
9
|
+
backgroundColor?: string;
|
|
10
|
+
borderColor?: string;
|
|
11
|
+
borderWidth?: string;
|
|
12
|
+
borderRadius?: string;
|
|
13
|
+
labelColor?: string;
|
|
14
|
+
labelFontWeight?: string;
|
|
15
|
+
checkedBackgroundColor?: string;
|
|
16
|
+
checkedBorderColor?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const ConfigurableCheckbox: Story<ConfigurableCheckboxProps>;
|
|
7
19
|
//# sourceMappingURL=Checkbox.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,
|
|
1
|
+
{"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA2B,eAAe,EAAE,MAAM,yBAAyB,CAAC;;AAEnF,wBAmBU;AAEV,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,eAAe,CAWlD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,eAAe,CAY/C,CAAC;AAEF,UAAU,yBAA0B,SAAQ,eAAe;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,yBAAyB,CA8BjE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Checkbox } from '@pega/cosmos-react-core';
|
|
2
|
+
import { Checkbox, Configuration } from '@pega/cosmos-react-core';
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Core/Checkbox',
|
|
5
5
|
component: Checkbox,
|
|
@@ -26,4 +26,55 @@ export const DefaultCheckbox = (args) => {
|
|
|
26
26
|
export const CheckboxCard = (args) => {
|
|
27
27
|
return (_jsx(Checkbox, { variant: 'card', status: args.status, label: args.label, required: args.required, disabled: args.disabled, readOnly: args.readOnly, indeterminate: args.indeterminate }, void 0));
|
|
28
28
|
};
|
|
29
|
+
export const ConfigurableCheckbox = (args) => {
|
|
30
|
+
return (_jsx(Configuration, { theme: {
|
|
31
|
+
components: {
|
|
32
|
+
checkbox: {
|
|
33
|
+
'border-radius': args.borderRadius
|
|
34
|
+
},
|
|
35
|
+
'radio-check': {
|
|
36
|
+
'border-color': args.borderColor,
|
|
37
|
+
'border-width': args.borderWidth,
|
|
38
|
+
'background-color': args.backgroundColor,
|
|
39
|
+
label: {
|
|
40
|
+
color: args.labelColor,
|
|
41
|
+
'font-weight': args.labelFontWeight
|
|
42
|
+
},
|
|
43
|
+
size: args.size,
|
|
44
|
+
':checked': {
|
|
45
|
+
'background-color': args.checkedBackgroundColor,
|
|
46
|
+
'border-color': args.checkedBorderColor
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}, children: _jsx(Checkbox, { label: 'Configurable Checkbox' }, void 0) }, void 0));
|
|
51
|
+
};
|
|
52
|
+
ConfigurableCheckbox.args = {
|
|
53
|
+
size: '1.25rem',
|
|
54
|
+
backgroundColor: '#ffffff',
|
|
55
|
+
borderColor: '#939393',
|
|
56
|
+
borderWidth: '0.0625rem',
|
|
57
|
+
borderRadius: '0.5',
|
|
58
|
+
labelColor: '#939393',
|
|
59
|
+
labelFontWeight: '400',
|
|
60
|
+
checkedBackgroundColor: '#076bc9',
|
|
61
|
+
checkedBorderColor: '#076bc9'
|
|
62
|
+
};
|
|
63
|
+
ConfigurableCheckbox.argTypes = {
|
|
64
|
+
size: { control: { type: 'text' } },
|
|
65
|
+
backgroundColor: { control: { type: 'color' } },
|
|
66
|
+
borderColor: { control: { type: 'color' } },
|
|
67
|
+
borderWidth: { control: { type: 'text' } },
|
|
68
|
+
borderRadius: { control: { type: 'text' } },
|
|
69
|
+
labelColor: { control: { type: 'color' } },
|
|
70
|
+
labelFontWeight: { control: { type: 'text' } },
|
|
71
|
+
checkedBackgroundColor: { control: { type: 'color' } },
|
|
72
|
+
checkedBorderColor: { control: { type: 'color' } },
|
|
73
|
+
status: { table: { disable: true } },
|
|
74
|
+
label: { table: { disable: true } },
|
|
75
|
+
required: { table: { disable: true } },
|
|
76
|
+
disabled: { table: { disable: true } },
|
|
77
|
+
readOnly: { table: { disable: true } },
|
|
78
|
+
indeterminate: { table: { disable: true } }
|
|
79
|
+
};
|
|
29
80
|
//# sourceMappingURL=Checkbox.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.stories.js","sourceRoot":"","sources":["../../../src/core/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAmB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"Checkbox.stories.js","sourceRoot":"","sources":["../../../src/core/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAmB,MAAM,yBAAyB,CAAC;AAEnF,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE;QACJ,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,kBAAkB;QACzB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,aAAa,EAAE,KAAK;KACrB;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC5F,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC1C,aAAa,EAAE,EAAE,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E,OAAO,EAAE,IAAI,EAAE,EAAE;IACpC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACnC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtC,aAAa,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Checkbox, Configuration, RadioCheckProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Checkbox',\n component: Checkbox,\n args: {\n status: undefined,\n label: 'Check me, please',\n required: false,\n disabled: false,\n readOnly: false,\n indeterminate: false\n },\n argTypes: {\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n label: { control: { type: 'text' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } },\n indeterminate: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const DefaultCheckbox: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <Checkbox\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n indeterminate={args.indeterminate}\n />\n );\n};\n\nexport const CheckboxCard: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <Checkbox\n variant='card'\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n indeterminate={args.indeterminate}\n />\n );\n};\n\ninterface ConfigurableCheckboxProps extends RadioCheckProps {\n size?: string;\n backgroundColor?: string;\n borderColor?: string;\n borderWidth?: string;\n borderRadius?: string;\n labelColor?: string;\n labelFontWeight?: string;\n checkedBackgroundColor?: string;\n checkedBorderColor?: string;\n}\n\nexport const ConfigurableCheckbox: Story<ConfigurableCheckboxProps> = (\n args: ConfigurableCheckboxProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n checkbox: {\n 'border-radius': args.borderRadius\n },\n 'radio-check': {\n 'border-color': args.borderColor,\n 'border-width': args.borderWidth,\n 'background-color': args.backgroundColor,\n label: {\n color: args.labelColor,\n 'font-weight': args.labelFontWeight\n },\n size: args.size,\n ':checked': {\n 'background-color': args.checkedBackgroundColor,\n 'border-color': args.checkedBorderColor\n }\n }\n }\n }}\n >\n <Checkbox label='Configurable Checkbox' />\n </Configuration>\n );\n};\n\nConfigurableCheckbox.args = {\n size: '1.25rem',\n backgroundColor: '#ffffff',\n borderColor: '#939393',\n borderWidth: '0.0625rem',\n borderRadius: '0.5',\n labelColor: '#939393',\n labelFontWeight: '400',\n checkedBackgroundColor: '#076bc9',\n checkedBorderColor: '#076bc9'\n};\n\nConfigurableCheckbox.argTypes = {\n size: { control: { type: 'text' } },\n backgroundColor: { control: { type: 'color' } },\n borderColor: { control: { type: 'color' } },\n borderWidth: { control: { type: 'text' } },\n borderRadius: { control: { type: 'text' } },\n labelColor: { control: { type: 'color' } },\n labelFontWeight: { control: { type: 'text' } },\n checkedBackgroundColor: { control: { type: 'color' } },\n checkedBorderColor: { control: { type: 'color' } },\n status: { table: { disable: true } },\n label: { table: { disable: true } },\n required: { table: { disable: true } },\n disabled: { table: { disable: true } },\n readOnly: { table: { disable: true } },\n indeterminate: { table: { disable: true } }\n};\n"]}
|
|
@@ -7,4 +7,21 @@ export declare const ThemedForm: Story<{
|
|
|
7
7
|
}>;
|
|
8
8
|
export declare const ThemingHierarchy: () => JSX.Element;
|
|
9
9
|
export declare const OverridableActionMenu: () => JSX.Element;
|
|
10
|
+
interface ConfigurableBaseThemeProps {
|
|
11
|
+
interactive?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const ConfigurableBaseTheme: Story<ConfigurableBaseThemeProps>;
|
|
14
|
+
interface ConfigurableComponentThemeProps {
|
|
15
|
+
buttonColor?: string;
|
|
16
|
+
checkedBackgroundColor?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const ConfigurableComponentTheme: Story<ConfigurableComponentThemeProps>;
|
|
19
|
+
interface ConfigurableLocaleProps {
|
|
20
|
+
locale?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const ConfigurableLocale: Story<ConfigurableLocaleProps>;
|
|
23
|
+
interface ConfigurableTranslationsProps {
|
|
24
|
+
placeholderTranslation?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const ConfigurableTranslations: Story<ConfigurableTranslationsProps>;
|
|
10
27
|
//# sourceMappingURL=Configuration.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Configuration.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Configuration/Configuration.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;
|
|
1
|
+
{"version":3,"file":"Configuration.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Configuration/Configuration.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAoB/C,wBAIU;AAEV,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAA;CAAE,CA+B7D,CAAC;AA2CF,eAAO,MAAM,gBAAgB,mBAyE5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,mBAWjC,CAAC;AAEF,UAAU,0BAA0B;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,0BAA0B,CAsBnE,CAAC;AAUF,UAAU,+BAA+B;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,+BAA+B,CA2B7E,CAAC;AAYF,UAAU,uBAAuB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,uBAAuB,CAU7D,CAAC;AAUF,UAAU,6BAA6B;IACrC,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,6BAA6B,CAsBzE,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { Button, Configuration, MenuButton, resetToInitial } from '@pega/cosmos-react-core';
|
|
5
|
-
import { FormContent } from '
|
|
4
|
+
import { Button, Configuration, MenuButton, resetToInitial, Flex, Checkbox, RadioButton, DateInput, SearchInput, Text } from '@pega/cosmos-react-core';
|
|
5
|
+
import { FormContent } from '../Form/Form.mocks';
|
|
6
6
|
export default {
|
|
7
7
|
title: 'Core/Configuration',
|
|
8
|
-
component: Configuration
|
|
8
|
+
component: Configuration,
|
|
9
|
+
includeStories: ['ThemedForm', 'ThemingHierarchy', 'OverridableActionMenu']
|
|
9
10
|
};
|
|
10
11
|
export const ThemedForm = (args) => {
|
|
11
12
|
const themes = {
|
|
@@ -72,4 +73,62 @@ export const OverridableActionMenu = () => {
|
|
|
72
73
|
const sharedActions = [{ id: '1', primary: 'Action 1', onClick: () => { } }];
|
|
73
74
|
return (_jsxs(_Fragment, { children: [_jsx(MenuButton, { text: 'Cosmos MenuButton', menu: { items: sharedActions } }, void 0), _jsx(Configuration, { overrideMap: {}, children: _jsx(MenuButton, { text: 'Mock PIMC MenuButton', menu: { items: sharedActions } }, void 0) }, void 0)] }, void 0));
|
|
74
75
|
};
|
|
76
|
+
export const ConfigurableBaseTheme = (args) => {
|
|
77
|
+
return (_jsx(Configuration, { theme: {
|
|
78
|
+
base: {
|
|
79
|
+
palette: {
|
|
80
|
+
interactive: args.interactive
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}, children: _jsxs(Flex, { container: { gap: 2, justify: 'start' }, children: [_jsx(Button, { variant: 'primary', children: "Primary" }, void 0), _jsx(Flex, { item: { shrink: 1, alignSelf: 'center' }, children: _jsx(Checkbox, { id: 'checkbox', label: 'Checkbox Option', defaultChecked: true }, void 0) }, void 0), _jsx(RadioButton, { id: 'radio-button', label: 'Radio Option', defaultChecked: true }, void 0)] }, void 0) }, void 0));
|
|
84
|
+
};
|
|
85
|
+
ConfigurableBaseTheme.args = {
|
|
86
|
+
interactive: '#681fc3'
|
|
87
|
+
};
|
|
88
|
+
ConfigurableBaseTheme.argTypes = {
|
|
89
|
+
interactive: { control: { type: 'color' } }
|
|
90
|
+
};
|
|
91
|
+
export const ConfigurableComponentTheme = (args) => {
|
|
92
|
+
return (_jsx(Configuration, { theme: {
|
|
93
|
+
components: {
|
|
94
|
+
button: {
|
|
95
|
+
color: args.buttonColor
|
|
96
|
+
},
|
|
97
|
+
'radio-check': {
|
|
98
|
+
':checked': {
|
|
99
|
+
'background-color': args.checkedBackgroundColor
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}, children: _jsxs(Flex, { container: { gap: 2, justify: 'start' }, children: [_jsx(Button, { variant: 'primary', children: "Primary" }, void 0), _jsx(Flex, { item: { shrink: 1, alignSelf: 'center' }, children: _jsx(Checkbox, { id: 'checkbox', label: 'Checkbox Option', defaultChecked: true }, void 0) }, void 0), _jsx(RadioButton, { id: 'radio-button', label: 'Radio Option', defaultChecked: true }, void 0)] }, void 0) }, void 0));
|
|
104
|
+
};
|
|
105
|
+
ConfigurableComponentTheme.args = {
|
|
106
|
+
buttonColor: '#681fc3',
|
|
107
|
+
checkedBackgroundColor: '#20aa50'
|
|
108
|
+
};
|
|
109
|
+
ConfigurableComponentTheme.argTypes = {
|
|
110
|
+
buttonColor: { control: { type: 'color' } },
|
|
111
|
+
checkedBackgroundColor: { control: { type: 'color' } }
|
|
112
|
+
};
|
|
113
|
+
export const ConfigurableLocale = (args) => {
|
|
114
|
+
return (_jsx(Configuration, { locale: args.locale, children: _jsx(Flex, { container: { direction: 'column', gap: 2 }, children: _jsx(DateInput, { label: 'Date Input with locale support', value: new Date() }, void 0) }, void 0) }, void 0));
|
|
115
|
+
};
|
|
116
|
+
ConfigurableLocale.args = {
|
|
117
|
+
locale: 'en-US'
|
|
118
|
+
};
|
|
119
|
+
ConfigurableLocale.argTypes = {
|
|
120
|
+
locale: { options: ['en-US', 'pl', 'fr', 'hu', 'de-DE'], control: { type: 'select' } }
|
|
121
|
+
};
|
|
122
|
+
export const ConfigurableTranslations = (args) => {
|
|
123
|
+
const spanishTranslation = {
|
|
124
|
+
search_placeholder_default: args.placeholderTranslation
|
|
125
|
+
};
|
|
126
|
+
return (_jsxs(Flex, { container: { gap: 4 }, children: [_jsxs(Flex, { container: { direction: 'column' }, children: [_jsx(Text, { variant: 'h4', children: "Default" }, void 0), _jsx(SearchInput, {}, void 0)] }, void 0), _jsx(Configuration, { translations: spanishTranslation, children: _jsxs(Flex, { container: { direction: 'column' }, children: [_jsx(Text, { variant: 'h4', children: "Translated" }, void 0), _jsx(SearchInput, {}, void 0)] }, void 0) }, void 0)] }, void 0));
|
|
127
|
+
};
|
|
128
|
+
ConfigurableTranslations.args = {
|
|
129
|
+
placeholderTranslation: 'Buscar...'
|
|
130
|
+
};
|
|
131
|
+
ConfigurableTranslations.argTypes = {
|
|
132
|
+
placeholderTranslation: { control: { type: 'text' } }
|
|
133
|
+
};
|
|
75
134
|
//# sourceMappingURL=Configuration.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Configuration.stories.js","sourceRoot":"","sources":["../../../src/core/Configuration/Configuration.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE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AE,GAAG,EAAE,GAAE,CAAC,EAAE,CAAC,CAAC;IAE5E,OAAO,CACL,8BACE,KAAC,UAAU,IAAC,IAAI,EAAC,mBAAmB,EAAC,IAAI,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,WAAI,EACvE,KAAC,aAAa,IAAC,WAAW,EAAE,EAAE,YAC5B,KAAC,UAAU,IAAC,IAAI,EAAC,sBAAsB,EAAC,IAAI,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,WAAI,WAC5D,YACf,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\nimport styled from 'styled-components';\n\nimport {\n Button,\n Configuration,\n MenuButton,\n resetToInitial,\n DefaultSettableTheme\n} from '@pega/cosmos-react-core';\nimport { FormContent } from '@pega/cosmos-react-demos/lib/core/Form/Form.mocks';\n\nexport default {\n title: 'Core/Configuration',\n component: Configuration\n} as Meta;\n\nexport const ThemedForm: Story<{ theme: 'default' | 'theme1' }> = (args: {\n theme: 'default' | 'theme1';\n}) => {\n const themes: Record<string, DefaultSettableTheme> = {\n default: {},\n theme1: {\n base: {\n palette: {\n interactive: '#AC75F0'\n }\n },\n components: {\n button: {\n 'border-radius': 1\n },\n 'form-control': {\n 'background-color': '#80008033',\n 'border-color': 'purple'\n },\n input: {\n height: '50px'\n }\n }\n }\n };\n\n return (\n <Configuration theme={themes[args.theme]}>\n <FormContent cols={1} showActions={false} />\n </Configuration>\n );\n};\n\nThemedForm.args = {\n theme: 'default'\n};\n\nThemedForm.argTypes = {\n theme: { options: ['default', 'theme1'], control: { type: 'select' } }\n};\n\nconst buttonStyles = {\n width: '100%'\n};\n\nconst StyledFieldset = styled.fieldset`\n padding: 1rem 5%;\n margin: 1rem 0;\n`;\n\nconst BoldSpan = styled.span`\n font-weight: bold;\n`;\n\nconst FlipFlop = ({\n flipFlop,\n first,\n second\n}: {\n flipFlop: boolean;\n first: string;\n second: string;\n}) => {\n return flipFlop ? (\n <>\n <BoldSpan>{first}</BoldSpan> → {second}\n </>\n ) : (\n <>\n {first} ← <BoldSpan>{second}</BoldSpan>\n </>\n );\n};\n\nexport const ThemingHierarchy = () => {\n const [redOrOrange, setRedOrOrange] = useState(true);\n const [greenOrPurple, setGreenOrPurple] = useState(true);\n\n return (\n <StyledFieldset style={{ margin: 0, textAlign: 'center' }}>\n <legend>Initial Theme</legend>\n <Button style={buttonStyles} variant='primary'>\n Base interactive\n </Button>\n <StyledFieldset>\n <legend>Override Interactive to</legend>\n <Configuration\n theme={{\n base: {\n palette: {\n interactive: redOrOrange ? 'red' : 'darkorange'\n }\n }\n }}\n >\n <Button\n style={buttonStyles}\n variant='primary'\n onClick={() => setRedOrOrange(val => !val)}\n >\n <FlipFlop flipFlop={redOrOrange} first='Red' second='Orange' />\n </Button>\n <StyledFieldset>\n <legend>Override Button Primary BG to</legend>\n <Configuration\n theme={{\n components: {\n button: { color: greenOrPurple ? 'green' : 'purple' }\n }\n }}\n >\n <Button\n style={buttonStyles}\n variant='primary'\n onClick={() => setGreenOrPurple(val => !val)}\n >\n <FlipFlop flipFlop={greenOrPurple} first='Green' second='Purple' />\n </Button>\n <Button style={{ ...buttonStyles, marginTop: '1rem' }} variant='secondary'>\n Secondary still inherits interactive\n </Button>\n <StyledFieldset>\n <legend>Reset Button BG</legend>\n <Configuration\n theme={{\n components: { button: { color: resetToInitial } }\n }}\n >\n <Button style={buttonStyles} variant='primary'>\n Inherited from interactive\n </Button>\n <StyledFieldset>\n <legend>Reset Interactive</legend>\n <Configuration theme={{ base: { palette: { interactive: resetToInitial } } }}>\n <Button style={buttonStyles} variant='primary'>\n Inherited from base\n </Button>\n </Configuration>\n </StyledFieldset>\n </Configuration>\n </StyledFieldset>\n </Configuration>\n </StyledFieldset>\n </Configuration>\n </StyledFieldset>\n </StyledFieldset>\n );\n};\n\nexport const OverridableActionMenu = () => {\n const sharedActions = [{ id: '1', primary: 'Action 1', onClick: () => {} }];\n\n return (\n <>\n <MenuButton text='Cosmos MenuButton' menu={{ items: sharedActions }} />\n <Configuration overrideMap={{}}>\n <MenuButton text='Mock PIMC MenuButton' menu={{ items: sharedActions }} />\n </Configuration>\n </>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Configuration.stories.js","sourceRoot":"","sources":["../../../src/core/Configuration/Configuration.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,cAAc,EAEd,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,SAAS,EACT,WAAW,EACX,IAAI,EACL,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,aAAa;IACxB,cAAc,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,CAAC;CACpE,CAAC;AAEV,MAAM,CAAC,MAAM,UAAU,GAA2C,CAAC,IAElE,EAAE,EAAE;IACH,MAAM,MAAM,GAAyC;QACnD,OAAO,EAAE,EAAE;QACX,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,OAAO,EAAE;oBACP,WAAW,EAAE,SAAS;iBACvB;aACF;YACD,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,eAAe,EAAE,CAAC;iBACnB;gBACD,cAAc,EAAE;oBACd,kBAAkB,EAAE,WAAW;oBAC/B,cAAc,EAAE,QAAQ;iBACzB;gBACD,KAAK,EAAE;oBACL,MAAM,EAAE,MAAM;iBACf;aACF;SACF;KACF,CAAC;IAEF,OAAO,CACL,KAAC,aAAa,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YACtC,KAAC,WAAW,IAAC,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,WAAI,WAC9B,CACjB,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AAE,aACtC,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,mCAAkB,EACpC,KAAC,WAAW,aAAG,YACV,WACO,YACX,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,wBAAwB,CAAC,IAAI,GAAG;IAC9B,sBAAsB,EAAE,WAAW;CACpC,CAAC;AAEF,wBAAwB,CAAC,QAAQ,GAAG;IAClC,sBAAsB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACtD,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\nimport styled from 'styled-components';\n\nimport {\n Button,\n Configuration,\n MenuButton,\n resetToInitial,\n DefaultSettableTheme,\n Flex,\n Checkbox,\n RadioButton,\n DateInput,\n SearchInput,\n Text\n} from '@pega/cosmos-react-core';\n\nimport { FormContent } from '../Form/Form.mocks';\n\nexport default {\n title: 'Core/Configuration',\n component: Configuration,\n includeStories: ['ThemedForm', 'ThemingHierarchy', 'OverridableActionMenu']\n} as Meta;\n\nexport const ThemedForm: Story<{ theme: 'default' | 'theme1' }> = (args: {\n theme: 'default' | 'theme1';\n}) => {\n const themes: Record<string, DefaultSettableTheme> = {\n default: {},\n theme1: {\n base: {\n palette: {\n interactive: '#AC75F0'\n }\n },\n components: {\n button: {\n 'border-radius': 1\n },\n 'form-control': {\n 'background-color': '#80008033',\n 'border-color': 'purple'\n },\n input: {\n height: '50px'\n }\n }\n }\n };\n\n return (\n <Configuration theme={themes[args.theme]}>\n <FormContent cols={1} showActions={false} />\n </Configuration>\n );\n};\n\nThemedForm.args = {\n theme: 'default'\n};\n\nThemedForm.argTypes = {\n theme: { options: ['default', 'theme1'], control: { type: 'select' } }\n};\n\nconst buttonStyles = {\n width: '100%'\n};\n\nconst StyledFieldset = styled.fieldset`\n padding: 1rem 5%;\n margin: 1rem 0;\n`;\n\nconst BoldSpan = styled.span`\n font-weight: bold;\n`;\n\nconst FlipFlop = ({\n flipFlop,\n first,\n second\n}: {\n flipFlop: boolean;\n first: string;\n second: string;\n}) => {\n return flipFlop ? (\n <>\n <BoldSpan>{first}</BoldSpan> → {second}\n </>\n ) : (\n <>\n {first} ← <BoldSpan>{second}</BoldSpan>\n </>\n );\n};\n\nexport const ThemingHierarchy = () => {\n const [redOrOrange, setRedOrOrange] = useState(true);\n const [greenOrPurple, setGreenOrPurple] = useState(true);\n\n return (\n <StyledFieldset style={{ margin: 0, textAlign: 'center' }}>\n <legend>Initial Theme</legend>\n <Button style={buttonStyles} variant='primary'>\n Base interactive\n </Button>\n <StyledFieldset>\n <legend>Override Interactive to</legend>\n <Configuration\n theme={{\n base: {\n palette: {\n interactive: redOrOrange ? 'red' : 'darkorange'\n }\n }\n }}\n >\n <Button\n style={buttonStyles}\n variant='primary'\n onClick={() => setRedOrOrange(val => !val)}\n >\n <FlipFlop flipFlop={redOrOrange} first='Red' second='Orange' />\n </Button>\n <StyledFieldset>\n <legend>Override Button Primary BG to</legend>\n <Configuration\n theme={{\n components: {\n button: { color: greenOrPurple ? 'green' : 'purple' }\n }\n }}\n >\n <Button\n style={buttonStyles}\n variant='primary'\n onClick={() => setGreenOrPurple(val => !val)}\n >\n <FlipFlop flipFlop={greenOrPurple} first='Green' second='Purple' />\n </Button>\n <Button style={{ ...buttonStyles, marginTop: '1rem' }} variant='secondary'>\n Secondary still inherits interactive\n </Button>\n <StyledFieldset>\n <legend>Reset Button BG</legend>\n <Configuration\n theme={{\n components: { button: { color: resetToInitial } }\n }}\n >\n <Button style={buttonStyles} variant='primary'>\n Inherited from interactive\n </Button>\n <StyledFieldset>\n <legend>Reset Interactive</legend>\n <Configuration theme={{ base: { palette: { interactive: resetToInitial } } }}>\n <Button style={buttonStyles} variant='primary'>\n Inherited from base\n </Button>\n </Configuration>\n </StyledFieldset>\n </Configuration>\n </StyledFieldset>\n </Configuration>\n </StyledFieldset>\n </Configuration>\n </StyledFieldset>\n </StyledFieldset>\n );\n};\n\nexport const OverridableActionMenu = () => {\n const sharedActions = [{ id: '1', primary: 'Action 1', onClick: () => {} }];\n\n return (\n <>\n <MenuButton text='Cosmos MenuButton' menu={{ items: sharedActions }} />\n <Configuration overrideMap={{}}>\n <MenuButton text='Mock PIMC MenuButton' menu={{ items: sharedActions }} />\n </Configuration>\n </>\n );\n};\n\ninterface ConfigurableBaseThemeProps {\n interactive?: string;\n}\n\nexport const ConfigurableBaseTheme: Story<ConfigurableBaseThemeProps> = (\n args: ConfigurableBaseThemeProps\n) => {\n return (\n <Configuration\n theme={{\n base: {\n palette: {\n interactive: args.interactive\n }\n }\n }}\n >\n <Flex container={{ gap: 2, justify: 'start' }}>\n <Button variant='primary'>Primary</Button>\n <Flex item={{ shrink: 1, alignSelf: 'center' }}>\n <Checkbox id='checkbox' label='Checkbox Option' defaultChecked />\n </Flex>\n <RadioButton id='radio-button' label='Radio Option' defaultChecked />\n </Flex>\n </Configuration>\n );\n};\n\nConfigurableBaseTheme.args = {\n interactive: '#681fc3'\n};\n\nConfigurableBaseTheme.argTypes = {\n interactive: { control: { type: 'color' } }\n};\n\ninterface ConfigurableComponentThemeProps {\n buttonColor?: string;\n checkedBackgroundColor?: string;\n}\n\nexport const ConfigurableComponentTheme: Story<ConfigurableComponentThemeProps> = (\n args: ConfigurableComponentThemeProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n button: {\n color: args.buttonColor\n },\n 'radio-check': {\n ':checked': {\n 'background-color': args.checkedBackgroundColor\n }\n }\n }\n }}\n >\n <Flex container={{ gap: 2, justify: 'start' }}>\n <Button variant='primary'>Primary</Button>\n <Flex item={{ shrink: 1, alignSelf: 'center' }}>\n <Checkbox id='checkbox' label='Checkbox Option' defaultChecked />\n </Flex>\n <RadioButton id='radio-button' label='Radio Option' defaultChecked />\n </Flex>\n </Configuration>\n );\n};\n\nConfigurableComponentTheme.args = {\n buttonColor: '#681fc3',\n checkedBackgroundColor: '#20aa50'\n};\n\nConfigurableComponentTheme.argTypes = {\n buttonColor: { control: { type: 'color' } },\n checkedBackgroundColor: { control: { type: 'color' } }\n};\n\ninterface ConfigurableLocaleProps {\n locale?: string;\n}\n\nexport const ConfigurableLocale: Story<ConfigurableLocaleProps> = (\n args: ConfigurableLocaleProps\n) => {\n return (\n <Configuration locale={args.locale}>\n <Flex container={{ direction: 'column', gap: 2 }}>\n <DateInput label='Date Input with locale support' value={new Date()} />\n </Flex>\n </Configuration>\n );\n};\n\nConfigurableLocale.args = {\n locale: 'en-US'\n};\n\nConfigurableLocale.argTypes = {\n locale: { options: ['en-US', 'pl', 'fr', 'hu', 'de-DE'], control: { type: 'select' } }\n};\n\ninterface ConfigurableTranslationsProps {\n placeholderTranslation?: string;\n}\n\nexport const ConfigurableTranslations: Story<ConfigurableTranslationsProps> = (\n args: ConfigurableTranslationsProps\n) => {\n const spanishTranslation = {\n search_placeholder_default: args.placeholderTranslation\n };\n\n return (\n <Flex container={{ gap: 4 }}>\n <Flex container={{ direction: 'column' }}>\n <Text variant='h4'>Default</Text>\n <SearchInput />\n </Flex>\n\n <Configuration translations={spanishTranslation}>\n <Flex container={{ direction: 'column' }}>\n <Text variant='h4'>Translated</Text>\n <SearchInput />\n </Flex>\n </Configuration>\n </Flex>\n );\n};\n\nConfigurableTranslations.args = {\n placeholderTranslation: 'Buscar...'\n};\n\nConfigurableTranslations.argTypes = {\n placeholderTranslation: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -4,8 +4,11 @@ declare const _default: Meta<import("@storybook/react").Args>;
|
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const CurrencyInputDemo: Story<CurrencyInputProps>;
|
|
6
6
|
interface CurrencyDisplayStoryProps extends CurrencyDisplayProps {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
groupSeparators: boolean;
|
|
8
|
+
fractionDigits: number;
|
|
9
|
+
currency: 'symbol' | 'code' | 'name';
|
|
10
|
+
negative: 'minus-sign' | 'parentheses';
|
|
11
|
+
notation: 'standard' | 'compact';
|
|
9
12
|
}
|
|
10
13
|
export declare const CurrencyDisplayDemo: Story<CurrencyDisplayStoryProps>;
|
|
11
14
|
//# sourceMappingURL=Currency.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Currency.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Currency/Currency.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAEL,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;;AAEjC,wBAGU;AAEV,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,kBAAkB,CAsBvD,CAAC;AAmCF,UAAU,yBAA0B,SAAQ,oBAAoB;IAC9D,
|
|
1
|
+
{"version":3,"file":"Currency.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Currency/Currency.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAEL,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;;AAEjC,wBAGU;AAEV,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,kBAAkB,CAsBvD,CAAC;AAmCF,UAAU,yBAA0B,SAAQ,oBAAoB;IAC9D,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;IACrC,QAAQ,EAAE,YAAY,GAAG,aAAa,CAAC;IACvC,QAAQ,EAAE,UAAU,GAAG,SAAS,CAAC;CAClC;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,yBAAyB,CAgBhE,CAAC"}
|
|
@@ -41,26 +41,44 @@ CurrencyInputDemo.argTypes = {
|
|
|
41
41
|
readOnly: { control: { type: 'boolean' } }
|
|
42
42
|
};
|
|
43
43
|
export const CurrencyDisplayDemo = (args) => {
|
|
44
|
-
return (_jsx(CurrencyDisplay, { value: args.value, currencyISOCode: args.currencyISOCode,
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
return (_jsx(CurrencyDisplay, { value: args.value, currencyISOCode: args.currencyISOCode, formattingOptions: {
|
|
45
|
+
fractionDigits: args.fractionDigits,
|
|
46
|
+
groupSeparators: args.groupSeparators,
|
|
47
|
+
currency: args.currency,
|
|
48
|
+
negative: args.negative,
|
|
49
|
+
notation: args.notation
|
|
47
50
|
} }, void 0));
|
|
48
51
|
};
|
|
49
52
|
CurrencyDisplayDemo.args = {
|
|
50
|
-
value:
|
|
53
|
+
value: undefined,
|
|
51
54
|
currencyISOCode: 'USD',
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
groupSeparators: true,
|
|
56
|
+
fractionDigits: undefined,
|
|
57
|
+
currency: 'symbol',
|
|
58
|
+
negative: 'minus-sign',
|
|
59
|
+
notation: 'standard'
|
|
55
60
|
};
|
|
56
61
|
CurrencyDisplayDemo.argTypes = {
|
|
57
|
-
value: { control: { type: '
|
|
62
|
+
value: { control: { type: 'number' } },
|
|
58
63
|
currencyISOCode: {
|
|
59
|
-
options: ['USD', 'EUR', 'AUD', 'PLN', 'CZK', 'JPY'],
|
|
64
|
+
options: [undefined, 'USD', 'EUR', 'AUD', 'PLN', 'CZK', 'JPY'],
|
|
60
65
|
control: { type: 'select' }
|
|
61
66
|
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
groupSeparators: { control: { type: 'boolean' } },
|
|
68
|
+
fractionDigits: { control: { type: 'number', min: 0, max: 20, step: 1 } },
|
|
69
|
+
negative: {
|
|
70
|
+
control: {
|
|
71
|
+
type: 'inline-radio'
|
|
72
|
+
},
|
|
73
|
+
options: ['minus-sign', 'parentheses']
|
|
74
|
+
},
|
|
75
|
+
currency: {
|
|
76
|
+
control: { type: 'select' },
|
|
77
|
+
options: ['symbol', 'code', 'name']
|
|
78
|
+
},
|
|
79
|
+
notation: {
|
|
80
|
+
control: { type: 'inline-radio' },
|
|
81
|
+
options: ['standard', 'compact']
|
|
82
|
+
}
|
|
65
83
|
};
|
|
66
84
|
//# sourceMappingURL=Currency.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Currency.stories.js","sourceRoot":"","sources":["../../../src/core/Currency/Currency.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,eAAe,EAEf,aAAa,EAEd,MAAM,yBAAyB,CAAC;AAEjC,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,aAAa;CACjB,CAAC;AAEV,MAAM,CAAC,MAAM,iBAAiB,GAA8B,CAAC,IAAwB,EAAE,EAAE;IACvF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,EAAU,CAAC;IAE7C,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,EAC5C,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,EAC1C,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EACzC,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAC7C,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,WACvB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,iBAAiB,CAAC,IA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AAS,EAAE,EAAE;IACjD,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;IACzE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,IAAI,EAAE,cAAc;SACrB;QACD,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;KACvC;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3B,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;KACpC;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE;QACjC,OAAO,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;KACjC;CACF,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport {\n CurrencyDisplay,\n CurrencyDisplayProps,\n CurrencyInput,\n CurrencyInputProps\n} from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Currency',\n component: CurrencyInput\n} as Meta;\n\nexport const CurrencyInputDemo: Story<CurrencyInputProps> = (args: CurrencyInputProps) => {\n const [value, setValue] = useState<string>();\n\n return (\n <CurrencyInput\n value={value}\n onChange={inputValue => setValue(inputValue)}\n onBlur={inputValue => setValue(inputValue)}\n currencyISOCode={args.currencyISOCode}\n alwaysShowISOCode={args.alwaysShowISOCode}\n showDecimal={args.showDecimal}\n showGroupSeparators={args.showGroupSeparators}\n step={args.step}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\nCurrencyInputDemo.args = {\n currencyISOCode: 'USD',\n alwaysShowISOCode: false,\n showDecimal: true,\n showGroupSeparators: true,\n step: 1,\n label: 'Currency input',\n labelHidden: false,\n info: 'Enter a numerical value',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nCurrencyInputDemo.argTypes = {\n currencyISOCode: {\n options: ['USD', 'EUR', 'AUD', 'PLN', 'CZK', 'JPY'],\n control: { type: 'select' }\n },\n alwaysShowISOCode: { control: { type: 'boolean' } },\n showDecimal: { control: { type: 'boolean' } },\n showGroupSeparators: { control: { type: 'boolean' } },\n step: { control: { type: 'number' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n\ninterface CurrencyDisplayStoryProps extends CurrencyDisplayProps {\n groupSeparators: boolean;\n fractionDigits: number;\n currency: 'symbol' | 'code' | 'name';\n negative: 'minus-sign' | 'parentheses';\n notation: 'standard' | 'compact';\n}\n\nexport const CurrencyDisplayDemo: Story<CurrencyDisplayStoryProps> = (\n args: CurrencyDisplayStoryProps\n) => {\n return (\n <CurrencyDisplay\n value={args.value}\n currencyISOCode={args.currencyISOCode}\n formattingOptions={{\n fractionDigits: args.fractionDigits,\n groupSeparators: args.groupSeparators,\n currency: args.currency,\n negative: args.negative,\n notation: args.notation\n }}\n />\n );\n};\n\nCurrencyDisplayDemo.args = {\n value: undefined,\n currencyISOCode: 'USD',\n groupSeparators: true,\n fractionDigits: undefined,\n currency: 'symbol',\n negative: 'minus-sign',\n notation: 'standard'\n};\n\nCurrencyDisplayDemo.argTypes = {\n value: { control: { type: 'number' } },\n currencyISOCode: {\n options: [undefined, 'USD', 'EUR', 'AUD', 'PLN', 'CZK', 'JPY'],\n control: { type: 'select' }\n },\n groupSeparators: { control: { type: 'boolean' } },\n fractionDigits: { control: { type: 'number', min: 0, max: 20, step: 1 } },\n negative: {\n control: {\n type: 'inline-radio'\n },\n options: ['minus-sign', 'parentheses']\n },\n currency: {\n control: { type: 'select' },\n options: ['symbol', 'code', 'name']\n },\n notation: {\n control: { type: 'inline-radio' },\n options: ['standard', 'compact']\n }\n};\n"]}
|
|
@@ -4,8 +4,10 @@ export default _default;
|
|
|
4
4
|
interface FieldGroupStoryProps {
|
|
5
5
|
firstGroupName: string;
|
|
6
6
|
firstGroupCollapsible: boolean;
|
|
7
|
+
firstGroupDescription: string;
|
|
7
8
|
secondGroupName: string;
|
|
8
9
|
secondGroupCollapsible: boolean;
|
|
10
|
+
secondGroupDescription: string;
|
|
9
11
|
}
|
|
10
12
|
export declare const FieldGroupDemo: Story<FieldGroupStoryProps>;
|
|
11
13
|
//# sourceMappingURL=FieldGroup.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroup.stories.d.ts","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroup.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAY/C,wBAGU;AAEV,UAAU,oBAAoB;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldGroup.stories.d.ts","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroup.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAY/C,wBAGU;AAEV,UAAU,oBAAoB;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,OAAO,CAAC;IAChC,sBAAsB,EAAE,MAAM,CAAC;CAChC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,oBAAoB,CA2CtD,CAAC"}
|