@dxc-technology/halstack-react 0.0.0-64fdce7 → 0.0.0-6501724
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 +1 -1
- package/HalstackContext.d.ts +1329 -5
- package/HalstackContext.js +113 -72
- package/accordion/Accordion.js +6 -11
- package/accordion/Accordion.stories.tsx +52 -3
- package/accordion/Accordion.test.js +1 -1
- package/accordion/types.d.ts +3 -3
- package/accordion-group/AccordionGroup.d.ts +4 -3
- package/accordion-group/AccordionGroup.js +23 -44
- package/accordion-group/AccordionGroup.test.js +1 -1
- package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
- package/accordion-group/AccordionGroupAccordion.js +43 -0
- package/accordion-group/types.d.ts +2 -2
- package/alert/Alert.js +4 -8
- package/alert/Alert.stories.tsx +28 -0
- package/alert/Alert.test.js +1 -1
- package/bleed/Bleed.stories.tsx +1 -0
- package/box/Box.js +3 -5
- package/box/Box.stories.tsx +15 -0
- package/box/Box.test.js +1 -1
- package/bulleted-list/BulletedList.js +4 -2
- package/bulleted-list/BulletedList.stories.tsx +7 -1
- package/bulleted-list/types.d.ts +31 -4
- package/button/Button.js +2 -3
- package/button/Button.stories.tsx +95 -10
- package/button/Button.test.js +1 -1
- package/button/types.d.ts +3 -3
- package/card/Card.js +12 -13
- package/card/Card.stories.tsx +12 -13
- package/card/Card.test.js +1 -1
- package/checkbox/Checkbox.js +3 -3
- package/checkbox/Checkbox.stories.tsx +52 -0
- package/checkbox/Checkbox.test.js +1 -1
- package/checkbox/types.d.ts +2 -2
- package/chip/Chip.js +25 -34
- package/chip/Chip.stories.tsx +80 -17
- package/chip/Chip.test.js +3 -5
- package/common/OpenSans.css +68 -80
- package/common/coreTokens.d.ts +146 -0
- package/common/coreTokens.js +167 -0
- package/common/utils.d.ts +1 -0
- package/common/utils.js +4 -4
- package/common/variables.d.ts +1482 -0
- package/common/variables.js +962 -1123
- package/date-input/DateInput.stories.tsx +67 -0
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.js +55 -86
- package/dialog/Dialog.stories.tsx +145 -217
- package/dialog/Dialog.test.js +302 -3
- package/dialog/types.d.ts +0 -13
- package/dropdown/Dropdown.js +2 -2
- package/dropdown/Dropdown.stories.tsx +46 -1
- package/dropdown/Dropdown.test.js +3 -2
- package/dropdown/DropdownMenu.js +5 -1
- package/dropdown/DropdownMenuItem.js +0 -2
- package/dropdown/types.d.ts +3 -3
- package/file-input/FileInput.js +4 -8
- package/file-input/FileInput.stories.tsx +85 -2
- package/file-input/FileInput.test.js +1 -42
- package/file-input/FileItem.js +1 -0
- package/flex/Flex.js +4 -2
- package/flex/Flex.stories.tsx +35 -26
- package/flex/types.d.ts +70 -5
- package/footer/Footer.js +6 -8
- package/footer/Footer.stories.tsx +91 -0
- package/footer/Footer.test.js +14 -26
- package/grid/Grid.d.ts +7 -0
- package/grid/Grid.js +91 -0
- package/grid/Grid.stories.tsx +219 -0
- package/grid/types.d.ts +115 -0
- package/header/Header.d.ts +3 -2
- package/header/Header.js +3 -3
- package/header/Header.stories.tsx +115 -5
- package/header/Header.test.js +2 -2
- package/header/types.d.ts +2 -2
- package/heading/Heading.js +1 -1
- package/heading/Heading.test.js +1 -1
- package/inset/Inset.stories.tsx +2 -1
- package/layout/ApplicationLayout.d.ts +3 -3
- package/layout/ApplicationLayout.js +1 -1
- package/layout/types.d.ts +2 -3
- package/link/Link.js +3 -3
- package/link/Link.stories.tsx +60 -0
- package/link/Link.test.js +2 -4
- package/link/types.d.ts +2 -2
- package/main.d.ts +3 -2
- package/main.js +9 -1
- package/{tabs-nav → nav-tabs}/NavTabs.d.ts +2 -2
- package/{tabs-nav → nav-tabs}/NavTabs.js +8 -11
- package/{tabs-nav → nav-tabs}/NavTabs.stories.tsx +103 -1
- package/{tabs-nav → nav-tabs}/NavTabs.test.js +1 -1
- package/{tabs-nav → nav-tabs}/Tab.js +47 -29
- package/{tabs-nav → nav-tabs}/types.d.ts +8 -9
- package/nav-tabs/types.js +5 -0
- package/number-input/NumberInput.test.js +1 -1
- package/package.json +2 -2
- package/paginator/Paginator.js +2 -4
- package/paginator/Paginator.stories.tsx +24 -0
- package/paginator/Paginator.test.js +40 -37
- package/paragraph/Paragraph.d.ts +3 -4
- package/paragraph/Paragraph.js +5 -5
- package/password-input/PasswordInput.test.js +1 -1
- package/progress-bar/ProgressBar.d.ts +2 -2
- package/progress-bar/ProgressBar.js +5 -5
- package/progress-bar/ProgressBar.stories.jsx +35 -2
- package/progress-bar/ProgressBar.test.js +1 -1
- package/progress-bar/types.d.ts +4 -3
- package/quick-nav/QuickNav.stories.tsx +14 -0
- package/radio-group/Radio.js +10 -10
- package/radio-group/RadioGroup.js +8 -10
- package/radio-group/RadioGroup.stories.tsx +131 -18
- package/radio-group/RadioGroup.test.js +1 -1
- package/resultsetTable/ResultsetTable.js +2 -2
- package/resultsetTable/ResultsetTable.test.js +1 -1
- package/resultsetTable/types.d.ts +3 -3
- package/select/Select.js +13 -11
- package/select/Select.stories.tsx +477 -175
- package/select/Select.test.js +59 -59
- package/sidenav/Icons.d.ts +7 -0
- package/sidenav/Icons.js +51 -0
- package/sidenav/Sidenav.d.ts +2 -2
- package/sidenav/Sidenav.js +66 -94
- package/sidenav/Sidenav.stories.tsx +110 -17
- package/sidenav/types.d.ts +21 -18
- package/slider/Slider.js +2 -3
- package/slider/Slider.stories.tsx +57 -0
- package/slider/Slider.test.js +1 -1
- package/slider/types.d.ts +2 -2
- package/spinner/Spinner.js +15 -21
- package/spinner/Spinner.stories.jsx +53 -27
- package/spinner/Spinner.test.js +1 -1
- package/switch/Switch.js +2 -2
- package/switch/Switch.stories.tsx +33 -0
- package/switch/Switch.test.js +1 -1
- package/switch/types.d.ts +2 -2
- package/table/Table.js +2 -2
- package/table/Table.stories.jsx +80 -1
- package/table/Table.test.js +1 -1
- package/tabs/Tab.js +9 -10
- package/tabs/Tabs.js +11 -17
- package/tabs/Tabs.stories.tsx +38 -0
- package/tabs/Tabs.test.js +4 -5
- package/tabs/types.d.ts +2 -2
- package/tag/Tag.js +7 -9
- package/tag/Tag.stories.tsx +14 -1
- package/tag/Tag.test.js +1 -1
- package/text-input/Suggestion.js +2 -2
- package/text-input/TextInput.js +4 -4
- package/text-input/TextInput.stories.tsx +69 -1
- package/text-input/TextInput.test.js +1 -2
- package/textarea/Textarea.js +3 -4
- package/textarea/Textarea.stories.jsx +60 -1
- package/textarea/Textarea.test.js +2 -4
- package/toggle-group/ToggleGroup.d.ts +2 -2
- package/toggle-group/ToggleGroup.js +7 -4
- package/toggle-group/ToggleGroup.stories.tsx +42 -0
- package/toggle-group/ToggleGroup.test.js +1 -1
- package/toggle-group/types.d.ts +1 -1
- package/typography/Typography.d.ts +2 -2
- package/typography/Typography.js +14 -113
- package/typography/Typography.stories.tsx +1 -1
- package/useTheme.d.ts +1234 -1
- package/useTheme.js +1 -1
- package/useTranslatedLabels.d.ts +84 -1
- package/utils/BaseTypography.d.ts +21 -0
- package/utils/BaseTypography.js +108 -0
- package/utils/FocusLock.d.ts +13 -0
- package/utils/FocusLock.js +138 -0
- package/wizard/Wizard.js +2 -2
- package/wizard/Wizard.stories.tsx +20 -0
- package/wizard/Wizard.test.js +1 -1
- package/wizard/types.d.ts +5 -6
- /package/{tabs-nav → grid}/types.js +0 -0
- /package/{tabs-nav → nav-tabs}/Tab.d.ts +0 -0
|
@@ -70,6 +70,14 @@ const advancedTheme = {
|
|
|
70
70
|
},
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
+
const opinionatedTheme = {
|
|
74
|
+
accordion: {
|
|
75
|
+
accentColor: "#5f249f",
|
|
76
|
+
titleFontColor: "#000000",
|
|
77
|
+
assistiveTextFontColor: "#666666",
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
|
|
73
81
|
export const Chromatic = () => (
|
|
74
82
|
<>
|
|
75
83
|
<Title title="Component anatomy" theme="light" level={2} />
|
|
@@ -111,7 +119,7 @@ export const Chromatic = () => (
|
|
|
111
119
|
</ExampleContainer>
|
|
112
120
|
<ExampleContainer>
|
|
113
121
|
<Title title="With bigger icon (SVG)" theme="light" level={4} />
|
|
114
|
-
<DxcAccordion label="
|
|
122
|
+
<DxcAccordion label="AccordionTest" assistiveText="Assistive text" icon={facebookIcon}>
|
|
115
123
|
<div>
|
|
116
124
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
117
125
|
lobortis eget.
|
|
@@ -123,7 +131,7 @@ export const Chromatic = () => (
|
|
|
123
131
|
<DxcAccordion
|
|
124
132
|
label="Accordion"
|
|
125
133
|
assistiveText="Assistive text"
|
|
126
|
-
icon="https://
|
|
134
|
+
icon="https://www.freepnglogos.com/uploads/facebook-logo-design-1.png"
|
|
127
135
|
>
|
|
128
136
|
<div>
|
|
129
137
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
@@ -340,7 +348,48 @@ export const Chromatic = () => (
|
|
|
340
348
|
lobortis eget.
|
|
341
349
|
</div>
|
|
342
350
|
</DxcAccordion>
|
|
343
|
-
|
|
351
|
+
</ExampleContainer>
|
|
352
|
+
<Title title="Opinionated theme" theme="light" level={2} />
|
|
353
|
+
<ExampleContainer>
|
|
354
|
+
<Title title="With assistive text and icon" theme="light" level={4} />
|
|
355
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
356
|
+
<DxcAccordion label="Accordion" assistiveText="Assistive text" icon={folderIcon}>
|
|
357
|
+
Content
|
|
358
|
+
</DxcAccordion>
|
|
359
|
+
</HalstackProvider>
|
|
360
|
+
</ExampleContainer>
|
|
361
|
+
<ExampleContainer pseudoState="pseudo-hover">
|
|
362
|
+
<Title title="Hovered" theme="light" level={4} />
|
|
363
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
364
|
+
<DxcAccordion label="Hovered">
|
|
365
|
+
<div>
|
|
366
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
367
|
+
leo lobortis eget.
|
|
368
|
+
</div>
|
|
369
|
+
</DxcAccordion>
|
|
370
|
+
</HalstackProvider>
|
|
371
|
+
</ExampleContainer>
|
|
372
|
+
<ExampleContainer pseudoState="pseudo-active">
|
|
373
|
+
<Title title="Active" theme="light" level={4} />
|
|
374
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
375
|
+
<DxcAccordion label="Active">
|
|
376
|
+
<div>
|
|
377
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
378
|
+
leo lobortis eget.
|
|
379
|
+
</div>
|
|
380
|
+
</DxcAccordion>
|
|
381
|
+
</HalstackProvider>
|
|
382
|
+
</ExampleContainer>
|
|
383
|
+
<ExampleContainer>
|
|
384
|
+
<Title title="Disabled" theme="light" level={4} />
|
|
385
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
386
|
+
<DxcAccordion label="Disabled" assistiveText="Assistive text" icon={folderIcon} disabled>
|
|
387
|
+
<div>
|
|
388
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
389
|
+
leo lobortis eget.
|
|
390
|
+
</div>
|
|
391
|
+
</DxcAccordion>
|
|
392
|
+
</HalstackProvider>
|
|
344
393
|
</ExampleContainer>
|
|
345
394
|
</>
|
|
346
395
|
);
|
|
@@ -6,7 +6,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
6
6
|
|
|
7
7
|
var _react2 = require("@testing-library/react");
|
|
8
8
|
|
|
9
|
-
var _Accordion = _interopRequireDefault(require("./Accordion"));
|
|
9
|
+
var _Accordion = _interopRequireDefault(require("./Accordion.tsx"));
|
|
10
10
|
|
|
11
11
|
describe("Accordion component tests", function () {
|
|
12
12
|
test("Renders with correct aria accessibility attributes", function () {
|
package/accordion/types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
declare type Margin = {
|
|
4
4
|
top?: Space;
|
|
5
5
|
bottom?: Space;
|
|
6
6
|
left?: Space;
|
|
7
7
|
right?: Space;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
declare type Padding = {
|
|
10
10
|
top?: Space;
|
|
11
11
|
bottom?: Space;
|
|
12
12
|
left?: Space;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import AccordionGroupPropsType, {
|
|
1
|
+
import React from "react";
|
|
2
|
+
import AccordionGroupPropsType, { AccordionGroupAccordionContextProps } from "./types";
|
|
3
|
+
export declare const AccordionGroupAccordionContext: React.Context<AccordionGroupAccordionContextProps>;
|
|
3
4
|
declare const DxcAccordionGroup: {
|
|
4
5
|
({ defaultIndexActive, indexActive, disabled, onActiveChange, margin, children, }: AccordionGroupPropsType): JSX.Element;
|
|
5
|
-
Accordion: ({ ...childProps }: AccordionPropsType) => JSX.Element;
|
|
6
|
+
Accordion: ({ ...childProps }: import("./types").AccordionPropsType) => JSX.Element;
|
|
6
7
|
};
|
|
7
8
|
export default DxcAccordionGroup;
|
|
@@ -7,7 +7,7 @@ var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports["default"] = void 0;
|
|
10
|
+
exports["default"] = exports.AccordionGroupAccordionContext = void 0;
|
|
11
11
|
|
|
12
12
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
13
|
|
|
@@ -17,20 +17,18 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
17
17
|
|
|
18
18
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
19
19
|
|
|
20
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
21
|
-
|
|
22
20
|
var _react = _interopRequireWildcard(require("react"));
|
|
23
21
|
|
|
24
22
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
25
23
|
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
var _utils = require("../common/utils.js");
|
|
24
|
+
var _utils = require("../common/utils");
|
|
29
25
|
|
|
30
|
-
var _variables = require("../common/variables
|
|
26
|
+
var _variables = require("../common/variables");
|
|
31
27
|
|
|
32
28
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
33
29
|
|
|
30
|
+
var _AccordionGroupAccordion = _interopRequireDefault(require("./AccordionGroupAccordion"));
|
|
31
|
+
|
|
34
32
|
var _templateObject;
|
|
35
33
|
|
|
36
34
|
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); }
|
|
@@ -42,33 +40,16 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
42
40
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
43
41
|
|
|
44
42
|
var AccordionGroupAccordionContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return /*#__PURE__*/_react["default"].createElement(_Accordion["default"], (0, _extends2["default"])({
|
|
56
|
-
isExpanded: activeIndex === index,
|
|
57
|
-
onChange: function onChange() {
|
|
58
|
-
handlerActiveChange(index);
|
|
59
|
-
},
|
|
60
|
-
disabled: disabled
|
|
61
|
-
}, childProps), childProps.children);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
var DxcAccordionGroup = function DxcAccordionGroup(_ref2) {
|
|
65
|
-
var defaultIndexActive = _ref2.defaultIndexActive,
|
|
66
|
-
indexActive = _ref2.indexActive,
|
|
67
|
-
_ref2$disabled = _ref2.disabled,
|
|
68
|
-
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
|
|
69
|
-
onActiveChange = _ref2.onActiveChange,
|
|
70
|
-
margin = _ref2.margin,
|
|
71
|
-
children = _ref2.children;
|
|
43
|
+
exports.AccordionGroupAccordionContext = AccordionGroupAccordionContext;
|
|
44
|
+
|
|
45
|
+
var DxcAccordionGroup = function DxcAccordionGroup(_ref) {
|
|
46
|
+
var defaultIndexActive = _ref.defaultIndexActive,
|
|
47
|
+
indexActive = _ref.indexActive,
|
|
48
|
+
_ref$disabled = _ref.disabled,
|
|
49
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
50
|
+
onActiveChange = _ref.onActiveChange,
|
|
51
|
+
margin = _ref.margin,
|
|
52
|
+
children = _ref.children;
|
|
72
53
|
var colorsTheme = (0, _useTheme["default"])();
|
|
73
54
|
|
|
74
55
|
var _useState = (0, _react.useState)(defaultIndexActive !== null && defaultIndexActive !== void 0 ? defaultIndexActive : -1),
|
|
@@ -94,9 +75,7 @@ var DxcAccordionGroup = function DxcAccordionGroup(_ref2) {
|
|
|
94
75
|
}, /*#__PURE__*/_react["default"].createElement(AccordionGroupContainer, {
|
|
95
76
|
margin: margin,
|
|
96
77
|
disabled: disabled
|
|
97
|
-
},
|
|
98
|
-
return child.type === AccordionGroupAccordion;
|
|
99
|
-
}).map(function (accordion, index) {
|
|
78
|
+
}, _react.Children.map(children, function (accordion, index) {
|
|
100
79
|
return /*#__PURE__*/_react["default"].createElement(AccordionGroupAccordionContext.Provider, {
|
|
101
80
|
key: "accordion-".concat(index),
|
|
102
81
|
value: _objectSpread({
|
|
@@ -106,7 +85,7 @@ var DxcAccordionGroup = function DxcAccordionGroup(_ref2) {
|
|
|
106
85
|
})));
|
|
107
86
|
};
|
|
108
87
|
|
|
109
|
-
DxcAccordionGroup.Accordion =
|
|
88
|
+
DxcAccordionGroup.Accordion = _AccordionGroupAccordion["default"];
|
|
110
89
|
|
|
111
90
|
var calculateWidth = function calculateWidth(margin) {
|
|
112
91
|
return "calc(100% - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
|
|
@@ -114,20 +93,20 @@ var calculateWidth = function calculateWidth(margin) {
|
|
|
114
93
|
|
|
115
94
|
var AccordionGroupContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n cursor: ", ";\n\n > div:not(:last-of-type):not(:only-of-type) {\n border-bottom: ", ";\n border-color: ", ";\n }\n > div:not(:first-of-type):not(:last-of-type):not(:only-of-type) {\n border-radius: 0;\n & > h3 > button {\n border-radius: 0;\n }\n }\n > div:first-of-type:not(:only-of-type) {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n\n & > h3 > button {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n }\n > div:last-of-type:not(:only-of-type) {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n\n & > h3 > button {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n }\n"])), function (props) {
|
|
116
95
|
return calculateWidth(props.margin);
|
|
96
|
+
}, function (_ref2) {
|
|
97
|
+
var margin = _ref2.margin;
|
|
98
|
+
return margin && (0, _typeof2["default"])(margin) !== "object" ? _variables.spaces[margin] : "0px";
|
|
117
99
|
}, function (_ref3) {
|
|
118
100
|
var margin = _ref3.margin;
|
|
119
|
-
return margin && (0, _typeof2["default"])(margin)
|
|
101
|
+
return margin && (0, _typeof2["default"])(margin) === "object" && margin.top ? _variables.spaces[margin.top] : "";
|
|
120
102
|
}, function (_ref4) {
|
|
121
103
|
var margin = _ref4.margin;
|
|
122
|
-
return margin && (0, _typeof2["default"])(margin) === "object" && margin.
|
|
104
|
+
return margin && (0, _typeof2["default"])(margin) === "object" && margin.right ? _variables.spaces[margin.right] : "";
|
|
123
105
|
}, function (_ref5) {
|
|
124
106
|
var margin = _ref5.margin;
|
|
125
|
-
return margin && (0, _typeof2["default"])(margin) === "object" && margin.
|
|
107
|
+
return margin && (0, _typeof2["default"])(margin) === "object" && margin.bottom ? _variables.spaces[margin.bottom] : "";
|
|
126
108
|
}, function (_ref6) {
|
|
127
109
|
var margin = _ref6.margin;
|
|
128
|
-
return margin && (0, _typeof2["default"])(margin) === "object" && margin.bottom ? _variables.spaces[margin.bottom] : "";
|
|
129
|
-
}, function (_ref7) {
|
|
130
|
-
var margin = _ref7.margin;
|
|
131
110
|
return margin && (0, _typeof2["default"])(margin) === "object" && margin.left ? _variables.spaces[margin.left] : "";
|
|
132
111
|
}, function (props) {
|
|
133
112
|
return props.disabled ? "not-allowed" : "pointer";
|
|
@@ -6,7 +6,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
6
6
|
|
|
7
7
|
var _react2 = require("@testing-library/react");
|
|
8
8
|
|
|
9
|
-
var _AccordionGroup = _interopRequireDefault(require("./AccordionGroup"));
|
|
9
|
+
var _AccordionGroup = _interopRequireDefault(require("./AccordionGroup.tsx"));
|
|
10
10
|
|
|
11
11
|
describe("Accordion component tests", function () {
|
|
12
12
|
test("Uncontrolled accordion group calls correct function on click", function () {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
|
|
16
|
+
var _Accordion = _interopRequireDefault(require("../accordion/Accordion"));
|
|
17
|
+
|
|
18
|
+
var _AccordionGroup = require("./AccordionGroup");
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
var AccordionGroupAccordion = function AccordionGroupAccordion(_ref) {
|
|
25
|
+
var childProps = (0, _extends2["default"])({}, _ref);
|
|
26
|
+
|
|
27
|
+
var _useContext = (0, _react.useContext)(_AccordionGroup.AccordionGroupAccordionContext),
|
|
28
|
+
activeIndex = _useContext.activeIndex,
|
|
29
|
+
handlerActiveChange = _useContext.handlerActiveChange,
|
|
30
|
+
disabled = _useContext.disabled,
|
|
31
|
+
index = _useContext.index;
|
|
32
|
+
|
|
33
|
+
return /*#__PURE__*/_react["default"].createElement(_Accordion["default"], (0, _extends2["default"])({
|
|
34
|
+
isExpanded: activeIndex === index,
|
|
35
|
+
onChange: function onChange() {
|
|
36
|
+
handlerActiveChange(index);
|
|
37
|
+
},
|
|
38
|
+
disabled: disabled
|
|
39
|
+
}, childProps), childProps.children);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var _default = AccordionGroupAccordion;
|
|
43
|
+
exports["default"] = _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
declare type Margin = {
|
|
4
4
|
top?: Space;
|
|
5
5
|
bottom?: Space;
|
|
6
6
|
left?: Space;
|
package/alert/Alert.js
CHANGED
|
@@ -17,9 +17,9 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
17
17
|
|
|
18
18
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
19
|
|
|
20
|
-
var _variables = require("../common/variables
|
|
20
|
+
var _variables = require("../common/variables");
|
|
21
21
|
|
|
22
|
-
var _utils = require("../common/utils
|
|
22
|
+
var _utils = require("../common/utils");
|
|
23
23
|
|
|
24
24
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
25
25
|
|
|
@@ -131,9 +131,7 @@ var DxcAlert = function DxcAlert(_ref) {
|
|
|
131
131
|
size: size
|
|
132
132
|
}, /*#__PURE__*/_react["default"].createElement(AlertInfo, null, /*#__PURE__*/_react["default"].createElement(AlertIcon, {
|
|
133
133
|
type: type
|
|
134
|
-
}, type === "info" && alertIcons.info || type === "confirm" && alertIcons.success || type === "warning" && alertIcons.warning || type === "error" && alertIcons.error), /*#__PURE__*/_react["default"].createElement(AlertText, null, /*#__PURE__*/_react["default"].createElement(AlertTitle, {
|
|
135
|
-
type: type
|
|
136
|
-
}, getTypeText()), inlineText && inlineText !== "" && "-", /*#__PURE__*/_react["default"].createElement(AlertInlineText, null, inlineText)), onClose && /*#__PURE__*/_react["default"].createElement(AlertCloseAction, {
|
|
134
|
+
}, type === "info" && alertIcons.info || type === "confirm" && alertIcons.success || type === "warning" && alertIcons.warning || type === "error" && alertIcons.error), /*#__PURE__*/_react["default"].createElement(AlertText, null, /*#__PURE__*/_react["default"].createElement(AlertTitle, null, getTypeText()), inlineText && inlineText !== "" && "-", /*#__PURE__*/_react["default"].createElement(AlertInlineText, null, inlineText)), onClose && /*#__PURE__*/_react["default"].createElement(AlertCloseAction, {
|
|
137
135
|
onClick: onClose,
|
|
138
136
|
tabIndex: tabIndex
|
|
139
137
|
}, alertIcons.close)), children && /*#__PURE__*/_react["default"].createElement(AlertContent, null, /*#__PURE__*/_react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
@@ -279,12 +277,10 @@ var AlertContent = _styledComponents["default"].div(_templateObject9 || (_templa
|
|
|
279
277
|
return "".concat(props.theme.contentPaddingTop, " ").concat(props.theme.contentPaddingRight, " ").concat(props.theme.contentPaddingBottom, " ").concat(props.theme.contentPaddingLeft);
|
|
280
278
|
});
|
|
281
279
|
|
|
282
|
-
var AlertCloseAction = _styledComponents["default"].button(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n border: 1px solid transparent;\n border-radius: 2px;\n box-shadow: 0 0 0 2px transparent;\n padding: 3px;\n margin-left: 12px;\n background-color: transparent;\n color: #000000;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n &:focus
|
|
280
|
+
var AlertCloseAction = _styledComponents["default"].button(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n border: 1px solid transparent;\n border-radius: 2px;\n box-shadow: 0 0 0 2px transparent;\n padding: 3px;\n margin-left: 12px;\n background-color: transparent;\n color: #000000;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n &:focus,\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n &:active {\n background-color: ", ";\n }\n"])), function (props) {
|
|
283
281
|
return props.theme.hoverActionBackgroundColor;
|
|
284
282
|
}, function (props) {
|
|
285
283
|
return props.theme.focusActionBorderColor;
|
|
286
|
-
}, function (props) {
|
|
287
|
-
return props.theme.focusActionBorderColor;
|
|
288
284
|
}, function (props) {
|
|
289
285
|
return props.theme.activeActionBackgroundColor;
|
|
290
286
|
});
|
package/alert/Alert.stories.tsx
CHANGED
|
@@ -2,12 +2,21 @@ import React from "react";
|
|
|
2
2
|
import DxcAlert from "./Alert";
|
|
3
3
|
import Title from "../../.storybook/components/Title";
|
|
4
4
|
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
|
+
import { HalstackProvider } from "../HalstackContext";
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
8
|
title: "Alert",
|
|
8
9
|
component: DxcAlert,
|
|
9
10
|
};
|
|
10
11
|
|
|
12
|
+
const opinionatedTheme = {
|
|
13
|
+
alert: {
|
|
14
|
+
baseColor: "#e6f4ff",
|
|
15
|
+
accentColor: "#0067b3",
|
|
16
|
+
overlayColor: "#000000b3",
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
11
20
|
export const Chromatic = () => (
|
|
12
21
|
<>
|
|
13
22
|
<ExampleContainer>
|
|
@@ -155,6 +164,12 @@ export const Chromatic = () => (
|
|
|
155
164
|
</div>
|
|
156
165
|
</DxcAlert>
|
|
157
166
|
</ExampleContainer>
|
|
167
|
+
<Title title="Opinionated theme" theme="light" level={2} />
|
|
168
|
+
<ExampleContainer>
|
|
169
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
170
|
+
<DxcAlert inlineText="Info type alert with inline text." />
|
|
171
|
+
</HalstackProvider>
|
|
172
|
+
</ExampleContainer>
|
|
158
173
|
</>
|
|
159
174
|
);
|
|
160
175
|
|
|
@@ -168,3 +183,16 @@ export const ModalAlert = () => (
|
|
|
168
183
|
</DxcAlert>
|
|
169
184
|
</ExampleContainer>
|
|
170
185
|
);
|
|
186
|
+
|
|
187
|
+
export const ModalAlertOpinionated = () => (
|
|
188
|
+
<ExampleContainer>
|
|
189
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
190
|
+
<DxcAlert inlineText="Modal alert." mode="modal" onClose={() => {}}>
|
|
191
|
+
<div>
|
|
192
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
193
|
+
lobortis eget.
|
|
194
|
+
</div>
|
|
195
|
+
</DxcAlert>
|
|
196
|
+
</HalstackProvider>
|
|
197
|
+
</ExampleContainer>
|
|
198
|
+
);
|
package/alert/Alert.test.js
CHANGED
|
@@ -6,7 +6,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
6
6
|
|
|
7
7
|
var _react2 = require("@testing-library/react");
|
|
8
8
|
|
|
9
|
-
var _Alert = _interopRequireDefault(require("./Alert"));
|
|
9
|
+
var _Alert = _interopRequireDefault(require("./Alert.tsx"));
|
|
10
10
|
|
|
11
11
|
describe("Alert component tests", function () {
|
|
12
12
|
test("Info alert renders with correct text", function () {
|
package/bleed/Bleed.stories.tsx
CHANGED
package/box/Box.js
CHANGED
|
@@ -17,9 +17,9 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
17
17
|
|
|
18
18
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
19
|
|
|
20
|
-
var _variables = require("../common/variables
|
|
20
|
+
var _variables = require("../common/variables");
|
|
21
21
|
|
|
22
|
-
var _utils = require("../common/utils
|
|
22
|
+
var _utils = require("../common/utils");
|
|
23
23
|
|
|
24
24
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
25
25
|
|
|
@@ -71,7 +71,7 @@ var calculateWidth = function calculateWidth(margin, size, padding) {
|
|
|
71
71
|
return sizes[size];
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
-
var StyledDxcBox = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n
|
|
74
|
+
var StyledDxcBox = _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\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n"])), function (props) {
|
|
75
75
|
return props.display;
|
|
76
76
|
}, function (props) {
|
|
77
77
|
return props.theme.borderRadius;
|
|
@@ -81,8 +81,6 @@ var StyledDxcBox = _styledComponents["default"].div(_templateObject || (_templat
|
|
|
81
81
|
return props.theme.borderStyle;
|
|
82
82
|
}, function (props) {
|
|
83
83
|
return props.theme.borderColor;
|
|
84
|
-
}, function (props) {
|
|
85
|
-
return props.theme.letterSpacing;
|
|
86
84
|
}, function (props) {
|
|
87
85
|
return calculateWidth(props.margin, props.size, props.padding);
|
|
88
86
|
}, function (props) {
|
package/box/Box.stories.tsx
CHANGED
|
@@ -2,12 +2,19 @@ import React from "react";
|
|
|
2
2
|
import Title from "../../.storybook/components/Title";
|
|
3
3
|
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
4
4
|
import DxcBox from "./Box";
|
|
5
|
+
import { HalstackProvider } from "../HalstackContext";
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
8
|
title: "Box ",
|
|
8
9
|
component: DxcBox,
|
|
9
10
|
};
|
|
10
11
|
|
|
12
|
+
const opinionatedTheme = {
|
|
13
|
+
box: {
|
|
14
|
+
baseColor: "#ffffff",
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
11
18
|
export const Chromatic = () => (
|
|
12
19
|
<>
|
|
13
20
|
<Title title="Display flex" theme="light" level={2} />
|
|
@@ -128,5 +135,13 @@ export const Chromatic = () => (
|
|
|
128
135
|
<Title title="FitContent" theme="light" level={4} />
|
|
129
136
|
<DxcBox size="fitContent">Box</DxcBox>
|
|
130
137
|
</ExampleContainer>
|
|
138
|
+
<Title title="Opinionated theme" theme="light" level={2} />
|
|
139
|
+
<ExampleContainer>
|
|
140
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
141
|
+
<DxcBox display="flex" padding="medium">
|
|
142
|
+
Box
|
|
143
|
+
</DxcBox>
|
|
144
|
+
</HalstackProvider>
|
|
145
|
+
</ExampleContainer>
|
|
131
146
|
</>
|
|
132
147
|
);
|
package/box/Box.test.js
CHANGED
|
@@ -6,7 +6,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
6
6
|
|
|
7
7
|
var _react2 = require("@testing-library/react");
|
|
8
8
|
|
|
9
|
-
var _Card = _interopRequireDefault(require("../card/Card"));
|
|
9
|
+
var _Card = _interopRequireDefault(require("../card/Card.tsx"));
|
|
10
10
|
|
|
11
11
|
describe("Box component tests", function () {
|
|
12
12
|
test("Box renders with correct text", function () {
|
|
@@ -57,7 +57,9 @@ var DxcBulletedList = function DxcBulletedList(_ref2) {
|
|
|
57
57
|
backgroundType: backgroundType
|
|
58
58
|
})) : type === "icon" ? /*#__PURE__*/_react["default"].createElement(Bullet, null, /*#__PURE__*/_react["default"].createElement(Icon, {
|
|
59
59
|
backgroundType: backgroundType
|
|
60
|
-
}, icon
|
|
60
|
+
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
61
|
+
src: icon
|
|
62
|
+
}) : icon)) : /*#__PURE__*/_react["default"].createElement(Bullet, null, /*#__PURE__*/_react["default"].createElement(Disc, {
|
|
61
63
|
backgroundType: backgroundType
|
|
62
64
|
})), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
63
65
|
color: backgroundType && backgroundType === "dark" ? colorsTheme.bulletedList.fontColorOnDark : colorsTheme.bulletedList.fontColor
|
|
@@ -73,7 +75,7 @@ var Bullet = _styledComponents["default"].div(_templateObject2 || (_templateObje
|
|
|
73
75
|
|
|
74
76
|
var GeneralContent = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: center;\n"])));
|
|
75
77
|
|
|
76
|
-
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
|
|
78
|
+
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) {
|
|
77
79
|
return props.theme.bulletMarginRight;
|
|
78
80
|
}, function (props) {
|
|
79
81
|
return props.backgroundType && props.backgroundType === "dark" ? props.theme.fontColorOnDark : props.theme.fontColor;
|
|
@@ -20,12 +20,18 @@ const icon = (
|
|
|
20
20
|
export const Chromatic = () => (
|
|
21
21
|
<>
|
|
22
22
|
<ExampleContainer>
|
|
23
|
-
<Title title="Icon list" level={4} />
|
|
23
|
+
<Title title="Icon list (SVG)" level={4} />
|
|
24
24
|
<DxcBulletedList type="icon" icon={icon}>
|
|
25
25
|
<DxcBulletedList.Item>Code</DxcBulletedList.Item>
|
|
26
26
|
<DxcBulletedList.Item>Usage</DxcBulletedList.Item>
|
|
27
27
|
<DxcBulletedList.Item>Specifications</DxcBulletedList.Item>
|
|
28
28
|
</DxcBulletedList>
|
|
29
|
+
<Title title="Icon list (path)" level={4} />
|
|
30
|
+
<DxcBulletedList type="icon" icon="https://upload.wikimedia.org/wikipedia/commons/e/e0/Check_green_icon.svg">
|
|
31
|
+
<DxcBulletedList.Item>Code</DxcBulletedList.Item>
|
|
32
|
+
<DxcBulletedList.Item>Usage</DxcBulletedList.Item>
|
|
33
|
+
<DxcBulletedList.Item>Specifications</DxcBulletedList.Item>
|
|
34
|
+
</DxcBulletedList>
|
|
29
35
|
<Title title="Number list" level={4} />
|
|
30
36
|
<DxcBulletedList type="number">
|
|
31
37
|
<DxcBulletedList.Item>Code</DxcBulletedList.Item>
|
package/bulleted-list/types.d.ts
CHANGED
|
@@ -1,11 +1,38 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare type SVG = React.ReactNode &
|
|
3
|
-
declare type
|
|
2
|
+
declare type SVG = React.ReactNode & React.SVGProps<SVGSVGElement>;
|
|
3
|
+
declare type IconProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Defines the style of the bullet point in the list.
|
|
6
|
+
*/
|
|
7
|
+
type: "icon";
|
|
8
|
+
/**
|
|
9
|
+
* Icon to display as bullet.
|
|
10
|
+
*/
|
|
11
|
+
icon: string | SVG;
|
|
12
|
+
/**
|
|
13
|
+
* Text to be shown in the list.
|
|
14
|
+
*/
|
|
4
15
|
children: React.ReactNode;
|
|
5
|
-
type?: "disc" | "circle" | "square" | "number" | "icon";
|
|
6
|
-
icon?: string | SVG;
|
|
7
16
|
};
|
|
17
|
+
declare type OtherProps = {
|
|
18
|
+
/**
|
|
19
|
+
* Defines the style of the bullet point in the list.
|
|
20
|
+
*/
|
|
21
|
+
type?: "disc" | "circle" | "square" | "number";
|
|
22
|
+
/**
|
|
23
|
+
* Icon to display as bullet.
|
|
24
|
+
*/
|
|
25
|
+
icon?: never;
|
|
26
|
+
/**
|
|
27
|
+
* Text to be shown in the list.
|
|
28
|
+
*/
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
};
|
|
31
|
+
declare type Props = IconProps | OtherProps;
|
|
8
32
|
export default Props;
|
|
9
33
|
export declare type BulletedListItemPropsType = {
|
|
34
|
+
/**
|
|
35
|
+
* Text to be shown in the list.
|
|
36
|
+
*/
|
|
10
37
|
children?: React.ReactNode;
|
|
11
38
|
};
|
package/button/Button.js
CHANGED
|
@@ -17,9 +17,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
|
|
18
18
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
19
|
|
|
20
|
-
var _variables = require("../common/variables
|
|
20
|
+
var _variables = require("../common/variables");
|
|
21
21
|
|
|
22
|
-
var _utils = require("../common/utils
|
|
22
|
+
var _utils = require("../common/utils");
|
|
23
23
|
|
|
24
24
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
25
25
|
|
|
@@ -75,7 +75,6 @@ var DxcButton = function DxcButton(_ref) {
|
|
|
75
75
|
type: type,
|
|
76
76
|
mode: mode !== "primary" && mode !== "secondary" && mode !== "text" ? "primary" : mode,
|
|
77
77
|
disabled: disabled,
|
|
78
|
-
"aria-disabled": disabled,
|
|
79
78
|
tabIndex: disabled ? -1 : tabIndex,
|
|
80
79
|
backgroundType: backgroundType,
|
|
81
80
|
size: size,
|