baseline-foundry 0.1.3 → 0.1.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/README.md +577 -553
- package/config/experiments/ibm-plex-engine-smoke.json +115 -115
- package/config/experiments/ubuntu-engine-smoke.json +115 -115
- package/config/foundation-theme.json +110 -110
- package/config/tiers/app.json +116 -116
- package/config/tiers/documentation.json +116 -116
- package/config/tiers/editorial.json +116 -116
- package/config/tiers/os.json +116 -116
- package/dist/baseline-grid-overlay.js +43 -43
- package/dist/build.js +4 -4
- package/dist/code-snippet.js +1 -1
- package/dist/css-app-tier.js +78 -73
- package/dist/css-components/article-pagination.js +141 -140
- package/dist/css-components/button-actions.js +181 -161
- package/dist/css-components/cards-options.js +176 -176
- package/dist/css-components/chip-badge-status.d.ts +0 -3
- package/dist/css-components/chip-badge-status.js +174 -159
- package/dist/css-components/content-card.d.ts +7 -7
- package/dist/css-components/content-card.js +498 -497
- package/dist/css-components/control-row.d.ts +1 -1
- package/dist/css-components/control-row.js +15 -15
- package/dist/css-components/cta-figure-aspect.js +120 -120
- package/dist/css-components/document-navigation.js +427 -390
- package/dist/css-components/editorial-content.js +42 -42
- package/dist/css-components/icon.js +72 -72
- package/dist/css-components/interactive-feedback.js +239 -217
- package/dist/css-components/interactive-tables.js +160 -155
- package/dist/css-components/legacy-navigation.d.ts +8 -0
- package/dist/css-components/legacy-navigation.js +816 -0
- package/dist/css-components/linked-logo-site-layout.d.ts +3 -3
- package/dist/css-components/linked-logo-site-layout.js +177 -180
- package/dist/css-components/list-tree.js +96 -94
- package/dist/css-components/list.js +9 -7
- package/dist/css-components/logo-media.d.ts +6 -6
- package/dist/css-components/logo-media.js +218 -207
- package/dist/css-components/navigation-layout.js +144 -144
- package/dist/css-components/panel.js +148 -144
- package/dist/css-components/search-box-and-filter.d.ts +0 -1
- package/dist/css-components/search-box-and-filter.js +263 -264
- package/dist/css-components/sites-editorial-ports.d.ts +3 -4
- package/dist/css-components/sites-editorial-ports.js +279 -247
- package/dist/css-components/sites-foundation.js +142 -146
- package/dist/css-components/sites-rich-lists.d.ts +5 -5
- package/dist/css-components/sites-rich-lists.js +339 -349
- package/dist/css-components/static-content-ports.d.ts +3 -3
- package/dist/css-components/static-content-ports.js +200 -186
- package/dist/css-components/tab-section.d.ts +3 -3
- package/dist/css-components/tab-section.js +93 -85
- package/dist/css-components/table.js +76 -75
- package/dist/css-components/tabs-choice-breadcrumbs.js +307 -303
- package/dist/css-components/tiered-list-equal-height-row.js +271 -271
- package/dist/css-components.js +1881 -2554
- package/dist/css-grid.d.ts +1 -1
- package/dist/css-grid.js +183 -173
- package/dist/css.js +317 -241
- package/dist/experiments/ibm-plex-engine-smoke/styles.css +894 -538
- package/dist/experiments/ibm-plex-engine-smoke/surfaces.json +2 -2
- package/dist/experiments/ibm-plex-engine-smoke/tokens.json +1 -1
- package/dist/in-page-navigation.js +1 -1
- package/dist/presets/app-tier/styles.css +928 -568
- package/dist/presets/app-tier/surfaces.json +17 -17
- package/dist/presets/app-tier/tokens.json +7 -7
- package/dist/presets/prose/styles.css +919 -562
- package/dist/presets/prose/surfaces.json +17 -17
- package/dist/presets/prose/tokens.json +1 -1
- package/dist/resizable-aside.js +12 -4
- package/dist/styles.css +919 -562
- package/dist/surfaces.json +17 -17
- package/dist/tiers/app/styles.css +928 -568
- package/dist/tiers/app/surfaces.json +17 -17
- package/dist/tiers/app/tokens.json +7 -7
- package/dist/tiers/documentation/styles.css +920 -563
- package/dist/tiers/documentation/surfaces.json +17 -17
- package/dist/tiers/documentation/tokens.json +2 -2
- package/dist/tiers/editorial/styles.css +919 -562
- package/dist/tiers/editorial/surfaces.json +17 -17
- package/dist/tiers/editorial/tokens.json +1 -1
- package/dist/tiers/os/styles.css +925 -568
- package/dist/tiers/os/surfaces.json +17 -17
- package/dist/tiers/os/tokens.json +7 -7
- package/dist/tokens.json +1 -1
- package/dist/types.d.ts +1 -1
- package/docs/publishing.md +31 -14
- package/package.json +119 -108
|
@@ -1,162 +1,177 @@
|
|
|
1
1
|
export function chipBadgeStatusCss(options) {
|
|
2
|
-
const { bodyCaseTypeStyles, bodyLineHeight,
|
|
3
|
-
return `:where(.bf-theme) :where(.bf-chip, .bf-chip.is-positive, .bf-chip.is-caution, .bf-chip.is-negative, .bf-chip.is-information) {
|
|
4
|
-
--bf-ui-chip-border: var(--bf-color-border-neutral);
|
|
5
|
-
--bf-ui-chip-border-hover: var(--bf-color-border-neutral);
|
|
6
|
-
--bf-ui-chip-border-active: var(--bf-color-border-neutral);
|
|
7
|
-
--bf-ui-chip-background: var(--bf-color-background-neutral-default);
|
|
8
|
-
--bf-ui-chip-background-hover: var(--bf-color-background-neutral-hover);
|
|
9
|
-
--bf-ui-chip-background-active: var(--bf-color-background-neutral-active);
|
|
10
|
-
${bodyTypeStyles} align-items: baseline;
|
|
11
|
-
background-color: var(--bf-ui-chip-background);
|
|
12
|
-
border: var(--bf-border-width) solid var(--bf-ui-chip-border);
|
|
13
|
-
border-radius: 1rem;
|
|
14
|
-
color: var(--bf-color-text-default);
|
|
15
|
-
display: inline-flex;
|
|
16
|
-
gap: 0;
|
|
17
|
-
inline-size: fit-content;
|
|
18
|
-
justify-self: start;
|
|
19
|
-
margin: 0 var(--bf-ui-chip-padding-inline) var(--bf-
|
|
20
|
-
max-inline-size: 100%;
|
|
21
|
-
|
|
22
|
-
padding-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
--bf-ui-chip-border
|
|
35
|
-
--bf-ui-chip-
|
|
36
|
-
--bf-ui-chip-
|
|
37
|
-
--bf-ui-chip-background
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
--bf-ui-chip-border
|
|
44
|
-
--bf-ui-chip-
|
|
45
|
-
--bf-ui-chip-
|
|
46
|
-
--bf-ui-chip-background
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
--bf-ui-chip-border
|
|
53
|
-
--bf-ui-chip-
|
|
54
|
-
--bf-ui-chip-
|
|
55
|
-
--bf-ui-chip-background
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
--bf-ui-chip-border
|
|
62
|
-
--bf-ui-chip-
|
|
63
|
-
--bf-ui-chip-
|
|
64
|
-
--bf-ui-chip-background
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
:where(.bf-theme) :where(.bf-chip-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
:where(.bf-theme) :where(.bf-chip-lead) {
|
|
90
|
-
${
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
:where(.bf-theme) :where(.bf-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
:where(.bf-theme) :where(.bf-status-label.is-
|
|
158
|
-
--bf-ui-status-background: var(--bf-color-border-
|
|
159
|
-
--bf-ui-status-color: var(--bf-color-button-
|
|
160
|
-
}
|
|
2
|
+
const { bodyCaseTypeStyles, bodyLineHeight, bodyTypeStyles, } = options;
|
|
3
|
+
return `:where(.bf-theme) :where(.bf-chip, .bf-chip.is-positive, .bf-chip.is-caution, .bf-chip.is-negative, .bf-chip.is-information) {
|
|
4
|
+
--bf-ui-chip-border: var(--bf-color-border-neutral);
|
|
5
|
+
--bf-ui-chip-border-hover: var(--bf-color-border-neutral);
|
|
6
|
+
--bf-ui-chip-border-active: var(--bf-color-border-neutral);
|
|
7
|
+
--bf-ui-chip-background: var(--bf-color-background-neutral-default);
|
|
8
|
+
--bf-ui-chip-background-hover: var(--bf-color-background-neutral-hover);
|
|
9
|
+
--bf-ui-chip-background-active: var(--bf-color-background-neutral-active);
|
|
10
|
+
${bodyTypeStyles} align-items: baseline;
|
|
11
|
+
background-color: var(--bf-ui-chip-background);
|
|
12
|
+
border: var(--bf-border-width) solid var(--bf-ui-chip-border);
|
|
13
|
+
border-radius: 1rem;
|
|
14
|
+
color: var(--bf-color-text-default);
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
gap: 0;
|
|
17
|
+
inline-size: fit-content;
|
|
18
|
+
justify-self: start;
|
|
19
|
+
margin: 0 var(--bf-ui-chip-padding-inline) var(--bf-single-line-row-margin-block-end) 0;
|
|
20
|
+
max-inline-size: 100%;
|
|
21
|
+
padding-block: var(--bf-single-line-row-padding-block);
|
|
22
|
+
padding-inline: max(0rem, calc(var(--bf-ui-chip-padding-inline) - var(--bf-border-width)));
|
|
23
|
+
position: relative;
|
|
24
|
+
text-decoration: none;
|
|
25
|
+
user-select: none;
|
|
26
|
+
/* Inline-flex exposes the first text child's baseline. The surrounding
|
|
27
|
+
border-aware row contract now matches buttons instead of inventing a
|
|
28
|
+
second chip-only occupied height. */
|
|
29
|
+
vertical-align: baseline;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where(.bf-theme) :where(.bf-chip.is-positive) {
|
|
34
|
+
--bf-ui-chip-border: var(--bf-color-border-positive);
|
|
35
|
+
--bf-ui-chip-border-hover: var(--bf-color-border-positive);
|
|
36
|
+
--bf-ui-chip-border-active: var(--bf-color-border-positive);
|
|
37
|
+
--bf-ui-chip-background: var(--bf-color-background-positive-default);
|
|
38
|
+
--bf-ui-chip-background-hover: var(--bf-color-background-positive-hover);
|
|
39
|
+
--bf-ui-chip-background-active: var(--bf-color-background-positive-active);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where(.bf-theme) :where(.bf-chip.is-caution) {
|
|
43
|
+
--bf-ui-chip-border: var(--bf-color-border-caution);
|
|
44
|
+
--bf-ui-chip-border-hover: var(--bf-color-border-caution);
|
|
45
|
+
--bf-ui-chip-border-active: var(--bf-color-border-caution);
|
|
46
|
+
--bf-ui-chip-background: var(--bf-color-background-caution-default);
|
|
47
|
+
--bf-ui-chip-background-hover: var(--bf-color-background-caution-hover);
|
|
48
|
+
--bf-ui-chip-background-active: var(--bf-color-background-caution-active);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:where(.bf-theme) :where(.bf-chip.is-negative) {
|
|
52
|
+
--bf-ui-chip-border: var(--bf-color-border-negative);
|
|
53
|
+
--bf-ui-chip-border-hover: var(--bf-color-border-negative);
|
|
54
|
+
--bf-ui-chip-border-active: var(--bf-color-border-negative);
|
|
55
|
+
--bf-ui-chip-background: var(--bf-color-background-negative-default);
|
|
56
|
+
--bf-ui-chip-background-hover: var(--bf-color-background-negative-hover);
|
|
57
|
+
--bf-ui-chip-background-active: var(--bf-color-background-negative-active);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:where(.bf-theme) :where(.bf-chip.is-information) {
|
|
61
|
+
--bf-ui-chip-border: var(--bf-color-border-information);
|
|
62
|
+
--bf-ui-chip-border-hover: var(--bf-color-border-information);
|
|
63
|
+
--bf-ui-chip-border-active: var(--bf-color-border-information);
|
|
64
|
+
--bf-ui-chip-background: var(--bf-color-background-information-default);
|
|
65
|
+
--bf-ui-chip-background-hover: var(--bf-color-background-information-hover);
|
|
66
|
+
--bf-ui-chip-background-active: var(--bf-color-background-information-active);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:where(.bf-theme) :where(.bf-chip.is-borderless) {
|
|
70
|
+
--bf-ui-chip-border: transparent;
|
|
71
|
+
--bf-ui-chip-border-hover: transparent;
|
|
72
|
+
--bf-ui-chip-border-active: transparent;
|
|
73
|
+
--bf-ui-chip-background: transparent;
|
|
74
|
+
--bf-ui-chip-background-hover: transparent;
|
|
75
|
+
--bf-ui-chip-background-active: transparent;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:where(.bf-theme) :where(.bf-chip, .bf-chip.is-positive, .bf-chip.is-caution, .bf-chip.is-negative, .bf-chip.is-information):hover {
|
|
79
|
+
background-color: var(--bf-ui-chip-background-hover);
|
|
80
|
+
border-color: var(--bf-ui-chip-border-hover);
|
|
81
|
+
text-decoration: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:where(.bf-theme) :where(.bf-chip, .bf-chip.is-positive, .bf-chip.is-caution, .bf-chip.is-negative, .bf-chip.is-information):is(:active, [aria-pressed='true'], .is-selected) {
|
|
85
|
+
background-color: var(--bf-ui-chip-background-active);
|
|
86
|
+
border-color: var(--bf-ui-chip-border-active);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:where(.bf-theme) :where(.bf-chip-lead, .bf-chip-value) {
|
|
90
|
+
${bodyTypeStyles} color: var(--bf-color-text-default);
|
|
91
|
+
display: inline;
|
|
92
|
+
margin: 0;
|
|
93
|
+
min-inline-size: 0;
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
padding: 0;
|
|
96
|
+
text-overflow: ellipsis;
|
|
97
|
+
vertical-align: baseline;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:where(.bf-theme) :where(.bf-chip-lead) {
|
|
101
|
+
${bodyCaseTypeStyles} color: var(--bf-color-text-muted);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:where(.bf-theme) :where(.bf-chip-lead + .bf-chip-value)::before {
|
|
105
|
+
${bodyTypeStyles} color: var(--bf-color-text-muted);
|
|
106
|
+
color: var(--bf-color-text-muted);
|
|
107
|
+
content: ": ";
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:where(.bf-theme) :where(.bf-badge, .bf-badge.is-negative) {
|
|
111
|
+
${bodyTypeStyles} align-items: center;
|
|
112
|
+
background-color: var(--bf-color-text-default);
|
|
113
|
+
border-radius: 1rem;
|
|
114
|
+
box-sizing: content-box;
|
|
115
|
+
color: var(--bf-color-background-default);
|
|
116
|
+
display: inline-block;
|
|
117
|
+
margin: 0;
|
|
118
|
+
max-inline-size: 4ch;
|
|
119
|
+
min-width: calc(${bodyLineHeight} - (var(--bf-ui-badge-padding-inline) * 2));
|
|
120
|
+
overflow: hidden;
|
|
121
|
+
padding-block: 0;
|
|
122
|
+
padding-inline: var(--bf-ui-badge-padding-inline);
|
|
123
|
+
text-align: center;
|
|
124
|
+
text-indent: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:where(.bf-theme) :where(.bf-badge.is-negative) {
|
|
128
|
+
background-color: var(--bf-color-button-negative-default);
|
|
129
|
+
color: var(--bf-color-button-negative-text);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:where(.bf-theme) :where(.bf-chip, .bf-chip.is-positive, .bf-chip.is-caution, .bf-chip.is-negative, .bf-chip.is-information) :where(.bf-badge, .bf-badge.is-negative) {
|
|
133
|
+
align-self: center;
|
|
134
|
+
margin-inline-end: var(--bf-ui-badge-overhang);
|
|
135
|
+
margin-inline-start: var(--bf-ui-chip-padding-inline);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:where(.bf-theme) :where(.bf-status-label, .bf-status-label.is-positive, .bf-status-label.is-caution, .bf-status-label.is-information, .bf-status-label.is-negative) {
|
|
139
|
+
--bf-ui-status-background: color-mix(in srgb, var(--bf-color-background-alt) 70%, black);
|
|
140
|
+
--bf-ui-status-color: var(--bf-color-button-positive-text);
|
|
141
|
+
background-color: var(--bf-ui-status-background);
|
|
142
|
+
border-block: var(--bf-border-width) solid transparent;
|
|
143
|
+
color: var(--bf-ui-status-color);
|
|
144
|
+
display: inline-block;
|
|
145
|
+
inline-size: fit-content;
|
|
146
|
+
justify-self: start;
|
|
147
|
+
${bodyTypeStyles} margin: 0 0 var(--bf-single-line-row-margin-block-end);
|
|
148
|
+
/* Status paint is physically symmetric and shares the same occupied block
|
|
149
|
+
as a button; typography still comes from the body role. */
|
|
150
|
+
padding-block: var(--bf-single-line-row-padding-block);
|
|
151
|
+
padding-inline: var(--bf-ui-chip-padding-inline);
|
|
152
|
+
text-align: center;
|
|
153
|
+
text-decoration: none;
|
|
154
|
+
white-space: nowrap;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
:where(.bf-theme) :where(.bf-status-label.is-positive) {
|
|
158
|
+
--bf-ui-status-background: var(--bf-color-border-positive);
|
|
159
|
+
--bf-ui-status-color: var(--bf-color-button-positive-text);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:where(.bf-theme) :where(.bf-status-label.is-caution) {
|
|
163
|
+
--bf-ui-status-background: var(--bf-color-border-caution);
|
|
164
|
+
--bf-ui-status-color: #111111;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:where(.bf-theme) :where(.bf-status-label.is-information) {
|
|
168
|
+
--bf-ui-status-background: var(--bf-color-border-information);
|
|
169
|
+
--bf-ui-status-color: var(--bf-color-button-positive-text);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
:where(.bf-theme) :where(.bf-status-label.is-negative) {
|
|
173
|
+
--bf-ui-status-background: var(--bf-color-border-negative);
|
|
174
|
+
--bf-ui-status-color: var(--bf-color-button-negative-text);
|
|
175
|
+
}
|
|
161
176
|
`;
|
|
162
177
|
}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* separate family from the general-purpose `bf-card` primitive.
|
|
4
4
|
*
|
|
5
5
|
* Vanilla -> BF rhythm mapping (Vanilla's spacing unit is 0.5rem):
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
6
|
+
* - 1rem content padding/gap -> `--bf-space-2`.
|
|
7
|
+
* - 0.5rem footer/image spacing -> `--bf-space-1`.
|
|
8
|
+
* - 2rem wrapper separation -> `--bf-space-4`.
|
|
9
|
+
* - 23.75rem vertical minimum -> 48 BF baselines (24rem in editorial), avoiding
|
|
10
10
|
* Vanilla's half-baseline ending while retaining its occupied silhouette.
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
13
|
-
* -
|
|
11
|
+
* - 12rem horizontal/text minimum -> 24 BF baselines.
|
|
12
|
+
* - 22rem eight-column minimum -> 44 BF baselines.
|
|
13
|
+
* - 17.75rem horizontal media width -> 36 BF baselines (18rem in editorial).
|
|
14
14
|
*
|
|
15
15
|
* The root card establishes a named query container. Only descendants change
|
|
16
16
|
* inside container queries; this avoids the invalid query-the-container-itself
|