From a50c738316d212f7c28a032071b20ba6143609b4 Mon Sep 17 00:00:00 2001 From: Benjamin Dehli Date: Mon, 4 Dec 2023 15:22:47 +0100 Subject: [PATCH] Build package --- dist/components/Accordion.js | 8 +++++--- dist/components/CheckBoxInput.js | 6 ++++-- dist/components/CheckBoxListItem.js | 4 +++- dist/components/DragAndDropFileInput.js | 6 +++++- dist/components/InputField.js | 4 +++- dist/components/RadioButtonInput.js | 6 ++++-- dist/components/RadioButtonListItem.js | 4 +++- dist/components/Select.js | 2 ++ 8 files changed, 29 insertions(+), 11 deletions(-) diff --git a/dist/components/Accordion.js b/dist/components/Accordion.js index 2d66fdf7..0dcbbad0 100644 --- a/dist/components/Accordion.js +++ b/dist/components/Accordion.js @@ -10,6 +10,7 @@ var _AccordionModule = _interopRequireDefault(require("./Accordion.module.scss") function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } const Accordion = props => { const [expanded, setExpanded] = (0, _react.useState)(props.expanded); const [initialized, setInitialized] = (0, _react.useState)(props.initialized); @@ -24,11 +25,11 @@ const Accordion = props => { setExpanded(props.expanded); }, [props.expanded]); const renderPanel = () => { - return _react.default.createElement("button", { + return _react.default.createElement("button", _extends({}, props.buttonProps, { className: _AccordionModule.default.panel, onClick: handleToggleExpand, "aria-expanded": expanded ? "true" : "false" - }, _react.default.createElement("span", { + }), _react.default.createElement("span", { className: _AccordionModule.default.panelText }, props.title), _react.default.createElement("span", { className: "".concat(_AccordionModule.default.panelChevron, " ").concat(expanded ? _AccordionModule.default.expanded : "") @@ -47,7 +48,8 @@ Accordion.propTypes = { content: _propTypes.default.string, color: _propTypes.default.oneOf(["default", "primary", "success", "warning", "info", "lightCyan", "orange", "lightOrange", "lime", "lightLime"]), expanded: _propTypes.default.bool, - onToggleExpand: _propTypes.default.func + onToggleExpand: _propTypes.default.func, + buttonProps: _propTypes.default.object }; Accordion.defaultProps = { title: null, diff --git a/dist/components/CheckBoxInput.js b/dist/components/CheckBoxInput.js index 286c2fbf..541a3301 100644 --- a/dist/components/CheckBoxInput.js +++ b/dist/components/CheckBoxInput.js @@ -34,7 +34,8 @@ const CheckBoxInput = props => { tabIndex: props.tabIndex || null, "aria-controls": props["aria-controls"], "aria-invalid": props.hasErrors ? "true" : null, - "aria-describedby": props["aria-describedby"] + "aria-describedby": props["aria-describedby"], + "data-transaction-name": props["data-transaction-name"] }; return _react.default.createElement("label", labelProps, !props.contentOnly ? _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_CheckBoxIcon.default, iconProps), _react.default.createElement("input", inputProps)) : _react.default.createElement(_CheckBoxIcon.default, iconProps), _react.default.createElement("span", null, props.children, props.required && _react.default.createElement("img", { src: _asterisk.default, @@ -55,7 +56,8 @@ CheckBoxInput.propTypes = { theme: _propTypes.default.object, checkmarkCharacter: _propTypes.default.string, "aria-controls": _propTypes.default.string, - "aria-describedby": _propTypes.default.string + "aria-describedby": _propTypes.default.string, + "data-transaction-name": _propTypes.default.string }; CheckBoxInput.defaultProps = { checked: false, diff --git a/dist/components/CheckBoxListItem.js b/dist/components/CheckBoxListItem.js index b16a818c..6302e91f 100644 --- a/dist/components/CheckBoxListItem.js +++ b/dist/components/CheckBoxListItem.js @@ -23,6 +23,7 @@ const CheckBoxListItem = props => { hasErrors: props.hasErrors, "aria-controls": props["aria-controls"], "aria-describedby": props["aria-describedby"], + "data-transaction-name": props["data-transaction-name"], id: props.id, theme: props.theme, checkmarkCharacter: props.checkmarkCharacter @@ -45,7 +46,8 @@ CheckBoxListItem.propTypes = { hasErrors: _propTypes.default.bool, checkmarkCharacter: _propTypes.default.string, "aria-controls": _propTypes.default.string, - "aria-describedby": _propTypes.default.string + "aria-describedby": _propTypes.default.string, + "data-transaction-name": _propTypes.default.string }; CheckBoxListItem.defaultProps = { checked: false, diff --git a/dist/components/DragAndDropFileInput.js b/dist/components/DragAndDropFileInput.js index 29eaf6ab..6fc67c22 100644 --- a/dist/components/DragAndDropFileInput.js +++ b/dist/components/DragAndDropFileInput.js @@ -36,6 +36,7 @@ const DragAndDropFileInput = props => { const inputElementProps = { "aria-describedby": props.hasErrors && !!((_props$errorMessage = props.errorMessage) !== null && _props$errorMessage !== void 0 && _props$errorMessage.length) ? getErrorElementId() : !!((_props$ariaDescribed = props["aria-describedby"]) !== null && _props$ariaDescribed !== void 0 && _props$ariaDescribed.length) ? props["aria-describedby"] : null, "aria-invalid": props.hasErrors ? "true" : null, + "data-transaction-name": props["data-transaction-name-for-input"], required: props.required }; let buttonContent; @@ -93,7 +94,8 @@ const DragAndDropFileInput = props => { color: props.buttonColor, onClick: () => handleAddButtonOnClick(), content: buttonContent, - hasErrors: props.hasErrors + hasErrors: props.hasErrors, + "data-transaction-name": props["data-transaction-name-for-button"] })) : null) : null, props.contentOnly ? _react.default.createElement("span", null, renderValueAsText(props.selectedFileName, props.defaultContent)) : "", _react.default.createElement(_ErrorMessage.default, { id: getErrorElementId(), content: props.errorMessage, @@ -114,6 +116,8 @@ DragAndDropFileInput.propTypes = { hasErrors: _propTypes.default.bool, errorMessage: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]))]), required: _propTypes.default.bool, + "data-transaction-name-for-button": _propTypes.default.string, + "data-transaction-name-for-input": _propTypes.default.string, theme: _propTypes.default.object }; DragAndDropFileInput.defaultProps = { diff --git a/dist/components/InputField.js b/dist/components/InputField.js index 20817762..aa1e0c2a 100644 --- a/dist/components/InputField.js +++ b/dist/components/InputField.js @@ -59,6 +59,7 @@ const InputField = props => { "aria-describedby": props.hasErrors && !!((_props$errorMessage = props.errorMessage) !== null && _props$errorMessage !== void 0 && _props$errorMessage.length) ? getErrorElementId() : !!((_props$ariaDescribed = props["aria-describedby"]) !== null && _props$ariaDescribed !== void 0 && _props$ariaDescribed.length) ? props["aria-describedby"] : null, "aria-invalid": props.hasErrors ? "true" : null, "aria-autocomplete": props["aria-autocomplete"] || null, + "data-transaction-name": props["data-transaction-name"] || null, style: styleRules }; }; @@ -119,7 +120,8 @@ InputField.propTypes = { "aria-autocomplete": _propTypes.default.oneOf(["none", "inline", "list", "both"]), hasErrors: _propTypes.default.bool, errorMessage: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]))]), - theme: _propTypes.default.object + theme: _propTypes.default.object, + "data-transaction-name": _propTypes.default.string }; InputField.defaultProps = { onChange: () => { diff --git a/dist/components/RadioButtonInput.js b/dist/components/RadioButtonInput.js index 87a144cd..7dcf9ab2 100644 --- a/dist/components/RadioButtonInput.js +++ b/dist/components/RadioButtonInput.js @@ -33,7 +33,8 @@ const RadioButtonInput = props => { tabIndex: props.tabIndex || null, "aria-controls": props["aria-controls"], "aria-invalid": props.hasErrors ? "true" : null, - "aria-describedby": props["aria-describedby"] + "aria-describedby": props["aria-describedby"], + "data-transaction-name": props["data-transaction-name"] }; return _react.default.createElement("label", labelProps, !props.contentOnly ? _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_RadioButtonIcon.default, iconProps), _react.default.createElement("input", inputProps)) : null, _react.default.createElement("span", null, props.children, props.required && _react.default.createElement("img", { src: _asterisk.default, @@ -54,7 +55,8 @@ RadioButtonInput.propTypes = { theme: _propTypes.default.object, inputValue: _propTypes.default.string.isRequired, "aria-controls": _propTypes.default.string, - "aria-describedby": _propTypes.default.string + "aria-describedby": _propTypes.default.string, + "data-transaction-name": _propTypes.default.string }; RadioButtonInput.defaultProps = { name: "", diff --git a/dist/components/RadioButtonListItem.js b/dist/components/RadioButtonListItem.js index 1b9c16ad..b035a3e8 100644 --- a/dist/components/RadioButtonListItem.js +++ b/dist/components/RadioButtonListItem.js @@ -24,6 +24,7 @@ const RadioButtonListItem = props => { hasErrors: props.hasErrors, "aria-controls": props["aria-controls"], "aria-describedby": props["aria-describedby"], + "data-transaction-name": props["data-transaction-name"], id: props.id, name: props.name, theme: props.theme @@ -46,7 +47,8 @@ RadioButtonListItem.propTypes = { theme: _propTypes.default.object, hasErrors: _propTypes.default.bool, "aria-controls": _propTypes.default.string, - "aria-describedby": _propTypes.default.string + "aria-describedby": _propTypes.default.string, + "data-transaction-name": _propTypes.default.string }; RadioButtonListItem.defaultProps = { name: "", diff --git a/dist/components/Select.js b/dist/components/Select.js index 87b35a35..3f85f874 100644 --- a/dist/components/Select.js +++ b/dist/components/Select.js @@ -157,6 +157,7 @@ const Select = props => { className, "aria-describedby": props.hasErrors && !!((_props$errorMessage = props.errorMessage) !== null && _props$errorMessage !== void 0 && _props$errorMessage.length) ? getErrorElementId() : !!((_props$ariaDescribed = props["aria-describedby"]) !== null && _props$ariaDescribed !== void 0 && _props$ariaDescribed.length) ? props["aria-describedby"] : null, "aria-invalid": props.hasErrors ? "true" : null, + "data-transaction-name": props["data-transaction-name"], style: styleRules }; return _react.default.createElement("div", { @@ -218,6 +219,7 @@ Select.propTypes = { "aria-describedby": _propTypes.default.string, hasErrors: _propTypes.default.bool, errorMessage: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]))]), + "data-transaction-name": _propTypes.default.string, theme: _propTypes.default.object }; Select.defaultProps = {