@alfalab/core-components-typography 4.10.2 → 4.10.3

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 (57) hide show
  1. package/colors.css +20 -20
  2. package/colors.module-182d063e.js +6 -0
  3. package/common.module-5acac0aa.js +6 -0
  4. package/cssm/title-responsive/component.d.ts +8 -0
  5. package/cssm/title-responsive/component.js +2 -3
  6. package/esm/colors.css +20 -20
  7. package/esm/colors.module-bf03734f.js +4 -0
  8. package/esm/common.module-8333ea17.js +4 -0
  9. package/esm/hooks/use-skeleton.css +5 -5
  10. package/esm/hooks/use-skeleton.js +1 -1
  11. package/esm/text/component.js +2 -2
  12. package/esm/text/index.css +22 -22
  13. package/esm/title/common.css +9 -9
  14. package/esm/title/component.js +1 -1
  15. package/esm/title/index.css +17 -17
  16. package/esm/title/index.js +2 -2
  17. package/esm/title-mobile/component.js +2 -2
  18. package/esm/title-mobile/index.css +16 -16
  19. package/esm/title-responsive/component.d.ts +8 -0
  20. package/esm/title-responsive/component.js +3 -4
  21. package/hooks/use-skeleton.css +5 -5
  22. package/hooks/use-skeleton.js +1 -1
  23. package/modern/colors.css +20 -20
  24. package/modern/colors.module-d08ab8a2.js +4 -0
  25. package/modern/common.module-44224c65.js +4 -0
  26. package/modern/hooks/use-skeleton.css +5 -5
  27. package/modern/hooks/use-skeleton.js +1 -1
  28. package/modern/text/component.js +2 -2
  29. package/modern/text/index.css +22 -22
  30. package/modern/title/common.css +9 -9
  31. package/modern/title/component.js +1 -1
  32. package/modern/title/index.css +17 -17
  33. package/modern/title/index.js +2 -2
  34. package/modern/title-mobile/component.js +2 -2
  35. package/modern/title-mobile/index.css +16 -16
  36. package/modern/title-responsive/component.d.ts +8 -0
  37. package/modern/title-responsive/component.js +3 -4
  38. package/moderncssm/title-responsive/component.d.ts +8 -0
  39. package/moderncssm/title-responsive/component.js +3 -4
  40. package/package.json +4 -4
  41. package/src/title-responsive/component.tsx +8 -5
  42. package/text/component.js +2 -2
  43. package/text/index.css +22 -22
  44. package/title/common.css +9 -9
  45. package/title/component.js +1 -1
  46. package/title/index.css +17 -17
  47. package/title/index.js +2 -2
  48. package/title-mobile/component.js +2 -2
  49. package/title-mobile/index.css +16 -16
  50. package/title-responsive/component.d.ts +8 -0
  51. package/title-responsive/component.js +2 -3
  52. package/colors.module-ae9203b0.js +0 -6
  53. package/common.module-b6c435d0.js +0 -6
  54. package/esm/colors.module-8ee7777c.js +0 -4
  55. package/esm/common.module-918e04b1.js +0 -4
  56. package/modern/colors.module-74da56c2.js +0 -4
  57. package/modern/common.module-95d0a71b.js +0 -4
@@ -7,6 +7,10 @@ type TitleResponsiveProps = TitleProps & {
7
7
  * @default 1024
8
8
  */
9
9
  breakpoint?: number;
10
+ /**
11
+ * Версия, которая будет использоваться при серверном рендеринге
12
+ */
13
+ client?: 'desktop' | 'mobile';
10
14
  };
11
15
  declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
12
16
  tag: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
@@ -28,5 +32,9 @@ declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAt
28
32
  * @default 1024
29
33
  */
30
34
  breakpoint?: number | undefined;
35
+ /**
36
+ * Версия, которая будет использоваться при серверном рендеринге
37
+ */
38
+ client?: "mobile" | "desktop" | undefined;
31
39
  } & React.RefAttributes<HTMLDivElement | HTMLHeadingElement>>;
32
40
  export { TitleResponsiveProps, TitleResponsive };
@@ -13,9 +13,8 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
13
13
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
14
 
15
15
  var TitleResponsive = React.forwardRef(function (_a, ref) {
16
- var defaultMatchMediaValue = _a.defaultMatchMediaValue, _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, restProps = tslib.__rest(_a, ["defaultMatchMediaValue", "breakpoint"]);
17
- var query = "(min-width: ".concat(breakpoint, "px)");
18
- var isDesktop = coreComponentsMq.useMatchMedia(query, defaultMatchMediaValue)[0];
16
+ var breakpoint = _a.breakpoint, client = _a.client, restProps = tslib.__rest(_a, ["breakpoint", "client"]);
17
+ var isDesktop = coreComponentsMq.useIsDesktop(breakpoint, client === 'desktop');
19
18
  var Component = isDesktop ? title_index.Title : titleMobile_component.TitleMobile;
20
19
  return React__default.default.createElement(Component, tslib.__assign({}, restProps, { ref: ref }));
21
20
  });
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- var colors = {"tertiary":"typography__tertiary_6ow3h","disabled":"typography__disabled_6ow3h","accent":"typography__accent_6ow3h","primary":"typography__primary_6ow3h","attention":"typography__attention_6ow3h","positive":"typography__positive_6ow3h","secondary":"typography__secondary_6ow3h","tertiary-inverted":"typography__tertiary-inverted_6ow3h","primary-inverted":"typography__primary-inverted_6ow3h","secondary-inverted":"typography__secondary-inverted_6ow3h","link":"typography__link_6ow3h","negative":"typography__negative_6ow3h","static-primary-light":"typography__static-primary-light_6ow3h","static-secondary-light":"typography__static-secondary-light_6ow3h","static-tertiary-light":"typography__static-tertiary-light_6ow3h","static-primary-dark":"typography__static-primary-dark_6ow3h","static-secondary-dark":"typography__static-secondary-dark_6ow3h","static-tertiary-dark":"typography__static-tertiary-dark_6ow3h","static-accent":"typography__static-accent_6ow3h"};
4
- require('./colors.css')
5
-
6
- exports.colors = colors;
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- var commonStyles = {"component":"typography__component_odrpa","bold":"typography__bold_odrpa","semibold":"typography__semibold_odrpa","medium":"typography__medium_odrpa","regular":"typography__regular_odrpa","rowLimit1":"typography__rowLimit1_odrpa","rowLimit2":"typography__rowLimit2_odrpa","rowLimit3":"typography__rowLimit3_odrpa"};
4
- require('./title/common.css')
5
-
6
- exports.commonStyles = commonStyles;
@@ -1,4 +0,0 @@
1
- var colors = {"tertiary":"typography__tertiary_6ow3h","disabled":"typography__disabled_6ow3h","accent":"typography__accent_6ow3h","primary":"typography__primary_6ow3h","attention":"typography__attention_6ow3h","positive":"typography__positive_6ow3h","secondary":"typography__secondary_6ow3h","tertiary-inverted":"typography__tertiary-inverted_6ow3h","primary-inverted":"typography__primary-inverted_6ow3h","secondary-inverted":"typography__secondary-inverted_6ow3h","link":"typography__link_6ow3h","negative":"typography__negative_6ow3h","static-primary-light":"typography__static-primary-light_6ow3h","static-secondary-light":"typography__static-secondary-light_6ow3h","static-tertiary-light":"typography__static-tertiary-light_6ow3h","static-primary-dark":"typography__static-primary-dark_6ow3h","static-secondary-dark":"typography__static-secondary-dark_6ow3h","static-tertiary-dark":"typography__static-tertiary-dark_6ow3h","static-accent":"typography__static-accent_6ow3h"};
2
- require('./colors.css')
3
-
4
- export { colors as c };
@@ -1,4 +0,0 @@
1
- var commonStyles = {"component":"typography__component_odrpa","bold":"typography__bold_odrpa","semibold":"typography__semibold_odrpa","medium":"typography__medium_odrpa","regular":"typography__regular_odrpa","rowLimit1":"typography__rowLimit1_odrpa","rowLimit2":"typography__rowLimit2_odrpa","rowLimit3":"typography__rowLimit3_odrpa"};
2
- require('./title/common.css')
3
-
4
- export { commonStyles as c };
@@ -1,4 +0,0 @@
1
- const colors = {"tertiary":"typography__tertiary_6ow3h","disabled":"typography__disabled_6ow3h","accent":"typography__accent_6ow3h","primary":"typography__primary_6ow3h","attention":"typography__attention_6ow3h","positive":"typography__positive_6ow3h","secondary":"typography__secondary_6ow3h","tertiary-inverted":"typography__tertiary-inverted_6ow3h","primary-inverted":"typography__primary-inverted_6ow3h","secondary-inverted":"typography__secondary-inverted_6ow3h","link":"typography__link_6ow3h","negative":"typography__negative_6ow3h","static-primary-light":"typography__static-primary-light_6ow3h","static-secondary-light":"typography__static-secondary-light_6ow3h","static-tertiary-light":"typography__static-tertiary-light_6ow3h","static-primary-dark":"typography__static-primary-dark_6ow3h","static-secondary-dark":"typography__static-secondary-dark_6ow3h","static-tertiary-dark":"typography__static-tertiary-dark_6ow3h","static-accent":"typography__static-accent_6ow3h"};
2
- require('./colors.css')
3
-
4
- export { colors as c };
@@ -1,4 +0,0 @@
1
- const commonStyles = {"component":"typography__component_odrpa","bold":"typography__bold_odrpa","semibold":"typography__semibold_odrpa","medium":"typography__medium_odrpa","regular":"typography__regular_odrpa","rowLimit1":"typography__rowLimit1_odrpa","rowLimit2":"typography__rowLimit2_odrpa","rowLimit3":"typography__rowLimit3_odrpa"};
2
- require('./title/common.css')
3
-
4
- export { commonStyles as c };