@nvidia/foundations-css 0.0.0-stage → 1.25.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/CHANGELOG.md +22 -0
- package/LICENSE.md +203 -0
- package/NOTICE.md +62 -0
- package/README.md +61 -2
- package/dist/base/a11y.css +1 -0
- package/dist/base/all.js +1225 -0
- package/dist/base/anchor.css +1 -0
- package/dist/base/base-external.css +15 -0
- package/dist/base/base-for-aem-only.css +15 -0
- package/dist/base/base.css +15 -0
- package/dist/base/fonts-external.css +1 -0
- package/dist/base/fonts.css +1 -0
- package/dist/base/icons.css +15 -0
- package/dist/base/motion.css +1 -0
- package/dist/base/reset.css +1 -0
- package/dist/base/theme-dark.css +1 -0
- package/dist/base/theme-density.css +1 -0
- package/dist/base/theme-light.css +1 -0
- package/dist/base/theme-only-dark.css +1 -0
- package/dist/base/top-layer-reset.css +1 -0
- package/dist/base/variables.css +1 -0
- package/dist/components/accordion.css +1 -0
- package/dist/components/all.css +1 -0
- package/dist/components/all.js +16789 -0
- package/dist/components/anchor.css +1 -0
- package/dist/components/animated-chevron.css +1 -0
- package/dist/components/app-bar.css +1 -0
- package/dist/components/attachment.css +1 -0
- package/dist/components/audio.css +1 -0
- package/dist/components/autocomplete.css +1 -0
- package/dist/components/avatar-group.css +1 -0
- package/dist/components/avatar.css +1 -0
- package/dist/components/badge.css +1 -0
- package/dist/components/banner.css +1 -0
- package/dist/components/block.css +1 -0
- package/dist/components/breadcrumbs.css +1 -0
- package/dist/components/button.css +1 -0
- package/dist/components/card.css +1 -0
- package/dist/components/carousel.css +1 -0
- package/dist/components/chat-bubble.css +1 -0
- package/dist/components/checkbox.css +1 -0
- package/dist/components/code-snippet.css +1 -0
- package/dist/components/collapsible.css +1 -0
- package/dist/components/combobox.css +1 -0
- package/dist/components/command.css +1 -0
- package/dist/components/context-menu.css +1 -0
- package/dist/components/date-picker.css +1 -0
- package/dist/components/divider.css +1 -0
- package/dist/components/dropdown.css +1 -0
- package/dist/components/flex.css +1 -0
- package/dist/components/form-field.css +1 -0
- package/dist/components/grid-item.css +1 -0
- package/dist/components/grid.css +1 -0
- package/dist/components/group.css +1 -0
- package/dist/components/halo.css +1 -0
- package/dist/components/hero.css +1 -0
- package/dist/components/horizontal-nav.css +1 -0
- package/dist/components/hover-card.css +1 -0
- package/dist/components/inline-notice.css +1 -0
- package/dist/components/input-shell.css +1 -0
- package/dist/components/jump-nav.css +1 -0
- package/dist/components/kbd.css +1 -0
- package/dist/components/key-value-editor.css +1 -0
- package/dist/components/key-value-group.css +1 -0
- package/dist/components/label.css +1 -0
- package/dist/components/legend.css +1 -0
- package/dist/components/list.css +1 -0
- package/dist/components/menu-bar.css +1 -0
- package/dist/components/menu.css +1 -0
- package/dist/components/meter.css +1 -0
- package/dist/components/modal.css +1 -0
- package/dist/components/notification.css +1 -0
- package/dist/components/otp-input.css +1 -0
- package/dist/components/page-header.css +1 -0
- package/dist/components/pagination.css +1 -0
- package/dist/components/panel.css +1 -0
- package/dist/components/popover.css +1 -0
- package/dist/components/primitive.css +1 -0
- package/dist/components/progress-bar.css +1 -0
- package/dist/components/radio-group.css +1 -0
- package/dist/components/range-slider.css +1 -0
- package/dist/components/rating.css +1 -0
- package/dist/components/reaction-group.css +1 -0
- package/dist/components/resizable.css +1 -0
- package/dist/components/segmented-control.css +1 -0
- package/dist/components/segmented-meter.css +1 -0
- package/dist/components/select.css +1 -0
- package/dist/components/severity.css +1 -0
- package/dist/components/side-panel.css +1 -0
- package/dist/components/skeleton.css +1 -0
- package/dist/components/slider.css +1 -0
- package/dist/components/spinner.css +1 -0
- package/dist/components/status-indicator.css +1 -0
- package/dist/components/status-message.css +1 -0
- package/dist/components/stepper.css +1 -0
- package/dist/components/switch.css +1 -0
- package/dist/components/table.css +1 -0
- package/dist/components/tabs.css +1 -0
- package/dist/components/tag-group.css +1 -0
- package/dist/components/tag.css +1 -0
- package/dist/components/terminal-line.css +1 -0
- package/dist/components/text-area.css +1 -0
- package/dist/components/text-content.css +1 -0
- package/dist/components/text.css +1 -0
- package/dist/components/toast.css +1 -0
- package/dist/components/toaster.css +1 -0
- package/dist/components/toggle-button-group.css +1 -0
- package/dist/components/toggle-button.css +1 -0
- package/dist/components/tooltip.css +1 -0
- package/dist/components/tree-nav.css +1 -0
- package/dist/components/upload.css +1 -0
- package/dist/components/vertical-nav.css +1 -0
- package/dist/css-sizes.js +1289 -0
- package/dist/index.cjs +3049 -0
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +3022 -0
- package/dist/plugins/tailwind-theme.css +505 -0
- package/dist/plugins/tailwind3-theme.js +683 -0
- package/dist/plugins/variables-sass.sass +415 -0
- package/dist/themes/kui11/_theme-selectors.css +1 -0
- package/dist/themes/kui11/accordion.css +1 -0
- package/dist/themes/kui11/app-bar.css +1 -0
- package/dist/themes/kui11/avatar.css +1 -0
- package/dist/themes/kui11/badge.css +1 -0
- package/dist/themes/kui11/banner.css +1 -0
- package/dist/themes/kui11/base.css +1 -0
- package/dist/themes/kui11/breadcrumbs.css +1 -0
- package/dist/themes/kui11/button.css +1 -0
- package/dist/themes/kui11/card.css +1 -0
- package/dist/themes/kui11/checkbox.css +1 -0
- package/dist/themes/kui11/components.css +1 -0
- package/dist/themes/kui11/date-picker.css +1 -0
- package/dist/themes/kui11/form-field.css +1 -0
- package/dist/themes/kui11/hero.css +1 -0
- package/dist/themes/kui11/horizontal-nav.css +1 -0
- package/dist/themes/kui11/input-shell.css +1 -0
- package/dist/themes/kui11/label.css +1 -0
- package/dist/themes/kui11/menu.css +1 -0
- package/dist/themes/kui11/modal.css +1 -0
- package/dist/themes/kui11/notification.css +1 -0
- package/dist/themes/kui11/page-header.css +1 -0
- package/dist/themes/kui11/pagination.css +1 -0
- package/dist/themes/kui11/popover.css +1 -0
- package/dist/themes/kui11/progress-bar.css +1 -0
- package/dist/themes/kui11/radio-group.css +1 -0
- package/dist/themes/kui11/range-slider.css +1 -0
- package/dist/themes/kui11/side-panel.css +1 -0
- package/dist/themes/kui11/slider.css +1 -0
- package/dist/themes/kui11/spinner.css +1 -0
- package/dist/themes/kui11/status-message.css +1 -0
- package/dist/themes/kui11/switch.css +1 -0
- package/dist/themes/kui11/table.css +1 -0
- package/dist/themes/kui11/tabs.css +1 -0
- package/dist/themes/kui11/tag.css +1 -0
- package/dist/themes/kui11/text-area.css +1 -0
- package/dist/themes/kui11/text-input.css +1 -0
- package/dist/themes/kui11/text.css +1 -0
- package/dist/themes/kui11/toast.css +1 -0
- package/dist/themes/kui11/tooltip.css +1 -0
- package/dist/themes/kui11/vertical-nav.css +1 -0
- package/dist/themes/kui11.base.css +1 -0
- package/dist/themes/kui11.base.js +935 -0
- package/dist/themes/kui11.components.css +1 -0
- package/dist/themes/kui11.components.js +2564 -0
- package/dist/themes/kui11.css +1 -0
- package/dist/themes/theme-partials.js +458 -0
- package/dist/utilities/all.js +442 -0
- package/dist/utilities/typography-utils.css +1 -0
- package/package.json +106 -3
- package/scripts/sync-skills.mjs +237 -0
- package/skills/kaizen-ui-html-css/SKILL.md +295 -0
- package/skills/kaizen-ui-html-css/assets/color-primitives-hex.md +141 -0
- package/skills/kaizen-ui-html-css/references/blocks/chat-input.md +94 -0
- package/skills/kaizen-ui-html-css/references/blocks/notification-center.md +320 -0
- package/skills/kaizen-ui-html-css/references/blocks/timeline.md +579 -0
- package/skills/kaizen-ui-html-css/references/components/Accordion.md +88 -0
- package/skills/kaizen-ui-html-css/references/components/Anchor.md +29 -0
- package/skills/kaizen-ui-html-css/references/components/AnimatedChevron.md +31 -0
- package/skills/kaizen-ui-html-css/references/components/AppBar.md +129 -0
- package/skills/kaizen-ui-html-css/references/components/Attachment.md +306 -0
- package/skills/kaizen-ui-html-css/references/components/Audio.md +21 -0
- package/skills/kaizen-ui-html-css/references/components/Autocomplete.md +29 -0
- package/skills/kaizen-ui-html-css/references/components/Avatar.md +28 -0
- package/skills/kaizen-ui-html-css/references/components/AvatarGroup.md +38 -0
- package/skills/kaizen-ui-html-css/references/components/Badge.md +121 -0
- package/skills/kaizen-ui-html-css/references/components/Banner.md +49 -0
- package/skills/kaizen-ui-html-css/references/components/Block.md +26 -0
- package/skills/kaizen-ui-html-css/references/components/Breadcrumbs.md +42 -0
- package/skills/kaizen-ui-html-css/references/components/Button.md +43 -0
- package/skills/kaizen-ui-html-css/references/components/ButtonGroup.md +32 -0
- package/skills/kaizen-ui-html-css/references/components/Card.md +39 -0
- package/skills/kaizen-ui-html-css/references/components/Carousel.md +53 -0
- package/skills/kaizen-ui-html-css/references/components/ChatBubble.md +28 -0
- package/skills/kaizen-ui-html-css/references/components/Checkbox.md +32 -0
- package/skills/kaizen-ui-html-css/references/components/CodeSnippet.md +33 -0
- package/skills/kaizen-ui-html-css/references/components/Collapsible.md +56 -0
- package/skills/kaizen-ui-html-css/references/components/Combobox.md +66 -0
- package/skills/kaizen-ui-html-css/references/components/Command.md +100 -0
- package/skills/kaizen-ui-html-css/references/components/ContextMenu.md +61 -0
- package/skills/kaizen-ui-html-css/references/components/DatePicker.md +30 -0
- package/skills/kaizen-ui-html-css/references/components/Divider.md +77 -0
- package/skills/kaizen-ui-html-css/references/components/Dropdown.md +94 -0
- package/skills/kaizen-ui-html-css/references/components/Flex.md +33 -0
- package/skills/kaizen-ui-html-css/references/components/FormField.md +35 -0
- package/skills/kaizen-ui-html-css/references/components/Grid.md +27 -0
- package/skills/kaizen-ui-html-css/references/components/Group.md +92 -0
- package/skills/kaizen-ui-html-css/references/components/Halo.md +26 -0
- package/skills/kaizen-ui-html-css/references/components/Hero.md +29 -0
- package/skills/kaizen-ui-html-css/references/components/HorizontalNav.md +34 -0
- package/skills/kaizen-ui-html-css/references/components/HoverCard.md +23 -0
- package/skills/kaizen-ui-html-css/references/components/Inline.md +49 -0
- package/skills/kaizen-ui-html-css/references/components/InlineNotice.md +96 -0
- package/skills/kaizen-ui-html-css/references/components/InputShell.md +26 -0
- package/skills/kaizen-ui-html-css/references/components/JumpNav.md +36 -0
- package/skills/kaizen-ui-html-css/references/components/Kbd.md +32 -0
- package/skills/kaizen-ui-html-css/references/components/KeyValueEditor.md +275 -0
- package/skills/kaizen-ui-html-css/references/components/KeyValueGroup.md +35 -0
- package/skills/kaizen-ui-html-css/references/components/Label.md +86 -0
- package/skills/kaizen-ui-html-css/references/components/Legend.md +148 -0
- package/skills/kaizen-ui-html-css/references/components/List.md +143 -0
- package/skills/kaizen-ui-html-css/references/components/Menu.md +103 -0
- package/skills/kaizen-ui-html-css/references/components/MenuBar.md +91 -0
- package/skills/kaizen-ui-html-css/references/components/Meter.md +27 -0
- package/skills/kaizen-ui-html-css/references/components/Modal.md +60 -0
- package/skills/kaizen-ui-html-css/references/components/Notification.md +48 -0
- package/skills/kaizen-ui-html-css/references/components/NumberInput.md +15 -0
- package/skills/kaizen-ui-html-css/references/components/OtpInput.md +51 -0
- package/skills/kaizen-ui-html-css/references/components/PageHeader.md +61 -0
- package/skills/kaizen-ui-html-css/references/components/Pagination.md +63 -0
- package/skills/kaizen-ui-html-css/references/components/Panel.md +133 -0
- package/skills/kaizen-ui-html-css/references/components/Popover.md +31 -0
- package/skills/kaizen-ui-html-css/references/components/ProgressBar.md +187 -0
- package/skills/kaizen-ui-html-css/references/components/RadioGroup.md +32 -0
- package/skills/kaizen-ui-html-css/references/components/RangeSlider.md +62 -0
- package/skills/kaizen-ui-html-css/references/components/Rating.md +69 -0
- package/skills/kaizen-ui-html-css/references/components/ReactionGroup.md +30 -0
- package/skills/kaizen-ui-html-css/references/components/Resizable.md +31 -0
- package/skills/kaizen-ui-html-css/references/components/SegmentedControl.md +36 -0
- package/skills/kaizen-ui-html-css/references/components/SegmentedMeter.md +200 -0
- package/skills/kaizen-ui-html-css/references/components/Select.md +39 -0
- package/skills/kaizen-ui-html-css/references/components/Severity.md +25 -0
- package/skills/kaizen-ui-html-css/references/components/SidePanel.md +42 -0
- package/skills/kaizen-ui-html-css/references/components/Skeleton.md +24 -0
- package/skills/kaizen-ui-html-css/references/components/Slider.md +32 -0
- package/skills/kaizen-ui-html-css/references/components/Spinner.md +63 -0
- package/skills/kaizen-ui-html-css/references/components/Stack.md +17 -0
- package/skills/kaizen-ui-html-css/references/components/StatusIndicator.md +30 -0
- package/skills/kaizen-ui-html-css/references/components/StatusMessage.md +78 -0
- package/skills/kaizen-ui-html-css/references/components/Stepper.md +57 -0
- package/skills/kaizen-ui-html-css/references/components/Switch.md +96 -0
- package/skills/kaizen-ui-html-css/references/components/Table.md +566 -0
- package/skills/kaizen-ui-html-css/references/components/Tabs.md +67 -0
- package/skills/kaizen-ui-html-css/references/components/Tag.md +194 -0
- package/skills/kaizen-ui-html-css/references/components/TagGroup.md +32 -0
- package/skills/kaizen-ui-html-css/references/components/TerminalLine.md +69 -0
- package/skills/kaizen-ui-html-css/references/components/Text.md +27 -0
- package/skills/kaizen-ui-html-css/references/components/TextArea.md +28 -0
- package/skills/kaizen-ui-html-css/references/components/TextContent.md +61 -0
- package/skills/kaizen-ui-html-css/references/components/TextInput.md +29 -0
- package/skills/kaizen-ui-html-css/references/components/TimeInput.md +17 -0
- package/skills/kaizen-ui-html-css/references/components/Toast.md +41 -0
- package/skills/kaizen-ui-html-css/references/components/Toaster.md +19 -0
- package/skills/kaizen-ui-html-css/references/components/ToggleButton.md +47 -0
- package/skills/kaizen-ui-html-css/references/components/ToggleButtonGroup.md +29 -0
- package/skills/kaizen-ui-html-css/references/components/Tooltip.md +45 -0
- package/skills/kaizen-ui-html-css/references/components/TreeNav.md +58 -0
- package/skills/kaizen-ui-html-css/references/components/Upload.md +90 -0
- package/skills/kaizen-ui-html-css/references/components/VerticalNav.md +65 -0
- package/skills/kaizen-ui-html-css/references/design-tokens/CHART_DATA_COLORS.md +56 -0
- package/skills/kaizen-ui-html-css/references/design-tokens/COLORS.md +148 -0
- package/skills/kaizen-ui-html-css/references/design-tokens/COLOR_PRIMITIVES.md +31 -0
- package/skills/kaizen-ui-html-css/references/design-tokens/EFFECTS_AND_LAYOUT.md +50 -0
- package/skills/kaizen-ui-html-css/references/design-tokens/SPACING_SCALE.md +36 -0
- package/skills/kaizen-ui-html-css/references/design-tokens/TYPOGRAPHY.md +44 -0
- package/skills/kaizen-ui-html-css/references/guides/CONFIGURATION.md +42 -0
- package/skills/kaizen-ui-html-css/references/guides/HTML_STRUCTURE.md +134 -0
- package/skills/kaizen-ui-html-css/references/patterns/activity-feed.md +132 -0
- package/skills/kaizen-ui-html-css/references/patterns/confirmations.md +133 -0
- package/skills/kaizen-ui-html-css/references/patterns/data-display.md +127 -0
- package/skills/kaizen-ui-html-css/references/patterns/data-visualization.md +73 -0
- package/skills/kaizen-ui-html-css/references/patterns/element-visibility.md +83 -0
- package/skills/kaizen-ui-html-css/references/patterns/empty-states.md +116 -0
- package/skills/kaizen-ui-html-css/references/patterns/entity-cards.md +172 -0
- package/skills/kaizen-ui-html-css/references/patterns/error-states.md +163 -0
- package/skills/kaizen-ui-html-css/references/patterns/feedback.md +77 -0
- package/skills/kaizen-ui-html-css/references/patterns/filters.md +167 -0
- package/skills/kaizen-ui-html-css/references/patterns/forms.md +215 -0
- package/skills/kaizen-ui-html-css/references/patterns/key-value-display.md +195 -0
- package/skills/kaizen-ui-html-css/references/patterns/loading.md +104 -0
- package/skills/kaizen-ui-html-css/references/patterns/navigation.md +154 -0
- package/skills/kaizen-ui-html-css/references/patterns/ranked-lists.md +60 -0
- package/skills/kaizen-ui-html-css/references/patterns/search.md +46 -0
- package/skills/kaizen-ui-html-css/references/patterns/settings.md +106 -0
- package/skills/kaizen-ui-html-css/references/patterns/stat-blocks.md +71 -0
- package/skills/kaizen-ui-html-css/references/templates/browse-page.md +92 -0
- package/skills/kaizen-ui-html-css/references/templates/dashboard.md +356 -0
- package/skills/kaizen-ui-html-css/references/templates/detail-page.md +424 -0
- package/skills/kaizen-ui-html-css/references/templates/detail-placement.md +68 -0
- package/skills/kaizen-ui-html-css/references/templates/error-page.md +82 -0
- package/skills/kaizen-ui-html-css/references/templates/form-page.md +256 -0
- package/skills/kaizen-ui-html-css/references/templates/layout-principles.md +152 -0
- package/skills/kaizen-ui-html-css/references/templates/list-view.md +229 -0
- package/skills/kaizen-ui-html-css/references/templates/page-modification.md +33 -0
- package/skills/kaizen-ui-html-css/references/templates/page-shell.md +225 -0
- package/skills/kaizen-ui-html-css/references/templates/workspace-page.md +427 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# TreeNav
|
|
2
|
+
|
|
3
|
+
A hierarchical navigation list that lets users move through links at different levels, similar to a directory tree
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<nav class="nv-tree-nav-root" aria-label="File browser">
|
|
9
|
+
<ul class="nv-tree-nav-list" style="--nv-tree-nav-depth: 0">
|
|
10
|
+
<li class="nv-tree-nav-list-item">
|
|
11
|
+
<details class="nv-tree-nav-branch" open>
|
|
12
|
+
<summary class="nv-tree-nav-branch-trigger">
|
|
13
|
+
<i class="nv-icon nv-icon-chevron-down nv-tree-nav-icon" aria-hidden="true"></i>
|
|
14
|
+
<span class="nv-tree-nav-label">Branch</span>
|
|
15
|
+
</summary>
|
|
16
|
+
<ul class="nv-tree-nav-list nv-tree-nav-branch-content" style="--nv-tree-nav-depth: 1">
|
|
17
|
+
<li class="nv-tree-nav-list-item">
|
|
18
|
+
<a class="nv-tree-nav-leaf" href="#">
|
|
19
|
+
<i class="nv-icon nv-icon-document" aria-hidden="true"></i>
|
|
20
|
+
<span class="nv-tree-nav-label">Leaf</span>
|
|
21
|
+
</a>
|
|
22
|
+
</li>
|
|
23
|
+
<li class="nv-tree-nav-list-item">
|
|
24
|
+
<a class="nv-tree-nav-leaf nv-tree-nav-leaf--active" href="#" aria-current="page">
|
|
25
|
+
<i class="nv-icon nv-icon-document" aria-hidden="true"></i>
|
|
26
|
+
<span class="nv-tree-nav-label">Active Leaf</span>
|
|
27
|
+
</a>
|
|
28
|
+
</li>
|
|
29
|
+
<li class="nv-tree-nav-list-item">
|
|
30
|
+
<span class="nv-tree-nav-leaf nv-tree-nav-leaf--disabled" data-disabled="" aria-disabled="true">
|
|
31
|
+
<i class="nv-icon nv-icon-document" aria-hidden="true"></i>
|
|
32
|
+
<span class="nv-tree-nav-label">Disabled Leaf</span>
|
|
33
|
+
</span>
|
|
34
|
+
</li>
|
|
35
|
+
</ul>
|
|
36
|
+
</details>
|
|
37
|
+
</li>
|
|
38
|
+
<li class="nv-tree-nav-list-item">
|
|
39
|
+
<a class="nv-tree-nav-leaf" href="#">
|
|
40
|
+
<i class="nv-icon nv-icon-document" aria-hidden="true"></i>
|
|
41
|
+
<span class="nv-tree-nav-label">Root Leaf</span>
|
|
42
|
+
</a>
|
|
43
|
+
</li>
|
|
44
|
+
</ul>
|
|
45
|
+
</nav>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## CSS classes
|
|
49
|
+
|
|
50
|
+
### Elements
|
|
51
|
+
|
|
52
|
+
`nv-tree-nav-branch`, `nv-tree-nav-branch-trigger`, `nv-tree-nav-icon`, `nv-tree-nav-label`, `nv-tree-nav-leaf`, `nv-tree-nav-list`, `nv-tree-nav-root`
|
|
53
|
+
|
|
54
|
+
### Modifiers
|
|
55
|
+
|
|
56
|
+
| Group | Classes |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| state | `nv-tree-nav-branch-trigger--active`, `nv-tree-nav-leaf--active` |
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Upload
|
|
2
|
+
|
|
3
|
+
A file picker with drag-and-drop support that renders previews and basic management controls for the selected files.
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<label class="nv-upload-trigger nv-input-shell">
|
|
9
|
+
<span class="nv-text nv-anchor nv-upload-trigger-anchor">Choose files</span>
|
|
10
|
+
<span class="nv-text">or drag and drop them here.</span>
|
|
11
|
+
<input class="nv-upload-input-element" type="file" accept=".pdf,.jpg,.png" multiple />
|
|
12
|
+
<div class="nv-upload-description">Accepted: .pdf, .jpg, .png · Up to 50 MB</div>
|
|
13
|
+
</label>
|
|
14
|
+
|
|
15
|
+
<div class="nv-upload-content">
|
|
16
|
+
<div class="nv-upload-item nv-upload-item--kind-card nv-upload-item--status-uploading">
|
|
17
|
+
<div aria-hidden="true">
|
|
18
|
+
<i class="nv-upload-item-thumbnail nv-upload-item-thumbnail-icon nv-icon nv-icon-document" role="img" aria-hidden="true"></i>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="nv-upload-item-content">
|
|
21
|
+
<span class="nv-upload-item-content-heading">cover-letter.pdf</span>
|
|
22
|
+
<span class="nv-upload-item-content-info">
|
|
23
|
+
<span class="nv-upload-item-content-size-info">2.0 KB</span>
|
|
24
|
+
<i class="nv-upload-item-upload-spinner nv-icon nv-icon-circle-tick" role="img" aria-hidden="true"></i>
|
|
25
|
+
</span>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="nv-upload-item-actions-group">
|
|
28
|
+
<button class="nv-button nv-button--size-tiny nv-button--kind-tertiary nv-upload-action-item" type="button" title="Cancel upload" aria-label="Cancel upload">
|
|
29
|
+
<i class="nv-icon nv-icon-close" role="img" aria-hidden="true"></i>
|
|
30
|
+
</button>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="nv-upload-item nv-upload-item--kind-card nv-upload-item--status-success">
|
|
35
|
+
<div aria-hidden="true">
|
|
36
|
+
<i class="nv-upload-item-thumbnail nv-upload-item-thumbnail-icon nv-icon nv-icon-document" role="img" aria-hidden="true"></i>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="nv-upload-item-content">
|
|
39
|
+
<span class="nv-upload-item-content-heading">resume.pdf</span>
|
|
40
|
+
<span class="nv-upload-item-content-info">
|
|
41
|
+
<span class="nv-upload-item-content-size-info">1.0 KB</span>
|
|
42
|
+
</span>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="nv-upload-item-actions-group">
|
|
45
|
+
<button class="nv-button nv-button--size-tiny nv-button--kind-tertiary nv-upload-action-item" type="button" title="Remove file" aria-label="Remove file">
|
|
46
|
+
<i class="nv-icon nv-icon-trash" role="img" aria-hidden="true"></i>
|
|
47
|
+
</button>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div class="nv-upload-item nv-upload-item--kind-card nv-upload-item--status-error">
|
|
52
|
+
<div aria-hidden="true">
|
|
53
|
+
<i class="nv-upload-item-thumbnail nv-upload-item-thumbnail-icon nv-icon nv-icon-document" role="img" aria-hidden="true"></i>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="nv-upload-item-content">
|
|
56
|
+
<span class="nv-upload-item-content-heading">transcript.pdf</span>
|
|
57
|
+
<span class="nv-upload-item-content-info">
|
|
58
|
+
<i class="nv-icon nv-icon--fill nv-icon-error" style="--icon-font-size: 12px" role="img" aria-hidden="true"></i>
|
|
59
|
+
<span class="nv-upload-item-error-message">Upload failed — please retry.</span>
|
|
60
|
+
</span>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="nv-upload-item-actions-group">
|
|
63
|
+
<button class="nv-button nv-button--size-tiny nv-button--kind-tertiary nv-upload-action-item" type="button" title="Retry upload" aria-label="Retry upload">
|
|
64
|
+
<i class="nv-icon nv-icon-retry" role="img" aria-hidden="true"></i>
|
|
65
|
+
</button>
|
|
66
|
+
<button class="nv-button nv-button--size-tiny nv-button--kind-tertiary nv-upload-action-item" type="button" title="Remove file" aria-label="Remove file">
|
|
67
|
+
<i class="nv-icon nv-icon-trash" role="img" aria-hidden="true"></i>
|
|
68
|
+
</button>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## CSS classes
|
|
75
|
+
|
|
76
|
+
### Elements
|
|
77
|
+
|
|
78
|
+
`nv-upload-content`, `nv-upload-description`, `nv-upload-input-element`, `nv-upload-item`, `nv-upload-item-actions-group`, `nv-upload-item-content`, `nv-upload-item-content-heading`, `nv-upload-item-content-info`, `nv-upload-item-hover-section`, `nv-upload-item-thumbnail`, `nv-upload-item-thumbnail-icon`, `nv-upload-item-top-left`, `nv-upload-item-top-right`, `nv-upload-item-upload-spinner`, `nv-upload-status`, `nv-upload-trigger`, `nv-upload-trigger-anchor`
|
|
79
|
+
|
|
80
|
+
### Modifiers
|
|
81
|
+
|
|
82
|
+
| Group | Classes |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| dragged | `nv-upload-trigger--dragged-over` |
|
|
85
|
+
| kind | `nv-upload-content--kind-media`, `nv-upload-item--kind-card`, `nv-upload-item--kind-media` |
|
|
86
|
+
| status | `nv-upload-item--status-error` |
|
|
87
|
+
|
|
88
|
+
## See also
|
|
89
|
+
|
|
90
|
+
- [FormField](./FormField.md)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# VerticalNav
|
|
2
|
+
|
|
3
|
+
A vertical navigation menu of single links and nested link groups, typically rendered in a sidebar. Use as section-level navigation paired with a HorizontalNav for app-wide chrome, or as the sole navigation for apps with deep hierarchies and few global destinations.
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<nav class="nv-vertical-nav-root">
|
|
9
|
+
<ul class="nv-vertical-nav-list">
|
|
10
|
+
<li class="nv-vertical-nav-list-item">
|
|
11
|
+
<details class="nv-collapsible-root nv-vertical-nav-collapsible-section" data-state="open" open>
|
|
12
|
+
<summary class="nv-vertical-nav-item nv-collapsible-trigger nv-vertical-nav-collapsible-trigger" data-state="open">
|
|
13
|
+
<span class="nv-vertical-nav-item-label">Compute Cloud</span>
|
|
14
|
+
<i class="nv-animated-chevron nv-icon nv-icon-chevron-down" role="img" aria-hidden="true"></i>
|
|
15
|
+
</summary>
|
|
16
|
+
<div class="nv-collapsible-content nv-vertical-nav-collapsible-content" data-state="open">
|
|
17
|
+
<div class="nv-collapsible-content-inner">
|
|
18
|
+
<ul class="nv-vertical-nav-sub-list">
|
|
19
|
+
<li class="nv-vertical-nav-sub-list-item">
|
|
20
|
+
<a href="https://example.com/en-us/data-center/" class="nv-vertical-nav-item nv-vertical-nav-item--kind-secondary nv-vertical-nav-item--active" aria-current="page">
|
|
21
|
+
<span class="nv-vertical-nav-item-label">Data Center Home</span>
|
|
22
|
+
</a>
|
|
23
|
+
</li>
|
|
24
|
+
<li class="nv-vertical-nav-sub-list-item">
|
|
25
|
+
<a href="https://example.com/en-us/data-center/products/" class="nv-vertical-nav-item nv-vertical-nav-item--kind-secondary">
|
|
26
|
+
<span class="nv-vertical-nav-item-label">Data Center Products</span>
|
|
27
|
+
</a>
|
|
28
|
+
</li>
|
|
29
|
+
</ul>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</details>
|
|
33
|
+
</li>
|
|
34
|
+
<li class="nv-vertical-nav-list-item">
|
|
35
|
+
<a href="https://example.com/" class="nv-vertical-nav-item">
|
|
36
|
+
<span class="nv-vertical-nav-item-label">ACME Platform</span>
|
|
37
|
+
</a>
|
|
38
|
+
</li>
|
|
39
|
+
<li class="nv-vertical-nav-list-item">
|
|
40
|
+
<a href="https://example.com/en-us/workspace/" class="nv-vertical-nav-item">
|
|
41
|
+
<span class="nv-vertical-nav-item-label">Workspace</span>
|
|
42
|
+
</a>
|
|
43
|
+
</li>
|
|
44
|
+
</ul>
|
|
45
|
+
</nav>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## CSS classes
|
|
49
|
+
|
|
50
|
+
### Elements
|
|
51
|
+
|
|
52
|
+
`nv-vertical-nav-collapsible-content`, `nv-vertical-nav-collapsible-section`, `nv-vertical-nav-collapsible-trigger`, `nv-vertical-nav-divider`, `nv-vertical-nav-group`, `nv-vertical-nav-group-content`, `nv-vertical-nav-group-list`, `nv-vertical-nav-heading`, `nv-vertical-nav-item`, `nv-vertical-nav-item-label`, `nv-vertical-nav-list`, `nv-vertical-nav-root`, `nv-vertical-nav-sub-list`
|
|
53
|
+
|
|
54
|
+
### Modifiers
|
|
55
|
+
|
|
56
|
+
| Group | Classes |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| guide | `nv-vertical-nav-root--guide-lines` |
|
|
59
|
+
| kind | `nv-vertical-nav-item--kind-secondary` |
|
|
60
|
+
| state | `nv-vertical-nav-heading--collapsible`, `nv-vertical-nav-item--active`, `nv-vertical-nav-item--disabled`, `nv-vertical-nav-root--collapsed` |
|
|
61
|
+
|
|
62
|
+
## See also
|
|
63
|
+
|
|
64
|
+
- [HorizontalNav](./HorizontalNav.md)
|
|
65
|
+
- [AppBar](./AppBar.md)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Chart and data-visualization color tokens
|
|
2
|
+
|
|
3
|
+
Theme-aware color tokens for series, segments, gradients, and chart chrome. **Default to these over inventing a color** — they follow the active theme, and choosing the right family is what makes a chart readable rather than merely colorful.
|
|
4
|
+
|
|
5
|
+
Pick the family from the **relationship between the values**, not from how the color looks:
|
|
6
|
+
|
|
7
|
+
| The values are | Family |
|
|
8
|
+
| -------------------------------------------------- | --------------------------- |
|
|
9
|
+
| Unrelated categories or series, no inherent order | [Categorical](#categorical) |
|
|
10
|
+
| One quantity varying in intensity across a range | [Sequential](#sequential) |
|
|
11
|
+
| Carrying a favorable or unfavorable direction | [Trend](#trend) |
|
|
12
|
+
| Chart chrome — gridlines, axis strokes, tick lines | [Structural](#structural) |
|
|
13
|
+
|
|
14
|
+
## Applying a token
|
|
15
|
+
|
|
16
|
+
| Need | Spelling |
|
|
17
|
+
| ------------------------------------------ | ------------------------------------------------------------------ |
|
|
18
|
+
| A CSS variable, or any prop taking a color | `var(--color-chart-data-categorical-1)` |
|
|
19
|
+
| An SVG mark — the usual case for a chart | `fill-chart-data-categorical-1`, `stroke-chart-data-categorical-1` |
|
|
20
|
+
| A swatch background or label text | `bg-chart-data-categorical-1`, `text-chart-data-categorical-1` |
|
|
21
|
+
|
|
22
|
+
SVG `fill` and `stroke` accept `var()` directly, so an SVG-based charting library can take the token string as-is. A canvas-based library cannot: resolve it first with `getComputedStyle(element).getPropertyValue("--color-chart-data-categorical-1")`, and re-resolve on theme change, since the value differs between light and dark.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## Categorical
|
|
27
|
+
|
|
28
|
+
Use to distinguish unrelated categories or series — chart series, segments in a stacked or segmented visualization — not for values with a good/bad meaning. Assign by position, and keep the same category-to-color assignment across every chart on the same page.
|
|
29
|
+
|
|
30
|
+
`--color-chart-data-categorical-1` through `--color-chart-data-categorical-8`.
|
|
31
|
+
|
|
32
|
+
[Legend](../components/Legend.md) entries and [SegmentedMeter](../components/SegmentedMeter.md) segments already fall back to this scale by position, so two lists of the same length line up without any color wiring — and can drift apart if one list reorders.
|
|
33
|
+
|
|
34
|
+
More than 8 categories in one chart is itself a signal to reduce the category count — group a long tail into "Other" — rather than to extend the palette. Distinct hues stop being distinguishable past 8, and the scale cycles rather than growing.
|
|
35
|
+
|
|
36
|
+
## Sequential
|
|
37
|
+
|
|
38
|
+
Use for a single quantity that varies in intensity or density across a continuous range, such as a heatmap cell or a gradient fill — not for distinct categories.
|
|
39
|
+
|
|
40
|
+
Two hue ramps, each low to high: `--color-chart-data-sequential-blue-1` through `-7`, and `--color-chart-data-sequential-green-1` through `-7`. Pick blue for a neutral quantity; pick green only when "more" is already the desired reading, since it otherwise competes with the trend tokens below.
|
|
41
|
+
|
|
42
|
+
## Trend
|
|
43
|
+
|
|
44
|
+
Use only when the value has a meaningful favorable or unfavorable direction, such as a KPI delta or a threshold-based reading — never for arbitrary categorical differentiation. Choose the direction from the outcome rather than from whether the number rose or fell: falling latency is a positive trend.
|
|
45
|
+
|
|
46
|
+
| Token | Use for |
|
|
47
|
+
| ----------------------------------------- | -------------------------------------------- |
|
|
48
|
+
| `--color-chart-data-trend-positive-1/2/3` | A favorable reading, low to high emphasis |
|
|
49
|
+
| `--color-chart-data-trend-negative-1/2/3` | An unfavorable reading, low to high emphasis |
|
|
50
|
+
| `--color-chart-data-trend-neutral` | Unchanged, or no meaningful direction |
|
|
51
|
+
|
|
52
|
+
This is a separate family from the [feedback tokens](./COLORS.md#feedback): feedback tokens are for status messaging UI such as banners and badges, trend tokens are for chart marks and deltas.
|
|
53
|
+
|
|
54
|
+
## Structural
|
|
55
|
+
|
|
56
|
+
Use `border-chart` or `var(--border-color-chart)` for chart borders, gridlines, axis strokes, and tick lines.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Semantic color tokens
|
|
2
|
+
|
|
3
|
+
Theme-aware color tokens for backgrounds, foregrounds, and borders across KUI implementations. **Default to these over primitives** — they adapt to light/dark themes and encode intent.
|
|
4
|
+
|
|
5
|
+
## Roles
|
|
6
|
+
|
|
7
|
+
Tokens are organized by **role** — pick the section that matches what you're styling.
|
|
8
|
+
|
|
9
|
+
| Role | When to use |
|
|
10
|
+
| -------------------- | --------------------------------------------------------------------- |
|
|
11
|
+
| Surface & Background | Container/page chrome backgrounds. |
|
|
12
|
+
| Foreground | Text and icon colors. |
|
|
13
|
+
| Feedback | Status messaging — info, warning, success, danger. |
|
|
14
|
+
| Severity | Ranked issues, alerts, and incidents on an established `0`–`5` scale. |
|
|
15
|
+
| Data visualization | Quantitative displays, selected by the relationship between values. |
|
|
16
|
+
| Interaction | Interactive controls and their states. |
|
|
17
|
+
| Accent | Non-semantic color tagging (chips, badges, color-coded categories). |
|
|
18
|
+
| Component | Component-specific tokens (tooltips, skeletons, scroll tracks). |
|
|
19
|
+
|
|
20
|
+
Many tokens append a **state suffix**:
|
|
21
|
+
|
|
22
|
+
| State | Meaning |
|
|
23
|
+
| ---------------- | ------------------------------------------------- |
|
|
24
|
+
| (none) / `-base` | Default, inactive state. |
|
|
25
|
+
| `-hover` | User is positioned over the element. |
|
|
26
|
+
| `-pressed` | User has clicked or tapped. |
|
|
27
|
+
| `-selected` | Element is highlighted as selected. |
|
|
28
|
+
| `-disabled` | Element is interactive but currently unavailable. |
|
|
29
|
+
| `-subtle` | Lower-prominence variant of the same role. |
|
|
30
|
+
| `-strong` | Higher-prominence variant of the same role. |
|
|
31
|
+
|
|
32
|
+
> Token-name tables below list Tailwind classes. The corresponding CSS variable is the same name with the property prefix restored (`bg-surface-raised` ↔ `var(--background-color-surface-raised)`)
|
|
33
|
+
|
|
34
|
+
## Surface and background
|
|
35
|
+
|
|
36
|
+
**Surface** tokens stack to create hierarchy (sunken → base → raised → overlay). In light mode, pair surfaces with shadows since adjacent surfaces share a color.
|
|
37
|
+
|
|
38
|
+
| Class | When to use |
|
|
39
|
+
| ----------------------- | --------------------------------------------------------------------------------------- |
|
|
40
|
+
| `bg-surface-sunken` | Lowest surface — backdrop for content. Pair with `bg-surface-base` to create hierarchy. |
|
|
41
|
+
| `bg-surface-base` | Default background for sections and contained elements. |
|
|
42
|
+
| `bg-surface-raised` | Cards or elements that sit above sunken/base — adds emphasis. |
|
|
43
|
+
| `bg-surface-overlay` | Highest surface — menus, popovers, anything floating over page content. |
|
|
44
|
+
| `bg-surface-navigation` | App navigation chrome (sidebars, top bars). |
|
|
45
|
+
|
|
46
|
+
**Background** tokens are similar but don't require shadows — use them for neutral separation between page regions.
|
|
47
|
+
|
|
48
|
+
| Class | When to use |
|
|
49
|
+
| ------------------------- | ------------------------------------------------------------------------ |
|
|
50
|
+
| `bg-background-default` | Neutral page background. |
|
|
51
|
+
| `bg-background-subtle` | Slightly de-emphasized region — alternate row stripes, secondary panels. |
|
|
52
|
+
| `bg-background-emphasis` | Slightly emphasized region — highlight a section without raising it. |
|
|
53
|
+
| `bg-background-highlight` | Neutral emphasis for callouts or emphasized panels. |
|
|
54
|
+
| `bg-background-contrast` | High-contrast region against the default surface. |
|
|
55
|
+
|
|
56
|
+
## Foreground
|
|
57
|
+
|
|
58
|
+
Use foreground tokens for text and icons. Start here before reaching for more specialized roles.
|
|
59
|
+
|
|
60
|
+
| Class | When to use |
|
|
61
|
+
| -------------------- | ---------------------------------------------------------------------- |
|
|
62
|
+
| `text-primary` | Key content — primary information or actions. |
|
|
63
|
+
| `text-secondary` | Secondary information, such as labels. |
|
|
64
|
+
| `text-disabled` | Disabled text and icons. |
|
|
65
|
+
| `text-placeholder` | Hints inside empty inputs and helper text. |
|
|
66
|
+
| `text-inverse` | Text on inverted/contrast backgrounds (e.g. `bg-interaction-inverse`). |
|
|
67
|
+
| `text-inverse-brand` | Brand-green accents on inverted backgrounds. |
|
|
68
|
+
| `text-base` | Generic body color - meant for icons. |
|
|
69
|
+
|
|
70
|
+
## Feedback
|
|
71
|
+
|
|
72
|
+
Feedback tokens carry semantic meaning — reserve them for status messaging, alerts, and validation. Each kind ships with a matched `bg-/text-/border-` triplet at the base level; `danger` is the only kind with extra states.
|
|
73
|
+
|
|
74
|
+
| Kind | When to use |
|
|
75
|
+
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
76
|
+
| Info | Supplementary information, neutral guidance, low-risk status messaging. Triplet: `bg-feedback-info`, `text-feedback-info`, `border-feedback-info`. |
|
|
77
|
+
| Warning | Risks, caution states, guidance to help users avoid mistakes. Triplet: `bg-feedback-warning`, `text-feedback-warning`, `border-feedback-warning`. |
|
|
78
|
+
| Success | Positive outcomes, confirmations, completed states. Triplet: `bg-feedback-success`, `text-feedback-success`, `border-feedback-success`. |
|
|
79
|
+
| Danger | Errors, destructive actions, critical attention states. Triplet plus the danger-only states below. |
|
|
80
|
+
|
|
81
|
+
Each kind also exposes a `text-feedback-{kind}-inverse` for use on saturated/feedback-colored backgrounds.
|
|
82
|
+
|
|
83
|
+
### Danger-only states
|
|
84
|
+
|
|
85
|
+
| Class | When to use |
|
|
86
|
+
| ----------------------------------- | -------------------------------------------------------------- |
|
|
87
|
+
| `bg-feedback-danger-hover` | Hover over a danger-colored interactive element. |
|
|
88
|
+
| `bg-feedback-danger-pressed` | Pressed/active danger element. |
|
|
89
|
+
| `bg-feedback-danger-strong` | High-contrast danger background (e.g. saturated alert banner). |
|
|
90
|
+
| `bg-feedback-danger-subtle-hover` | Hover over a subtle danger surface. |
|
|
91
|
+
| `bg-feedback-danger-subtle-pressed` | Pressed subtle danger surface. |
|
|
92
|
+
| `text-feedback-danger-strong` | Higher-emphasis danger text (e.g. error headlines). |
|
|
93
|
+
| `text-feedback-danger-subtle` | De-emphasized danger text (e.g. inline validation hints). |
|
|
94
|
+
| `border-feedback-danger-hover` | Hover state on a danger-bordered control (e.g. invalid input). |
|
|
95
|
+
| `border-feedback-danger-strong` | Higher-emphasis danger border. |
|
|
96
|
+
| `border-feedback-danger-subtle` | De-emphasized danger border. |
|
|
97
|
+
|
|
98
|
+
## Severity
|
|
99
|
+
|
|
100
|
+
Use severity tokens only when the experience has an established `0`–`5` severity model. Lower numbers indicate higher severity; use `severity-none` when no severity is assigned. Do not substitute this scale for feedback tokens in general status, validation, or action messaging.
|
|
101
|
+
|
|
102
|
+
Use the CSS variable `var(--color-severity-{level})`, replacing `{level}` with `0`, `1`, `2`, `3`, `4`, `5`, or `none`. With the Tailwind plugin, use a property-specific utility such as `bg-severity-0`, `text-severity-0`, or `border-severity-0`.
|
|
103
|
+
|
|
104
|
+
Always pair severity color with a visible label, icon, or other indicator so the meaning does not depend on color alone.
|
|
105
|
+
|
|
106
|
+
## Data visualization
|
|
107
|
+
|
|
108
|
+
Charts, graphs, meters, and legends have their own token families, selected by the relationship between the values rather than by role. They also break the variable-naming rule above, since they sit in the `--color-*` namespace. Read [CHART_DATA_COLORS.md](./CHART_DATA_COLORS.md) before coloring a quantitative display.
|
|
109
|
+
|
|
110
|
+
## Interaction
|
|
111
|
+
|
|
112
|
+
Use interaction tokens for interactive controls (buttons, inputs, toggles) and the borders that communicate affordance. Generic borders (`border-base`, `border-brand`, `border-disabled`) live here too.
|
|
113
|
+
|
|
114
|
+
The shape mirrors the state suffix table above. Three families:
|
|
115
|
+
|
|
116
|
+
- `*-interaction-{base,hover,pressed,selected}` — default neutral interactive treatment.
|
|
117
|
+
- `*-interaction-primary-{base,hover,selected}` — brand-green primary action treatment.
|
|
118
|
+
- `*-interaction-inverse-{base,hover,pressed}` — dark-on-light treatment for high-contrast actions.
|
|
119
|
+
|
|
120
|
+
Plus `bg-interaction-selected-subtle` for the raised surface of a selected item inside a track, and disabled coverage: `bg-interaction-disabled`, `bg-interaction-disabled-checked`, `text-interaction-disabled-checked`, `text-interaction-selected`, and `border-interaction-{base,hover,pressed,selected,strong,disabled,inverse,inverse-hover,inverse-pressed,primary-base,primary-hover,primary-selected}`.
|
|
121
|
+
|
|
122
|
+
Generic borders not tied to interactive state: `border-base`, `border-brand`, `border-disabled`.
|
|
123
|
+
|
|
124
|
+
## Accent
|
|
125
|
+
|
|
126
|
+
Accent tokens are **non-semantic** color tags — useful when our semantic tokens don't fit. Common cases: chips, badges, color-coded categories, status pills that don't map to feedback states.
|
|
127
|
+
|
|
128
|
+
The palette is a clean matrix:
|
|
129
|
+
|
|
130
|
+
- **Colors:** `blue`, `gray`, `green`, `purple`, `red`, `teal`, `yellow`. (`black` and `white` exist but only for `text-` and `border-` — no backgrounds, no states.)
|
|
131
|
+
- **Properties:** `bg-accent-{color}`, `text-accent-{color}`, `border-accent-{color}`.
|
|
132
|
+
- **Variants per color:** `-subtle` (light tint, suitable for chip fills), no suffix (mid-tone), `-strong` (saturated for emphasis).
|
|
133
|
+
- **States per variant:** `-hover`, `-selected` (e.g. `bg-accent-blue-hover`, `bg-accent-blue-subtle-hover`).
|
|
134
|
+
|
|
135
|
+
So a chip with a blue tint that highlights on hover is `bg-accent-blue-subtle` + `bg-accent-blue-subtle-hover`. A saturated red badge is `bg-accent-red-strong`.
|
|
136
|
+
|
|
137
|
+
## Component
|
|
138
|
+
|
|
139
|
+
Component-specific tokens. Reach for these only when styling the matching component pattern.
|
|
140
|
+
|
|
141
|
+
| Token | When to use |
|
|
142
|
+
| ------------------------------ | --------------------------------------------------------- |
|
|
143
|
+
| `bg-component-tooltip` | Tooltip background. Pair with `border-component-tooltip`. |
|
|
144
|
+
| `border-component-tooltip` | Tooltip border. |
|
|
145
|
+
| `bg-component-skeleton` | Skeleton loading placeholder default fill. |
|
|
146
|
+
| `bg-component-skeleton-subtle` | Lower-contrast skeleton variant. |
|
|
147
|
+
| `bg-component-track` | Scroll track and slider track background. |
|
|
148
|
+
| `bg-component-track-inverse` | Track background on inverted/contrast surfaces. |
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Color primitives (last resort)
|
|
2
|
+
|
|
3
|
+
Raw NVIDIA brand palette values shared by KUI implementations — fixed colors that **do not theme automatically**. Reach for these only when no semantic token in [COLORS.md](./COLORS.md) fits.
|
|
4
|
+
|
|
5
|
+
Common cases where primitives are appropriate:
|
|
6
|
+
|
|
7
|
+
- Brand expression that must stay a specific hue across light and dark modes.
|
|
8
|
+
- Background imagery and illustrations.
|
|
9
|
+
|
|
10
|
+
For everything else (UI surfaces, text, borders, feedback states, interactive elements), **use semantic tokens** — they adapt automatically and stay consistent with the rest of the system.
|
|
11
|
+
|
|
12
|
+
## Aliases
|
|
13
|
+
|
|
14
|
+
| Token | Resolves to |
|
|
15
|
+
| --------------- | ------------------- |
|
|
16
|
+
| `--color-white` | `--color-gray-000` |
|
|
17
|
+
| `--color-black` | `--color-gray-1000` |
|
|
18
|
+
| `--color-brand` | NVIDIA green |
|
|
19
|
+
|
|
20
|
+
## Usage forms
|
|
21
|
+
|
|
22
|
+
| Form | Example |
|
|
23
|
+
| -------------- | ------------------------------------------------- |
|
|
24
|
+
| Tailwind class | `bg-red-500`, `text-blue-300`, `border-green-700` |
|
|
25
|
+
| CSS variable | `var(--color-red-500)` |
|
|
26
|
+
|
|
27
|
+
## Color scales
|
|
28
|
+
|
|
29
|
+
Available families: `red`, `yellow`, `green`, `teal`, `blue`, `purple`, `fuchsia`, `gray`. Each family ships an `050 → 950` scale (gray adds `000`, `025`, `950`, `975`, `1000`). Lower numbers are lighter; higher numbers are darker — pick by relative position (e.g. `bg-red-500` for a saturated mid-tone, `bg-red-100` for a tint).
|
|
30
|
+
|
|
31
|
+
For the exact hex of every primitive and the translucent overlay scales (`--color-translucent-black-*`, `--color-translucent-white-*`), load [`../../assets/color-primitives-hex.md`](../../assets/color-primitives-hex.md). Only do this when you need an exact hex — picking by name (`red-500` vs `red-700`) does not require the hex.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Effects and layout tokens
|
|
2
|
+
|
|
3
|
+
Shared primitive tokens for radii, border widths, breakpoints, container widths, shadows, transitions, and animations.
|
|
4
|
+
|
|
5
|
+
For spacing, padding, gap, and margin, see [SPACING_SCALE.md](../design-tokens/SPACING_SCALE.md) — it covers density tokens, the raw 4px scale, and the related Tailwind/component-prop surfaces.
|
|
6
|
+
|
|
7
|
+
## Radii
|
|
8
|
+
|
|
9
|
+
Static border-radius primitives. For radius that scales with the active density theme, use `rounded-density-lg` (see [SPACING_SCALE.md](../design-tokens/SPACING_SCALE.md)).
|
|
10
|
+
|
|
11
|
+
| Token | Tailwind class |
|
|
12
|
+
| ---------------- | --------------------------- |
|
|
13
|
+
| `--radius-none` | `rounded-none` |
|
|
14
|
+
| `--radius-sm` | `rounded-sm` |
|
|
15
|
+
| `--radius-md` | `rounded-md` |
|
|
16
|
+
| `--radius-lg` | `rounded-lg` |
|
|
17
|
+
| `--radius-xl` | `rounded-xl` |
|
|
18
|
+
| `--radius-2xl` | `rounded-2xl` |
|
|
19
|
+
| `--radius-3xl` | `rounded-3xl` |
|
|
20
|
+
| `--radius-round` | `rounded-round` (full pill) |
|
|
21
|
+
|
|
22
|
+
## Border widths
|
|
23
|
+
|
|
24
|
+
Tailwind: `border` (1px), `border-2`, `border-3`, `border-4`, `border-0`.
|
|
25
|
+
|
|
26
|
+
## Breakpoints
|
|
27
|
+
|
|
28
|
+
Min-width breakpoints for responsive utilities (`sm:`, `md:`, `lg:`, etc.). KUI uses the standard Tailwind set: `xs` 20rem, `sm` 36rem, `md` 48rem, `lg` 62rem, `xl` 75rem, `2xl` 100rem.
|
|
29
|
+
|
|
30
|
+
## Container widths
|
|
31
|
+
|
|
32
|
+
Max-width primitives — pair with `max-w-{size}` (e.g. `max-w-container-md`). Sizes step from `3xs` (16rem) through `7xl` (80rem) in roughly 4rem increments: `3xs` 16, `2xs` 18, `xs` 20, `sm` 24, `md` 28, `lg` 32, `xl` 36, `2xl` 42, `3xl` 48, `4xl` 56, `5xl` 64, `6xl` 72, `7xl` 80 (rem).
|
|
33
|
+
|
|
34
|
+
## Shadows
|
|
35
|
+
|
|
36
|
+
Three elevation steps. **In light mode, shadows are required to distinguish stacked surfaces** since adjacent surface tokens often share a color.
|
|
37
|
+
|
|
38
|
+
| Token | Tailwind class | Use case |
|
|
39
|
+
| ------------- | -------------- | ------------------------------------------------ |
|
|
40
|
+
| `--shadow-sm` | `shadow-sm` | Subtle lift — raised cards on `bg-surface-base`. |
|
|
41
|
+
| `--shadow-md` | `shadow-md` | Floating elements — popovers, dropdowns. |
|
|
42
|
+
| `--shadow-lg` | `shadow-lg` | Modals, dialogs, top-most overlays. |
|
|
43
|
+
|
|
44
|
+
## Transitions and easing
|
|
45
|
+
|
|
46
|
+
Tailwind: `duration-150`, `duration-200`, `duration-250`, `duration-300`; `ease-out` for the standard curve.
|
|
47
|
+
|
|
48
|
+
## Animations
|
|
49
|
+
|
|
50
|
+
Tailwind: `animate-pulse`, `animate-spin`.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Spacing scale
|
|
2
|
+
|
|
3
|
+
The KUI design system's spacing scale powers every length-like value across implementations — margin, padding, gap, width, height, etc. Two value families share the scale:
|
|
4
|
+
|
|
5
|
+
1. **Density tokens** — preferred. Density-aware values scale with the active density theme, and follow a spacing scale chosen by UX guidance.
|
|
6
|
+
2. **Raw scale** — escape hatch. Fixed multiples of a 4px base unit.
|
|
7
|
+
|
|
8
|
+
## Density tokens
|
|
9
|
+
|
|
10
|
+
A semantic sizing scale that scales with the active density theme.
|
|
11
|
+
|
|
12
|
+
| Token | Size |
|
|
13
|
+
| ------------- | ---- |
|
|
14
|
+
| `density-xxs` | 2px |
|
|
15
|
+
| `density-xs` | 4px |
|
|
16
|
+
| `density-sm` | 6px |
|
|
17
|
+
| `density-md` | 8px |
|
|
18
|
+
| `density-lg` | 12px |
|
|
19
|
+
| `density-xl` | 16px |
|
|
20
|
+
| `density-2xl` | 24px |
|
|
21
|
+
| `density-3xl` | 32px |
|
|
22
|
+
| `density-4xl` | 48px |
|
|
23
|
+
| `density-5xl` | 64px |
|
|
24
|
+
|
|
25
|
+
When unsure, start with `density-md` for inner gaps and `density-lg` for section padding.
|
|
26
|
+
|
|
27
|
+
## Raw scale
|
|
28
|
+
|
|
29
|
+
Use the raw scale when geometry must remain fixed across densities, such as an icon or chart viewport. Prefer density tokens for layout spacing that should adapt with controls.
|
|
30
|
+
|
|
31
|
+
Each numeric token equals `n × 4px` (`"4"` → 16px). The scale also accepts `"0.25"`/`"0.5"`/`"0.75"` for 1-3px, the half-steps `"1.5"`/`"2.5"`/`"3.5"` for 6/10/14px, plus `"inherit"` and `"px"` (fixed 1px).
|
|
32
|
+
|
|
33
|
+
## Gotchas
|
|
34
|
+
|
|
35
|
+
- The literal string `"px"` is a fixed 1px value, **not** the same as `density-xxs`. Use `density-xxs` for hairline gaps that should follow the density theme.
|
|
36
|
+
- `"0"` collapses spacing entirely; for the smallest visible gap, use `density-xxs`.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Typography tokens
|
|
2
|
+
|
|
3
|
+
KUI implements the NVIDIA Brand typography system as named variants exposed through framework APIs and CSS utility classes. Pick a variant so font size, weight, and line height remain consistent. **Do not hand-tune `font-size`, `font-weight`, or `line-height` directly.**
|
|
4
|
+
|
|
5
|
+
## Picking a kind
|
|
6
|
+
|
|
7
|
+
Five categories. Pick by **purpose**, not by visual size.
|
|
8
|
+
|
|
9
|
+
| Category | Purpose | Sizes |
|
|
10
|
+
| -------- | -------------------------------------- | -------------------------------- |
|
|
11
|
+
| display | Large hero headings and page titles. | `2xl xl lg md sm xs` |
|
|
12
|
+
| title | Section headings and subheadings. | `2xl xl lg md sm xs` |
|
|
13
|
+
| body | Paragraphs and main content. | `3xl 2xl xl lg md sm xs` |
|
|
14
|
+
| label | UI labels, captions, dense small text. | `3xl 2xl xl lg md sm xs` |
|
|
15
|
+
| mono | Code snippets and monospace. | `md sm` (and a few larger sizes) |
|
|
16
|
+
|
|
17
|
+
`body` and `label` also accept a **weight**: `regular`, `semibold`, `bold`, `light`, `italic`. A complete variant name looks like `body/bold/md` and maps to the `text-body-bold-md` CSS utility.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
Apply the corresponding CSS utility class to semantic text, for example `class="text-body-bold-md"`. These utilities come from `@nvidia/foundations-css/typography.css`.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
`display` and `title` are bold-only — no weight in the name (`display/xl`, `text-title-lg`).
|
|
29
|
+
|
|
30
|
+
## Defaults when unsure
|
|
31
|
+
|
|
32
|
+
- Page heading → `display/xl` or `display/lg`.
|
|
33
|
+
- Section heading → `title/lg` or `title/md`.
|
|
34
|
+
- Paragraph copy → `body/regular/md`.
|
|
35
|
+
- Form labels and table headers → `label/regular/sm` or `label/semibold/sm`.
|
|
36
|
+
- Code → `mono/md`.
|
|
37
|
+
|
|
38
|
+
## Tailwind class shape
|
|
39
|
+
|
|
40
|
+
The utility class is the variant name with slashes replaced by dashes: `body/bold/md` becomes `text-body-bold-md`.
|
|
41
|
+
|
|
42
|
+
## Fonts and semantics
|
|
43
|
+
|
|
44
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Configuration
|
|
2
|
+
|
|
3
|
+
## Install
|
|
4
|
+
|
|
5
|
+
Install the stylesheet package. No component runtime is required.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add @nvidia/foundations-css
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Import the base styles before the component styles:
|
|
12
|
+
|
|
13
|
+
```css
|
|
14
|
+
@import "@nvidia/foundations-css/base.css";
|
|
15
|
+
@import "@nvidia/foundations-css/components.css";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Themes
|
|
19
|
+
|
|
20
|
+
Apply a color theme and a density theme near the root of the document. Both are plain classes, so they can also be applied to a subtree to scope a region.
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<html class="nv-light nv-density-standard">
|
|
24
|
+
<body>
|
|
25
|
+
<button class="nv-button nv-button--kind-primary nv-button--color-brand">
|
|
26
|
+
Start training
|
|
27
|
+
</button>
|
|
28
|
+
</body>
|
|
29
|
+
</html>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Color themes are `nv-light` and `nv-dark`. Every semantic token resolves against the nearest theme class, so a component inside `nv-dark` needs no dark-specific classes of its own.
|
|
33
|
+
|
|
34
|
+
## Typography
|
|
35
|
+
|
|
36
|
+
The base stylesheet supplies typography tokens, but `components.css` does not include standalone typography utilities. Import `@nvidia/foundations-css/typography.css` for classes such as `text-display-xl`, or generate them with the Tailwind plugin.
|
|
37
|
+
|
|
38
|
+
## Tokens
|
|
39
|
+
|
|
40
|
+
Design tokens are available as CSS variables once the base stylesheet is imported, for example `var(--background-color-surface-raised)`. Use them for any custom rule so the result follows the active theme and density.
|
|
41
|
+
|
|
42
|
+
Spacing and color utilities such as `p-density-lg` and `bg-surface-raised` require `@nvidia/foundations-tailwind-plugin`, which is a separate opt-in. Without it, write plain CSS against the token variables; standalone typography classes remain available through the stylesheet above.
|