@gympass/yoga 7.89.0 → 7.90.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.
- package/cjs/Avatar/native/Avatar.js +1 -1
- package/cjs/NavigationMenu/web/Menu/Menu.js +2 -2
- package/cjs/NavigationMenu/web/Switcher/Switcher.js +16 -4
- package/esm/Avatar/native/Avatar.js +1 -1
- package/esm/NavigationMenu/web/Menu/Menu.js +3 -3
- package/esm/NavigationMenu/web/Switcher/Switcher.js +17 -5
- package/package.json +2 -2
- package/typings/NavigationMenu/index.d.ts +2 -2
- package/typings/NavigationMenu/web/Menu/index.d.ts +1 -1
- package/typings/NavigationMenu/web/Switcher/index.d.ts +1 -1
- package/typings/NavigationMenu/web/index.d.ts +2 -2
- package/typings/{NavigationMenu-7f690c1e.d.ts → NavigationMenu-373d8980.d.ts} +5 -4
- package/typings/{Switcher-cab05b9f.d.ts → Switcher-a8dff781.d.ts} +3 -2
- package/typings/index.d.ts +2 -2
|
@@ -71,7 +71,7 @@ var import_yoga_common = require("@gympass/yoga-common");
|
|
|
71
71
|
var import_Box = __toESM(require("../../Box"));
|
|
72
72
|
var import_Icon = __toESM(require("../../Icon"));
|
|
73
73
|
const BORDER_WIDTH = 1;
|
|
74
|
-
const BORDER_OPACITY = 0.
|
|
74
|
+
const BORDER_OPACITY = 0.1;
|
|
75
75
|
const BorderImage = (0, import_styled_components.default)(import_Box.default).attrs(({ theme: { yoga } }) => {
|
|
76
76
|
return {
|
|
77
77
|
borderColor: (0, import_yoga_common.hexToRgb)(yoga.colors.secondary, BORDER_OPACITY),
|
|
@@ -100,8 +100,8 @@ const Menu = ({ avatar: Avatar, subtitle, title, onClick }) => {
|
|
|
100
100
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(StyledMenu, { hasAction, onClick, children: [
|
|
101
101
|
Avatar,
|
|
102
102
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(StyledTextContainer, { children: [
|
|
103
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledText, { children: title
|
|
104
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_yoga.Text.Small, { color: "deep", children: subtitle })
|
|
103
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledText, { children: title }),
|
|
104
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_yoga.Text.Small, { color: "deep", children: subtitle })
|
|
105
105
|
] }),
|
|
106
106
|
hasAction && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Icon.default, { as: import_yoga_icons.ArrowRight, size: "large", fill: "vibin" })
|
|
107
107
|
] });
|
|
@@ -88,6 +88,7 @@ const Switcher = ({
|
|
|
88
88
|
actions,
|
|
89
89
|
avatar: Avatar,
|
|
90
90
|
fill = "transparent",
|
|
91
|
+
isLoading = false,
|
|
91
92
|
sideOffset = 36,
|
|
92
93
|
subtitle,
|
|
93
94
|
title
|
|
@@ -95,10 +96,21 @@ const Switcher = ({
|
|
|
95
96
|
const hasActions = actions == null ? void 0 : actions.length;
|
|
96
97
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(StyledSwitcher, { fill, children: [
|
|
97
98
|
Avatar,
|
|
98
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
99
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledTextContainer, { children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
100
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
101
|
+
import_yoga.Skeleton,
|
|
102
|
+
{
|
|
103
|
+
type: "text",
|
|
104
|
+
variant: "overline",
|
|
105
|
+
width: "100%",
|
|
106
|
+
marginBottom: "4px"
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_yoga.Skeleton, { type: "text", variant: "overline", width: "100%" })
|
|
110
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
111
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledTitle, { children: title }),
|
|
112
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_yoga.Text.Tiny, { color: "deep", children: subtitle })
|
|
113
|
+
] }) }),
|
|
102
114
|
hasActions && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Actions.default, { actions, sideOffset })
|
|
103
115
|
] });
|
|
104
116
|
};
|
|
@@ -40,7 +40,7 @@ import { hexToRgb } from "@gympass/yoga-common";
|
|
|
40
40
|
import Box from "../../Box";
|
|
41
41
|
import Icon from "../../Icon";
|
|
42
42
|
const BORDER_WIDTH = 1;
|
|
43
|
-
const BORDER_OPACITY = 0.
|
|
43
|
+
const BORDER_OPACITY = 0.1;
|
|
44
44
|
const BorderImage = styled(Box).attrs(({ theme: { yoga } }) => {
|
|
45
45
|
return {
|
|
46
46
|
borderColor: hexToRgb(yoga.colors.secondary, BORDER_OPACITY),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled, { css } from "styled-components";
|
|
3
3
|
import { ArrowRight } from "@gympass/yoga-icons";
|
|
4
|
-
import { Text
|
|
4
|
+
import { Text } from "@gympass/yoga";
|
|
5
5
|
import Box from "../../../Box";
|
|
6
6
|
import Icon from "../../../Icon";
|
|
7
7
|
const StyledMenu = styled(Box)`
|
|
@@ -67,8 +67,8 @@ const Menu = ({ avatar: Avatar, subtitle, title, onClick }) => {
|
|
|
67
67
|
return /* @__PURE__ */ jsxs(StyledMenu, { hasAction, onClick, children: [
|
|
68
68
|
Avatar,
|
|
69
69
|
/* @__PURE__ */ jsxs(StyledTextContainer, { children: [
|
|
70
|
-
/* @__PURE__ */ jsx(StyledText, { children: title
|
|
71
|
-
/* @__PURE__ */ jsx(Text.Small, { color: "deep", children: subtitle })
|
|
70
|
+
title && /* @__PURE__ */ jsx(StyledText, { children: title }),
|
|
71
|
+
subtitle && /* @__PURE__ */ jsx(Text.Small, { color: "deep", children: subtitle })
|
|
72
72
|
] }),
|
|
73
73
|
hasAction && /* @__PURE__ */ jsx(Icon, { as: ArrowRight, size: "large", fill: "vibin" })
|
|
74
74
|
] });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled, { css } from "styled-components";
|
|
3
3
|
import { Text, Skeleton } from "@gympass/yoga";
|
|
4
4
|
import Actions from "./Actions";
|
|
@@ -55,6 +55,7 @@ const Switcher = ({
|
|
|
55
55
|
actions,
|
|
56
56
|
avatar: Avatar,
|
|
57
57
|
fill = "transparent",
|
|
58
|
+
isLoading = false,
|
|
58
59
|
sideOffset = 36,
|
|
59
60
|
subtitle,
|
|
60
61
|
title
|
|
@@ -62,10 +63,21 @@ const Switcher = ({
|
|
|
62
63
|
const hasActions = actions == null ? void 0 : actions.length;
|
|
63
64
|
return /* @__PURE__ */ jsxs(StyledSwitcher, { fill, children: [
|
|
64
65
|
Avatar,
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */ jsx(
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
/* @__PURE__ */ jsx(StyledTextContainer, { children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
67
|
+
/* @__PURE__ */ jsx(
|
|
68
|
+
Skeleton,
|
|
69
|
+
{
|
|
70
|
+
type: "text",
|
|
71
|
+
variant: "overline",
|
|
72
|
+
width: "100%",
|
|
73
|
+
marginBottom: "4px"
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
/* @__PURE__ */ jsx(Skeleton, { type: "text", variant: "overline", width: "100%" })
|
|
77
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
78
|
+
title && /* @__PURE__ */ jsx(StyledTitle, { children: title }),
|
|
79
|
+
subtitle && /* @__PURE__ */ jsx(Text.Tiny, { color: "deep", children: subtitle })
|
|
80
|
+
] }) }),
|
|
69
81
|
hasActions && /* @__PURE__ */ jsx(Actions, { actions, sideOffset })
|
|
70
82
|
] });
|
|
71
83
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gympass/yoga",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.90.1",
|
|
4
4
|
"description": "Gympass component library",
|
|
5
5
|
"main": "./cjs",
|
|
6
6
|
"types": "./typings/index.d.ts",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"react-native": "0.72.3",
|
|
57
57
|
"styled-components": "^4.4.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "8dad59f700b4ff4e3be23c1f178258ab0c92663f",
|
|
60
60
|
"module": "./esm",
|
|
61
61
|
"private": false,
|
|
62
62
|
"react-native": "./cjs/index.native.js"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as SwitcherActionsProps } from './Switcher-
|
|
1
|
+
import { S as SwitcherActionsProps } from './Switcher-a8dff781.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
declare type NavigationMenuProps = {
|
|
@@ -12,16 +12,17 @@ declare const NavigationMenu: {
|
|
|
12
12
|
Menu: ({ avatar: Avatar, subtitle, title, onClick }: {
|
|
13
13
|
avatar: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
14
14
|
subtitle?: string | undefined;
|
|
15
|
-
title
|
|
15
|
+
title?: string | undefined;
|
|
16
16
|
onClick?: (() => void) | undefined;
|
|
17
17
|
}) => JSX.Element;
|
|
18
|
-
Switcher: ({ actions, avatar: Avatar, fill, sideOffset, subtitle, title, }: {
|
|
18
|
+
Switcher: ({ actions, avatar: Avatar, fill, isLoading, sideOffset, subtitle, title, }: {
|
|
19
19
|
actions?: SwitcherActionsProps[] | undefined;
|
|
20
20
|
avatar: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
21
21
|
fill?: string | undefined;
|
|
22
|
+
isLoading?: boolean | undefined;
|
|
22
23
|
sideOffset?: number | undefined;
|
|
23
24
|
subtitle?: string | undefined;
|
|
24
|
-
title
|
|
25
|
+
title?: string | undefined;
|
|
25
26
|
}) => JSX.Element;
|
|
26
27
|
Items: any;
|
|
27
28
|
ItemsGroup: any;
|
|
@@ -9,10 +9,11 @@ declare type SwitcherProps = {
|
|
|
9
9
|
actions?: SwitcherActionsProps[];
|
|
10
10
|
avatar: React.ReactElement;
|
|
11
11
|
fill?: string;
|
|
12
|
+
isLoading?: boolean;
|
|
12
13
|
sideOffset?: number;
|
|
13
14
|
subtitle?: string;
|
|
14
|
-
title
|
|
15
|
+
title?: string;
|
|
15
16
|
};
|
|
16
|
-
declare const Switcher: ({ actions, avatar: Avatar, fill, sideOffset, subtitle, title, }: SwitcherProps) => JSX.Element;
|
|
17
|
+
declare const Switcher: ({ actions, avatar: Avatar, fill, isLoading, sideOffset, subtitle, title, }: SwitcherProps) => JSX.Element;
|
|
17
18
|
|
|
18
19
|
export { SwitcherActionsProps as S, Switcher as a };
|
package/typings/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as prop_types from 'prop-types';
|
|
|
2
2
|
import prop_types__default, { string, bool, func, node, number, elementType } from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
export { _ as Icon } from './Icon-4557ae6b.js';
|
|
5
|
-
export { N as NavigationMenu } from './NavigationMenu-
|
|
6
|
-
import './Switcher-
|
|
5
|
+
export { N as NavigationMenu } from './NavigationMenu-373d8980.js';
|
|
6
|
+
import './Switcher-a8dff781.js';
|
|
7
7
|
|
|
8
8
|
/** This component provides a theme to all React components underneath itself via the context API. */
|
|
9
9
|
declare function ThemeProvider({ children, ...rest }: {
|