@openfin/ui-library 0.10.0-alpha.1677510947 → 0.10.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,7 +4,6 @@ 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'.
8
7
  * @returns {DefaultTheme}
9
8
  */
10
- export declare const createTheme: (palettePartial: Partial<PaletteType>, schemeName?: 'light' | 'dark') => DefaultTheme;
9
+ export declare const createTheme: (palettePartial: Partial<PaletteType>) => DefaultTheme;
@@ -21,6 +21,5 @@ declare module 'styled-components' {
21
21
  unit: typeof Unit;
22
22
  px: typeof UnitPx;
23
23
  palette: Record<keyof typeof Palette, string>;
24
- selectedScheme: 'light' | 'dark';
25
24
  }
26
25
  }
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="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`
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=>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))})},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;
@@ -707,7 +707,7 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
707
707
  -webkit-app-region: drag;
708
708
  `,u=o.css`
709
709
  -webkit-app-region: no-drag;
710
- `;t.Mixins={noSelect:i,textOverflow:l,scrollbar:{[r.Size.base]:a,[r.Size.small]:c},appRegion:{drag:s,noDrag:u}}},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",statusSuccess:"statusSuccess",statusWarning:"statusWarning",statusCritical:"statusCritical",statusActive:"statusActive",textDefault:"textDefault",textHelp:"textHelp",textInactive:"textInactive",contentBackground1:"contentBackground1",contentBackground2:"contentBackground2",contentBackground3:"contentBackground3",contentBackground4:"contentBackground4",contentBackground5:"contentBackground5"}},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),l={[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.contentBackground1]:o.Color.openFin,[r.Palette.contentBackground2]:"#000000",[r.Palette.contentBackground3]:"#000000",[r.Palette.contentBackground4]:"#000000",[r.Palette.contentBackground5]:"#000000"};t.OpenFinLightTheme=(0,i.createTheme)(Object.assign(Object.assign({},l),{[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.textDefault]:o.Color.darkGray5,[r.Palette.textHelp]:o.Color.neutralGray,[r.Palette.textInactive]:o.Color.neutralGray}),"light"),t.OpenFinDarkTheme=(0,i.createTheme)(Object.assign(Object.assign({},l),{[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.textDefault]:o.Color.white,[r.Palette.textHelp]:o.Color.lightGray5,[r.Palette.textInactive]:o.Color.neutralGray}),"dark")},420:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeProvider=void 0;const r=n(5893),o=n(7518),i=n(7088),l=n(1069);t.ThemeProvider=({children:e,themes:t,scheme:n,config:a,includeGlobalStyles:c=!0})=>{const s=(0,i.useTheme)({themes:t,scheme:n,config:a});return(0,r.jsx)(o.ThemeProvider,Object.assign({theme:s},{children:(0,r.jsxs)(r.Fragment,{children:[c&&(0,r.jsx)(l.GlobalStyles,{}),e]})}))}},3429:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContactCard=void 0;const i=n(5893),l=o(n(6689)),a=o(n(7518)),c=n(5377),s=n(7444);t.ContactCard=e=>{var{name:t,title:n,photoUrl:o,useInitials:a=!1,details:c}=e,y=r(e,["name","title","photoUrl","useInitials","details"]);const x=o||a,L=l.default.useMemo((()=>(0,s.getInitials)(t)),[t]),M=l.default.useMemo((()=>(0,s.getColorForName)(t)),[t]);return(0,i.jsxs)(u,Object.assign({},y,{children:[(0,i.jsxs)(d,{children:[x&&(0,i.jsx)(C,Object.assign({iconColor:M},{children:o?(0,i.jsx)(h,{alt:n,src:o}):(0,i.jsx)(f,{children:L})})),(0,i.jsxs)(v,{children:[(0,i.jsxs)(p,{children:[" ",t," "]}),n&&(0,i.jsxs)(g,{children:[" ",n," "]})]})]}),(0,i.jsx)(m,{children:c.map(((e,n)=>(0,i.jsxs)(l.default.Fragment,{children:[(0,i.jsx)(b,{definitions:e}),n<c.length-1&&(0,i.jsx)(w,{})]},`${t}-details-${n}`)))})]}))};const u=a.default.div`
710
+ `;t.Mixins={noSelect:i,textOverflow:l,scrollbar:{[r.Size.base]:a,[r.Size.small]:c},appRegion:{drag:s,noDrag:u}}},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",statusSuccess:"statusSuccess",statusWarning:"statusWarning",statusCritical:"statusCritical",statusActive:"statusActive",textDefault:"textDefault",textHelp:"textHelp",textInactive:"textInactive",contentBackground1:"contentBackground1",contentBackground2:"contentBackground2",contentBackground3:"contentBackground3",contentBackground4:"contentBackground4",contentBackground5:"contentBackground5"}},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),l={[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.contentBackground1]:o.Color.openFin,[r.Palette.contentBackground2]:"#000000",[r.Palette.contentBackground3]:"#000000",[r.Palette.contentBackground4]:"#000000",[r.Palette.contentBackground5]:"#000000"};t.OpenFinLightTheme=(0,i.createTheme)(Object.assign(Object.assign({},l),{[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.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({},l),{[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.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(7088),l=n(1069);t.ThemeProvider=({children:e,themes:t,scheme:n,config:a,includeGlobalStyles:c=!0})=>{const s=(0,i.useTheme)({themes:t,scheme:n,config:a});return(0,r.jsx)(o.ThemeProvider,Object.assign({theme:s},{children:(0,r.jsxs)(r.Fragment,{children:[c&&(0,r.jsx)(l.GlobalStyles,{}),e]})}))}},3429:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContactCard=void 0;const i=n(5893),l=o(n(6689)),a=o(n(7518)),c=n(5377),s=n(7444);t.ContactCard=e=>{var{name:t,title:n,photoUrl:o,useInitials:a=!1,details:c}=e,y=r(e,["name","title","photoUrl","useInitials","details"]);const x=o||a,L=l.default.useMemo((()=>(0,s.getInitials)(t)),[t]),M=l.default.useMemo((()=>(0,s.getColorForName)(t)),[t]);return(0,i.jsxs)(u,Object.assign({},y,{children:[(0,i.jsxs)(d,{children:[x&&(0,i.jsx)(C,Object.assign({iconColor:M},{children:o?(0,i.jsx)(h,{alt:n,src:o}):(0,i.jsx)(f,{children:L})})),(0,i.jsxs)(v,{children:[(0,i.jsxs)(p,{children:[" ",t," "]}),n&&(0,i.jsxs)(g,{children:[" ",n," "]})]})]}),(0,i.jsx)(m,{children:c.map(((e,n)=>(0,i.jsxs)(l.default.Fragment,{children:[(0,i.jsx)(b,{definitions:e}),n<c.length-1&&(0,i.jsx)(w,{})]},`${t}-details-${n}`)))})]}))};const u=a.default.div`
711
711
  display: flex;
712
712
  flex-direction: column;
713
713
  height: 100%;
@@ -782,7 +782,7 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
782
782
  font-size: ${({theme:e,size:t="base"})=>e.fontSize[t]};
783
783
  font-weight: ${({theme:e,weight:t="normal"})=>e.fontWeight[t]};
784
784
  line-height: ${({theme:e})=>e.lineHeight.text};
785
- `,t.Text.displayName="Text"},3190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useColorScheme=t.ColorScheme=void 0;const r=n(6689);t.ColorScheme={dark:"dark",light:"light",system:"system"};const o="(prefers-color-scheme: dark)";t.useColorScheme=({requestedScheme:e,fallbackScheme:n=t.ColorScheme.light})=>{const[i,l]=(0,r.useState)(n),a=e=>l(e.matches?"dark":"light");return(0,r.useEffect)((()=>{if("light"===e||"dark"===e)return void l(e);const t=window.matchMedia(o);return l(t.matches?"dark":"light"),t.addEventListener("change",a),()=>t.removeEventListener("change",a)}),[e,i,o]),i}},4481:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useLayoutMediaQuery=t.useMediaQuery=void 0;const r=n(6689),o=e=>t=>{const[n,o]=(0,r.useState)(!1);return e((()=>{const e=window.matchMedia(t);if(e){e.matches!==n&&o(e.matches);const t=()=>o(e.matches),r=()=>e.removeEventListener("change",t);return e.addEventListener("change",t),r}}),[n,t]),n};t.useMediaQuery=o(r.useEffect),t.useLayoutMediaQuery=o(r.useLayoutEffect)},2776:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.usePrevious=void 0;const r=n(6689);t.usePrevious=e=>{const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}},7088:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useTheme=void 0;const r=n(6689),o=n(4266),i=n(3190),l=n(9507),a={[i.ColorScheme.dark]:o.OpenFinDarkTheme,[i.ColorScheme.light]:o.OpenFinLightTheme};t.useTheme=({themes:e,scheme:t,config:n})=>{const o=(0,i.useColorScheme)({requestedScheme:t}),c=(0,r.useMemo)((()=>void 0===e?a[o]:(0,l.createTheme)(Object.assign(Object.assign({},a[o].palette),e[o].palette),o)),[e,o]);return n?Object.assign(Object.assign({},c),{_config:Object.assign(Object.assign({},c._config),n)}):c}},341: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.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StoryHelpers=void 0,i(n(4130),t),i(n(4925),t),i(n(2609),t),i(n(3136),t),i(n(9634),t),i(n(144),t),i(n(9239),t),i(n(8878),t),i(n(8510),t),i(n(8951),t),i(n(1978),t),i(n(8051),t),i(n(3641),t),i(n(5215),t),i(n(1335),t),i(n(5377),t),i(n(1069),t),i(n(9507),t),i(n(3188),t),i(n(7063),t),i(n(7769),t),i(n(3190),t),i(n(4481),t),i(n(2776),t),t.StoryHelpers=l(n(8812)),i(n(4991),t)},6606:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateRandomInteger=t.clamp=void 0,t.clamp=(e,t,n)=>t&&n?Math.min(Math.max(e,t),n):n&&!t?Math.min(e,n):t&&!n?Math.max(e,t):e,t.generateRandomInteger=()=>Math.floor(1e3*Math.random())},4991:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.whenFin=void 0,t.whenFin=function(e,t){const n="undefined"!=typeof fin?e:t;return"function"==typeof n?n():n}},8812: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.SpatialLink=t.JSONData=t.Pre=t.PlaceholderContent=t.StoryGrid=t.StoryColumn=t.StoryRow=void 0;const o=n(5893),i=r(n(7518)),l=n(1335);t.StoryRow=(0,i.default)(l.Box).attrs({gap:"large",alignItems:"flex-start"})``,t.StoryColumn=(0,i.default)(l.Box).attrs({flexDirection:"column",gap:"large",alignItems:"flex-start"})`
785
+ `,t.Text.displayName="Text"},3190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useColorScheme=t.ColorScheme=void 0;const r=n(6689);t.ColorScheme={dark:"dark",light:"light",system:"system"};const o="(prefers-color-scheme: dark)";t.useColorScheme=({requestedScheme:e,fallbackScheme:n=t.ColorScheme.light})=>{const[i,l]=(0,r.useState)(n),a=e=>l(e.matches?"dark":"light");return(0,r.useEffect)((()=>{if("light"===e||"dark"===e)return void l(e);const t=window.matchMedia(o);return l(t.matches?"dark":"light"),t.addEventListener("change",a),()=>t.removeEventListener("change",a)}),[e,i,o]),i}},4481:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useLayoutMediaQuery=t.useMediaQuery=void 0;const r=n(6689),o=e=>t=>{const[n,o]=(0,r.useState)(!1);return e((()=>{const e=window.matchMedia(t);if(e){e.matches!==n&&o(e.matches);const t=()=>o(e.matches),r=()=>e.removeEventListener("change",t);return e.addEventListener("change",t),r}}),[n,t]),n};t.useMediaQuery=o(r.useEffect),t.useLayoutMediaQuery=o(r.useLayoutEffect)},2776:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.usePrevious=void 0;const r=n(6689);t.usePrevious=e=>{const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}},7088:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useTheme=void 0;const r=n(6689),o=n(4266),i=n(3190),l=n(9507),a={[i.ColorScheme.dark]:o.OpenFinDarkTheme,[i.ColorScheme.light]:o.OpenFinLightTheme};t.useTheme=({themes:e,scheme:t,config:n})=>{const o=(0,i.useColorScheme)({requestedScheme:t}),c=(0,r.useMemo)((()=>void 0===e?a[o]:(0,l.createTheme)(Object.assign(Object.assign({},a[o].palette),e[o].palette))),[e,o]);return n?Object.assign(Object.assign({},c),{_config:Object.assign(Object.assign({},c._config),n)}):c}},341: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.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StoryHelpers=void 0,i(n(4130),t),i(n(4925),t),i(n(2609),t),i(n(3136),t),i(n(9634),t),i(n(144),t),i(n(9239),t),i(n(8878),t),i(n(8510),t),i(n(8951),t),i(n(1978),t),i(n(8051),t),i(n(3641),t),i(n(5215),t),i(n(1335),t),i(n(5377),t),i(n(1069),t),i(n(9507),t),i(n(3188),t),i(n(7063),t),i(n(7769),t),i(n(3190),t),i(n(4481),t),i(n(2776),t),t.StoryHelpers=l(n(8812)),i(n(4991),t)},6606:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateRandomInteger=t.clamp=void 0,t.clamp=(e,t,n)=>t&&n?Math.min(Math.max(e,t),n):n&&!t?Math.min(e,n):t&&!n?Math.max(e,t):e,t.generateRandomInteger=()=>Math.floor(1e3*Math.random())},4991:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.whenFin=void 0,t.whenFin=function(e,t){const n="undefined"!=typeof fin?e:t;return"function"==typeof n?n():n}},8812: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.SpatialLink=t.JSONData=t.Pre=t.PlaceholderContent=t.StoryGrid=t.StoryColumn=t.StoryRow=void 0;const o=n(5893),i=r(n(7518)),l=n(1335);t.StoryRow=(0,i.default)(l.Box).attrs({gap:"large",alignItems:"flex-start"})``,t.StoryColumn=(0,i.default)(l.Box).attrs({flexDirection:"column",gap:"large",alignItems:"flex-start"})`
786
786
  max-width: 500px;
787
787
  `,t.StoryGrid=(0,i.default)(l.Box).attrs({gap:"large"})`
788
788
  display: grid;
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.1677510947",
4
+ "version": "0.10.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "repository": "github:openfin/ui-library",
@@ -12,7 +12,6 @@
12
12
  "license": "SEE LICENSE IN LICENSE.MD",
13
13
  "scripts": {
14
14
  "start": "npm run storybook",
15
- "typecheck": "npx tsc --noEmit",
16
15
  "build": "npm run build:clean && npm run build:src",
17
16
  "build:src": "webpack build --config webpack.config.js --mode production",
18
17
  "build:clean": "rimraf dist",
@@ -26,14 +25,21 @@
26
25
  "storybook:cache-clear": "rimraf ./node_modules/.cache/storybook"
27
26
  },
28
27
  "peerDependencies": {
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"
28
+ "styled-components": "=>4.4.1 <6.0.0"
29
+ },
30
+ "resolutions": {
31
+ "@types/react": "^17",
32
+ "@types/react-dom": "^17",
33
+ "react": "^17",
34
+ "react-dom": "^17",
35
+ "react-is": "^17",
36
+ "styled-components": "^5"
37
+ },
38
+ "dependencies": {
39
+ "@modulz/radix-icons": "^4.0.0",
40
+ "focus-trap-react": "^10.0.1",
41
+ "framer-motion": "4.1.5",
42
+ "tinycolor2": "^1.4.2"
37
43
  },
38
44
  "devDependencies": {
39
45
  "@babel/core": "^7.18.6",
@@ -70,10 +76,14 @@
70
76
  "jest": "^28.1.2",
71
77
  "jest-environment-jsdom": "^28.1.2",
72
78
  "prettier": "^2.7.1",
79
+ "react": "^17.0.1",
80
+ "react-dom": "^17.0.1",
73
81
  "react-is": "^17.0.2",
74
82
  "react-refresh": "^0.14.0",
83
+ "require-from-string": "^2.0.2",
75
84
  "rimraf": "^3.0.2",
76
85
  "storybook-addon-performance": "^0.16.1",
86
+ "styled-components": "^5.3.5",
77
87
  "stylelint": "^14.9.1",
78
88
  "stylelint-config-recommended": "^8.0.0",
79
89
  "stylelint-config-styled-components": "^0.1.1",