@teseor/css 1.14.2 → 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 +7 -3
- package/src/components/actions/button-group/button-group.docs.html +47 -0
- package/src/components/actions/button-group/button-group.visual.spec.ts +7 -3
- package/src/components/actions/close-button/close-button.docs.html +77 -0
- package/src/components/actions/close-button/close-button.visual.spec.ts +7 -3
- package/src/components/content/divider/divider.docs.html +27 -0
- package/src/components/content/divider/divider.visual.spec.ts +7 -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 +7 -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 +7 -3
- package/src/components/data-display/badge/badge.docs.html +39 -0
- package/src/components/data-display/badge/badge.visual.spec.ts +7 -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 +7 -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 +7 -3
- package/src/components/data-display/icon/icon.docs.html +72 -0
- package/src/components/data-display/icon/icon.visual.spec.ts +7 -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 +7 -3
- package/src/components/data-display/stat/stat.docs.html +35 -0
- package/src/components/data-display/stat/stat.visual.spec.ts +7 -3
- package/src/components/data-display/status/status.docs.html +67 -0
- package/src/components/data-display/status/status.visual.spec.ts +7 -3
- package/src/components/data-display/table/table.docs.html +73 -0
- package/src/components/data-display/table/table.visual.spec.ts +7 -3
- package/src/components/data-display/tag/tag.docs.html +42 -0
- package/src/components/data-display/tag/tag.visual.spec.ts +7 -3
- package/src/components/disclosure/accordion/accordion.docs.html +83 -0
- package/src/components/disclosure/accordion/accordion.visual.spec.ts +7 -3
- package/src/components/disclosure/disclosure/disclosure.docs.html +51 -0
- package/src/components/disclosure/disclosure/disclosure.visual.spec.ts +7 -3
- package/src/components/feedback/alert/alert.docs.html +90 -0
- package/src/components/feedback/alert/alert.visual.spec.ts +7 -3
- package/src/components/feedback/progress/progress.docs.html +65 -0
- package/src/components/feedback/progress/progress.visual.spec.ts +7 -3
- package/src/components/feedback/progress-circle/progress-circle.docs.html +65 -0
- package/src/components/feedback/progress-circle/progress-circle.visual.spec.ts +7 -3
- package/src/components/feedback/skeleton/skeleton.docs.html +40 -0
- package/src/components/feedback/skeleton/skeleton.visual.spec.ts +7 -3
- package/src/components/feedback/spinner/spinner.docs.html +28 -0
- package/src/components/feedback/spinner/spinner.visual.spec.ts +7 -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 +7 -3
- package/src/components/forms/checkbox/checkbox.docs.html +33 -0
- package/src/components/forms/checkbox/checkbox.visual.spec.ts +7 -3
- package/src/components/forms/checkbox-group/checkbox-group.docs.html +104 -0
- package/src/components/forms/checkbox-group/checkbox-group.visual.spec.ts +7 -3
- package/src/components/forms/field/field.docs.html +63 -0
- package/src/components/forms/field/field.visual.spec.ts +7 -3
- package/src/components/forms/fieldset/fieldset.docs.html +122 -0
- package/src/components/forms/fieldset/fieldset.visual.spec.ts +7 -3
- package/src/components/forms/form/form.docs.html +132 -0
- package/src/components/forms/form/form.visual.spec.ts +7 -3
- package/src/components/forms/form-error/form-error.docs.html +18 -0
- package/src/components/forms/form-error/form-error.visual.spec.ts +7 -3
- package/src/components/forms/form-helper/form-helper.docs.html +42 -0
- package/src/components/forms/form-helper/form-helper.visual.spec.ts +7 -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 +7 -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 +7 -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 +7 -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 +7 -3
- package/src/components/forms/radio/radio.docs.html +52 -0
- package/src/components/forms/radio/radio.visual.spec.ts +7 -3
- package/src/components/forms/radio-group/radio-group.docs.html +100 -0
- package/src/components/forms/radio-group/radio-group.visual.spec.ts +7 -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 +7 -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 +7 -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 +7 -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 +7 -3
- package/src/components/forms/toggle/toggle.docs.html +64 -0
- package/src/components/forms/toggle/toggle.visual.spec.ts +7 -3
- package/src/components/navigation/breadcrumb/breadcrumb.docs.html +60 -0
- package/src/components/navigation/breadcrumb/breadcrumb.visual.spec.ts +7 -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 +7 -3
- package/src/components/navigation/menu/menu.docs.html +122 -0
- package/src/components/navigation/menu/menu.visual.spec.ts +7 -3
- package/src/components/navigation/nav/nav.docs.html +74 -0
- package/src/components/navigation/nav/nav.visual.spec.ts +7 -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 +7 -3
- package/src/components/navigation/tabs/tabs.docs.html +66 -0
- package/src/components/navigation/tabs/tabs.visual.spec.ts +7 -3
- package/src/components/overlays/dialog/dialog.docs.html +61 -0
- package/src/components/overlays/dialog/dialog.visual.spec.ts +7 -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 +7 -3
- package/src/components/overlays/modal/modal.docs.html +69 -0
- package/src/components/overlays/modal/modal.visual.spec.ts +7 -3
- package/src/components/overlays/overlay/overlay.docs.html +30 -0
- package/src/components/overlays/overlay/overlay.visual.spec.ts +7 -3
- package/src/components/overlays/popover/popover.docs.html +41 -0
- package/src/components/overlays/popover/popover.visual.spec.ts +7 -3
- package/src/components/overlays/tooltip/tooltip.docs.html +33 -0
- package/src/components/overlays/tooltip/tooltip.visual.spec.ts +7 -3
- package/src/components/typography/blockquote/blockquote.docs.html +24 -0
- package/src/components/typography/blockquote/blockquote.visual.spec.ts +7 -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 +7 -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 +7 -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 +7 -3
- package/src/components/typography/kbd/kbd.docs.html +16 -0
- package/src/components/typography/kbd/kbd.visual.spec.ts +7 -3
- package/src/components/typography/link/link.docs.html +33 -0
- package/src/components/typography/link/link.visual.spec.ts +7 -3
- package/src/components/typography/list/list.docs.html +79 -0
- package/src/components/typography/list/list.visual.spec.ts +7 -3
- package/src/components/typography/mark/mark.docs.html +12 -0
- package/src/components/typography/mark/mark.visual.spec.ts +7 -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/debug/index.scss +81 -1
- 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/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/tokens/accessibility.docs.json +0 -125
- package/src/config/tokens/colors/colors.docs.json +0 -316
- package/src/config/tokens/grid/grid.docs.json +0 -54
- package/src/config/tokens/spacing/spacing.docs.json +0 -114
- package/src/config/tokens/theming.docs.json +0 -288
- package/src/debug/grid-overlay.scss +0 -81
- 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/testing/api-types.ts +0 -20
- package/src/testing/grid-alignment.spec.ts +0 -38
- package/src/testing/html-generator.ts +0 -151
- package/src/testing/index.ts +0 -15
- package/src/testing/page-setup.ts +0 -149
- package/src/testing/rhythm.ts +0 -146
- package/src/testing/scaffold.ts +0 -50
- 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
package/package.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Root
|
|
3
|
+
type: token
|
|
4
|
+
id: root
|
|
5
|
+
description: Base styles applied to the .root class: font family, size, line-height, color, and background
|
|
6
|
+
skipValidation: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @usage -->
|
|
10
|
+
<!-- Add the .ui-root class to the html or body element to establish baseline typography and color. -->
|
|
11
|
+
<div class="ui-root">
|
|
12
|
+
<p>Text inherits font-family, size, line-height, and color from .ui-root</p>
|
|
13
|
+
</div>
|
|
14
|
+
.ui-root {
|
|
15
|
+
font-family: var(--ui-font-sans);
|
|
16
|
+
font-size: var(--ui-font-size-md);
|
|
17
|
+
line-height: var(--ui-leading-md);
|
|
18
|
+
color: var(--ui-color-text);
|
|
19
|
+
background: var(--ui-color-bg);
|
|
20
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Typography
|
|
3
|
+
type: token
|
|
4
|
+
id: typography
|
|
5
|
+
description: Modular scale (1.2 ratio) with 8px grid-snapped line-heights. Responsive breakpoints at 730px and 1080px adjust heading sizes.
|
|
6
|
+
skipValidation: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @type_scale -->
|
|
10
|
+
<!-- Font sizes follow a 1.2 (Minor Third) modular scale from 12px to 40px. All line-heights snap to 8px multiples. -->
|
|
11
|
+
<table class="ui-table">
|
|
12
|
+
<thead>
|
|
13
|
+
<tr>
|
|
14
|
+
<th>Token</th>
|
|
15
|
+
<th>Size</th>
|
|
16
|
+
<th>Line-height</th>
|
|
17
|
+
</tr>
|
|
18
|
+
</thead>
|
|
19
|
+
<tbody>
|
|
20
|
+
<tr>
|
|
21
|
+
<td>
|
|
22
|
+
<code>--ui-font-size-xs</code>
|
|
23
|
+
</td>
|
|
24
|
+
<td>12px</td>
|
|
25
|
+
<td>16px</td>
|
|
26
|
+
</tr>
|
|
27
|
+
<tr>
|
|
28
|
+
<td>
|
|
29
|
+
<code>--ui-font-size-sm</code>
|
|
30
|
+
</td>
|
|
31
|
+
<td>14px</td>
|
|
32
|
+
<td>24px</td>
|
|
33
|
+
</tr>
|
|
34
|
+
<tr>
|
|
35
|
+
<td>
|
|
36
|
+
<code>--ui-font-size-md</code>
|
|
37
|
+
</td>
|
|
38
|
+
<td>16px</td>
|
|
39
|
+
<td>24px</td>
|
|
40
|
+
</tr>
|
|
41
|
+
<tr>
|
|
42
|
+
<td>
|
|
43
|
+
<code>--ui-font-size-lg</code>
|
|
44
|
+
</td>
|
|
45
|
+
<td>20px</td>
|
|
46
|
+
<td>32px</td>
|
|
47
|
+
</tr>
|
|
48
|
+
<tr>
|
|
49
|
+
<td>
|
|
50
|
+
<code>--ui-font-size-xl</code>
|
|
51
|
+
</td>
|
|
52
|
+
<td>24px</td>
|
|
53
|
+
<td>32px</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr>
|
|
56
|
+
<td>
|
|
57
|
+
<code>--ui-font-size-2xl</code>
|
|
58
|
+
</td>
|
|
59
|
+
<td>28px</td>
|
|
60
|
+
<td>32px</td>
|
|
61
|
+
</tr>
|
|
62
|
+
<tr>
|
|
63
|
+
<td>
|
|
64
|
+
<code>--ui-font-size-3xl</code>
|
|
65
|
+
</td>
|
|
66
|
+
<td>32px</td>
|
|
67
|
+
<td>40px</td>
|
|
68
|
+
</tr>
|
|
69
|
+
<tr>
|
|
70
|
+
<td>
|
|
71
|
+
<code>--ui-font-size-4xl</code>
|
|
72
|
+
</td>
|
|
73
|
+
<td>40px</td>
|
|
74
|
+
<td>48px</td>
|
|
75
|
+
</tr>
|
|
76
|
+
</tbody>
|
|
77
|
+
</table>
|
|
78
|
+
|
|
79
|
+
<!-- @headings -->
|
|
80
|
+
<!-- Headings use semantic tokens and adjust size at breakpoints. -->
|
|
81
|
+
<h1>Heading 1 - 40px / 48px</h1>
|
|
82
|
+
<h2>Heading 2 - 32px / 40px</h2>
|
|
83
|
+
<h3>Heading 3 - 28px / 32px</h3>
|
|
84
|
+
<h4>Heading 4 - 24px / 32px</h4>
|
|
85
|
+
<h5>Heading 5 - 20px / 24px</h5>
|
|
86
|
+
|
|
87
|
+
<!-- @body_text -->
|
|
88
|
+
<!-- Default body text at 16px with 24px line-height (1.5x ratio). -->
|
|
89
|
+
<p>
|
|
90
|
+
Body text at 16px with 24px line-height. The
|
|
91
|
+
<strong>bold text</strong>
|
|
92
|
+
and
|
|
93
|
+
<code>inline code</code>
|
|
94
|
+
maintain the same rhythm.
|
|
95
|
+
</p>
|
|
96
|
+
<p class="ui-text-body-sm">Body small at 14px with 24px line-height for secondary text.</p>
|
|
97
|
+
|
|
98
|
+
<!-- @text_roles -->
|
|
99
|
+
<!-- Semantic text styles for specific use cases. -->
|
|
100
|
+
<p class="ui-text-lead">Lead paragraph - 20px / 32px. Use for opening paragraphs or article intros.</p>
|
|
101
|
+
<p class="ui-text-eyebrow">Eyebrow text</p>
|
|
102
|
+
<h2>Related Heading</h2>
|
|
103
|
+
<p class="ui-text-caption">Caption text - 12px / 16px. Use for labels, hints, and metadata.</p>
|
|
104
|
+
|
|
105
|
+
<!-- @font_weights -->
|
|
106
|
+
<!-- Four weight levels for hierarchy. -->
|
|
107
|
+
<p class="ui-font-normal">Normal (400) - Body text</p>
|
|
108
|
+
<p class="ui-font-medium">Medium (500) - Labels, small headings</p>
|
|
109
|
+
<p class="ui-font-semibold">Semibold (600) - Subheadings</p>
|
|
110
|
+
<p class="ui-font-bold">Bold (700) - Headlines, emphasis</p>
|
|
111
|
+
|
|
112
|
+
<!-- @letter_spacing -->
|
|
113
|
+
<!-- Three tracking options based on use case. -->
|
|
114
|
+
<p class="ui-text-3xl ui-tracking-display">Display tracking (-0.02em)</p>
|
|
115
|
+
<p>Body tracking (0) - default</p>
|
|
116
|
+
<p class="ui-text-eyebrow">Caps tracking (+0.08em)</p>
|
|
117
|
+
|
|
118
|
+
<!-- @line_length -->
|
|
119
|
+
<!-- Constrain text width for optimal readability (45-75 characters). -->
|
|
120
|
+
<div class="ui-prose">
|
|
121
|
+
<p>This paragraph is constrained to 65ch max-width for optimal reading comfort. Long lines of text are harder to read because the eye has difficulty tracking back to the start of the next line.</p>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<!-- @responsive_behavior -->
|
|
125
|
+
<!-- Headings scale down on mobile (<730px) and up on desktop (>1080px). -->
|
|
126
|
+
<table class="ui-table">
|
|
127
|
+
<thead>
|
|
128
|
+
<tr>
|
|
129
|
+
<th>Heading</th>
|
|
130
|
+
<th>Mobile</th>
|
|
131
|
+
<th>Default</th>
|
|
132
|
+
<th>Desktop</th>
|
|
133
|
+
</tr>
|
|
134
|
+
</thead>
|
|
135
|
+
<tbody>
|
|
136
|
+
<tr>
|
|
137
|
+
<td>h1</td>
|
|
138
|
+
<td>28px</td>
|
|
139
|
+
<td>40px</td>
|
|
140
|
+
<td>48px</td>
|
|
141
|
+
</tr>
|
|
142
|
+
<tr>
|
|
143
|
+
<td>h2</td>
|
|
144
|
+
<td>24px</td>
|
|
145
|
+
<td>32px</td>
|
|
146
|
+
<td>40px</td>
|
|
147
|
+
</tr>
|
|
148
|
+
<tr>
|
|
149
|
+
<td>h3</td>
|
|
150
|
+
<td>20px</td>
|
|
151
|
+
<td>28px</td>
|
|
152
|
+
<td>28px</td>
|
|
153
|
+
</tr>
|
|
154
|
+
<tr>
|
|
155
|
+
<td>h4</td>
|
|
156
|
+
<td>18px</td>
|
|
157
|
+
<td>24px</td>
|
|
158
|
+
<td>24px</td>
|
|
159
|
+
</tr>
|
|
160
|
+
</tbody>
|
|
161
|
+
</table>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Button
|
|
3
|
+
type: component
|
|
4
|
+
id: button
|
|
5
|
+
description: Buttons trigger actions. Use primary for main CTA, secondary for less important actions.
|
|
6
|
+
api: ./button.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @variants | row -->
|
|
10
|
+
<!-- Button styles for different purposes and emphasis levels. -->
|
|
11
|
+
<button class="ui-button">Primary</button>
|
|
12
|
+
<button class="ui-button ui-button--secondary">Secondary</button>
|
|
13
|
+
<button class="ui-button ui-button--outline">Outline</button>
|
|
14
|
+
<button class="ui-button ui-button--ghost">Ghost</button>
|
|
15
|
+
<button class="ui-button ui-button--danger">Danger</button>
|
|
16
|
+
<button class="ui-button ui-button--link">Link</button>
|
|
17
|
+
|
|
18
|
+
<!-- @sizes | row -->
|
|
19
|
+
<!-- Small for dense UIs, default for most cases, large for prominent CTAs. -->
|
|
20
|
+
<button class="ui-button ui-button--sm">Small</button>
|
|
21
|
+
<button class="ui-button ui-button--md">Medium</button>
|
|
22
|
+
<button class="ui-button ui-button--lg">Large</button>
|
|
23
|
+
|
|
24
|
+
<!-- @radius | row -->
|
|
25
|
+
<!-- Override border radius. Use radius-full for pill-shaped buttons. -->
|
|
26
|
+
<button class="ui-button ui-button--radius-none">None</button>
|
|
27
|
+
<button class="ui-button ui-button--radius-sm">Small</button>
|
|
28
|
+
<button class="ui-button">Default</button>
|
|
29
|
+
<button class="ui-button ui-button--radius-lg">Large</button>
|
|
30
|
+
<button class="ui-button ui-button--radius-full">Full</button>
|
|
31
|
+
|
|
32
|
+
<!-- @block -->
|
|
33
|
+
<!-- Full width button for mobile or form submit. -->
|
|
34
|
+
<button class="ui-button ui-button--block">Block Button</button>
|
|
35
|
+
|
|
36
|
+
<!-- @loading | row -->
|
|
37
|
+
<!-- Shows spinner animation. Button becomes non-interactive. -->
|
|
38
|
+
<button class="ui-button ui-button--loading">Loading</button>
|
|
39
|
+
<button class="ui-button ui-button--secondary ui-button--loading">Loading</button>
|
|
40
|
+
|
|
41
|
+
<!-- @icon_button | row -->
|
|
42
|
+
<!-- Square icon-only buttons. Use with SVG icons from Lucide or similar sets. -->
|
|
43
|
+
<button class="ui-button ui-button--icon ui-button--sm">
|
|
44
|
+
<svg class="ui-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
45
|
+
<path d="M18 6 6 18"></path>
|
|
46
|
+
<path d="m6 6 12 12"></path>
|
|
47
|
+
</svg>
|
|
48
|
+
</button>
|
|
49
|
+
<button class="ui-button ui-button--icon">
|
|
50
|
+
<svg class="ui-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
51
|
+
<path d="M5 12h14"></path>
|
|
52
|
+
<path d="M12 5v14"></path>
|
|
53
|
+
</svg>
|
|
54
|
+
</button>
|
|
55
|
+
<button class="ui-button ui-button--icon ui-button--lg">
|
|
56
|
+
<svg class="ui-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
57
|
+
<circle cx="11" cy="11" r="8"></circle>
|
|
58
|
+
<path d="m21 21-4.3-4.3"></path>
|
|
59
|
+
</svg>
|
|
60
|
+
</button>
|
|
61
|
+
|
|
62
|
+
<!-- @with_icon | row -->
|
|
63
|
+
<!-- Buttons with icon and text. Use ui-button__icon element with --start or --end modifier. -->
|
|
64
|
+
<button class="ui-button">
|
|
65
|
+
<svg class="ui-icon ui-button__icon ui-button__icon--start" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
66
|
+
<path d="M5 12h14"></path>
|
|
67
|
+
<path d="M12 5v14"></path>
|
|
68
|
+
</svg>
|
|
69
|
+
Add Item
|
|
70
|
+
</button>
|
|
71
|
+
<button class="ui-button ui-button--secondary">
|
|
72
|
+
Next
|
|
73
|
+
<svg class="ui-icon ui-button__icon ui-button__icon--end" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
74
|
+
<path d="m9 18 6-6-6-6"></path>
|
|
75
|
+
</svg>
|
|
76
|
+
</button>
|
|
@@ -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, 'button.docs.
|
|
9
|
+
const DOCS_PATH = resolve(__dirname, 'button.docs.html');
|
|
6
10
|
|
|
7
11
|
test.describe('button visual regression', () => {
|
|
8
12
|
test('all variations', async ({ page }) => {
|
|
9
|
-
await
|
|
13
|
+
await setupVisualTestFromHtmlDocs(page, DOCS_PATH);
|
|
10
14
|
await validateGridRhythm(page, 'button');
|
|
11
15
|
await saveForLostPixel(page, 'button');
|
|
12
16
|
await expect(page.locator('body')).toHaveScreenshot('button.visual.png');
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Button Group
|
|
3
|
+
type: component
|
|
4
|
+
id: button-group
|
|
5
|
+
description: Container for grouped buttons that share borders and have connected appearance.
|
|
6
|
+
api: ./button-group.api.json
|
|
7
|
+
mergeInto: button
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<!-- @default -->
|
|
11
|
+
<div class="ui-button-group" role="group">
|
|
12
|
+
<button class="ui-button ui-button--outline">Left</button>
|
|
13
|
+
<button class="ui-button ui-button--outline">Middle</button>
|
|
14
|
+
<button class="ui-button ui-button--outline">Right</button>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<!-- @primary_buttons -->
|
|
18
|
+
<div class="ui-button-group" role="group">
|
|
19
|
+
<button class="ui-button">Save</button>
|
|
20
|
+
<button class="ui-button">Save & Close</button>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<!-- @vertical -->
|
|
24
|
+
<div class="ui-button-group ui-button-group--vertical" role="group">
|
|
25
|
+
<button class="ui-button ui-button--outline">Top</button>
|
|
26
|
+
<button class="ui-button ui-button--outline">Middle</button>
|
|
27
|
+
<button class="ui-button ui-button--outline">Bottom</button>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<!-- @with_icons -->
|
|
31
|
+
<div class="ui-button-group" role="group" aria-label="Text formatting">
|
|
32
|
+
<button class="ui-button ui-button--outline ui-button--icon" aria-label="Bold">
|
|
33
|
+
<svg class="ui-icon" viewBox="0 0 24 24" fill="currentColor">
|
|
34
|
+
<path d="M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"></path>
|
|
35
|
+
</svg>
|
|
36
|
+
</button>
|
|
37
|
+
<button class="ui-button ui-button--outline ui-button--icon" aria-label="Italic">
|
|
38
|
+
<svg class="ui-icon" viewBox="0 0 24 24" fill="currentColor">
|
|
39
|
+
<path d="M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"></path>
|
|
40
|
+
</svg>
|
|
41
|
+
</button>
|
|
42
|
+
<button class="ui-button ui-button--outline ui-button--icon" aria-label="Underline">
|
|
43
|
+
<svg class="ui-icon" viewBox="0 0 24 24" fill="currentColor">
|
|
44
|
+
<path d="M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"></path>
|
|
45
|
+
</svg>
|
|
46
|
+
</button>
|
|
47
|
+
</div>
|
|
@@ -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, 'button-group.docs.
|
|
9
|
+
const DOCS_PATH = resolve(__dirname, 'button-group.docs.html');
|
|
6
10
|
|
|
7
11
|
test.describe('button-group visual regression', () => {
|
|
8
12
|
test('all variations', async ({ page }) => {
|
|
9
|
-
await
|
|
13
|
+
await setupVisualTestFromHtmlDocs(page, DOCS_PATH);
|
|
10
14
|
await validateGridRhythm(page, 'button-group');
|
|
11
15
|
await saveForLostPixel(page, 'button-group');
|
|
12
16
|
await expect(page.locator('body')).toHaveScreenshot('button-group.visual.png');
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Close Button
|
|
3
|
+
type: component
|
|
4
|
+
id: close-button
|
|
5
|
+
description: Dismiss button for closing modals, alerts, drawers, and other dismissible elements.
|
|
6
|
+
api: ./close-button.api.json
|
|
7
|
+
mergeInto: button
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<!-- @default -->
|
|
11
|
+
<button class="ui-close-button" type="button" aria-label="Close">
|
|
12
|
+
<svg class="ui-close-button__icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
13
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
14
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
15
|
+
</svg>
|
|
16
|
+
</button>
|
|
17
|
+
|
|
18
|
+
<!-- @sizes | row -->
|
|
19
|
+
<button class="ui-close-button ui-close-button--sm" type="button" aria-label="Close">
|
|
20
|
+
<svg class="ui-close-button__icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
21
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
22
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
23
|
+
</svg>
|
|
24
|
+
</button>
|
|
25
|
+
<button class="ui-close-button" type="button" aria-label="Close">
|
|
26
|
+
<svg class="ui-close-button__icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
27
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
28
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
29
|
+
</svg>
|
|
30
|
+
</button>
|
|
31
|
+
<button class="ui-close-button ui-close-button--lg" type="button" aria-label="Close">
|
|
32
|
+
<svg class="ui-close-button__icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
33
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
34
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
35
|
+
</svg>
|
|
36
|
+
</button>
|
|
37
|
+
|
|
38
|
+
<!-- @subtle | row -->
|
|
39
|
+
<!-- Lower visual prominence for secondary dismiss actions. -->
|
|
40
|
+
<button class="ui-close-button ui-close-button--subtle" type="button" aria-label="Close">
|
|
41
|
+
<svg class="ui-close-button__icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
42
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
43
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
44
|
+
</svg>
|
|
45
|
+
</button>
|
|
46
|
+
<button class="ui-close-button ui-close-button--subtle ui-close-button--sm" type="button" aria-label="Close">
|
|
47
|
+
<svg class="ui-close-button__icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
48
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
49
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
50
|
+
</svg>
|
|
51
|
+
</button>
|
|
52
|
+
|
|
53
|
+
<!-- @states | row -->
|
|
54
|
+
<button class="ui-close-button" type="button" aria-label="Close">
|
|
55
|
+
<svg class="ui-close-button__icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
56
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
57
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
58
|
+
</svg>
|
|
59
|
+
</button>
|
|
60
|
+
<button class="ui-close-button ui-close-button--hover" type="button" aria-label="Close">
|
|
61
|
+
<svg class="ui-close-button__icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
62
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
63
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
64
|
+
</svg>
|
|
65
|
+
</button>
|
|
66
|
+
<button class="ui-close-button ui-close-button--focus" type="button" aria-label="Close">
|
|
67
|
+
<svg class="ui-close-button__icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
68
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
69
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
70
|
+
</svg>
|
|
71
|
+
</button>
|
|
72
|
+
<button class="ui-close-button" type="button" aria-label="Close" disabled>
|
|
73
|
+
<svg class="ui-close-button__icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
74
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
75
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
76
|
+
</svg>
|
|
77
|
+
</button>
|
|
@@ -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, 'close-button.docs.
|
|
9
|
+
const DOCS_PATH = resolve(__dirname, 'close-button.docs.html');
|
|
6
10
|
|
|
7
11
|
test.describe('close-button visual regression', () => {
|
|
8
12
|
test('all variations', async ({ page }) => {
|
|
9
|
-
await
|
|
13
|
+
await setupVisualTestFromHtmlDocs(page, DOCS_PATH);
|
|
10
14
|
await validateGridRhythm(page, 'close-button');
|
|
11
15
|
await saveForLostPixel(page, 'close-button');
|
|
12
16
|
await expect(page.locator('body')).toHaveScreenshot('close-button.visual.png');
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Divider
|
|
3
|
+
type: component
|
|
4
|
+
description: Visual separator between content sections. Supports horizontal/vertical orientation and optional text label.
|
|
5
|
+
api: ./divider.api.json
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- @default -->
|
|
9
|
+
<div class="ui-divider" role="separator"></div>
|
|
10
|
+
|
|
11
|
+
<!-- @with_label -->
|
|
12
|
+
<div class="ui-divider" role="separator">OR</div>
|
|
13
|
+
|
|
14
|
+
<!-- @label_alignment -->
|
|
15
|
+
<div class="ui-divider ui-divider--start" role="separator">{{ t('start', 'Start') }}</div>
|
|
16
|
+
<div class="ui-divider" role="separator">{{ t('center', 'Center') }}</div>
|
|
17
|
+
<div class="ui-divider ui-divider--end" role="separator">{{ t('end', 'End') }}</div>
|
|
18
|
+
|
|
19
|
+
<!-- @dashed -->
|
|
20
|
+
<div class="ui-divider ui-divider--dashed" role="separator"></div>
|
|
21
|
+
|
|
22
|
+
<!-- @vertical -->
|
|
23
|
+
<div style="display: flex; height: 64px; align-items: center;">
|
|
24
|
+
<span>{{ t('left', 'Left') }}</span>
|
|
25
|
+
<div class="ui-divider ui-divider--vertical" role="separator"></div>
|
|
26
|
+
<span>{{ t('right', 'Right') }}</span>
|
|
27
|
+
</div>
|
|
@@ -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, 'divider.docs.
|
|
9
|
+
const DOCS_PATH = resolve(__dirname, 'divider.docs.html');
|
|
6
10
|
|
|
7
11
|
test.describe('divider visual regression', () => {
|
|
8
12
|
test('all variations', async ({ page }) => {
|
|
9
|
-
await
|
|
13
|
+
await setupVisualTestFromHtmlDocs(page, DOCS_PATH);
|
|
10
14
|
await validateGridRhythm(page, 'divider');
|
|
11
15
|
await saveForLostPixel(page, 'divider');
|
|
12
16
|
await expect(page.locator('body')).toHaveScreenshot('divider.visual.png');
|
|
Binary file
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Scroll Area
|
|
3
|
+
type: component
|
|
4
|
+
id: scroll-area
|
|
5
|
+
description: Scrollable container with styled scrollbar. Provides overflow control and custom scrollbar styling.
|
|
6
|
+
api: ./scroll-area.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @default -->
|
|
10
|
+
<div class="ui-scroll-area">
|
|
11
|
+
<div class="ui-scroll-area__viewport">
|
|
12
|
+
<p>Line 1 of scrollable content</p>
|
|
13
|
+
<p>Line 2 of scrollable content</p>
|
|
14
|
+
<p>Line 3 of scrollable content</p>
|
|
15
|
+
<p>Line 4 of scrollable content</p>
|
|
16
|
+
<p>Line 5 of scrollable content</p>
|
|
17
|
+
<p>Line 6 of scrollable content</p>
|
|
18
|
+
<p>Line 7 of scrollable content</p>
|
|
19
|
+
<p>Line 8 of scrollable content</p>
|
|
20
|
+
<p>Line 9 of scrollable content</p>
|
|
21
|
+
<p>Line 10 of scrollable content</p>
|
|
22
|
+
<p>Line 11 of scrollable content</p>
|
|
23
|
+
<p>Line 12 of scrollable content</p>
|
|
24
|
+
<p>Line 13 of scrollable content</p>
|
|
25
|
+
<p>Line 14 of scrollable content</p>
|
|
26
|
+
<p>Line 15 of scrollable content</p>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<!-- @sizes | column -->
|
|
31
|
+
<div class="ui-scroll-area ui-scroll-area--sm">
|
|
32
|
+
<div class="ui-scroll-area__viewport">
|
|
33
|
+
<p>Small - Line 1</p>
|
|
34
|
+
<p>Small - Line 2</p>
|
|
35
|
+
<p>Small - Line 3</p>
|
|
36
|
+
<p>Small - Line 4</p>
|
|
37
|
+
<p>Small - Line 5</p>
|
|
38
|
+
<p>Small - Line 6</p>
|
|
39
|
+
<p>Small - Line 7</p>
|
|
40
|
+
<p>Small - Line 8</p>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="ui-scroll-area ui-scroll-area--xl">
|
|
44
|
+
<div class="ui-scroll-area__viewport">
|
|
45
|
+
<p>XL - Line 1</p>
|
|
46
|
+
<p>XL - Line 2</p>
|
|
47
|
+
<p>XL - Line 3</p>
|
|
48
|
+
<p>XL - Line 4</p>
|
|
49
|
+
<p>XL - Line 5</p>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="ui-scroll-area ui-scroll-area--lg">
|
|
53
|
+
<div class="ui-scroll-area__viewport">
|
|
54
|
+
<p>Large - Line 1</p>
|
|
55
|
+
<p>Large - Line 2</p>
|
|
56
|
+
<p>Large - Line 3</p>
|
|
57
|
+
<p>Large - Line 4</p>
|
|
58
|
+
<p>Large - Line 5</p>
|
|
59
|
+
<p>Large - Line 6</p>
|
|
60
|
+
<p>Large - Line 7</p>
|
|
61
|
+
<p>Large - Line 8</p>
|
|
62
|
+
<p>Large - Line 9</p>
|
|
63
|
+
<p>Large - Line 10</p>
|
|
64
|
+
<p>Large - Line 11</p>
|
|
65
|
+
<p>Large - Line 12</p>
|
|
66
|
+
<p>Large - Line 13</p>
|
|
67
|
+
<p>Large - Line 14</p>
|
|
68
|
+
<p>Large - Line 15</p>
|
|
69
|
+
<p>Large - Line 16</p>
|
|
70
|
+
<p>Large - Line 17</p>
|
|
71
|
+
<p>Large - Line 18</p>
|
|
72
|
+
<p>Large - Line 19</p>
|
|
73
|
+
<p>Large - Line 20</p>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<!-- @direction | column -->
|
|
78
|
+
<div class="ui-scroll-area ui-scroll-area--horizontal">
|
|
79
|
+
<div class="ui-scroll-area__viewport">
|
|
80
|
+
<p style="white-space: nowrap">This content scrolls horizontally when it overflows the container width. Resize the window to test.</p>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="ui-scroll-area ui-scroll-area--both ui-scroll-area--sm">
|
|
84
|
+
<div class="ui-scroll-area__viewport">
|
|
85
|
+
<p style="white-space: nowrap">Both directions - Line 1 with long content that overflows horizontally</p>
|
|
86
|
+
<p>Line 2</p>
|
|
87
|
+
<p>Line 3</p>
|
|
88
|
+
<p>Line 4</p>
|
|
89
|
+
<p>Line 5</p>
|
|
90
|
+
<p>Line 6</p>
|
|
91
|
+
<p>Line 7</p>
|
|
92
|
+
<p>Line 8</p>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<!-- @thin_scrollbar -->
|
|
97
|
+
<div class="ui-scroll-area ui-scroll-area--thin">
|
|
98
|
+
<div class="ui-scroll-area__viewport">
|
|
99
|
+
<p>Thin scrollbar - Line 1</p>
|
|
100
|
+
<p>Thin scrollbar - Line 2</p>
|
|
101
|
+
<p>Thin scrollbar - Line 3</p>
|
|
102
|
+
<p>Thin scrollbar - Line 4</p>
|
|
103
|
+
<p>Thin scrollbar - Line 5</p>
|
|
104
|
+
<p>Thin scrollbar - Line 6</p>
|
|
105
|
+
<p>Thin scrollbar - Line 7</p>
|
|
106
|
+
<p>Thin scrollbar - Line 8</p>
|
|
107
|
+
<p>Thin scrollbar - Line 9</p>
|
|
108
|
+
<p>Thin scrollbar - Line 10</p>
|
|
109
|
+
<p>Thin scrollbar - Line 11</p>
|
|
110
|
+
<p>Thin scrollbar - Line 12</p>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
<!-- @auto_hide -->
|
|
115
|
+
<div class="ui-scroll-area ui-scroll-area--auto-hide">
|
|
116
|
+
<div class="ui-scroll-area__viewport">
|
|
117
|
+
<p>Scrollbar hidden until hover - Line 1</p>
|
|
118
|
+
<p>Scrollbar hidden until hover - Line 2</p>
|
|
119
|
+
<p>Scrollbar hidden until hover - Line 3</p>
|
|
120
|
+
<p>Scrollbar hidden until hover - Line 4</p>
|
|
121
|
+
<p>Scrollbar hidden until hover - Line 5</p>
|
|
122
|
+
<p>Scrollbar hidden until hover - Line 6</p>
|
|
123
|
+
<p>Scrollbar hidden until hover - Line 7</p>
|
|
124
|
+
<p>Scrollbar hidden until hover - Line 8</p>
|
|
125
|
+
<p>Scrollbar hidden until hover - Line 9</p>
|
|
126
|
+
<p>Scrollbar hidden until hover - Line 10</p>
|
|
127
|
+
<p>Scrollbar hidden until hover - Line 11</p>
|
|
128
|
+
<p>Scrollbar hidden until hover - Line 12</p>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
@@ -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, 'scroll-area.docs.
|
|
9
|
+
const DOCS_PATH = resolve(__dirname, 'scroll-area.docs.html');
|
|
6
10
|
|
|
7
11
|
test.describe('scroll-area visual regression', () => {
|
|
8
12
|
test('all variations', async ({ page }) => {
|
|
9
|
-
await
|
|
13
|
+
await setupVisualTestFromHtmlDocs(page, DOCS_PATH);
|
|
10
14
|
await validateGridRhythm(page, 'scroll-area');
|
|
11
15
|
await saveForLostPixel(page, 'scroll-area');
|
|
12
16
|
await expect(page.locator('body')).toHaveScreenshot('scroll-area-visual.png');
|