@openfin/ui-library 0.31.3-alpha.20251203161821.61ad959 → 0.31.3-alpha.20260113190318
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/components/controls/Button/button.variants.d.ts +3 -3
- package/dist/components/controls/ViewTab/ViewTab.d.ts +41 -0
- package/dist/components/controls/ViewTab/index.d.ts +2 -0
- package/dist/components/system/ThemeProvider/lib/helpers.d.ts +8 -3
- package/dist/components/system/ThemeProvider/lib/types.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +329 -295
- package/dist/styles/_core/tokens.css +1 -1
- package/dist/styles/_modules/core-ui/browser/control-bar.css +1 -1
- package/dist/styles/_modules/core-ui/browser/control-bar.css.map +1 -1
- package/dist/styles/_modules/core-ui/browser/golden-layout-story.css +1 -0
- package/dist/styles/_modules/core-ui/browser/golden-layout-story.css.map +1 -0
- package/dist/styles/_modules/core-ui/browser/index.css +1 -1
- package/dist/styles/_modules/core-ui/browser/index.css.map +1 -1
- package/dist/styles/_modules/core-ui/browser/layout-container.css +1 -0
- package/dist/styles/_modules/core-ui/browser/layout-container.css.map +1 -0
- package/dist/styles/_modules/core-ui/browser/page-button.css +1 -1
- package/dist/styles/_modules/core-ui/browser/page-button.css.map +1 -1
- package/dist/styles/_modules/core-ui/browser/root.css +1 -1
- package/dist/styles/_modules/core-ui/browser/root.css.map +1 -1
- package/dist/styles/_modules/core-ui/browser/view-tab.css +1 -0
- package/dist/styles/_modules/core-ui/browser/view-tab.css.map +1 -0
- package/dist/styles/_modules/core-ui/browser/view-tab.stories.css +1 -0
- package/dist/styles/_modules/core-ui/browser/view-tab.stories.css.map +1 -0
- package/dist/styles/_modules/core-ui/index.css +1 -1
- package/dist/styles/_modules/core-ui/index.css.map +1 -1
- package/dist/styles/_modules/core-ui/temp-tokens.css +1 -1
- package/dist/styles/_modules/core-ui/tokens-data-scheme.css +1 -0
- package/dist/styles/_modules/core-ui/tokens-data-scheme.css.map +1 -0
- package/dist/styles/_modules/core-ui/tokens-prefers-color-scheme.css +3 -0
- package/dist/styles/_modules/core-ui/tokens-prefers-color-scheme.css.map +1 -0
- package/dist/styles/_modules/enterprise/context-menu/context-menu.css +1 -1
- package/dist/styles/_modules/enterprise/context-menu/context-menu.css.map +1 -1
- package/dist/styles/_modules/enterprise/context-menu/index.css +1 -1
- package/dist/styles/_modules/enterprise/context-menu/index.css.map +1 -1
- package/dist/styles/_modules/enterprise/icon/icon.css +1 -0
- package/dist/styles/_modules/enterprise/icon/icon.css.map +1 -0
- package/dist/styles/_modules/enterprise/icon/index.css +1 -0
- package/dist/styles/_modules/enterprise/icon/index.css.map +1 -0
- package/dist/styles/_modules/enterprise/index.css +1 -1
- package/dist/styles/_modules/enterprise/index.css.map +1 -1
- package/dist/styles/_modules/enterprise/quick-apps/index.css +1 -0
- package/dist/styles/_modules/enterprise/quick-apps/index.css.map +1 -0
- package/dist/styles/_modules/enterprise/quick-apps/quick-apps.css +1 -0
- package/dist/styles/_modules/enterprise/quick-apps/quick-apps.css.map +1 -0
- package/dist/styles/_modules/enterprise/tabs/index.css +1 -1
- package/dist/styles/_modules/enterprise/tabs/index.css.map +1 -1
- package/dist/styles/_modules/enterprise/tabs/tabs.css +1 -1
- package/dist/styles/_modules/enterprise/tabs/tabs.css.map +1 -1
- package/dist/types/core-ui-css-selectors.d.ts +3 -8
- package/dist/types/core-ui-css-selectors.js +3 -8
- package/dist/types/core-ui-css-selectors.ts +3 -8
- package/dist/types/enterprise-css-selectors.d.ts +10 -1
- package/dist/types/enterprise-css-selectors.js +10 -1
- package/dist/types/enterprise-css-selectors.ts +10 -1
- package/dist/types/shared-css-selectors.d.ts +1 -1
- package/dist/types/shared-css-selectors.js +1 -1
- package/dist/types/shared-css-selectors.ts +1 -1
- package/dist/utils/SchemeManager.d.ts +85 -0
- package/dist/utils/index.d.ts +2 -0
- package/package.json +5 -4
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This file is automatically generated by scripts/generate-bem-types.js
|
|
5
5
|
* DO NOT EDIT MANUALLY - changes will be overwritten on next build
|
|
6
6
|
*
|
|
7
|
-
* Last generated:
|
|
7
|
+
* Last generated: 2026-01-13T19:05:23.609Z
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
export const enterpriseStyles = {
|
|
@@ -17,10 +17,18 @@ export const enterpriseStyles = {
|
|
|
17
17
|
"contextMenuButton": "enterprise-context-menu__button",
|
|
18
18
|
"contextMenuContainer": "enterprise-context-menu__container",
|
|
19
19
|
"contextMenuItem": "enterprise-context-menu__item",
|
|
20
|
+
"contextMenuItemHeading": "enterprise-context-menu__item-heading",
|
|
21
|
+
"contextMenuCheckmark": "enterprise-context-menu__checkmark",
|
|
20
22
|
"featuredContent": "enterprise-featured-content",
|
|
21
23
|
"featuredContentTitle": "enterprise-featured-content__title",
|
|
22
24
|
"featuredContentItem": "enterprise-featured-content__item",
|
|
23
25
|
"featuredContentItemIcon": "enterprise-featured-content__item-icon",
|
|
26
|
+
"icon": "enterprise-icon",
|
|
27
|
+
"iconBackgroundIcon": "enterprise-icon__background-icon",
|
|
28
|
+
"iconIcon": "enterprise-icon__icon",
|
|
29
|
+
"iconItemWrapper": "enterprise-icon__item-wrapper",
|
|
30
|
+
"iconItem": "enterprise-icon__item",
|
|
31
|
+
"iconItemText": "enterprise-icon__item-text",
|
|
24
32
|
"layouts": "enterprise-layouts",
|
|
25
33
|
"layoutsContainer": "enterprise-layouts__container",
|
|
26
34
|
"layoutsContainerOuter": "enterprise-layouts__container-outer",
|
|
@@ -30,6 +38,7 @@ export const enterpriseStyles = {
|
|
|
30
38
|
"modalTitle": "enterprise-modal__title",
|
|
31
39
|
"modalDescription": "enterprise-modal__description",
|
|
32
40
|
"modalFooter": "enterprise-modal__footer",
|
|
41
|
+
"quickAppsQuickApp": "enterprise-quick-apps__quick-app",
|
|
33
42
|
"search": "enterprise-search",
|
|
34
43
|
"searchContainer": "enterprise-search__container",
|
|
35
44
|
"searchContainerCommandBar": "enterprise-search__container-command-bar",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This file is automatically generated by scripts/generate-bem-types.js
|
|
5
5
|
* DO NOT EDIT MANUALLY - changes will be overwritten on next build
|
|
6
6
|
*
|
|
7
|
-
* Last generated:
|
|
7
|
+
* Last generated: 2026-01-13T19:05:23.609Z
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
export const enterpriseStyles = {
|
|
@@ -17,10 +17,18 @@ export const enterpriseStyles = {
|
|
|
17
17
|
"contextMenuButton": "enterprise-context-menu__button",
|
|
18
18
|
"contextMenuContainer": "enterprise-context-menu__container",
|
|
19
19
|
"contextMenuItem": "enterprise-context-menu__item",
|
|
20
|
+
"contextMenuItemHeading": "enterprise-context-menu__item-heading",
|
|
21
|
+
"contextMenuCheckmark": "enterprise-context-menu__checkmark",
|
|
20
22
|
"featuredContent": "enterprise-featured-content",
|
|
21
23
|
"featuredContentTitle": "enterprise-featured-content__title",
|
|
22
24
|
"featuredContentItem": "enterprise-featured-content__item",
|
|
23
25
|
"featuredContentItemIcon": "enterprise-featured-content__item-icon",
|
|
26
|
+
"icon": "enterprise-icon",
|
|
27
|
+
"iconBackgroundIcon": "enterprise-icon__background-icon",
|
|
28
|
+
"iconIcon": "enterprise-icon__icon",
|
|
29
|
+
"iconItemWrapper": "enterprise-icon__item-wrapper",
|
|
30
|
+
"iconItem": "enterprise-icon__item",
|
|
31
|
+
"iconItemText": "enterprise-icon__item-text",
|
|
24
32
|
"layouts": "enterprise-layouts",
|
|
25
33
|
"layoutsContainer": "enterprise-layouts__container",
|
|
26
34
|
"layoutsContainerOuter": "enterprise-layouts__container-outer",
|
|
@@ -30,6 +38,7 @@ export const enterpriseStyles = {
|
|
|
30
38
|
"modalTitle": "enterprise-modal__title",
|
|
31
39
|
"modalDescription": "enterprise-modal__description",
|
|
32
40
|
"modalFooter": "enterprise-modal__footer",
|
|
41
|
+
"quickAppsQuickApp": "enterprise-quick-apps__quick-app",
|
|
33
42
|
"search": "enterprise-search",
|
|
34
43
|
"searchContainer": "enterprise-search__container",
|
|
35
44
|
"searchContainerCommandBar": "enterprise-search__container-command-bar",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This file is automatically generated by scripts/generate-bem-types.js
|
|
5
5
|
* DO NOT EDIT MANUALLY - changes will be overwritten on next build
|
|
6
6
|
*
|
|
7
|
-
* Last generated:
|
|
7
|
+
* Last generated: 2026-01-13T19:05:23.610Z
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
export declare const sharedStyles: {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This file is automatically generated by scripts/generate-bem-types.js
|
|
5
5
|
* DO NOT EDIT MANUALLY - changes will be overwritten on next build
|
|
6
6
|
*
|
|
7
|
-
* Last generated:
|
|
7
|
+
* Last generated: 2026-01-13T19:05:23.610Z
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
export const sharedStyles = {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This file is automatically generated by scripts/generate-bem-types.js
|
|
5
5
|
* DO NOT EDIT MANUALLY - changes will be overwritten on next build
|
|
6
6
|
*
|
|
7
|
-
* Last generated:
|
|
7
|
+
* Last generated: 2026-01-13T19:05:23.610Z
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
export const sharedStyles = {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SchemeManager - Vanilla JS utility for managing color scheme (light/dark/system)
|
|
3
|
+
*
|
|
4
|
+
* Features:
|
|
5
|
+
* - Sets `data-scheme` attribute on `<html>` element
|
|
6
|
+
* - Persists preference to localStorage
|
|
7
|
+
* - Syncs across browser windows/tabs via storage event
|
|
8
|
+
* - Respects system preference when set to 'system'
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* import { schemeManager } from '@openfin/ui-library';
|
|
12
|
+
*
|
|
13
|
+
* // Initialize (call once, typically in <head> or app entry)
|
|
14
|
+
* schemeManager.init();
|
|
15
|
+
*
|
|
16
|
+
* // Set scheme
|
|
17
|
+
* schemeManager.setScheme('dark');
|
|
18
|
+
* schemeManager.setScheme('light');
|
|
19
|
+
* schemeManager.setScheme('system');
|
|
20
|
+
*
|
|
21
|
+
* // Get current values
|
|
22
|
+
* schemeManager.getScheme(); // 'light' | 'dark' | 'system'
|
|
23
|
+
* schemeManager.getResolvedScheme(); // 'light' | 'dark'
|
|
24
|
+
*
|
|
25
|
+
* // Subscribe to changes
|
|
26
|
+
* const unsubscribe = schemeManager.subscribe((scheme) => {
|
|
27
|
+
* console.log('Scheme changed to:', scheme);
|
|
28
|
+
* });
|
|
29
|
+
*/
|
|
30
|
+
export type SchemeSetting = 'light' | 'dark' | 'system';
|
|
31
|
+
export type ResolvedScheme = 'light' | 'dark';
|
|
32
|
+
type SchemeChangeCallback = (scheme: ResolvedScheme) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Singleton instance
|
|
35
|
+
*/
|
|
36
|
+
export declare const schemeManager: {
|
|
37
|
+
/**
|
|
38
|
+
* Initialize the scheme manager
|
|
39
|
+
* - Reads stored preference from localStorage
|
|
40
|
+
* - Sets up event listeners
|
|
41
|
+
* - Applies initial scheme
|
|
42
|
+
*
|
|
43
|
+
* Safe to call multiple times (idempotent)
|
|
44
|
+
*/
|
|
45
|
+
init(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Set the scheme preference
|
|
48
|
+
* @param scheme - 'light' | 'dark' | 'system'
|
|
49
|
+
*/
|
|
50
|
+
setScheme(scheme: SchemeSetting): void;
|
|
51
|
+
/**
|
|
52
|
+
* Get the current scheme setting
|
|
53
|
+
* @returns 'light' | 'dark' | 'system'
|
|
54
|
+
*/
|
|
55
|
+
getScheme(): SchemeSetting;
|
|
56
|
+
/**
|
|
57
|
+
* Get the resolved (actual) scheme
|
|
58
|
+
* @returns 'light' | 'dark'
|
|
59
|
+
*/
|
|
60
|
+
getResolvedScheme(): ResolvedScheme;
|
|
61
|
+
/**
|
|
62
|
+
* Subscribe to scheme changes
|
|
63
|
+
* @param callback - Called with resolved scheme when it changes
|
|
64
|
+
* @returns Unsubscribe function
|
|
65
|
+
*/
|
|
66
|
+
subscribe(callback: SchemeChangeCallback): () => void;
|
|
67
|
+
/**
|
|
68
|
+
* Check if manager is initialized
|
|
69
|
+
*/
|
|
70
|
+
isInitialized(): boolean;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Convenience function to get inline script for <head>
|
|
74
|
+
* This ensures scheme is applied before first paint (no flash)
|
|
75
|
+
*
|
|
76
|
+
* Usage in HTML:
|
|
77
|
+
* <script>{getSchemeInitScript()}</script>
|
|
78
|
+
*
|
|
79
|
+
* Or in Next.js:
|
|
80
|
+
* <Script id="scheme-init" strategy="beforeInteractive">
|
|
81
|
+
* {getSchemeInitScript()}
|
|
82
|
+
* </Script>
|
|
83
|
+
*/
|
|
84
|
+
export declare const getSchemeInitScript: () => string;
|
|
85
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfin/ui-library",
|
|
3
3
|
"description": "OpenFin UI Component Library",
|
|
4
|
-
"version": "0.31.3-alpha.
|
|
4
|
+
"version": "0.31.3-alpha.20260113190318",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"repository": {
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
},
|
|
44
44
|
"license": "SEE LICENSE IN LICENSE.MD",
|
|
45
45
|
"scripts": {
|
|
46
|
-
"start": "npm run storybook",
|
|
46
|
+
"start": "npm run generate:tokens && npm run storybook",
|
|
47
47
|
"dev": "webpack build --config webpack.config.js --mode development --watch",
|
|
48
48
|
"typecheck": "npx tsc --noEmit",
|
|
49
49
|
"build": "npm run build:clean && npm run build:scss && npm run build:types && npm run build:src",
|
|
50
50
|
"build:src": "webpack build --config webpack.config.js --mode production",
|
|
51
51
|
"build:clean": "rimraf dist",
|
|
52
52
|
"build:types": "node scripts/generate-bem-types.js",
|
|
53
|
-
"build:scss": "sass src/styles:dist/styles --style=compressed",
|
|
54
|
-
"build:scss:dev": "sass src/styles:dist/styles --style=expanded",
|
|
53
|
+
"build:scss": "sass src/styles:dist/styles --style=compressed && node scripts/copy-temp-tokens.js",
|
|
54
|
+
"build:scss:dev": "sass src/styles:dist/styles --style=expanded && node scripts/copy-temp-tokens.js",
|
|
55
55
|
"build:styles": "npm run build:scss && npm run build:types",
|
|
56
56
|
"build:styles:dev": "npm run build:scss:dev && npm run build:types",
|
|
57
57
|
"generate:tokens": "node scripts/generate-tokens.js",
|
|
@@ -116,6 +116,7 @@
|
|
|
116
116
|
"eslint-plugin-prettier": "^4.2.1",
|
|
117
117
|
"eslint-plugin-react": "^7.32.2",
|
|
118
118
|
"file-loader": "^6.2.0",
|
|
119
|
+
"golden-layout": "^1.5.9",
|
|
119
120
|
"identity-obj-proxy": "^3.0.0",
|
|
120
121
|
"jest": "^29.7.0",
|
|
121
122
|
"jest-environment-jsdom": "^29.7.0",
|