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
package/dist/css-grid.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function gridCss(): string;
|
|
1
|
+
export declare function gridCss(appScopes?: string[]): string;
|
package/dist/css-grid.js
CHANGED
|
@@ -1,179 +1,189 @@
|
|
|
1
|
-
export function gridCss() {
|
|
1
|
+
export function gridCss(appScopes = [":where(.bf-theme.bf-tier-app)"]) {
|
|
2
2
|
const spanRule = (span, indent = "") => `${indent}:where(.bf-theme) :where(.bf-grid) > :where(.bf-span-${span}) { grid-column: auto / span ${span}; }`;
|
|
3
|
+
const appPageSelectors = appScopes.map(scope => `${scope} :where(.bf-page)`).join(",\n");
|
|
4
|
+
const appGutterSelectors = [...new Set([...appScopes, ":where(.bf-theme.bf-tier-app)"])].join(",\n ");
|
|
5
|
+
const appPageRule = appPageSelectors
|
|
6
|
+
? `${appPageSelectors} {\n max-inline-size: none;\n}`
|
|
7
|
+
: "";
|
|
3
8
|
const baseSpans = [1, 2, 4].map(span => spanRule(span)).join("\n");
|
|
4
9
|
const mediumSpans = [1, 2, 4, 8].map(span => spanRule(span, " ")).join("\n");
|
|
5
10
|
const largeSpans = [1, 2, 4, 8, 16].map(span => spanRule(span, " ")).join("\n");
|
|
6
|
-
return `/* ------------------------------------------------------------------ */
|
|
7
|
-
/* Gutter and margin escalation — viewport-based, all tiers */
|
|
8
|
-
/* Grid spec v0.3 §2.3: gutters set by global viewport breakpoint. */
|
|
9
|
-
/* Baseline Foundry models the spec's
|
|
10
|
-
/* default <
|
|
11
|
-
/* ------------------------------------------------------------------ */
|
|
12
|
-
|
|
13
|
-
:where(.bf-theme) {
|
|
14
|
-
--bf-grid-gap-inline: 1rem;
|
|
15
|
-
--bf-grid-gap-block: 1rem;
|
|
16
|
-
--bf-page-margin: 1rem;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@media (width >= 38.75rem) {
|
|
20
|
-
:where(.bf-theme) {
|
|
21
|
-
--bf-grid-gap-inline: 1.5rem;
|
|
22
|
-
--bf-grid-gap-block: 1.5rem;
|
|
23
|
-
--bf-page-margin: 1.5rem;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@media (width >= 64.75rem) {
|
|
28
|
-
:where(.bf-theme) {
|
|
29
|
-
--bf-grid-gap-inline: 2rem;
|
|
30
|
-
--bf-grid-gap-block: 2rem;
|
|
31
|
-
--bf-page-margin: 2rem;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
--bf-grid-gap-inline: 1.5rem;
|
|
36
|
-
--bf-grid-gap-block: 1.5rem;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:where(.bf-theme) :where(.bf-application),
|
|
40
|
-
:where(.bf-theme):where(.bf-application) {
|
|
41
|
-
--bf-grid-gap-inline: 1.5rem;
|
|
42
|
-
--bf-grid-gap-block: 1.5rem;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* ------------------------------------------------------------------ */
|
|
47
|
-
/* Container query contexts */
|
|
48
|
-
/* */
|
|
49
|
-
/* All tiers use container queries for column switching. In editorial */
|
|
50
|
-
/* and docs, .bf-page is the single grid container — centered and */
|
|
51
|
-
/* capped at --bf-content-max-width — so the container width mirrors */
|
|
52
|
-
/* the viewport (spec §3: "viewport-based grid"). In app tier, */
|
|
53
|
-
/* .bf-page is fluid (no max-width) and multiple concurrent containers */
|
|
54
|
-
/* can each establish their own grid context (spec §5). */
|
|
55
|
-
/* ------------------------------------------------------------------ */
|
|
56
|
-
|
|
57
|
-
:where(.bf-theme) :where(.bf-page, .bf-grid-scope, .bf-section, .bf-strip, .bf-fixed-width, .bf-panel-content, .bf-accordion-panel, .bf-main, .bf-aside),
|
|
58
|
-
:where(.bf-theme):where(.bf-page, .bf-grid-scope, .bf-section, .bf-strip, .bf-fixed-width, .bf-panel-content, .bf-accordion-panel, .bf-main, .bf-aside) {
|
|
59
|
-
container-type: inline-size;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/* ------------------------------------------------------------------ */
|
|
63
|
-
/* Page-level layout */
|
|
64
|
-
/* Editorial/docs: centered + max-width (spec §3.2) */
|
|
65
|
-
/* App: fluid edge-to-edge (spec §5.2) */
|
|
66
|
-
/* ------------------------------------------------------------------ */
|
|
67
|
-
|
|
68
|
-
:where(.bf-theme) :where(.bf-fixed-width) {
|
|
69
|
-
margin-inline: auto;
|
|
70
|
-
max-inline-size: var(--bf-content-max-width);
|
|
71
|
-
padding-inline: max(var(--bf-page-margin), var(--bf-content-padding-inline));
|
|
72
|
-
width: 100%;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/* Keep a capped content row at the logical start of a wider panel. */
|
|
76
|
-
:where(.bf-theme) :where(.bf-fixed-width.is-start-aligned) {
|
|
77
|
-
margin-inline-end: auto;
|
|
78
|
-
margin-inline-start: 0;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
min-
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
:where(.bf-theme) :where(.bf-grid
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls)
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
11
|
+
return `/* ------------------------------------------------------------------ */
|
|
12
|
+
/* Gutter and margin escalation — viewport-based, all tiers */
|
|
13
|
+
/* Grid spec v0.3 §2.3: gutters set by global viewport breakpoint. */
|
|
14
|
+
/* Baseline Foundry models the spec's 28.75rem x-small row as part of the */
|
|
15
|
+
/* default <38.75rem bracket because the values do not change at 28.75rem. */
|
|
16
|
+
/* ------------------------------------------------------------------ */
|
|
17
|
+
|
|
18
|
+
:where(.bf-theme) {
|
|
19
|
+
--bf-grid-gap-inline: 1rem;
|
|
20
|
+
--bf-grid-gap-block: 1rem;
|
|
21
|
+
--bf-page-margin: 1rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media (width >= 38.75rem) {
|
|
25
|
+
:where(.bf-theme) {
|
|
26
|
+
--bf-grid-gap-inline: 1.5rem;
|
|
27
|
+
--bf-grid-gap-block: 1.5rem;
|
|
28
|
+
--bf-page-margin: 1.5rem;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media (width >= 64.75rem) {
|
|
33
|
+
:where(.bf-theme) {
|
|
34
|
+
--bf-grid-gap-inline: 2rem;
|
|
35
|
+
--bf-grid-gap-block: 2rem;
|
|
36
|
+
--bf-page-margin: 2rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
${appGutterSelectors} {
|
|
40
|
+
--bf-grid-gap-inline: 1.5rem;
|
|
41
|
+
--bf-grid-gap-block: 1.5rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:where(.bf-theme) :where(.bf-application),
|
|
45
|
+
:where(.bf-theme):where(.bf-application) {
|
|
46
|
+
--bf-grid-gap-inline: 1.5rem;
|
|
47
|
+
--bf-grid-gap-block: 1.5rem;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* ------------------------------------------------------------------ */
|
|
52
|
+
/* Container query contexts */
|
|
53
|
+
/* */
|
|
54
|
+
/* All tiers use container queries for column switching. In editorial */
|
|
55
|
+
/* and docs, .bf-page is the single grid container — centered and */
|
|
56
|
+
/* capped at --bf-content-max-width — so the container width mirrors */
|
|
57
|
+
/* the viewport (spec §3: "viewport-based grid"). In app tier, */
|
|
58
|
+
/* .bf-page is fluid (no max-width) and multiple concurrent containers */
|
|
59
|
+
/* can each establish their own grid context (spec §5). */
|
|
60
|
+
/* ------------------------------------------------------------------ */
|
|
61
|
+
|
|
62
|
+
:where(.bf-theme) :where(.bf-page, .bf-grid-scope, .bf-section, .bf-strip, .bf-fixed-width, .bf-panel-content, .bf-accordion-panel, .bf-main, .bf-aside),
|
|
63
|
+
:where(.bf-theme):where(.bf-page, .bf-grid-scope, .bf-section, .bf-strip, .bf-fixed-width, .bf-panel-content, .bf-accordion-panel, .bf-main, .bf-aside) {
|
|
64
|
+
container-type: inline-size;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* ------------------------------------------------------------------ */
|
|
68
|
+
/* Page-level layout */
|
|
69
|
+
/* Editorial/docs: centered + max-width (spec §3.2) */
|
|
70
|
+
/* App: fluid edge-to-edge (spec §5.2) */
|
|
71
|
+
/* ------------------------------------------------------------------ */
|
|
72
|
+
|
|
73
|
+
:where(.bf-theme) :where(.bf-fixed-width) {
|
|
74
|
+
margin-inline: auto;
|
|
75
|
+
max-inline-size: var(--bf-content-max-width);
|
|
76
|
+
padding-inline: max(var(--bf-page-margin), var(--bf-content-padding-inline));
|
|
77
|
+
width: 100%;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Keep a capped content row at the logical start of a wider panel. */
|
|
81
|
+
:where(.bf-theme) :where(.bf-fixed-width.is-start-aligned) {
|
|
82
|
+
margin-inline-end: auto;
|
|
83
|
+
margin-inline-start: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
${appPageRule}
|
|
87
|
+
|
|
88
|
+
:where(.bf-theme) :where(.bf-panel-content, .bf-accordion-panel) :where(.bf-fixed-width) {
|
|
89
|
+
padding-inline: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:where(.bf-theme) :where(.bf-grid) :where(.bf-fixed-width) {
|
|
93
|
+
padding-inline: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* A page is the outer grid row and therefore owns its horizontal gutter.
|
|
97
|
+
* Fixed-width regions nested anywhere inside it retain their cap and
|
|
98
|
+
* centering behavior without introducing a second page inset. */
|
|
99
|
+
:where(.bf-theme) :where(.bf-page) :where(.bf-fixed-width) {
|
|
100
|
+
padding-inline: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* ------------------------------------------------------------------ */
|
|
104
|
+
/* Grid base — 4 columns, all tiers */
|
|
105
|
+
/* ------------------------------------------------------------------ */
|
|
106
|
+
|
|
107
|
+
:where(.bf-theme) :where(.bf-grid) {
|
|
108
|
+
--bf-grid-columns: 4;
|
|
109
|
+
display: grid;
|
|
110
|
+
/* bf-grid keeps row-gap at 0; the block token stays available for */
|
|
111
|
+
/* two-dimensional layouts and other structural layout-gap cases. */
|
|
112
|
+
gap: 0 var(--bf-grid-gap-inline);
|
|
113
|
+
grid-template-columns: repeat(var(--bf-grid-columns), minmax(0, 1fr));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:where(.bf-theme) :where(ul.bf-grid, ol.bf-grid) {
|
|
117
|
+
list-style: none;
|
|
118
|
+
margin: 0;
|
|
119
|
+
padding: 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
:where(.bf-theme) :where(.bf-grid.is-guide) > * {
|
|
123
|
+
background: color-mix(in srgb, var(--bf-color-accent) 18%, var(--bf-color-background-default));
|
|
124
|
+
box-shadow: inset 0 0 0 0.0625rem color-mix(in srgb, var(--bf-color-accent) 50%, var(--bf-color-rule));
|
|
125
|
+
min-block-size: calc(var(--bf-baseline) * 4);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:where(.bf-theme) :where(.bf-grid) > * {
|
|
129
|
+
grid-column: auto / span var(--bf-grid-columns);
|
|
130
|
+
min-inline-size: 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) {
|
|
134
|
+
container-type: inline-size;
|
|
135
|
+
gap: var(--bf-field-gap);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control, .bf-grid-item.is-control-pair) {
|
|
139
|
+
grid-column: auto / span 4;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
${baseSpans}
|
|
143
|
+
|
|
144
|
+
/* ------------------------------------------------------------------ */
|
|
145
|
+
/* Container-based column switching — all tiers */
|
|
146
|
+
/* Editorial/docs containers are .bf-page (centered, max-width), so */
|
|
147
|
+
/* container width tracks viewport. App containers can be any layout */
|
|
148
|
+
/* region (panels, drawers, main area). */
|
|
149
|
+
/* ------------------------------------------------------------------ */
|
|
150
|
+
|
|
151
|
+
@container (width >= 38.75rem) {
|
|
152
|
+
:where(.bf-theme) :where(.bf-grid) {
|
|
153
|
+
--bf-grid-columns: 8;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control) {
|
|
157
|
+
grid-column: auto / span 2;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control-pair) {
|
|
161
|
+
grid-column: auto / span 4;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
${mediumSpans}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@container (width >= 105.0625rem) {
|
|
168
|
+
:where(.bf-theme) :where(.bf-grid) {
|
|
169
|
+
--bf-grid-columns: 16;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control) {
|
|
173
|
+
grid-column: auto / span 4;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control-pair) {
|
|
177
|
+
grid-column: auto / span 8;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
${largeSpans}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* Full span follows every generated numbered-span rule so normal cascade
|
|
184
|
+
* order is sufficient; consumers never need cascade escalation. */
|
|
185
|
+
:where(.bf-theme) :where(.bf-grid) > :where(.bf-span-full) {
|
|
186
|
+
grid-column: 1 / -1;
|
|
187
|
+
}
|
|
178
188
|
`;
|
|
179
189
|
}
|