@wovenui/components 0.0.0-stage → 1.0.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/LICENSE +21 -0
- package/README.md +284 -2
- package/dist/components.json +4204 -0
- package/dist/llms-full.txt +2839 -0
- package/dist/wovenui-kit.css +5002 -0
- package/dist/wovenui-kit.css.map +1 -0
- package/dist/wovenui-kit.iife.js +532 -0
- package/dist/wovenui-kit.js +529 -0
- package/dist/wovenui-kit.min.css +2 -0
- package/dist/wovenui-kit.min.css.map +1 -0
- package/package.json +268 -4
- package/src/_close.scss +45 -0
- package/src/_helpers.scss +11 -0
- package/src/_kit.scss +124 -0
- package/src/_shared.scss +10 -0
- package/src/components/_accordion.scss +132 -0
- package/src/components/_alert.scss +161 -0
- package/src/components/_autocomplete.scss +129 -0
- package/src/components/_avatar-group.scss +80 -0
- package/src/components/_avatar.scss +134 -0
- package/src/components/_badge.scss +91 -0
- package/src/components/_breadcrumb.scss +115 -0
- package/src/components/_btn-group.scss +113 -0
- package/src/components/_button.scss +301 -0
- package/src/components/_card.scss +120 -0
- package/src/components/_checkbox.scss +168 -0
- package/src/components/_code-block.scss +78 -0
- package/src/components/_confirm-modal.scss +75 -0
- package/src/components/_data-table.scss +79 -0
- package/src/components/_desc-list.scss +180 -0
- package/src/components/_divider.scss +66 -0
- package/src/components/_dot.scss +115 -0
- package/src/components/_drawer.scss +200 -0
- package/src/components/_dropdown.scss +182 -0
- package/src/components/_empty-state.scss +146 -0
- package/src/components/_field-group.scss +68 -0
- package/src/components/_field-message.scss +75 -0
- package/src/components/_field.scss +127 -0
- package/src/components/_form-actions.scss +58 -0
- package/src/components/_info-row.scss +69 -0
- package/src/components/_input-group.scss +87 -0
- package/src/components/_input.scss +278 -0
- package/src/components/_list.scss +76 -0
- package/src/components/_modal.scss +168 -0
- package/src/components/_page-header.scss +85 -0
- package/src/components/_pagination.scss +138 -0
- package/src/components/_panel.scss +69 -0
- package/src/components/_popover.scss +154 -0
- package/src/components/_progress-circle.scss +123 -0
- package/src/components/_progress.scss +122 -0
- package/src/components/_radio.scss +162 -0
- package/src/components/_segmented.scss +183 -0
- package/src/components/_select.scss +154 -0
- package/src/components/_sidebar.scss +300 -0
- package/src/components/_skeleton.scss +90 -0
- package/src/components/_spinner.scss +84 -0
- package/src/components/_stat.scss +92 -0
- package/src/components/_table.scss +460 -0
- package/src/components/_tabs.scss +327 -0
- package/src/components/_tag.scss +143 -0
- package/src/components/_text.scss +42 -0
- package/src/components/_textarea.scss +57 -0
- package/src/components/_timeline.scss +196 -0
- package/src/components/_title.scss +41 -0
- package/src/components/_toast.scss +221 -0
- package/src/components/_toggle.scss +171 -0
- package/src/components/_toolbar.scss +74 -0
- package/src/components/_topbar.scss +204 -0
- package/src/entries/accordion.scss +4 -0
- package/src/entries/alert.scss +4 -0
- package/src/entries/autocomplete.scss +4 -0
- package/src/entries/avatar-group.scss +4 -0
- package/src/entries/avatar.scss +4 -0
- package/src/entries/badge.scss +4 -0
- package/src/entries/breadcrumb.scss +4 -0
- package/src/entries/btn-group.scss +4 -0
- package/src/entries/button.scss +4 -0
- package/src/entries/card.scss +4 -0
- package/src/entries/checkbox.scss +4 -0
- package/src/entries/code-block.scss +4 -0
- package/src/entries/confirm-modal.scss +4 -0
- package/src/entries/data-table.scss +4 -0
- package/src/entries/desc-list.scss +4 -0
- package/src/entries/divider.scss +4 -0
- package/src/entries/dot.scss +4 -0
- package/src/entries/drawer.scss +4 -0
- package/src/entries/dropdown.scss +4 -0
- package/src/entries/empty-state.scss +4 -0
- package/src/entries/field-group.scss +4 -0
- package/src/entries/field-message.scss +4 -0
- package/src/entries/field.scss +4 -0
- package/src/entries/form-actions.scss +4 -0
- package/src/entries/info-row.scss +4 -0
- package/src/entries/input-group.scss +4 -0
- package/src/entries/input.scss +4 -0
- package/src/entries/list.scss +4 -0
- package/src/entries/modal.scss +4 -0
- package/src/entries/page-header.scss +4 -0
- package/src/entries/pagination.scss +4 -0
- package/src/entries/panel.scss +4 -0
- package/src/entries/popover.scss +4 -0
- package/src/entries/progress-circle.scss +4 -0
- package/src/entries/progress.scss +4 -0
- package/src/entries/radio.scss +4 -0
- package/src/entries/segmented.scss +4 -0
- package/src/entries/select.scss +4 -0
- package/src/entries/sidebar.scss +4 -0
- package/src/entries/skeleton.scss +4 -0
- package/src/entries/spinner.scss +4 -0
- package/src/entries/stat.scss +4 -0
- package/src/entries/table.scss +4 -0
- package/src/entries/tabs.scss +4 -0
- package/src/entries/tag.scss +4 -0
- package/src/entries/text.scss +4 -0
- package/src/entries/textarea.scss +4 -0
- package/src/entries/timeline.scss +4 -0
- package/src/entries/title.scss +4 -0
- package/src/entries/toast.scss +4 -0
- package/src/entries/toggle.scss +4 -0
- package/src/entries/toolbar.scss +4 -0
- package/src/entries/topbar.scss +4 -0
- package/src/index.scss +7 -0
- package/src/js/autocomplete.js +86 -0
- package/src/js/data-table.js +141 -0
- package/src/js/index.js +34 -0
- package/src/js/input-clear.js +25 -0
- package/src/js/package.json +3 -0
- package/src/js/tabs.js +73 -0
- package/src/js/toast.js +161 -0
- package/src/js/util.js +21 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
////
|
|
2
|
+
//// @component wu-field-group
|
|
3
|
+
//// Group of fields in a `fieldset`, stacked by default or side by side.
|
|
4
|
+
////
|
|
5
|
+
//// Use a `fieldset` with a `legend` of class `wu-field-group-legend`. A `sm` or `lg` on the group sizes the inputs, affixes and buttons inside it that have no size of their own; that rule lives in the input and button partials.
|
|
6
|
+
////
|
|
7
|
+
//// @since 1.0.0
|
|
8
|
+
//// @needs none
|
|
9
|
+
//// @js none
|
|
10
|
+
//// @example html
|
|
11
|
+
//// <fieldset class="wu-field-group">
|
|
12
|
+
//// <legend class="wu-field-group-legend">Contact</legend>
|
|
13
|
+
//// <div class="wu-field">
|
|
14
|
+
//// <label class="wu-field-label" for="g-name">Name</label>
|
|
15
|
+
//// <input class="wu-input" id="g-name" type="text">
|
|
16
|
+
//// </div>
|
|
17
|
+
//// <div class="wu-field">
|
|
18
|
+
//// <label class="wu-field-label" for="g-mail">Email</label>
|
|
19
|
+
//// <input class="wu-input" id="g-mail" type="email">
|
|
20
|
+
//// </div>
|
|
21
|
+
//// </fieldset>
|
|
22
|
+
//// @example html
|
|
23
|
+
//// <fieldset class="wu-field-group horizontal">
|
|
24
|
+
//// <legend class="wu-field-group-legend">Dates</legend>
|
|
25
|
+
//// <div class="wu-field">
|
|
26
|
+
//// <label class="wu-field-label" for="g-from">From</label>
|
|
27
|
+
//// <input class="wu-input" id="g-from" type="date">
|
|
28
|
+
//// </div>
|
|
29
|
+
//// <div class="wu-field">
|
|
30
|
+
//// <label class="wu-field-label" for="g-to">To</label>
|
|
31
|
+
//// <input class="wu-input" id="g-to" type="date">
|
|
32
|
+
//// </div>
|
|
33
|
+
//// </fieldset>
|
|
34
|
+
//// @modifier horizontal - Fields side by side, wrapping when narrower than `--wu-field-group--MinWidth` @since 1.0.0
|
|
35
|
+
//// @part wu-field-group-legend - Group title @since 1.0.0
|
|
36
|
+
//// @variable --wu-field-group--MinWidth [12rem] - Width at which a field in a horizontal group wraps @since 1.0.0
|
|
37
|
+
////
|
|
38
|
+
|
|
39
|
+
@use "@wovenui/core/mixins" as woven;
|
|
40
|
+
|
|
41
|
+
.wu-field-group {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: woven.token(space-4);
|
|
45
|
+
min-width: 0;
|
|
46
|
+
margin: 0;
|
|
47
|
+
padding: 0;
|
|
48
|
+
border: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.wu-field-group-legend {
|
|
52
|
+
margin-block-end: woven.token(space-3);
|
|
53
|
+
padding: 0;
|
|
54
|
+
color: woven.token(text-regular);
|
|
55
|
+
font-size: woven.token(font-size-md);
|
|
56
|
+
font-weight: woven.token(font-weight-semibold);
|
|
57
|
+
line-height: woven.token(line-height-tight);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Fields side by side, wrapping; --wu-field-group--MinWidth sets when a field wraps
|
|
61
|
+
.wu-field-group.horizontal {
|
|
62
|
+
flex-flow: row wrap;
|
|
63
|
+
align-items: flex-start;
|
|
64
|
+
|
|
65
|
+
> .wu-field {
|
|
66
|
+
flex: 1 1 var(--wu-field-group--MinWidth, 12rem);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
////
|
|
2
|
+
//// @component wu-field-message
|
|
3
|
+
//// Hint, error or success text under a form control, with a marker shape for each role.
|
|
4
|
+
////
|
|
5
|
+
//// Link it from the control with `aria-describedby`. The words carry the meaning ("Error: ..."); the role adds color and a marker shape: `error` a larger octagon with an exclamation mark, `success` a check, `info` a small circle.
|
|
6
|
+
////
|
|
7
|
+
//// Inside a `wu-field`, an `error` message stays hidden until the control is invalid.
|
|
8
|
+
////
|
|
9
|
+
//// @since 1.0.0
|
|
10
|
+
//// @needs none
|
|
11
|
+
//// @js none
|
|
12
|
+
//// @example html
|
|
13
|
+
//// <p class="wu-field-message" id="hint">Use your work email.</p>
|
|
14
|
+
//// <p class="wu-field-message error" id="err">Error: enter a valid email.</p>
|
|
15
|
+
//// <p class="wu-field-message success" id="ok">Email confirmed.</p>
|
|
16
|
+
//// <p class="wu-field-message info" id="note">We never share it.</p>
|
|
17
|
+
//// @modifier error | success | info - Role color and marker shape; error is also medium weight @since 1.0.0
|
|
18
|
+
////
|
|
19
|
+
|
|
20
|
+
@use "@wovenui/core/mixins" as woven;
|
|
21
|
+
|
|
22
|
+
.wu-field-message {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: flex-start;
|
|
25
|
+
gap: woven.token(space-1);
|
|
26
|
+
margin: 0;
|
|
27
|
+
color: woven.token(text-muted);
|
|
28
|
+
font-size: woven.token(font-size-sm);
|
|
29
|
+
line-height: woven.token(line-height-normal);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.wu-field-message:is(.error, .success, .info)::before {
|
|
33
|
+
content: "";
|
|
34
|
+
flex: none;
|
|
35
|
+
width: 0.75em;
|
|
36
|
+
height: 0.75em;
|
|
37
|
+
margin-block-start: calc((1lh - 0.75em) / 2);
|
|
38
|
+
border-radius: woven.token(radius-full);
|
|
39
|
+
background: currentcolor;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.wu-field-message.error {
|
|
43
|
+
color: woven.token(text-danger);
|
|
44
|
+
font-weight: woven.token(font-weight-medium);
|
|
45
|
+
|
|
46
|
+
// Larger octagon with an exclamation mark, so it reads apart from the info dot at small sizes
|
|
47
|
+
&::before {
|
|
48
|
+
content: "!";
|
|
49
|
+
content: "!" / "";
|
|
50
|
+
display: grid;
|
|
51
|
+
place-content: center;
|
|
52
|
+
width: 1em;
|
|
53
|
+
height: 1em;
|
|
54
|
+
margin-block-start: calc((1lh - 1em) / 2);
|
|
55
|
+
border-radius: 0;
|
|
56
|
+
background: woven.token(text-danger);
|
|
57
|
+
color: woven.token(bg-surface);
|
|
58
|
+
font-weight: woven.token(font-weight-bold);
|
|
59
|
+
clip-path: var(--wu-kit-marker-octagon);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.wu-field-message.success {
|
|
64
|
+
color: woven.token(text-success);
|
|
65
|
+
|
|
66
|
+
// Check mark
|
|
67
|
+
&::before {
|
|
68
|
+
border-radius: 0;
|
|
69
|
+
clip-path: var(--wu-kit-marker-check);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.wu-field-message.info {
|
|
74
|
+
color: woven.token(text-info);
|
|
75
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
////
|
|
2
|
+
//// @component wu-field
|
|
3
|
+
//// Form field that stacks a label, a control and its messages, with a required marker and a floating label option.
|
|
4
|
+
////
|
|
5
|
+
//// The required marker comes from `required` or `aria-required="true"` on the control. An `error` message is hidden until the control is invalid. Its id joins `aria-describedby` only while it shows: server-rendered with `aria-invalid="true"`, or added by your script. Leave it out otherwise, so a hidden error is never announced; for `:user-invalid` the browser's own validation message speaks on submit.
|
|
6
|
+
////
|
|
7
|
+
//// `floating` needs `placeholder=" "` on the input and is not used with `horizontal`. `horizontal` puts the label beside the control from the `sm` breakpoint up.
|
|
8
|
+
////
|
|
9
|
+
//// @since 1.0.0
|
|
10
|
+
//// @needs none
|
|
11
|
+
//// @js none
|
|
12
|
+
//// @example html
|
|
13
|
+
//// <div class="wu-field">
|
|
14
|
+
//// <label class="wu-field-label" for="f1">Email</label>
|
|
15
|
+
//// <input class="wu-input" id="f1" type="email" required aria-describedby="f1-hint">
|
|
16
|
+
//// <p class="wu-field-message" id="f1-hint">Hint</p>
|
|
17
|
+
//// <p class="wu-field-message error" id="f1-error">Error: enter a valid email.</p>
|
|
18
|
+
//// </div>
|
|
19
|
+
//// @example html
|
|
20
|
+
//// <div class="wu-field floating animated">
|
|
21
|
+
//// <label class="wu-field-label" for="f2">Name</label>
|
|
22
|
+
//// <input class="wu-input" id="f2" type="text" placeholder=" ">
|
|
23
|
+
//// </div>
|
|
24
|
+
//// @modifier horizontal - Label beside the control from `sm` up, in a column of `--wu-field--LabelWidth` @since 1.0.0
|
|
25
|
+
//// @modifier error - On a `wu-field-message` inside the field: hidden until the control is invalid @since 1.0.0
|
|
26
|
+
//// @modifier floating - Label inside the input, moved up on focus or once filled @since 1.0.0
|
|
27
|
+
//// @modifier animated - On a floating field: the label slides when the user allows motion; `wu-animated` on an ancestor does the same @since 1.0.0
|
|
28
|
+
//// @part wu-field-label - Label above the control @since 1.0.0
|
|
29
|
+
//// @variable --wu-field--LabelWidth [10rem] - Label column width in a horizontal field @since 1.0.0
|
|
30
|
+
//// @state :required | aria-required="true" - On the control: adds a required marker to the label @since 1.0.0
|
|
31
|
+
//// @state aria-invalid="true" | :user-invalid - On the control: shows the `error` message @since 1.0.0
|
|
32
|
+
////
|
|
33
|
+
|
|
34
|
+
@use "@wovenui/core/mixins" as woven;
|
|
35
|
+
|
|
36
|
+
.wu-field {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: woven.token(space-1);
|
|
40
|
+
min-width: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.wu-field-label {
|
|
44
|
+
margin-block-end: woven.token(space-1);
|
|
45
|
+
color: woven.token(text-regular);
|
|
46
|
+
font-size: woven.token(font-size-sm);
|
|
47
|
+
font-weight: woven.token(font-weight-medium);
|
|
48
|
+
line-height: woven.token(line-height-tight);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Required marker from the control's required or aria-required; the empty alt text keeps it out of the label's name
|
|
52
|
+
.wu-field:has(:is(:required, [aria-required="true"])) > .wu-field-label::after {
|
|
53
|
+
content: "*";
|
|
54
|
+
content: "*" / "";
|
|
55
|
+
margin-inline-start: woven.token(space-1);
|
|
56
|
+
color: woven.token(text-danger);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// The error message waits for aria-invalid="true" or :user-invalid (after the user has interacted)
|
|
60
|
+
.wu-field .wu-field-message.error {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.wu-field:has(:is([aria-invalid="true"], :user-invalid)) .wu-field-message.error {
|
|
65
|
+
display: flex;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Label beside the control from sm up; --wu-field--LabelWidth sets the column
|
|
69
|
+
@include woven.media-up(sm) {
|
|
70
|
+
.wu-field.horizontal {
|
|
71
|
+
display: grid;
|
|
72
|
+
grid-template-columns: var(--wu-field--LabelWidth, 10rem) minmax(0, 1fr);
|
|
73
|
+
gap: woven.token(space-1) woven.token(space-4);
|
|
74
|
+
align-items: start;
|
|
75
|
+
|
|
76
|
+
> * {
|
|
77
|
+
grid-column: 2;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
> .wu-field-label {
|
|
81
|
+
display: flex;
|
|
82
|
+
grid-row: 1;
|
|
83
|
+
grid-column: 1;
|
|
84
|
+
align-items: center;
|
|
85
|
+
min-height: woven.token(control-height-md);
|
|
86
|
+
margin: 0;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Label inside the input, moved up on focus or once filled. Needs placeholder=" " on the input; not with horizontal.
|
|
92
|
+
.wu-field.floating {
|
|
93
|
+
position: relative;
|
|
94
|
+
|
|
95
|
+
> .wu-field-label {
|
|
96
|
+
position: absolute;
|
|
97
|
+
z-index: woven.token(z-hover);
|
|
98
|
+
inset-block-start: calc((#{woven.token(control-height-lg)} - 1lh) / 2);
|
|
99
|
+
inset-inline-start: calc(#{woven.token(control-padding-inline-md)} + #{woven.token(border-width-1)});
|
|
100
|
+
margin: 0;
|
|
101
|
+
color: woven.token(text-muted);
|
|
102
|
+
font-size: woven.token(font-size-md);
|
|
103
|
+
font-weight: woven.token(font-weight-normal);
|
|
104
|
+
pointer-events: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
> .wu-input {
|
|
108
|
+
height: woven.token(control-height-lg);
|
|
109
|
+
padding-block: woven.token(space-5) woven.token(space-1);
|
|
110
|
+
padding-inline: woven.token(control-padding-inline-md);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.wu-field.floating:has(> .wu-input:is(:focus, :not(:placeholder-shown))) > .wu-field-label {
|
|
115
|
+
inset-block-start: woven.token(space-1);
|
|
116
|
+
font-size: woven.token(font-size-xs);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Opt-in motion: the floating label slides
|
|
120
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
121
|
+
.wu-field.floating.animated > .wu-field-label,
|
|
122
|
+
.wu-animated .wu-field.floating > .wu-field-label {
|
|
123
|
+
transition-property: inset-block-start, font-size;
|
|
124
|
+
transition-duration: woven.token(duration-150);
|
|
125
|
+
transition-timing-function: woven.token(ease-out);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
////
|
|
2
|
+
//// @component wu-form-actions
|
|
3
|
+
//// Footer row for form buttons, start-aligned by default.
|
|
4
|
+
////
|
|
5
|
+
//// `wu-form-actions-end` inside the row pushes a set of buttons to the inline end.
|
|
6
|
+
////
|
|
7
|
+
//// @since 1.0.0
|
|
8
|
+
//// @needs none
|
|
9
|
+
//// @js none
|
|
10
|
+
//// @example html
|
|
11
|
+
//// <div class="wu-form-actions divided">
|
|
12
|
+
//// <button class="wu-btn brand" type="submit">Save</button>
|
|
13
|
+
//// <button class="wu-btn" type="reset">Reset</button>
|
|
14
|
+
//// </div>
|
|
15
|
+
//// @example html
|
|
16
|
+
//// <div class="wu-form-actions">
|
|
17
|
+
//// <button class="wu-btn danger subtle" type="button">Delete</button>
|
|
18
|
+
//// <div class="wu-form-actions-end">
|
|
19
|
+
//// <button class="wu-btn" type="button">Cancel</button>
|
|
20
|
+
//// <button class="wu-btn brand" type="submit">Save</button>
|
|
21
|
+
//// </div>
|
|
22
|
+
//// </div>
|
|
23
|
+
//// @modifier trailing - Aligns the buttons to the inline end @since 1.0.0
|
|
24
|
+
//// @modifier centered - Centers the buttons @since 1.0.0
|
|
25
|
+
//// @modifier divided - Line and padding above the row @since 1.0.0
|
|
26
|
+
//// @part wu-form-actions-end - Set of buttons pushed to the inline end of the row @since 1.0.0
|
|
27
|
+
////
|
|
28
|
+
|
|
29
|
+
@use "@wovenui/core/mixins" as woven;
|
|
30
|
+
|
|
31
|
+
.wu-form-actions {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-wrap: wrap;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: woven.token(space-2);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.wu-form-actions-end {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-wrap: wrap;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: inherit;
|
|
43
|
+
margin-inline-start: auto;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.wu-form-actions.trailing {
|
|
47
|
+
justify-content: flex-end;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.wu-form-actions.centered {
|
|
51
|
+
justify-content: center;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Line above the row
|
|
55
|
+
.wu-form-actions.divided {
|
|
56
|
+
padding-block-start: woven.token(space-4);
|
|
57
|
+
border-block-start: woven.token(border-width-1) solid woven.token(border-regular);
|
|
58
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
////
|
|
2
|
+
//// @component wu-info-row
|
|
3
|
+
//// One label and value pair, with a line between adjacent rows.
|
|
4
|
+
////
|
|
5
|
+
//// Works as a `div` with `dt` and `dd` inside a `dl`.
|
|
6
|
+
////
|
|
7
|
+
//// @since 1.0.0
|
|
8
|
+
//// @needs none
|
|
9
|
+
//// @js none
|
|
10
|
+
//// @example html
|
|
11
|
+
//// <div class="wu-info-row">
|
|
12
|
+
//// <span class="wu-info-row-label">Tax</span>
|
|
13
|
+
//// <span class="wu-info-row-value">$9.60</span>
|
|
14
|
+
//// </div>
|
|
15
|
+
//// <div class="wu-info-row total">
|
|
16
|
+
//// <span class="wu-info-row-label">Total</span>
|
|
17
|
+
//// <span class="wu-info-row-value">$129.60</span>
|
|
18
|
+
//// </div>
|
|
19
|
+
//// @modifier total - Strong line above, regular label text and a larger value @since 1.0.0
|
|
20
|
+
//// @part wu-info-row-label - Muted label @since 1.0.0
|
|
21
|
+
//// @part wu-info-row-value - Value, end-aligned with tabular numbers @since 1.0.0
|
|
22
|
+
////
|
|
23
|
+
|
|
24
|
+
@use "@wovenui/core/mixins" as woven;
|
|
25
|
+
|
|
26
|
+
.wu-info-row {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-wrap: wrap;
|
|
29
|
+
align-items: baseline;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
gap: woven.token(space-1) woven.token(space-4);
|
|
32
|
+
padding-block: woven.token(space-2);
|
|
33
|
+
font-size: woven.token(font-size-sm);
|
|
34
|
+
line-height: woven.token(line-height-normal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.wu-info-row + .wu-info-row {
|
|
38
|
+
border-block-start: woven.token(border-width-1) solid woven.token(border-regular);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.wu-info-row-label {
|
|
42
|
+
margin: 0;
|
|
43
|
+
color: woven.token(text-muted);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.wu-info-row-value {
|
|
47
|
+
min-width: 0;
|
|
48
|
+
margin: 0;
|
|
49
|
+
color: woven.token(text-regular);
|
|
50
|
+
font-variant-numeric: tabular-nums;
|
|
51
|
+
font-weight: woven.token(font-weight-medium);
|
|
52
|
+
text-align: end;
|
|
53
|
+
overflow-wrap: anywhere;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Total row: a strong line above, label and value in regular text, larger value
|
|
57
|
+
.wu-info-row.total {
|
|
58
|
+
border-block-start: woven.token(border-width-2) solid woven.token(border-strong);
|
|
59
|
+
|
|
60
|
+
> .wu-info-row-label {
|
|
61
|
+
color: woven.token(text-regular);
|
|
62
|
+
font-weight: woven.token(font-weight-semibold);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
> .wu-info-row-value {
|
|
66
|
+
font-size: woven.token(font-size-md);
|
|
67
|
+
font-weight: woven.token(font-weight-semibold);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
////
|
|
2
|
+
//// @component wu-input-group
|
|
3
|
+
//// Joined row of text addons, an input and buttons that share one border and radius.
|
|
4
|
+
////
|
|
5
|
+
//// Size the children (`wu-input sm`, `wu-btn sm`); addons stretch to the row height. Default buttons take the field border; `brand`, `danger`, `quiet` and `link` buttons keep their own look. The hovered, focused or invalid control rises above its neighbors.
|
|
6
|
+
////
|
|
7
|
+
//// @since 1.0.0
|
|
8
|
+
//// @needs none
|
|
9
|
+
//// @js none
|
|
10
|
+
//// @example html
|
|
11
|
+
//// <div class="wu-input-group">
|
|
12
|
+
//// <span class="wu-input-group-text">https://</span>
|
|
13
|
+
//// <input class="wu-input" type="text" aria-label="Website" placeholder="example.com">
|
|
14
|
+
//// </div>
|
|
15
|
+
//// @example html
|
|
16
|
+
//// <div class="wu-input-group">
|
|
17
|
+
//// <input class="wu-input sm" type="search" aria-label="Search" placeholder="Search">
|
|
18
|
+
//// <button class="wu-btn brand sm" type="button">Search</button>
|
|
19
|
+
//// </div>
|
|
20
|
+
//// @part wu-input-group-text - Text addon with the alternate background; an `svg` child is sized as an icon @since 1.0.0
|
|
21
|
+
////
|
|
22
|
+
|
|
23
|
+
@use "@wovenui/core/mixins" as woven;
|
|
24
|
+
|
|
25
|
+
.wu-input-group {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: stretch;
|
|
28
|
+
width: 100%;
|
|
29
|
+
|
|
30
|
+
> * {
|
|
31
|
+
position: relative;
|
|
32
|
+
margin: 0;
|
|
33
|
+
border-radius: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
> .wu-input {
|
|
37
|
+
flex: 1 1 auto;
|
|
38
|
+
width: 1%;
|
|
39
|
+
min-width: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
> * + * {
|
|
43
|
+
margin-inline-start: calc(-1 * #{woven.token(border-width-1)});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
> :first-child {
|
|
47
|
+
border-start-start-radius: woven.token(radius-md);
|
|
48
|
+
border-end-start-radius: woven.token(radius-md);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
> :last-child {
|
|
52
|
+
border-start-end-radius: woven.token(radius-md);
|
|
53
|
+
border-end-end-radius: woven.token(radius-md);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Default buttons take the field border so the joined row reads as one control
|
|
57
|
+
> .wu-btn:not(.brand, .danger, .quiet, .link) {
|
|
58
|
+
border-color: woven.token(border-control);
|
|
59
|
+
|
|
60
|
+
&:hover {
|
|
61
|
+
border-color: woven.token(border-control-hover);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Lift the active control so its border and focus ring sit over the neighbors
|
|
66
|
+
> :is(:hover, :focus-visible, [aria-invalid="true"], :user-invalid) {
|
|
67
|
+
z-index: woven.token(z-hover);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.wu-input-group-text {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex: none;
|
|
74
|
+
align-items: center;
|
|
75
|
+
padding-inline: woven.token(control-padding-inline-sm);
|
|
76
|
+
border: woven.token(border-width-1) solid woven.token(border-control);
|
|
77
|
+
background: woven.token(bg-alternate);
|
|
78
|
+
color: woven.token(text-muted);
|
|
79
|
+
font-size: woven.token(font-size-sm);
|
|
80
|
+
white-space: nowrap;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.wu-input-group-text > svg {
|
|
84
|
+
flex-shrink: 0;
|
|
85
|
+
width: 1em;
|
|
86
|
+
height: 1em;
|
|
87
|
+
}
|