@genesislcap/rapid-design-system 15.25.0 → 15.26.0

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.
@@ -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 1px 0 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
- .flexlayout__tabset_tab_divider {
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
@@ -99,11 +99,6 @@ function _mergeRefs(...refs) {
99
99
  };
100
100
  }
101
101
 
102
- const Accordion = React.forwardRef(function Accordion(props, ref) {
103
- const { children, ...rest } = props;
104
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
105
- });
106
-
107
102
  const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
108
103
  const { children, ...rest } = props;
109
104
  return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
@@ -141,6 +136,11 @@ const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
141
136
  return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
142
137
  });
143
138
 
139
+ const Accordion = React.forwardRef(function Accordion(props, ref) {
140
+ const { children, ...rest } = props;
141
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
142
+ });
143
+
144
144
  const Anchor = React.forwardRef(function Anchor(props, ref) {
145
145
  const { children, ...rest } = props;
146
146
  return React.createElement(customElements.getName(AnchorWC) ?? '%%prefix%%-anchor', { ...rest, ref }, children);
@@ -999,11 +999,11 @@ const SystemHealthOverlay = React.forwardRef(function SystemHealthOverlay(props,
999
999
  });
1000
1000
 
1001
1001
  module.exports = {
1002
- Accordion,
1003
1002
  AccordionItem,
1004
1003
  ActionsMenu,
1005
1004
  AiCriteriaSearch,
1006
1005
  AiIndicator,
1006
+ Accordion,
1007
1007
  Anchor,
1008
1008
  AnchoredRegion,
1009
1009
  Avatar,
package/dist/react.mjs CHANGED
@@ -97,11 +97,6 @@ function _mergeRefs(...refs) {
97
97
  };
98
98
  }
99
99
 
100
- export const Accordion = React.forwardRef(function Accordion(props, ref) {
101
- const { children, ...rest } = props;
102
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
103
- });
104
-
105
100
  export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
106
101
  const { children, ...rest } = props;
107
102
  return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
@@ -139,6 +134,11 @@ export const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
139
134
  return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
140
135
  });
141
136
 
137
+ export const Accordion = React.forwardRef(function Accordion(props, ref) {
138
+ const { children, ...rest } = props;
139
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
140
+ });
141
+
142
142
  export const Anchor = React.forwardRef(function Anchor(props, ref) {
143
143
  const { children, ...rest } = props;
144
144
  return React.createElement(customElements.getName(AnchorWC) ?? '%%prefix%%-anchor', { ...rest, ref }, children);
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.25.0",
4
+ "version": "15.26.0",
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.25.0",
42
- "@genesislcap/genx": "15.25.0",
43
- "@genesislcap/rollup-builder": "15.25.0",
44
- "@genesislcap/ts-builder": "15.25.0",
45
- "@genesislcap/uvu-playwright-builder": "15.25.0",
46
- "@genesislcap/vite-builder": "15.25.0",
47
- "@genesislcap/webpack-builder": "15.25.0",
48
- "flexlayout-react": "^0.8.19"
43
+ "@genesislcap/foundation-testing": "15.26.0",
44
+ "@genesislcap/genx": "15.26.0",
45
+ "@genesislcap/rollup-builder": "15.26.0",
46
+ "@genesislcap/ts-builder": "15.26.0",
47
+ "@genesislcap/uvu-playwright-builder": "15.26.0",
48
+ "@genesislcap/vite-builder": "15.26.0",
49
+ "@genesislcap/webpack-builder": "15.26.0",
50
+ "flexlayout-react": "^0.10.8"
49
51
  },
50
52
  "peerDependencies": {
51
- "flexlayout-react": "^0.8.19"
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.25.0",
60
- "@genesislcap/foundation-ui": "15.25.0",
61
- "@genesislcap/foundation-utils": "15.25.0",
61
+ "@genesislcap/foundation-logger": "15.26.0",
62
+ "@genesislcap/foundation-ui": "15.26.0",
63
+ "@genesislcap/foundation-utils": "15.26.0",
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
- const isCheck = process.argv.includes('--check');
122
- const next = buildGeneratedFile();
123
- const current = existsSync(outPath) ? readFileSync(outPath, 'utf8') : '';
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
- if (isCheck) {
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 (next !== current) {
134
- writeFileSync(outPath, next);
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
  }