@dxc-technology/halstack-react 0.0.0-e628009 → 0.0.0-e961efe
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/babel.config.js +0 -1
- package/dist/ThemeContext.js +40 -38
- package/dist/V3Select/V3Select.js +549 -0
- package/dist/V3Select/index.d.ts +27 -0
- package/dist/V3Textarea/index.d.ts +27 -0
- package/dist/accordion/index.d.ts +28 -0
- package/dist/accordion-group/index.d.ts +16 -0
- package/dist/alert/Alert.js +1 -1
- package/dist/box/index.d.ts +25 -0
- package/dist/button/index.d.ts +24 -0
- package/dist/card/index.d.ts +22 -0
- package/dist/checkbox/Checkbox.js +4 -5
- package/dist/checkbox/index.d.ts +24 -0
- package/dist/chip/index.d.ts +22 -0
- package/dist/common/variables.js +128 -123
- package/dist/date/Date.js +6 -6
- package/dist/date/index.d.ts +27 -0
- package/dist/dialog/index.d.ts +18 -0
- package/dist/dropdown/index.d.ts +26 -0
- package/dist/file-input/FileItem.js +8 -1
- package/dist/file-input/index.d.ts +1 -1
- package/dist/footer/index.d.ts +25 -0
- package/dist/header/Header.js +59 -23
- package/dist/header/index.d.ts +25 -0
- package/dist/heading/index.d.ts +17 -0
- package/dist/input-text/InputText.js +4 -4
- package/dist/input-text/index.d.ts +36 -0
- package/dist/link/index.d.ts +23 -0
- package/dist/main.d.ts +36 -4
- package/dist/main.js +9 -17
- package/dist/paginator/Paginator.js +50 -28
- package/dist/paginator/index.d.ts +20 -0
- package/dist/password-input/PasswordInput.js +6 -1
- package/dist/progress-bar/index.d.ts +18 -0
- package/dist/radio/index.d.ts +23 -0
- package/dist/resultsetTable/index.d.ts +19 -0
- package/dist/select/Select.js +848 -301
- package/dist/{new-select → select}/index.d.ts +1 -1
- package/dist/sidenav/index.d.ts +13 -0
- package/dist/slider/index.d.ts +29 -0
- package/dist/spinner/index.d.ts +17 -0
- package/dist/stories/Button.js +71 -0
- package/dist/stories/Button.stories.js +55 -0
- package/dist/stories/Header.js +67 -0
- package/dist/stories/Header.stories.js +31 -0
- package/dist/stories/Introduction.stories.mdx +211 -0
- package/dist/stories/Page.js +68 -0
- package/dist/stories/Page.stories.js +39 -0
- package/dist/stories/assets/code-brackets.svg +1 -0
- package/dist/stories/assets/colors.svg +1 -0
- package/dist/stories/assets/comments.svg +1 -0
- package/dist/stories/assets/direction.svg +1 -0
- package/dist/stories/assets/flow.svg +1 -0
- package/dist/stories/assets/plugin.svg +1 -0
- package/dist/stories/assets/repo.svg +1 -0
- package/dist/stories/assets/stackalt.svg +1 -0
- package/dist/stories/button.css +30 -0
- package/dist/stories/header.css +26 -0
- package/dist/stories/page.css +69 -0
- package/dist/switch/index.d.ts +24 -0
- package/dist/table/index.d.ts +13 -0
- package/dist/tabs/index.d.ts +19 -0
- package/dist/tag/index.d.ts +24 -0
- package/dist/text-input/TextInput.js +8 -5
- package/dist/toggle/index.d.ts +21 -0
- package/dist/toggle-group/index.d.ts +21 -0
- package/dist/upload/Upload.js +3 -3
- package/dist/upload/index.d.ts +15 -0
- package/dist/wizard/index.d.ts +18 -0
- package/package.json +14 -10
- package/test/Date.test.js +34 -36
- package/test/InputText.test.js +17 -26
- package/test/Paginator.test.js +5 -1
- package/test/ResultsetTable.test.js +5 -4
- package/test/Select.test.js +374 -171
- package/test/TextInput.test.js +5 -5
- package/test/Upload.test.js +4 -4
- package/test/V3Select.test.js +212 -0
- package/dist/new-select/NewSelect.js +0 -836
- package/dist/tabs-for-sections/TabsForSections.js +0 -92
- package/test/TabsForSections.test.js +0 -34
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/repo</title><g id="illustration/repo" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Rectangle-62-Copy" fill="#B7F0EF" d="M27.2217723,9.04506931 L41.2217723,6.2682098 C43.3886973,5.83840648 45.4937616,7.2466219 45.9235649,9.41354696 C45.9743993,9.66983721 46,9.93049166 46,10.1917747 L46,32.581381 C46,34.4904961 44.650862,36.1335143 42.7782277,36.5049459 L28.7782277,39.2818054 C26.6113027,39.7116087 24.5062384,38.3033933 24.0764351,36.1364682 C24.0256007,35.880178 24,35.6195235 24,35.3582405 L24,12.9686342 C24,11.0595191 25.349138,9.4165009 27.2217723,9.04506931 Z" opacity=".7"/><path id="Combined-Shape" fill="#87E6E5" d="M6.77822775,6.2682098 L20.7782277,9.04506931 C22.650862,9.4165009 24,11.0595191 24,12.9686342 L24,35.3582405 C24,37.5673795 22.209139,39.3582405 20,39.3582405 C19.738717,39.3582405 19.4780625,39.3326398 19.2217723,39.2818054 L5.22177225,36.5049459 C3.34913798,36.1335143 2,34.4904961 2,32.581381 L2,10.1917747 C2,7.98263571 3.790861,6.19177471 6,6.19177471 C6.26128305,6.19177471 6.5219375,6.21737537 6.77822775,6.2682098 Z"/><path id="Rectangle-63-Copy-2" fill="#61C1FD" d="M22,10 C23.1666667,10.2291667 24.0179036,10.625 24.5537109,11.1875 C25.0895182,11.75 25.5716146,12.875 26,14.5625 C26,29.3020833 26,37.5208333 26,39.21875 C26,40.9166667 26.4241536,42.9583333 27.2724609,45.34375 L24.5537109,41.875 L22.9824219,45.34375 C22.327474,43.1979167 22,41.2291667 22,39.4375 C22,37.6458333 22,27.8333333 22,10 Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/stackalt</title><g id="illustration/stackalt" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#FFAE00" d="M23.8628277,0 L23.8628277,48 L3.32291648,36.2491883 L3.32155653,11.9499781 L23.8628277,0 Z M23.8670509,0 L44.408322,11.9499781 L44.4069621,36.2491883 L23.8670509,48 L23.8670509,0 Z" opacity=".196"/><path id="Rectangle-46-Copy-3" fill="#66BF3C" d="M15.8232279,19.1155258 L24.7368455,21.4714881 C29.6053842,22.7582937 33.4077423,26.5606518 34.694548,31.4291905 L37.0505103,40.3428082 C37.6150232,42.4786032 36.3412474,44.6676353 34.2054524,45.2321482 C33.5569474,45.4035549 32.87575,45.4091235 32.2245294,45.2483418 L23.3459013,43.0562718 C18.2976962,41.809906 14.3561301,37.8683399 13.1097642,32.8201348 L10.9176943,23.9415066 C10.3881737,21.7967682 11.6975664,19.6288529 13.8423049,19.0993322 C14.4935255,18.9385505 15.1747229,18.9441191 15.8232279,19.1155258 Z" opacity=".5" transform="translate(23.999997, 32.166058) rotate(-45.000000) translate(-23.999997, -32.166058)"/><path id="Rectangle-46-Copy-2" fill="#FFAE00" d="M15.8232279,11.2216893 L24.7368455,13.5776516 C29.6053842,14.8644572 33.4077423,18.6668153 34.694548,23.5353541 L37.0505103,32.4489717 C37.6150232,34.5847667 36.3412474,36.7737988 34.2054524,37.3383117 C33.5569474,37.5097184 32.87575,37.515287 32.2245294,37.3545053 L23.3459013,35.1624353 C18.2976962,33.9160695 14.3561301,29.9745034 13.1097642,24.9262983 L10.9176943,16.0476701 C10.3881737,13.9029317 11.6975664,11.7350164 13.8423049,11.2054957 C14.4935255,11.044714 15.1747229,11.0502826 15.8232279,11.2216893 Z" opacity=".5" transform="translate(23.999997, 24.272222) rotate(-45.000000) translate(-23.999997, -24.272222)"/><path id="Rectangle-46-Copy" fill="#FC521F" d="M15.8232279,3.32785281 L24.7368455,5.68381509 C29.6053842,6.97062075 33.4077423,10.7729788 34.694548,15.6415176 L37.0505103,24.5551352 C37.6150232,26.6909302 36.3412474,28.8799623 34.2054524,29.4444752 C33.5569474,29.6158819 32.87575,29.6214505 32.2245294,29.4606688 L23.3459013,27.2685988 C18.2976962,26.022233 14.3561301,22.0806669 13.1097642,17.0324618 L10.9176943,8.15383364 C10.3881737,6.00909519 11.6975664,3.84117987 13.8423049,3.31165925 C14.4935255,3.15087753 15.1747229,3.15644615 15.8232279,3.32785281 Z" opacity=".5" transform="translate(23.999997, 16.378385) rotate(-45.000000) translate(-23.999997, -16.378385)"/></g></svg>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.storybook-button {
|
|
2
|
+
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
3
|
+
font-weight: 100;
|
|
4
|
+
border: 0;
|
|
5
|
+
border-radius: 3em;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
display: inline-block;
|
|
8
|
+
line-height: 1;
|
|
9
|
+
}
|
|
10
|
+
.storybook-button--primary {
|
|
11
|
+
color: white;
|
|
12
|
+
background-color: #1ea7fd;
|
|
13
|
+
}
|
|
14
|
+
.storybook-button--secondary {
|
|
15
|
+
color: #333;
|
|
16
|
+
background-color: transparent;
|
|
17
|
+
box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
|
|
18
|
+
}
|
|
19
|
+
.storybook-button--small {
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
padding: 10px 16px;
|
|
22
|
+
}
|
|
23
|
+
.storybook-button--medium {
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
padding: 11px 20px;
|
|
26
|
+
}
|
|
27
|
+
.storybook-button--large {
|
|
28
|
+
font-size: 16px;
|
|
29
|
+
padding: 12px 24px;
|
|
30
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.wrapper {
|
|
2
|
+
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
3
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
4
|
+
padding: 15px 20px;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
svg {
|
|
11
|
+
display: inline-block;
|
|
12
|
+
vertical-align: top;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
h1 {
|
|
16
|
+
font-weight: 900;
|
|
17
|
+
font-size: 20px;
|
|
18
|
+
line-height: 1;
|
|
19
|
+
margin: 6px 0 6px 10px;
|
|
20
|
+
display: inline-block;
|
|
21
|
+
vertical-align: top;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
button + button {
|
|
25
|
+
margin-left: 10px;
|
|
26
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
section {
|
|
2
|
+
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
3
|
+
font-size: 14px;
|
|
4
|
+
line-height: 24px;
|
|
5
|
+
padding: 48px 20px;
|
|
6
|
+
margin: 0 auto;
|
|
7
|
+
max-width: 600px;
|
|
8
|
+
color: #333;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
section h2 {
|
|
12
|
+
font-weight: 900;
|
|
13
|
+
font-size: 32px;
|
|
14
|
+
line-height: 1;
|
|
15
|
+
margin: 0 0 4px;
|
|
16
|
+
display: inline-block;
|
|
17
|
+
vertical-align: top;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
section p {
|
|
21
|
+
margin: 1em 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
section a {
|
|
25
|
+
text-decoration: none;
|
|
26
|
+
color: #1ea7fd;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
section ul {
|
|
30
|
+
padding-left: 30px;
|
|
31
|
+
margin: 1em 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
section li {
|
|
35
|
+
margin-bottom: 8px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
section .tip {
|
|
39
|
+
display: inline-block;
|
|
40
|
+
border-radius: 1em;
|
|
41
|
+
font-size: 11px;
|
|
42
|
+
line-height: 12px;
|
|
43
|
+
font-weight: 700;
|
|
44
|
+
background: #e7fdd8;
|
|
45
|
+
color: #66bf3c;
|
|
46
|
+
padding: 4px 12px;
|
|
47
|
+
margin-right: 10px;
|
|
48
|
+
vertical-align: top;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
section .tip-wrapper {
|
|
52
|
+
font-size: 13px;
|
|
53
|
+
line-height: 20px;
|
|
54
|
+
margin-top: 40px;
|
|
55
|
+
margin-bottom: 40px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
section .tip-wrapper svg {
|
|
59
|
+
display: inline-block;
|
|
60
|
+
height: 12px;
|
|
61
|
+
width: 12px;
|
|
62
|
+
margin-right: 4px;
|
|
63
|
+
vertical-align: top;
|
|
64
|
+
margin-top: 3px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
section .tip-wrapper svg path {
|
|
68
|
+
fill: #1ea7fd;
|
|
69
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type Size = "small" | "medium" | "large" | "fillParent" | "fitContent";
|
|
2
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
type Margin = {
|
|
4
|
+
top?: Space;
|
|
5
|
+
bottom?: Space;
|
|
6
|
+
left?: Space;
|
|
7
|
+
right?: Space;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
value?: any;
|
|
13
|
+
label?: string;
|
|
14
|
+
labelPosition?: "before" | "after";
|
|
15
|
+
name?: string,
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
onChange?: void;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
margin?: Space | Margin;
|
|
20
|
+
size?: Size;
|
|
21
|
+
tabIndex?: number;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default function DxcSwitch(props: Props): JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
type Margin = {
|
|
3
|
+
top?: Space;
|
|
4
|
+
bottom?: Space;
|
|
5
|
+
left?: Space;
|
|
6
|
+
right?: Space;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
margin?: Space | Margin;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default function DxcTable(props: Props): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
type Margin = {
|
|
3
|
+
top?: Space;
|
|
4
|
+
bottom?: Space;
|
|
5
|
+
left?: Space;
|
|
6
|
+
right?: Space;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
activeTabIndex?: number;
|
|
11
|
+
tabs?: any;
|
|
12
|
+
onTabClick?: void;
|
|
13
|
+
onTabHover?: void;
|
|
14
|
+
iconPosition?: "top" | "left";
|
|
15
|
+
margin?: Space | Margin;
|
|
16
|
+
tabIndex?: number;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default function DxcTabs(props: Props): JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type Size = "small" | "medium" | "large" | "fillParent" | "fitContent";
|
|
2
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
type Margin = {
|
|
4
|
+
top?: Space;
|
|
5
|
+
bottom?: Space;
|
|
6
|
+
left?: Space;
|
|
7
|
+
right?: Space;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
icon?: any;
|
|
12
|
+
iconSrc?: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
linkHref?: string;
|
|
15
|
+
onClick?: void,
|
|
16
|
+
iconBgColor?: string;
|
|
17
|
+
labelPosition?: "before" | "after";
|
|
18
|
+
newWindow?: boolean;
|
|
19
|
+
margin?: Space | Margin;
|
|
20
|
+
size?: Size;
|
|
21
|
+
tabIndex?: number;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default function DxcTag(props: Props): JSX.Element;
|
|
@@ -126,7 +126,7 @@ function _templateObject9() {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
function _templateObject8() {
|
|
129
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n font-size: 1rem;\n font-family: ", ";\n border: 1px solid transparent;\n border-radius:
|
|
129
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n font-size: 1rem;\n font-family: ", ";\n border: 1px solid transparent;\n border-radius: 2px;\n padding: 3px;\n margin-left: calc(1rem * 0.25);\n ", "\n\n box-shadow: 0 0 0 2px transparent;\n background-color: ", ";\n\n color: ", ";\n\n ", "\n\n svg {\n line-height: 18px;\n }\n"]);
|
|
130
130
|
|
|
131
131
|
_templateObject8 = function _templateObject8() {
|
|
132
132
|
return data;
|
|
@@ -243,6 +243,8 @@ var patternMatch = function patternMatch(pattern, value) {
|
|
|
243
243
|
};
|
|
244
244
|
|
|
245
245
|
var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
246
|
+
var _action$title;
|
|
247
|
+
|
|
246
248
|
var _ref$label = _ref.label,
|
|
247
249
|
label = _ref$label === void 0 ? "" : _ref$label,
|
|
248
250
|
_ref$name = _ref.name,
|
|
@@ -649,11 +651,11 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
649
651
|
var noMatchedWords = suggestion.replace(regEx, "");
|
|
650
652
|
return _react["default"].createElement(Suggestion, {
|
|
651
653
|
id: "suggestion-".concat(index),
|
|
652
|
-
onMouseDown: function onMouseDown() {
|
|
653
|
-
changeIsActiveSuggestion(true);
|
|
654
|
+
onMouseDown: function onMouseDown(event) {
|
|
655
|
+
event.button === 0 && changeIsActiveSuggestion(true);
|
|
654
656
|
},
|
|
655
|
-
onMouseUp: function onMouseUp() {
|
|
656
|
-
if (isActiveSuggestion) {
|
|
657
|
+
onMouseUp: function onMouseUp(event) {
|
|
658
|
+
if (event.button === 0 && isActiveSuggestion) {
|
|
657
659
|
changeValue(suggestion);
|
|
658
660
|
changeIsActiveSuggestion(false);
|
|
659
661
|
closeSuggestions();
|
|
@@ -745,6 +747,7 @@ var DxcTextInput = _react["default"].forwardRef(function (_ref, ref) {
|
|
|
745
747
|
ref: actionRef,
|
|
746
748
|
disabled: disabled,
|
|
747
749
|
onClick: action.onClick,
|
|
750
|
+
title: (_action$title = action.title) !== null && _action$title !== void 0 ? _action$title : action.title,
|
|
748
751
|
backgroundType: backgroundType,
|
|
749
752
|
tabIndex: tabIndex
|
|
750
753
|
}, typeof action.icon === "string" ? _react["default"].createElement(ActionIcon, {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
type Margin = {
|
|
3
|
+
top?: Space;
|
|
4
|
+
bottom?: Space;
|
|
5
|
+
left?: Space;
|
|
6
|
+
right?: Space;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
label?: string;
|
|
11
|
+
helperText?: string;
|
|
12
|
+
value?: any;
|
|
13
|
+
onChange?: void;
|
|
14
|
+
disabled?: boolean,
|
|
15
|
+
options?: any;
|
|
16
|
+
multiple?: boolean;
|
|
17
|
+
margin?: Space | Margin;
|
|
18
|
+
tabIndex?: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default function DxcToggle(props: Props): JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
type Margin = {
|
|
3
|
+
top?: Space;
|
|
4
|
+
bottom?: Space;
|
|
5
|
+
left?: Space;
|
|
6
|
+
right?: Space;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
label?: string;
|
|
11
|
+
helperText?: string;
|
|
12
|
+
value?: any;
|
|
13
|
+
onChange?: void;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
options?: any;
|
|
16
|
+
multiple?: boolean;
|
|
17
|
+
margin?: Space | Margin;
|
|
18
|
+
tabIndex?: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default function DxcToggleGroup(props: Props): JSX.Element;
|
package/dist/upload/Upload.js
CHANGED
|
@@ -41,7 +41,7 @@ function _templateObject() {
|
|
|
41
41
|
return data;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var DxcUpload = function DxcUpload(_ref) {
|
|
45
45
|
var callbackUpload = _ref.callbackUpload,
|
|
46
46
|
margin = _ref.margin,
|
|
47
47
|
_ref$tabIndex = _ref.tabIndex,
|
|
@@ -178,7 +178,7 @@ var V3DxcUpload = function V3DxcUpload(_ref) {
|
|
|
178
178
|
}));
|
|
179
179
|
};
|
|
180
180
|
|
|
181
|
-
|
|
181
|
+
DxcUpload.propTypes = {
|
|
182
182
|
callbackUpload: _propTypes["default"].func,
|
|
183
183
|
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
184
184
|
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
@@ -201,5 +201,5 @@ var DXCUpload = _styledComponents["default"].div(_templateObject(), function (pr
|
|
|
201
201
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
202
202
|
});
|
|
203
203
|
|
|
204
|
-
var _default =
|
|
204
|
+
var _default = DxcUpload;
|
|
205
205
|
exports["default"] = _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
type Margin = {
|
|
3
|
+
top?: Space;
|
|
4
|
+
bottom?: Space;
|
|
5
|
+
left?: Space;
|
|
6
|
+
right?: Space;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
callbackUpload?: void;
|
|
11
|
+
margin?: Space | Margin;
|
|
12
|
+
tabIndex?: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default function DxcUpload(props: Props): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
type Margin = {
|
|
3
|
+
top?: Space;
|
|
4
|
+
bottom?: Space;
|
|
5
|
+
left?: Space;
|
|
6
|
+
right?: Space;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
mode?: "horizontal" | "vertical";
|
|
11
|
+
currentStep?: number;
|
|
12
|
+
onStepClick?: void;
|
|
13
|
+
steps?: any;
|
|
14
|
+
margin?: Space | Margin;
|
|
15
|
+
tabIndex?: number;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default function DxcWizard(props: Props): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxc-technology/halstack-react",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-e961efe",
|
|
4
4
|
"description": "DXC Halstack React components library",
|
|
5
5
|
"repository": "dxc-technology/halstack-react",
|
|
6
6
|
"homepage": "http://developer.dxc.com/tools/react",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"main": "./dist/main.js",
|
|
14
14
|
"types": "./dist/main.d.ts",
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"react": "^
|
|
17
|
-
"react-dom": "^
|
|
18
|
-
"styled-components": "
|
|
16
|
+
"react": "^17.0.1",
|
|
17
|
+
"react-dom": "^17.0.1",
|
|
18
|
+
"styled-components": "^5.0.1"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@date-io/date-fns": "^1.3.9",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"date-fns": "^2.0.0-beta.4",
|
|
30
30
|
"moment": "2.24.0",
|
|
31
31
|
"prop-types": "^15.7.2",
|
|
32
|
-
"react-use-scrollspy": "^2.0.0",
|
|
33
32
|
"rgb-hex": "^3.0.0",
|
|
34
33
|
"uuid": "^8.3.2"
|
|
35
34
|
},
|
|
@@ -37,7 +36,9 @@
|
|
|
37
36
|
"test": "jest",
|
|
38
37
|
"test:watch": "npm test -- --watch --coverage",
|
|
39
38
|
"build": "babel src --out-dir dist --copy-files --verbose && node ../scripts/build/copy-readme.js",
|
|
40
|
-
"build:watch": "babel src --watch --out-dir dist --copy-files --verbose"
|
|
39
|
+
"build:watch": "babel src --watch --out-dir dist --copy-files --verbose",
|
|
40
|
+
"storybook": "start-storybook -p 6006",
|
|
41
|
+
"build-storybook": "build-storybook"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
44
|
"@babel/cli": "^7.6.2",
|
|
@@ -48,9 +49,14 @@
|
|
|
48
49
|
"@babel/plugin-transform-runtime": "^7.10.1",
|
|
49
50
|
"@babel/preset-env": "^7.6.2",
|
|
50
51
|
"@babel/preset-react": "^7.0.0",
|
|
52
|
+
"@storybook/addon-actions": "^6.4.9",
|
|
53
|
+
"@storybook/addon-essentials": "^6.4.9",
|
|
54
|
+
"@storybook/addon-links": "^6.4.9",
|
|
55
|
+
"@storybook/react": "^6.4.9",
|
|
51
56
|
"@testing-library/react": "^11.2.5",
|
|
52
57
|
"babel-jest": "^24.8.0",
|
|
53
58
|
"babel-loader": "^8.0.6",
|
|
59
|
+
"chromatic": "^6.3.3",
|
|
54
60
|
"eslint": "^5.16.0",
|
|
55
61
|
"eslint-config-airbnb": "^17.1.0",
|
|
56
62
|
"eslint-config-prettier": "^6.7.0",
|
|
@@ -59,6 +65,7 @@
|
|
|
59
65
|
"eslint-plugin-jsx-a11y": "^6.2.1",
|
|
60
66
|
"eslint-plugin-react": "^7.13.0",
|
|
61
67
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
68
|
+
"eslint-plugin-storybook": "^0.5.5",
|
|
62
69
|
"identity-obj-proxy": "^3.0.0",
|
|
63
70
|
"jest": "^25.5.4",
|
|
64
71
|
"react": "file:../node_modules/react",
|
|
@@ -71,9 +78,6 @@
|
|
|
71
78
|
"\\.(css|less|scss|sass)$": "identity-obj-proxy",
|
|
72
79
|
"\\.(svg)$": "<rootDir>/test/mocks/svgMock.js",
|
|
73
80
|
"\\.(png)$": "<rootDir>/test/mocks/pngMock.js"
|
|
74
|
-
}
|
|
75
|
-
"transformIgnorePatterns": [
|
|
76
|
-
"/node_modules/(?!react-use-scrollspy).+\\.js$"
|
|
77
|
-
]
|
|
81
|
+
}
|
|
78
82
|
}
|
|
79
83
|
}
|