+
All components (A-Z)
-
+
{all.map((node: IComponentNavItem) => )}
diff --git a/www/src/components/MeasuredItem.tsx b/www/src/components/MeasuredItem.tsx
index 646cafcc54..77e7ab3078 100644
--- a/www/src/components/MeasuredItem.tsx
+++ b/www/src/components/MeasuredItem.tsx
@@ -41,8 +41,6 @@ function MeasuredItem({
}, {});
setMeasurements(measurementsItems);
};
- // Needs a moment to finish switching theme and re-render children to DOM first.
- setMeasurements(initialMeasurements);
const timeout = setTimeout(measure, 1000);
return () => clearTimeout(timeout);
},
@@ -51,9 +49,9 @@ function MeasuredItem({
return (
<>
- {renderBefore ? renderBefore(measurements) : null}
+ {renderBefore?.(measurements)}
{React.cloneElement(children as React.ReactElement, { ref: itemRef })}
- {renderAfter ? renderAfter(measurements) : null}
+ {renderAfter?.(measurements)}
>
);
}
diff --git a/www/src/components/Menu.scss b/www/src/components/Menu.scss
index 9b885eb332..e444c50f47 100644
--- a/www/src/components/Menu.scss
+++ b/www/src/components/Menu.scss
@@ -7,7 +7,7 @@
border-right: var(--pgn-size-border-width) solid var(--pgn-color-light-400);
.pgn-doc__menu-title {
- font-size: var(--pgn-typography-font-size-h4);
+ font-size: var(--pgn-typography-font-size-h4-base);
line-height: var(--pgn-typography-line-height-base);
font-weight: var(--pgn-typography-font-weight-normal);
color: var(--pgn-color-gray-700);
@@ -24,7 +24,7 @@
.btn {
width: 50%;
- font-size: var(--pgn-typography-font-size-xs);
+ font-size: var(--pgn-typography-font-size-sm);
line-height: var(--pgn-typography-headings-line-height);
}
}
@@ -40,7 +40,7 @@
margin-bottom: var(--pgn-spacing-spacer-base);
.pgn_collapsible {
- font-size: var(--pgn-typography-font-size-xs);
+ font-size: var(--pgn-typography-font-size-sm);
line-height: var(--pgn-typography-headings-line-height);
font-weight: var(--pgn-typography-font-weight-normal);
color: var(--pgn-color-gray-700);
@@ -86,7 +86,6 @@
}
.collapsible-basic .collapsible-trigger {
- font-size: var(--pgn-typography-font-size-sm);
text-decoration: none;
justify-content: start;
flex-direction: row-reverse;
diff --git a/www/src/components/TableCells.tsx b/www/src/components/TableCells.tsx
index 2dd00c84a2..339aefb06b 100644
--- a/www/src/components/TableCells.tsx
+++ b/www/src/components/TableCells.tsx
@@ -6,6 +6,18 @@ export type CodeCellType = {
value: string | number | undefined,
};
+export type ClassNameRowType = {
+ className: string | undefined,
+ text: string,
+ hasClass?: boolean,
+};
+
+export type ClassNameCellType = {
+ row: {
+ original: ClassNameRowType,
+ },
+} & CodeCellType;
+
export type DataTableRowType = {
row: {
original: {
@@ -17,13 +29,17 @@ export type DataTableRowType = {
},
};
-export function ClassNameCell({ value }: CodeCellType) {
+export function ClassNameCell({ row, value }: ClassNameCellType) {
+ if (row.original.hasClass === false) {
+ return null;
+ }
+
if (!value) {
return null;
}
return (
-
+
.{value}
);
@@ -31,7 +47,7 @@ export function ClassNameCell({ value }: CodeCellType) {
export function TextCell({ value }: CodeCellType) {
return (
-
+
{value}
);
@@ -39,7 +55,7 @@ export function TextCell({ value }: CodeCellType) {
export function CodeCell({ value }: CodeCellType) {
return (
-
+
{value}
);
@@ -69,7 +85,7 @@ export function MobileMeasuredCell({ row } : DataTableRowType) {
export function StyleCell({ row } : DataTableRowType) {
return (
-
+
{row.original.text}
);
diff --git a/www/src/components/_CodeBlock.scss b/www/src/components/_CodeBlock.scss
index bfff2bae46..99f6d3dfc8 100644
--- a/www/src/components/_CodeBlock.scss
+++ b/www/src/components/_CodeBlock.scss
@@ -1,10 +1,11 @@
.pgn-doc__code-block {
margin: var(--pgn-spacing-spacer-base) 0 2rem;
- background-color: var(--pgn-color-light-200);
- border: solid 2px var(--pgn-color-light-300);
- border-radius: var(--pgn-size-border-radius-base);
.pgn-doc__code-block-preview {
+ background-color: var(--pgn-color-light-200);
+ border: solid 2px var(--pgn-color-light-300);
+ border-bottom: 0;
+ border-radius: var(--pgn-size-border-radius-base) var(--pgn-size-border-radius-base) 0 0;
padding: var(--pgn-spacing-spacer-base);
}
diff --git a/www/src/components/_doc-elements.scss b/www/src/components/_doc-elements.scss
index 94d3e937cd..f020023563 100644
--- a/www/src/components/_doc-elements.scss
+++ b/www/src/components/_doc-elements.scss
@@ -327,6 +327,52 @@
.color-palette {
display: grid;
- grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
- grid-row-gap: 2rem;
+ grid-gap: 2rem;
+ grid-template-columns: repeat(2, 1fr); // Default to 2 columns
+}
+
+@media (--pgn-size-breakpoint-min-width-md) {
+ .color-palette {
+ grid-template-columns: repeat(3, 1fr); // 3 columns for medium+ screens
+ }
+}
+
+@media (--pgn-size-breakpoint-min-width-lg) {
+ .color-palette {
+ grid-template-columns: repeat(4, 1fr); // 4 columns for large+ screens
+ }
+}
+
+.pgn-doc__code-display-block,
+.pgn-doc__code-headings-block {
+ .pgn__data-table-cell-wrap {
+ max-width: max-content;
+ }
+
+ @media (--pgn-size-breakpoint-max-width-md) {
+ overflow: hidden;
+ overflow-x: scroll;
+
+ .pgn__data-table-layout-wrapper {
+ overflow-x: initial;
+ }
+ }
+
+ .heading-label {
+ font-size: var(--pgn-typography-font-size-base);
+ line-height: var(--pgn-typography-line-height-base);
+ }
+}
+
+.pgn-doc__code-body-block {
+ .lead,
+ .font-size-normal,
+ .small,
+ .x-small {
+ line-height: var(--pgn-typography-line-height-base);
+ }
+
+ .pgn__data-table-wrapper {
+ font-size: inherit;
+ }
}
diff --git a/www/src/components/header/Header.scss b/www/src/components/header/Header.scss
index 327433df9d..ddd9dad3f2 100644
--- a/www/src/components/header/Header.scss
+++ b/www/src/components/header/Header.scss
@@ -17,12 +17,12 @@
}
&-logo {
- font-size: var(--pgn-typography-font-size-mobile-h1);
- line-height: var(--pgn-typography-display-line-height-base);
+ font-size: var(--pgn-typography-font-size-h1-mobile);
+ line-height: var(--pgn-typography-line-height-display-base);
}
&-heading {
- font-size: var(--pgn-typography-font-size-h3);
+ font-size: var(--pgn-typography-font-size-h3-base);
line-height: var(--pgn-typography-line-height-base);
margin: 0;
color: var(--pgn-color-white);
diff --git a/www/src/components/header/Navbar.tsx b/www/src/components/header/Navbar.tsx
index ffef619923..dd7f188ec7 100644
--- a/www/src/components/header/Navbar.tsx
+++ b/www/src/components/header/Navbar.tsx
@@ -35,7 +35,7 @@ export default function Navbar({
return (
-
+
{showMinimizedTitle && (