@patternfly/quickstarts 5.2.0-prerelease.2 → 5.2.0-prerelease.3

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.
@@ -818,17 +818,6 @@
818
818
  display: inherit !important;
819
819
  }
820
820
 
821
- .pfext-quick-start-tile-header__status {
822
- margin: var(--pf-v5-global--spacer--sm) 0;
823
- }
824
- .pfext-quick-start-tile-header--margin {
825
- margin-right: var(--pf-v5-global--spacer--sm);
826
- margin-bottom: var(--pf-v5-global--spacer--sm);
827
- }
828
- .pfext-quick-start-tile-header .pf-v5-c-badge:not(:last-of-type) {
829
- margin-right: var(--pf-v5-global--spacer--sm);
830
- }
831
-
832
821
  .pfext-quick-start-tile {
833
822
  height: 100%;
834
823
  }
@@ -840,6 +829,17 @@
840
829
  display: flex;
841
830
  }
842
831
 
832
+ .pfext-quick-start-tile-header__status {
833
+ margin: var(--pf-v5-global--spacer--sm) 0;
834
+ }
835
+ .pfext-quick-start-tile-header--margin {
836
+ margin-right: var(--pf-v5-global--spacer--sm);
837
+ margin-bottom: var(--pf-v5-global--spacer--sm);
838
+ }
839
+ .pfext-quick-start-tile-header .pf-v5-c-badge:not(:last-of-type) {
840
+ margin-right: var(--pf-v5-global--spacer--sm);
841
+ }
842
+
843
843
  .pfext-quick-start-tile-description {
844
844
  display: -webkit-box;
845
845
  overflow: hidden;
@@ -1027,20 +1027,6 @@
1027
1027
  left: 2px;
1028
1028
  }
1029
1029
 
1030
- .pfext-quick-start-task-header__list {
1031
- padding: 0 !important;
1032
- }
1033
- .pfext-quick-start-task-header__list button::before {
1034
- content: none;
1035
- }
1036
- .pfext-quick-start-task-header__list li {
1037
- list-style-type: none;
1038
- display: flex;
1039
- flex-wrap: wrap;
1040
- align-items: center;
1041
- margin-bottom: var(--pf-v5-global--spacer--xs);
1042
- }
1043
-
1044
1030
  .pfext-quick-start-task-header {
1045
1031
  margin-bottom: var(--pf-v5-global--spacer--sm);
1046
1032
  display: grid;
@@ -1088,6 +1074,20 @@
1088
1074
  color: var(--pf-v5-global--danger-color--100) !important;
1089
1075
  }
1090
1076
 
1077
+ .pfext-quick-start-task-header__list {
1078
+ padding: 0 !important;
1079
+ }
1080
+ .pfext-quick-start-task-header__list button::before {
1081
+ content: none;
1082
+ }
1083
+ .pfext-quick-start-task-header__list li {
1084
+ list-style-type: none;
1085
+ display: flex;
1086
+ flex-wrap: wrap;
1087
+ align-items: center;
1088
+ margin-bottom: var(--pf-v5-global--spacer--xs);
1089
+ }
1090
+
1091
1091
  .pfext-quick-start-task-review-alert {
1092
1092
  margin: var(--pf-v5-global--spacer--lg) 0;
1093
1093
  }
@@ -1116,6 +1116,10 @@
1116
1116
  color: var(--pf-chart-global--danger--Color--100);
1117
1117
  }
1118
1118
 
1119
+ .pfext-modal {
1120
+ position: absolute !important;
1121
+ }
1122
+
1119
1123
  .pfext-markdown-view .pfext-code-block__pre {
1120
1124
  /* override the styles applied by showdown while parsing <pre /> */
1121
1125
  display: flex;
@@ -1150,10 +1154,6 @@
1150
1154
  word-break: break-word;
1151
1155
  }
1152
1156
 
1153
- .pfext-modal {
1154
- position: absolute !important;
1155
- }
1156
-
1157
1157
  @keyframes pfext-spotlight-expand {
1158
1158
  0% {
1159
1159
  outline-offset: -4px;
@@ -30883,29 +30883,49 @@ exports["default"] = exports.OutlinedClockIcon;
30883
30883
 
30884
30884
  var OutlinedClockIcon = /*@__PURE__*/getDefaultExportFromCjs(outlinedClockIcon);
30885
30885
 
30886
+ var outlinedBookmarkIcon = createCommonjsModule(function (module, exports) {
30887
+ exports.__esModule = true;
30888
+ exports.OutlinedBookmarkIconConfig = {
30889
+ name: 'OutlinedBookmarkIcon',
30890
+ height: 512,
30891
+ width: 384,
30892
+ svgPath: 'M336 0H48C21.49 0 0 21.49 0 48v464l192-112 192 112V48c0-26.51-21.49-48-48-48zm0 428.43l-144-84-144 84V54a6 6 0 0 1 6-6h276c3.314 0 6 2.683 6 5.996V428.43z',
30893
+ yOffset: 0,
30894
+ xOffset: 0,
30895
+ };
30896
+ exports.OutlinedBookmarkIcon = createIcon_1.createIcon(exports.OutlinedBookmarkIconConfig);
30897
+ exports["default"] = exports.OutlinedBookmarkIcon;
30898
+ });
30899
+
30900
+ var OutlinedBookmarkIcon = /*@__PURE__*/getDefaultExportFromCjs(outlinedBookmarkIcon);
30901
+
30886
30902
  const statusColorMap = {
30887
30903
  [QuickStartStatus.COMPLETE]: 'green',
30888
30904
  [QuickStartStatus.IN_PROGRESS]: 'purple',
30889
30905
  [QuickStartStatus.NOT_STARTED]: 'grey',
30890
30906
  };
30891
- const QuickStartTileHeader = ({ status, duration, name, type, quickStartId, }) => {
30907
+ const QuickStartTileHeader = ({ status, duration, name, type, quickStartId, action, }) => {
30892
30908
  const { getResource } = React.useContext(QuickStartContext);
30893
30909
  const statusLocaleMap = {
30894
30910
  [QuickStartStatus.COMPLETE]: getResource('Complete'),
30895
30911
  [QuickStartStatus.IN_PROGRESS]: getResource('In progress'),
30896
30912
  [QuickStartStatus.NOT_STARTED]: getResource('Not started'),
30897
30913
  };
30914
+ const ActionIcon = (action === null || action === void 0 ? void 0 : action.icon) || OutlinedBookmarkIcon;
30898
30915
  return (React.createElement("div", { className: "pfext-quick-start-tile-header" },
30899
- React.createElement(Title, { headingLevel: "h3", "data-test": "title", id: quickStartId },
30900
- React.createElement(QuickStartMarkdownView, { content: name })),
30916
+ React.createElement(Flex, { justifyContent: { default: 'justifyContentCenter' }, flexWrap: { default: 'nowrap' } },
30917
+ React.createElement(Title, { headingLevel: "h3", "data-test": "title", id: quickStartId },
30918
+ React.createElement(QuickStartMarkdownView, { content: name })),
30919
+ action && React.createElement(Button, Object.assign({ "aria-label": action['aria-label'], icon: React.createElement(ActionIcon, null), variant: 'plain', onClick: action.onClick }, action.buttonProps))),
30901
30920
  React.createElement("div", { className: "pfext-quick-start-tile-header__status" },
30902
30921
  type && (React.createElement(Label, { className: "pfext-quick-start-tile-header--margin", color: type.color }, type.text)),
30903
30922
  duration && (React.createElement(Label, { variant: "outline", "data-test": "duration", icon: React.createElement(OutlinedClockIcon, null), className: "pfext-quick-start-tile-header--margin" }, getResource('{{duration, number}} minutes', duration).replace('{{duration, number}}', duration))),
30904
30923
  status !== QuickStartStatus.NOT_STARTED && (React.createElement(Label, { variant: "outline", color: statusColorMap[status], icon: React.createElement(StatusIcon, { status: status }), "data-test": "status" }, statusLocaleMap[status])))));
30905
30924
  };
30906
30925
 
30907
- const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, }) => {
30908
- const { metadata: { name: id }, spec: { icon, tasks, displayName, description, durationMinutes, prerequisites, link, type }, } = quickStart;
30926
+ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, action, }) => {
30927
+ const { metadata: { name, id: metaId }, spec: { icon, tasks, displayName, description, durationMinutes, prerequisites, link, type }, } = quickStart;
30928
+ const id = metaId || name;
30909
30929
  const { setActiveQuickStart, footer } = React.useContext(QuickStartContext);
30910
30930
  const ref = React.useRef(null);
30911
30931
  let quickStartIcon;
@@ -30936,10 +30956,10 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, })
30936
30956
  onClick();
30937
30957
  }
30938
30958
  };
30939
- return (React.createElement("div", { ref: ref },
30959
+ return (React.createElement("div", { ref: ref, onClick: handleClick },
30940
30960
  React.createElement(CatalogTile, { id: id + '-catalog-tile', style: {
30941
30961
  cursor: 'pointer',
30942
- }, icon: quickStartIcon, className: "pfext-quick-start-tile", "data-testid": `qs-card-${camelize(displayName)}`, featured: isActive, title: React.createElement(QuickStartTileHeader, { name: displayName, status: status, duration: durationMinutes, type: type, quickStartId: id }), onClick: handleClick, onKeyDown: (event) => {
30962
+ }, icon: quickStartIcon, className: "pfext-quick-start-tile", "data-testid": `qs-card-${camelize(displayName)}`, featured: isActive, title: React.createElement(QuickStartTileHeader, { name: displayName, status: status, duration: durationMinutes, type: type, quickStartId: id, action: action }), onKeyDown: (event) => {
30943
30963
  if (event.key === 'Enter' || event.key === ' ') {
30944
30964
  setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
30945
30965
  onClick();