@rh-support/components 2.1.23 → 2.1.26

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 (88) hide show
  1. package/README.md +2 -0
  2. package/lib/cjs/CustomTextInput/CustomTextInput.d.ts +2 -0
  3. package/lib/cjs/CustomTextInput/CustomTextInput.d.ts.map +1 -1
  4. package/lib/cjs/CustomTextInput/CustomTextInput.js +4 -2
  5. package/lib/cjs/DropDownList/DropDownList.js +10 -10
  6. package/lib/cjs/DropDownList/DropdownWrapper.js +2 -2
  7. package/lib/cjs/DropDownList/SearchableList.js +5 -5
  8. package/lib/cjs/DropDownList/SelectList.js +4 -4
  9. package/lib/cjs/DropDownList/dropdownList.css +10 -5
  10. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
  11. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.js +2 -3
  12. package/lib/cjs/InlineEdit/NewInlineEdit.js +1 -1
  13. package/lib/cjs/InlineEdit/newInlineEdit.css +3 -3
  14. package/lib/cjs/LoadingDots/LoadingDots.js +1 -1
  15. package/lib/cjs/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
  16. package/lib/cjs/MarkdownEditor/MarkdownEditor.js +11 -10
  17. package/lib/cjs/MarkdownEditor/markdownEditor.css +1 -1
  18. package/lib/cjs/PaginationCompact/PaginationCompact.js +4 -4
  19. package/lib/cjs/PaginationCompact/paginationCompact.css +1 -1
  20. package/lib/cjs/PhoneInput/PhoneInput.d.ts.map +1 -1
  21. package/lib/cjs/PhoneInput/PhoneInput.js +10 -7
  22. package/lib/cjs/PhoneInput/PhoneInput.scss +1 -1
  23. package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.js +12 -12
  24. package/lib/cjs/Table/PFTable.d.ts +2 -1
  25. package/lib/cjs/Table/PFTable.d.ts.map +1 -1
  26. package/lib/cjs/Table/PFTable.js +7 -7
  27. package/lib/cjs/Table/columnSelector.css +1 -1
  28. package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
  29. package/lib/cjs/TermsAndConditions/AcceptTermsModal.js +6 -5
  30. package/lib/cjs/TextAreaResizable/TextAreaResizable.d.ts.map +1 -1
  31. package/lib/cjs/TextAreaResizable/TextAreaResizable.js +1 -1
  32. package/lib/cjs/ToastNotification/toastNotification.css +1 -1
  33. package/lib/cjs/TopContentSearch/TopContentSearch.d.ts.map +1 -1
  34. package/lib/cjs/TopContentSearch/TopContentSearch.js +6 -5
  35. package/lib/cjs/helperFunctions/errorMessage.js +2 -2
  36. package/lib/cjs/helperFunctions/errorMessage.scss +1 -1
  37. package/lib/cjs/hooks/index.d.ts +1 -0
  38. package/lib/cjs/hooks/index.d.ts.map +1 -1
  39. package/lib/cjs/hooks/index.js +1 -0
  40. package/lib/cjs/hooks/useBreakpoint.d.ts.map +1 -1
  41. package/lib/cjs/hooks/useBreakpoint.js +1 -0
  42. package/lib/cjs/hooks/useSelectKeyboardNavigator.d.ts +13 -0
  43. package/lib/cjs/hooks/useSelectKeyboardNavigator.d.ts.map +1 -0
  44. package/lib/cjs/hooks/useSelectKeyboardNavigator.js +55 -0
  45. package/lib/esm/CustomTextInput/CustomTextInput.d.ts +2 -0
  46. package/lib/esm/CustomTextInput/CustomTextInput.d.ts.map +1 -1
  47. package/lib/esm/CustomTextInput/CustomTextInput.js +4 -2
  48. package/lib/esm/DropDownList/DropDownList.js +10 -10
  49. package/lib/esm/DropDownList/DropdownWrapper.js +2 -2
  50. package/lib/esm/DropDownList/SearchableList.js +5 -5
  51. package/lib/esm/DropDownList/SelectList.js +4 -4
  52. package/lib/esm/DropDownList/dropdownList.css +10 -5
  53. package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
  54. package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.js +3 -4
  55. package/lib/esm/InlineEdit/NewInlineEdit.js +1 -1
  56. package/lib/esm/InlineEdit/newInlineEdit.css +3 -3
  57. package/lib/esm/LoadingDots/LoadingDots.js +1 -1
  58. package/lib/esm/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
  59. package/lib/esm/MarkdownEditor/MarkdownEditor.js +9 -8
  60. package/lib/esm/MarkdownEditor/markdownEditor.css +1 -1
  61. package/lib/esm/PaginationCompact/PaginationCompact.js +4 -4
  62. package/lib/esm/PaginationCompact/paginationCompact.css +1 -1
  63. package/lib/esm/PhoneInput/PhoneInput.d.ts.map +1 -1
  64. package/lib/esm/PhoneInput/PhoneInput.js +10 -7
  65. package/lib/esm/PhoneInput/PhoneInput.scss +1 -1
  66. package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.js +13 -13
  67. package/lib/esm/Table/PFTable.d.ts +2 -1
  68. package/lib/esm/Table/PFTable.d.ts.map +1 -1
  69. package/lib/esm/Table/PFTable.js +6 -6
  70. package/lib/esm/Table/columnSelector.css +1 -1
  71. package/lib/esm/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
  72. package/lib/esm/TermsAndConditions/AcceptTermsModal.js +7 -6
  73. package/lib/esm/TextAreaResizable/TextAreaResizable.d.ts.map +1 -1
  74. package/lib/esm/TextAreaResizable/TextAreaResizable.js +1 -1
  75. package/lib/esm/ToastNotification/toastNotification.css +1 -1
  76. package/lib/esm/TopContentSearch/TopContentSearch.d.ts.map +1 -1
  77. package/lib/esm/TopContentSearch/TopContentSearch.js +6 -5
  78. package/lib/esm/helperFunctions/errorMessage.js +2 -2
  79. package/lib/esm/helperFunctions/errorMessage.scss +1 -1
  80. package/lib/esm/hooks/index.d.ts +1 -0
  81. package/lib/esm/hooks/index.d.ts.map +1 -1
  82. package/lib/esm/hooks/index.js +1 -0
  83. package/lib/esm/hooks/useBreakpoint.d.ts.map +1 -1
  84. package/lib/esm/hooks/useBreakpoint.js +1 -0
  85. package/lib/esm/hooks/useSelectKeyboardNavigator.d.ts +13 -0
  86. package/lib/esm/hooks/useSelectKeyboardNavigator.d.ts.map +1 -0
  87. package/lib/esm/hooks/useSelectKeyboardNavigator.js +51 -0
  88. package/package.json +10 -12
@@ -11,7 +11,8 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import './markdownEditor.css';
13
13
  import { parseCommentMarkdown } from '@cee-eng/ui-toolkit';
14
- import { Button, ButtonVariant, Dropdown, DropdownItem, DropdownSeparator, DropdownToggle, Flex, FlexItem, Spinner, Text, TextVariants, Toolbar, ToolbarGroup, ToolbarItem, } from '@patternfly/react-core';
14
+ import { Button, ButtonVariant, Flex, FlexItem, Spinner, Text, TextVariants, Toolbar, ToolbarGroup, ToolbarItem, } from '@patternfly/react-core';
15
+ import { Dropdown, DropdownItem, DropdownSeparator, DropdownToggle } from '@patternfly/react-core/deprecated';
15
16
  import CodeIcon from '@patternfly/react-icons/dist/js/icons/code-icon';
16
17
  import ImageIcon from '@patternfly/react-icons/dist/js/icons/image-icon';
17
18
  import LinkIcon from '@patternfly/react-icons/dist/js/icons/link-icon';
@@ -122,7 +123,7 @@ function MarkdownEditor(props) {
122
123
  React.createElement(Flex, { flexWrap: { default: 'nowrap' } },
123
124
  React.createElement(FlexItem, null,
124
125
  React.createElement(Text, { component: TextVariants.small }, file.fileName)),
125
- onFileDelete && (React.createElement(FlexItem, { className: "pf-u-ml-auto" },
126
+ onFileDelete && (React.createElement(FlexItem, { className: "pf-v5-u-ml-auto" },
126
127
  React.createElement(Button, { variant: ButtonVariant.plain, onClick: (event) => {
127
128
  onFileSelectToggle(false);
128
129
  onFileDelete(file);
@@ -360,7 +361,7 @@ function MarkdownEditor(props) {
360
361
  props.disabled && isPreview && setIsPreview(false);
361
362
  const disablePreviewButton = mdValue === '';
362
363
  return (React.createElement("div", { className: `markdown-editor-container ${props.className}`, id: props.id, "data-tracking-id": "md-editor-container", onDrop: onDrop, onPaste: onPaste },
363
- React.createElement("div", { className: "toolbar-container border-bottom" }, !isPlainModeEnabled && (React.createElement(Toolbar, { className: "pf-l-flex" },
364
+ React.createElement("div", { className: "toolbar-container border-bottom" }, !isPlainModeEnabled && (React.createElement(Toolbar, { className: "pf-v5-l-flex" },
364
365
  React.createElement(ToolbarGroup, { "data-tracking-id": "md-editor-toolbar", className: "markdown-toolbar-left-section pf-m-wrap" },
365
366
  React.createElement(Button, { variant: ButtonVariant.plain, tabIndex: -1, isDisabled: props.disabled || isPreview, onClick: bold, "data-tracking-id": "md-editor-toolbar-b", title: "Bold" }, "B"),
366
367
  React.createElement(Button, { variant: ButtonVariant.plain, tabIndex: -1, isDisabled: props.disabled || isPreview, onClick: italic, "data-tracking-id": "md-editor-toolbar-i", title: "Italic" }, "I"),
@@ -379,17 +380,17 @@ function MarkdownEditor(props) {
379
380
  React.createElement(QuoteRightIcon, null)),
380
381
  React.createElement(Button, { tabIndex: -1, variant: ButtonVariant.plain, isDisabled: props.disabled || isPreview, onClick: code, title: "Code", "data-tracking-id": "md-editor-toolbar-code" },
381
382
  React.createElement(CodeIcon, null)),
382
- showFileSelectorInToolbar && (React.createElement(Dropdown, { onSelect: onFileSelectLocal, id: "md-editor-toolbar-file-selector", toggle: React.createElement(DropdownToggle, { onToggle: onFileSelectToggle, isDisabled: props.disabled || isPreview },
383
+ showFileSelectorInToolbar && (React.createElement(Dropdown, { onSelect: onFileSelectLocal, id: "md-editor-toolbar-file-selector", toggle: React.createElement(DropdownToggle, { onToggle: (_event, isOpen) => onFileSelectToggle(isOpen), isDisabled: props.disabled || isPreview },
383
384
  React.createElement(ImageIcon, null)), dropdownItems: getFileSelectorList(), tabIndex: -1, isPlain: true, menuAppendTo: document.body, isOpen: isFileSelectorOpen, "data-tracking-id": "md-editor-toolbar-file-selector" }))),
384
385
  React.createElement(ToolbarItem, null,
385
- React.createElement("a", { className: "pf-c-button pf-m-link pf-m-inline markdown-guidance", rel: "noopener noreferrer", target: "_blank", href: "/articles/4729621", "data-tracking-id": "md-guidance" },
386
+ React.createElement("a", { className: "pf-v5-c-button pf-m-link pf-m-inline markdown-guidance", rel: "noopener noreferrer", target: "_blank", href: "/articles/4729621", "data-tracking-id": "md-guidance" },
386
387
  React.createElement(Trans, null, "Markdown guidance")))))),
387
388
  React.createElement("div", { className: "markdown-content" }, !isPreview ? (React.createElement("textarea", Object.assign({}, textAreaProps, { onKeyDown: keydown, placeholder: isPlainModeEnabled ? t(props.plainTextPlaceholder) : t(props.mdPlaceholder), ref: bindTextAreaRef, className: cx('form-control', 'markdown-text-area', props.textAreaClassName, 'textArea'), value: mdValue, onChange: textChanged, rows: props.rows || contentRows, style: { height: '313px' } }))) : (React.createElement("div", { className: "markdown-preview-placeholder", style: { height: '313px' } },
388
389
  React.createElement("div", { className: "markdown-preview", style: { maxHeight: '313px' } },
389
390
  React.createElement("div", { dangerouslySetInnerHTML: {
390
391
  __html: DOMPurify.sanitize(previewMDText(mdValue)),
391
392
  } }))))),
392
- React.createElement("div", null, props.showMarkdownPlainTextToggle && (React.createElement("div", { className: `markdown-toggle-toolbar pf-l-flex` },
393
+ React.createElement("div", null, props.showMarkdownPlainTextToggle && (React.createElement("div", { className: `markdown-toggle-toolbar pf-v5-l-flex` },
393
394
  React.createElement("span", { className: "markdown-toolbar-left-section" },
394
395
  !isPlainModeEnabled && (React.createElement(Button, { className: "markdown-preview-btn", tabIndex: -1, variant: ButtonVariant.link, onClick: preview, title: "Show preview", "data-tracking-id": `md-preview-${isPreview ? 'hide' : 'show'}`, isDisabled: disablePreviewButton }, isPreview ? (React.createElement("span", null,
395
396
  " ",
@@ -398,9 +399,9 @@ function MarkdownEditor(props) {
398
399
  t(showPreviewText))))),
399
400
  isUploadingFile && (React.createElement(React.Fragment, null,
400
401
  React.createElement(Trans, null,
401
- React.createElement("small", { className: "pf-u-pl-md" },
402
+ React.createElement("small", { className: "pf-v5-u-pl-md" },
402
403
  React.createElement(Trans, null, "Uploading File"))),
403
- React.createElement(Spinner, { className: "pf-u-ml-sm", size: "md" }))),
404
+ React.createElement(Spinner, { className: "pf-v5-u-ml-sm", size: "md" }))),
404
405
  mdValue.length > props.minCharsForCounter && getCharCountText(mdValue)),
405
406
  React.createElement("span", null,
406
407
  React.createElement(Button, { variant: "plain", className: isPlainModeEnabled ? 'markdown-active-mode' : '', onClick: () => onModeChange(true), isDisabled: isPlainModeEnabled || isUploadingFile, "data-tracking-id": "md-editor-plaintext" },
@@ -25,7 +25,7 @@
25
25
  overflow: hidden;
26
26
  }
27
27
 
28
- .markdown-editor-container .pf-c-toolbar {
28
+ .markdown-editor-container .pf-v5-c-toolbar {
29
29
  padding: 0.5rem;
30
30
  }
31
31
 
@@ -20,9 +20,9 @@ export function PaginationCompact({ maxPage, dataTrackingId, onPageChange }) {
20
20
  onPageChange(currentPage);
21
21
  // eslint-disable-next-line react-hooks/exhaustive-deps
22
22
  }, [currentPage]);
23
- return (React.createElement("div", { className: "pagination-compact pf-c-pagination pf-m-compact pf-m-bottom pf-u-ml-auto" },
24
- React.createElement("nav", { className: "pf-c-pagination__nav" },
25
- React.createElement("div", { className: "pf-c-pagination__nav-control pf-m-prev" },
23
+ return (React.createElement("div", { className: "pagination-compact pf-v5-c-pagination pf-m-compact pf-m-bottom pf-v5-u-ml-auto" },
24
+ React.createElement("nav", { className: "pf-v5-c-pagination__nav" },
25
+ React.createElement("div", { className: "pf-v5-c-pagination__nav-control pf-m-prev" },
26
26
  React.createElement(Button, { variant: ButtonVariant.plain, type: "button", "data-tracking-id": `${dataTrackingId}-previous`, onClick: onPreviousClick, isDisabled: currentPage === 1, "aria-label": "Go to previous page" },
27
27
  React.createElement(AngleLeftIcon, null))),
28
28
  React.createElement("div", { style: {
@@ -31,7 +31,7 @@ export function PaginationCompact({ maxPage, dataTrackingId, onPageChange }) {
31
31
  currentPage,
32
32
  " of ",
33
33
  maxPage),
34
- React.createElement("div", { className: "pf-c-pagination__nav-control pf-m-next" },
34
+ React.createElement("div", { className: "pf-v5-c-pagination__nav-control pf-m-next" },
35
35
  React.createElement(Button, { variant: ButtonVariant.plain, onClick: onNextClick, "data-tracking-id": `${dataTrackingId}-next`, isDisabled: currentPage === maxPage, type: "button", "aria-label": "Go to next page" },
36
36
  React.createElement(AngleRightIcon, null))))));
37
37
  }
@@ -1,4 +1,4 @@
1
- .pagination-compact.pf-c-pagination.pf-m-bottom {
1
+ .pagination-compact.pf-v5-c-pagination.pf-m-bottom {
2
2
  padding: 0px;
3
3
  background: none;
4
4
  box-shadow: none;
@@ -1 +1 @@
1
- {"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../src/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAU3B,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACtE,mBAAmB,CAAC,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,OAAO,KAAA,KAAK,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AA4DD,eAAO,MAAM,WAAW,gBAAiB,MAAM;;;CAqB9C,CAAC;AAEF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,eAiPvC"}
1
+ {"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../src/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAW3B,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACtE,mBAAmB,CAAC,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,OAAO,KAAA,KAAK,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AA4DD,eAAO,MAAM,WAAW,gBAAiB,MAAM;;;CAqB9C,CAAC;AAEF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,eAqPvC"}
@@ -1,5 +1,6 @@
1
1
  import './PhoneInput.scss';
2
- import { InputGroup, Select, SelectOption, SelectVariant, Spinner, TextInput } from '@patternfly/react-core';
2
+ import { InputGroup, InputGroupItem, Spinner, TextInput } from '@patternfly/react-core';
3
+ import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
3
4
  import isEmpty from 'lodash/isEmpty';
4
5
  import isEqual from 'lodash/isEqual';
5
6
  import React, { useEffect, useState } from 'react';
@@ -177,7 +178,7 @@ export function PhoneInput(props) {
177
178
  };
178
179
  const getOptions = (options) => {
179
180
  return options.map((country) => (React.createElement(SelectOption, { key: country.iso2, value: country },
180
- React.createElement("div", { className: "pf-u-display-inline-flex" },
181
+ React.createElement("div", { className: "pf-v5-u-display-inline-flex" },
181
182
  React.createElement("div", { className: `flag ${country.iso2}`, style: { marginRight: '8px' } }),
182
183
  country.name,
183
184
  " (+",
@@ -194,7 +195,7 @@ export function PhoneInput(props) {
194
195
  return getOptions(newOptions);
195
196
  };
196
197
  const placeholder = (React.createElement("div", { className: "phone-number-select-placeholder" },
197
- React.createElement("div", { className: "pf-u-display-inline-flex" },
198
+ React.createElement("div", { className: "pf-v5-u-display-inline-flex" },
198
199
  React.createElement("div", { className: `flag ${iso2}`, style: { marginRight: '5px' } }),
199
200
  iso2.toUpperCase())));
200
201
  useEffect(() => {
@@ -252,8 +253,10 @@ export function PhoneInput(props) {
252
253
  // eslint-disable-next-line react-hooks/exhaustive-deps
253
254
  }, [phoneValue]);
254
255
  return (React.createElement(InputGroup, { className: "phone-number-input" },
255
- React.createElement("div", null,
256
- React.createElement(Select, { variant: SelectVariant.single, "data-tracking-id": "case-phone-number-country-code", className: "phone-number-select", onToggle: onToggle, onSelect: onCountrySelect, isOpen: isOpen, placeholderText: iso2 && phoneValue !== '' ? placeholder : 'Country Code', onFilter: onFilter, hasInlineFilter: true, inlineFilterPlaceholderText: t('Search'), isDisabled: props.isDisabled }, getOptions(initializedCountries))),
257
- React.createElement(TextInput, { id: "case-phone-number", "data-tracking-id": "case-phone-number", placeholder: "55-555-5555", value: formattedNumber ? formattedNumber : phoneValue, onChange: onPhoneChange, validated: validations, isDisabled: props.isDisabled }),
258
- props.isLoading && React.createElement(Spinner, { isSVG: true, size: "lg", className: "pf-u-ml-2xl pf-u-mr-xl phone-spinner" })));
256
+ React.createElement(InputGroupItem, null,
257
+ React.createElement("div", null,
258
+ React.createElement(Select, { variant: SelectVariant.single, "data-tracking-id": "case-phone-number-country-code", className: "phone-number-select", onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onCountrySelect, isOpen: isOpen, placeholderText: iso2 && phoneValue !== '' ? placeholder : 'Country Code', onFilter: onFilter, hasInlineFilter: true, inlineFilterPlaceholderText: t('Search'), isDisabled: props.isDisabled }, getOptions(initializedCountries)))),
259
+ React.createElement(InputGroupItem, { style: { width: '100%' } },
260
+ React.createElement(TextInput, { id: "case-phone-number", "data-tracking-id": "case-phone-number", placeholder: "55-555-5555", value: formattedNumber ? formattedNumber : phoneValue, onChange: (_event, phone) => onPhoneChange(phone), validated: validations, isDisabled: props.isDisabled })),
261
+ props.isLoading && React.createElement(Spinner, { size: "lg", className: "pf-v5-u-ml-2xl pf-v5-u-mr-xl phone-spinner" })));
259
262
  }
@@ -734,7 +734,7 @@
734
734
  }
735
735
 
736
736
  .phone-number-select {
737
- .pf-c-select__menu {
737
+ .pf-v5-c-select__menu {
738
738
  min-width: 370px !important;
739
739
  }
740
740
  }
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { pcm } from '@cee-eng/hydrajs';
11
- import { Button, Modal, ModalVariant } from '@patternfly/react-core';
11
+ import { Button, Icon, Modal, ModalVariant } from '@patternfly/react-core';
12
12
  import OutlinedFrownIcon from '@patternfly/react-icons/dist/js/icons/outlined-frown-icon';
13
13
  import OutlinedFrownOpenIcon from '@patternfly/react-icons/dist/js/icons/outlined-frown-open-icon';
14
14
  import OutlinedGrinIcon from '@patternfly/react-icons/dist/js/icons/outlined-grin-icon';
@@ -88,27 +88,27 @@ function SupportFeedbackModal(props) {
88
88
  const sentiments = [
89
89
  {
90
90
  id: 'very_unsatisfied',
91
- icon: React.createElement(OutlinedFrownOpenIcon, { size: "lg" }),
91
+ icon: React.createElement(OutlinedFrownOpenIcon, null),
92
92
  label: 'Very Unsatisfied',
93
93
  },
94
94
  {
95
95
  id: 'unsatisfied',
96
- icon: React.createElement(OutlinedFrownIcon, { size: "lg" }),
96
+ icon: React.createElement(OutlinedFrownIcon, null),
97
97
  label: 'Unsatisfied',
98
98
  },
99
99
  {
100
100
  id: 'neutral',
101
- icon: React.createElement(OutlinedMehIcon, { size: "lg" }),
101
+ icon: React.createElement(OutlinedMehIcon, null),
102
102
  label: 'Neutral',
103
103
  },
104
104
  {
105
105
  id: 'satisfied',
106
- icon: React.createElement(OutlinedSmileIcon, { size: "lg" }),
106
+ icon: React.createElement(OutlinedSmileIcon, null),
107
107
  label: 'Satisfied',
108
108
  },
109
109
  {
110
110
  id: 'very_satisfied',
111
- icon: React.createElement(OutlinedGrinIcon, { size: "lg" }),
111
+ icon: React.createElement(OutlinedGrinIcon, null),
112
112
  label: 'Very Satisfied',
113
113
  },
114
114
  ];
@@ -116,22 +116,22 @@ function SupportFeedbackModal(props) {
116
116
  function renderModalBody() {
117
117
  return (React.createElement(React.Fragment, null,
118
118
  React.createElement("form", { className: "support-feedback-form", action: "", onSubmit: handleSubmit },
119
- React.createElement("fieldset", { className: "form-group radios feedback-satisfaction pf-u-mb-sm", role: "radiogroup", "aria-labelledby": "feedback-satisfaction-label" },
120
- React.createElement("legend", { id: "feedback-satisfaction-label", className: "pf-u-mb-md" },
119
+ React.createElement("fieldset", { className: "form-group radios feedback-satisfaction pf-v5-u-mb-sm", role: "radiogroup", "aria-labelledby": "feedback-satisfaction-label" },
120
+ React.createElement("legend", { id: "feedback-satisfaction-label", className: "pf-v5-u-mb-md" },
121
121
  React.createElement(Trans, null, "How satisfied are you with customer support\u2019s web experience?"),
122
122
  React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*"),
123
123
  ' '),
124
124
  React.createElement("div", { className: "satisfaction-values-wrapper" }, sentiments.map((sentiment) => {
125
- return (React.createElement("label", { className: `${sentiment.id} sentiment-label pf-u-ml-md pf-u-mr-md ${values.levelOfSatisfied === sentiment.label ? 'sentiment-selected' : ''}`, htmlFor: sentiment.id, key: sentiment.id },
126
- React.createElement("input", { type: "radio", id: sentiment.id, "aria-label": t(sentiment.label), disabled: isFetching, name: "levelOfSatisfied", value: sentiment.label, checked: values.levelOfSatisfied === sentiment.label, "aria-checked": values.levelOfSatisfied === sentiment.label, required: true, className: "feedback_button_values pf-u-mb-sm pf-screen-reader", onChange: handleSentimentChange }),
125
+ return (React.createElement("label", { className: `${sentiment.id} sentiment-label pf-v5-u-ml-md pf-v5-u-mr-md ${values.levelOfSatisfied === sentiment.label ? 'sentiment-selected' : ''}`, htmlFor: sentiment.id, key: sentiment.id },
126
+ React.createElement("input", { type: "radio", id: sentiment.id, "aria-label": t(sentiment.label), disabled: isFetching, name: "levelOfSatisfied", value: sentiment.label, checked: values.levelOfSatisfied === sentiment.label, "aria-checked": values.levelOfSatisfied === sentiment.label, required: true, className: "feedback_button_values pf-v5-u-mb-sm pf-screen-reader", onChange: handleSentimentChange }),
127
127
  ' ',
128
- sentiment.icon,
128
+ React.createElement(Icon, { size: "lg" }, sentiment.icon),
129
129
  React.createElement(Trans, null, sentiment.label)));
130
130
  })),
131
131
  isSubmitDisabled && (React.createElement("div", null,
132
132
  React.createElement("p", { className: "form-instructions form-invalid" },
133
133
  React.createElement(Trans, null, "Please select a value"))))),
134
- React.createElement("div", { className: "form-group pf-u-mb-md" },
134
+ React.createElement("div", { className: "form-group pf-v5-u-mb-md" },
135
135
  React.createElement("label", { htmlFor: "moreFeedback" },
136
136
  React.createElement(Trans, null, "How can we improve?")),
137
137
  React.createElement(TextAreaAutosize, { name: "moreInfo", id: "moreFeedback", placeholder: t('i18nDescribeSuggestionDetail', 'Describe your suggestion in detail'), disabled: isFetching, value: values.moreInfo, className: "form-control", onChange: handleFeedbackTextChange, rowsMin: 3 })),
@@ -140,7 +140,7 @@ function SupportFeedbackModal(props) {
140
140
  }
141
141
  function returnModalAction() {
142
142
  return [
143
- React.createElement(Button, { key: "confirm", onClick: handleSubmit, variant: "primary", isDisabled: isSubmitDisabled || isFetching, className: "pf-u-ml-xs", spinnerAriaValueText: isFetching ? 'Loading' : undefined, isLoading: isFetching, "data-tracking-id": "app-feedback-submit", "aria-label": t('Send feedback') },
143
+ React.createElement(Button, { key: "confirm", onClick: handleSubmit, variant: "primary", isDisabled: isSubmitDisabled || isFetching, className: "pf-v5-u-ml-xs", spinnerAriaValueText: isFetching ? 'Loading' : undefined, isLoading: isFetching, "data-tracking-id": "app-feedback-submit", "aria-label": t('Send feedback') },
144
144
  React.createElement(Trans, null, isFetching ? 'Sending feedback' : 'Send feedback')),
145
145
  React.createElement("button", { key: "cancel", onClick: handleModalToggle, className: "btn btn-app btn-link", "data-tracking-id": "app-feedback-cancel", "aria-label": "Cancel", disabled: isFetching },
146
146
  React.createElement(Trans, null, "Cancel")),
@@ -1,4 +1,5 @@
1
- import { IExtraData, IRow, IRowData, TableProps } from '@patternfly/react-table';
1
+ import { IExtraData, IRow, IRowData } from '@patternfly/react-table';
2
+ import { TableProps } from '@patternfly/react-table/deprecated';
2
3
  import { ReactNode } from 'react';
3
4
  interface IColumn {
4
5
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"PFTable.d.ts","sourceRoot":"","sources":["../../../src/Table/PFTable.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGH,UAAU,EACV,IAAI,EACJ,QAAQ,EAMR,UAAU,EAGb,MAAM,yBAAyB,CAAC;AACjC,OAAc,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAC;AA6C3E,UAAU,OAAO;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,IAAI,KAAA,KAAK,GAAG,CAAC;IACzB,UAAU,CAAC,EAAE,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,EAAE,aAAa,CAAC,KAAA,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAElD;;;OAGG;IACH,IAAI,CAAC,EAAE,CAAC,IAAI,KAAA,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAC1C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,KAAA,KAAK,GAAG,CAAC;IACzB,SAAS,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;CACpF;AAED,UAAU,SAAS;IACf,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,OAAO;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;CAC7B;AAED,UAAU,MAAO,SAAQ,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC7E,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,KAAK,KAAA,EAAE,GAAG,KAAA,EAAE,KAAK,KAAA,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,GAAG,MAAM,KAAK,GAAG,CAAC;IACnE,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACxC;AAGD,eAAO,MAAM,sBAAsB,gCAAoB,CAAC;AAExD,iBAAS,OAAO,CAAC,KAAK,EAAE,MAAM,eAyK7B;AAED,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"PFTable.d.ts","sourceRoot":"","sources":["../../../src/Table/PFTable.tsx"],"names":[],"mappings":"AASA,OAAO,EAGH,UAAU,EACV,IAAI,EACJ,QAAQ,EAKX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAiC,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAC/F,OAAc,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAC;AA8C3E,UAAU,OAAO;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,IAAI,KAAA,KAAK,GAAG,CAAC;IACzB,UAAU,CAAC,EAAE,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,EAAE,aAAa,CAAC,KAAA,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAElD;;;OAGG;IACH,IAAI,CAAC,EAAE,CAAC,IAAI,KAAA,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAC1C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,KAAA,KAAK,GAAG,CAAC;IACzB,SAAS,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;CACpF;AAED,UAAU,SAAS;IACf,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,OAAO;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;CAC7B;AAED,UAAU,MAAO,SAAQ,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC7E,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,KAAK,KAAA,EAAE,GAAG,KAAA,EAAE,KAAK,KAAA,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,GAAG,MAAM,KAAK,GAAG,CAAC;IACnE,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACxC;AAGD,eAAO,MAAM,sBAAsB,gCAAoB,CAAC;AAExD,iBAAS,OAAO,CAAC,KAAK,EAAE,MAAM,eAyK7B;AAED,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC"}
@@ -9,9 +9,10 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import { Bullseye, EmptyState, EmptyStateIcon, EmptyStateVariant, Spinner, Title } from '@patternfly/react-core';
12
+ import { Bullseye, EmptyState, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, Spinner, } from '@patternfly/react-core';
13
13
  import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
14
- import { cellWidth, classNames, sortable, SortByDirection, Table, TableBody, TableHeader, TableVariant, Visibility, } from '@patternfly/react-table';
14
+ import { cellWidth, classNames, sortable, SortByDirection, TableVariant, Visibility, } from '@patternfly/react-table';
15
+ import { Table, TableBody, TableHeader } from '@patternfly/react-table/deprecated';
15
16
  import React, { useCallback, useEffect, useState } from 'react';
16
17
  import { useTableContext } from './TableProvider';
17
18
  const noop = () => { };
@@ -22,9 +23,8 @@ const emptyStateRowDefault = [
22
23
  {
23
24
  props: { colSpan: 8 },
24
25
  title: (React.createElement(Bullseye, null,
25
- React.createElement(EmptyState, { variant: EmptyStateVariant.small },
26
- React.createElement(EmptyStateIcon, { icon: SearchIcon }),
27
- React.createElement(Title, { headingLevel: "h2", size: "lg" }, "No results found")))),
26
+ React.createElement(EmptyState, { variant: EmptyStateVariant.sm },
27
+ React.createElement(EmptyStateHeader, { titleText: "No results found", icon: React.createElement(EmptyStateIcon, { icon: SearchIcon }), headingLevel: "h2" })))),
28
28
  },
29
29
  ],
30
30
  },
@@ -36,7 +36,7 @@ const loadingRowDefault = [
36
36
  {
37
37
  props: { colSpan: 9 },
38
38
  title: (React.createElement(Bullseye, { style: { minHeight: '350px' } },
39
- React.createElement(EmptyState, { variant: EmptyStateVariant.small },
39
+ React.createElement(EmptyState, { variant: EmptyStateVariant.sm },
40
40
  React.createElement(Spinner, { size: "xl" })))),
41
41
  },
42
42
  ],
@@ -28,7 +28,7 @@
28
28
  cursor: not-allowed;
29
29
  }
30
30
 
31
- button.pf-c-button.column-selector-btn::after {
31
+ button.pf-v5-c-button.column-selector-btn::after {
32
32
  border: none;
33
33
  }
34
34
 
@@ -1 +1 @@
1
- {"version":3,"file":"AcceptTermsModal.d.ts","sourceRoot":"","sources":["../../../src/TermsAndConditions/AcceptTermsModal.tsx"],"names":[],"mappings":"AAmBA,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"}
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"}
@@ -8,7 +8,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { publicApi } from '@cee-eng/hydrajs';
11
- import { Button, ButtonVariant, Checkbox, Flex, FlexItem, Modal, ModalVariant, Select, SelectOption, } from '@patternfly/react-core';
11
+ import { Button, ButtonVariant, Checkbox, Flex, FlexItem, Modal, ModalVariant } from '@patternfly/react-core';
12
+ import { Select, SelectOption } from '@patternfly/react-core/deprecated';
12
13
  import React, { useEffect, useState } from 'react';
13
14
  import { Trans, useTranslation } from 'react-i18next';
14
15
  import { useFetch } from '../hooks';
@@ -70,24 +71,24 @@ export function AcceptTermsModal(props) {
70
71
  props.onConfirm(selectedTranslation.termsPdfId);
71
72
  };
72
73
  const onDropdownToggle = (toggle) => setisLangSelectorDropdownOpen(toggle);
73
- return (React.createElement(Modal, { variant: 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: [
74
+ return (React.createElement(Modal, { variant: 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: [
74
75
  React.createElement(Button, { key: "confirm", variant: ButtonVariant.primary, isDisabled: !termsAcked || props.isSubmitting || props.isDisabled, isLoading: props.isDisabled || props.isSubmitting, "data-tracking-id": `${props.dataTrackingId || props.eventCode}-terms-accept`, onClick: onSubmitClick },
75
76
  React.createElement(Trans, null, "Submit")),
76
77
  React.createElement(Button, { key: "cancel", isDisabled: props.isSubmitting || props.isDisabled, "data-tracking-id": `${props.dataTrackingId || props.eventCode}-terms-cancel`, variant: ButtonVariant.link, onClick: props.onModalClose },
77
78
  React.createElement(Trans, null, "Cancel")),
78
79
  ] }, isFetching || !selectedTranslation ? (React.createElement("div", { style: { height: '100px' } },
79
80
  React.createElement(LoadingIndicator, null))) : (React.createElement(React.Fragment, null,
80
- React.createElement("p", { className: "pf-u-mb-md" }, selectedTranslation.translatedDescription),
81
+ React.createElement("p", { className: "pf-v5-u-mb-md" }, selectedTranslation.translatedDescription),
81
82
  React.createElement("strong", null,
82
83
  React.createElement(Trans, null, "Download the agreement")),
83
- React.createElement("p", { className: "pf-u-mb-md pf-u-mt-sm" }, selectedTranslation.translatedInstructions),
84
+ React.createElement("p", { className: "pf-v5-u-mb-md pf-v5-u-mt-sm" }, selectedTranslation.translatedInstructions),
84
85
  React.createElement(Flex, null,
85
86
  React.createElement(FlexItem, null,
86
- React.createElement(Select, { "aria-label": t('Select language'), id: "terms-language-selector", className: "pf-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: onDropdownToggle }, Object.keys(allTranslations).map((option, index) => (React.createElement(SelectOption, { key: index, value: option }, getLocaleNameFromLocalCode(option)))))),
87
+ React.createElement(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.createElement(SelectOption, { key: index, value: option }, getLocaleNameFromLocalCode(option)))))),
87
88
  React.createElement(FlexItem, null,
88
89
  React.createElement("a", { href: selectedTranslation.pdfDownloadUrl, "data-tracking-id": `${props.eventCode}-terms-download`, target: "_blank", rel: "noopener noreferrer" },
89
90
  React.createElement(Trans, null, "Download")))),
90
- React.createElement(Checkbox, { label: t('I have read and agree to the terms'), isChecked: termsAcked, onChange: (checked) => {
91
+ React.createElement(Checkbox, { label: t('I have read and agree to the terms'), isChecked: termsAcked, onChange: (_event, checked) => {
91
92
  setTermsAcked(checked);
92
93
  }, "aria-label": t('I have read and agree to the terms'), id: "agree-terms", name: "agree-terms" })))));
93
94
  }
@@ -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,gBAoD9C,CAAC"}
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"}
@@ -26,5 +26,5 @@ export const TextAreaResizable = (props) => {
26
26
  else
27
27
  return 'default';
28
28
  };
29
- return (React.createElement(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 }));
29
+ return (React.createElement(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" }));
30
30
  };
@@ -16,7 +16,7 @@
16
16
  margin: 0;
17
17
  }
18
18
 
19
- .Toastify__toast-body > .pf-c-alert {
19
+ .Toastify__toast-body > .pf-v5-c-alert {
20
20
  height: 100%;
21
21
  min-width: 500px;
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentSearch.d.ts","sourceRoot":"","sources":["../../../src/TopContentSearch/TopContentSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAQ5F,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,UAAU,MAAM;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,2BAA2B,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACzD,cAAc,EAAE,eAAe,EAAE,CAAC;IAClC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;CAC3E;AAED,eAAO,MAAM,gBAAgB,eAAgB,MAAM,WASlD,CAAC;AAOF,wBAAgB,gBAAgB,CAAC,EAC7B,cAAmB,EACnB,2BAA6C,EAC7C,QAAQ,EACR,cAAc,EACd,mBAA2B,GAC9B,EAAE,MAAM,eA2GR"}
1
+ {"version":3,"file":"TopContentSearch.d.ts","sourceRoot":"","sources":["../../../src/TopContentSearch/TopContentSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAQ5F,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,UAAU,MAAM;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,2BAA2B,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACzD,cAAc,EAAE,eAAe,EAAE,CAAC;IAClC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;CAC3E;AAED,eAAO,MAAM,gBAAgB,eAAgB,MAAM,WASlD,CAAC;AAOF,wBAAgB,gBAAgB,CAAC,EAC7B,cAAmB,EACnB,2BAA6C,EAC7C,QAAQ,EACR,cAAc,EACd,mBAA2B,GAC9B,EAAE,MAAM,eA8GR"}
@@ -56,8 +56,9 @@ export function TopContentSearch({ topContentData = [], topContentResultsWrapper
56
56
  dtmTrackEvent(searchWrapperRef, eventName, event);
57
57
  };
58
58
  const highlightSearchResults = useCallback((searchTerm) => {
59
- const d = topContentResultsWrapperRef.current;
60
- const markInstance = new Mark(d);
59
+ // highlight search term present in contents only. Contents are present within <dd> tag
60
+ const contentElements = topContentResultsWrapperRef.current.querySelectorAll('dd.pf-v5-c-accordion__expandable-content');
61
+ const markInstance = new Mark(contentElements);
61
62
  markInstance.unmark({
62
63
  done: () => {
63
64
  if (isEmpty(searchTerm))
@@ -104,8 +105,8 @@ export function TopContentSearch({ topContentData = [], topContentResultsWrapper
104
105
  setSearchText(value);
105
106
  debounceSearch(value);
106
107
  };
107
- return (React.createElement("div", { className: "top-content-search-wrapper pf-u-p-md", ref: searchWrapperRef },
108
- React.createElement("label", { htmlFor: "top-content-search-input", className: "pf-u-mr-md top-content-search-label" },
108
+ return (React.createElement("div", { className: "top-content-search-wrapper pf-v5-u-p-md", ref: searchWrapperRef },
109
+ React.createElement("label", { htmlFor: "top-content-search-input", className: "pf-v5-u-mr-md top-content-search-label" },
109
110
  React.createElement(Trans, null, "Filter results:")),
110
- React.createElement(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 })));
111
+ React.createElement(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 })));
111
112
  }
@@ -6,12 +6,12 @@ import React from 'react';
6
6
  import { SupportFeedbackForm } from '../SupportFeedbackForm';
7
7
  const defaultTitle = "Sorry, we're experiencing an error";
8
8
  const errorMessageButtonLabel = 'contact us';
9
- const defaultErrorMessage = (React.createElement("p", { className: "pf-u-mb-0" },
9
+ const defaultErrorMessage = (React.createElement("p", { className: "pf-v5-u-mb-0" },
10
10
  "Try refreshing the page. Please ",
11
11
  React.createElement(SupportFeedbackForm, { isInline: true, buttonLabel: errorMessageButtonLabel }),
12
12
  " if the problem persists.",
13
13
  React.createElement("br", null),
14
- React.createElement(Button, { variant: "link", component: "a", href: "https://status.redhat.com/", "data-tracking-id": "redirect-status-portal-button", target: "_blank", icon: React.createElement(ExternalLinkAltIcon, { className: "status-portal-button-icon" }), iconPosition: "right", className: "pf-u-pl-0", isInline: true, "aria-label": "View status page" }, "View status page"),
14
+ React.createElement(Button, { variant: "link", component: "a", href: "https://status.redhat.com/", "data-tracking-id": "redirect-status-portal-button", target: "_blank", icon: React.createElement(ExternalLinkAltIcon, { className: "status-portal-button-icon" }), iconPosition: "right", className: "pf-v5-u-pl-0", isInline: true, "aria-label": "View status page" }, "View status page"),
15
15
  ' '));
16
16
  const defaultErrorObj = {
17
17
  500: {
@@ -1,3 +1,3 @@
1
1
  .status-portal-button-icon {
2
- font-size: var(--pf-global--icon--FontSize--sm);
2
+ font-size: var(--pf-v5-global--icon--FontSize--sm);
3
3
  }
@@ -11,4 +11,5 @@ export * from './useForceUpdate';
11
11
  export * from './useLRUCache';
12
12
  export * from './useBreakpoint';
13
13
  export * from './useOnScreen';
14
+ export * from './useSelectKeyboardNavigator';
14
15
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -11,3 +11,4 @@ export * from './useForceUpdate';
11
11
  export * from './useLRUCache';
12
12
  export * from './useBreakpoint';
13
13
  export * from './useOnScreen';
14
+ export * from './useSelectKeyboardNavigator';
@@ -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;AAYF,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"}
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"}
@@ -8,6 +8,7 @@ const defaultQueries = {
8
8
  md: `(min-width: 768px)`,
9
9
  lg: `(min-width: 992px)`,
10
10
  xl: `(min-width: 1300px)`,
11
+ xxl: `(min-width: 1800px)`,
11
12
  };
12
13
  function BreakpointProvider({ children, queries = defaultQueries }) {
13
14
  const [queryMatch, setQueryMatch] = 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,51 @@
1
+ import { useState } from 'react';
2
+ export function useSelectKeyboardNavigator({ list, isOpen, setIsOpen, onSelect }) {
3
+ const [focusedItemIndex, setFocusedItemIndex] = useState(null);
4
+ const handleMenuArrowKeys = (key) => {
5
+ let indexToFocus;
6
+ if (isOpen) {
7
+ if (key === 'ArrowUp') {
8
+ // When no index is set or at the first index, focus to the last, otherwise decrement focus index
9
+ if (focusedItemIndex === null || focusedItemIndex === 0) {
10
+ indexToFocus = list.length - 1;
11
+ }
12
+ else {
13
+ indexToFocus = focusedItemIndex - 1;
14
+ }
15
+ }
16
+ if (key === 'ArrowDown') {
17
+ // When no index is set or at the last index, focus to the first, otherwise increment focus index
18
+ if (focusedItemIndex === null || focusedItemIndex === list.length - 1) {
19
+ indexToFocus = 0;
20
+ }
21
+ else {
22
+ indexToFocus = focusedItemIndex + 1;
23
+ }
24
+ }
25
+ setFocusedItemIndex(indexToFocus);
26
+ }
27
+ };
28
+ const onInputKeyDown = (event) => {
29
+ const focusedItem = focusedItemIndex ? list[focusedItemIndex] : list[0];
30
+ switch (event.key) {
31
+ // Select the first available option
32
+ case 'Enter':
33
+ if (!isOpen) {
34
+ setIsOpen((pre) => !pre);
35
+ }
36
+ else if (isOpen) {
37
+ onSelect(focusedItem);
38
+ }
39
+ break;
40
+ case 'Escape':
41
+ setIsOpen(false);
42
+ break;
43
+ case 'ArrowUp':
44
+ case 'ArrowDown':
45
+ event.preventDefault();
46
+ handleMenuArrowKeys(event.key);
47
+ break;
48
+ }
49
+ };
50
+ return { onInputKeyDown, focusedItemIndex };
51
+ }