@foxford/ui 2.98.0 → 2.99.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.
Files changed (40) hide show
  1. package/components/Media/Media.js +2 -0
  2. package/components/Media/Media.js.map +1 -0
  3. package/components/Media/Media.mjs +2 -0
  4. package/components/Media/Media.mjs.map +1 -0
  5. package/components/Media/MediaMatcher.js +2 -0
  6. package/components/Media/MediaMatcher.js.map +1 -0
  7. package/components/Media/MediaMatcher.mjs +2 -0
  8. package/components/Media/MediaMatcher.mjs.map +1 -0
  9. package/components/Media/MediaMatchers.js +2 -0
  10. package/components/Media/MediaMatchers.js.map +1 -0
  11. package/components/Media/MediaMatchers.mjs +2 -0
  12. package/components/Media/MediaMatchers.mjs.map +1 -0
  13. package/components/Media/MediaMediator.js +2 -0
  14. package/components/Media/MediaMediator.js.map +1 -0
  15. package/components/Media/MediaMediator.mjs +2 -0
  16. package/components/Media/MediaMediator.mjs.map +1 -0
  17. package/components/Media/context.js +2 -0
  18. package/components/Media/context.js.map +1 -0
  19. package/components/Media/context.mjs +2 -0
  20. package/components/Media/context.mjs.map +1 -0
  21. package/components/Media/useMediaConnector.js +2 -0
  22. package/components/Media/useMediaConnector.js.map +1 -0
  23. package/components/Media/useMediaConnector.mjs +2 -0
  24. package/components/Media/useMediaConnector.mjs.map +1 -0
  25. package/components/Media/useMediaPropsMatches.js +2 -0
  26. package/components/Media/useMediaPropsMatches.js.map +1 -0
  27. package/components/Media/useMediaPropsMatches.mjs +2 -0
  28. package/components/Media/useMediaPropsMatches.mjs.map +1 -0
  29. package/dts/index.d.ts +84 -4
  30. package/index.js +1 -1
  31. package/index.mjs +1 -1
  32. package/package.json +2 -2
  33. package/shared/constants.js +1 -1
  34. package/shared/constants.js.map +1 -1
  35. package/shared/constants.mjs +1 -1
  36. package/shared/constants.mjs.map +1 -1
  37. package/shared/utils/Observable.js +2 -0
  38. package/shared/utils/Observable.js.map +1 -0
  39. package/shared/utils/Observable.mjs +2 -0
  40. package/shared/utils/Observable.mjs.map +1 -0
@@ -0,0 +1,2 @@
1
+ 'use strict';var MediaMatchers=require('./MediaMatchers.js');var useMediaConnector=require('./useMediaConnector.js');var useMediaPropsMatches=require('./useMediaPropsMatches.js');const Media=Object.assign((e=>{const{children:s,...a}=e;const r=useMediaConnector.useMediaConnector(useMediaConnector.useMediaConnector.getConfig(a));const t=useMediaPropsMatches.useMediaPropsMatches(a,r);return typeof s=='function'?s(t):t?s:null}),{Matchers:MediaMatchers.MediaMatchers});exports.Media=Media;
2
+ //# sourceMappingURL=Media.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Media.js","sources":["../../../../src/components/Media/Media.tsx"],"sourcesContent":["import { MediaMatchers } from './MediaMatchers'\nimport { useMediaConnector } from './useMediaConnector'\nimport { useMediaPropsMatches } from './useMediaPropsMatches'\nimport type { MediaProps, MediaMatchersProps } from './types'\n\n/**\n *\n * Компонент для вывода контента, который зависит от медиа кверей.\n */\nconst Media: React.FC<MediaProps> & {\n Matchers: React.FC<MediaMatchersProps>\n} = Object.assign(\n (props: MediaProps) => {\n const { children, ...mediaProps } = props\n\n const breakpointsMatchers = useMediaConnector(useMediaConnector.getConfig(mediaProps))\n\n const matches = useMediaPropsMatches(mediaProps, breakpointsMatchers)\n\n if (typeof children === 'function') {\n return children(matches)\n }\n\n return matches ? children : null\n },\n {\n Matchers: MediaMatchers,\n }\n)\n\nexport { Media }\n"],"names":["Media","Object","assign","props","children","mediaProps","breakpointsMatchers","useMediaConnector","getConfig","matches","useMediaPropsMatches","Matchers","MediaMatchers"],"mappings":"mLASA,MAAMA,MAEFC,OAAOC,QACRC,IACC,MAAMC,SAAEA,KAAaC,GAAeF,EAEpC,MAAMG,EAAsBC,kBAAAA,kBAAkBA,kBAAAA,kBAAkBC,UAAUH,IAE1E,MAAMI,EAAUC,qBAAAA,qBAAqBL,EAAYC,GAEjD,cAAWF,GAAa,WACfA,EAASK,GAGXA,EAAUL,EAAW,IAAI,GAElC,CACEO,SAAUC,cAAAA"}
@@ -0,0 +1,2 @@
1
+ import{MediaMatchers}from'./MediaMatchers.mjs';import{useMediaConnector}from'./useMediaConnector.mjs';import{useMediaPropsMatches}from'./useMediaPropsMatches.mjs';const Media=Object.assign((e=>{const{children:s,...o}=e;const t=useMediaConnector(useMediaConnector.getConfig(o));const r=useMediaPropsMatches(o,t);return typeof s=='function'?s(r):r?s:null}),{Matchers:MediaMatchers});export{Media};
2
+ //# sourceMappingURL=Media.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Media.mjs","sources":["../../../../src/components/Media/Media.tsx"],"sourcesContent":["import { MediaMatchers } from './MediaMatchers'\nimport { useMediaConnector } from './useMediaConnector'\nimport { useMediaPropsMatches } from './useMediaPropsMatches'\nimport type { MediaProps, MediaMatchersProps } from './types'\n\n/**\n *\n * Компонент для вывода контента, который зависит от медиа кверей.\n */\nconst Media: React.FC<MediaProps> & {\n Matchers: React.FC<MediaMatchersProps>\n} = Object.assign(\n (props: MediaProps) => {\n const { children, ...mediaProps } = props\n\n const breakpointsMatchers = useMediaConnector(useMediaConnector.getConfig(mediaProps))\n\n const matches = useMediaPropsMatches(mediaProps, breakpointsMatchers)\n\n if (typeof children === 'function') {\n return children(matches)\n }\n\n return matches ? children : null\n },\n {\n Matchers: MediaMatchers,\n }\n)\n\nexport { Media }\n"],"names":["Media","Object","assign","props","children","mediaProps","breakpointsMatchers","useMediaConnector","getConfig","matches","useMediaPropsMatches","Matchers","MediaMatchers"],"mappings":"mKASA,MAAMA,MAEFC,OAAOC,QACRC,IACC,MAAMC,SAAEA,KAAaC,GAAeF,EAEpC,MAAMG,EAAsBC,kBAAkBA,kBAAkBC,UAAUH,IAE1E,MAAMI,EAAUC,qBAAqBL,EAAYC,GAEjD,cAAWF,GAAa,WACfA,EAASK,GAGXA,EAAUL,EAAW,IAAI,GAElC,CACEO,SAAUC"}
@@ -0,0 +1,2 @@
1
+ 'use strict';var Observable=require('../../shared/utils/Observable.js');exports.MediaMatcher=class MediaMatcher extends Observable.Observable{constructor(e,s){super(),this.id=e,typeof window!='undefined'&&(this.mediaQueryList=window.matchMedia(s),this.mediaQueryList.addEventListener?this.mediaQueryList.addEventListener('change',(e=>{this.notify({matches:e.matches})})):this.mediaQueryList.addListener((e=>{this.notify({matches:e.matches})})))}subscribe=e=>{const s=super.subscribe.bind(this)(e);return this.mediaQueryList&&e({matches:this.mediaQueryList.matches}),s}};
2
+ //# sourceMappingURL=MediaMatcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaMatcher.js","sources":["../../../../src/components/Media/MediaMatcher.ts"],"sourcesContent":["import { Observable } from 'shared/utils/Observable'\nimport type { Observer } from 'shared/utils/Observable'\nimport type { MediaMatchPayload } from './types'\n\nexport class MediaMatcher<T = string> extends Observable<MediaMatchPayload> {\n public id: T\n private mediaQueryList?: MediaQueryList\n\n constructor(id: T, mediaQueryString: string) {\n super()\n\n this.id = id\n\n if (typeof window !== 'undefined') {\n this.mediaQueryList = window.matchMedia(mediaQueryString)\n\n if (this.mediaQueryList.addEventListener) {\n this.mediaQueryList.addEventListener('change', (evt) => {\n this.notify({\n matches: evt.matches,\n })\n })\n } else {\n this.mediaQueryList.addListener((evt) => {\n this.notify({\n matches: evt.matches,\n })\n })\n }\n }\n }\n\n public subscribe = (observer: Observer<MediaMatchPayload>) => {\n const unsubscribe = super.subscribe.bind(this)(observer)\n\n if (this.mediaQueryList) {\n observer({\n matches: this.mediaQueryList.matches,\n })\n }\n\n return unsubscribe\n }\n}\n"],"names":["MediaMatcher","Observable","constructor","id","mediaQueryString","super","this","window","mediaQueryList","matchMedia","addEventListener","evt","notify","matches","addListener","subscribe","observer","unsubscribe","bind"],"mappings":"6FAIO,MAAMA,qBAAiCC,WAAAA,WAI5CC,WAAAA,CAAYC,EAAOC,GACjBC,QAEAC,KAAKH,GAAKA,SAECI,QAAW,cACpBD,KAAKE,eAAiBD,OAAOE,WAAWL,GAEpCE,KAAKE,eAAeE,iBACtBJ,KAAKE,eAAeE,iBAAiB,UAAWC,IAC9CL,KAAKM,OAAO,CACVC,QAASF,EAAIE,SACb,IAGJP,KAAKE,eAAeM,aAAaH,IAC/BL,KAAKM,OAAO,CACVC,QAASF,EAAIE,SACb,IAIV,CAEOE,UAAaC,IAClB,MAAMC,EAAcZ,MAAMU,UAAUG,KAAKZ,KAArBD,CAA2BW,GAQ/C,OANIV,KAAKE,gBACPQ,EAAS,CACPH,QAASP,KAAKE,eAAeK,UAI1BI,CAAW"}
@@ -0,0 +1,2 @@
1
+ import{Observable}from'../../shared/utils/Observable.mjs';class MediaMatcher extends Observable{constructor(e,s){super(),this.id=e,typeof window!='undefined'&&(this.mediaQueryList=window.matchMedia(s),this.mediaQueryList.addEventListener?this.mediaQueryList.addEventListener('change',(e=>{this.notify({matches:e.matches})})):this.mediaQueryList.addListener((e=>{this.notify({matches:e.matches})})))}subscribe=e=>{const s=super.subscribe.bind(this)(e);return this.mediaQueryList&&e({matches:this.mediaQueryList.matches}),s}}export{MediaMatcher};
2
+ //# sourceMappingURL=MediaMatcher.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaMatcher.mjs","sources":["../../../../src/components/Media/MediaMatcher.ts"],"sourcesContent":["import { Observable } from 'shared/utils/Observable'\nimport type { Observer } from 'shared/utils/Observable'\nimport type { MediaMatchPayload } from './types'\n\nexport class MediaMatcher<T = string> extends Observable<MediaMatchPayload> {\n public id: T\n private mediaQueryList?: MediaQueryList\n\n constructor(id: T, mediaQueryString: string) {\n super()\n\n this.id = id\n\n if (typeof window !== 'undefined') {\n this.mediaQueryList = window.matchMedia(mediaQueryString)\n\n if (this.mediaQueryList.addEventListener) {\n this.mediaQueryList.addEventListener('change', (evt) => {\n this.notify({\n matches: evt.matches,\n })\n })\n } else {\n this.mediaQueryList.addListener((evt) => {\n this.notify({\n matches: evt.matches,\n })\n })\n }\n }\n }\n\n public subscribe = (observer: Observer<MediaMatchPayload>) => {\n const unsubscribe = super.subscribe.bind(this)(observer)\n\n if (this.mediaQueryList) {\n observer({\n matches: this.mediaQueryList.matches,\n })\n }\n\n return unsubscribe\n }\n}\n"],"names":["MediaMatcher","Observable","constructor","id","mediaQueryString","super","this","window","mediaQueryList","matchMedia","addEventListener","evt","notify","matches","addListener","subscribe","observer","unsubscribe","bind"],"mappings":"0DAIO,MAAMA,qBAAiCC,WAI5CC,WAAAA,CAAYC,EAAOC,GACjBC,QAEAC,KAAKH,GAAKA,SAECI,QAAW,cACpBD,KAAKE,eAAiBD,OAAOE,WAAWL,GAEpCE,KAAKE,eAAeE,iBACtBJ,KAAKE,eAAeE,iBAAiB,UAAWC,IAC9CL,KAAKM,OAAO,CACVC,QAASF,EAAIE,SACb,IAGJP,KAAKE,eAAeM,aAAaH,IAC/BL,KAAKM,OAAO,CACVC,QAASF,EAAIE,SACb,IAIV,CAEOE,UAAaC,IAClB,MAAMC,EAAcZ,MAAMU,UAAUG,KAAKZ,KAArBD,CAA2BW,GAQ/C,OANIV,KAAKE,gBACPQ,EAAS,CACPH,QAASP,KAAKE,eAAeK,UAI1BI,CAAW"}
@@ -0,0 +1,2 @@
1
+ 'use strict';var useMediaConnector=require('./useMediaConnector.js');exports.MediaMatchers=e=>{const{children:n}=e;return n(useMediaConnector.useMediaConnector({minXXS:!0,minXS:!0,minS:!0,minM:!0,minL:!0,minXL:!0,minXXL:!0,maxXXS:!0,maxXS:!0,maxS:!0,maxM:!0,maxL:!0,maxXL:!0,maxXXL:!0,landscape:!0,portrait:!0}))};
2
+ //# sourceMappingURL=MediaMatchers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaMatchers.js","sources":["../../../../src/components/Media/MediaMatchers.tsx"],"sourcesContent":["import { useMediaConnector } from './useMediaConnector'\nimport type { MediaMatchersProps } from './types'\n\nconst MediaMatchers: React.FC<MediaMatchersProps> = (props: MediaMatchersProps) => {\n const { children } = props\n\n const breakpointsMatchers = useMediaConnector({\n minXXS: true,\n minXS: true,\n minS: true,\n minM: true,\n minL: true,\n minXL: true,\n minXXL: true,\n maxXXS: true,\n maxXS: true,\n maxS: true,\n maxM: true,\n maxL: true,\n maxXL: true,\n maxXXL: true,\n landscape: true,\n portrait: true,\n })\n\n return children(breakpointsMatchers)\n}\n\nexport { MediaMatchers }\n"],"names":["props","children","useMediaConnector","minXXS","minXS","minS","minM","minL","minXL","minXXL","maxXXS","maxXS","maxS","maxM","maxL","maxXL","maxXXL","landscape","portrait"],"mappings":"2FAGqDA,IACnD,MAAMC,SAAEA,GAAaD,EAqBrB,OAAOC,EAnBqBC,kBAAAA,kBAAkB,CAC5CC,QAAQ,EACRC,OAAO,EACPC,MAAM,EACNC,MAAM,EACNC,MAAM,EACNC,OAAO,EACPC,QAAQ,EACRC,QAAQ,EACRC,OAAO,EACPC,MAAM,EACNC,MAAM,EACNC,MAAM,EACNC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,UAAU,IAGwB"}
@@ -0,0 +1,2 @@
1
+ import{useMediaConnector}from'./useMediaConnector.mjs';const MediaMatchers=n=>{const{children:a}=n;return a(useMediaConnector({minXXS:!0,minXS:!0,minS:!0,minM:!0,minL:!0,minXL:!0,minXXL:!0,maxXXS:!0,maxXS:!0,maxS:!0,maxM:!0,maxL:!0,maxXL:!0,maxXXL:!0,landscape:!0,portrait:!0}))};export{MediaMatchers};
2
+ //# sourceMappingURL=MediaMatchers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaMatchers.mjs","sources":["../../../../src/components/Media/MediaMatchers.tsx"],"sourcesContent":["import { useMediaConnector } from './useMediaConnector'\nimport type { MediaMatchersProps } from './types'\n\nconst MediaMatchers: React.FC<MediaMatchersProps> = (props: MediaMatchersProps) => {\n const { children } = props\n\n const breakpointsMatchers = useMediaConnector({\n minXXS: true,\n minXS: true,\n minS: true,\n minM: true,\n minL: true,\n minXL: true,\n minXXL: true,\n maxXXS: true,\n maxXS: true,\n maxS: true,\n maxM: true,\n maxL: true,\n maxXL: true,\n maxXXL: true,\n landscape: true,\n portrait: true,\n })\n\n return children(breakpointsMatchers)\n}\n\nexport { MediaMatchers }\n"],"names":["MediaMatchers","props","children","useMediaConnector","minXXS","minXS","minS","minM","minL","minXL","minXXL","maxXXS","maxXS","maxS","maxM","maxL","maxXL","maxXXL","landscape","portrait"],"mappings":"uDAGA,MAAMA,cAA+CC,IACnD,MAAMC,SAAEA,GAAaD,EAqBrB,OAAOC,EAnBqBC,kBAAkB,CAC5CC,QAAQ,EACRC,OAAO,EACPC,MAAM,EACNC,MAAM,EACNC,MAAM,EACNC,OAAO,EACPC,QAAQ,EACRC,QAAQ,EACRC,OAAO,EACPC,MAAM,EACNC,MAAM,EACNC,MAAM,EACNC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,UAAU,IAGwB"}
@@ -0,0 +1,2 @@
1
+ 'use strict';var constants=require('../../shared/constants.js');var MediaMatcher=require('./MediaMatcher.js');class MediaMediator{constructor(e){this.breakpoint={minXXL:new MediaMatcher.MediaMatcher('minXXL',MediaMediator.query.up(e.xxl)),minXL:new MediaMatcher.MediaMatcher('minXL',MediaMediator.query.up(e.xl)),minL:new MediaMatcher.MediaMatcher('minL',MediaMediator.query.up(e.l)),minM:new MediaMatcher.MediaMatcher('minM',MediaMediator.query.up(e.m)),minS:new MediaMatcher.MediaMatcher('minS',MediaMediator.query.up(e.s)),minXS:new MediaMatcher.MediaMatcher('minXS',MediaMediator.query.up(e.xs)),minXXS:new MediaMatcher.MediaMatcher('minXXS',MediaMediator.query.up(e.xxs)),maxXXL:new MediaMatcher.MediaMatcher('maxXXL',MediaMediator.query.below(e.xxl)),maxXL:new MediaMatcher.MediaMatcher('maxXL',MediaMediator.query.below(e.xl)),maxL:new MediaMatcher.MediaMatcher('maxL',MediaMediator.query.below(e.l)),maxM:new MediaMatcher.MediaMatcher('maxM',MediaMediator.query.below(e.m)),maxS:new MediaMatcher.MediaMatcher('maxS',MediaMediator.query.below(e.s)),maxXS:new MediaMatcher.MediaMatcher('maxXS',MediaMediator.query.below(e.xs)),maxXXS:new MediaMatcher.MediaMatcher('maxXXS',MediaMediator.query.below(e.xxs))},this.orientation={landscape:new MediaMatcher.MediaMatcher('landscape','(orientation: landscape)'),portrait:new MediaMatcher.MediaMatcher('portrait','(orientation: portrait)')}}get matchers(){return Object.values({...this.breakpoint,...this.orientation})}static query={up:(...e)=>`(min-width: ${e[0]}px)`,below:(...e)=>`(max-width: ${e[0]-.02}px)`};static create(e){return new MediaMediator(e?{...constants.BREAKPOINTS,...e}:constants.BREAKPOINTS)}}exports.MediaMediator=MediaMediator;
2
+ //# sourceMappingURL=MediaMediator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaMediator.js","sources":["../../../../src/components/Media/MediaMediator.ts"],"sourcesContent":["import { BREAKPOINTS } from 'shared/constants'\nimport type { Breakpoint, Orientation } from 'shared/types'\nimport { MediaMatcher } from './MediaMatcher'\nimport type { MediaBreakpoint, MediaMatcherId } from './types'\n\nexport class MediaMediator {\n public breakpoint: Record<MediaBreakpoint, MediaMatcher<MediaMatcherId>>\n public orientation: Record<Orientation, MediaMatcher<MediaMatcherId>>\n\n constructor(bps: Record<Lowercase<Breakpoint>, number>) {\n this.breakpoint = {\n minXXL: new MediaMatcher('minXXL', MediaMediator.query.up(bps.xxl)),\n minXL: new MediaMatcher('minXL', MediaMediator.query.up(bps.xl)),\n minL: new MediaMatcher('minL', MediaMediator.query.up(bps.l)),\n minM: new MediaMatcher('minM', MediaMediator.query.up(bps.m)),\n minS: new MediaMatcher('minS', MediaMediator.query.up(bps.s)),\n minXS: new MediaMatcher('minXS', MediaMediator.query.up(bps.xs)),\n minXXS: new MediaMatcher('minXXS', MediaMediator.query.up(bps.xxs)),\n maxXXL: new MediaMatcher('maxXXL', MediaMediator.query.below(bps.xxl)),\n maxXL: new MediaMatcher('maxXL', MediaMediator.query.below(bps.xl)),\n maxL: new MediaMatcher('maxL', MediaMediator.query.below(bps.l)),\n maxM: new MediaMatcher('maxM', MediaMediator.query.below(bps.m)),\n maxS: new MediaMatcher('maxS', MediaMediator.query.below(bps.s)),\n maxXS: new MediaMatcher('maxXS', MediaMediator.query.below(bps.xs)),\n maxXXS: new MediaMatcher('maxXXS', MediaMediator.query.below(bps.xxs)),\n }\n this.orientation = {\n landscape: new MediaMatcher('landscape', '(orientation: landscape)'),\n portrait: new MediaMatcher('portrait', '(orientation: portrait)'),\n }\n }\n\n get matchers() {\n return Object.values({ ...this.breakpoint, ...this.orientation })\n }\n\n static query = {\n up: (...bps: number[]) => `(min-width: ${bps[0]}px)`,\n below: (...bps: number[]) => `(max-width: ${bps[0] - 0.02}px)`,\n }\n\n static create(bps?: Partial<Record<Lowercase<Breakpoint>, number>>) {\n return new MediaMediator(bps ? { ...BREAKPOINTS, ...bps } : BREAKPOINTS)\n }\n}\n"],"names":["MediaMediator","constructor","bps","this","breakpoint","minXXL","MediaMatcher","query","up","xxl","minXL","xl","minL","l","minM","m","minS","s","minXS","xs","minXXS","xxs","maxXXL","below","maxXL","maxL","maxM","maxS","maxXS","maxXXS","orientation","landscape","portrait","matchers","Object","values","static","create","BREAKPOINTS"],"mappings":"8GAKO,MAAMA,cAIXC,WAAAA,CAAYC,GACVC,KAAKC,WAAa,CAChBC,OAAQ,IAAIC,aAAAA,aAAa,SAAUN,cAAcO,MAAMC,GAAGN,EAAIO,MAC9DC,MAAO,IAAIJ,aAAAA,aAAa,QAASN,cAAcO,MAAMC,GAAGN,EAAIS,KAC5DC,KAAM,IAAIN,aAAAA,aAAa,OAAQN,cAAcO,MAAMC,GAAGN,EAAIW,IAC1DC,KAAM,IAAIR,aAAAA,aAAa,OAAQN,cAAcO,MAAMC,GAAGN,EAAIa,IAC1DC,KAAM,IAAIV,aAAAA,aAAa,OAAQN,cAAcO,MAAMC,GAAGN,EAAIe,IAC1DC,MAAO,IAAIZ,aAAAA,aAAa,QAASN,cAAcO,MAAMC,GAAGN,EAAIiB,KAC5DC,OAAQ,IAAId,aAAAA,aAAa,SAAUN,cAAcO,MAAMC,GAAGN,EAAImB,MAC9DC,OAAQ,IAAIhB,aAAAA,aAAa,SAAUN,cAAcO,MAAMgB,MAAMrB,EAAIO,MACjEe,MAAO,IAAIlB,aAAAA,aAAa,QAASN,cAAcO,MAAMgB,MAAMrB,EAAIS,KAC/Dc,KAAM,IAAInB,aAAAA,aAAa,OAAQN,cAAcO,MAAMgB,MAAMrB,EAAIW,IAC7Da,KAAM,IAAIpB,aAAAA,aAAa,OAAQN,cAAcO,MAAMgB,MAAMrB,EAAIa,IAC7DY,KAAM,IAAIrB,aAAAA,aAAa,OAAQN,cAAcO,MAAMgB,MAAMrB,EAAIe,IAC7DW,MAAO,IAAItB,aAAAA,aAAa,QAASN,cAAcO,MAAMgB,MAAMrB,EAAIiB,KAC/DU,OAAQ,IAAIvB,aAAAA,aAAa,SAAUN,cAAcO,MAAMgB,MAAMrB,EAAImB,OAEnElB,KAAK2B,YAAc,CACjBC,UAAW,IAAIzB,aAAAA,aAAa,YAAa,4BACzC0B,SAAU,IAAI1B,0BAAa,WAAY,2BAE3C,CAEA,YAAI2B,GACF,OAAOC,OAAOC,OAAO,IAAKhC,KAAKC,cAAeD,KAAK2B,aACrD,CAEAM,aAAe,CACb5B,GAAIA,IAAIN,IAAkB,eAAeA,EAAI,QAC7CqB,MAAOA,IAAIrB,IAAkB,eAAeA,EAAI,GAAK,UAGvD,aAAOmC,CAAOnC,GACZ,OAAO,IAAIF,cAAcE,EAAM,IAAKoC,UAAAA,eAAgBpC,GAAQoC,sBAC9D"}
@@ -0,0 +1,2 @@
1
+ import{BREAKPOINTS}from'../../shared/constants.mjs';import{MediaMatcher}from'./MediaMatcher.mjs';class MediaMediator{constructor(e){this.breakpoint={minXXL:new MediaMatcher('minXXL',MediaMediator.query.up(e.xxl)),minXL:new MediaMatcher('minXL',MediaMediator.query.up(e.xl)),minL:new MediaMatcher('minL',MediaMediator.query.up(e.l)),minM:new MediaMatcher('minM',MediaMediator.query.up(e.m)),minS:new MediaMatcher('minS',MediaMediator.query.up(e.s)),minXS:new MediaMatcher('minXS',MediaMediator.query.up(e.xs)),minXXS:new MediaMatcher('minXXS',MediaMediator.query.up(e.xxs)),maxXXL:new MediaMatcher('maxXXL',MediaMediator.query.below(e.xxl)),maxXL:new MediaMatcher('maxXL',MediaMediator.query.below(e.xl)),maxL:new MediaMatcher('maxL',MediaMediator.query.below(e.l)),maxM:new MediaMatcher('maxM',MediaMediator.query.below(e.m)),maxS:new MediaMatcher('maxS',MediaMediator.query.below(e.s)),maxXS:new MediaMatcher('maxXS',MediaMediator.query.below(e.xs)),maxXXS:new MediaMatcher('maxXXS',MediaMediator.query.below(e.xxs))},this.orientation={landscape:new MediaMatcher('landscape','(orientation: landscape)'),portrait:new MediaMatcher('portrait','(orientation: portrait)')}}get matchers(){return Object.values({...this.breakpoint,...this.orientation})}static query={up:(...e)=>`(min-width: ${e[0]}px)`,below:(...e)=>`(max-width: ${e[0]-.02}px)`};static create(e){return new MediaMediator(e?{...BREAKPOINTS,...e}:BREAKPOINTS)}}export{MediaMediator};
2
+ //# sourceMappingURL=MediaMediator.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaMediator.mjs","sources":["../../../../src/components/Media/MediaMediator.ts"],"sourcesContent":["import { BREAKPOINTS } from 'shared/constants'\nimport type { Breakpoint, Orientation } from 'shared/types'\nimport { MediaMatcher } from './MediaMatcher'\nimport type { MediaBreakpoint, MediaMatcherId } from './types'\n\nexport class MediaMediator {\n public breakpoint: Record<MediaBreakpoint, MediaMatcher<MediaMatcherId>>\n public orientation: Record<Orientation, MediaMatcher<MediaMatcherId>>\n\n constructor(bps: Record<Lowercase<Breakpoint>, number>) {\n this.breakpoint = {\n minXXL: new MediaMatcher('minXXL', MediaMediator.query.up(bps.xxl)),\n minXL: new MediaMatcher('minXL', MediaMediator.query.up(bps.xl)),\n minL: new MediaMatcher('minL', MediaMediator.query.up(bps.l)),\n minM: new MediaMatcher('minM', MediaMediator.query.up(bps.m)),\n minS: new MediaMatcher('minS', MediaMediator.query.up(bps.s)),\n minXS: new MediaMatcher('minXS', MediaMediator.query.up(bps.xs)),\n minXXS: new MediaMatcher('minXXS', MediaMediator.query.up(bps.xxs)),\n maxXXL: new MediaMatcher('maxXXL', MediaMediator.query.below(bps.xxl)),\n maxXL: new MediaMatcher('maxXL', MediaMediator.query.below(bps.xl)),\n maxL: new MediaMatcher('maxL', MediaMediator.query.below(bps.l)),\n maxM: new MediaMatcher('maxM', MediaMediator.query.below(bps.m)),\n maxS: new MediaMatcher('maxS', MediaMediator.query.below(bps.s)),\n maxXS: new MediaMatcher('maxXS', MediaMediator.query.below(bps.xs)),\n maxXXS: new MediaMatcher('maxXXS', MediaMediator.query.below(bps.xxs)),\n }\n this.orientation = {\n landscape: new MediaMatcher('landscape', '(orientation: landscape)'),\n portrait: new MediaMatcher('portrait', '(orientation: portrait)'),\n }\n }\n\n get matchers() {\n return Object.values({ ...this.breakpoint, ...this.orientation })\n }\n\n static query = {\n up: (...bps: number[]) => `(min-width: ${bps[0]}px)`,\n below: (...bps: number[]) => `(max-width: ${bps[0] - 0.02}px)`,\n }\n\n static create(bps?: Partial<Record<Lowercase<Breakpoint>, number>>) {\n return new MediaMediator(bps ? { ...BREAKPOINTS, ...bps } : BREAKPOINTS)\n }\n}\n"],"names":["MediaMediator","constructor","bps","this","breakpoint","minXXL","MediaMatcher","query","up","xxl","minXL","xl","minL","l","minM","m","minS","s","minXS","xs","minXXS","xxs","maxXXL","below","maxXL","maxL","maxM","maxS","maxXS","maxXXS","orientation","landscape","portrait","matchers","Object","values","static","create","BREAKPOINTS"],"mappings":"iGAKO,MAAMA,cAIXC,WAAAA,CAAYC,GACVC,KAAKC,WAAa,CAChBC,OAAQ,IAAIC,aAAa,SAAUN,cAAcO,MAAMC,GAAGN,EAAIO,MAC9DC,MAAO,IAAIJ,aAAa,QAASN,cAAcO,MAAMC,GAAGN,EAAIS,KAC5DC,KAAM,IAAIN,aAAa,OAAQN,cAAcO,MAAMC,GAAGN,EAAIW,IAC1DC,KAAM,IAAIR,aAAa,OAAQN,cAAcO,MAAMC,GAAGN,EAAIa,IAC1DC,KAAM,IAAIV,aAAa,OAAQN,cAAcO,MAAMC,GAAGN,EAAIe,IAC1DC,MAAO,IAAIZ,aAAa,QAASN,cAAcO,MAAMC,GAAGN,EAAIiB,KAC5DC,OAAQ,IAAId,aAAa,SAAUN,cAAcO,MAAMC,GAAGN,EAAImB,MAC9DC,OAAQ,IAAIhB,aAAa,SAAUN,cAAcO,MAAMgB,MAAMrB,EAAIO,MACjEe,MAAO,IAAIlB,aAAa,QAASN,cAAcO,MAAMgB,MAAMrB,EAAIS,KAC/Dc,KAAM,IAAInB,aAAa,OAAQN,cAAcO,MAAMgB,MAAMrB,EAAIW,IAC7Da,KAAM,IAAIpB,aAAa,OAAQN,cAAcO,MAAMgB,MAAMrB,EAAIa,IAC7DY,KAAM,IAAIrB,aAAa,OAAQN,cAAcO,MAAMgB,MAAMrB,EAAIe,IAC7DW,MAAO,IAAItB,aAAa,QAASN,cAAcO,MAAMgB,MAAMrB,EAAIiB,KAC/DU,OAAQ,IAAIvB,aAAa,SAAUN,cAAcO,MAAMgB,MAAMrB,EAAImB,OAEnElB,KAAK2B,YAAc,CACjBC,UAAW,IAAIzB,aAAa,YAAa,4BACzC0B,SAAU,IAAI1B,aAAa,WAAY,2BAE3C,CAEA,YAAI2B,GACF,OAAOC,OAAOC,OAAO,IAAKhC,KAAKC,cAAeD,KAAK2B,aACrD,CAEAM,aAAe,CACb5B,GAAIA,IAAIN,IAAkB,eAAeA,EAAI,QAC7CqB,MAAOA,IAAIrB,IAAkB,eAAeA,EAAI,GAAK,UAGvD,aAAOmC,CAAOnC,GACZ,OAAO,IAAIF,cAAcE,EAAM,IAAKoC,eAAgBpC,GAAQoC,YAC9D"}
@@ -0,0 +1,2 @@
1
+ 'use strict';var React=require('react');var jsxRuntime=require('react/jsx-runtime');const MediaContext=React.createContext(null);exports.MediaContext=MediaContext,exports.MediaProvider=e=>{const{value:t,children:r}=e;return jsxRuntime.jsx(MediaContext.Provider,{value:t,children:r})};
2
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sources":["../../../../src/components/Media/context.tsx"],"sourcesContent":["import { createContext } from 'react'\nimport type { MediaMediator } from './MediaMediator'\n\nexport const MediaContext = createContext<MediaMediator | null>(null)\n\nexport const MediaProvider = (\n props: React.PropsWithChildren<{\n value: MediaMediator\n }>\n) => {\n const { value, children } = props\n\n return <MediaContext.Provider value={value}>{children}</MediaContext.Provider>\n}\n"],"names":["MediaContext","createContext","props","value","children","_jsx","Provider"],"mappings":"0FAGaA,aAAeC,MAAAA,cAAoC,8DAG9DC,IAIA,MAAMC,MAAEA,EAAKC,SAAEA,GAAaF,EAE5B,OAAOG,WAAAA,IAACL,aAAaM,SAAQ,CAACH,MAAOA,EAAMC,SAAEA,GAAiC"}
@@ -0,0 +1,2 @@
1
+ import{createContext}from'react';import{jsx}from'react/jsx-runtime';const MediaContext=createContext(null);const MediaProvider=e=>{const{value:t,children:r}=e;return jsx(MediaContext.Provider,{value:t,children:r})};export{MediaContext,MediaProvider};
2
+ //# sourceMappingURL=context.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.mjs","sources":["../../../../src/components/Media/context.tsx"],"sourcesContent":["import { createContext } from 'react'\nimport type { MediaMediator } from './MediaMediator'\n\nexport const MediaContext = createContext<MediaMediator | null>(null)\n\nexport const MediaProvider = (\n props: React.PropsWithChildren<{\n value: MediaMediator\n }>\n) => {\n const { value, children } = props\n\n return <MediaContext.Provider value={value}>{children}</MediaContext.Provider>\n}\n"],"names":["MediaContext","createContext","MediaProvider","props","value","children","_jsx","Provider"],"mappings":"0EAGaA,aAAeC,cAAoC,MAEzD,MAAMC,cACXC,IAIA,MAAMC,MAAEA,EAAKC,SAAEA,GAAaF,EAE5B,OAAOG,IAACN,aAAaO,SAAQ,CAACH,MAAOA,EAAMC,SAAEA,GAAiC"}
@@ -0,0 +1,2 @@
1
+ 'use strict';var React=require('react');var useMountedStatus=require('../../hooks/useMountedStatus.js');var context=require('./context.js');const useMediaConnector=Object.assign(((a={})=>{const{minXXS:n,minXS:e,minS:o,minM:t,minL:m,minXL:i,minXXL:X,maxXXS:s,maxXS:r,maxS:c,maxM:x,maxL:u,maxXL:S,maxXXL:l,landscape:L,portrait:B}=a;const M=React.useContext(context.MediaContext);const[d,p]=React.useState(Object.create(null));const f=useMountedStatus.useMountedStatus();return React.useLayoutEffect((()=>{const a={minXXS:Boolean(n),minXS:Boolean(e),minS:Boolean(o),minM:Boolean(t),minL:Boolean(m),minXL:Boolean(i),minXXL:Boolean(X),maxXXS:Boolean(s),maxXS:Boolean(r),maxS:Boolean(c),maxM:Boolean(x),maxL:Boolean(u),maxXL:Boolean(S),maxXXL:Boolean(l),landscape:Boolean(L),portrait:Boolean(B)};const d=[];return M&&M.matchers.filter((n=>a[n.id])).forEach((a=>{const n=a.subscribe((n=>{p((e=>({...e,[a.id]:n.matches})))}));d.push(n)})),()=>{d.forEach((a=>{a()})),f()&&p(Object.create(null))}}),[M,n,e,o,t,m,i,X,s,r,c,x,u,S,l,L,B,f]),d}),{getConfig:(a={})=>({minXXS:a.min==='XXS',minXS:a.min==='XS',minS:a.min==='S',minM:a.min==='M',minL:a.min==='L',minXL:a.min==='XL',minXXL:a.min==='XXL',maxXXS:a.max==='XXS',maxXS:a.max==='XS',maxS:a.max==='S',maxM:a.max==='M',maxL:a.max==='L',maxXL:a.max==='XL',maxXXL:a.max==='XXL',landscape:a.orientation==='landscape',portrait:a.orientation==='portrait'})});exports.useMediaConnector=useMediaConnector;
2
+ //# sourceMappingURL=useMediaConnector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMediaConnector.js","sources":["../../../../src/components/Media/useMediaConnector.ts"],"sourcesContent":["import { useState, useContext, useLayoutEffect } from 'react'\nimport { useMountedStatus } from 'hooks/useMountedStatus'\nimport type { UnsubscribeObserverCallback } from 'shared/utils/Observable'\nimport type { MediaMatcherId, MediaConnectorConfig, MediaConnectorGetConfigOptions } from './types'\nimport { MediaContext } from './context'\n\nexport const useMediaConnector = Object.assign(\n (config: Partial<MediaConnectorConfig> = {}): Partial<Record<MediaMatcherId, boolean>> => {\n const {\n minXXS,\n minXS,\n minS,\n minM,\n minL,\n minXL,\n minXXL,\n maxXXS,\n maxXS,\n maxS,\n maxM,\n maxL,\n maxXL,\n maxXXL,\n landscape,\n portrait,\n } = config\n\n const mediator = useContext(MediaContext)\n\n const [breakpointsMatches, setBreakpointsMatches] = useState<Partial<Record<MediaMatcherId, boolean>>>(\n Object.create(null)\n )\n\n const getMountedStatus = useMountedStatus()\n\n useLayoutEffect(() => {\n const connectToMatcher: Record<MediaMatcherId, boolean> = {\n minXXS: Boolean(minXXS),\n minXS: Boolean(minXS),\n minS: Boolean(minS),\n minM: Boolean(minM),\n minL: Boolean(minL),\n minXL: Boolean(minXL),\n minXXL: Boolean(minXXL),\n maxXXS: Boolean(maxXXS),\n maxXS: Boolean(maxXS),\n maxS: Boolean(maxS),\n maxM: Boolean(maxM),\n maxL: Boolean(maxL),\n maxXL: Boolean(maxXL),\n maxXXL: Boolean(maxXXL),\n landscape: Boolean(landscape),\n portrait: Boolean(portrait),\n }\n\n const unsubscribeCallbacks: UnsubscribeObserverCallback[] = []\n\n if (mediator) {\n mediator.matchers\n .filter((matcher) => connectToMatcher[matcher.id])\n .forEach((matcher) => {\n const unsubscribe = matcher.subscribe((payload) => {\n setBreakpointsMatches((prev) => ({ ...prev, [matcher.id]: payload.matches }))\n })\n\n unsubscribeCallbacks.push(unsubscribe)\n })\n }\n\n return () => {\n unsubscribeCallbacks.forEach((callback) => {\n callback()\n })\n\n if (getMountedStatus()) {\n setBreakpointsMatches(Object.create(null))\n }\n }\n }, [\n mediator,\n minXXS,\n minXS,\n minS,\n minM,\n minL,\n minXL,\n minXXL,\n maxXXS,\n maxXS,\n maxS,\n maxM,\n maxL,\n maxXL,\n maxXXL,\n landscape,\n portrait,\n getMountedStatus,\n ])\n\n return breakpointsMatches\n },\n {\n getConfig: (options: MediaConnectorGetConfigOptions = {}): MediaConnectorConfig => ({\n minXXS: options.min === 'XXS',\n minXS: options.min === 'XS',\n minS: options.min === 'S',\n minM: options.min === 'M',\n minL: options.min === 'L',\n minXL: options.min === 'XL',\n minXXL: options.min === 'XXL',\n maxXXS: options.max === 'XXS',\n maxXS: options.max === 'XS',\n maxS: options.max === 'S',\n maxM: options.max === 'M',\n maxL: options.max === 'L',\n maxXL: options.max === 'XL',\n maxXXL: options.max === 'XXL',\n landscape: options.orientation === 'landscape',\n portrait: options.orientation === 'portrait',\n }),\n }\n)\n"],"names":["useMediaConnector","Object","assign","config","minXXS","minXS","minS","minM","minL","minXL","minXXL","maxXXS","maxXS","maxS","maxM","maxL","maxXL","maxXXL","landscape","portrait","mediator","useContext","MediaContext","breakpointsMatches","setBreakpointsMatches","useState","create","getMountedStatus","useMountedStatus","useLayoutEffect","connectToMatcher","Boolean","unsubscribeCallbacks","matchers","filter","matcher","id","forEach","unsubscribe","subscribe","payload","prev","matches","push","callback","getConfig","options","min","max","orientation"],"mappings":"4IAMO,MAAMA,kBAAoBC,OAAOC,QACtC,CAACC,EAAwC,CAAA,KACvC,MAAMC,OACJA,EAAMC,MACNA,EAAKC,KACLA,EAAIC,KACJA,EAAIC,KACJA,EAAIC,MACJA,EAAKC,OACLA,EAAMC,OACNA,EAAMC,MACNA,EAAKC,KACLA,EAAIC,KACJA,EAAIC,KACJA,EAAIC,MACJA,EAAKC,OACLA,EAAMC,UACNA,EAASC,SACTA,GACEhB,EAEJ,MAAMiB,EAAWC,MAAAA,WAAWC,sBAE5B,MAAOC,EAAoBC,GAAyBC,MAAAA,SAClDxB,OAAOyB,OAAO,OAGhB,MAAMC,EAAmBC,iBAAAA,mBAkEzB,OAhEAC,MAAAA,iBAAgB,KACd,MAAMC,EAAoD,CACxD1B,OAAQ2B,QAAQ3B,GAChBC,MAAO0B,QAAQ1B,GACfC,KAAMyB,QAAQzB,GACdC,KAAMwB,QAAQxB,GACdC,KAAMuB,QAAQvB,GACdC,MAAOsB,QAAQtB,GACfC,OAAQqB,QAAQrB,GAChBC,OAAQoB,QAAQpB,GAChBC,MAAOmB,QAAQnB,GACfC,KAAMkB,QAAQlB,GACdC,KAAMiB,QAAQjB,GACdC,KAAMgB,QAAQhB,GACdC,MAAOe,QAAQf,GACfC,OAAQc,QAAQd,GAChBC,UAAWa,QAAQb,GACnBC,SAAUY,QAAQZ,IAGpB,MAAMa,EAAsD,GAc5D,OAZIZ,GACFA,EAASa,SACNC,QAAQC,GAAYL,EAAiBK,EAAQC,MAC7CC,SAASF,IACR,MAAMG,EAAcH,EAAQI,WAAWC,IACrChB,GAAuBiB,IAAI,IAAWA,EAAM,CAACN,EAAQC,IAAKI,EAAQE,WAAW,IAG/EV,EAAqBW,KAAKL,EAAY,IAIrC,KACLN,EAAqBK,SAASO,IAC5BA,GAAU,IAGRjB,KACFH,EAAsBvB,OAAOyB,OAAO,MACtC,CACD,GACA,CACDN,EACAhB,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAQ,IAGKJ,CAAkB,GAE3B,CACEsB,UAAWA,CAACC,EAA0C,MAAE,CACtD1C,OAAQ0C,EAAQC,MAAQ,MACxB1C,MAAOyC,EAAQC,MAAQ,KACvBzC,KAAMwC,EAAQC,MAAQ,IACtBxC,KAAMuC,EAAQC,MAAQ,IACtBvC,KAAMsC,EAAQC,MAAQ,IACtBtC,MAAOqC,EAAQC,MAAQ,KACvBrC,OAAQoC,EAAQC,MAAQ,MACxBpC,OAAQmC,EAAQE,MAAQ,MACxBpC,MAAOkC,EAAQE,MAAQ,KACvBnC,KAAMiC,EAAQE,MAAQ,IACtBlC,KAAMgC,EAAQE,MAAQ,IACtBjC,KAAM+B,EAAQE,MAAQ,IACtBhC,MAAO8B,EAAQE,MAAQ,KACvB/B,OAAQ6B,EAAQE,MAAQ,MACxB9B,UAAW4B,EAAQG,cAAgB,YACnC9B,SAAU2B,EAAQG,cAAgB"}
@@ -0,0 +1,2 @@
1
+ import{useContext,useState,useLayoutEffect}from'react';import{useMountedStatus}from'../../hooks/useMountedStatus.mjs';import{MediaContext}from'./context.mjs';const useMediaConnector=Object.assign(((n={})=>{const{minXXS:a,minXS:o,minS:e,minM:m,minL:t,minXL:i,minXXL:X,maxXXS:s,maxXS:x,maxS:r,maxM:S,maxL:c,maxXL:L,maxXXL:l,landscape:u,portrait:B}=n;const M=useContext(MediaContext);const[d,p]=useState(Object.create(null));const f=useMountedStatus();return useLayoutEffect((()=>{const n={minXXS:Boolean(a),minXS:Boolean(o),minS:Boolean(e),minM:Boolean(m),minL:Boolean(t),minXL:Boolean(i),minXXL:Boolean(X),maxXXS:Boolean(s),maxXS:Boolean(x),maxS:Boolean(r),maxM:Boolean(S),maxL:Boolean(c),maxXL:Boolean(L),maxXXL:Boolean(l),landscape:Boolean(u),portrait:Boolean(B)};const d=[];return M&&M.matchers.filter((a=>n[a.id])).forEach((n=>{const a=n.subscribe((a=>{p((o=>({...o,[n.id]:a.matches})))}));d.push(a)})),()=>{d.forEach((n=>{n()})),f()&&p(Object.create(null))}}),[M,a,o,e,m,t,i,X,s,x,r,S,c,L,l,u,B,f]),d}),{getConfig:(n={})=>({minXXS:n.min==='XXS',minXS:n.min==='XS',minS:n.min==='S',minM:n.min==='M',minL:n.min==='L',minXL:n.min==='XL',minXXL:n.min==='XXL',maxXXS:n.max==='XXS',maxXS:n.max==='XS',maxS:n.max==='S',maxM:n.max==='M',maxL:n.max==='L',maxXL:n.max==='XL',maxXXL:n.max==='XXL',landscape:n.orientation==='landscape',portrait:n.orientation==='portrait'})});export{useMediaConnector};
2
+ //# sourceMappingURL=useMediaConnector.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMediaConnector.mjs","sources":["../../../../src/components/Media/useMediaConnector.ts"],"sourcesContent":["import { useState, useContext, useLayoutEffect } from 'react'\nimport { useMountedStatus } from 'hooks/useMountedStatus'\nimport type { UnsubscribeObserverCallback } from 'shared/utils/Observable'\nimport type { MediaMatcherId, MediaConnectorConfig, MediaConnectorGetConfigOptions } from './types'\nimport { MediaContext } from './context'\n\nexport const useMediaConnector = Object.assign(\n (config: Partial<MediaConnectorConfig> = {}): Partial<Record<MediaMatcherId, boolean>> => {\n const {\n minXXS,\n minXS,\n minS,\n minM,\n minL,\n minXL,\n minXXL,\n maxXXS,\n maxXS,\n maxS,\n maxM,\n maxL,\n maxXL,\n maxXXL,\n landscape,\n portrait,\n } = config\n\n const mediator = useContext(MediaContext)\n\n const [breakpointsMatches, setBreakpointsMatches] = useState<Partial<Record<MediaMatcherId, boolean>>>(\n Object.create(null)\n )\n\n const getMountedStatus = useMountedStatus()\n\n useLayoutEffect(() => {\n const connectToMatcher: Record<MediaMatcherId, boolean> = {\n minXXS: Boolean(minXXS),\n minXS: Boolean(minXS),\n minS: Boolean(minS),\n minM: Boolean(minM),\n minL: Boolean(minL),\n minXL: Boolean(minXL),\n minXXL: Boolean(minXXL),\n maxXXS: Boolean(maxXXS),\n maxXS: Boolean(maxXS),\n maxS: Boolean(maxS),\n maxM: Boolean(maxM),\n maxL: Boolean(maxL),\n maxXL: Boolean(maxXL),\n maxXXL: Boolean(maxXXL),\n landscape: Boolean(landscape),\n portrait: Boolean(portrait),\n }\n\n const unsubscribeCallbacks: UnsubscribeObserverCallback[] = []\n\n if (mediator) {\n mediator.matchers\n .filter((matcher) => connectToMatcher[matcher.id])\n .forEach((matcher) => {\n const unsubscribe = matcher.subscribe((payload) => {\n setBreakpointsMatches((prev) => ({ ...prev, [matcher.id]: payload.matches }))\n })\n\n unsubscribeCallbacks.push(unsubscribe)\n })\n }\n\n return () => {\n unsubscribeCallbacks.forEach((callback) => {\n callback()\n })\n\n if (getMountedStatus()) {\n setBreakpointsMatches(Object.create(null))\n }\n }\n }, [\n mediator,\n minXXS,\n minXS,\n minS,\n minM,\n minL,\n minXL,\n minXXL,\n maxXXS,\n maxXS,\n maxS,\n maxM,\n maxL,\n maxXL,\n maxXXL,\n landscape,\n portrait,\n getMountedStatus,\n ])\n\n return breakpointsMatches\n },\n {\n getConfig: (options: MediaConnectorGetConfigOptions = {}): MediaConnectorConfig => ({\n minXXS: options.min === 'XXS',\n minXS: options.min === 'XS',\n minS: options.min === 'S',\n minM: options.min === 'M',\n minL: options.min === 'L',\n minXL: options.min === 'XL',\n minXXL: options.min === 'XXL',\n maxXXS: options.max === 'XXS',\n maxXS: options.max === 'XS',\n maxS: options.max === 'S',\n maxM: options.max === 'M',\n maxL: options.max === 'L',\n maxXL: options.max === 'XL',\n maxXXL: options.max === 'XXL',\n landscape: options.orientation === 'landscape',\n portrait: options.orientation === 'portrait',\n }),\n }\n)\n"],"names":["useMediaConnector","Object","assign","config","minXXS","minXS","minS","minM","minL","minXL","minXXL","maxXXS","maxXS","maxS","maxM","maxL","maxXL","maxXXL","landscape","portrait","mediator","useContext","MediaContext","breakpointsMatches","setBreakpointsMatches","useState","create","getMountedStatus","useMountedStatus","useLayoutEffect","connectToMatcher","Boolean","unsubscribeCallbacks","matchers","filter","matcher","id","forEach","unsubscribe","subscribe","payload","prev","matches","push","callback","getConfig","options","min","max","orientation"],"mappings":"8JAMO,MAAMA,kBAAoBC,OAAOC,QACtC,CAACC,EAAwC,CAAA,KACvC,MAAMC,OACJA,EAAMC,MACNA,EAAKC,KACLA,EAAIC,KACJA,EAAIC,KACJA,EAAIC,MACJA,EAAKC,OACLA,EAAMC,OACNA,EAAMC,MACNA,EAAKC,KACLA,EAAIC,KACJA,EAAIC,KACJA,EAAIC,MACJA,EAAKC,OACLA,EAAMC,UACNA,EAASC,SACTA,GACEhB,EAEJ,MAAMiB,EAAWC,WAAWC,cAE5B,MAAOC,EAAoBC,GAAyBC,SAClDxB,OAAOyB,OAAO,OAGhB,MAAMC,EAAmBC,mBAkEzB,OAhEAC,iBAAgB,KACd,MAAMC,EAAoD,CACxD1B,OAAQ2B,QAAQ3B,GAChBC,MAAO0B,QAAQ1B,GACfC,KAAMyB,QAAQzB,GACdC,KAAMwB,QAAQxB,GACdC,KAAMuB,QAAQvB,GACdC,MAAOsB,QAAQtB,GACfC,OAAQqB,QAAQrB,GAChBC,OAAQoB,QAAQpB,GAChBC,MAAOmB,QAAQnB,GACfC,KAAMkB,QAAQlB,GACdC,KAAMiB,QAAQjB,GACdC,KAAMgB,QAAQhB,GACdC,MAAOe,QAAQf,GACfC,OAAQc,QAAQd,GAChBC,UAAWa,QAAQb,GACnBC,SAAUY,QAAQZ,IAGpB,MAAMa,EAAsD,GAc5D,OAZIZ,GACFA,EAASa,SACNC,QAAQC,GAAYL,EAAiBK,EAAQC,MAC7CC,SAASF,IACR,MAAMG,EAAcH,EAAQI,WAAWC,IACrChB,GAAuBiB,IAAI,IAAWA,EAAM,CAACN,EAAQC,IAAKI,EAAQE,WAAW,IAG/EV,EAAqBW,KAAKL,EAAY,IAIrC,KACLN,EAAqBK,SAASO,IAC5BA,GAAU,IAGRjB,KACFH,EAAsBvB,OAAOyB,OAAO,MACtC,CACD,GACA,CACDN,EACAhB,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAQ,IAGKJ,CAAkB,GAE3B,CACEsB,UAAWA,CAACC,EAA0C,MAAE,CACtD1C,OAAQ0C,EAAQC,MAAQ,MACxB1C,MAAOyC,EAAQC,MAAQ,KACvBzC,KAAMwC,EAAQC,MAAQ,IACtBxC,KAAMuC,EAAQC,MAAQ,IACtBvC,KAAMsC,EAAQC,MAAQ,IACtBtC,MAAOqC,EAAQC,MAAQ,KACvBrC,OAAQoC,EAAQC,MAAQ,MACxBpC,OAAQmC,EAAQE,MAAQ,MACxBpC,MAAOkC,EAAQE,MAAQ,KACvBnC,KAAMiC,EAAQE,MAAQ,IACtBlC,KAAMgC,EAAQE,MAAQ,IACtBjC,KAAM+B,EAAQE,MAAQ,IACtBhC,MAAO8B,EAAQE,MAAQ,KACvB/B,OAAQ6B,EAAQE,MAAQ,MACxB9B,UAAW4B,EAAQG,cAAgB,YACnC9B,SAAU2B,EAAQG,cAAgB"}
@@ -0,0 +1,2 @@
1
+ 'use strict';exports.useMediaPropsMatches=(i,n)=>!(!(i.orientation||i.min||i.max)||i.orientation&&!n[i.orientation]||i.min&&!n[`min${i.min}`]||i.max&&!n[`max${i.max}`]);
2
+ //# sourceMappingURL=useMediaPropsMatches.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMediaPropsMatches.js","sources":["../../../../src/components/Media/useMediaPropsMatches.ts"],"sourcesContent":["import type { useMediaConnector } from './useMediaConnector'\nimport type { MediaProps } from './types'\n\nexport const useMediaPropsMatches = (\n props: Omit<MediaProps, 'children'>,\n matchers: ReturnType<typeof useMediaConnector>\n): boolean => {\n if (!props.orientation && !props.min && !props.max) {\n return false\n }\n\n if (props.orientation && !matchers[props.orientation]) {\n return false\n }\n\n if (props.min && !matchers[`min${props.min}`]) {\n return false\n }\n\n if (props.max && !matchers[`max${props.max}`]) {\n return false\n }\n\n return true\n}\n"],"names":["useMediaPropsMatches","props","matchers","orientation","min","max"],"mappings":"0CAGoCA,CAClCC,EACAC,QAEKD,EAAME,aAAgBF,EAAMG,KAAQH,EAAMI,MAI3CJ,EAAME,cAAgBD,EAASD,EAAME,cAIrCF,EAAMG,MAAQF,EAAS,MAAMD,EAAMG,QAInCH,EAAMI,MAAQH,EAAS,MAAMD,EAAMI"}
@@ -0,0 +1,2 @@
1
+ const useMediaPropsMatches=(i,a)=>!(!(i.orientation||i.min||i.max)||i.orientation&&!a[i.orientation]||i.min&&!a[`min${i.min}`]||i.max&&!a[`max${i.max}`]);export{useMediaPropsMatches};
2
+ //# sourceMappingURL=useMediaPropsMatches.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMediaPropsMatches.mjs","sources":["../../../../src/components/Media/useMediaPropsMatches.ts"],"sourcesContent":["import type { useMediaConnector } from './useMediaConnector'\nimport type { MediaProps } from './types'\n\nexport const useMediaPropsMatches = (\n props: Omit<MediaProps, 'children'>,\n matchers: ReturnType<typeof useMediaConnector>\n): boolean => {\n if (!props.orientation && !props.min && !props.max) {\n return false\n }\n\n if (props.orientation && !matchers[props.orientation]) {\n return false\n }\n\n if (props.min && !matchers[`min${props.min}`]) {\n return false\n }\n\n if (props.max && !matchers[`max${props.max}`]) {\n return false\n }\n\n return true\n}\n"],"names":["useMediaPropsMatches","props","matchers","orientation","min","max"],"mappings":"MAGaA,qBAAuBA,CAClCC,EACAC,QAEKD,EAAME,aAAgBF,EAAMG,KAAQH,EAAMI,MAI3CJ,EAAME,cAAgBD,EAASD,EAAME,cAIrCF,EAAMG,MAAQF,EAAS,MAAMD,EAAMG,QAInCH,EAAMI,MAAQH,EAAS,MAAMD,EAAMI"}
package/dts/index.d.ts CHANGED
@@ -884,7 +884,8 @@ type CSSVerticalAlign = CSSGlobalValue | 'baseline' | 'sub' | 'super' | 'text-to
884
884
  type CSSFontWeight = CSSGlobalValue | 'normal' | 'bold' | 'lighter' | 'bolder' | number;
885
885
  type Size$o = 'xxxl' | 'xxl' | 'xl' | 'l' | 'm' | 's' | 'xs' | 'xxs' | 'xxxs';
886
886
  type SizeValue$1 = Size$o | CSSGlobalValue | number;
887
- type Breakpoint = 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL';
887
+ type Breakpoint$1 = 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL' | 'XXL';
888
+ type Orientation = 'landscape' | 'portrait';
888
889
  type Color = keyof typeof ColorNames | CSSColor;
889
890
  type ColorPaletteKey = 'color' | `color${string}` | `${string}Color` | `${string}Color${string}`;
890
891
  type ThemePreset = 'default' | 'brand';
@@ -916,7 +917,7 @@ type InputMaskOptions = {
916
917
  formatChars: Record<string, string>;
917
918
  permanents: number[];
918
919
  };
919
- type ResponsiveProps<K extends ResponsivePropKey, V> = Partial<Record<K, V | [DESKTOP: V, TABLET: V, MOBILE: V] | [XL: V, L: V, M: V, S: V, XS: V, XXS: V]> & Record<`${K}${Breakpoint}`, V>>;
920
+ type ResponsiveProps<K extends ResponsivePropKey, V> = Partial<Record<K, V | [DESKTOP: V, TABLET: V, MOBILE: V] | [XL: V, L: V, M: V, S: V, XS: V, XXS: V]> & Record<`${K}${Exclude<Breakpoint$1, 'XXL'>}`, V>>;
920
921
  type ResponsiveSizeProps<S extends string, V = S> = ResponsiveProps<'size', V> & {
921
922
  sizeUnits?: CSSUnit;
922
923
  sizes?: Partial<Record<S, CSSProperties>>;
@@ -7651,7 +7652,7 @@ declare const TabList: React.ForwardRefExoticComponent<TabListProps> & {
7651
7652
  };
7652
7653
 
7653
7654
  interface Theme {
7654
- breakpoints: Readonly<Record<Lowercase<Breakpoint>, number>>;
7655
+ breakpoints: Readonly<Record<Lowercase<Breakpoint$1>, number>>;
7655
7656
  iconsAssetHost?: string;
7656
7657
  colors: Record<keyof typeof ColorNames, CSSColor>;
7657
7658
  borderRadius: string;
@@ -10617,4 +10618,83 @@ type AddElementProps = AddElementBaseProps & Omit<React.ComponentPropsWithRef<'b
10617
10618
  */
10618
10619
  declare const AddElement: React.ForwardRefExoticComponent<AddElementProps>;
10619
10620
 
10620
- export { Accordion, type AccordionItemProps, type AccordionProps, ActionBtn, type ActionBtnProps, AddElement, type AddElementProps, Alert, type AlertProps, Amount, type AmountProps, Anchor, Arrow, ArrowBadge, type ArrowBadgeProps, type ArrowProps, AspectRatio, type AspectRatioProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BaseProps, type Breakpoint, Button, type ButtonProps, COUNTRY_DATA, type CSSBorderStyle, type CSSColor, type CSSFontWeight, type CSSGlobalValue, type CSSUnit, type CSSVerticalAlign, CURRENCY_MAP, Checkbox, type CheckboxProps, Chip, type ChipProps, type Color, ColorNames, type ColorPaletteKey, Container, type ContainerProps, ContextMenu, type ContextMenuMultiLevelProps, type ContextMenuProps, CurrencyCodes, DEFAULT_MASK, Dialog, type DialogComponentProps, type DialogProps, type DividerProps, type DomTarget, Dropdown, type DropdownProps, FormLabel, type FormLabelProps, type HEX, INITIAL_MASK, Icon, IconButton, type IconButtonProps, type IconISOCode, type IconName, type IconProps, Indicator, type IndicatorProps, Input, type InputCheckboxProps, type InputMaskOptions, type InputMaskState, type InputPhoneProps, type InputProps, type InputRadioProps, type KeysOfUnion, ListItem, type ListItemProps, Menu, type MenuComponentProps, type MenuContainerProps, type MenuDividerProps, type MenuListProps, type MenuProps, Modal, type ModalProps, Notification, type NotificationProps, type Nullable, Paper, type PaperProps, type PlaygroundToolbar, Popover, type PopoverComponentProps, type PopoverProps, Progress, ProgressCircle$1 as ProgressCircle, type ProgressCircleProps$1 as ProgressCircleProps, ProgressLine, type ProgressLineProps, type ProgressProps, type ProgressSegmentedProps, type RGB, type RGBA, Radio, type RadioProps, type ResponsiveLayoutInterpolationProps, type ResponsiveLayoutProps, type ResponsivePositionProps, type ResponsivePropKey, type ResponsiveProps, type ResponsiveSizeInterpolationProps, type ResponsiveSizeProps, withThemeScrollable as Scrollable, type ScrollableProps, Section, type SectionProps, Select, type SelectProps, Separator, type SeparatorProps, type Size$o as Size, type SizeValue$1 as SizeValue, Skeleton, type SkeletonProps, Spacer, type SpacerProps, Spinner, type SpinnerProps, Switch, type SwitchProps, Switcher, type SwitcherProps, Tab, TabList, type TabListPanelProps, type TabListProps, type TabListTabProps, type TabProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextEllipseProps, type TextHeadingProps, type TextProps, Textarea, type TextareaProps, type Theme, type ThemeMode, type ThemeName, type ThemePreset, ThemeProvider, type ToolbarControl, Tooltip, type TooltipComponentProps, type TooltipProps, type WithMergedPropsOptions, type WithThemePreset, type WrappedComponentProps, adultDarkTheme, adultLightTheme, babyDarkTheme, babyLightTheme, baseInputStyle, buildMediaQuery, color, desktopFirst, getDarkHoverColor, getDarkStrongHoverColor, getLightHoverColor, getLightStrongHoverColor, hexToRgbA, isHex, mobileFirst, motherDarkTheme, motherLightTheme, property, responsiveNamedProperty, responsiveProperty, screenL, screenM, screenMaxL, screenMaxM, screenMaxS, screenMaxXl, screenMaxXs, screenMaxXxs, screenMinL, screenMinM, screenMinS, screenMinXl, screenMinXs, screenRetina, screenS, screenXl, screenXs, teenDarkTheme, teenLightTheme, defaultTheme as theme, useClickOutside, useScrollLock, useScrollMonitor, vAlign };
10621
+ type Breakpoint = 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL' | 'XXL';
10622
+ interface MediaProps {
10623
+ /**
10624
+ * Вывод контента, который зависит от медиа кверей.
10625
+ *
10626
+ * Если передана рендер функция, то она будет вызвана с булевым аргументом.
10627
+ *
10628
+ * Значение аргумента говорит о том, совпадают ли характеристики вьюпорта с переданными пропсами.
10629
+ */
10630
+ children: React.ReactElement | ((matches: boolean) => React.ReactElement | null);
10631
+ /**
10632
+ * Минимальная ширина вьюпорта для вывода контента.
10633
+ */
10634
+ min?: Breakpoint;
10635
+ /**
10636
+ * Максимальная ширина вьюпорта для вывода контента.
10637
+ */
10638
+ max?: Breakpoint;
10639
+ /**
10640
+ * Вывод контента при определенной ориентации вьюпорта.
10641
+ */
10642
+ orientation?: 'landscape' | 'portrait';
10643
+ }
10644
+ interface MediaMatchersProps {
10645
+ /**
10646
+ * Рендер функция для вывода контента.
10647
+ *
10648
+ * Будет вызвана с мапой медиа матчеров и булевых значений.
10649
+ *
10650
+ * Такие значения говорят о том, совпадают ли характеристики вьюпорта с медиа кверями матчеров.
10651
+ */
10652
+ children: (matchers: Partial<Record<MediaMatcherId, boolean>>) => React.ReactElement | null;
10653
+ }
10654
+ type MediaMatchPayload = {
10655
+ matches: boolean;
10656
+ };
10657
+ type MediaBreakpoint = `${'min' | 'max'}${Breakpoint}`;
10658
+ type MediaMatcherId = MediaBreakpoint | Orientation;
10659
+
10660
+ /**
10661
+ *
10662
+ * Компонент для вывода контента, который зависит от медиа кверей.
10663
+ */
10664
+ declare const Media: React.FC<MediaProps> & {
10665
+ Matchers: React.FC<MediaMatchersProps>;
10666
+ };
10667
+
10668
+ type Observer<T> = (payload: T) => unknown;
10669
+ type UnsubscribeObserverCallback = () => void;
10670
+ declare class Observable<T> {
10671
+ private observers;
10672
+ protected notify: (payload: T) => void;
10673
+ subscribe(observer: Observer<T>): UnsubscribeObserverCallback;
10674
+ unsubscribe: (observer: Observer<T>) => void;
10675
+ }
10676
+
10677
+ declare class MediaMatcher<T = string> extends Observable<MediaMatchPayload> {
10678
+ id: T;
10679
+ private mediaQueryList?;
10680
+ constructor(id: T, mediaQueryString: string);
10681
+ subscribe: (observer: Observer<MediaMatchPayload>) => UnsubscribeObserverCallback;
10682
+ }
10683
+
10684
+ declare class MediaMediator {
10685
+ breakpoint: Record<MediaBreakpoint, MediaMatcher<MediaMatcherId>>;
10686
+ orientation: Record<Orientation, MediaMatcher<MediaMatcherId>>;
10687
+ constructor(bps: Record<Lowercase<Breakpoint$1>, number>);
10688
+ get matchers(): MediaMatcher<MediaMatcherId>[];
10689
+ static query: {
10690
+ up: (...bps: number[]) => string;
10691
+ below: (...bps: number[]) => string;
10692
+ };
10693
+ static create(bps?: Partial<Record<Lowercase<Breakpoint$1>, number>>): MediaMediator;
10694
+ }
10695
+
10696
+ declare const MediaProvider: (props: React.PropsWithChildren<{
10697
+ value: MediaMediator;
10698
+ }>) => JSX.Element;
10699
+
10700
+ export { Accordion, type AccordionItemProps, type AccordionProps, ActionBtn, type ActionBtnProps, AddElement, type AddElementProps, Alert, type AlertProps, Amount, type AmountProps, Anchor, Arrow, ArrowBadge, type ArrowBadgeProps, type ArrowProps, AspectRatio, type AspectRatioProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BaseProps, type Breakpoint$1 as Breakpoint, Button, type ButtonProps, COUNTRY_DATA, type CSSBorderStyle, type CSSColor, type CSSFontWeight, type CSSGlobalValue, type CSSUnit, type CSSVerticalAlign, CURRENCY_MAP, Checkbox, type CheckboxProps, Chip, type ChipProps, type Color, ColorNames, type ColorPaletteKey, Container, type ContainerProps, ContextMenu, type ContextMenuMultiLevelProps, type ContextMenuProps, CurrencyCodes, DEFAULT_MASK, Dialog, type DialogComponentProps, type DialogProps, type DividerProps, type DomTarget, Dropdown, type DropdownProps, FormLabel, type FormLabelProps, type HEX, INITIAL_MASK, Icon, IconButton, type IconButtonProps, type IconISOCode, type IconName, type IconProps, Indicator, type IndicatorProps, Input, type InputCheckboxProps, type InputMaskOptions, type InputMaskState, type InputPhoneProps, type InputProps, type InputRadioProps, type KeysOfUnion, ListItem, type ListItemProps, Media, MediaMediator, type MediaProps, MediaProvider, Menu, type MenuComponentProps, type MenuContainerProps, type MenuDividerProps, type MenuListProps, type MenuProps, Modal, type ModalProps, Notification, type NotificationProps, type Nullable, type Orientation, Paper, type PaperProps, type PlaygroundToolbar, Popover, type PopoverComponentProps, type PopoverProps, Progress, ProgressCircle$1 as ProgressCircle, type ProgressCircleProps$1 as ProgressCircleProps, ProgressLine, type ProgressLineProps, type ProgressProps, type ProgressSegmentedProps, type RGB, type RGBA, Radio, type RadioProps, type ResponsiveLayoutInterpolationProps, type ResponsiveLayoutProps, type ResponsivePositionProps, type ResponsivePropKey, type ResponsiveProps, type ResponsiveSizeInterpolationProps, type ResponsiveSizeProps, withThemeScrollable as Scrollable, type ScrollableProps, Section, type SectionProps, Select, type SelectProps, Separator, type SeparatorProps, type Size$o as Size, type SizeValue$1 as SizeValue, Skeleton, type SkeletonProps, Spacer, type SpacerProps, Spinner, type SpinnerProps, Switch, type SwitchProps, Switcher, type SwitcherProps, Tab, TabList, type TabListPanelProps, type TabListProps, type TabListTabProps, type TabProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextEllipseProps, type TextHeadingProps, type TextProps, Textarea, type TextareaProps, type Theme, type ThemeMode, type ThemeName, type ThemePreset, ThemeProvider, type ToolbarControl, Tooltip, type TooltipComponentProps, type TooltipProps, type WithMergedPropsOptions, type WithThemePreset, type WrappedComponentProps, adultDarkTheme, adultLightTheme, babyDarkTheme, babyLightTheme, baseInputStyle, buildMediaQuery, color, desktopFirst, getDarkHoverColor, getDarkStrongHoverColor, getLightHoverColor, getLightStrongHoverColor, hexToRgbA, isHex, mobileFirst, motherDarkTheme, motherLightTheme, property, responsiveNamedProperty, responsiveProperty, screenL, screenM, screenMaxL, screenMaxM, screenMaxS, screenMaxXl, screenMaxXs, screenMaxXxs, screenMinL, screenMinM, screenMinS, screenMinXl, screenMinXs, screenRetina, screenS, screenXl, screenXs, teenDarkTheme, teenLightTheme, defaultTheme as theme, useClickOutside, useScrollLock, useScrollMonitor, vAlign };
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var colors$1=require('./shared/utils/colors.js');var colors=require('./theme/colors.js');var screen=require('./mixins/screen.js');var useClickOutside=require('./hooks/useClickOutside.js');var useScrollMonitor=require('./hooks/useScrollMonitor.js');var useScrollLock=require('./hooks/useScrollLock.js');var responsiveProperty=require('./mixins/responsive-property.js');var color=require('./mixins/color.js');var vAlign=require('./mixins/vAlign.js');var shared=require('./mixins/shared.js');var constants=require('./components/Input.Phone/constants.js');var Accordion=require('./components/Accordion/Accordion.js');var ActionBtn=require('./components/ActionBtn/ActionBtn.js');var AddElement=require('./components/AddElement/AddElement.js');var Alert=require('./components/Alert/Alert.js');var Amount=require('./components/Amount/Amount.js');var Anchor=require('./components/Anchor/Anchor.js');var Arrow=require('./components/Arrow/Arrow.js');var ArrowBadge=require('./components/ArrowBadge/ArrowBadge.js');var AspectRatio=require('./components/AspectRatio/AspectRatio.js');var Avatar=require('./components/Avatar/Avatar.js');var Badge=require('./components/Badge/Badge.js');var Button=require('./components/Button/Button.js');var index=require('./components/Amount/data/index.js');var Checkbox=require('./components/Checkbox/Checkbox.js');var Chip=require('./components/Chip/Chip.js');var Container=require('./components/Container/Container.js');var ContextMenu=require('./components/ContextMenu/ContextMenu.js');var Dialog=require('./components/Dialog/Dialog.js');var Dropdown=require('./components/Dropdown/Dropdown.js');var FormLabel=require('./components/FormLabel/FormLabel.js');var Icon=require('./components/Icon/Icon.js');var IconButton=require('./components/IconButton/IconButton.js');var Indicator=require('./components/Indicator/Indicator.js');var Input=require('./components/Input/Input.js');var ListItem=require('./components/ListItem/ListItem.js');var Menu=require('./components/Menu/Menu.js');var Modal=require('./components/Modal/Modal.js');var Notification=require('./components/Notification/Notification.js');var Paper=require('./components/Paper/Paper.js');var Popover=require('./components/Popover/Popover.js');var Progress=require('./components/Progress/Progress.js');var ProgressCircle=require('./components/ProgressCircle/ProgressCircle.js');var ProgressLine=require('./components/ProgressLine/ProgressLine.js');var Radio=require('./components/Radio/Radio.js');var Scrollable=require('./components/Scrollable/Scrollable.js');var Section=require('./components/Section/Section.js');var Select=require('./components/Select/Select.js');var Separator=require('./components/Separator/Separator.js');var Skeleton=require('./components/Skeleton/Skeleton.js');var Spacer=require('./components/Spacer/Spacer.js');var Spinner=require('./components/Spinner/Spinner.js');var Switch=require('./components/Switch/Switch.js');var Switcher=require('./components/Switcher/Switcher.js');var Tab=require('./components/Tab/Tab.js');var TabList=require('./components/TabList/TabList.js');var Tabs=require('./components/Tabs/Tabs.js');var Tag=require('./components/Tag/Tag.js');var Text=require('./components/Text/Text.js');var Textarea=require('./components/Textarea/Textarea.js');var themeProvider=require('./theme/theme-provider.js');var Tooltip=require('./components/Tooltip/Tooltip.js');var themes=require('./theme/themes.js');var style=require('./components/Input/style.js');exports.getDarkHoverColor=colors$1.getDarkHoverColor,exports.getDarkStrongHoverColor=colors$1.getDarkStrongHoverColor,exports.getLightHoverColor=colors$1.getLightHoverColor,exports.getLightStrongHoverColor=colors$1.getLightStrongHoverColor,exports.hexToRgbA=colors$1.hexToRgbA,exports.isHex=colors$1.isHex,exports.ColorNames=colors.ColorNames,exports.screenL=screen.screenL,exports.screenM=screen.screenM,exports.screenMaxL=screen.screenMaxL,exports.screenMaxM=screen.screenMaxM,exports.screenMaxS=screen.screenMaxS,exports.screenMaxXl=screen.screenMaxXl,exports.screenMaxXs=screen.screenMaxXs,exports.screenMaxXxs=screen.screenMaxXxs,exports.screenMinL=screen.screenMinL,exports.screenMinM=screen.screenMinM,exports.screenMinS=screen.screenMinS,exports.screenMinXl=screen.screenMinXl,exports.screenMinXs=screen.screenMinXs,exports.screenRetina=screen.screenRetina,exports.screenS=screen.screenS,exports.screenXl=screen.screenXl,exports.screenXs=screen.screenXs,exports.useClickOutside=useClickOutside.useClickOutside,exports.useScrollMonitor=useScrollMonitor.useScrollMonitor,exports.useScrollLock=useScrollLock.useScrollLock,exports.property=responsiveProperty.property,exports.responsiveNamedProperty=responsiveProperty.responsiveNamedProperty,exports.responsiveProperty=responsiveProperty.responsiveProperty,exports.color=color.color,exports.vAlign=vAlign.vAlign,exports.buildMediaQuery=shared.buildMediaQuery,exports.desktopFirst=shared.desktopFirst,exports.mobileFirst=shared.mobileFirst,exports.COUNTRY_DATA=constants.COUNTRY_DATA,exports.DEFAULT_MASK=constants.DEFAULT_MASK,exports.INITIAL_MASK=constants.INITIAL_MASK,exports.Accordion=Accordion.Accordion,exports.ActionBtn=ActionBtn.ActionBtn,exports.AddElement=AddElement.AddElement,exports.Alert=Alert.Alert,exports.Amount=Amount.Amount,exports.Anchor=Anchor.Anchor,exports.Arrow=Arrow.Arrow,exports.ArrowBadge=ArrowBadge.ArrowBadge,exports.AspectRatio=AspectRatio.AspectRatio,exports.Avatar=Avatar.Avatar,exports.Badge=Badge.Badge,exports.Button=Button.Button,exports.CURRENCY_MAP=index.CURRENCY_MAP,exports.CurrencyCodes=index.CurrencyCodes,exports.Checkbox=Checkbox.Checkbox,exports.Chip=Chip.Chip,exports.Container=Container.Container,exports.ContextMenu=ContextMenu.ContextMenu,exports.Dialog=Dialog.Dialog,exports.Dropdown=Dropdown.Dropdown,exports.FormLabel=FormLabel.FormLabel,exports.Icon=Icon.Icon,exports.IconButton=IconButton.IconButton,exports.Indicator=Indicator.Indicator,exports.Input=Input.Input,exports.ListItem=ListItem.ListItem,exports.Menu=Menu.Menu,exports.Modal=Modal.Modal,exports.Notification=Notification.Notification,exports.Paper=Paper.Paper,exports.Popover=Popover.Popover,exports.Progress=Progress.Progress,exports.ProgressCircle=ProgressCircle.ProgressCircle,exports.ProgressLine=ProgressLine.ProgressLine,exports.Radio=Radio.Radio,exports.Scrollable=Scrollable.Scrollable,exports.Section=Section.Section,exports.Select=Select.Select,exports.Separator=Separator.Separator,exports.Skeleton=Skeleton.Skeleton,exports.Spacer=Spacer.Spacer,exports.Spinner=Spinner.Spinner,exports.Switch=Switch.Switch,exports.Switcher=Switcher.Switcher,exports.Tab=Tab.Tab,exports.TabList=TabList.TabList,exports.Tabs=Tabs.Tabs,exports.Tag=Tag.Tag,exports.Text=Text.Text,exports.Textarea=Textarea.Textarea,exports.ThemeProvider=themeProvider.ThemeProvider,exports.Tooltip=Tooltip.Tooltip,exports.adultDarkTheme=themes.adultDarkTheme,exports.adultLightTheme=themes.adultLightTheme,exports.babyDarkTheme=themes.babyDarkTheme,exports.babyLightTheme=themes.babyLightTheme,exports.motherDarkTheme=themes.motherDarkTheme,exports.motherLightTheme=themes.motherLightTheme,exports.teenDarkTheme=themes.teenDarkTheme,exports.teenLightTheme=themes.teenLightTheme,exports.theme=themes.defaultTheme,exports.baseInputStyle=style.baseInputStyle;
1
+ 'use strict';var colors$1=require('./shared/utils/colors.js');var colors=require('./theme/colors.js');var screen=require('./mixins/screen.js');var useClickOutside=require('./hooks/useClickOutside.js');var useScrollMonitor=require('./hooks/useScrollMonitor.js');var useScrollLock=require('./hooks/useScrollLock.js');var responsiveProperty=require('./mixins/responsive-property.js');var color=require('./mixins/color.js');var vAlign=require('./mixins/vAlign.js');var shared=require('./mixins/shared.js');var constants=require('./components/Input.Phone/constants.js');var Accordion=require('./components/Accordion/Accordion.js');var ActionBtn=require('./components/ActionBtn/ActionBtn.js');var AddElement=require('./components/AddElement/AddElement.js');var Alert=require('./components/Alert/Alert.js');var Amount=require('./components/Amount/Amount.js');var Anchor=require('./components/Anchor/Anchor.js');var Arrow=require('./components/Arrow/Arrow.js');var ArrowBadge=require('./components/ArrowBadge/ArrowBadge.js');var AspectRatio=require('./components/AspectRatio/AspectRatio.js');var Avatar=require('./components/Avatar/Avatar.js');var Badge=require('./components/Badge/Badge.js');var Button=require('./components/Button/Button.js');var index=require('./components/Amount/data/index.js');var Checkbox=require('./components/Checkbox/Checkbox.js');var Chip=require('./components/Chip/Chip.js');var Container=require('./components/Container/Container.js');var ContextMenu=require('./components/ContextMenu/ContextMenu.js');var Dialog=require('./components/Dialog/Dialog.js');var Dropdown=require('./components/Dropdown/Dropdown.js');var FormLabel=require('./components/FormLabel/FormLabel.js');var Icon=require('./components/Icon/Icon.js');var IconButton=require('./components/IconButton/IconButton.js');var Indicator=require('./components/Indicator/Indicator.js');var Input=require('./components/Input/Input.js');var ListItem=require('./components/ListItem/ListItem.js');var Media=require('./components/Media/Media.js');var MediaMediator=require('./components/Media/MediaMediator.js');var context=require('./components/Media/context.js');var Menu=require('./components/Menu/Menu.js');var Modal=require('./components/Modal/Modal.js');var Notification=require('./components/Notification/Notification.js');var Paper=require('./components/Paper/Paper.js');var Popover=require('./components/Popover/Popover.js');var Progress=require('./components/Progress/Progress.js');var ProgressCircle=require('./components/ProgressCircle/ProgressCircle.js');var ProgressLine=require('./components/ProgressLine/ProgressLine.js');var Radio=require('./components/Radio/Radio.js');var Scrollable=require('./components/Scrollable/Scrollable.js');var Section=require('./components/Section/Section.js');var Select=require('./components/Select/Select.js');var Separator=require('./components/Separator/Separator.js');var Skeleton=require('./components/Skeleton/Skeleton.js');var Spacer=require('./components/Spacer/Spacer.js');var Spinner=require('./components/Spinner/Spinner.js');var Switch=require('./components/Switch/Switch.js');var Switcher=require('./components/Switcher/Switcher.js');var Tab=require('./components/Tab/Tab.js');var TabList=require('./components/TabList/TabList.js');var Tabs=require('./components/Tabs/Tabs.js');var Tag=require('./components/Tag/Tag.js');var Text=require('./components/Text/Text.js');var Textarea=require('./components/Textarea/Textarea.js');var themeProvider=require('./theme/theme-provider.js');var Tooltip=require('./components/Tooltip/Tooltip.js');var themes=require('./theme/themes.js');var style=require('./components/Input/style.js');exports.getDarkHoverColor=colors$1.getDarkHoverColor,exports.getDarkStrongHoverColor=colors$1.getDarkStrongHoverColor,exports.getLightHoverColor=colors$1.getLightHoverColor,exports.getLightStrongHoverColor=colors$1.getLightStrongHoverColor,exports.hexToRgbA=colors$1.hexToRgbA,exports.isHex=colors$1.isHex,exports.ColorNames=colors.ColorNames,exports.screenL=screen.screenL,exports.screenM=screen.screenM,exports.screenMaxL=screen.screenMaxL,exports.screenMaxM=screen.screenMaxM,exports.screenMaxS=screen.screenMaxS,exports.screenMaxXl=screen.screenMaxXl,exports.screenMaxXs=screen.screenMaxXs,exports.screenMaxXxs=screen.screenMaxXxs,exports.screenMinL=screen.screenMinL,exports.screenMinM=screen.screenMinM,exports.screenMinS=screen.screenMinS,exports.screenMinXl=screen.screenMinXl,exports.screenMinXs=screen.screenMinXs,exports.screenRetina=screen.screenRetina,exports.screenS=screen.screenS,exports.screenXl=screen.screenXl,exports.screenXs=screen.screenXs,exports.useClickOutside=useClickOutside.useClickOutside,exports.useScrollMonitor=useScrollMonitor.useScrollMonitor,exports.useScrollLock=useScrollLock.useScrollLock,exports.property=responsiveProperty.property,exports.responsiveNamedProperty=responsiveProperty.responsiveNamedProperty,exports.responsiveProperty=responsiveProperty.responsiveProperty,exports.color=color.color,exports.vAlign=vAlign.vAlign,exports.buildMediaQuery=shared.buildMediaQuery,exports.desktopFirst=shared.desktopFirst,exports.mobileFirst=shared.mobileFirst,exports.COUNTRY_DATA=constants.COUNTRY_DATA,exports.DEFAULT_MASK=constants.DEFAULT_MASK,exports.INITIAL_MASK=constants.INITIAL_MASK,exports.Accordion=Accordion.Accordion,exports.ActionBtn=ActionBtn.ActionBtn,exports.AddElement=AddElement.AddElement,exports.Alert=Alert.Alert,exports.Amount=Amount.Amount,exports.Anchor=Anchor.Anchor,exports.Arrow=Arrow.Arrow,exports.ArrowBadge=ArrowBadge.ArrowBadge,exports.AspectRatio=AspectRatio.AspectRatio,exports.Avatar=Avatar.Avatar,exports.Badge=Badge.Badge,exports.Button=Button.Button,exports.CURRENCY_MAP=index.CURRENCY_MAP,exports.CurrencyCodes=index.CurrencyCodes,exports.Checkbox=Checkbox.Checkbox,exports.Chip=Chip.Chip,exports.Container=Container.Container,exports.ContextMenu=ContextMenu.ContextMenu,exports.Dialog=Dialog.Dialog,exports.Dropdown=Dropdown.Dropdown,exports.FormLabel=FormLabel.FormLabel,exports.Icon=Icon.Icon,exports.IconButton=IconButton.IconButton,exports.Indicator=Indicator.Indicator,exports.Input=Input.Input,exports.ListItem=ListItem.ListItem,exports.Media=Media.Media,exports.MediaMediator=MediaMediator.MediaMediator,exports.MediaProvider=context.MediaProvider,exports.Menu=Menu.Menu,exports.Modal=Modal.Modal,exports.Notification=Notification.Notification,exports.Paper=Paper.Paper,exports.Popover=Popover.Popover,exports.Progress=Progress.Progress,exports.ProgressCircle=ProgressCircle.ProgressCircle,exports.ProgressLine=ProgressLine.ProgressLine,exports.Radio=Radio.Radio,exports.Scrollable=Scrollable.Scrollable,exports.Section=Section.Section,exports.Select=Select.Select,exports.Separator=Separator.Separator,exports.Skeleton=Skeleton.Skeleton,exports.Spacer=Spacer.Spacer,exports.Spinner=Spinner.Spinner,exports.Switch=Switch.Switch,exports.Switcher=Switcher.Switcher,exports.Tab=Tab.Tab,exports.TabList=TabList.TabList,exports.Tabs=Tabs.Tabs,exports.Tag=Tag.Tag,exports.Text=Text.Text,exports.Textarea=Textarea.Textarea,exports.ThemeProvider=themeProvider.ThemeProvider,exports.Tooltip=Tooltip.Tooltip,exports.adultDarkTheme=themes.adultDarkTheme,exports.adultLightTheme=themes.adultLightTheme,exports.babyDarkTheme=themes.babyDarkTheme,exports.babyLightTheme=themes.babyLightTheme,exports.motherDarkTheme=themes.motherDarkTheme,exports.motherLightTheme=themes.motherLightTheme,exports.teenDarkTheme=themes.teenDarkTheme,exports.teenLightTheme=themes.teenLightTheme,exports.theme=themes.defaultTheme,exports.baseInputStyle=style.baseInputStyle;
2
2
  //# sourceMappingURL=index.js.map
package/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export{getDarkHoverColor,getDarkStrongHoverColor,getLightHoverColor,getLightStrongHoverColor,hexToRgbA,isHex}from'./shared/utils/colors.mjs';export{ColorNames}from'./theme/colors.mjs';export{screenL,screenM,screenMaxL,screenMaxM,screenMaxS,screenMaxXl,screenMaxXs,screenMaxXxs,screenMinL,screenMinM,screenMinS,screenMinXl,screenMinXs,screenRetina,screenS,screenXl,screenXs}from'./mixins/screen.mjs';export{useClickOutside}from'./hooks/useClickOutside.mjs';export{useScrollMonitor}from'./hooks/useScrollMonitor.mjs';export{useScrollLock}from'./hooks/useScrollLock.mjs';export{property,responsiveNamedProperty,responsiveProperty}from'./mixins/responsive-property.mjs';export{color}from'./mixins/color.mjs';export{vAlign}from'./mixins/vAlign.mjs';export{buildMediaQuery,desktopFirst,mobileFirst}from'./mixins/shared.mjs';export{COUNTRY_DATA,DEFAULT_MASK,INITIAL_MASK}from'./components/Input.Phone/constants.mjs';export{Accordion}from'./components/Accordion/Accordion.mjs';export{ActionBtn}from'./components/ActionBtn/ActionBtn.mjs';export{AddElement}from'./components/AddElement/AddElement.mjs';export{Alert}from'./components/Alert/Alert.mjs';export{Amount}from'./components/Amount/Amount.mjs';export{Anchor}from'./components/Anchor/Anchor.mjs';export{Arrow}from'./components/Arrow/Arrow.mjs';export{ArrowBadge}from'./components/ArrowBadge/ArrowBadge.mjs';export{AspectRatio}from'./components/AspectRatio/AspectRatio.mjs';export{Avatar}from'./components/Avatar/Avatar.mjs';export{Badge}from'./components/Badge/Badge.mjs';export{Button}from'./components/Button/Button.mjs';export{CURRENCY_MAP,CurrencyCodes}from'./components/Amount/data/index.mjs';export{Checkbox}from'./components/Checkbox/Checkbox.mjs';export{Chip}from'./components/Chip/Chip.mjs';export{Container}from'./components/Container/Container.mjs';export{ContextMenu}from'./components/ContextMenu/ContextMenu.mjs';export{Dialog}from'./components/Dialog/Dialog.mjs';export{Dropdown}from'./components/Dropdown/Dropdown.mjs';export{FormLabel}from'./components/FormLabel/FormLabel.mjs';export{Icon}from'./components/Icon/Icon.mjs';export{IconButton}from'./components/IconButton/IconButton.mjs';export{Indicator}from'./components/Indicator/Indicator.mjs';export{Input}from'./components/Input/Input.mjs';export{ListItem}from'./components/ListItem/ListItem.mjs';export{Menu}from'./components/Menu/Menu.mjs';export{Modal}from'./components/Modal/Modal.mjs';export{Notification}from'./components/Notification/Notification.mjs';export{Paper}from'./components/Paper/Paper.mjs';export{Popover}from'./components/Popover/Popover.mjs';export{Progress}from'./components/Progress/Progress.mjs';export{ProgressCircle}from'./components/ProgressCircle/ProgressCircle.mjs';export{ProgressLine}from'./components/ProgressLine/ProgressLine.mjs';export{Radio}from'./components/Radio/Radio.mjs';export{Scrollable}from'./components/Scrollable/Scrollable.mjs';export{Section}from'./components/Section/Section.mjs';export{Select}from'./components/Select/Select.mjs';export{Separator}from'./components/Separator/Separator.mjs';export{Skeleton}from'./components/Skeleton/Skeleton.mjs';export{Spacer}from'./components/Spacer/Spacer.mjs';export{Spinner}from'./components/Spinner/Spinner.mjs';export{Switch}from'./components/Switch/Switch.mjs';export{Switcher}from'./components/Switcher/Switcher.mjs';export{Tab}from'./components/Tab/Tab.mjs';export{TabList}from'./components/TabList/TabList.mjs';export{Tabs}from'./components/Tabs/Tabs.mjs';export{Tag}from'./components/Tag/Tag.mjs';export{Text}from'./components/Text/Text.mjs';export{Textarea}from'./components/Textarea/Textarea.mjs';export{ThemeProvider}from'./theme/theme-provider.mjs';export{Tooltip}from'./components/Tooltip/Tooltip.mjs';export{adultDarkTheme,adultLightTheme,babyDarkTheme,babyLightTheme,motherDarkTheme,motherLightTheme,teenDarkTheme,teenLightTheme,defaultTheme as theme}from'./theme/themes.mjs';export{baseInputStyle}from'./components/Input/style.mjs';
1
+ export{getDarkHoverColor,getDarkStrongHoverColor,getLightHoverColor,getLightStrongHoverColor,hexToRgbA,isHex}from'./shared/utils/colors.mjs';export{ColorNames}from'./theme/colors.mjs';export{screenL,screenM,screenMaxL,screenMaxM,screenMaxS,screenMaxXl,screenMaxXs,screenMaxXxs,screenMinL,screenMinM,screenMinS,screenMinXl,screenMinXs,screenRetina,screenS,screenXl,screenXs}from'./mixins/screen.mjs';export{useClickOutside}from'./hooks/useClickOutside.mjs';export{useScrollMonitor}from'./hooks/useScrollMonitor.mjs';export{useScrollLock}from'./hooks/useScrollLock.mjs';export{property,responsiveNamedProperty,responsiveProperty}from'./mixins/responsive-property.mjs';export{color}from'./mixins/color.mjs';export{vAlign}from'./mixins/vAlign.mjs';export{buildMediaQuery,desktopFirst,mobileFirst}from'./mixins/shared.mjs';export{COUNTRY_DATA,DEFAULT_MASK,INITIAL_MASK}from'./components/Input.Phone/constants.mjs';export{Accordion}from'./components/Accordion/Accordion.mjs';export{ActionBtn}from'./components/ActionBtn/ActionBtn.mjs';export{AddElement}from'./components/AddElement/AddElement.mjs';export{Alert}from'./components/Alert/Alert.mjs';export{Amount}from'./components/Amount/Amount.mjs';export{Anchor}from'./components/Anchor/Anchor.mjs';export{Arrow}from'./components/Arrow/Arrow.mjs';export{ArrowBadge}from'./components/ArrowBadge/ArrowBadge.mjs';export{AspectRatio}from'./components/AspectRatio/AspectRatio.mjs';export{Avatar}from'./components/Avatar/Avatar.mjs';export{Badge}from'./components/Badge/Badge.mjs';export{Button}from'./components/Button/Button.mjs';export{CURRENCY_MAP,CurrencyCodes}from'./components/Amount/data/index.mjs';export{Checkbox}from'./components/Checkbox/Checkbox.mjs';export{Chip}from'./components/Chip/Chip.mjs';export{Container}from'./components/Container/Container.mjs';export{ContextMenu}from'./components/ContextMenu/ContextMenu.mjs';export{Dialog}from'./components/Dialog/Dialog.mjs';export{Dropdown}from'./components/Dropdown/Dropdown.mjs';export{FormLabel}from'./components/FormLabel/FormLabel.mjs';export{Icon}from'./components/Icon/Icon.mjs';export{IconButton}from'./components/IconButton/IconButton.mjs';export{Indicator}from'./components/Indicator/Indicator.mjs';export{Input}from'./components/Input/Input.mjs';export{ListItem}from'./components/ListItem/ListItem.mjs';export{Media}from'./components/Media/Media.mjs';export{MediaMediator}from'./components/Media/MediaMediator.mjs';export{MediaProvider}from'./components/Media/context.mjs';export{Menu}from'./components/Menu/Menu.mjs';export{Modal}from'./components/Modal/Modal.mjs';export{Notification}from'./components/Notification/Notification.mjs';export{Paper}from'./components/Paper/Paper.mjs';export{Popover}from'./components/Popover/Popover.mjs';export{Progress}from'./components/Progress/Progress.mjs';export{ProgressCircle}from'./components/ProgressCircle/ProgressCircle.mjs';export{ProgressLine}from'./components/ProgressLine/ProgressLine.mjs';export{Radio}from'./components/Radio/Radio.mjs';export{Scrollable}from'./components/Scrollable/Scrollable.mjs';export{Section}from'./components/Section/Section.mjs';export{Select}from'./components/Select/Select.mjs';export{Separator}from'./components/Separator/Separator.mjs';export{Skeleton}from'./components/Skeleton/Skeleton.mjs';export{Spacer}from'./components/Spacer/Spacer.mjs';export{Spinner}from'./components/Spinner/Spinner.mjs';export{Switch}from'./components/Switch/Switch.mjs';export{Switcher}from'./components/Switcher/Switcher.mjs';export{Tab}from'./components/Tab/Tab.mjs';export{TabList}from'./components/TabList/TabList.mjs';export{Tabs}from'./components/Tabs/Tabs.mjs';export{Tag}from'./components/Tag/Tag.mjs';export{Text}from'./components/Text/Text.mjs';export{Textarea}from'./components/Textarea/Textarea.mjs';export{ThemeProvider}from'./theme/theme-provider.mjs';export{Tooltip}from'./components/Tooltip/Tooltip.mjs';export{adultDarkTheme,adultLightTheme,babyDarkTheme,babyLightTheme,motherDarkTheme,motherLightTheme,teenDarkTheme,teenLightTheme,defaultTheme as theme}from'./theme/themes.mjs';export{baseInputStyle}from'./components/Input/style.mjs';
2
2
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxford/ui",
3
- "version": "2.98.0",
3
+ "version": "2.99.0",
4
4
  "description": "UI components and utilities",
5
5
  "bugs": {
6
6
  "url": "https://github.com/foxford/ui/issues"
@@ -63,6 +63,6 @@
63
63
  "shared",
64
64
  "theme"
65
65
  ],
66
- "sha": "6c5d6fb",
66
+ "sha": "1820c76",
67
67
  "scripts": {}
68
68
  }
@@ -1,2 +1,2 @@
1
- 'use strict';const keyboardKeys={ArrowDown:{key:['ArrowDown','Down'],validate(e){return this.key.includes(e)}},ArrowLeft:{key:['ArrowLeft','Left'],validate(e){return this.key.includes(e)}},ArrowRight:{key:['ArrowRight','Right'],validate(e){return this.key.includes(e)}},ArrowUp:{key:['ArrowUp','Up'],validate(e){return this.key.includes(e)}},Enter:{key:'Enter',validate(e){return this.key===e}},Esc:{key:['Escape','Esc'],validate(e){return this.key.includes(e)}},Space:{key:[' ','Spacebar'],validate(e){return this.key.includes(e)}},Tab:{key:'Tab',validate(e){return this.key===e}},Backspace:{key:'Backspace',validate(e){return this.key===e}},Home:{key:'Home',validate(e){return this.key===e}},End:{key:'End',validate(e){return this.key===e}},F10:{key:'F10',validate(e){return this.key===e}}};exports.BREAKPOINTS={xl:1440,l:1280,m:1024,s:768,xs:374,xxs:320},exports.keyboardKeys=keyboardKeys;
1
+ 'use strict';const keyboardKeys={ArrowDown:{key:['ArrowDown','Down'],validate(e){return this.key.includes(e)}},ArrowLeft:{key:['ArrowLeft','Left'],validate(e){return this.key.includes(e)}},ArrowRight:{key:['ArrowRight','Right'],validate(e){return this.key.includes(e)}},ArrowUp:{key:['ArrowUp','Up'],validate(e){return this.key.includes(e)}},Enter:{key:'Enter',validate(e){return this.key===e}},Esc:{key:['Escape','Esc'],validate(e){return this.key.includes(e)}},Space:{key:[' ','Spacebar'],validate(e){return this.key.includes(e)}},Tab:{key:'Tab',validate(e){return this.key===e}},Backspace:{key:'Backspace',validate(e){return this.key===e}},Home:{key:'Home',validate(e){return this.key===e}},End:{key:'End',validate(e){return this.key===e}},F10:{key:'F10',validate(e){return this.key===e}}};exports.BREAKPOINTS={xxl:1920,xl:1440,l:1280,m:1024,s:768,xs:374,xxs:320},exports.keyboardKeys=keyboardKeys;
2
2
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../src/shared/constants.ts"],"sourcesContent":["import type { Breakpoint } from 'shared/types'\n\nexport const BREAKPOINTS: Readonly<Record<Lowercase<Breakpoint>, number>> = {\n xl: 1440,\n l: 1280,\n m: 1024,\n s: 768,\n xs: 374,\n xxs: 320,\n}\n\nexport const keyboardKeys = {\n ArrowDown: {\n key: ['ArrowDown', 'Down'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n ArrowLeft: {\n key: ['ArrowLeft', 'Left'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n ArrowRight: {\n key: ['ArrowRight', 'Right'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n ArrowUp: {\n key: ['ArrowUp', 'Up'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n Enter: {\n key: 'Enter',\n validate(key: string) {\n return this.key === key\n },\n },\n Esc: {\n key: ['Escape', 'Esc'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n Space: {\n key: [' ', 'Spacebar'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n Tab: {\n key: 'Tab',\n validate(key: string) {\n return this.key === key\n },\n },\n Backspace: {\n key: 'Backspace',\n validate(key: string) {\n return this.key === key\n },\n },\n Home: {\n key: 'Home',\n validate(key: string) {\n return this.key === key\n },\n },\n End: {\n key: 'End',\n validate(key: string) {\n return this.key === key\n },\n },\n F10: {\n key: 'F10',\n validate(key: string) {\n return this.key === key\n },\n },\n}\n"],"names":["keyboardKeys","ArrowDown","key","validate","this","includes","ArrowLeft","ArrowRight","ArrowUp","Enter","Esc","Space","Tab","Backspace","Home","End","F10","xl","l","m","s","xs","xxs"],"mappings":"aAWO,MAAMA,aAAe,CAC1BC,UAAW,CACTC,IAAK,CAAC,YAAa,QACnBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFI,UAAW,CACTJ,IAAK,CAAC,YAAa,QACnBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFK,WAAY,CACVL,IAAK,CAAC,aAAc,SACpBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFM,QAAS,CACPN,IAAK,CAAC,UAAW,MACjBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFO,MAAO,CACLP,IAAK,QACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFQ,IAAK,CACHR,IAAK,CAAC,SAAU,OAChBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFS,MAAO,CACLT,IAAK,CAAC,IAAK,YACXC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFU,IAAK,CACHV,IAAK,MACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFW,UAAW,CACTX,IAAK,YACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFY,KAAM,CACJZ,IAAK,OACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFa,IAAK,CACHb,IAAK,MACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFc,IAAK,CACHd,IAAK,MACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,wBAhFwE,CAC1Ee,GAAI,KACJC,EAAG,KACHC,EAAG,KACHC,EAAG,IACHC,GAAI,IACJC,IAAK"}
1
+ {"version":3,"file":"constants.js","sources":["../../../src/shared/constants.ts"],"sourcesContent":["import type { Breakpoint } from 'shared/types'\n\nexport const BREAKPOINTS: Readonly<Record<Lowercase<Breakpoint>, number>> = {\n xxl: 1920,\n xl: 1440,\n l: 1280,\n m: 1024,\n s: 768,\n xs: 374,\n xxs: 320,\n}\n\nexport const keyboardKeys = {\n ArrowDown: {\n key: ['ArrowDown', 'Down'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n ArrowLeft: {\n key: ['ArrowLeft', 'Left'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n ArrowRight: {\n key: ['ArrowRight', 'Right'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n ArrowUp: {\n key: ['ArrowUp', 'Up'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n Enter: {\n key: 'Enter',\n validate(key: string) {\n return this.key === key\n },\n },\n Esc: {\n key: ['Escape', 'Esc'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n Space: {\n key: [' ', 'Spacebar'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n Tab: {\n key: 'Tab',\n validate(key: string) {\n return this.key === key\n },\n },\n Backspace: {\n key: 'Backspace',\n validate(key: string) {\n return this.key === key\n },\n },\n Home: {\n key: 'Home',\n validate(key: string) {\n return this.key === key\n },\n },\n End: {\n key: 'End',\n validate(key: string) {\n return this.key === key\n },\n },\n F10: {\n key: 'F10',\n validate(key: string) {\n return this.key === key\n },\n },\n}\n"],"names":["keyboardKeys","ArrowDown","key","validate","this","includes","ArrowLeft","ArrowRight","ArrowUp","Enter","Esc","Space","Tab","Backspace","Home","End","F10","xxl","xl","l","m","s","xs","xxs"],"mappings":"aAYO,MAAMA,aAAe,CAC1BC,UAAW,CACTC,IAAK,CAAC,YAAa,QACnBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFI,UAAW,CACTJ,IAAK,CAAC,YAAa,QACnBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFK,WAAY,CACVL,IAAK,CAAC,aAAc,SACpBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFM,QAAS,CACPN,IAAK,CAAC,UAAW,MACjBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFO,MAAO,CACLP,IAAK,QACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFQ,IAAK,CACHR,IAAK,CAAC,SAAU,OAChBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFS,MAAO,CACLT,IAAK,CAAC,IAAK,YACXC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFU,IAAK,CACHV,IAAK,MACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFW,UAAW,CACTX,IAAK,YACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFY,KAAM,CACJZ,IAAK,OACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFa,IAAK,CACHb,IAAK,MACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFc,IAAK,CACHd,IAAK,MACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,wBAjFwE,CAC1Ee,IAAK,KACLC,GAAI,KACJC,EAAG,KACHC,EAAG,KACHC,EAAG,IACHC,GAAI,IACJC,IAAK"}
@@ -1,2 +1,2 @@
1
- const BREAKPOINTS={xl:1440,l:1280,m:1024,s:768,xs:374,xxs:320};const keyboardKeys={ArrowDown:{key:['ArrowDown','Down'],validate(e){return this.key.includes(e)}},ArrowLeft:{key:['ArrowLeft','Left'],validate(e){return this.key.includes(e)}},ArrowRight:{key:['ArrowRight','Right'],validate(e){return this.key.includes(e)}},ArrowUp:{key:['ArrowUp','Up'],validate(e){return this.key.includes(e)}},Enter:{key:'Enter',validate(e){return this.key===e}},Esc:{key:['Escape','Esc'],validate(e){return this.key.includes(e)}},Space:{key:[' ','Spacebar'],validate(e){return this.key.includes(e)}},Tab:{key:'Tab',validate(e){return this.key===e}},Backspace:{key:'Backspace',validate(e){return this.key===e}},Home:{key:'Home',validate(e){return this.key===e}},End:{key:'End',validate(e){return this.key===e}},F10:{key:'F10',validate(e){return this.key===e}}};export{BREAKPOINTS,keyboardKeys};
1
+ const BREAKPOINTS={xxl:1920,xl:1440,l:1280,m:1024,s:768,xs:374,xxs:320};const keyboardKeys={ArrowDown:{key:['ArrowDown','Down'],validate(e){return this.key.includes(e)}},ArrowLeft:{key:['ArrowLeft','Left'],validate(e){return this.key.includes(e)}},ArrowRight:{key:['ArrowRight','Right'],validate(e){return this.key.includes(e)}},ArrowUp:{key:['ArrowUp','Up'],validate(e){return this.key.includes(e)}},Enter:{key:'Enter',validate(e){return this.key===e}},Esc:{key:['Escape','Esc'],validate(e){return this.key.includes(e)}},Space:{key:[' ','Spacebar'],validate(e){return this.key.includes(e)}},Tab:{key:'Tab',validate(e){return this.key===e}},Backspace:{key:'Backspace',validate(e){return this.key===e}},Home:{key:'Home',validate(e){return this.key===e}},End:{key:'End',validate(e){return this.key===e}},F10:{key:'F10',validate(e){return this.key===e}}};export{BREAKPOINTS,keyboardKeys};
2
2
  //# sourceMappingURL=constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sources":["../../../src/shared/constants.ts"],"sourcesContent":["import type { Breakpoint } from 'shared/types'\n\nexport const BREAKPOINTS: Readonly<Record<Lowercase<Breakpoint>, number>> = {\n xl: 1440,\n l: 1280,\n m: 1024,\n s: 768,\n xs: 374,\n xxs: 320,\n}\n\nexport const keyboardKeys = {\n ArrowDown: {\n key: ['ArrowDown', 'Down'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n ArrowLeft: {\n key: ['ArrowLeft', 'Left'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n ArrowRight: {\n key: ['ArrowRight', 'Right'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n ArrowUp: {\n key: ['ArrowUp', 'Up'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n Enter: {\n key: 'Enter',\n validate(key: string) {\n return this.key === key\n },\n },\n Esc: {\n key: ['Escape', 'Esc'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n Space: {\n key: [' ', 'Spacebar'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n Tab: {\n key: 'Tab',\n validate(key: string) {\n return this.key === key\n },\n },\n Backspace: {\n key: 'Backspace',\n validate(key: string) {\n return this.key === key\n },\n },\n Home: {\n key: 'Home',\n validate(key: string) {\n return this.key === key\n },\n },\n End: {\n key: 'End',\n validate(key: string) {\n return this.key === key\n },\n },\n F10: {\n key: 'F10',\n validate(key: string) {\n return this.key === key\n },\n },\n}\n"],"names":["BREAKPOINTS","xl","l","m","s","xs","xxs","keyboardKeys","ArrowDown","key","validate","this","includes","ArrowLeft","ArrowRight","ArrowUp","Enter","Esc","Space","Tab","Backspace","Home","End","F10"],"mappings":"AAEO,MAAMA,YAA+D,CAC1EC,GAAI,KACJC,EAAG,KACHC,EAAG,KACHC,EAAG,IACHC,GAAI,IACJC,IAAK,KAGA,MAAMC,aAAe,CAC1BC,UAAW,CACTC,IAAK,CAAC,YAAa,QACnBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFI,UAAW,CACTJ,IAAK,CAAC,YAAa,QACnBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFK,WAAY,CACVL,IAAK,CAAC,aAAc,SACpBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFM,QAAS,CACPN,IAAK,CAAC,UAAW,MACjBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFO,MAAO,CACLP,IAAK,QACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFQ,IAAK,CACHR,IAAK,CAAC,SAAU,OAChBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFS,MAAO,CACLT,IAAK,CAAC,IAAK,YACXC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFU,IAAK,CACHV,IAAK,MACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFW,UAAW,CACTX,IAAK,YACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFY,KAAM,CACJZ,IAAK,OACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFa,IAAK,CACHb,IAAK,MACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFc,IAAK,CACHd,IAAK,MACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB"}
1
+ {"version":3,"file":"constants.mjs","sources":["../../../src/shared/constants.ts"],"sourcesContent":["import type { Breakpoint } from 'shared/types'\n\nexport const BREAKPOINTS: Readonly<Record<Lowercase<Breakpoint>, number>> = {\n xxl: 1920,\n xl: 1440,\n l: 1280,\n m: 1024,\n s: 768,\n xs: 374,\n xxs: 320,\n}\n\nexport const keyboardKeys = {\n ArrowDown: {\n key: ['ArrowDown', 'Down'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n ArrowLeft: {\n key: ['ArrowLeft', 'Left'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n ArrowRight: {\n key: ['ArrowRight', 'Right'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n ArrowUp: {\n key: ['ArrowUp', 'Up'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n Enter: {\n key: 'Enter',\n validate(key: string) {\n return this.key === key\n },\n },\n Esc: {\n key: ['Escape', 'Esc'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n Space: {\n key: [' ', 'Spacebar'],\n validate(key: string) {\n return this.key.includes(key)\n },\n },\n Tab: {\n key: 'Tab',\n validate(key: string) {\n return this.key === key\n },\n },\n Backspace: {\n key: 'Backspace',\n validate(key: string) {\n return this.key === key\n },\n },\n Home: {\n key: 'Home',\n validate(key: string) {\n return this.key === key\n },\n },\n End: {\n key: 'End',\n validate(key: string) {\n return this.key === key\n },\n },\n F10: {\n key: 'F10',\n validate(key: string) {\n return this.key === key\n },\n },\n}\n"],"names":["BREAKPOINTS","xxl","xl","l","m","s","xs","xxs","keyboardKeys","ArrowDown","key","validate","this","includes","ArrowLeft","ArrowRight","ArrowUp","Enter","Esc","Space","Tab","Backspace","Home","End","F10"],"mappings":"AAEO,MAAMA,YAA+D,CAC1EC,IAAK,KACLC,GAAI,KACJC,EAAG,KACHC,EAAG,KACHC,EAAG,IACHC,GAAI,IACJC,IAAK,KAGA,MAAMC,aAAe,CAC1BC,UAAW,CACTC,IAAK,CAAC,YAAa,QACnBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFI,UAAW,CACTJ,IAAK,CAAC,YAAa,QACnBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFK,WAAY,CACVL,IAAK,CAAC,aAAc,SACpBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFM,QAAS,CACPN,IAAK,CAAC,UAAW,MACjBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFO,MAAO,CACLP,IAAK,QACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFQ,IAAK,CACHR,IAAK,CAAC,SAAU,OAChBC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFS,MAAO,CACLT,IAAK,CAAC,IAAK,YACXC,QAAAA,CAASD,GACP,OAAOE,KAAKF,IAAIG,SAASH,EAC3B,GAEFU,IAAK,CACHV,IAAK,MACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFW,UAAW,CACTX,IAAK,YACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFY,KAAM,CACJZ,IAAK,OACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFa,IAAK,CACHb,IAAK,MACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB,GAEFc,IAAK,CACHd,IAAK,MACLC,QAAAA,CAASD,GACP,OAAOE,KAAKF,MAAQA,CACtB"}
@@ -0,0 +1,2 @@
1
+ 'use strict';exports.Observable=class Observable{observers=[];notify=s=>{this.observers.forEach((e=>e(s)))};subscribe(s){return this.observers.push(s),()=>{this.unsubscribe(s)}}unsubscribe=s=>{this.observers=this.observers.filter((e=>e!==s))}};
2
+ //# sourceMappingURL=Observable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Observable.js","sources":["../../../../src/shared/utils/Observable.ts"],"sourcesContent":["export type Observer<T> = (payload: T) => unknown\n\nexport type UnsubscribeObserverCallback = () => void\n\nexport class Observable<T> {\n private observers: Observer<T>[] = []\n\n protected notify = (payload: T) => {\n this.observers.forEach((observer) => observer(payload))\n }\n\n public subscribe(observer: Observer<T>): UnsubscribeObserverCallback {\n this.observers.push(observer)\n\n return () => {\n this.unsubscribe(observer)\n }\n }\n\n public unsubscribe = (observer: Observer<T>) => {\n this.observers = this.observers.filter((item) => item !== observer)\n }\n}\n"],"names":["Observable","observers","notify","payload","this","forEach","observer","subscribe","push","unsubscribe","filter","item"],"mappings":"gCAIO,MAAMA,WACHC,UAA2B,GAEzBC,OAAUC,IAClBC,KAAKH,UAAUI,SAASC,GAAaA,EAASH,IAAS,EAGlDI,SAAAA,CAAUD,GAGf,OAFAF,KAAKH,UAAUO,KAAKF,GAEb,KACLF,KAAKK,YAAYH,EAAS,CAE9B,CAEOG,YAAeH,IACpBF,KAAKH,UAAYG,KAAKH,UAAUS,QAAQC,GAASA,IAASL,GAAS"}
@@ -0,0 +1,2 @@
1
+ class Observable{observers=[];notify=s=>{this.observers.forEach((e=>e(s)))};subscribe(s){return this.observers.push(s),()=>{this.unsubscribe(s)}}unsubscribe=s=>{this.observers=this.observers.filter((e=>e!==s))}}export{Observable};
2
+ //# sourceMappingURL=Observable.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Observable.mjs","sources":["../../../../src/shared/utils/Observable.ts"],"sourcesContent":["export type Observer<T> = (payload: T) => unknown\n\nexport type UnsubscribeObserverCallback = () => void\n\nexport class Observable<T> {\n private observers: Observer<T>[] = []\n\n protected notify = (payload: T) => {\n this.observers.forEach((observer) => observer(payload))\n }\n\n public subscribe(observer: Observer<T>): UnsubscribeObserverCallback {\n this.observers.push(observer)\n\n return () => {\n this.unsubscribe(observer)\n }\n }\n\n public unsubscribe = (observer: Observer<T>) => {\n this.observers = this.observers.filter((item) => item !== observer)\n }\n}\n"],"names":["Observable","observers","notify","payload","this","forEach","observer","subscribe","push","unsubscribe","filter","item"],"mappings":"AAIO,MAAMA,WACHC,UAA2B,GAEzBC,OAAUC,IAClBC,KAAKH,UAAUI,SAASC,GAAaA,EAASH,IAAS,EAGlDI,SAAAA,CAAUD,GAGf,OAFAF,KAAKH,UAAUO,KAAKF,GAEb,KACLF,KAAKK,YAAYH,EAAS,CAE9B,CAEOG,YAAeH,IACpBF,KAAKH,UAAYG,KAAKH,UAAUS,QAAQC,GAASA,IAASL,GAAS"}