@gympass/yoga 7.107.1 → 7.108.1

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 (45) hide show
  1. package/cjs/Button/Button.theme.js +7 -2
  2. package/cjs/Button/native/Button.js +15 -3
  3. package/cjs/Button/native/Button.test.js +8 -0
  4. package/cjs/Button/web/Button.test.js +8 -0
  5. package/cjs/Button/web/StyledButton.js +3 -3
  6. package/cjs/Result/native/Attendances.js +11 -10
  7. package/cjs/Result/native/Details.js +3 -4
  8. package/cjs/Result/native/Rate.js +3 -5
  9. package/cjs/Result/native/Result.js +17 -19
  10. package/cjs/Result/native/Tags.js +17 -5
  11. package/cjs/Result/native/TinyTextIcon.js +16 -1
  12. package/cjs/Tag/Tag.theme.js +1 -6
  13. package/cjs/Tag/native/Informative.js +14 -13
  14. package/cjs/Tag/native/Tag.js +8 -10
  15. package/cjs/Tag/native/Tag.test.js +6 -0
  16. package/cjs/Tag/web/Informative.js +7 -14
  17. package/cjs/Tag/web/Tag.js +38 -13
  18. package/cjs/Tag/web/Tag.test.js +6 -0
  19. package/cjs/Theme/Provider/web/FontLoader.test.js +1 -1
  20. package/cjs/Theme/theme/v3theme.js +13 -0
  21. package/esm/Button/Button.theme.js +7 -2
  22. package/esm/Button/native/Button.js +15 -3
  23. package/esm/Button/native/Button.test.js +9 -1
  24. package/esm/Button/web/Button.test.js +9 -1
  25. package/esm/Button/web/StyledButton.js +3 -3
  26. package/esm/Result/native/Attendances.js +11 -10
  27. package/esm/Result/native/Details.js +3 -4
  28. package/esm/Result/native/Rate.js +3 -5
  29. package/esm/Result/native/Result.js +17 -19
  30. package/esm/Result/native/Tags.js +21 -9
  31. package/esm/Result/native/TinyTextIcon.js +16 -1
  32. package/esm/Tag/Tag.theme.js +1 -6
  33. package/esm/Tag/native/Informative.js +14 -13
  34. package/esm/Tag/native/Tag.js +8 -10
  35. package/esm/Tag/native/Tag.test.js +7 -1
  36. package/esm/Tag/web/Informative.js +7 -14
  37. package/esm/Tag/web/Tag.js +33 -13
  38. package/esm/Tag/web/Tag.test.js +7 -1
  39. package/esm/Theme/Provider/web/FontLoader.test.js +1 -1
  40. package/esm/Theme/theme/v3theme.js +13 -0
  41. package/fonts/Inter-600.ttf +0 -0
  42. package/package.json +3 -3
  43. package/typings/NavigationMenu/web/Item/styles.d.ts +7 -1
  44. package/typings/Theme/theme/v3theme.d.ts +39 -38
  45. package/typings/index.d.ts +7 -1
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
8
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
9
  var __getProtoOf = Object.getPrototypeOf;
@@ -19,6 +21,19 @@ var __spreadValues = (a, b) => {
19
21
  }
20
22
  return a;
21
23
  };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
22
37
  var __export = (target, all) => {
23
38
  for (var name in all)
24
39
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -42,6 +57,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
42
57
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
43
58
  var Tag_exports = {};
44
59
  __export(Tag_exports, {
60
+ StyledTag: () => StyledTag,
61
+ StyledText: () => StyledText,
45
62
  default: () => Tag_default
46
63
  });
47
64
  module.exports = __toCommonJS(Tag_exports);
@@ -50,6 +67,7 @@ var import_react = __toESM(require("react"));
50
67
  var import_styled_components = __toESM(require("styled-components"));
51
68
  var import_prop_types = require("prop-types");
52
69
  var import_yoga_system = require("@gympass/yoga-system");
70
+ var import_Text = __toESM(require("../../Text"));
53
71
  const StyledTag = import_styled_components.default.div`
54
72
  display: inline-flex;
55
73
  justify-content: center;
@@ -60,7 +78,6 @@ const StyledTag = import_styled_components.default.div`
60
78
  ${({
61
79
  variant,
62
80
  small,
63
- ellipsis,
64
81
  theme: {
65
82
  yoga: {
66
83
  colors: {
@@ -89,27 +106,30 @@ const StyledTag = import_styled_components.default.div`
89
106
  ${tag.padding.default.left}px;
90
107
  `}
91
108
 
92
- ${ellipsis ? `
93
- display: block;
94
- white-space: nowrap;
95
- overflow: hidden;
96
- text-overflow: ellipsis;
97
- ` : ``}
98
-
99
109
  color: ${color.dark};
100
110
  border-radius: ${tag.border.radius}px;
101
111
  border-width: ${tag.border.width}px;
102
112
  border-color: ${borderColor.dark};
103
-
104
- font-size: ${tag.font.size}px;
105
- line-height: ${tag.font.lineHeight}px;
106
- font-weight: ${tag.font.weight};
107
113
  `}
108
114
 
109
115
  ${import_yoga_system.margins}
110
116
  ${import_yoga_system.maxWidth}
111
117
  `;
112
- const Tag = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledTag, __spreadValues({}, props));
118
+ const StyledText = (0, import_styled_components.default)(import_Text.default.Overline)`
119
+ ${({
120
+ theme: {
121
+ yoga: {
122
+ colors: { text }
123
+ }
124
+ }
125
+ }) => `
126
+ color: ${text.primary};
127
+ `}
128
+ `;
129
+ const Tag = (_a) => {
130
+ var _b = _a, { children, variant, small, ellipsis } = _b, rest = __objRest(_b, ["children", "variant", "small", "ellipsis"]);
131
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledTag, __spreadProps(__spreadValues({ variant, small }, rest), { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledText, { numberOfLines: ellipsis ? 1 : void 0, children }) }));
132
+ };
113
133
  Tag.propTypes = {
114
134
  /** style the tag following the theme (success, informative, attention) */
115
135
  variant: (0, import_prop_types.oneOf)(["", "success", "informative", "attention"]),
@@ -125,3 +145,8 @@ Tag.defaultProps = {
125
145
  ellipsis: false
126
146
  };
127
147
  var Tag_default = Tag;
148
+ // Annotate the CommonJS export names for ESM import in node:
149
+ 0 && (module.exports = {
150
+ StyledTag,
151
+ StyledText
152
+ });
@@ -27,6 +27,12 @@ var import_react2 = require("@testing-library/react");
27
27
  var import_yoga_icons = require("@gympass/yoga-icons");
28
28
  var import__ = require("../..");
29
29
  describe("<Tag />", () => {
30
+ it("should match snapshot when v3Theme is settled", () => {
31
+ const { container } = (0, import_react2.render)(
32
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { theme: import__.v3theme, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Tag, { children: "v3Theme" }) })
33
+ );
34
+ expect(container).toMatchSnapshot();
35
+ });
30
36
  it("should match snapshot", () => {
31
37
  const { container } = (0, import_react2.render)(
32
38
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Tag, { children: "default" }) })
@@ -33,7 +33,7 @@ describe("FontLoader component", () => {
33
33
  );
34
34
  const link = document.getElementsByTagName("link").item(0).outerHTML;
35
35
  expect(link).toContain(
36
- `<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Rubik:300,400,500,700,900,300i,400i,500i,700i,900i">`
36
+ `<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Rubik:300,400,500,600,700,900,300i,400i,500i,600i,700i,900i">`
37
37
  );
38
38
  });
39
39
  });
@@ -238,6 +238,19 @@ const v3theme = (0, import_themeGenerator.default)((tokens) => ({
238
238
  black: {
239
239
  fontWeight: tokens.fontWeights.black
240
240
  }
241
+ },
242
+ button: {
243
+ font: {
244
+ size: {
245
+ default: tokens.fontSizes.medium,
246
+ small: tokens.fontSizes.small
247
+ },
248
+ weight: tokens.fontWeights.semiBold,
249
+ height: {
250
+ default: tokens.lineHeights.medium,
251
+ small: tokens.lineHeights.xsmall
252
+ }
253
+ }
241
254
  }
242
255
  }
243
256
  }));
@@ -5,7 +5,8 @@ const Button = ({
5
5
  borders,
6
6
  radii,
7
7
  colors,
8
- fontWeights
8
+ fontWeights,
9
+ lineHeights
9
10
  }) => ({
10
11
  padding: {
11
12
  default: {
@@ -26,7 +27,11 @@ const Button = ({
26
27
  default: fontSizes.medium,
27
28
  small: fontSizes.small
28
29
  },
29
- weight: fontWeights.medium
30
+ weight: fontWeights.medium,
31
+ lineHeight: {
32
+ default: lineHeights.medium,
33
+ small: lineHeights.xsmall
34
+ }
30
35
  },
31
36
  border: {
32
37
  radius: radii.circle
@@ -31,11 +31,21 @@ var __objRest = (source, exclude) => {
31
31
  };
32
32
  import { jsx, jsxs } from "react/jsx-runtime";
33
33
  import React, { forwardRef } from "react";
34
+ import { bool, func, node, oneOfType } from "prop-types";
34
35
  import styled, { withTheme } from "styled-components";
35
- import { node, oneOfType, func, bool } from "prop-types";
36
36
  import withTouchable from "./withTouchable";
37
37
  import Text from "../../Text";
38
- const Label = styled(Text.Medium)`
38
+ const Label = styled(Text).attrs(
39
+ ({
40
+ theme: {
41
+ yoga: {
42
+ components: { button }
43
+ }
44
+ }
45
+ }) => ({
46
+ fontWeight: button.font.weight
47
+ })
48
+ )`
39
49
  text-align: center;
40
50
  ${({
41
51
  small,
@@ -47,6 +57,7 @@ const Label = styled(Text.Medium)`
47
57
  }
48
58
  }) => `
49
59
  font-size: ${small ? button.font.size.small : button.font.size.default}px;
60
+ line-height: ${small ? button.font.lineHeight.small : button.font.lineHeight.default}px;
50
61
  color: ${color};
51
62
  `}
52
63
  `;
@@ -191,8 +202,9 @@ Button.defaultProps = {
191
202
  icon: void 0
192
203
  };
193
204
  const ButtonWithTouchable = withTouchable(withTheme(Button));
205
+ var Button_default = ButtonWithTouchable;
194
206
  export {
195
207
  ButtonContainer,
196
208
  Label,
197
- ButtonWithTouchable as default
209
+ Button_default as default
198
210
  };
@@ -2,11 +2,19 @@ import { jsx } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { render, fireEvent } from "@testing-library/react-native";
4
4
  import { Booking } from "@gympass/yoga-icons";
5
- import ThemeProvider from "../../Theme";
5
+ import ThemeProvider, { v3theme } from "../../Theme";
6
6
  import Button from "..";
7
7
  describe("<Button />", () => {
8
8
  describe("Snapshots", () => {
9
9
  describe("primary buttons", () => {
10
+ describe("with v3theme", () => {
11
+ it("should match snapshot with v3theme Button", () => {
12
+ const { toJSON } = render(
13
+ /* @__PURE__ */ jsx(ThemeProvider, { theme: v3theme, children: /* @__PURE__ */ jsx(Button, {}) })
14
+ );
15
+ expect(toJSON()).toMatchSnapshot();
16
+ });
17
+ });
10
18
  describe("Without props", () => {
11
19
  it("should match snapshot with default Button", () => {
12
20
  const { toJSON } = render(
@@ -2,11 +2,19 @@ import { jsx } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { render, fireEvent, screen, within } from "@testing-library/react";
4
4
  import { Booking, Close } from "@gympass/yoga-icons";
5
- import ThemeProvider from "../../Theme";
5
+ import ThemeProvider, { v3theme } from "../../Theme";
6
6
  import Button from "..";
7
7
  describe("<Button />", () => {
8
8
  describe("Snapshots", () => {
9
9
  describe("primary buttons", () => {
10
+ describe("with v3theme", () => {
11
+ it("should match snapshot with v3theme Button", () => {
12
+ const { container } = render(
13
+ /* @__PURE__ */ jsx(ThemeProvider, { theme: v3theme, children: /* @__PURE__ */ jsx(Button, {}) })
14
+ );
15
+ expect(container).toMatchSnapshot();
16
+ });
17
+ });
10
18
  describe("Without props", () => {
11
19
  it("should match snapshot with default Button", () => {
12
20
  const { container } = render(
@@ -41,7 +41,7 @@ const StyledButton = styled.button`
41
41
  font-weight: ${button.font.weight};
42
42
  font-family: ${baseFont.family};
43
43
  letter-spacing: normal;
44
- line-height: 1;
44
+ line-height: ${small ? button.font.lineHeight.small : button.font.lineHeight.default}px;
45
45
  text-decoration: none;
46
46
 
47
47
  svg {
@@ -70,7 +70,7 @@ const StyledButton = styled.button`
70
70
  }
71
71
 
72
72
  ${disabled ? `
73
-
73
+
74
74
  background-color ${button.types.contained.backgroundColor.disabled};
75
75
  color: ${button.types.contained.font.disabled.color};
76
76
  pointer-events: none;
@@ -80,7 +80,7 @@ const StyledButton = styled.button`
80
80
  }
81
81
 
82
82
  cursor: not-allowed;
83
-
83
+
84
84
  ` : ""}
85
85
 
86
86
  ${inverted ? `
@@ -6,17 +6,16 @@ import Box from "../../Box";
6
6
  import Text from "../../Text";
7
7
  import Rate from "./Rate";
8
8
  import TinyTextIcon from "./TinyTextIcon";
9
- const List = styled(Text.Tiny).attrs({
9
+ const List = styled(Text.Caption).attrs({
10
10
  numberOfLines: 1,
11
- variant: "deep"
11
+ color: ({ color }) => color || "deep"
12
12
  })`
13
13
  flex: 1;
14
14
  `;
15
15
  const ItemSeparator = styled(Box).attrs({
16
- width: "xxxsmall",
17
16
  height: "zero"
18
17
  })``;
19
- const Attendances = ({ attendances, rate }) => /* @__PURE__ */ jsxs(
18
+ const Attendances = ({ attendances, rate, color }) => /* @__PURE__ */ jsxs(
20
19
  Box,
21
20
  {
22
21
  display: "flex",
@@ -26,11 +25,11 @@ const Attendances = ({ attendances, rate }) => /* @__PURE__ */ jsxs(
26
25
  flexDirection: "row",
27
26
  mb: "xxxsmall",
28
27
  children: [
29
- /* @__PURE__ */ jsx(List, { children: attendances.map(({ description, icon }) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
30
- /* @__PURE__ */ jsx(TinyTextIcon, { as: icon, fill: "deep" }),
31
- /* @__PURE__ */ jsx(ItemSeparator, {}),
28
+ /* @__PURE__ */ jsx(List, { color, children: attendances.map(({ description, icon }) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
29
+ /* @__PURE__ */ jsx(TinyTextIcon, { as: icon, marginTop: "2px", fill: color || "deep" }),
30
+ /* @__PURE__ */ jsx(ItemSeparator, { w: "xxxsmall" }),
32
31
  description,
33
- /* @__PURE__ */ jsx(ItemSeparator, {})
32
+ /* @__PURE__ */ jsx(ItemSeparator, { w: "xxsmall" })
34
33
  ] }, description)) }),
35
34
  rate && /* @__PURE__ */ jsx(Rate, { rate })
36
35
  ]
@@ -43,10 +42,12 @@ Attendances.propTypes = {
43
42
  icon: func
44
43
  })
45
44
  ).isRequired,
46
- rate: string
45
+ rate: string,
46
+ color: string
47
47
  };
48
48
  Attendances.defaultProps = {
49
- rate: void 0
49
+ rate: void 0,
50
+ color: "deep"
50
51
  };
51
52
  var Attendances_default = Attendances;
52
53
  export {
@@ -42,15 +42,14 @@ import styled from "styled-components";
42
42
  import Text from "../../Text";
43
43
  import Box from "../../Box";
44
44
  import TinyTextIcon from "./TinyTextIcon";
45
- const Container = styled(Text.Tiny)`
45
+ const Container = styled(Text.Body2)`
46
46
  flex: 1;
47
- height: ${({ theme }) => theme.yoga.spacing.small}px;
48
47
  `;
49
48
  const Separator = styled(Box).attrs({
50
49
  width: "xxxsmall",
51
50
  height: "xxxsmall"
52
51
  })``;
53
- const StyledText = styled(Text.Tiny)`
52
+ const StyledText = styled(Text.Body2)`
54
53
  ${({
55
54
  theme: {
56
55
  yoga: {
@@ -122,7 +121,7 @@ ResultDetails.defaultProps = {
122
121
  limit: void 0,
123
122
  limitLabel: "",
124
123
  dots: false,
125
- renderItem: Text.Tiny
124
+ renderItem: Text.Body2
126
125
  };
127
126
  var Details_default = ResultDetails;
128
127
  export {
@@ -11,24 +11,22 @@ const Content = styled.View`
11
11
  margin-left: 10px;
12
12
  align-items: center;
13
13
  `;
14
- const RateValue = styled(Text.Medium)`
14
+ const RateValue = styled(Text.Overline)`
15
15
  ${({
16
16
  theme: {
17
17
  yoga: {
18
- spacing: { xxxsmall },
19
- lineHeights: { xsmall }
18
+ spacing: { xxxsmall }
20
19
  }
21
20
  }
22
21
  }) => {
23
22
  return `
24
23
  margin-left: ${xxxsmall}px;
25
- line-height: ${xsmall}px;
26
24
  `;
27
25
  }}
28
26
  `;
29
27
  const Rate = ({ rate }) => /* @__PURE__ */ jsxs(Content, { children: [
30
28
  /* @__PURE__ */ jsx(Icon, { as: StarFilled, fill: "deep", width: "xsmall", height: "xsmall" }),
31
- /* @__PURE__ */ jsx(RateValue, { variant: "deep", size: "xsmall", children: rate })
29
+ /* @__PURE__ */ jsx(RateValue, { variant: "deep", children: rate })
32
30
  ] });
33
31
  Rate.propTypes = {
34
32
  rate: string.isRequired
@@ -33,19 +33,6 @@ const Content = styled.View`
33
33
  `;
34
34
  }}
35
35
  `;
36
- const Title = styled(Text.Medium)`
37
- ${({
38
- theme: {
39
- yoga: {
40
- lineHeights: { medium }
41
- }
42
- }
43
- }) => {
44
- return `
45
- line-height: ${medium}px;
46
- `;
47
- }}
48
- `;
49
36
  const Result = ({
50
37
  avatar: Avatar,
51
38
  attendances,
@@ -53,13 +40,21 @@ const Result = ({
53
40
  title,
54
41
  subTitle,
55
42
  divided,
56
- children
43
+ children,
44
+ attendancesColor
57
45
  }) => /* @__PURE__ */ jsxs(StyledBox, { divided, display: "flex", flexDirection: "row", children: [
58
46
  Avatar && /* @__PURE__ */ jsx(Fragment, { children: isValidElement(Avatar) ? Avatar : /* @__PURE__ */ jsx(Avatar, {}) }),
59
47
  /* @__PURE__ */ jsxs(Content, { children: [
60
- !!(attendances == null ? void 0 : attendances.length) && /* @__PURE__ */ jsx(Attendances, { attendances, rate }),
61
- /* @__PURE__ */ jsx(Title, { numberOfLines: 1, children: title }),
62
- subTitle && subTitle !== "" && /* @__PURE__ */ jsx(Text.Small, { numberOfLines: 1, variant: "stamina", children: subTitle }),
48
+ !!(attendances == null ? void 0 : attendances.length) && /* @__PURE__ */ jsx(
49
+ Attendances,
50
+ {
51
+ attendances,
52
+ rate,
53
+ color: attendancesColor
54
+ }
55
+ ),
56
+ /* @__PURE__ */ jsx(Text.Body1, { numberOfLines: 1, bold: true, children: title }),
57
+ subTitle && subTitle !== "" && /* @__PURE__ */ jsx(Text.Body2, { numberOfLines: 1, color: "deep", children: subTitle }),
63
58
  children
64
59
  ] })
65
60
  ] });
@@ -82,14 +77,17 @@ Result.propTypes = {
82
77
  /** If it is to show the divide in the bottom */
83
78
  divided: bool,
84
79
  /** The chidren necessary */
85
- children: node
80
+ children: node,
81
+ /** The color of attendences icon and description */
82
+ attendancesColor: string
86
83
  };
87
84
  Result.defaultProps = {
88
85
  rate: void 0,
89
86
  divided: false,
90
87
  subTitle: void 0,
91
88
  children: void 0,
92
- attendances: void 0
89
+ attendances: void 0,
90
+ attendancesColor: void 0
93
91
  };
94
92
  var Result_default = Result;
95
93
  export {
@@ -28,7 +28,7 @@ var __objRest = (source, exclude) => {
28
28
  };
29
29
  import { jsx } from "react/jsx-runtime";
30
30
  import React from "react";
31
- import { arrayOf, shape } from "prop-types";
31
+ import { arrayOf, shape, bool } from "prop-types";
32
32
  import styled from "styled-components";
33
33
  import Tag from "../../Tag";
34
34
  const TagStyled = styled(Tag.Informative)`
@@ -47,17 +47,29 @@ const Wrapper = styled.ScrollView`
47
47
  margin-top: ${xxsmall}px;
48
48
  `}
49
49
  `;
50
- const ResultTags = ({ items }) => /* @__PURE__ */ jsx(Wrapper, { horizontal: true, showsHorizontalScrollIndicator: false, children: items.map((_a, index) => {
51
- var props = __objRest(_a, []);
52
- return (
53
- // eslint-disable-next-line react/no-array-index-key
54
- /* @__PURE__ */ jsx(TagStyled, __spreadValues({ small: true }, props), index)
55
- );
56
- }) });
50
+ const ResultTags = ({ items, disableScroll }) => /* @__PURE__ */ jsx(
51
+ Wrapper,
52
+ {
53
+ horizontal: true,
54
+ scrollEnabled: !disableScroll,
55
+ showsHorizontalScrollIndicator: false,
56
+ children: items.map((_a, index) => {
57
+ var props = __objRest(_a, []);
58
+ return (
59
+ // eslint-disable-next-line react/no-array-index-key
60
+ /* @__PURE__ */ jsx(TagStyled, __spreadValues({ small: true }, props), index)
61
+ );
62
+ })
63
+ }
64
+ );
57
65
  ResultTags.displayName = "Result.Tags";
58
66
  ResultTags.propTypes = {
59
67
  /** Props to generate each Tag. See Tag for details */
60
- items: arrayOf(shape({})).isRequired
68
+ items: arrayOf(shape({})).isRequired,
69
+ disableScroll: bool
70
+ };
71
+ ResultTags.defaultProps = {
72
+ disableScroll: false
61
73
  };
62
74
  var Tags_default = ResultTags;
63
75
  export {
@@ -17,11 +17,26 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
20
32
  import { jsx } from "react/jsx-runtime";
21
33
  import React from "react";
22
34
  import Box from "../../Box";
23
35
  import Icon from "../../Icon";
24
- const TinyTextIcon = (props) => /* @__PURE__ */ jsx(Box, { height: "xsmall", width: "xsmall", children: /* @__PURE__ */ jsx(Icon, __spreadProps(__spreadValues({}, props), { size: "xsmall", mt: "2px" })) });
36
+ const TinyTextIcon = (_a) => {
37
+ var _b = _a, { marginTop } = _b, props = __objRest(_b, ["marginTop"]);
38
+ return /* @__PURE__ */ jsx(Box, { height: "xsmall", width: "xsmall", children: /* @__PURE__ */ jsx(Icon, __spreadProps(__spreadValues({}, props), { size: "xsmall", mt: marginTop })) });
39
+ };
25
40
  TinyTextIcon.propTypes = Icon.propTypes;
26
41
  var TinyTextIcon_default = TinyTextIcon;
27
42
  export {
@@ -1,4 +1,4 @@
1
- const Tag = ({ spacing, fontSizes, fontWeights, radii, borders }) => ({
1
+ const Tag = ({ spacing, radii, borders }) => ({
2
2
  icon: {
3
3
  size: {
4
4
  default: spacing.small,
@@ -8,11 +8,6 @@ const Tag = ({ spacing, fontSizes, fontWeights, radii, borders }) => ({
8
8
  right: "xxxsmall"
9
9
  }
10
10
  },
11
- font: {
12
- size: fontSizes.xsmall,
13
- lineHeight: fontSizes.medium,
14
- weight: fontWeights.medium
15
- },
16
11
  padding: {
17
12
  default: {
18
13
  top: spacing.xxxsmall,
@@ -65,36 +65,35 @@ const StyledTextInformative = styled(StyledText)`
65
65
  ${({
66
66
  theme: {
67
67
  yoga: {
68
- colors: { text },
69
- components: { tag }
68
+ colors: { text }
70
69
  }
71
70
  }
72
71
  }) => `
73
72
  color: ${text.primary};
74
-
75
- font-size: ${tag.font.size}px;
76
- line-height: ${tag.font.lineHeight}px;
77
- font-weight: ${tag.font.weight};
78
73
  `}
79
74
  `;
80
75
  const TagInformative = (_a) => {
81
76
  var _b = _a, {
82
77
  children,
83
78
  icon,
79
+ ellipsis,
84
80
  theme: {
85
81
  yoga: {
86
82
  colors: { text },
87
83
  components: { tag }
88
84
  }
89
85
  },
90
- small
91
- } = _b, props = __objRest(_b, [
86
+ small,
87
+ variant
88
+ } = _b, rest = __objRest(_b, [
92
89
  "children",
93
90
  "icon",
91
+ "ellipsis",
94
92
  "theme",
95
- "small"
93
+ "small",
94
+ "variant"
96
95
  ]);
97
- return /* @__PURE__ */ jsx(Informative, __spreadProps(__spreadValues({ small }, props), { children: /* @__PURE__ */ jsxs(Wrapper, { children: [
96
+ return /* @__PURE__ */ jsx(Informative, __spreadProps(__spreadValues({ variant, small }, rest), { children: /* @__PURE__ */ jsxs(Wrapper, { children: [
98
97
  icon && /* @__PURE__ */ jsx(
99
98
  Icon,
100
99
  {
@@ -104,7 +103,7 @@ const TagInformative = (_a) => {
104
103
  marginRight: tag.icon.margin.right
105
104
  }
106
105
  ),
107
- /* @__PURE__ */ jsx(StyledTextInformative, { children })
106
+ /* @__PURE__ */ jsx(StyledTextInformative, { numberOfLines: ellipsis ? 1 : void 0, children })
108
107
  ] }) }));
109
108
  };
110
109
  TagInformative.propTypes = {
@@ -113,12 +112,14 @@ TagInformative.propTypes = {
113
112
  icon: func,
114
113
  children: node.isRequired,
115
114
  /** Can send small to use this variant */
116
- small: bool
115
+ small: bool,
116
+ ellipsis: bool
117
117
  };
118
118
  TagInformative.defaultProps = {
119
119
  variant: "neutral",
120
120
  icon: void 0,
121
- small: false
121
+ small: false,
122
+ ellipsis: false
122
123
  };
123
124
  TagInformative.displayName = "Tag.Informative";
124
125
  var Informative_default = withTheme(TagInformative);
@@ -78,7 +78,7 @@ const StyledTag = styled.View`
78
78
  `;
79
79
  const StyledText = styled((_a) => {
80
80
  var _b = _a, { variant } = _b, rest = __objRest(_b, ["variant"]);
81
- return /* @__PURE__ */ jsx(Text.Medium, __spreadValues({}, rest));
81
+ return /* @__PURE__ */ jsx(Text.Overline, __spreadValues({}, rest));
82
82
  })`
83
83
  ${({
84
84
  variant,
@@ -87,31 +87,29 @@ const StyledText = styled((_a) => {
87
87
  colors: {
88
88
  text,
89
89
  feedback: { [variant]: color = { dark: text.secondary } }
90
- },
91
- components: { tag }
90
+ }
92
91
  }
93
92
  }
94
93
  }) => `
95
94
  color: ${color.dark};
96
-
97
- font-size: ${tag.font.size}px;
98
- line-height: ${tag.font.lineHeight}px;
99
95
  `}
100
96
  `;
101
97
  const Tag = (_c) => {
102
- var _d = _c, { children, variant, small } = _d, props = __objRest(_d, ["children", "variant", "small"]);
103
- return /* @__PURE__ */ jsx(StyledTag, __spreadProps(__spreadValues({ variant, small }, props), { children: /* @__PURE__ */ jsx(StyledText, { variant, children }) }));
98
+ var _d = _c, { children, variant, small, ellipsis } = _d, rest = __objRest(_d, ["children", "variant", "small", "ellipsis"]);
99
+ return /* @__PURE__ */ jsx(StyledTag, __spreadProps(__spreadValues({ variant, small }, rest), { children: /* @__PURE__ */ jsx(StyledText, { numberOfLines: ellipsis ? 1 : void 0, children }) }));
104
100
  };
105
101
  Tag.propTypes = {
106
102
  /** style the tag following the theme (success, informative, attention) */
107
103
  variant: oneOf(["", "success", "informative", "attention"]),
108
104
  /** Can send small to use this variant */
109
105
  small: bool,
110
- children: node.isRequired
106
+ children: node.isRequired,
107
+ ellipsis: bool
111
108
  };
112
109
  Tag.defaultProps = {
113
110
  variant: "",
114
- small: false
111
+ small: false,
112
+ ellipsis: false
115
113
  };
116
114
  var Tag_default = Tag;
117
115
  export {