Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/components/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

<header class="band">
<h1>{{element.title}}</h1>

{{ element.description | safe}}

</header>

{% renderFile element.docsTemplatePath, element %}
30 changes: 23 additions & 7 deletions docs/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,7 @@ strong {
}

header.band {
background-color:
var(
--pf-c-page__main-section--BackgroundColor,
var(
--pf-c-page__main-section--m-light-100--BackgroundColor,
var(--pf-global--BackgroundColor--150, #fafafa)));
background-color: var(--pf-global--BackgroundColor--100, #fff);
padding: var(--pf-global--spacer--md, 1rem) var(--pf-global--spacer--md, 1rem);
box-shadow: var(--pf-c-page--section--m-sticky-top--BoxShadow, var(--pf-global--BoxShadow--sm-bottom, 0 0.125rem 0.25rem -0.0625rem rgba(3, 3, 3, 0.16)));
}
Expand Down Expand Up @@ -278,11 +273,33 @@ header.band h1 {
margin-top: 0;
}

.example-preview {
padding: var(--pf-global--spacer--md, 1rem);
background-color: var(--pf-global--BackgroundColor--100, #fff);
border-bottom: var(--pf-global--BorderWidth--sm, 1px) solid var(--pf-global--BorderColor--300, #f0f0f0);
transition: width .2s ease-in-out;
}

section.api.band.api-properties dl {
padding: var(--pf-global--spacer--md, 1rem);
background-color: var(--pf-global--BackgroundColor--100, #fff);
}

section.api.band.api-properties table {
background-color: var(--pf-global--BackgroundColor--100, #fff);
}

main.basic,
main.blog {
margin-top: 6.5rem;
margin-bottom: 3.75rem;
flex-grow: 1;
background-color:
var(
--pf-c-page__main-section--BackgroundColor,
var(
--pf-c-page__main-section--m-light-100--BackgroundColor,
var(--pf-global--BackgroundColor--150, #fafafa)));
}

#home-title img {
Expand Down Expand Up @@ -673,7 +690,6 @@ th, td {
}

code:not([class*="language-"]) {
background-color: rgba(27,31,35,.05);
padding: .2em .4em;
border-radius: 6px;
font-family: "Overpass Mono", monospace;
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-accordion/docs/pf-accordion.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@

{% renderCssCustomProperties %}{% endrenderCssCustomProperties %}

{% renderCssParts %}{% endrenderCssParts %}
{% renderCssParts %}{% endrenderCssParts %}
2 changes: 1 addition & 1 deletion elements/pf-accordion/pf-accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export * from './pf-accordion-panel.js';
import style from './pf-accordion.css';

/**
* An accordion is an interactive container that expands and collapses to hide or reveal nested content. It takes advantage of progressive disclosure to help reduce page scrolling, by allowing users to choose whether they want to show or hide more detailed information as needed.
* An **accordion** is an interactive container that expands and collapses to hide or reveal nested content. It takes advantage of progressive disclosure to help reduce page scrolling, by allowing users to choose whether they want to show or hide more detailed information as needed.
*
* @summary Toggle the visibility of sections of content
*
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-avatar/pf-avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BaseAvatar } from './BaseAvatar.js';
import style from './pf-avatar.css';

/**
* An avatar is a visual used to represent a user. It may contain an image or a placeholder graphic.
* An **avatar** is a visual used to represent a user. It may contain an image or a placeholder graphic.
*
* @summary For displaying a user's avatar image
*/
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-badge/pf-badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BaseBadge } from './BaseBadge.js';
import styles from './pf-badge.css';

/**
* A badge is used to annotate other information like a label or an object name.
* A **badge** is used to annotate other information like a label or an object name.
*
* @cssprop {<length>} --pf-c-badge--BorderRadius {@default `180em`}
*
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-button/pf-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type ButtonVariant = (
);

/**
* A button is a box area or text that communicates and triggers user actions when
* A **button** is a box area or text that communicates and triggers user actions when
* clicked or selected. Buttons can be used to communicate and immediately trigger
* actions a user can take in an application, like submitting a form, canceling a
* process, or creating a new object. Buttons can also be used to take a user to a
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-card/pf-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import style from './pf-card.css';
import { BaseCard } from './BaseCard.js';

/**
* A card is a square or rectangular container that can contain any kind of content.
* A **card** is a square or rectangular container that can contain any kind of content.
* Cards symbolize units of information, and each one acts as an entry point for
* users to access more details. For example, in dashboards and catalog views, cards
* function as a preview of a detailed page. Cards may also be used in data displays
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-clipboard-copy/pf-clipboard-copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import '@patternfly/elements/pf-tooltip/pf-tooltip.js';
const sleep = (ms?: number) => new Promise(r => setTimeout(r, ms));

/**
* The clipboard copy component allows users to quickly and easily copy content to their clipboard.
* The **clipboard copy** component allows users to quickly and easily copy content to their clipboard.
*
* @slot - Place content to copy here, or use the `value` attribute
* @slot actions - Place additional action buttons here
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-code-block/pf-code-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BaseCodeBlock } from './BaseCodeBlock.js';
import styles from './pf-code-block.css';

/**
* A code block is a component that contains 2 or more lines of read-only code. The code in a code block can be copied to the clipboard.
* A **code block** is a component that contains 2 or more lines of read-only code. The code in a code block can be copied to the clipboard.
*
* @slot code
* The slot to put the code in
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-icon/pf-icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { property } from 'lit/decorators/property.js';
import style from './pf-icon.css';

/**
* An icon component is a container that allows for icons of varying dimensions to
* An **icon** component is a container that allows for icons of varying dimensions to
* seamlessly replace each other without shifting surrounding content.
*
* @slot - Slotted content is used as a fallback in case the icon doesn't load
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-jump-links/pf-jump-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import './pf-jump-links-item.js';
import style from './pf-jump-links.css';

/**
* Jump links allow users to navigate to sections within a page.
* **Jump links** allow users to navigate to sections within a page.
*
* @fires toggle - when the `expanded` disclosure widget is toggled
* @slot - Place pf-jump-links-items here
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-label/pf-label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type LabelColor = (
)

/**
* The label component allows users to add specific element captions for user
* The **label** component allows users to add specific element captions for user
* clarity and convenience.
*
* @summary Allows users to display meta data in a stylized form.
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-modal/pf-modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class ModalOpenEvent extends ComposedEvent {
}

/**
* A modal displays important information to a user without requiring them to navigate
* A **modal** displays important information to a user without requiring them to navigate
* to a new page.
*
* @summary Displays information or helps a user focus on a task
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-panel/pf-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SlotController } from '@patternfly/pfe-core/controllers/slot-controller
import styles from './pf-panel.css';

/**
* The panel component is a container that supports flexible content layouts. It can
* The **panel** component is a container that supports flexible content layouts. It can
* be used to house other components such as fields, forms, videos, buttons, and more.
* The panel should not be confused with the [drawer](https://www.patternfly.org/v4/components/drawer/design-guidelines/)
* component, which allows you to surface information via a collapsable container.
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-progress-stepper/pf-progress-stepper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { InternalsController } from '@patternfly/pfe-core/controllers/internals-
import '@patternfly/elements/pf-icon/pf-icon.js';

/**
* A progress stepper displays a timeline of tasks in a workflow and tracks the user's current progress through this workflow.
* A **progress stepper** displays a timeline of tasks in a workflow and tracks the user's current progress through this workflow.
*/
@customElement('pf-progress-stepper')
export class PfProgressStepper extends LitElement {
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-spinner/pf-spinner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BaseSpinner } from './BaseSpinner.js';
import styles from './pf-spinner.css';

/**
* A spinner is used to indicate to users that an action is in progress. For actions
* A **spinner** is used to indicate to users that an action is in progress. For actions
* that may take a long time, use a progress bar instead.
*
* @cssprop {<length>} --pf-c-spinner--diameter {@default `3.375rem`}
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-switch/pf-switch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BaseSwitch } from './BaseSwitch.js';
import styles from './pf-switch.css';

/**
* A switch toggles the state of a setting (between on and off). Switches and
* A **switch** toggles the state of a setting (between on and off). Switches and
* checkboxes can often be used interchangeably, but the switch provides a more
* explicit, visible representation on a setting.
*
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-tabs/pf-tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { PfTabPanel } from './pf-tab-panel.js';
import styles from './pf-tabs.css';

/**
* Tabs allow users to navigate between views within the same page or context.
* **Tabs** allow users to navigate between views within the same page or context.
*
* @attr {number} active-key - DOM Property: `activeKey` {@default `0`}
*
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-tile/pf-tile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type StackedSize = (
)

/**
* A tile component is a form of selection that can be used in place of a
* A **tile** component is a form of selection that can be used in place of a
* radio button and is commonly used in forms. A tile appears visually similar to a
* [selectable card](../card/). However, tiles are used specifically when the user is selecting
* a static option, whereas a selectable card triggers an action or opens a quickstart
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-timestamp/pf-timestamp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const BooleanStringConverter: ComplexAttributeConverter = {
};

/**
* A timestamp provides consistent formats for displaying date and time values.
* A **timestamp** provides consistent formats for displaying date and time values.
*/
@customElement('pf-timestamp')
export class PfTimestamp extends LitElement {
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-tooltip/pf-tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { BaseTooltip } from './BaseTooltip.js';
import styles from './pf-tooltip.css';

/**
* A tooltip is in-app messaging used to identify elements on a page with short,
* A **tooltip** is in-app messaging used to identify elements on a page with short,
* clarifying text.
*
* @summary Toggle the visibility of helpful or contextual information.
Expand Down
4 changes: 3 additions & 1 deletion eleventy.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ module.exports = function(eleventyConfig) {

eleventyConfig.addPairedShortcode('htmlexample', function(content, kwargs) {
return `
${content}
<div class="example-preview">
${content}
</div>
<details class="html-example ${kwargs?.class ?? ''}"${!kwargs?.style ? '' : ` style="${kwargs.style}"`}>
<summary>View HTML Source</summary>

Expand Down
2 changes: 1 addition & 1 deletion tools/pfe-tools/11ty/templates/attributes.njk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set level = level or 2 %}
{% set header = header or 'Attributes' %}

<section class="band api attributes">
<section class="band api attributes api-properties">
<h{{level}}>{{ header | innerMD | safe }}</h{{level}}> {% if not content and not attributes.length %}

<em>None</em> {%- else -%}
Expand Down
3 changes: 2 additions & 1 deletion tools/pfe-tools/11ty/templates/css-custom-properties.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</tr>
{%- endmacro -%}

<section class="api band css-custom-properties">
<section class="api band css-custom-properties api-properties">
<a id="styling-hooks"></a>
<h{{level}}>{{ header | innerMD | safe }}</h{{level}}> {% if not content and not cssProperties.length %}

Expand Down Expand Up @@ -60,6 +60,7 @@
</section>

<style>

table.css-custom-properties code[data-color] {
display: inline-flex;
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion tools/pfe-tools/11ty/templates/css-shadow-parts.njk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set level = level or 2 %}
{% set header = header or 'CSS Shadow Parts' %}

<section class="api band css-shadow-parts">
<section class="api band css-shadow-parts api-properties">
<h{{level}}>{{ header | innerMD | safe }}</h{{level}}> {% if not content and not parts.length %}

<em>None</em> {%- else -%}
Expand Down
2 changes: 1 addition & 1 deletion tools/pfe-tools/11ty/templates/events.njk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set level = level or 2 %}
{% set header = header or 'Events' %}

<section class="api band events">
<section class="api band events api-properties">
<h{{level}}>{{ header | innerMD | safe }}</h{{level}}> {% if not content and not events.length %}

<em>None</em> {% else %}
Expand Down
2 changes: 1 addition & 1 deletion tools/pfe-tools/11ty/templates/methods.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{# TODO: inline code highlighting for type and default: render the markdown to html and extract the `<code>` from the `<pre>` #}

<section class="api band methods">
<section class="api band methods api-properties">
<h{{level}}>{{ header | innerMD | safe }}</h{{level}}> {% if not content and not methods.length %}

<em>None</em> {% else %}
Expand Down
6 changes: 3 additions & 3 deletions tools/pfe-tools/11ty/templates/overview.njk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<section class="band overview">
<h2>Overview</h2>

{{ description | safe }}

{{ content | safe }}
<div class="example-preview">
{{ content | safe }}
</div>

</section>

Expand Down
2 changes: 1 addition & 1 deletion tools/pfe-tools/11ty/templates/properties.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{# TODO: inline code highlighting for type and default: render the markdown to html and extract the `<code>` from the `<pre>` #}

<section class="api band properties">
<section class="api band properties api-properties">
<h{{level}}>{{ header | innerMD | safe }}</h{{level}}> {% if not content and not properties.length %}

<em>None</em> {% else %}
Expand Down
2 changes: 1 addition & 1 deletion tools/pfe-tools/11ty/templates/slots.njk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set level = level or 2 %}
{% set header = header or 'Slots' %}

<section class="api band slots">
<section class="api band slots api-properties">
<h{{level}}>{{ header | innerMD | safe }}</h{{level}}> {% if not content and not slots.length %}

<em>None</em> {%- else -%}
Expand Down