@openfin/ui-library 0.27.0-alpha.1730827459 → 0.27.0-alpha.1731000443

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.
@@ -1,6 +1,2 @@
1
- export declare const Fonts: {
2
- regular: any;
3
- italic: any;
4
- semiBold: any;
5
- semiBoldItalic: any;
6
- };
1
+ import type { ImportFonts } from '../../components/system';
2
+ export declare const Fonts: ImportFonts;
@@ -1 +1,4 @@
1
- export declare const GlobalStyles: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>;
1
+ import { ImportFonts } from '../ThemeProvider/lib/createFontFaceCss';
2
+ export declare const GlobalStyles: import("styled-components").GlobalStyleComponent<{
3
+ fonts: ImportFonts;
4
+ }, import("styled-components").DefaultTheme>;
@@ -1,9 +1,9 @@
1
1
  import { FlattenSimpleInterpolation } from 'styled-components';
2
2
  export interface ImportFonts {
3
- regular?: string;
4
- italic?: string;
5
- semiBold?: string;
6
- semiBoldItalic?: string;
3
+ regular: string;
4
+ italic: string;
5
+ semiBold: string;
6
+ semiBoldItalic: string;
7
7
  }
8
8
  /**
9
9
  * Import global fonts using your own config.
@@ -2,9 +2,11 @@ import { FC } from 'react';
2
2
  import { ColorSchemeType } from '../../../hooks/useColorScheme';
3
3
  import { ThemeSet } from './lib/types';
4
4
  import { DeepPartial } from '../../../types';
5
+ import { ImportFonts } from './lib/createFontFaceCss';
5
6
  export type ThemeProviderProps = {
6
7
  themes?: DeepPartial<ThemeSet>;
7
8
  scheme?: ColorSchemeType;
9
+ fonts?: ImportFonts;
8
10
  };
9
11
  /**
10
12
  * ## OpenFin ThemeProvider
package/dist/index.js CHANGED
@@ -1197,7 +1197,7 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
1197
1197
  font-size: ${({theme:e})=>e.fontSize.small};
1198
1198
  line-height: ${({theme:e})=>e.px.base};
1199
1199
  padding-bottom: ${({theme:e})=>e.px.small};
1200
- `},5377:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(6710),t)},9431:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStyles=void 0;const r=n(7518),o=n(575),i=n(9507),a=n(6218);t.GlobalStyles=r.createGlobalStyle`
1200
+ `},5377:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(6710),t)},9431:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStyles=void 0;const r=n(7518),o=n(575),i=n(9272);t.GlobalStyles=r.createGlobalStyle`
1201
1201
  /** -> Define Global CSS Vars */
1202
1202
  :root {
1203
1203
  --openfin-ui-globalTransition: ${({theme:e})=>e.transition.base};
@@ -1208,7 +1208,7 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
1208
1208
  }
1209
1209
 
1210
1210
  /** -> @font-face Declaration */
1211
- ${(0,i.createFontFaceCss)(a.Fonts)}
1211
+ ${({fonts:e})=>(0,i.createFontFaceCss)(e)}
1212
1212
 
1213
1213
  /** -> Micro Reset */
1214
1214
  * {
@@ -1313,7 +1313,7 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
1313
1313
  -webkit-app-region: drag;
1314
1314
  `,s=o.css`
1315
1315
  -webkit-app-region: no-drag;
1316
- `;t.Mixins={noSelect:i,textOverflow:a,scrollbar:{[r.Size.base]:l,[r.Size.small]:c},appRegion:{drag:u,noDrag:s}}},5459:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Palette=void 0,t.Palette={background1:"background1",background2:"background2",background3:"background3",background4:"background4",background5:"background5",background6:"background6",brandPrimary:"brandPrimary",brandSecondary:"brandSecondary",brandPrimaryActive:"brandPrimaryActive",brandPrimaryHover:"brandPrimaryHover",brandPrimaryFocused:"brandPrimaryFocused",brandPrimaryText:"brandPrimaryText",brandSecondaryActive:"brandSecondaryActive",brandSecondaryHover:"brandSecondaryHover",brandSecondaryFocused:"brandSecondaryFocused",brandSecondaryText:"brandSecondaryText",inputBackground:"inputBackground",inputColor:"inputColor",inputPlaceholder:"inputPlaceholder",inputDisabled:"inputDisabled",inputFocused:"inputFocused",inputBorder:"inputBorder",statusSuccess:"statusSuccess",statusWarning:"statusWarning",statusCritical:"statusCritical",statusActive:"statusActive",textDefault:"textDefault",textHelp:"textHelp",textInactive:"textInactive",borderNeutral:"borderNeutral",contentBackground1:"contentBackground1",contentBackground2:"contentBackground2",contentBackground3:"contentBackground3",contentBackground4:"contentBackground4",contentBackground5:"contentBackground5",linkDefault:"linkDefault",linkHover:"linkHover"}},5317:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4266:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(9483),t)},9483:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OpenFinDarkTheme=t.OpenFinLightTheme=void 0;const r=n(5459),o=n(3471),i=n(6714),a={[r.Palette.brandPrimary]:o.Color.openFin,[r.Palette.statusSuccess]:o.Color.functional1,[r.Palette.statusWarning]:o.Color.functional10,[r.Palette.statusCritical]:o.Color.functional7,[r.Palette.statusActive]:o.Color.functional3,[r.Palette.borderNeutral]:o.Color.silverGray,[r.Palette.contentBackground1]:o.Color.openFin,[r.Palette.contentBackground2]:"#000000",[r.Palette.contentBackground3]:"#000000",[r.Palette.contentBackground4]:"#000000",[r.Palette.contentBackground5]:"#000000",[r.Palette.linkDefault]:o.Color.functional4,[r.Palette.linkHover]:o.Color.functional5};t.OpenFinLightTheme=(0,i.createTheme)(Object.assign(Object.assign({},a),{[r.Palette.background1]:o.Color.white,[r.Palette.background2]:o.Color.lightGray1,[r.Palette.background3]:o.Color.lightGray2,[r.Palette.background4]:o.Color.lightGray3,[r.Palette.background5]:o.Color.lightGray3,[r.Palette.background6]:o.Color.lightGray5,[r.Palette.brandSecondary]:o.Color.lightGray4,[r.Palette.inputBackground]:o.Color.lightGray3,[r.Palette.inputColor]:o.Color.darkGray5,[r.Palette.inputPlaceholder]:o.Color.darkGray2,[r.Palette.inputDisabled]:o.Color.neutralGray,[r.Palette.inputFocused]:o.Color.lightGray5,[r.Palette.inputBorder]:o.Color.neutralGray,[r.Palette.textDefault]:o.Color.darkGray5,[r.Palette.textHelp]:o.Color.neutralGray,[r.Palette.textInactive]:o.Color.neutralGray})),t.OpenFinDarkTheme=(0,i.createTheme)(Object.assign(Object.assign({},a),{[r.Palette.background1]:o.Color.darkGray6,[r.Palette.background2]:o.Color.darkGray5,[r.Palette.background3]:o.Color.darkGray4,[r.Palette.background4]:o.Color.darkGray3,[r.Palette.background5]:o.Color.darkGray2,[r.Palette.background6]:o.Color.darkGray1,[r.Palette.brandSecondary]:o.Color.darkGray2,[r.Palette.inputBackground]:o.Color.darkGray1,[r.Palette.inputColor]:o.Color.white,[r.Palette.inputPlaceholder]:o.Color.lightGray5,[r.Palette.inputDisabled]:o.Color.neutralGray,[r.Palette.inputFocused]:o.Color.lightGray5,[r.Palette.inputBorder]:o.Color.neutralGray,[r.Palette.textDefault]:o.Color.white,[r.Palette.textHelp]:o.Color.lightGray5,[r.Palette.textInactive]:o.Color.neutralGray}))},420:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeProvider=void 0;const r=n(5893),o=n(7518),i=n(3190),a=n(7088),l=n(1069);t.ThemeProvider=({children:e,themes:t,scheme:n=i.ColorScheme.system})=>{const c=(0,a.useTheme)({themes:t,scheme:n});return(0,r.jsx)(o.ThemeProvider,Object.assign({theme:c},{children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.GlobalStyles,{}),e]})}))}},3877:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(1069),t),o(n(1310),t),o(n(9507),t)},9758:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContactStatusIcon=void 0;const o=n(5893),i=r(n(7518)),a=n(1333),l={available:(0,o.jsx)(a.CheckSVG,{}),away:(0,o.jsx)(a.BusySVG,{}),"do-not-disturb":(0,o.jsx)(a.DoNotDisturbSVG,{}),offline:(0,o.jsx)(a.OfflineSVG,{}),busy:null};t.ContactStatusIcon=({onlineStatus:e})=>e?(0,o.jsx)(c,Object.assign({onlineStatus:e},{children:l[e]||null})):null;const c=i.default.div`
1316
+ `;t.Mixins={noSelect:i,textOverflow:a,scrollbar:{[r.Size.base]:l,[r.Size.small]:c},appRegion:{drag:u,noDrag:s}}},5459:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Palette=void 0,t.Palette={background1:"background1",background2:"background2",background3:"background3",background4:"background4",background5:"background5",background6:"background6",brandPrimary:"brandPrimary",brandSecondary:"brandSecondary",brandPrimaryActive:"brandPrimaryActive",brandPrimaryHover:"brandPrimaryHover",brandPrimaryFocused:"brandPrimaryFocused",brandPrimaryText:"brandPrimaryText",brandSecondaryActive:"brandSecondaryActive",brandSecondaryHover:"brandSecondaryHover",brandSecondaryFocused:"brandSecondaryFocused",brandSecondaryText:"brandSecondaryText",inputBackground:"inputBackground",inputColor:"inputColor",inputPlaceholder:"inputPlaceholder",inputDisabled:"inputDisabled",inputFocused:"inputFocused",inputBorder:"inputBorder",statusSuccess:"statusSuccess",statusWarning:"statusWarning",statusCritical:"statusCritical",statusActive:"statusActive",textDefault:"textDefault",textHelp:"textHelp",textInactive:"textInactive",borderNeutral:"borderNeutral",contentBackground1:"contentBackground1",contentBackground2:"contentBackground2",contentBackground3:"contentBackground3",contentBackground4:"contentBackground4",contentBackground5:"contentBackground5",linkDefault:"linkDefault",linkHover:"linkHover"}},5317:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4266:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(9483),t)},9483:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OpenFinDarkTheme=t.OpenFinLightTheme=void 0;const r=n(5459),o=n(3471),i=n(6714),a={[r.Palette.brandPrimary]:o.Color.openFin,[r.Palette.statusSuccess]:o.Color.functional1,[r.Palette.statusWarning]:o.Color.functional10,[r.Palette.statusCritical]:o.Color.functional7,[r.Palette.statusActive]:o.Color.functional3,[r.Palette.borderNeutral]:o.Color.silverGray,[r.Palette.contentBackground1]:o.Color.openFin,[r.Palette.contentBackground2]:"#000000",[r.Palette.contentBackground3]:"#000000",[r.Palette.contentBackground4]:"#000000",[r.Palette.contentBackground5]:"#000000",[r.Palette.linkDefault]:o.Color.functional4,[r.Palette.linkHover]:o.Color.functional5};t.OpenFinLightTheme=(0,i.createTheme)(Object.assign(Object.assign({},a),{[r.Palette.background1]:o.Color.white,[r.Palette.background2]:o.Color.lightGray1,[r.Palette.background3]:o.Color.lightGray2,[r.Palette.background4]:o.Color.lightGray3,[r.Palette.background5]:o.Color.lightGray3,[r.Palette.background6]:o.Color.lightGray5,[r.Palette.brandSecondary]:o.Color.lightGray4,[r.Palette.inputBackground]:o.Color.lightGray3,[r.Palette.inputColor]:o.Color.darkGray5,[r.Palette.inputPlaceholder]:o.Color.darkGray2,[r.Palette.inputDisabled]:o.Color.neutralGray,[r.Palette.inputFocused]:o.Color.lightGray5,[r.Palette.inputBorder]:o.Color.neutralGray,[r.Palette.textDefault]:o.Color.darkGray5,[r.Palette.textHelp]:o.Color.neutralGray,[r.Palette.textInactive]:o.Color.neutralGray})),t.OpenFinDarkTheme=(0,i.createTheme)(Object.assign(Object.assign({},a),{[r.Palette.background1]:o.Color.darkGray6,[r.Palette.background2]:o.Color.darkGray5,[r.Palette.background3]:o.Color.darkGray4,[r.Palette.background4]:o.Color.darkGray3,[r.Palette.background5]:o.Color.darkGray2,[r.Palette.background6]:o.Color.darkGray1,[r.Palette.brandSecondary]:o.Color.darkGray2,[r.Palette.inputBackground]:o.Color.darkGray1,[r.Palette.inputColor]:o.Color.white,[r.Palette.inputPlaceholder]:o.Color.lightGray5,[r.Palette.inputDisabled]:o.Color.neutralGray,[r.Palette.inputFocused]:o.Color.lightGray5,[r.Palette.inputBorder]:o.Color.neutralGray,[r.Palette.textDefault]:o.Color.white,[r.Palette.textHelp]:o.Color.lightGray5,[r.Palette.textInactive]:o.Color.neutralGray}))},420:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeProvider=void 0;const r=n(5893),o=n(7518),i=n(3190),a=n(7088),l=n(1069),c=n(6218);t.ThemeProvider=({children:e,themes:t,scheme:n=i.ColorScheme.system,fonts:u=c.Fonts})=>{const s=(0,a.useTheme)({themes:t,scheme:n});return(0,r.jsx)(o.ThemeProvider,Object.assign({theme:s},{children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.GlobalStyles,{fonts:u}),e]})}))}},3877:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(1069),t),o(n(1310),t),o(n(9507),t)},9758:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContactStatusIcon=void 0;const o=n(5893),i=r(n(7518)),a=n(1333),l={available:(0,o.jsx)(a.CheckSVG,{}),away:(0,o.jsx)(a.BusySVG,{}),"do-not-disturb":(0,o.jsx)(a.DoNotDisturbSVG,{}),offline:(0,o.jsx)(a.OfflineSVG,{}),busy:null};t.ContactStatusIcon=({onlineStatus:e})=>e?(0,o.jsx)(c,Object.assign({onlineStatus:e},{children:l[e]||null})):null;const c=i.default.div`
1317
1317
  border: 1.6px solid ${({theme:e})=>e.palette.background1};
1318
1318
 
1319
1319
  background: ${({onlineStatus:e})=>"busy"===e?"#C21313":"white"};
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.27.0-alpha.1730827459",
4
+ "version": "0.27.0-alpha.1731000443",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "repository": "github:openfin/ui-library",
@@ -9,6 +9,9 @@
9
9
  "files": [
10
10
  "dist/**/*"
11
11
  ],
12
+ "exports": {
13
+ "./fonts/*": "./dist/assets/fonts/*"
14
+ },
12
15
  "license": "SEE LICENSE IN LICENSE.MD",
13
16
  "scripts": {
14
17
  "start": "npm run storybook",