@dr.pogodin/react-utils 1.53.0 → 1.54.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 (141) hide show
  1. package/build/development/client/index.js +2 -0
  2. package/build/development/client/index.js.map +1 -1
  3. package/build/development/index.js +2 -2
  4. package/build/development/index.js.map +1 -1
  5. package/build/development/shared/components/Button/index.js +149 -71
  6. package/build/development/shared/components/Button/index.js.map +1 -1
  7. package/build/development/shared/components/Checkbox/index.js +77 -24
  8. package/build/development/shared/components/Checkbox/index.js.map +1 -1
  9. package/build/development/shared/components/GenericLink/index.js +133 -54
  10. package/build/development/shared/components/GenericLink/index.js.map +1 -1
  11. package/build/development/shared/components/Input/index.js +168 -45
  12. package/build/development/shared/components/Input/index.js.map +1 -1
  13. package/build/development/shared/components/Link.js +23 -13
  14. package/build/development/shared/components/Link.js.map +1 -1
  15. package/build/development/shared/components/Modal/index.js +203 -87
  16. package/build/development/shared/components/Modal/index.js.map +1 -1
  17. package/build/development/shared/components/NavLink.js +16 -7
  18. package/build/development/shared/components/NavLink.js.map +1 -1
  19. package/build/development/shared/components/PageLayout/index.js +77 -15
  20. package/build/development/shared/components/PageLayout/index.js.map +1 -1
  21. package/build/development/shared/components/TextArea/index.js +169 -68
  22. package/build/development/shared/components/TextArea/index.js.map +1 -1
  23. package/build/development/shared/components/Throbber/index.js +51 -13
  24. package/build/development/shared/components/Throbber/index.js.map +1 -1
  25. package/build/development/shared/components/WithTooltip/Tooltip.js +73 -34
  26. package/build/development/shared/components/WithTooltip/Tooltip.js.map +1 -1
  27. package/build/development/shared/components/WithTooltip/index.js +19 -19
  28. package/build/development/shared/components/WithTooltip/index.js.map +1 -1
  29. package/build/development/shared/components/YouTubeVideo/index.js +66 -23
  30. package/build/development/shared/components/YouTubeVideo/index.js.map +1 -1
  31. package/build/development/shared/components/selectors/CustomDropdown/Options/index.js +104 -56
  32. package/build/development/shared/components/selectors/CustomDropdown/Options/index.js.map +1 -1
  33. package/build/development/shared/components/selectors/CustomDropdown/index.js +173 -75
  34. package/build/development/shared/components/selectors/CustomDropdown/index.js.map +1 -1
  35. package/build/development/shared/components/selectors/Switch/index.js +86 -36
  36. package/build/development/shared/components/selectors/Switch/index.js.map +1 -1
  37. package/build/development/shared/utils/globalState.js +2 -2
  38. package/build/development/shared/utils/globalState.js.map +1 -1
  39. package/build/development/shared/utils/index.js +1 -1
  40. package/build/development/shared/utils/index.js.map +1 -1
  41. package/build/development/shared/utils/splitComponent.js +125 -55
  42. package/build/development/shared/utils/splitComponent.js.map +1 -1
  43. package/build/development/shared/utils/time.js +55 -20
  44. package/build/development/shared/utils/time.js.map +1 -1
  45. package/build/production/client/index.js +2 -2
  46. package/build/production/client/index.js.map +1 -1
  47. package/build/production/index.js +1 -1
  48. package/build/production/index.js.map +1 -1
  49. package/build/production/shared/components/Button/index.js +2 -13
  50. package/build/production/shared/components/Button/index.js.map +1 -1
  51. package/build/production/shared/components/Checkbox/index.js +1 -1
  52. package/build/production/shared/components/Checkbox/index.js.map +1 -1
  53. package/build/production/shared/components/GenericLink/index.js +2 -15
  54. package/build/production/shared/components/GenericLink/index.js.map +1 -1
  55. package/build/production/shared/components/Input/index.js +2 -11
  56. package/build/production/shared/components/Input/index.js.map +1 -1
  57. package/build/production/shared/components/Link.js +2 -4
  58. package/build/production/shared/components/Link.js.map +1 -1
  59. package/build/production/shared/components/Modal/index.js +2 -10
  60. package/build/production/shared/components/Modal/index.js.map +1 -1
  61. package/build/production/shared/components/NavLink.js +1 -4
  62. package/build/production/shared/components/NavLink.js.map +1 -1
  63. package/build/production/shared/components/PageLayout/index.js +2 -2
  64. package/build/production/shared/components/PageLayout/index.js.map +1 -1
  65. package/build/production/shared/components/TextArea/index.js +1 -21
  66. package/build/production/shared/components/TextArea/index.js.map +1 -1
  67. package/build/production/shared/components/Throbber/index.js +2 -2
  68. package/build/production/shared/components/Throbber/index.js.map +1 -1
  69. package/build/production/shared/components/WithTooltip/Tooltip.js +2 -7
  70. package/build/production/shared/components/WithTooltip/Tooltip.js.map +1 -1
  71. package/build/production/shared/components/WithTooltip/index.js +3 -3
  72. package/build/production/shared/components/WithTooltip/index.js.map +1 -1
  73. package/build/production/shared/components/YouTubeVideo/index.js +2 -5
  74. package/build/production/shared/components/YouTubeVideo/index.js.map +1 -1
  75. package/build/production/shared/components/selectors/CustomDropdown/Options/index.js +1 -6
  76. package/build/production/shared/components/selectors/CustomDropdown/Options/index.js.map +1 -1
  77. package/build/production/shared/components/selectors/CustomDropdown/index.js +1 -7
  78. package/build/production/shared/components/selectors/CustomDropdown/index.js.map +1 -1
  79. package/build/production/shared/components/selectors/Switch/index.js +1 -1
  80. package/build/production/shared/components/selectors/Switch/index.js.map +1 -1
  81. package/build/production/shared/utils/globalState.js +1 -1
  82. package/build/production/shared/utils/globalState.js.map +1 -1
  83. package/build/production/shared/utils/index.js +1 -1
  84. package/build/production/shared/utils/index.js.map +1 -1
  85. package/build/production/shared/utils/splitComponent.js +3 -10
  86. package/build/production/shared/utils/splitComponent.js.map +1 -1
  87. package/build/production/shared/utils/time.js +2 -2
  88. package/build/production/shared/utils/time.js.map +1 -1
  89. package/build/types-code/index.d.ts +2 -2
  90. package/build/types-code/shared/utils/globalState.d.ts +2 -2
  91. package/build/types-code/shared/utils/index.d.ts +1 -1
  92. package/build/types-code/shared/utils/splitComponent.d.ts +1 -0
  93. package/build/web/client/index.js +2 -2
  94. package/build/web/client/index.js.map +1 -1
  95. package/build/web/index.js +1 -1
  96. package/build/web/index.js.map +1 -1
  97. package/build/web/shared/components/Button/index.js +2 -13
  98. package/build/web/shared/components/Button/index.js.map +1 -1
  99. package/build/web/shared/components/Checkbox/index.js +1 -1
  100. package/build/web/shared/components/Checkbox/index.js.map +1 -1
  101. package/build/web/shared/components/GenericLink/index.js +2 -15
  102. package/build/web/shared/components/GenericLink/index.js.map +1 -1
  103. package/build/web/shared/components/Input/index.js +2 -11
  104. package/build/web/shared/components/Input/index.js.map +1 -1
  105. package/build/web/shared/components/Link.js +2 -4
  106. package/build/web/shared/components/Link.js.map +1 -1
  107. package/build/web/shared/components/Modal/index.js +2 -10
  108. package/build/web/shared/components/Modal/index.js.map +1 -1
  109. package/build/web/shared/components/NavLink.js +1 -4
  110. package/build/web/shared/components/NavLink.js.map +1 -1
  111. package/build/web/shared/components/PageLayout/index.js +2 -2
  112. package/build/web/shared/components/PageLayout/index.js.map +1 -1
  113. package/build/web/shared/components/TextArea/index.js +1 -21
  114. package/build/web/shared/components/TextArea/index.js.map +1 -1
  115. package/build/web/shared/components/Throbber/index.js +2 -2
  116. package/build/web/shared/components/Throbber/index.js.map +1 -1
  117. package/build/web/shared/components/WithTooltip/Tooltip.js +2 -7
  118. package/build/web/shared/components/WithTooltip/Tooltip.js.map +1 -1
  119. package/build/web/shared/components/WithTooltip/index.js +3 -3
  120. package/build/web/shared/components/WithTooltip/index.js.map +1 -1
  121. package/build/web/shared/components/YouTubeVideo/index.js +2 -5
  122. package/build/web/shared/components/YouTubeVideo/index.js.map +1 -1
  123. package/build/web/shared/components/selectors/CustomDropdown/Options/index.js +1 -6
  124. package/build/web/shared/components/selectors/CustomDropdown/Options/index.js.map +1 -1
  125. package/build/web/shared/components/selectors/CustomDropdown/index.js +1 -7
  126. package/build/web/shared/components/selectors/CustomDropdown/index.js.map +1 -1
  127. package/build/web/shared/components/selectors/Switch/index.js +1 -1
  128. package/build/web/shared/components/selectors/Switch/index.js.map +1 -1
  129. package/build/web/shared/utils/globalState.js +1 -1
  130. package/build/web/shared/utils/globalState.js.map +1 -1
  131. package/build/web/shared/utils/index.js +1 -1
  132. package/build/web/shared/utils/index.js.map +1 -1
  133. package/build/web/shared/utils/splitComponent.js +3 -10
  134. package/build/web/shared/utils/splitComponent.js.map +1 -1
  135. package/build/web/shared/utils/time.js +2 -2
  136. package/build/web/shared/utils/time.js.map +1 -1
  137. package/config/babel/webpack.d.ts +1 -0
  138. package/config/babel/webpack.js +10 -12
  139. package/package.json +10 -8
  140. package/tsconfig.json +1 -1
  141. package/tsconfig.types.json +1 -1
@@ -3,6 +3,7 @@
3
3
  import { BrowserRouter } from "react-router";
4
4
  import { GlobalStateProvider } from "@dr.pogodin/react-global-state";
5
5
  import { HelmetProvider } from "@dr.pogodin/react-helmet";
6
+ import { setClientChunkGroups } from "../shared/utils/splitComponent.js";
6
7
  import getInj from "./getInj.js";
7
8
  import { jsx as _jsx } from "react/jsx-runtime"; /**
8
9
  * Prepares and launches the app at client side.
@@ -11,6 +12,7 @@ import { jsx as _jsx } from "react/jsx-runtime"; /**
11
12
  */
12
13
  export async function launchClient(Application, options = {}) {
13
14
  const inj = await getInj();
15
+ setClientChunkGroups(inj.CHUNK_GROUPS ?? {});
14
16
  const container = document.getElementById("react-view");
15
17
  if (!container) throw Error("Failed to find container for React app");
16
18
  const scene = /*#__PURE__*/_jsx(GlobalStateProvider, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createRoot","hydrateRoot","BrowserRouter","GlobalStateProvider","HelmetProvider","getInj","jsx","_jsx","launchClient","Application","options","inj","container","document","getElementById","Error","scene","initialState","ISTATE","children","dontHydrate","root","render"],"sources":["../../../src/client/index.tsx"],"sourcesContent":["// Initialization of client-side code.\n/* global document */\n\nimport type { ComponentType } from 'react';\nimport { createRoot, hydrateRoot } from 'react-dom/client';\nimport { BrowserRouter } from 'react-router';\n\nimport { GlobalStateProvider } from '@dr.pogodin/react-global-state';\nimport { HelmetProvider } from '@dr.pogodin/react-helmet';\n\nimport getInj from './getInj';\n\ntype OptionsT = {\n dontHydrate?: boolean;\n initialState?: unknown;\n};\n\n/**\n * Prepares and launches the app at client side.\n * @param Application Root application component\n * @param [options={}] Optional. Additional settings.\n */\nexport async function launchClient(\n Application: ComponentType,\n options: OptionsT = {},\n): Promise<void> {\n const inj = await getInj();\n\n const container = document.getElementById('react-view');\n if (!container) throw Error('Failed to find container for React app');\n const scene = (\n <GlobalStateProvider initialState={inj.ISTATE ?? options.initialState}>\n <BrowserRouter>\n <HelmetProvider>\n <Application />\n </HelmetProvider>\n </BrowserRouter>\n </GlobalStateProvider>\n );\n\n if (options.dontHydrate) {\n const root = createRoot(container);\n root.render(scene);\n } else hydrateRoot(container, scene);\n}\n"],"mappings":"AAAA;AACA,qBAGA,SAASA,UAAU,EAAEC,WAAW,QAAQ,kBAAkB;AAC1D,SAASC,aAAa,QAAQ,cAAc;AAE5C,SAASC,mBAAmB,QAAQ,gCAAgC;AACpE,SAASC,cAAc,QAAQ,0BAA0B;AAEzD,OAAOC,MAAM;AAAiB,SAAAC,GAAA,IAAAC,IAAA,4BAO9B;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,YAAYA,CAChCC,WAA0B,EAC1BC,OAAiB,GAAG,CAAC,CAAC,EACP;EACf,MAAMC,GAAG,GAAG,MAAMN,MAAM,CAAC,CAAC;EAE1B,MAAMO,SAAS,GAAGC,QAAQ,CAACC,cAAc,CAAC,YAAY,CAAC;EACvD,IAAI,CAACF,SAAS,EAAE,MAAMG,KAAK,CAAC,wCAAwC,CAAC;EACrE,MAAMC,KAAK,gBACTT,IAAA,CAACJ,mBAAmB;IAACc,YAAY,EAAEN,GAAG,CAACO,MAAM,IAAIR,OAAO,CAACO,YAAa;IAAAE,QAAA,eACpEZ,IAAA,CAACL,aAAa;MAAAiB,QAAA,eACZZ,IAAA,CAACH,cAAc;QAAAe,QAAA,eACbZ,IAAA,CAACE,WAAW,IAAE;MAAC,CACD;IAAC,CACJ;EAAC,CACG,CACtB;EAED,IAAIC,OAAO,CAACU,WAAW,EAAE;IACvB,MAAMC,IAAI,GAAGrB,UAAU,CAACY,SAAS,CAAC;IAClCS,IAAI,CAACC,MAAM,CAACN,KAAK,CAAC;EACpB,CAAC,MAAMf,WAAW,CAACW,SAAS,EAAEI,KAAK,CAAC;AACtC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["createRoot","hydrateRoot","BrowserRouter","GlobalStateProvider","HelmetProvider","setClientChunkGroups","getInj","jsx","_jsx","launchClient","Application","options","inj","CHUNK_GROUPS","container","document","getElementById","Error","scene","initialState","ISTATE","children","dontHydrate","root","render"],"sources":["../../../src/client/index.tsx"],"sourcesContent":["// Initialization of client-side code.\n/* global document */\n\nimport type { ComponentType } from 'react';\nimport { createRoot, hydrateRoot } from 'react-dom/client';\nimport { BrowserRouter } from 'react-router';\n\nimport { GlobalStateProvider } from '@dr.pogodin/react-global-state';\nimport { HelmetProvider } from '@dr.pogodin/react-helmet';\n\nimport { setClientChunkGroups } from 'utils/splitComponent';\n\nimport getInj from './getInj';\n\ntype OptionsT = {\n dontHydrate?: boolean;\n initialState?: unknown;\n};\n\n/**\n * Prepares and launches the app at client side.\n * @param Application Root application component\n * @param [options={}] Optional. Additional settings.\n */\nexport async function launchClient(\n Application: ComponentType,\n options: OptionsT = {},\n): Promise<void> {\n const inj = await getInj();\n\n setClientChunkGroups(inj.CHUNK_GROUPS ?? {});\n\n const container = document.getElementById('react-view');\n if (!container) throw Error('Failed to find container for React app');\n const scene = (\n <GlobalStateProvider initialState={inj.ISTATE ?? options.initialState}>\n <BrowserRouter>\n <HelmetProvider>\n <Application />\n </HelmetProvider>\n </BrowserRouter>\n </GlobalStateProvider>\n );\n\n if (options.dontHydrate) {\n const root = createRoot(container);\n root.render(scene);\n } else hydrateRoot(container, scene);\n}\n"],"mappings":"AAAA;AACA,qBAGA,SAASA,UAAU,EAAEC,WAAW,QAAQ,kBAAkB;AAC1D,SAASC,aAAa,QAAQ,cAAc;AAE5C,SAASC,mBAAmB,QAAQ,gCAAgC;AACpE,SAASC,cAAc,QAAQ,0BAA0B;AAEzD,SAASC,oBAAoB;AAAA,OAEtBC,MAAM;AAAiB,SAAAC,GAAA,IAAAC,IAAA,4BAO9B;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,YAAYA,CAChCC,WAA0B,EAC1BC,OAAiB,GAAG,CAAC,CAAC,EACP;EACf,MAAMC,GAAG,GAAG,MAAMN,MAAM,CAAC,CAAC;EAE1BD,oBAAoB,CAACO,GAAG,CAACC,YAAY,IAAI,CAAC,CAAC,CAAC;EAE5C,MAAMC,SAAS,GAAGC,QAAQ,CAACC,cAAc,CAAC,YAAY,CAAC;EACvD,IAAI,CAACF,SAAS,EAAE,MAAMG,KAAK,CAAC,wCAAwC,CAAC;EACrE,MAAMC,KAAK,gBACTV,IAAA,CAACL,mBAAmB;IAACgB,YAAY,EAAEP,GAAG,CAACQ,MAAM,IAAIT,OAAO,CAACQ,YAAa;IAAAE,QAAA,eACpEb,IAAA,CAACN,aAAa;MAAAmB,QAAA,eACZb,IAAA,CAACJ,cAAc;QAAAiB,QAAA,eACbb,IAAA,CAACE,WAAW,IAAE;MAAC,CACD;IAAC,CACJ;EAAC,CACG,CACtB;EAED,IAAIC,OAAO,CAACW,WAAW,EAAE;IACvB,MAAMC,IAAI,GAAGvB,UAAU,CAACc,SAAS,CAAC;IAClCS,IAAI,CAACC,MAAM,CAACN,KAAK,CAAC;EACpB,CAAC,MAAMjB,WAAW,CAACa,SAAS,EAAEI,KAAK,CAAC;AACtC","ignoreList":[]}
@@ -27,8 +27,8 @@ if (import.meta.webpackHot) {
27
27
  delete global.REACT_UTILS_LIBRARY_LOADED;
28
28
  });
29
29
  }
30
- */export { GlobalStateProvider, getGlobalState, newAsyncDataEnvelope, useAsyncCollection, useAsyncData, useGlobalState, withGlobalStateType } from "@dr.pogodin/react-global-state";
30
+ */export { GlobalStateProvider, newAsyncDataEnvelope, useAsyncCollection, useAsyncData, useGlobalState, useGlobalStateObject, withGlobalStateType } from "@dr.pogodin/react-global-state";
31
31
  export * from "./shared/components/index.js";
32
- export { Barrier, Cached, Emitter, Semaphore, THEME_COMPOSE, THEME_PRIORITY, ThemeProvider, assertEmptyObject, getConfig, getSsrContext, splitComponent, time, useTheme, webpack, withRetries } from "./shared/utils/index.js";
32
+ export { Barrier, Cached, Emitter, Semaphore, THEME_COMPOSE, THEME_PRIORITY, ThemeProvider, assertEmptyObject, getConfig, splitComponent, time, useSsrContext, useTheme, webpack, withRetries } from "./shared/utils/index.js";
33
33
  export * from "./shared/utils/isomorphy/index.js";
34
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["GlobalStateProvider","getGlobalState","newAsyncDataEnvelope","useAsyncCollection","useAsyncData","useGlobalState","withGlobalStateType","Barrier","Cached","Emitter","Semaphore","THEME_COMPOSE","THEME_PRIORITY","ThemeProvider","assertEmptyObject","getConfig","getSsrContext","splitComponent","time","useTheme","webpack","withRetries"],"sources":["../../src/index.ts"],"sourcesContent":["// TODO: For now I commented out this safeguard check, as I am not sure how\n// to easily make it work: it should not be triggered in HMR mode, but if I\n// add the code relying on import.meta, it fails in Jest environment, because\n// Jest does not support ES modules yet, and import.meta is not support in\n// CommonJS modules, and the \"babel-plugin-transform-import-meta\" plugin\n// we use to workaround this issue for import.meta.dirname, etc. does not\n// transform import.meta.webpackHot\n\n// It is a safeguard against multiple instances / versions of the library\n// being loaded into environment by mistake (e.g. because of different\n// packages pinning down different exact versions of the lib, thus preventing\n// a proper dedupe and using a single common library version).\n// if (global.REACT_UTILS_LIBRARY_LOADED) {\n// throw Error('React utils library is already loaded');\n// } else global.REACT_UTILS_LIBRARY_LOADED = true;\n\n/*\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface ImportMeta {\n webpackHot?: {\n dispose(cb: () => void): void;\n };\n }\n}\n\nif (import.meta.webpackHot) {\n import.meta.webpackHot.dispose(() => {\n delete global.REACT_UTILS_LIBRARY_LOADED;\n });\n}\n*/\n\nexport {\n type AsyncCollectionLoaderT,\n type AsyncCollectionT,\n type AsyncDataEnvelopeT,\n type AsyncDataLoaderT,\n type ForceT,\n GlobalStateProvider,\n type UseAsyncDataOptionsT,\n type UseAsyncDataResT,\n type UseGlobalStateResT,\n type ValueOrInitializerT,\n getGlobalState,\n newAsyncDataEnvelope,\n useAsyncCollection,\n useAsyncData,\n useGlobalState,\n withGlobalStateType,\n} from '@dr.pogodin/react-global-state';\n\nexport * from 'components';\n\nexport {\n type BeforeRenderResT,\n type BeforeRenderT,\n type ConfigT,\n type ServerSsrContext,\n type ServerT,\n} from './server';\n\nexport {\n Barrier,\n Cached,\n Emitter,\n type Listener,\n type ObjectKey,\n Semaphore,\n THEME_COMPOSE,\n THEME_PRIORITY,\n type Theme,\n ThemeProvider,\n assertEmptyObject,\n getConfig,\n getSsrContext,\n splitComponent,\n time,\n useTheme,\n webpack,\n withRetries,\n} from 'utils';\n\nexport * from 'utils/isomorphy';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAEA,SAMEA,mBAAmB,EAKnBC,cAAc,EACdC,oBAAoB,EACpBC,kBAAkB,EAClBC,YAAY,EACZC,cAAc,EACdC,mBAAmB,QACd,gCAAgC;AAEvC;AAAA,SAWEC,OAAO,EACPC,MAAM,EACNC,OAAO,EAGPC,SAAS,EACTC,aAAa,EACbC,cAAc,EAEdC,aAAa,EACbC,iBAAiB,EACjBC,SAAS,EACTC,aAAa,EACbC,cAAc,EACdC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,WAAW;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["GlobalStateProvider","newAsyncDataEnvelope","useAsyncCollection","useAsyncData","useGlobalState","useGlobalStateObject","withGlobalStateType","Barrier","Cached","Emitter","Semaphore","THEME_COMPOSE","THEME_PRIORITY","ThemeProvider","assertEmptyObject","getConfig","splitComponent","time","useSsrContext","useTheme","webpack","withRetries"],"sources":["../../src/index.ts"],"sourcesContent":["// TODO: For now I commented out this safeguard check, as I am not sure how\n// to easily make it work: it should not be triggered in HMR mode, but if I\n// add the code relying on import.meta, it fails in Jest environment, because\n// Jest does not support ES modules yet, and import.meta is not support in\n// CommonJS modules, and the \"babel-plugin-transform-import-meta\" plugin\n// we use to workaround this issue for import.meta.dirname, etc. does not\n// transform import.meta.webpackHot\n\n// It is a safeguard against multiple instances / versions of the library\n// being loaded into environment by mistake (e.g. because of different\n// packages pinning down different exact versions of the lib, thus preventing\n// a proper dedupe and using a single common library version).\n// if (global.REACT_UTILS_LIBRARY_LOADED) {\n// throw Error('React utils library is already loaded');\n// } else global.REACT_UTILS_LIBRARY_LOADED = true;\n\n/*\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface ImportMeta {\n webpackHot?: {\n dispose(cb: () => void): void;\n };\n }\n}\n\nif (import.meta.webpackHot) {\n import.meta.webpackHot.dispose(() => {\n delete global.REACT_UTILS_LIBRARY_LOADED;\n });\n}\n*/\n\nexport {\n type AsyncCollectionLoaderT,\n type AsyncCollectionT,\n type AsyncDataEnvelopeT,\n type AsyncDataLoaderT,\n type ForceT,\n GlobalStateProvider,\n type UseAsyncDataOptionsT,\n type UseAsyncDataResT,\n type UseGlobalStateResT,\n type ValueOrInitializerT,\n newAsyncDataEnvelope,\n useAsyncCollection,\n useAsyncData,\n useGlobalState,\n useGlobalStateObject,\n withGlobalStateType,\n} from '@dr.pogodin/react-global-state';\n\nexport * from 'components';\n\nexport {\n type BeforeRenderResT,\n type BeforeRenderT,\n type ConfigT,\n type ServerSsrContext,\n type ServerT,\n} from './server';\n\nexport {\n Barrier,\n Cached,\n Emitter,\n type Listener,\n type ObjectKey,\n Semaphore,\n THEME_COMPOSE,\n THEME_PRIORITY,\n type Theme,\n ThemeProvider,\n assertEmptyObject,\n getConfig,\n splitComponent,\n time,\n useSsrContext,\n useTheme,\n webpack,\n withRetries,\n} from 'utils';\n\nexport * from 'utils/isomorphy';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAEA,SAMEA,mBAAmB,EAKnBC,oBAAoB,EACpBC,kBAAkB,EAClBC,YAAY,EACZC,cAAc,EACdC,oBAAoB,EACpBC,mBAAmB,QACd,gCAAgC;AAEvC;AAAA,SAWEC,OAAO,EACPC,MAAM,EACNC,OAAO,EAGPC,SAAS,EACTC,aAAa,EACbC,cAAc,EAEdC,aAAa,EACbC,iBAAiB,EACjBC,SAAS,EACTC,cAAc,EACdC,IAAI,EACJC,aAAa,EACbC,QAAQ,EACRC,OAAO,EACPC,WAAW;AAAA","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- // The <Button> component implements a standard button / button-like link.
1
+ import { c as _c } from "react/compiler-runtime"; // The <Button> component implements a standard button / button-like link.
2
2
  import { useTheme } from "@dr.pogodin/react-themes";
3
3
  import Link from "../Link.js";
4
4
  const defaultTheme = {
@@ -10,93 +10,171 @@ const defaultTheme = {
10
10
  "disabled": "-dr-pogodin-react-utils___build-web-shared-components-Button-style___disabled___-6CH9q"
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
- export const BaseButton = ({
14
- active,
15
- children,
16
- disabled,
17
- enforceA,
18
- keepScrollPosition,
19
- onClick,
20
- onKeyDown: onKeyDownProp,
21
- onKeyUp,
22
- onMouseDown,
23
- onMouseUp,
24
- onPointerDown,
25
- onPointerUp,
26
- openNewTab,
27
- replace,
28
- testId,
29
- theme,
30
- to
31
- }) => {
13
+ export const BaseButton = t0 => {
14
+ const $ = _c(32);
15
+ const {
16
+ active,
17
+ children,
18
+ disabled,
19
+ enforceA,
20
+ keepScrollPosition,
21
+ onClick,
22
+ onKeyDown: onKeyDownProp,
23
+ onKeyUp,
24
+ onMouseDown,
25
+ onMouseUp,
26
+ onPointerDown,
27
+ onPointerUp,
28
+ openNewTab,
29
+ replace,
30
+ testId,
31
+ theme,
32
+ to
33
+ } = t0;
32
34
  let className = theme.button;
33
- if (active && theme.active) className += ` ${theme.active}`;
35
+ if (active && theme.active) {
36
+ className = className + ` ${theme.active}`;
37
+ }
34
38
  if (disabled) {
35
- if (theme.disabled) className += ` ${theme.disabled}`;
36
- return /*#__PURE__*/_jsx("div", {
37
- className: className,
38
- "data-testid": process.env.NODE_ENV === "production" ? undefined : testId,
39
- children: children
40
- });
39
+ if (theme.disabled) {
40
+ className = className + ` ${theme.disabled}`;
41
+ }
42
+ const t1 = process.env.NODE_ENV === "production" ? undefined : testId;
43
+ let t2;
44
+ if ($[0] !== children || $[1] !== className || $[2] !== t1) {
45
+ t2 = /*#__PURE__*/_jsx("div", {
46
+ className: className,
47
+ "data-testid": t1,
48
+ children: children
49
+ });
50
+ $[0] = children;
51
+ $[1] = className;
52
+ $[2] = t1;
53
+ $[3] = t2;
54
+ } else {
55
+ t2 = $[3];
56
+ }
57
+ return t2;
41
58
  }
42
59
  let onKeyDown = onKeyDownProp;
43
60
  if (!onKeyDown && onClick) {
44
- onKeyDown = e => {
45
- if (e.key === "Enter") onClick(e);
46
- };
61
+ let t1;
62
+ if ($[4] !== onClick) {
63
+ t1 = e => {
64
+ if (e.key === "Enter") {
65
+ onClick(e);
66
+ }
67
+ };
68
+ $[4] = onClick;
69
+ $[5] = t1;
70
+ } else {
71
+ t1 = $[5];
72
+ }
73
+ onKeyDown = t1;
47
74
  }
48
75
  if (to) {
49
- return /*#__PURE__*/_jsx(Link, {
76
+ const t1 = process.env.NODE_ENV === "production" ? undefined : testId;
77
+ let t2;
78
+ if ($[6] !== children || $[7] !== className || $[8] !== enforceA || $[9] !== keepScrollPosition || $[10] !== onClick || $[11] !== onKeyUp || $[12] !== onMouseDown || $[13] !== onMouseUp || $[14] !== onPointerDown || $[15] !== onPointerUp || $[16] !== openNewTab || $[17] !== replace || $[18] !== t1 || $[19] !== to) {
79
+ t2 = /*#__PURE__*/_jsx(Link, {
80
+ className: className,
81
+ "data-testid": t1,
82
+ enforceA: enforceA,
83
+ keepScrollPosition: keepScrollPosition,
84
+ onClick: onClick,
85
+ onKeyUp: onKeyUp,
86
+ onMouseDown: onMouseDown,
87
+ onMouseUp: onMouseUp,
88
+ onPointerDown: onPointerDown,
89
+ onPointerUp: onPointerUp,
90
+ openNewTab: openNewTab,
91
+ replace: replace,
92
+ to: to,
93
+ children: children
94
+ });
95
+ $[6] = children;
96
+ $[7] = className;
97
+ $[8] = enforceA;
98
+ $[9] = keepScrollPosition;
99
+ $[10] = onClick;
100
+ $[11] = onKeyUp;
101
+ $[12] = onMouseDown;
102
+ $[13] = onMouseUp;
103
+ $[14] = onPointerDown;
104
+ $[15] = onPointerUp;
105
+ $[16] = openNewTab;
106
+ $[17] = replace;
107
+ $[18] = t1;
108
+ $[19] = to;
109
+ $[20] = t2;
110
+ } else {
111
+ t2 = $[20];
112
+ }
113
+ return t2;
114
+ }
115
+ const t1 = process.env.NODE_ENV === "production" ? undefined : testId;
116
+ let t2;
117
+ if ($[21] !== children || $[22] !== className || $[23] !== onClick || $[24] !== onKeyDown || $[25] !== onKeyUp || $[26] !== onMouseDown || $[27] !== onMouseUp || $[28] !== onPointerDown || $[29] !== onPointerUp || $[30] !== t1) {
118
+ t2 = /*#__PURE__*/_jsx("div", {
50
119
  className: className,
51
- "data-testid": process.env.NODE_ENV === "production" ? undefined : testId,
52
- enforceA: enforceA // TODO: This was exposed as a hotifx... however, I guess we better want
53
- // to check if the `to` URL contains an anchor (#), and if it does we should
54
- // automatically opt to keep the position here; and enforce <a> (as
55
- // react-router link does not seem to respect the hash tag either,
56
- // at least not without some additional settings).
57
- ,
58
- keepScrollPosition: keepScrollPosition,
59
- onClick: onClick // TODO: For now, the `onKeyDown` handler is not passed to the <Link>,
60
- // as <Link> component does not call it anyway, presumably due to
61
- // the inner implementation details. We should look into supporting it:
62
- // https://github.com/birdofpreyru/react-utils/issues/444
63
- // onKeyDown={onKeyDown}
64
- ,
120
+ "data-testid": t1,
121
+ onClick: onClick,
122
+ onKeyDown: onKeyDown,
65
123
  onKeyUp: onKeyUp,
66
124
  onMouseDown: onMouseDown,
67
125
  onMouseUp: onMouseUp,
68
126
  onPointerDown: onPointerDown,
69
127
  onPointerUp: onPointerUp,
70
- openNewTab: openNewTab,
71
- replace: replace,
72
- to: to,
128
+ role: "button",
129
+ tabIndex: 0,
73
130
  children: children
74
131
  });
132
+ $[21] = children;
133
+ $[22] = className;
134
+ $[23] = onClick;
135
+ $[24] = onKeyDown;
136
+ $[25] = onKeyUp;
137
+ $[26] = onMouseDown;
138
+ $[27] = onMouseUp;
139
+ $[28] = onPointerDown;
140
+ $[29] = onPointerUp;
141
+ $[30] = t1;
142
+ $[31] = t2;
143
+ } else {
144
+ t2 = $[31];
75
145
  }
76
- return /*#__PURE__*/_jsx("div", {
77
- className: className,
78
- "data-testid": process.env.NODE_ENV === "production" ? undefined : testId,
79
- onClick: onClick,
80
- onKeyDown: onKeyDown,
81
- onKeyUp: onKeyUp,
82
- onMouseDown: onMouseDown,
83
- onMouseUp: onMouseUp,
84
- onPointerDown: onPointerDown,
85
- onPointerUp: onPointerUp,
86
- role: "button",
87
- tabIndex: 0,
88
- children: children
89
- });
146
+ return t2;
90
147
  };
91
- const Button = ({
92
- theme,
93
- ...rest
94
- }) => {
95
- const composed = useTheme("Button", defaultTheme, theme); // eslint-disable-next-line react/jsx-props-no-spreading
96
- return /*#__PURE__*/_jsx(BaseButton, {
97
- ...rest,
98
- theme: composed
99
- });
148
+ const Button = t0 => {
149
+ const $ = _c(6);
150
+ let rest;
151
+ let theme;
152
+ if ($[0] !== t0) {
153
+ ({
154
+ theme,
155
+ ...rest
156
+ } = t0);
157
+ $[0] = t0;
158
+ $[1] = rest;
159
+ $[2] = theme;
160
+ } else {
161
+ rest = $[1];
162
+ theme = $[2];
163
+ }
164
+ const composed = useTheme("Button", defaultTheme, theme);
165
+ let t1;
166
+ if ($[3] !== composed || $[4] !== rest) {
167
+ t1 = /*#__PURE__*/_jsx(BaseButton, {
168
+ ...rest,
169
+ theme: composed
170
+ });
171
+ $[3] = composed;
172
+ $[4] = rest;
173
+ $[5] = t1;
174
+ } else {
175
+ t1 = $[5];
176
+ }
177
+ return t1;
100
178
  };
101
179
  export default Button;
102
180
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["useTheme","Link","defaultTheme","jsx","_jsx","BaseButton","active","children","disabled","enforceA","keepScrollPosition","onClick","onKeyDown","onKeyDownProp","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","openNewTab","replace","testId","theme","to","className","button","process","env","NODE_ENV","undefined","e","key","role","tabIndex","Button","rest","composed"],"sources":["../../../../../src/shared/components/Button/index.tsx"],"sourcesContent":["// The <Button> component implements a standard button / button-like link.\n\nimport type {\n FunctionComponent,\n KeyboardEventHandler,\n MouseEventHandler,\n PointerEventHandler,\n ReactNode,\n} from 'react';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport Link from 'components/Link';\n\nimport defaultTheme from './style.scss';\n\ntype ThemeT = Theme<'active' | 'button' | 'disabled'>;\n\ntype PropsT = {\n active?: boolean;\n children?: ReactNode;\n disabled?: boolean;\n enforceA?: boolean;\n keepScrollPosition?: boolean;\n onClick?: KeyboardEventHandler & MouseEventHandler;\n onKeyDown?: KeyboardEventHandler;\n onKeyUp?: KeyboardEventHandler;\n onMouseDown?: MouseEventHandler;\n onMouseUp?: MouseEventHandler;\n onPointerDown?: PointerEventHandler;\n onPointerUp?: PointerEventHandler;\n openNewTab?: boolean;\n replace?: boolean;\n testId?: string;\n theme: ThemeT;\n\n // TODO: It needs a more precise typing of the object option.\n to?: object | string;\n};\n\nexport const BaseButton: FunctionComponent<PropsT> = ({\n active,\n children,\n disabled,\n enforceA,\n keepScrollPosition,\n onClick,\n onKeyDown: onKeyDownProp,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onPointerDown,\n onPointerUp,\n openNewTab,\n replace,\n testId,\n theme,\n to,\n}) => {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n >\n {children}\n </div>\n );\n }\n\n let onKeyDown = onKeyDownProp;\n if (!onKeyDown && onClick) {\n onKeyDown = (e) => {\n if (e.key === 'Enter') onClick(e);\n };\n }\n\n if (to) {\n return (\n <Link\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n enforceA={enforceA}\n\n // TODO: This was exposed as a hotifx... however, I guess we better want\n // to check if the `to` URL contains an anchor (#), and if it does we should\n // automatically opt to keep the position here; and enforce <a> (as\n // react-router link does not seem to respect the hash tag either,\n // at least not without some additional settings).\n keepScrollPosition={keepScrollPosition}\n\n onClick={onClick}\n\n // TODO: For now, the `onKeyDown` handler is not passed to the <Link>,\n // as <Link> component does not call it anyway, presumably due to\n // the inner implementation details. We should look into supporting it:\n // https://github.com/birdofpreyru/react-utils/issues/444\n // onKeyDown={onKeyDown}\n\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n openNewTab={openNewTab}\n replace={replace}\n to={to}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={onClick}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n role=\"button\"\n tabIndex={0}\n >\n {children}\n </div>\n );\n};\n\nconst Button: FunctionComponent<\n Omit<PropsT, 'theme'> & { theme?: ThemeT }\n> = ({ theme, ...rest }) => {\n const composed = useTheme('Button', defaultTheme, theme);\n\n // eslint-disable-next-line react/jsx-props-no-spreading\n return <BaseButton {...rest} theme={composed} />;\n};\n\nexport default Button;\n"],"mappings":"AAAA;AAUA,SAAqBA,QAAQ,QAAQ,0BAA0B;AAE/D,OAAOC,IAAI;AAAA,MAAAC,YAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAE6B,SAAAC,GAAA,IAAAC,IAAA;A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EAAEA,OAAQ;MACjBC,WAAW,EAAEA,WAAY;MACzBC,SAAS,EAAEA,SAAU;MACrBC,aAAa,EAAEA,aAAc;MAC7BC,WAAW,EAAEA,WAAY;MACzBC,UAAU,EAAEA,UAAW;MACvBC,OAAO,EAAEA,OAAQ;MACjBG,EAAE,EAAEA,EAAG;MAAAhB,QAAA,EAENA;IAAQ,CACL,CAAC;EAEX;EAEA,oBACEH,IAAA;IACEoB,SAAS,EAAEA,SAAU;IACrB,eAAaE,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAAGC,SAAS,GAAGR,MAAO;IACxEV,OAAO,EAAEA,OAAQ;IACjBC,SAAS,EAAEA,SAAU;IACrBE,OAAO,EAAEA,OAAQ;IACjBC,WAAW,EAAEA,WAAY;IACzBC,SAAS,EAAEA,SAAU;IACrBC,aAAa,EAAEA,aAAc;IAC7BC,WAAW,EAAEA,WAAY;IACzBc,IAAI,EAAC,QAAQ;IACbC,QAAQ,EAAE,CAAE;IAAA1B,QAAA,EAEXA;EAAQ,CACN,CAAC;AAEV,CAAC;AAED,MAAM2B,MAEL,GAAGA,CAAC;EAAEZ,KAAK;EAAE,GAAGa;AAAK,CAAC,KAAK;EAC1B,MAAMC,QAAQ,GAAGpC,QAAQ,CAAC,QAAQ,EAAEE,YAAY,EAAEoB,KAAK,CAAC,CAExD;EACA,oBAAOlB,IAAA,CAACC,UAAU;IAAA,GAAK8B,IAAI;IAAEb,KAAK,EAAEc;EAAS,CAAE,CAAC;AAClD,CAAC;AAED,eAAeF,MAAM","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["useTheme","Link","defaultTheme","jsx","_jsx","BaseButton","t0","$","_c","active","children","disabled","enforceA","keepScrollPosition","onClick","onKeyDown","onKeyDownProp","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","openNewTab","replace","testId","theme","to","className","button","t1","process","env","NODE_ENV","undefined","t2","e","key","role","tabIndex","Button","rest","composed"],"sources":["../../../../../src/shared/components/Button/index.tsx"],"sourcesContent":["// The <Button> component implements a standard button / button-like link.\n\nimport type {\n FunctionComponent,\n KeyboardEventHandler,\n MouseEventHandler,\n PointerEventHandler,\n ReactNode,\n} from 'react';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport Link from 'components/Link';\n\nimport defaultTheme from './style.scss';\n\ntype ThemeT = Theme<'active' | 'button' | 'disabled'>;\n\ntype PropsT = {\n active?: boolean;\n children?: ReactNode;\n disabled?: boolean;\n enforceA?: boolean;\n keepScrollPosition?: boolean;\n onClick?: KeyboardEventHandler & MouseEventHandler;\n onKeyDown?: KeyboardEventHandler;\n onKeyUp?: KeyboardEventHandler;\n onMouseDown?: MouseEventHandler;\n onMouseUp?: MouseEventHandler;\n onPointerDown?: PointerEventHandler;\n onPointerUp?: PointerEventHandler;\n openNewTab?: boolean;\n replace?: boolean;\n testId?: string;\n theme: ThemeT;\n\n // TODO: It needs a more precise typing of the object option.\n to?: object | string;\n};\n\nexport const BaseButton: FunctionComponent<PropsT> = ({\n active,\n children,\n disabled,\n enforceA,\n keepScrollPosition,\n onClick,\n onKeyDown: onKeyDownProp,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onPointerDown,\n onPointerUp,\n openNewTab,\n replace,\n testId,\n theme,\n to,\n}) => {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n >\n {children}\n </div>\n );\n }\n\n let onKeyDown = onKeyDownProp;\n if (!onKeyDown && onClick) {\n onKeyDown = (e) => {\n if (e.key === 'Enter') onClick(e);\n };\n }\n\n if (to) {\n return (\n <Link\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n enforceA={enforceA}\n\n // TODO: This was exposed as a hotifx... however, I guess we better want\n // to check if the `to` URL contains an anchor (#), and if it does we should\n // automatically opt to keep the position here; and enforce <a> (as\n // react-router link does not seem to respect the hash tag either,\n // at least not without some additional settings).\n keepScrollPosition={keepScrollPosition}\n\n onClick={onClick}\n\n // TODO: For now, the `onKeyDown` handler is not passed to the <Link>,\n // as <Link> component does not call it anyway, presumably due to\n // the inner implementation details. We should look into supporting it:\n // https://github.com/birdofpreyru/react-utils/issues/444\n // onKeyDown={onKeyDown}\n\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n openNewTab={openNewTab}\n replace={replace}\n to={to}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={onClick}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n role=\"button\"\n tabIndex={0}\n >\n {children}\n </div>\n );\n};\n\nconst Button: FunctionComponent<\n Omit<PropsT, 'theme'> & { theme?: ThemeT }\n> = ({ theme, ...rest }) => {\n const composed = useTheme('Button', defaultTheme, theme);\n\n // eslint-disable-next-line react/jsx-props-no-spreading\n return <BaseButton {...rest} theme={composed} />;\n};\n\nexport default Button;\n"],"mappings":"iDAAA;AAUA,SAAqBA,QAAQ,QAAQ,0BAA0B;AAE/D,OAAOC,IAAI;AAAA,MAAAC,YAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAE6B,SAAAC,GAAA,IAAAC,IAAA;AA0BxC,OAAO,MAAMC,UAAqC,GAAGC,EAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAC;IAAAC,MAAA;IAAAC,QAAA;IAAAC,QAAA;IAAAC,QAAA;IAAAC,kBAAA;IAAAC,OAAA;IAAAC,SAAA,EAAAC,aAAA;IAAAC,OAAA;IAAAC,WAAA;IAAAC,SAAA;IAAAC,aAAA;IAAAC,WAAA;IAAAC,UAAA;I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AA,OAAA2B,EAAA;EAAA;IAAAA,EAAA,GAAA3B,CAAA;EAAA;EAAA,OAdN2B,EAcM;AAAA,CAET;AAED,MAAMK,MAEL,GAAGjC,EAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAA,IAAAgC,IAAA;EAAA,IAAAf,KAAA;EAAA,IAAAlB,CAAA,QAAAD,EAAA;IAAC;MAAAmB,KAAA;MAAA,GAAAe;IAAA,IAAAlC,EAAkB;IAAAC,CAAA,MAAAD,EAAA;IAAAC,CAAA,MAAAiC,IAAA;IAAAjC,CAAA,MAAAkB,KAAA;EAAA;IAAAe,IAAA,GAAAjC,CAAA;IAAAkB,KAAA,GAAAlB,CAAA;EAAA;EACrB,MAAAkC,QAAA,GAAiBzC,QAAQ,CAAC,QAAQ,EAAEE,YAAY,EAAEuB,KAAK,CAAC;EAAC,IAAAI,EAAA;EAAA,IAAAtB,CAAA,QAAAkC,QAAA,IAAAlC,CAAA,QAAAiC,IAAA;IAGlDX,EAAA,gBAAAzB,IAAA,CAACC,UAAU;MAAA,GAAKmC,IAAI;MAASf,KAAQ,EAARgB;IAAQ,CAAG,CAAC;IAAAlC,CAAA,MAAAkC,QAAA;IAAAlC,CAAA,MAAAiC,IAAA;IAAAjC,CAAA,MAAAsB,EAAA;EAAA;IAAAA,EAAA,GAAAtB,CAAA;EAAA;EAAA,OAAzCsB,EAAyC;AAAA,CACjD;AAED,eAAeU,MAAM","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ import { c as _c } from "react/compiler-runtime";
1
2
  import { useTheme } from "@dr.pogodin/react-themes";
2
3
  const defaultTheme = {
3
4
  "context": "-dr-pogodin-react-utils___build-web-shared-components-Checkbox-theme___context___08mmmo",
@@ -12,41 +13,93 @@ const defaultTheme = {
12
13
  "disabled": "-dr-pogodin-react-utils___build-web-shared-components-Checkbox-theme___disabled___baVvQA"
13
14
  };
14
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
- const Checkbox = ({
16
- checked,
17
- disabled,
18
- error,
19
- label,
20
- onChange,
21
- testId,
22
- theme
23
- }) => {
16
+ const Checkbox = t0 => {
17
+ const $ = _c(17);
18
+ const {
19
+ checked,
20
+ disabled,
21
+ error,
22
+ label,
23
+ onChange,
24
+ testId,
25
+ theme
26
+ } = t0;
24
27
  const composed = useTheme("Checkbox", defaultTheme, theme);
25
28
  let containerClassName = composed.container;
26
- if (disabled) containerClassName += ` ${composed.disabled}`;
29
+ if (disabled) {
30
+ containerClassName = containerClassName + ` ${composed.disabled}`;
31
+ }
27
32
  let checkboxClassName = composed.checkbox;
28
- if (checked === "indeterminate") checkboxClassName += ` ${composed.indeterminate}`;
29
- if (error) containerClassName += ` ${composed.error}`;
30
- return /*#__PURE__*/_jsxs("div", {
31
- className: containerClassName,
32
- children: [label === undefined ? null : /*#__PURE__*/_jsx("div", {
33
+ if (checked === "indeterminate") {
34
+ checkboxClassName = checkboxClassName + ` ${composed.indeterminate}`;
35
+ }
36
+ if (error) {
37
+ containerClassName = containerClassName + ` ${composed.error}`;
38
+ }
39
+ let t1;
40
+ if ($[0] !== composed.label || $[1] !== label) {
41
+ t1 = label === undefined ? null : /*#__PURE__*/_jsx("div", {
33
42
  className: composed.label,
34
43
  children: label
35
- }), /*#__PURE__*/_jsx("input", {
36
- checked: checked === undefined ? undefined : checked === true,
44
+ });
45
+ $[0] = composed.label;
46
+ $[1] = label;
47
+ $[2] = t1;
48
+ } else {
49
+ t1 = $[2];
50
+ }
51
+ const t2 = checked === undefined ? undefined : checked === true;
52
+ const t3 = process.env.NODE_ENV === "production" ? undefined : testId;
53
+ let t4;
54
+ if ($[3] !== checkboxClassName || $[4] !== disabled || $[5] !== onChange || $[6] !== t2 || $[7] !== t3) {
55
+ t4 = /*#__PURE__*/_jsx("input", {
56
+ checked: t2,
37
57
  className: checkboxClassName,
38
- "data-testid": process.env.NODE_ENV === "production" ? undefined : testId,
58
+ "data-testid": t3,
39
59
  disabled: disabled,
40
60
  onChange: onChange,
41
- onClick: e => {
42
- e.stopPropagation();
43
- },
61
+ onClick: _temp,
44
62
  type: "checkbox"
45
- }), error && error !== true ? /*#__PURE__*/_jsx("div", {
63
+ });
64
+ $[3] = checkboxClassName;
65
+ $[4] = disabled;
66
+ $[5] = onChange;
67
+ $[6] = t2;
68
+ $[7] = t3;
69
+ $[8] = t4;
70
+ } else {
71
+ t4 = $[8];
72
+ }
73
+ let t5;
74
+ if ($[9] !== composed.errorMessage || $[10] !== error) {
75
+ t5 = error && error !== true ? /*#__PURE__*/_jsx("div", {
46
76
  className: composed.errorMessage,
47
77
  children: error
48
- }) : null]
49
- });
78
+ }) : null;
79
+ $[9] = composed.errorMessage;
80
+ $[10] = error;
81
+ $[11] = t5;
82
+ } else {
83
+ t5 = $[11];
84
+ }
85
+ let t6;
86
+ if ($[12] !== containerClassName || $[13] !== t1 || $[14] !== t4 || $[15] !== t5) {
87
+ t6 = /*#__PURE__*/_jsxs("div", {
88
+ className: containerClassName,
89
+ children: [t1, t4, t5]
90
+ });
91
+ $[12] = containerClassName;
92
+ $[13] = t1;
93
+ $[14] = t4;
94
+ $[15] = t5;
95
+ $[16] = t6;
96
+ } else {
97
+ t6 = $[16];
98
+ }
99
+ return t6;
50
100
  };
51
101
  export default Checkbox;
102
+ function _temp(e) {
103
+ e.stopPropagation();
104
+ }
52
105
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["useTheme","defaultTheme","jsx","_jsx","jsxs","_jsxs","Checkbox","checked","disabled","error","label","onChange","testId","theme","composed","containerClassName","container","checkboxClassName","checkbox","indeterminate","className","children","undefined","process","env","NODE_ENV","onClick","e","stopPropagation","type","errorMessage"],"sources":["../../../../../src/shared/components/Checkbox/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype PropT<ValueT> = {\n checked?: ValueT;\n disabled?: boolean;\n error?: ReactNode;\n label?: React.ReactNode;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n testId?: string;\n theme?: Theme<\n | 'checkbox'\n | 'container'\n | 'disabled'\n | 'error'\n | 'errorMessage'\n | 'indeterminate'\n | 'label'\n >;\n};\n\nconst Checkbox = <ValueT extends 'indeterminate' | boolean = boolean>({\n checked,\n disabled,\n error,\n label,\n onChange,\n testId,\n theme,\n}: PropT<ValueT>): ReactNode => {\n const composed = useTheme('Checkbox', defaultTheme, theme);\n\n let containerClassName = composed.container;\n if (disabled) containerClassName += ` ${composed.disabled}`;\n\n let checkboxClassName = composed.checkbox;\n if (checked === 'indeterminate') checkboxClassName += ` ${composed.indeterminate}`;\n\n if (error) containerClassName += ` ${composed.error}`;\n\n return (\n <div className={containerClassName}>\n { label === undefined\n ? null : <div className={composed.label}>{label}</div> }\n <input\n checked={checked === undefined ? undefined : checked === true}\n className={checkboxClassName}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n disabled={disabled}\n onChange={onChange}\n onClick={(e) => {\n e.stopPropagation();\n }}\n type=\"checkbox\"\n />\n {error && error !== true\n ? <div className={composed.errorMessage}>{error}</div>\n : null}\n </div>\n );\n};\n\nexport default Checkbox;\n"],"mappings":"AAEA,SAAqBA,QAAQ,QAAQ,0BAA0B;AAE/D,MAAAC,YAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAwC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAoBxC,MAAMC,QAAQ,GAAGA,CAAqD;EACpEC,OAAO;EACPC,QAAQ;EACRC,KAAK;EACLC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACNC;AACa,CAAC,KAAgB;EAC9B,MAAMC,QAAQ,GAAGd,QAAQ,CAAC,UAAU,EAAEC,YAAY,EAAEY,KAAK,CAAC;EAE1D,IAAIE,kBAAkB,GAAGD,QAAQ,CAACE,SAAS;EAC3C,IAAIR,QAAQ,EAAEO,kBAAkB,IAAI,IAAID,QAAQ,CAACN,QAAQ,EAAE;EAE3D,IAAIS,iBAAiB,GAAGH,QAAQ,CAACI,QAAQ;EACzC,IAAIX,OAAO,KAAK,eAAe,EAAEU,iBAAiB,IAAI,IAAIH,QAAQ,CAACK,aAAa,EAAE;EAElF,IAAIV,KAAK,EAAEM,kBAAkB,IAAI,IAAID,QAAQ,CAACL,KAAK,EAAE;EAErD,oBACEJ,KAAA;IAAKe,SAAS,EAAEL,kBAAmB;IAAAM,QAAA,GAC/BX,KAAK,KAAKY,SAAS,GACjB,IAAI,gBAAGnB,IAAA;MAAKiB,SAAS,EAAEN,QAAQ,CAACJ,KAAM;MAAAW,QAAA,EAAEX;IAAK,CAAM,CAAC,eACxDP,IAAA;MACEI,OAAO,EAAEA,OAAO,KAAKe,SAAS,GAAGA,SAAS,GAAGf,OAAO,KAAK,IAAK;MAC9Da,SAAS,EAAEH,iBAAkB;MAC7B,eAAaM,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAAGH,SAAS,GAAGV,MAAO;MACxEJ,QAAQ,EAAEA,QAAS;MACnBG,QAAQ,EAAEA,QAAS;MACnBe,OAAO,EAAGC,CAAC,IAAK;QACdA,CAAC,CAACC,eAAe,CAAC,CAAC;MACrB,CAAE;MACFC,IAAI,EAAC;IAAU,CAChB,CAAC,EACDpB,KAAK,IAAIA,KAAK,KAAK,IAAI,gBACpBN,IAAA;MAAKiB,SAAS,EAAEN,QAAQ,CAACgB,YAAa;MAAAT,QAAA,EAAEZ;IAAK,CAAM,CAAC,GACpD,IAAI;EAAA,CACL,CAAC;AAEV,CAAC;AAED,eAAeH,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["useTheme","defaultTheme","jsx","_jsx","jsxs","_jsxs","Checkbox","t0","$","_c","checked","disabled","error","label","onChange","testId","theme","composed","containerClassName","container","checkboxClassName","checkbox","indeterminate","t1","undefined","className","children","t2","t3","process","env","NODE_ENV","t4","onClick","_temp","type","t5","errorMessage","t6","e","stopPropagation"],"sources":["../../../../../src/shared/components/Checkbox/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype PropT<ValueT> = {\n checked?: ValueT;\n disabled?: boolean;\n error?: ReactNode;\n label?: React.ReactNode;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n testId?: string;\n theme?: Theme<\n | 'checkbox'\n | 'container'\n | 'disabled'\n | 'error'\n | 'errorMessage'\n | 'indeterminate'\n | 'label'\n >;\n};\n\nconst Checkbox = <ValueT extends 'indeterminate' | boolean = boolean>({\n checked,\n disabled,\n error,\n label,\n onChange,\n testId,\n theme,\n}: PropT<ValueT>): ReactNode => {\n const composed = useTheme('Checkbox', defaultTheme, theme);\n\n let containerClassName = composed.container;\n if (disabled) containerClassName += ` ${composed.disabled}`;\n\n let checkboxClassName = composed.checkbox;\n if (checked === 'indeterminate') checkboxClassName += ` ${composed.indeterminate}`;\n\n if (error) containerClassName += ` ${composed.error}`;\n\n return (\n <div className={containerClassName}>\n { label === undefined\n ? null : <div className={composed.label}>{label}</div> }\n <input\n checked={checked === undefined ? undefined : checked === true}\n className={checkboxClassName}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n disabled={disabled}\n onChange={onChange}\n onClick={(e) => {\n e.stopPropagation();\n }}\n type=\"checkbox\"\n />\n {error && error !== true\n ? <div className={composed.errorMessage}>{error}</div>\n : null}\n </div>\n );\n};\n\nexport default Checkbox;\n"],"mappings":";AAEA,SAAqBA,QAAQ,QAAQ,0BAA0B;AAE/D,MAAAC,YAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAwC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAoBxC,MAAMC,QAAQ,GAAGC,EAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAqD;IAAAC,O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