@adia-ai/web-components 0.7.3 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/components/accordion/accordion.css +2 -2
- package/components/action-list/action-list.css +2 -2
- package/components/agent-artifact/agent-artifact.css +31 -31
- package/components/agent-feedback-bar/agent-feedback-bar.css +10 -10
- package/components/agent-questions/agent-questions.css +59 -57
- package/components/agent-reasoning/agent-reasoning.css +54 -54
- package/components/agent-suggestions/agent-suggestions.css +4 -4
- package/components/agent-trace/agent-trace.css +53 -53
- package/components/alert/alert.css +53 -53
- package/components/avatar/avatar.css +27 -27
- package/components/badge/badge.css +56 -53
- package/components/block/block.css +16 -16
- package/components/blockquote/blockquote.css +16 -16
- package/components/breadcrumb/breadcrumb.css +23 -23
- package/components/button/button.css +123 -101
- package/components/calendar-grid/calendar-grid.css +95 -92
- package/components/calendar-picker/calendar-picker.css +141 -139
- package/components/canvas/canvas.css +12 -12
- package/components/card/card.css +83 -83
- package/components/chart/chart.css +218 -218
- package/components/chart-legend/chart-legend.css +26 -26
- package/components/check/check.css +40 -40
- package/components/code/code.css +125 -125
- package/components/col/col.css +15 -15
- package/components/color-picker/color-picker.css +55 -55
- package/components/combobox/combobox.css +64 -62
- package/components/command/command.css +91 -91
- package/components/context-menu/context-menu.css +1 -1
- package/components/date-range-picker/date-range-picker.css +59 -59
- package/components/datetime-picker/datetime-picker.css +25 -25
- package/components/demo-toggle/demo-toggle.css +27 -27
- package/components/description-list/description-list.css +18 -18
- package/components/divider/divider.css +24 -24
- package/components/embed/embed.css +6 -6
- package/components/empty-state/empty-state.css +29 -29
- package/components/feed/feed.css +12 -12
- package/components/field/field.css +28 -28
- package/components/field/field.test.js +2 -2
- package/components/fields/fields.css +5 -5
- package/components/grid/grid.a2ui.json +10 -0
- package/components/grid/grid.css +23 -5
- package/components/grid/grid.d.ts +4 -0
- package/components/grid/grid.yaml +13 -0
- package/components/heatmap/heatmap.css +61 -61
- package/components/icon/icon.css +12 -12
- package/components/image/image.css +14 -14
- package/components/inline-edit/inline-edit.css +16 -16
- package/components/inline-message/inline-message.css +16 -16
- package/components/input/input.css +69 -66
- package/components/inspector/inspector.css +6 -6
- package/components/integration-card/integration-card.css +41 -41
- package/components/integration-card/integration-card.test.js +4 -4
- package/components/kbd/kbd.css +47 -40
- package/components/link/link.css +12 -12
- package/components/list/list.css +8 -8
- package/components/list-window/list-window.css +10 -10
- package/components/loading-overlay/loading-overlay.css +17 -18
- package/components/loading-overlay/loading-overlay.test.js +8 -8
- package/components/mark/mark.css +16 -16
- package/components/menu/menu.css +9 -9
- package/components/modal/modal.class.js +5 -9
- package/components/modal/modal.css +43 -43
- package/components/nav/nav.css +40 -40
- package/components/nav-group/nav-group.css +54 -54
- package/components/nav-item/nav-item.css +44 -44
- package/components/noodles/noodles.css +31 -31
- package/components/number-format/number-format.css +4 -4
- package/components/option-card/option-card.css +70 -70
- package/components/otp-input/otp-input.css +29 -29
- package/components/page/page.a2ui.json +1 -1
- package/components/page/page.css +27 -27
- package/components/page/page.d.ts +1 -1
- package/components/page/page.yaml +1 -1
- package/components/pagination/pagination.css +6 -6
- package/components/pane/pane.css +57 -57
- package/components/password-strength/password-strength.css +32 -32
- package/components/pipeline-status/pipeline-status.css +67 -67
- package/components/popover/popover.css +11 -11
- package/components/preview/preview.css +21 -21
- package/components/progress/progress.css +23 -23
- package/components/progress-row/progress-row.css +17 -17
- package/components/qr-code/qr-code.css +4 -4
- package/components/radio/radio.css +39 -39
- package/components/range/range.css +58 -55
- package/components/rating/rating.css +28 -28
- package/components/relative-time/relative-time.css +6 -6
- package/components/richtext/richtext.css +133 -133
- package/components/row/row.css +19 -19
- package/components/search/search.css +5 -5
- package/components/segment/segment.css +29 -24
- package/components/segmented/segmented.css +30 -25
- package/components/select/select.css +95 -93
- package/components/skeleton/skeleton.css +14 -14
- package/components/skip-nav/skip-nav.css +4 -4
- package/components/slider/slider.css +61 -61
- package/components/spinner/spinner.css +40 -40
- package/components/spinner/spinner.test.js +10 -12
- package/components/stack/stack.css +11 -11
- package/components/stat/stat.css +27 -27
- package/components/step-progress/step-progress.css +20 -20
- package/components/stepper/stepper.css +29 -29
- package/components/stream/stream.css +12 -12
- package/components/swatch/swatch.css +68 -68
- package/components/swiper/swiper.class.js +5 -12
- package/components/swiper/swiper.css +57 -57
- package/components/switch/switch.css +53 -53
- package/components/table/table.css +166 -163
- package/components/table-toolbar/table-toolbar.css +33 -33
- package/components/tabs/tabs.css +54 -51
- package/components/tag/tag.css +74 -71
- package/components/tag/tag.test.js +14 -14
- package/components/tags-input/tags-input.css +51 -49
- package/components/text/text.css +44 -44
- package/components/textarea/textarea.css +49 -46
- package/components/time-picker/time-picker.css +47 -47
- package/components/timeline/timeline.css +54 -54
- package/components/toast/toast.css +58 -58
- package/components/toc/toc.css +28 -28
- package/components/toggle-group/toggle-group.css +9 -6
- package/components/toggle-scheme/toggle-scheme.css +2 -2
- package/components/toolbar/toolbar.css +18 -18
- package/components/tooltip/tooltip.css +2 -2
- package/components/tour/tour.css +4 -4
- package/components/tree/tree.css +37 -37
- package/components/upload/upload.css +49 -49
- package/dist/host.min.css +1 -0
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +2 -2
- package/package.json +1 -1
- package/styles/api/text.css +9 -2
- package/styles/foundation/space.css +19 -18
- package/styles/host.css +48 -0
- package/styles/prose.css +187 -173
- package/styles/type/scale.css +6 -0
- package/styles/typography.css +10 -5
- package/styles/verse.css +122 -0
|
@@ -41,9 +41,9 @@ describe('tag-ui — content: attr(text) gating', () => {
|
|
|
41
41
|
// [icon] + [dismiss] slot rendering and for proper :scope[text]
|
|
42
42
|
// gap rendering when text IS set.
|
|
43
43
|
expect(TAG_CSS).toMatch(/:scope\s*\{[^}]*display:\s*inline-flex/);
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
expect(TAG_CSS).toMatch(/:scope\s*\{[^}]*gap:\s*var\(--tag-gap
|
|
44
|
+
// Tokens are read directly via `var(--prop)`; consumers override the
|
|
45
|
+
// un-suffixed token on the element (or via @layer overrides).
|
|
46
|
+
expect(TAG_CSS).toMatch(/:scope\s*\{[^}]*gap:\s*var\(--tag-gap\)/);
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
|
|
@@ -65,8 +65,8 @@ describe('tag-ui — variant defaults to solid fill', () => {
|
|
|
65
65
|
])('[variant="%s"] base rule uses --a-{family}-bg + --a-{family}-fg', (family) => {
|
|
66
66
|
const block = new RegExp(
|
|
67
67
|
`:scope\\[variant="${family}"\\]\\s*\\{[^}]*` +
|
|
68
|
-
`--tag-bg
|
|
69
|
-
`--tag-fg
|
|
68
|
+
`--tag-bg:\\s*var\\(--a-${family}-bg\\)[^}]*` +
|
|
69
|
+
`--tag-fg:\\s*var\\(--a-${family}-fg\\)`,
|
|
70
70
|
's'
|
|
71
71
|
);
|
|
72
72
|
expect(TAG_CSS).toMatch(block);
|
|
@@ -78,7 +78,7 @@ describe('tag-ui — variant defaults to solid fill', () => {
|
|
|
78
78
|
// can pair `-bg` + `-fg` cleanly without local overrides. The pair
|
|
79
79
|
// resolves to bright-amber-bg + dark-brown-text in both schemes.
|
|
80
80
|
expect(TAG_CSS).toMatch(
|
|
81
|
-
/:scope\[variant="warning"\]\s*\{[^}]*--tag-bg
|
|
81
|
+
/:scope\[variant="warning"\]\s*\{[^}]*--tag-bg:\s*var\(--a-warning-bg\)[^}]*--tag-fg:\s*var\(--a-warning-fg\)/s
|
|
82
82
|
);
|
|
83
83
|
});
|
|
84
84
|
});
|
|
@@ -92,8 +92,8 @@ describe('tag-ui — [tone="muted"] opts out to canonical muted pair', () => {
|
|
|
92
92
|
])('[tone="muted"][variant="%s"] uses --a-{family}-muted + --a-{family}-text', (family) => {
|
|
93
93
|
const block = new RegExp(
|
|
94
94
|
`:scope\\[tone="muted"\\]\\[variant="${family}"\\]\\s*\\{[^}]*` +
|
|
95
|
-
`--tag-bg
|
|
96
|
-
`--tag-fg
|
|
95
|
+
`--tag-bg:\\s*var\\(--a-${family}-muted\\)[^}]*` +
|
|
96
|
+
`--tag-fg:\\s*var\\(--a-${family}-text\\)`,
|
|
97
97
|
's'
|
|
98
98
|
);
|
|
99
99
|
expect(TAG_CSS).toMatch(block);
|
|
@@ -103,13 +103,13 @@ describe('tag-ui — [tone="muted"] opts out to canonical muted pair', () => {
|
|
|
103
103
|
describe('tag-ui — neutral default + explicit solid stamp', () => {
|
|
104
104
|
it('[variant="default"] stays quiet chrome (--a-bg-muted + --a-fg)', () => {
|
|
105
105
|
expect(TAG_CSS).toMatch(
|
|
106
|
-
/:scope\[variant="default"\]\s*\{[^}]*--tag-bg
|
|
106
|
+
/:scope\[variant="default"\]\s*\{[^}]*--tag-bg:\s*var\(--a-bg-muted\)[^}]*--tag-fg:\s*var\(--a-fg\)/s
|
|
107
107
|
);
|
|
108
108
|
});
|
|
109
109
|
|
|
110
110
|
it('[tone="solid"] without a family inverts to fg/bg high-contrast stamp', () => {
|
|
111
111
|
expect(TAG_CSS).toMatch(
|
|
112
|
-
/:scope\[tone="solid"\]:not\(\[variant="info"\]\)[\s\S]*?--tag-bg
|
|
112
|
+
/:scope\[tone="solid"\]:not\(\[variant="info"\]\)[\s\S]*?--tag-bg:\s*var\(--a-fg\)[\s\S]*?--tag-fg:\s*var\(--a-bg\)/
|
|
113
113
|
);
|
|
114
114
|
});
|
|
115
115
|
});
|
|
@@ -117,7 +117,7 @@ describe('tag-ui — neutral default + explicit solid stamp', () => {
|
|
|
117
117
|
describe('tag-ui — [tone="outline"] strips fill + colors border', () => {
|
|
118
118
|
it('[tone="outline"] base rule sets bg to transparent', () => {
|
|
119
119
|
expect(TAG_CSS).toMatch(
|
|
120
|
-
/:scope\[tone="outline"\]\s*\{[^}]*--tag-bg
|
|
120
|
+
/:scope\[tone="outline"\]\s*\{[^}]*--tag-bg:\s*transparent/s
|
|
121
121
|
);
|
|
122
122
|
});
|
|
123
123
|
|
|
@@ -129,8 +129,8 @@ describe('tag-ui — [tone="outline"] strips fill + colors border', () => {
|
|
|
129
129
|
])('[tone="outline"][variant="%s"] colors fg + border per family', (family) => {
|
|
130
130
|
const block = new RegExp(
|
|
131
131
|
`:scope\\[tone="outline"\\]\\[variant="${family}"\\]\\s*\\{[^}]*` +
|
|
132
|
-
`--tag-fg
|
|
133
|
-
`--tag-border
|
|
132
|
+
`--tag-fg:\\s*var\\(--a-${family}-text\\)[^}]*` +
|
|
133
|
+
`--tag-border:\\s*var\\(--a-${family}-border\\)`,
|
|
134
134
|
's'
|
|
135
135
|
);
|
|
136
136
|
expect(TAG_CSS).toMatch(block);
|
|
@@ -138,7 +138,7 @@ describe('tag-ui — [tone="outline"] strips fill + colors border', () => {
|
|
|
138
138
|
|
|
139
139
|
it('[tone="outline"] on neutral uses --a-fg-muted text + --a-border ring', () => {
|
|
140
140
|
expect(TAG_CSS).toMatch(
|
|
141
|
-
/:scope\[tone="outline"\]:not\(\[variant="info"\]\)[\s\S]*?--tag-fg
|
|
141
|
+
/:scope\[tone="outline"\]:not\(\[variant="info"\]\)[\s\S]*?--tag-fg:\s*var\(--a-fg-muted\)[\s\S]*?--tag-border:\s*var\(--a-border\)/
|
|
142
142
|
);
|
|
143
143
|
});
|
|
144
144
|
});
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
@scope (tags-input-ui) {
|
|
2
2
|
:where(:scope) {
|
|
3
3
|
/* ── Layout ── */
|
|
4
|
-
--tags-input-min-h
|
|
5
|
-
--tags-input-px
|
|
6
|
-
--tags-input-py
|
|
7
|
-
--tags-input-gap
|
|
8
|
-
--tags-input-radius
|
|
4
|
+
--tags-input-min-h: var(--a-size);
|
|
5
|
+
--tags-input-px: var(--a-ui-px);
|
|
6
|
+
--tags-input-py: calc(var(--a-space-1) / 2);
|
|
7
|
+
--tags-input-gap: var(--a-space-1);
|
|
8
|
+
--tags-input-radius: var(--a-radius);
|
|
9
9
|
|
|
10
10
|
/* ── Typography ── */
|
|
11
|
-
--tags-input-font-size
|
|
11
|
+
--tags-input-font-size: var(--a-ui-size);
|
|
12
12
|
|
|
13
13
|
/* ── Colors — host ── */
|
|
14
|
-
--tags-input-bg
|
|
15
|
-
--tags-input-bg-hover
|
|
16
|
-
--tags-input-fg
|
|
17
|
-
--tags-input-placeholder-fg
|
|
18
|
-
--tags-input-border
|
|
19
|
-
--tags-input-border-hover
|
|
20
|
-
--tags-input-focus-ring
|
|
21
|
-
--tags-input-focus-ring-invalid
|
|
14
|
+
--tags-input-bg: var(--a-ui-bg);
|
|
15
|
+
--tags-input-bg-hover: var(--a-ui-bg-hover);
|
|
16
|
+
--tags-input-fg: var(--a-ui-text);
|
|
17
|
+
--tags-input-placeholder-fg: var(--a-ui-text-placeholder);
|
|
18
|
+
--tags-input-border: var(--a-ui-border);
|
|
19
|
+
--tags-input-border-hover: var(--a-ui-border-hover);
|
|
20
|
+
--tags-input-focus-ring: var(--a-focus-ring);
|
|
21
|
+
--tags-input-focus-ring-invalid: var(--a-focus-ring-invalid);
|
|
22
22
|
|
|
23
23
|
/* ── Transition ── */
|
|
24
|
-
--tags-input-duration
|
|
25
|
-
--tags-input-easing
|
|
24
|
+
--tags-input-duration: var(--a-duration-fast);
|
|
25
|
+
--tags-input-easing: var(--a-easing);
|
|
26
26
|
|
|
27
27
|
/* ── Chip overrides — cascaded into nested <tag-ui> ── */
|
|
28
|
-
--tags-input-chip-bg-invalid
|
|
28
|
+
--tags-input-chip-bg-invalid: var(--a-danger-muted);
|
|
29
29
|
|
|
30
30
|
/* ── Suggestions popover ── */
|
|
31
|
-
--tags-input-suggestions-bg
|
|
32
|
-
--tags-input-suggestions-border
|
|
33
|
-
--tags-input-suggestions-radius
|
|
34
|
-
--tags-input-suggestions-shadow
|
|
35
|
-
--tags-input-suggestion-bg-focus
|
|
36
|
-
--tags-input-suggestion-fg-focus
|
|
31
|
+
--tags-input-suggestions-bg: var(--a-canvas-bright);
|
|
32
|
+
--tags-input-suggestions-border: var(--a-ui-border);
|
|
33
|
+
--tags-input-suggestions-radius: var(--a-radius);
|
|
34
|
+
--tags-input-suggestions-shadow: var(--a-shadow-lg);
|
|
35
|
+
--tags-input-suggestion-bg-focus: var(--a-ui-bg-hover);
|
|
36
|
+
--tags-input-suggestion-fg-focus: var(--a-ui-text-hover);
|
|
37
37
|
|
|
38
38
|
text-align: start; /* §text-align-reset — block ancestor centering */
|
|
39
39
|
}
|
|
@@ -44,35 +44,37 @@
|
|
|
44
44
|
display: flex;
|
|
45
45
|
align-items: center;
|
|
46
46
|
flex-wrap: wrap;
|
|
47
|
-
gap: var(--tags-input-gap
|
|
48
|
-
min-height: var(--tags-input-min-h
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
gap: var(--tags-input-gap);
|
|
48
|
+
min-height: var(--tags-input-min-h);
|
|
49
|
+
/* font-family floor on the host — the inner input + tags inherit it. */
|
|
50
|
+
font-family: var(--tags-input-font-family, var(--a-font-family-ui));
|
|
51
|
+
padding: var(--tags-input-py)
|
|
52
|
+
var(--tags-input-px);
|
|
53
|
+
border: 1px solid var(--tags-input-border);
|
|
54
|
+
border-radius: var(--tags-input-radius);
|
|
55
|
+
background: var(--tags-input-bg);
|
|
56
|
+
color: var(--tags-input-fg);
|
|
57
|
+
font-size: var(--tags-input-font-size);
|
|
56
58
|
cursor: text;
|
|
57
59
|
transition:
|
|
58
|
-
background var(--tags-input-duration
|
|
59
|
-
border-color var(--tags-input-duration
|
|
60
|
-
box-shadow var(--tags-input-duration
|
|
60
|
+
background var(--tags-input-duration) var(--tags-input-easing),
|
|
61
|
+
border-color var(--tags-input-duration) var(--tags-input-easing),
|
|
62
|
+
box-shadow var(--tags-input-duration) var(--tags-input-easing);
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
:scope:not([disabled]):hover {
|
|
64
|
-
background: var(--tags-input-bg-hover
|
|
65
|
-
border-color: var(--tags-input-border-hover
|
|
66
|
+
background: var(--tags-input-bg-hover);
|
|
67
|
+
border-color: var(--tags-input-border-hover);
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
:scope:focus-within {
|
|
69
|
-
box-shadow: var(--tags-input-focus-ring
|
|
71
|
+
box-shadow: var(--tags-input-focus-ring);
|
|
70
72
|
border-color: transparent;
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
:scope[aria-invalid="true"]:focus-within,
|
|
74
76
|
:scope[error]:focus-within {
|
|
75
|
-
box-shadow: var(--tags-input-focus-ring-invalid
|
|
77
|
+
box-shadow: var(--tags-input-focus-ring-invalid);
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
:scope[disabled] {
|
|
@@ -91,7 +93,7 @@
|
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
:scope tag-ui[data-invalid] {
|
|
94
|
-
--tag-bg
|
|
96
|
+
--tag-bg: var(--tags-input-chip-bg-invalid);
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
/* ── Inline input ── */
|
|
@@ -103,9 +105,9 @@
|
|
|
103
105
|
align-items: center;
|
|
104
106
|
outline: none;
|
|
105
107
|
background: transparent;
|
|
106
|
-
color: var(--tags-input-fg
|
|
108
|
+
color: var(--tags-input-fg);
|
|
107
109
|
font: inherit;
|
|
108
|
-
font-size: var(--tags-input-font-size
|
|
110
|
+
font-size: var(--tags-input-font-size);
|
|
109
111
|
line-height: 1.4;
|
|
110
112
|
white-space: pre-wrap;
|
|
111
113
|
overflow-wrap: anywhere;
|
|
@@ -120,7 +122,7 @@
|
|
|
120
122
|
pattern input-ui + textarea-ui + combobox-ui use. */
|
|
121
123
|
[data-inline-input][data-empty]::before {
|
|
122
124
|
content: attr(data-placeholder);
|
|
123
|
-
color: var(--tags-input-placeholder-fg
|
|
125
|
+
color: var(--tags-input-placeholder-fg);
|
|
124
126
|
pointer-events: none;
|
|
125
127
|
position: absolute;
|
|
126
128
|
inset: 0;
|
|
@@ -141,14 +143,14 @@
|
|
|
141
143
|
|
|
142
144
|
/* ── Sizing — leverages universal [size] attribute ── */
|
|
143
145
|
:scope[size="sm"] {
|
|
144
|
-
--tags-input-font-size
|
|
145
|
-
--tags-input-min-h
|
|
146
|
-
--tags-input-gap
|
|
146
|
+
--tags-input-font-size: var(--a-ui-sm);
|
|
147
|
+
--tags-input-min-h: var(--a-size-sm);
|
|
148
|
+
--tags-input-gap: calc(var(--a-space-1) / 1.25);
|
|
147
149
|
}
|
|
148
150
|
:scope[size="lg"] {
|
|
149
|
-
--tags-input-font-size
|
|
150
|
-
--tags-input-min-h
|
|
151
|
-
--tags-input-gap
|
|
151
|
+
--tags-input-font-size: var(--a-ui-lg);
|
|
152
|
+
--tags-input-min-h: var(--a-size-lg);
|
|
153
|
+
--tags-input-gap: var(--a-space-2);
|
|
152
154
|
}
|
|
153
155
|
}
|
|
154
156
|
|
package/components/text/text.css
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
@scope (text-ui) {
|
|
2
2
|
:where(:scope) {
|
|
3
3
|
/* ── Tokens (body defaults) ── */
|
|
4
|
-
--text-family
|
|
5
|
-
--text-weight
|
|
6
|
-
--text-weight-strong
|
|
7
|
-
--text-size
|
|
8
|
-
--text-leading
|
|
9
|
-
--text-tracking
|
|
10
|
-
--text-case
|
|
11
|
-
--text-color
|
|
12
|
-
--text-color-strong
|
|
4
|
+
--text-family: var(--a-body-family);
|
|
5
|
+
--text-weight: var(--a-weight);
|
|
6
|
+
--text-weight-strong: var(--a-weight-semibold);
|
|
7
|
+
--text-size: var(--a-body-size);
|
|
8
|
+
--text-leading: var(--a-body-leading);
|
|
9
|
+
--text-tracking: var(--a-body-tracking);
|
|
10
|
+
--text-case: var(--a-body-case);
|
|
11
|
+
--text-color: var(--a-fg);
|
|
12
|
+
--text-color-strong: var(--a-fg-strong);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
:scope {
|
|
16
16
|
box-sizing: border-box;
|
|
17
17
|
display: inline;
|
|
18
|
-
font-family: var(--text-family
|
|
19
|
-
font-weight: var(--text-weight
|
|
20
|
-
font-size: var(--text-size
|
|
21
|
-
line-height: var(--text-leading
|
|
22
|
-
letter-spacing: var(--text-tracking
|
|
23
|
-
text-transform: var(--text-case
|
|
24
|
-
color: var(--text-color
|
|
18
|
+
font-family: var(--text-family);
|
|
19
|
+
font-weight: var(--text-weight);
|
|
20
|
+
font-size: var(--text-size);
|
|
21
|
+
line-height: var(--text-leading);
|
|
22
|
+
letter-spacing: var(--text-tracking);
|
|
23
|
+
text-transform: var(--text-case);
|
|
24
|
+
color: var(--text-color);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/* Reset native heading styles inside text-ui so the variant controls the look */
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
:scope[strong], :is(strong) {
|
|
36
|
-
--text-weight
|
|
37
|
-
--text-color
|
|
36
|
+
--text-weight: var(--text-weight-strong);
|
|
37
|
+
--text-color: var(--text-color-strong);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/* ── Variants ── */
|
|
41
|
-
:scope[variant="body"] { --text-family
|
|
42
|
-
:scope[variant="display"] { --text-family
|
|
43
|
-
:scope[variant="title"] { --text-family
|
|
44
|
-
:scope[variant="heading"] { --text-family
|
|
45
|
-
:scope[variant="section"] { --text-family
|
|
46
|
-
:scope[variant="caption"] { --text-family
|
|
47
|
-
:scope[variant="label"] { --text-family
|
|
48
|
-
:scope[variant="kicker"] { --text-family
|
|
49
|
-
:scope[variant="code"] { --text-family
|
|
41
|
+
:scope[variant="body"] { --text-family: var(--a-body-family); --text-weight: var(--a-body-weight); --text-size: var(--a-body-size); --text-leading: var(--a-body-leading); --text-tracking: var(--a-body-tracking); --text-case: var(--a-body-case); --text-color: var(--a-fg); }
|
|
42
|
+
:scope[variant="display"] { --text-family: var(--a-display-family); --text-weight: var(--a-display-weight); --text-size: var(--a-display-size); --text-leading: var(--a-display-leading); --text-tracking: var(--a-display-tracking); --text-case: var(--a-display-case); --text-color: var(--a-display-color); }
|
|
43
|
+
:scope[variant="title"] { --text-family: var(--a-title-family); --text-weight: var(--a-title-weight); --text-size: var(--a-title-size); --text-leading: var(--a-title-leading); --text-tracking: var(--a-title-tracking); --text-case: var(--a-title-case); --text-color: var(--a-title-color); }
|
|
44
|
+
:scope[variant="heading"] { --text-family: var(--a-heading-family); --text-weight: var(--a-heading-weight); --text-size: var(--a-heading-size); --text-leading: var(--a-heading-leading); --text-tracking: var(--a-heading-tracking); --text-case: var(--a-heading-case); --text-color: var(--a-heading-color); }
|
|
45
|
+
:scope[variant="section"] { --text-family: var(--a-section-family); --text-weight: var(--a-section-weight); --text-size: var(--a-section-size); --text-leading: var(--a-section-leading); --text-tracking: var(--a-section-tracking); --text-case: var(--a-section-case); --text-color: var(--a-section-color); }
|
|
46
|
+
:scope[variant="caption"] { --text-family: var(--a-caption-family); --text-weight: var(--a-caption-weight); --text-size: var(--a-caption-size); --text-leading: var(--a-caption-leading); --text-tracking: var(--a-caption-tracking); --text-case: var(--a-caption-case); --text-color: var(--a-caption-color); }
|
|
47
|
+
:scope[variant="label"] { --text-family: var(--a-label-family); --text-weight: var(--a-label-weight); --text-size: var(--a-label-size); --text-leading: var(--a-label-leading); --text-tracking: var(--a-label-tracking); --text-case: var(--a-label-case); --text-color: var(--a-label-color); }
|
|
48
|
+
:scope[variant="kicker"] { --text-family: var(--a-kicker-family); --text-weight: var(--a-kicker-weight); --text-size: var(--a-kicker-size); --text-leading: var(--a-kicker-leading); --text-tracking: var(--a-kicker-tracking); --text-case: uppercase; --text-color: var(--a-kicker-color); }
|
|
49
|
+
:scope[variant="code"] { --text-family: var(--a-code-family); --text-weight: var(--a-code-weight); --text-size: var(--a-code-size); --text-leading: var(--a-code-leading); --text-tracking: var(--a-code-tracking); --text-case: var(--a-code-case); --text-color: var(--a-code-color); }
|
|
50
50
|
|
|
51
51
|
/* §210 (v0.5.7, FEEDBACK-17 §1): three token-backed variants whose
|
|
52
52
|
`--a-<role>-{family,weight,leading,tracking,case,color,size}` tokens
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
this batch: their tokens don't ship anywhere (verified in this same
|
|
58
58
|
arc), so the enum entries are retired from text.yaml / text.d.ts /
|
|
59
59
|
text.a2ui.json. */
|
|
60
|
-
:scope[variant="subsection"] { --text-family
|
|
61
|
-
:scope[variant="deck"] { --text-family
|
|
62
|
-
:scope[variant="metric"] { --text-family
|
|
60
|
+
:scope[variant="subsection"] { --text-family: var(--a-subsection-family); --text-weight: var(--a-subsection-weight); --text-size: var(--a-subsection-size); --text-leading: var(--a-subsection-leading); --text-tracking: var(--a-subsection-tracking); --text-case: var(--a-subsection-case); --text-color: var(--a-subsection-color); }
|
|
61
|
+
:scope[variant="deck"] { --text-family: var(--a-deck-family); --text-weight: var(--a-deck-weight); --text-size: var(--a-deck-size); --text-leading: var(--a-deck-leading); --text-tracking: var(--a-deck-tracking); --text-case: var(--a-deck-case); --text-color: var(--a-deck-color); }
|
|
62
|
+
:scope[variant="metric"] { --text-family: var(--a-metric-family); --text-weight: var(--a-metric-weight); --text-size: var(--a-metric-size); --text-leading: var(--a-metric-leading); --text-tracking: var(--a-metric-tracking); --text-case: var(--a-metric-case); --text-color: var(--a-metric-color); }
|
|
63
63
|
|
|
64
64
|
/* ── v0.6.18 (FB-10) — finer-control overrides on top of `variant` ──
|
|
65
65
|
The skill always documented an overlay API (color="subtle",
|
|
@@ -72,25 +72,25 @@
|
|
|
72
72
|
with an unknown color = no-op (variant color wins). */
|
|
73
73
|
|
|
74
74
|
/* size — sm | md | lg (md is the body default ~15-16px) */
|
|
75
|
-
:scope[size="sm"] { --text-size
|
|
76
|
-
:scope[size="md"] { --text-size
|
|
77
|
-
:scope[size="lg"] { --text-size
|
|
75
|
+
:scope[size="sm"] { --text-size: var(--a-body-sm); }
|
|
76
|
+
:scope[size="md"] { --text-size: var(--a-body-md); }
|
|
77
|
+
:scope[size="lg"] { --text-size: var(--a-body-lg); }
|
|
78
78
|
|
|
79
79
|
/* color — default | subtle | strong | accent | danger | success | warning
|
|
80
80
|
(no value = variant default; "default" is an explicit reset). */
|
|
81
|
-
:scope[color="default"] { --text-color
|
|
82
|
-
:scope[color="subtle"] { --text-color
|
|
83
|
-
:scope[color="strong"] { --text-color
|
|
84
|
-
:scope[color="accent"] { --text-color
|
|
85
|
-
:scope[color="danger"] { --text-color
|
|
86
|
-
:scope[color="success"] { --text-color
|
|
87
|
-
:scope[color="warning"] { --text-color
|
|
81
|
+
:scope[color="default"] { --text-color: var(--a-fg); }
|
|
82
|
+
:scope[color="subtle"] { --text-color: var(--a-fg-muted); }
|
|
83
|
+
:scope[color="strong"] { --text-color: var(--a-fg-strong); }
|
|
84
|
+
:scope[color="accent"] { --text-color: var(--a-accent); }
|
|
85
|
+
:scope[color="danger"] { --text-color: var(--a-danger-bg); }
|
|
86
|
+
:scope[color="success"] { --text-color: var(--a-success-bg); }
|
|
87
|
+
:scope[color="warning"] { --text-color: var(--a-warning-bg); }
|
|
88
88
|
|
|
89
89
|
/* weight — regular | medium | semibold | bold */
|
|
90
|
-
:scope[weight="regular"] { --text-weight
|
|
91
|
-
:scope[weight="medium"] { --text-weight
|
|
92
|
-
:scope[weight="semibold"] { --text-weight
|
|
93
|
-
:scope[weight="bold"] { --text-weight
|
|
90
|
+
:scope[weight="regular"] { --text-weight: var(--a-weight); }
|
|
91
|
+
:scope[weight="medium"] { --text-weight: var(--a-weight-medium); }
|
|
92
|
+
:scope[weight="semibold"] { --text-weight: var(--a-weight-semibold); }
|
|
93
|
+
:scope[weight="bold"] { --text-weight: var(--a-weight-bold); }
|
|
94
94
|
|
|
95
95
|
/* text-align — start | center | end | justify */
|
|
96
96
|
:scope[text-align="start"] { text-align: start; }
|
|
@@ -2,40 +2,41 @@
|
|
|
2
2
|
doesn't match the scope root. Plain selector outside works. See
|
|
3
3
|
docs/BROWSER-COMPAT.md §3a. */
|
|
4
4
|
textarea-ui:not([disabled]) [slot="text"]:hover {
|
|
5
|
-
background: var(--textarea-bg-hover
|
|
6
|
-
border-color: var(--textarea-border-hover
|
|
7
|
-
color: var(--textarea-fg-hover
|
|
5
|
+
background: var(--textarea-bg-hover);
|
|
6
|
+
border-color: var(--textarea-border-hover);
|
|
7
|
+
color: var(--textarea-fg-hover);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
@scope (textarea-ui) {
|
|
11
11
|
:where(:scope) {
|
|
12
12
|
/* ── Tokens (wired to --a-ui-*) ── */
|
|
13
|
-
--textarea-bg
|
|
14
|
-
--textarea-fg
|
|
15
|
-
--textarea-border
|
|
16
|
-
--textarea-border-hover
|
|
17
|
-
--textarea-focus-ring
|
|
18
|
-
--textarea-focus-ring-invalid
|
|
19
|
-
--textarea-radius
|
|
20
|
-
--textarea-min-height
|
|
21
|
-
--textarea-px
|
|
22
|
-
--textarea-py
|
|
23
|
-
--textarea-font-size
|
|
24
|
-
--textarea-
|
|
25
|
-
--textarea-label-
|
|
26
|
-
--textarea-
|
|
27
|
-
--textarea-
|
|
13
|
+
--textarea-bg: var(--a-ui-bg);
|
|
14
|
+
--textarea-fg: var(--a-ui-text);
|
|
15
|
+
--textarea-border: var(--a-ui-border);
|
|
16
|
+
--textarea-border-hover: var(--a-ui-border-hover);
|
|
17
|
+
--textarea-focus-ring: var(--a-focus-ring);
|
|
18
|
+
--textarea-focus-ring-invalid: var(--a-focus-ring-invalid);
|
|
19
|
+
--textarea-radius: var(--a-radius);
|
|
20
|
+
--textarea-min-height: calc(var(--a-size) * 2);
|
|
21
|
+
--textarea-px: var(--a-ui-px);
|
|
22
|
+
--textarea-py: var(--a-ui-px);
|
|
23
|
+
--textarea-font-size: var(--a-ui-size);
|
|
24
|
+
--textarea-font-family: var(--a-font-family-ui);
|
|
25
|
+
--textarea-label-size: var(--a-label-size);
|
|
26
|
+
--textarea-label-fg: var(--a-label-color);
|
|
27
|
+
--textarea-placeholder-fg: var(--a-ui-text-placeholder);
|
|
28
|
+
--textarea-gap: var(--a-space-1);
|
|
28
29
|
|
|
29
30
|
/* ── Transition ── */
|
|
30
|
-
--textarea-duration
|
|
31
|
-
--textarea-easing
|
|
31
|
+
--textarea-duration: var(--a-duration-fast);
|
|
32
|
+
--textarea-easing: var(--a-easing);
|
|
32
33
|
|
|
33
34
|
/* ── State ── */
|
|
34
|
-
--textarea-bg-hover
|
|
35
|
-
--textarea-fg-hover
|
|
36
|
-
--textarea-label-fg-focus
|
|
37
|
-
--textarea-bg-disabled
|
|
38
|
-
--textarea-fg-disabled
|
|
35
|
+
--textarea-bg-hover: var(--a-ui-bg-hover);
|
|
36
|
+
--textarea-fg-hover: var(--a-ui-text-hover);
|
|
37
|
+
--textarea-label-fg-focus: var(--a-fg-subtle);
|
|
38
|
+
--textarea-bg-disabled: var(--a-ui-bg-disabled);
|
|
39
|
+
--textarea-fg-disabled: var(--a-ui-text-disabled);
|
|
39
40
|
text-align: start; /* §text-align-reset — blocks inheritance from centered ancestors */
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -44,7 +45,7 @@ textarea-ui:not([disabled]) [slot="text"]:hover {
|
|
|
44
45
|
box-sizing: border-box;
|
|
45
46
|
display: flex;
|
|
46
47
|
flex-direction: column;
|
|
47
|
-
gap: var(--textarea-gap
|
|
48
|
+
gap: var(--textarea-gap);
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
:scope[data-direction="row"] {
|
|
@@ -54,8 +55,8 @@ textarea-ui:not([disabled]) [slot="text"]:hover {
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
[slot="label"] {
|
|
57
|
-
font-size: var(--textarea-label-size
|
|
58
|
-
color: var(--textarea-label-fg
|
|
58
|
+
font-size: var(--textarea-label-size);
|
|
59
|
+
color: var(--textarea-label-fg);
|
|
59
60
|
}
|
|
60
61
|
[slot="label"][label]::after { content: attr(label); }
|
|
61
62
|
|
|
@@ -64,14 +65,16 @@ textarea-ui:not([disabled]) [slot="text"]:hover {
|
|
|
64
65
|
which is absolutely positioned (out of inline flow) so the caret
|
|
65
66
|
renders at content-start instead of after the placeholder text. */
|
|
66
67
|
position: relative;
|
|
67
|
-
min-height: var(--textarea-min-height
|
|
68
|
-
padding: var(--textarea-py
|
|
69
|
-
border: 1px solid var(--textarea-border
|
|
70
|
-
border-radius: var(--textarea-radius
|
|
71
|
-
background: var(--textarea-bg
|
|
72
|
-
color: var(--textarea-fg
|
|
68
|
+
min-height: var(--textarea-min-height);
|
|
69
|
+
padding: var(--textarea-py) var(--textarea-px);
|
|
70
|
+
border: 1px solid var(--textarea-border);
|
|
71
|
+
border-radius: var(--textarea-radius);
|
|
72
|
+
background: var(--textarea-bg);
|
|
73
|
+
color: var(--textarea-fg);
|
|
73
74
|
font: inherit;
|
|
74
|
-
|
|
75
|
+
/* font-family floor — see segment.css rationale. */
|
|
76
|
+
font-family: var(--textarea-font-family);
|
|
77
|
+
font-size: var(--textarea-font-size);
|
|
75
78
|
line-height: 1.5;
|
|
76
79
|
white-space: pre-wrap;
|
|
77
80
|
word-break: break-word;
|
|
@@ -79,10 +82,10 @@ textarea-ui:not([disabled]) [slot="text"]:hover {
|
|
|
79
82
|
cursor: text;
|
|
80
83
|
outline: none;
|
|
81
84
|
transition:
|
|
82
|
-
background var(--textarea-duration
|
|
83
|
-
border-color var(--textarea-duration
|
|
84
|
-
color var(--textarea-duration
|
|
85
|
-
box-shadow var(--textarea-duration
|
|
85
|
+
background var(--textarea-duration) var(--textarea-easing),
|
|
86
|
+
border-color var(--textarea-duration) var(--textarea-easing),
|
|
87
|
+
color var(--textarea-duration) var(--textarea-easing),
|
|
88
|
+
box-shadow var(--textarea-duration) var(--textarea-easing);
|
|
86
89
|
}
|
|
87
90
|
/* hover rule moved outside @scope — see Safari 17.x bug note at top. */
|
|
88
91
|
:scope:not([disabled]) [slot="text"]:focus {
|
|
@@ -91,16 +94,16 @@ textarea-ui:not([disabled]) [slot="text"]:hover {
|
|
|
91
94
|
in the contenteditable [slot="text"] span; :focus-visible on
|
|
92
95
|
the host wouldn't match the actual input surface. */
|
|
93
96
|
outline: none;
|
|
94
|
-
box-shadow: var(--textarea-focus-ring
|
|
95
|
-
color: var(--textarea-fg-hover
|
|
97
|
+
box-shadow: var(--textarea-focus-ring);
|
|
98
|
+
color: var(--textarea-fg-hover);
|
|
96
99
|
}
|
|
97
100
|
:scope[aria-invalid="true"]:not([disabled]) [slot="text"]:focus,
|
|
98
101
|
:scope[error]:not([disabled]) [slot="text"]:focus {
|
|
99
|
-
box-shadow: var(--textarea-focus-ring-invalid
|
|
102
|
+
box-shadow: var(--textarea-focus-ring-invalid);
|
|
100
103
|
}
|
|
101
104
|
:scope:not([disabled]) [slot="text"]:focus + [slot="label"],
|
|
102
105
|
:scope:not([disabled]):focus-within [slot="label"] {
|
|
103
|
-
color: var(--textarea-label-fg-focus
|
|
106
|
+
color: var(--textarea-label-fg-focus);
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
/* Placeholder — see input.css companion comment. Out-of-flow positioning
|
|
@@ -108,7 +111,7 @@ textarea-ui:not([disabled]) [slot="text"]:hover {
|
|
|
108
111
|
right of the placeholder text after type-then-delete. */
|
|
109
112
|
[slot="text"][data-empty]::before {
|
|
110
113
|
content: attr(data-placeholder);
|
|
111
|
-
color: var(--textarea-placeholder-fg
|
|
114
|
+
color: var(--textarea-placeholder-fg);
|
|
112
115
|
pointer-events: none;
|
|
113
116
|
position: absolute;
|
|
114
117
|
inset: 0;
|
|
@@ -117,8 +120,8 @@ textarea-ui:not([disabled]) [slot="text"]:hover {
|
|
|
117
120
|
|
|
118
121
|
/* Disabled */
|
|
119
122
|
:scope[disabled] [slot="text"] {
|
|
120
|
-
background: var(--textarea-bg-disabled
|
|
121
|
-
color: var(--textarea-fg-disabled
|
|
123
|
+
background: var(--textarea-bg-disabled);
|
|
124
|
+
color: var(--textarea-fg-disabled);
|
|
122
125
|
cursor: not-allowed;
|
|
123
126
|
}
|
|
124
127
|
}
|