@patternfly/quickstarts 2.3.3 → 2.3.4

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 (32) hide show
  1. package/dist/ConsoleInternal/components/markdown-view.d.ts +1 -1
  2. package/dist/ConsoleShared/src/components/markdown-extensions/accordion-extension.d.ts +7 -0
  3. package/dist/ConsoleShared/src/components/markdown-extensions/accordion-render-extension.d.ts +6 -0
  4. package/dist/ConsoleShared/src/components/markdown-extensions/const.d.ts +2 -0
  5. package/dist/ConsoleShared/src/components/markdown-extensions/index.d.ts +2 -0
  6. package/dist/index.es.js +101 -28
  7. package/dist/index.es.js.map +1 -1
  8. package/dist/index.js +99 -26
  9. package/dist/index.js.map +1 -1
  10. package/dist/patternfly-docs/quick-starts/design-guidelines/design-guidelines.md +1 -1
  11. package/dist/patternfly-docs/quick-starts/examples/about.md +28 -21
  12. package/dist/patternfly-docs/quick-starts/examples/basic.md +7 -5
  13. package/dist/patternfly-docs/quick-starts/examples/help-topics.md +8 -5
  14. package/dist/patternfly-nested.css +209 -1
  15. package/dist/quickstarts-base.css +49 -49
  16. package/dist/quickstarts-full.es.js +2928 -4373
  17. package/dist/quickstarts-full.es.js.map +1 -1
  18. package/dist/quickstarts-standalone.css +6 -0
  19. package/dist/quickstarts-standalone.min.css +2 -2
  20. package/dist/quickstarts.css +49 -49
  21. package/dist/quickstarts.min.css +1 -1
  22. package/package.json +8 -5
  23. package/src/ConsoleInternal/components/markdown-view.tsx +34 -50
  24. package/src/ConsoleShared/src/components/markdown-extensions/accordion-extension.tsx +52 -0
  25. package/src/ConsoleShared/src/components/markdown-extensions/accordion-render-extension.tsx +60 -0
  26. package/src/ConsoleShared/src/components/markdown-extensions/const.ts +2 -0
  27. package/src/ConsoleShared/src/components/markdown-extensions/index.ts +2 -0
  28. package/src/HelpTopicPanelContent.tsx +1 -1
  29. package/src/QuickStartMarkdownView.tsx +5 -0
  30. package/src/QuickStartPanelContent.tsx +11 -2
  31. package/src/controller/QuickStartTaskHeader.tsx +12 -1
  32. package/src/declaration.d.ts +1 -0
@@ -60,6 +60,7 @@ const QuickStartPanelContent: React.FC<QuickStartPanelContentProps> = ({
60
60
  QuickStartContext,
61
61
  );
62
62
  const [contentRef, setContentRef] = React.useState<HTMLDivElement>();
63
+ const [displayName, setDisplayName] = React.useState<string>('');
63
64
  const shadows = useScrollShadows(contentRef);
64
65
  const quickStart = quickStarts.find((qs) => qs.metadata.name === activeQuickStartID);
65
66
  const taskNumber = activeQuickStartState?.taskNumber;
@@ -96,6 +97,14 @@ const QuickStartPanelContent: React.FC<QuickStartPanelContentProps> = ({
96
97
  }
97
98
  }, [quickStart]);
98
99
 
100
+ React.useEffect(() => {
101
+ async function getDisplayName() {
102
+ const convertedMdDisplayName = await markdownConvert(quickStart?.spec.displayName);
103
+ setDisplayName(removeParagraphWrap(convertedMdDisplayName));
104
+ }
105
+ getDisplayName();
106
+ }, [quickStart]);
107
+
99
108
  const content = quickStart ? (
100
109
  <DrawerPanelContent
101
110
  isResizable={isResizable}
@@ -109,14 +118,14 @@ const QuickStartPanelContent: React.FC<QuickStartPanelContentProps> = ({
109
118
  <DrawerHead>
110
119
  <div className="pfext-quick-start-panel-content__title" tabIndex={-1} ref={titleRef}>
111
120
  <Title
112
- headingLevel="h1"
121
+ headingLevel="h2"
113
122
  size="xl"
114
123
  className="pfext-quick-start-panel-content__name"
115
124
  style={{ marginRight: 'var(--pf-global--spacer--md)' }}
116
125
  >
117
126
  <span
118
127
  dangerouslySetInnerHTML={{
119
- __html: removeParagraphWrap(markdownConvert(quickStart?.spec.displayName)),
128
+ __html: displayName,
120
129
  }}
121
130
  />{' '}
122
131
  <small className="pfext-quick-start-panel-content__duration">
@@ -64,12 +64,23 @@ const QuickStartTaskHeader: React.FC<QuickStartTaskHeaderProps> = ({
64
64
  children,
65
65
  }) => {
66
66
  const titleRef = React.useRef(null);
67
+ const [parsedTitle, setParsedTitle] = React.useState<string>('');
68
+
67
69
  React.useEffect(() => {
68
70
  if (isActiveTask) {
69
71
  // Focus the WizardNavItem button element that contains the title
70
72
  titleRef.current.parentNode.focus();
71
73
  }
72
74
  }, [isActiveTask]);
75
+
76
+ React.useEffect(() => {
77
+ async function getParsedTitle() {
78
+ const convertedMdTitle = await markdownConvert(title);
79
+ setParsedTitle(removeParagraphWrap(convertedMdTitle));
80
+ }
81
+ getParsedTitle();
82
+ }, [title]);
83
+
73
84
  const classNames = css('pfext-quick-start-task-header__title', {
74
85
  'pfext-quick-start-task-header__title-success': taskStatus === QuickStartTaskStatus.SUCCESS,
75
86
  'pfext-quick-start-task-header__title-failed':
@@ -92,7 +103,7 @@ const QuickStartTaskHeader: React.FC<QuickStartTaskHeaderProps> = ({
92
103
  <div className="pfext-quick-start-task-header" ref={titleRef}>
93
104
  <TaskIcon taskIndex={taskIndex} taskStatus={taskStatus} />
94
105
  <Title headingLevel="h3" size={size} className={classNames}>
95
- <span dangerouslySetInnerHTML={{ __html: removeParagraphWrap(markdownConvert(title)) }} />
106
+ <span dangerouslySetInnerHTML={{ __html: parsedTitle }} />
96
107
  {isActiveTask && subtitle && (
97
108
  <span
98
109
  className="pfext-quick-start-task-header__subtitle"
@@ -1,2 +1,3 @@
1
1
  declare module '*.scss';
2
2
  declare module '*.json';
3
+ declare module 'marked';