@dxc-technology/halstack-react 10.0.0 → 11.0.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/BackgroundColorContext.d.ts +2 -2
- package/BackgroundColorContext.js +5 -17
- package/HalstackContext.d.ts +26 -6
- package/HalstackContext.js +9 -34
- package/README.md +47 -0
- package/accordion/Accordion.js +21 -58
- package/accordion/Accordion.stories.tsx +1 -15
- package/accordion/Accordion.test.js +18 -33
- package/accordion/types.d.ts +5 -5
- package/accordion-group/AccordionGroup.js +15 -42
- package/accordion-group/AccordionGroup.stories.tsx +1 -1
- package/accordion-group/AccordionGroup.test.js +42 -60
- package/accordion-group/AccordionGroupAccordion.js +9 -21
- package/accordion-group/types.d.ts +6 -6
- package/alert/Alert.js +14 -46
- package/alert/Alert.test.js +28 -45
- package/alert/types.d.ts +5 -5
- package/badge/Badge.js +4 -17
- package/badge/types.d.ts +1 -1
- package/bleed/Bleed.js +13 -21
- package/bleed/types.d.ts +2 -2
- package/box/Box.js +10 -29
- package/box/Box.test.js +1 -6
- package/box/types.d.ts +3 -3
- package/bulleted-list/BulletedList.js +7 -33
- package/bulleted-list/BulletedList.stories.tsx +1 -91
- package/bulleted-list/types.d.ts +5 -5
- package/button/Button.js +23 -46
- package/button/Button.stories.tsx +5 -86
- package/button/Button.test.js +11 -21
- package/button/types.d.ts +4 -4
- package/card/Card.js +21 -44
- package/card/Card.test.js +10 -21
- package/card/types.d.ts +5 -5
- package/checkbox/Checkbox.js +81 -111
- package/checkbox/Checkbox.stories.tsx +16 -54
- package/checkbox/Checkbox.test.js +107 -63
- package/checkbox/types.d.ts +8 -4
- package/chip/Chip.js +12 -31
- package/chip/Chip.test.js +15 -28
- package/chip/types.d.ts +4 -4
- package/common/coreTokens.js +1 -2
- package/common/utils.js +2 -8
- package/common/variables.d.ts +23 -6
- package/common/variables.js +25 -15
- package/date-input/Calendar.js +13 -57
- package/date-input/DateInput.js +50 -96
- package/date-input/DateInput.stories.tsx +11 -30
- package/date-input/DateInput.test.js +674 -701
- package/date-input/DatePicker.js +11 -42
- package/date-input/Icons.d.ts +6 -6
- package/date-input/Icons.js +6 -23
- package/date-input/YearPicker.js +8 -34
- package/date-input/types.d.ts +27 -21
- package/dialog/Dialog.js +11 -35
- package/dialog/Dialog.test.js +125 -187
- package/dialog/types.d.ts +18 -13
- package/dropdown/Dropdown.js +39 -93
- package/dropdown/Dropdown.test.js +391 -378
- package/dropdown/DropdownMenu.js +8 -19
- package/dropdown/DropdownMenuItem.js +5 -17
- package/dropdown/types.d.ts +17 -19
- package/file-input/FileInput.js +131 -220
- package/file-input/FileInput.stories.tsx +1 -1
- package/file-input/FileInput.test.js +293 -342
- package/file-input/FileItem.js +12 -39
- package/file-input/types.d.ts +9 -9
- package/flex/Flex.js +25 -39
- package/flex/types.d.ts +6 -6
- package/footer/Footer.js +9 -39
- package/footer/Footer.stories.tsx +8 -7
- package/footer/Footer.test.js +18 -32
- package/footer/Icons.d.ts +2 -2
- package/footer/Icons.js +2 -7
- package/footer/types.d.ts +13 -13
- package/grid/Grid.js +1 -16
- package/grid/types.d.ts +10 -10
- package/header/Header.d.ts +1 -1
- package/header/Header.js +19 -64
- package/header/Header.test.js +12 -25
- package/header/Icons.d.ts +2 -2
- package/header/Icons.js +2 -7
- package/header/types.d.ts +5 -7
- package/heading/Heading.js +9 -31
- package/heading/Heading.test.js +70 -87
- package/heading/types.d.ts +7 -7
- package/image/Image.d.ts +4 -0
- package/image/Image.js +70 -0
- package/image/Image.stories.tsx +127 -0
- package/image/types.d.ts +72 -0
- package/inset/Inset.js +13 -21
- package/inset/types.d.ts +2 -2
- package/layout/ApplicationLayout.d.ts +1 -1
- package/layout/ApplicationLayout.js +25 -65
- package/layout/ApplicationLayout.stories.tsx +1 -1
- package/layout/Icons.d.ts +8 -5
- package/layout/Icons.js +51 -59
- package/layout/SidenavContext.d.ts +1 -1
- package/layout/SidenavContext.js +3 -9
- package/layout/types.d.ts +3 -3
- package/link/Link.js +21 -42
- package/link/Link.test.js +23 -41
- package/link/types.d.ts +14 -14
- package/main.d.ts +3 -2
- package/main.js +10 -51
- package/nav-tabs/NavTabs.js +11 -43
- package/nav-tabs/NavTabs.stories.tsx +1 -1
- package/nav-tabs/NavTabs.test.js +36 -43
- package/nav-tabs/Tab.js +16 -45
- package/nav-tabs/types.d.ts +9 -9
- package/number-input/NumberInput.d.ts +7 -0
- package/number-input/NumberInput.js +26 -35
- package/number-input/NumberInput.stories.tsx +42 -26
- package/number-input/NumberInput.test.js +700 -412
- package/number-input/types.d.ts +11 -5
- package/package.json +28 -26
- package/paginator/Icons.d.ts +5 -5
- package/paginator/Icons.js +5 -19
- package/paginator/Paginator.js +14 -39
- package/paginator/Paginator.test.js +224 -207
- package/paginator/types.d.ts +3 -3
- package/paragraph/Paragraph.js +3 -14
- package/paragraph/Paragraph.stories.tsx +0 -17
- package/password-input/Icons.d.ts +6 -0
- package/password-input/Icons.js +35 -0
- package/password-input/PasswordInput.js +57 -126
- package/password-input/PasswordInput.stories.tsx +1 -32
- package/password-input/PasswordInput.test.js +157 -140
- package/password-input/types.d.ts +8 -7
- package/progress-bar/ProgressBar.js +16 -42
- package/progress-bar/{ProgressBar.stories.jsx → ProgressBar.stories.tsx} +1 -1
- package/progress-bar/ProgressBar.test.js +35 -52
- package/progress-bar/types.d.ts +3 -3
- package/quick-nav/QuickNav.js +4 -27
- package/quick-nav/QuickNav.stories.tsx +1 -1
- package/quick-nav/types.d.ts +10 -10
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +22 -54
- package/radio-group/RadioGroup.js +37 -83
- package/radio-group/RadioGroup.stories.tsx +10 -10
- package/radio-group/RadioGroup.test.js +504 -470
- package/radio-group/types.d.ts +8 -8
- package/resultset-table/Icons.d.ts +7 -0
- package/{resultsetTable → resultset-table}/Icons.js +1 -5
- package/{resultsetTable → resultset-table}/ResultsetTable.js +22 -58
- package/{resultsetTable → resultset-table}/ResultsetTable.test.js +72 -92
- package/{resultsetTable → resultset-table}/types.d.ts +7 -7
- package/select/Icons.d.ts +7 -7
- package/select/Icons.js +1 -5
- package/select/Listbox.js +13 -39
- package/select/Option.js +9 -26
- package/select/Select.js +54 -138
- package/select/Select.stories.tsx +3 -3
- package/select/Select.test.js +1906 -1800
- package/select/types.d.ts +14 -15
- package/sidenav/Icons.d.ts +4 -4
- package/sidenav/Icons.js +1 -5
- package/sidenav/Sidenav.js +24 -63
- package/sidenav/Sidenav.test.js +3 -10
- package/sidenav/types.d.ts +18 -18
- package/slider/Slider.js +38 -86
- package/slider/Slider.test.js +107 -103
- package/slider/types.d.ts +4 -4
- package/spinner/Spinner.js +10 -40
- package/spinner/Spinner.test.js +25 -34
- package/spinner/types.d.ts +3 -3
- package/switch/Switch.js +26 -69
- package/switch/Switch.stories.tsx +0 -34
- package/switch/Switch.test.js +51 -96
- package/switch/types.d.ts +4 -4
- package/table/Table.js +4 -23
- package/table/Table.test.js +1 -6
- package/table/types.d.ts +8 -8
- package/tabs/Tab.js +10 -29
- package/tabs/Tabs.js +48 -124
- package/tabs/Tabs.test.js +62 -118
- package/tabs/types.d.ts +19 -19
- package/tag/Tag.js +21 -51
- package/tag/Tag.test.js +19 -30
- package/tag/types.d.ts +7 -7
- package/text-input/Icons.d.ts +5 -5
- package/text-input/Icons.js +1 -5
- package/text-input/Suggestion.js +9 -26
- package/text-input/Suggestions.d.ts +1 -1
- package/text-input/Suggestions.js +12 -57
- package/text-input/TextInput.js +182 -263
- package/text-input/TextInput.stories.tsx +48 -152
- package/text-input/TextInput.test.js +1210 -1194
- package/text-input/types.d.ts +25 -17
- package/textarea/Textarea.js +60 -96
- package/textarea/{Textarea.stories.jsx → Textarea.stories.tsx} +58 -99
- package/textarea/Textarea.test.js +150 -179
- package/textarea/types.d.ts +9 -5
- package/toggle-group/ToggleGroup.js +91 -105
- package/toggle-group/ToggleGroup.stories.tsx +7 -4
- package/toggle-group/ToggleGroup.test.js +68 -87
- package/toggle-group/types.d.ts +26 -17
- package/typography/Typography.js +4 -13
- package/typography/types.d.ts +1 -1
- package/useTheme.d.ts +20 -3
- package/useTheme.js +1 -8
- package/useTranslatedLabels.js +1 -7
- package/utils/BaseTypography.d.ts +2 -2
- package/utils/BaseTypography.js +16 -30
- package/utils/FocusLock.js +12 -36
- package/wizard/Wizard.js +14 -49
- package/wizard/Wizard.test.js +53 -80
- package/wizard/types.d.ts +6 -6
- package/number-input/NumberInputContext.d.ts +0 -4
- package/number-input/NumberInputContext.js +0 -19
- package/number-input/numberInputContextTypes.d.ts +0 -19
- package/resultsetTable/Icons.d.ts +0 -7
- package/slider/Slider.stories.tsx +0 -240
- /package/{resultsetTable → image}/types.js +0 -0
- /package/{resultsetTable → resultset-table}/ResultsetTable.d.ts +0 -0
- /package/{resultsetTable → resultset-table}/ResultsetTable.stories.tsx +0 -0
- /package/{number-input/numberInputContextTypes.js → resultset-table/types.js} +0 -0
- /package/spinner/{Spinner.stories.jsx → Spinner.stories.tsx} +0 -0
- /package/table/{Table.stories.jsx → Table.stories.tsx} +0 -0
package/alert/Alert.test.js
CHANGED
|
@@ -1,92 +1,75 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
|
|
7
5
|
var _react2 = require("@testing-library/react");
|
|
8
|
-
|
|
9
6
|
var _Alert = _interopRequireDefault(require("./Alert.tsx"));
|
|
10
|
-
|
|
11
7
|
describe("Alert component tests", function () {
|
|
12
8
|
test("Info alert renders with correct text", function () {
|
|
13
9
|
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Alert["default"], {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
type: "info",
|
|
11
|
+
inlineText: "info-alert-text"
|
|
12
|
+
})),
|
|
13
|
+
getByText = _render.getByText;
|
|
19
14
|
expect(getByText("information")).toBeTruthy();
|
|
20
15
|
expect(getByText("info-alert-text")).toBeTruthy();
|
|
21
16
|
});
|
|
22
17
|
test("Confirm alert renders with correct text", function () {
|
|
23
18
|
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Alert["default"], {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
type: "confirm",
|
|
20
|
+
inlineText: "confirm-alert-text"
|
|
21
|
+
})),
|
|
22
|
+
getByText = _render2.getByText;
|
|
29
23
|
expect(getByText("success")).toBeTruthy();
|
|
30
24
|
expect(getByText("confirm-alert-text")).toBeTruthy();
|
|
31
25
|
});
|
|
32
26
|
test("Warning alert renders with correct text", function () {
|
|
33
27
|
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Alert["default"], {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
type: "warning",
|
|
29
|
+
inlineText: "warning-alert-text"
|
|
30
|
+
})),
|
|
31
|
+
getByText = _render3.getByText;
|
|
39
32
|
expect(getByText("warning")).toBeTruthy();
|
|
40
33
|
expect(getByText("warning-alert-text")).toBeTruthy();
|
|
41
34
|
});
|
|
42
35
|
test("Error alert renders with correct text", function () {
|
|
43
36
|
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Alert["default"], {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
type: "error",
|
|
38
|
+
inlineText: "error-alert-text"
|
|
39
|
+
})),
|
|
40
|
+
getByText = _render4.getByText;
|
|
49
41
|
expect(getByText("error")).toBeTruthy();
|
|
50
42
|
expect(getByText("error-alert-text")).toBeTruthy();
|
|
51
43
|
});
|
|
52
44
|
test("Alert renders with correct children", function () {
|
|
53
45
|
var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Alert["default"], {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
inlineText: "alert-text"
|
|
47
|
+
}, /*#__PURE__*/_react["default"].createElement("p", null, "sample-children"))),
|
|
48
|
+
getByText = _render5.getByText;
|
|
58
49
|
expect(getByText("alert-text")).toBeTruthy();
|
|
59
50
|
expect(getByText("sample-children")).toBeTruthy();
|
|
60
51
|
});
|
|
61
52
|
test("Calls correct function on close", function () {
|
|
62
53
|
var onClose = jest.fn();
|
|
63
|
-
|
|
64
54
|
var _render6 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Alert["default"], {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
55
|
+
onClose: onClose,
|
|
56
|
+
inlineText: "info-alert-text"
|
|
57
|
+
})),
|
|
58
|
+
getByRole = _render6.getByRole;
|
|
70
59
|
var closeButton = getByRole("button");
|
|
71
|
-
|
|
72
60
|
_react2.fireEvent.click(closeButton);
|
|
73
|
-
|
|
74
61
|
expect(onClose).toHaveBeenCalled();
|
|
75
62
|
});
|
|
76
63
|
test("Modal alert calls correct function on close", function () {
|
|
77
64
|
var onClose = jest.fn();
|
|
78
|
-
|
|
79
65
|
var _render7 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Alert["default"], {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
66
|
+
onClose: onClose,
|
|
67
|
+
mode: "modal",
|
|
68
|
+
inlineText: "info-alert-text"
|
|
69
|
+
})),
|
|
70
|
+
getByRole = _render7.getByRole;
|
|
86
71
|
var closeButton = getByRole("button");
|
|
87
|
-
|
|
88
72
|
_react2.fireEvent.click(closeButton);
|
|
89
|
-
|
|
90
73
|
expect(onClose).toHaveBeenCalled();
|
|
91
74
|
});
|
|
92
75
|
});
|
package/alert/types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
type Margin = {
|
|
4
4
|
top?: Space;
|
|
5
5
|
bottom?: Space;
|
|
6
6
|
left?: Space;
|
|
7
7
|
right?: Space;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type Props = {
|
|
10
10
|
/**
|
|
11
11
|
* Uses on of the available alert types.
|
|
12
12
|
*/
|
|
@@ -17,7 +17,7 @@ declare type Props = {
|
|
|
17
17
|
* There is no overlay layer. Position should be decided by the user.
|
|
18
18
|
* 'modal': The alert will be displayed in the middle of the screen with an overlay layer behind.
|
|
19
19
|
* The onClose function will be executed when the X button or the overlay is clicked. d
|
|
20
|
-
* The user has the responsibility of
|
|
20
|
+
* The user has the responsibility of hiding the modal in the onClose function, otherwise the modal will remain visible.
|
|
21
21
|
*/
|
|
22
22
|
mode?: "inline" | "modal";
|
|
23
23
|
/**
|
|
@@ -42,7 +42,7 @@ declare type Props = {
|
|
|
42
42
|
*/
|
|
43
43
|
size?: "small" | "medium" | "large" | "fillParent" | "fitContent";
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Value of the tabindex attribute applied to the close button.
|
|
46
46
|
*/
|
|
47
47
|
tabIndex?: number;
|
|
48
48
|
};
|
package/badge/Badge.js
CHANGED
|
@@ -1,31 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports["default"] = void 0;
|
|
11
|
-
|
|
12
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
10
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
11
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
17
|
-
|
|
18
12
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
19
|
-
|
|
20
13
|
var _templateObject;
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
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; }
|
|
25
|
-
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
26
16
|
var DxcBadge = function DxcBadge(_ref) {
|
|
27
17
|
var notificationText = _ref.notificationText,
|
|
28
|
-
|
|
18
|
+
disabled = _ref.disabled;
|
|
29
19
|
var colorsTheme = (0, _useTheme["default"])();
|
|
30
20
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
31
21
|
theme: colorsTheme.tabs
|
|
@@ -34,7 +24,6 @@ var DxcBadge = function DxcBadge(_ref) {
|
|
|
34
24
|
disabled: disabled
|
|
35
25
|
}, /*#__PURE__*/_react["default"].createElement("span", null, notificationText)));
|
|
36
26
|
};
|
|
37
|
-
|
|
38
27
|
var StyledDxcBadge = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n width: ", ";\n height: ", ";\n border-radius: ", ";\n display: flex;\n padding-bottom: 1px;\n padding-right: 1px;\n flex-wrap: wrap;\n box-sizing: border-box;\n align-items: center;\n line-height: 1;\n align-content: center;\n flex-direction: row;\n justify-content: center;\n"])), function (props) {
|
|
39
28
|
return props.disabled ? props.theme.disabledBadgeBackgroundColor : props.theme.badgeBackgroundColor;
|
|
40
29
|
}, function (props) {
|
|
@@ -56,6 +45,4 @@ var StyledDxcBadge = _styledComponents["default"].div(_templateObject || (_templ
|
|
|
56
45
|
}, function (props) {
|
|
57
46
|
return props.notificationText === true ? props.theme.badgeRadius : props.theme.badgeRadiusWithNotificationNumber;
|
|
58
47
|
});
|
|
59
|
-
|
|
60
|
-
var _default = DxcBadge;
|
|
61
|
-
exports["default"] = _default;
|
|
48
|
+
var _default = exports["default"] = DxcBadge;
|
package/badge/types.d.ts
CHANGED
package/bleed/Bleed.js
CHANGED
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = Bleed;
|
|
9
|
-
|
|
10
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
-
|
|
16
11
|
var _templateObject;
|
|
17
|
-
|
|
18
12
|
function Bleed(_ref) {
|
|
19
13
|
var space = _ref.space,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
horizontal = _ref.horizontal,
|
|
15
|
+
vertical = _ref.vertical,
|
|
16
|
+
top = _ref.top,
|
|
17
|
+
right = _ref.right,
|
|
18
|
+
bottom = _ref.bottom,
|
|
19
|
+
left = _ref.left,
|
|
20
|
+
children = _ref.children;
|
|
27
21
|
return /*#__PURE__*/_react["default"].createElement(StyledBleed, {
|
|
28
22
|
space: space,
|
|
29
23
|
horizontal: horizontal,
|
|
@@ -34,18 +28,16 @@ function Bleed(_ref) {
|
|
|
34
28
|
left: left
|
|
35
29
|
}, children);
|
|
36
30
|
}
|
|
37
|
-
|
|
38
31
|
function getSpacingValue(spacingName) {
|
|
39
32
|
return spacingName ? spacingName : "0rem";
|
|
40
33
|
}
|
|
41
|
-
|
|
42
34
|
var StyledBleed = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), function (_ref2) {
|
|
43
35
|
var space = _ref2.space,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
horizontal = _ref2.horizontal,
|
|
37
|
+
vertical = _ref2.vertical,
|
|
38
|
+
top = _ref2.top,
|
|
39
|
+
right = _ref2.right,
|
|
40
|
+
bottom = _ref2.bottom,
|
|
41
|
+
left = _ref2.left;
|
|
50
42
|
return "\n margin: -".concat(getSpacingValue(top || vertical || space), " -").concat(getSpacingValue(right || horizontal || space), " -").concat(getSpacingValue(bottom || vertical || space), " -").concat(getSpacingValue(left || horizontal || space), ";\n");
|
|
51
43
|
});
|
package/bleed/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type Spacing = "0rem" | "0.125rem" | "0.25rem" | "0.5rem" | "1rem" | "1.5rem" | "2rem" | "3rem" | "4rem" | "5rem";
|
|
3
|
+
type Props = {
|
|
4
4
|
/**
|
|
5
5
|
* Applies the spacing scale to all sides.
|
|
6
6
|
*/
|
package/box/Box.js
CHANGED
|
@@ -1,45 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports["default"] = void 0;
|
|
11
|
-
|
|
12
9
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
-
|
|
14
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
15
|
-
|
|
16
11
|
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
|
|
18
12
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
|
-
|
|
20
13
|
var _variables = require("../common/variables");
|
|
21
|
-
|
|
22
14
|
var _utils = require("../common/utils");
|
|
23
|
-
|
|
24
15
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
25
|
-
|
|
26
16
|
var _BackgroundColorContext = require("../BackgroundColorContext");
|
|
27
|
-
|
|
28
17
|
var _templateObject;
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(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; }
|
|
33
|
-
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
34
20
|
var DxcBox = function DxcBox(_ref) {
|
|
35
21
|
var _ref$shadowDepth = _ref.shadowDepth,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
22
|
+
shadowDepth = _ref$shadowDepth === void 0 ? 2 : _ref$shadowDepth,
|
|
23
|
+
_ref$display = _ref.display,
|
|
24
|
+
display = _ref$display === void 0 ? "inline-flex" : _ref$display,
|
|
25
|
+
children = _ref.children,
|
|
26
|
+
margin = _ref.margin,
|
|
27
|
+
_ref$size = _ref.size,
|
|
28
|
+
size = _ref$size === void 0 ? "fitContent" : _ref$size;
|
|
43
29
|
var colorsTheme = (0, _useTheme["default"])();
|
|
44
30
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
45
31
|
theme: colorsTheme.box
|
|
@@ -52,7 +38,6 @@ var DxcBox = function DxcBox(_ref) {
|
|
|
52
38
|
color: colorsTheme.box.backgroundColor
|
|
53
39
|
}, children)));
|
|
54
40
|
};
|
|
55
|
-
|
|
56
41
|
var sizes = {
|
|
57
42
|
small: "48px",
|
|
58
43
|
medium: "240px",
|
|
@@ -60,11 +45,9 @@ var sizes = {
|
|
|
60
45
|
fillParent: "100%",
|
|
61
46
|
fitContent: "fit-content"
|
|
62
47
|
};
|
|
63
|
-
|
|
64
48
|
var calculateWidth = function calculateWidth(margin, size) {
|
|
65
49
|
return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
|
|
66
50
|
};
|
|
67
|
-
|
|
68
51
|
var Box = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n overflow: hidden;\n width: ", ";\n background-color: ", ";\n box-shadow: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"])), function (props) {
|
|
69
52
|
return props.display;
|
|
70
53
|
}, function (props) {
|
|
@@ -92,6 +75,4 @@ var Box = _styledComponents["default"].div(_templateObject || (_templateObject =
|
|
|
92
75
|
}, function (props) {
|
|
93
76
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
94
77
|
});
|
|
95
|
-
|
|
96
|
-
var _default = DxcBox;
|
|
97
|
-
exports["default"] = _default;
|
|
78
|
+
var _default = exports["default"] = DxcBox;
|
package/box/Box.test.js
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
|
|
7
5
|
var _react2 = require("@testing-library/react");
|
|
8
|
-
|
|
9
6
|
var _Card = _interopRequireDefault(require("../card/Card.tsx"));
|
|
10
|
-
|
|
11
7
|
describe("Box component tests", function () {
|
|
12
8
|
test("Box renders with correct text", function () {
|
|
13
9
|
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Card["default"], null, "test-box")),
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
getByText = _render.getByText;
|
|
16
11
|
expect(getByText("test-box")).toBeTruthy();
|
|
17
12
|
});
|
|
18
13
|
});
|
package/box/types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
type Margin = {
|
|
4
4
|
top?: Space;
|
|
5
5
|
bottom?: Space;
|
|
6
6
|
left?: Space;
|
|
7
7
|
right?: Space;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type Props = {
|
|
10
10
|
/**
|
|
11
11
|
* The size of the shadow to be displayed around the box.
|
|
12
12
|
*/
|
|
@@ -1,45 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports["default"] = void 0;
|
|
11
|
-
|
|
12
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
11
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
17
|
-
|
|
18
12
|
var _Flex = _interopRequireDefault(require("../flex/Flex"));
|
|
19
|
-
|
|
20
13
|
var _Typography = _interopRequireDefault(require("../typography/Typography"));
|
|
21
|
-
|
|
22
14
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
23
|
-
|
|
24
15
|
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext"));
|
|
25
|
-
|
|
26
16
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
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; }
|
|
31
|
-
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
32
19
|
var BulletedListItem = function BulletedListItem(_ref) {
|
|
33
20
|
var children = _ref.children;
|
|
34
21
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children);
|
|
35
22
|
};
|
|
36
|
-
|
|
37
23
|
var DxcBulletedList = function DxcBulletedList(_ref2) {
|
|
38
24
|
var children = _ref2.children,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
25
|
+
_ref2$type = _ref2.type,
|
|
26
|
+
type = _ref2$type === void 0 ? "disc" : _ref2$type,
|
|
27
|
+
_ref2$icon = _ref2.icon,
|
|
28
|
+
icon = _ref2$icon === void 0 ? "" : _ref2$icon;
|
|
43
29
|
var colorsTheme = (0, _useTheme["default"])();
|
|
44
30
|
var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
|
|
45
31
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
@@ -66,15 +52,10 @@ var DxcBulletedList = function DxcBulletedList(_ref2) {
|
|
|
66
52
|
}, child)));
|
|
67
53
|
}))));
|
|
68
54
|
};
|
|
69
|
-
|
|
70
55
|
DxcBulletedList.Item = BulletedListItem;
|
|
71
|
-
|
|
72
56
|
var ListContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n ul,\n ol {\n padding: 0;\n margin: 0;\n }\n"])));
|
|
73
|
-
|
|
74
57
|
var Bullet = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-self: flex-start;\n align-items: center;\n height: 1.5rem;\n"])));
|
|
75
|
-
|
|
76
58
|
var GeneralContent = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: center;\n"])));
|
|
77
|
-
|
|
78
59
|
var Icon = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n height: 1.5rem;\n width: auto;\n margin-right: ", ";\n align-content: center;\n color: ", ";\n svg,\n img {\n height: ", ";\n width: ", ";\n }\n"])), function (props) {
|
|
79
60
|
return props.theme.bulletMarginRight;
|
|
80
61
|
}, function (props) {
|
|
@@ -84,11 +65,9 @@ var Icon = _styledComponents["default"].div(_templateObject4 || (_templateObject
|
|
|
84
65
|
}, function (props) {
|
|
85
66
|
return props.theme.bulletIconWidth;
|
|
86
67
|
});
|
|
87
|
-
|
|
88
68
|
var Number = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n user-select: none;\n margin-right: ", ";\n display: flex;\n box-sizing: border-box;\n align-self: flex-start;\n min-width: 0;\n"])), function (props) {
|
|
89
69
|
return props.theme.bulletMarginRight;
|
|
90
70
|
});
|
|
91
|
-
|
|
92
71
|
var Square = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n height: ", ";\n width: ", ";\n margin-right: ", ";\n"])), function (props) {
|
|
93
72
|
return props.backgroundType && props.backgroundType === "dark" ? props.theme.fontColorOnDark : props.theme.fontColor;
|
|
94
73
|
}, function (props) {
|
|
@@ -98,7 +77,6 @@ var Square = _styledComponents["default"].div(_templateObject6 || (_templateObje
|
|
|
98
77
|
}, function (props) {
|
|
99
78
|
return props.theme.bulletMarginRight;
|
|
100
79
|
});
|
|
101
|
-
|
|
102
80
|
var Circle = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: ", ";\n border-radius: 50%;\n border: 1px solid;\n border-color: ", ";\n margin-right: ", ";\n"])), function (props) {
|
|
103
81
|
return props.theme.bulletHeight;
|
|
104
82
|
}, function (props) {
|
|
@@ -108,7 +86,6 @@ var Circle = _styledComponents["default"].div(_templateObject7 || (_templateObje
|
|
|
108
86
|
}, function (props) {
|
|
109
87
|
return props.theme.bulletMarginRight;
|
|
110
88
|
});
|
|
111
|
-
|
|
112
89
|
var Disc = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n height: ", ";\n width: ", ";\n border-radius: 50%;\n margin-right: ", ";\n"])), function (props) {
|
|
113
90
|
return props.backgroundType && props.backgroundType === "dark" ? props.theme.fontColorOnDark : props.theme.fontColor;
|
|
114
91
|
}, function (props) {
|
|
@@ -118,8 +95,5 @@ var Disc = _styledComponents["default"].div(_templateObject8 || (_templateObject
|
|
|
118
95
|
}, function (props) {
|
|
119
96
|
return props.theme.bulletMarginRight;
|
|
120
97
|
});
|
|
121
|
-
|
|
122
98
|
var ListItem = _styledComponents["default"].li(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n margin: 0px;\n padding: 0px;\n list-style: none;\n display: flex;\n font-size: 1em;\n"])));
|
|
123
|
-
|
|
124
|
-
var _default = DxcBulletedList;
|
|
125
|
-
exports["default"] = _default;
|
|
99
|
+
var _default = exports["default"] = DxcBulletedList;
|
|
@@ -6,7 +6,7 @@ import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
|
6
6
|
import DxcBulletedList from "./BulletedList";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
-
title: "
|
|
9
|
+
title: "Bulleted List",
|
|
10
10
|
component: DxcBulletedList,
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -108,99 +108,9 @@ export const Chromatic = () => (
|
|
|
108
108
|
</DxcBulletedList>
|
|
109
109
|
</Container>
|
|
110
110
|
</ExampleContainer>
|
|
111
|
-
<BackgroundColorProvider color="#333333">
|
|
112
|
-
<DarkContainerForBulletedList>
|
|
113
|
-
<Title title="Icon list" theme="dark" level={4} />
|
|
114
|
-
<DxcBulletedList type="icon" icon={icon}>
|
|
115
|
-
<DxcBulletedList.Item>Code</DxcBulletedList.Item>
|
|
116
|
-
<DxcBulletedList.Item>Usage</DxcBulletedList.Item>
|
|
117
|
-
<DxcBulletedList.Item>Specifications</DxcBulletedList.Item>
|
|
118
|
-
</DxcBulletedList>
|
|
119
|
-
<Title title="Number list" theme="dark" level={4} />
|
|
120
|
-
<DxcBulletedList type="number">
|
|
121
|
-
<DxcBulletedList.Item>Code</DxcBulletedList.Item>
|
|
122
|
-
<DxcBulletedList.Item>Usage</DxcBulletedList.Item>
|
|
123
|
-
<DxcBulletedList.Item>Specifications</DxcBulletedList.Item>
|
|
124
|
-
</DxcBulletedList>
|
|
125
|
-
<Title title="Square" theme="dark" level={4} />
|
|
126
|
-
<DxcBulletedList type="square">
|
|
127
|
-
<DxcBulletedList.Item>Code</DxcBulletedList.Item>
|
|
128
|
-
<DxcBulletedList.Item>Usage</DxcBulletedList.Item>
|
|
129
|
-
<DxcBulletedList.Item>Specifications</DxcBulletedList.Item>
|
|
130
|
-
</DxcBulletedList>
|
|
131
|
-
<Title title="Circle" theme="dark" level={4} />
|
|
132
|
-
<DxcBulletedList type="circle">
|
|
133
|
-
<DxcBulletedList.Item>Code</DxcBulletedList.Item>
|
|
134
|
-
<DxcBulletedList.Item>Usage</DxcBulletedList.Item>
|
|
135
|
-
<DxcBulletedList.Item>Specifications</DxcBulletedList.Item>
|
|
136
|
-
</DxcBulletedList>
|
|
137
|
-
<Title title="Disc" theme="dark" level={4} />
|
|
138
|
-
<DxcBulletedList>
|
|
139
|
-
<DxcBulletedList.Item>Code</DxcBulletedList.Item>
|
|
140
|
-
<DxcBulletedList.Item>Usage</DxcBulletedList.Item>
|
|
141
|
-
<DxcBulletedList.Item>Specifications</DxcBulletedList.Item>
|
|
142
|
-
</DxcBulletedList>
|
|
143
|
-
<Title title="Multiple lines" theme="dark" level={4} />
|
|
144
|
-
<Container>
|
|
145
|
-
<Title title="Number" theme="dark" level={4} />
|
|
146
|
-
<DxcBulletedList type="number">
|
|
147
|
-
<DxcBulletedList.Item>
|
|
148
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
149
|
-
dolore magna aliqua.
|
|
150
|
-
</DxcBulletedList.Item>
|
|
151
|
-
<DxcBulletedList.Item>Text 2.</DxcBulletedList.Item>
|
|
152
|
-
</DxcBulletedList>
|
|
153
|
-
</Container>
|
|
154
|
-
<Container>
|
|
155
|
-
<Title title="Square" theme="dark" level={4} />
|
|
156
|
-
<DxcBulletedList type="square">
|
|
157
|
-
<DxcBulletedList.Item>
|
|
158
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
159
|
-
dolore magna aliqua.
|
|
160
|
-
</DxcBulletedList.Item>
|
|
161
|
-
<DxcBulletedList.Item>Text 2.</DxcBulletedList.Item>
|
|
162
|
-
</DxcBulletedList>
|
|
163
|
-
</Container>
|
|
164
|
-
<Container>
|
|
165
|
-
<Title title="Circle" theme="dark" level={4} />
|
|
166
|
-
<DxcBulletedList type="circle">
|
|
167
|
-
<DxcBulletedList.Item>
|
|
168
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
169
|
-
dolore magna aliqua.
|
|
170
|
-
</DxcBulletedList.Item>
|
|
171
|
-
<DxcBulletedList.Item>Text 2.</DxcBulletedList.Item>
|
|
172
|
-
</DxcBulletedList>
|
|
173
|
-
</Container>
|
|
174
|
-
<Title title="Disc" theme="dark" level={4} />
|
|
175
|
-
<Container>
|
|
176
|
-
<DxcBulletedList>
|
|
177
|
-
<DxcBulletedList.Item>
|
|
178
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
179
|
-
dolore magna aliqua.
|
|
180
|
-
</DxcBulletedList.Item>
|
|
181
|
-
<DxcBulletedList.Item>Text 2.</DxcBulletedList.Item>
|
|
182
|
-
</DxcBulletedList>
|
|
183
|
-
</Container>
|
|
184
|
-
<Container>
|
|
185
|
-
<Title title="Icon" theme="dark" level={4} />
|
|
186
|
-
<DxcBulletedList type="icon" icon={icon}>
|
|
187
|
-
<DxcBulletedList.Item>
|
|
188
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
189
|
-
dolore magna aliqua.
|
|
190
|
-
</DxcBulletedList.Item>
|
|
191
|
-
<DxcBulletedList.Item>Text 2.</DxcBulletedList.Item>
|
|
192
|
-
</DxcBulletedList>
|
|
193
|
-
</Container>
|
|
194
|
-
</DarkContainerForBulletedList>
|
|
195
|
-
</BackgroundColorProvider>
|
|
196
111
|
</>
|
|
197
112
|
);
|
|
198
113
|
|
|
199
114
|
const Container = styled.div`
|
|
200
115
|
width: 400px;
|
|
201
116
|
`;
|
|
202
|
-
|
|
203
|
-
const DarkContainerForBulletedList = styled.div`
|
|
204
|
-
background-color: #333333;
|
|
205
|
-
padding: 5px;
|
|
206
|
-
`;
|