@genesislcap/foundation-ui 14.371.0-FUI-2456.1 → 14.372.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.
@@ -123,5 +123,5 @@ export declare const selectCustomToken: (...path: string[]) => {
123
123
  $value: TokenValue;
124
124
  $type?: string;
125
125
  };
126
- export declare const configureDesignSystem: (provider: HTMLElement, config: Partial<DesignTokensConfig> | DesignTokensConfig) => void;
126
+ export declare const configureDesignSystem: (provider: HTMLElement, config: DesignTokensConfig) => void;
127
127
  //# sourceMappingURL=design-system-provider.utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"design-system-provider.utils.d.ts","sourceRoot":"","sources":["../../../src/design-system-provider/design-system-provider.utils.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EA8BX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAc,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAoB,MAAM,4BAA4B,CAAC;AAE3E,OAAO,EAAE,kBAAkB,EAAoB,kBAAkB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE/F;;;GAGG;AACH,qBAAa,sBAAsB;IACrB,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAQ;CACrD;AAKD,eAAO,MAAM,aAAa,GAAI,WAAM,EAAE,WAAM,EAAE,UAAU,WAAW,SAalE,CAAC;AAEF,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,IAC1C,QAAQ,iBAAiB,EAAE,KAAK,MAAM,UAa/C;AAED,eAAO,MAAM,eAAe,EAAE,cAe7B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,eACc,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,WAAW,EACrB,cAAc,kBAAkB,EAChC,SAAQ,MAAW,KAClB,IAcF,CAAC;AAGF,eAAO,MAAM,gBAAgB,GAC3B,YAAY,OAAO,CAAC,2BAA2B,CAAC,EAChD,qBAA8B,OAO/B,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,yBAAoB;;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,cAAc,MAAM,EAAE,OAAO,MAAM,WAOnE,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,QAAO,sBAAgD,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,eAAO,MAAM,iBAAiB,GAAI,GAAG,MAAM,MAAM,EAAE;YAOQ,UAAU;YAAU,MAAM;CAQpF,CAAC;AAiBF,eAAO,MAAM,qBAAqB,GAChC,UAAU,WAAW,EACrB,QAAQ,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,SAkGzD,CAAC"}
1
+ {"version":3,"file":"design-system-provider.utils.d.ts","sourceRoot":"","sources":["../../../src/design-system-provider/design-system-provider.utils.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EA8BX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAc,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAoB,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAoB,kBAAkB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE/F;;;GAGG;AACH,qBAAa,sBAAsB;IACrB,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAQ;CACrD;AAKD,eAAO,MAAM,aAAa,GAAI,WAAM,EAAE,WAAM,EAAE,UAAU,WAAW,SAalE,CAAC;AAEF,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,IAC1C,QAAQ,iBAAiB,EAAE,KAAK,MAAM,UAa/C;AAED,eAAO,MAAM,eAAe,EAAE,cAe7B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,eACc,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,WAAW,EACrB,cAAc,kBAAkB,EAChC,SAAQ,MAAW,KAClB,IAcF,CAAC;AAGF,eAAO,MAAM,gBAAgB,GAC3B,YAAY,OAAO,CAAC,2BAA2B,CAAC,EAChD,qBAA8B,OAO/B,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,yBAAoB;;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,cAAc,MAAM,EAAE,OAAO,MAAM,WAOnE,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,QAAO,sBAAgD,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,eAAO,MAAM,iBAAiB,GAAI,GAAG,MAAM,MAAM,EAAE;YAOQ,UAAU;YAAU,MAAM;CAQpF,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,UAAU,WAAW,EAAE,QAAQ,kBAAkB,SA+FtF,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import { __decorate } from "tslib";
2
- import { TypeRampValues, deepMerge } from '@genesislcap/foundation-utils';
2
+ import { TypeRampValues } from '@genesislcap/foundation-utils';
3
3
  import { parseColorHexRGB } from '@microsoft/fast-colors';
4
4
  import { PaletteRGB, SwatchRGB, accentPalette, controlCornerRadius, designUnit, neutralPalette, baseLayerLuminance, baseHeightMultiplier, density, strokeWidth, bodyFont, typeRampBaseFontSize, typeRampBaseLineHeight, typeRampMinus1FontSize, typeRampMinus1LineHeight, typeRampMinus2FontSize, typeRampMinus2LineHeight, typeRampPlus1FontSize, typeRampPlus1LineHeight, typeRampPlus2FontSize, typeRampPlus2LineHeight, typeRampPlus3FontSize, typeRampPlus3LineHeight, typeRampPlus4FontSize, typeRampPlus4LineHeight, typeRampPlus5FontSize, typeRampPlus5LineHeight, typeRampPlus6FontSize, typeRampPlus6LineHeight, } from '@microsoft/fast-components';
5
5
  import { observable } from '@microsoft/fast-element';
6
- import defaultDesignTokens from './default-design-tokens.json';
7
6
  /**
8
7
  * Observable class for design tokens config that components can subscribe to.
9
8
  * @public
@@ -209,21 +208,8 @@ export const selectCustomToken = (...path) => {
209
208
  }
210
209
  return select(path, config.customTokens);
211
210
  };
212
- /**
213
- * Deep merges two design tokens config objects, with the source config taking precedence over defaults.
214
- * This ensures all required tokens are present even if the incoming config is incomplete.
215
- *
216
- * @param defaults - The default design tokens config
217
- * @param source - The incoming design tokens config to merge
218
- * @returns A merged DesignTokensConfig with all required tokens
219
- */
220
- const mergeDesignTokens = (defaults, source) => {
221
- return deepMerge(defaults, source);
222
- };
223
211
  export const configureDesignSystem = (provider, config) => {
224
- // Merge incoming config with defaults to ensure all required tokens are present
225
- const mergedConfig = mergeDesignTokens(defaultDesignTokens, config);
226
- const designTokens = mergedConfig.design_tokens;
212
+ const designTokens = config.design_tokens;
227
213
  accentPalette.setValueFor(provider, paletteFromHex(designTokens.color.accent.$value));
228
214
  neutralPalette.setValueFor(provider, paletteFromHex(designTokens.color.neutral.$value));
229
215
  bodyFont.setValueFor(provider, designTokens.fontFamily.bodyFont.$value);
@@ -254,9 +240,9 @@ export const configureDesignSystem = (provider, config) => {
254
240
  typeRampPlus6FontSize.setValueFor(provider, getTypeRampValue(baseFontSize, TypeRampValues.plusSix));
255
241
  typeRampPlus6LineHeight.setValueFor(provider, getTypeRampValue(baseLineHeight, TypeRampValues.plusSix));
256
242
  // Apply custom tokens if provided
257
- if (mergedConfig.customTokens) {
258
- applyCustomTokens(provider, mergedConfig.customTokens);
243
+ if (config.customTokens) {
244
+ applyCustomTokens(provider, config.customTokens);
259
245
  }
260
- // Update the observable value with full merged config - FAST will automatically notify all subscribers
261
- designTokensObservable.value = structuredClone(mergedConfig);
246
+ // Update the observable value with full config - FAST will automatically notify all subscribers
247
+ designTokensObservable.value = structuredClone(config);
262
248
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-ui",
3
3
  "description": "Genesis Foundation UI",
4
- "version": "14.371.0-FUI-2456.1",
4
+ "version": "14.372.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -83,13 +83,13 @@
83
83
  }
84
84
  },
85
85
  "devDependencies": {
86
- "@genesislcap/foundation-testing": "14.371.0-FUI-2456.1",
87
- "@genesislcap/genx": "14.371.0-FUI-2456.1",
88
- "@genesislcap/rollup-builder": "14.371.0-FUI-2456.1",
89
- "@genesislcap/ts-builder": "14.371.0-FUI-2456.1",
90
- "@genesislcap/uvu-playwright-builder": "14.371.0-FUI-2456.1",
91
- "@genesislcap/vite-builder": "14.371.0-FUI-2456.1",
92
- "@genesislcap/webpack-builder": "14.371.0-FUI-2456.1",
86
+ "@genesislcap/foundation-testing": "14.372.0",
87
+ "@genesislcap/genx": "14.372.0",
88
+ "@genesislcap/rollup-builder": "14.372.0",
89
+ "@genesislcap/ts-builder": "14.372.0",
90
+ "@genesislcap/uvu-playwright-builder": "14.372.0",
91
+ "@genesislcap/vite-builder": "14.372.0",
92
+ "@genesislcap/webpack-builder": "14.372.0",
93
93
  "copyfiles": "^2.4.1"
94
94
  },
95
95
  "dependencies": {
@@ -98,15 +98,15 @@
98
98
  "@fortawesome/free-regular-svg-icons": "^6.2.1",
99
99
  "@fortawesome/free-solid-svg-icons": "^6.2.1",
100
100
  "@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
101
- "@genesislcap/expression-builder": "14.371.0-FUI-2456.1",
102
- "@genesislcap/foundation-comms": "14.371.0-FUI-2456.1",
103
- "@genesislcap/foundation-criteria": "14.371.0-FUI-2456.1",
104
- "@genesislcap/foundation-errors": "14.371.0-FUI-2456.1",
105
- "@genesislcap/foundation-events": "14.371.0-FUI-2456.1",
106
- "@genesislcap/foundation-logger": "14.371.0-FUI-2456.1",
107
- "@genesislcap/foundation-notifications": "14.371.0-FUI-2456.1",
108
- "@genesislcap/foundation-user": "14.371.0-FUI-2456.1",
109
- "@genesislcap/foundation-utils": "14.371.0-FUI-2456.1",
101
+ "@genesislcap/expression-builder": "14.372.0",
102
+ "@genesislcap/foundation-comms": "14.372.0",
103
+ "@genesislcap/foundation-criteria": "14.372.0",
104
+ "@genesislcap/foundation-errors": "14.372.0",
105
+ "@genesislcap/foundation-events": "14.372.0",
106
+ "@genesislcap/foundation-logger": "14.372.0",
107
+ "@genesislcap/foundation-notifications": "14.372.0",
108
+ "@genesislcap/foundation-user": "14.372.0",
109
+ "@genesislcap/foundation-utils": "14.372.0",
110
110
  "@microsoft/fast-colors": "5.3.1",
111
111
  "@microsoft/fast-components": "2.30.6",
112
112
  "@microsoft/fast-element": "1.14.0",
@@ -128,5 +128,5 @@
128
128
  "access": "public"
129
129
  },
130
130
  "customElements": "dist/custom-elements.json",
131
- "gitHead": "c3c009d8ba522f9a7cc445c623973248e5e26cf2"
131
+ "gitHead": "5687711a57e643a627b78f773f99fad4df1062e9"
132
132
  }
@@ -1,60 +0,0 @@
1
- {
2
- "design_tokens": {
3
- "color": {
4
- "accent": {
5
- "$value": "#0EAFE2",
6
- "$type": "color"
7
- },
8
- "neutral": {
9
- "$value": "#7C909B",
10
- "$type": "color"
11
- }
12
- },
13
- "fontFamily": {
14
- "bodyFont": {
15
- "$value": "Roboto, \"Segoe UI\", Arial, Helvetica, sans-serif",
16
- "$type": "fontFamily"
17
- }
18
- },
19
- "typography": {
20
- "baseFontSize": {
21
- "$value": "14px",
22
- "$type": "dimension"
23
- },
24
- "baseLineHeight": {
25
- "$value": "20px",
26
- "$type": "dimension"
27
- }
28
- },
29
- "mode": {
30
- "luminance": {
31
- "$value": 0.23,
32
- "$type": "number"
33
- }
34
- },
35
- "style": {
36
- "density": {
37
- "$value": 0,
38
- "$type": "number"
39
- },
40
- "baseHeightMultiplier": {
41
- "$value": 10,
42
- "$type": "number"
43
- },
44
- "borderRadius": {
45
- "$value": 4,
46
- "$type": "number"
47
- },
48
- "strokeWidth": {
49
- "$value": 1,
50
- "$type": "number"
51
- }
52
- },
53
- "space": {
54
- "designUnit": {
55
- "$value": 4,
56
- "$type": "number"
57
- }
58
- }
59
- }
60
- }