@openfin/ui-library 0.10.0-alpha.1677158239 → 0.10.0-alpha.1677510947
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,6 +4,7 @@ import { PaletteType } from '../lib/types';
|
|
|
4
4
|
* Create a theme by accepting an incomplete theme object and deriving the remaining colors based on button colors.
|
|
5
5
|
*
|
|
6
6
|
* @param {Partial<PaletteType>} palettePartial The provided theme keys, whether we or the end user defined them.
|
|
7
|
+
* @param {string} schemeName The name of the scheme to use. Defaults to 'dark'.
|
|
7
8
|
* @returns {DefaultTheme}
|
|
8
9
|
*/
|
|
9
|
-
export declare const createTheme: (palettePartial: Partial<PaletteType>, schemeName
|
|
10
|
+
export declare const createTheme: (palettePartial: Partial<PaletteType>, schemeName?: 'light' | 'dark') => DefaultTheme;
|
package/dist/index.js
CHANGED
|
@@ -675,7 +675,7 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
|
|
|
675
675
|
font-style: italic;
|
|
676
676
|
font-display: swap;
|
|
677
677
|
}
|
|
678
|
-
`}},6714:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createTheme=void 0;const r=n(8029),o=n(3471),i=n(9984),l=n(5459),a={_config:r.Configuration,_color:o.Color,fontSize:o.FontSize,fontWeight:o.FontWeight,lineHeight:o.LineHeight,iconSize:o.IconSize,radius:o.Radius,shadow:o.Shadow,transition:o.Transition,unit:o.Unit,px:o.UnitPx},c=(e,t)=>({[`${e}Active`]:(0,i.darkenColor)(t,2),[`${e}Hover`]:(0,i.lightenColor)(t,5),[`${e}Focused`]:(0,i.lightenColor)(t,20),[`${e}Text`]:(0,i.getMostReadable)(t,[o.Color.white,o.Color.darkGray5])});t.createTheme=(e,t)=>{const n=Object.assign(Object.assign({},a),{palette:Object.assign(Object.assign(Object.assign({},e),c(l.Palette.brandPrimary,e.brandPrimary)),c(l.Palette.brandSecondary,e.brandSecondary))});return Object.assign(Object.assign({},n),{selectedScheme:t})}},575:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getStatusColor=t.getFontFaces=t.getRootCssVars=t.getVariantCSS=void 0;const r=n(3471),o=n(5459);t.getVariantCSS=(e,t)=>n=>e[t][n[t]],t.getRootCssVars=({theme:e})=>Object.keys(o.Palette).map((t=>`--openfin-ui-${t}: ${e.palette[t]};`)).join("\n"),t.getFontFaces=({theme:e})=>"import"===e._config.fontLoading?e._config.fontCss:r.cdnFontFaceCss,t.getStatusColor=(e,t,n)=>{switch(t){case"active":return e.palette.statusActive;case"critical":return e.palette.statusCritical;case"warning":return e.palette.statusWarning;case"success":return e.palette.statusSuccess;default:return n?e.palette[n]:"inherit"}}},1441:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},8732:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Mixins=void 0;const r=n(3471),o=n(7518),i=o.css`
|
|
678
|
+
`}},6714:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createTheme=void 0;const r=n(8029),o=n(3471),i=n(9984),l=n(5459),a={_config:r.Configuration,_color:o.Color,fontSize:o.FontSize,fontWeight:o.FontWeight,lineHeight:o.LineHeight,iconSize:o.IconSize,radius:o.Radius,shadow:o.Shadow,transition:o.Transition,unit:o.Unit,px:o.UnitPx},c=(e,t)=>({[`${e}Active`]:(0,i.darkenColor)(t,2),[`${e}Hover`]:(0,i.lightenColor)(t,5),[`${e}Focused`]:(0,i.lightenColor)(t,20),[`${e}Text`]:(0,i.getMostReadable)(t,[o.Color.white,o.Color.darkGray5])});t.createTheme=(e,t="dark")=>{const n=Object.assign(Object.assign({},a),{palette:Object.assign(Object.assign(Object.assign({},e),c(l.Palette.brandPrimary,e.brandPrimary)),c(l.Palette.brandSecondary,e.brandSecondary))});return Object.assign(Object.assign({},n),{selectedScheme:t})}},575:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getStatusColor=t.getFontFaces=t.getRootCssVars=t.getVariantCSS=void 0;const r=n(3471),o=n(5459);t.getVariantCSS=(e,t)=>n=>e[t][n[t]],t.getRootCssVars=({theme:e})=>Object.keys(o.Palette).map((t=>`--openfin-ui-${t}: ${e.palette[t]};`)).join("\n"),t.getFontFaces=({theme:e})=>"import"===e._config.fontLoading?e._config.fontCss:r.cdnFontFaceCss,t.getStatusColor=(e,t,n)=>{switch(t){case"active":return e.palette.statusActive;case"critical":return e.palette.statusCritical;case"warning":return e.palette.statusWarning;case"success":return e.palette.statusSuccess;default:return n?e.palette[n]:"inherit"}}},1441:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},8732:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Mixins=void 0;const r=n(3471),o=n(7518),i=o.css`
|
|
679
679
|
user-select: none;
|
|
680
680
|
`,l=o.css`
|
|
681
681
|
white-space: nowrap;
|
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.10.0-alpha.
|
|
4
|
+
"version": "0.10.0-alpha.1677510947",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"repository": "github:openfin/ui-library",
|
|
@@ -26,21 +26,14 @@
|
|
|
26
26
|
"storybook:cache-clear": "rimraf ./node_modules/.cache/storybook"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"styled-components": "=>4.4.1 <6.0.0"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"react": "
|
|
35
|
-
"react-dom": "
|
|
36
|
-
"
|
|
37
|
-
"styled-components": "^5"
|
|
38
|
-
},
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"@modulz/radix-icons": "^4.0.0",
|
|
41
|
-
"focus-trap-react": "^10.0.1",
|
|
42
|
-
"framer-motion": "4.1.5",
|
|
43
|
-
"tinycolor2": "^1.4.2"
|
|
29
|
+
"styled-components": "=>4.4.1 <6.0.0",
|
|
30
|
+
"@modulz/radix-icons": "=>4.0.0 <5.0.0",
|
|
31
|
+
"focus-trap-react": "=>10.0.1 <11.0.0",
|
|
32
|
+
"framer-motion": "=>4.1.5 <5.0.0",
|
|
33
|
+
"tinycolor2": "=>1.4.2 <2.0.0",
|
|
34
|
+
"react": "=>17.0.1 <18.0.0",
|
|
35
|
+
"react-dom": "=>17.0.1 <18.0.0",
|
|
36
|
+
"require-from-string": "=>2.0.2 <3.0.0"
|
|
44
37
|
},
|
|
45
38
|
"devDependencies": {
|
|
46
39
|
"@babel/core": "^7.18.6",
|
|
@@ -77,14 +70,10 @@
|
|
|
77
70
|
"jest": "^28.1.2",
|
|
78
71
|
"jest-environment-jsdom": "^28.1.2",
|
|
79
72
|
"prettier": "^2.7.1",
|
|
80
|
-
"react": "^17.0.1",
|
|
81
|
-
"react-dom": "^17.0.1",
|
|
82
73
|
"react-is": "^17.0.2",
|
|
83
74
|
"react-refresh": "^0.14.0",
|
|
84
|
-
"require-from-string": "^2.0.2",
|
|
85
75
|
"rimraf": "^3.0.2",
|
|
86
76
|
"storybook-addon-performance": "^0.16.1",
|
|
87
|
-
"styled-components": "^5.3.5",
|
|
88
77
|
"stylelint": "^14.9.1",
|
|
89
78
|
"stylelint-config-recommended": "^8.0.0",
|
|
90
79
|
"stylelint-config-styled-components": "^0.1.1",
|