@semcore/core 16.6.0-prerelease.1 → 16.6.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 (157) hide show
  1. package/lib/core-types/Component.d.ts +33 -79
  2. package/lib/core-types/Component.js +14 -46
  3. package/lib/core-types/Component.js.map +1 -1
  4. package/lib/core-types/Component.mjs +11 -7
  5. package/lib/core-types/Component.mjs.map +1 -1
  6. package/lib/core-types/symbols.mjs +9 -9
  7. package/lib/coreFactory.d.ts +6 -23
  8. package/lib/coreFactory.js +53 -22
  9. package/lib/coreFactory.js.map +1 -1
  10. package/lib/coreFactory.mjs +54 -35
  11. package/lib/coreFactory.mjs.map +1 -1
  12. package/lib/decorators/propsObserver.d.ts +11 -0
  13. package/lib/decorators/propsObserver.js +77 -0
  14. package/lib/decorators/propsObserver.js.map +1 -0
  15. package/lib/decorators/propsObserver.mjs +70 -0
  16. package/lib/decorators/propsObserver.mjs.map +1 -0
  17. package/lib/decorators/reactive.d.ts +11 -0
  18. package/lib/decorators/reactive.js +51 -0
  19. package/lib/decorators/reactive.js.map +1 -0
  20. package/lib/decorators/reactive.mjs +45 -0
  21. package/lib/decorators/reactive.mjs.map +1 -0
  22. package/lib/enhancement/Children.mjs +1 -1
  23. package/lib/enhancement/staticChildren.mjs +3 -3
  24. package/lib/enhancement/style.mjs +2 -2
  25. package/lib/enhancement/uncontrolledProps.js +2 -1
  26. package/lib/enhancement/uncontrolledProps.js.map +1 -1
  27. package/lib/enhancement/uncontrolledProps.mjs +2 -1
  28. package/lib/enhancement/uncontrolledProps.mjs.map +1 -1
  29. package/lib/esm/core-types/Component.mjs +11 -7
  30. package/lib/esm/core-types/symbols.mjs +9 -9
  31. package/lib/esm/coreFactory.mjs +54 -35
  32. package/lib/esm/enhancement/Children.mjs +1 -1
  33. package/lib/esm/enhancement/staticChildren.mjs +3 -3
  34. package/lib/esm/enhancement/style.mjs +2 -2
  35. package/lib/esm/enhancement/uncontrolledProps.mjs +2 -1
  36. package/lib/esm/styled/sstyled.mjs +1 -1
  37. package/lib/esm/utils/enhances/WithI18n.mjs +1 -46
  38. package/lib/esm/utils/ref.mjs +0 -14
  39. package/lib/index.d.ts +3 -3
  40. package/lib/index.js.map +1 -1
  41. package/lib/index.mjs.map +1 -1
  42. package/lib/styled/index.d.ts +1 -5
  43. package/lib/styled/index.js.map +1 -1
  44. package/lib/styled/index.mjs.map +1 -1
  45. package/lib/styled/sstyled.mjs +1 -1
  46. package/lib/utils/enhances/WithCSS.d.ts +2 -30
  47. package/lib/utils/enhances/WithCSS.js +4 -57
  48. package/lib/utils/enhances/WithCSS.js.map +1 -1
  49. package/lib/utils/enhances/WithCSS.mjs +2 -53
  50. package/lib/utils/enhances/WithCSS.mjs.map +1 -1
  51. package/lib/utils/enhances/WithI18n.d.ts +1 -30
  52. package/lib/utils/enhances/WithI18n.js +1 -57
  53. package/lib/utils/enhances/WithI18n.js.map +1 -1
  54. package/lib/utils/enhances/WithI18n.mjs +1 -46
  55. package/lib/utils/enhances/WithI18n.mjs.map +1 -1
  56. package/lib/utils/enhances/animatedSizeEnhance.d.ts +0 -4
  57. package/lib/utils/enhances/animatedSizeEnhance.js +0 -2
  58. package/lib/utils/enhances/animatedSizeEnhance.js.map +1 -1
  59. package/lib/utils/enhances/animatedSizeEnhance.mjs +0 -3
  60. package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -1
  61. package/lib/utils/enhances/i18nEnhance.d.ts +0 -4
  62. package/lib/utils/enhances/i18nEnhance.js +0 -2
  63. package/lib/utils/enhances/i18nEnhance.js.map +1 -1
  64. package/lib/utils/enhances/i18nEnhance.mjs.map +1 -1
  65. package/lib/utils/eventEmitter.d.ts +10 -6
  66. package/lib/utils/eventEmitter.js +55 -27
  67. package/lib/utils/eventEmitter.js.map +1 -1
  68. package/lib/utils/eventEmitter.mjs +55 -27
  69. package/lib/utils/eventEmitter.mjs.map +1 -1
  70. package/lib/utils/getDisplayName.mjs +3 -5
  71. package/lib/utils/indentStyles.d.ts +3 -0
  72. package/lib/utils/indentStyles.js +45 -0
  73. package/lib/utils/indentStyles.js.map +1 -0
  74. package/lib/utils/indentStyles.mjs +36 -0
  75. package/lib/utils/indentStyles.mjs.map +1 -0
  76. package/lib/utils/injectStyle.js +1 -1
  77. package/lib/utils/injectStyle.js.map +1 -1
  78. package/lib/utils/injectStyle.mjs +1 -1
  79. package/lib/utils/injectStyle.mjs.map +1 -1
  80. package/lib/utils/ref.d.ts +1 -3
  81. package/lib/utils/ref.js +0 -14
  82. package/lib/utils/ref.js.map +1 -1
  83. package/lib/utils/ref.mjs +0 -14
  84. package/lib/utils/ref.mjs.map +1 -1
  85. package/lib/utils/uniqueID.d.ts +0 -4
  86. package/lib/utils/uniqueID.js +1 -3
  87. package/lib/utils/uniqueID.js.map +1 -1
  88. package/lib/utils/uniqueID.mjs +1 -4
  89. package/lib/utils/uniqueID.mjs.map +1 -1
  90. package/lib/utils/use/useColorResolver.js +1 -1
  91. package/lib/utils/use/useColorResolver.js.map +1 -1
  92. package/lib/utils/use/useColorResolver.mjs +1 -1
  93. package/lib/utils/use/useColorResolver.mjs.map +1 -1
  94. package/lib/utils/use/useEnhancedEffect.d.ts +1 -1
  95. package/lib/utils/zIndexStacking.d.ts +3 -1
  96. package/lib/utils/zIndexStacking.js.map +1 -1
  97. package/lib/utils/zIndexStacking.mjs.map +1 -1
  98. package/package.json +2 -2
  99. package/lib/enhancement/bindHandler.d.ts +0 -5
  100. package/lib/enhancement/bindHandler.js +0 -53
  101. package/lib/enhancement/bindHandler.js.map +0 -1
  102. package/lib/enhancement/bindHandler.mjs +0 -48
  103. package/lib/enhancement/bindHandler.mjs.map +0 -1
  104. package/lib/enhancement/hoistProps.d.ts +0 -10
  105. package/lib/enhancement/hoistProps.js +0 -95
  106. package/lib/enhancement/hoistProps.js.map +0 -1
  107. package/lib/enhancement/hoistProps.mjs +0 -78
  108. package/lib/enhancement/hoistProps.mjs.map +0 -1
  109. package/lib/esm/enhancement/bindHandler.mjs +0 -48
  110. package/lib/esm/enhancement/hoistProps.mjs +0 -78
  111. package/lib/esm/utils/createHoc.mjs +0 -42
  112. package/lib/esm/utils/getDisplayName.mjs +0 -6
  113. package/lib/utils/ScreenReaderOnly.d.ts +0 -8
  114. package/lib/utils/ScreenReaderOnly.js +0 -30
  115. package/lib/utils/ScreenReaderOnly.js.map +0 -1
  116. package/lib/utils/ScreenReaderOnly.mjs +0 -24
  117. package/lib/utils/ScreenReaderOnly.mjs.map +0 -1
  118. package/lib/utils/createHoc.d.ts +0 -3
  119. package/lib/utils/createHoc.js +0 -52
  120. package/lib/utils/createHoc.js.map +0 -1
  121. package/lib/utils/createHoc.mjs +0 -42
  122. package/lib/utils/createHoc.mjs.map +0 -1
  123. package/lib/utils/enhances/WithAutoFocus.d.ts +0 -14
  124. package/lib/utils/enhances/WithAutoFocus.js +0 -72
  125. package/lib/utils/enhances/WithAutoFocus.js.map +0 -1
  126. package/lib/utils/enhances/WithAutoFocus.mjs +0 -66
  127. package/lib/utils/enhances/WithAutoFocus.mjs.map +0 -1
  128. package/lib/utils/enhances/WithKeyboardFocus.d.ts +0 -46
  129. package/lib/utils/enhances/WithKeyboardFocus.js +0 -94
  130. package/lib/utils/enhances/WithKeyboardFocus.js.map +0 -1
  131. package/lib/utils/enhances/WithKeyboardFocus.mjs +0 -88
  132. package/lib/utils/enhances/WithKeyboardFocus.mjs.map +0 -1
  133. package/lib/utils/enhances/WithRef.d.ts +0 -3
  134. package/lib/utils/enhances/WithRef.js +0 -25
  135. package/lib/utils/enhances/WithRef.js.map +0 -1
  136. package/lib/utils/enhances/WithRef.mjs +0 -18
  137. package/lib/utils/enhances/WithRef.mjs.map +0 -1
  138. package/lib/utils/enhances/autoFocusEnhance.d.ts +0 -10
  139. package/lib/utils/enhances/autoFocusEnhance.js +0 -45
  140. package/lib/utils/enhances/autoFocusEnhance.js.map +0 -1
  141. package/lib/utils/enhances/autoFocusEnhance.mjs +0 -38
  142. package/lib/utils/enhances/autoFocusEnhance.mjs.map +0 -1
  143. package/lib/utils/enhances/keyboardFocusEnhance.d.ts +0 -27
  144. package/lib/utils/enhances/keyboardFocusEnhance.js +0 -63
  145. package/lib/utils/enhances/keyboardFocusEnhance.js.map +0 -1
  146. package/lib/utils/enhances/keyboardFocusEnhance.mjs +0 -57
  147. package/lib/utils/enhances/keyboardFocusEnhance.mjs.map +0 -1
  148. package/lib/utils/if.d.ts +0 -11
  149. package/lib/utils/if.js +0 -15
  150. package/lib/utils/if.js.map +0 -1
  151. package/lib/utils/if.mjs +0 -9
  152. package/lib/utils/if.mjs.map +0 -1
  153. package/lib/utils/use/useCss.d.ts +0 -4
  154. package/lib/utils/use/useCss.js +0 -19
  155. package/lib/utils/use/useCss.js.map +0 -1
  156. package/lib/utils/use/useCss.mjs +0 -12
  157. package/lib/utils/use/useCss.mjs.map +0 -1
@@ -1,5 +1,7 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
4
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
5
  import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
4
6
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
5
7
  import _createClass from "@babel/runtime/helpers/esm/createClass";
@@ -12,18 +14,16 @@ import hoistNonReactStatics from "hoist-non-react-statics";
12
14
  import React from "react";
13
15
  import { Component } from "./core-types/Component.mjs";
14
16
  import { CORE_AS_PROPS, CORE_INSTANCE, CORE_INIT, CORE_COMPONENT, PARENT_COMPONENTS, CONTEXT_COMPONENT, CREATE_COMPONENT } from "./core-types/symbols.mjs";
15
- import Enhancement from "./enhancement/bindHandler.mjs";
16
- import Enhancement$1 from "./enhancement/Children.mjs";
17
- import Enhancement$7 from "./enhancement/dataName.mjs";
18
- import Enhancement$8 from "./enhancement/enhance.mjs";
19
- import Enhancement$5 from "./enhancement/functionDefaultProps.mjs";
20
- import Enhancement$a from "./enhancement/hoistProps.mjs";
17
+ import Enhancement from "./enhancement/Children.mjs";
18
+ import Enhancement$6 from "./enhancement/dataName.mjs";
19
+ import Enhancement$7 from "./enhancement/enhance.mjs";
20
+ import Enhancement$4 from "./enhancement/functionDefaultProps.mjs";
21
21
  import i18nAppLocaleEnhance from "./enhancement/i18n.mjs";
22
- import Enhancement$6 from "./enhancement/inheritedName.mjs";
23
- import Enhancement$2 from "./enhancement/Root.mjs";
24
- import Enhancement$4, { ROOT_COMPONENT, getterMethodNameByDisplayName, STATIC_COMPONENT } from "./enhancement/staticChildren.mjs";
25
- import Enhancement$9 from "./enhancement/style.mjs";
26
- import Enhancement$3 from "./enhancement/uncontrolledProps.mjs";
22
+ import Enhancement$5 from "./enhancement/inheritedName.mjs";
23
+ import Enhancement$1 from "./enhancement/Root.mjs";
24
+ import Enhancement$3, { ROOT_COMPONENT, getterMethodNameByDisplayName, STATIC_COMPONENT } from "./enhancement/staticChildren.mjs";
25
+ import Enhancement$8 from "./enhancement/style.mjs";
26
+ import Enhancement$2 from "./enhancement/uncontrolledProps.mjs";
27
27
  import assignProps$1 from "./utils/assignProps.mjs";
28
28
  import { useForkRef } from "./utils/ref.mjs";
29
29
  import useEnhancedEffect from "./utils/use/useEnhancedEffect.mjs";
@@ -134,6 +134,32 @@ function wrapClass(OriginComponent, enhancements, Context) {
134
134
  this[CORE_AS_PROPS] = props.reduce(function(acc, enhancement) {
135
135
  return enhancement.call(_this4, acc, WrapperComponent, false);
136
136
  }, this.props);
137
+ if (this[CORE_AS_PROPS] !== null) {
138
+ var prefixesMap = /* @__PURE__ */ new Map();
139
+ Object.entries(this[CORE_AS_PROPS]).forEach(function(_ref3) {
140
+ var _ref4 = _slicedToArray(_ref3, 2), key2 = _ref4[0], value2 = _ref4[1];
141
+ var _key$split = key2.split(":"), _key$split2 = _slicedToArray(_key$split, 2), prefix = _key$split2[0], propertyKey = _key$split2[1];
142
+ if (prefix !== "use" && propertyKey) {
143
+ var _prefixesMap$get;
144
+ var obj = (_prefixesMap$get = prefixesMap.get(prefix)) !== null && _prefixesMap$get !== void 0 ? _prefixesMap$get : {};
145
+ obj[propertyKey] = value2;
146
+ prefixesMap.set(prefix, obj);
147
+ }
148
+ });
149
+ var _iterator = _createForOfIteratorHelper(prefixesMap.entries()), _step;
150
+ try {
151
+ for (_iterator.s(); !(_step = _iterator.n()).done; ) {
152
+ var _step$value = _slicedToArray(_step.value, 2), key = _step$value[0], value = _step$value[1];
153
+ Object.defineProperty(this[CORE_AS_PROPS], "".concat(key, "Props"), {
154
+ value
155
+ });
156
+ }
157
+ } catch (err) {
158
+ _iterator.e(err);
159
+ } finally {
160
+ _iterator.f();
161
+ }
162
+ }
137
163
  }
138
164
  return this[CORE_AS_PROPS];
139
165
  }
@@ -213,8 +239,8 @@ function wrapFunction(OriginComponent, enhancements, Context) {
213
239
  return WrapperComponent;
214
240
  }
215
241
  function wrapCore(OriginComponent, enhancements, Context) {
216
- var Component2 = function Component3(_ref3) {
217
- var Root = _ref3.Root;
242
+ var Component2 = function Component3(_ref5) {
243
+ var Root = _ref5.Root;
218
244
  var defaultProps = OriginComponent.defaultProps || {};
219
245
  return /* @__PURE__ */ React.createElement(Root, _extends({}, defaultProps, {
220
246
  render: OriginComponent
@@ -264,27 +290,24 @@ function createComponent(OriginComponent) {
264
290
  return f(context, parents, createComponent, childComponents);
265
291
  })), [
266
292
  i18nAppLocaleEnhance(),
267
- Enhancement(),
268
- Enhancement$1(context, parents),
293
+ Enhancement(context, parents),
269
294
  // root must be under the children
295
+ Enhancement$1(),
270
296
  Enhancement$2(),
271
- Enhancement$3(),
272
- Enhancement$4(childComponents, createComponent, {
297
+ Enhancement$3(childComponents, createComponent, {
273
298
  context,
274
299
  parent,
275
300
  enhancements
276
301
  }),
277
302
  // functionDefaultProps must be under the staticChild
278
- Enhancement$5(),
303
+ Enhancement$4(),
279
304
  // inheritedName must be under the staticChild
280
- Enhancement$6(),
305
+ Enhancement$5(),
281
306
  // dataName must be under the staticChild
282
- Enhancement$7(),
307
+ Enhancement$6(),
283
308
  // enhanceEnhancement must be under the functionDefaultPropsEnhancement
284
- Enhancement$8(),
285
- Enhancement$9(childComponents, context),
286
- // must be the last one so any properties can be raised
287
- Enhancement$a(childComponents, context)
309
+ Enhancement$7(),
310
+ Enhancement$8(childComponents, context)
288
311
  ]));
289
312
  Component2[CONTEXT_COMPONENT] = context;
290
313
  Component2._______childrenComponents = childComponents;
@@ -304,17 +327,13 @@ function createComponent(OriginComponent) {
304
327
  return Component2;
305
328
  }
306
329
  function createBaseComponent(OriginComponent) {
307
- var Component2 = null;
308
- if (!React.PureComponent.isPrototypeOf(OriginComponent) && !React.Component.isPrototypeOf(OriginComponent) && typeof OriginComponent === "function") {
309
- Component2 = /* @__PURE__ */ React.forwardRef(OriginComponent);
310
- Component2.displayName = OriginComponent.displayName;
311
- Component2.defaultProps = _objectSpread({
312
- "data-ui-name": OriginComponent.displayName
313
- }, OriginComponent.defaultProps);
314
- Component2[CORE_COMPONENT] = true;
315
- } else {
316
- throw new Error("createBaseComponent accepts only functional component");
317
- }
330
+ var _OriginComponent$disp;
331
+ var Component2 = /* @__PURE__ */ React.forwardRef(OriginComponent);
332
+ Component2.displayName = (_OriginComponent$disp = OriginComponent.displayName) !== null && _OriginComponent$disp !== void 0 ? _OriginComponent$disp : "";
333
+ Component2.defaultProps = {
334
+ "data-ui-name": OriginComponent.displayName
335
+ };
336
+ Component2[CORE_COMPONENT] = true;
318
337
  return Component2;
319
338
  }
320
339
  export {
@@ -5,7 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import React from "react";
6
6
  import { CHILDREN_COMPONENT, CONTEXT_COMPONENT } from "../core-types/symbols.mjs";
7
7
  var _excluded = ["handlers", "getters"], _excluded2 = ["handlers"];
8
- var CHILDREN_SELF = Symbol("CHILDREN_SELF");
8
+ var CHILDREN_SELF = /* @__PURE__ */ Symbol("CHILDREN_SELF");
9
9
  var GETTER_REG = /^get[\w]+Props$/;
10
10
  function splitPropsAndGetters(props) {
11
11
  return Object.entries(props).reduce(function(acc, _ref) {
@@ -31,9 +31,9 @@ function flatGetterMethodNames(childComponents, parentName) {
31
31
  return acc;
32
32
  }, []);
33
33
  }
34
- var STATIC_COMPONENT = Symbol("STATIC_COMPONENT");
35
- var ROOT_COMPONENT = Symbol("ROOT_COMPONENT");
36
- var SELF_GETTER_METHOD = Symbol("SELF_GETTER_METHOD");
34
+ var STATIC_COMPONENT = /* @__PURE__ */ Symbol("STATIC_COMPONENT");
35
+ var ROOT_COMPONENT = /* @__PURE__ */ Symbol("ROOT_COMPONENT");
36
+ var SELF_GETTER_METHOD = /* @__PURE__ */ Symbol("SELF_GETTER_METHOD");
37
37
  function Enhancement(childComponents, createComponent, options) {
38
38
  var getterMethodNames = flatGetterMethodNames(childComponents);
39
39
  return {
@@ -6,8 +6,8 @@ import { STATIC_COMPONENT } from "./staticChildren.mjs";
6
6
  import "../styled/index.mjs";
7
7
  import { sstyled } from "../styled/sstyled.mjs";
8
8
  var _excluded = ["_styles", "styles"], _excluded2 = ["styles"];
9
- var STYLES_CONTEXT = Symbol("STYLES_CONTEXT");
10
- var STYLES_SELF = Symbol("STYLES_SELF");
9
+ var STYLES_CONTEXT = /* @__PURE__ */ Symbol("STYLES_CONTEXT");
10
+ var STYLES_SELF = /* @__PURE__ */ Symbol("STYLES_SELF");
11
11
  function Enhancement(childComponents, Context) {
12
12
  return {
13
13
  condition: function condition(Component) {
@@ -1,5 +1,6 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import _arrayLikeToArray from "@babel/runtime/helpers/esm/arrayLikeToArray";
3
4
  import _toArray from "@babel/runtime/helpers/esm/toArray";
4
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
6
  import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
@@ -53,7 +54,7 @@ function uncontrolledUniversal(props, config, uncontrolledProp2) {
53
54
  var _setter = setter;
54
55
  var _setter2 = _toArray(_setter);
55
56
  setter = _setter2[0];
56
- chainHandler = _setter2.slice(1);
57
+ chainHandler = _arrayLikeToArray(_setter2).slice(1);
57
58
  }
58
59
  setter = setter || function(v) {
59
60
  return v;
@@ -119,7 +119,7 @@ sstyled.css = function(_css) {
119
119
  sstyled.insert = insert;
120
120
  sstyled.merge = merge;
121
121
  sstyled.getStyles = getStyles;
122
- sstyled.SHADOW_STYLES = Symbol("SHADOW_STYLES");
122
+ sstyled.SHADOW_STYLES = /* @__PURE__ */ Symbol("SHADOW_STYLES");
123
123
  export {
124
124
  sstyled
125
125
  };
@@ -1,52 +1,9 @@
1
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/esm/createClass";
3
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
4
- import _inherits from "@babel/runtime/helpers/esm/inherits";
5
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
1
  import { createIntlCache, createIntl } from "@formatjs/intl";
7
- import React, { createContext, Component } from "react";
8
- import createHoc from "../createHoc.mjs";
2
+ import React, { createContext } from "react";
9
3
  import { useAsyncI18nMessages } from "./i18nEnhance.mjs";
10
4
  var Context = /* @__PURE__ */ createContext(void 0);
11
5
  var I18nProvider = Context.Provider, I18nConsumer = Context.Consumer;
12
6
  var messagesCache = createIntlCache();
13
- function getText(dictionaries, locale) {
14
- return function(key) {
15
- var dictionary = dictionaries[locale];
16
- return dictionary ? dictionary[key] : dictionaries["en"][key];
17
- };
18
- }
19
- var WithI18n = /* @__PURE__ */ (function(_Component) {
20
- function WithI18n2() {
21
- var _this;
22
- _classCallCheck(this, WithI18n2);
23
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
24
- args[_key] = arguments[_key];
25
- }
26
- _this = _callSuper(this, WithI18n2, [].concat(args));
27
- _defineProperty(_this, "context", void 0);
28
- _defineProperty(_this, "getText", function(dictionary, selfLocale) {
29
- var _this$props = _this.props, locale = _this$props.locale, getText2 = _this$props.getText;
30
- var contextLocale = _this.context;
31
- return getText2(dictionary, selfLocale || locale || contextLocale);
32
- });
33
- return _this;
34
- }
35
- _inherits(WithI18n2, _Component);
36
- return _createClass(WithI18n2, [{
37
- key: "render",
38
- value: function render() {
39
- var _ref = this.props, children = _ref.children;
40
- return children({
41
- getText: this.getText
42
- });
43
- }
44
- }]);
45
- })(Component);
46
- _defineProperty(WithI18n, "contextType", Context);
47
- _defineProperty(WithI18n, "defaultProps", {
48
- getText
49
- });
50
7
  var useI18n = function useI18n2(dictionary) {
51
8
  var _React$useContext;
52
9
  var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en";
@@ -65,11 +22,9 @@ var useI18n = function useI18n2(dictionary) {
65
22
  }, variables);
66
23
  }, [intl]);
67
24
  };
68
- const WithI18n$1 = createHoc(WithI18n);
69
25
  export {
70
26
  Context,
71
27
  I18nConsumer,
72
28
  I18nProvider,
73
- WithI18n$1 as default,
74
29
  useI18n
75
30
  };
@@ -1,7 +1,6 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import React from "react";
4
- import { findDOMNode } from "react-dom";
5
4
  function setRef(ref, value) {
6
5
  if (typeof ref === "function") {
7
6
  ref(value);
@@ -65,21 +64,8 @@ function forkRef() {
65
64
  });
66
65
  };
67
66
  }
68
- function getNodeByRef(ref) {
69
- if (typeof ref === "function") {
70
- ref = ref();
71
- }
72
- if (!ref) return null;
73
- var node = getRef(ref);
74
- if (!node) return null;
75
- if ("nodeType" in node && node.nodeType === 1) return node;
76
- if (Object.keys(node).length === 1 && "getBoundingClientRect" in node) return null;
77
- if (!/* @__PURE__ */ React.isValidElement(node) && !(node instanceof React.Component)) return null;
78
- return findDOMNode(node);
79
- }
80
67
  export {
81
68
  forkRef,
82
- getNodeByRef,
83
69
  getRef,
84
70
  setRef,
85
71
  useCallbackRef,
package/lib/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /** ============================== core ============================== */
2
2
  import { Root, Component, Intergalactic, wrapIntergalacticComponent } from './core-types/Component';
3
- import type { PropGetterFn, IRootComponentProps, ComponentType, IRootComponentHandlers, IComponentProps, ReturnEl, IFunctionProps } from './core-types/Component';
3
+ import type { PropGetterFn, IRootComponentProps, IRootNodeProps } from './core-types/Component';
4
4
  import { CORE_INSTANCE, CREATE_COMPONENT, CONTEXT_COMPONENT, CHILDREN_COMPONENT, INHERITED_NAME } from './core-types/symbols';
5
5
  import type { UnknownProperties } from './core-types/UnknownProperties';
6
6
  import { createComponent, createBaseComponent, assignProps } from './coreFactory';
7
7
  import { lastInteraction } from './LastInteractionType';
8
8
  import register from './register';
9
- import type { StyledProps } from './styled';
9
+ import type { IStyledProps } from './styled';
10
10
  import { sstyled } from './styled';
11
- export { sstyled, createComponent, createBaseComponent, Root, Component, type UnknownProperties, Intergalactic, type PropGetterFn, type IRootComponentProps, type ComponentType, type IRootComponentHandlers, type IComponentProps, type IFunctionProps, CORE_INSTANCE, CREATE_COMPONENT, CONTEXT_COMPONENT, CHILDREN_COMPONENT, INHERITED_NAME, type ReturnEl, type StyledProps, wrapIntergalacticComponent, assignProps, register, lastInteraction, };
11
+ export { sstyled, createComponent, createBaseComponent, Root, Component, type UnknownProperties, Intergalactic, type PropGetterFn, type IRootComponentProps, type IRootNodeProps, CORE_INSTANCE, CREATE_COMPONENT, CONTEXT_COMPONENT, CHILDREN_COMPONENT, INHERITED_NAME, type IStyledProps, wrapIntergalacticComponent, assignProps, register, lastInteraction, };
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_Component","require","_symbols","_coreFactory","_LastInteractionType","_register","_interopRequireDefault","_styled"],"sources":["../src/index.ts"],"sourcesContent":["/** ============================== core ============================== */\nimport { Root, Component, Intergalactic, wrapIntergalacticComponent } from './core-types/Component';\nimport type {\n PropGetterFn,\n IRootComponentProps,\n ComponentType,\n IRootComponentHandlers,\n IComponentProps,\n ReturnEl,\n IFunctionProps,\n} from './core-types/Component';\nimport {\n CORE_INSTANCE,\n CREATE_COMPONENT,\n CONTEXT_COMPONENT,\n CHILDREN_COMPONENT,\n INHERITED_NAME,\n} from './core-types/symbols';\nimport type { UnknownProperties } from './core-types/UnknownProperties';\nimport { createComponent, createBaseComponent, assignProps } from './coreFactory';\nimport { lastInteraction } from './LastInteractionType';\nimport register from './register';\nimport type { StyledProps } from './styled';\nimport { sstyled } from './styled';\n\nexport {\n sstyled,\n createComponent,\n createBaseComponent,\n Root,\n Component,\n type UnknownProperties,\n Intergalactic,\n type PropGetterFn,\n type IRootComponentProps,\n type ComponentType,\n type IRootComponentHandlers,\n type IComponentProps,\n type IFunctionProps,\n CORE_INSTANCE,\n CREATE_COMPONENT,\n CONTEXT_COMPONENT,\n CHILDREN_COMPONENT,\n INHERITED_NAME,\n type ReturnEl,\n type StyledProps,\n wrapIntergalacticComponent,\n assignProps,\n register,\n lastInteraction,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAUA,IAAAC,QAAA,GAAAD,OAAA;AAQA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAC,sBAAA,CAAAL,OAAA;AAEA,IAAAM,OAAA,GAAAN,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_Component","require","_symbols","_coreFactory","_LastInteractionType","_register","_interopRequireDefault","_styled"],"sources":["../src/index.ts"],"sourcesContent":["/** ============================== core ============================== */\nimport { Root, Component, Intergalactic, wrapIntergalacticComponent } from './core-types/Component';\nimport type {\n PropGetterFn,\n IRootComponentProps,\n IRootNodeProps,\n} from './core-types/Component';\nimport {\n CORE_INSTANCE,\n CREATE_COMPONENT,\n CONTEXT_COMPONENT,\n CHILDREN_COMPONENT,\n INHERITED_NAME,\n} from './core-types/symbols';\nimport type { UnknownProperties } from './core-types/UnknownProperties';\nimport { createComponent, createBaseComponent, assignProps } from './coreFactory';\nimport { lastInteraction } from './LastInteractionType';\nimport register from './register';\nimport type { IStyledProps } from './styled';\nimport { sstyled } from './styled';\n\nexport {\n sstyled,\n createComponent,\n createBaseComponent,\n Root,\n Component,\n type UnknownProperties,\n Intergalactic,\n type PropGetterFn,\n type IRootComponentProps,\n type IRootNodeProps,\n CORE_INSTANCE,\n CREATE_COMPONENT,\n CONTEXT_COMPONENT,\n CHILDREN_COMPONENT,\n INHERITED_NAME,\n type IStyledProps,\n wrapIntergalacticComponent,\n assignProps,\n register,\n lastInteraction,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAQA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAC,sBAAA,CAAAL,OAAA;AAEA,IAAAM,OAAA,GAAAN,OAAA","ignoreList":[]}
package/lib/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Root","Component","Intergalactic","wrapIntergalacticComponent","CORE_INSTANCE","CREATE_COMPONENT","CONTEXT_COMPONENT","CHILDREN_COMPONENT","INHERITED_NAME","createComponent","createBaseComponent","assignProps","lastInteraction","register","sstyled"],"sources":["../src/index.ts"],"sourcesContent":["/** ============================== core ============================== */\nimport { Root, Component, Intergalactic, wrapIntergalacticComponent } from './core-types/Component';\nimport type {\n PropGetterFn,\n IRootComponentProps,\n ComponentType,\n IRootComponentHandlers,\n IComponentProps,\n ReturnEl,\n IFunctionProps,\n} from './core-types/Component';\nimport {\n CORE_INSTANCE,\n CREATE_COMPONENT,\n CONTEXT_COMPONENT,\n CHILDREN_COMPONENT,\n INHERITED_NAME,\n} from './core-types/symbols';\nimport type { UnknownProperties } from './core-types/UnknownProperties';\nimport { createComponent, createBaseComponent, assignProps } from './coreFactory';\nimport { lastInteraction } from './LastInteractionType';\nimport register from './register';\nimport type { StyledProps } from './styled';\nimport { sstyled } from './styled';\n\nexport {\n sstyled,\n createComponent,\n createBaseComponent,\n Root,\n Component,\n type UnknownProperties,\n Intergalactic,\n type PropGetterFn,\n type IRootComponentProps,\n type ComponentType,\n type IRootComponentHandlers,\n type IComponentProps,\n type IFunctionProps,\n CORE_INSTANCE,\n CREATE_COMPONENT,\n CONTEXT_COMPONENT,\n CHILDREN_COMPONENT,\n INHERITED_NAME,\n type ReturnEl,\n type StyledProps,\n wrapIntergalacticComponent,\n assignProps,\n register,\n lastInteraction,\n};\n"],"mappings":"AAAA;AACA,SAASA,IAAI,EAAEC,SAAS,EAAEC,aAAa,EAAEC,0BAA0B,QAAQ,4BAAwB;AAUnG,SACEC,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,EACjBC,kBAAkB,EAClBC,cAAc,QACT,0BAAsB;AAE7B,SAASC,eAAe,EAAEC,mBAAmB,EAAEC,WAAW,QAAQ,mBAAe;AACjF,SAASC,eAAe,QAAQ,2BAAuB;AACvD,OAAOC,QAAQ,MAAM,gBAAY;AAEjC,SAASC,OAAO,QAAQ,cAAU;AAElC,SACEA,OAAO,EACPL,eAAe,EACfC,mBAAmB,EACnBV,IAAI,EACJC,SAAS,EAETC,aAAa,EAObE,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,EACjBC,kBAAkB,EAClBC,cAAc,EAGdL,0BAA0B,EAC1BQ,WAAW,EACXE,QAAQ,EACRD,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"index.mjs","names":["Root","Component","Intergalactic","wrapIntergalacticComponent","CORE_INSTANCE","CREATE_COMPONENT","CONTEXT_COMPONENT","CHILDREN_COMPONENT","INHERITED_NAME","createComponent","createBaseComponent","assignProps","lastInteraction","register","sstyled"],"sources":["../src/index.ts"],"sourcesContent":["/** ============================== core ============================== */\nimport { Root, Component, Intergalactic, wrapIntergalacticComponent } from './core-types/Component';\nimport type {\n PropGetterFn,\n IRootComponentProps,\n IRootNodeProps,\n} from './core-types/Component';\nimport {\n CORE_INSTANCE,\n CREATE_COMPONENT,\n CONTEXT_COMPONENT,\n CHILDREN_COMPONENT,\n INHERITED_NAME,\n} from './core-types/symbols';\nimport type { UnknownProperties } from './core-types/UnknownProperties';\nimport { createComponent, createBaseComponent, assignProps } from './coreFactory';\nimport { lastInteraction } from './LastInteractionType';\nimport register from './register';\nimport type { IStyledProps } from './styled';\nimport { sstyled } from './styled';\n\nexport {\n sstyled,\n createComponent,\n createBaseComponent,\n Root,\n Component,\n type UnknownProperties,\n Intergalactic,\n type PropGetterFn,\n type IRootComponentProps,\n type IRootNodeProps,\n CORE_INSTANCE,\n CREATE_COMPONENT,\n CONTEXT_COMPONENT,\n CHILDREN_COMPONENT,\n INHERITED_NAME,\n type IStyledProps,\n wrapIntergalacticComponent,\n assignProps,\n register,\n lastInteraction,\n};\n"],"mappings":"AAAA;AACA,SAASA,IAAI,EAAEC,SAAS,EAAEC,aAAa,EAAEC,0BAA0B,QAAQ,4BAAwB;AAMnG,SACEC,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,EACjBC,kBAAkB,EAClBC,cAAc,QACT,0BAAsB;AAE7B,SAASC,eAAe,EAAEC,mBAAmB,EAAEC,WAAW,QAAQ,mBAAe;AACjF,SAASC,eAAe,QAAQ,2BAAuB;AACvD,OAAOC,QAAQ,MAAM,gBAAY;AAEjC,SAASC,OAAO,QAAQ,cAAU;AAElC,SACEA,OAAO,EACPL,eAAe,EACfC,mBAAmB,EACnBV,IAAI,EACJC,SAAS,EAETC,aAAa,EAIbE,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,EACjBC,kBAAkB,EAClBC,cAAc,EAEdL,0BAA0B,EAC1BQ,WAAW,EACXE,QAAQ,EACRD,eAAe","ignoreList":[]}
@@ -1,9 +1,5 @@
1
- import type { UnknownProperties } from '../core-types/UnknownProperties';
2
- export type StyledProps = {
1
+ export interface IStyledProps {
3
2
  styles?: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;
4
- };
5
- /** @deprecated */
6
- export interface IStyledProps extends StyledProps, UnknownProperties {
7
3
  }
8
4
  /** @ts-ignore */
9
5
  export { styled, use, css } from './reshadow-core';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_reshadowCore","require","_sstyled"],"sources":["../../src/styled/index.tsx"],"sourcesContent":["import type { UnknownProperties } from '../core-types/UnknownProperties';\n\nexport type StyledProps = {\n styles?: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;\n};\n\n/** @deprecated */\nexport interface IStyledProps extends StyledProps, UnknownProperties {}\n\n/** @ts-ignore */\nexport { styled, use, css } from './reshadow-core';\n\nexport { sstyled } from './sstyled';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAAA,aAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_reshadowCore","require","_sstyled"],"sources":["../../src/styled/index.tsx"],"sourcesContent":["export interface IStyledProps {\n styles?: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;\n}\n\n/** @ts-ignore */\nexport { styled, use, css } from './reshadow-core';\n\nexport { sstyled } from './sstyled';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAAA,aAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["styled","use","css","sstyled"],"sources":["../../src/styled/index.tsx"],"sourcesContent":["import type { UnknownProperties } from '../core-types/UnknownProperties';\n\nexport type StyledProps = {\n styles?: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;\n};\n\n/** @deprecated */\nexport interface IStyledProps extends StyledProps, UnknownProperties {}\n\n/** @ts-ignore */\nexport { styled, use, css } from './reshadow-core';\n\nexport { sstyled } from './sstyled';\n"],"mappings":"AAMA;;AAGA;AACA,SAASA,MAAM,EAAEC,GAAG,EAAEC,GAAG,QAAQ,qBAAiB;AAElD,SAASC,OAAO,QAAQ,eAAW","ignoreList":[]}
1
+ {"version":3,"file":"index.mjs","names":["styled","use","css","sstyled"],"sources":["../../src/styled/index.tsx"],"sourcesContent":["export interface IStyledProps {\n styles?: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;\n}\n\n/** @ts-ignore */\nexport { styled, use, css } from './reshadow-core';\n\nexport { sstyled } from './sstyled';\n"],"mappings":"AAIA;AACA,SAASA,MAAM,EAAEC,GAAG,EAAEC,GAAG,QAAQ,qBAAiB;AAElD,SAASC,OAAO,QAAQ,eAAW","ignoreList":[]}
@@ -119,7 +119,7 @@ sstyled.css = function(_css) {
119
119
  sstyled.insert = insert;
120
120
  sstyled.merge = merge;
121
121
  sstyled.getStyles = getStyles;
122
- sstyled.SHADOW_STYLES = Symbol("SHADOW_STYLES");
122
+ sstyled.SHADOW_STYLES = /* @__PURE__ */ Symbol("SHADOW_STYLES");
123
123
  export {
124
124
  sstyled
125
125
  };
@@ -1,8 +1,6 @@
1
1
  import type { NanoOptions } from '@phytonmk/nano-css';
2
2
  import type { CssLikeObject } from '@phytonmk/nano-css/types/common';
3
- import React, { PureComponent } from 'react';
4
- import type { UnknownProperties } from '../../core-types/UnknownProperties';
5
- declare const getStylesheet: () => string;
3
+ import React from 'react';
6
4
  /**
7
5
  * Function to clear the nano CSS styles object from keys with undefined value
8
6
  * @param {Object} obj - nano CSS styles object
@@ -12,30 +10,4 @@ declare function normaliseCss(obj: CssLikeObject): any;
12
10
  declare const WithCssContext: React.Context<NanoOptions>;
13
11
  declare const Provider: React.Provider<NanoOptions>;
14
12
  declare function initNanoCss(options?: NanoOptions): import("@phytonmk/nano-css").NanoRenderer;
15
- /** @deprecated */
16
- export interface IEnhancedWithCSSProps extends EnhancedWithCSSProps, UnknownProperties {
17
- }
18
- export type EnhancedWithCSSProps = {
19
- className?: string;
20
- css?: {};
21
- children(props: {
22
- className: string | undefined;
23
- }): React.ReactNode;
24
- };
25
- declare class EnhancedWithCSS extends PureComponent<IEnhancedWithCSSProps> {
26
- static contextType: React.Context<NanoOptions>;
27
- static defaultProps: {
28
- css: {};
29
- };
30
- state: {
31
- dynamicClassName: string;
32
- };
33
- static getDerivedStateFromProps(props: any): {
34
- dynamicClassName: string | undefined;
35
- };
36
- constructor(props: any, context: any);
37
- render(): React.ReactNode;
38
- }
39
- export { getStylesheet, EnhancedWithCSS, Provider, WithCssContext, initNanoCss, normaliseCss };
40
- declare const _default: (options?: {}) => (WrappedComponent: React.ComponentType) => React.ComponentClass;
41
- export default _default;
13
+ export { Provider, WithCssContext, initNanoCss, normaliseCss };
@@ -1,25 +1,14 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"];
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
- exports.getStylesheet = exports["default"] = exports.WithCssContext = exports.Provider = exports.EnhancedWithCSS = void 0;
7
+ exports.WithCssContext = exports.Provider = void 0;
9
8
  exports.initNanoCss = initNanoCss;
10
9
  exports.normaliseCss = normaliseCss;
11
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
- var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
14
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
- var _react = _interopRequireWildcard(require("react"));
17
- var _createHoc = _interopRequireDefault(require("../createHoc"));
18
- var _CSSinJS2 = _interopRequireDefault(require("../CSSinJS"));
19
- var getStylesheet = exports.getStylesheet = function getStylesheet() {
20
- return (0, _CSSinJS2["default"])().raw;
21
- };
22
-
10
+ var _react = _interopRequireDefault(require("react"));
11
+ var _CSSinJS = _interopRequireDefault(require("../CSSinJS"));
23
12
  /**
24
13
  * Function to clear the nano CSS styles object from keys with undefined value
25
14
  * @param {Object} obj - nano CSS styles object
@@ -38,48 +27,6 @@ var WithCssContext = exports.WithCssContext = /*#__PURE__*/_react["default"].cre
38
27
  var Provider = exports.Provider = WithCssContext.Provider;
39
28
  function initNanoCss() {
40
29
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
41
- return (0, _CSSinJS2["default"])(options);
30
+ return (0, _CSSinJS["default"])(options);
42
31
  }
43
-
44
- /** @deprecated */
45
- var EnhancedWithCSS = exports.EnhancedWithCSS = /*#__PURE__*/function (_PureComponent) {
46
- function EnhancedWithCSS(props, context) {
47
- var _this;
48
- (0, _classCallCheck2["default"])(this, EnhancedWithCSS);
49
- _this = (0, _callSuper2["default"])(this, EnhancedWithCSS, [props, context]);
50
- (0, _defineProperty2["default"])(_this, "state", {
51
- dynamicClassName: ''
52
- });
53
- initNanoCss(context);
54
- return _this;
55
- }
56
- (0, _inherits2["default"])(EnhancedWithCSS, _PureComponent);
57
- return (0, _createClass2["default"])(EnhancedWithCSS, [{
58
- key: "render",
59
- value: function render() {
60
- var _this$props = this.props,
61
- children = _this$props.children,
62
- _this$props$className = _this$props.className,
63
- className = _this$props$className === void 0 ? '' : _this$props$className;
64
- var dynamicClassName = this.state.dynamicClassName;
65
- return children({
66
- className: className + dynamicClassName || undefined
67
- });
68
- }
69
- }], [{
70
- key: "getDerivedStateFromProps",
71
- value: function getDerivedStateFromProps(props) {
72
- var _CSSinJS$cache, _CSSinJS;
73
- var cleanCss = normaliseCss(props.css);
74
- return {
75
- dynamicClassName: Object.keys(cleanCss).length ? (_CSSinJS$cache = (_CSSinJS = (0, _CSSinJS2["default"])()).cache) === null || _CSSinJS$cache === void 0 ? void 0 : _CSSinJS$cache.call(_CSSinJS, cleanCss) : ''
76
- };
77
- }
78
- }]);
79
- }(_react.PureComponent);
80
- (0, _defineProperty2["default"])(EnhancedWithCSS, "contextType", WithCssContext);
81
- (0, _defineProperty2["default"])(EnhancedWithCSS, "defaultProps", {
82
- css: {}
83
- });
84
- var _default = exports["default"] = (0, _createHoc["default"])(EnhancedWithCSS);
85
32
  //# sourceMappingURL=WithCSS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WithCSS.js","names":["_react","_interopRequireWildcard","require","_createHoc","_interopRequireDefault","_CSSinJS2","getStylesheet","exports","CSSinJS","raw","normaliseCss","obj","Object","keys","reduce","acc","key","result","undefined","WithCssContext","React","createContext","Provider","initNanoCss","options","arguments","length","EnhancedWithCSS","_PureComponent","props","context","_this","_classCallCheck2","_callSuper2","_defineProperty2","dynamicClassName","_inherits2","_createClass2","value","render","_this$props","children","_this$props$className","className","state","getDerivedStateFromProps","_CSSinJS$cache","_CSSinJS","cleanCss","css","cache","call","PureComponent","_default","createHoc"],"sources":["../../../src/utils/enhances/WithCSS.tsx"],"sourcesContent":["import type { NanoOptions } from '@phytonmk/nano-css';\nimport type { CssLikeObject } from '@phytonmk/nano-css/types/common';\nimport React, { PureComponent } from 'react';\n\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\nimport createHoc from '../createHoc';\nimport CSSinJS from '../CSSinJS';\n\nconst getStylesheet = () => CSSinJS().raw;\n\n/**\n * Function to clear the nano CSS styles object from keys with undefined value\n * @param {Object} obj - nano CSS styles object\n * @returns {Object}\n */\nfunction normaliseCss(obj: CssLikeObject) {\n return Object.keys(obj).reduce((acc: any, key) => {\n const result = acc;\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n return result;\n }, {});\n}\n\nconst WithCssContext = React.createContext<NanoOptions>({});\nconst { Provider } = WithCssContext;\n\nfunction initNanoCss(options: NanoOptions = {}) {\n return CSSinJS(options);\n}\n\n/** @deprecated */\nexport interface IEnhancedWithCSSProps extends EnhancedWithCSSProps, UnknownProperties {}\nexport type EnhancedWithCSSProps = {\n className?: string;\n css?: {};\n\n children(props: { className: string | undefined }): React.ReactNode;\n};\n\nclass EnhancedWithCSS extends PureComponent<IEnhancedWithCSSProps> {\n static contextType = WithCssContext;\n\n static defaultProps = {\n css: {},\n };\n\n state = {\n dynamicClassName: '',\n };\n\n static getDerivedStateFromProps(props: any) {\n const cleanCss = normaliseCss(props.css);\n return {\n dynamicClassName: Object.keys(cleanCss).length ? CSSinJS().cache?.(cleanCss) : '',\n };\n }\n\n constructor(props: any, context: any) {\n super(props, context);\n\n initNanoCss(context);\n }\n\n render() {\n const { children, className = '' } = this.props;\n const { dynamicClassName } = this.state;\n return children({\n className: className + dynamicClassName || undefined,\n });\n }\n}\n\nexport { getStylesheet, EnhancedWithCSS, Provider, WithCssContext, initNanoCss, normaliseCss };\nexport default createHoc(EnhancedWithCSS);\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"WithCSS.js","names":["_react","_interopRequireDefault","require","_CSSinJS","normaliseCss","obj","Object","keys","reduce","acc","key","result","undefined","WithCssContext","exports","React","createContext","Provider","initNanoCss","options","arguments","length","CSSinJS"],"sources":["../../../src/utils/enhances/WithCSS.tsx"],"sourcesContent":["import type { NanoOptions } from '@phytonmk/nano-css';\nimport type { CssLikeObject } from '@phytonmk/nano-css/types/common';\nimport React from 'react';\n\nimport CSSinJS from '../CSSinJS';\n\n/**\n * Function to clear the nano CSS styles object from keys with undefined value\n * @param {Object} obj - nano CSS styles object\n * @returns {Object}\n */\nfunction normaliseCss(obj: CssLikeObject) {\n return Object.keys(obj).reduce((acc: any, key) => {\n const result = acc;\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n return result;\n }, {});\n}\n\nconst WithCssContext = React.createContext<NanoOptions>({});\nconst { Provider } = WithCssContext;\n\nfunction initNanoCss(options: NanoOptions = {}) {\n return CSSinJS(options);\n}\n\nexport { Provider, WithCssContext, initNanoCss, normaliseCss };\n"],"mappings":";;;;;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA,SAASE,YAAYA,CAACC,GAAkB,EAAE;EACxC,OAAOC,MAAM,CAACC,IAAI,CAACF,GAAG,CAAC,CAACG,MAAM,CAAC,UAACC,GAAQ,EAAEC,GAAG,EAAK;IAChD,IAAMC,MAAM,GAAGF,GAAG;IAClB,IAAIJ,GAAG,CAACK,GAAG,CAAC,KAAKE,SAAS,EAAE;MAC1BD,MAAM,CAACD,GAAG,CAAC,GAAGL,GAAG,CAACK,GAAG,CAAC;IACxB;IACA,OAAOC,MAAM;EACf,CAAC,EAAE,CAAC,CAAC,CAAC;AACR;AAEA,IAAME,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAGE,iBAAK,CAACC,aAAa,CAAc,CAAC,CAAC,CAAC;AAC3D,IAAQC,QAAQ,GAAAH,OAAA,CAAAG,QAAA,GAAKJ,cAAc,CAA3BI,QAAQ;AAEhB,SAASC,WAAWA,CAAA,EAA4B;EAAA,IAA3BC,OAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAR,SAAA,GAAAQ,SAAA,MAAG,CAAC,CAAC;EAC5C,OAAO,IAAAE,mBAAO,EAACH,OAAO,CAAC;AACzB","ignoreList":[]}
@@ -1,14 +1,5 @@
1
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/esm/createClass";
3
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
4
- import _inherits from "@babel/runtime/helpers/esm/inherits";
5
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
- import React, { PureComponent } from 'react';
7
- import createHoc from "../createHoc.mjs";
1
+ import React from 'react';
8
2
  import CSSinJS from "../CSSinJS.mjs";
9
- var getStylesheet = function getStylesheet() {
10
- return CSSinJS().raw;
11
- };
12
3
 
13
4
  /**
14
5
  * Function to clear the nano CSS styles object from keys with undefined value
@@ -30,47 +21,5 @@ function initNanoCss() {
30
21
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
31
22
  return CSSinJS(options);
32
23
  }
33
-
34
- /** @deprecated */
35
- var EnhancedWithCSS = /*#__PURE__*/function (_PureComponent) {
36
- function EnhancedWithCSS(props, context) {
37
- var _this;
38
- _classCallCheck(this, EnhancedWithCSS);
39
- _this = _callSuper(this, EnhancedWithCSS, [props, context]);
40
- _defineProperty(_this, "state", {
41
- dynamicClassName: ''
42
- });
43
- initNanoCss(context);
44
- return _this;
45
- }
46
- _inherits(EnhancedWithCSS, _PureComponent);
47
- return _createClass(EnhancedWithCSS, [{
48
- key: "render",
49
- value: function render() {
50
- var _this$props = this.props,
51
- children = _this$props.children,
52
- _this$props$className = _this$props.className,
53
- className = _this$props$className === void 0 ? '' : _this$props$className;
54
- var dynamicClassName = this.state.dynamicClassName;
55
- return children({
56
- className: className + dynamicClassName || undefined
57
- });
58
- }
59
- }], [{
60
- key: "getDerivedStateFromProps",
61
- value: function getDerivedStateFromProps(props) {
62
- var _CSSinJS$cache, _CSSinJS;
63
- var cleanCss = normaliseCss(props.css);
64
- return {
65
- dynamicClassName: Object.keys(cleanCss).length ? (_CSSinJS$cache = (_CSSinJS = CSSinJS()).cache) === null || _CSSinJS$cache === void 0 ? void 0 : _CSSinJS$cache.call(_CSSinJS, cleanCss) : ''
66
- };
67
- }
68
- }]);
69
- }(PureComponent);
70
- _defineProperty(EnhancedWithCSS, "contextType", WithCssContext);
71
- _defineProperty(EnhancedWithCSS, "defaultProps", {
72
- css: {}
73
- });
74
- export { getStylesheet, EnhancedWithCSS, Provider, WithCssContext, initNanoCss, normaliseCss };
75
- export default createHoc(EnhancedWithCSS);
24
+ export { Provider, WithCssContext, initNanoCss, normaliseCss };
76
25
  //# sourceMappingURL=WithCSS.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"WithCSS.mjs","names":["React","PureComponent","createHoc","CSSinJS","getStylesheet","raw","normaliseCss","obj","Object","keys","reduce","acc","key","result","undefined","WithCssContext","createContext","Provider","initNanoCss","options","arguments","length","EnhancedWithCSS","_PureComponent","props","context","_this","_classCallCheck","_callSuper","_defineProperty","dynamicClassName","_inherits","_createClass","value","render","_this$props","children","_this$props$className","className","state","getDerivedStateFromProps","_CSSinJS$cache","_CSSinJS","cleanCss","css","cache","call"],"sources":["../../../src/utils/enhances/WithCSS.tsx"],"sourcesContent":["import type { NanoOptions } from '@phytonmk/nano-css';\nimport type { CssLikeObject } from '@phytonmk/nano-css/types/common';\nimport React, { PureComponent } from 'react';\n\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\nimport createHoc from '../createHoc';\nimport CSSinJS from '../CSSinJS';\n\nconst getStylesheet = () => CSSinJS().raw;\n\n/**\n * Function to clear the nano CSS styles object from keys with undefined value\n * @param {Object} obj - nano CSS styles object\n * @returns {Object}\n */\nfunction normaliseCss(obj: CssLikeObject) {\n return Object.keys(obj).reduce((acc: any, key) => {\n const result = acc;\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n return result;\n }, {});\n}\n\nconst WithCssContext = React.createContext<NanoOptions>({});\nconst { Provider } = WithCssContext;\n\nfunction initNanoCss(options: NanoOptions = {}) {\n return CSSinJS(options);\n}\n\n/** @deprecated */\nexport interface IEnhancedWithCSSProps extends EnhancedWithCSSProps, UnknownProperties {}\nexport type EnhancedWithCSSProps = {\n className?: string;\n css?: {};\n\n children(props: { className: string | undefined }): React.ReactNode;\n};\n\nclass EnhancedWithCSS extends PureComponent<IEnhancedWithCSSProps> {\n static contextType = WithCssContext;\n\n static defaultProps = {\n css: {},\n };\n\n state = {\n dynamicClassName: '',\n };\n\n static getDerivedStateFromProps(props: any) {\n const cleanCss = normaliseCss(props.css);\n return {\n dynamicClassName: Object.keys(cleanCss).length ? CSSinJS().cache?.(cleanCss) : '',\n };\n }\n\n constructor(props: any, context: any) {\n super(props, context);\n\n initNanoCss(context);\n }\n\n render() {\n const { children, className = '' } = this.props;\n const { dynamicClassName } = this.state;\n return children({\n className: className + dynamicClassName || undefined,\n });\n }\n}\n\nexport { getStylesheet, EnhancedWithCSS, Provider, WithCssContext, initNanoCss, normaliseCss };\nexport default createHoc(EnhancedWithCSS);\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"WithCSS.mjs","names":["React","CSSinJS","normaliseCss","obj","Object","keys","reduce","acc","key","result","undefined","WithCssContext","createContext","Provider","initNanoCss","options","arguments","length"],"sources":["../../../src/utils/enhances/WithCSS.tsx"],"sourcesContent":["import type { NanoOptions } from '@phytonmk/nano-css';\nimport type { CssLikeObject } from '@phytonmk/nano-css/types/common';\nimport React from 'react';\n\nimport CSSinJS from '../CSSinJS';\n\n/**\n * Function to clear the nano CSS styles object from keys with undefined value\n * @param {Object} obj - nano CSS styles object\n * @returns {Object}\n */\nfunction normaliseCss(obj: CssLikeObject) {\n return Object.keys(obj).reduce((acc: any, key) => {\n const result = acc;\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n return result;\n }, {});\n}\n\nconst WithCssContext = React.createContext<NanoOptions>({});\nconst { Provider } = WithCssContext;\n\nfunction initNanoCss(options: NanoOptions = {}) {\n return CSSinJS(options);\n}\n\nexport { Provider, WithCssContext, initNanoCss, normaliseCss };\n"],"mappings":"AAEA,OAAOA,KAAK,MAAM,OAAO;AAEzB,OAAOC,OAAO,MAAM,gBAAY;;AAEhC;AACA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAACC,GAAkB,EAAE;EACxC,OAAOC,MAAM,CAACC,IAAI,CAACF,GAAG,CAAC,CAACG,MAAM,CAAC,UAACC,GAAQ,EAAEC,GAAG,EAAK;IAChD,IAAMC,MAAM,GAAGF,GAAG;IAClB,IAAIJ,GAAG,CAACK,GAAG,CAAC,KAAKE,SAAS,EAAE;MAC1BD,MAAM,CAACD,GAAG,CAAC,GAAGL,GAAG,CAACK,GAAG,CAAC;IACxB;IACA,OAAOC,MAAM;EACf,CAAC,EAAE,CAAC,CAAC,CAAC;AACR;AAEA,IAAME,cAAc,gBAAGX,KAAK,CAACY,aAAa,CAAc,CAAC,CAAC,CAAC;AAC3D,IAAQC,QAAQ,GAAKF,cAAc,CAA3BE,QAAQ;AAEhB,SAASC,WAAWA,CAAA,EAA4B;EAAA,IAA3BC,OAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAN,SAAA,GAAAM,SAAA,MAAG,CAAC,CAAC;EAC5C,OAAOf,OAAO,CAACc,OAAO,CAAC;AACzB;AAEA,SAASF,QAAQ,EAAEF,cAAc,EAAEG,WAAW,EAAEZ,YAAY","ignoreList":[]}