@patternfly/patternfly-doc-core 1.6.0 → 1.7.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/.astro/collections/examples.schema.json +16 -0
- package/.astro/collections/textContent.schema.json +16 -0
- package/dist/client/_astro/{PageContext.D1pNBMhh.js → Button.IBWho7ny.js} +2 -2
- package/dist/client/_astro/CSSTable.DHtMmTtQ.js +1185 -0
- package/dist/client/_astro/LiveExample.CwKQ5TSc.js +33 -0
- package/dist/client/_astro/Navigation.BSSYIa2f.js +1 -0
- package/dist/client/_astro/PageContext.ipir86Hm.js +1 -0
- package/dist/client/_astro/PageSidebarBody.tzSXGYXP.js +1 -0
- package/dist/client/_astro/PageToggle.C6_rp-Bm.js +1 -0
- package/dist/client/_astro/PageToggleButton.CagcouJB.js +1 -0
- package/dist/client/_astro/SearchInput.BjY-zTwj.js +1 -0
- package/dist/client/_astro/Toolbar.D4TQG77s.js +1 -0
- package/dist/client/_astro/ToolbarContent.DzYW_pmy.js +1 -0
- package/dist/client/_astro/_page_.BWicMEzd.css +1 -0
- package/dist/client/_astro/_page_.Chv_bGyU.css +1 -0
- package/dist/client/_astro/{client.CTJTt880.js → client.zs76E0tG.js} +1 -1
- package/dist/client/_astro/divider.DTvtnAAt.js +1 -0
- package/dist/client/_astro/help-icon.CDKTE3GW.js +8 -0
- package/dist/client/_astro/{index.Dhi-S4Ah.js → index.BQFV5hT1.js} +1 -1
- package/dist/client/_astro/{index.Dkaqzkgy.js → index.eCxJ45ll.js} +2 -2
- package/dist/client/_astro/page.BTC3Kf3x.js +1 -0
- package/dist/client/components/accordion/index.html +37 -12
- package/dist/client/design-foundations/typography/index.html +33 -8
- package/dist/client/design-foundations/usage-and-behavior/index.html +33 -8
- package/dist/client/get-started/contribute/index.html +33 -8
- package/dist/client/index.html +3 -4
- package/dist/server/chunks/Button_DVSwQ8oX.mjs +639 -0
- package/dist/server/chunks/CSSTable_CG80uW98.mjs +740 -0
- package/dist/server/chunks/CSSTable_Dj2CroFz.mjs +4 -0
- package/dist/server/chunks/{PropsTables_IgCNCQTX.mjs → PropsTables_DUo7F9VR.mjs} +36 -47
- package/dist/server/chunks/Stack_Xm3fJVbK.mjs +22 -0
- package/dist/server/chunks/{angle-down-icon_C5YQ7k8s.mjs → angle-down-icon_DtGGiMR5.mjs} +5 -637
- package/dist/server/entry.mjs +3 -2
- package/dist/server/{manifest_DoNTQyvZ.mjs → manifest_Dpwo8Jjv.mjs} +1 -1
- package/jest.config.ts +1 -1
- package/package.json +1 -1
- package/src/components/AutoLinkHeader.tsx +56 -0
- package/src/components/CSSSearch.tsx +33 -0
- package/src/components/CSSTable.astro +33 -0
- package/src/components/CSSTable.tsx +268 -0
- package/src/content.config.ts +10 -3
- package/src/layouts/Main.astro +12 -8
- package/src/pages/[section]/[...page].astro +16 -6
- package/src/pages/[section]/[page]/[...tab].astro +12 -3
- package/src/pages/index.astro +0 -1
- package/src/styles/global.scss +47 -1
- package/src/utils/index.ts +1 -0
- package/src/utils/slugger.ts +14 -0
- package/textContent/contribute.md +19 -13
- package/dist/client/_astro/LiveExample.Df-EUsee.js +0 -40
- package/dist/client/_astro/Navigation.CabjIYg4.js +0 -1
- package/dist/client/_astro/PageSidebarBody.Y-7d6zQM.js +0 -1
- package/dist/client/_astro/PageToggle.CbfM9bJB.js +0 -1
- package/dist/client/_astro/PageToggleButton.CZ3xPbcc.js +0 -1
- package/dist/client/_astro/Toolbar.9-YSFh3P.js +0 -1
- package/dist/client/_astro/ToolbarContent.BXdFKbs9.js +0 -1
- package/dist/client/_astro/_page_.B8cBYNKa.css +0 -1
- package/dist/client/_astro/_tab_.YrfmckTJ.css +0 -1
- package/dist/client/_astro/divider.DjbDHO_6.js +0 -1
- package/dist/client/_astro/page.CDtWFZb5.js +0 -1
- /package/dist/client/_astro/{_tab_.DxJDkZPc.css → _page_.DxJDkZPc.css} +0 -0
- /package/dist/server/chunks/{_astro_data-layer-content_Ni7IDnLe.mjs → _astro_data-layer-content_1EAcQtZj.mjs} +0 -0
|
@@ -96,7 +96,7 @@ function deserializeManifest(serializedManifest) {
|
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
const manifest = deserializeManifest({"hrefRoot":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/","cacheDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/node_modules/.astro/","outDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/dist/","srcDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/src/","publicDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/public/","buildClientDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/dist/client/","buildServerDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/dist/server/","adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"page","component":"_server-islands.astro","params":["name"],"segments":[[{"content":"_server-islands","dynamic":false,"spread":false}],[{"content":"name","dynamic":true,"spread":false}]],"pattern":"^\\/_server-islands\\/([^/]+?)\\/?$","prerender":false,"isIndex":false,"fallbackRoutes":[],"route":"/_server-islands/[name]","origin":"internal","_meta":{"trailingSlash":"ignore"}}},{"file":"index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/","isIndex":true,"type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","isIndex":false,"route":"/_image","pattern":"^\\/_image\\/?$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"node_modules/astro/dist/assets/endpoint/node.js","pathname":"/_image","prerender":false,"fallbackRoutes":[],"origin":"internal","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/props","isIndex":false,"type":"endpoint","pattern":"^\\/props\\/?$","segments":[[{"content":"props","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/props.ts","pathname":"/props","prerender":false,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}}],"base":"/","trailingSlash":"ignore","compressHTML":true,"componentMetadata":[["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/pages/index.astro",{"propagation":"in-tree","containsHead":true}],["\u0000astro:content",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Navigation.astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/pages/[section]/[...page].astro",{"propagation":"in-tree","containsHead":true}],["\u0000@astro-page:src/pages/[section]/[...page]@_@astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astrojs-ssr-virtual-entry",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/pages/[section]/[page]/[...tab].astro",{"propagation":"in-tree","containsHead":true}],["\u0000@astro-page:src/pages/[section]/[page]/[...tab]@_@astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astro-page:src/pages/index@_@astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Page.astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Masthead.astro",{"propagation":"in-tree","containsHead":false}]],"renderers":[],"clientDirectives":[["idle","(()=>{var l=(n,t)=>{let i=async()=>{await(await n())()},e=typeof t.value==\"object\"?t.value:void 0,s={timeout:e==null?void 0:e.timeout};\"requestIdleCallback\"in window?window.requestIdleCallback(i,s):setTimeout(i,s.timeout||200)};(self.Astro||(self.Astro={})).idle=l;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var n=(a,t)=>{let i=async()=>{await(await a())()};if(t.value){let e=matchMedia(t.value);e.matches?i():e.addEventListener(\"change\",i,{once:!0})}};(self.Astro||(self.Astro={})).media=n;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var a=(s,i,o)=>{let r=async()=>{await(await s())()},t=typeof i.value==\"object\"?i.value:void 0,c={rootMargin:t==null?void 0:t.rootMargin},n=new IntersectionObserver(e=>{for(let l of e)if(l.isIntersecting){n.disconnect(),r();break}},c);for(let e of o.children)n.observe(e)};(self.Astro||(self.Astro={})).visible=a;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000noop-middleware":"_noop-middleware.mjs","\u0000@astro-page:node_modules/astro/dist/assets/endpoint/node@_@js":"pages/_image.astro.mjs","\u0000@astro-page:src/pages/props@_@ts":"pages/props.astro.mjs","\u0000@astro-page:src/pages/[section]/[page]/[...tab]@_@astro":"pages/_section_/_page_/_---tab_.astro.mjs","\u0000@astro-page:src/pages/[section]/[...page]@_@astro":"pages/_section_/_---page_.astro.mjs","\u0000@astro-page:src/pages/index@_@astro":"pages/index.astro.mjs","\u0000@astrojs-ssr-virtual-entry":"entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000@astrojs-ssr-adapter":"_@astrojs-ssr-adapter.mjs","\u0000@astrojs-manifest":"
|
|
99
|
+
const manifest = deserializeManifest({"hrefRoot":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/","cacheDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/node_modules/.astro/","outDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/dist/","srcDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/src/","publicDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/public/","buildClientDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/dist/client/","buildServerDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/dist/server/","adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"page","component":"_server-islands.astro","params":["name"],"segments":[[{"content":"_server-islands","dynamic":false,"spread":false}],[{"content":"name","dynamic":true,"spread":false}]],"pattern":"^\\/_server-islands\\/([^/]+?)\\/?$","prerender":false,"isIndex":false,"fallbackRoutes":[],"route":"/_server-islands/[name]","origin":"internal","_meta":{"trailingSlash":"ignore"}}},{"file":"index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/","isIndex":true,"type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","isIndex":false,"route":"/_image","pattern":"^\\/_image\\/?$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"node_modules/astro/dist/assets/endpoint/node.js","pathname":"/_image","prerender":false,"fallbackRoutes":[],"origin":"internal","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/props","isIndex":false,"type":"endpoint","pattern":"^\\/props\\/?$","segments":[[{"content":"props","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/props.ts","pathname":"/props","prerender":false,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}}],"base":"/","trailingSlash":"ignore","compressHTML":true,"componentMetadata":[["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/pages/index.astro",{"propagation":"in-tree","containsHead":true}],["\u0000astro:content",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Navigation.astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/pages/[section]/[...page].astro",{"propagation":"in-tree","containsHead":true}],["\u0000@astro-page:src/pages/[section]/[...page]@_@astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astrojs-ssr-virtual-entry",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/pages/[section]/[page]/[...tab].astro",{"propagation":"in-tree","containsHead":true}],["\u0000@astro-page:src/pages/[section]/[page]/[...tab]@_@astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astro-page:src/pages/index@_@astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Page.astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Masthead.astro",{"propagation":"in-tree","containsHead":false}]],"renderers":[],"clientDirectives":[["idle","(()=>{var l=(n,t)=>{let i=async()=>{await(await n())()},e=typeof t.value==\"object\"?t.value:void 0,s={timeout:e==null?void 0:e.timeout};\"requestIdleCallback\"in window?window.requestIdleCallback(i,s):setTimeout(i,s.timeout||200)};(self.Astro||(self.Astro={})).idle=l;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var n=(a,t)=>{let i=async()=>{await(await a())()};if(t.value){let e=matchMedia(t.value);e.matches?i():e.addEventListener(\"change\",i,{once:!0})}};(self.Astro||(self.Astro={})).media=n;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var a=(s,i,o)=>{let r=async()=>{await(await s())()},t=typeof i.value==\"object\"?i.value:void 0,c={rootMargin:t==null?void 0:t.rootMargin},n=new IntersectionObserver(e=>{for(let l of e)if(l.isIntersecting){n.disconnect(),r();break}},c);for(let e of o.children)n.observe(e)};(self.Astro||(self.Astro={})).visible=a;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000noop-middleware":"_noop-middleware.mjs","\u0000@astro-page:node_modules/astro/dist/assets/endpoint/node@_@js":"pages/_image.astro.mjs","\u0000@astro-page:src/pages/props@_@ts":"pages/props.astro.mjs","\u0000@astro-page:src/pages/[section]/[page]/[...tab]@_@astro":"pages/_section_/_page_/_---tab_.astro.mjs","\u0000@astro-page:src/pages/[section]/[...page]@_@astro":"pages/_section_/_---page_.astro.mjs","\u0000@astro-page:src/pages/index@_@astro":"pages/index.astro.mjs","\u0000@astrojs-ssr-virtual-entry":"entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000@astrojs-ssr-adapter":"_@astrojs-ssr-adapter.mjs","\u0000@astrojs-manifest":"manifest_Dpwo8Jjv.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/PropsTables.astro":"chunks/PropsTables_DUo7F9VR.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/node_modules/astro/dist/assets/services/sharp.js":"chunks/sharp_CbOL3WDk.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/.astro/content-assets.mjs":"chunks/content-assets_DleWbedO.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/.astro/content-modules.mjs":"chunks/content-modules_BzUEG69n.mjs","\u0000astro:data-layer-content":"chunks/_astro_data-layer-content_1EAcQtZj.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/textContent/examples/Accordion/Accordion.mdx?astroPropagatedAssets":"chunks/Accordion_DlM2LvlF.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/textContent/examples/Accordion/Accordion.mdx":"chunks/Accordion_CGgMUho2.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/CSSTable.astro":"chunks/CSSTable_Dj2CroFz.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/PageToggle":"_astro/PageToggle.C6_rp-Bm.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Toolbar.tsx":"_astro/Toolbar.D4TQG77s.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/CSSTable":"_astro/CSSTable.DHtMmTtQ.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/LiveExample":"_astro/LiveExample.CwKQ5TSc.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Navigation.tsx":"_astro/Navigation.BSSYIa2f.js","@astrojs/react/client.js":"_astro/client.zs76E0tG.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro?astro&type=script&index=0&lang.ts":"_astro/Main.astro_astro_type_script_index_0_lang.B9Hb-f0z.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/node_modules/astro/components/ClientRouter.astro?astro&type=script&index=0&lang.ts":"_astro/ClientRouter.astro_astro_type_script_index_0_lang.Cainpjm5.js","astro:scripts/before-hydration.js":""},"inlinedScripts":[["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro?astro&type=script&index=0&lang.ts","const t=window.localStorage.getItem(\"theme-preference\");document?.querySelector(\"html\")?.classList.toggle(\"pf-v6-theme-dark\",t===\"dark\");document.addEventListener(\"astro:after-swap\",()=>{const e=window.localStorage.getItem(\"theme-preference\");document?.querySelector(\"html\")?.classList.toggle(\"pf-v6-theme-dark\",e===\"dark\")});"]],"assets":["/_astro/RedHatTextVF.wYvZ7prR.woff2","/_astro/RedHatTextVF-Italic.Dkj_WqbA.woff2","/_astro/RedHatDisplayVF.CYDHf1NI.woff2","/_astro/RedHatDisplayVF-Italic.CRpusWc8.woff2","/_astro/RedHatMonoVF.C4fMH6Vz.woff2","/_astro/RedHatMonoVF-Italic.DGQo2ogW.woff2","/_astro/fa-solid-900.DguXoeIz.woff2","/_astro/pf-v6-pficon.Dy6oiu9u.woff2","/_astro/_page_.CtheD08_.css","/_astro/_page_.BWicMEzd.css","/PF-HorizontalLogo-Color.svg","/PF-HorizontalLogo-Reverse.svg","/avatarImg.svg","/avatarImgDark.svg","/favicon.svg","/_astro/Button.IBWho7ny.js","/_astro/CSSTable.DHtMmTtQ.js","/_astro/ClientRouter.astro_astro_type_script_index_0_lang.Cainpjm5.js","/_astro/LiveExample.B7IM_dLQ.css","/_astro/LiveExample.CwKQ5TSc.js","/_astro/Navigation.BSSYIa2f.js","/_astro/PageContext.ipir86Hm.js","/_astro/PageSidebarBody.tzSXGYXP.js","/_astro/PageToggle.C6_rp-Bm.js","/_astro/PageToggleButton.CagcouJB.js","/_astro/SearchInput.BjY-zTwj.js","/_astro/Toolbar.D4TQG77s.js","/_astro/ToolbarContent.DzYW_pmy.js","/_astro/_page_.Chv_bGyU.css","/_astro/_page_.DxJDkZPc.css","/_astro/client.zs76E0tG.js","/_astro/divider.DTvtnAAt.js","/_astro/help-icon.CDKTE3GW.js","/_astro/index.BQFV5hT1.js","/_astro/index.eCxJ45ll.js","/_astro/page.BTC3Kf3x.js","/content/typography/line-height.png","/index.html"],"buildFormat":"directory","checkOrigin":true,"serverIslandNameMap":[["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/PropsTables.astro","PropsTables"],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/CSSTable.astro","CSSTable"]],"key":"8H8g/TtHSK+yKu6Fd3FOIw/W4hcwG8E0I2E+zSeIV3k="});
|
|
100
100
|
if (manifest.sessionConfig) manifest.sessionConfig.driverModule = null;
|
|
101
101
|
|
|
102
102
|
export { manifest };
|
package/jest.config.ts
CHANGED
|
@@ -20,7 +20,7 @@ const config: Config = {
|
|
|
20
20
|
},
|
|
21
21
|
setupFilesAfterEnv: ['<rootDir>/test.setup.ts'],
|
|
22
22
|
transformIgnorePatterns: [
|
|
23
|
-
'/node_modules/(?!(change-case|@?nanostores|react-docgen|strip-indent)/)',
|
|
23
|
+
'/node_modules/(?!(change-case|@?nanostores|react-docgen|strip-indent|@patternfly/react-icons)/)',
|
|
24
24
|
],
|
|
25
25
|
}
|
|
26
26
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Flex, FlexItem, Content, Button } from '@patternfly/react-core'
|
|
2
|
+
import LinkIcon from '@patternfly/react-icons/dist/esm/icons/link-icon'
|
|
3
|
+
import { slugger } from '../utils/slugger'
|
|
4
|
+
import { css } from '@patternfly/react-styles'
|
|
5
|
+
|
|
6
|
+
interface AutoLinkHeaderProps extends React.HTMLProps<HTMLDivElement> {
|
|
7
|
+
id?: string
|
|
8
|
+
headingLevel?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
|
|
9
|
+
children: React.ReactNode
|
|
10
|
+
metaText?: React.ReactNode
|
|
11
|
+
className?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const AutoLinkHeader = ({
|
|
15
|
+
id,
|
|
16
|
+
headingLevel,
|
|
17
|
+
children,
|
|
18
|
+
metaText,
|
|
19
|
+
className,
|
|
20
|
+
}: AutoLinkHeaderProps) => {
|
|
21
|
+
const slug = id || slugger(children)
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Flex
|
|
25
|
+
alignItems={{ default: 'alignItemsCenter' }}
|
|
26
|
+
spaceItems={{ default: 'spaceItemsSm' }}
|
|
27
|
+
>
|
|
28
|
+
<FlexItem>
|
|
29
|
+
<Content
|
|
30
|
+
id={slug}
|
|
31
|
+
component={headingLevel}
|
|
32
|
+
className={css('ws-heading', className)}
|
|
33
|
+
tabIndex={-1}
|
|
34
|
+
isEditorial
|
|
35
|
+
>
|
|
36
|
+
<Button
|
|
37
|
+
href={`#${slug}`}
|
|
38
|
+
component="a"
|
|
39
|
+
className="ws-heading-anchor"
|
|
40
|
+
tabIndex={-1}
|
|
41
|
+
aria-hidden
|
|
42
|
+
variant="plain"
|
|
43
|
+
isInline
|
|
44
|
+
>
|
|
45
|
+
<LinkIcon
|
|
46
|
+
className="ws-heading-anchor-icon"
|
|
47
|
+
style={{ verticalAlign: 'middle' }}
|
|
48
|
+
/>
|
|
49
|
+
</Button>
|
|
50
|
+
{children}
|
|
51
|
+
</Content>
|
|
52
|
+
</FlexItem>
|
|
53
|
+
{metaText && <FlexItem>{metaText}</FlexItem>}
|
|
54
|
+
</Flex>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import { SearchInput } from '@patternfly/react-core'
|
|
3
|
+
|
|
4
|
+
interface CSSSearchProps {
|
|
5
|
+
getDebouncedFilteredRows: (value: string) => void
|
|
6
|
+
'aria-label'?: string
|
|
7
|
+
placeholder?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const CSSSearch: React.FC<CSSSearchProps> = ({
|
|
11
|
+
getDebouncedFilteredRows,
|
|
12
|
+
'aria-label': ariaLabel = 'Filter CSS Variables',
|
|
13
|
+
placeholder = 'Filter CSS Variables',
|
|
14
|
+
}: CSSSearchProps) => {
|
|
15
|
+
const [filterValue, setFilterValue] = useState('')
|
|
16
|
+
|
|
17
|
+
const onFilterChange = (
|
|
18
|
+
_event: React.FormEvent<HTMLInputElement>,
|
|
19
|
+
value: string,
|
|
20
|
+
) => {
|
|
21
|
+
setFilterValue(value)
|
|
22
|
+
getDebouncedFilteredRows(value)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<SearchInput
|
|
27
|
+
aria-label={ariaLabel}
|
|
28
|
+
placeholder={placeholder}
|
|
29
|
+
value={filterValue}
|
|
30
|
+
onChange={onFilterChange}
|
|
31
|
+
/>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { CSSTable as CSSTableComponent } from './CSSTable'
|
|
3
|
+
import { AutoLinkHeader } from './AutoLinkHeader'
|
|
4
|
+
import { Stack, StackItem } from '@patternfly/react-core'
|
|
5
|
+
|
|
6
|
+
const { cssPrefix } = Astro.props
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
{
|
|
10
|
+
cssPrefix?.length > 0 && (
|
|
11
|
+
<Stack hasGutter>
|
|
12
|
+
<StackItem>
|
|
13
|
+
<AutoLinkHeader
|
|
14
|
+
headingLevel="h2"
|
|
15
|
+
className="pf-v6-c-content--h2"
|
|
16
|
+
id="css-variables"
|
|
17
|
+
>
|
|
18
|
+
CSS variables
|
|
19
|
+
</AutoLinkHeader>
|
|
20
|
+
</StackItem>
|
|
21
|
+
|
|
22
|
+
{cssPrefix.map((prefix: string, index: number) => (
|
|
23
|
+
<StackItem key={index}>
|
|
24
|
+
<CSSTableComponent
|
|
25
|
+
autoLinkHeader={cssPrefix.length > 1}
|
|
26
|
+
cssPrefix={prefix}
|
|
27
|
+
client:only="react"
|
|
28
|
+
/>
|
|
29
|
+
</StackItem>
|
|
30
|
+
))}
|
|
31
|
+
</Stack>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { debounce, List, ListItem, Stack } from '@patternfly/react-core'
|
|
2
|
+
import { Table, Thead, Th, Tr, Tbody, Td } from '@patternfly/react-table'
|
|
3
|
+
import { useState } from 'react'
|
|
4
|
+
import LevelUpAltIcon from '@patternfly/react-icons/dist/esm/icons/level-up-alt-icon'
|
|
5
|
+
import * as tokensModule from '@patternfly/react-tokens/dist/esm/componentIndex'
|
|
6
|
+
import React from 'react'
|
|
7
|
+
import { CSSSearch } from './CSSSearch'
|
|
8
|
+
import { AutoLinkHeader } from './AutoLinkHeader'
|
|
9
|
+
|
|
10
|
+
type Value = {
|
|
11
|
+
name: string
|
|
12
|
+
value: string
|
|
13
|
+
values?: string[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type FileList = {
|
|
17
|
+
[key: string]: {
|
|
18
|
+
name: string
|
|
19
|
+
value: string
|
|
20
|
+
values?: Value[]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type List = {
|
|
25
|
+
selector: string
|
|
26
|
+
property: string
|
|
27
|
+
token: string
|
|
28
|
+
value: string
|
|
29
|
+
values?: string[]
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type FilteredRows = {
|
|
33
|
+
cells: React.ReactNode[]
|
|
34
|
+
isOpen?: boolean
|
|
35
|
+
details?: { parent: number; fullWidth: boolean; data: React.ReactNode }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface CSSTableProps extends React.HTMLProps<HTMLDivElement> {
|
|
39
|
+
cssPrefix: string
|
|
40
|
+
hideSelectorColumn?: boolean
|
|
41
|
+
selector?: string
|
|
42
|
+
debounceLength?: number
|
|
43
|
+
autoLinkHeader?: boolean
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const isColorRegex = /^(#|rgb)/
|
|
47
|
+
const mappingAsList = (property: string, values: string[]) => (
|
|
48
|
+
<List isPlain>
|
|
49
|
+
<ListItem>{property}</ListItem>
|
|
50
|
+
{values.map((entry: string) => (
|
|
51
|
+
<ListItem key={entry} icon={<LevelUpAltIcon className="rotate-90-deg" />}>
|
|
52
|
+
{entry}
|
|
53
|
+
</ListItem>
|
|
54
|
+
))}
|
|
55
|
+
</List>
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
const flattenList = (files: FileList[]) => {
|
|
59
|
+
const list = [] as List[]
|
|
60
|
+
files.forEach((file) => {
|
|
61
|
+
Object.entries(file).forEach(([selector, values]) => {
|
|
62
|
+
if (values !== undefined) {
|
|
63
|
+
Object.entries(values).forEach(([key, val]) => {
|
|
64
|
+
if (typeof val === 'object' && val !== null && 'name' in val) {
|
|
65
|
+
const v = val as unknown as Value
|
|
66
|
+
list.push({
|
|
67
|
+
selector,
|
|
68
|
+
property: v.name,
|
|
69
|
+
token: key,
|
|
70
|
+
value: v.value,
|
|
71
|
+
values: v.values,
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
return list
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export const CSSTable: React.FunctionComponent<CSSTableProps> = ({
|
|
82
|
+
cssPrefix,
|
|
83
|
+
hideSelectorColumn = false,
|
|
84
|
+
selector,
|
|
85
|
+
debounceLength = 500,
|
|
86
|
+
autoLinkHeader,
|
|
87
|
+
}) => {
|
|
88
|
+
const prefixToken = cssPrefix.replace('pf-v6-', '').replace(/-+/g, '_')
|
|
89
|
+
|
|
90
|
+
const applicableFiles = Object.entries(tokensModule)
|
|
91
|
+
.filter(([key, _val]) => prefixToken === key)
|
|
92
|
+
.sort(([key1], [key2]) => key1.localeCompare(key2))
|
|
93
|
+
.map(([_key, val]) => {
|
|
94
|
+
if (selector) {
|
|
95
|
+
return {
|
|
96
|
+
selector: (val as Record<string, any>)[selector],
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return val
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
const flatList = flattenList(applicableFiles as any)
|
|
103
|
+
|
|
104
|
+
const getFilteredRows = (searchRE?: RegExp) => {
|
|
105
|
+
const newFilteredRows = [] as FilteredRows[]
|
|
106
|
+
let rowNumber = -1
|
|
107
|
+
flatList.forEach((row) => {
|
|
108
|
+
const { selector, property, value, values } = row
|
|
109
|
+
const passes =
|
|
110
|
+
!searchRE ||
|
|
111
|
+
searchRE.test(selector) ||
|
|
112
|
+
searchRE.test(property) ||
|
|
113
|
+
searchRE.test(value) ||
|
|
114
|
+
(values && searchRE.test(JSON.stringify(values)))
|
|
115
|
+
if (passes) {
|
|
116
|
+
const rowKey = `${selector}_${property}`
|
|
117
|
+
const isColor = isColorRegex.test(value)
|
|
118
|
+
const cells = [
|
|
119
|
+
hideSelectorColumn ? [] : [selector],
|
|
120
|
+
property,
|
|
121
|
+
<div key={rowKey}>
|
|
122
|
+
<div
|
|
123
|
+
key={`${rowKey}_1`}
|
|
124
|
+
className="pf-v6-l-flex pf-m-space-items-sm"
|
|
125
|
+
>
|
|
126
|
+
{isColor && (
|
|
127
|
+
<div
|
|
128
|
+
key={`${rowKey}_2`}
|
|
129
|
+
className="pf-v6-l-flex pf-m-column pf-m-align-self-center"
|
|
130
|
+
>
|
|
131
|
+
<span
|
|
132
|
+
className="circle"
|
|
133
|
+
style={{ backgroundColor: `${value}` }}
|
|
134
|
+
/>
|
|
135
|
+
</div>
|
|
136
|
+
)}
|
|
137
|
+
<div
|
|
138
|
+
key={`${rowKey}_3`}
|
|
139
|
+
className="pf-v6-l-flex pf-m-column pf-m-align-self-center ws-td-text"
|
|
140
|
+
>
|
|
141
|
+
{isColor && '(In light theme)'} {value}
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>,
|
|
145
|
+
]
|
|
146
|
+
newFilteredRows.push({
|
|
147
|
+
isOpen: values ? false : undefined,
|
|
148
|
+
cells,
|
|
149
|
+
details: values
|
|
150
|
+
? {
|
|
151
|
+
parent: rowNumber,
|
|
152
|
+
fullWidth: true,
|
|
153
|
+
data: mappingAsList(property, values),
|
|
154
|
+
}
|
|
155
|
+
: undefined,
|
|
156
|
+
})
|
|
157
|
+
rowNumber += 1
|
|
158
|
+
if (values) {
|
|
159
|
+
rowNumber += 1
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
})
|
|
163
|
+
return newFilteredRows
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const INITIAL_REGEX = /.*/
|
|
167
|
+
const [searchRE, setSearchRE] = useState<RegExp>(INITIAL_REGEX)
|
|
168
|
+
const [rows, setRows] = useState(getFilteredRows(searchRE))
|
|
169
|
+
|
|
170
|
+
const hasPrefixToRender = !(typeof cssPrefix === 'undefined')
|
|
171
|
+
|
|
172
|
+
const onCollapse = (
|
|
173
|
+
_event: React.MouseEvent,
|
|
174
|
+
rowKey: number,
|
|
175
|
+
isOpen: boolean,
|
|
176
|
+
) => {
|
|
177
|
+
const collapseAll = rowKey === undefined
|
|
178
|
+
let newRows = Array.from(rows)
|
|
179
|
+
|
|
180
|
+
if (collapseAll) {
|
|
181
|
+
newRows = newRows.map((r) =>
|
|
182
|
+
r.isOpen === undefined ? r : { ...r, isOpen },
|
|
183
|
+
)
|
|
184
|
+
} else {
|
|
185
|
+
newRows[rowKey] = { ...newRows[rowKey], isOpen }
|
|
186
|
+
}
|
|
187
|
+
setRows(newRows)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const getDebouncedFilteredRows = debounce((value) => {
|
|
191
|
+
const newSearchRE = new RegExp(value, 'i')
|
|
192
|
+
setSearchRE(newSearchRE)
|
|
193
|
+
setRows(getFilteredRows(newSearchRE))
|
|
194
|
+
}, debounceLength)
|
|
195
|
+
|
|
196
|
+
return (
|
|
197
|
+
<Stack hasGutter>
|
|
198
|
+
{hasPrefixToRender && (
|
|
199
|
+
<>
|
|
200
|
+
{autoLinkHeader && (
|
|
201
|
+
<AutoLinkHeader
|
|
202
|
+
headingLevel="h3"
|
|
203
|
+
className="pf-v6-u-mt-lg pf-v6-u-mb-md"
|
|
204
|
+
>{`Prefixed with '${cssPrefix}'`}</AutoLinkHeader>
|
|
205
|
+
)}
|
|
206
|
+
<CSSSearch getDebouncedFilteredRows={getDebouncedFilteredRows} />
|
|
207
|
+
<Table
|
|
208
|
+
variant="compact"
|
|
209
|
+
aria-label={`CSS Variables prefixed with ${cssPrefix}`}
|
|
210
|
+
>
|
|
211
|
+
<Thead>
|
|
212
|
+
<Tr>
|
|
213
|
+
{!hideSelectorColumn && (
|
|
214
|
+
<React.Fragment>
|
|
215
|
+
<Th screenReaderText="Expand or collapse column" />
|
|
216
|
+
<Th>Selector</Th>
|
|
217
|
+
</React.Fragment>
|
|
218
|
+
)}
|
|
219
|
+
<Th>Variable</Th>
|
|
220
|
+
<Th>Value</Th>
|
|
221
|
+
</Tr>
|
|
222
|
+
</Thead>
|
|
223
|
+
{!hideSelectorColumn ? (
|
|
224
|
+
rows.map((row, rowIndex: number) => (
|
|
225
|
+
<Tbody key={rowIndex} isExpanded={row.isOpen}>
|
|
226
|
+
<Tr>
|
|
227
|
+
<Td
|
|
228
|
+
expand={
|
|
229
|
+
row.details
|
|
230
|
+
? {
|
|
231
|
+
rowIndex,
|
|
232
|
+
isExpanded: row.isOpen || false,
|
|
233
|
+
onToggle: onCollapse,
|
|
234
|
+
expandId: `css-vars-expandable-toggle-${cssPrefix}`,
|
|
235
|
+
}
|
|
236
|
+
: undefined
|
|
237
|
+
}
|
|
238
|
+
/>
|
|
239
|
+
<Td dataLabel="Selector">{row.cells[0]}</Td>
|
|
240
|
+
<Td dataLabel="Variable">{row.cells[1]}</Td>
|
|
241
|
+
<Td dataLabel="Value">{row.cells[2]}</Td>
|
|
242
|
+
</Tr>
|
|
243
|
+
{row.details ? (
|
|
244
|
+
<Tr isExpanded={row.isOpen}>
|
|
245
|
+
{!row.details.fullWidth ? <Td /> : null}
|
|
246
|
+
<Td dataLabel="Selector" colSpan={5}>
|
|
247
|
+
{row.details.data}
|
|
248
|
+
</Td>
|
|
249
|
+
</Tr>
|
|
250
|
+
) : null}
|
|
251
|
+
</Tbody>
|
|
252
|
+
))
|
|
253
|
+
) : (
|
|
254
|
+
<Tbody>
|
|
255
|
+
{rows.map((row, rowIndex: number) => (
|
|
256
|
+
<Tr key={rowIndex}>
|
|
257
|
+
<Td dataLabel="Variable">{row.cells[0]}</Td>
|
|
258
|
+
<Td dataLabel="Value">{row.cells[1]}</Td>
|
|
259
|
+
</Tr>
|
|
260
|
+
))}
|
|
261
|
+
</Tbody>
|
|
262
|
+
)}
|
|
263
|
+
</Table>
|
|
264
|
+
</>
|
|
265
|
+
)}
|
|
266
|
+
</Stack>
|
|
267
|
+
)
|
|
268
|
+
}
|
package/src/content.config.ts
CHANGED
|
@@ -17,8 +17,8 @@ function defineContent(contentObj: CollectionDefinition) {
|
|
|
17
17
|
// TODO: Expand for other packages that remain under the react umbrella (Table, CodeEditor, etc)
|
|
18
18
|
const tabMap: any = {
|
|
19
19
|
'react-component-docs': 'react',
|
|
20
|
-
'core-component-docs': 'html'
|
|
21
|
-
}
|
|
20
|
+
'core-component-docs': 'html',
|
|
21
|
+
}
|
|
22
22
|
|
|
23
23
|
return defineCollection({
|
|
24
24
|
loader: glob({ base: dir, pattern }),
|
|
@@ -28,7 +28,14 @@ function defineContent(contentObj: CollectionDefinition) {
|
|
|
28
28
|
subsection: z.string().optional(),
|
|
29
29
|
title: z.string().optional(),
|
|
30
30
|
propComponents: z.array(z.string()).optional(),
|
|
31
|
-
tab: z.string().optional().default(tabMap[name])
|
|
31
|
+
tab: z.string().optional().default(tabMap[name]),
|
|
32
|
+
cssPrefix: z
|
|
33
|
+
.union([
|
|
34
|
+
z.string().transform((val) => [val]),
|
|
35
|
+
z.array(z.string()),
|
|
36
|
+
z.null().transform(() => undefined),
|
|
37
|
+
])
|
|
38
|
+
.optional(),
|
|
32
39
|
}),
|
|
33
40
|
})
|
|
34
41
|
}
|
package/src/layouts/Main.astro
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
import '@patternfly/patternfly/patternfly.css'
|
|
3
|
+
import '../styles/global.scss'
|
|
3
4
|
import { ClientRouter } from 'astro:transitions'
|
|
4
5
|
|
|
5
6
|
import Page from '../components/Page.astro'
|
|
6
7
|
import Masthead from '../components/Masthead.astro'
|
|
7
8
|
import Navigation from '../components/Navigation.astro'
|
|
8
|
-
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
<html lang="en" transition:animate="none">
|
|
@@ -27,11 +27,15 @@ import Navigation from '../components/Navigation.astro'
|
|
|
27
27
|
</html>
|
|
28
28
|
|
|
29
29
|
<script>
|
|
30
|
-
const themePreference = window.localStorage.getItem
|
|
31
|
-
document
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
const themePreference = window.localStorage.getItem('theme-preference')
|
|
31
|
+
document
|
|
32
|
+
?.querySelector('html')
|
|
33
|
+
?.classList.toggle('pf-v6-theme-dark', themePreference === 'dark')
|
|
34
|
+
|
|
35
|
+
document.addEventListener('astro:after-swap', () => {
|
|
36
|
+
const themePreference = window.localStorage.getItem('theme-preference')
|
|
37
|
+
document
|
|
38
|
+
?.querySelector('html')
|
|
39
|
+
?.classList.toggle('pf-v6-theme-dark', themePreference === 'dark')
|
|
40
|
+
})
|
|
37
41
|
</script>
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { getCollection, render } from 'astro:content'
|
|
3
|
-
import { Title } from '@patternfly/react-core'
|
|
3
|
+
import { Title, Stack, StackItem } from '@patternfly/react-core'
|
|
4
4
|
import MainLayout from '../../layouts/Main.astro'
|
|
5
5
|
import { content } from '../../content'
|
|
6
6
|
import { kebabCase } from 'change-case'
|
|
7
7
|
import { componentTabs } from '../../globals'
|
|
8
8
|
import PropsTables from '../../components/PropsTables.astro'
|
|
9
|
+
import CSSTable from '../../components/CSSTable.astro'
|
|
9
10
|
|
|
10
11
|
export async function getStaticPaths() {
|
|
11
12
|
const collections = await Promise.all(
|
|
@@ -20,16 +21,18 @@ export async function getStaticPaths() {
|
|
|
20
21
|
entry,
|
|
21
22
|
title: entry.data.title,
|
|
22
23
|
propComponents: entry.data.propComponents,
|
|
24
|
+
cssPrefix: entry.data.cssPrefix,
|
|
23
25
|
},
|
|
24
26
|
}))
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
const { entry, propComponents } = Astro.props
|
|
29
|
+
const { entry, propComponents, cssPrefix } = Astro.props
|
|
28
30
|
const { title, id, section } = entry.data
|
|
29
31
|
const { Content } = await render(entry)
|
|
30
32
|
|
|
31
|
-
if(section === 'components') {
|
|
32
|
-
|
|
33
|
+
if (section === 'components') {
|
|
34
|
+
// if section is components, rewrite to first tab content
|
|
35
|
+
return Astro.rewrite(`/components/${kebabCase(id)}/${componentTabs[id][0]}`)
|
|
33
36
|
}
|
|
34
37
|
---
|
|
35
38
|
|
|
@@ -37,10 +40,17 @@ if(section === 'components') { // if section is components, rewrite to first tab
|
|
|
37
40
|
{
|
|
38
41
|
title && (
|
|
39
42
|
<Title headingLevel="h1" size="4xl">
|
|
40
|
-
{title}
|
|
43
|
+
{title}
|
|
41
44
|
</Title>
|
|
42
45
|
)
|
|
43
46
|
}
|
|
44
47
|
<Content />
|
|
45
|
-
<
|
|
48
|
+
<Stack hasGutter>
|
|
49
|
+
<StackItem>
|
|
50
|
+
<PropsTables propComponents={propComponents} server:defer />
|
|
51
|
+
</StackItem>
|
|
52
|
+
<StackItem>
|
|
53
|
+
<CSSTable cssPrefix={cssPrefix} server:defer />
|
|
54
|
+
</StackItem>
|
|
55
|
+
</Stack>
|
|
46
56
|
</MainLayout>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { getCollection, render } from 'astro:content'
|
|
3
|
-
import { Title, PageSection } from '@patternfly/react-core'
|
|
3
|
+
import { Title, PageSection, Stack, StackItem } from '@patternfly/react-core'
|
|
4
4
|
import MainLayout from '../../../layouts/Main.astro'
|
|
5
5
|
import { content } from '../../../content'
|
|
6
6
|
import { kebabCase } from 'change-case'
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
dd,
|
|
28
28
|
} from '../../../components/Content'
|
|
29
29
|
import LiveExample from '../../../components/LiveExample.astro'
|
|
30
|
+
import CSSTable from '../../../components/CSSTable.astro'
|
|
30
31
|
|
|
31
32
|
export async function getStaticPaths() {
|
|
32
33
|
const collections = await Promise.all(
|
|
@@ -62,7 +63,8 @@ export async function getStaticPaths() {
|
|
|
62
63
|
return flatCol
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
const { entry, propComponents } = Astro.props
|
|
66
|
+
const { entry, propComponents, cssPrefix } = Astro.props
|
|
67
|
+
|
|
66
68
|
const { title, id, section } = entry.data
|
|
67
69
|
const { Content } = await render(entry)
|
|
68
70
|
const currentPath = Astro.url.pathname
|
|
@@ -127,6 +129,13 @@ const currentPath = Astro.url.pathname
|
|
|
127
129
|
LiveExample,
|
|
128
130
|
}}
|
|
129
131
|
/>
|
|
130
|
-
<
|
|
132
|
+
<Stack hasGutter>
|
|
133
|
+
<StackItem>
|
|
134
|
+
<PropsTables propComponents={propComponents} server:defer />
|
|
135
|
+
</StackItem>
|
|
136
|
+
<StackItem>
|
|
137
|
+
<CSSTable cssPrefix={cssPrefix} server:defer />
|
|
138
|
+
</StackItem>
|
|
139
|
+
</Stack>
|
|
131
140
|
</PageSection>
|
|
132
141
|
</MainLayout>
|