@rh-support/components 2.1.23 → 2.1.25
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 +2 -0
- package/lib/cjs/CustomTextInput/CustomTextInput.d.ts +2 -0
- package/lib/cjs/CustomTextInput/CustomTextInput.d.ts.map +1 -1
- package/lib/cjs/CustomTextInput/CustomTextInput.js +4 -2
- package/lib/cjs/DropDownList/DropDownList.js +10 -10
- package/lib/cjs/DropDownList/DropdownWrapper.js +2 -2
- package/lib/cjs/DropDownList/SearchableList.js +5 -5
- package/lib/cjs/DropDownList/SelectList.js +4 -4
- package/lib/cjs/DropDownList/dropdownList.css +10 -5
- package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
- package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.js +2 -3
- package/lib/cjs/InlineEdit/NewInlineEdit.js +1 -1
- package/lib/cjs/InlineEdit/newInlineEdit.css +3 -3
- package/lib/cjs/LoadingDots/LoadingDots.js +1 -1
- package/lib/cjs/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
- package/lib/cjs/MarkdownEditor/MarkdownEditor.js +11 -10
- package/lib/cjs/MarkdownEditor/markdownEditor.css +1 -1
- package/lib/cjs/PaginationCompact/PaginationCompact.js +4 -4
- package/lib/cjs/PaginationCompact/paginationCompact.css +1 -1
- package/lib/cjs/PhoneInput/PhoneInput.d.ts.map +1 -1
- package/lib/cjs/PhoneInput/PhoneInput.js +10 -7
- package/lib/cjs/PhoneInput/PhoneInput.scss +1 -1
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.js +12 -12
- package/lib/cjs/Table/PFTable.d.ts +2 -1
- package/lib/cjs/Table/PFTable.d.ts.map +1 -1
- package/lib/cjs/Table/PFTable.js +7 -7
- package/lib/cjs/Table/columnSelector.css +1 -1
- package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
- package/lib/cjs/TermsAndConditions/AcceptTermsModal.js +6 -5
- package/lib/cjs/TextAreaResizable/TextAreaResizable.d.ts.map +1 -1
- package/lib/cjs/TextAreaResizable/TextAreaResizable.js +1 -1
- package/lib/cjs/ToastNotification/toastNotification.css +1 -1
- package/lib/cjs/TopContentSearch/TopContentSearch.js +3 -3
- package/lib/cjs/helperFunctions/errorMessage.js +2 -2
- package/lib/cjs/helperFunctions/errorMessage.scss +1 -1
- package/lib/cjs/hooks/index.d.ts +1 -0
- package/lib/cjs/hooks/index.d.ts.map +1 -1
- package/lib/cjs/hooks/index.js +1 -0
- package/lib/cjs/hooks/useBreakpoint.d.ts.map +1 -1
- package/lib/cjs/hooks/useBreakpoint.js +1 -0
- package/lib/cjs/hooks/useSelectKeyboardNavigator.d.ts +13 -0
- package/lib/cjs/hooks/useSelectKeyboardNavigator.d.ts.map +1 -0
- package/lib/cjs/hooks/useSelectKeyboardNavigator.js +55 -0
- package/lib/esm/CustomTextInput/CustomTextInput.d.ts +2 -0
- package/lib/esm/CustomTextInput/CustomTextInput.d.ts.map +1 -1
- package/lib/esm/CustomTextInput/CustomTextInput.js +4 -2
- package/lib/esm/DropDownList/DropDownList.js +10 -10
- package/lib/esm/DropDownList/DropdownWrapper.js +2 -2
- package/lib/esm/DropDownList/SearchableList.js +5 -5
- package/lib/esm/DropDownList/SelectList.js +4 -4
- package/lib/esm/DropDownList/dropdownList.css +10 -5
- package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
- package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.js +3 -4
- package/lib/esm/InlineEdit/NewInlineEdit.js +1 -1
- package/lib/esm/InlineEdit/newInlineEdit.css +3 -3
- package/lib/esm/LoadingDots/LoadingDots.js +1 -1
- package/lib/esm/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
- package/lib/esm/MarkdownEditor/MarkdownEditor.js +9 -8
- package/lib/esm/MarkdownEditor/markdownEditor.css +1 -1
- package/lib/esm/PaginationCompact/PaginationCompact.js +4 -4
- package/lib/esm/PaginationCompact/paginationCompact.css +1 -1
- package/lib/esm/PhoneInput/PhoneInput.d.ts.map +1 -1
- package/lib/esm/PhoneInput/PhoneInput.js +10 -7
- package/lib/esm/PhoneInput/PhoneInput.scss +1 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.js +13 -13
- package/lib/esm/Table/PFTable.d.ts +2 -1
- package/lib/esm/Table/PFTable.d.ts.map +1 -1
- package/lib/esm/Table/PFTable.js +6 -6
- package/lib/esm/Table/columnSelector.css +1 -1
- package/lib/esm/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
- package/lib/esm/TermsAndConditions/AcceptTermsModal.js +7 -6
- package/lib/esm/TextAreaResizable/TextAreaResizable.d.ts.map +1 -1
- package/lib/esm/TextAreaResizable/TextAreaResizable.js +1 -1
- package/lib/esm/ToastNotification/toastNotification.css +1 -1
- package/lib/esm/TopContentSearch/TopContentSearch.js +3 -3
- package/lib/esm/helperFunctions/errorMessage.js +2 -2
- package/lib/esm/helperFunctions/errorMessage.scss +1 -1
- package/lib/esm/hooks/index.d.ts +1 -0
- package/lib/esm/hooks/index.d.ts.map +1 -1
- package/lib/esm/hooks/index.js +1 -0
- package/lib/esm/hooks/useBreakpoint.d.ts.map +1 -1
- package/lib/esm/hooks/useBreakpoint.js +1 -0
- package/lib/esm/hooks/useSelectKeyboardNavigator.d.ts +13 -0
- package/lib/esm/hooks/useSelectKeyboardNavigator.d.ts.map +1 -0
- package/lib/esm/hooks/useSelectKeyboardNavigator.js +51 -0
- package/package.json +9 -11
package/lib/cjs/Table/PFTable.js
CHANGED
|
@@ -37,6 +37,7 @@ exports.PFTable = exports.defaultTableSortMethod = void 0;
|
|
|
37
37
|
const react_core_1 = require("@patternfly/react-core");
|
|
38
38
|
const search_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/search-icon"));
|
|
39
39
|
const react_table_1 = require("@patternfly/react-table");
|
|
40
|
+
const deprecated_1 = require("@patternfly/react-table/deprecated");
|
|
40
41
|
const react_1 = __importStar(require("react"));
|
|
41
42
|
const TableProvider_1 = require("./TableProvider");
|
|
42
43
|
const noop = () => { };
|
|
@@ -47,9 +48,8 @@ const emptyStateRowDefault = [
|
|
|
47
48
|
{
|
|
48
49
|
props: { colSpan: 8 },
|
|
49
50
|
title: (react_1.default.createElement(react_core_1.Bullseye, null,
|
|
50
|
-
react_1.default.createElement(react_core_1.EmptyState, { variant: react_core_1.EmptyStateVariant.
|
|
51
|
-
react_1.default.createElement(react_core_1.EmptyStateIcon, { icon: search_icon_1.default }),
|
|
52
|
-
react_1.default.createElement(react_core_1.Title, { headingLevel: "h2", size: "lg" }, "No results found")))),
|
|
51
|
+
react_1.default.createElement(react_core_1.EmptyState, { variant: react_core_1.EmptyStateVariant.sm },
|
|
52
|
+
react_1.default.createElement(react_core_1.EmptyStateHeader, { titleText: "No results found", icon: react_1.default.createElement(react_core_1.EmptyStateIcon, { icon: search_icon_1.default }), headingLevel: "h2" })))),
|
|
53
53
|
},
|
|
54
54
|
],
|
|
55
55
|
},
|
|
@@ -61,7 +61,7 @@ const loadingRowDefault = [
|
|
|
61
61
|
{
|
|
62
62
|
props: { colSpan: 9 },
|
|
63
63
|
title: (react_1.default.createElement(react_core_1.Bullseye, { style: { minHeight: '350px' } },
|
|
64
|
-
react_1.default.createElement(react_core_1.EmptyState, { variant: react_core_1.EmptyStateVariant.
|
|
64
|
+
react_1.default.createElement(react_core_1.EmptyState, { variant: react_core_1.EmptyStateVariant.sm },
|
|
65
65
|
react_1.default.createElement(react_core_1.Spinner, { size: "xl" })))),
|
|
66
66
|
},
|
|
67
67
|
],
|
|
@@ -197,8 +197,8 @@ function PFTable(props) {
|
|
|
197
197
|
}
|
|
198
198
|
};
|
|
199
199
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
200
|
-
react_1.default.createElement(
|
|
201
|
-
react_1.default.createElement(
|
|
202
|
-
react_1.default.createElement(
|
|
200
|
+
react_1.default.createElement(deprecated_1.Table, Object.assign({}, restProps, conditionalProps, { variant: react_table_1.TableVariant.compact, cells: pfColumns, sortBy: getSortBy(), onSort: onSort, rows: getTableRows(), className: props.className ? props.className : '', actionResolver: props.actionResolver, actions: props.actions || null, areActionsDisabled: props.areActionsDisabled || null }),
|
|
201
|
+
react_1.default.createElement(deprecated_1.TableHeader, null),
|
|
202
|
+
react_1.default.createElement(deprecated_1.TableBody, { onRowClick: onRowClick ? onRowClick : noop }))));
|
|
203
203
|
}
|
|
204
204
|
exports.PFTable = PFTable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcceptTermsModal.d.ts","sourceRoot":"","sources":["../../../src/TermsAndConditions/AcceptTermsModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcceptTermsModal.d.ts","sourceRoot":"","sources":["../../../src/TermsAndConditions/AcceptTermsModal.tsx"],"names":[],"mappings":"AAUA,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAiBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,eAyI7C"}
|
|
@@ -31,6 +31,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
31
31
|
exports.AcceptTermsModal = void 0;
|
|
32
32
|
const hydrajs_1 = require("@cee-eng/hydrajs");
|
|
33
33
|
const react_core_1 = require("@patternfly/react-core");
|
|
34
|
+
const deprecated_1 = require("@patternfly/react-core/deprecated");
|
|
34
35
|
const react_1 = __importStar(require("react"));
|
|
35
36
|
const react_i18next_1 = require("react-i18next");
|
|
36
37
|
const hooks_1 = require("../hooks");
|
|
@@ -92,24 +93,24 @@ function AcceptTermsModal(props) {
|
|
|
92
93
|
props.onConfirm(selectedTranslation.termsPdfId);
|
|
93
94
|
};
|
|
94
95
|
const onDropdownToggle = (toggle) => setisLangSelectorDropdownOpen(toggle);
|
|
95
|
-
return (react_1.default.createElement(react_core_1.Modal, { variant: react_core_1.ModalVariant.medium, className: "pf-u-font-size-sm", title: isFetching || !selectedTranslation ? 'Remote Access Rider' : selectedTranslation.translatedTermsName, isOpen: props.isModalOpen, showClose: props.isSubmitting ? false : true, onClose: handleModalToggle, actions: [
|
|
96
|
+
return (react_1.default.createElement(react_core_1.Modal, { variant: react_core_1.ModalVariant.medium, className: "pf-v5-u-font-size-sm", title: isFetching || !selectedTranslation ? 'Remote Access Rider' : selectedTranslation.translatedTermsName, isOpen: props.isModalOpen, showClose: props.isSubmitting ? false : true, onClose: handleModalToggle, actions: [
|
|
96
97
|
react_1.default.createElement(react_core_1.Button, { key: "confirm", variant: react_core_1.ButtonVariant.primary, isDisabled: !termsAcked || props.isSubmitting || props.isDisabled, isLoading: props.isDisabled || props.isSubmitting, "data-tracking-id": `${props.dataTrackingId || props.eventCode}-terms-accept`, onClick: onSubmitClick },
|
|
97
98
|
react_1.default.createElement(react_i18next_1.Trans, null, "Submit")),
|
|
98
99
|
react_1.default.createElement(react_core_1.Button, { key: "cancel", isDisabled: props.isSubmitting || props.isDisabled, "data-tracking-id": `${props.dataTrackingId || props.eventCode}-terms-cancel`, variant: react_core_1.ButtonVariant.link, onClick: props.onModalClose },
|
|
99
100
|
react_1.default.createElement(react_i18next_1.Trans, null, "Cancel")),
|
|
100
101
|
] }, isFetching || !selectedTranslation ? (react_1.default.createElement("div", { style: { height: '100px' } },
|
|
101
102
|
react_1.default.createElement(LoadingIndicator_1.LoadingIndicator, null))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
102
|
-
react_1.default.createElement("p", { className: "pf-u-mb-md" }, selectedTranslation.translatedDescription),
|
|
103
|
+
react_1.default.createElement("p", { className: "pf-v5-u-mb-md" }, selectedTranslation.translatedDescription),
|
|
103
104
|
react_1.default.createElement("strong", null,
|
|
104
105
|
react_1.default.createElement(react_i18next_1.Trans, null, "Download the agreement")),
|
|
105
|
-
react_1.default.createElement("p", { className: "pf-u-mb-md pf-u-mt-sm" }, selectedTranslation.translatedInstructions),
|
|
106
|
+
react_1.default.createElement("p", { className: "pf-v5-u-mb-md pf-v5-u-mt-sm" }, selectedTranslation.translatedInstructions),
|
|
106
107
|
react_1.default.createElement(react_core_1.Flex, null,
|
|
107
108
|
react_1.default.createElement(react_core_1.FlexItem, null,
|
|
108
|
-
react_1.default.createElement(
|
|
109
|
+
react_1.default.createElement(deprecated_1.Select, { "aria-label": t('Select language'), id: "terms-language-selector", className: "pf-v5-u-mb-md", selections: selectedTranslation.localeCode, onSelect: onLangChange, isOpen: isLangSelectorDropdownOpen, isDisabled: props.isSubmitting, menuAppendTo: document.body, placeholderText: t('Select an option that best fits'), onToggle: (_event, toggle) => onDropdownToggle(toggle) }, Object.keys(allTranslations).map((option, index) => (react_1.default.createElement(deprecated_1.SelectOption, { key: index, value: option }, getLocaleNameFromLocalCode(option)))))),
|
|
109
110
|
react_1.default.createElement(react_core_1.FlexItem, null,
|
|
110
111
|
react_1.default.createElement("a", { href: selectedTranslation.pdfDownloadUrl, "data-tracking-id": `${props.eventCode}-terms-download`, target: "_blank", rel: "noopener noreferrer" },
|
|
111
112
|
react_1.default.createElement(react_i18next_1.Trans, null, "Download")))),
|
|
112
|
-
react_1.default.createElement(react_core_1.Checkbox, { label: t('I have read and agree to the terms'), isChecked: termsAcked, onChange: (checked) => {
|
|
113
|
+
react_1.default.createElement(react_core_1.Checkbox, { label: t('I have read and agree to the terms'), isChecked: termsAcked, onChange: (_event, checked) => {
|
|
113
114
|
setTermsAcked(checked);
|
|
114
115
|
}, "aria-label": t('I have read and agree to the terms'), id: "agree-terms", name: "agree-terms" })))));
|
|
115
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAreaResizable.d.ts","sourceRoot":"","sources":["../../../src/TextAreaResizable/TextAreaResizable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAEnD,UAAU,MAAO,SAAQ,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;IACpG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;CACpF;AACD,eAAO,MAAM,iBAAiB,UAAW,MAAM,
|
|
1
|
+
{"version":3,"file":"TextAreaResizable.d.ts","sourceRoot":"","sources":["../../../src/TextAreaResizable/TextAreaResizable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAEnD,UAAU,MAAO,SAAQ,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;IACpG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;CACpF;AACD,eAAO,MAAM,iBAAiB,UAAW,MAAM,gBAqD9C,CAAC"}
|
|
@@ -51,6 +51,6 @@ const TextAreaResizable = (props) => {
|
|
|
51
51
|
else
|
|
52
52
|
return 'default';
|
|
53
53
|
};
|
|
54
|
-
return (react_1.default.createElement(react_core_1.TextArea, { id: id, rows: rows || rowsMin, className: className, "aria-required": props['aria-required'], isRequired: isRequired, maxLength: maxLength, name: name, value: value, autoResize: autoResize, validated: validatedCheck(), onChange: onTextAreaChange, disabled: isDisabled }));
|
|
54
|
+
return (react_1.default.createElement(react_core_1.TextArea, { id: id, rows: rows || rowsMin, className: className, "aria-required": props['aria-required'], isRequired: isRequired, maxLength: maxLength, name: name, value: value, autoResize: autoResize, validated: validatedCheck(), onChange: (event, value) => onTextAreaChange(value, event), disabled: isDisabled, resizeOrientation: "vertical" }));
|
|
55
55
|
};
|
|
56
56
|
exports.TextAreaResizable = TextAreaResizable;
|
|
@@ -130,9 +130,9 @@ function TopContentSearch({ topContentData = [], topContentResultsWrapperRef = {
|
|
|
130
130
|
setSearchText(value);
|
|
131
131
|
debounceSearch(value);
|
|
132
132
|
};
|
|
133
|
-
return (react_1.default.createElement("div", { className: "top-content-search-wrapper pf-u-p-md", ref: searchWrapperRef },
|
|
134
|
-
react_1.default.createElement("label", { htmlFor: "top-content-search-input", className: "pf-u-mr-md top-content-search-label" },
|
|
133
|
+
return (react_1.default.createElement("div", { className: "top-content-search-wrapper pf-v5-u-p-md", ref: searchWrapperRef },
|
|
134
|
+
react_1.default.createElement("label", { htmlFor: "top-content-search-input", className: "pf-v5-u-mr-md top-content-search-label" },
|
|
135
135
|
react_1.default.createElement(react_i18next_1.Trans, null, "Filter results:")),
|
|
136
|
-
react_1.default.createElement(react_core_1.SearchInput, { id: "top-content-search-input", className: "top-content-search-input pf-u-flex-grow-1", "aria-label": t('search top content'), placeholder: t('Enter relevant keywords'), value: searchText, "data-tracking-id": dataTrackingId, onChange: onSearchInputChange, onClear: onSearchInputClear })));
|
|
136
|
+
react_1.default.createElement(react_core_1.SearchInput, { id: "top-content-search-input", className: "top-content-search-input pf-v5-u-flex-grow-1", "aria-label": t('search top content'), placeholder: t('Enter relevant keywords'), value: searchText, "data-tracking-id": dataTrackingId, onChange: (e, val) => onSearchInputChange(val), onClear: onSearchInputClear })));
|
|
137
137
|
}
|
|
138
138
|
exports.TopContentSearch = TopContentSearch;
|
|
@@ -12,12 +12,12 @@ const react_1 = __importDefault(require("react"));
|
|
|
12
12
|
const SupportFeedbackForm_1 = require("../SupportFeedbackForm");
|
|
13
13
|
const defaultTitle = "Sorry, we're experiencing an error";
|
|
14
14
|
const errorMessageButtonLabel = 'contact us';
|
|
15
|
-
const defaultErrorMessage = (react_1.default.createElement("p", { className: "pf-u-mb-0" },
|
|
15
|
+
const defaultErrorMessage = (react_1.default.createElement("p", { className: "pf-v5-u-mb-0" },
|
|
16
16
|
"Try refreshing the page. Please ",
|
|
17
17
|
react_1.default.createElement(SupportFeedbackForm_1.SupportFeedbackForm, { isInline: true, buttonLabel: errorMessageButtonLabel }),
|
|
18
18
|
" if the problem persists.",
|
|
19
19
|
react_1.default.createElement("br", null),
|
|
20
|
-
react_1.default.createElement(react_core_1.Button, { variant: "link", component: "a", href: "https://status.redhat.com/", "data-tracking-id": "redirect-status-portal-button", target: "_blank", icon: react_1.default.createElement(external_link_alt_icon_1.default, { className: "status-portal-button-icon" }), iconPosition: "right", className: "pf-u-pl-0", isInline: true, "aria-label": "View status page" }, "View status page"),
|
|
20
|
+
react_1.default.createElement(react_core_1.Button, { variant: "link", component: "a", href: "https://status.redhat.com/", "data-tracking-id": "redirect-status-portal-button", target: "_blank", icon: react_1.default.createElement(external_link_alt_icon_1.default, { className: "status-portal-button-icon" }), iconPosition: "right", className: "pf-v5-u-pl-0", isInline: true, "aria-label": "View status page" }, "View status page"),
|
|
21
21
|
' '));
|
|
22
22
|
const defaultErrorObj = {
|
|
23
23
|
500: {
|
package/lib/cjs/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC"}
|
package/lib/cjs/hooks/index.js
CHANGED
|
@@ -23,3 +23,4 @@ __exportStar(require("./useForceUpdate"), exports);
|
|
|
23
23
|
__exportStar(require("./useLRUCache"), exports);
|
|
24
24
|
__exportStar(require("./useBreakpoint"), exports);
|
|
25
25
|
__exportStar(require("./useOnScreen"), exports);
|
|
26
|
+
__exportStar(require("./useSelectKeyboardNavigator"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBreakpoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,oBAAY,MAAM,GAAG;IACjB,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC,CAAC;
|
|
1
|
+
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBreakpoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,oBAAY,MAAM,GAAG;IACjB,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC,CAAC;AAaF,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,OAAwB,EAAE,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,eA+ChH;AAED,iBAAS,aAAa;;EAMrB;AACD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -30,6 +30,7 @@ const defaultQueries = {
|
|
|
30
30
|
md: `(min-width: 768px)`,
|
|
31
31
|
lg: `(min-width: 992px)`,
|
|
32
32
|
xl: `(min-width: 1300px)`,
|
|
33
|
+
xxl: `(min-width: 1800px)`,
|
|
33
34
|
};
|
|
34
35
|
function BreakpointProvider({ children, queries = defaultQueries }) {
|
|
35
36
|
const [queryMatch, setQueryMatch] = react_1.useState({});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
list: any[];
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
setIsOpen: (value: React.SetStateAction<boolean>) => void;
|
|
6
|
+
onSelect: (value: any) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useSelectKeyboardNavigator({ list, isOpen, setIsOpen, onSelect }: IProps): {
|
|
9
|
+
onInputKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
10
|
+
focusedItemIndex: number;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=useSelectKeyboardNavigator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSelectKeyboardNavigator.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSelectKeyboardNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,UAAU,MAAM;IACZ,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC1D,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CAClC;AAED,wBAAgB,0BAA0B,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,MAAM;4BA6BrD,mBAAmB,CAAC,gBAAgB,CAAC;;EAuBvE"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSelectKeyboardNavigator = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function useSelectKeyboardNavigator({ list, isOpen, setIsOpen, onSelect }) {
|
|
6
|
+
const [focusedItemIndex, setFocusedItemIndex] = react_1.useState(null);
|
|
7
|
+
const handleMenuArrowKeys = (key) => {
|
|
8
|
+
let indexToFocus;
|
|
9
|
+
if (isOpen) {
|
|
10
|
+
if (key === 'ArrowUp') {
|
|
11
|
+
// When no index is set or at the first index, focus to the last, otherwise decrement focus index
|
|
12
|
+
if (focusedItemIndex === null || focusedItemIndex === 0) {
|
|
13
|
+
indexToFocus = list.length - 1;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
indexToFocus = focusedItemIndex - 1;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
if (key === 'ArrowDown') {
|
|
20
|
+
// When no index is set or at the last index, focus to the first, otherwise increment focus index
|
|
21
|
+
if (focusedItemIndex === null || focusedItemIndex === list.length - 1) {
|
|
22
|
+
indexToFocus = 0;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
indexToFocus = focusedItemIndex + 1;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
setFocusedItemIndex(indexToFocus);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const onInputKeyDown = (event) => {
|
|
32
|
+
const focusedItem = focusedItemIndex ? list[focusedItemIndex] : list[0];
|
|
33
|
+
switch (event.key) {
|
|
34
|
+
// Select the first available option
|
|
35
|
+
case 'Enter':
|
|
36
|
+
if (!isOpen) {
|
|
37
|
+
setIsOpen((pre) => !pre);
|
|
38
|
+
}
|
|
39
|
+
else if (isOpen) {
|
|
40
|
+
onSelect(focusedItem);
|
|
41
|
+
}
|
|
42
|
+
break;
|
|
43
|
+
case 'Escape':
|
|
44
|
+
setIsOpen(false);
|
|
45
|
+
break;
|
|
46
|
+
case 'ArrowUp':
|
|
47
|
+
case 'ArrowDown':
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
handleMenuArrowKeys(event.key);
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return { onInputKeyDown, focusedItemIndex };
|
|
54
|
+
}
|
|
55
|
+
exports.useSelectKeyboardNavigator = useSelectKeyboardNavigator;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TextInputProps } from '@patternfly/react-core';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
interface IProps extends TextInputProps {
|
|
3
4
|
className?: string;
|
|
4
5
|
maxLength?: number;
|
|
@@ -6,6 +7,7 @@ interface IProps extends TextInputProps {
|
|
|
6
7
|
isSpaceAllowed?: boolean;
|
|
7
8
|
name?: string;
|
|
8
9
|
isDisabled?: boolean;
|
|
10
|
+
onChange?: ((event: React.FormEvent<HTMLInputElement>, value: string) => void) | undefined;
|
|
9
11
|
}
|
|
10
12
|
export declare const CustomTextInput: (props: IProps) => JSX.Element;
|
|
11
13
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomTextInput.d.ts","sourceRoot":"","sources":["../../../src/CustomTextInput/CustomTextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAoB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomTextInput.d.ts","sourceRoot":"","sources":["../../../src/CustomTextInput/CustomTextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAoB,MAAM,wBAAwB,CAAC;AAErF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,MAAO,SAAQ,cAAc;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC9F;AAED,eAAO,MAAM,eAAe,UAAW,MAAM,gBAsD5C,CAAC"}
|
|
@@ -17,7 +17,7 @@ export const CustomTextInput = (props) => {
|
|
|
17
17
|
const { onChange, isSpaceAllowed = false, isRequired, className, type, maxLength, value, isDisabled, placeholder, validated, name } = props, rest = __rest(props, ["onChange", "isSpaceAllowed", "isRequired", "className", "type", "maxLength", "value", "isDisabled", "placeholder", "validated", "name"]);
|
|
18
18
|
// To handle on input change
|
|
19
19
|
const onTextInputChange = (value, event) => {
|
|
20
|
-
onChange(
|
|
20
|
+
onChange && onChange(event, value);
|
|
21
21
|
event.preventDefault();
|
|
22
22
|
return [];
|
|
23
23
|
};
|
|
@@ -36,6 +36,8 @@ export const CustomTextInput = (props) => {
|
|
|
36
36
|
else
|
|
37
37
|
return validated;
|
|
38
38
|
}
|
|
39
|
+
if (isRequired && isEmpty(value))
|
|
40
|
+
return 'error';
|
|
39
41
|
};
|
|
40
|
-
return (React.createElement(TextInput, Object.assign({}, rest, { isRequired: isRequired, className: className, type: type, maxLength: maxLength, value: value, isDisabled: isDisabled, "aria-label": props['aria-label'], placeholder: placeholder, onChange: onTextInputChange, validated: validatedCheck(), name: name })));
|
|
42
|
+
return (React.createElement(TextInput, Object.assign({}, rest, { isRequired: isRequired, className: className, type: type, maxLength: maxLength, value: value, isDisabled: isDisabled, "aria-label": props['aria-label'], placeholder: placeholder, onChange: (event, value) => onTextInputChange(value, event), validated: validatedCheck(), name: name })));
|
|
41
43
|
};
|
|
@@ -48,7 +48,7 @@ function Dropdown(props) {
|
|
|
48
48
|
};
|
|
49
49
|
const isSelectedItem = props.isSelectedItem || isSelectedItemLocal;
|
|
50
50
|
const getListItemClassNames = (downshift, item, itemIndex) => {
|
|
51
|
-
let toReturn = 'downshift-item pf-c-select__menu-item';
|
|
51
|
+
let toReturn = 'downshift-item pf-v5-c-select__menu-item';
|
|
52
52
|
toReturn += item.additionalInfo ? ' pf-m-description' : '';
|
|
53
53
|
toReturn += isSelectedItem(item) ? ' pf-m-selected' : '';
|
|
54
54
|
toReturn += item.disabled ? ' pf-m-disabled' : '';
|
|
@@ -70,7 +70,7 @@ function Dropdown(props) {
|
|
|
70
70
|
optionsToRender = props.paginate ? optionsToRender.slice(0, resultsShown) : optionsToRender;
|
|
71
71
|
optionsToRender.filter((item) => !item.isNotSearchable).length === 0 &&
|
|
72
72
|
props.emptyListLabel &&
|
|
73
|
-
listToRender.push(React.createElement("li", { key: "empty-label", className: "pf-u-p-sm" },
|
|
73
|
+
listToRender.push(React.createElement("li", { key: "empty-label", className: "pf-v5-u-p-sm" },
|
|
74
74
|
React.createElement(Trans, null, props.emptyListLabel)));
|
|
75
75
|
listToRender.push(...map(optionsToRender, (item, index) => {
|
|
76
76
|
const itemProps = item.isNonActionable
|
|
@@ -81,26 +81,26 @@ function Dropdown(props) {
|
|
|
81
81
|
disabled: item.disabled,
|
|
82
82
|
className: getListItemClassNames(downshift, item, index),
|
|
83
83
|
});
|
|
84
|
-
return (React.createElement("li", { className: item.actionItem ? 'pf-c-select__menu-wrapper' : '', role: "presentation", key: `${index}-${props.id}-${itemToString(item)}` },
|
|
84
|
+
return (React.createElement("li", { className: item.actionItem ? 'pf-v5-c-select__menu-wrapper' : '', role: "presentation", key: `${index}-${props.id}-${itemToString(item)}` },
|
|
85
85
|
item.isNonActionable ? (isEmpty(item.children) ? itemToString(item) : item.children) : null,
|
|
86
86
|
props.multiSelect && !item.isNotSelectable && !item.isNonActionable && (React.createElement("div", Object.assign({}, itemProps),
|
|
87
|
-
React.createElement("div", { className: item.additionalInfo ? 'pf-c-select__menu-item-main' : '' },
|
|
88
|
-
React.createElement("input", { disabled: item.disabled === true, className: "pf-c-check__input pf-u-mr-sm", checked: isSelectedItem(item), onChange: noop, type: "checkbox" }),
|
|
87
|
+
React.createElement("div", { className: item.additionalInfo ? 'pf-v5-c-select__menu-item-main' : '' },
|
|
88
|
+
React.createElement("input", { disabled: item.disabled === true, className: "pf-v5-c-check__input pf-v5-u-mr-sm", checked: isSelectedItem(item), onChange: noop, type: "checkbox" }),
|
|
89
89
|
isEmpty(item.children) ? itemToString(item) : item.children),
|
|
90
|
-
item.additionalInfo && (React.createElement("div", { className: "pf-c-select__menu-item-description" }, item.additionalInfo)))),
|
|
90
|
+
item.additionalInfo && (React.createElement("div", { className: "pf-v5-c-select__menu-item-description" }, item.additionalInfo)))),
|
|
91
91
|
!props.multiSelect && !item.isNonActionable && (React.createElement("button", Object.assign({}, itemProps, { type: "button", title: itemToString(item) }),
|
|
92
|
-
React.createElement("div", { className: item.additionalInfo ? 'pf-c-select__menu-item-main' : '' },
|
|
92
|
+
React.createElement("div", { className: item.additionalInfo ? 'pf-v5-c-select__menu-item-main' : '' },
|
|
93
93
|
isEmpty(item.children) ? itemToString(item) : item.children,
|
|
94
|
-
isSelectedItem(item) && (React.createElement("span", { className: "pf-c-select__menu-item-icon" },
|
|
94
|
+
isSelectedItem(item) && (React.createElement("span", { className: "pf-v5-c-select__menu-item-icon" },
|
|
95
95
|
React.createElement(CheckIcon, { "aria-hidden": true })))),
|
|
96
|
-
item.additionalInfo && (React.createElement("div", { className: "pf-c-select__menu-item-description" }, item.additionalInfo)))),
|
|
96
|
+
item.additionalInfo && (React.createElement("div", { className: "pf-v5-c-select__menu-item-description" }, item.additionalInfo)))),
|
|
97
97
|
item.actionItem ? React.cloneElement(item.actionItem, { disabled: item.disabled }) : null));
|
|
98
98
|
}));
|
|
99
99
|
shouldPaginate &&
|
|
100
100
|
listToRender.push(...[
|
|
101
101
|
React.createElement("li", { key: "separator", className: "dropdown-divider", role: "separator" }),
|
|
102
102
|
React.createElement("li", { key: "pagination-item", className: "downshift-pagination-item" },
|
|
103
|
-
React.createElement("button", { type: "button", onClick: (e) => onPaginatonButtonClick(e, downshift), className: "pf-c-button pf-m-link pf-m-block", disabled: props.isLoadingList },
|
|
103
|
+
React.createElement("button", { type: "button", onClick: (e) => onPaginatonButtonClick(e, downshift), className: "pf-v5-c-button pf-m-link pf-m-block", disabled: props.isLoadingList },
|
|
104
104
|
React.createElement(Trans, null, props.paginationBtnText))),
|
|
105
105
|
]);
|
|
106
106
|
return listToRender;
|
|
@@ -9,11 +9,11 @@ export default function DropdownWrapper(props) {
|
|
|
9
9
|
event.nativeEvent.preventDownshiftDefault = true;
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
|
-
return (React.createElement("div", { id: `${props.id}`, className: `downshift ${props.className} pf-c-select ${props.isOpen ? 'pf-m-expanded' : ''} `, "data-tracking-id": props['data-tracking-id'] ? props['data-tracking-id'] : null },
|
|
12
|
+
return (React.createElement("div", { id: `${props.id}`, className: `downshift ${props.className} pf-v5-c-select ${props.isOpen ? 'pf-m-expanded' : ''} `, "data-tracking-id": props['data-tracking-id'] ? props['data-tracking-id'] : null },
|
|
13
13
|
props.label && React.createElement("label", Object.assign({}, props.getLabelProps()), props.label),
|
|
14
14
|
props.toggleMenuComponent,
|
|
15
15
|
React.createElement("ul", Object.assign({}, props.getMenuProps({
|
|
16
16
|
onBlur: onBlur,
|
|
17
|
-
className: `downshift-menu pf-c-select__menu ${props.hasTwoColumns ? 'column-selector-menu' : ''} ${props.isOpen ? 'open' : ''}`,
|
|
17
|
+
className: `downshift-menu pf-v5-c-select__menu ${props.hasTwoColumns ? 'column-selector-menu' : ''} ${props.isOpen ? 'open' : ''}`,
|
|
18
18
|
})), props.children)));
|
|
19
19
|
}
|
|
@@ -68,12 +68,12 @@ export default function SearchableList(props) {
|
|
|
68
68
|
props.onInputBlur && props.onInputBlur(e);
|
|
69
69
|
};
|
|
70
70
|
const renderSearchableToggleButton = () => {
|
|
71
|
-
return (React.createElement("div", Object.assign({}, downshift.getComboboxProps({ className: 'pf-c-select__toggle pf-m-typeahead' })),
|
|
72
|
-
React.createElement("div", { className: "pf-c-select__toggle-wrapper" },
|
|
71
|
+
return (React.createElement("div", Object.assign({}, downshift.getComboboxProps({ className: 'pf-v5-c-select__toggle pf-m-typeahead' })),
|
|
72
|
+
React.createElement("div", { className: "pf-v5-c-select__toggle-wrapper" },
|
|
73
73
|
props.chipGroupComponent,
|
|
74
74
|
React.createElement("input", Object.assign({}, getInputProps({
|
|
75
75
|
placeholder: props.placeholder,
|
|
76
|
-
className: `pf-c-form-control pf-c-select__toggle-typeahead`,
|
|
76
|
+
className: `pf-v5-c-form-control pf-v5-c-select__toggle-typeahead`,
|
|
77
77
|
id: `${props.id}-downshift-search`,
|
|
78
78
|
'aria-invalid': props.isInValid,
|
|
79
79
|
'aria-required': props.required,
|
|
@@ -85,11 +85,11 @@ export default function SearchableList(props) {
|
|
|
85
85
|
React.createElement(LoadingIndicator, { isInline: true, show: props.isLoadingList }),
|
|
86
86
|
!isEmpty(downshift.inputValue) &&
|
|
87
87
|
!props.isLoadingList &&
|
|
88
|
-
(!props.isExportingPDF ? (React.createElement("button", { className: "pf-c-button pf-m-plain pf-c-select__toggle-clear", onClick: clearSelection(), "aria-label": "clear selection", type: "button", title: "Clear selection", disabled: props.disabled, "data-tracking-id": `${props['data-tracking-id']}-clear` },
|
|
88
|
+
(!props.isExportingPDF ? (React.createElement("button", { className: "pf-v5-c-button pf-m-plain pf-v5-c-select__toggle-clear", onClick: clearSelection(), "aria-label": "clear selection", type: "button", title: "Clear selection", disabled: props.disabled, "data-tracking-id": `${props['data-tracking-id']}-clear` },
|
|
89
89
|
React.createElement(TimesCircleIcon, null))) : null),
|
|
90
90
|
!props.hideToggleButton && (React.createElement("button", Object.assign({ type: "button" }, getToggleButtonProps({
|
|
91
91
|
disabled: props.disabled || props.isLoadingList,
|
|
92
|
-
className: 'pf-c-button pf-c-select__toggle-button pf-m-plain',
|
|
92
|
+
className: 'pf-v5-c-button pf-v5-c-select__toggle-button pf-m-plain',
|
|
93
93
|
onClick: props.onMenuToggle ? () => props.onMenuToggle() : noop,
|
|
94
94
|
})),
|
|
95
95
|
React.createElement(CaretDownIcon, null)))));
|
|
@@ -16,7 +16,7 @@ export default function SelectList(props) {
|
|
|
16
16
|
var _a;
|
|
17
17
|
return (React.createElement("button", Object.assign({ type: "button" }, getToggleButtonProps({
|
|
18
18
|
id: `${props.id}-toggle`,
|
|
19
|
-
className: `pf-c-select__toggle ${props.isInValid ? 'form-invalid' : ''}`,
|
|
19
|
+
className: `pf-v5-c-select__toggle ${props.isInValid ? 'form-invalid' : ''}`,
|
|
20
20
|
disabled: props.disabled || props.isLoadingList,
|
|
21
21
|
'aria-label': `${isOpen ? 'Close ' + props.title : 'Open ' + props.title}`,
|
|
22
22
|
'aria-invalid': props.isInValid,
|
|
@@ -25,10 +25,10 @@ export default function SelectList(props) {
|
|
|
25
25
|
'data-tracking-id': (_a = props['data-tracking-id']) !== null && _a !== void 0 ? _a : '',
|
|
26
26
|
onClick: props.onMenuToggle ? () => props.onMenuToggle() : noop,
|
|
27
27
|
})),
|
|
28
|
-
React.createElement("div", { className: "pf-c-select__toggle-wrapper" },
|
|
29
|
-
React.createElement("span", { className: "pf-c-select__toggle-text" }, itemToString(props.selectedItem) || (React.createElement("span", { className: "pf-c-select__placeholder-text" }, props.placeholder)))),
|
|
28
|
+
React.createElement("div", { className: "pf-v5-c-select__toggle-wrapper" },
|
|
29
|
+
React.createElement("span", { className: "pf-v5-c-select__toggle-text" }, itemToString(props.selectedItem) || (React.createElement("span", { className: "pf-v5-c-select__placeholder-text" }, props.placeholder)))),
|
|
30
30
|
React.createElement(LoadingIndicator, { isInline: true, show: props.isLoadingList }),
|
|
31
|
-
!props.isLoadingList && (React.createElement("span", { className: "pf-c-select__toggle-arrow" },
|
|
31
|
+
!props.isLoadingList && (React.createElement("span", { className: "pf-v5-c-select__toggle-arrow" },
|
|
32
32
|
React.createElement(CaretDownIcon, null)))));
|
|
33
33
|
};
|
|
34
34
|
return (React.createElement(DropdownWrapper, { id: props.id, className: props.className, label: props.label, isOpen: isOpen, getMenuProps: getMenuProps, getLabelProps: getLabelProps, toggleMenuComponent: renderToggleButton(), "data-tracking-id": props['data-tracking-id'], hasTwoColumns: props.hasTwoColumns }, isOpen && props.renderListItems(downshift)));
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
position: relative;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.downshift
|
|
5
|
+
.downshift input {
|
|
6
|
+
border: none;
|
|
7
|
+
padding: 6px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.downshift > .pf-v5-c-select__toggle.form-invalid {
|
|
6
11
|
border-bottom: 2px solid #c9190b;
|
|
7
12
|
}
|
|
8
13
|
|
|
9
|
-
.downshift > .pf-c-select__toggle.form-invalid[disabled] {
|
|
14
|
+
.downshift > .pf-v5-c-select__toggle.form-invalid[disabled] {
|
|
10
15
|
background-color: #ededed;
|
|
11
16
|
border-color: #ededed;
|
|
12
17
|
}
|
|
@@ -28,15 +33,15 @@
|
|
|
28
33
|
border-top: 1px solid #e9ecef;
|
|
29
34
|
}
|
|
30
35
|
|
|
31
|
-
.downshift .pf-c-select__placeholder-text {
|
|
36
|
+
.downshift .pf-v5-c-select__placeholder-text {
|
|
32
37
|
color: #6a6e73;
|
|
33
38
|
}
|
|
34
39
|
|
|
35
|
-
.downshift .pf-c-select__menu-wrapper {
|
|
40
|
+
.downshift .pf-v5-c-select__menu-wrapper {
|
|
36
41
|
display: flex;
|
|
37
42
|
}
|
|
38
43
|
|
|
39
|
-
.downshift .pf-c-select__menu-wrapper:hover {
|
|
44
|
+
.downshift .pf-v5-c-select__menu-wrapper:hover {
|
|
40
45
|
background-color: rgb(240, 240, 240);
|
|
41
46
|
}
|
|
42
47
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundaryFallbackComponent.d.ts","sourceRoot":"","sources":["../../../src/ErrorBoundary/ErrorBoundaryFallbackComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorBoundaryFallbackComponent.d.ts","sourceRoot":"","sources":["../../../src/ErrorBoundary/ErrorBoundaryFallbackComponent.tsx"],"names":[],"mappings":"AAeA,MAAM,WAAW,aAAa;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,MAAO,SAAQ,aAAa;IAClC,gBAAgB,EAAE,OAAO,CAAC;CAC7B;AASD,iBAAS,8BAA8B,CAAC,KAAK,EAAE,MAAM,eA+BpD;kBA/BQ,8BAA8B;;;AAkCvC,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bullseye, EmptyState, EmptyStateBody, EmptyStateIcon, EmptyStateVariant,
|
|
1
|
+
import { Bullseye, EmptyState, EmptyStateBody, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, } from '@patternfly/react-core';
|
|
2
2
|
import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
|
|
3
3
|
import dangerColor from '@patternfly/react-tokens/dist/js/global_danger_color_200';
|
|
4
4
|
import infoColor from '@patternfly/react-tokens/dist/js/global_info_color_200';
|
|
@@ -25,9 +25,8 @@ function ErrorBoundaryFallbackComponent(props) {
|
|
|
25
25
|
};
|
|
26
26
|
return (React.createElement("div", { className: props.isPageLevelError ? 'container' : '' },
|
|
27
27
|
React.createElement(Bullseye, null,
|
|
28
|
-
React.createElement(EmptyState, { variant: EmptyStateVariant.
|
|
29
|
-
React.createElement(EmptyStateIcon, { icon: ExclamationCircleIcon, color: props.isPageLevelError ? getIconColor() : warningColor.value }),
|
|
30
|
-
React.createElement(Title, { headingLevel: "h2", size: "lg" }, t(props.title)),
|
|
28
|
+
React.createElement(EmptyState, { variant: EmptyStateVariant.sm },
|
|
29
|
+
React.createElement(EmptyStateHeader, { titleText: React.createElement(React.Fragment, null, t(props.title)), icon: React.createElement(EmptyStateIcon, { icon: ExclamationCircleIcon, color: props.isPageLevelError ? getIconColor() : warningColor.value }), headingLevel: "h2" }),
|
|
31
30
|
React.createElement(EmptyStateBody, null, t(props.message))))));
|
|
32
31
|
}
|
|
33
32
|
ErrorBoundaryFallbackComponent.defaultProps = defaultProps;
|
|
@@ -116,7 +116,7 @@ function NewInlineEdit(props) {
|
|
|
116
116
|
!props.content && !isEditing ? renderEditButton() : null))),
|
|
117
117
|
renderSaveCancel(),
|
|
118
118
|
props.hideSaveCancel && isEditing && (React.createElement("span", { className: `
|
|
119
|
-
${props.charCount > props.charTotal ? 'char-count pf-u-danger-color-100' : 'char-count'}` }, props.charCount ? showCount : null)),
|
|
119
|
+
${props.charCount > props.charTotal ? 'char-count pf-v5-u-danger-color-100' : 'char-count'}` }, props.charCount ? showCount : null)),
|
|
120
120
|
canShowContent && !props.usePreformattedTag && (React.createElement(React.Fragment, null,
|
|
121
121
|
React.createElement("p", { id: props.inputId, style: { display: props.hideLabel ? 'inline' : 'block' } },
|
|
122
122
|
props.content,
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
.char-count {
|
|
33
33
|
float: right;
|
|
34
34
|
position: relative;
|
|
35
|
-
padding-right: var(--pf-global--spacer--4xl);
|
|
36
|
-
margin-right: var(--pf-global--spacer--lg);
|
|
35
|
+
padding-right: var(--pf-v5-global--spacer--4xl);
|
|
36
|
+
margin-right: var(--pf-v5-global--spacer--lg);
|
|
37
37
|
font-size: 12px;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
@media (max-width: 415px) {
|
|
41
41
|
.char-count {
|
|
42
|
-
padding-right: var(--pf-global--spacer--2xl);
|
|
42
|
+
padding-right: var(--pf-v5-global--spacer--2xl);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -13,7 +13,7 @@ function LoadingDots(props) {
|
|
|
13
13
|
React.createElement("span", null, ".")),
|
|
14
14
|
React.createElement("p", { className: "sr-only" },
|
|
15
15
|
React.createElement(Trans, null, "Loading...")))),
|
|
16
|
-
props.message && props.show && React.createElement("p", { className: "pf-u-text-align-center pf-u-my-md" }, props.message)));
|
|
16
|
+
props.message && props.show && React.createElement("p", { className: "pf-v5-u-text-align-center pf-v5-u-my-md" }, props.message)));
|
|
17
17
|
}
|
|
18
18
|
LoadingDots.defaultProps = defaultProps;
|
|
19
19
|
export { LoadingDots };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownEditor.d.ts","sourceRoot":"","sources":["../../../src/MarkdownEditor/MarkdownEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAwB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"MarkdownEditor.d.ts","sourceRoot":"","sources":["../../../src/MarkdownEditor/MarkdownEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAwB,MAAM,qBAAqB,CAAC;AAwB7E,OAAO,KAAK,EAAE,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAKtE,oBAAY,UAAU;IAClB,KAAK,cAAc;IACnB,QAAQ,aAAa;CACxB;AAED,UAAU,kBAAkB;IACxB,yBAAyB,EAAE,OAAO,CAAC;IACnC,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;IAClC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACnD,gBAAgB,EAAE,CAAC,IAAI,KAAA,KAAK,IAAI,CAAC;IACjC,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IAChD,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,KAAK,CAAC;IACtG,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAClD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yBAAyB,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,iBAAiB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACnD;AAuBD,iBAAS,cAAc,CAAC,KAAK,EAAE,cAAc,eAsmB5C;kBAtmBQ,cAAc;;;AA0mBvB,OAAO,EAAE,cAAc,EAAE,CAAC"}
|