@teseor/css 1.14.3 → 1.15.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/package.json +1 -1
- package/src/base/root.docs.html +20 -0
- package/src/base/typography/typography.docs.html +161 -0
- package/src/components/actions/button/button.docs.html +76 -0
- package/src/components/actions/button/button.visual.spec.ts +3 -3
- package/src/components/actions/button-group/button-group.docs.html +47 -0
- package/src/components/actions/button-group/button-group.visual.spec.ts +3 -3
- package/src/components/actions/close-button/close-button.docs.html +77 -0
- package/src/components/actions/close-button/close-button.visual.spec.ts +3 -3
- package/src/components/content/divider/divider.docs.html +27 -0
- package/src/components/content/divider/divider.visual.spec.ts +3 -3
- package/src/components/content/scroll-area/scroll-area-visual.png +0 -0
- package/src/components/content/scroll-area/scroll-area.docs.html +130 -0
- package/src/components/content/scroll-area/scroll-area.visual.spec.ts +3 -3
- package/src/components/content/spacer/spacer.docs.html +23 -0
- package/src/components/content/spacer/spacer.visual.spec.ts +3 -3
- package/src/components/data-display/avatar/avatar.docs.html +67 -0
- package/src/components/data-display/avatar/avatar.visual.spec.ts +3 -3
- package/src/components/data-display/badge/badge.docs.html +39 -0
- package/src/components/data-display/badge/badge.visual.spec.ts +3 -3
- package/src/components/data-display/card/card-visual.png +0 -0
- package/src/components/data-display/card/card.docs.html +36 -0
- package/src/components/data-display/card/card.visual.spec.ts +3 -3
- package/src/components/data-display/data-list/data-list-visual.png +0 -0
- package/src/components/data-display/data-list/data-list.docs.html +97 -0
- package/src/components/data-display/data-list/data-list.visual.spec.ts +3 -3
- package/src/components/data-display/icon/icon.docs.html +72 -0
- package/src/components/data-display/icon/icon.visual.spec.ts +3 -3
- package/src/components/data-display/image/image-visual.png +0 -0
- package/src/components/data-display/image/image.docs.html +67 -0
- package/src/components/data-display/image/image.visual.spec.ts +3 -3
- package/src/components/data-display/stat/stat.docs.html +35 -0
- package/src/components/data-display/stat/stat.visual.spec.ts +3 -3
- package/src/components/data-display/status/status.docs.html +67 -0
- package/src/components/data-display/status/status.visual.spec.ts +3 -3
- package/src/components/data-display/table/table.docs.html +73 -0
- package/src/components/data-display/table/table.visual.spec.ts +3 -3
- package/src/components/data-display/tag/tag.docs.html +42 -0
- package/src/components/data-display/tag/tag.visual.spec.ts +3 -3
- package/src/components/disclosure/accordion/accordion.docs.html +83 -0
- package/src/components/disclosure/accordion/accordion.visual.spec.ts +3 -3
- package/src/components/disclosure/disclosure/disclosure.docs.html +51 -0
- package/src/components/disclosure/disclosure/disclosure.visual.spec.ts +3 -3
- package/src/components/feedback/alert/alert.docs.html +90 -0
- package/src/components/feedback/alert/alert.visual.spec.ts +3 -3
- package/src/components/feedback/progress/progress.docs.html +65 -0
- package/src/components/feedback/progress/progress.visual.spec.ts +3 -3
- package/src/components/feedback/progress-circle/progress-circle.docs.html +65 -0
- package/src/components/feedback/progress-circle/progress-circle.visual.spec.ts +3 -3
- package/src/components/feedback/skeleton/skeleton.docs.html +40 -0
- package/src/components/feedback/skeleton/skeleton.visual.spec.ts +3 -3
- package/src/components/feedback/spinner/spinner.docs.html +28 -0
- package/src/components/feedback/spinner/spinner.visual.spec.ts +3 -3
- package/src/components/feedback/toast/toast-visual.png +0 -0
- package/src/components/feedback/toast/toast.docs.html +109 -0
- package/src/components/feedback/toast/toast.visual.spec.ts +3 -3
- package/src/components/forms/checkbox/checkbox.docs.html +33 -0
- package/src/components/forms/checkbox/checkbox.visual.spec.ts +3 -3
- package/src/components/forms/checkbox-group/checkbox-group.docs.html +104 -0
- package/src/components/forms/checkbox-group/checkbox-group.visual.spec.ts +3 -3
- package/src/components/forms/field/field.docs.html +63 -0
- package/src/components/forms/field/field.visual.spec.ts +3 -3
- package/src/components/forms/fieldset/fieldset.docs.html +122 -0
- package/src/components/forms/fieldset/fieldset.visual.spec.ts +3 -3
- package/src/components/forms/form/form.docs.html +132 -0
- package/src/components/forms/form/form.visual.spec.ts +3 -3
- package/src/components/forms/form-error/form-error.docs.html +18 -0
- package/src/components/forms/form-error/form-error.visual.spec.ts +3 -3
- package/src/components/forms/form-helper/form-helper.docs.html +42 -0
- package/src/components/forms/form-helper/form-helper.visual.spec.ts +3 -3
- package/src/components/forms/input/input-visual.png +0 -0
- package/src/components/forms/input/input.docs.html +69 -0
- package/src/components/forms/input/input.visual.spec.ts +3 -3
- package/src/components/forms/label/label-visual.png +0 -0
- package/src/components/forms/label/label.docs.html +29 -0
- package/src/components/forms/label/label.visual.spec.ts +3 -3
- package/src/components/forms/number-input/number-input-visual.png +0 -0
- package/src/components/forms/number-input/number-input.docs.html +100 -0
- package/src/components/forms/number-input/number-input.visual.spec.ts +3 -3
- package/src/components/forms/password-input/password-input-visual.png +0 -0
- package/src/components/forms/password-input/password-input.docs.html +88 -0
- package/src/components/forms/password-input/password-input.visual.spec.ts +3 -3
- package/src/components/forms/radio/radio.docs.html +52 -0
- package/src/components/forms/radio/radio.visual.spec.ts +3 -3
- package/src/components/forms/radio-group/radio-group.docs.html +100 -0
- package/src/components/forms/radio-group/radio-group.visual.spec.ts +3 -3
- package/src/components/forms/search-input/search-input-visual.png +0 -0
- package/src/components/forms/search-input/search-input.docs.html +87 -0
- package/src/components/forms/search-input/search-input.visual.spec.ts +3 -3
- package/src/components/forms/select/select-visual.png +0 -0
- package/src/components/forms/select/select.docs.html +70 -0
- package/src/components/forms/select/select.visual.spec.ts +3 -3
- package/src/components/forms/slider/slider-visual.png +0 -0
- package/src/components/forms/slider/slider.docs.html +25 -0
- package/src/components/forms/slider/slider.visual.spec.ts +3 -3
- package/src/components/forms/textarea/textarea-visual.png +0 -0
- package/src/components/forms/textarea/textarea.docs.html +39 -0
- package/src/components/forms/textarea/textarea.visual.spec.ts +3 -3
- package/src/components/forms/toggle/toggle.docs.html +64 -0
- package/src/components/forms/toggle/toggle.visual.spec.ts +3 -3
- package/src/components/navigation/breadcrumb/breadcrumb.docs.html +60 -0
- package/src/components/navigation/breadcrumb/breadcrumb.visual.spec.ts +3 -3
- package/src/components/navigation/dropdown-menu/dropdown-menu-visual.png +0 -0
- package/src/components/navigation/dropdown-menu/dropdown-menu.docs.html +106 -0
- package/src/components/navigation/dropdown-menu/dropdown-menu.visual.spec.ts +3 -3
- package/src/components/navigation/menu/menu.docs.html +122 -0
- package/src/components/navigation/menu/menu.visual.spec.ts +3 -3
- package/src/components/navigation/nav/nav.docs.html +74 -0
- package/src/components/navigation/nav/nav.visual.spec.ts +3 -3
- package/src/components/navigation/pagination/pagination-visual.png +0 -0
- package/src/components/navigation/pagination/pagination.docs.html +116 -0
- package/src/components/navigation/pagination/pagination.visual.spec.ts +3 -3
- package/src/components/navigation/tabs/tabs.docs.html +66 -0
- package/src/components/navigation/tabs/tabs.visual.spec.ts +3 -3
- package/src/components/overlays/dialog/dialog.docs.html +61 -0
- package/src/components/overlays/dialog/dialog.visual.spec.ts +3 -3
- package/src/components/overlays/drawer/drawer-visual.png +0 -0
- package/src/components/overlays/drawer/drawer.docs.html +90 -0
- package/src/components/overlays/drawer/drawer.visual.spec.ts +3 -3
- package/src/components/overlays/modal/modal.docs.html +69 -0
- package/src/components/overlays/modal/modal.visual.spec.ts +3 -3
- package/src/components/overlays/overlay/overlay.docs.html +30 -0
- package/src/components/overlays/overlay/overlay.visual.spec.ts +3 -3
- package/src/components/overlays/popover/popover.docs.html +41 -0
- package/src/components/overlays/popover/popover.visual.spec.ts +3 -3
- package/src/components/overlays/tooltip/tooltip.docs.html +33 -0
- package/src/components/overlays/tooltip/tooltip.visual.spec.ts +3 -3
- package/src/components/typography/blockquote/blockquote.docs.html +24 -0
- package/src/components/typography/blockquote/blockquote.visual.spec.ts +3 -3
- package/src/components/typography/code/code-visual.png +0 -0
- package/src/components/typography/code/code.docs.html +23 -0
- package/src/components/typography/code/code.visual.spec.ts +3 -3
- package/src/components/typography/code-block/code-block-visual.png +0 -0
- package/src/components/typography/code-block/code-block.docs.html +87 -0
- package/src/components/typography/code-block/code-block.visual.spec.ts +3 -3
- package/src/components/typography/heading/heading-visual.png +0 -0
- package/src/components/typography/heading/heading.docs.html +26 -0
- package/src/components/typography/heading/heading.visual.spec.ts +3 -3
- package/src/components/typography/kbd/kbd.docs.html +16 -0
- package/src/components/typography/kbd/kbd.visual.spec.ts +3 -3
- package/src/components/typography/link/link.docs.html +33 -0
- package/src/components/typography/link/link.visual.spec.ts +3 -3
- package/src/components/typography/list/list.docs.html +79 -0
- package/src/components/typography/list/list.visual.spec.ts +3 -3
- package/src/components/typography/mark/mark.docs.html +12 -0
- package/src/components/typography/mark/mark.visual.spec.ts +3 -3
- package/src/config/guides/accessibility.docs.html +108 -0
- package/src/config/guides/getting-started.docs.html +47 -0
- package/src/config/guides/theming.docs.html +71 -0
- package/src/config/tokens/colors/colors.docs.html +75 -0
- package/src/config/tokens/design-tokens.docs.html +116 -0
- package/src/config/tokens/grid/grid.docs.html +12 -0
- package/src/config/tokens/spacing/spacing.docs.html +33 -0
- package/src/debug/debug.docs.html +29 -0
- package/src/layout/app-shell/app-shell-visual.png +0 -0
- package/src/layout/app-shell/app-shell.docs.html +102 -0
- package/src/layout/app-shell/app-shell.visual.spec.ts +3 -3
- package/src/layout/aspect-ratio/aspect-ratio.docs.html +41 -0
- package/src/layout/aspect-ratio/aspect-ratio.visual.spec.ts +3 -3
- package/src/layout/box/box-visual.png +0 -0
- package/src/layout/box/box.docs.html +27 -0
- package/src/layout/box/box.visual.spec.ts +3 -3
- package/src/layout/center/center.docs.html +26 -0
- package/src/layout/center/center.visual.spec.ts +3 -3
- package/src/layout/column/column.docs.html +32 -0
- package/src/layout/column/column.visual.spec.ts +3 -3
- package/src/layout/container/container.docs.html +37 -0
- package/src/layout/content/content-visual.png +0 -0
- package/src/layout/content/content.docs.html +38 -0
- package/src/layout/content/content.visual.spec.ts +7 -3
- package/src/layout/footer/footer-visual.png +0 -0
- package/src/layout/footer/footer.docs.html +73 -0
- package/src/layout/footer/footer.visual.spec.ts +7 -3
- package/src/layout/grid/grid.docs.html +87 -0
- package/src/layout/grid/grid.visual.spec.ts +3 -3
- package/src/layout/main/main.docs.html +31 -0
- package/src/layout/nav-rail/nav-rail-visual.png +0 -0
- package/src/layout/nav-rail/nav-rail.docs.html +42 -0
- package/src/layout/nav-rail/nav-rail.visual.spec.ts +7 -3
- package/src/layout/page-header/page-header.docs.html +52 -0
- package/src/layout/page-header/page-header.visual.spec.ts +7 -3
- package/src/layout/row/row.docs.html +47 -0
- package/src/layout/row/row.visual.spec.ts +3 -3
- package/src/layout/sidebar/sidebar-visual.png +0 -0
- package/src/layout/sidebar/sidebar.docs.html +30 -0
- package/src/layout/sidebar/sidebar.visual.spec.ts +7 -3
- package/src/layout/sidebar-nav/sidebar-nav.docs.html +235 -0
- package/src/layout/sidebar-nav/sidebar-nav.visual.spec.ts +7 -3
- package/src/layout/topbar/topbar-visual.png +0 -0
- package/src/layout/topbar/topbar.docs.html +64 -0
- package/src/layout/topbar/topbar.visual.spec.ts +7 -3
- package/src/utilities/container/container.docs.html +34 -0
- package/src/utilities/display/display.docs.html +30 -0
- package/src/utilities/scroll-animation/scroll-animation.docs.html +32 -0
- package/src/utilities/scroll-snap/scroll-snap.docs.html +80 -0
- package/src/utilities/spacing/spacing.docs.html +29 -0
- package/src/utilities/text/text.docs.html +66 -0
- package/src/utilities/view-transition/view-transition.docs.html +52 -0
- package/src/utilities/visually-hidden/visually-hidden.docs.html +18 -0
- package/src/base/root.docs.json +0 -35
- package/src/base/typography/typography.docs.json +0 -328
- package/src/components/actions/button/button.docs.json +0 -264
- package/src/components/actions/button-group/button-group.docs.json +0 -151
- package/src/components/actions/close-button/close-button.docs.json +0 -265
- package/src/components/content/divider/divider.docs.json +0 -113
- package/src/components/content/scroll-area/scroll-area.docs.json +0 -273
- package/src/components/content/spacer/spacer.docs.json +0 -102
- package/src/components/data-display/avatar/avatar.docs.json +0 -245
- package/src/components/data-display/badge/badge.docs.json +0 -114
- package/src/components/data-display/card/card.docs.json +0 -229
- package/src/components/data-display/data-list/data-list.docs.json +0 -259
- package/src/components/data-display/icon/icon.docs.json +0 -307
- package/src/components/data-display/image/image.docs.json +0 -337
- package/src/components/data-display/stat/stat.docs.json +0 -114
- package/src/components/data-display/status/status.docs.json +0 -147
- package/src/components/data-display/table/table.docs.json +0 -184
- package/src/components/data-display/tag/tag.docs.json +0 -146
- package/src/components/disclosure/accordion/accordion.docs.json +0 -206
- package/src/components/disclosure/disclosure/disclosure.docs.json +0 -154
- package/src/components/feedback/alert/alert.docs.json +0 -325
- package/src/components/feedback/progress/progress.docs.json +0 -315
- package/src/components/feedback/progress-circle/progress-circle.docs.json +0 -378
- package/src/components/feedback/skeleton/skeleton.docs.json +0 -142
- package/src/components/feedback/spinner/spinner.docs.json +0 -121
- package/src/components/feedback/toast/toast.docs.json +0 -418
- package/src/components/forms/checkbox/checkbox.docs.json +0 -166
- package/src/components/forms/checkbox-group/checkbox-group.docs.json +0 -339
- package/src/components/forms/field/field.docs.json +0 -276
- package/src/components/forms/fieldset/fieldset.docs.json +0 -520
- package/src/components/forms/form/form.docs.json +0 -482
- package/src/components/forms/form-error/form-error.docs.json +0 -61
- package/src/components/forms/form-helper/form-helper.docs.json +0 -151
- package/src/components/forms/input/input.docs.json +0 -306
- package/src/components/forms/label/label.docs.json +0 -110
- package/src/components/forms/number-input/number-input.docs.json +0 -311
- package/src/components/forms/password-input/password-input.docs.json +0 -316
- package/src/components/forms/radio/radio.docs.json +0 -236
- package/src/components/forms/radio-group/radio-group.docs.json +0 -351
- package/src/components/forms/search-input/search-input.docs.json +0 -293
- package/src/components/forms/select/select.docs.json +0 -231
- package/src/components/forms/slider/slider.docs.json +0 -144
- package/src/components/forms/textarea/textarea.docs.json +0 -229
- package/src/components/forms/toggle/toggle.docs.json +0 -229
- package/src/components/navigation/breadcrumb/breadcrumb.docs.json +0 -240
- package/src/components/navigation/dropdown-menu/dropdown-menu.docs.json +0 -290
- package/src/components/navigation/menu/menu.docs.json +0 -326
- package/src/components/navigation/nav/nav.docs.json +0 -304
- package/src/components/navigation/pagination/pagination.docs.json +0 -483
- package/src/components/navigation/tabs/tabs.docs.json +0 -243
- package/src/components/overlays/dialog/dialog.docs.json +0 -200
- package/src/components/overlays/drawer/drawer.docs.json +0 -307
- package/src/components/overlays/modal/modal.docs.json +0 -252
- package/src/components/overlays/overlay/overlay.docs.json +0 -138
- package/src/components/overlays/popover/popover.docs.json +0 -154
- package/src/components/overlays/tooltip/tooltip.docs.json +0 -133
- package/src/components/typography/blockquote/blockquote.docs.json +0 -89
- package/src/components/typography/code/code.docs.json +0 -104
- package/src/components/typography/code-block/code-block.docs.json +0 -308
- package/src/components/typography/heading/heading.docs.json +0 -120
- package/src/components/typography/kbd/kbd.docs.json +0 -61
- package/src/components/typography/link/link.docs.json +0 -149
- package/src/components/typography/list/list.docs.json +0 -296
- package/src/components/typography/mark/mark.docs.json +0 -60
- package/src/config/guides/accessibility.docs.json +0 -126
- package/src/config/guides/getting-started.docs.json +0 -106
- package/src/config/guides/theming.docs.json +0 -289
- package/src/config/tokens/colors/colors.docs.json +0 -316
- package/src/config/tokens/design-tokens.docs.json +0 -239
- package/src/config/tokens/grid/grid.docs.json +0 -54
- package/src/config/tokens/spacing/spacing.docs.json +0 -114
- package/src/debug/debug.docs.json +0 -96
- package/src/layout/app-shell/app-shell.docs.json +0 -155
- package/src/layout/aspect-ratio/aspect-ratio.docs.json +0 -193
- package/src/layout/box/box.docs.json +0 -93
- package/src/layout/center/center.docs.json +0 -63
- package/src/layout/column/column.docs.json +0 -157
- package/src/layout/container/container.docs.json +0 -85
- package/src/layout/content/content.docs.json +0 -82
- package/src/layout/footer/footer.docs.json +0 -119
- package/src/layout/grid/grid.docs.json +0 -493
- package/src/layout/main/main.docs.json +0 -87
- package/src/layout/nav-rail/nav-rail.docs.json +0 -76
- package/src/layout/page-header/page-header.docs.json +0 -124
- package/src/layout/row/row.docs.json +0 -237
- package/src/layout/sidebar/sidebar.docs.json +0 -63
- package/src/layout/sidebar-nav/sidebar-nav.docs.json +0 -833
- package/src/layout/topbar/topbar.docs.json +0 -110
- package/src/utilities/container/container.docs.json +0 -121
- package/src/utilities/display/display.docs.json +0 -83
- package/src/utilities/scroll-animation/scroll-animation.docs.json +0 -100
- package/src/utilities/scroll-snap/scroll-snap.docs.json +0 -333
- package/src/utilities/spacing/spacing.docs.json +0 -133
- package/src/utilities/text/text.docs.json +0 -191
- package/src/utilities/view-transition/view-transition.docs.json +0 -63
- package/src/utilities/visually-hidden/visually-hidden.docs.json +0 -44
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Sidebar Nav
|
|
3
|
+
type: primitive
|
|
4
|
+
id: sidebar-nav
|
|
5
|
+
description: Navigation component for sidebars with support for groups, nested items, icons, and badges.
|
|
6
|
+
api: ./sidebar-nav.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @basic -->
|
|
10
|
+
<!-- Simple navigation with grouped items. -->
|
|
11
|
+
<nav class="ui-sidebar-nav" aria-label="Main navigation" style="block-size: 400px;">
|
|
12
|
+
<div class="ui-sidebar-nav__header">
|
|
13
|
+
<strong>App Name</strong>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="ui-sidebar-nav__content">
|
|
16
|
+
<div class="ui-sidebar-nav__group">
|
|
17
|
+
<span class="ui-sidebar-nav__group-label">Main</span>
|
|
18
|
+
<ul class="ui-sidebar-nav__group-items">
|
|
19
|
+
<li>
|
|
20
|
+
<a class="ui-sidebar-nav__item ui-sidebar-nav__item--active" href="#" aria-current="page">
|
|
21
|
+
<span class="ui-sidebar-nav__label">Dashboard</span>
|
|
22
|
+
</a>
|
|
23
|
+
</li>
|
|
24
|
+
<li>
|
|
25
|
+
<a class="ui-sidebar-nav__item" href="#">
|
|
26
|
+
<span class="ui-sidebar-nav__label">Projects</span>
|
|
27
|
+
</a>
|
|
28
|
+
</li>
|
|
29
|
+
<li>
|
|
30
|
+
<a class="ui-sidebar-nav__item" href="#">
|
|
31
|
+
<span class="ui-sidebar-nav__label">Tasks</span>
|
|
32
|
+
</a>
|
|
33
|
+
</li>
|
|
34
|
+
</ul>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="ui-sidebar-nav__group">
|
|
37
|
+
<span class="ui-sidebar-nav__group-label">Settings</span>
|
|
38
|
+
<ul class="ui-sidebar-nav__group-items">
|
|
39
|
+
<li>
|
|
40
|
+
<a class="ui-sidebar-nav__item" href="#">
|
|
41
|
+
<span class="ui-sidebar-nav__label">Profile</span>
|
|
42
|
+
</a>
|
|
43
|
+
</li>
|
|
44
|
+
<li>
|
|
45
|
+
<a class="ui-sidebar-nav__item" href="#">
|
|
46
|
+
<span class="ui-sidebar-nav__label">Preferences</span>
|
|
47
|
+
</a>
|
|
48
|
+
</li>
|
|
49
|
+
</ul>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="ui-sidebar-nav__footer">
|
|
53
|
+
<a class="ui-sidebar-nav__item" href="#">
|
|
54
|
+
<span class="ui-sidebar-nav__label">Logout</span>
|
|
55
|
+
</a>
|
|
56
|
+
</div>
|
|
57
|
+
</nav>
|
|
58
|
+
|
|
59
|
+
<!-- @with_icons -->
|
|
60
|
+
<!-- Navigation items with icons for visual clarity. -->
|
|
61
|
+
<nav class="ui-sidebar-nav" aria-label="Navigation" style="block-size: 300px;">
|
|
62
|
+
<div class="ui-sidebar-nav__content">
|
|
63
|
+
<ul class="ui-sidebar-nav__group-items">
|
|
64
|
+
<li>
|
|
65
|
+
<a class="ui-sidebar-nav__item ui-sidebar-nav__item--active" href="#" aria-current="page">
|
|
66
|
+
<span class="ui-sidebar-nav__icon">
|
|
67
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
68
|
+
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
|
|
69
|
+
</svg>
|
|
70
|
+
</span>
|
|
71
|
+
<span class="ui-sidebar-nav__label">Home</span>
|
|
72
|
+
</a>
|
|
73
|
+
</li>
|
|
74
|
+
<li>
|
|
75
|
+
<a class="ui-sidebar-nav__item" href="#">
|
|
76
|
+
<span class="ui-sidebar-nav__icon">
|
|
77
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
78
|
+
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
|
|
79
|
+
<circle cx="9" cy="7" r="4"></circle>
|
|
80
|
+
</svg>
|
|
81
|
+
</span>
|
|
82
|
+
<span class="ui-sidebar-nav__label">Users</span>
|
|
83
|
+
</a>
|
|
84
|
+
</li>
|
|
85
|
+
<li>
|
|
86
|
+
<a class="ui-sidebar-nav__item" href="#">
|
|
87
|
+
<span class="ui-sidebar-nav__icon">
|
|
88
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
89
|
+
<circle cx="12" cy="12" r="3"></circle>
|
|
90
|
+
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
|
|
91
|
+
</svg>
|
|
92
|
+
</span>
|
|
93
|
+
<span class="ui-sidebar-nav__label">Settings</span>
|
|
94
|
+
</a>
|
|
95
|
+
</li>
|
|
96
|
+
</ul>
|
|
97
|
+
</div>
|
|
98
|
+
</nav>
|
|
99
|
+
|
|
100
|
+
<!-- @with_badges -->
|
|
101
|
+
<!-- Navigation items with badges for counts or status indicators. -->
|
|
102
|
+
<nav class="ui-sidebar-nav" aria-label="Navigation" style="block-size: 200px;">
|
|
103
|
+
<div class="ui-sidebar-nav__content">
|
|
104
|
+
<ul class="ui-sidebar-nav__group-items">
|
|
105
|
+
<li>
|
|
106
|
+
<a class="ui-sidebar-nav__item" href="#">
|
|
107
|
+
<span class="ui-sidebar-nav__label">Inbox</span>
|
|
108
|
+
<span class="ui-sidebar-nav__badge">
|
|
109
|
+
<span class="ui-badge ui-badge--primary">12</span>
|
|
110
|
+
</span>
|
|
111
|
+
</a>
|
|
112
|
+
</li>
|
|
113
|
+
<li>
|
|
114
|
+
<a class="ui-sidebar-nav__item" href="#">
|
|
115
|
+
<span class="ui-sidebar-nav__label">Notifications</span>
|
|
116
|
+
<span class="ui-sidebar-nav__badge">
|
|
117
|
+
<span class="ui-badge ui-badge--danger">3</span>
|
|
118
|
+
</span>
|
|
119
|
+
</a>
|
|
120
|
+
</li>
|
|
121
|
+
<li>
|
|
122
|
+
<a class="ui-sidebar-nav__item" href="#">
|
|
123
|
+
<span class="ui-sidebar-nav__label">Updates</span>
|
|
124
|
+
<span class="ui-sidebar-nav__badge">
|
|
125
|
+
<span class="ui-status ui-status--success"></span>
|
|
126
|
+
</span>
|
|
127
|
+
</a>
|
|
128
|
+
</li>
|
|
129
|
+
</ul>
|
|
130
|
+
</div>
|
|
131
|
+
</nav>
|
|
132
|
+
|
|
133
|
+
<!-- @nested_items -->
|
|
134
|
+
<!-- Navigation with nested/indented items for sub-sections. -->
|
|
135
|
+
<nav class="ui-sidebar-nav" aria-label="Navigation" style="block-size: 280px;">
|
|
136
|
+
<div class="ui-sidebar-nav__content">
|
|
137
|
+
<div class="ui-sidebar-nav__group">
|
|
138
|
+
<span class="ui-sidebar-nav__group-label">Components</span>
|
|
139
|
+
<ul class="ui-sidebar-nav__group-items">
|
|
140
|
+
<li>
|
|
141
|
+
<div class="ui-sidebar-nav__subgroup">
|
|
142
|
+
<span class="ui-sidebar-nav__subgroup-label">Actions</span>
|
|
143
|
+
</div>
|
|
144
|
+
</li>
|
|
145
|
+
<li>
|
|
146
|
+
<a class="ui-sidebar-nav__item ui-sidebar-nav__item--nested" href="#">
|
|
147
|
+
<span class="ui-sidebar-nav__label">Button</span>
|
|
148
|
+
</a>
|
|
149
|
+
</li>
|
|
150
|
+
<li>
|
|
151
|
+
<a class="ui-sidebar-nav__item ui-sidebar-nav__item--nested ui-sidebar-nav__item--active" href="#" aria-current="page">
|
|
152
|
+
<span class="ui-sidebar-nav__label">Button Group</span>
|
|
153
|
+
</a>
|
|
154
|
+
</li>
|
|
155
|
+
<li>
|
|
156
|
+
<span class="ui-sidebar-nav__subgroup-label">Forms</span>
|
|
157
|
+
</li>
|
|
158
|
+
<li>
|
|
159
|
+
<a class="ui-sidebar-nav__item ui-sidebar-nav__item--nested" href="#">
|
|
160
|
+
<span class="ui-sidebar-nav__label">Input</span>
|
|
161
|
+
</a>
|
|
162
|
+
</li>
|
|
163
|
+
<li>
|
|
164
|
+
<a class="ui-sidebar-nav__item ui-sidebar-nav__item--nested" href="#">
|
|
165
|
+
<span class="ui-sidebar-nav__label">Select</span>
|
|
166
|
+
</a>
|
|
167
|
+
</li>
|
|
168
|
+
</ul>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
</nav>
|
|
172
|
+
|
|
173
|
+
<!-- @collapsed -->
|
|
174
|
+
<!-- Icon-only mode for compact sidebars. -->
|
|
175
|
+
<nav class="ui-sidebar-nav ui-sidebar-nav--collapsed" aria-label="Navigation" style="block-size: 200px;">
|
|
176
|
+
<div class="ui-sidebar-nav__content">
|
|
177
|
+
<ul class="ui-sidebar-nav__group-items">
|
|
178
|
+
<li>
|
|
179
|
+
<a class="ui-sidebar-nav__item ui-sidebar-nav__item--active" href="#" aria-current="page" aria-label="Home">
|
|
180
|
+
<span class="ui-sidebar-nav__icon">
|
|
181
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
182
|
+
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
|
|
183
|
+
</svg>
|
|
184
|
+
</span>
|
|
185
|
+
<span class="ui-sidebar-nav__label">Home</span>
|
|
186
|
+
</a>
|
|
187
|
+
</li>
|
|
188
|
+
<li>
|
|
189
|
+
<a class="ui-sidebar-nav__item" href="#" aria-label="Users">
|
|
190
|
+
<span class="ui-sidebar-nav__icon">
|
|
191
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
192
|
+
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
|
|
193
|
+
<circle cx="9" cy="7" r="4"></circle>
|
|
194
|
+
</svg>
|
|
195
|
+
</span>
|
|
196
|
+
<span class="ui-sidebar-nav__label">Users</span>
|
|
197
|
+
</a>
|
|
198
|
+
</li>
|
|
199
|
+
<li>
|
|
200
|
+
<a class="ui-sidebar-nav__item" href="#" aria-label="Settings">
|
|
201
|
+
<span class="ui-sidebar-nav__icon">
|
|
202
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
203
|
+
<circle cx="12" cy="12" r="3"></circle>
|
|
204
|
+
</svg>
|
|
205
|
+
</span>
|
|
206
|
+
<span class="ui-sidebar-nav__label">Settings</span>
|
|
207
|
+
</a>
|
|
208
|
+
</li>
|
|
209
|
+
</ul>
|
|
210
|
+
</div>
|
|
211
|
+
</nav>
|
|
212
|
+
|
|
213
|
+
<!-- @disabled_items -->
|
|
214
|
+
<!-- Non-interactive navigation items. -->
|
|
215
|
+
<nav class="ui-sidebar-nav" aria-label="Navigation" style="block-size: 180px;">
|
|
216
|
+
<div class="ui-sidebar-nav__content">
|
|
217
|
+
<ul class="ui-sidebar-nav__group-items">
|
|
218
|
+
<li>
|
|
219
|
+
<a class="ui-sidebar-nav__item" href="#">
|
|
220
|
+
<span class="ui-sidebar-nav__label">Active Link</span>
|
|
221
|
+
</a>
|
|
222
|
+
</li>
|
|
223
|
+
<li>
|
|
224
|
+
<span class="ui-sidebar-nav__item ui-sidebar-nav__item--disabled">
|
|
225
|
+
<span class="ui-sidebar-nav__label">Disabled Link</span>
|
|
226
|
+
</span>
|
|
227
|
+
</li>
|
|
228
|
+
<li>
|
|
229
|
+
<a class="ui-sidebar-nav__item" href="#">
|
|
230
|
+
<span class="ui-sidebar-nav__label">Another Link</span>
|
|
231
|
+
</a>
|
|
232
|
+
</li>
|
|
233
|
+
</ul>
|
|
234
|
+
</div>
|
|
235
|
+
</nav>
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromHtmlDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../test-utils';
|
|
4
8
|
|
|
5
|
-
const DOCS_PATH = resolve(__dirname, 'sidebar-nav.docs.
|
|
9
|
+
const DOCS_PATH = resolve(__dirname, 'sidebar-nav.docs.html');
|
|
6
10
|
|
|
7
11
|
test.describe('sidebar-nav visual regression', () => {
|
|
8
12
|
test('all variations', async ({ page }) => {
|
|
9
|
-
await
|
|
13
|
+
await setupVisualTestFromHtmlDocs(page, DOCS_PATH);
|
|
10
14
|
await validateGridRhythm(page, 'sidebar-nav__item');
|
|
11
15
|
await saveForLostPixel(page, 'sidebar-nav');
|
|
12
16
|
await expect(page.locator('.test-container')).toHaveScreenshot('sidebar-nav-all.png');
|
|
Binary file
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Topbar
|
|
3
|
+
type: primitive
|
|
4
|
+
id: topbar
|
|
5
|
+
description: Fixed or sticky header bar for app layouts with start, center, and end sections.
|
|
6
|
+
api: ./topbar.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @default -->
|
|
10
|
+
<!-- Basic topbar with three sections: start (brand), center (search/nav), and end (actions). -->
|
|
11
|
+
<header class="ui-topbar ui-topbar--bordered">
|
|
12
|
+
<div class="ui-topbar__start">
|
|
13
|
+
<strong>Brand</strong>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="ui-topbar__center">
|
|
16
|
+
<span>Center content</span>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="ui-topbar__end">
|
|
19
|
+
<span>Actions</span>
|
|
20
|
+
</div>
|
|
21
|
+
</header>
|
|
22
|
+
|
|
23
|
+
<!-- @sticky -->
|
|
24
|
+
<!-- Stays at the top of the viewport on scroll. -->
|
|
25
|
+
<header class="ui-topbar ui-topbar--sticky ui-topbar--bordered">
|
|
26
|
+
<div class="ui-topbar__start"><strong>Brand</strong></div>
|
|
27
|
+
<div class="ui-topbar__center">Nav</div>
|
|
28
|
+
<div class="ui-topbar__end">Actions</div>
|
|
29
|
+
</header>
|
|
30
|
+
|
|
31
|
+
<!-- @bordered -->
|
|
32
|
+
<!-- Bottom border via inset box-shadow to preserve grid rhythm. -->
|
|
33
|
+
<header class="ui-topbar ui-topbar--bordered">
|
|
34
|
+
<div class="ui-topbar__start">
|
|
35
|
+
<strong>Bordered</strong>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="ui-topbar__end">
|
|
38
|
+
<span>Actions</span>
|
|
39
|
+
</div>
|
|
40
|
+
</header>
|
|
41
|
+
|
|
42
|
+
<!-- @raised -->
|
|
43
|
+
<!-- Subtle drop shadow below the topbar. -->
|
|
44
|
+
<header class="ui-topbar ui-topbar--raised">
|
|
45
|
+
<div class="ui-topbar__start">
|
|
46
|
+
<strong>Raised</strong>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="ui-topbar__end">
|
|
49
|
+
<span>Actions</span>
|
|
50
|
+
</div>
|
|
51
|
+
</header>
|
|
52
|
+
|
|
53
|
+
<!-- @integration_with_sidebar -->
|
|
54
|
+
<!-- Set --topbar-height on .app-shell so sidebar and main offset correctly. The topbar itself uses --fixed, and sidebar/main read --topbar-height. -->
|
|
55
|
+
<body class="ui-app-shell" style="--topbar-height: var(--ui-row-3)">
|
|
56
|
+
<header class="ui-topbar ui-topbar--fixed ui-topbar--bordered">
|
|
57
|
+
<div class="ui-topbar__start"><strong>App</strong></div>
|
|
58
|
+
<div class="ui-topbar__end">User</div>
|
|
59
|
+
</header>
|
|
60
|
+
<aside class="ui-sidebar">Sidebar</aside>
|
|
61
|
+
<main class="ui-main">
|
|
62
|
+
<div class="ui-container">Content</div>
|
|
63
|
+
</main>
|
|
64
|
+
</body>
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromHtmlDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../test-utils';
|
|
4
8
|
|
|
5
|
-
const DOCS_PATH = resolve(__dirname, 'topbar.docs.
|
|
9
|
+
const DOCS_PATH = resolve(__dirname, 'topbar.docs.html');
|
|
6
10
|
|
|
7
11
|
test.describe('topbar visual regression', () => {
|
|
8
12
|
test('all variations', async ({ page }) => {
|
|
9
|
-
await
|
|
13
|
+
await setupVisualTestFromHtmlDocs(page, DOCS_PATH);
|
|
10
14
|
await validateGridRhythm(page, 'topbar');
|
|
11
15
|
await saveForLostPixel(page, 'topbar');
|
|
12
16
|
await expect(page.locator('body')).toHaveScreenshot('topbar.visual.png');
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Container
|
|
3
|
+
type: utility
|
|
4
|
+
id: container-utils
|
|
5
|
+
description: Container query utilities for component-level responsive design.
|
|
6
|
+
api: container.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @inline_size_containment -->
|
|
10
|
+
<!-- Establish inline-size containment so children can use container queries to respond to the container width. -->
|
|
11
|
+
<div class="ui-container-inline ui-p-2" style="background: var(--ui-color-bg-muted)">
|
|
12
|
+
<div class="ui-card">This card is inside an inline-size container</div>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<!-- @size_containment -->
|
|
16
|
+
<!-- Establish containment on both axes for container queries on width and height. -->
|
|
17
|
+
<div class="ui-container-size ui-p-2" style="background: var(--ui-color-bg-muted); block-size: 12rem">
|
|
18
|
+
<div class="ui-card">Inside a size container</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<!-- @remove_containment -->
|
|
22
|
+
<!-- Reset container type back to normal (no containment). -->
|
|
23
|
+
<div class="ui-container-normal ui-p-2" style="background: var(--ui-color-bg-muted)">
|
|
24
|
+
<div class="ui-card">No containment on this container</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<!-- @with_responsive_card -->
|
|
28
|
+
<!-- Combine container-inline with card--responsive for automatic horizontal layout at wider container sizes. -->
|
|
29
|
+
<div class="ui-container-inline">
|
|
30
|
+
<div class="ui-card ui-card--responsive">
|
|
31
|
+
<div class="ui-card__media" style="background: var(--ui-color-bg-muted); min-block-size: 6rem"></div>
|
|
32
|
+
<div class="ui-card__body">Card switches to horizontal layout when container is wide enough</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Display
|
|
3
|
+
type: utility
|
|
4
|
+
id: display-utils
|
|
5
|
+
description: Flexbox and display utilities.
|
|
6
|
+
api: display.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @flex_layout -->
|
|
10
|
+
<div class="ui-flex ui-justify-between ui-items-center ui-gap-2 ui-p-2" style="background: var(--ui-color-bg-muted)">
|
|
11
|
+
<span>Start</span>
|
|
12
|
+
<span>Center (items-center)</span>
|
|
13
|
+
<span>End</span>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<!-- @flex_direction | row -->
|
|
17
|
+
<div class="ui-flex ui-flex-col ui-gap-1 ui-p-2" style="background: var(--ui-color-bg-muted)">
|
|
18
|
+
<span>Column 1</span>
|
|
19
|
+
<span>Column 2</span>
|
|
20
|
+
<span>Column 3</span>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="ui-flex ui-flex-row ui-gap-1 ui-p-2" style="background: var(--ui-color-bg-muted)">
|
|
23
|
+
<span>Row 1</span>
|
|
24
|
+
<span>Row 2</span>
|
|
25
|
+
<span>Row 3</span>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<!-- @visibility | row -->
|
|
29
|
+
<span class="ui-visible ui-p-1" style="background: var(--ui-color-bg-muted)">Visible</span>
|
|
30
|
+
<span class="ui-invisible ui-p-1" style="background: var(--ui-color-bg-muted)">Invisible (hidden but occupies space)</span>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Scroll Animation
|
|
3
|
+
type: utility
|
|
4
|
+
id: scroll-animation-utils
|
|
5
|
+
description: Scroll-driven animation utilities for progress indicators and viewport-triggered effects. Wrapped in @supports — no impact on unsupported browsers.
|
|
6
|
+
api: scroll-animation.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @scroll_progress_indicator -->
|
|
10
|
+
<!-- Fixed bar at the top of the viewport that fills as the user scrolls down. -->
|
|
11
|
+
<div style="position: relative; block-size: 12rem; overflow-y: auto;">
|
|
12
|
+
<div class="ui-scroll-progress" style="position: absolute;"></div>
|
|
13
|
+
<div style="block-size: 40rem; padding: var(--ui-space-2);">
|
|
14
|
+
<p>Scroll down to see the progress bar fill.</p>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<!-- @view_fade -->
|
|
19
|
+
<!-- Elements fade in as they enter the viewport. -->
|
|
20
|
+
<div class="ui-view-fade ui-card ui-p-2">I fade in on scroll</div>
|
|
21
|
+
|
|
22
|
+
<!-- @view_slide_up -->
|
|
23
|
+
<!-- Elements slide up and fade in on viewport entry. -->
|
|
24
|
+
<div class="ui-view-slide-up ui-card ui-p-2">I slide up into view</div>
|
|
25
|
+
|
|
26
|
+
<!-- @view_slide_start -->
|
|
27
|
+
<!-- Elements slide in from the start edge (left in LTR) on viewport entry. -->
|
|
28
|
+
<div class="ui-view-slide-start ui-card ui-p-2">I slide from the start</div>
|
|
29
|
+
|
|
30
|
+
<!-- @view_scale -->
|
|
31
|
+
<!-- Elements scale up and fade in on viewport entry. -->
|
|
32
|
+
<div class="ui-view-scale ui-card ui-p-2">I scale into view</div>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Scroll Snap
|
|
3
|
+
type: utility
|
|
4
|
+
id: scroll-snap-utils
|
|
5
|
+
description: Scroll-snap utilities for carousels, horizontal lists, and snap-to-position scrolling.
|
|
6
|
+
api: scroll-snap.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @horizontal_snap -->
|
|
10
|
+
<!-- Snap children to start position on horizontal scroll. -->
|
|
11
|
+
<div class="ui-snap-x ui-flex ui-gap-2 ui-p-2" style="max-inline-size: 20rem">
|
|
12
|
+
<div class="ui-snap-start ui-card ui-p-2" style="min-inline-size: 10rem">Item 1</div>
|
|
13
|
+
<div class="ui-snap-start ui-card ui-p-2" style="min-inline-size: 10rem">Item 2</div>
|
|
14
|
+
<div class="ui-snap-start ui-card ui-p-2" style="min-inline-size: 10rem">Item 3</div>
|
|
15
|
+
<div class="ui-snap-start ui-card ui-p-2" style="min-inline-size: 10rem">Item 4</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<!-- @center_snap -->
|
|
19
|
+
<!-- Snap children to center position. -->
|
|
20
|
+
<div class="ui-snap-x ui-flex ui-gap-2 ui-p-2" style="max-inline-size: 20rem">
|
|
21
|
+
<div class="ui-snap-center ui-card ui-p-2" style="min-inline-size: 10rem">Center 1</div>
|
|
22
|
+
<div class="ui-snap-center ui-card ui-p-2" style="min-inline-size: 10rem">Center 2</div>
|
|
23
|
+
<div class="ui-snap-center ui-card ui-p-2" style="min-inline-size: 10rem">Center 3</div>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<!-- @vertical_snap -->
|
|
27
|
+
<!-- Snap children on vertical scroll. -->
|
|
28
|
+
<div class="ui-snap-y" style="max-block-size: 8rem">
|
|
29
|
+
<div class="ui-snap-start ui-card ui-p-2">Section 1</div>
|
|
30
|
+
<div class="ui-snap-start ui-card ui-p-2">Section 2</div>
|
|
31
|
+
<div class="ui-snap-start ui-card ui-p-2">Section 3</div>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<!-- @proximity_snap -->
|
|
35
|
+
<!-- Softer snap that only engages when close to a snap point. -->
|
|
36
|
+
<div class="ui-snap-x-proximity ui-flex ui-gap-2 ui-p-2" style="max-inline-size: 20rem">
|
|
37
|
+
<div class="ui-snap-start ui-card ui-p-2" style="min-inline-size: 10rem">Proximity 1</div>
|
|
38
|
+
<div class="ui-snap-start ui-card ui-p-2" style="min-inline-size: 10rem">Proximity 2</div>
|
|
39
|
+
<div class="ui-snap-start ui-card ui-p-2" style="min-inline-size: 10rem">Proximity 3</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="ui-snap-y-proximity" style="max-block-size: 8rem">
|
|
42
|
+
<div class="ui-snap-start ui-card ui-p-2">Section 1</div>
|
|
43
|
+
<div class="ui-snap-start ui-card ui-p-2">Section 2</div>
|
|
44
|
+
<div class="ui-snap-start ui-card ui-p-2">Section 3</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<!-- @end_alignment_and_stop -->
|
|
48
|
+
<!-- Snap children to end position or force stop at every snap point. -->
|
|
49
|
+
<div class="ui-snap-x ui-flex ui-gap-2 ui-p-2" style="max-inline-size: 20rem">
|
|
50
|
+
<div class="ui-snap-end ui-card ui-p-2" style="min-inline-size: 10rem">End 1</div>
|
|
51
|
+
<div class="ui-snap-end ui-card ui-p-2" style="min-inline-size: 10rem">End 2</div>
|
|
52
|
+
<div class="ui-snap-end ui-card ui-p-2" style="min-inline-size: 10rem">End 3</div>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="ui-snap-x ui-flex ui-gap-2 ui-p-2" style="max-inline-size: 20rem">
|
|
55
|
+
<div class="ui-snap-start ui-snap-always ui-card ui-p-2" style="min-inline-size: 10rem">Always 1</div>
|
|
56
|
+
<div class="ui-snap-start ui-snap-always ui-card ui-p-2" style="min-inline-size: 10rem">Always 2</div>
|
|
57
|
+
<div class="ui-snap-start ui-snap-always ui-card ui-p-2" style="min-inline-size: 10rem">Always 3</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<!-- @disable_snap -->
|
|
61
|
+
<!-- Remove snap behavior from a container. -->
|
|
62
|
+
<div class="ui-snap-none ui-flex ui-gap-2 ui-p-2" style="max-inline-size: 20rem; overflow-x: auto">
|
|
63
|
+
<div class="ui-card ui-p-2" style="min-inline-size: 10rem">No snap 1</div>
|
|
64
|
+
<div class="ui-card ui-p-2" style="min-inline-size: 10rem">No snap 2</div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<!-- @scroll_padding -->
|
|
68
|
+
<!-- Offset snap position for fixed headers or insets. -->
|
|
69
|
+
<div class="ui-snap-x ui-snap-p-1 ui-flex ui-gap-2 ui-p-2" style="max-inline-size: 20rem">
|
|
70
|
+
<div class="ui-snap-start ui-card ui-p-2" style="min-inline-size: 10rem">p-1</div>
|
|
71
|
+
<div class="ui-snap-start ui-card ui-p-2" style="min-inline-size: 10rem">p-1</div>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="ui-snap-x ui-snap-p-2 ui-flex ui-gap-2 ui-p-2" style="max-inline-size: 20rem">
|
|
74
|
+
<div class="ui-snap-start ui-card ui-p-2" style="min-inline-size: 10rem">p-2</div>
|
|
75
|
+
<div class="ui-snap-start ui-card ui-p-2" style="min-inline-size: 10rem">p-2</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="ui-snap-x ui-snap-p-4 ui-flex ui-gap-2 ui-p-2" style="max-inline-size: 20rem">
|
|
78
|
+
<div class="ui-snap-start ui-card ui-p-2" style="min-inline-size: 10rem">p-4</div>
|
|
79
|
+
<div class="ui-snap-start ui-card ui-p-2" style="min-inline-size: 10rem">p-4</div>
|
|
80
|
+
</div>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Spacing
|
|
3
|
+
type: utility
|
|
4
|
+
id: spacing-utils
|
|
5
|
+
description: Margin and padding utilities aligned to 8px grid.
|
|
6
|
+
api: spacing.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @padding | column -->
|
|
10
|
+
<div class="ui-p-1" style="background: var(--ui-color-bg-muted)">p-1 (8px padding)</div>
|
|
11
|
+
<div class="ui-p-2" style="background: var(--ui-color-bg-muted)">p-2 (16px padding)</div>
|
|
12
|
+
<div class="ui-p-4" style="background: var(--ui-color-bg-muted)">p-4 (32px padding)</div>
|
|
13
|
+
|
|
14
|
+
<!-- @directional_padding | column -->
|
|
15
|
+
<div class="ui-px-4 ui-py-2" style="background: var(--ui-color-bg-muted)">px-4 py-2 (horizontal 32px, vertical 16px)</div>
|
|
16
|
+
<div class="ui-pt-4 ui-pb-1" style="background: var(--ui-color-bg-muted)">pt-4 pb-1 (top 32px, bottom 8px)</div>
|
|
17
|
+
<div class="ui-ps-4 ui-pe-1" style="background: var(--ui-color-bg-muted)">ps-4 pe-1 (start 32px, end 8px)</div>
|
|
18
|
+
|
|
19
|
+
<!-- @margin | column -->
|
|
20
|
+
<div class="ui-mb-2" style="background: var(--ui-color-bg-muted)">mb-2 (16px bottom margin)</div>
|
|
21
|
+
<div class="ui-mt-4 ui-mb-2" style="background: var(--ui-color-bg-muted)">mt-4 mb-2 (top 32px, bottom 16px)</div>
|
|
22
|
+
<div class="ui-mx-auto" style="background: var(--ui-color-bg-muted); max-inline-size: var(--ui-row-8)">mx-auto (centered with auto margins)</div>
|
|
23
|
+
|
|
24
|
+
<!-- @gap -->
|
|
25
|
+
<div class="ui-flex ui-gap-2">
|
|
26
|
+
<div class="ui-p-2" style="background: var(--ui-color-bg-muted)">Item</div>
|
|
27
|
+
<div class="ui-p-2" style="background: var(--ui-color-bg-muted)">Item</div>
|
|
28
|
+
<div class="ui-p-2" style="background: var(--ui-color-bg-muted)">Item</div>
|
|
29
|
+
</div>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Text
|
|
3
|
+
type: utility
|
|
4
|
+
id: text-utils
|
|
5
|
+
description: Typography and text utilities. Font sizes follow a 1.2 modular scale.
|
|
6
|
+
api: text.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @sizes | column -->
|
|
10
|
+
<!-- Font size utilities with 8px grid-snapped line-heights. -->
|
|
11
|
+
<p class="ui-text-xs">text-xs: 12px / 16px line-height</p>
|
|
12
|
+
<p class="ui-text-sm">text-sm: 14px / 24px line-height</p>
|
|
13
|
+
<p class="ui-text-md">text-md: 16px / 24px line-height</p>
|
|
14
|
+
<p class="ui-text-lg">text-lg: 20px / 32px line-height</p>
|
|
15
|
+
<p class="ui-text-xl">text-xl: 24px / 32px line-height</p>
|
|
16
|
+
<p class="ui-text-2xl">text-2xl: 28px / 32px line-height</p>
|
|
17
|
+
<p class="ui-text-3xl">text-3xl: 32px / 40px line-height</p>
|
|
18
|
+
<p class="ui-text-4xl">text-4xl: 40px / 48px line-height</p>
|
|
19
|
+
|
|
20
|
+
<!-- @text_roles | column -->
|
|
21
|
+
<!-- Semantic text styles for specific use cases. -->
|
|
22
|
+
<p class="ui-text-lead">Lead: Opening paragraph style (20px / 32px)</p>
|
|
23
|
+
<p class="ui-text-eyebrow">Eyebrow: Small caps label</p>
|
|
24
|
+
<p class="ui-text-caption">Caption: Labels and hints (12px / 16px)</p>
|
|
25
|
+
<p class="ui-text-body-sm">Body small: Secondary text (14px / 24px)</p>
|
|
26
|
+
|
|
27
|
+
<!-- @weights | column -->
|
|
28
|
+
<p class="ui-font-normal">font-normal (400)</p>
|
|
29
|
+
<p class="ui-font-medium">font-medium (500)</p>
|
|
30
|
+
<p class="ui-font-semibold">font-semibold (600)</p>
|
|
31
|
+
<p class="ui-font-bold">font-bold (700)</p>
|
|
32
|
+
|
|
33
|
+
<!-- @letter_spacing | column -->
|
|
34
|
+
<p class="ui-text-2xl ui-tracking-display">tracking-display: Tight (-0.02em)</p>
|
|
35
|
+
<p class="ui-tracking-body">tracking-body: Default (0)</p>
|
|
36
|
+
<p class="ui-tracking-caps ui-uppercase">tracking-caps: Wide (+0.08em)</p>
|
|
37
|
+
|
|
38
|
+
<!-- @line_length | column -->
|
|
39
|
+
<!-- Constrain text width for optimal readability. -->
|
|
40
|
+
<p class="ui-prose-sm">prose-sm: 45ch max-width</p>
|
|
41
|
+
<p class="ui-prose">prose: 65ch max-width (recommended)</p>
|
|
42
|
+
<p class="ui-prose-lg">prose-lg: 75ch max-width</p>
|
|
43
|
+
|
|
44
|
+
<!-- @colors | column -->
|
|
45
|
+
<p class="ui-text-primary">text-primary</p>
|
|
46
|
+
<p class="ui-text-muted">text-muted</p>
|
|
47
|
+
<p class="ui-text-success">text-success</p>
|
|
48
|
+
<p class="ui-text-warning">text-warning</p>
|
|
49
|
+
<p class="ui-text-danger">text-danger</p>
|
|
50
|
+
|
|
51
|
+
<!-- @alignment | column -->
|
|
52
|
+
<p class="ui-text-start">text-start (default)</p>
|
|
53
|
+
<p class="ui-text-center">text-center</p>
|
|
54
|
+
<p class="ui-text-end">text-end</p>
|
|
55
|
+
|
|
56
|
+
<!-- @text_wrap | column -->
|
|
57
|
+
<!-- Control how text wraps across lines. -->
|
|
58
|
+
<p class="ui-text-balance ui-text-2xl ui-font-bold" style="max-inline-size: 20rem">Balanced: distributes text evenly across lines</p>
|
|
59
|
+
<p class="ui-text-pretty" style="max-inline-size: 20rem">Pretty: avoids orphans and widows for cleaner body text paragraphs that wrap naturally</p>
|
|
60
|
+
<p class="ui-text-nowrap">Nowrap: prevents text from wrapping to the next line</p>
|
|
61
|
+
|
|
62
|
+
<!-- @multi_line_truncation | column -->
|
|
63
|
+
<!-- Clamp text to a specific number of lines with ellipsis. -->
|
|
64
|
+
<p class="ui-truncate-2" style="max-inline-size: 20rem">Truncate to 2 lines: This is a long paragraph that will be clamped after two lines of text. Any overflow content will be hidden and replaced with an ellipsis character.</p>
|
|
65
|
+
<p class="ui-truncate-3" style="max-inline-size: 20rem">Truncate to 3 lines: This is a long paragraph that will be clamped after three lines of text. Any overflow content beyond the third line will be hidden and replaced with an ellipsis character at the end.</p>
|
|
66
|
+
<p class="ui-truncate-4" style="max-inline-size: 20rem">Truncate to 4 lines: This is a long paragraph that will be clamped after four lines. It gives more room for content previews while still maintaining a consistent height. Overflow beyond line four is hidden with ellipsis.</p>
|