@genesislcap/rapid-design-system 14.482.0 → 14.482.1-FUI-2575.2

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.
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Compiles a modal theme file into class-scoped CSS (native nesting) for deployment.
3
+ *
4
+ * customTokens -> custom-property declarations
5
+ * componentOverrides -> nested rules keyed by any selector (::part(), a host tag, a class)
6
+ *
7
+ * Everything nests under one `rapid-design-system-provider` root. `shared` lives
8
+ * at the root (applies in every mode); each mode is a nested `&.theme-<name>`
9
+ * block whose compound selector out-specifies the root, so mode values win.
10
+ *
11
+ * design_tokens are NOT emitted: they are FAST recipe *inputs* consumed in JS
12
+ * (accent, luminance), applied at runtime via setValueFor (see modal-theme.ts).
13
+ *
14
+ * @public
15
+ */
16
+ const HOST = 'rapid-design-system-provider';
17
+ const props = (map, pad) => Object.entries(map)
18
+ .map(([k, v]) => `${pad}${k}: ${v};`)
19
+ .join('\n');
20
+ const overrideRules = (overrides, pad) => Object.entries(overrides)
21
+ .map(([sel, decls]) => `${pad}${sel} {\n${props(decls, pad + ' ')}\n${pad}}`)
22
+ .join('\n\n');
23
+ const section = (obj, pad) => {
24
+ var _a, _b;
25
+ const out = [];
26
+ if (Object.keys((_a = obj.customTokens) !== null && _a !== void 0 ? _a : {}).length)
27
+ out.push(props(obj.customTokens, pad));
28
+ if (Object.keys((_b = obj.componentOverrides) !== null && _b !== void 0 ? _b : {}).length)
29
+ out.push(overrideRules(obj.componentOverrides, pad));
30
+ return out.join('\n\n');
31
+ };
32
+ /**
33
+ * Compile a modal theme into class-scoped nested CSS.
34
+ *
35
+ * @param theme - the modal theme (shared + modes; customTokens + componentOverrides).
36
+ * @param host - the selector the rules nest under (default `rapid-design-system-provider`).
37
+ * @public
38
+ */
39
+ export function compileTheme(theme, { host = HOST } = {}) {
40
+ var _a, _b;
41
+ const body = [];
42
+ const shared = section((_a = theme.shared) !== null && _a !== void 0 ? _a : {}, ' ');
43
+ if (shared)
44
+ body.push(shared);
45
+ for (const [name, mode] of Object.entries((_b = theme.modes) !== null && _b !== void 0 ? _b : {})) {
46
+ body.push(` &.theme-${name} {\n${section(mode, ' ')}\n }`);
47
+ }
48
+ return `${host} {\n${body.join('\n\n')}\n}\n`;
49
+ }
@@ -15,5 +15,6 @@ export const rapidTabStyles = (context, definition) => css `
15
15
  :host([aria-selected='true']),
16
16
  :host([aria-selected='true']:hover) {
17
17
  background-color: var(--neutral-layer-4);
18
+ font-weight: 700;
18
19
  }
19
20
  `;
@@ -5,7 +5,8 @@ export const rapidTabPanelStyles = (context, definition) => css `
5
5
  :host {
6
6
  padding: 0;
7
7
  background-color: var(--neutral-layer-card-container);
8
- border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px));
8
+ border-radius: 0 0 var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px))
9
+ var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px));
9
10
  border-style: solid;
10
11
  border-width: var(--tabs-border-width, 1px);
11
12
  border-color: var(--tabs-border-color, var(--neutral-stroke-rest));
package/dist/react.cjs CHANGED
@@ -97,14 +97,14 @@ function _mergeRefs(...refs) {
97
97
  };
98
98
  }
99
99
 
100
- const Accordion = React.forwardRef(function Accordion(props, ref) {
100
+ const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
101
101
  const { children, ...rest } = props;
102
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
102
+ return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
103
103
  });
104
104
 
105
- const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
105
+ const Accordion = React.forwardRef(function Accordion(props, ref) {
106
106
  const { children, ...rest } = props;
107
- return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
107
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
108
108
  });
109
109
 
110
110
  const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
@@ -684,6 +684,11 @@ const SearchBar = React.forwardRef(function SearchBar(props, ref) {
684
684
  return React.createElement(customElements.getName(SearchBarWC) ?? '%%prefix%%-search-bar', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
685
685
  });
686
686
 
687
+ const SegmentedControl = React.forwardRef(function SegmentedControl(props, ref) {
688
+ const { children, ...rest } = props;
689
+ return React.createElement(customElements.getName(SegmentedControlWC) ?? '%%prefix%%-segmented-control', { ...rest, ref }, children);
690
+ });
691
+
687
692
  const SectionNavigator = React.forwardRef(function SectionNavigator(props, ref) {
688
693
  const { onSectionNavigatorSetState, onSectionNavigatorSetStates, onSectionNavigatorClearState, onSectionNavigatorClearAllStates, children, ...rest } = props;
689
694
  const _innerRef = React.useRef(null);
@@ -716,11 +721,6 @@ const SectionNavigator = React.forwardRef(function SectionNavigator(props, ref)
716
721
  return React.createElement(customElements.getName(SectionNavigatorWC) ?? '%%prefix%%-section-navigator', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
717
722
  });
718
723
 
719
- const SegmentedControl = React.forwardRef(function SegmentedControl(props, ref) {
720
- const { children, ...rest } = props;
721
- return React.createElement(customElements.getName(SegmentedControlWC) ?? '%%prefix%%-segmented-control', { ...rest, ref }, children);
722
- });
723
-
724
724
  const SegmentedItem = React.forwardRef(function SegmentedItem(props, ref) {
725
725
  const { children, ...rest } = props;
726
726
  return React.createElement(customElements.getName(SegmentedItemWC) ?? '%%prefix%%-segmented-item', { ...rest, ref }, children);
@@ -922,8 +922,8 @@ const SystemHealthOverlay = React.forwardRef(function SystemHealthOverlay(props,
922
922
  });
923
923
 
924
924
  module.exports = {
925
- Accordion,
926
925
  AccordionItem,
926
+ Accordion,
927
927
  ActionsMenu,
928
928
  AiCriteriaSearch,
929
929
  AiIndicator,
@@ -977,8 +977,8 @@ module.exports = {
977
977
  SchedulerTimezone,
978
978
  SearchBarCombobox,
979
979
  SearchBar,
980
- SectionNavigator,
981
980
  SegmentedControl,
981
+ SectionNavigator,
982
982
  SegmentedItem,
983
983
  Select,
984
984
  Skeleton,
package/dist/react.mjs CHANGED
@@ -95,14 +95,14 @@ function _mergeRefs(...refs) {
95
95
  };
96
96
  }
97
97
 
98
- export const Accordion = React.forwardRef(function Accordion(props, ref) {
98
+ export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
99
99
  const { children, ...rest } = props;
100
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
100
+ return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
101
101
  });
102
102
 
103
- export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
103
+ export const Accordion = React.forwardRef(function Accordion(props, ref) {
104
104
  const { children, ...rest } = props;
105
- return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
105
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
106
106
  });
107
107
 
108
108
  export const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
@@ -682,6 +682,11 @@ export const SearchBar = React.forwardRef(function SearchBar(props, ref) {
682
682
  return React.createElement(customElements.getName(SearchBarWC) ?? '%%prefix%%-search-bar', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
683
683
  });
684
684
 
685
+ export const SegmentedControl = React.forwardRef(function SegmentedControl(props, ref) {
686
+ const { children, ...rest } = props;
687
+ return React.createElement(customElements.getName(SegmentedControlWC) ?? '%%prefix%%-segmented-control', { ...rest, ref }, children);
688
+ });
689
+
685
690
  export const SectionNavigator = React.forwardRef(function SectionNavigator(props, ref) {
686
691
  const { onSectionNavigatorSetState, onSectionNavigatorSetStates, onSectionNavigatorClearState, onSectionNavigatorClearAllStates, children, ...rest } = props;
687
692
  const _innerRef = React.useRef(null);
@@ -714,11 +719,6 @@ export const SectionNavigator = React.forwardRef(function SectionNavigator(props
714
719
  return React.createElement(customElements.getName(SectionNavigatorWC) ?? '%%prefix%%-section-navigator', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
715
720
  });
716
721
 
717
- export const SegmentedControl = React.forwardRef(function SegmentedControl(props, ref) {
718
- const { children, ...rest } = props;
719
- return React.createElement(customElements.getName(SegmentedControlWC) ?? '%%prefix%%-segmented-control', { ...rest, ref }, children);
720
- });
721
-
722
722
  export const SegmentedItem = React.forwardRef(function SegmentedItem(props, ref) {
723
723
  const { children, ...rest } = props;
724
724
  return React.createElement(customElements.getName(SegmentedItemWC) ?? '%%prefix%%-segmented-item', { ...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": "14.482.0",
4
+ "version": "14.482.1-FUI-2575.2",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -36,12 +36,12 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
39
- "@genesislcap/genx": "14.482.0",
40
- "@genesislcap/rollup-builder": "14.482.0",
41
- "@genesislcap/ts-builder": "14.482.0",
42
- "@genesislcap/uvu-playwright-builder": "14.482.0",
43
- "@genesislcap/vite-builder": "14.482.0",
44
- "@genesislcap/webpack-builder": "14.482.0",
39
+ "@genesislcap/genx": "14.482.1-FUI-2575.2",
40
+ "@genesislcap/rollup-builder": "14.482.1-FUI-2575.2",
41
+ "@genesislcap/ts-builder": "14.482.1-FUI-2575.2",
42
+ "@genesislcap/uvu-playwright-builder": "14.482.1-FUI-2575.2",
43
+ "@genesislcap/vite-builder": "14.482.1-FUI-2575.2",
44
+ "@genesislcap/webpack-builder": "14.482.1-FUI-2575.2",
45
45
  "flexlayout-react": "^0.8.19"
46
46
  },
47
47
  "peerDependencies": {
@@ -53,9 +53,9 @@
53
53
  }
54
54
  },
55
55
  "dependencies": {
56
- "@genesislcap/foundation-logger": "14.482.0",
57
- "@genesislcap/foundation-ui": "14.482.0",
58
- "@genesislcap/foundation-utils": "14.482.0",
56
+ "@genesislcap/foundation-logger": "14.482.1-FUI-2575.2",
57
+ "@genesislcap/foundation-ui": "14.482.1-FUI-2575.2",
58
+ "@genesislcap/foundation-utils": "14.482.1-FUI-2575.2",
59
59
  "@microsoft/fast-colors": "5.3.1",
60
60
  "@microsoft/fast-components": "2.30.6",
61
61
  "@microsoft/fast-element": "1.14.0",
@@ -83,5 +83,5 @@
83
83
  "require": "./dist/react.cjs"
84
84
  }
85
85
  },
86
- "gitHead": "176fdab04821da415454fcdbc124f7fabac07aa7"
86
+ "gitHead": "b08148bbdf959ad9b315296a21ce8d7895054ef6"
87
87
  }