@dxc-technology/halstack-react 9.1.0 → 10.1.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 +11 -6
- package/HalstackContext.js +1 -1
- package/README.md +47 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +2 -14
- package/accordion/Accordion.stories.tsx +2 -100
- 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/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 -54
- package/button/Button.stories.tsx +3 -3
- 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 +9 -144
- package/common/variables.js +960 -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 +24 -10
- 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 +19 -95
- package/footer/Footer.test.js +3 -1
- package/footer/types.d.ts +10 -12
- package/grid/Grid.d.ts +1 -1
- package/grid/Grid.js +1 -1
- package/grid/Grid.stories.tsx +38 -38
- 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/image/Image.d.ts +4 -0
- package/image/Image.js +85 -0
- package/image/Image.stories.tsx +127 -0
- package/image/types.d.ts +72 -0
- package/inset/Inset.stories.tsx +1 -1
- package/layout/ApplicationLayout.d.ts +2 -2
- package/layout/ApplicationLayout.js +14 -11
- package/layout/ApplicationLayout.stories.tsx +1 -1
- package/layout/Icons.d.ts +7 -4
- package/layout/Icons.js +52 -56
- 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/number-input/NumberInput.d.ts +7 -0
- package/number-input/NumberInput.js +6 -4
- package/number-input/NumberInput.test.js +278 -95
- package/package.json +2 -2
- package/paginator/Paginator.js +1 -1
- package/paginator/Paginator.test.js +13 -0
- package/password-input/Icons.d.ts +6 -0
- package/password-input/Icons.js +39 -0
- package/password-input/PasswordInput.js +35 -82
- package/password-input/PasswordInput.stories.tsx +1 -0
- package/password-input/PasswordInput.test.js +27 -34
- package/radio-group/Radio.js +10 -10
- package/radio-group/RadioGroup.js +8 -10
- package/select/Select.stories.tsx +3 -3
- package/select/Select.test.js +4 -4
- package/sidenav/Sidenav.js +21 -23
- package/text-input/TextInput.js +62 -78
- package/text-input/TextInput.stories.tsx +1 -1
- package/toggle-group/ToggleGroup.d.ts +2 -2
- package/toggle-group/ToggleGroup.js +79 -56
- package/toggle-group/ToggleGroup.stories.tsx +6 -3
- package/toggle-group/ToggleGroup.test.js +37 -23
- package/toggle-group/types.d.ts +22 -13
- package/useTheme.d.ts +9 -1
- package/utils/FocusLock.js +2 -3
- package/card/ice-cream.jpg +0 -0
- package/number-input/NumberInputContext.d.ts +0 -4
- package/number-input/NumberInputContext.js +0 -19
- package/number-input/numberInputContextTypes.d.ts +0 -19
- /package/{number-input/numberInputContextTypes.js → image/types.js} +0 -0
package/image/types.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
/**
|
|
4
|
+
* Alternative text description displayed when the specified image is not loaded.
|
|
5
|
+
*
|
|
6
|
+
* See MDN: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt
|
|
7
|
+
* See W3C alt decision tree: https://www.w3.org/WAI/tutorials/images/decision-tree/
|
|
8
|
+
*/
|
|
9
|
+
alt: string;
|
|
10
|
+
/**
|
|
11
|
+
* Image legend with a descriptive purpose. It is placed below the image and is complementary to the alt attribute,
|
|
12
|
+
* which is required regardless of the presence of the caption or not.
|
|
13
|
+
*/
|
|
14
|
+
caption?: string;
|
|
15
|
+
/**
|
|
16
|
+
* If true, the image will be loaded only when it is visible on the screen (lazy loading).
|
|
17
|
+
* Otherwise and by default, the image will be loaded as soon as the component is mounted (eager loading).
|
|
18
|
+
*/
|
|
19
|
+
lazyLoading?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* URL of the image. This prop is required and must be valid.
|
|
22
|
+
*/
|
|
23
|
+
src: string;
|
|
24
|
+
/**
|
|
25
|
+
* List of one or more strings separated by commas indicating a set of possible images for the user agent to use.
|
|
26
|
+
*
|
|
27
|
+
* See MDN: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset
|
|
28
|
+
*/
|
|
29
|
+
srcSet?: string;
|
|
30
|
+
/**
|
|
31
|
+
* One or more strings separated by commas, indicating a set of source sizes.
|
|
32
|
+
* If the srcSet attribute is absent or contains no values with a width descriptor,
|
|
33
|
+
* then this attribute has no effect.
|
|
34
|
+
*
|
|
35
|
+
* See MDN: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/sizes
|
|
36
|
+
*/
|
|
37
|
+
sizes?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Sets the rendered width of the image.
|
|
40
|
+
*/
|
|
41
|
+
width?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Sets the rendered height of the image.
|
|
44
|
+
*/
|
|
45
|
+
height?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Sets the object-fit CSS property.
|
|
48
|
+
*
|
|
49
|
+
* See MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
|
|
50
|
+
*/
|
|
51
|
+
objectFit?: "contain" | "cover" | "fill" | "none" | "scale-down";
|
|
52
|
+
/**
|
|
53
|
+
* Sets the object-position CSS property.
|
|
54
|
+
*
|
|
55
|
+
* See MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/object-position
|
|
56
|
+
*/
|
|
57
|
+
objectPosition?: string;
|
|
58
|
+
/**
|
|
59
|
+
* This function will be called when the image is loaded.
|
|
60
|
+
*/
|
|
61
|
+
onLoad?: React.ReactEventHandler<HTMLImageElement>;
|
|
62
|
+
/**
|
|
63
|
+
* This function will be called when the image fails to load.
|
|
64
|
+
*/
|
|
65
|
+
onError?: React.ReactEventHandler<HTMLImageElement>;
|
|
66
|
+
};
|
|
67
|
+
export declare type CaptionWrapperProps = {
|
|
68
|
+
condition: boolean;
|
|
69
|
+
wrapper: (children: React.ReactNode) => JSX.Element;
|
|
70
|
+
children: React.ReactNode;
|
|
71
|
+
};
|
|
72
|
+
export default Props;
|
package/inset/Inset.stories.tsx
CHANGED
|
@@ -205,7 +205,7 @@ export const Chromatic = () => (
|
|
|
205
205
|
</Container>
|
|
206
206
|
<Title title="Inside a flex column" level={4} />
|
|
207
207
|
<Container>
|
|
208
|
-
<DxcFlex direction="column" gap="
|
|
208
|
+
<DxcFlex direction="column" gap="1rem">
|
|
209
209
|
<Placeholder></Placeholder>
|
|
210
210
|
<DxcInset top="0.25rem" right="1.5rem" bottom="2rem" left="4rem">
|
|
211
211
|
<Placeholder></Placeholder>
|
|
@@ -3,11 +3,11 @@ import AppLayoutPropsType, { AppLayoutMainPropsType } from "./types";
|
|
|
3
3
|
declare const DxcApplicationLayout: {
|
|
4
4
|
({ visibilityToggleLabel, header, sidenav, footer, children, }: AppLayoutPropsType): JSX.Element;
|
|
5
5
|
Header: {
|
|
6
|
-
({ underlined, content, responsiveContent, onClick, margin,
|
|
6
|
+
({ underlined, content, responsiveContent, onClick, margin, tabIndex, }: import("../header/types").default): JSX.Element;
|
|
7
7
|
Dropdown: (props: import("../dropdown/types").default) => JSX.Element;
|
|
8
8
|
};
|
|
9
9
|
Main: ({ children }: AppLayoutMainPropsType) => JSX.Element;
|
|
10
|
-
Footer: ({ socialLinks, bottomLinks, copyright, children,
|
|
10
|
+
Footer: ({ socialLinks, bottomLinks, copyright, children, margin, tabIndex, }: import("../footer/types").default) => JSX.Element;
|
|
11
11
|
SideNav: {
|
|
12
12
|
({ title, children }: import("../sidenav/types").default): JSX.Element;
|
|
13
13
|
Section: ({ children }: import("../sidenav/types").SidenavSectionPropsType) => JSX.Element;
|
|
@@ -25,7 +25,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
25
25
|
|
|
26
26
|
var _variables = require("../common/variables");
|
|
27
27
|
|
|
28
|
-
var _Icons = require("./Icons");
|
|
28
|
+
var _Icons = _interopRequireDefault(require("./Icons"));
|
|
29
29
|
|
|
30
30
|
var _SidenavContext = require("./SidenavContext");
|
|
31
31
|
|
|
@@ -57,21 +57,24 @@ var defaultFooter = function defaultFooter() {
|
|
|
57
57
|
href: "https://www.linkedin.com/company/dxctechnology",
|
|
58
58
|
text: "Linkedin"
|
|
59
59
|
}, {
|
|
60
|
-
href: "https://
|
|
61
|
-
text: "
|
|
60
|
+
href: "https://x.com/dxctechnology",
|
|
61
|
+
text: "X"
|
|
62
62
|
}, {
|
|
63
63
|
href: "https://www.facebook.com/DXCTechnology/",
|
|
64
64
|
text: "Facebook"
|
|
65
65
|
}],
|
|
66
66
|
socialLinks: [{
|
|
67
67
|
href: "https://www.linkedin.com/company/dxctechnology",
|
|
68
|
-
logo: _Icons.linkedinLogo
|
|
68
|
+
logo: _Icons["default"].linkedinLogo,
|
|
69
|
+
title: "Linkedin"
|
|
69
70
|
}, {
|
|
70
|
-
href: "https://
|
|
71
|
-
logo: _Icons.
|
|
71
|
+
href: "https://x.com/dxctechnology",
|
|
72
|
+
logo: _Icons["default"].xLogo,
|
|
73
|
+
title: "X"
|
|
72
74
|
}, {
|
|
73
75
|
href: "https://www.facebook.com/DXCTechnology/",
|
|
74
|
-
logo: _Icons.facebookLogo
|
|
76
|
+
logo: _Icons["default"].facebookLogo,
|
|
77
|
+
title: "Facebook"
|
|
75
78
|
}]
|
|
76
79
|
});
|
|
77
80
|
};
|
|
@@ -119,7 +122,7 @@ var DxcApplicationLayout = function DxcApplicationLayout(_ref2) {
|
|
|
119
122
|
});
|
|
120
123
|
};
|
|
121
124
|
|
|
122
|
-
(0, _react.
|
|
125
|
+
(0, _react.useEffect)(function () {
|
|
123
126
|
handleResize();
|
|
124
127
|
window.addEventListener("resize", handleResize);
|
|
125
128
|
return function () {
|
|
@@ -137,7 +140,7 @@ var DxcApplicationLayout = function DxcApplicationLayout(_ref2) {
|
|
|
137
140
|
onClick: handleSidenavVisibility,
|
|
138
141
|
"aria-label": visibilityToggleLabel ? undefined : translatedLabels.applicationLayout.visibilityToggleTitle,
|
|
139
142
|
title: translatedLabels.applicationLayout.visibilityToggleTitle
|
|
140
|
-
}, _Icons.hamburgerIcon, visibilityToggleLabel)), /*#__PURE__*/_react["default"].createElement(BodyContainer, null, /*#__PURE__*/_react["default"].createElement(_SidenavContext.SidenavContextProvider, {
|
|
143
|
+
}, _Icons["default"].hamburgerIcon, visibilityToggleLabel)), /*#__PURE__*/_react["default"].createElement(BodyContainer, null, /*#__PURE__*/_react["default"].createElement(_SidenavContext.SidenavContextProvider, {
|
|
141
144
|
value: setIsSidenavVisibleResponsive
|
|
142
145
|
}, sidenav && (isResponsive ? isSidenavVisibleResponsive : true) && /*#__PURE__*/_react["default"].createElement(SidenavContainer, null, sidenav)), /*#__PURE__*/_react["default"].createElement(MainContainer, null, /*#__PURE__*/_react["default"].createElement(MainContentContainer, null, main), footerContent)));
|
|
143
146
|
};
|
|
@@ -152,7 +155,7 @@ var HeaderContainer = _styledComponents["default"].div(_templateObject2 || (_tem
|
|
|
152
155
|
|
|
153
156
|
var VisibilityToggle = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 64px;\n left: 0;\n right: 0;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 4px 16px;\n width: 100%;\n background-color: #f2f2f2;\n user-select: none;\n z-index: 2;\n"])));
|
|
154
157
|
|
|
155
|
-
var HamburgerTrigger = _styledComponents["default"].button(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n border: 0px solid transparent;\n border-radius: 2px;\n padding: 12px 4px;\n background-color: transparent;\n box-shadow: 0 0 0 2px transparent;\n font-family: Open Sans, sans-serif;\n font-weight: 600;\n font-size: 14px;\n color: #000;\n cursor: pointer;\n :active {\n background-color: #cccccc;\n }\n :focus,\n :focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px #0095ff;\n }\n & > svg {\n height: 20px;\n width: 20px;\n }\n"])));
|
|
158
|
+
var HamburgerTrigger = _styledComponents["default"].button(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n border: 0px solid transparent;\n border-radius: 2px;\n padding: 12px 4px;\n background-color: transparent;\n box-shadow: 0 0 0 2px transparent;\n font-family: Open Sans, sans-serif;\n font-weight: 600;\n font-size: 14px;\n color: #000;\n cursor: pointer;\n\n :active {\n background-color: #cccccc;\n }\n :focus,\n :focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px #0095ff;\n }\n & > svg {\n height: 20px;\n width: 20px;\n }\n"])));
|
|
156
159
|
|
|
157
160
|
var BodyContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n flex: 1;\n"])));
|
|
158
161
|
|
|
@@ -160,7 +163,7 @@ var SidenavContainer = _styledComponents["default"].div(_templateObject6 || (_te
|
|
|
160
163
|
|
|
161
164
|
var MainContainer = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n width: 100%;\n"])));
|
|
162
165
|
|
|
163
|
-
var MainContentContainer = _styledComponents["default"].
|
|
166
|
+
var MainContentContainer = _styledComponents["default"].main(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1;\n background-color: #fff;\n"])));
|
|
164
167
|
|
|
165
168
|
DxcApplicationLayout.Header = _Header["default"];
|
|
166
169
|
DxcApplicationLayout.Main = Main;
|
|
@@ -4,7 +4,7 @@ import Title from "../../.storybook/components/Title";
|
|
|
4
4
|
import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title: "Application Layout
|
|
7
|
+
title: "Application Layout",
|
|
8
8
|
component: DxcApplicationLayout,
|
|
9
9
|
parameters: {
|
|
10
10
|
viewport: {
|
package/layout/Icons.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
declare const layoutIcons: {
|
|
3
|
+
facebookLogo: JSX.Element;
|
|
4
|
+
xLogo: JSX.Element;
|
|
5
|
+
linkedinLogo: JSX.Element;
|
|
6
|
+
hamburgerIcon: JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
export default layoutIcons;
|
package/layout/Icons.js
CHANGED
|
@@ -5,62 +5,58 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
d: "M3 18V16H21V18ZM3 13V11H21V13ZM3 8V6H21V8Z"
|
|
64
|
-
}));
|
|
65
|
-
|
|
66
|
-
exports.hamburgerIcon = hamburgerIcon;
|
|
12
|
+
var layoutIcons = {
|
|
13
|
+
facebookLogo: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
14
|
+
version: "1.1",
|
|
15
|
+
id: "Capa_1",
|
|
16
|
+
x: "0px",
|
|
17
|
+
y: "0px",
|
|
18
|
+
width: "438.536px",
|
|
19
|
+
height: "438.536px",
|
|
20
|
+
viewBox: "0 0 438.536 438.536",
|
|
21
|
+
fill: "#FFFFFF"
|
|
22
|
+
}, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("path", {
|
|
23
|
+
d: "M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123 C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126 h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225 C438.532,59.576,430.49,40.204,414.41,24.123z M373.155,225.548h-49.963V406.84h-74.802V225.548H210.99V163.02h37.401v-37.402 c0-26.838,6.283-47.107,18.843-60.813c12.559-13.706,33.304-20.555,62.242-20.555h49.963v62.526h-31.401 c-10.663,0-17.467,1.853-20.417,5.568c-2.949,3.711-4.428,10.23-4.428,19.558v31.119h56.534L373.155,225.548z"
|
|
24
|
+
}))),
|
|
25
|
+
xLogo: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
26
|
+
width: "256",
|
|
27
|
+
height: "256",
|
|
28
|
+
viewBox: "0 0 256 256",
|
|
29
|
+
fill: "none",
|
|
30
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
31
|
+
}, /*#__PURE__*/_react["default"].createElement("rect", {
|
|
32
|
+
width: "256",
|
|
33
|
+
height: "256",
|
|
34
|
+
rx: "40",
|
|
35
|
+
fill: "white"
|
|
36
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
37
|
+
d: "M140.192 118.205L187.848 64H176.556L135.158 111.056L102.117 64H64L113.975 135.163L64 192H75.2914L118.982 142.296L153.883 192H192L140.192 118.205ZM124.722 135.787L119.65 128.697L79.3634 72.3294H96.7094L129.232 117.837L134.282 124.927L176.551 184.076H159.205L124.722 135.787Z",
|
|
38
|
+
fill: "#0F1419"
|
|
39
|
+
})),
|
|
40
|
+
linkedinLogo: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
41
|
+
version: "1.1",
|
|
42
|
+
id: "Capa_1",
|
|
43
|
+
x: "0px",
|
|
44
|
+
y: "0px",
|
|
45
|
+
width: "438.536px",
|
|
46
|
+
height: "438.536px",
|
|
47
|
+
viewBox: "0 0 438.536 438.536",
|
|
48
|
+
fill: "#FFFFFF"
|
|
49
|
+
}, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("path", {
|
|
50
|
+
d: "M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123 C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126 h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225 C438.532,59.576,430.49,40.204,414.41,24.123z M133.618,367.157H67.666V169.016h65.952V367.157z M127.626,132.332 c-6.851,6.567-15.893,9.851-27.124,9.851h-0.288c-10.848,0-19.648-3.284-26.407-9.851c-6.76-6.567-10.138-14.703-10.138-24.41 c0-9.897,3.476-18.083,10.421-24.556c6.95-6.471,15.942-9.708,26.98-9.708c11.039,0,19.89,3.237,26.553,9.708 c6.661,6.473,10.088,14.659,10.277,24.556C137.899,117.625,134.477,125.761,127.626,132.332z M370.873,367.157h-65.952v-105.92 c0-29.879-11.036-44.823-33.116-44.823c-8.374,0-15.42,2.331-21.128,6.995c-5.715,4.661-9.996,10.324-12.847,16.991 c-1.335,3.422-1.999,8.75-1.999,15.981v110.775h-65.952c0.571-119.529,0.571-185.579,0-198.142h65.952v27.974 c13.867-21.681,33.558-32.544,59.101-32.544c22.84,0,41.21,7.52,55.104,22.554c13.895,15.037,20.841,37.214,20.841,66.519v113.64 H370.873z"
|
|
51
|
+
}))),
|
|
52
|
+
hamburgerIcon: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
53
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
54
|
+
height: "24",
|
|
55
|
+
width: "24",
|
|
56
|
+
viewBox: "0 0 24 24"
|
|
57
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
58
|
+
d: "M3 18V16H21V18ZM3 13V11H21V13ZM3 8V6H21V8Z"
|
|
59
|
+
}))
|
|
60
|
+
};
|
|
61
|
+
var _default = layoutIcons;
|
|
62
|
+
exports["default"] = _default;
|
package/link/Link.js
CHANGED
|
@@ -105,7 +105,7 @@ var StyledLink = _styledComponents["default"].div(_templateObject || (_templateO
|
|
|
105
105
|
}, function (props) {
|
|
106
106
|
return props.disabled && "cursor: default;";
|
|
107
107
|
}, function (props) {
|
|
108
|
-
return props.inheritColor ? "inherit" : !props.disabled ? props.theme.fontColor : props.theme.
|
|
108
|
+
return props.inheritColor ? "inherit" : !props.disabled ? props.theme.fontColor : props.theme.disabledFontColor;
|
|
109
109
|
}, function (props) {
|
|
110
110
|
return props.disabled ? "pointer-events: none;" : "";
|
|
111
111
|
}, function (props) {
|
package/main.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ import DxcTypography from "./typography/Typography";
|
|
|
40
40
|
import DxcParagraph from "./paragraph/Paragraph";
|
|
41
41
|
import DxcBulletedList from "./bulleted-list/BulletedList";
|
|
42
42
|
import DxcGrid from "./grid/Grid";
|
|
43
|
+
import DxcImage from "./image/Image";
|
|
43
44
|
import HalstackContext, { HalstackProvider, HalstackLanguageContext } from "./HalstackContext";
|
|
44
45
|
import { BackgroundColorProvider } from "./BackgroundColorContext";
|
|
45
|
-
export { DxcAlert, DxcButton, DxcCheckbox, DxcTextInput, DxcDropdown, DxcSwitch, DxcSlider, DxcTable, DxcTabs, DxcToggleGroup, DxcDialog, DxcCard, DxcProgressBar, DxcAccordion, DxcSpinner, DxcBox, DxcTag, DxcPaginator, DxcWizard, DxcLink, DxcHeading, DxcResultsetTable, DxcChip, DxcApplicationLayout, HalstackContext, HalstackLanguageContext, HalstackProvider, BackgroundColorProvider, DxcAccordionGroup, DxcBadge, DxcPasswordInput, DxcDateInput, DxcNumberInput, DxcTextarea, DxcSelect, DxcFileInput, DxcRadioGroup, DxcBleed, DxcInset, DxcQuickNav, DxcNavTabs, DxcFlex, DxcTypography, DxcParagraph, DxcBulletedList, DxcGrid, };
|
|
46
|
+
export { DxcAlert, DxcButton, DxcCheckbox, DxcTextInput, DxcDropdown, DxcSwitch, DxcSlider, DxcTable, DxcTabs, DxcToggleGroup, DxcDialog, DxcCard, DxcProgressBar, DxcAccordion, DxcSpinner, DxcBox, DxcTag, DxcPaginator, DxcWizard, DxcLink, DxcHeading, DxcResultsetTable, DxcChip, DxcApplicationLayout, HalstackContext, HalstackLanguageContext, HalstackProvider, BackgroundColorProvider, DxcAccordionGroup, DxcBadge, DxcPasswordInput, DxcDateInput, DxcNumberInput, DxcTextarea, DxcSelect, DxcFileInput, DxcRadioGroup, DxcBleed, DxcInset, DxcQuickNav, DxcNavTabs, DxcFlex, DxcTypography, DxcParagraph, DxcBulletedList, DxcGrid, DxcImage, };
|
package/main.js
CHANGED
|
@@ -127,6 +127,12 @@ Object.defineProperty(exports, "DxcHeading", {
|
|
|
127
127
|
return _Heading["default"];
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
|
+
Object.defineProperty(exports, "DxcImage", {
|
|
131
|
+
enumerable: true,
|
|
132
|
+
get: function get() {
|
|
133
|
+
return _Image["default"];
|
|
134
|
+
}
|
|
135
|
+
});
|
|
130
136
|
Object.defineProperty(exports, "DxcInset", {
|
|
131
137
|
enumerable: true,
|
|
132
138
|
get: function get() {
|
|
@@ -368,6 +374,8 @@ var _BulletedList = _interopRequireDefault(require("./bulleted-list/BulletedList
|
|
|
368
374
|
|
|
369
375
|
var _Grid = _interopRequireDefault(require("./grid/Grid"));
|
|
370
376
|
|
|
377
|
+
var _Image = _interopRequireDefault(require("./image/Image"));
|
|
378
|
+
|
|
371
379
|
var _HalstackContext = _interopRequireWildcard(require("./HalstackContext"));
|
|
372
380
|
|
|
373
381
|
var _BackgroundColorContext = require("./BackgroundColorContext");
|
package/nav-tabs/NavTabs.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { NavTabsContextProps
|
|
2
|
+
import NavTabsPropsType, { NavTabsContextProps } from "./types";
|
|
3
3
|
export declare const NavTabsContext: React.Context<NavTabsContextProps>;
|
|
4
4
|
declare const DxcNavTabs: {
|
|
5
|
-
({ iconPosition, tabIndex, children }:
|
|
5
|
+
({ iconPosition, tabIndex, children }: NavTabsPropsType): JSX.Element;
|
|
6
6
|
Tab: React.ForwardRefExoticComponent<import("./types").TabProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
7
7
|
};
|
|
8
8
|
export default DxcNavTabs;
|
package/nav-tabs/NavTabs.js
CHANGED
|
@@ -68,23 +68,20 @@ var DxcNavTabs = function DxcNavTabs(_ref) {
|
|
|
68
68
|
_ref$tabIndex = _ref.tabIndex,
|
|
69
69
|
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
|
|
70
70
|
children = _ref.children;
|
|
71
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
72
71
|
|
|
73
72
|
var _useState = (0, _react.useState)(null),
|
|
74
73
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
innerFocusIndex = _useState2[0],
|
|
75
|
+
setInnerFocusIndex = _useState2[1];
|
|
77
76
|
|
|
77
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
78
78
|
var contextValue = (0, _react.useMemo)(function () {
|
|
79
79
|
return {
|
|
80
80
|
iconPosition: iconPosition,
|
|
81
81
|
tabIndex: tabIndex,
|
|
82
|
-
|
|
83
|
-
return getPropInChild(child, "icon");
|
|
84
|
-
}),
|
|
85
|
-
focusedLabel: innerFocus === null ? undefined : getLabelFromTab(children[innerFocus])
|
|
82
|
+
focusedLabel: innerFocusIndex === null ? undefined : getLabelFromTab(children[innerFocusIndex])
|
|
86
83
|
};
|
|
87
|
-
}, [iconPosition, tabIndex,
|
|
84
|
+
}, [iconPosition, tabIndex, innerFocusIndex]);
|
|
88
85
|
|
|
89
86
|
var handleOnKeyDown = function handleOnKeyDown(event) {
|
|
90
87
|
var activeTab = _react["default"].Children.toArray(children).findIndex(function (child) {
|
|
@@ -95,13 +92,13 @@ var DxcNavTabs = function DxcNavTabs(_ref) {
|
|
|
95
92
|
case "Left":
|
|
96
93
|
case "ArrowLeft":
|
|
97
94
|
event.preventDefault();
|
|
98
|
-
|
|
95
|
+
setInnerFocusIndex(getPreviousTabIndex(children, innerFocusIndex === null ? activeTab : innerFocusIndex));
|
|
99
96
|
break;
|
|
100
97
|
|
|
101
98
|
case "Right":
|
|
102
99
|
case "ArrowRight":
|
|
103
100
|
event.preventDefault();
|
|
104
|
-
|
|
101
|
+
setInnerFocusIndex(getNextTabIndex(children, innerFocusIndex === null ? activeTab : innerFocusIndex));
|
|
105
102
|
break;
|
|
106
103
|
}
|
|
107
104
|
};
|
|
@@ -176,6 +176,20 @@ export const Chromatic = () => (
|
|
|
176
176
|
</DxcNavTabs.Tab>
|
|
177
177
|
</DxcNavTabs>
|
|
178
178
|
</ExampleContainer>
|
|
179
|
+
<ExampleContainer>
|
|
180
|
+
<Title title="With long label and left icon alignment" theme="light" level={4} />
|
|
181
|
+
<DxcNavTabs iconPosition="left">
|
|
182
|
+
<DxcNavTabs.Tab href="#" active>
|
|
183
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
|
184
|
+
</DxcNavTabs.Tab>
|
|
185
|
+
<DxcNavTabs.Tab href="#" icon={iconSVG} disabled notificationNumber={3}>
|
|
186
|
+
Tab 2
|
|
187
|
+
</DxcNavTabs.Tab>
|
|
188
|
+
<DxcNavTabs.Tab href="#" icon={iconSVG}>
|
|
189
|
+
Tab 3
|
|
190
|
+
</DxcNavTabs.Tab>
|
|
191
|
+
</DxcNavTabs>
|
|
192
|
+
</ExampleContainer>
|
|
179
193
|
<Title title="Opinionated theme" theme="light" level={2} />
|
|
180
194
|
<ExampleContainer>
|
|
181
195
|
<Title title="Only label" theme="light" level={4} />
|
package/nav-tabs/Tab.js
CHANGED
|
@@ -21,13 +21,15 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
21
21
|
|
|
22
22
|
var _Badge = _interopRequireDefault(require("../badge/Badge"));
|
|
23
23
|
|
|
24
|
+
var _Flex = _interopRequireDefault(require("../flex/Flex"));
|
|
25
|
+
|
|
24
26
|
var _NavTabs = require("./NavTabs");
|
|
25
27
|
|
|
26
28
|
var _BaseTypography = _interopRequireDefault(require("../utils/BaseTypography"));
|
|
27
29
|
|
|
28
30
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
29
31
|
|
|
30
|
-
var _templateObject, _templateObject2, _templateObject3
|
|
32
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
31
33
|
|
|
32
34
|
var _excluded = ["href", "active", "icon", "disabled", "notificationNumber", "children"];
|
|
33
35
|
|
|
@@ -46,16 +48,15 @@ var DxcTab = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, _ref2) {
|
|
|
46
48
|
notificationNumber = _ref$notificationNumb === void 0 ? false : _ref$notificationNumb,
|
|
47
49
|
children = _ref.children,
|
|
48
50
|
otherProps = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
49
|
-
var tabRef =
|
|
51
|
+
var tabRef = (0, _react.useRef)();
|
|
52
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
50
53
|
|
|
51
54
|
var _useContext = (0, _react.useContext)(_NavTabs.NavTabsContext),
|
|
52
55
|
iconPosition = _useContext.iconPosition,
|
|
53
56
|
tabIndex = _useContext.tabIndex,
|
|
54
|
-
hasIcons = _useContext.hasIcons,
|
|
55
57
|
focusedLabel = _useContext.focusedLabel;
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
(0, _react.useLayoutEffect)(function () {
|
|
59
|
+
(0, _react.useEffect)(function () {
|
|
59
60
|
var _tabRef$current;
|
|
60
61
|
|
|
61
62
|
focusedLabel === children.toString() && (tabRef === null || tabRef === void 0 ? void 0 : (_tabRef$current = tabRef.current) === null || _tabRef$current === void 0 ? void 0 : _tabRef$current.focus());
|
|
@@ -67,8 +68,8 @@ var DxcTab = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, _ref2) {
|
|
|
67
68
|
switch (event.key) {
|
|
68
69
|
case " ":
|
|
69
70
|
case "Enter":
|
|
70
|
-
tabRef === null || tabRef === void 0 ? void 0 : (_tabRef$current2 = tabRef.current) === null || _tabRef$current2 === void 0 ? void 0 : _tabRef$current2.click();
|
|
71
71
|
event.preventDefault();
|
|
72
|
+
tabRef === null || tabRef === void 0 ? void 0 : (_tabRef$current2 = tabRef.current) === null || _tabRef$current2 === void 0 ? void 0 : _tabRef$current2.click();
|
|
72
73
|
break;
|
|
73
74
|
}
|
|
74
75
|
};
|
|
@@ -79,18 +80,16 @@ var DxcTab = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, _ref2) {
|
|
|
79
80
|
"aria-selected": active,
|
|
80
81
|
"aria-disabled": disabled
|
|
81
82
|
}, /*#__PURE__*/_react["default"].createElement(Tab, (0, _extends2["default"])({
|
|
82
|
-
href: !disabled
|
|
83
|
+
href: !disabled ? href : undefined,
|
|
83
84
|
disabled: disabled,
|
|
84
85
|
active: active,
|
|
85
86
|
iconPosition: iconPosition,
|
|
86
|
-
hasIcon:
|
|
87
|
+
hasIcon: icon != null ? true : false,
|
|
87
88
|
ref: function ref(anchorRef) {
|
|
88
89
|
tabRef.current = anchorRef;
|
|
89
90
|
|
|
90
91
|
if (_ref2) {
|
|
91
|
-
if (typeof _ref2 === "function") _ref2(anchorRef);else
|
|
92
|
-
_ref2.current = anchorRef;
|
|
93
|
-
}
|
|
92
|
+
if (typeof _ref2 === "function") _ref2(anchorRef);else _ref2.current = anchorRef;
|
|
94
93
|
}
|
|
95
94
|
},
|
|
96
95
|
onKeyDown: handleOnKeyDown,
|
|
@@ -99,7 +98,10 @@ var DxcTab = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, _ref2) {
|
|
|
99
98
|
iconPosition: iconPosition
|
|
100
99
|
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
101
100
|
src: icon
|
|
102
|
-
}) : icon), /*#__PURE__*/_react["default"].createElement(
|
|
101
|
+
}) : icon), /*#__PURE__*/_react["default"].createElement(_Flex["default"], {
|
|
102
|
+
alignItems: "center",
|
|
103
|
+
gap: "0.5rem"
|
|
104
|
+
}, /*#__PURE__*/_react["default"].createElement(_BaseTypography["default"], {
|
|
103
105
|
color: disabled ? colorsTheme.navTabs.disabledFontColor : active ? colorsTheme.navTabs.selectedFontColor : colorsTheme.navTabs.unselectedFontColor,
|
|
104
106
|
fontFamily: colorsTheme.navTabs.fontFamily,
|
|
105
107
|
fontSize: colorsTheme.navTabs.fontSize,
|
|
@@ -108,13 +110,13 @@ var DxcTab = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, _ref2) {
|
|
|
108
110
|
textAlign: "center",
|
|
109
111
|
letterSpacing: "0.025em",
|
|
110
112
|
lineHeight: "1.715em"
|
|
111
|
-
}, children), notificationNumber && /*#__PURE__*/_react["default"].createElement(
|
|
113
|
+
}, children), notificationNumber && /*#__PURE__*/_react["default"].createElement(_Badge["default"], {
|
|
112
114
|
notificationText: typeof notificationNumber === "number" && notificationNumber > 99 ? "+99" : notificationNumber,
|
|
113
115
|
disabled: disabled
|
|
114
|
-
}))))
|
|
116
|
+
}))));
|
|
115
117
|
});
|
|
116
118
|
|
|
117
|
-
var TabContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n border-bottom: 2px solid ", ";\n svg {\n color: ", ";\n }\n
|
|
119
|
+
var TabContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n align-items: stretch;\n border-bottom: 2px solid ", ";\n padding: 0.5rem;\n\n svg {\n color: ", ";\n }\n &[aria-selected=\"true\"] {\n svg {\n color: ", ";\n }\n }\n &[aria-disabled=\"true\"] {\n svg {\n color: ", ";\n }\n }\n"])), function (props) {
|
|
118
120
|
return props.active ? props.theme.selectedUnderlineColor : props.theme.dividerColor;
|
|
119
121
|
}, function (props) {
|
|
120
122
|
return props.theme.unselectedIconColor;
|
|
@@ -124,10 +126,12 @@ var TabContainer = _styledComponents["default"].div(_templateObject || (_templat
|
|
|
124
126
|
return props.theme.disabledIconColor;
|
|
125
127
|
});
|
|
126
128
|
|
|
127
|
-
var Tab = _styledComponents["default"].a(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: ", ";\n justify-content: center;\n align-items: center;\n height: ", ";\n min-width:
|
|
129
|
+
var Tab = _styledComponents["default"].a(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: flex;\n flex-direction: ", ";\n justify-content: center;\n align-items: center;\n gap: ", ";\n height: ", ";\n min-width: 176px;\n min-height: 44px;\n padding: 0.375rem;\n border-radius: 4px;\n background: ", ";\n text-decoration-color: transparent;\n cursor: ", ";\n\n ", "\n"])), function (props) {
|
|
128
130
|
return props.hasIcon && props.iconPosition === "top" ? "column" : "row";
|
|
129
131
|
}, function (props) {
|
|
130
|
-
return props.hasIcon && props.iconPosition === "top" ? "
|
|
132
|
+
return props.hasIcon && props.iconPosition === "top" ? "0.375rem" : "0.625rem";
|
|
133
|
+
}, function (props) {
|
|
134
|
+
return props.hasIcon && props.iconPosition === "top" ? "78px" : "100%";
|
|
131
135
|
}, function (props) {
|
|
132
136
|
return props.active ? props.theme.selectedBackgroundColor : props.theme.unselectedBackgroundColor;
|
|
133
137
|
}, function (props) {
|
|
@@ -136,15 +140,7 @@ var Tab = _styledComponents["default"].a(_templateObject2 || (_templateObject2 =
|
|
|
136
140
|
return !props.disabled && "\n :hover {\n background: ".concat(props.theme.hoverBackgroundColor, ";\n }\n :focus {\n outline: 2px solid ").concat(props.theme.focusOutline, ";\n }\n :active {\n background: ").concat(props.theme.pressedBackgroundColor, ";\n outline: 2px solid #33aaff};\n }\n ");
|
|
137
141
|
});
|
|
138
142
|
|
|
139
|
-
var TabIconContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n
|
|
140
|
-
return props.iconPosition === "top" && "0.375rem";
|
|
141
|
-
}, function (props) {
|
|
142
|
-
return props.iconPosition === "left" && "0.625rem";
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
var LabelContainer = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n"])));
|
|
146
|
-
|
|
147
|
-
var BadgeContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: 0.5rem;\n"])));
|
|
143
|
+
var TabIconContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n\n img,\n svg {\n height: 24px;\n width: 24px;\n }\n"])));
|
|
148
144
|
|
|
149
145
|
var _default = DxcTab;
|
|
150
146
|
exports["default"] = _default;
|
package/nav-tabs/types.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare type SVG = React.ReactNode & React.SVGProps<SVGSVGElement>;
|
|
3
|
+
export declare type NavTabsContextProps = {
|
|
4
|
+
iconPosition: "top" | "left";
|
|
5
|
+
tabIndex: number;
|
|
6
|
+
focusedLabel: string;
|
|
7
|
+
};
|
|
3
8
|
export declare type TabProps = {
|
|
4
9
|
/**
|
|
5
10
|
* Whether the tab is active or not.
|
|
@@ -26,11 +31,11 @@ export declare type TabProps = {
|
|
|
26
31
|
*/
|
|
27
32
|
notificationNumber?: boolean | number;
|
|
28
33
|
/**
|
|
29
|
-
*
|
|
34
|
+
* Contains one or more DxcNavTabs.Tab.
|
|
30
35
|
*/
|
|
31
36
|
children: string;
|
|
32
37
|
};
|
|
33
|
-
|
|
38
|
+
declare type Props = {
|
|
34
39
|
/**
|
|
35
40
|
* Whether the icon should appear above or to the left of the label.
|
|
36
41
|
*/
|
|
@@ -44,10 +49,4 @@ export declare type NavTabsProps = {
|
|
|
44
49
|
*/
|
|
45
50
|
children: React.ReactNode;
|
|
46
51
|
};
|
|
47
|
-
export
|
|
48
|
-
iconPosition: "top" | "left";
|
|
49
|
-
tabIndex: number;
|
|
50
|
-
hasIcons: boolean;
|
|
51
|
-
focusedLabel: string;
|
|
52
|
-
};
|
|
53
|
-
export {};
|
|
52
|
+
export default Props;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import NumberInputPropsType from "./types";
|
|
3
|
+
declare type NumberInputContextProps = {
|
|
4
|
+
typeNumber?: string;
|
|
5
|
+
minNumber?: number;
|
|
6
|
+
maxNumber?: number;
|
|
7
|
+
stepNumber?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const NumberInputContext: React.Context<NumberInputContextProps>;
|
|
3
10
|
declare const DxcNumberInput: React.ForwardRefExoticComponent<NumberInputPropsType & React.RefAttributes<HTMLDivElement>>;
|
|
4
11
|
export default DxcNumberInput;
|