@genesislcap/rapid-design-system 15.24.2 → 15.25.1
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/dist/custom-elements.json +150 -150
- package/dist/dts/flexlayout-react-theme/flexlayout-react-theme.generated.d.ts +2 -2
- package/dist/dts/flexlayout-react-theme/flexlayout-react-theme.generated.d.ts.map +1 -1
- package/dist/dts/react.d.ts +8 -8
- package/dist/esm/flexlayout-react-theme/flexlayout-react-theme.generated.js +490 -100
- package/dist/esm/flexlayout-react-theme/flexlayout-react.overrides.css +82 -14
- package/dist/react.cjs +5 -5
- package/dist/react.mjs +4 -4
- package/package.json +15 -13
- package/scripts/generate-flexlayout-theme.mjs +65 -10
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
--color-tab-selected-background: var(--accent-fill-rest);
|
|
43
43
|
--color-splitter-drag: var(--accent-fill-rest);
|
|
44
44
|
--color-splitter-hover: var(--accent-fill-hover);
|
|
45
|
+
|
|
46
|
+
--tabgroup-pill-radius: 9999px;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
.flexlayout__tabset-selected,
|
|
@@ -123,29 +125,25 @@
|
|
|
123
125
|
}
|
|
124
126
|
|
|
125
127
|
.flexlayout__tab_button {
|
|
126
|
-
border-right-style: solid;
|
|
127
|
-
border-right-width: var(--tab-rest-border-width, 1px);
|
|
128
|
-
border-right-color: var(--tab-rest-border-color, var(--neutral-stroke-rest));
|
|
129
128
|
padding: 0 calc((12 + var(--design-unit) * 2 * var(--density)) * 1px);
|
|
130
129
|
gap: 8px;
|
|
131
|
-
|
|
132
|
-
&:first-child {
|
|
133
|
-
border-left-style: solid;
|
|
134
|
-
border-left-width: var(--tab-rest-border-width, 1px);
|
|
135
|
-
border-left-color: var(--tab-rest-border-color, var(--neutral-stroke-rest));
|
|
136
|
-
}
|
|
130
|
+
height: 100%;
|
|
137
131
|
}
|
|
138
132
|
|
|
139
133
|
.flexlayout__tab_button--selected {
|
|
140
134
|
position: relative;
|
|
141
135
|
color: var(--accent-foreground-rest) !important;
|
|
142
136
|
background: var(--tab-active-background-color, var(--neutral-layer-card-container));
|
|
137
|
+
|
|
138
|
+
/*
|
|
139
|
+
* Keep this border-* trio: themes that mark selection with an underline rather than a
|
|
140
|
+
* background (corporate sets `--tab-active-border-width: 0 0 2px 0`) have nothing to
|
|
141
|
+
* hang the underline on without it. Defaults to 0 because the spacers now draw the
|
|
142
|
+
* separators — the old `0 1px 0 0` default would double up against them.
|
|
143
|
+
*/
|
|
143
144
|
border-style: solid;
|
|
144
|
-
border-width: var(--tab-active-border-width, 0
|
|
145
|
+
border-width: var(--tab-active-border-width, 0);
|
|
145
146
|
border-color: var(--tab-active-border-color, var(--neutral-stroke-rest));
|
|
146
|
-
.flexlayout__tab_button_content {
|
|
147
|
-
font-weight: 700;
|
|
148
|
-
}
|
|
149
147
|
}
|
|
150
148
|
|
|
151
149
|
.flexlayout__tab {
|
|
@@ -166,8 +164,29 @@
|
|
|
166
164
|
}
|
|
167
165
|
}
|
|
168
166
|
|
|
169
|
-
|
|
167
|
+
/*
|
|
168
|
+
* Tab separators live on flexlayout's own spacer elements, not as borders on the tab
|
|
169
|
+
* buttons. flexlayout emits a spacer before every tab, group pill and end marker, plus a
|
|
170
|
+
* trailing one, and every spacer carries `_tab_spacer` — `_tab_divider` is an extra class
|
|
171
|
+
* on just the subset sitting between two tabs. Styling `_tab_spacer` therefore covers the
|
|
172
|
+
* dividers too, and separates every element in the strip including the leading and
|
|
173
|
+
* trailing edges. It also needs no positional selectors: the previous rule bordered the
|
|
174
|
+
* buttons and reached the leading edge via `:nth-of-type(2)`, which assumed exactly one
|
|
175
|
+
* leading spacer, and a leading group pill or `tabGroupType: 'splitpill'` pushes more.
|
|
176
|
+
*
|
|
177
|
+
* Driven by the same `--tab-rest-border-*` tokens the buttons used before, so the
|
|
178
|
+
* separators stay consistent with rapid-tabs (tabs.styles.ts) and foundation-layout
|
|
179
|
+
* (layout.styles.ts), which read the same pair. Set `--tab-rest-border-color: transparent`
|
|
180
|
+
* (or `--tab-rest-border-width: 0`) to hide them.
|
|
181
|
+
*
|
|
182
|
+
* `align-self: stretch` is required because the tab container centres its items, so the
|
|
183
|
+
* spacer would otherwise collapse to its content height and the line would not show.
|
|
184
|
+
*/
|
|
185
|
+
.flexlayout__tabset_tab_spacer {
|
|
186
|
+
align-self: stretch;
|
|
170
187
|
width: 0;
|
|
188
|
+
border-left: var(--tab-rest-border-width, 1px) solid
|
|
189
|
+
var(--tab-rest-border-color, var(--neutral-stroke-rest));
|
|
171
190
|
}
|
|
172
191
|
|
|
173
192
|
.flexlayout__tab_button_trailing {
|
|
@@ -249,3 +268,52 @@
|
|
|
249
268
|
left: 8px;
|
|
250
269
|
right: 8px;
|
|
251
270
|
}
|
|
271
|
+
|
|
272
|
+
.flexlayout__mini_scrollbar_container {
|
|
273
|
+
height: 100%;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.flexlayout__group_pill {
|
|
277
|
+
margin: 2px 0 2px 8px;
|
|
278
|
+
height: calc(100% - 12px);
|
|
279
|
+
font-size: 11px;
|
|
280
|
+
+ .flexlayout__tabset_tab_spacer {
|
|
281
|
+
display: none;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.flexlayout__group_pill_collapsed {
|
|
286
|
+
margin: 2px 8px;
|
|
287
|
+
+ .flexlayout__tabset_tab_spacer {
|
|
288
|
+
display: block;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.flexlayout__group_end_marker {
|
|
293
|
+
margin: 2px 8px 2px 0;
|
|
294
|
+
height: calc(100% - 12px);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.flexlayout__tab_button_grouped {
|
|
298
|
+
&.flexlayout__tab_button {
|
|
299
|
+
border-right: 0;
|
|
300
|
+
height: auto;
|
|
301
|
+
padding: 0 8px;
|
|
302
|
+
height: calc(100% - 12px);
|
|
303
|
+
border-top: 1px solid var(--neutral-stroke-rest);
|
|
304
|
+
border-bottom: 1px solid var(--neutral-stroke-rest);
|
|
305
|
+
border-right: 1px solid var(--neutral-stroke-rest);
|
|
306
|
+
.flexlayout__tab_button_content {
|
|
307
|
+
font-size: 11px;
|
|
308
|
+
}
|
|
309
|
+
+ .flexlayout__tabset_tab_divider {
|
|
310
|
+
display: none;
|
|
311
|
+
}
|
|
312
|
+
+ .flexlayout__tabset_tab_spacer {
|
|
313
|
+
display: none;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
&.flexlayout__tab_button--selected {
|
|
317
|
+
border: 0;
|
|
318
|
+
}
|
|
319
|
+
}
|
package/dist/react.cjs
CHANGED
|
@@ -104,14 +104,14 @@ const Accordion = React.forwardRef(function Accordion(props, ref) {
|
|
|
104
104
|
return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
|
|
105
105
|
});
|
|
106
106
|
|
|
107
|
-
const
|
|
107
|
+
const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
|
|
108
108
|
const { children, ...rest } = props;
|
|
109
|
-
return React.createElement(customElements.getName(
|
|
109
|
+
return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
-
const
|
|
112
|
+
const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
|
|
113
113
|
const { children, ...rest } = props;
|
|
114
|
-
return React.createElement(customElements.getName(
|
|
114
|
+
return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
|
|
@@ -1000,8 +1000,8 @@ const SystemHealthOverlay = React.forwardRef(function SystemHealthOverlay(props,
|
|
|
1000
1000
|
|
|
1001
1001
|
module.exports = {
|
|
1002
1002
|
Accordion,
|
|
1003
|
-
ActionsMenu,
|
|
1004
1003
|
AccordionItem,
|
|
1004
|
+
ActionsMenu,
|
|
1005
1005
|
AiCriteriaSearch,
|
|
1006
1006
|
AiIndicator,
|
|
1007
1007
|
Anchor,
|
package/dist/react.mjs
CHANGED
|
@@ -102,14 +102,14 @@ export const Accordion = React.forwardRef(function Accordion(props, ref) {
|
|
|
102
102
|
return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
|
|
103
103
|
});
|
|
104
104
|
|
|
105
|
-
export const
|
|
105
|
+
export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
|
|
106
106
|
const { children, ...rest } = props;
|
|
107
|
-
return React.createElement(customElements.getName(
|
|
107
|
+
return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
-
export const
|
|
110
|
+
export const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
|
|
111
111
|
const { children, ...rest } = props;
|
|
112
|
-
return React.createElement(customElements.getName(
|
|
112
|
+
return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
|
|
113
113
|
});
|
|
114
114
|
|
|
115
115
|
export const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/rapid-design-system",
|
|
3
3
|
"description": "Rapid Design System",
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.25.1",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"dev:rollup": "genx dev -b rollup",
|
|
25
25
|
"dev:tsc": "genx dev -b ts",
|
|
26
26
|
"flexlayout:generate": "node ./scripts/generate-flexlayout-theme.mjs",
|
|
27
|
+
"flexlayout:generate:watch": "node ./scripts/generate-flexlayout-theme.mjs --watch",
|
|
28
|
+
"dev:assets": "npm run flexlayout:generate:watch",
|
|
27
29
|
"lint": "genx lint -l ox",
|
|
28
30
|
"lint:fix": "genx lint -l ox --fix",
|
|
29
31
|
"test": "genx test",
|
|
@@ -38,17 +40,17 @@
|
|
|
38
40
|
},
|
|
39
41
|
"devDependencies": {
|
|
40
42
|
"@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
|
|
41
|
-
"@genesislcap/foundation-testing": "15.
|
|
42
|
-
"@genesislcap/genx": "15.
|
|
43
|
-
"@genesislcap/rollup-builder": "15.
|
|
44
|
-
"@genesislcap/ts-builder": "15.
|
|
45
|
-
"@genesislcap/uvu-playwright-builder": "15.
|
|
46
|
-
"@genesislcap/vite-builder": "15.
|
|
47
|
-
"@genesislcap/webpack-builder": "15.
|
|
48
|
-
"flexlayout-react": "^0.8
|
|
43
|
+
"@genesislcap/foundation-testing": "15.25.1",
|
|
44
|
+
"@genesislcap/genx": "15.25.1",
|
|
45
|
+
"@genesislcap/rollup-builder": "15.25.1",
|
|
46
|
+
"@genesislcap/ts-builder": "15.25.1",
|
|
47
|
+
"@genesislcap/uvu-playwright-builder": "15.25.1",
|
|
48
|
+
"@genesislcap/vite-builder": "15.25.1",
|
|
49
|
+
"@genesislcap/webpack-builder": "15.25.1",
|
|
50
|
+
"flexlayout-react": "^0.10.8"
|
|
49
51
|
},
|
|
50
52
|
"peerDependencies": {
|
|
51
|
-
"flexlayout-react": "^0.8
|
|
53
|
+
"flexlayout-react": "^0.10.8"
|
|
52
54
|
},
|
|
53
55
|
"peerDependenciesMeta": {
|
|
54
56
|
"flexlayout-react": {
|
|
@@ -56,9 +58,9 @@
|
|
|
56
58
|
}
|
|
57
59
|
},
|
|
58
60
|
"dependencies": {
|
|
59
|
-
"@genesislcap/foundation-logger": "15.
|
|
60
|
-
"@genesislcap/foundation-ui": "15.
|
|
61
|
-
"@genesislcap/foundation-utils": "15.
|
|
61
|
+
"@genesislcap/foundation-logger": "15.25.1",
|
|
62
|
+
"@genesislcap/foundation-ui": "15.25.1",
|
|
63
|
+
"@genesislcap/foundation-utils": "15.25.1",
|
|
62
64
|
"@microsoft/fast-colors": "5.3.1",
|
|
63
65
|
"@microsoft/fast-components": "2.30.6",
|
|
64
66
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -18,13 +18,14 @@
|
|
|
18
18
|
* Usage:
|
|
19
19
|
* node scripts/generate-flexlayout-theme.mjs # write the generated file
|
|
20
20
|
* node scripts/generate-flexlayout-theme.mjs --check # exit 1 if the file is stale
|
|
21
|
+
* node scripts/generate-flexlayout-theme.mjs --watch # rewrite it on every overrides save
|
|
21
22
|
*
|
|
22
23
|
* The package `build` runs this in write mode, so a flexlayout-react version bump that is
|
|
23
24
|
* not accompanied by a regenerated theme leaves the working tree dirty and fails CI's
|
|
24
25
|
* "Check working tree" gate — turning silent, per-app drift into one loud build failure.
|
|
25
26
|
*/
|
|
26
|
-
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
27
|
-
import { dirname, join, resolve } from 'node:path';
|
|
27
|
+
import { existsSync, readFileSync, watch, writeFileSync } from 'node:fs';
|
|
28
|
+
import { basename, dirname, join, resolve } from 'node:path';
|
|
28
29
|
import { fileURLToPath } from 'node:url';
|
|
29
30
|
|
|
30
31
|
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
@@ -118,11 +119,66 @@ export const FLEXLAYOUT_REACT_THEME_CSS = \`${escapeForTemplateLiteral(merged)}\
|
|
|
118
119
|
`;
|
|
119
120
|
}
|
|
120
121
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Regenerate the file, writing only when the content actually changes.
|
|
124
|
+
* @returns {boolean} whether the file on disk was rewritten
|
|
125
|
+
*/
|
|
126
|
+
function generate() {
|
|
127
|
+
const next = buildGeneratedFile();
|
|
128
|
+
const current = existsSync(outPath) ? readFileSync(outPath, 'utf8') : '';
|
|
129
|
+
if (next === current) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
writeFileSync(outPath, next);
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Rewrite the generated theme on every save of the overrides stylesheet, so a CSS edit reaches
|
|
138
|
+
* a running dev server: the regenerated `.ts` is what the package's `tsc -b -w` watches, and its
|
|
139
|
+
* rebuilt `dist` output is what the app's bundler hot reloads.
|
|
140
|
+
*
|
|
141
|
+
* Watches the containing directory rather than the file itself, because editors that save
|
|
142
|
+
* atomically (write a temp file, then rename over the original) replace the inode, which
|
|
143
|
+
* silently deafens a single-file watch after the first save.
|
|
144
|
+
*/
|
|
145
|
+
function watchOverrides() {
|
|
146
|
+
/** Coalesce the burst of events an editor fires for a single save. */
|
|
147
|
+
const debounceMs = 50;
|
|
148
|
+
const dir = dirname(overridesPath);
|
|
149
|
+
const target = basename(overridesPath);
|
|
150
|
+
let timer;
|
|
124
151
|
|
|
125
|
-
|
|
152
|
+
const regenerate = () => {
|
|
153
|
+
const time = new Date().toLocaleTimeString();
|
|
154
|
+
try {
|
|
155
|
+
console.log(
|
|
156
|
+
generate()
|
|
157
|
+
? `${time} - Regenerated flexlayout-react theme.`
|
|
158
|
+
: `${time} - flexlayout-react theme unchanged.`,
|
|
159
|
+
);
|
|
160
|
+
} catch (error) {
|
|
161
|
+
// A transient read (a half-written save) must not kill the watcher.
|
|
162
|
+
console.error(`${time} - ${error instanceof Error ? error.message : error}`);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
watch(dir, (_event, filename) => {
|
|
167
|
+
// Ignore everything else in the directory - notably the generated file this writes.
|
|
168
|
+
if (filename !== target) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
clearTimeout(timer);
|
|
172
|
+
timer = setTimeout(regenerate, debounceMs);
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
regenerate();
|
|
176
|
+
console.log(`Watching ${target} for changes...`);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (process.argv.includes('--check')) {
|
|
180
|
+
const next = buildGeneratedFile();
|
|
181
|
+
const current = existsSync(outPath) ? readFileSync(outPath, 'utf8') : '';
|
|
126
182
|
if (next !== current) {
|
|
127
183
|
console.error(
|
|
128
184
|
'✖ flexlayout-react theme is stale. Run `pnpm --filter @genesislcap/rapid-design-system flexlayout:generate` and commit the result.',
|
|
@@ -130,9 +186,8 @@ if (isCheck) {
|
|
|
130
186
|
process.exit(1);
|
|
131
187
|
}
|
|
132
188
|
console.log('✔ flexlayout-react theme is up to date.');
|
|
133
|
-
} else if (
|
|
134
|
-
|
|
135
|
-
console.log(`✔ Wrote ${outPath}`);
|
|
189
|
+
} else if (process.argv.includes('--watch')) {
|
|
190
|
+
watchOverrides();
|
|
136
191
|
} else {
|
|
137
|
-
console.log('✔ flexlayout-react theme already up to date.');
|
|
192
|
+
console.log(generate() ? `✔ Wrote ${outPath}` : '✔ flexlayout-react theme already up to date.');
|
|
138
193
|
}
|