From db101b8a4719e71383517dfbc7d706f2da052752 Mon Sep 17 00:00:00 2001 From: Cory Rylan Date: Fri, 31 Jul 2026 11:24:41 -0500 Subject: [PATCH] chore(docs): add component preview to card list - add small inline preview of the component to the card - large components like monaco have small mock html/css inlined visuals Signed-off-by: Cory Rylan --- projects/core/src/dialog/dialog.ts | 2 +- projects/core/src/drawer/drawer.ts | 2 +- projects/core/src/gauge/gauge.examples.ts | 5 +- .../core/src/notification/notification.ts | 2 +- projects/core/src/toast/toast.ts | 2 +- projects/core/src/tooltip/tooltip.ts | 2 +- .../src/markdown/markdown.examples.ts | 2 +- projects/site/src/_11ty/layouts/common.js | 30 +- projects/site/src/docs/elements/index.11ty.js | 547 +++++++++++++++++- 9 files changed, 543 insertions(+), 51 deletions(-) diff --git a/projects/core/src/dialog/dialog.ts b/projects/core/src/dialog/dialog.ts index 0492ceb136..744e6b93e1 100644 --- a/projects/core/src/dialog/dialog.ts +++ b/projects/core/src/dialog/dialog.ts @@ -21,7 +21,7 @@ import styles from './dialog.css?inline'; /** * @element nve-dialog - * @description Dialog is a component that appears above main content. A modal dialog displays critical information that requires user attention and interrupts user flow. [MDN Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) + * @description Dialog is a component that appears above main content. A modal dialog displays critical information that requires user attention and interrupts user flow. * @documentation https://nvidia.github.io/elements/docs/elements/dialog/ * @since 0.6.0 * @entrypoint \@nvidia-elements/core/dialog diff --git a/projects/core/src/drawer/drawer.ts b/projects/core/src/drawer/drawer.ts index da9a02c59d..37369391ce 100644 --- a/projects/core/src/drawer/drawer.ts +++ b/projects/core/src/drawer/drawer.ts @@ -18,7 +18,7 @@ import styles from './drawer.css?inline'; /** * @element nve-drawer - * @description Drawer are to display content that is out of context of the rest of the page (notifications, navigation, settings). Or use [Panel](./docs/elements/panel/) inline as its content couples with or closely relates to the content on the page (details, extra actions/options). [MDN Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) + * @description Drawer are to display content that is out of context of the rest of the page (notifications, navigation, settings). * @documentation https://nvidia.github.io/elements/docs/elements/drawer/ * @since 0.16.0 * @entrypoint \@nvidia-elements/core/drawer diff --git a/projects/core/src/gauge/gauge.examples.ts b/projects/core/src/gauge/gauge.examples.ts index 7c5156b76e..da9c5203b5 100644 --- a/projects/core/src/gauge/gauge.examples.ts +++ b/projects/core/src/gauge/gauge.examples.ts @@ -14,10 +14,7 @@ export default { */ export const Default = { render: () => html` -
- 50% - 66% -
+ 66% `}; /** diff --git a/projects/core/src/notification/notification.ts b/projects/core/src/notification/notification.ts index 9cb402e4b6..77e2146f88 100644 --- a/projects/core/src/notification/notification.ts +++ b/projects/core/src/notification/notification.ts @@ -20,7 +20,7 @@ import styles from './notification.css?inline'; /** * @element nve-notification - * @description Displays real time updates without interrupting the user's workflow to communicate an important message or status. [MDN Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) + * @description Displays real time updates without interrupting the user's workflow to communicate an important message or status. * @documentation https://nvidia.github.io/elements/docs/elements/notification/ * @since 0.6.0 * @entrypoint \@nvidia-elements/core/notification diff --git a/projects/core/src/toast/toast.ts b/projects/core/src/toast/toast.ts index 87f3ce44ed..e7e4b9f064 100644 --- a/projects/core/src/toast/toast.ts +++ b/projects/core/src/toast/toast.ts @@ -21,7 +21,7 @@ import styles from './toast.css?inline'; /** * @element nve-toast - * @description A contextual popup that displays a status. Toasts are [triggered](https://w3c.github.io/aria/#tooltip) by clicking, focusing, or tapping an element and cannot have interactive elements within them. [MDN Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) + * @description A contextual popup that displays a status. Toasts are [triggered](https://w3c.github.io/aria/#tooltip) by clicking, focusing, or tapping an element and cannot have interactive elements within them. * @documentation https://nvidia.github.io/elements/docs/elements/toast/ * @since 0.6.0 * @entrypoint \@nvidia-elements/core/toast diff --git a/projects/core/src/tooltip/tooltip.ts b/projects/core/src/tooltip/tooltip.ts index 107a38d588..fd5963a3e0 100644 --- a/projects/core/src/tooltip/tooltip.ts +++ b/projects/core/src/tooltip/tooltip.ts @@ -17,7 +17,7 @@ import styles from './tooltip.css?inline'; /** * @element nve-tooltip - * @description A contextual popup that displays a plaintext description. Tooltips are [triggered](https://w3c.github.io/aria/#tooltip) by hovering, focusing, or tapping an element and cannot have interactive elements within them. [MDN Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) + * @description A contextual popup that displays a plaintext description. Trigger tooltips by hovering, focusing, or tapping an element and cannot have interactive elements within them. * @documentation https://nvidia.github.io/elements/docs/elements/tooltip/ * @since 0.6.0 * @entrypoint \@nvidia-elements/core/tooltip diff --git a/projects/markdown/src/markdown/markdown.examples.ts b/projects/markdown/src/markdown/markdown.examples.ts index 7ba4f9c7b4..eec79f7979 100644 --- a/projects/markdown/src/markdown/markdown.examples.ts +++ b/projects/markdown/src/markdown/markdown.examples.ts @@ -17,7 +17,7 @@ export const Default = { render: () => html`