fluent-styles 1.50.0 → 1.52.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.
@@ -5,14 +5,29 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.StyledCycle = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
8
9
  var _stack = require("../stack");
9
10
  var _theme = require("../theme");
10
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
12
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
12
13
  const StyledCycle = ({
13
14
  children,
14
- ...rest
15
+ pressable = false,
16
+ pressableProps = {},
17
+ ...cycleProps
15
18
  }) => {
19
+ if (pressable) {
20
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, pressableProps, /*#__PURE__*/_react.default.createElement(_stack.YStack, _extends({
21
+ height: 48,
22
+ width: 48,
23
+ borderRadius: 50,
24
+ borderWidth: 1,
25
+ borderColor: _theme.theme.colors.gray[1],
26
+ backgroundColor: _theme.theme.colors.gray[1],
27
+ justifyContent: "center",
28
+ alignItems: "center"
29
+ }, cycleProps), children));
30
+ }
16
31
  return /*#__PURE__*/_react.default.createElement(_stack.YStack, _extends({
17
32
  height: 48,
18
33
  width: 48,
@@ -22,7 +37,7 @@ const StyledCycle = ({
22
37
  backgroundColor: _theme.theme.colors.gray[1],
23
38
  justifyContent: "center",
24
39
  alignItems: "center"
25
- }, rest), children);
40
+ }, cycleProps), children);
26
41
  };
27
42
  exports.StyledCycle = StyledCycle;
28
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_stack","_theme","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","StyledCycle","children","rest","createElement","YStack","height","width","borderRadius","borderWidth","borderColor","theme","colors","gray","backgroundColor","justifyContent","alignItems","exports"],"sources":["index.jsx"],"sourcesContent":["import React from 'react'\r\nimport { YStack } from '../stack'\r\nimport { theme } from '../theme'\r\n\r\nconst StyledCycle = ({ children, ...rest }) => {\r\n return (\r\n <YStack\r\n height={48}\r\n width={48}\r\n borderRadius={50}\r\n borderWidth={1}\r\n borderColor={theme.colors.gray[1]}\r\n backgroundColor={theme.colors.gray[1]}\r\n justifyContent='center'\r\n alignItems='center'\r\n {...rest}\r\n\t\t>\r\n {children}\r\n </YStack>\r\n )\r\n}\r\n\r\nexport { StyledCycle }\r\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAgC,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAEhC,MAAMO,WAAW,GAAGA,CAAC;EAAEC,QAAQ;EAAE,GAAGC;AAAK,CAAC,KAAK;EAC7C,oBACEtB,MAAA,CAAAO,OAAA,CAAAgB,aAAA,CAACpB,MAAA,CAAAqB,MAAM,EAAAhB,QAAA;IACLiB,MAAM,EAAE,EAAG;IACXC,KAAK,EAAE,EAAG;IACVC,YAAY,EAAE,EAAG;IACjBC,WAAW,EAAE,CAAE;IACfC,WAAW,EAAEC,YAAK,CAACC,MAAM,CAACC,IAAI,CAAC,CAAC,CAAE;IAClCC,eAAe,EAAEH,YAAK,CAACC,MAAM,CAACC,IAAI,CAAC,CAAC,CAAE;IACtCE,cAAc,EAAC,QAAQ;IACvBC,UAAU,EAAC;EAAQ,GACfb,IAAI,GAEPD,QACK,CAAC;AAEb,CAAC;AAAAe,OAAA,CAAAhB,WAAA,GAAAA,WAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_stack","_theme","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","StyledCycle","children","pressable","pressableProps","cycleProps","createElement","Pressable","YStack","height","width","borderRadius","borderWidth","borderColor","theme","colors","gray","backgroundColor","justifyContent","alignItems","exports"],"sources":["index.jsx"],"sourcesContent":["import React from \"react\";\r\nimport { Pressable } from \"react-native\";\r\nimport { YStack } from \"../stack\";\r\nimport { theme } from \"../theme\";\r\n\r\nconst StyledCycle = ({\r\n\tchildren,\r\n\tpressable = false,\r\n\tpressableProps = {},\r\n\t...cycleProps\r\n}) => {\r\n\tif (pressable) {\r\n\t\treturn (\r\n\t\t\t<Pressable {...pressableProps}>\r\n\t\t\t\t<YStack\r\n\t\t\t\t\theight={48}\r\n\t\t\t\t\twidth={48}\r\n\t\t\t\t\tborderRadius={50}\r\n\t\t\t\t\tborderWidth={1}\r\n\t\t\t\t\tborderColor={theme.colors.gray[1]}\r\n\t\t\t\t\tbackgroundColor={theme.colors.gray[1]}\r\n\t\t\t\t\tjustifyContent=\"center\"\r\n\t\t\t\t\talignItems=\"center\"\r\n {...cycleProps}\r\n\t\t\t\t>\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</YStack>\r\n\t\t\t</Pressable>\r\n\t\t);\r\n\t}\r\n\r\n return (\r\n <YStack\r\n height={48}\r\n width={48}\r\n borderRadius={50}\r\n borderWidth={1}\r\n borderColor={theme.colors.gray[1]}\r\n backgroundColor={theme.colors.gray[1]}\r\n justifyContent=\"center\"\r\n alignItems=\"center\"\r\n {...cycleProps}\r\n >\r\n {children}\r\n </YStack>\r\n );\r\n};\r\n\r\nexport { StyledCycle };\r\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAiC,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAEjC,MAAMO,WAAW,GAAGA,CAAC;EACpBC,QAAQ;EACRC,SAAS,GAAG,KAAK;EACjBC,cAAc,GAAG,CAAC,CAAC;EACnB,GAAGC;AACJ,CAAC,KAAK;EACL,IAAIF,SAAS,EAAE;IACd,oBACCvB,MAAA,CAAAQ,OAAA,CAAAkB,aAAA,CAACvB,YAAA,CAAAwB,SAAS,EAAKH,cAAc,eAC5BxB,MAAA,CAAAQ,OAAA,CAAAkB,aAAA,CAACtB,MAAA,CAAAwB,MAAM,EAAAnB,QAAA;MACNoB,MAAM,EAAE,EAAG;MACXC,KAAK,EAAE,EAAG;MACVC,YAAY,EAAE,EAAG;MACjBC,WAAW,EAAE,CAAE;MACfC,WAAW,EAAEC,YAAK,CAACC,MAAM,CAACC,IAAI,CAAC,CAAC,CAAE;MAClCC,eAAe,EAAEH,YAAK,CAACC,MAAM,CAACC,IAAI,CAAC,CAAC,CAAE;MACtCE,cAAc,EAAC,QAAQ;MACvBC,UAAU,EAAC;IAAQ,GACVd,UAAU,GAElBH,QACM,CACE,CAAC;EAEd;EAEC,oBACEtB,MAAA,CAAAQ,OAAA,CAAAkB,aAAA,CAACtB,MAAA,CAAAwB,MAAM,EAAAnB,QAAA;IACLoB,MAAM,EAAE,EAAG;IACXC,KAAK,EAAE,EAAG;IACVC,YAAY,EAAE,EAAG;IACjBC,WAAW,EAAE,CAAE;IACfC,WAAW,EAAEC,YAAK,CAACC,MAAM,CAACC,IAAI,CAAC,CAAC,CAAE;IAClCC,eAAe,EAAEH,YAAK,CAACC,MAAM,CAACC,IAAI,CAAC,CAAC,CAAE;IACtCE,cAAc,EAAC,QAAQ;IACvBC,UAAU,EAAC;EAAQ,GACfd,UAAU,GAEbH,QACK,CAAC;AAEb,CAAC;AAACkB,OAAA,CAAAnB,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1,11 +1,26 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React from 'react';
3
- import { YStack } from '../stack';
4
- import { theme } from '../theme';
2
+ import React from "react";
3
+ import { Pressable } from "react-native";
4
+ import { YStack } from "../stack";
5
+ import { theme } from "../theme";
5
6
  const StyledCycle = ({
6
7
  children,
7
- ...rest
8
+ pressable = false,
9
+ pressableProps = {},
10
+ ...cycleProps
8
11
  }) => {
12
+ if (pressable) {
13
+ return /*#__PURE__*/React.createElement(Pressable, pressableProps, /*#__PURE__*/React.createElement(YStack, _extends({
14
+ height: 48,
15
+ width: 48,
16
+ borderRadius: 50,
17
+ borderWidth: 1,
18
+ borderColor: theme.colors.gray[1],
19
+ backgroundColor: theme.colors.gray[1],
20
+ justifyContent: "center",
21
+ alignItems: "center"
22
+ }, cycleProps), children));
23
+ }
9
24
  return /*#__PURE__*/React.createElement(YStack, _extends({
10
25
  height: 48,
11
26
  width: 48,
@@ -15,7 +30,7 @@ const StyledCycle = ({
15
30
  backgroundColor: theme.colors.gray[1],
16
31
  justifyContent: "center",
17
32
  alignItems: "center"
18
- }, rest), children);
33
+ }, cycleProps), children);
19
34
  };
20
35
  export { StyledCycle };
21
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","YStack","theme","StyledCycle","children","rest","createElement","_extends","height","width","borderRadius","borderWidth","borderColor","colors","gray","backgroundColor","justifyContent","alignItems"],"sources":["index.jsx"],"sourcesContent":["import React from 'react'\r\nimport { YStack } from '../stack'\r\nimport { theme } from '../theme'\r\n\r\nconst StyledCycle = ({ children, ...rest }) => {\r\n return (\r\n <YStack\r\n height={48}\r\n width={48}\r\n borderRadius={50}\r\n borderWidth={1}\r\n borderColor={theme.colors.gray[1]}\r\n backgroundColor={theme.colors.gray[1]}\r\n justifyContent='center'\r\n alignItems='center'\r\n {...rest}\r\n\t\t>\r\n {children}\r\n </YStack>\r\n )\r\n}\r\n\r\nexport { StyledCycle }\r\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,KAAK,QAAQ,UAAU;AAEhC,MAAMC,WAAW,GAAGA,CAAC;EAAEC,QAAQ;EAAE,GAAGC;AAAK,CAAC,KAAK;EAC7C,oBACEL,KAAA,CAAAM,aAAA,CAACL,MAAM,EAAAM,QAAA;IACLC,MAAM,EAAE,EAAG;IACXC,KAAK,EAAE,EAAG;IACVC,YAAY,EAAE,EAAG;IACjBC,WAAW,EAAE,CAAE;IACfC,WAAW,EAAEV,KAAK,CAACW,MAAM,CAACC,IAAI,CAAC,CAAC,CAAE;IAClCC,eAAe,EAAEb,KAAK,CAACW,MAAM,CAACC,IAAI,CAAC,CAAC,CAAE;IACtCE,cAAc,EAAC,QAAQ;IACvBC,UAAU,EAAC;EAAQ,GACfZ,IAAI,GAEPD,QACK,CAAC;AAEb,CAAC;AAED,SAASD,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["React","Pressable","YStack","theme","StyledCycle","children","pressable","pressableProps","cycleProps","createElement","_extends","height","width","borderRadius","borderWidth","borderColor","colors","gray","backgroundColor","justifyContent","alignItems"],"sources":["index.jsx"],"sourcesContent":["import React from \"react\";\r\nimport { Pressable } from \"react-native\";\r\nimport { YStack } from \"../stack\";\r\nimport { theme } from \"../theme\";\r\n\r\nconst StyledCycle = ({\r\n\tchildren,\r\n\tpressable = false,\r\n\tpressableProps = {},\r\n\t...cycleProps\r\n}) => {\r\n\tif (pressable) {\r\n\t\treturn (\r\n\t\t\t<Pressable {...pressableProps}>\r\n\t\t\t\t<YStack\r\n\t\t\t\t\theight={48}\r\n\t\t\t\t\twidth={48}\r\n\t\t\t\t\tborderRadius={50}\r\n\t\t\t\t\tborderWidth={1}\r\n\t\t\t\t\tborderColor={theme.colors.gray[1]}\r\n\t\t\t\t\tbackgroundColor={theme.colors.gray[1]}\r\n\t\t\t\t\tjustifyContent=\"center\"\r\n\t\t\t\t\talignItems=\"center\"\r\n {...cycleProps}\r\n\t\t\t\t>\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</YStack>\r\n\t\t\t</Pressable>\r\n\t\t);\r\n\t}\r\n\r\n return (\r\n <YStack\r\n height={48}\r\n width={48}\r\n borderRadius={50}\r\n borderWidth={1}\r\n borderColor={theme.colors.gray[1]}\r\n backgroundColor={theme.colors.gray[1]}\r\n justifyContent=\"center\"\r\n alignItems=\"center\"\r\n {...cycleProps}\r\n >\r\n {children}\r\n </YStack>\r\n );\r\n};\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ent-styles",
3
- "version": "1.50.0",
3
+ "version": "1.52.0",
4
4
  "description": "Develop different styled versions of UI components.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -1,8 +1,34 @@
1
- import React from 'react'
2
- import { YStack } from '../stack'
3
- import { theme } from '../theme'
1
+ import React from "react";
2
+ import { Pressable } from "react-native";
3
+ import { YStack } from "../stack";
4
+ import { theme } from "../theme";
5
+
6
+ const StyledCycle = ({
7
+ children,
8
+ pressable = false,
9
+ pressableProps = {},
10
+ ...cycleProps
11
+ }) => {
12
+ if (pressable) {
13
+ return (
14
+ <Pressable {...pressableProps}>
15
+ <YStack
16
+ height={48}
17
+ width={48}
18
+ borderRadius={50}
19
+ borderWidth={1}
20
+ borderColor={theme.colors.gray[1]}
21
+ backgroundColor={theme.colors.gray[1]}
22
+ justifyContent="center"
23
+ alignItems="center"
24
+ {...cycleProps}
25
+ >
26
+ {children}
27
+ </YStack>
28
+ </Pressable>
29
+ );
30
+ }
4
31
 
5
- const StyledCycle = ({ children, ...rest }) => {
6
32
  return (
7
33
  <YStack
8
34
  height={48}
@@ -11,13 +37,13 @@ const StyledCycle = ({ children, ...rest }) => {
11
37
  borderWidth={1}
12
38
  borderColor={theme.colors.gray[1]}
13
39
  backgroundColor={theme.colors.gray[1]}
14
- justifyContent='center'
15
- alignItems='center'
16
- {...rest}
17
- >
40
+ justifyContent="center"
41
+ alignItems="center"
42
+ {...cycleProps}
43
+ >
18
44
  {children}
19
45
  </YStack>
20
- )
21
- }
46
+ );
47
+ };
22
48
 
23
- export { StyledCycle }
49
+ export { StyledCycle };