baseline-foundry 0.1.3
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 +588 -0
- package/config/experiments/ibm-plex-engine-smoke.json +115 -0
- package/config/experiments/ubuntu-engine-smoke.json +115 -0
- package/config/foundation-theme.json +117 -0
- package/config/tiers/app.json +120 -0
- package/config/tiers/documentation.json +120 -0
- package/config/tiers/editorial.json +120 -0
- package/config/tiers/os.json +120 -0
- package/dist/accordion.d.ts +5 -0
- package/dist/accordion.js +32 -0
- package/dist/application-layout.d.ts +4 -0
- package/dist/application-layout.js +181 -0
- package/dist/baseline-grid-overlay.d.ts +5 -0
- package/dist/baseline-grid-overlay.js +50 -0
- package/dist/baseline-grid-theme.d.ts +3 -0
- package/dist/baseline-grid-theme.js +3 -0
- package/dist/baseline-grid.d.ts +7 -0
- package/dist/baseline-grid.js +35 -0
- package/dist/build.d.ts +21 -0
- package/dist/build.js +440 -0
- package/dist/code-snippet.d.ts +6 -0
- package/dist/code-snippet.js +95 -0
- package/dist/contextual-menu.d.ts +4 -0
- package/dist/contextual-menu.js +156 -0
- package/dist/css-app-tier.d.ts +1 -0
- package/dist/css-app-tier.js +77 -0
- package/dist/css-components/article-pagination.d.ts +13 -0
- package/dist/css-components/article-pagination.js +151 -0
- package/dist/css-components/button-actions.d.ts +7 -0
- package/dist/css-components/button-actions.js +165 -0
- package/dist/css-components/cards-options.d.ts +6 -0
- package/dist/css-components/cards-options.js +180 -0
- package/dist/css-components/chip-badge-status.d.ts +10 -0
- package/dist/css-components/chip-badge-status.js +162 -0
- package/dist/css-components/content-card.d.ts +25 -0
- package/dist/css-components/content-card.js +517 -0
- package/dist/css-components/control-row.d.ts +2 -0
- package/dist/css-components/control-row.js +18 -0
- package/dist/css-components/cta-figure-aspect.d.ts +1 -0
- package/dist/css-components/cta-figure-aspect.js +123 -0
- package/dist/css-components/document-navigation.d.ts +13 -0
- package/dist/css-components/document-navigation.js +400 -0
- package/dist/css-components/editorial-content.d.ts +6 -0
- package/dist/css-components/editorial-content.js +52 -0
- package/dist/css-components/icon.d.ts +1 -0
- package/dist/css-components/icon.js +75 -0
- package/dist/css-components/interactive-feedback.d.ts +2 -0
- package/dist/css-components/interactive-feedback.js +230 -0
- package/dist/css-components/interactive-tables.d.ts +7 -0
- package/dist/css-components/interactive-tables.js +164 -0
- package/dist/css-components/linked-logo-site-layout.d.ts +21 -0
- package/dist/css-components/linked-logo-site-layout.js +214 -0
- package/dist/css-components/list-tree.d.ts +5 -0
- package/dist/css-components/list-tree.js +98 -0
- package/dist/css-components/list.d.ts +3 -0
- package/dist/css-components/list.js +119 -0
- package/dist/css-components/logo-media.d.ts +16 -0
- package/dist/css-components/logo-media.js +219 -0
- package/dist/css-components/navigation-layout.d.ts +5 -0
- package/dist/css-components/navigation-layout.js +151 -0
- package/dist/css-components/panel.d.ts +6 -0
- package/dist/css-components/panel.js +148 -0
- package/dist/css-components/search-box-and-filter.d.ts +9 -0
- package/dist/css-components/search-box-and-filter.js +267 -0
- package/dist/css-components/sites-editorial-ports.d.ts +19 -0
- package/dist/css-components/sites-editorial-ports.js +264 -0
- package/dist/css-components/sites-foundation.d.ts +17 -0
- package/dist/css-components/sites-foundation.js +173 -0
- package/dist/css-components/sites-rich-lists.d.ts +18 -0
- package/dist/css-components/sites-rich-lists.js +364 -0
- package/dist/css-components/static-content-ports.d.ts +14 -0
- package/dist/css-components/static-content-ports.js +206 -0
- package/dist/css-components/tab-section.d.ts +19 -0
- package/dist/css-components/tab-section.js +103 -0
- package/dist/css-components/table.d.ts +7 -0
- package/dist/css-components/table.js +79 -0
- package/dist/css-components/tabs-choice-breadcrumbs.d.ts +9 -0
- package/dist/css-components/tabs-choice-breadcrumbs.js +307 -0
- package/dist/css-components/tiered-list-equal-height-row.d.ts +1 -0
- package/dist/css-components/tiered-list-equal-height-row.js +286 -0
- package/dist/css-components.d.ts +2 -0
- package/dist/css-components.js +2701 -0
- package/dist/css-grid.d.ts +1 -0
- package/dist/css-grid.js +179 -0
- package/dist/css.d.ts +6 -0
- package/dist/css.js +431 -0
- package/dist/experiments/ibm-plex-engine-smoke/styles.css +8969 -0
- package/dist/experiments/ibm-plex-engine-smoke/surfaces.json +604 -0
- package/dist/experiments/ibm-plex-engine-smoke/tokens.json +217 -0
- package/dist/in-page-navigation.d.ts +7 -0
- package/dist/in-page-navigation.js +136 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +18 -0
- package/dist/interactive-feedback.d.ts +14 -0
- package/dist/interactive-feedback.js +96 -0
- package/dist/interactive-tables.d.ts +28 -0
- package/dist/interactive-tables.js +184 -0
- package/dist/list-tree.d.ts +4 -0
- package/dist/list-tree.js +44 -0
- package/dist/panel-drawer.d.ts +4 -0
- package/dist/panel-drawer.js +171 -0
- package/dist/presets/app-tier/styles.css +9459 -0
- package/dist/presets/app-tier/surfaces.json +1225 -0
- package/dist/presets/app-tier/tokens.json +221 -0
- package/dist/presets/prose/styles.css +9442 -0
- package/dist/presets/prose/surfaces.json +1225 -0
- package/dist/presets/prose/tokens.json +221 -0
- package/dist/presets.d.ts +6 -0
- package/dist/presets.js +27 -0
- package/dist/range-controls.d.ts +9 -0
- package/dist/range-controls.js +73 -0
- package/dist/resizable-aside.d.ts +4 -0
- package/dist/resizable-aside.js +328 -0
- package/dist/side-navigation.d.ts +4 -0
- package/dist/side-navigation.js +219 -0
- package/dist/styles.css +9442 -0
- package/dist/surfaces.json +1225 -0
- package/dist/tabs.d.ts +4 -0
- package/dist/tabs.js +88 -0
- package/dist/tier-registry.d.ts +10 -0
- package/dist/tier-registry.js +25 -0
- package/dist/tiers/app/styles.css +9459 -0
- package/dist/tiers/app/surfaces.json +1225 -0
- package/dist/tiers/app/tokens.json +221 -0
- package/dist/tiers/documentation/styles.css +9442 -0
- package/dist/tiers/documentation/surfaces.json +1225 -0
- package/dist/tiers/documentation/tokens.json +221 -0
- package/dist/tiers/editorial/styles.css +9442 -0
- package/dist/tiers/editorial/surfaces.json +1225 -0
- package/dist/tiers/editorial/tokens.json +221 -0
- package/dist/tiers/os/styles.css +9442 -0
- package/dist/tiers/os/surfaces.json +1225 -0
- package/dist/tiers/os/tokens.json +221 -0
- package/dist/tokens.json +221 -0
- package/dist/tooltip.d.ts +4 -0
- package/dist/tooltip.js +70 -0
- package/dist/top-navigation.d.ts +4 -0
- package/dist/top-navigation.js +354 -0
- package/dist/types.d.ts +155 -0
- package/dist/types.js +1 -0
- package/dist/vanilla-theme-colors.d.ts +5 -0
- package/dist/vanilla-theme-colors.js +208 -0
- package/docs/publishing.md +66 -0
- package/package.json +108 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static Vanilla parity ports: data spotlight and divided section. The
|
|
3
|
+
* 38.75rem and 64.75rem container thresholds preserve Vanilla's 620px and
|
|
4
|
+
* 1036px composition changes while allowing the patterns to respond to their
|
|
5
|
+
* allocated inline size.
|
|
6
|
+
*
|
|
7
|
+
* Vanilla → BF token mapping:
|
|
8
|
+
* - `$spv--strip-shallow` (1.5rem) → `--bf-section-space-shallow`.
|
|
9
|
+
* - Vanilla grid gutters → `--bf-grid-gap-inline`.
|
|
10
|
+
* - Data-spotlight statistics and headlines → the public `h1` and `h3` roles.
|
|
11
|
+
* The slots own that mapping so consumers do not need companion utility
|
|
12
|
+
* classes to receive correct four-tier typography.
|
|
13
|
+
*/
|
|
14
|
+
export function staticContentPortsCss() {
|
|
15
|
+
return `/* ------------------------------------------------------------------ */
|
|
16
|
+
/* Static content ports — Vanilla data spotlight and divided section. */
|
|
17
|
+
/* Their children retain role-owned rhythm; these layout */
|
|
18
|
+
/* wrappers add only structural columns, rules, and explicit section ends. */
|
|
19
|
+
/* ------------------------------------------------------------------ */
|
|
20
|
+
|
|
21
|
+
/* Data spotlight: Vanilla's equal-height wrap becomes an intrinsic grid.
|
|
22
|
+
Each item begins with a public highlighted rule using the shared emphasis
|
|
23
|
+
thickness. Item padding remains item-owned, so compositions never erase the
|
|
24
|
+
shallow inter-row rhythm when the pattern narrows. */
|
|
25
|
+
:where(.bf-theme) :where(.bf-data-spotlight) {
|
|
26
|
+
container-type: inline-size;
|
|
27
|
+
margin-block-end: var(--bf-section-space);
|
|
28
|
+
min-inline-size: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:where(.bf-theme) :where(.bf-data-spotlight-header) {
|
|
32
|
+
min-inline-size: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where(.bf-theme) :where(.bf-data-spotlight-items) {
|
|
36
|
+
column-gap: var(--bf-grid-gap-inline);
|
|
37
|
+
display: grid;
|
|
38
|
+
grid-template-columns: minmax(0, 1fr);
|
|
39
|
+
min-inline-size: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where(.bf-theme) :where(.bf-data-spotlight-item) {
|
|
43
|
+
min-inline-size: 0;
|
|
44
|
+
overflow-wrap: anywhere;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:where(.bf-theme) :where(.bf-data-spotlight-item:not(:last-child)) {
|
|
48
|
+
padding-block-end: var(--bf-section-space-shallow);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:where(.bf-theme) :where(.bf-data-spotlight-stat) {
|
|
52
|
+
color: var(--bf-color-text-default);
|
|
53
|
+
display: block;
|
|
54
|
+
font-family: var(--bf-h1-font-family);
|
|
55
|
+
font-size: var(--bf-h1-font-size);
|
|
56
|
+
font-style: var(--bf-h1-font-style);
|
|
57
|
+
font-variant-caps: var(--bf-h1-font-variant-caps);
|
|
58
|
+
font-weight: var(--bf-h1-font-weight);
|
|
59
|
+
letter-spacing: var(--bf-h1-letter-spacing);
|
|
60
|
+
line-height: var(--bf-h1-line-height);
|
|
61
|
+
margin-block: 0 var(--bf-h1-margin-bottom);
|
|
62
|
+
overflow-wrap: anywhere;
|
|
63
|
+
padding-block-end: 0;
|
|
64
|
+
padding-block-start: var(--bf-h1-nudge-start);
|
|
65
|
+
text-transform: var(--bf-h1-text-transform);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where(.bf-theme) :where(.bf-data-spotlight-headline) {
|
|
69
|
+
font-family: var(--bf-h3-font-family);
|
|
70
|
+
font-size: var(--bf-h3-font-size);
|
|
71
|
+
font-style: var(--bf-h3-font-style);
|
|
72
|
+
font-variant-caps: var(--bf-h3-font-variant-caps);
|
|
73
|
+
font-weight: var(--bf-h3-font-weight);
|
|
74
|
+
letter-spacing: var(--bf-h3-letter-spacing);
|
|
75
|
+
line-height: var(--bf-h3-line-height);
|
|
76
|
+
margin-block: 0 var(--bf-h3-margin-bottom);
|
|
77
|
+
min-inline-size: 0;
|
|
78
|
+
padding-block-end: 0;
|
|
79
|
+
padding-block-start: var(--bf-h3-nudge-start);
|
|
80
|
+
text-transform: var(--bf-h3-text-transform);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:where(.bf-theme) :where(.bf-data-spotlight-description, .bf-data-spotlight-action) {
|
|
84
|
+
min-inline-size: 0;
|
|
85
|
+
overflow-wrap: anywhere;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:where(.bf-theme) :where(.bf-data-spotlight-action) {
|
|
89
|
+
display: block;
|
|
90
|
+
margin-block: 0 var(--bf-body-margin-bottom);
|
|
91
|
+
padding-block-end: 0;
|
|
92
|
+
padding-block-start: var(--bf-body-nudge-start);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Vanilla's tablet wrap has two equal items per row. For three items the
|
|
96
|
+
in-grid title shares the first row; its first statistic owns the shallow
|
|
97
|
+
row separation. Four items give both first-row statistics that separation. */
|
|
98
|
+
@container (width >= 38.75rem) {
|
|
99
|
+
:where(.bf-theme) :where(.bf-data-spotlight-items) {
|
|
100
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:where(.bf-theme) :where(.bf-data-spotlight-header, .bf-data-spotlight-item) {
|
|
104
|
+
display: grid;
|
|
105
|
+
grid-row: span 5;
|
|
106
|
+
grid-template-rows: subgrid;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:where(.bf-theme) :where(.bf-data-spotlight-item) {
|
|
110
|
+
padding-block-end: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:where(.bf-theme) :where(.bf-data-spotlight.is-three-blocks) :where(.bf-data-spotlight-header) {
|
|
114
|
+
block-size: 0;
|
|
115
|
+
overflow: visible;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:where(.bf-theme) :where(.bf-data-spotlight.is-three-blocks) :where(.bf-data-spotlight-item:first-of-type),
|
|
119
|
+
:where(.bf-theme) :where(.bf-data-spotlight.is-four-blocks) :where(.bf-data-spotlight-item:nth-child(-n + 2)) {
|
|
120
|
+
padding-block-end: var(--bf-section-space-shallow);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* At Vanilla's large threshold the four stat blocks align in one row. Two
|
|
125
|
+
blocks reserve the leading half for the overhanging title; three reserve a
|
|
126
|
+
single leading column. The zero block-size matches Vanilla's height: 0
|
|
127
|
+
title cell without hiding its readable text. */
|
|
128
|
+
@container (width >= 64.75rem) {
|
|
129
|
+
:where(.bf-theme) :where(.bf-data-spotlight-items) {
|
|
130
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
:where(.bf-theme) :where(.bf-data-spotlight.is-two-blocks) :where(.bf-data-spotlight-header) {
|
|
134
|
+
block-size: 0;
|
|
135
|
+
grid-column: span 2;
|
|
136
|
+
overflow: visible;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:where(.bf-theme) :where(.bf-data-spotlight.is-three-blocks) :where(.bf-data-spotlight-item:first-of-type),
|
|
140
|
+
:where(.bf-theme) :where(.bf-data-spotlight.is-four-blocks) :where(.bf-data-spotlight-item:nth-child(-n + 2)) {
|
|
141
|
+
padding-block-end: 0;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Divided section: Vanilla's ruled 50/50 section is a one-column composition
|
|
146
|
+
until the relevant container can support the split. The rule is structural;
|
|
147
|
+
headings, copy, and content items keep their own metric-derived rhythm. */
|
|
148
|
+
:where(.bf-theme) :where(.bf-divided-section) {
|
|
149
|
+
container-type: inline-size;
|
|
150
|
+
margin-block-end: var(--bf-section-space);
|
|
151
|
+
min-inline-size: 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
:where(.bf-theme) :where(.bf-divided-section-layout) {
|
|
155
|
+
display: grid;
|
|
156
|
+
grid-template-columns: minmax(0, 1fr);
|
|
157
|
+
min-inline-size: 0;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:where(.bf-theme) :where(.bf-divided-section-rule) {
|
|
161
|
+
grid-column: 1 / -1;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:where(.bf-theme) :where(.bf-divided-section-header, .bf-divided-section-content) {
|
|
165
|
+
min-inline-size: 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:where(.bf-theme) :where(.bf-divided-section-list) {
|
|
169
|
+
align-content: start;
|
|
170
|
+
display: grid;
|
|
171
|
+
list-style: none;
|
|
172
|
+
margin: 0;
|
|
173
|
+
padding: 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
:where(.bf-theme) :where(.bf-divided-section-item) {
|
|
177
|
+
align-content: start;
|
|
178
|
+
display: grid;
|
|
179
|
+
min-inline-size: 0;
|
|
180
|
+
overflow-wrap: anywhere;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
:where(.bf-theme) :where(.bf-divided-section-item:not(:last-child)) {
|
|
184
|
+
padding-block-end: var(--bf-section-space-shallow);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:where(.bf-theme) :where(.bf-divided-section-item + .bf-divided-section-item) {
|
|
188
|
+
border-block-start: var(--bf-border-width) solid var(--bf-color-border-low-contrast);
|
|
189
|
+
padding-block-start: calc(var(--bf-section-space-shallow) - var(--bf-border-width));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@container (width >= 38.75rem) {
|
|
193
|
+
:where(.bf-theme) :where(.bf-divided-section.is-split-medium) :where(.bf-divided-section-layout) {
|
|
194
|
+
column-gap: var(--bf-grid-gap-inline);
|
|
195
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@container (width >= 64.75rem) {
|
|
200
|
+
:where(.bf-theme) :where(.bf-divided-section) :where(.bf-divided-section-layout) {
|
|
201
|
+
column-gap: var(--bf-grid-gap-inline);
|
|
202
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
`;
|
|
206
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vanilla Sites tab-section as a BF-native composition.
|
|
3
|
+
*
|
|
4
|
+
* This module retains the rendered layout contract from vf_tab_section while
|
|
5
|
+
* deliberately leaving content assembly to HTML and BF's existing tabs
|
|
6
|
+
* runtime. The section never interprets a content-block type: quote, logo,
|
|
7
|
+
* divided-section and basic-section remain independent BF components.
|
|
8
|
+
*
|
|
9
|
+
* Vanilla → BF mapping:
|
|
10
|
+
* - 1036px large-grid switch → the 64.75rem descendant container query.
|
|
11
|
+
* - p-section / shallow / deep → BF section boundary tokens.
|
|
12
|
+
* - the intermediate p-section--shallow before a separate tab rail →
|
|
13
|
+
* padding-block-start on that rail using --bf-section-space-shallow.
|
|
14
|
+
* - 8-column 4/4 and 2/6 spans → intrinsic 1/1 and 1/3 tracks.
|
|
15
|
+
*
|
|
16
|
+
* Heading type and content rhythm remain owned by semantic BF elements. The
|
|
17
|
+
* root establishes the container; every query styles descendants only.
|
|
18
|
+
*/
|
|
19
|
+
export declare function tabSectionCss(): string;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vanilla Sites tab-section as a BF-native composition.
|
|
3
|
+
*
|
|
4
|
+
* This module retains the rendered layout contract from vf_tab_section while
|
|
5
|
+
* deliberately leaving content assembly to HTML and BF's existing tabs
|
|
6
|
+
* runtime. The section never interprets a content-block type: quote, logo,
|
|
7
|
+
* divided-section and basic-section remain independent BF components.
|
|
8
|
+
*
|
|
9
|
+
* Vanilla → BF mapping:
|
|
10
|
+
* - 1036px large-grid switch → the 64.75rem descendant container query.
|
|
11
|
+
* - p-section / shallow / deep → BF section boundary tokens.
|
|
12
|
+
* - the intermediate p-section--shallow before a separate tab rail →
|
|
13
|
+
* padding-block-start on that rail using --bf-section-space-shallow.
|
|
14
|
+
* - 8-column 4/4 and 2/6 spans → intrinsic 1/1 and 1/3 tracks.
|
|
15
|
+
*
|
|
16
|
+
* Heading type and content rhythm remain owned by semantic BF elements. The
|
|
17
|
+
* root establishes the container; every query styles descendants only.
|
|
18
|
+
*/
|
|
19
|
+
export function tabSectionCss() {
|
|
20
|
+
return `/* ------------------------------------------------------------------ */
|
|
21
|
+
/* Sites tab section — structural layout over the existing BF tabs API. */
|
|
22
|
+
/* ------------------------------------------------------------------ */
|
|
23
|
+
|
|
24
|
+
:where(.bf-theme) :where(.bf-tab-section) {
|
|
25
|
+
container-name: bf-tab-section;
|
|
26
|
+
container-type: inline-size;
|
|
27
|
+
margin-block-end: var(--bf-section-space);
|
|
28
|
+
min-inline-size: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:where(.bf-theme) :where(.bf-tab-section.is-shallow) {
|
|
32
|
+
margin-block-end: var(--bf-section-space-shallow);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where(.bf-theme) :where(.bf-tab-section.is-deep) {
|
|
36
|
+
margin-block-end: var(--bf-section-space-deep);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where(.bf-theme) :where(.bf-tab-section-layout) {
|
|
40
|
+
display: grid;
|
|
41
|
+
grid-template-columns: minmax(0, 1fr);
|
|
42
|
+
min-inline-size: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:where(.bf-theme) :where(.bf-tab-section-rule) {
|
|
46
|
+
grid-column: 1 / -1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:where(.bf-theme) :where(.bf-tab-section-header, .bf-tab-section-intro, .bf-tab-section-tabs) {
|
|
50
|
+
min-inline-size: 0;
|
|
51
|
+
overflow-wrap: anywhere;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Vanilla wraps every tab rail except the unadorned 50/50 special case in a
|
|
55
|
+
shallow section. This explicit composition padding does not change any
|
|
56
|
+
child's semantic margins. */
|
|
57
|
+
:where(.bf-theme) :where(.bf-tab-section:not(.is-50-50)) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-tabs),
|
|
58
|
+
:where(.bf-theme) :where(.bf-tab-section.is-50-50) > :where(.bf-tab-section-layout:has(> .bf-tab-section-intro)) > :where(.bf-tab-section-tabs) {
|
|
59
|
+
padding-block-start: var(--bf-section-space-shallow);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@container bf-tab-section (width >= 64.75rem) {
|
|
63
|
+
:where(.bf-theme) :where(.bf-tab-section) > :where(.bf-tab-section-layout) {
|
|
64
|
+
column-gap: var(--bf-grid-gap-inline);
|
|
65
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where(.bf-theme) :where(.bf-tab-section) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-header) {
|
|
69
|
+
grid-column: 1 / -1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* With supporting copy or actions, Vanilla's heading row is 50/50 for all
|
|
73
|
+
three section layouts. The following tab rail retains its own requested
|
|
74
|
+
full, half or three-quarter span. */
|
|
75
|
+
:where(.bf-theme) :where(.bf-tab-section-layout:has(> .bf-tab-section-intro)) > :where(.bf-tab-section-header) {
|
|
76
|
+
grid-column: 1 / 3;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:where(.bf-theme) :where(.bf-tab-section) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-intro) {
|
|
80
|
+
grid-column: 3 / -1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:where(.bf-theme) :where(.bf-tab-section) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-tabs) {
|
|
84
|
+
grid-column: 1 / -1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* An unadorned 50/50 section lets auto-placement put the heading and tabs
|
|
88
|
+
in the same row. If an intro exists, it occupies that right-hand cell and
|
|
89
|
+
the tabs move to the following row, matching the upstream rendering. */
|
|
90
|
+
:where(.bf-theme) :where(.bf-tab-section.is-50-50) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-header) {
|
|
91
|
+
grid-column: 1 / 3;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:where(.bf-theme) :where(.bf-tab-section.is-50-50) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-tabs) {
|
|
95
|
+
grid-column: 3 / -1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:where(.bf-theme) :where(.bf-tab-section.is-25-75) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-tabs) {
|
|
99
|
+
grid-column: 2 / -1;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
`;
|
|
103
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export function tableCss(options) {
|
|
2
|
+
const { bodyLineHeight, bodyMediumTypeStyles, bodyTypeStyles } = options;
|
|
3
|
+
return `:where(.bf-theme) :where(.bf-table-scroll) {
|
|
4
|
+
max-inline-size: 100%;
|
|
5
|
+
min-inline-size: 0;
|
|
6
|
+
overflow-x: auto;
|
|
7
|
+
scrollbar-width: thin;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:where(.bf-theme) :where(.bf-table-scroll) > :where(table, .bf-table) {
|
|
11
|
+
min-inline-size: var(--bf-table-scroll-min-inline-size, 48rem);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where(.bf-theme) :where(table, .bf-table) {
|
|
15
|
+
border: 0;
|
|
16
|
+
border-collapse: separate;
|
|
17
|
+
border-spacing: 0;
|
|
18
|
+
caption-side: bottom;
|
|
19
|
+
line-height: ${bodyLineHeight};
|
|
20
|
+
margin: 0;
|
|
21
|
+
table-layout: auto;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:where(.bf-theme) :where(caption, .bf-table-caption) {
|
|
26
|
+
${bodyTypeStyles} color: var(--bf-color-text-muted);
|
|
27
|
+
margin: 0;
|
|
28
|
+
padding-bottom: calc(var(--bf-baseline) * 0.5);
|
|
29
|
+
padding-top: calc(var(--bf-baseline) * 0.5);
|
|
30
|
+
text-align: left;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where(.bf-theme) :where(th, td) {
|
|
34
|
+
border: 0;
|
|
35
|
+
border-block-end: var(--bf-table-row-border-size) solid transparent;
|
|
36
|
+
color: var(--bf-color-text-default);
|
|
37
|
+
line-height: var(--bf-table-row-line-height);
|
|
38
|
+
margin: 0;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
padding-block: var(--bf-table-row-padding);
|
|
41
|
+
padding-inline: calc(var(--bf-baseline) * 0.75);
|
|
42
|
+
text-align: left;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
vertical-align: top;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:where(.bf-theme) :where(th.is-icon-placeholder, td.is-icon-placeholder, .bf-table-cell.is-icon-placeholder) {
|
|
48
|
+
padding-inline-start: calc((var(--bf-baseline) * 0.75) + var(--bf-leading-icon-size) + var(--bf-leading-icon-gap));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:where(.bf-theme) :where(th.is-icon-placeholder, td.is-icon-placeholder, .bf-table-cell.is-icon-placeholder) > :where(.bf-icon:first-child) {
|
|
52
|
+
--bf-icon-size: var(--bf-leading-icon-size);
|
|
53
|
+
margin-inline-end: var(--bf-leading-icon-gap);
|
|
54
|
+
margin-inline-start: calc((var(--bf-leading-icon-size) + var(--bf-leading-icon-gap)) * -1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:where(.bf-theme) :where(td) {
|
|
58
|
+
font-weight: var(--bf-body-font-weight, 400);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:where(.bf-theme) :where(thead th) {
|
|
62
|
+
${bodyMediumTypeStyles} color: var(--bf-color-text-default);
|
|
63
|
+
border-block-end-color: var(--bf-color-border-default);
|
|
64
|
+
line-height: var(--bf-table-row-line-height);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:where(.bf-theme) :where(tbody tr:not(:last-child) td, tfoot td) {
|
|
68
|
+
border-block-end-color: var(--bf-color-border-low-contrast);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:where(.bf-theme) :where(tbody tr:has(.bf-status-label) > td) {
|
|
72
|
+
padding-block: calc((var(--bf-baseline) - var(--bf-table-row-border-size)) / 2);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:where(.bf-theme) :where(tbody tr:hover td) {
|
|
76
|
+
background: color-mix(in srgb, var(--bf-color-background-hover) 68%, transparent);
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
79
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type TabsChoiceBreadcrumbsCssOptions = {
|
|
2
|
+
bodyCaseTypeStyles: string;
|
|
3
|
+
bodyStrongTypeStyles: string;
|
|
4
|
+
bodyTypeStyles: string;
|
|
5
|
+
buttonMarginBottom: string;
|
|
6
|
+
buttonPadding: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function tabsChoiceBreadcrumbsCss(options: TabsChoiceBreadcrumbsCssOptions): string;
|
|
9
|
+
export {};
|