@patternfly/quickstarts 2.2.4 → 2.3.0

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 CHANGED
@@ -32,7 +32,7 @@ If you use an older version of @patternfly/react-core (older than "4.115.2"), an
32
32
 
33
33
  Ideally @patternfly/quickstarts will use the consumer provided PatternFly styles, only use these stylesheets if really needed.
34
34
 
35
- `quickstarts-standalone.min.css` nests the css classes within a **.pfext-quick-start__base** parent, so that they have higher specificity. `patternfly-global.css` includes component styles that we cannot nest with more specificiy (for example Drawer since it can include consumer components that depend on an older PF version).
35
+ `quickstarts-standalone.min.css` nests the css classes within a **.pfext-quick-start__base** parent, so that they have higher specificity. `patternfly-global.css` includes component styles that we cannot nest with more specificity (for example Drawer since it can include consumer components that depend on an older PF version).
36
36
 
37
37
  > Note: Only use these stylesheets if necessary!
38
38
  ```js
@@ -69,7 +69,7 @@ import {
69
69
  import { Button } from "@patternfly/react-core";
70
70
  import jsYaml from "js-yaml";
71
71
  // quick start files could be yaml files or js files, or really anything,
72
- // as long as they get parsed out to the expexted JSON format
72
+ // as long as they get parsed out to the expected JSON format
73
73
  import quickstartOne from "./quick-starts/quickstart-one.yaml";
74
74
  import quickstartTwo from "./quick-starts/quickstart-two.yaml";
75
75
  import quickstartThree from "./quick-starts/quickstart-three";
@@ -253,7 +253,7 @@ return (
253
253
  Use this [file](https://github.com/patternfly/patternfly-quickstarts/blob/main/packages/module/src/locales/en/quickstart.json) as a base for your translations.
254
254
  Each language is different, especially when it comes to plurals. Try [this utility](https://jsfiddle.net/6bpxsgd4) sourced from [i18next](https://www.i18next.com/translation-function/plurals#how-to-find-the-correct-plural-suffix) to determine the suffixes for the right plural format.
255
255
 
256
- For localizing the content of quick starts files, we provide the option to include `language` and `countryCode` key to your translated file. Based on these keys you can filter out quick starts. We have a demo of this behaviour in our [demo app](https://quickstarts.netlify.app/quickstarts-localized). You can have a look at the code [here](https://github.com/patternfly/patternfly-quickstarts/blob/main/packages/dev/src/AppLocalized.tsx).
256
+ For localizing the content of quick starts files, we provide the option to include `language` and `countryCode` key to your translated file. Based on these keys you can filter out quick starts. We have a demo of this behavior in our [demo app](https://quickstarts.netlify.app/quickstarts-localized). You can have a look at the code [here](https://github.com/patternfly/patternfly-quickstarts/blob/main/packages/dev/src/AppLocalized.tsx).
257
257
 
258
258
  ## In-App / In Context Help Panel
259
259
 
@@ -406,7 +406,7 @@ const FormGroupWithHelpTopicPopover: React.FC<FormGroupWithHelpTopicPopoverProps
406
406
  <Popover
407
407
  bodyContent={(hide) => (
408
408
  <div>
409
- {topic.title} is quite amaizing{' '}
409
+ {topic.title} is quite amazing{' '}
410
410
  <Button
411
411
  variant="link"
412
412
  onClick={() => {
@@ -9,7 +9,7 @@ declare type QuickStartTaskHeaderProps = {
9
9
  size?: 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
10
10
  isActiveTask?: boolean;
11
11
  onTaskSelect: (index: number) => void;
12
- chidlren?: React.ReactNode;
12
+ children?: React.ReactNode;
13
13
  };
14
14
  declare const QuickStartTaskHeader: React.FC<QuickStartTaskHeaderProps>;
15
15
  export default QuickStartTaskHeader;
package/dist/index.es.js CHANGED
@@ -1233,7 +1233,7 @@ const useInlineCopyClipboardShowdownExtension = () => {
1233
1233
  const { getResource } = React.useContext(QuickStartContext);
1234
1234
  return React.useMemo(() => ({
1235
1235
  type: 'lang',
1236
- regex: /`([^`](.*?)[^`])`{{copy}}/g,
1236
+ regex: /```[\n]\s*((((?!```).)*?\n)+)\s*```{{copy}}/g,
1237
1237
  replace: (text, group, subGroup, groupType, groupId) => {
1238
1238
  if (!group || !subGroup || !groupType || !groupId) {
1239
1239
  return text;
@@ -1301,7 +1301,7 @@ const useAdmonitionShowdownExtension = () => {
1301
1301
  // const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
1302
1302
  return React.useMemo(() => ({
1303
1303
  type: 'lang',
1304
- regex: /\[([\d\w\s-()$!]+)]{{(admonition) ([\w-]+)}}/g,
1304
+ regex: /\[(.+)]{{(admonition) ([\w-]+)}}/g,
1305
1305
  replace: (text, content, admonitionLabel, admonitionType, groupId) => {
1306
1306
  if (!content || !admonitionLabel || !admonitionType || !groupId) {
1307
1307
  return text;
@@ -2371,7 +2371,7 @@ const HelpTopicPanelContent = (_a) => {
2371
2371
  const paddingContainer = (children) => React.createElement("div", { style: { padding: '24px' } }, children);
2372
2372
  const panelBodyItems = (React.createElement(React.Fragment, null,
2373
2373
  paddingContainer(React.createElement(QuickStartMarkdownView, { content: activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.content })),
2374
- ((_b = activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.links) === null || _b === void 0 ? void 0 : _b.length) && React.createElement(Divider, null),
2374
+ !!((_b = activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.links) === null || _b === void 0 ? void 0 : _b.length) && React.createElement(Divider, null),
2375
2375
  paddingContainer(React.createElement(Stack, { hasGutter: true }, (_c = activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.links) === null || _c === void 0 ? void 0 : _c.map(({ href, text, newTab, isExternal }, index) => {
2376
2376
  return (React.createElement(StackItem, { key: index },
2377
2377
  React.createElement(Button, { component: "a", href: href, target: newTab ? '_blank' : '', rel: "noopener noreferrer", variant: "link", "aria-label": `Open documentation in new window`, isInline: true, icon: isExternal ? React.createElement(ExternalLinkAltIcon, null) : null, iconPosition: "right", style: { fontSize: 'inherit' } }, text || href)));