@ovotech/element-native 3.2.2 → 3.2.3-canary-855bff6-123

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.
@@ -45,7 +45,7 @@ exports.StyledActionText = styled_native_1.default.Text(function (_a) {
45
45
  var fontSize = smallAndUp
46
46
  ? core.fontSize.body.large
47
47
  : core.fontSize.body.small;
48
- return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n "], ["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, core.fontFamily.bodyBold.native, fontSize, core.lineHeight.body.small);
48
+ return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n flex: 1;\n "], ["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n flex: 1;\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, core.fontFamily.bodyBold.native, fontSize, core.lineHeight.body.small);
49
49
  });
50
50
  exports.StyledRightIcon = (0, styled_native_1.default)(Icon_1.Icon)(function (_a) {
51
51
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, inverted = _a.inverted, marginTop = _a.marginTop;
@@ -29,20 +29,19 @@ exports.SkeletonText = void 0;
29
29
  var jsx_runtime_1 = require("react/jsx-runtime");
30
30
  var hooks_1 = require("../../hooks");
31
31
  var styled_native_1 = __importDefault(require("../../styled.native"));
32
- var utils_1 = require("../../utils");
33
32
  var Text_1 = require("../Text");
34
33
  var Skeleton_1 = require("./Skeleton");
35
34
  var SkeletonAnimation_1 = require("./SkeletonAnimation");
36
35
  var StyledSkeletonText = (0, styled_native_1.default)(Skeleton_1.Skeleton)(function (_a) {
37
- var core = _a.theme.core, short = _a.short, breakpoints = _a.breakpoints;
38
- return "\n background-color: ".concat(core.color.neutral.light, ";\n margin-bottom: ").concat(core.space[2], ";\n ").concat((0, utils_1.responsiveStyle)('height', core.fontSize.body, breakpoints), "\n\n ").concat(short ? 'width: 50%' : '', ";\n ");
36
+ var core = _a.theme.core, aboveSmallBreakpoint = _a.aboveSmallBreakpoint, short = _a.short;
37
+ return "\n background-color: ".concat(core.color.neutral.light, ";\n margin-bottom: ").concat(core.space[2], ";\n height: ").concat(aboveSmallBreakpoint ? core.fontSize.body.large : core.fontSize.body.small, ";\n\n ").concat(short ? 'width: 50%' : '', ";\n ");
39
38
  });
40
39
  var SkeletonText = function (_a) {
41
40
  var _b = _a.lines, lines = _b === void 0 ? 1 : _b, rest = __rest(_a, ["lines"]);
42
- var breakpoints = (0, hooks_1.useBreakpoint)();
43
41
  var generatedLines = [];
42
+ var smallAndUp = (0, hooks_1.useBreakpoint)().smallAndUp;
44
43
  for (var i = 1; i <= lines; i++) {
45
- generatedLines.push((0, jsx_runtime_1.jsx)(StyledSkeletonText, { short: i === lines, breakpoints: breakpoints }, "line-".concat(i)));
44
+ generatedLines.push((0, jsx_runtime_1.jsx)(StyledSkeletonText, { short: i === lines, aboveSmallBreakpoint: smallAndUp }, "line-".concat(i)));
46
45
  }
47
46
  return ((0, jsx_runtime_1.jsx)(Text_1.P, __assign({ as: SkeletonAnimation_1.SkeletonAnimation }, rest, { children: generatedLines })));
48
47
  };
@@ -19,7 +19,7 @@ export var StyledActionText = styled.Text(function (_a) {
19
19
  var fontSize = smallAndUp
20
20
  ? core.fontSize.body.large
21
21
  : core.fontSize.body.small;
22
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n "], ["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, core.fontFamily.bodyBold.native, fontSize, core.lineHeight.body.small);
22
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n flex: 1;\n "], ["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n flex: 1;\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, core.fontFamily.bodyBold.native, fontSize, core.lineHeight.body.small);
23
23
  });
24
24
  export var StyledRightIcon = styled(Icon)(function (_a) {
25
25
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, inverted = _a.inverted, marginTop = _a.marginTop;
@@ -23,20 +23,19 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { useBreakpoint } from '../../hooks';
25
25
  import styled from '../../styled.native';
26
- import { responsiveStyle } from '../../utils';
27
26
  import { P } from '../Text';
28
27
  import { Skeleton } from './Skeleton';
29
28
  import { SkeletonAnimation } from './SkeletonAnimation';
30
29
  var StyledSkeletonText = styled(Skeleton)(function (_a) {
31
- var core = _a.theme.core, short = _a.short, breakpoints = _a.breakpoints;
32
- return "\n background-color: ".concat(core.color.neutral.light, ";\n margin-bottom: ").concat(core.space[2], ";\n ").concat(responsiveStyle('height', core.fontSize.body, breakpoints), "\n\n ").concat(short ? 'width: 50%' : '', ";\n ");
30
+ var core = _a.theme.core, aboveSmallBreakpoint = _a.aboveSmallBreakpoint, short = _a.short;
31
+ return "\n background-color: ".concat(core.color.neutral.light, ";\n margin-bottom: ").concat(core.space[2], ";\n height: ").concat(aboveSmallBreakpoint ? core.fontSize.body.large : core.fontSize.body.small, ";\n\n ").concat(short ? 'width: 50%' : '', ";\n ");
33
32
  });
34
33
  export var SkeletonText = function (_a) {
35
34
  var _b = _a.lines, lines = _b === void 0 ? 1 : _b, rest = __rest(_a, ["lines"]);
36
- var breakpoints = useBreakpoint();
37
35
  var generatedLines = [];
36
+ var smallAndUp = useBreakpoint().smallAndUp;
38
37
  for (var i = 1; i <= lines; i++) {
39
- generatedLines.push(_jsx(StyledSkeletonText, { short: i === lines, breakpoints: breakpoints }, "line-".concat(i)));
38
+ generatedLines.push(_jsx(StyledSkeletonText, { short: i === lines, aboveSmallBreakpoint: smallAndUp }, "line-".concat(i)));
40
39
  }
41
40
  return (_jsx(P, __assign({ as: SkeletonAnimation }, rest, { children: generatedLines })));
42
41
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovotech/element-native",
3
- "version": "3.2.2",
3
+ "version": "3.2.3-canary-855bff6-123",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "url": "@ovotech/element"
14
14
  },
15
15
  "dependencies": {
16
- "@ovotech/element-core": "^2.0.1",
16
+ "@ovotech/element-core": "^2.0.1-canary-855bff6-123",
17
17
  "deepmerge": "^4.2.2",
18
18
  "lodash.groupby": "^4.6.0"
19
19
  },