@dxc-technology/halstack-react 9.0.1 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HalstackContext.d.ts +2 -2
- package/HalstackContext.js +2 -2
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +2 -14
- package/accordion/Accordion.stories.tsx +3 -101
- package/accordion/types.d.ts +0 -12
- package/accordion-group/AccordionGroup.d.ts +4 -3
- package/accordion-group/AccordionGroup.js +21 -42
- package/accordion-group/AccordionGroup.stories.tsx +77 -76
- package/accordion-group/AccordionGroup.test.js +6 -16
- package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
- package/accordion-group/AccordionGroupAccordion.js +43 -0
- package/accordion-group/types.d.ts +0 -12
- package/alert/Alert.js +1 -3
- package/bleed/Bleed.stories.tsx +1 -0
- package/box/Box.d.ts +1 -1
- package/box/Box.js +5 -22
- package/box/Box.stories.tsx +25 -53
- package/box/types.d.ts +0 -12
- 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.d.ts +1 -1
- package/button/Button.js +45 -55
- package/button/Button.stories.tsx +4 -4
- package/button/Button.test.js +11 -0
- package/button/types.d.ts +4 -0
- package/card/Card.d.ts +1 -1
- package/card/Card.js +18 -35
- package/card/Card.stories.tsx +0 -29
- package/card/types.d.ts +1 -7
- package/chip/Chip.js +23 -36
- package/chip/Chip.stories.tsx +25 -17
- package/common/OpenSans.css +68 -80
- package/common/coreTokens.d.ts +146 -0
- package/common/coreTokens.js +167 -0
- package/common/variables.d.ts +1 -144
- package/common/variables.js +952 -1095
- package/date-input/Calendar.js +2 -2
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.js +4 -22
- package/dialog/Dialog.stories.tsx +52 -176
- package/dialog/types.d.ts +0 -13
- package/dropdown/DropdownMenu.js +5 -1
- package/file-input/FileItem.js +2 -2
- package/file-input/types.d.ts +1 -1
- package/flex/Flex.js +4 -2
- package/flex/Flex.stories.tsx +35 -26
- package/flex/types.d.ts +70 -5
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +43 -61
- package/footer/Footer.stories.tsx +12 -89
- package/footer/Footer.test.js +3 -1
- package/footer/types.d.ts +10 -12
- 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/grid/types.js +5 -0
- package/header/Header.d.ts +1 -1
- package/header/Header.js +3 -30
- package/header/Header.stories.tsx +7 -71
- package/header/types.d.ts +0 -14
- package/inset/Inset.stories.tsx +2 -1
- package/layout/ApplicationLayout.d.ts +4 -4
- package/layout/ApplicationLayout.js +7 -4
- package/layout/types.d.ts +2 -3
- package/link/Link.js +1 -1
- package/main.d.ts +2 -1
- package/main.js +8 -0
- package/nav-tabs/NavTabs.d.ts +2 -2
- package/nav-tabs/NavTabs.js +7 -10
- package/nav-tabs/NavTabs.stories.tsx +14 -0
- package/nav-tabs/Tab.js +22 -26
- package/nav-tabs/types.d.ts +8 -9
- package/package.json +1 -1
- package/paginator/Paginator.js +1 -1
- package/paginator/Paginator.test.js +13 -0
- package/radio-group/Radio.js +10 -10
- package/radio-group/RadioGroup.js +8 -10
- package/sidenav/Icons.d.ts +7 -0
- package/sidenav/Icons.js +51 -0
- package/sidenav/Sidenav.d.ts +2 -2
- package/sidenav/Sidenav.js +65 -93
- package/sidenav/Sidenav.stories.tsx +60 -60
- package/sidenav/types.d.ts +21 -18
- package/tabs/Tab.js +1 -2
- package/tabs/Tabs.js +10 -14
- package/text-input/TextInput.js +1 -1
- package/text-input/TextInput.stories.tsx +1 -1
- package/textarea/Textarea.js +0 -1
- package/textarea/Textarea.test.js +1 -3
- package/toggle-group/ToggleGroup.d.ts +2 -2
- package/useTheme.d.ts +1 -1
- package/utils/FocusLock.js +3 -4
- package/card/ice-cream.jpg +0 -0
package/sidenav/Sidenav.js
CHANGED
|
@@ -33,56 +33,19 @@ var _Flex = _interopRequireDefault(require("../flex/Flex"));
|
|
|
33
33
|
|
|
34
34
|
var _Bleed = _interopRequireDefault(require("../bleed/Bleed"));
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _Icons = _interopRequireDefault(require("./Icons"));
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
39
|
+
|
|
40
|
+
var _excluded = ["href", "newWindow", "selected", "icon", "onClick", "tabIndex", "children"];
|
|
39
41
|
|
|
40
42
|
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); }
|
|
41
43
|
|
|
42
44
|
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; }
|
|
43
45
|
|
|
44
|
-
var collapsedIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
45
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
46
|
-
height: "24px",
|
|
47
|
-
viewBox: "0 0 24 24",
|
|
48
|
-
width: "24px",
|
|
49
|
-
fill: "currentColor"
|
|
50
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
51
|
-
d: "M0 0h24v24H0z",
|
|
52
|
-
fill: "none"
|
|
53
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
54
|
-
d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
|
55
|
-
}));
|
|
56
|
-
|
|
57
|
-
var collapsableIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
58
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
59
|
-
height: "24px",
|
|
60
|
-
viewBox: "0 0 24 24",
|
|
61
|
-
width: "24px",
|
|
62
|
-
fill: "currentColor"
|
|
63
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
64
|
-
d: "M0 0h24v24H0z",
|
|
65
|
-
fill: "none"
|
|
66
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
67
|
-
d: "M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"
|
|
68
|
-
}));
|
|
69
|
-
|
|
70
|
-
var externalLinkIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
71
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
72
|
-
height: "24",
|
|
73
|
-
viewBox: "0 0 24 24",
|
|
74
|
-
width: "24",
|
|
75
|
-
fill: "currentColor"
|
|
76
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
77
|
-
d: "M0 0h24v24H0z",
|
|
78
|
-
fill: "none"
|
|
79
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
80
|
-
d: "M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"
|
|
81
|
-
}));
|
|
82
|
-
|
|
83
46
|
var DxcSidenav = function DxcSidenav(_ref) {
|
|
84
|
-
var
|
|
85
|
-
|
|
47
|
+
var title = _ref.title,
|
|
48
|
+
children = _ref.children;
|
|
86
49
|
var colorsTheme = (0, _useTheme["default"])();
|
|
87
50
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
88
51
|
theme: colorsTheme.sidenav
|
|
@@ -91,9 +54,7 @@ var DxcSidenav = function DxcSidenav(_ref) {
|
|
|
91
54
|
}, title, /*#__PURE__*/_react["default"].createElement(_Flex["default"], {
|
|
92
55
|
direction: "column",
|
|
93
56
|
gap: "1rem"
|
|
94
|
-
},
|
|
95
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, child, index !== _react["default"].Children.count(children) - 1 && /*#__PURE__*/_react["default"].createElement(Divider, null));
|
|
96
|
-
})))));
|
|
57
|
+
}, children))));
|
|
97
58
|
};
|
|
98
59
|
|
|
99
60
|
var Title = function Title(_ref2) {
|
|
@@ -105,58 +66,63 @@ var Title = function Title(_ref2) {
|
|
|
105
66
|
|
|
106
67
|
var Section = function Section(_ref3) {
|
|
107
68
|
var children = _ref3.children;
|
|
108
|
-
return /*#__PURE__*/_react["default"].createElement(_Bleed["default"], {
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Bleed["default"], {
|
|
109
70
|
horizontal: "1rem"
|
|
110
71
|
}, /*#__PURE__*/_react["default"].createElement(_Flex["default"], {
|
|
111
72
|
direction: "column"
|
|
112
|
-
}, children));
|
|
73
|
+
}, children)), /*#__PURE__*/_react["default"].createElement(Divider, null));
|
|
113
74
|
};
|
|
114
75
|
|
|
76
|
+
var GroupContext = /*#__PURE__*/_react["default"].createContext(null);
|
|
77
|
+
|
|
115
78
|
var Group = function Group(_ref4) {
|
|
116
|
-
var
|
|
117
|
-
title = _ref4.title,
|
|
79
|
+
var title = _ref4.title,
|
|
118
80
|
_ref4$collapsable = _ref4.collapsable,
|
|
119
81
|
collapsable = _ref4$collapsable === void 0 ? false : _ref4$collapsable,
|
|
120
|
-
icon = _ref4.icon
|
|
82
|
+
icon = _ref4.icon,
|
|
83
|
+
children = _ref4.children;
|
|
121
84
|
|
|
122
85
|
var _useState = (0, _react.useState)(false),
|
|
123
86
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
124
87
|
collapsed = _useState2[0],
|
|
125
88
|
setCollapsed = _useState2[1];
|
|
126
89
|
|
|
127
|
-
var
|
|
128
|
-
|
|
129
|
-
|
|
90
|
+
var _useState3 = (0, _react.useState)(false),
|
|
91
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
92
|
+
isSelected = _useState4[0],
|
|
93
|
+
changeIsSelected = _useState4[1];
|
|
130
94
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}, [
|
|
134
|
-
return /*#__PURE__*/_react["default"].createElement(SidenavGroup, null, collapsable && title ? /*#__PURE__*/_react["default"].createElement(SidenavGroupTitleButton, {
|
|
135
|
-
role: "button",
|
|
95
|
+
return /*#__PURE__*/_react["default"].createElement(GroupContext.Provider, {
|
|
96
|
+
value: changeIsSelected
|
|
97
|
+
}, /*#__PURE__*/_react["default"].createElement(SidenavGroup, null, collapsable && title ? /*#__PURE__*/_react["default"].createElement(SidenavGroupTitleButton, {
|
|
136
98
|
"aria-expanded": !collapsed,
|
|
137
99
|
onClick: function onClick() {
|
|
138
100
|
return setCollapsed(!collapsed);
|
|
139
101
|
},
|
|
140
|
-
selectedGroup:
|
|
141
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
102
|
+
selectedGroup: collapsed && isSelected
|
|
103
|
+
}, /*#__PURE__*/_react["default"].createElement(_Flex["default"], {
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
gap: "0.5rem"
|
|
106
|
+
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
142
107
|
src: icon
|
|
143
|
-
}) : icon, title), collapsed ? collapsedIcon : collapsableIcon) : title && /*#__PURE__*/_react["default"].createElement(SidenavGroupTitle, null, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
108
|
+
}) : icon, title), collapsed ? _Icons["default"].collapsedIcon : _Icons["default"].collapsableIcon) : title && /*#__PURE__*/_react["default"].createElement(SidenavGroupTitle, null, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
144
109
|
src: icon
|
|
145
|
-
}) : icon, title), !collapsed && children);
|
|
110
|
+
}) : icon, title), !collapsed && children));
|
|
146
111
|
};
|
|
147
112
|
|
|
148
113
|
var Link = /*#__PURE__*/(0, _react.forwardRef)(function (_ref5, ref) {
|
|
149
114
|
var href = _ref5.href,
|
|
150
|
-
children = _ref5.children,
|
|
151
115
|
_ref5$newWindow = _ref5.newWindow,
|
|
152
116
|
newWindow = _ref5$newWindow === void 0 ? false : _ref5$newWindow,
|
|
153
117
|
_ref5$selected = _ref5.selected,
|
|
154
118
|
selected = _ref5$selected === void 0 ? false : _ref5$selected,
|
|
155
119
|
icon = _ref5.icon,
|
|
120
|
+
onClick = _ref5.onClick,
|
|
156
121
|
_ref5$tabIndex = _ref5.tabIndex,
|
|
157
122
|
tabIndex = _ref5$tabIndex === void 0 ? 0 : _ref5$tabIndex,
|
|
158
|
-
|
|
123
|
+
children = _ref5.children,
|
|
159
124
|
otherProps = (0, _objectWithoutProperties2["default"])(_ref5, _excluded);
|
|
125
|
+
var changeIsGroupSelected = (0, _react.useContext)(GroupContext);
|
|
160
126
|
var setIsSidenavVisibleResponsive = (0, _SidenavContext.useResponsiveSidenavVisibility)();
|
|
161
127
|
|
|
162
128
|
var handleClick = function handleClick($event) {
|
|
@@ -164,6 +130,11 @@ var Link = /*#__PURE__*/(0, _react.forwardRef)(function (_ref5, ref) {
|
|
|
164
130
|
setIsSidenavVisibleResponsive === null || setIsSidenavVisibleResponsive === void 0 ? void 0 : setIsSidenavVisibleResponsive(false);
|
|
165
131
|
};
|
|
166
132
|
|
|
133
|
+
(0, _react.useEffect)(function () {
|
|
134
|
+
changeIsGroupSelected === null || changeIsGroupSelected === void 0 ? void 0 : changeIsGroupSelected(function (isGroupSelected) {
|
|
135
|
+
return !isGroupSelected ? selected : isGroupSelected;
|
|
136
|
+
});
|
|
137
|
+
}, [selected, changeIsGroupSelected]);
|
|
167
138
|
return /*#__PURE__*/_react["default"].createElement(SidenavLink, (0, _extends2["default"])({
|
|
168
139
|
selected: selected,
|
|
169
140
|
href: href ? href : undefined,
|
|
@@ -171,20 +142,23 @@ var Link = /*#__PURE__*/(0, _react.forwardRef)(function (_ref5, ref) {
|
|
|
171
142
|
ref: ref,
|
|
172
143
|
tabIndex: tabIndex,
|
|
173
144
|
onClick: handleClick
|
|
174
|
-
}, otherProps), /*#__PURE__*/_react["default"].createElement(
|
|
145
|
+
}, otherProps), /*#__PURE__*/_react["default"].createElement(_Flex["default"], {
|
|
146
|
+
alignItems: "center",
|
|
147
|
+
gap: "0.5rem"
|
|
148
|
+
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
175
149
|
src: icon
|
|
176
|
-
}) : icon, children), newWindow && externalLinkIcon);
|
|
150
|
+
}) : icon, children), newWindow && _Icons["default"].externalLinkIcon);
|
|
177
151
|
});
|
|
178
152
|
|
|
179
|
-
var SidenavContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
153
|
+
var SidenavContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: 280px;\n @media (max-width: ", "rem) {\n width: 100vw;\n }\n padding: 2rem 1rem;\n background-color: ", ";\n\n overflow-y: auto;\n overflow-x: hidden;\n ::-webkit-scrollbar {\n width: 2px;\n }\n ::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 3px;\n }\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 3px;\n }\n"])), _variables.responsiveSizes.medium, function (props) {
|
|
180
154
|
return props.theme.backgroundColor;
|
|
181
|
-
},
|
|
155
|
+
}, function (props) {
|
|
182
156
|
return props.theme.scrollBarTrackColor;
|
|
183
157
|
}, function (props) {
|
|
184
158
|
return props.theme.scrollBarThumbColor;
|
|
185
159
|
});
|
|
186
160
|
|
|
187
|
-
var SidenavTitle = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-weight: ", ";\n font-size: ", ";\n
|
|
161
|
+
var SidenavTitle = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n padding: 0.5rem 1.2rem;\n font-family: ", ";\n font-style: ", ";\n font-weight: ", ";\n font-size: ", ";\n color: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n"])), function (props) {
|
|
188
162
|
return props.theme.titleFontFamily;
|
|
189
163
|
}, function (props) {
|
|
190
164
|
return props.theme.titleFontStyle;
|
|
@@ -194,17 +168,17 @@ var SidenavTitle = _styledComponents["default"].div(_templateObject2 || (_templa
|
|
|
194
168
|
return props.theme.titleFontSize;
|
|
195
169
|
}, function (props) {
|
|
196
170
|
return props.theme.titleFontColor;
|
|
197
|
-
}, function (props) {
|
|
198
|
-
return props.theme.titleFontTextTransform;
|
|
199
171
|
}, function (props) {
|
|
200
172
|
return props.theme.titleFontLetterSpacing;
|
|
173
|
+
}, function (props) {
|
|
174
|
+
return props.theme.titleFontTextTransform;
|
|
201
175
|
});
|
|
202
176
|
|
|
203
|
-
var Divider = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n height: 1px;\n background-color: #999999;\n"])));
|
|
177
|
+
var Divider = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n height: 1px;\n background-color: #999999;\n\n &:last-child {\n display: none;\n }\n"])));
|
|
204
178
|
|
|
205
|
-
var SidenavGroup = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
179
|
+
var SidenavGroup = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n a {\n padding: 0.5rem 1.2rem 0.5rem 2.25rem;\n }\n"])));
|
|
206
180
|
|
|
207
|
-
var SidenavGroupTitle = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 0.5rem;\n
|
|
181
|
+
var SidenavGroupTitle = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1.2rem;\n font-family: ", ";\n font-style: ", ";\n font-weight: ", ";\n font-size: ", ";\n\n img,\n svg {\n height: 16px;\n width: 16px;\n }\n"])), function (props) {
|
|
208
182
|
return props.theme.groupTitleFontFamily;
|
|
209
183
|
}, function (props) {
|
|
210
184
|
return props.theme.groupTitleFontStyle;
|
|
@@ -214,7 +188,7 @@ var SidenavGroupTitle = _styledComponents["default"].span(_templateObject5 || (_
|
|
|
214
188
|
return props.theme.groupTitleFontSize;
|
|
215
189
|
});
|
|
216
190
|
|
|
217
|
-
var SidenavGroupTitleButton = _styledComponents["default"].button(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n all: unset;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 0.5rem 1.2rem;\n
|
|
191
|
+
var SidenavGroupTitleButton = _styledComponents["default"].button(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n all: unset;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 0.5rem 1.2rem;\n font-family: ", ";\n font-style: ", ";\n font-weight: ", ";\n font-size: ", ";\n cursor: pointer;\n\n ", "\n\n &:focus, &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: -2px;\n }\n &:hover {\n ", "\n }\n &:active {\n color: #fff;\n background-color: ", ";\n }\n\n img,\n svg {\n height: 16px;\n width: 16px;\n }\n"])), function (props) {
|
|
218
192
|
return props.theme.groupTitleFontFamily;
|
|
219
193
|
}, function (props) {
|
|
220
194
|
return props.theme.groupTitleFontStyle;
|
|
@@ -223,24 +197,16 @@ var SidenavGroupTitleButton = _styledComponents["default"].button(_templateObjec
|
|
|
223
197
|
}, function (props) {
|
|
224
198
|
return props.theme.groupTitleFontSize;
|
|
225
199
|
}, function (props) {
|
|
226
|
-
return props.theme.
|
|
227
|
-
}, function (props) {
|
|
228
|
-
return props.selectedGroup ? "color: ".concat(props.theme.groupTitleSelectedHoverFontColor, "; background: ").concat(props.theme.groupTitleSelectedHoverBackgroundColor, ";") : "color: ".concat(props.theme.groupTitleFontColor, "; background: ").concat(props.theme.groupTitleHoverBackgroundColor, ";");
|
|
200
|
+
return props.selectedGroup ? "color: ".concat(props.theme.groupTitleSelectedFontColor, "; background-color: ").concat(props.theme.groupTitleSelectedBackgroundColor, ";") : "color: ".concat(props.theme.groupTitleFontColor, "; background-color: transparent;");
|
|
229
201
|
}, function (props) {
|
|
230
|
-
return props.theme.
|
|
202
|
+
return props.theme.linkFocusColor;
|
|
231
203
|
}, function (props) {
|
|
232
|
-
return props.theme.groupTitleFontColor;
|
|
204
|
+
return props.selectedGroup ? "color: ".concat(props.theme.groupTitleSelectedHoverFontColor, "; background-color: ").concat(props.theme.groupTitleSelectedHoverBackgroundColor, ";") : "color: ".concat(props.theme.groupTitleFontColor, "; background-color: ").concat(props.theme.groupTitleHoverBackgroundColor, ";");
|
|
233
205
|
}, function (props) {
|
|
234
|
-
return props.selectedGroup ? "
|
|
206
|
+
return props.selectedGroup ? "#333" : props.theme.groupTitleActiveBackgroundColor;
|
|
235
207
|
});
|
|
236
208
|
|
|
237
|
-
var SidenavLink = _styledComponents["default"].a(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.5rem;\n padding: 0.5rem 1.2rem;\n box-shadow: 0 0 0 2px transparent;\n
|
|
238
|
-
return props.theme.linkFontLetterSpacing;
|
|
239
|
-
}, function (props) {
|
|
240
|
-
return props.theme.linkFontTextTransform;
|
|
241
|
-
}, function (props) {
|
|
242
|
-
return props.theme.linkTextDecoration;
|
|
243
|
-
}, function (props) {
|
|
209
|
+
var SidenavLink = _styledComponents["default"].a(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.5rem;\n padding: 0.5rem 1.2rem;\n box-shadow: 0 0 0 2px transparent;\n font-family: ", ";\n font-style: ", ";\n font-weight: ", ";\n font-size: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n text-decoration: ", ";\n cursor: pointer;\n\n ", "\n\n &:focus, &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: -2px;\n }\n &:hover {\n ", "\n }\n &:active {\n color: #fff;\n background-color: ", ";\n outline: 2px solid #0095ff;\n outline-offset: -2px;\n }\n\n img,\n svg {\n height: 16px;\n width: 16px;\n }\n"])), function (props) {
|
|
244
210
|
return props.theme.linkFontFamily;
|
|
245
211
|
}, function (props) {
|
|
246
212
|
return props.theme.linkFontStyle;
|
|
@@ -249,15 +215,21 @@ var SidenavLink = _styledComponents["default"].a(_templateObject7 || (_templateO
|
|
|
249
215
|
}, function (props) {
|
|
250
216
|
return props.theme.linkFontSize;
|
|
251
217
|
}, function (props) {
|
|
252
|
-
return props.
|
|
218
|
+
return props.theme.linkFontLetterSpacing;
|
|
253
219
|
}, function (props) {
|
|
254
|
-
return props.
|
|
220
|
+
return props.theme.linkFontTextTransform;
|
|
221
|
+
}, function (props) {
|
|
222
|
+
return props.theme.linkTextDecoration;
|
|
223
|
+
}, function (props) {
|
|
224
|
+
return props.selected ? "color: ".concat(props.theme.linkSelectedFontColor, "; background-color: ").concat(props.theme.linkSelectedBackgroundColor, ";") : "color: ".concat(props.theme.linkFontColor, "; background-color: transparent;");
|
|
255
225
|
}, function (props) {
|
|
256
226
|
return props.theme.linkFocusColor;
|
|
227
|
+
}, function (props) {
|
|
228
|
+
return props.selected ? "color: ".concat(props.theme.linkSelectedHoverFontColor, "; background-color: ").concat(props.theme.linkSelectedHoverBackgroundColor, ";") : "color: ".concat(props.theme.linkFontColor, "; background-color: ").concat(props.theme.linkHoverBackgroundColor, ";");
|
|
229
|
+
}, function (props) {
|
|
230
|
+
return props.selected ? "#333" : "#4d4d4d";
|
|
257
231
|
});
|
|
258
232
|
|
|
259
|
-
var SidenavContent = _styledComponents["default"].span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n gap: 0.5rem;\n\n img,\n svg {\n height: 16px;\n width: 16px;\n }\n"])));
|
|
260
|
-
|
|
261
233
|
DxcSidenav.Section = Section;
|
|
262
234
|
DxcSidenav.Group = Group;
|
|
263
235
|
DxcSidenav.Link = Link;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import DxcSidenav from "./Sidenav";
|
|
3
|
+
import DxcSelect from "../select/Select";
|
|
4
|
+
import DxcInset from "../inset/Inset";
|
|
3
5
|
import Title from "../../.storybook/components/Title";
|
|
4
6
|
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
7
|
import { userEvent, within } from "@storybook/testing-library";
|
|
@@ -150,13 +152,13 @@ export const Chromatic = () => (
|
|
|
150
152
|
</>
|
|
151
153
|
);
|
|
152
154
|
|
|
153
|
-
const
|
|
155
|
+
const CollapsedGroupSidenav = () => (
|
|
154
156
|
<>
|
|
155
157
|
<ExampleContainer>
|
|
156
|
-
<Title title="
|
|
158
|
+
<Title title="Collapsed group with a selected link" theme="light" level={4} />
|
|
157
159
|
<DxcSidenav title={<DxcSidenav.Title>Dxc technology</DxcSidenav.Title>}>
|
|
158
160
|
<DxcSidenav.Section>
|
|
159
|
-
<DxcSidenav.Group collapsable={true} title="
|
|
161
|
+
<DxcSidenav.Group collapsable={true} title="Collapsed Group" icon={iconSVG}>
|
|
160
162
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
161
163
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
162
164
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
@@ -164,11 +166,11 @@ const CollapsedGroup = () => (
|
|
|
164
166
|
</DxcSidenav.Group>
|
|
165
167
|
</DxcSidenav.Section>
|
|
166
168
|
<DxcSidenav.Section>
|
|
167
|
-
<DxcSidenav.Group collapsable={true} title="
|
|
168
|
-
<DxcSidenav.Link selected>Group Link</DxcSidenav.Link>
|
|
169
|
+
<DxcSidenav.Group collapsable={true} title="Collapsed Group">
|
|
169
170
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
171
|
+
<DxcSidenav.Link selected>Group Link</DxcSidenav.Link>
|
|
170
172
|
</DxcSidenav.Group>
|
|
171
|
-
<DxcSidenav.Group collapsable={
|
|
173
|
+
<DxcSidenav.Group collapsable={true} title="Section Group">
|
|
172
174
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
173
175
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
174
176
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
@@ -179,14 +181,14 @@ const CollapsedGroup = () => (
|
|
|
179
181
|
</>
|
|
180
182
|
);
|
|
181
183
|
|
|
182
|
-
const
|
|
184
|
+
const HoveredGroupSidenav = () => (
|
|
183
185
|
<ExampleContainer pseudoState="pseudo-hover">
|
|
184
|
-
<Title title="
|
|
186
|
+
<Title title="Hover state for groups (selected and not)" theme="light" level={4} />
|
|
185
187
|
<DxcSidenav title={<DxcSidenav.Title>Dxc technology</DxcSidenav.Title>}>
|
|
186
188
|
<DxcSidenav.Section>
|
|
187
189
|
<DxcSidenav.Link>Single Link</DxcSidenav.Link>
|
|
188
190
|
<DxcSidenav.Link>Single Link</DxcSidenav.Link>
|
|
189
|
-
<DxcSidenav.Group collapsable={true} title="
|
|
191
|
+
<DxcSidenav.Group collapsable={true} title="Collapsed Group">
|
|
190
192
|
<DxcSidenav.Link selected>Group Link</DxcSidenav.Link>
|
|
191
193
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
192
194
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
@@ -200,13 +202,12 @@ const HoverSidenav = () => (
|
|
|
200
202
|
</DxcSidenav.Group>
|
|
201
203
|
<DxcSidenav.Link>Single Link</DxcSidenav.Link>
|
|
202
204
|
<DxcSidenav.Link>Single Link</DxcSidenav.Link>
|
|
203
|
-
<DxcSidenav.Group collapsable={true} title="
|
|
205
|
+
<DxcSidenav.Group collapsable={true} title="Collapsed Group">
|
|
204
206
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
205
207
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
206
208
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
207
209
|
</DxcSidenav.Group>
|
|
208
|
-
|
|
209
|
-
<DxcSidenav.Group collapsable={true} title="Collapsable Group">
|
|
210
|
+
<DxcSidenav.Group collapsable={true} title="Collapsed Group">
|
|
210
211
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
211
212
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
212
213
|
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
@@ -216,67 +217,66 @@ const HoverSidenav = () => (
|
|
|
216
217
|
</ExampleContainer>
|
|
217
218
|
);
|
|
218
219
|
|
|
219
|
-
const
|
|
220
|
-
<ExampleContainer pseudoState="pseudo-
|
|
221
|
-
<Title title="
|
|
222
|
-
<
|
|
223
|
-
<DxcSidenav
|
|
224
|
-
<
|
|
225
|
-
<
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
<DxcSidenav.Link>
|
|
240
|
-
<DxcSidenav.Link>
|
|
241
|
-
<DxcSidenav.Group
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
</DxcSidenav.
|
|
252
|
-
</DxcSidenav>
|
|
253
|
-
</
|
|
220
|
+
const ActiveGroupSidenav = () => (
|
|
221
|
+
<ExampleContainer pseudoState="pseudo-active">
|
|
222
|
+
<Title title="Active state for groups (selected and not)" theme="light" level={4} />
|
|
223
|
+
<DxcSidenav title={<DxcSidenav.Title>Dxc technology</DxcSidenav.Title>}>
|
|
224
|
+
<DxcSidenav.Section>
|
|
225
|
+
<DxcInset space="1rem">
|
|
226
|
+
<DxcSelect
|
|
227
|
+
defaultValue="1"
|
|
228
|
+
options={[
|
|
229
|
+
{ label: "v1.0.0", value: "1" },
|
|
230
|
+
{ label: "v2.0.0", value: "2" },
|
|
231
|
+
{ label: "v3.0.0", value: "3" },
|
|
232
|
+
{ label: "v4.0.0", value: "4" },
|
|
233
|
+
]}
|
|
234
|
+
size="fillParent"
|
|
235
|
+
/>
|
|
236
|
+
</DxcInset>
|
|
237
|
+
</DxcSidenav.Section>
|
|
238
|
+
<DxcSidenav.Section>
|
|
239
|
+
<DxcSidenav.Group collapsable={true} title="Collapsed Group">
|
|
240
|
+
<DxcSidenav.Link selected>Group Link</DxcSidenav.Link>
|
|
241
|
+
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
242
|
+
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
243
|
+
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
244
|
+
</DxcSidenav.Group>
|
|
245
|
+
</DxcSidenav.Section>
|
|
246
|
+
<DxcSidenav.Section>
|
|
247
|
+
<DxcSidenav.Group collapsable={true} title="Not Collapsed Group">
|
|
248
|
+
<DxcSidenav.Link selected>Group Link</DxcSidenav.Link>
|
|
249
|
+
<DxcSidenav.Link>Group Link</DxcSidenav.Link>
|
|
250
|
+
</DxcSidenav.Group>
|
|
251
|
+
<DxcSidenav.Link>Single Link</DxcSidenav.Link>
|
|
252
|
+
<DxcSidenav.Link>Single Link</DxcSidenav.Link>
|
|
253
|
+
</DxcSidenav.Section>
|
|
254
|
+
</DxcSidenav>
|
|
254
255
|
</ExampleContainer>
|
|
255
256
|
);
|
|
256
257
|
|
|
257
|
-
export const
|
|
258
|
-
|
|
258
|
+
export const CollapsableGroup = CollapsedGroupSidenav.bind({});
|
|
259
|
+
CollapsableGroup.play = async ({ canvasElement }) => {
|
|
259
260
|
const canvas = within(canvasElement);
|
|
260
|
-
const collapsableGroups = canvas.getAllByText("
|
|
261
|
+
const collapsableGroups = canvas.getAllByText("Collapsed Group");
|
|
261
262
|
collapsableGroups.forEach((group) => {
|
|
262
263
|
userEvent.click(group);
|
|
263
264
|
});
|
|
264
265
|
};
|
|
265
266
|
|
|
266
|
-
export const
|
|
267
|
-
|
|
267
|
+
export const CollapsedHoverGroup = HoveredGroupSidenav.bind({});
|
|
268
|
+
CollapsedHoverGroup.play = async ({ canvasElement }) => {
|
|
268
269
|
const canvas = within(canvasElement);
|
|
269
|
-
const collapsableGroups = canvas.getAllByText("
|
|
270
|
+
const collapsableGroups = canvas.getAllByText("Collapsed Group");
|
|
270
271
|
collapsableGroups.forEach((group) => {
|
|
271
272
|
userEvent.click(group);
|
|
272
273
|
});
|
|
274
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
273
275
|
};
|
|
274
276
|
|
|
275
|
-
export const
|
|
276
|
-
|
|
277
|
+
export const CollapsedActiveGroup = ActiveGroupSidenav.bind({});
|
|
278
|
+
CollapsedActiveGroup.play = async ({ canvasElement }) => {
|
|
277
279
|
const canvas = within(canvasElement);
|
|
278
|
-
const collapsableGroups = canvas.getAllByText("
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
});
|
|
282
|
-
};
|
|
280
|
+
const collapsableGroups = canvas.getAllByText("Collapsed Group");
|
|
281
|
+
userEvent.click(collapsableGroups[0]);
|
|
282
|
+
};
|
package/sidenav/types.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare type SVG = React.ReactNode & React.SVGProps<SVGSVGElement>;
|
|
3
3
|
declare type SidenavPropsType = {
|
|
4
|
-
/**
|
|
5
|
-
* The area inside the sidenav. This area can be used to render the content inside the sidenav.
|
|
6
|
-
*/
|
|
7
|
-
children: React.ReactNode;
|
|
8
4
|
/**
|
|
9
5
|
* The area assigned to render the sidenav title. It is highly recommended to use the sidenav title.
|
|
10
6
|
*/
|
|
11
7
|
title?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* The area inside the sidenav. This area can be used to render the content inside the sidenav.
|
|
10
|
+
*/
|
|
11
|
+
children: React.ReactNode;
|
|
12
12
|
};
|
|
13
13
|
export declare type SidenavTitlePropsType = {
|
|
14
14
|
/**
|
|
@@ -23,28 +23,25 @@ export declare type SidenavSectionPropsType = {
|
|
|
23
23
|
children: React.ReactNode;
|
|
24
24
|
};
|
|
25
25
|
export declare type SidenavGroupPropsType = {
|
|
26
|
-
/**
|
|
27
|
-
* The area inside the sidenav group. This area can be used to render sidenav links.
|
|
28
|
-
*/
|
|
29
|
-
children: React.ReactNode;
|
|
30
26
|
/**
|
|
31
27
|
* The title of the sidenav group.
|
|
32
28
|
*/
|
|
33
29
|
title?: string;
|
|
34
30
|
/**
|
|
35
|
-
* If true the sidenav group
|
|
31
|
+
* If true, the sidenav group will be a button that will allow you to collapse the links contained within it.
|
|
32
|
+
* In addition, if it's collapsed and contains the currently selected link, the group title will also be marked as selected.
|
|
36
33
|
*/
|
|
37
34
|
collapsable?: boolean;
|
|
38
35
|
/**
|
|
39
36
|
* The icon to be displayed next to the title of the group.
|
|
40
37
|
*/
|
|
41
38
|
icon?: string | SVG;
|
|
42
|
-
};
|
|
43
|
-
export declare type SidenavLinkPropsType = {
|
|
44
39
|
/**
|
|
45
|
-
*
|
|
40
|
+
* The area inside the sidenav group. This area can be used to render sidenav links.
|
|
46
41
|
*/
|
|
47
|
-
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
};
|
|
44
|
+
export declare type SidenavLinkPropsType = {
|
|
48
45
|
/**
|
|
49
46
|
* Page to be opened when the user clicks on the link.
|
|
50
47
|
*/
|
|
@@ -58,16 +55,22 @@ export declare type SidenavLinkPropsType = {
|
|
|
58
55
|
*/
|
|
59
56
|
icon?: string | SVG;
|
|
60
57
|
/**
|
|
61
|
-
* If true, the link will be marked as selected.
|
|
58
|
+
* If true, the link will be marked as selected. Moreover, in that same case,
|
|
59
|
+
* if it is contained within a collapsed group, and consequently, the currently selected link is not visible,
|
|
60
|
+
* the group title will appear as selected too.
|
|
62
61
|
*/
|
|
63
62
|
selected?: boolean;
|
|
64
63
|
/**
|
|
65
|
-
*
|
|
64
|
+
* This function will be called when the user clicks the link and the event will be passed to this function.
|
|
66
65
|
*/
|
|
67
|
-
|
|
66
|
+
onClick?: ($event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
68
67
|
/**
|
|
69
|
-
*
|
|
68
|
+
* Value of the tabindex.
|
|
69
|
+
*/
|
|
70
|
+
tabIndex?: number;
|
|
71
|
+
/**
|
|
72
|
+
* The area inside the sidenav link.
|
|
70
73
|
*/
|
|
71
|
-
|
|
74
|
+
children: React.ReactNode;
|
|
72
75
|
};
|
|
73
76
|
export default SidenavPropsType;
|
package/tabs/Tab.js
CHANGED
|
@@ -42,7 +42,6 @@ var Tab = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
42
42
|
type: "button",
|
|
43
43
|
tabIndex: tabIndex,
|
|
44
44
|
disabled: tab.isDisabled,
|
|
45
|
-
"aria-disabled": tab.isDisabled,
|
|
46
45
|
"aria-selected": active,
|
|
47
46
|
hasLabelAndIcon: hasLabelAndIcon,
|
|
48
47
|
iconPosition: iconPosition,
|
|
@@ -82,7 +81,7 @@ var Tab = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
82
81
|
})));
|
|
83
82
|
});
|
|
84
83
|
|
|
85
|
-
var TabContainer = _styledComponents["default"].button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n text-transform: ", ";\n overflow: hidden;\n flex-shrink: 0;\n border: 0;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n user-select: none;\n vertical-align: middle;\n justify-content: center;\n min-width: 90px;\n max-width: 360px;\n padding: ", ";\n height: ", ";\n min-height: ", ";\n background-color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n &:focus {\n outline: ", " solid 1px;\n outline-offset: -1px;\n }\n svg {\n color: ", ";\n }\n\n &[aria-selected=\"true\"] {\n background-color: ", ";\n svg {\n color: ", ";\n }\n opacity: 1;\n }\n\n
|
|
84
|
+
var TabContainer = _styledComponents["default"].button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n text-transform: ", ";\n overflow: hidden;\n flex-shrink: 0;\n border: 0;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n user-select: none;\n vertical-align: middle;\n justify-content: center;\n min-width: 90px;\n max-width: 360px;\n padding: ", ";\n height: ", ";\n min-height: ", ";\n background-color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n &:focus {\n outline: ", " solid 1px;\n outline-offset: -1px;\n }\n svg {\n color: ", ";\n }\n\n &[aria-selected=\"true\"] {\n background-color: ", ";\n svg {\n color: ", ";\n }\n opacity: 1;\n }\n\n &:disabled {\n background-color: ", " !important;\n cursor: not-allowed !important;\n pointer-events: all;\n font-style: ", ";\n outline: none !important;\n\n svg {\n color: ", ";\n }\n > div {\n opacity: 0.5;\n }\n }\n"])), function (props) {
|
|
86
85
|
return props.theme.fontTextTransform;
|
|
87
86
|
}, function (props) {
|
|
88
87
|
return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "12px 16px" || "8px 16px";
|