@dxc-technology/halstack-react 0.0.0-b821bfb → 0.0.0-b903d8a
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 +46 -0
- package/dist/index.d.mts +6516 -0
- package/dist/index.d.ts +6516 -0
- package/dist/index.js +12982 -0
- package/dist/index.mjs +12925 -0
- package/package.json +82 -72
- package/BackgroundColorContext.js +0 -46
- package/ThemeContext.js +0 -250
- package/V3Select/V3Select.js +0 -549
- package/V3Select/index.d.ts +0 -27
- package/V3Textarea/V3Textarea.js +0 -264
- package/V3Textarea/index.d.ts +0 -27
- package/accordion/Accordion.js +0 -353
- package/accordion/index.d.ts +0 -28
- package/accordion-group/AccordionGroup.js +0 -186
- package/accordion-group/index.d.ts +0 -16
- package/alert/Alert.js +0 -403
- package/alert/index.d.ts +0 -51
- package/badge/Badge.js +0 -63
- package/box/Box.js +0 -156
- package/box/index.d.ts +0 -25
- package/button/Button.js +0 -238
- package/button/Button.stories.js +0 -27
- package/button/index.d.ts +0 -24
- package/card/Card.js +0 -254
- package/card/index.d.ts +0 -22
- package/checkbox/Checkbox.js +0 -299
- package/checkbox/index.d.ts +0 -24
- package/chip/Chip.js +0 -265
- package/chip/index.d.ts +0 -22
- package/common/OpenSans.css +0 -81
- package/common/RequiredComponent.js +0 -40
- package/common/fonts/OpenSans-Bold.ttf +0 -0
- package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-Italic.ttf +0 -0
- package/common/fonts/OpenSans-Light.ttf +0 -0
- package/common/fonts/OpenSans-LightItalic.ttf +0 -0
- package/common/fonts/OpenSans-Regular.ttf +0 -0
- package/common/fonts/OpenSans-SemiBold.ttf +0 -0
- package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/common/utils.js +0 -22
- package/common/variables.js +0 -1567
- package/date/Date.js +0 -379
- package/date/index.d.ts +0 -27
- package/date-input/DateInput.js +0 -400
- package/date-input/index.d.ts +0 -95
- package/dialog/Dialog.js +0 -218
- package/dialog/index.d.ts +0 -18
- package/dropdown/Dropdown.js +0 -544
- package/dropdown/index.d.ts +0 -26
- package/file-input/FileInput.js +0 -644
- package/file-input/FileItem.js +0 -287
- package/file-input/index.d.ts +0 -81
- package/footer/Footer.js +0 -421
- package/footer/Icons.js +0 -77
- package/footer/index.d.ts +0 -25
- package/header/Header.js +0 -470
- package/header/Icons.js +0 -59
- package/header/index.d.ts +0 -25
- package/heading/Heading.js +0 -230
- package/heading/index.d.ts +0 -17
- package/input-text/Icons.js +0 -22
- package/input-text/InputText.js +0 -705
- package/input-text/index.d.ts +0 -36
- package/layout/ApplicationLayout.js +0 -327
- package/layout/Icons.js +0 -55
- package/link/Link.js +0 -237
- package/link/index.d.ts +0 -23
- package/main.d.ts +0 -40
- package/main.js +0 -359
- package/number-input/NumberInput.js +0 -136
- package/number-input/NumberInputContext.js +0 -16
- package/number-input/index.d.ts +0 -113
- package/paginator/Icons.js +0 -66
- package/paginator/Paginator.js +0 -305
- package/paginator/index.d.ts +0 -20
- package/password-input/PasswordInput.js +0 -203
- package/password-input/index.d.ts +0 -94
- package/progress-bar/ProgressBar.js +0 -242
- package/progress-bar/index.d.ts +0 -18
- package/radio/Radio.js +0 -209
- package/radio/index.d.ts +0 -23
- package/resultsetTable/ResultsetTable.js +0 -358
- package/resultsetTable/index.d.ts +0 -19
- package/select/Select.js +0 -1138
- package/select/index.d.ts +0 -131
- package/sidenav/Sidenav.js +0 -179
- package/sidenav/index.d.ts +0 -13
- package/slider/Slider.js +0 -404
- package/slider/index.d.ts +0 -29
- package/spinner/Spinner.js +0 -381
- package/spinner/index.d.ts +0 -17
- package/switch/Switch.js +0 -222
- package/switch/index.d.ts +0 -24
- package/table/Table.js +0 -132
- package/table/index.d.ts +0 -13
- package/tabs/Tabs.js +0 -343
- package/tabs/index.d.ts +0 -19
- package/tag/Tag.js +0 -282
- package/tag/index.d.ts +0 -24
- package/text-input/TextInput.js +0 -992
- package/text-input/index.d.ts +0 -135
- package/textarea/Textarea.js +0 -369
- package/textarea/index.d.ts +0 -117
- package/toggle/Toggle.js +0 -220
- package/toggle/index.d.ts +0 -21
- package/toggle-group/ToggleGroup.js +0 -327
- package/toggle-group/index.d.ts +0 -21
- package/upload/Upload.js +0 -205
- package/upload/buttons-upload/ButtonsUpload.js +0 -135
- package/upload/buttons-upload/Icons.js +0 -40
- package/upload/dragAndDropArea/DragAndDropArea.js +0 -329
- package/upload/dragAndDropArea/Icons.js +0 -39
- package/upload/file-upload/FileToUpload.js +0 -189
- package/upload/file-upload/Icons.js +0 -66
- package/upload/files-upload/FilesToUpload.js +0 -123
- package/upload/index.d.ts +0 -15
- package/upload/transaction/Icons.js +0 -160
- package/upload/transaction/Transaction.js +0 -148
- package/upload/transactions/Transactions.js +0 -138
- package/useTheme.js +0 -22
- package/wizard/Icons.js +0 -65
- package/wizard/Wizard.js +0 -405
- package/wizard/index.d.ts +0 -18
package/dialog/Dialog.js
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports["default"] = void 0;
|
|
11
|
-
|
|
12
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
15
|
-
|
|
16
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
17
|
-
|
|
18
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
19
|
-
|
|
20
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
-
|
|
22
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
23
|
-
|
|
24
|
-
var _Dialog = _interopRequireDefault(require("@material-ui/core/Dialog"));
|
|
25
|
-
|
|
26
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
|
-
|
|
28
|
-
var _variables = require("../common/variables.js");
|
|
29
|
-
|
|
30
|
-
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
31
|
-
|
|
32
|
-
var _BackgroundColorContext = require("../BackgroundColorContext.js");
|
|
33
|
-
|
|
34
|
-
function _templateObject4() {
|
|
35
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n width: ", ";\n height: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n"]);
|
|
36
|
-
|
|
37
|
-
_templateObject4 = function _templateObject4() {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function _templateObject3() {
|
|
45
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: flex-end;\n position: absolute;\n top: ", ";\n right: ", ";\n cursor: pointer;\n padding: 0;\n margin: 0;\n background: none;\n color: ", ";\n width: ", ";\n height: ", ";\n border: none;\n"]);
|
|
46
|
-
|
|
47
|
-
_templateObject3 = function _templateObject3() {
|
|
48
|
-
return data;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return data;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function _templateObject2() {
|
|
55
|
-
var data = (0, _taggedTemplateLiteral2["default"])([""]);
|
|
56
|
-
|
|
57
|
-
_templateObject2 = function _templateObject2() {
|
|
58
|
-
return data;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
return data;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function _templateObject() {
|
|
65
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n overflow: unset;\n font-family: ", ";\n\n .MuiBackdrop-root {\n background-color: ", ";\n opacity: ", " !important;\n }\n .MuiDialog-paperWidthSm {\n background-color: ", ";\n max-width: ", ";\n min-width: ", ";\n box-sizing: border-box;\n min-height: ", ";\n box-shadow: ", ";\n\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n }\n"]);
|
|
66
|
-
|
|
67
|
-
_templateObject = function _templateObject() {
|
|
68
|
-
return data;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
return data;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
var DxcDialog = function DxcDialog(_ref) {
|
|
75
|
-
var _ref$isCloseVisible = _ref.isCloseVisible,
|
|
76
|
-
isCloseVisible = _ref$isCloseVisible === void 0 ? true : _ref$isCloseVisible,
|
|
77
|
-
onCloseClick = _ref.onCloseClick,
|
|
78
|
-
children = _ref.children,
|
|
79
|
-
_ref$overlay = _ref.overlay,
|
|
80
|
-
overlay = _ref$overlay === void 0 ? true : _ref$overlay,
|
|
81
|
-
onBackgroundClick = _ref.onBackgroundClick,
|
|
82
|
-
padding = _ref.padding,
|
|
83
|
-
_ref$tabIndex = _ref.tabIndex,
|
|
84
|
-
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
85
|
-
|
|
86
|
-
var _useState = (0, _react.useState)(),
|
|
87
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
88
|
-
isResponsive = _useState2[0],
|
|
89
|
-
setIsResponsive = _useState2[1];
|
|
90
|
-
|
|
91
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
92
|
-
|
|
93
|
-
var handleClose = function handleClose() {
|
|
94
|
-
typeof onCloseClick === "function" && onCloseClick();
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
var handleOverlayClick = function handleOverlayClick() {
|
|
98
|
-
typeof onBackgroundClick === "function" && onBackgroundClick();
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
var handleResize = function handleResize(width) {
|
|
102
|
-
width && width <= _variables.responsiveSizes.tablet ? setIsResponsive(true) : setIsResponsive(false);
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
var handleEventListener = function handleEventListener() {
|
|
106
|
-
handleResize(window.innerWidth);
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
(0, _react.useEffect)(function () {
|
|
110
|
-
window.addEventListener("resize", handleEventListener);
|
|
111
|
-
handleResize(window.innerWidth);
|
|
112
|
-
return function () {
|
|
113
|
-
window.removeEventListener("resize", handleEventListener);
|
|
114
|
-
};
|
|
115
|
-
}, []);
|
|
116
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
117
|
-
theme: colorsTheme.dialog
|
|
118
|
-
}, _react["default"].createElement(DialogContainer, {
|
|
119
|
-
open: true,
|
|
120
|
-
isCloseVisible: isCloseVisible,
|
|
121
|
-
onClose: handleOverlayClick,
|
|
122
|
-
overlay: overlay,
|
|
123
|
-
padding: padding,
|
|
124
|
-
isResponsive: isResponsive
|
|
125
|
-
}, isCloseVisible && _react["default"].createElement(CloseIconContainer, {
|
|
126
|
-
onClick: handleClose,
|
|
127
|
-
tabIndex: tabIndex
|
|
128
|
-
}, _react["default"].createElement(CloseIcon, {
|
|
129
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
130
|
-
width: "24",
|
|
131
|
-
height: "24",
|
|
132
|
-
viewBox: "0 0 24 24",
|
|
133
|
-
fill: "currentColor"
|
|
134
|
-
}, _react["default"].createElement("path", {
|
|
135
|
-
d: "M0 0h24v24H0V0z",
|
|
136
|
-
fill: "none"
|
|
137
|
-
}), _react["default"].createElement("path", {
|
|
138
|
-
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
139
|
-
}))), _react["default"].createElement(Children, null, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
140
|
-
color: colorsTheme.dialog.backgroundColor
|
|
141
|
-
}, children))));
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
var DialogContainer = (0, _styledComponents["default"])(_Dialog["default"])(_templateObject(), function (props) {
|
|
145
|
-
return props.theme.fontFamily;
|
|
146
|
-
}, function (props) {
|
|
147
|
-
return props.overlay === true ? props.theme.overlayColor : "transparent";
|
|
148
|
-
}, function (props) {
|
|
149
|
-
return props.overlay === true && props.theme.overlayOpacity;
|
|
150
|
-
}, function (props) {
|
|
151
|
-
return props.theme.backgroundColor;
|
|
152
|
-
}, function (props) {
|
|
153
|
-
return props.isResponsive ? "92%" : "80%";
|
|
154
|
-
}, function (props) {
|
|
155
|
-
return props.isResponsive ? "92%" : "800px";
|
|
156
|
-
}, function (props) {
|
|
157
|
-
return props.isCloseVisible ? "72px" : "";
|
|
158
|
-
}, function (props) {
|
|
159
|
-
return "".concat(props.theme.boxShadowOffsetX, " ").concat(props.theme.boxShadowOffsetY, " ").concat(props.theme.boxShadowBlur, " ").concat(props.theme.boxShadowColor);
|
|
160
|
-
}, function (props) {
|
|
161
|
-
return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : _variables.spaces["small"];
|
|
162
|
-
}, function (props) {
|
|
163
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
|
|
164
|
-
}, function (props) {
|
|
165
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.right ? _variables.spaces[props.padding.right] : "";
|
|
166
|
-
}, function (props) {
|
|
167
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.bottom ? _variables.spaces[props.padding.bottom] : "";
|
|
168
|
-
}, function (props) {
|
|
169
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
var Children = _styledComponents["default"].div(_templateObject2());
|
|
173
|
-
|
|
174
|
-
var CloseIconContainer = _styledComponents["default"].button(_templateObject3(), function (props) {
|
|
175
|
-
return props.theme.closeIconTopPosition;
|
|
176
|
-
}, function (props) {
|
|
177
|
-
return props.theme.closeIconRightPosition;
|
|
178
|
-
}, function (props) {
|
|
179
|
-
return props.theme.closeIconColor;
|
|
180
|
-
}, function (props) {
|
|
181
|
-
return props.theme.closeIconWidth;
|
|
182
|
-
}, function (props) {
|
|
183
|
-
return props.theme.closeIconHeight;
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
var CloseIcon = _styledComponents["default"].svg(_templateObject4(), function (props) {
|
|
187
|
-
return props.theme.closeIconBackgroundColor;
|
|
188
|
-
}, function (props) {
|
|
189
|
-
return props.theme.closeIconWidth;
|
|
190
|
-
}, function (props) {
|
|
191
|
-
return props.theme.closeIconHeight;
|
|
192
|
-
}, function (props) {
|
|
193
|
-
return props.theme.closeIconBorderRadius;
|
|
194
|
-
}, function (props) {
|
|
195
|
-
return props.theme.closeIconBorderThickness;
|
|
196
|
-
}, function (props) {
|
|
197
|
-
return props.theme.closeIconBorderStyle;
|
|
198
|
-
}, function (props) {
|
|
199
|
-
return props.theme.closeIconBorderColor;
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
DxcDialog.propTypes = {
|
|
203
|
-
padding: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
204
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
205
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
206
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
207
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
208
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
209
|
-
isVisible: _propTypes["default"].bool,
|
|
210
|
-
isCloseVisible: _propTypes["default"].bool,
|
|
211
|
-
onClose: _propTypes["default"].func,
|
|
212
|
-
onCloseClick: _propTypes["default"].func,
|
|
213
|
-
onBackgroundClick: _propTypes["default"].func,
|
|
214
|
-
overlay: _propTypes["default"].bool,
|
|
215
|
-
tabIndex: _propTypes["default"].number
|
|
216
|
-
};
|
|
217
|
-
var _default = DxcDialog;
|
|
218
|
-
exports["default"] = _default;
|
package/dialog/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
-
type Padding = {
|
|
3
|
-
top?: Space;
|
|
4
|
-
bottom?: Space;
|
|
5
|
-
left?: Space;
|
|
6
|
-
right?: Space;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
isCloseVisible?: boolean;
|
|
11
|
-
onCloseClick?: void;
|
|
12
|
-
overlay?: boolean;
|
|
13
|
-
onBackgroundClick?: void;
|
|
14
|
-
padding?: Padding,
|
|
15
|
-
tabIndex?: number;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default function DxcDialog(props: Props): JSX.Element;
|