@dxc-technology/halstack-react 0.0.0-d4fec82 → 0.0.0-d618bea
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/BackgroundColorContext.d.ts +10 -0
- package/BackgroundColorContext.js +1 -3
- package/ThemeContext.d.ts +15 -0
- package/ThemeContext.js +5 -8
- package/V3Select/V3Select.js +2 -2
- package/V3Textarea/V3Textarea.js +2 -2
- package/accordion/Accordion.js +2 -2
- package/accordion-group/AccordionGroup.js +2 -2
- package/accordion-group/AccordionGroup.stories.tsx +225 -0
- package/alert/Alert.js +2 -2
- package/alert/Alert.stories.tsx +170 -0
- package/alert/types.d.ts +1 -1
- package/badge/Badge.js +1 -1
- package/box/Box.d.ts +4 -0
- package/box/Box.js +6 -32
- package/box/{Box.stories.jsx → Box.stories.tsx} +0 -0
- package/box/types.d.ts +43 -0
- package/box/types.js +5 -0
- package/button/Button.d.ts +1 -1
- package/button/Button.js +9 -12
- package/button/Button.stories.tsx +217 -234
- package/button/types.d.ts +11 -11
- package/card/Card.js +5 -6
- package/card/Card.stories.tsx +201 -0
- package/card/ice-cream.jpg +0 -0
- package/card/types.d.ts +4 -6
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Checkbox.stories.tsx +192 -0
- package/checkbox/types.d.ts +1 -1
- package/chip/Chip.d.ts +4 -0
- package/chip/Chip.js +1 -23
- package/chip/Chip.stories.tsx +121 -0
- package/chip/types.d.ts +53 -0
- package/chip/types.js +5 -0
- package/common/variables.js +44 -37
- package/date/Date.js +1 -1
- package/date-input/DateInput.js +4 -7
- package/date-input/DateInput.stories.tsx +138 -0
- package/dialog/Dialog.d.ts +4 -0
- package/dialog/Dialog.js +6 -25
- package/dialog/Dialog.stories.tsx +212 -0
- package/dialog/types.d.ts +43 -0
- package/dialog/types.js +5 -0
- package/dropdown/Dropdown.js +1 -1
- package/dropdown/types.d.ts +1 -1
- package/file-input/FileInput.d.ts +4 -0
- package/file-input/FileInput.js +65 -76
- package/file-input/FileItem.d.ts +14 -0
- package/file-input/FileItem.js +12 -21
- package/file-input/types.d.ts +112 -0
- package/file-input/types.js +5 -0
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +8 -8
- package/footer/Footer.stories.tsx +151 -0
- package/footer/types.d.ts +22 -18
- package/header/Header.d.ts +7 -0
- package/header/Header.js +28 -30
- package/header/Header.stories.tsx +162 -0
- package/header/Icons.js +2 -27
- package/header/types.d.ts +47 -0
- package/header/types.js +5 -0
- package/heading/Heading.d.ts +4 -0
- package/heading/Heading.js +7 -24
- package/heading/Heading.stories.tsx +53 -0
- package/heading/types.d.ts +33 -0
- package/heading/types.js +5 -0
- package/input-text/InputText.js +2 -2
- package/layout/ApplicationLayout.d.ts +10 -0
- package/layout/ApplicationLayout.js +8 -18
- package/layout/ApplicationLayout.stories.tsx +171 -0
- package/layout/types.d.ts +57 -0
- package/layout/types.js +5 -0
- package/link/Link.d.ts +3 -0
- package/link/Link.js +4 -26
- package/link/Link.stories.tsx +146 -0
- package/link/types.d.ts +74 -0
- package/link/types.js +5 -0
- package/list/List.d.ts +7 -0
- package/list/List.js +37 -0
- package/list/List.stories.tsx +70 -0
- package/main.d.ts +7 -3
- package/main.js +34 -2
- package/number-input/NumberInput.d.ts +4 -0
- package/number-input/NumberInput.js +5 -50
- package/number-input/{NumberInput.stories.jsx → NumberInput.stories.tsx} +0 -0
- package/number-input/NumberInputContext.d.ts +4 -0
- package/number-input/NumberInputContext.js +5 -2
- package/number-input/numberInputContextTypes.d.ts +19 -0
- package/number-input/numberInputContextTypes.js +5 -0
- package/number-input/types.d.ts +117 -0
- package/number-input/types.js +5 -0
- package/package.json +1 -1
- package/paginator/Paginator.js +2 -8
- package/paginator/Paginator.stories.tsx +63 -0
- package/password-input/PasswordInput.d.ts +4 -0
- package/password-input/PasswordInput.js +19 -55
- package/password-input/{PasswordInput.stories.jsx → PasswordInput.stories.tsx} +1 -1
- package/password-input/types.d.ts +107 -0
- package/password-input/types.js +5 -0
- package/progress-bar/ProgressBar.js +3 -3
- package/progress-bar/ProgressBar.stories.jsx +58 -0
- package/radio/Radio.js +2 -2
- package/radio/Radio.stories.tsx +192 -0
- package/radio/types.d.ts +2 -2
- package/resultsetTable/ResultsetTable.d.ts +4 -0
- package/resultsetTable/ResultsetTable.js +4 -27
- package/resultsetTable/types.d.ts +67 -0
- package/resultsetTable/types.js +5 -0
- package/row/Row.d.ts +11 -0
- package/row/Row.js +124 -0
- package/row/Row.stories.tsx +223 -0
- package/select/Select.js +15 -17
- package/select/Select.stories.tsx +572 -0
- package/sidenav/Sidenav.d.ts +9 -0
- package/sidenav/Sidenav.js +6 -15
- package/sidenav/Sidenav.stories.tsx +165 -0
- package/sidenav/types.d.ts +50 -0
- package/sidenav/types.js +5 -0
- package/slider/Slider.d.ts +1 -1
- package/slider/Slider.js +43 -32
- package/slider/Slider.stories.tsx +177 -0
- package/slider/types.d.ts +2 -7
- package/spinner/Spinner.d.ts +4 -0
- package/spinner/Spinner.js +8 -25
- package/spinner/Spinner.stories.jsx +102 -0
- package/spinner/types.d.ts +32 -0
- package/spinner/types.js +5 -0
- package/stack/Stack.d.ts +10 -0
- package/stack/Stack.js +94 -0
- package/stack/Stack.stories.tsx +150 -0
- package/switch/Switch.js +4 -4
- package/switch/Switch.stories.tsx +160 -0
- package/table/Table.d.ts +4 -0
- package/table/Table.js +3 -3
- package/table/Table.stories.jsx +276 -0
- package/table/types.d.ts +21 -0
- package/table/types.js +5 -0
- package/tabs/Tabs.js +4 -2
- package/tabs/Tabs.stories.tsx +121 -0
- package/tabs/types.d.ts +3 -4
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +21 -36
- package/tag/Tag.stories.tsx +145 -0
- package/tag/types.d.ts +60 -0
- package/tag/types.js +5 -0
- package/text/Text.d.ts +7 -0
- package/text/Text.js +30 -0
- package/text/Text.stories.tsx +19 -0
- package/text-input/TextInput.d.ts +4 -0
- package/text-input/TextInput.js +42 -81
- package/text-input/TextInput.stories.tsx +456 -0
- package/text-input/types.d.ts +159 -0
- package/text-input/types.js +5 -0
- package/textarea/Textarea.js +29 -32
- package/textarea/index.d.ts +18 -8
- package/toggle/Toggle.js +1 -1
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/toggle-group/ToggleGroup.js +8 -34
- package/toggle-group/ToggleGroup.stories.tsx +178 -0
- package/toggle-group/types.d.ts +84 -0
- package/toggle-group/types.js +5 -0
- package/upload/buttons-upload/ButtonsUpload.js +2 -2
- package/upload/dragAndDropArea/DragAndDropArea.js +2 -2
- package/upload/file-upload/FileToUpload.js +1 -1
- package/upload/files-upload/FilesToUpload.js +1 -1
- package/upload/transaction/Transaction.js +2 -2
- package/upload/transactions/Transactions.js +1 -1
- package/useTheme.d.ts +2 -0
- package/useTheme.js +1 -1
- package/wizard/Wizard.d.ts +4 -0
- package/wizard/Wizard.js +13 -53
- package/wizard/Wizard.stories.jsx +224 -0
- package/wizard/types.d.ts +64 -0
- package/wizard/types.js +5 -0
- package/box/index.d.ts +0 -25
- package/chip/index.d.ts +0 -22
- package/dialog/index.d.ts +0 -18
- package/file-input/index.d.ts +0 -81
- package/header/index.d.ts +0 -25
- package/heading/index.d.ts +0 -17
- package/link/index.d.ts +0 -23
- package/number-input/index.d.ts +0 -113
- package/password-input/index.d.ts +0 -94
- package/resultsetTable/index.d.ts +0 -19
- package/sidenav/index.d.ts +0 -13
- package/spinner/index.d.ts +0 -17
- package/table/index.d.ts +0 -13
- package/tag/index.d.ts +0 -24
- package/text-input/index.d.ts +0 -135
- package/toggle-group/index.d.ts +0 -21
- package/wizard/index.d.ts +0 -18
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type BackgroundColorContext = "dark" | "light";
|
|
3
|
+
declare const BackgroundColorContext: React.Context<BackgroundColorContext>;
|
|
4
|
+
declare type BackgroundColorProviderPropsType = {
|
|
5
|
+
color: string;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
declare const BackgroundColorProvider: ({ color, children }: BackgroundColorProviderPropsType) => JSX.Element;
|
|
9
|
+
export default BackgroundColorContext;
|
|
10
|
+
export { BackgroundColorProvider };
|
|
@@ -13,14 +13,12 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
|
|
14
14
|
var _color = _interopRequireDefault(require("color"));
|
|
15
15
|
|
|
16
|
-
var _rgbHex = _interopRequireDefault(require("rgb-hex"));
|
|
17
|
-
|
|
18
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
17
|
|
|
20
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
19
|
|
|
22
20
|
/* eslint-disable prefer-template */
|
|
23
|
-
var BackgroundColorContext = /*#__PURE__*/_react["default"].createContext();
|
|
21
|
+
var BackgroundColorContext = /*#__PURE__*/_react["default"].createContext(null);
|
|
24
22
|
|
|
25
23
|
var getColorType = function getColorType(hexColor) {
|
|
26
24
|
try {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const ThemeContext: React.Context<object>;
|
|
3
|
+
declare type ThemeProviderCommonProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
declare type ThemeProviderDefaultTheme = ThemeProviderCommonProps & {
|
|
7
|
+
theme: object;
|
|
8
|
+
};
|
|
9
|
+
declare type ThemeProviderAdvancedTheme = ThemeProviderCommonProps & {
|
|
10
|
+
advancedTheme: object;
|
|
11
|
+
};
|
|
12
|
+
declare type ThemeProviderPropsType = ThemeProviderDefaultTheme | ThemeProviderAdvancedTheme;
|
|
13
|
+
declare const ThemeProvider: (props: ThemeProviderPropsType) => JSX.Element;
|
|
14
|
+
export default ThemeContext;
|
|
15
|
+
export { ThemeProvider };
|
package/ThemeContext.js
CHANGED
|
@@ -27,7 +27,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
29
|
|
|
30
|
-
var ThemeContext = /*#__PURE__*/_react["default"].createContext();
|
|
30
|
+
var ThemeContext = /*#__PURE__*/_react["default"].createContext(null);
|
|
31
31
|
|
|
32
32
|
var addLightness = function addLightness(hexColor, newLightness) {
|
|
33
33
|
try {
|
|
@@ -226,16 +226,13 @@ var parseTheme = function parseTheme(theme) {
|
|
|
226
226
|
return componentTokensCopy;
|
|
227
227
|
};
|
|
228
228
|
|
|
229
|
-
var ThemeProvider = function ThemeProvider(
|
|
230
|
-
var theme = _ref.theme,
|
|
231
|
-
advancedTheme = _ref.advancedTheme,
|
|
232
|
-
children = _ref.children;
|
|
229
|
+
var ThemeProvider = function ThemeProvider(props) {
|
|
233
230
|
var parsedTheme = (0, _react.useMemo)(function () {
|
|
234
|
-
|
|
235
|
-
}, [theme
|
|
231
|
+
if ("theme" in props) return parseTheme(props.theme);else if ("advancedTheme" in props) return parseAdvancedTheme(props.advancedTheme);
|
|
232
|
+
}, ["theme" in props ? props.theme : props.advancedTheme]);
|
|
236
233
|
return /*#__PURE__*/_react["default"].createElement(Halstack, null, /*#__PURE__*/_react["default"].createElement(ThemeContext.Provider, {
|
|
237
234
|
value: parsedTheme
|
|
238
|
-
}, children));
|
|
235
|
+
}, props.children));
|
|
239
236
|
};
|
|
240
237
|
|
|
241
238
|
exports.ThemeProvider = ThemeProvider;
|
package/V3Select/V3Select.js
CHANGED
|
@@ -39,11 +39,11 @@ var _variables = require("../common/variables.js");
|
|
|
39
39
|
|
|
40
40
|
var _utils = require("../common/utils.js");
|
|
41
41
|
|
|
42
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
42
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
43
43
|
|
|
44
44
|
var _RequiredComponent = _interopRequireDefault(require("../common/RequiredComponent"));
|
|
45
45
|
|
|
46
|
-
var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext
|
|
46
|
+
var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext"));
|
|
47
47
|
|
|
48
48
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
49
49
|
|
package/V3Textarea/V3Textarea.js
CHANGED
|
@@ -29,11 +29,11 @@ var _variables = require("../common/variables.js");
|
|
|
29
29
|
|
|
30
30
|
var _utils = require("../common/utils.js");
|
|
31
31
|
|
|
32
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
32
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
33
33
|
|
|
34
34
|
var _RequiredComponent = _interopRequireDefault(require("../common/RequiredComponent"));
|
|
35
35
|
|
|
36
|
-
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext
|
|
36
|
+
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext"));
|
|
37
37
|
|
|
38
38
|
var _templateObject;
|
|
39
39
|
|
package/accordion/Accordion.js
CHANGED
|
@@ -31,9 +31,9 @@ var _utils = require("../common/utils.js");
|
|
|
31
31
|
|
|
32
32
|
var _variables = require("../common/variables.js");
|
|
33
33
|
|
|
34
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
34
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
35
35
|
|
|
36
|
-
var _BackgroundColorContext = require("../BackgroundColorContext
|
|
36
|
+
var _BackgroundColorContext = require("../BackgroundColorContext");
|
|
37
37
|
|
|
38
38
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
39
39
|
|
|
@@ -29,7 +29,7 @@ var _utils = require("../common/utils.js");
|
|
|
29
29
|
|
|
30
30
|
var _variables = require("../common/variables.js");
|
|
31
31
|
|
|
32
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
32
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
33
33
|
|
|
34
34
|
var _templateObject;
|
|
35
35
|
|
|
@@ -113,7 +113,7 @@ var calculateWidth = function calculateWidth(margin) {
|
|
|
113
113
|
return "calc(100% - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
-
var AccordionGroupContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n cursor: ", ";\n\n & > :not(div:last-child) {\n & > div:first-child {\n border-radius: 0;\n border-bottom: ", ";\n border-color: ", ";\n\n & > .Mui-expanded {\n border-radius: 0;\n }\n & > .MuiButtonBase-root {\n border-radius: 0;\n }\n }\n }\n\n & > div:first-child {\n & > div:first-child {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom: ", ";\n border-color: ", ";\n\n & > .Mui-expanded {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n }\n & > .MuiButtonBase-root {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n }\n }\n }\n\n & > div:last-child {\n & > div:first-child {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n\n & > .Mui-expanded {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n & > .MuiButtonBase-root {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n }\n }\n"])), function (props) {
|
|
116
|
+
var AccordionGroupContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-block;\n width: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n cursor: ", ";\n\n & > :not(div:last-child) {\n & > div:first-child {\n border-radius: 0;\n border-bottom: ", ";\n border-color: ", ";\n\n & > .Mui-expanded {\n border-radius: 0;\n }\n & > .MuiButtonBase-root {\n border-radius: 0;\n }\n }\n }\n\n & > div:first-child {\n & > div:first-child {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom: ", ";\n border-color: ", ";\n\n & > .Mui-expanded {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n }\n & > .MuiButtonBase-root {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n }\n }\n }\n\n & > div:last-child {\n & > div:first-child {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n\n & > .Mui-expanded {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n & > .MuiButtonBase-root {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n }\n }\n"])), function (props) {
|
|
117
117
|
return calculateWidth(props.margin);
|
|
118
118
|
}, function (_ref3) {
|
|
119
119
|
var margin = _ref3.margin;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import DxcAccordionGroup from "./AccordionGroup";
|
|
3
|
+
import Title from "../../.storybook/components/Title";
|
|
4
|
+
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "Accordion group",
|
|
8
|
+
component: DxcAccordionGroup,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const Chromatic = () => (
|
|
12
|
+
<>
|
|
13
|
+
<Title title="States" theme="light" level={2} />
|
|
14
|
+
<ExampleContainer>
|
|
15
|
+
<Title title="Default" theme="light" level={4} />
|
|
16
|
+
<DxcAccordionGroup>
|
|
17
|
+
<DxcAccordionGroup.Accordion label="Accordion1" assistiveText="Assistive text" padding="medium">
|
|
18
|
+
<div>
|
|
19
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
20
|
+
leo lobortis eget.
|
|
21
|
+
</div>
|
|
22
|
+
</DxcAccordionGroup.Accordion>
|
|
23
|
+
<DxcAccordionGroup.Accordion label="Accordion2" assistiveText="Assistive text" padding="medium">
|
|
24
|
+
<div>
|
|
25
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
26
|
+
leo lobortis eget.
|
|
27
|
+
</div>
|
|
28
|
+
</DxcAccordionGroup.Accordion>
|
|
29
|
+
<DxcAccordionGroup.Accordion label="Accordion2" assistiveText="Assistive text" padding="medium">
|
|
30
|
+
<div>
|
|
31
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
32
|
+
leo lobortis eget.
|
|
33
|
+
</div>
|
|
34
|
+
</DxcAccordionGroup.Accordion>
|
|
35
|
+
</DxcAccordionGroup>
|
|
36
|
+
</ExampleContainer>
|
|
37
|
+
<ExampleContainer>
|
|
38
|
+
<Title title="Expanded" theme="light" level={4} />
|
|
39
|
+
<DxcAccordionGroup indexActive={1}>
|
|
40
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
41
|
+
<div>
|
|
42
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
43
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
44
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
45
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
46
|
+
anim id est laborum.
|
|
47
|
+
</div>
|
|
48
|
+
</DxcAccordionGroup.Accordion>
|
|
49
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
50
|
+
<div>
|
|
51
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
52
|
+
leo lobortis eget.
|
|
53
|
+
</div>
|
|
54
|
+
</DxcAccordionGroup.Accordion>
|
|
55
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
56
|
+
<div>
|
|
57
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
58
|
+
leo lobortis eget.
|
|
59
|
+
</div>
|
|
60
|
+
</DxcAccordionGroup.Accordion>
|
|
61
|
+
</DxcAccordionGroup>
|
|
62
|
+
</ExampleContainer>
|
|
63
|
+
<ExampleContainer>
|
|
64
|
+
<Title title="Disabled" theme="light" level={4} />
|
|
65
|
+
<DxcAccordionGroup disabled>
|
|
66
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
67
|
+
<div>
|
|
68
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
69
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
70
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
71
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
72
|
+
anim id est laborum.
|
|
73
|
+
</div>
|
|
74
|
+
</DxcAccordionGroup.Accordion>
|
|
75
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
76
|
+
<div>
|
|
77
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
78
|
+
leo lobortis eget.
|
|
79
|
+
</div>
|
|
80
|
+
</DxcAccordionGroup.Accordion>
|
|
81
|
+
</DxcAccordionGroup>
|
|
82
|
+
</ExampleContainer>
|
|
83
|
+
<Title title="Margins" theme="light" level={2} />
|
|
84
|
+
<ExampleContainer>
|
|
85
|
+
<Title title="Xxsmall" theme="light" level={4} />
|
|
86
|
+
<DxcAccordionGroup margin="xxsmall">
|
|
87
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
88
|
+
<div>
|
|
89
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
90
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
91
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
92
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
93
|
+
anim id est laborum.
|
|
94
|
+
</div>
|
|
95
|
+
</DxcAccordionGroup.Accordion>
|
|
96
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
97
|
+
<div>
|
|
98
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
99
|
+
leo lobortis eget.
|
|
100
|
+
</div>
|
|
101
|
+
</DxcAccordionGroup.Accordion>
|
|
102
|
+
</DxcAccordionGroup>
|
|
103
|
+
</ExampleContainer>
|
|
104
|
+
<ExampleContainer>
|
|
105
|
+
<Title title="Xsmall" theme="light" level={4} />
|
|
106
|
+
<DxcAccordionGroup margin="xsmall">
|
|
107
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
108
|
+
<div>
|
|
109
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
110
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
111
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
112
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
113
|
+
anim id est laborum.
|
|
114
|
+
</div>
|
|
115
|
+
</DxcAccordionGroup.Accordion>
|
|
116
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
117
|
+
<div>
|
|
118
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
119
|
+
leo lobortis eget.
|
|
120
|
+
</div>
|
|
121
|
+
</DxcAccordionGroup.Accordion>
|
|
122
|
+
</DxcAccordionGroup>
|
|
123
|
+
</ExampleContainer>
|
|
124
|
+
<ExampleContainer>
|
|
125
|
+
<Title title="Small" theme="light" level={4} />
|
|
126
|
+
<DxcAccordionGroup margin="small">
|
|
127
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
128
|
+
<div>
|
|
129
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
130
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
131
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
132
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
133
|
+
anim id est laborum.
|
|
134
|
+
</div>
|
|
135
|
+
</DxcAccordionGroup.Accordion>
|
|
136
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
137
|
+
<div>
|
|
138
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
139
|
+
leo lobortis eget.
|
|
140
|
+
</div>
|
|
141
|
+
</DxcAccordionGroup.Accordion>
|
|
142
|
+
</DxcAccordionGroup>
|
|
143
|
+
</ExampleContainer>
|
|
144
|
+
<ExampleContainer>
|
|
145
|
+
<Title title="Medium" theme="light" level={4} />
|
|
146
|
+
<DxcAccordionGroup margin="medium">
|
|
147
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
148
|
+
<div>
|
|
149
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
150
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
151
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
152
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
153
|
+
anim id est laborum.
|
|
154
|
+
</div>
|
|
155
|
+
</DxcAccordionGroup.Accordion>
|
|
156
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
157
|
+
<div>
|
|
158
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
159
|
+
leo lobortis eget.
|
|
160
|
+
</div>
|
|
161
|
+
</DxcAccordionGroup.Accordion>
|
|
162
|
+
</DxcAccordionGroup>
|
|
163
|
+
</ExampleContainer>
|
|
164
|
+
<ExampleContainer>
|
|
165
|
+
<Title title="Large" theme="light" level={4} />
|
|
166
|
+
<DxcAccordionGroup margin="large">
|
|
167
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
168
|
+
<div>
|
|
169
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
170
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
171
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
172
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
173
|
+
anim id est laborum.
|
|
174
|
+
</div>
|
|
175
|
+
</DxcAccordionGroup.Accordion>
|
|
176
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
177
|
+
<div>
|
|
178
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
179
|
+
leo lobortis eget.
|
|
180
|
+
</div>
|
|
181
|
+
</DxcAccordionGroup.Accordion>
|
|
182
|
+
</DxcAccordionGroup>
|
|
183
|
+
</ExampleContainer>
|
|
184
|
+
<ExampleContainer>
|
|
185
|
+
<Title title="Xlarge" theme="light" level={4} />
|
|
186
|
+
<DxcAccordionGroup margin="xlarge">
|
|
187
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
188
|
+
<div>
|
|
189
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
190
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
191
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
192
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
193
|
+
anim id est laborum.
|
|
194
|
+
</div>
|
|
195
|
+
</DxcAccordionGroup.Accordion>
|
|
196
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
197
|
+
<div>
|
|
198
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
199
|
+
leo lobortis eget.
|
|
200
|
+
</div>
|
|
201
|
+
</DxcAccordionGroup.Accordion>
|
|
202
|
+
</DxcAccordionGroup>
|
|
203
|
+
</ExampleContainer>
|
|
204
|
+
<ExampleContainer>
|
|
205
|
+
<Title title="Xxlarge" theme="light" level={4} />
|
|
206
|
+
<DxcAccordionGroup margin="xxlarge">
|
|
207
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
208
|
+
<div>
|
|
209
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
210
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
211
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
212
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
213
|
+
anim id est laborum.
|
|
214
|
+
</div>
|
|
215
|
+
</DxcAccordionGroup.Accordion>
|
|
216
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
217
|
+
<div>
|
|
218
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
219
|
+
leo lobortis eget.
|
|
220
|
+
</div>
|
|
221
|
+
</DxcAccordionGroup.Accordion>
|
|
222
|
+
</DxcAccordionGroup>
|
|
223
|
+
</ExampleContainer>
|
|
224
|
+
</>
|
|
225
|
+
);
|
package/alert/Alert.js
CHANGED
|
@@ -21,9 +21,9 @@ var _variables = require("../common/variables.js");
|
|
|
21
21
|
|
|
22
22
|
var _utils = require("../common/utils.js");
|
|
23
23
|
|
|
24
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
24
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
25
25
|
|
|
26
|
-
var _BackgroundColorContext = require("../BackgroundColorContext
|
|
26
|
+
var _BackgroundColorContext = require("../BackgroundColorContext");
|
|
27
27
|
|
|
28
28
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
29
29
|
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import DxcAlert from "./Alert";
|
|
3
|
+
import Title from "../../.storybook/components/Title";
|
|
4
|
+
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "Alert",
|
|
8
|
+
component: DxcAlert,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const Chromatic = () => (
|
|
12
|
+
<>
|
|
13
|
+
<ExampleContainer>
|
|
14
|
+
<Title title="Info" theme="light" level={4} />
|
|
15
|
+
<DxcAlert inlineText="Info type alert with inline text." />
|
|
16
|
+
</ExampleContainer>
|
|
17
|
+
<ExampleContainer>
|
|
18
|
+
<Title title="Confirm" theme="light" level={4} />
|
|
19
|
+
<DxcAlert type="confirm" inlineText="Confirm type alert with inline text." />
|
|
20
|
+
</ExampleContainer>
|
|
21
|
+
<ExampleContainer>
|
|
22
|
+
<Title title="Warning" theme="light" level={4} />
|
|
23
|
+
<DxcAlert type="warning" inlineText="Warning type alert with inline text." />
|
|
24
|
+
</ExampleContainer>
|
|
25
|
+
<ExampleContainer>
|
|
26
|
+
<Title title="Error" theme="light" level={4} />
|
|
27
|
+
<DxcAlert type="error" inlineText="Error type alert with inline text." />
|
|
28
|
+
</ExampleContainer>
|
|
29
|
+
<ExampleContainer>
|
|
30
|
+
<Title title="With close button" theme="light" level={4} />
|
|
31
|
+
<DxcAlert inlineText="Info type alert with inline text and close button." onClose={() => {}} />
|
|
32
|
+
</ExampleContainer>
|
|
33
|
+
<ExampleContainer pseudoState="pseudo-hover">
|
|
34
|
+
<Title title="With hovered close button" theme="light" level={4} />
|
|
35
|
+
<DxcAlert inlineText="Info type alert with inline text and close button." onClose={() => {}} />
|
|
36
|
+
</ExampleContainer>
|
|
37
|
+
<ExampleContainer pseudoState="pseudo-focus">
|
|
38
|
+
<Title title="With focused close button" theme="light" level={4} />
|
|
39
|
+
<DxcAlert inlineText="Info type alert with inline text and close button." onClose={() => {}} />
|
|
40
|
+
</ExampleContainer>
|
|
41
|
+
<ExampleContainer pseudoState="pseudo-active">
|
|
42
|
+
<Title title="With actived close button" theme="light" level={4} />
|
|
43
|
+
<DxcAlert inlineText="Info type alert with inline text and close button." onClose={() => {}} />
|
|
44
|
+
</ExampleContainer>
|
|
45
|
+
<ExampleContainer>
|
|
46
|
+
<Title title="With children" theme="light" level={4} />
|
|
47
|
+
<DxcAlert>
|
|
48
|
+
<div>
|
|
49
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
50
|
+
lobortis eget.
|
|
51
|
+
</div>
|
|
52
|
+
</DxcAlert>
|
|
53
|
+
</ExampleContainer>
|
|
54
|
+
<ExampleContainer>
|
|
55
|
+
<Title title="With inline text and children" theme="light" level={4} />
|
|
56
|
+
<DxcAlert inlineText="Info type alert with inline text.">
|
|
57
|
+
<div>
|
|
58
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
59
|
+
lobortis eget.
|
|
60
|
+
</div>
|
|
61
|
+
</DxcAlert>
|
|
62
|
+
</ExampleContainer>
|
|
63
|
+
<Title title="Margins" theme="light" level={2} />
|
|
64
|
+
<ExampleContainer>
|
|
65
|
+
<Title title="Xxsmall" theme="light" level={4} />
|
|
66
|
+
<DxcAlert margin="xxsmall" inlineText="Info type alert with inline text and xxsmall margin." />
|
|
67
|
+
</ExampleContainer>
|
|
68
|
+
<ExampleContainer>
|
|
69
|
+
<Title title="Xsmall" theme="light" level={4} />
|
|
70
|
+
<DxcAlert margin="xsmall" inlineText="Info type alert with inline text and xsmall margin." />
|
|
71
|
+
</ExampleContainer>
|
|
72
|
+
<ExampleContainer>
|
|
73
|
+
<Title title="Small" theme="light" level={4} />
|
|
74
|
+
<DxcAlert margin="small" inlineText="Info type alert with inline text and small margin." />
|
|
75
|
+
</ExampleContainer>
|
|
76
|
+
<ExampleContainer>
|
|
77
|
+
<Title title="Medium" theme="light" level={4} />
|
|
78
|
+
<DxcAlert margin="medium" inlineText="Info type alert with inline text and medium margin." />
|
|
79
|
+
</ExampleContainer>
|
|
80
|
+
<ExampleContainer>
|
|
81
|
+
<Title title="Large" theme="light" level={4} />
|
|
82
|
+
<DxcAlert margin="large" inlineText="Info type alert with inline text and large margin." />
|
|
83
|
+
</ExampleContainer>
|
|
84
|
+
<ExampleContainer>
|
|
85
|
+
<Title title="Xlarge" theme="light" level={4} />
|
|
86
|
+
<DxcAlert margin="xlarge" inlineText="Info type alert with inline text and xlarge margin." />
|
|
87
|
+
</ExampleContainer>
|
|
88
|
+
<ExampleContainer>
|
|
89
|
+
<Title title="Xxlarge" theme="light" level={4} />
|
|
90
|
+
<DxcAlert margin="xxlarge" inlineText="Info type alert with inline text and xxlarge margin." />
|
|
91
|
+
</ExampleContainer>
|
|
92
|
+
<Title title="Sizes" theme="light" level={2} />
|
|
93
|
+
<ExampleContainer>
|
|
94
|
+
<Title title="FitContent" theme="light" level={4} />
|
|
95
|
+
<DxcAlert
|
|
96
|
+
size="fitContent"
|
|
97
|
+
inlineText="Info type alert with inline text, children, close button and fitContent size."
|
|
98
|
+
onClose={() => {}}
|
|
99
|
+
>
|
|
100
|
+
<div>
|
|
101
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
102
|
+
lobortis eget.
|
|
103
|
+
</div>
|
|
104
|
+
</DxcAlert>
|
|
105
|
+
</ExampleContainer>
|
|
106
|
+
<ExampleContainer>
|
|
107
|
+
<Title title="Small" theme="light" level={4} />
|
|
108
|
+
<DxcAlert
|
|
109
|
+
size="small"
|
|
110
|
+
inlineText="Info type alert with inline text, children, close button and small size."
|
|
111
|
+
onClose={() => {}}
|
|
112
|
+
>
|
|
113
|
+
<div>
|
|
114
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
115
|
+
lobortis eget.
|
|
116
|
+
</div>
|
|
117
|
+
</DxcAlert>
|
|
118
|
+
</ExampleContainer>
|
|
119
|
+
<ExampleContainer>
|
|
120
|
+
<Title title="Medium" theme="light" level={4} />
|
|
121
|
+
<DxcAlert
|
|
122
|
+
size="medium"
|
|
123
|
+
inlineText="Info type alert with inline text, children, close button and medium size."
|
|
124
|
+
onClose={() => {}}
|
|
125
|
+
>
|
|
126
|
+
<div>
|
|
127
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
128
|
+
lobortis eget.
|
|
129
|
+
</div>
|
|
130
|
+
</DxcAlert>
|
|
131
|
+
</ExampleContainer>
|
|
132
|
+
<ExampleContainer>
|
|
133
|
+
<Title title="Large" theme="light" level={4} />
|
|
134
|
+
<DxcAlert
|
|
135
|
+
size="large"
|
|
136
|
+
inlineText="Info type alert with inline text, children, close button and large size."
|
|
137
|
+
onClose={() => {}}
|
|
138
|
+
>
|
|
139
|
+
<div>
|
|
140
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
141
|
+
lobortis eget.
|
|
142
|
+
</div>
|
|
143
|
+
</DxcAlert>
|
|
144
|
+
</ExampleContainer>
|
|
145
|
+
<ExampleContainer>
|
|
146
|
+
<Title title="FillParent" theme="light" level={4} />
|
|
147
|
+
<DxcAlert
|
|
148
|
+
size="fillParent"
|
|
149
|
+
inlineText="Info type alert with inline text, children, close button and fillParent size."
|
|
150
|
+
onClose={() => {}}
|
|
151
|
+
>
|
|
152
|
+
<div>
|
|
153
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
154
|
+
lobortis eget.
|
|
155
|
+
</div>
|
|
156
|
+
</DxcAlert>
|
|
157
|
+
</ExampleContainer>
|
|
158
|
+
</>
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
export const ModalAlert = () => (
|
|
162
|
+
<ExampleContainer>
|
|
163
|
+
<DxcAlert inlineText="Modal alert." mode="modal" onClose={() => {}}>
|
|
164
|
+
<div>
|
|
165
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
166
|
+
lobortis eget.
|
|
167
|
+
</div>
|
|
168
|
+
</DxcAlert>
|
|
169
|
+
</ExampleContainer>
|
|
170
|
+
);
|
package/alert/types.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ declare type Props = {
|
|
|
38
38
|
*/
|
|
39
39
|
margin?: Space | Margin;
|
|
40
40
|
/**
|
|
41
|
-
* Size of the component
|
|
41
|
+
* Size of the component.
|
|
42
42
|
*/
|
|
43
43
|
size?: "small" | "medium" | "large" | "fillParent" | "fitContent";
|
|
44
44
|
/**
|
package/badge/Badge.js
CHANGED
|
@@ -15,7 +15,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
17
17
|
|
|
18
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
18
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
19
19
|
|
|
20
20
|
var _templateObject;
|
|
21
21
|
|
package/box/Box.d.ts
ADDED