@dxc-technology/halstack-react 0.0.0-3872aa6 → 0.0.0-38c4496

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.
Files changed (231) hide show
  1. package/README.md +46 -0
  2. package/dist/index.d.mts +6670 -0
  3. package/dist/index.d.ts +6670 -0
  4. package/dist/index.js +14276 -0
  5. package/dist/index.mjs +14219 -0
  6. package/package.json +70 -68
  7. package/BackgroundColorContext.d.ts +0 -10
  8. package/BackgroundColorContext.js +0 -48
  9. package/ThemeContext.d.ts +0 -15
  10. package/ThemeContext.js +0 -243
  11. package/V3Select/V3Select.js +0 -455
  12. package/V3Select/index.d.ts +0 -27
  13. package/V3Textarea/V3Textarea.js +0 -260
  14. package/V3Textarea/index.d.ts +0 -27
  15. package/accordion/Accordion.d.ts +0 -4
  16. package/accordion/Accordion.js +0 -258
  17. package/accordion/types.d.ts +0 -68
  18. package/accordion/types.js +0 -5
  19. package/accordion-group/AccordionGroup.d.ts +0 -7
  20. package/accordion-group/AccordionGroup.js +0 -170
  21. package/accordion-group/AccordionGroup.stories.tsx +0 -225
  22. package/accordion-group/types.d.ts +0 -72
  23. package/accordion-group/types.js +0 -5
  24. package/alert/Alert.d.ts +0 -4
  25. package/alert/Alert.js +0 -290
  26. package/alert/Alert.stories.tsx +0 -170
  27. package/alert/types.d.ts +0 -49
  28. package/alert/types.js +0 -5
  29. package/badge/Badge.js +0 -59
  30. package/box/Box.d.ts +0 -4
  31. package/box/Box.js +0 -126
  32. package/box/Box.stories.tsx +0 -132
  33. package/box/types.d.ts +0 -43
  34. package/box/types.js +0 -5
  35. package/button/Button.d.ts +0 -4
  36. package/button/Button.js +0 -179
  37. package/button/Button.stories.tsx +0 -276
  38. package/button/types.d.ts +0 -57
  39. package/button/types.js +0 -5
  40. package/card/Card.d.ts +0 -4
  41. package/card/Card.js +0 -164
  42. package/card/Card.stories.tsx +0 -201
  43. package/card/ice-cream.jpg +0 -0
  44. package/card/types.d.ts +0 -67
  45. package/card/types.js +0 -5
  46. package/checkbox/Checkbox.d.ts +0 -4
  47. package/checkbox/Checkbox.js +0 -253
  48. package/checkbox/Checkbox.stories.tsx +0 -192
  49. package/checkbox/types.d.ts +0 -60
  50. package/checkbox/types.js +0 -5
  51. package/chip/Chip.d.ts +0 -4
  52. package/chip/Chip.js +0 -199
  53. package/chip/Chip.stories.tsx +0 -121
  54. package/chip/types.d.ts +0 -53
  55. package/chip/types.js +0 -5
  56. package/common/OpenSans.css +0 -81
  57. package/common/RequiredComponent.js +0 -32
  58. package/common/fonts/OpenSans-Bold.ttf +0 -0
  59. package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  60. package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  61. package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  62. package/common/fonts/OpenSans-Italic.ttf +0 -0
  63. package/common/fonts/OpenSans-Light.ttf +0 -0
  64. package/common/fonts/OpenSans-LightItalic.ttf +0 -0
  65. package/common/fonts/OpenSans-Regular.ttf +0 -0
  66. package/common/fonts/OpenSans-SemiBold.ttf +0 -0
  67. package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  68. package/common/utils.js +0 -22
  69. package/common/variables.js +0 -1578
  70. package/date/Date.js +0 -373
  71. package/date/index.d.ts +0 -27
  72. package/date-input/DateInput.d.ts +0 -4
  73. package/date-input/DateInput.js +0 -361
  74. package/date-input/DateInput.stories.tsx +0 -138
  75. package/date-input/types.d.ts +0 -100
  76. package/date-input/types.js +0 -5
  77. package/dialog/Dialog.d.ts +0 -4
  78. package/dialog/Dialog.js +0 -165
  79. package/dialog/Dialog.stories.tsx +0 -212
  80. package/dialog/types.d.ts +0 -43
  81. package/dialog/types.js +0 -5
  82. package/dropdown/Dropdown.d.ts +0 -4
  83. package/dropdown/Dropdown.js +0 -417
  84. package/dropdown/types.d.ts +0 -89
  85. package/dropdown/types.js +0 -5
  86. package/file-input/FileInput.d.ts +0 -4
  87. package/file-input/FileInput.js +0 -511
  88. package/file-input/FileItem.d.ts +0 -14
  89. package/file-input/FileItem.js +0 -184
  90. package/file-input/types.d.ts +0 -87
  91. package/file-input/types.js +0 -5
  92. package/footer/Footer.d.ts +0 -4
  93. package/footer/Footer.js +0 -266
  94. package/footer/Footer.stories.jsx +0 -151
  95. package/footer/Icons.js +0 -77
  96. package/footer/types.d.ts +0 -69
  97. package/footer/types.js +0 -5
  98. package/header/Header.d.ts +0 -7
  99. package/header/Header.js +0 -324
  100. package/header/Header.stories.tsx +0 -162
  101. package/header/Icons.js +0 -34
  102. package/header/types.d.ts +0 -47
  103. package/header/types.js +0 -5
  104. package/heading/Heading.d.ts +0 -4
  105. package/heading/Heading.js +0 -159
  106. package/heading/Heading.stories.tsx +0 -53
  107. package/heading/types.d.ts +0 -33
  108. package/heading/types.js +0 -5
  109. package/input-text/Icons.js +0 -22
  110. package/input-text/InputText.js +0 -611
  111. package/input-text/index.d.ts +0 -36
  112. package/layout/ApplicationLayout.d.ts +0 -10
  113. package/layout/ApplicationLayout.js +0 -225
  114. package/layout/ApplicationLayout.stories.tsx +0 -171
  115. package/layout/Icons.js +0 -55
  116. package/layout/types.d.ts +0 -57
  117. package/layout/types.js +0 -5
  118. package/link/Link.d.ts +0 -3
  119. package/link/Link.js +0 -161
  120. package/link/Link.stories.tsx +0 -146
  121. package/link/types.d.ts +0 -74
  122. package/link/types.js +0 -5
  123. package/main.d.ts +0 -44
  124. package/main.js +0 -363
  125. package/number-input/NumberInput.d.ts +0 -4
  126. package/number-input/NumberInput.js +0 -86
  127. package/number-input/NumberInput.stories.tsx +0 -115
  128. package/number-input/NumberInputContext.d.ts +0 -4
  129. package/number-input/NumberInputContext.js +0 -19
  130. package/number-input/numberInputContextTypes.d.ts +0 -19
  131. package/number-input/numberInputContextTypes.js +0 -5
  132. package/number-input/types.d.ts +0 -117
  133. package/number-input/types.js +0 -5
  134. package/paginator/Icons.js +0 -66
  135. package/paginator/Paginator.d.ts +0 -4
  136. package/paginator/Paginator.js +0 -198
  137. package/paginator/Paginator.stories.tsx +0 -63
  138. package/paginator/types.d.ts +0 -38
  139. package/paginator/types.js +0 -5
  140. package/password-input/PasswordInput.d.ts +0 -4
  141. package/password-input/PasswordInput.js +0 -164
  142. package/password-input/PasswordInput.stories.tsx +0 -131
  143. package/password-input/types.d.ts +0 -107
  144. package/password-input/types.js +0 -5
  145. package/progress-bar/ProgressBar.d.ts +0 -4
  146. package/progress-bar/ProgressBar.js +0 -170
  147. package/progress-bar/ProgressBar.stories.jsx +0 -58
  148. package/progress-bar/types.d.ts +0 -37
  149. package/progress-bar/types.js +0 -5
  150. package/radio/Radio.d.ts +0 -4
  151. package/radio/Radio.js +0 -174
  152. package/radio/Radio.stories.tsx +0 -192
  153. package/radio/types.d.ts +0 -54
  154. package/radio/types.js +0 -5
  155. package/resultsetTable/ResultsetTable.d.ts +0 -4
  156. package/resultsetTable/ResultsetTable.js +0 -251
  157. package/resultsetTable/types.d.ts +0 -67
  158. package/resultsetTable/types.js +0 -5
  159. package/select/Select.js +0 -865
  160. package/select/Select.stories.tsx +0 -572
  161. package/select/index.d.ts +0 -131
  162. package/sidenav/Sidenav.d.ts +0 -9
  163. package/sidenav/Sidenav.js +0 -136
  164. package/sidenav/Sidenav.stories.tsx +0 -165
  165. package/sidenav/types.d.ts +0 -50
  166. package/sidenav/types.js +0 -5
  167. package/slider/Slider.d.ts +0 -4
  168. package/slider/Slider.js +0 -317
  169. package/slider/Slider.stories.tsx +0 -177
  170. package/slider/types.d.ts +0 -78
  171. package/slider/types.js +0 -5
  172. package/spinner/Spinner.d.ts +0 -4
  173. package/spinner/Spinner.js +0 -250
  174. package/spinner/Spinner.stories.jsx +0 -102
  175. package/spinner/types.d.ts +0 -32
  176. package/spinner/types.js +0 -5
  177. package/switch/Switch.d.ts +0 -4
  178. package/switch/Switch.js +0 -179
  179. package/switch/Switch.stories.tsx +0 -160
  180. package/switch/types.d.ts +0 -58
  181. package/switch/types.js +0 -5
  182. package/table/Table.d.ts +0 -4
  183. package/table/Table.js +0 -118
  184. package/table/Table.stories.jsx +0 -276
  185. package/table/types.d.ts +0 -21
  186. package/table/types.js +0 -5
  187. package/tabs/Tabs.d.ts +0 -4
  188. package/tabs/Tabs.js +0 -213
  189. package/tabs/Tabs.stories.tsx +0 -121
  190. package/tabs/types.d.ts +0 -70
  191. package/tabs/types.js +0 -5
  192. package/tag/Tag.d.ts +0 -4
  193. package/tag/Tag.js +0 -193
  194. package/tag/Tag.stories.tsx +0 -145
  195. package/tag/types.d.ts +0 -60
  196. package/tag/types.js +0 -5
  197. package/text-input/TextInput.d.ts +0 -4
  198. package/text-input/TextInput.js +0 -788
  199. package/text-input/TextInput.stories.tsx +0 -456
  200. package/text-input/types.d.ts +0 -159
  201. package/text-input/types.js +0 -5
  202. package/textarea/Textarea.js +0 -316
  203. package/textarea/Textarea.stories.jsx +0 -135
  204. package/textarea/index.d.ts +0 -127
  205. package/toggle/Toggle.js +0 -186
  206. package/toggle/index.d.ts +0 -21
  207. package/toggle-group/ToggleGroup.d.ts +0 -4
  208. package/toggle-group/ToggleGroup.js +0 -217
  209. package/toggle-group/ToggleGroup.stories.tsx +0 -178
  210. package/toggle-group/types.d.ts +0 -84
  211. package/toggle-group/types.js +0 -5
  212. package/upload/Upload.js +0 -201
  213. package/upload/buttons-upload/ButtonsUpload.js +0 -111
  214. package/upload/buttons-upload/Icons.js +0 -40
  215. package/upload/dragAndDropArea/DragAndDropArea.js +0 -225
  216. package/upload/dragAndDropArea/Icons.js +0 -39
  217. package/upload/file-upload/FileToUpload.js +0 -115
  218. package/upload/file-upload/Icons.js +0 -66
  219. package/upload/files-upload/FilesToUpload.js +0 -109
  220. package/upload/index.d.ts +0 -15
  221. package/upload/transaction/Icons.js +0 -160
  222. package/upload/transaction/Transaction.js +0 -104
  223. package/upload/transactions/Transactions.js +0 -94
  224. package/useTheme.d.ts +0 -2
  225. package/useTheme.js +0 -22
  226. package/wizard/Icons.js +0 -65
  227. package/wizard/Wizard.d.ts +0 -4
  228. package/wizard/Wizard.js +0 -231
  229. package/wizard/Wizard.stories.jsx +0 -224
  230. package/wizard/types.d.ts +0 -64
  231. package/wizard/types.js +0 -5
@@ -1,260 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- var _typeof3 = require("@babel/runtime/helpers/typeof");
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 _TextField = _interopRequireDefault(require("@material-ui/core/TextField"));
25
-
26
- var _propTypes = _interopRequireDefault(require("prop-types"));
27
-
28
- var _variables = require("../common/variables.js");
29
-
30
- var _utils = require("../common/utils.js");
31
-
32
- var _useTheme = _interopRequireDefault(require("../useTheme"));
33
-
34
- var _RequiredComponent = _interopRequireDefault(require("../common/RequiredComponent"));
35
-
36
- var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext"));
37
-
38
- var _templateObject;
39
-
40
- 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
-
42
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(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
-
44
- var V3DxcTextarea = function V3DxcTextarea(_ref) {
45
- var _ref$label = _ref.label,
46
- label = _ref$label === void 0 ? " " : _ref$label,
47
- _ref$name = _ref.name,
48
- name = _ref$name === void 0 ? "" : _ref$name,
49
- value = _ref.value,
50
- _ref$assistiveText = _ref.assistiveText,
51
- assistiveText = _ref$assistiveText === void 0 ? "" : _ref$assistiveText,
52
- _ref$disabled = _ref.disabled,
53
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
54
- _ref$onChange = _ref.onChange,
55
- onChange = _ref$onChange === void 0 ? "" : _ref$onChange,
56
- _ref$onBlur = _ref.onBlur,
57
- onBlur = _ref$onBlur === void 0 ? "" : _ref$onBlur,
58
- _ref$numRows = _ref.numRows,
59
- numRows = _ref$numRows === void 0 ? 4 : _ref$numRows,
60
- _ref$invalid = _ref.invalid,
61
- invalid = _ref$invalid === void 0 ? false : _ref$invalid,
62
- _ref$required = _ref.required,
63
- required = _ref$required === void 0 ? false : _ref$required,
64
- _ref$placeholder = _ref.placeholder,
65
- placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder,
66
- margin = _ref.margin,
67
- _ref$size = _ref.size,
68
- size = _ref$size === void 0 ? "medium" : _ref$size,
69
- _ref$tabIndex = _ref.tabIndex,
70
- tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
71
-
72
- var _useState = (0, _react.useState)(""),
73
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
74
- innerValue = _useState2[0],
75
- setInnerValue = _useState2[1];
76
-
77
- var colorsTheme = (0, _useTheme["default"])();
78
- var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
79
-
80
- var handlerTextareaChange = function handlerTextareaChange(event) {
81
- if (value === null || value === undefined) {
82
- if (typeof onChange === "function") {
83
- setInnerValue(event.target.value);
84
- onChange(event.target.value);
85
- } else {
86
- setInnerValue(event.target.value);
87
- }
88
- } else if (onChange !== "") {
89
- if (typeof onChange === "function") {
90
- onChange(event.target.value);
91
- } else {
92
- setInnerValue(event.target.value);
93
- }
94
- }
95
- };
96
-
97
- var handlerTextareaBlur = function handlerTextareaBlur(event) {
98
- setInnerValue(event.target.value);
99
-
100
- if (onBlur) {
101
- onBlur(event.target.value);
102
- }
103
- };
104
-
105
- return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
106
- theme: colorsTheme.V3Textarea
107
- }, /*#__PURE__*/_react["default"].createElement(TextContainer, {
108
- required: required,
109
- assistiveText: assistiveText,
110
- margin: margin,
111
- size: size,
112
- backgroundType: backgroundType
113
- }, /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
114
- error: invalid,
115
- value: value !== null ? value : innerValue,
116
- name: name,
117
- multiline: true,
118
- disabled: disabled,
119
- label: required ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_RequiredComponent["default"], null), label) : label,
120
- helperText: assistiveText,
121
- onChange: handlerTextareaChange,
122
- onBlur: onBlur && handlerTextareaBlur || null,
123
- rows: numRows,
124
- placeholder: placeholder,
125
- inputProps: {
126
- tabIndex: tabIndex
127
- }
128
- })));
129
- };
130
-
131
- var sizes = {
132
- small: "42px",
133
- medium: "240px",
134
- large: "480px",
135
- fillParent: "100%"
136
- };
137
-
138
- var calculateWidth = function calculateWidth(margin, size) {
139
- return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
140
- };
141
-
142
- var TextContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n display: inline-block;\n position: relative;\n height: auto;\n width: ", ";\n\n .MuiTextField-root {\n width: 100%;\n\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n margin-top: 6px;\n }\n .MuiFormLabel-root {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n padding-left: \"inherit\";\n\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n\n &.Mui-focused {\n color: ", ";\n &.MuiInputLabel-shrink {\n transform: \"translate(0, 1.5px) scale(0.75);\";\n }\n }\n\n &.MuiInputLabel-shrink {\n font-family: ", ";\n transform: \"translate(0, 1.5px) scale(0.75)\";\n }\n\n &.Mui-error {\n color: ", ";\n }\n\n &:not(.MuiInputLabel-shrink) {\n font-family: ", ";\n color: ", ";\n & + div,\n & + div + p {\n color: ", ";\n }\n }\n\n &.MuiInputLabel-shrink {\n & + div::before {\n border-color: ", ";\n }\n & + div + p {\n color: ", ";\n }\n }\n }\n .MuiInputBase-root.MuiInput-root.MuiInput-underline {\n &::before {\n border-bottom: ", ";\n }\n\n &:not(.Mui-error)::before,\n &:not(&.Mui-focused)::before {\n border-bottom: ", ";\n }\n\n &::after {\n border-bottom: ", ";\n }\n\n .MuiInputBase-inputMultiline {\n overflow: auto !important;\n\n ::-webkit-scrollbar {\n width: 3px;\n }\n\n ::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 3px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 3px;\n }\n }\n\n &.Mui-error {\n &::before {\n border-width: ", ";\n border-color: ", ";\n }\n &::after {\n transform: scaleX(0);\n }\n }\n\n &.Mui-focused {\n &::after {\n border-width: calc(", " + 1px);\n border-color: ", ";\n }\n &.Mui-error::after {\n border-color: ", ";\n }\n }\n\n &.Mui-disabled {\n cursor: not-allowed;\n\n &::before {\n border-bottom: ", ";\n border-bottom-style: solid;\n }\n }\n\n .MuiInputBase-input {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n line-height: ", ";\n padding-left: \"inherit\";\n text-overflow: ellipsis;\n\n &.Mui-disabled {\n cursor: not-allowed;\n color: ", ";\n }\n }\n\n &:hover:not(.Mui-disabled):before &:hover:not(.Mui-error):before {\n border-bottom-color: ", ";\n }\n }\n\n & > p {\n &.Mui-error {\n color: ", ";\n }\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n }\n }\n"])), function (props) {
143
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
144
- }, function (props) {
145
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
146
- }, function (props) {
147
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
148
- }, function (props) {
149
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
150
- }, function (props) {
151
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
152
- }, function (props) {
153
- return calculateWidth(props.margin, props.size);
154
- }, function (props) {
155
- return props.theme.fontFamily;
156
- }, function (props) {
157
- return props.theme.assistiveTextFontSize;
158
- }, function (props) {
159
- return props.theme.assistiveTextFontStyle;
160
- }, function (props) {
161
- return props.theme.assistiveTextFontWeight;
162
- }, function (props) {
163
- return props.theme.assistiveTextLetterSpacing;
164
- }, function (props) {
165
- return props.theme.labelFontSize;
166
- }, function (props) {
167
- return props.theme.labelFontStyle;
168
- }, function (props) {
169
- return props.theme.labelFontWeight;
170
- }, function (props) {
171
- return props.theme.labelLetterSpacing;
172
- }, function (props) {
173
- return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
174
- }, function (props) {
175
- return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
176
- }, function (props) {
177
- return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
178
- }, function (props) {
179
- return props.theme.fontFamily;
180
- }, function (props) {
181
- return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
182
- }, function (props) {
183
- return props.theme.fontFamily;
184
- }, function (props) {
185
- return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
186
- }, function (props) {
187
- return props.backgroundType === "dark" ? props.theme.assistiveTextFontColorOnDark : props.theme.assistiveTextFontColor;
188
- }, function (props) {
189
- return props.backgroundType ? props.theme.underlineColorOnDark : props.theme.underlineColor;
190
- }, function (props) {
191
- return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
192
- }, function (props) {
193
- return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor);
194
- }, function (props) {
195
- return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor);
196
- }, function (props) {
197
- return "calc(".concat(props.theme.underlineThickness, " + 1px) solid ").concat(props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor);
198
- }, function (props) {
199
- return props.backgroundType === "dark" ? props.theme.scrollBarTrackColorOnDark : props.theme.scrollBarTrackColor;
200
- }, function (props) {
201
- return props.backgroundType === "dark" ? props.theme.scrollBarThumbColorOnDark : props.theme.scrollBarThumbColor;
202
- }, function (props) {
203
- return props.theme.underlineThickness;
204
- }, function (props) {
205
- return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
206
- }, function (props) {
207
- return props.theme.underlineThickness;
208
- }, function (props) {
209
- return props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor;
210
- }, function (props) {
211
- return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
212
- }, function (props) {
213
- return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor, " !important");
214
- }, function (props) {
215
- return props.theme.fontFamily;
216
- }, function (props) {
217
- return props.theme.valueFontSize;
218
- }, function (props) {
219
- return props.theme.valueFontStyle;
220
- }, function (props) {
221
- return props.theme.valueFontWeight;
222
- }, function (props) {
223
- return props.theme.valueLetterSpacing;
224
- }, function (props) {
225
- return props.backgroundType === "dark" ? props.theme.valueFontColorOnDark : props.theme.valueFontColor;
226
- }, function (props) {
227
- return props.theme.valueLineHeight;
228
- }, function (props) {
229
- return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
230
- }, function (props) {
231
- return props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor;
232
- }, function (props) {
233
- return "".concat(props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor, " !important");
234
- }, function (props) {
235
- return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
236
- });
237
-
238
- V3DxcTextarea.propTypes = {
239
- label: _propTypes["default"].string,
240
- name: _propTypes["default"].string,
241
- value: _propTypes["default"].string,
242
- assistiveText: _propTypes["default"].string,
243
- disabled: _propTypes["default"].bool,
244
- required: _propTypes["default"].bool,
245
- invalid: _propTypes["default"].bool,
246
- placeholder: _propTypes["default"].string,
247
- onChange: _propTypes["default"].func,
248
- onBlur: _propTypes["default"].func,
249
- numRows: _propTypes["default"].number,
250
- size: _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes))),
251
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
252
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
253
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
254
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
255
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
256
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
257
- tabIndex: _propTypes["default"].number
258
- };
259
- var _default = V3DxcTextarea;
260
- exports["default"] = _default;
@@ -1,27 +0,0 @@
1
- type Size = "small" | "medium" | "large" | "fillParent";
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
- label?: string;
12
- name?: string;
13
- value?: string;
14
- assistiveText?: string;
15
- disabled?: boolean,
16
- onChange?: void;
17
- onBlur?: void;
18
- numRows?: number;
19
- required?: boolean;
20
- invalid?: boolean;
21
- placeholder?: string;
22
- margin?: Space | Margin;
23
- size?: Size;
24
- tabIndex?: number;
25
- };
26
-
27
- export default function V3DxcTextarea(props: Props): JSX.Element;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import AccordionPropsType from "./types";
3
- declare const DxcAccordion: ({ label, isExpanded, iconSrc, icon, assistiveText, disabled, onChange, children, margin, padding, tabIndex, }: AccordionPropsType) => JSX.Element;
4
- export default DxcAccordion;
@@ -1,258 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- var _typeof3 = require("@babel/runtime/helpers/typeof");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports["default"] = void 0;
11
-
12
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
-
14
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
15
-
16
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
17
-
18
- var _react = _interopRequireWildcard(require("react"));
19
-
20
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
21
-
22
- var _ExpansionPanel = _interopRequireDefault(require("@material-ui/core/ExpansionPanel"));
23
-
24
- var _ExpansionPanelSummary = _interopRequireDefault(require("@material-ui/core/ExpansionPanelSummary"));
25
-
26
- var _ExpansionPanelDetails = _interopRequireDefault(require("@material-ui/core/ExpansionPanelDetails"));
27
-
28
- var _ExpandMore = _interopRequireDefault(require("@material-ui/icons/ExpandMore"));
29
-
30
- var _utils = require("../common/utils.js");
31
-
32
- var _variables = require("../common/variables.js");
33
-
34
- var _useTheme = _interopRequireDefault(require("../useTheme"));
35
-
36
- var _BackgroundColorContext = require("../BackgroundColorContext");
37
-
38
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
39
-
40
- 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
-
42
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(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
-
44
- var DxcAccordion = function DxcAccordion(_ref) {
45
- var _ref$label = _ref.label,
46
- label = _ref$label === void 0 ? "" : _ref$label,
47
- isExpanded = _ref.isExpanded,
48
- iconSrc = _ref.iconSrc,
49
- icon = _ref.icon,
50
- _ref$assistiveText = _ref.assistiveText,
51
- assistiveText = _ref$assistiveText === void 0 ? "" : _ref$assistiveText,
52
- _ref$disabled = _ref.disabled,
53
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
54
- onChange = _ref.onChange,
55
- children = _ref.children,
56
- margin = _ref.margin,
57
- padding = _ref.padding,
58
- _ref$tabIndex = _ref.tabIndex,
59
- tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
60
-
61
- var _useState = (0, _react.useState)(false),
62
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
63
- innerIsExpanded = _useState2[0],
64
- setInnerIsExpanded = _useState2[1];
65
-
66
- var _useState3 = (0, _react.useState)(false),
67
- _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
68
- isResponsive = _useState4[0],
69
- setIsResponsive = _useState4[1];
70
-
71
- var colorsTheme = (0, _useTheme["default"])();
72
-
73
- var handleResize = function handleResize(width) {
74
- width && width <= _variables.responsiveSizes.tablet ? setIsResponsive(true) : setIsResponsive(false);
75
- };
76
-
77
- var handleEventListener = function handleEventListener() {
78
- handleResize(window.innerWidth);
79
- };
80
-
81
- (0, _react.useEffect)(function () {
82
- window.addEventListener("resize", handleEventListener);
83
- handleResize(window.innerWidth);
84
- return function () {
85
- window.removeEventListener("resize", handleEventListener);
86
- };
87
- }, []);
88
-
89
- var handlerAccordion = function handlerAccordion() {
90
- if (isExpanded == null) {
91
- setInnerIsExpanded(!innerIsExpanded);
92
- }
93
-
94
- if (typeof onChange === "function") {
95
- onChange(isExpanded == null ? !innerIsExpanded : !isExpanded);
96
- }
97
- };
98
-
99
- return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
100
- theme: colorsTheme.accordion
101
- }, /*#__PURE__*/_react["default"].createElement(DXCAccordion, {
102
- padding: padding,
103
- margin: margin,
104
- disabled: disabled,
105
- icon: icon || iconSrc,
106
- isResponsive: isResponsive
107
- }, /*#__PURE__*/_react["default"].createElement(_ExpansionPanel["default"], {
108
- disabled: disabled,
109
- onChange: handlerAccordion,
110
- expanded: isExpanded != null ? isExpanded : innerIsExpanded
111
- }, /*#__PURE__*/_react["default"].createElement(_ExpansionPanelSummary["default"], {
112
- expandIcon: /*#__PURE__*/_react["default"].createElement(_ExpandMore["default"], null),
113
- tabIndex: disabled ? -1 : tabIndex
114
- }, /*#__PURE__*/_react["default"].createElement(AccordionInfo, {
115
- disabled: disabled
116
- }, /*#__PURE__*/_react["default"].createElement(AccordionLabel, null, label), icon ? /*#__PURE__*/_react["default"].createElement(IconContainer, {
117
- disabled: disabled
118
- }, (0, _typeof2["default"])(icon) === "object" ? icon : /*#__PURE__*/_react["default"].createElement(icon)) : iconSrc && /*#__PURE__*/_react["default"].createElement(AccordionIcon, {
119
- src: iconSrc
120
- })), assistiveText && /*#__PURE__*/_react["default"].createElement(AccordionAssistiveText, {
121
- disabled: disabled
122
- }, assistiveText)), /*#__PURE__*/_react["default"].createElement(_ExpansionPanelDetails["default"], null, /*#__PURE__*/_react["default"].createElement(AccordionContent, {
123
- disabled: disabled
124
- }, /*#__PURE__*/_react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
125
- color: colorsTheme.accordion.backgroundColor
126
- }, children))))));
127
- };
128
-
129
- var calculateWidth = function calculateWidth(margin) {
130
- return "calc(100% - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
131
- };
132
-
133
- var DXCAccordion = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n min-width: 280px;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n width: ", ";\n cursor: ", ";\n\n .MuiPaper-root {\n min-width: 0;\n display: flex;\n left: 85px;\n background-color: ", " !important;\n box-shadow: ", ";\n position: static;\n width: 100%;\n border-radius: ", ";\n\n &.Mui-expanded {\n border-radius: ", ";\n }\n &.MuiExpansionPanel-root {\n display: flex;\n flex-direction: column;\n min-height: 48px;\n }\n &.MuiExpansionPanel-rounded {\n border-radius: ", ";\n }\n .MuiButtonBase-root.MuiExpansionPanelSummary-root {\n min-height: 48px;\n height: 48px;\n\n :focus {\n outline-color: ", ";\n outline-style: ", ";\n outline-width: ", ";\n background-color: ", ";\n }\n :hover {\n background-color: ", ";\n }\n :active {\n background-color: ", ";\n }\n &.Mui-disabled {\n opacity: 1;\n }\n }\n .MuiButtonBase-root {\n border-radius: ", ";\n\n &.Mui-expanded {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n .MuiSvgIcon-root {\n opacity: 1;\n }\n }\n &.MuiIconButton-root {\n height: auto;\n }\n .MuiExpansionPanelSummary-content {\n padding-top: ", ";\n padding-bottom: ", ";\n padding-right: ", ";\n padding-left: ", ";\n min-width: 0;\n align-items: baseline;\n &.Mui-expanded {\n div:nth-child(2) {\n opacity: 1;\n }\n }\n :hover {\n div {\n opacity: 1;\n }\n }\n }\n }\n .MuiTouchRipple-root {\n display: none;\n }\n }\n .MuiCollapse-hidden {\n display: none;\n }\n .MuiCollapse-container {\n border-radius: 0px 0px 4px 4px;\n cursor: default;\n width: 100%;\n }\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n color: ", ";\n }\n }\n .MuiExpansionPanelDetails-root {\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n }\n"])), function (props) {
134
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
135
- }, function (props) {
136
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
137
- }, function (props) {
138
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
139
- }, function (props) {
140
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
141
- }, function (props) {
142
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
143
- }, function (props) {
144
- return calculateWidth(props.margin);
145
- }, function (props) {
146
- return props.disabled && "not-allowed" || "pointer";
147
- }, function (props) {
148
- return props.disabled ? props.theme.disabledBackgroundColor : props.theme.backgroundColor;
149
- }, function (props) {
150
- return "".concat(props.theme.boxShadowOffsetX, " ").concat(props.theme.boxShadowOffsetY, " ").concat(props.theme.boxShadowBlur, " ").concat(props.theme.boxShadowColor);
151
- }, function (props) {
152
- return props.theme.borderRadius;
153
- }, function (props) {
154
- return props.theme.borderRadius;
155
- }, function (props) {
156
- return props.theme.borderRadius;
157
- }, function (props) {
158
- return props.theme.focusBorderColor;
159
- }, function (props) {
160
- return props.theme.focusBorderStyle;
161
- }, function (props) {
162
- return props.theme.focusBorderThickness;
163
- }, function (props) {
164
- return props.theme.backgroundColor;
165
- }, function (props) {
166
- return "".concat(props.theme.hoverBackgroundColor);
167
- }, function (props) {
168
- return "".concat(props.theme.hoverBackgroundColor);
169
- }, function (props) {
170
- return props.theme.borderRadius;
171
- }, function (props) {
172
- return props.theme.titleLabelPaddingTop;
173
- }, function (props) {
174
- return props.theme.titleLabelPaddingBottom;
175
- }, function (props) {
176
- return props.theme.titleLabelPaddingRight;
177
- }, function (props) {
178
- return props.theme.titleLabelPaddingLeft;
179
- }, function (props) {
180
- return props.disabled ? props.theme.disabledArrowColor : props.theme.arrowColor;
181
- }, function (props) {
182
- return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : "0px";
183
- }, function (props) {
184
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
185
- }, function (props) {
186
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.right ? _variables.spaces[props.padding.right] : "";
187
- }, function (props) {
188
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.bottom ? _variables.spaces[props.padding.bottom] : "";
189
- }, function (props) {
190
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
191
- });
192
-
193
- var AccordionInfo = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n padding-left: ", ";\n padding-right: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n"])), function (props) {
194
- return props.theme.titlePaddingLeft;
195
- }, function (props) {
196
- return props.theme.titlePaddingRight;
197
- }, function (props) {
198
- return props.theme.titleLabelFontFamily;
199
- }, function (props) {
200
- return props.theme.titleLabelFontSize;
201
- }, function (props) {
202
- return props.theme.titleLabelFontStyle;
203
- }, function (props) {
204
- return props.theme.titleFonLabeltWeight;
205
- }, function (props) {
206
- return props.disabled ? props.theme.disabledTitleLabelFontColor : props.theme.titleLabelFontColor;
207
- });
208
-
209
- var AccordionLabel = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])([""])));
210
-
211
- var AccordionContent = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n"])));
212
-
213
- var AccordionAssistiveText = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n padding-left: ", ";\n padding-right: ", ";\n font-size: ", ";\n font-family: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n flex: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: ", ";\n text-align: end;\n"])), function (props) {
214
- return props.theme.assistiveTextPaddingLeft;
215
- }, function (props) {
216
- return props.theme.assistiveTextPaddingRight;
217
- }, function (props) {
218
- return props.theme.assistiveTextFontSize;
219
- }, function (props) {
220
- return props.theme.assistiveTextFontFamily;
221
- }, function (props) {
222
- return props.theme.assistiveTextFontStyle;
223
- }, function (props) {
224
- return props.theme.assistiveTextFontWeight;
225
- }, function (props) {
226
- return props.disabled ? props.theme.disabledAssistiveTextFontColor : props.theme.assistiveTextFontColor;
227
- }, function (props) {
228
- return props.theme.assistiveTextLetterSpacing;
229
- }, function (props) {
230
- return props.theme.assistiveTextMinWidth;
231
- });
232
-
233
- var IconContainer = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: ", ";\n margin-left: ", ";\n margin-right: ", ";\n overflow: hidden;\n color: ", ";\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"])), function (props) {
234
- return props.theme.iconSize;
235
- }, function (props) {
236
- return props.theme.iconSize;
237
- }, function (props) {
238
- return props.theme.iconMarginLeft;
239
- }, function (props) {
240
- return props.theme.iconMarginRigth;
241
- }, function (props) {
242
- return props.disabled ? props.theme.disabledIconColor : props.theme.iconColor;
243
- });
244
-
245
- var AccordionIcon = _styledComponents["default"].img(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: ", ";\n margin-left: ", ";\n margin-right: ", ";\n overflow: hidden;\n color: ", ";\n"])), function (props) {
246
- return props.theme.iconSize;
247
- }, function (props) {
248
- return props.theme.iconSize;
249
- }, function (props) {
250
- return props.theme.iconMarginLeft;
251
- }, function (props) {
252
- return props.theme.iconMarginRigth;
253
- }, function (props) {
254
- return props.disabled ? props.theme.disabledIconColor : props.theme.iconColor;
255
- });
256
-
257
- var _default = DxcAccordion;
258
- exports["default"] = _default;
@@ -1,68 +0,0 @@
1
- /// <reference types="react" />
2
- declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
3
- declare type Margin = {
4
- top?: Space;
5
- bottom?: Space;
6
- left?: Space;
7
- right?: Space;
8
- };
9
- declare type Padding = {
10
- top?: Space;
11
- bottom?: Space;
12
- left?: Space;
13
- right?: Space;
14
- };
15
- declare type SVG = React.SVGProps<SVGSVGElement> | React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
16
- declare type Props = {
17
- /**
18
- * The panel label.
19
- */
20
- label?: string;
21
- /**
22
- * Represents the state of the panel. When true, the component will be
23
- * expanded. If undefined, the component will be uncontrolled and its
24
- * value will be managed internally by the component.
25
- */
26
- isExpanded?: boolean;
27
- /**
28
- * Element used as the icon that will be placed next to panel label.
29
- */
30
- icon?: SVG;
31
- /**
32
- * @deprecated URL of the icon that will be placed next to panel label.
33
- */
34
- iconSrc?: string;
35
- /**
36
- * Assistive text to be placed on the right side of the panel.
37
- */
38
- assistiveText?: string;
39
- /**
40
- * If true, the component will be disabled.
41
- */
42
- disabled?: boolean;
43
- /**
44
- * This function will be called when the user clicks the accordion to expand or collapse
45
- * the panel. The new state of the panel will be passed as a parameter.
46
- */
47
- onChange?: (isExpanded: boolean) => void;
48
- /**
49
- * The expanded panel of the accordion. This area can be used to render
50
- * custom content.
51
- */
52
- children: React.ReactNode;
53
- /**
54
- * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
55
- * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
56
- */
57
- margin?: Space | Margin;
58
- /**
59
- * Size of the padding to be applied to the custom area ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
60
- * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different padding sizes.
61
- */
62
- padding?: Space | Padding;
63
- /**
64
- * Value of the tabindex.
65
- */
66
- tabIndex?: number;
67
- };
68
- export default Props;
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import AccordionGroupPropsType, { AccordionPropsType } from "./types";
3
- declare const DxcAccordionGroup: {
4
- ({ indexActive, disabled, onActiveChange, margin, children, }: AccordionGroupPropsType): JSX.Element;
5
- Accordion: ({ ...childProps }: AccordionPropsType) => JSX.Element;
6
- };
7
- export default DxcAccordionGroup;