@patternfly/quickstarts 2.3.0 → 2.3.1

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.
@@ -784,27 +784,6 @@
784
784
  .pfext-markdown-view th {
785
785
  padding-top: 0; }
786
786
 
787
- .pfext-quick-start-intro__prereq {
788
- margin-bottom: var(--pf-global--spacer--md); }
789
- .pfext-quick-start-intro__prereq .pf-c-expandable-section__content {
790
- margin-top: var(--pf-global--spacer--sm); }
791
- .pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle {
792
- padding-top: 0;
793
- padding-bottom: 0; }
794
- .pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-text {
795
- margin-left: var(--pf-global--spacer--sm); }
796
- .pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-icon {
797
- color: var(--pf-c-expandable-section__toggle--Color); }
798
- .pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-icon:focus, .pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-icon:hover {
799
- --pf-c-expandable-section__toggle--Color: var(--pf-c-expandable-section__toggle--focus--Color); }
800
- .pfext-quick-start-intro__prereq-list {
801
- padding-left: 20px; }
802
- .pfext-quick-start-intro__prereq-list__item::marker {
803
- font-size: 0.8rem; }
804
- .pfext-quick-start-intro__prereq-list__item-content {
805
- position: relative;
806
- left: 2px; }
807
-
808
787
  .pfext-quick-start-tasks__list button::before {
809
788
  content: none; }
810
789
 
@@ -863,6 +842,27 @@
863
842
  .pfext-quick-start-tasks__list .task-pflist-list__item__content .task-pflist-list__item__content__note__body {
864
843
  font-size: 14px; }
865
844
 
845
+ .pfext-quick-start-intro__prereq {
846
+ margin-bottom: var(--pf-global--spacer--md); }
847
+ .pfext-quick-start-intro__prereq .pf-c-expandable-section__content {
848
+ margin-top: var(--pf-global--spacer--sm); }
849
+ .pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle {
850
+ padding-top: 0;
851
+ padding-bottom: 0; }
852
+ .pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-text {
853
+ margin-left: var(--pf-global--spacer--sm); }
854
+ .pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-icon {
855
+ color: var(--pf-c-expandable-section__toggle--Color); }
856
+ .pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-icon:focus, .pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-icon:hover {
857
+ --pf-c-expandable-section__toggle--Color: var(--pf-c-expandable-section__toggle--focus--Color); }
858
+ .pfext-quick-start-intro__prereq-list {
859
+ padding-left: 20px; }
860
+ .pfext-quick-start-intro__prereq-list__item::marker {
861
+ font-size: 0.8rem; }
862
+ .pfext-quick-start-intro__prereq-list__item-content {
863
+ position: relative;
864
+ left: 2px; }
865
+
866
866
  .pfext-quick-start-task-header__list {
867
867
  padding: 0 !important; }
868
868
  .pfext-quick-start-task-header__list button::before {
@@ -931,9 +931,6 @@
931
931
  .pfext-quick-start-task-review--failed {
932
932
  color: var(--pf-chart-global--danger--Color--100); }
933
933
 
934
- .pfext-modal {
935
- position: absolute !important; }
936
-
937
934
  .pfext-markdown-view .pfext-code-block__pre {
938
935
  /* override the styles applied by showdown while parsing <pre /> */
939
936
  display: flex;
@@ -966,6 +963,9 @@
966
963
  color: var(--pf-c-alert__title--Color);
967
964
  word-break: break-word; }
968
965
 
966
+ .pfext-modal {
967
+ position: absolute !important; }
968
+
969
969
  @keyframes pfext-spotlight-expand {
970
970
  0% {
971
971
  outline-offset: -4px;
@@ -10532,12 +10532,13 @@ const CopyClipboard = ({ element, rootSelector, docContext, }) => {
10532
10532
  const { getResource } = React.useContext(QuickStartContext);
10533
10533
  const [showSuccessContent, setShowSuccessContent] = React.useState(false);
10534
10534
  const textToCopy = React.useMemo(() => {
10535
+ var _a;
10535
10536
  const copyTextId = element.getAttribute(MARKDOWN_COPY_BUTTON_ID);
10536
- return docContext.querySelector(`${rootSelector} [${MARKDOWN_SNIPPET_ID}="${copyTextId}"]`).innerText;
10537
+ return (_a = docContext.querySelector(`${rootSelector} [${MARKDOWN_SNIPPET_ID}="${copyTextId}"]`)) === null || _a === void 0 ? void 0 : _a.innerText;
10537
10538
  }, [element, docContext, rootSelector]);
10538
10539
  useEventListener(element, 'click', React.useCallback(() => {
10539
10540
  navigator.clipboard
10540
- .writeText(textToCopy)
10541
+ .writeText(textToCopy.trim())
10541
10542
  .then(() => {
10542
10543
  setShowSuccessContent(true);
10543
10544
  })
@@ -14718,16 +14719,16 @@ const useInlineCopyClipboardShowdownExtension = () => {
14718
14719
  const { getResource } = React.useContext(QuickStartContext);
14719
14720
  return React.useMemo(() => ({
14720
14721
  type: 'lang',
14721
- regex: /```[\n]\s*((((?!```).)*?\n)+)\s*```{{copy}}/g,
14722
- replace: (text, group, subGroup, groupType, groupId) => {
14723
- if (!group || !subGroup || !groupType || !groupId) {
14722
+ regex: /`([^`](.*?)[^`])`{{copy}}/g,
14723
+ replace: (text, group, _, groupId) => {
14724
+ if (!group || isNaN(groupId)) {
14724
14725
  return text;
14725
14726
  }
14726
14727
  return removeTemplateWhitespace(`<span class="pf-c-clipboard-copy pf-m-inline">
14727
- <span class="pf-c-clipboard-copy__text" ${MARKDOWN_SNIPPET_ID}="${groupType}">${group}</span>
14728
+ <span class="pf-c-clipboard-copy__text" ${MARKDOWN_SNIPPET_ID}="${groupId}">${group}</span>
14728
14729
  <span class="pf-c-clipboard-copy__actions">
14729
14730
  <span class="pf-c-clipboard-copy__actions-item">
14730
- <button class="pf-c-button pf-m-plain" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupType}">
14731
+ <button class="pf-c-button pf-m-plain" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupId}">
14731
14732
  ${server.renderToStaticMarkup(React.createElement(CopyIcon, null))}
14732
14733
  </button>
14733
14734
  </span>
@@ -14741,16 +14742,16 @@ const useMultilineCopyClipboardShowdownExtension = () => {
14741
14742
  const { getResource } = React.useContext(QuickStartContext);
14742
14743
  return React.useMemo(() => ({
14743
14744
  type: 'lang',
14744
- regex: /```[\n]((.*?\n)+)```{{copy}}/g,
14745
- replace: (text, group, subgroup, groupType, groupId) => {
14746
- if (!group || !subgroup || !groupType || !groupId) {
14745
+ regex: /```[\n]\s*((((?!```).)*?\n)+)\s*```{{copy}}/g,
14746
+ replace: (text, group, _1, _2, groupId) => {
14747
+ if (!group || isNaN(groupId)) {
14747
14748
  return text;
14748
14749
  }
14749
14750
  return `<div class="pf-c-code-block">
14750
14751
  <div class="pf-c-code-block__header">
14751
14752
  <div class="pf-c-code-block__actions">
14752
14753
  <div class="pf-c-code-block__actions-item">
14753
- <button class="pf-c-button pf-m-plain" type="button" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupType}">
14754
+ <button class="pf-c-button pf-m-plain" type="button" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupId}">
14754
14755
  ${server.renderToStaticMarkup(React.createElement(CopyIcon, null))}
14755
14756
  </button>
14756
14757
  </div>
@@ -14759,7 +14760,7 @@ const useMultilineCopyClipboardShowdownExtension = () => {
14759
14760
  <div class="pf-c-code-block__content">
14760
14761
  <pre class="pf-c-code-block__pre pfext-code-block__pre">
14761
14762
  <code class="pf-c-code-block__code"
14762
- ${MARKDOWN_SNIPPET_ID}="${groupType}">${group}</code>
14763
+ ${MARKDOWN_SNIPPET_ID}="${groupId}">${group.trim()}</code>
14763
14764
  </pre>
14764
14765
  </div>
14765
14766
  </div>`;