From 1b44481164cd1312c901a3ecac20ad79f7f81743 Mon Sep 17 00:00:00 2001 From: Anna Wen <54281166+annawen1@users.noreply.github.com> Date: Tue, 18 Apr 2023 15:48:35 -0400 Subject: [PATCH] feat(notifications): sync with @carbon/react v11 (#10338) * feat(notifications): notifications v11 carbon sync * chore(slider): fix slider spec test * feat(notifications): new actionable variant * feat(notification): additional functionality * chore(notifications): add license to helper file * chore(notifications): update docs * feat(notification): warning icon fill and storybook adjustments --- .../codesandbox/form/redux-form/src/index.js | 4 +- .../actionable-notification-button.ts | 34 ++++ .../actionable-notification-story.ts | 120 ++++++++++++ .../notification/actionable-notification.scss | 170 ++++++++++++++++ .../notification/actionable-notification.ts | 184 ++++++++++++++++++ .../src/components/notification/defs.ts | 19 ++ .../src/components/notification/index.ts | 2 + .../notification/inline-notification-story.ts | 103 ++++++++++ .../notification/inline-notification.scss | 26 +++ .../notification/inline-notification.ts | 45 +++-- .../notification/notification-story.mdx | 29 +++ .../components/notification/stories/helper.ts | 22 +++ ...n-story.ts => toast-notification-story.ts} | 126 ++++-------- .../notification/toast-notification.scss | 26 +++ .../notification/toast-notification.ts | 8 +- .../carbon-web-components/src/index.ts | 2 + .../src/typings/jsx-elements.d.ts | 2 + .../tests/spec/notification_spec.ts | 12 +- .../tests/spec/slider_spec.ts | 4 +- 19 files changed, 821 insertions(+), 117 deletions(-) create mode 100644 web-components/packages/carbon-web-components/src/components/notification/actionable-notification-button.ts create mode 100644 web-components/packages/carbon-web-components/src/components/notification/actionable-notification-story.ts create mode 100644 web-components/packages/carbon-web-components/src/components/notification/actionable-notification.scss create mode 100644 web-components/packages/carbon-web-components/src/components/notification/actionable-notification.ts create mode 100644 web-components/packages/carbon-web-components/src/components/notification/inline-notification-story.ts create mode 100644 web-components/packages/carbon-web-components/src/components/notification/stories/helper.ts rename web-components/packages/carbon-web-components/src/components/notification/{notification-story.ts => toast-notification-story.ts} (50%) diff --git a/web-components/packages/carbon-web-components/examples/codesandbox/form/redux-form/src/index.js b/web-components/packages/carbon-web-components/examples/codesandbox/form/redux-form/src/index.js index c1cdecaa2410..13060a06c35b 100644 --- a/web-components/packages/carbon-web-components/examples/codesandbox/form/redux-form/src/index.js +++ b/web-components/packages/carbon-web-components/examples/codesandbox/form/redux-form/src/index.js @@ -15,7 +15,7 @@ import { Field, SubmissionError, reduxForm, reducer as reduxFormReducer } from ' import BXBtn from '@carbon/web-components/es/components-react/button/button.js'; import BXFormItem from '@carbon/web-components/es/components-react/form/form-item.js'; import CDSTextInput from '@carbon/web-components/es/components-react/text-input/text-input.js'; -import BXInlineNotification from '@carbon/web-components/es/components-react/notification/inline-notification.js'; +import CDSInlineNotification from '@carbon/web-components/es/components-react/notification/inline-notification.js'; import './index.css'; const reducer = combineReducers({ @@ -70,7 +70,7 @@ const SubmitValidationForm = reduxForm({ })(({ error, handleSubmit, pristine, reset, submitting }) => (