@dxc-technology/halstack-react 0.0.0-f44cd28 → 0.0.0-f77ec3a
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/README.md +2 -2
- package/babel.config.js +0 -1
- package/dist/BackgroundColorContext.js +46 -0
- package/dist/ThemeContext.js +213 -153
- package/dist/V3Select/V3Select.js +549 -0
- package/dist/V3Select/index.d.ts +27 -0
- package/dist/V3Textarea/V3Textarea.js +264 -0
- package/dist/V3Textarea/index.d.ts +27 -0
- package/dist/accordion/Accordion.js +131 -46
- package/dist/accordion/index.d.ts +28 -0
- package/dist/accordion-group/AccordionGroup.js +34 -4
- package/dist/accordion-group/index.d.ts +16 -0
- package/dist/alert/Alert.js +180 -80
- package/dist/alert/index.d.ts +51 -0
- package/dist/badge/Badge.js +28 -7
- package/dist/box/Box.js +29 -18
- package/dist/box/index.d.ts +25 -0
- package/dist/button/Button.js +62 -23
- package/dist/button/index.d.ts +24 -0
- package/dist/card/Card.js +72 -35
- package/dist/card/index.d.ts +22 -0
- package/dist/checkbox/Checkbox.js +98 -28
- package/dist/checkbox/index.d.ts +24 -0
- package/dist/chip/Chip.js +92 -32
- package/dist/chip/index.d.ts +22 -0
- package/dist/common/utils.js +2 -22
- package/dist/common/variables.js +1404 -179
- package/dist/date/Date.js +65 -38
- package/dist/date/index.d.ts +27 -0
- package/dist/date-input/DateInput.js +400 -0
- package/dist/date-input/index.d.ts +95 -0
- package/dist/dialog/Dialog.js +54 -31
- package/dist/dialog/index.d.ts +18 -0
- package/dist/dropdown/Dropdown.js +173 -75
- package/dist/dropdown/index.d.ts +26 -0
- package/dist/file-input/FileInput.js +644 -0
- package/dist/file-input/FileItem.js +287 -0
- package/dist/file-input/index.d.ts +81 -0
- package/dist/footer/Footer.js +89 -34
- package/dist/footer/Icons.js +77 -0
- package/dist/footer/index.d.ts +25 -0
- package/dist/header/Header.js +190 -88
- package/dist/header/Icons.js +59 -0
- package/dist/header/index.d.ts +25 -0
- package/dist/heading/Heading.js +93 -16
- package/dist/heading/index.d.ts +17 -0
- package/dist/input-text/Icons.js +22 -0
- package/dist/input-text/InputText.js +247 -101
- package/dist/input-text/index.d.ts +36 -0
- package/dist/layout/ApplicationLayout.js +15 -18
- package/dist/layout/Icons.js +55 -0
- package/dist/link/Link.js +84 -34
- package/dist/link/index.d.ts +23 -0
- package/dist/main.d.ts +40 -0
- package/dist/main.js +72 -16
- package/dist/number-input/NumberInput.js +136 -0
- package/dist/number-input/NumberInputContext.js +16 -0
- package/dist/number-input/index.d.ts +113 -0
- package/dist/paginator/Icons.js +66 -0
- package/dist/paginator/Paginator.js +102 -44
- package/dist/paginator/index.d.ts +20 -0
- package/dist/password-input/PasswordInput.js +203 -0
- package/dist/password-input/index.d.ts +94 -0
- package/dist/progress-bar/ProgressBar.js +91 -33
- package/dist/progress-bar/index.d.ts +18 -0
- package/dist/radio/Radio.js +30 -11
- package/dist/radio/index.d.ts +23 -0
- package/dist/resultsetTable/ResultsetTable.js +79 -48
- package/dist/resultsetTable/index.d.ts +19 -0
- package/dist/select/Select.js +899 -278
- package/dist/select/index.d.ts +53 -0
- package/dist/sidenav/Sidenav.js +64 -8
- package/dist/sidenav/index.d.ts +13 -0
- package/dist/slider/Slider.js +212 -65
- package/dist/slider/index.d.ts +29 -0
- package/dist/spinner/Spinner.js +247 -56
- package/dist/spinner/index.d.ts +17 -0
- package/dist/stories/Button.js +71 -0
- package/dist/stories/Button.stories.js +55 -0
- package/dist/stories/Header.js +67 -0
- package/dist/stories/Header.stories.js +31 -0
- package/dist/stories/Introduction.stories.mdx +211 -0
- package/dist/stories/Page.js +68 -0
- package/dist/stories/Page.stories.js +39 -0
- package/dist/stories/assets/code-brackets.svg +1 -0
- package/dist/stories/assets/colors.svg +1 -0
- package/dist/stories/assets/comments.svg +1 -0
- package/dist/stories/assets/direction.svg +1 -0
- package/dist/stories/assets/flow.svg +1 -0
- package/dist/stories/assets/plugin.svg +1 -0
- package/dist/stories/assets/repo.svg +1 -0
- package/dist/stories/assets/stackalt.svg +1 -0
- package/dist/stories/button.css +30 -0
- package/dist/stories/header.css +26 -0
- package/dist/stories/page.css +69 -0
- package/dist/switch/Switch.js +51 -19
- package/dist/switch/index.d.ts +24 -0
- package/dist/table/Table.js +48 -18
- package/dist/table/index.d.ts +13 -0
- package/dist/tabs/Tabs.js +58 -17
- package/dist/tabs/index.d.ts +19 -0
- package/dist/tag/Tag.js +68 -35
- package/dist/tag/index.d.ts +24 -0
- package/dist/text-input/TextInput.js +974 -0
- package/dist/text-input/index.d.ts +135 -0
- package/dist/textarea/Textarea.js +246 -97
- package/dist/textarea/index.d.ts +117 -0
- package/dist/toggle/Toggle.js +16 -19
- package/dist/toggle/index.d.ts +21 -0
- package/dist/toggle-group/ToggleGroup.js +150 -32
- package/dist/toggle-group/index.d.ts +21 -0
- package/dist/upload/Upload.js +13 -8
- package/dist/upload/buttons-upload/ButtonsUpload.js +32 -19
- package/dist/upload/buttons-upload/Icons.js +40 -0
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +84 -34
- package/dist/upload/dragAndDropArea/Icons.js +39 -0
- package/dist/upload/file-upload/FileToUpload.js +64 -33
- package/dist/upload/file-upload/Icons.js +66 -0
- package/dist/upload/files-upload/FilesToUpload.js +16 -16
- package/dist/upload/index.d.ts +15 -0
- package/dist/upload/transaction/Icons.js +160 -0
- package/dist/upload/transaction/Transaction.js +42 -49
- package/dist/upload/transactions/Transactions.js +38 -20
- package/dist/wizard/Icons.js +65 -0
- package/dist/wizard/Wizard.js +126 -47
- package/dist/wizard/index.d.ts +18 -0
- package/package.json +19 -13
- package/test/AccordionGroup.test.js +16 -0
- package/test/Date.test.js +15 -13
- package/test/DateInput.test.js +242 -0
- package/test/Dropdown.test.js +15 -0
- package/test/FileInput.test.js +201 -0
- package/test/Footer.test.js +2 -7
- package/test/Header.test.js +5 -10
- package/test/Heading.test.js +60 -12
- package/test/InputText.test.js +1 -2
- package/test/Link.test.js +3 -2
- package/test/NumberInput.test.js +259 -0
- package/test/Paginator.test.js +6 -2
- package/test/PasswordInput.test.js +83 -0
- package/test/ResultsetTable.test.js +6 -6
- package/test/Select.test.js +371 -148
- package/test/Slider.test.js +9 -17
- package/test/Spinner.test.js +5 -0
- package/test/TextInput.test.js +732 -0
- package/test/Textarea.test.js +193 -0
- package/test/ToggleGroup.test.js +5 -1
- package/test/Upload.test.js +1 -1
- package/test/V3Select.test.js +212 -0
- package/test/{TextArea.test.js → V3TextArea.test.js} +6 -7
- package/dist/accordion/Accordion.stories.js +0 -207
- package/dist/accordion/readme.md +0 -96
- package/dist/accordion-group/AccordionGroup.stories.js +0 -207
- package/dist/accordion-group/readme.md +0 -70
- package/dist/alert/Alert.stories.js +0 -158
- package/dist/alert/close.svg +0 -4
- package/dist/alert/error.svg +0 -4
- package/dist/alert/info.svg +0 -4
- package/dist/alert/readme.md +0 -43
- package/dist/alert/success.svg +0 -4
- package/dist/alert/warning.svg +0 -4
- package/dist/button/Button.stories.js +0 -224
- package/dist/button/readme.md +0 -93
- package/dist/checkbox/Checkbox.stories.js +0 -144
- package/dist/checkbox/readme.md +0 -116
- package/dist/common/services/example-service.js +0 -10
- package/dist/common/services/example-service.test.js +0 -12
- package/dist/date/Date.stories.js +0 -205
- package/dist/date/calendar.svg +0 -1
- package/dist/date/calendar_dark.svg +0 -1
- package/dist/date/readme.md +0 -73
- package/dist/dialog/Dialog.stories.js +0 -217
- package/dist/dialog/readme.md +0 -32
- package/dist/dropdown/Dropdown.stories.js +0 -249
- package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
- package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
- package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
- package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
- package/dist/dropdown/readme.md +0 -69
- package/dist/footer/Footer.stories.js +0 -94
- package/dist/footer/dxc_logo_wht.png +0 -0
- package/dist/footer/readme.md +0 -41
- package/dist/header/Header.stories.js +0 -176
- package/dist/header/close_icon.svg +0 -1
- package/dist/header/dxc_logo_black.png +0 -0
- package/dist/header/dxc_logo_blk_rgb.svg +0 -6
- package/dist/header/dxc_logo_white.png +0 -0
- package/dist/header/hamb_menu_black.svg +0 -1
- package/dist/header/hamb_menu_white.svg +0 -1
- package/dist/header/readme.md +0 -33
- package/dist/input-text/InputText.stories.js +0 -209
- package/dist/input-text/error.svg +0 -1
- package/dist/input-text/readme.md +0 -91
- package/dist/layout/facebook.svg +0 -45
- package/dist/layout/linkedin.svg +0 -50
- package/dist/layout/twitter.svg +0 -53
- package/dist/link/readme.md +0 -51
- package/dist/paginator/images/next.svg +0 -3
- package/dist/paginator/images/nextPage.svg +0 -3
- package/dist/paginator/images/previous.svg +0 -3
- package/dist/paginator/images/previousPage.svg +0 -3
- package/dist/paginator/readme.md +0 -50
- package/dist/progress-bar/ProgressBar.stories.js +0 -280
- package/dist/progress-bar/readme.md +0 -63
- package/dist/radio/Radio.stories.js +0 -166
- package/dist/radio/readme.md +0 -70
- package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
- package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
- package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
- package/dist/select/Select.stories.js +0 -235
- package/dist/select/readme.md +0 -72
- package/dist/slider/Slider.stories.js +0 -241
- package/dist/slider/readme.md +0 -64
- package/dist/spinner/Spinner.stories.js +0 -183
- package/dist/spinner/readme.md +0 -65
- package/dist/switch/Switch.stories.js +0 -134
- package/dist/switch/readme.md +0 -133
- package/dist/tabs/Tabs.stories.js +0 -130
- package/dist/tabs/readme.md +0 -78
- package/dist/tabs-for-sections/TabsForSections.js +0 -92
- package/dist/tabs-for-sections/readme.md +0 -78
- package/dist/toggle/Toggle.stories.js +0 -297
- package/dist/toggle/readme.md +0 -80
- package/dist/toggle-group/readme.md +0 -82
- package/dist/upload/Upload.stories.js +0 -72
- package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
- package/dist/upload/buttons-upload/upload-button.svg +0 -1
- package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
- package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
- package/dist/upload/file-upload/audio-icon.svg +0 -4
- package/dist/upload/file-upload/close.svg +0 -4
- package/dist/upload/file-upload/file-icon.svg +0 -4
- package/dist/upload/file-upload/video-icon.svg +0 -4
- package/dist/upload/readme.md +0 -37
- package/dist/upload/transaction/audio-icon-err.svg +0 -4
- package/dist/upload/transaction/audio-icon.svg +0 -4
- package/dist/upload/transaction/error-icon.svg +0 -4
- package/dist/upload/transaction/file-icon-err.svg +0 -4
- package/dist/upload/transaction/file-icon.svg +0 -4
- package/dist/upload/transaction/image-icon-err.svg +0 -4
- package/dist/upload/transaction/image-icon.svg +0 -4
- package/dist/upload/transaction/success-icon.svg +0 -4
- package/dist/upload/transaction/video-icon-err.svg +0 -4
- package/dist/upload/transaction/video-icon.svg +0 -4
- package/dist/wizard/invalid_icon.svg +0 -6
- package/dist/wizard/valid_icon.svg +0 -6
- package/dist/wizard/validation-wrong.svg +0 -6
- package/test/TabsForSections.test.js +0 -34
package/dist/switch/Switch.js
CHANGED
|
@@ -27,16 +27,16 @@ var _core = require("@material-ui/core");
|
|
|
27
27
|
|
|
28
28
|
var _RequiredComponent = _interopRequireDefault(require("../common/RequiredComponent"));
|
|
29
29
|
|
|
30
|
-
require("../common/OpenSans.css");
|
|
31
|
-
|
|
32
30
|
var _variables = require("../common/variables.js");
|
|
33
31
|
|
|
34
32
|
var _utils = require("../common/utils.js");
|
|
35
33
|
|
|
36
34
|
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
37
35
|
|
|
36
|
+
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext.js"));
|
|
37
|
+
|
|
38
38
|
function _templateObject2() {
|
|
39
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n
|
|
39
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n opacity: 1;\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n cursor: ", ";\n ", "\n"]);
|
|
40
40
|
|
|
41
41
|
_templateObject2 = function _templateObject2() {
|
|
42
42
|
return data;
|
|
@@ -46,7 +46,7 @@ function _templateObject2() {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
function _templateObject() {
|
|
49
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n
|
|
49
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n display: inline-flex;\n align-items: center;\n flex-direction: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n cursor: ", ";\n opacity: 1;\n \n .MuiSwitch-root {\n align-items: center;\n width: ", ";\n height: 45px;\n margin: 3px;\n\n .Mui-focusVisible {\n border: ", ";\n padding: 7px;\n }\n\n .MuiSwitch-track {\n /*Enabled and unchecked bar*/\n background-color: ", ";\n height: ", ";\n }\n\n .MuiSwitch-switchBase + .MuiSwitch-track {\n opacity: 1;\n }\n\n .MuiIconButton-root {\n /*Enabled and unchecked*/\n top: unset;\n .MuiSwitch-thumb {\n /*Only for thumb in all states*/\n width: ", ";\n height: ", ";\n }\n color: ", ";\n &:hover {\n background-color: transparent;\n }\n &.Mui-disabled {\n /*Disabled and unchecked*/\n color: ", ";\n + .MuiSwitch-track {\n /*Disabled and unchecked bar*/\n background-color: ", ";\n }\n }\n &.Mui-disabled.Mui-checked {\n /*Disabled and checked*/\n color: ", ";\n + .MuiSwitch-track {\n /*Disabled and checked bar*/\n background-color: ", ";\n }\n }\n &.Mui-checked {\n /*Enabled and checked*/\n color: ", ";\n transform: translateX(", ");\n &:hover {\n background-color: transparent;\n }\n + .MuiSwitch-track {\n /*Enabled and checked bar*/\n background-color: ", ";\n }\n }\n }\n }\n"]);
|
|
50
50
|
|
|
51
51
|
_templateObject = function _templateObject() {
|
|
52
52
|
return data;
|
|
@@ -69,7 +69,9 @@ var DxcSwitch = function DxcSwitch(_ref) {
|
|
|
69
69
|
required = _ref$required === void 0 ? false : _ref$required,
|
|
70
70
|
margin = _ref.margin,
|
|
71
71
|
_ref$size = _ref.size,
|
|
72
|
-
size = _ref$size === void 0 ? "fitContent" : _ref$size
|
|
72
|
+
size = _ref$size === void 0 ? "fitContent" : _ref$size,
|
|
73
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
74
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
73
75
|
|
|
74
76
|
var _useState = (0, _react.useState)(0),
|
|
75
77
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
@@ -77,6 +79,7 @@ var DxcSwitch = function DxcSwitch(_ref) {
|
|
|
77
79
|
setInnerChecked = _useState2[1];
|
|
78
80
|
|
|
79
81
|
var colorsTheme = (0, _useTheme["default"])();
|
|
82
|
+
var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
|
|
80
83
|
|
|
81
84
|
var handlerSwitchChange = function handlerSwitchChange(newValue) {
|
|
82
85
|
if (checked === undefined) {
|
|
@@ -99,11 +102,13 @@ var DxcSwitch = function DxcSwitch(_ref) {
|
|
|
99
102
|
margin: margin,
|
|
100
103
|
disabled: disabled,
|
|
101
104
|
labelPosition: labelPosition,
|
|
102
|
-
size: size
|
|
105
|
+
size: size,
|
|
106
|
+
backgroundType: backgroundType
|
|
103
107
|
}, _react["default"].createElement(_core.Switch, {
|
|
104
108
|
checked: checked != undefined ? checked : innerChecked,
|
|
105
|
-
inputProps:
|
|
106
|
-
name: name
|
|
109
|
+
inputProps: {
|
|
110
|
+
name: name,
|
|
111
|
+
tabIndex: tabIndex
|
|
107
112
|
},
|
|
108
113
|
onChange: handlerSwitchChange,
|
|
109
114
|
value: value,
|
|
@@ -111,9 +116,9 @@ var DxcSwitch = function DxcSwitch(_ref) {
|
|
|
111
116
|
disableRipple: true
|
|
112
117
|
}), _react["default"].createElement(LabelContainer, {
|
|
113
118
|
labelPosition: labelPosition,
|
|
114
|
-
brightness: _variables.componentTokens,
|
|
115
119
|
onClick: disabled === true ? function () {} : handlerSwitchChange,
|
|
116
|
-
disabled: disabled
|
|
120
|
+
disabled: disabled,
|
|
121
|
+
backgroundType: backgroundType
|
|
117
122
|
}, required && _react["default"].createElement(_RequiredComponent["default"], null), label)));
|
|
118
123
|
};
|
|
119
124
|
|
|
@@ -148,25 +153,51 @@ var SwitchContainer = _styledComponents["default"].div(_templateObject(), functi
|
|
|
148
153
|
}, function (props) {
|
|
149
154
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
150
155
|
}, function (props) {
|
|
151
|
-
return props.disabled
|
|
156
|
+
return props.disabled ? "not-allowed" : "default";
|
|
157
|
+
}, function (props) {
|
|
158
|
+
return props.theme.trackWidth;
|
|
159
|
+
}, function (props) {
|
|
160
|
+
return "".concat(props.backgroundType === "dark" ? props.theme.thumbFocusColorOnDark : props.theme.thumbFocusColor, " solid 2px");
|
|
161
|
+
}, function (props) {
|
|
162
|
+
return props.backgroundType === "dark" ? props.theme.uncheckedTrackBackgroundColorOnDark : props.theme.uncheckedTrackBackgroundColor;
|
|
163
|
+
}, function (props) {
|
|
164
|
+
return props.theme.trackHeight;
|
|
165
|
+
}, function (props) {
|
|
166
|
+
return props.theme.thumbWidth;
|
|
152
167
|
}, function (props) {
|
|
153
|
-
return props.theme.
|
|
168
|
+
return props.theme.thumbHeight;
|
|
154
169
|
}, function (props) {
|
|
155
|
-
return props.
|
|
170
|
+
return props.backgroundType === "dark" ? props.theme.uncheckedThumbBackgroundColorOnDark : props.theme.uncheckedThumbBackgroundColor;
|
|
156
171
|
}, function (props) {
|
|
157
|
-
return props.theme.
|
|
172
|
+
return props.backgroundType === "dark" ? props.theme.disabledUncheckedThumbBackgroundColorOnDark : props.theme.disabledUncheckedThumbBackgroundColor;
|
|
158
173
|
}, function (props) {
|
|
159
|
-
return props.
|
|
174
|
+
return props.backgroundType === "dark" ? props.theme.disabledUncheckedTrackBackgroundColorOnDark : props.theme.disabledUncheckedTrackBackgroundColor;
|
|
160
175
|
}, function (props) {
|
|
161
|
-
return props.theme.
|
|
176
|
+
return props.backgroundType === "dark" ? props.theme.disabledCheckedThumbBackgroundColorOnDark : props.theme.disabledCheckedThumbBackgroundColor;
|
|
162
177
|
}, function (props) {
|
|
163
|
-
return props.
|
|
178
|
+
return props.backgroundType === "dark" ? props.theme.disabledCheckedTrackBackgroundColorOnDark : props.theme.disabledCheckedTrackBackgroundColor;
|
|
179
|
+
}, function (props) {
|
|
180
|
+
return props.backgroundType === "dark" ? props.theme.checkedThumbBackgroundColorOnDark : props.theme.checkedThumbBackgroundColor;
|
|
181
|
+
}, function (props) {
|
|
182
|
+
return props.theme.thumbShift;
|
|
183
|
+
}, function (props) {
|
|
184
|
+
return props.backgroundType === "dark" ? props.theme.checkedTrackBackgroundColorOnDark : props.theme.checkedTrackBackgroundColor;
|
|
164
185
|
});
|
|
165
186
|
|
|
166
187
|
var LabelContainer = _styledComponents["default"].span(_templateObject2(), function (props) {
|
|
167
|
-
return props.disabled ? props.theme.
|
|
188
|
+
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledLabelFontColorOnDark : props.theme.disabledLabelFontColor : props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
189
|
+
}, function (props) {
|
|
190
|
+
return props.theme.labelFontFamily;
|
|
191
|
+
}, function (props) {
|
|
192
|
+
return props.theme.labelFontSize;
|
|
193
|
+
}, function (props) {
|
|
194
|
+
return props.disabled ? props.theme.disabledLabelFontStyle : props.theme.labelFontStyle;
|
|
195
|
+
}, function (props) {
|
|
196
|
+
return props.theme.labelFontWeight;
|
|
168
197
|
}, function (props) {
|
|
169
198
|
return props.disabled === true ? "not-allowed" : "pointer";
|
|
199
|
+
}, function (props) {
|
|
200
|
+
return props.labelPosition === "after" ? "margin-left: ".concat(props.theme.spaceBetweenLabelSwitch, ";") : "margin-right: ".concat(props.theme.spaceBetweenLabelSwitch, ";");
|
|
170
201
|
});
|
|
171
202
|
|
|
172
203
|
DxcSwitch.propTypes = {
|
|
@@ -184,7 +215,8 @@ DxcSwitch.propTypes = {
|
|
|
184
215
|
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
185
216
|
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
186
217
|
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
187
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
|
|
218
|
+
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
219
|
+
tabIndex: _propTypes["default"].number
|
|
188
220
|
};
|
|
189
221
|
var _default = DxcSwitch;
|
|
190
222
|
exports["default"] = _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type Size = "small" | "medium" | "large" | "fillParent" | "fitContent";
|
|
2
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
type Margin = {
|
|
4
|
+
top?: Space;
|
|
5
|
+
bottom?: Space;
|
|
6
|
+
left?: Space;
|
|
7
|
+
right?: Space;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
value?: any;
|
|
13
|
+
label?: string;
|
|
14
|
+
labelPosition?: "before" | "after";
|
|
15
|
+
name?: string,
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
onChange?: void;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
margin?: Space | Margin;
|
|
20
|
+
size?: Size;
|
|
21
|
+
tabIndex?: number;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default function DxcSwitch(props: Props): JSX.Element;
|
package/dist/table/Table.js
CHANGED
|
@@ -23,18 +23,10 @@ var _utils = require("../common/utils.js");
|
|
|
23
23
|
|
|
24
24
|
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
var data = (0, _taggedTemplateLiteral2["default"])([""]);
|
|
28
|
-
|
|
29
|
-
_templateObject3 = function _templateObject3() {
|
|
30
|
-
return data;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
return data;
|
|
34
|
-
}
|
|
26
|
+
var _BackgroundColorContext = require("../BackgroundColorContext.js");
|
|
35
27
|
|
|
36
28
|
function _templateObject2() {
|
|
37
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n border-collapse: collapse;\n width: 100%;\n\n & tr {\n border-bottom:
|
|
29
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n border-collapse: collapse;\n width: 100%;\n\n & tr {\n border-bottom: ", ";\n }\n & td {\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n line-height: ", ";\n padding: ", ";\n }\n & th {\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n line-height: ", ";\n padding: ", ";\n }\n & th:first-child {\n border-top-left-radius: ", ";\n }\n & th:last-child {\n border-top-right-radius: ", ";\n }\n"]);
|
|
38
30
|
|
|
39
31
|
_templateObject2 = function _templateObject2() {
|
|
40
32
|
return data;
|
|
@@ -44,7 +36,7 @@ function _templateObject2() {
|
|
|
44
36
|
}
|
|
45
37
|
|
|
46
38
|
function _templateObject() {
|
|
47
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
39
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n overflow: hidden auto;\n &::-webkit-scrollbar {\n width: 8px;\n }\n &::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 6px;\n }\n &::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 6px;\n }\n"]);
|
|
48
40
|
|
|
49
41
|
_templateObject = function _templateObject() {
|
|
50
42
|
return data;
|
|
@@ -61,7 +53,9 @@ var DxcTable = function DxcTable(_ref) {
|
|
|
61
53
|
theme: colorsTheme.table
|
|
62
54
|
}, _react["default"].createElement(DxcTableContainer, {
|
|
63
55
|
margin: margin
|
|
64
|
-
}, _react["default"].createElement(DxcTableContent, null, _react["default"].createElement(
|
|
56
|
+
}, _react["default"].createElement(DxcTableContent, null, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
57
|
+
color: colorsTheme.table.dataBackgroundColor
|
|
58
|
+
}, children))));
|
|
65
59
|
};
|
|
66
60
|
|
|
67
61
|
var calculateWidth = function calculateWidth(margin) {
|
|
@@ -81,22 +75,58 @@ var DxcTableContainer = _styledComponents["default"].div(_templateObject(), func
|
|
|
81
75
|
}, function (props) {
|
|
82
76
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
83
77
|
}, function (props) {
|
|
84
|
-
return props.theme.
|
|
78
|
+
return props.theme.scrollBarThumbColor;
|
|
85
79
|
}, function (props) {
|
|
86
|
-
return props.theme.
|
|
80
|
+
return props.theme.scrollBarTrackColor;
|
|
87
81
|
});
|
|
88
82
|
|
|
89
83
|
var DxcTableContent = _styledComponents["default"].table(_templateObject2(), function (props) {
|
|
90
|
-
return props.theme.
|
|
84
|
+
return "".concat(props.theme.rowSeparatorThickness, " ").concat(props.theme.rowSeparatorStyle, " ").concat(props.theme.rowSeparatorColor);
|
|
85
|
+
}, function (props) {
|
|
86
|
+
return props.theme.dataBackgroundColor;
|
|
87
|
+
}, function (props) {
|
|
88
|
+
return props.theme.dataFontFamily;
|
|
89
|
+
}, function (props) {
|
|
90
|
+
return props.theme.dataFontSize;
|
|
91
|
+
}, function (props) {
|
|
92
|
+
return props.theme.dataFontStyle;
|
|
93
|
+
}, function (props) {
|
|
94
|
+
return props.theme.dataFontWeight;
|
|
95
|
+
}, function (props) {
|
|
96
|
+
return props.theme.dataFontColor;
|
|
97
|
+
}, function (props) {
|
|
98
|
+
return props.theme.dataFontTextTransform;
|
|
91
99
|
}, function (props) {
|
|
92
|
-
return props.theme.
|
|
100
|
+
return props.theme.dataTextAlign;
|
|
101
|
+
}, function (props) {
|
|
102
|
+
return props.theme.dataTextLineHeight;
|
|
103
|
+
}, function (props) {
|
|
104
|
+
return "".concat(props.theme.dataPaddingTop, " ").concat(props.theme.dataPaddingRight, " ").concat(props.theme.dataPaddingBottom, " ").concat(props.theme.dataPaddingLeft);
|
|
93
105
|
}, function (props) {
|
|
94
106
|
return props.theme.headerBackgroundColor;
|
|
107
|
+
}, function (props) {
|
|
108
|
+
return props.theme.headerFontFamily;
|
|
109
|
+
}, function (props) {
|
|
110
|
+
return props.theme.headerFontSize;
|
|
111
|
+
}, function (props) {
|
|
112
|
+
return props.theme.headerFontStyle;
|
|
113
|
+
}, function (props) {
|
|
114
|
+
return props.theme.headerFontWeight;
|
|
95
115
|
}, function (props) {
|
|
96
116
|
return props.theme.headerFontColor;
|
|
117
|
+
}, function (props) {
|
|
118
|
+
return props.theme.headerFontTextTransform;
|
|
119
|
+
}, function (props) {
|
|
120
|
+
return props.theme.headerTextAlign;
|
|
121
|
+
}, function (props) {
|
|
122
|
+
return props.theme.headerTextLineHeight;
|
|
123
|
+
}, function (props) {
|
|
124
|
+
return "".concat(props.theme.headerPaddingTop, " ").concat(props.theme.headerPaddingRight, " ").concat(props.theme.headerPaddingBottom, " ").concat(props.theme.headerPaddingLeft);
|
|
125
|
+
}, function (props) {
|
|
126
|
+
return props.theme.headerBorderRadius;
|
|
127
|
+
}, function (props) {
|
|
128
|
+
return props.theme.headerBorderRadius;
|
|
97
129
|
});
|
|
98
130
|
|
|
99
|
-
var DxcTableTBody = _styledComponents["default"].tbody(_templateObject3());
|
|
100
|
-
|
|
101
131
|
var _default = DxcTable;
|
|
102
132
|
exports["default"] = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
type Margin = {
|
|
3
|
+
top?: Space;
|
|
4
|
+
bottom?: Space;
|
|
5
|
+
left?: Space;
|
|
6
|
+
right?: Space;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
margin?: Space | Margin;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default function DxcTable(props: Props): JSX.Element;
|
package/dist/tabs/Tabs.js
CHANGED
|
@@ -29,8 +29,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
29
29
|
|
|
30
30
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
31
31
|
|
|
32
|
-
require("../common/OpenSans.css");
|
|
33
|
-
|
|
34
32
|
var _variables = require("../common/variables.js");
|
|
35
33
|
|
|
36
34
|
var _Badge = _interopRequireDefault(require("../badge/Badge"));
|
|
@@ -38,7 +36,7 @@ var _Badge = _interopRequireDefault(require("../badge/Badge"));
|
|
|
38
36
|
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
39
37
|
|
|
40
38
|
function _templateObject9() {
|
|
41
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: 22px;\n max-width: 22px;\n margin-bottom: ", ";\n margin-right: ", ";\n overflow: hidden;\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
39
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: 22px;\n max-width: 22px;\n margin-bottom: ", ";\n margin-right: ", ";\n overflow: hidden;\n display: flex;\n align-items: center;\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
42
40
|
|
|
43
41
|
_templateObject9 = function _templateObject9() {
|
|
44
42
|
return data;
|
|
@@ -58,7 +56,7 @@ function _templateObject8() {
|
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
function _templateObject7() {
|
|
61
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n .MuiTabs-root {\n background: white;\n .MuiTabs-scroller {\n .MuiTabs-flexContainer + span {\n z-index: 4;\n }\n }\n .MuiTab-root {\n text-transform:
|
|
59
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n .MuiTabs-root {\n background: white;\n min-height: ", ";\n\n .MuiTabs-scroller {\n .MuiTabs-flexContainer + span {\n z-index: 4;\n }\n }\n .MuiTab-root {\n text-transform: ", " !important;\n }\n .MuiButtonBase-root {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n\n padding: ", ";\n height: ", ";\n min-width: 90px;\n max-width: 360px;\n min-height: ", ";\n\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n font-weight: ", ";\n }\n &:not(.Mui-selected) {\n background-color: ", ";\n color: ", ";\n svg {\n color: ", ";\n }\n }\n &.Mui-selected {\n background-color: ", ";\n color: ", ";\n svg {\n color: ", ";\n }\n }\n &.Mui-disabled {\n cursor: not-allowed !important;\n pointer-events: all;\n color: ", ";\n font-style: ", ";\n svg {\n color: ", ";\n }\n }\n &:focus {\n outline: ", " auto 1px;\n }\n }\n .MuiTabs-indicator {\n background-color: ", ";\n height: ", ";\n }\n .MuiTabs-scrollButtons {\n min-width: ", ";\n width: ", ";\n padding: 0;\n }\n @media (max-width: 599.95px) {\n .MuiTabs-scrollButtonsDesktop {\n display: flex;\n }\n }\n }\n"]);
|
|
62
60
|
|
|
63
61
|
_templateObject7 = function _templateObject7() {
|
|
64
62
|
return data;
|
|
@@ -68,7 +66,7 @@ function _templateObject7() {
|
|
|
68
66
|
}
|
|
69
67
|
|
|
70
68
|
function _templateObject6() {
|
|
71
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n left: 0px;\n bottom: 0;\n width: 100%;\n height:
|
|
69
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n left: 0px;\n bottom: 0;\n width: 100%;\n height: ", ";\n position: absolute;\n background-color: ", ";\n"]);
|
|
72
70
|
|
|
73
71
|
_templateObject6 = function _templateObject6() {
|
|
74
72
|
return data;
|
|
@@ -88,7 +86,7 @@ function _templateObject5() {
|
|
|
88
86
|
}
|
|
89
87
|
|
|
90
88
|
function _templateObject4() {
|
|
91
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n right: 0;\n top: ", ";\n width:23px;\n height: 17px;\n
|
|
89
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n right: 0;\n top: ", ";\n width: 23px;\n height: 17px;\n"]);
|
|
92
90
|
|
|
93
91
|
_templateObject4 = function _templateObject4() {
|
|
94
92
|
return data;
|
|
@@ -135,7 +133,9 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
135
133
|
onTabHover = _ref.onTabHover,
|
|
136
134
|
margin = _ref.margin,
|
|
137
135
|
_ref$iconPosition = _ref.iconPosition,
|
|
138
|
-
iconPosition = _ref$iconPosition === void 0 ? "left" : _ref$iconPosition
|
|
136
|
+
iconPosition = _ref$iconPosition === void 0 ? "left" : _ref$iconPosition,
|
|
137
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
138
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
139
139
|
|
|
140
140
|
var _React$useState = _react["default"].useState(0),
|
|
141
141
|
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
|
@@ -157,6 +157,10 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
159
|
|
|
160
|
+
var getTabIndex = function getTabIndex(index, disabled) {
|
|
161
|
+
return (activeTabIndex === index || innerActiveTabIndex === index) && !disabled ? tabIndex : -1;
|
|
162
|
+
};
|
|
163
|
+
|
|
160
164
|
var getLabelForTab = function getLabelForTab(tab) {
|
|
161
165
|
return _react["default"].createElement(ParentLabelSpan, null, _react["default"].createElement(MainLabelContainer, {
|
|
162
166
|
hasBadge: tab.notificationNumber
|
|
@@ -185,7 +189,6 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
185
189
|
}, _react["default"].createElement(Underline, null), _react["default"].createElement(_Tabs["default"], {
|
|
186
190
|
value: activeTabIndex != null ? activeTabIndex : innerActiveTabIndex,
|
|
187
191
|
onChange: handleChange,
|
|
188
|
-
onMouseOver: onTabHover,
|
|
189
192
|
variant: "scrollable",
|
|
190
193
|
scrollButtons: "auto"
|
|
191
194
|
}, tabs.map(function (tab, i) {
|
|
@@ -198,10 +201,17 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
198
201
|
});
|
|
199
202
|
|
|
200
203
|
return _react["default"].createElement(_Tab["default"], {
|
|
204
|
+
tabIndex: (activeTabIndex === i || innerActiveTabIndex === i) && !tab.isDisabled ? tabIndex : -1,
|
|
201
205
|
key: "tab".concat(i).concat(tab.label),
|
|
202
206
|
label: getLabelForTab(tab),
|
|
203
207
|
disabled: tab.isDisabled,
|
|
204
|
-
disableRipple: true
|
|
208
|
+
disableRipple: true,
|
|
209
|
+
onMouseEnter: function onMouseEnter() {
|
|
210
|
+
onTabHover(i);
|
|
211
|
+
},
|
|
212
|
+
onMouseLeave: function onMouseLeave() {
|
|
213
|
+
onTabHover(null);
|
|
214
|
+
}
|
|
205
215
|
});
|
|
206
216
|
}))));
|
|
207
217
|
};
|
|
@@ -225,7 +235,9 @@ var MainLabelContainer = _styledComponents["default"].div(_templateObject5(), fu
|
|
|
225
235
|
});
|
|
226
236
|
|
|
227
237
|
var Underline = _styledComponents["default"].div(_templateObject6(), function (props) {
|
|
228
|
-
return props.theme.
|
|
238
|
+
return props.theme.dividerThickness;
|
|
239
|
+
}, function (props) {
|
|
240
|
+
return props.theme.dividerColor;
|
|
229
241
|
});
|
|
230
242
|
|
|
231
243
|
var DxCTabs = _styledComponents["default"].div(_templateObject7(), function (props) {
|
|
@@ -238,30 +250,58 @@ var DxCTabs = _styledComponents["default"].div(_templateObject7(), function (pro
|
|
|
238
250
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
|
|
239
251
|
}, function (props) {
|
|
240
252
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
253
|
+
}, function (props) {
|
|
254
|
+
return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "48px" || "72px";
|
|
255
|
+
}, function (props) {
|
|
256
|
+
return props.theme.fontTextTransform;
|
|
257
|
+
}, function (props) {
|
|
258
|
+
return props.theme.fontFamily;
|
|
259
|
+
}, function (props) {
|
|
260
|
+
return props.theme.fontSize;
|
|
261
|
+
}, function (props) {
|
|
262
|
+
return props.theme.fontStyle;
|
|
263
|
+
}, function (props) {
|
|
264
|
+
return props.theme.fontWeight;
|
|
241
265
|
}, function (props) {
|
|
242
266
|
return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "12px 16px" || "8px 16px";
|
|
243
267
|
}, function (props) {
|
|
244
268
|
return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "48px" || "72px";
|
|
245
269
|
}, function (props) {
|
|
246
|
-
return props.
|
|
270
|
+
return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "48px" || "72px";
|
|
247
271
|
}, function (props) {
|
|
248
272
|
return "".concat(props.theme.hoverBackgroundColor, " !important");
|
|
249
273
|
}, function (props) {
|
|
250
274
|
return "".concat(props.theme.pressedBackgroundColor, " !important");
|
|
251
275
|
}, function (props) {
|
|
252
|
-
return props.theme.
|
|
276
|
+
return "".concat(props.theme.pressedFontWeight, " !important");
|
|
277
|
+
}, function (props) {
|
|
278
|
+
return props.theme.unselectedBackgroundColor;
|
|
253
279
|
}, function (props) {
|
|
254
|
-
return props.theme.
|
|
280
|
+
return props.theme.unselectedFontColor;
|
|
255
281
|
}, function (props) {
|
|
256
|
-
return props.theme.
|
|
282
|
+
return props.theme.unselectedIconColor;
|
|
283
|
+
}, function (props) {
|
|
284
|
+
return props.theme.selectedBackgroundColor;
|
|
257
285
|
}, function (props) {
|
|
258
286
|
return props.theme.selectedFontColor;
|
|
287
|
+
}, function (props) {
|
|
288
|
+
return props.theme.selectedIconColor;
|
|
259
289
|
}, function (props) {
|
|
260
290
|
return props.theme.disabledFontColor;
|
|
291
|
+
}, function (props) {
|
|
292
|
+
return props.theme.disabledFontStyle;
|
|
293
|
+
}, function (props) {
|
|
294
|
+
return props.theme.disabledIconColor;
|
|
261
295
|
}, function (props) {
|
|
262
296
|
return props.theme.focusOutline;
|
|
263
297
|
}, function (props) {
|
|
264
298
|
return props.theme.selectedUnderlineColor;
|
|
299
|
+
}, function (props) {
|
|
300
|
+
return props.theme.selectedUnderlineThickness;
|
|
301
|
+
}, function (props) {
|
|
302
|
+
return props.theme.scrollButtonsWidth;
|
|
303
|
+
}, function (props) {
|
|
304
|
+
return props.theme.scrollButtonsWidth;
|
|
265
305
|
});
|
|
266
306
|
|
|
267
307
|
var TabIcon = _styledComponents["default"].img(_templateObject8());
|
|
@@ -280,8 +320,8 @@ DxcTabs.propTypes = {
|
|
|
280
320
|
label: _propTypes["default"].string,
|
|
281
321
|
icon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
|
|
282
322
|
iconSrc: _propTypes["default"].string,
|
|
283
|
-
isDisabled: _propTypes["default"]
|
|
284
|
-
notificationNumber: _propTypes["default"].oneOfType([_propTypes["default"]["
|
|
323
|
+
isDisabled: _propTypes["default"].bool,
|
|
324
|
+
notificationNumber: _propTypes["default"].oneOfType([_propTypes["default"].bool, _propTypes["default"].string, _propTypes["default"].number])
|
|
285
325
|
})),
|
|
286
326
|
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
287
327
|
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
@@ -289,7 +329,8 @@ DxcTabs.propTypes = {
|
|
|
289
329
|
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
290
330
|
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
291
331
|
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
292
|
-
iconPosition: _propTypes["default"].oneOf(["top", "left"])
|
|
332
|
+
iconPosition: _propTypes["default"].oneOf(["top", "left"]),
|
|
333
|
+
tabIndex: _propTypes["default"].number
|
|
293
334
|
};
|
|
294
335
|
DxcTabs.defaultProps = {
|
|
295
336
|
activeTabIndex: null,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
type Margin = {
|
|
3
|
+
top?: Space;
|
|
4
|
+
bottom?: Space;
|
|
5
|
+
left?: Space;
|
|
6
|
+
right?: Space;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
activeTabIndex?: number;
|
|
11
|
+
tabs?: any;
|
|
12
|
+
onTabClick?: void;
|
|
13
|
+
onTabHover?: void;
|
|
14
|
+
iconPosition?: "top" | "left";
|
|
15
|
+
margin?: Space | Margin;
|
|
16
|
+
tabIndex?: number;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default function DxcTabs(props: Props): JSX.Element;
|