@dxc-technology/halstack-react 0.0.0-b39a2d8 → 0.0.0-b3e1a2f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BackgroundColorContext.d.ts +10 -0
- package/BackgroundColorContext.js +1 -4
- package/ThemeContext.d.ts +15 -0
- package/ThemeContext.js +5 -8
- package/V3Select/V3Select.js +2 -2
- package/V3Textarea/V3Textarea.js +2 -2
- package/accordion/Accordion.js +2 -2
- package/accordion/Accordion.stories.tsx +307 -0
- package/accordion/types.d.ts +1 -1
- package/accordion-group/AccordionGroup.js +2 -2
- package/accordion-group/AccordionGroup.stories.tsx +225 -0
- package/accordion-group/types.d.ts +1 -1
- package/alert/Alert.js +2 -2
- package/badge/Badge.js +1 -1
- package/bleed/Bleed.d.ts +3 -0
- package/bleed/Bleed.js +84 -0
- package/bleed/Bleed.stories.tsx +342 -0
- package/bleed/types.d.ts +13 -0
- package/bleed/types.js +5 -0
- package/box/Box.js +2 -2
- package/button/Button.d.ts +1 -1
- package/button/Button.js +13 -19
- package/button/Button.stories.tsx +6 -8
- package/button/types.d.ts +5 -9
- package/card/Card.js +1 -1
- package/card/Card.stories.tsx +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/types.d.ts +1 -1
- package/chip/Chip.d.ts +4 -0
- package/chip/Chip.js +5 -27
- package/chip/types.d.ts +53 -0
- package/chip/types.js +5 -0
- package/common/variables.js +57 -22
- package/date/Date.js +1 -1
- package/date-input/DateInput.js +10 -13
- package/dialog/Dialog.js +4 -3
- package/dropdown/Dropdown.js +1 -1
- package/dropdown/Dropdown.stories.tsx +247 -0
- package/dropdown/types.d.ts +1 -1
- package/file-input/FileInput.d.ts +1 -1
- package/file-input/FileInput.js +160 -81
- package/file-input/FileInput.stories.tsx +507 -0
- package/file-input/FileItem.js +8 -6
- package/file-input/types.d.ts +32 -7
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +12 -18
- package/footer/{Footer.stories.jsx → Footer.stories.tsx} +1 -22
- package/footer/Icons.d.ts +2 -0
- package/footer/Icons.js +3 -3
- package/footer/types.d.ts +21 -17
- package/header/Header.js +2 -2
- package/header/Icons.d.ts +2 -0
- package/heading/Heading.js +1 -1
- package/heading/Heading.stories.tsx +54 -0
- package/input-text/InputText.js +2 -2
- package/inset/Inset.d.ts +3 -0
- package/inset/Inset.js +84 -0
- package/inset/Inset.stories.tsx +229 -0
- package/inset/types.d.ts +13 -0
- package/inset/types.js +5 -0
- package/layout/ApplicationLayout.d.ts +10 -0
- package/layout/ApplicationLayout.js +9 -19
- package/layout/ApplicationLayout.stories.tsx +171 -0
- package/layout/types.d.ts +57 -0
- package/layout/types.js +5 -0
- package/link/Link.js +1 -1
- package/list/List.d.ts +4 -0
- package/list/List.js +47 -0
- package/list/List.stories.tsx +95 -0
- package/list/types.d.ts +7 -0
- package/list/types.js +5 -0
- package/main.d.ts +7 -3
- package/main.js +34 -2
- package/number-input/NumberInput.js +3 -6
- package/number-input/NumberInputContext.d.ts +4 -0
- package/number-input/NumberInputContext.js +5 -2
- package/number-input/numberInputContextTypes.d.ts +19 -0
- package/number-input/numberInputContextTypes.js +5 -0
- package/package.json +4 -2
- package/paginator/Paginator.js +2 -8
- package/password-input/PasswordInput.js +19 -18
- package/password-input/PasswordInput.stories.tsx +3 -3
- package/password-input/types.d.ts +17 -10
- package/progress-bar/ProgressBar.js +4 -4
- package/radio/Radio.js +2 -2
- package/radio-group/Radio.d.ts +4 -0
- package/radio-group/Radio.js +130 -0
- package/radio-group/RadioGroup.d.ts +4 -0
- package/radio-group/RadioGroup.js +268 -0
- package/radio-group/RadioGroup.stories.tsx +79 -0
- package/radio-group/types.d.ts +36 -0
- package/radio-group/types.js +5 -0
- package/resultsetTable/ResultsetTable.d.ts +4 -0
- package/resultsetTable/ResultsetTable.js +5 -28
- package/resultsetTable/ResultsetTable.stories.tsx +275 -0
- package/resultsetTable/types.d.ts +67 -0
- package/resultsetTable/types.js +5 -0
- package/row/Row.d.ts +3 -0
- package/row/Row.js +127 -0
- package/row/Row.stories.tsx +237 -0
- package/row/types.d.ts +10 -0
- package/row/types.js +5 -0
- package/select/Select.d.ts +4 -0
- package/select/Select.js +20 -22
- package/select/types.d.ts +170 -0
- package/select/types.js +5 -0
- package/sidenav/Sidenav.js +2 -2
- package/sidenav/Sidenav.stories.tsx +182 -0
- package/slider/Slider.js +4 -4
- package/spinner/Spinner.js +2 -2
- package/spinner/Spinner.stories.jsx +1 -0
- package/stack/Stack.d.ts +3 -0
- package/stack/Stack.js +97 -0
- package/stack/Stack.stories.tsx +164 -0
- package/stack/types.d.ts +9 -0
- package/stack/types.js +5 -0
- package/switch/Switch.js +2 -2
- package/switch/Switch.stories.tsx +1 -1
- package/table/Table.js +3 -3
- package/table/Table.stories.jsx +2 -1
- package/tabs/Tabs.js +11 -9
- package/tabs/Tabs.stories.tsx +120 -0
- package/tabs/types.d.ts +23 -15
- package/tag/Tag.js +1 -1
- package/tag/Tag.stories.tsx +1 -1
- package/text/Text.d.ts +7 -0
- package/text/Text.js +30 -0
- package/text/Text.stories.tsx +19 -0
- package/text-input/TextInput.d.ts +4 -0
- package/text-input/TextInput.js +54 -85
- package/text-input/TextInput.stories.tsx +456 -0
- package/text-input/types.d.ts +159 -0
- package/text-input/types.js +5 -0
- package/textarea/Textarea.d.ts +4 -0
- package/textarea/Textarea.js +27 -60
- package/textarea/Textarea.stories.jsx +4 -3
- package/textarea/types.d.ts +130 -0
- package/textarea/types.js +5 -0
- package/toggle/Toggle.js +1 -1
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/toggle-group/ToggleGroup.js +16 -45
- package/toggle-group/ToggleGroup.stories.tsx +23 -28
- package/toggle-group/types.d.ts +97 -0
- package/toggle-group/types.js +5 -0
- package/upload/buttons-upload/ButtonsUpload.js +2 -2
- package/upload/dragAndDropArea/DragAndDropArea.js +2 -2
- package/upload/file-upload/FileToUpload.js +1 -1
- package/upload/files-upload/FilesToUpload.js +1 -1
- package/upload/transaction/Transaction.js +2 -2
- package/upload/transactions/Transactions.js +1 -1
- package/useTheme.d.ts +2 -0
- package/useTheme.js +1 -1
- package/wizard/Wizard.js +59 -9
- package/wizard/{Wizard.stories.jsx → Wizard.stories.tsx} +0 -0
- package/wizard/types.d.ts +3 -7
- package/chip/index.d.ts +0 -22
- package/resultsetTable/index.d.ts +0 -19
- package/select/index.d.ts +0 -131
- package/text-input/index.d.ts +0 -135
- package/textarea/index.d.ts +0 -117
- package/toggle-group/index.d.ts +0 -21
- package/wizard/Icons.js +0 -65
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import DxcSidenav from "./Sidenav";
|
|
4
|
+
import Title from "../../.storybook/components/Title";
|
|
5
|
+
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: "Sidenav",
|
|
9
|
+
component: DxcSidenav,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const linkClick = () => {
|
|
13
|
+
console.log("click");
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const StyledContainer = styled["div"]`
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: row;
|
|
19
|
+
height: 500px;
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
export const Chromatic = () => (
|
|
23
|
+
<>
|
|
24
|
+
<ExampleContainer>
|
|
25
|
+
<Title title="Deafult sidenav" theme="light" level={4} />
|
|
26
|
+
<DxcSidenav>
|
|
27
|
+
{" "}
|
|
28
|
+
<p>Lorem ipsum</p>
|
|
29
|
+
<p>Lorem ipsum</p>
|
|
30
|
+
<p>Lorem ipsum</p>
|
|
31
|
+
<p>Lorem ipsum</p>
|
|
32
|
+
<p>Lorem ipsum</p>{" "}
|
|
33
|
+
</DxcSidenav>
|
|
34
|
+
</ExampleContainer>
|
|
35
|
+
|
|
36
|
+
<ExampleContainer>
|
|
37
|
+
<Title title="Sidenav with xxsmall padding" theme="light" level={4} />
|
|
38
|
+
<DxcSidenav padding="xxsmall">
|
|
39
|
+
{" "}
|
|
40
|
+
<p>Lorem ipsum</p>
|
|
41
|
+
<p>Lorem ipsum</p>
|
|
42
|
+
<p>Lorem ipsum</p>
|
|
43
|
+
<p>Lorem ipsum</p>
|
|
44
|
+
<p>Lorem ipsum</p>{" "}
|
|
45
|
+
</DxcSidenav>
|
|
46
|
+
</ExampleContainer>
|
|
47
|
+
|
|
48
|
+
<ExampleContainer>
|
|
49
|
+
<Title title="Sidenav with xsmall padding" theme="light" level={4} />
|
|
50
|
+
<DxcSidenav padding="xsmall">
|
|
51
|
+
{" "}
|
|
52
|
+
<p>Lorem ipsum</p>
|
|
53
|
+
<p>Lorem ipsum</p>
|
|
54
|
+
<p>Lorem ipsum</p>
|
|
55
|
+
<p>Lorem ipsum</p>
|
|
56
|
+
<p>Lorem ipsum</p>{" "}
|
|
57
|
+
</DxcSidenav>
|
|
58
|
+
</ExampleContainer>
|
|
59
|
+
|
|
60
|
+
<ExampleContainer>
|
|
61
|
+
<Title title="Sidenav with small padding" theme="light" level={4} />
|
|
62
|
+
<DxcSidenav padding="small">
|
|
63
|
+
{" "}
|
|
64
|
+
<p>Lorem ipsum</p>
|
|
65
|
+
<p>Lorem ipsum</p>
|
|
66
|
+
<p>Lorem ipsum</p>
|
|
67
|
+
<p>Lorem ipsum</p>
|
|
68
|
+
<p>Lorem ipsum</p>{" "}
|
|
69
|
+
</DxcSidenav>
|
|
70
|
+
</ExampleContainer>
|
|
71
|
+
|
|
72
|
+
<ExampleContainer>
|
|
73
|
+
<Title title="Sidenav with medium padding" theme="light" level={4} />
|
|
74
|
+
<DxcSidenav padding="medium">
|
|
75
|
+
{" "}
|
|
76
|
+
<p>Lorem ipsum</p>
|
|
77
|
+
<p>Lorem ipsum</p>
|
|
78
|
+
<p>Lorem ipsum</p>
|
|
79
|
+
<p>Lorem ipsum</p>
|
|
80
|
+
<p>Lorem ipsum</p>{" "}
|
|
81
|
+
</DxcSidenav>
|
|
82
|
+
</ExampleContainer>
|
|
83
|
+
|
|
84
|
+
<ExampleContainer>
|
|
85
|
+
<Title title="Sidenav with large padding" theme="light" level={4} />
|
|
86
|
+
<DxcSidenav padding="large">
|
|
87
|
+
{" "}
|
|
88
|
+
<p>Lorem ipsum</p>
|
|
89
|
+
<p>Lorem ipsum</p>
|
|
90
|
+
<p>Lorem ipsum</p>
|
|
91
|
+
<p>Lorem ipsum</p>
|
|
92
|
+
<p>Lorem ipsum</p>{" "}
|
|
93
|
+
</DxcSidenav>
|
|
94
|
+
</ExampleContainer>
|
|
95
|
+
|
|
96
|
+
<ExampleContainer>
|
|
97
|
+
<Title title="Sidenav with xlarge padding" theme="light" level={4} />
|
|
98
|
+
<DxcSidenav padding="xlarge">
|
|
99
|
+
{" "}
|
|
100
|
+
<p>Lorem ipsum</p>
|
|
101
|
+
<p>Lorem ipsum</p>
|
|
102
|
+
<p>Lorem ipsum</p>
|
|
103
|
+
<p>Lorem ipsum</p>
|
|
104
|
+
<p>Lorem ipsum</p>{" "}
|
|
105
|
+
</DxcSidenav>
|
|
106
|
+
</ExampleContainer>
|
|
107
|
+
|
|
108
|
+
<ExampleContainer>
|
|
109
|
+
<Title title="Sidenav with xxlarge padding" theme="light" level={4} />
|
|
110
|
+
<DxcSidenav padding="xxlarge">
|
|
111
|
+
{" "}
|
|
112
|
+
<p>Lorem ipsum</p>
|
|
113
|
+
<p>Lorem ipsum</p>
|
|
114
|
+
<p>Lorem ipsum</p>
|
|
115
|
+
<p>Lorem ipsum</p>
|
|
116
|
+
<p>Lorem ipsum</p>{" "}
|
|
117
|
+
</DxcSidenav>
|
|
118
|
+
</ExampleContainer>
|
|
119
|
+
|
|
120
|
+
<ExampleContainer>
|
|
121
|
+
<Title title="Sidenav compound components" theme="light" level={4} />
|
|
122
|
+
<DxcSidenav>
|
|
123
|
+
<DxcSidenav.Title>My sidenav</DxcSidenav.Title>
|
|
124
|
+
<DxcSidenav.Subtitle>Components</DxcSidenav.Subtitle>
|
|
125
|
+
<DxcSidenav.Link href="#">Button</DxcSidenav.Link>
|
|
126
|
+
<DxcSidenav.Link href="#">Date</DxcSidenav.Link>
|
|
127
|
+
<DxcSidenav.Subtitle>Guidelines</DxcSidenav.Subtitle>
|
|
128
|
+
<DxcSidenav.Link onClick={linkClick}>Layout</DxcSidenav.Link>
|
|
129
|
+
<DxcSidenav.Link onClick={linkClick}>Footer</DxcSidenav.Link>
|
|
130
|
+
</DxcSidenav>
|
|
131
|
+
</ExampleContainer>
|
|
132
|
+
|
|
133
|
+
<ExampleContainer>
|
|
134
|
+
<Title title="Sidenav with scroll" theme="light" level={4} />
|
|
135
|
+
<StyledContainer>
|
|
136
|
+
<DxcSidenav>
|
|
137
|
+
<p>
|
|
138
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa magna,
|
|
139
|
+
placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing
|
|
140
|
+
elit. Donec congue laoreet orci, nec elementum dolor consequat quis. Curabitur rhoncus justo sed dapibus
|
|
141
|
+
tincidunt. Vestibulum cursus ut risus sit amet congue. Nunc luctus, urna ullamcorper facilisis Jia Le, risus
|
|
142
|
+
eros aliquam erat, ut efficitur ante neque id odio. Nam orci leo, dignissim sit amet dolor ut, congue
|
|
143
|
+
gravida enim. Donec rhoncus aliquam nisl, ac cursus enim bibendum vitae. Nunc sit amet elit ornare,
|
|
144
|
+
malesuada urna eu, fringilla mauris. Vivamus bibendum turpis est, id elementum purus euismod sit amet. Etiam
|
|
145
|
+
sit amet maximus augue. Vivamus erat sapien, ultricies fringilla tellus id, condimentum blandit justo.
|
|
146
|
+
Praesent quis nunc dignissim, pharetra neque molestie, molestie lectus. Lorem ipsum dolor sit amet,
|
|
147
|
+
consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa magna, placerat sit amet felis
|
|
148
|
+
eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec congue
|
|
149
|
+
laoreet orci, nec elementum dolor consequat quis. Curabitur rhoncus justo sed dapibus tincidunt. Vestibulum
|
|
150
|
+
cursus ut risus sit amet congue. Nunc luctus, urna ullamcorper facilisis Jia Le, risus eros aliquam erat, ut
|
|
151
|
+
efficitur ante neque id odio. Nam orci leo, dignissim sit amet dolor ut, congue gravida enim. Donec rhoncus
|
|
152
|
+
aliquam nisl, ac cursus enim bibendum vitae. Nunc sit amet elit ornare, malesuada urna eu, fringilla mauris.
|
|
153
|
+
Vivamus bibendum turpis est, id elementum purus euismod sit amet. Etiam sit amet maximus augue. Vivamus erat
|
|
154
|
+
sapien, ultricies fringilla tellus id, condimentum blandit justo. Praesent quis nunc dignissim, pharetra
|
|
155
|
+
neque molestie, molestie lectus.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas
|
|
156
|
+
luctus porttitor. Donec massa magna, placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum
|
|
157
|
+
dolor sit amet, consectetur adipiscing elit. Donec congue laoreet orci, nec elementum dolor consequat quis.
|
|
158
|
+
Curabitur rhoncus justo sed dapibus tincidunt. Vestibulum cursus ut risus sit amet congue. Nunc luctus, urna
|
|
159
|
+
ullamcorper facilisis Jia Le, risus eros aliquam erat, ut efficitur ante neque id odio. Nam orci leo,
|
|
160
|
+
dignissim sit amet dolor ut, congue gravida enim. Donec rhoncus aliquam nisl, ac cursus enim bibendum vitae.
|
|
161
|
+
Nunc sit amet elit ornare, malesuada urna eu, fringilla mauris. Vivamus bibendum turpis est, id elementum
|
|
162
|
+
purus euismod sit amet. Etiam sit amet maximus augue. Vivamus erat sapien, ultricies fringilla tellus id,
|
|
163
|
+
condimentum blandit justo. Praesent quis nunc dignissim, pharetra neque molestie, molestie lectus.
|
|
164
|
+
</p>
|
|
165
|
+
</DxcSidenav>
|
|
166
|
+
</StyledContainer>
|
|
167
|
+
</ExampleContainer>
|
|
168
|
+
|
|
169
|
+
<ExampleContainer pseudoState="pseudo-focus-visible">
|
|
170
|
+
<Title title="Focused" theme="light" level={4} />
|
|
171
|
+
<DxcSidenav>
|
|
172
|
+
<DxcSidenav.Title>My sidenav</DxcSidenav.Title>
|
|
173
|
+
<DxcSidenav.Subtitle>Components</DxcSidenav.Subtitle>
|
|
174
|
+
<DxcSidenav.Link href="#">Button</DxcSidenav.Link>
|
|
175
|
+
<DxcSidenav.Link href="#">Date</DxcSidenav.Link>
|
|
176
|
+
<DxcSidenav.Subtitle>Guidelines</DxcSidenav.Subtitle>
|
|
177
|
+
<DxcSidenav.Link onClick={linkClick}>Layout</DxcSidenav.Link>
|
|
178
|
+
<DxcSidenav.Link onClick={linkClick}>Footer</DxcSidenav.Link>
|
|
179
|
+
</DxcSidenav>
|
|
180
|
+
</ExampleContainer>
|
|
181
|
+
</>
|
|
182
|
+
);
|
package/slider/Slider.js
CHANGED
|
@@ -27,9 +27,9 @@ var _variables = require("../common/variables.js");
|
|
|
27
27
|
|
|
28
28
|
var _utils = require("../common/utils.js");
|
|
29
29
|
|
|
30
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
30
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
31
31
|
|
|
32
|
-
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext
|
|
32
|
+
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext"));
|
|
33
33
|
|
|
34
34
|
var _uuid = require("uuid");
|
|
35
35
|
|
|
@@ -142,7 +142,7 @@ var DxcSlider = function DxcSlider(_ref) {
|
|
|
142
142
|
step: step
|
|
143
143
|
}, maxLabel), showInput && /*#__PURE__*/_react["default"].createElement(StyledTextInput, null, /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
144
144
|
name: name,
|
|
145
|
-
value: value != null && value >= 0 && value || innerValue,
|
|
145
|
+
value: value != null && value >= 0 && value.toString() || innerValue.toString(),
|
|
146
146
|
disabled: disabled,
|
|
147
147
|
onChange: handlerInputChange,
|
|
148
148
|
size: "fillParent"
|
|
@@ -187,7 +187,7 @@ var Label = _styledComponents["default"].label(_templateObject2 || (_templateObj
|
|
|
187
187
|
return props.theme.labelLineHeight;
|
|
188
188
|
});
|
|
189
189
|
|
|
190
|
-
var HelperText = _styledComponents["default"].span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n
|
|
190
|
+
var HelperText = _styledComponents["default"].span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"])), function (props) {
|
|
191
191
|
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledHelperTextFontColorOnDark : props.theme.disabledHelperTextFontColor : props.backgroundType === "dark" ? props.theme.helperTextFontColorOnDark : props.theme.helperTextFontColor;
|
|
192
192
|
}, function (props) {
|
|
193
193
|
return props.theme.fontFamily;
|
package/spinner/Spinner.js
CHANGED
|
@@ -19,9 +19,9 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
19
19
|
|
|
20
20
|
var _variables = require("../common/variables.js");
|
|
21
21
|
|
|
22
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
22
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
23
23
|
|
|
24
|
-
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext
|
|
24
|
+
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext"));
|
|
25
25
|
|
|
26
26
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
27
27
|
|
|
@@ -62,6 +62,7 @@ export const Chromatic = () => (
|
|
|
62
62
|
<DxcSpinner margin="xlarge" mode="small" value="75"></DxcSpinner>
|
|
63
63
|
<Title title="Xxlarge margin" theme="light" level={4} />
|
|
64
64
|
<DxcSpinner margin="xxlarge" mode="small" value="75"></DxcSpinner>
|
|
65
|
+
<hr />
|
|
65
66
|
</ExampleContainer>
|
|
66
67
|
</>
|
|
67
68
|
);
|
package/stack/Stack.d.ts
ADDED
package/stack/Stack.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = Stack;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
+
|
|
16
|
+
var _templateObject, _templateObject2;
|
|
17
|
+
|
|
18
|
+
function Stack(_ref) {
|
|
19
|
+
var gutter = _ref.gutter,
|
|
20
|
+
divider = _ref.divider,
|
|
21
|
+
align = _ref.align,
|
|
22
|
+
_ref$as = _ref.as,
|
|
23
|
+
as = _ref$as === void 0 ? "div" : _ref$as,
|
|
24
|
+
children = _ref.children;
|
|
25
|
+
return /*#__PURE__*/_react["default"].createElement(StyledStack, {
|
|
26
|
+
gutter: gutter,
|
|
27
|
+
divider: divider,
|
|
28
|
+
align: align,
|
|
29
|
+
as: as
|
|
30
|
+
}, _react["default"].Children.map(children, function (child, index) {
|
|
31
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, child, divider && index !== _react["default"].Children.count(children) - 1 && /*#__PURE__*/_react["default"].createElement(Divider, null));
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
var Divider = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n height: 1px;\n background-color: #999999;\n"])));
|
|
36
|
+
|
|
37
|
+
var StyledStack = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n align-items: ", ";\n gap: ", ";\n margin: 0;\n padding: 0;\n"])), function (_ref2) {
|
|
38
|
+
var align = _ref2.align;
|
|
39
|
+
|
|
40
|
+
switch (align) {
|
|
41
|
+
case "start":
|
|
42
|
+
return "flex-start";
|
|
43
|
+
|
|
44
|
+
case "center":
|
|
45
|
+
return "center";
|
|
46
|
+
|
|
47
|
+
case "end":
|
|
48
|
+
return "flex-end";
|
|
49
|
+
|
|
50
|
+
case "baseline":
|
|
51
|
+
return "baseline";
|
|
52
|
+
|
|
53
|
+
case "stretch":
|
|
54
|
+
return "stretch";
|
|
55
|
+
|
|
56
|
+
default:
|
|
57
|
+
return "initial";
|
|
58
|
+
}
|
|
59
|
+
}, function (_ref3) {
|
|
60
|
+
var gutter = _ref3.gutter,
|
|
61
|
+
divider = _ref3.divider;
|
|
62
|
+
|
|
63
|
+
switch (gutter) {
|
|
64
|
+
case "none":
|
|
65
|
+
return "0";
|
|
66
|
+
|
|
67
|
+
case "xxxsmall":
|
|
68
|
+
return "calc(0.125rem / ".concat(divider ? 2 : 1, ")");
|
|
69
|
+
|
|
70
|
+
case "xxsmall":
|
|
71
|
+
return "calc(0.25rem / ".concat(divider ? 2 : 1, ")");
|
|
72
|
+
|
|
73
|
+
case "xsmall":
|
|
74
|
+
return "calc(0.5rem / ".concat(divider ? 2 : 1, ")");
|
|
75
|
+
|
|
76
|
+
case "small":
|
|
77
|
+
return "calc(1rem / ".concat(divider ? 2 : 1, ")");
|
|
78
|
+
|
|
79
|
+
case "medium":
|
|
80
|
+
return "calc(1.5rem / ".concat(divider ? 2 : 1, ")");
|
|
81
|
+
|
|
82
|
+
case "large":
|
|
83
|
+
return "calc(2rem / ".concat(divider ? 2 : 1, ")");
|
|
84
|
+
|
|
85
|
+
case "xlarge":
|
|
86
|
+
return "calc(3rem / ".concat(divider ? 2 : 1, ")");
|
|
87
|
+
|
|
88
|
+
case "xxlarge":
|
|
89
|
+
return "calc(4rem / ".concat(divider ? 2 : 1, ")");
|
|
90
|
+
|
|
91
|
+
case "xxxlarge":
|
|
92
|
+
return "calc(5rem / ".concat(divider ? 2 : 1, ")");
|
|
93
|
+
|
|
94
|
+
default:
|
|
95
|
+
return "0";
|
|
96
|
+
}
|
|
97
|
+
});
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Title from "../../.storybook/components/Title";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import DxcStack from "./Stack";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "Stack",
|
|
8
|
+
component: DxcStack,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const Chromatic = () => (
|
|
12
|
+
<>
|
|
13
|
+
<Title title="Default" theme="light" level={4} />
|
|
14
|
+
<Container>
|
|
15
|
+
<DxcStack>
|
|
16
|
+
<Placeholder></Placeholder>
|
|
17
|
+
<Placeholder></Placeholder>
|
|
18
|
+
<Placeholder></Placeholder>
|
|
19
|
+
</DxcStack>
|
|
20
|
+
</Container>
|
|
21
|
+
<Title title="Align = baseline" theme="light" level={4} />
|
|
22
|
+
<Container>
|
|
23
|
+
<DxcStack align="baseline">
|
|
24
|
+
<Placeholder paddingLeft={20}></Placeholder>
|
|
25
|
+
<Placeholder></Placeholder>
|
|
26
|
+
<Placeholder paddingRight={60}></Placeholder>
|
|
27
|
+
</DxcStack>
|
|
28
|
+
</Container>
|
|
29
|
+
<Title title="Align = center" theme="light" level={4} />
|
|
30
|
+
<Container>
|
|
31
|
+
<DxcStack align="center">
|
|
32
|
+
<Placeholder paddingLeft={20}></Placeholder>
|
|
33
|
+
<Placeholder></Placeholder>
|
|
34
|
+
<Placeholder paddingLeft={60}></Placeholder>
|
|
35
|
+
</DxcStack>
|
|
36
|
+
</Container>
|
|
37
|
+
<Title title="Align = end" theme="light" level={4} />
|
|
38
|
+
<Container>
|
|
39
|
+
<DxcStack align="end">
|
|
40
|
+
<Placeholder paddingLeft={20}></Placeholder>
|
|
41
|
+
<Placeholder></Placeholder>
|
|
42
|
+
<Placeholder paddingLeft={60}></Placeholder>
|
|
43
|
+
</DxcStack>
|
|
44
|
+
</Container>
|
|
45
|
+
<Title title="Align = start" theme="light" level={4} />
|
|
46
|
+
<Container>
|
|
47
|
+
<DxcStack align="start">
|
|
48
|
+
<Placeholder paddingLeft={20}></Placeholder>
|
|
49
|
+
<Placeholder></Placeholder>
|
|
50
|
+
<Placeholder paddingLeft={60}></Placeholder>
|
|
51
|
+
</DxcStack>
|
|
52
|
+
</Container>
|
|
53
|
+
<Title title="Align = stretch" theme="light" level={4} />
|
|
54
|
+
<Container>
|
|
55
|
+
<DxcStack align="stretch">
|
|
56
|
+
<Placeholder paddingLeft={20}></Placeholder>
|
|
57
|
+
<Placeholder></Placeholder>
|
|
58
|
+
<Placeholder paddingLeft={60}></Placeholder>
|
|
59
|
+
</DxcStack>
|
|
60
|
+
</Container>
|
|
61
|
+
<Title title="gutter = xxxsmall" theme="light" level={4} />
|
|
62
|
+
<Container>
|
|
63
|
+
<DxcStack gutter="xxxsmall">
|
|
64
|
+
<Placeholder></Placeholder>
|
|
65
|
+
<Placeholder></Placeholder>
|
|
66
|
+
<Placeholder></Placeholder>
|
|
67
|
+
</DxcStack>
|
|
68
|
+
</Container>
|
|
69
|
+
<Title title="gutter = xxsmall" theme="light" level={4} />
|
|
70
|
+
<Container>
|
|
71
|
+
<DxcStack gutter="xxsmall">
|
|
72
|
+
<Placeholder></Placeholder>
|
|
73
|
+
<Placeholder></Placeholder>
|
|
74
|
+
<Placeholder></Placeholder>
|
|
75
|
+
</DxcStack>
|
|
76
|
+
</Container>
|
|
77
|
+
<Title title="gutter = xsmall" theme="light" level={4} />
|
|
78
|
+
<Container>
|
|
79
|
+
<DxcStack gutter="xsmall">
|
|
80
|
+
<Placeholder></Placeholder>
|
|
81
|
+
<Placeholder></Placeholder>
|
|
82
|
+
<Placeholder></Placeholder>
|
|
83
|
+
</DxcStack>
|
|
84
|
+
</Container>
|
|
85
|
+
<Title title="gutter = small" theme="light" level={4} />
|
|
86
|
+
<Container>
|
|
87
|
+
<DxcStack gutter="small">
|
|
88
|
+
<Placeholder></Placeholder>
|
|
89
|
+
<Placeholder></Placeholder>
|
|
90
|
+
<Placeholder></Placeholder>
|
|
91
|
+
</DxcStack>
|
|
92
|
+
</Container>
|
|
93
|
+
<Title title="gutter = medium" theme="light" level={4} />
|
|
94
|
+
<Container>
|
|
95
|
+
<DxcStack gutter="medium">
|
|
96
|
+
<Placeholder></Placeholder>
|
|
97
|
+
<Placeholder></Placeholder>
|
|
98
|
+
<Placeholder></Placeholder>
|
|
99
|
+
</DxcStack>
|
|
100
|
+
</Container>
|
|
101
|
+
<Title title="gutter = large" theme="light" level={4} />
|
|
102
|
+
<Container>
|
|
103
|
+
<DxcStack gutter="large">
|
|
104
|
+
<Placeholder></Placeholder>
|
|
105
|
+
<Placeholder></Placeholder>
|
|
106
|
+
<Placeholder></Placeholder>
|
|
107
|
+
</DxcStack>
|
|
108
|
+
</Container>
|
|
109
|
+
<Title title="gutter = xlarge" theme="light" level={4} />
|
|
110
|
+
<Container>
|
|
111
|
+
<DxcStack gutter="xlarge">
|
|
112
|
+
<Placeholder></Placeholder>
|
|
113
|
+
<Placeholder></Placeholder>
|
|
114
|
+
<Placeholder></Placeholder>
|
|
115
|
+
</DxcStack>
|
|
116
|
+
</Container>
|
|
117
|
+
<Title title="gutter = xxlarge" theme="light" level={4} />
|
|
118
|
+
<Container>
|
|
119
|
+
<DxcStack gutter="xxlarge">
|
|
120
|
+
<Placeholder></Placeholder>
|
|
121
|
+
<Placeholder></Placeholder>
|
|
122
|
+
<Placeholder></Placeholder>
|
|
123
|
+
</DxcStack>
|
|
124
|
+
</Container>
|
|
125
|
+
<Title title="gutter = xxxlarge" theme="light" level={4} />
|
|
126
|
+
<Container>
|
|
127
|
+
<DxcStack gutter="xxxlarge">
|
|
128
|
+
<Placeholder></Placeholder>
|
|
129
|
+
<Placeholder></Placeholder>
|
|
130
|
+
<Placeholder></Placeholder>
|
|
131
|
+
</DxcStack>
|
|
132
|
+
</Container>
|
|
133
|
+
<Title title="gutter = xxlarge && divider" theme="light" level={4} />
|
|
134
|
+
<Container>
|
|
135
|
+
<DxcStack gutter="xxlarge" divider>
|
|
136
|
+
<Placeholder></Placeholder>
|
|
137
|
+
<Placeholder></Placeholder>
|
|
138
|
+
<Placeholder></Placeholder>
|
|
139
|
+
</DxcStack>
|
|
140
|
+
</Container>
|
|
141
|
+
<Title title="gutter = none" theme="light" level={4} />
|
|
142
|
+
<Container>
|
|
143
|
+
<DxcStack gutter="none">
|
|
144
|
+
<Placeholder></Placeholder>
|
|
145
|
+
<Placeholder></Placeholder>
|
|
146
|
+
<Placeholder></Placeholder>
|
|
147
|
+
</DxcStack>
|
|
148
|
+
</Container>
|
|
149
|
+
</>
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
const Container = styled.div`
|
|
153
|
+
background: #f2eafa;
|
|
154
|
+
padding: 10px;
|
|
155
|
+
`;
|
|
156
|
+
|
|
157
|
+
const Placeholder = styled.div`
|
|
158
|
+
min-height: 40px;
|
|
159
|
+
min-width: 120px;
|
|
160
|
+
border: 1px solid #a46ede;
|
|
161
|
+
background-color: #e5d5f6;
|
|
162
|
+
padding-left: ${({ paddingLeft }) => `${paddingLeft ?? 0}px`};
|
|
163
|
+
padding-right: ${({ paddingRight }) => `${paddingRight ?? 0}px`};
|
|
164
|
+
`;
|
package/stack/types.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
gutter?: "none" | "xxxsmall" | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge" | "xxxlarge";
|
|
4
|
+
divider?: boolean;
|
|
5
|
+
align?: "start" | "center" | "end" | "baseline" | "stretch";
|
|
6
|
+
as?: React.ElementType;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export default Props;
|
package/stack/types.js
ADDED
package/switch/Switch.js
CHANGED
|
@@ -27,9 +27,9 @@ var _variables = require("../common/variables.js");
|
|
|
27
27
|
|
|
28
28
|
var _utils = require("../common/utils.js");
|
|
29
29
|
|
|
30
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
30
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
31
31
|
|
|
32
|
-
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext
|
|
32
|
+
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext"));
|
|
33
33
|
|
|
34
34
|
var _templateObject, _templateObject2;
|
|
35
35
|
|
|
@@ -72,7 +72,7 @@ export const Chromatic = () => (
|
|
|
72
72
|
<Title title="Margins" theme="light" level={2} />
|
|
73
73
|
<ExampleContainer>
|
|
74
74
|
<Title title="Xxsmall margin" theme="light" level={4} />
|
|
75
|
-
<DxcSwitch label="
|
|
75
|
+
<DxcSwitch label="Xxsmall" margin="xxsmall" />
|
|
76
76
|
</ExampleContainer>
|
|
77
77
|
<ExampleContainer>
|
|
78
78
|
<Title title="Xsmall margin" theme="light" level={4} />
|
package/table/Table.js
CHANGED
|
@@ -21,9 +21,9 @@ var _variables = require("../common/variables.js");
|
|
|
21
21
|
|
|
22
22
|
var _utils = require("../common/utils.js");
|
|
23
23
|
|
|
24
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
24
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
25
25
|
|
|
26
|
-
var _BackgroundColorContext = require("../BackgroundColorContext
|
|
26
|
+
var _BackgroundColorContext = require("../BackgroundColorContext");
|
|
27
27
|
|
|
28
28
|
var _templateObject, _templateObject2;
|
|
29
29
|
|
|
@@ -48,7 +48,7 @@ var calculateWidth = function calculateWidth(margin) {
|
|
|
48
48
|
return "calc(100% - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
var DxcTableContainer = _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\n overflow:
|
|
51
|
+
var DxcTableContainer = _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\n overflow: auto;\n &::-webkit-scrollbar {\n width: 8px;\n height: 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"])), function (props) {
|
|
52
52
|
return calculateWidth(props.margin);
|
|
53
53
|
}, function (props) {
|
|
54
54
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
package/table/Table.stories.jsx
CHANGED
package/tabs/Tabs.js
CHANGED
|
@@ -9,10 +9,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports["default"] = void 0;
|
|
11
11
|
|
|
12
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
12
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
15
13
|
|
|
14
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
15
|
+
|
|
16
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
17
|
|
|
18
18
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -27,7 +27,7 @@ var _variables = require("../common/variables.js");
|
|
|
27
27
|
|
|
28
28
|
var _Badge = _interopRequireDefault(require("../badge/Badge"));
|
|
29
29
|
|
|
30
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
30
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
31
31
|
|
|
32
32
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
33
33
|
|
|
@@ -70,12 +70,12 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
70
70
|
}, /*#__PURE__*/_react["default"].createElement(TabLabelContainer, {
|
|
71
71
|
hasLabelAndIcon: hasLabelAndIcon,
|
|
72
72
|
iconPosition: iconPosition
|
|
73
|
-
}, tab.icon
|
|
73
|
+
}, tab.icon && /*#__PURE__*/_react["default"].createElement(TabIconContainer, {
|
|
74
74
|
hasLabelAndIcon: hasLabelAndIcon,
|
|
75
75
|
iconPosition: iconPosition
|
|
76
|
-
},
|
|
77
|
-
src: tab.
|
|
78
|
-
}), /*#__PURE__*/_react["default"].createElement(LabelTextContainer, null, tab.label))), tab.notificationNumber && tab.notificationNumber !== false && /*#__PURE__*/_react["default"].createElement(BadgeContainer, {
|
|
76
|
+
}, typeof tab.icon === "string" ? /*#__PURE__*/_react["default"].createElement(TabIcon, {
|
|
77
|
+
src: tab.icon
|
|
78
|
+
}) : tab.icon), /*#__PURE__*/_react["default"].createElement(LabelTextContainer, null, tab.label))), tab.notificationNumber && tab.notificationNumber !== false && /*#__PURE__*/_react["default"].createElement(BadgeContainer, {
|
|
79
79
|
hasLabelAndIcon: hasLabelAndIcon,
|
|
80
80
|
iconPosition: iconPosition
|
|
81
81
|
}, /*#__PURE__*/_react["default"].createElement(_Badge["default"], {
|
|
@@ -135,7 +135,7 @@ var Underline = _styledComponents["default"].div(_templateObject6 || (_templateO
|
|
|
135
135
|
return props.theme.dividerColor;
|
|
136
136
|
});
|
|
137
137
|
|
|
138
|
-
var DxCTabs = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (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"])), function (props) {
|
|
138
|
+
var DxCTabs = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (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 background-color: ", " !important;\n cursor: not-allowed !important;\n pointer-events: all;\n color: ", ";\n font-style: ", ";\n svg {\n color: ", ";\n }\n outline: none !important;\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"])), function (props) {
|
|
139
139
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
140
140
|
}, function (props) {
|
|
141
141
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
|
|
@@ -181,6 +181,8 @@ var DxCTabs = _styledComponents["default"].div(_templateObject7 || (_templateObj
|
|
|
181
181
|
return props.theme.selectedFontColor;
|
|
182
182
|
}, function (props) {
|
|
183
183
|
return props.theme.selectedIconColor;
|
|
184
|
+
}, function (props) {
|
|
185
|
+
return props.theme.unselectedBackgroundColor;
|
|
184
186
|
}, function (props) {
|
|
185
187
|
return props.theme.disabledFontColor;
|
|
186
188
|
}, function (props) {
|
|
@@ -199,7 +201,7 @@ var DxCTabs = _styledComponents["default"].div(_templateObject7 || (_templateObj
|
|
|
199
201
|
return props.theme.scrollButtonsWidth;
|
|
200
202
|
});
|
|
201
203
|
|
|
202
|
-
var TabIcon = _styledComponents["default"].img(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["
|
|
204
|
+
var TabIcon = _styledComponents["default"].img(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])([""])));
|
|
203
205
|
|
|
204
206
|
var TabIconContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (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"])), function (props) {
|
|
205
207
|
return props.hasLabelAndIcon && props.iconPosition === "top" && "8px" || "";
|