@genesislcap/foundation-ui 14.274.0 → 14.275.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.
|
@@ -4,8 +4,11 @@ export declare function createDesignSystemProxy(designSystem: DesignSystem): Des
|
|
|
4
4
|
* Provides a design system for the specified element either by returning one that was
|
|
5
5
|
* already created for that element or creating one.
|
|
6
6
|
* @param element - The element to root the design system at. By default, this is the body.
|
|
7
|
+
* @param prefix - The prefix for the design system. By default, this is 'foundation'.
|
|
8
|
+
* @param tokens - The tokens for the design system. By default, this is the foundation tokens.
|
|
9
|
+
* @param values - The values for the design system. By default, this is the foundation values.
|
|
7
10
|
* @returns A Foundation Design System
|
|
8
11
|
* @public
|
|
9
12
|
*/
|
|
10
|
-
export declare const provideDesignSystem: (element?: HTMLElement, prefix?: string) => Pick<DesignSystem, 'register'>;
|
|
13
|
+
export declare const provideDesignSystem: (element?: HTMLElement, prefix?: string, tokens?: any, values?: any) => Pick<DesignSystem, 'register'>;
|
|
11
14
|
//# sourceMappingURL=provide-design-system.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provide-design-system.d.ts","sourceRoot":"","sources":["../../src/provide-design-system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAM1D,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,YAAY,gBAWjE;AAED
|
|
1
|
+
{"version":3,"file":"provide-design-system.d.ts","sourceRoot":"","sources":["../../src/provide-design-system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAM1D,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,YAAY,gBAWjE;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,aACpB,WAAW,4BAEZ,GAAG,WACH,GAAG,KACX,KAAK,YAAY,EAAE,UAAU,CAM/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DesignSystem } from '@microsoft/fast-foundation';
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as foundationTokens from './_config/tokens';
|
|
3
|
+
import * as foundationValues from './_config/values';
|
|
4
4
|
import { provideTokens } from './design-system-provider';
|
|
5
5
|
export function createDesignSystemProxy(designSystem) {
|
|
6
6
|
return new Proxy(designSystem, {
|
|
@@ -16,12 +16,15 @@ export function createDesignSystemProxy(designSystem) {
|
|
|
16
16
|
* Provides a design system for the specified element either by returning one that was
|
|
17
17
|
* already created for that element or creating one.
|
|
18
18
|
* @param element - The element to root the design system at. By default, this is the body.
|
|
19
|
+
* @param prefix - The prefix for the design system. By default, this is 'foundation'.
|
|
20
|
+
* @param tokens - The tokens for the design system. By default, this is the foundation tokens.
|
|
21
|
+
* @param values - The values for the design system. By default, this is the foundation values.
|
|
19
22
|
* @returns A Foundation Design System
|
|
20
23
|
* @public
|
|
21
24
|
*/
|
|
22
|
-
export const provideDesignSystem = (element, prefix = 'foundation') => {
|
|
25
|
+
export const provideDesignSystem = (element, prefix = 'foundation', tokens, values) => {
|
|
23
26
|
if (element) {
|
|
24
|
-
provideTokens(tokens, values, element);
|
|
27
|
+
provideTokens(tokens !== null && tokens !== void 0 ? tokens : foundationTokens, values !== null && values !== void 0 ? values : foundationValues, element);
|
|
25
28
|
}
|
|
26
29
|
const designSystem = DesignSystem.getOrCreate(element).withPrefix(prefix);
|
|
27
30
|
return createDesignSystemProxy(designSystem);
|
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.
|
|
4
|
+
"version": "14.275.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.
|
|
87
|
-
"@genesislcap/genx": "14.
|
|
88
|
-
"@genesislcap/rollup-builder": "14.
|
|
89
|
-
"@genesislcap/ts-builder": "14.
|
|
90
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
91
|
-
"@genesislcap/vite-builder": "14.
|
|
92
|
-
"@genesislcap/webpack-builder": "14.
|
|
86
|
+
"@genesislcap/foundation-testing": "14.275.0",
|
|
87
|
+
"@genesislcap/genx": "14.275.0",
|
|
88
|
+
"@genesislcap/rollup-builder": "14.275.0",
|
|
89
|
+
"@genesislcap/ts-builder": "14.275.0",
|
|
90
|
+
"@genesislcap/uvu-playwright-builder": "14.275.0",
|
|
91
|
+
"@genesislcap/vite-builder": "14.275.0",
|
|
92
|
+
"@genesislcap/webpack-builder": "14.275.0",
|
|
93
93
|
"copyfiles": "^2.4.1",
|
|
94
94
|
"rimraf": "^5.0.0",
|
|
95
95
|
"rxjs": "^7.5.4"
|
|
@@ -100,15 +100,15 @@
|
|
|
100
100
|
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
|
101
101
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
102
102
|
"@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
|
|
103
|
-
"@genesislcap/expression-builder": "14.
|
|
104
|
-
"@genesislcap/foundation-comms": "14.
|
|
105
|
-
"@genesislcap/foundation-criteria": "14.
|
|
106
|
-
"@genesislcap/foundation-errors": "14.
|
|
107
|
-
"@genesislcap/foundation-events": "14.
|
|
108
|
-
"@genesislcap/foundation-logger": "14.
|
|
109
|
-
"@genesislcap/foundation-notifications": "14.
|
|
110
|
-
"@genesislcap/foundation-user": "14.
|
|
111
|
-
"@genesislcap/foundation-utils": "14.
|
|
103
|
+
"@genesislcap/expression-builder": "14.275.0",
|
|
104
|
+
"@genesislcap/foundation-comms": "14.275.0",
|
|
105
|
+
"@genesislcap/foundation-criteria": "14.275.0",
|
|
106
|
+
"@genesislcap/foundation-errors": "14.275.0",
|
|
107
|
+
"@genesislcap/foundation-events": "14.275.0",
|
|
108
|
+
"@genesislcap/foundation-logger": "14.275.0",
|
|
109
|
+
"@genesislcap/foundation-notifications": "14.275.0",
|
|
110
|
+
"@genesislcap/foundation-user": "14.275.0",
|
|
111
|
+
"@genesislcap/foundation-utils": "14.275.0",
|
|
112
112
|
"@microsoft/fast-colors": "5.3.1",
|
|
113
113
|
"@microsoft/fast-components": "2.30.6",
|
|
114
114
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -130,5 +130,5 @@
|
|
|
130
130
|
"access": "public"
|
|
131
131
|
},
|
|
132
132
|
"customElements": "dist/custom-elements.json",
|
|
133
|
-
"gitHead": "
|
|
133
|
+
"gitHead": "ce2f043a6de1db6be728298be2baf76d4586f705"
|
|
134
134
|
}
|