@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,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Fieldset
|
|
3
|
+
type: component
|
|
4
|
+
id: fieldset
|
|
5
|
+
description: Groups related form fields with an optional legend and border.
|
|
6
|
+
api: ./fieldset.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @default -->
|
|
10
|
+
<fieldset class="ui-fieldset">
|
|
11
|
+
<legend class="ui-fieldset__legend">Personal Information</legend>
|
|
12
|
+
<div class="ui-field">
|
|
13
|
+
<label class="ui-label" for="fname">First Name</label>
|
|
14
|
+
<div class="ui-field__control">
|
|
15
|
+
<input class="ui-input" type="text" id="fname" placeholder="Jane"></input>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="ui-field">
|
|
19
|
+
<label class="ui-label" for="lname">Last Name</label>
|
|
20
|
+
<div class="ui-field__control">
|
|
21
|
+
<input class="ui-input" type="text" id="lname" placeholder="Doe"></input>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</fieldset>
|
|
25
|
+
|
|
26
|
+
<!-- @bordered -->
|
|
27
|
+
<!-- Visible border wrapping the field group -->
|
|
28
|
+
<fieldset class="ui-fieldset ui-fieldset--bordered">
|
|
29
|
+
<legend class="ui-fieldset__legend">Shipping Address</legend>
|
|
30
|
+
<div class="ui-field">
|
|
31
|
+
<label class="ui-label" for="street">Street</label>
|
|
32
|
+
<div class="ui-field__control">
|
|
33
|
+
<input class="ui-input" type="text" id="street" placeholder="123 Example St"></input>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="ui-field">
|
|
37
|
+
<label class="ui-label" for="city">City</label>
|
|
38
|
+
<div class="ui-field__control">
|
|
39
|
+
<input class="ui-input" type="text" id="city" placeholder="Springfield"></input>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</fieldset>
|
|
43
|
+
|
|
44
|
+
<!-- @compact -->
|
|
45
|
+
<!-- Reduced spacing for dense forms -->
|
|
46
|
+
<fieldset class="ui-fieldset ui-fieldset--compact">
|
|
47
|
+
<legend class="ui-fieldset__legend">Preferences</legend>
|
|
48
|
+
<div class="ui-field">
|
|
49
|
+
<label class="ui-label" for="lang">Language</label>
|
|
50
|
+
<div class="ui-field__control">
|
|
51
|
+
<select class="ui-select" id="lang">
|
|
52
|
+
<option>English</option>
|
|
53
|
+
<option>Spanish</option>
|
|
54
|
+
</select>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="ui-field">
|
|
58
|
+
<label class="ui-label" for="tz">Timezone</label>
|
|
59
|
+
<div class="ui-field__control">
|
|
60
|
+
<select class="ui-select" id="tz">
|
|
61
|
+
<option>UTC-5 Eastern</option>
|
|
62
|
+
<option>UTC-8 Pacific</option>
|
|
63
|
+
</select>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</fieldset>
|
|
67
|
+
|
|
68
|
+
<!-- @bordered_compact -->
|
|
69
|
+
<!-- Bordered with reduced spacing -->
|
|
70
|
+
<fieldset class="ui-fieldset ui-fieldset--bordered ui-fieldset--compact">
|
|
71
|
+
<legend class="ui-fieldset__legend">Payment</legend>
|
|
72
|
+
<div class="ui-field">
|
|
73
|
+
<label class="ui-label" for="card">Card Number</label>
|
|
74
|
+
<div class="ui-field__control">
|
|
75
|
+
<input class="ui-input" type="text" id="card" placeholder="4242 4242 4242 4242"></input>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="ui-field">
|
|
79
|
+
<label class="ui-label" for="exp">Expiry</label>
|
|
80
|
+
<div class="ui-field__control">
|
|
81
|
+
<input class="ui-input" type="text" id="exp" placeholder="MM/YY"></input>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</fieldset>
|
|
85
|
+
|
|
86
|
+
<!-- @disabled -->
|
|
87
|
+
<!-- Native disabled attribute disables all child controls -->
|
|
88
|
+
<fieldset class="ui-fieldset ui-fieldset--bordered" disabled>
|
|
89
|
+
<legend class="ui-fieldset__legend">Account (locked)</legend>
|
|
90
|
+
<div class="ui-field">
|
|
91
|
+
<label class="ui-label" for="uname">Username</label>
|
|
92
|
+
<div class="ui-field__control">
|
|
93
|
+
<input class="ui-input" type="text" id="uname" value="janedoe"></input>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
<div class="ui-field">
|
|
97
|
+
<label class="ui-label" for="role">Role</label>
|
|
98
|
+
<div class="ui-field__control">
|
|
99
|
+
<input class="ui-input" type="text" id="role" value="Editor"></input>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</fieldset>
|
|
103
|
+
|
|
104
|
+
<!-- @without_legend -->
|
|
105
|
+
<!-- Fieldset as a spacing container without visible legend -->
|
|
106
|
+
<fieldset class="ui-fieldset">
|
|
107
|
+
<div class="ui-field">
|
|
108
|
+
<label class="ui-label" for="search">Search</label>
|
|
109
|
+
<div class="ui-field__control">
|
|
110
|
+
<input class="ui-input" type="search" id="search" placeholder="Search..."></input>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<div class="ui-field">
|
|
114
|
+
<label class="ui-label" for="cat">Category</label>
|
|
115
|
+
<div class="ui-field__control">
|
|
116
|
+
<select class="ui-select" id="cat">
|
|
117
|
+
<option>All</option>
|
|
118
|
+
<option>Articles</option>
|
|
119
|
+
</select>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</fieldset>
|
|
@@ -2,15 +2,15 @@ import { resolve } from 'node:path';
|
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
3
|
import {
|
|
4
4
|
saveForLostPixel,
|
|
5
|
-
|
|
5
|
+
setupVisualTestFromHtmlDocs,
|
|
6
6
|
validateGridRhythm,
|
|
7
7
|
} from '../../../../test-utils';
|
|
8
8
|
|
|
9
|
-
const DOCS_PATH = resolve(__dirname, 'fieldset.docs.
|
|
9
|
+
const DOCS_PATH = resolve(__dirname, 'fieldset.docs.html');
|
|
10
10
|
|
|
11
11
|
test.describe('fieldset visual regression', () => {
|
|
12
12
|
test('all variations', async ({ page }) => {
|
|
13
|
-
await
|
|
13
|
+
await setupVisualTestFromHtmlDocs(page, DOCS_PATH);
|
|
14
14
|
await validateGridRhythm(page, 'fieldset');
|
|
15
15
|
await saveForLostPixel(page, 'fieldset');
|
|
16
16
|
await expect(page.locator('body')).toHaveScreenshot('fieldset.visual.png');
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Form
|
|
3
|
+
type: component
|
|
4
|
+
id: form
|
|
5
|
+
description: Layout container for form fields with consistent spacing, sections, and an actions row.
|
|
6
|
+
api: ./form.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @default -->
|
|
10
|
+
<form class="ui-form">
|
|
11
|
+
<div class="ui-field">
|
|
12
|
+
<label class="ui-label" for="f-name">Name</label>
|
|
13
|
+
<div class="ui-field__control">
|
|
14
|
+
<input class="ui-input" type="text" id="f-name" placeholder="Full name"></input>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="ui-field">
|
|
18
|
+
<label class="ui-label" for="f-email">Email</label>
|
|
19
|
+
<div class="ui-field__control">
|
|
20
|
+
<input class="ui-input" type="email" id="f-email" placeholder="you@example.com"></input>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="ui-form__actions">
|
|
24
|
+
<button class="ui-button">Submit</button>
|
|
25
|
+
<button class="ui-button ui-button--ghost" type="button">Cancel</button>
|
|
26
|
+
</div>
|
|
27
|
+
</form>
|
|
28
|
+
|
|
29
|
+
<!-- @with_sections -->
|
|
30
|
+
<!-- Group related fields using fieldset-based sections -->
|
|
31
|
+
<form class="ui-form">
|
|
32
|
+
<fieldset class="ui-form__section">
|
|
33
|
+
<legend class="ui-heading ui-heading--sm">Personal</legend>
|
|
34
|
+
<div class="ui-field">
|
|
35
|
+
<label class="ui-label" for="s-first">First name</label>
|
|
36
|
+
<div class="ui-field__control">
|
|
37
|
+
<input class="ui-input" type="text" id="s-first"></input>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="ui-field">
|
|
41
|
+
<label class="ui-label" for="s-last">Last name</label>
|
|
42
|
+
<div class="ui-field__control">
|
|
43
|
+
<input class="ui-input" type="text" id="s-last"></input>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</fieldset>
|
|
47
|
+
<fieldset class="ui-form__section">
|
|
48
|
+
<legend class="ui-heading ui-heading--sm">Account</legend>
|
|
49
|
+
<div class="ui-field">
|
|
50
|
+
<label class="ui-label" for="s-email">Email</label>
|
|
51
|
+
<div class="ui-field__control">
|
|
52
|
+
<input class="ui-input" type="email" id="s-email"></input>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="ui-field">
|
|
56
|
+
<label class="ui-label" for="s-pass">Password</label>
|
|
57
|
+
<div class="ui-field__control">
|
|
58
|
+
<input class="ui-input" type="password" id="s-pass"></input>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</fieldset>
|
|
62
|
+
<div class="ui-form__actions">
|
|
63
|
+
<button class="ui-button">Create account</button>
|
|
64
|
+
</div>
|
|
65
|
+
</form>
|
|
66
|
+
|
|
67
|
+
<!-- @compact -->
|
|
68
|
+
<!-- Tighter spacing for dense interfaces -->
|
|
69
|
+
<form class="ui-form ui-form--compact">
|
|
70
|
+
<div class="ui-field">
|
|
71
|
+
<label class="ui-label" for="c-user">Username</label>
|
|
72
|
+
<div class="ui-field__control">
|
|
73
|
+
<input class="ui-input" type="text" id="c-user"></input>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="ui-field">
|
|
77
|
+
<label class="ui-label" for="c-pass">Password</label>
|
|
78
|
+
<div class="ui-field__control">
|
|
79
|
+
<input class="ui-input" type="password" id="c-pass"></input>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="ui-form__actions">
|
|
83
|
+
<button class="ui-button">Log in</button>
|
|
84
|
+
</div>
|
|
85
|
+
</form>
|
|
86
|
+
|
|
87
|
+
<!-- @inline -->
|
|
88
|
+
<!-- Horizontal layout for short forms like search or filters -->
|
|
89
|
+
<form class="ui-form ui-form--inline">
|
|
90
|
+
<div class="ui-field">
|
|
91
|
+
<label class="ui-label" for="i-search">Search</label>
|
|
92
|
+
<div class="ui-field__control">
|
|
93
|
+
<input class="ui-input" type="search" id="i-search" placeholder="Search..."></input>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
<div class="ui-field">
|
|
97
|
+
<label class="ui-label" for="i-cat">Category</label>
|
|
98
|
+
<div class="ui-field__control">
|
|
99
|
+
<select class="ui-select" id="i-cat">
|
|
100
|
+
<option>All</option>
|
|
101
|
+
<option>Articles</option>
|
|
102
|
+
<option>Products</option>
|
|
103
|
+
</select>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
<div class="ui-form__actions">
|
|
107
|
+
<button class="ui-button">Filter</button>
|
|
108
|
+
</div>
|
|
109
|
+
</form>
|
|
110
|
+
|
|
111
|
+
<!-- @with_validation -->
|
|
112
|
+
<!-- Combining form layout with field error states -->
|
|
113
|
+
<form class="ui-form">
|
|
114
|
+
<div class="ui-field">
|
|
115
|
+
<label class="ui-label ui-label--required" for="v-email">Email</label>
|
|
116
|
+
<div class="ui-field__control">
|
|
117
|
+
<input class="ui-input ui-input--error" type="email" id="v-email" value="not-an-email"></input>
|
|
118
|
+
<span class="ui-form-error">Enter a valid email address</span>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
<div class="ui-field">
|
|
122
|
+
<label class="ui-label ui-label--required" for="v-pass">Password</label>
|
|
123
|
+
<div class="ui-field__control">
|
|
124
|
+
<input class="ui-input" type="password" id="v-pass"></input>
|
|
125
|
+
<span class="ui-form-helper">Must be at least 8 characters</span>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
<div class="ui-form__actions">
|
|
129
|
+
<button class="ui-button">Sign up</button>
|
|
130
|
+
<button class="ui-button ui-button--ghost" type="button">Reset</button>
|
|
131
|
+
</div>
|
|
132
|
+
</form>
|
|
@@ -2,15 +2,15 @@ import { resolve } from 'node:path';
|
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
3
|
import {
|
|
4
4
|
saveForLostPixel,
|
|
5
|
-
|
|
5
|
+
setupVisualTestFromHtmlDocs,
|
|
6
6
|
validateGridRhythm,
|
|
7
7
|
} from '../../../../test-utils';
|
|
8
8
|
|
|
9
|
-
const DOCS_PATH = resolve(__dirname, 'form.docs.
|
|
9
|
+
const DOCS_PATH = resolve(__dirname, 'form.docs.html');
|
|
10
10
|
|
|
11
11
|
test.describe('form visual regression', () => {
|
|
12
12
|
test('all variations', async ({ page }) => {
|
|
13
|
-
await
|
|
13
|
+
await setupVisualTestFromHtmlDocs(page, DOCS_PATH);
|
|
14
14
|
await validateGridRhythm(page, 'form');
|
|
15
15
|
await saveForLostPixel(page, 'form');
|
|
16
16
|
await expect(page.locator('body')).toHaveScreenshot('form.visual.png');
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Form Error
|
|
3
|
+
type: component
|
|
4
|
+
id: form-error
|
|
5
|
+
description: Validation error message for form fields. Displays in danger color.
|
|
6
|
+
api: ./form-error.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @default -->
|
|
10
|
+
<span class="ui-form-error">This field is required</span>
|
|
11
|
+
|
|
12
|
+
<!-- @with_icon -->
|
|
13
|
+
<span class="ui-form-error">
|
|
14
|
+
<svg class="ui-form-error__icon ui-icon ui-icon--sm" viewBox="0 0 24 24" fill="currentColor">
|
|
15
|
+
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"></path>
|
|
16
|
+
</svg>
|
|
17
|
+
<span>Please enter a valid email</span>
|
|
18
|
+
</span>
|
|
@@ -2,15 +2,15 @@ import { resolve } from 'node:path';
|
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
3
|
import {
|
|
4
4
|
saveForLostPixel,
|
|
5
|
-
|
|
5
|
+
setupVisualTestFromHtmlDocs,
|
|
6
6
|
validateGridRhythm,
|
|
7
7
|
} from '../../../../test-utils';
|
|
8
8
|
|
|
9
|
-
const DOCS_PATH = resolve(__dirname, 'form-error.docs.
|
|
9
|
+
const DOCS_PATH = resolve(__dirname, 'form-error.docs.html');
|
|
10
10
|
|
|
11
11
|
test.describe('form-error visual regression', () => {
|
|
12
12
|
test('all variations', async ({ page }) => {
|
|
13
|
-
await
|
|
13
|
+
await setupVisualTestFromHtmlDocs(page, DOCS_PATH);
|
|
14
14
|
await validateGridRhythm(page, 'form-error');
|
|
15
15
|
await saveForLostPixel(page, 'form-error');
|
|
16
16
|
await expect(page.locator('body')).toHaveScreenshot('form-error.visual.png');
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Form Helper
|
|
3
|
+
type: component
|
|
4
|
+
id: form-helper
|
|
5
|
+
description: Helper text for form fields. Provides additional context or instructions.
|
|
6
|
+
api: ./form-helper.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @default -->
|
|
10
|
+
<span class="ui-form-helper">Must be at least 8 characters</span>
|
|
11
|
+
|
|
12
|
+
<!-- @with_input_field | column -->
|
|
13
|
+
<!-- Helper text paired with a form input for context. -->
|
|
14
|
+
<div class="ui-column ui-column--xs">
|
|
15
|
+
<input class="ui-input" type="email" placeholder="Email address"></input>
|
|
16
|
+
<span class="ui-form-helper">We will never share your email</span>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<!-- @error_state | column -->
|
|
20
|
+
<!-- Helper text styled for validation errors using the input error context. -->
|
|
21
|
+
<div class="ui-column ui-column--xs">
|
|
22
|
+
<input class="ui-input ui-input--error" type="text" value="abc"></input>
|
|
23
|
+
<span class="ui-form-helper" style="color: var(--ui-color-danger);">Password must be at least 8 characters</span>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<!-- @success_state | column -->
|
|
27
|
+
<!-- Helper text for successful validation. -->
|
|
28
|
+
<div class="ui-column ui-column--xs">
|
|
29
|
+
<input class="ui-input ui-input--success" type="text" value="strongpassword123"></input>
|
|
30
|
+
<span class="ui-form-helper" style="color: var(--ui-color-success);">Password strength: strong</span>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<!-- @with_select | column -->
|
|
34
|
+
<!-- Helper text paired with a select field. -->
|
|
35
|
+
<div class="ui-column ui-column--xs">
|
|
36
|
+
<select class="ui-select">
|
|
37
|
+
<option>Choose a country</option>
|
|
38
|
+
<option>United States</option>
|
|
39
|
+
<option>Canada</option>
|
|
40
|
+
</select>
|
|
41
|
+
<span class="ui-form-helper">Required for shipping calculations</span>
|
|
42
|
+
</div>
|
|
@@ -2,15 +2,15 @@ import { resolve } from 'node:path';
|
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
3
|
import {
|
|
4
4
|
saveForLostPixel,
|
|
5
|
-
|
|
5
|
+
setupVisualTestFromHtmlDocs,
|
|
6
6
|
validateGridRhythm,
|
|
7
7
|
} from '../../../../test-utils';
|
|
8
8
|
|
|
9
|
-
const DOCS_PATH = resolve(__dirname, 'form-helper.docs.
|
|
9
|
+
const DOCS_PATH = resolve(__dirname, 'form-helper.docs.html');
|
|
10
10
|
|
|
11
11
|
test.describe('form-helper visual regression', () => {
|
|
12
12
|
test('all variations', async ({ page }) => {
|
|
13
|
-
await
|
|
13
|
+
await setupVisualTestFromHtmlDocs(page, DOCS_PATH);
|
|
14
14
|
await validateGridRhythm(page, 'form-helper');
|
|
15
15
|
await saveForLostPixel(page, 'form-helper');
|
|
16
16
|
await expect(page.locator('body')).toHaveScreenshot('form-helper.visual.png');
|
|
Binary file
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Input
|
|
3
|
+
type: component
|
|
4
|
+
id: input
|
|
5
|
+
description: Text input field for user data entry. Heights align to grid rows.
|
|
6
|
+
api: ./input.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @default -->
|
|
10
|
+
<input class="ui-input" type="text" placeholder="Enter text..."></input>
|
|
11
|
+
|
|
12
|
+
<!-- @sizes | column -->
|
|
13
|
+
<input class="ui-input ui-input--sm" type="text" placeholder="Small (1.5 rows)"></input>
|
|
14
|
+
<input class="ui-input" type="text" placeholder="Default (2 rows)"></input>
|
|
15
|
+
<input class="ui-input ui-input--lg" type="text" placeholder="Large (2.5 rows)"></input>
|
|
16
|
+
|
|
17
|
+
<!-- @variants | column -->
|
|
18
|
+
<input class="ui-input" type="text" placeholder="Outline (default)"></input>
|
|
19
|
+
<input class="ui-input ui-input--filled" type="text" placeholder="Filled"></input>
|
|
20
|
+
<input class="ui-input ui-input--ghost" type="text" placeholder="Ghost"></input>
|
|
21
|
+
|
|
22
|
+
<!-- @states | column -->
|
|
23
|
+
<input class="ui-input" type="text" placeholder="Default"></input>
|
|
24
|
+
<input class="ui-input ui-input--error" type="text" value="Invalid input"></input>
|
|
25
|
+
<input class="ui-input ui-input--success" type="text" value="Valid input"></input>
|
|
26
|
+
<input class="ui-input" type="text" placeholder="Disabled" disabled></input>
|
|
27
|
+
<input class="ui-input" type="text" value="Read only" readonly></input>
|
|
28
|
+
|
|
29
|
+
<!-- @full_width -->
|
|
30
|
+
<input class="ui-input ui-input--block" type="text" placeholder="Full width input"></input>
|
|
31
|
+
|
|
32
|
+
<!-- @with_prefix_icon -->
|
|
33
|
+
<div class="ui-input-group ui-input-group--has-prefix">
|
|
34
|
+
<span class="ui-input-group__addon ui-input-group__addon--start">
|
|
35
|
+
<svg class="ui-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
36
|
+
<circle cx="11" cy="11" r="8"></circle>
|
|
37
|
+
<path d="m21 21-4.3-4.3"></path>
|
|
38
|
+
</svg>
|
|
39
|
+
</span>
|
|
40
|
+
<input class="ui-input ui-input--block" type="search" placeholder="Search..."></input>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<!-- @with_suffix_icon -->
|
|
44
|
+
<div class="ui-input-group ui-input-group--has-suffix">
|
|
45
|
+
<input class="ui-input ui-input--block" type="email" placeholder="Email address"></input>
|
|
46
|
+
<span class="ui-input-group__addon ui-input-group__addon--end">
|
|
47
|
+
<svg class="ui-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
48
|
+
<rect width="20" height="16" x="2" y="4" rx="2"></rect>
|
|
49
|
+
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path>
|
|
50
|
+
</svg>
|
|
51
|
+
</span>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<!-- @with_both_addons -->
|
|
55
|
+
<div class="ui-input-group ui-input-group--has-prefix ui-input-group--has-suffix">
|
|
56
|
+
<span class="ui-input-group__addon ui-input-group__addon--start">
|
|
57
|
+
<svg class="ui-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
58
|
+
<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path>
|
|
59
|
+
<circle cx="12" cy="7" r="4"></circle>
|
|
60
|
+
</svg>
|
|
61
|
+
</span>
|
|
62
|
+
<input class="ui-input ui-input--block" type="text" placeholder="Username"></input>
|
|
63
|
+
<span class="ui-input-group__addon ui-input-group__addon--end ui-input-group__addon--interactive">
|
|
64
|
+
<svg class="ui-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
65
|
+
<path d="M18 6 6 18"></path>
|
|
66
|
+
<path d="m6 6 12 12"></path>
|
|
67
|
+
</svg>
|
|
68
|
+
</span>
|
|
69
|
+
</div>
|
|
@@ -2,15 +2,15 @@ import { resolve } from 'node:path';
|
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
3
|
import {
|
|
4
4
|
saveForLostPixel,
|
|
5
|
-
|
|
5
|
+
setupVisualTestFromHtmlDocs,
|
|
6
6
|
validateGridRhythm,
|
|
7
7
|
} from '../../../../test-utils';
|
|
8
8
|
|
|
9
|
-
const DOCS_PATH = resolve(__dirname, 'input.docs.
|
|
9
|
+
const DOCS_PATH = resolve(__dirname, 'input.docs.html');
|
|
10
10
|
|
|
11
11
|
test.describe('input visual regression', () => {
|
|
12
12
|
test('all variations', async ({ page }) => {
|
|
13
|
-
await
|
|
13
|
+
await setupVisualTestFromHtmlDocs(page, DOCS_PATH);
|
|
14
14
|
await validateGridRhythm(page, 'input');
|
|
15
15
|
await saveForLostPixel(page, 'input');
|
|
16
16
|
await expect(page.locator('body')).toHaveScreenshot('input.visual.png');
|
|
Binary file
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Label
|
|
3
|
+
type: component
|
|
4
|
+
id: label
|
|
5
|
+
description: Form control labels. Associates text with inputs via htmlFor or wrapping.
|
|
6
|
+
api: ./label.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @default -->
|
|
10
|
+
<label class="ui-label" for="input1">Email address</label>
|
|
11
|
+
|
|
12
|
+
<!-- @required -->
|
|
13
|
+
<label class="ui-label" for="input2">
|
|
14
|
+
Email address
|
|
15
|
+
<span class="ui-label__required">*</span>
|
|
16
|
+
</label>
|
|
17
|
+
|
|
18
|
+
<!-- @optional -->
|
|
19
|
+
<label class="ui-label" for="input3">
|
|
20
|
+
Phone number
|
|
21
|
+
<span class="ui-label__optional">(optional)</span>
|
|
22
|
+
</label>
|
|
23
|
+
|
|
24
|
+
<!-- @sizes | column -->
|
|
25
|
+
<label class="ui-label">Default size</label>
|
|
26
|
+
<label class="ui-label ui-label--lg">Large size</label>
|
|
27
|
+
|
|
28
|
+
<!-- @disabled -->
|
|
29
|
+
<label class="ui-label" aria-disabled="true">Disabled label</label>
|
|
@@ -2,15 +2,15 @@ import { resolve } from 'node:path';
|
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
3
|
import {
|
|
4
4
|
saveForLostPixel,
|
|
5
|
-
|
|
5
|
+
setupVisualTestFromHtmlDocs,
|
|
6
6
|
validateGridRhythm,
|
|
7
7
|
} from '../../../../test-utils';
|
|
8
8
|
|
|
9
|
-
const DOCS_PATH = resolve(__dirname, 'label.docs.
|
|
9
|
+
const DOCS_PATH = resolve(__dirname, 'label.docs.html');
|
|
10
10
|
|
|
11
11
|
test.describe('label visual regression', () => {
|
|
12
12
|
test('all variations', async ({ page }) => {
|
|
13
|
-
await
|
|
13
|
+
await setupVisualTestFromHtmlDocs(page, DOCS_PATH);
|
|
14
14
|
await validateGridRhythm(page, 'label');
|
|
15
15
|
await saveForLostPixel(page, 'label');
|
|
16
16
|
await expect(page.locator('body')).toHaveScreenshot('label.visual.png');
|
|
Binary file
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Number Input
|
|
3
|
+
type: component
|
|
4
|
+
id: number-input
|
|
5
|
+
description: Numeric input with increment and decrement stepper buttons.
|
|
6
|
+
api: ./number-input.api.json
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- @default -->
|
|
10
|
+
<div class="ui-number-input">
|
|
11
|
+
<button class="ui-number-input__decrement" type="button" aria-label="Decrease">
|
|
12
|
+
<svg viewBox="0 0 24 24">
|
|
13
|
+
<path d="M5 12h14"></path>
|
|
14
|
+
</svg>
|
|
15
|
+
</button>
|
|
16
|
+
<input class="ui-number-input__field" type="number" value="5"></input>
|
|
17
|
+
<button class="ui-number-input__increment" type="button" aria-label="Increase">
|
|
18
|
+
<svg viewBox="0 0 24 24">
|
|
19
|
+
<path d="M12 5v14"></path>
|
|
20
|
+
<path d="M5 12h14"></path>
|
|
21
|
+
</svg>
|
|
22
|
+
</button>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<!-- @sizes | column -->
|
|
26
|
+
<div class="ui-number-input ui-number-input--sm">
|
|
27
|
+
<button class="ui-number-input__decrement" type="button" aria-label="Decrease">
|
|
28
|
+
<svg viewBox="0 0 24 24">
|
|
29
|
+
<path d="M5 12h14"></path>
|
|
30
|
+
</svg>
|
|
31
|
+
</button>
|
|
32
|
+
<input class="ui-number-input__field" type="number" value="3"></input>
|
|
33
|
+
<button class="ui-number-input__increment" type="button" aria-label="Increase">
|
|
34
|
+
<svg viewBox="0 0 24 24">
|
|
35
|
+
<path d="M12 5v14"></path>
|
|
36
|
+
<path d="M5 12h14"></path>
|
|
37
|
+
</svg>
|
|
38
|
+
</button>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="ui-number-input">
|
|
41
|
+
<button class="ui-number-input__decrement" type="button" aria-label="Decrease">
|
|
42
|
+
<svg viewBox="0 0 24 24">
|
|
43
|
+
<path d="M5 12h14"></path>
|
|
44
|
+
</svg>
|
|
45
|
+
</button>
|
|
46
|
+
<input class="ui-number-input__field" type="number" value="5"></input>
|
|
47
|
+
<button class="ui-number-input__increment" type="button" aria-label="Increase">
|
|
48
|
+
<svg viewBox="0 0 24 24">
|
|
49
|
+
<path d="M12 5v14"></path>
|
|
50
|
+
<path d="M5 12h14"></path>
|
|
51
|
+
</svg>
|
|
52
|
+
</button>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="ui-number-input ui-number-input--lg">
|
|
55
|
+
<button class="ui-number-input__decrement" type="button" aria-label="Decrease">
|
|
56
|
+
<svg viewBox="0 0 24 24">
|
|
57
|
+
<path d="M5 12h14"></path>
|
|
58
|
+
</svg>
|
|
59
|
+
</button>
|
|
60
|
+
<input class="ui-number-input__field" type="number" value="10"></input>
|
|
61
|
+
<button class="ui-number-input__increment" type="button" aria-label="Increase">
|
|
62
|
+
<svg viewBox="0 0 24 24">
|
|
63
|
+
<path d="M12 5v14"></path>
|
|
64
|
+
<path d="M5 12h14"></path>
|
|
65
|
+
</svg>
|
|
66
|
+
</button>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<!-- @block -->
|
|
70
|
+
<!-- Full-width layout. -->
|
|
71
|
+
<div class="ui-number-input ui-number-input--block">
|
|
72
|
+
<button class="ui-number-input__decrement" type="button" aria-label="Decrease">
|
|
73
|
+
<svg viewBox="0 0 24 24">
|
|
74
|
+
<path d="M5 12h14"></path>
|
|
75
|
+
</svg>
|
|
76
|
+
</button>
|
|
77
|
+
<input class="ui-number-input__field" type="number" value="5"></input>
|
|
78
|
+
<button class="ui-number-input__increment" type="button" aria-label="Increase">
|
|
79
|
+
<svg viewBox="0 0 24 24">
|
|
80
|
+
<path d="M12 5v14"></path>
|
|
81
|
+
<path d="M5 12h14"></path>
|
|
82
|
+
</svg>
|
|
83
|
+
</button>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<!-- @disabled -->
|
|
87
|
+
<div class="ui-number-input ui-number-input--disabled">
|
|
88
|
+
<button class="ui-number-input__decrement" type="button" aria-label="Decrease" disabled>
|
|
89
|
+
<svg viewBox="0 0 24 24">
|
|
90
|
+
<path d="M5 12h14"></path>
|
|
91
|
+
</svg>
|
|
92
|
+
</button>
|
|
93
|
+
<input class="ui-number-input__field" type="number" value="0" disabled></input>
|
|
94
|
+
<button class="ui-number-input__increment" type="button" aria-label="Increase" disabled>
|
|
95
|
+
<svg viewBox="0 0 24 24">
|
|
96
|
+
<path d="M12 5v14"></path>
|
|
97
|
+
<path d="M5 12h14"></path>
|
|
98
|
+
</svg>
|
|
99
|
+
</button>
|
|
100
|
+
</div>
|