@patternfly/quickstarts 5.2.0-prerelease.2 → 5.2.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/dist/catalog/QuickStartTile.d.ts +3 -0
- package/dist/catalog/QuickStartTileHeader.d.ts +12 -0
- package/dist/catalog/index.d.ts +1 -1
- package/dist/index.es.js +23 -14
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +24 -14
- package/dist/index.js.map +1 -1
- package/dist/quickstarts-base.css +66 -63
- package/dist/quickstarts-full.es.js +38 -14
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/quickstarts-standalone.css +6 -0
- package/dist/quickstarts-standalone.min.css +1 -1
- package/dist/quickstarts.css +66 -63
- package/dist/quickstarts.min.css +1 -1
- package/package.json +2 -2
- package/src/catalog/QuickStartTile.tsx +19 -7
- package/src/catalog/QuickStartTileHeader.scss +4 -0
- package/src/catalog/QuickStartTileHeader.tsx +31 -4
- package/src/catalog/index.ts +1 -1
|
@@ -818,28 +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
|
-
.pfext-quick-start-tile {
|
|
833
|
-
height: 100%;
|
|
834
|
-
}
|
|
835
|
-
.pfext-quick-start-tile .catalog-tile-pf-description .has-footer {
|
|
836
|
-
display: block;
|
|
837
|
-
-webkit-line-clamp: unset;
|
|
838
|
-
}
|
|
839
|
-
.pfext-quick-start-tile .catalog-tile-pf-icon {
|
|
840
|
-
display: flex;
|
|
841
|
-
}
|
|
842
|
-
|
|
843
821
|
.pfext-quick-start-tile-description {
|
|
844
822
|
display: -webkit-box;
|
|
845
823
|
overflow: hidden;
|
|
@@ -865,22 +843,29 @@
|
|
|
865
843
|
padding-left: 20px;
|
|
866
844
|
}
|
|
867
845
|
|
|
868
|
-
.pfext-
|
|
869
|
-
|
|
846
|
+
.pfext-quick-start-tile-header__status {
|
|
847
|
+
margin: var(--pf-v5-global--spacer--sm) 0;
|
|
870
848
|
}
|
|
871
|
-
.pfext-
|
|
872
|
-
|
|
873
|
-
margin-bottom:
|
|
874
|
-
overflow-x: auto;
|
|
849
|
+
.pfext-quick-start-tile-header--margin {
|
|
850
|
+
margin-right: var(--pf-v5-global--spacer--sm);
|
|
851
|
+
margin-bottom: var(--pf-v5-global--spacer--sm);
|
|
875
852
|
}
|
|
876
|
-
.pfext-
|
|
877
|
-
|
|
878
|
-
border-bottom: 1px solid #ededed;
|
|
879
|
-
padding: 10px;
|
|
880
|
-
vertical-align: top;
|
|
853
|
+
.pfext-quick-start-tile-header .pf-v5-c-badge:not(:last-of-type) {
|
|
854
|
+
margin-right: var(--pf-v5-global--spacer--sm);
|
|
881
855
|
}
|
|
882
|
-
.pfext-
|
|
883
|
-
|
|
856
|
+
.pfext-quick-start-tile-header h3 {
|
|
857
|
+
flex: 1;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
.pfext-quick-start-tile {
|
|
861
|
+
height: 100%;
|
|
862
|
+
}
|
|
863
|
+
.pfext-quick-start-tile .catalog-tile-pf-description .has-footer {
|
|
864
|
+
display: block;
|
|
865
|
+
-webkit-line-clamp: unset;
|
|
866
|
+
}
|
|
867
|
+
.pfext-quick-start-tile .catalog-tile-pf-icon {
|
|
868
|
+
display: flex;
|
|
884
869
|
}
|
|
885
870
|
|
|
886
871
|
.pfext-quick-start-catalog-filter__input {
|
|
@@ -904,6 +889,24 @@
|
|
|
904
889
|
--pf-v5-c-check__label--FontSize: 14px;
|
|
905
890
|
}
|
|
906
891
|
|
|
892
|
+
.pfext-markdown-view.is-empty {
|
|
893
|
+
color: #999;
|
|
894
|
+
}
|
|
895
|
+
.pfext-markdown-view table {
|
|
896
|
+
display: block;
|
|
897
|
+
margin-bottom: 11.5px;
|
|
898
|
+
overflow-x: auto;
|
|
899
|
+
}
|
|
900
|
+
.pfext-markdown-view td,
|
|
901
|
+
.pfext-markdown-view th {
|
|
902
|
+
border-bottom: 1px solid #ededed;
|
|
903
|
+
padding: 10px;
|
|
904
|
+
vertical-align: top;
|
|
905
|
+
}
|
|
906
|
+
.pfext-markdown-view th {
|
|
907
|
+
padding-top: 0;
|
|
908
|
+
}
|
|
909
|
+
|
|
907
910
|
.pfext-quick-start-footer {
|
|
908
911
|
background-color: var(--pf-v5-global--BackgroundColor--100);
|
|
909
912
|
flex: 0 0 auto;
|
|
@@ -1027,6 +1030,34 @@
|
|
|
1027
1030
|
left: 2px;
|
|
1028
1031
|
}
|
|
1029
1032
|
|
|
1033
|
+
.pfext-quick-start-task-review-alert {
|
|
1034
|
+
margin: var(--pf-v5-global--spacer--lg) 0;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
.pfext-quick-start-task-review {
|
|
1038
|
+
font-size: var(--pf-v5-global--FontSize--md);
|
|
1039
|
+
line-height: var(--pf-v5-global--FontSize--xl);
|
|
1040
|
+
font-family: var(--pf-v5-global--FontFamily--heading--sans-serif);
|
|
1041
|
+
}
|
|
1042
|
+
.pfext-quick-start-task-review__actions {
|
|
1043
|
+
display: flex;
|
|
1044
|
+
align-items: flex-start;
|
|
1045
|
+
margin-bottom: var(--pf-v5-global--spacer--sm);
|
|
1046
|
+
}
|
|
1047
|
+
.pfext-quick-start-task-review__actions input[type=radio] {
|
|
1048
|
+
margin-top: 0;
|
|
1049
|
+
margin-right: 0;
|
|
1050
|
+
}
|
|
1051
|
+
.pfext-quick-start-task-review__radio {
|
|
1052
|
+
margin-right: var(--pf-v5-global--spacer--xl) !important;
|
|
1053
|
+
}
|
|
1054
|
+
.pfext-quick-start-task-review--success {
|
|
1055
|
+
color: var(--pf-v5-global--success-color--100) !important;
|
|
1056
|
+
}
|
|
1057
|
+
.pfext-quick-start-task-review--failed {
|
|
1058
|
+
color: var(--pf-chart-global--danger--Color--100);
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1030
1061
|
.pfext-quick-start-task-header__list {
|
|
1031
1062
|
padding: 0 !important;
|
|
1032
1063
|
}
|
|
@@ -1088,34 +1119,6 @@
|
|
|
1088
1119
|
color: var(--pf-v5-global--danger-color--100) !important;
|
|
1089
1120
|
}
|
|
1090
1121
|
|
|
1091
|
-
.pfext-quick-start-task-review-alert {
|
|
1092
|
-
margin: var(--pf-v5-global--spacer--lg) 0;
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
.pfext-quick-start-task-review {
|
|
1096
|
-
font-size: var(--pf-v5-global--FontSize--md);
|
|
1097
|
-
line-height: var(--pf-v5-global--FontSize--xl);
|
|
1098
|
-
font-family: var(--pf-v5-global--FontFamily--heading--sans-serif);
|
|
1099
|
-
}
|
|
1100
|
-
.pfext-quick-start-task-review__actions {
|
|
1101
|
-
display: flex;
|
|
1102
|
-
align-items: flex-start;
|
|
1103
|
-
margin-bottom: var(--pf-v5-global--spacer--sm);
|
|
1104
|
-
}
|
|
1105
|
-
.pfext-quick-start-task-review__actions input[type=radio] {
|
|
1106
|
-
margin-top: 0;
|
|
1107
|
-
margin-right: 0;
|
|
1108
|
-
}
|
|
1109
|
-
.pfext-quick-start-task-review__radio {
|
|
1110
|
-
margin-right: var(--pf-v5-global--spacer--xl) !important;
|
|
1111
|
-
}
|
|
1112
|
-
.pfext-quick-start-task-review--success {
|
|
1113
|
-
color: var(--pf-v5-global--success-color--100) !important;
|
|
1114
|
-
}
|
|
1115
|
-
.pfext-quick-start-task-review--failed {
|
|
1116
|
-
color: var(--pf-chart-global--danger--Color--100);
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
1122
|
.pfext-markdown-view .pfext-code-block__pre {
|
|
1120
1123
|
/* override the styles applied by showdown while parsing <pre /> */
|
|
1121
1124
|
display: flex;
|
|
@@ -30883,28 +30883,47 @@ 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(
|
|
30900
|
-
React.createElement(
|
|
30916
|
+
React.createElement(Flex, { 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 = () => { }, }) => {
|
|
30926
|
+
const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, action, }) => {
|
|
30908
30927
|
const { metadata: { name: id }, spec: { icon, tasks, displayName, description, durationMinutes, prerequisites, link, type }, } = quickStart;
|
|
30909
30928
|
const { setActiveQuickStart, footer } = React.useContext(QuickStartContext);
|
|
30910
30929
|
const ref = React.useRef(null);
|
|
@@ -30927,26 +30946,31 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, })
|
|
|
30927
30946
|
const handleClick = (e) => {
|
|
30928
30947
|
var _a;
|
|
30929
30948
|
if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) {
|
|
30930
|
-
if (link) {
|
|
30931
|
-
window.open(link.href);
|
|
30932
|
-
}
|
|
30933
|
-
else {
|
|
30949
|
+
if (!link) {
|
|
30934
30950
|
setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
|
|
30935
30951
|
}
|
|
30936
30952
|
onClick();
|
|
30937
30953
|
}
|
|
30938
30954
|
};
|
|
30939
|
-
|
|
30940
|
-
|
|
30955
|
+
const linkProps = link
|
|
30956
|
+
? {
|
|
30957
|
+
href: link.href,
|
|
30958
|
+
target: '_blank',
|
|
30959
|
+
rel: 'noreferrer',
|
|
30960
|
+
}
|
|
30961
|
+
: {};
|
|
30962
|
+
return (React.createElement("div", { ref: ref, onClick: handleClick },
|
|
30963
|
+
React.createElement(CatalogTile, Object.assign({ id: id + '-catalog-tile', style: {
|
|
30941
30964
|
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
|
|
30965
|
+
}, 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
30966
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
30944
30967
|
setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
|
|
30945
30968
|
onClick();
|
|
30946
30969
|
}
|
|
30947
|
-
},
|
|
30948
|
-
//
|
|
30949
|
-
|
|
30970
|
+
} }, linkProps, { "data-test": `tile ${id}`, description: React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent, tabIndex: 0,
|
|
30971
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
30972
|
+
// @ts-ignore-next-line
|
|
30973
|
+
isSelectableRaised: true }))));
|
|
30950
30974
|
};
|
|
30951
30975
|
|
|
30952
30976
|
const QuickStartCatalog = ({ quickStarts }) => {
|