@tecsinapse/react-native-kit 1.23.6 → 1.23.8
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/dist/cjs/components/atoms/Tag/Tag.d.ts +2 -2
- package/dist/cjs/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/cjs/components/molecules/LabeledSwitch/LabeledSwitch.js +6 -6
- package/dist/cjs/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
- package/dist/esm/components/atoms/Tag/Tag.d.ts +2 -2
- package/dist/esm/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +6 -6
- package/dist/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { TagProps as TagCoreProps } from '@tecsinapse/react-core';
|
|
3
3
|
export interface TagProps extends Omit<TagCoreProps, 'value'> {
|
|
4
|
-
value: string;
|
|
4
|
+
value: string | ReactNode;
|
|
5
5
|
}
|
|
6
6
|
declare const Tag: React.FC<TagProps>;
|
|
7
7
|
export default Tag;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sources":["../../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Tag as TagCore,\n TagProps as TagCoreProps,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\n\nexport interface TagProps extends Omit<TagCoreProps, 'value'> {\n value: string;\n}\n\nconst Tag: React.FC<TagProps> = ({ value, ...rest }): JSX.Element => {\n return (\n <TagCore\n value={\n <Text\n colorVariant=\"secondary\"\n colorTone=\"dark\"\n fontStack=\"default\"\n fontWeight=\"bold\"\n typography={rest.variant === 'small' ? 'sub' : 'base'}\n >\n {value}\n </Text>\n }\n {...rest}\n />\n );\n};\n\nexport default Tag;\n"],"names":["React","TagCore"],"mappings":";;;;;;;;;;AAWA,MAAM,GAA0B,GAAA,CAAC,EAAE,KAAA,EAAA,GAAU,MAAwB,KAAA;AACnE,EAAA,uBACGA,yBAAA,CAAA,aAAA,CAAAC,aAAA,EAAA;AAAA,IACC,uBACGD,yBAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MACC,YAAa,EAAA,WAAA;AAAA,MACb,SAAU,EAAA,MAAA;AAAA,MACV,SAAU,EAAA,SAAA;AAAA,MACV,UAAW,EAAA,MAAA;AAAA,MACX,UAAY,EAAA,IAAA,CAAK,OAAY,KAAA,OAAA,GAAU,KAAQ,GAAA,MAAA;AAAA,KAAA,EAE9C,KACH,CAAA;AAAA,IAED,GAAG,IAAA;AAAA,GACN,CAAA,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport {\n Tag as TagCore,\n TagProps as TagCoreProps,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\n\nexport interface TagProps extends Omit<TagCoreProps, 'value'> {\n value: string | ReactNode;\n}\n\nconst Tag: React.FC<TagProps> = ({ value, ...rest }): JSX.Element => {\n return (\n <TagCore\n value={\n <Text\n colorVariant=\"secondary\"\n colorTone=\"dark\"\n fontStack=\"default\"\n fontWeight=\"bold\"\n typography={rest.variant === 'small' ? 'sub' : 'base'}\n >\n {value}\n </Text>\n }\n {...rest}\n />\n );\n};\n\nexport default Tag;\n"],"names":["React","TagCore"],"mappings":";;;;;;;;;;AAWA,MAAM,GAA0B,GAAA,CAAC,EAAE,KAAA,EAAA,GAAU,MAAwB,KAAA;AACnE,EAAA,uBACGA,yBAAA,CAAA,aAAA,CAAAC,aAAA,EAAA;AAAA,IACC,uBACGD,yBAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MACC,YAAa,EAAA,WAAA;AAAA,MACb,SAAU,EAAA,MAAA;AAAA,MACV,SAAU,EAAA,SAAA;AAAA,MACV,UAAW,EAAA,MAAA;AAAA,MACX,UAAY,EAAA,IAAA,CAAK,OAAY,KAAA,OAAA,GAAU,KAAQ,GAAA,MAAA;AAAA,KAAA,EAE9C,KACH,CAAA;AAAA,IAED,GAAG,IAAA;AAAA,GACN,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -10,8 +10,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
11
|
|
|
12
12
|
const LabeledSwitch = ({
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
rightLabel,
|
|
14
|
+
leftLabel,
|
|
15
15
|
labelProps,
|
|
16
16
|
pressableLabel = false,
|
|
17
17
|
active,
|
|
@@ -19,9 +19,9 @@ const LabeledSwitch = ({
|
|
|
19
19
|
onChange,
|
|
20
20
|
...rest
|
|
21
21
|
}) => {
|
|
22
|
-
return /* @__PURE__ */ React__default["default"].createElement(styled.StyledView, null,
|
|
22
|
+
return /* @__PURE__ */ React__default["default"].createElement(styled.StyledView, null, leftLabel ? /* @__PURE__ */ React__default["default"].createElement(LabelComponent, {
|
|
23
23
|
active,
|
|
24
|
-
label,
|
|
24
|
+
label: leftLabel,
|
|
25
25
|
labelPosition: "left",
|
|
26
26
|
labelProps,
|
|
27
27
|
disabled: !pressableLabel || disabled,
|
|
@@ -32,9 +32,9 @@ const LabeledSwitch = ({
|
|
|
32
32
|
onChange,
|
|
33
33
|
disabled,
|
|
34
34
|
...rest
|
|
35
|
-
}),
|
|
35
|
+
}), rightLabel ? /* @__PURE__ */ React__default["default"].createElement(LabelComponent, {
|
|
36
36
|
active,
|
|
37
|
-
label,
|
|
37
|
+
label: rightLabel,
|
|
38
38
|
labelPosition: "right",
|
|
39
39
|
labelProps,
|
|
40
40
|
disabled: !pressableLabel || disabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledSwitch.js","sources":["../../../../../src/components/molecules/LabeledSwitch/LabeledSwitch.tsx"],"sourcesContent":["import { LabeledSwitchProps, Switch } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { TextNativeProps } from '../../atoms/Text';\nimport LabelComponent from './LabelComponent';\nimport { StyledView } from './styled';\n\nexport type LabeledSwitchNativeProps = LabeledSwitchProps & {\n labelProps?: TextNativeProps;\n};\n\nconst LabeledSwitch: FC<LabeledSwitchNativeProps> = ({\n
|
|
1
|
+
{"version":3,"file":"LabeledSwitch.js","sources":["../../../../../src/components/molecules/LabeledSwitch/LabeledSwitch.tsx"],"sourcesContent":["import { LabeledSwitchProps, Switch } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { TextNativeProps } from '../../atoms/Text';\nimport LabelComponent from './LabelComponent';\nimport { StyledView } from './styled';\n\nexport type LabeledSwitchNativeProps = LabeledSwitchProps & {\n labelProps?: TextNativeProps;\n};\n\nconst LabeledSwitch: FC<LabeledSwitchNativeProps> = ({\n rightLabel,\n leftLabel,\n labelProps,\n pressableLabel = false,\n active,\n disabled,\n onChange,\n ...rest\n}) => {\n return (\n <StyledView>\n {leftLabel ? (\n <LabelComponent\n active={active}\n label={leftLabel}\n labelPosition={'left'}\n labelProps={labelProps}\n disabled={!pressableLabel || disabled}\n switchDisabled={disabled}\n onPress={() => onChange(!active)}\n />\n ) : (\n <></>\n )}\n <Switch\n active={active}\n onChange={onChange}\n disabled={disabled}\n {...rest}\n />\n {rightLabel ? (\n <LabelComponent\n active={active}\n label={rightLabel}\n labelPosition={'right'}\n labelProps={labelProps}\n disabled={!pressableLabel || disabled}\n switchDisabled={disabled}\n onPress={() => onChange(!active)}\n />\n ) : (\n <></>\n )}\n </StyledView>\n );\n};\n\nexport default LabeledSwitch;\n"],"names":["React","StyledView","Switch"],"mappings":";;;;;;;;;;;AAUA,MAAM,gBAA8C,CAAC;AAAA,EACnD,UAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,cAAiB,GAAA,KAAA;AAAA,EACjB,MAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EACE,uBAAAA,yBAAA,CAAA,aAAA,CAACC,iBACE,EAAA,IAAA,EAAA,SAAA,mBACED,yBAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IACC,MAAA;AAAA,IACA,KAAO,EAAA,SAAA;AAAA,IACP,aAAe,EAAA,MAAA;AAAA,IACf,UAAA;AAAA,IACA,QAAA,EAAU,CAAC,cAAkB,IAAA,QAAA;AAAA,IAC7B,cAAgB,EAAA,QAAA;AAAA,IAChB,OAAS,EAAA,MAAM,QAAS,CAAA,CAAC,MAAM,CAAA;AAAA,GACjC,CAAA,mBAEEA,yBAAA,CAAA,aAAA,CAAAA,yBAAA,CAAA,QAAA,EAAA,IAAA,CAAA,kBAEHA,yBAAA,CAAA,aAAA,CAAAE,gBAAA,EAAA;AAAA,IACC,MAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACC,GAAG,IAAA;AAAA,GACN,CAAA,EACC,6BACEF,yBAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IACC,MAAA;AAAA,IACA,KAAO,EAAA,UAAA;AAAA,IACP,aAAe,EAAA,OAAA;AAAA,IACf,UAAA;AAAA,IACA,QAAA,EAAU,CAAC,cAAkB,IAAA,QAAA;AAAA,IAC7B,cAAgB,EAAA,QAAA;AAAA,IAChB,OAAS,EAAA,MAAM,QAAS,CAAA,CAAC,MAAM,CAAA;AAAA,GACjC,CAAA,mGAEE,CAEN,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { TagProps as TagCoreProps } from '@tecsinapse/react-core';
|
|
3
3
|
export interface TagProps extends Omit<TagCoreProps, 'value'> {
|
|
4
|
-
value: string;
|
|
4
|
+
value: string | ReactNode;
|
|
5
5
|
}
|
|
6
6
|
declare const Tag: React.FC<TagProps>;
|
|
7
7
|
export default Tag;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sources":["../../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Tag as TagCore,\n TagProps as TagCoreProps,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\n\nexport interface TagProps extends Omit<TagCoreProps, 'value'> {\n value: string;\n}\n\nconst Tag: React.FC<TagProps> = ({ value, ...rest }): JSX.Element => {\n return (\n <TagCore\n value={\n <Text\n colorVariant=\"secondary\"\n colorTone=\"dark\"\n fontStack=\"default\"\n fontWeight=\"bold\"\n typography={rest.variant === 'small' ? 'sub' : 'base'}\n >\n {value}\n </Text>\n }\n {...rest}\n />\n );\n};\n\nexport default Tag;\n"],"names":["React","TagCore"],"mappings":";;;;AAWA,MAAM,GAA0B,GAAA,CAAC,EAAE,KAAA,EAAA,GAAU,MAAwB,KAAA;AACnE,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,KAAA,EAAA;AAAA,IACC,uBACGD,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MACC,YAAa,EAAA,WAAA;AAAA,MACb,SAAU,EAAA,MAAA;AAAA,MACV,SAAU,EAAA,SAAA;AAAA,MACV,UAAW,EAAA,MAAA;AAAA,MACX,UAAY,EAAA,IAAA,CAAK,OAAY,KAAA,OAAA,GAAU,KAAQ,GAAA,MAAA;AAAA,KAAA,EAE9C,KACH,CAAA;AAAA,IAED,GAAG,IAAA;AAAA,GACN,CAAA,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport {\n Tag as TagCore,\n TagProps as TagCoreProps,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\n\nexport interface TagProps extends Omit<TagCoreProps, 'value'> {\n value: string | ReactNode;\n}\n\nconst Tag: React.FC<TagProps> = ({ value, ...rest }): JSX.Element => {\n return (\n <TagCore\n value={\n <Text\n colorVariant=\"secondary\"\n colorTone=\"dark\"\n fontStack=\"default\"\n fontWeight=\"bold\"\n typography={rest.variant === 'small' ? 'sub' : 'base'}\n >\n {value}\n </Text>\n }\n {...rest}\n />\n );\n};\n\nexport default Tag;\n"],"names":["React","TagCore"],"mappings":";;;;AAWA,MAAM,GAA0B,GAAA,CAAC,EAAE,KAAA,EAAA,GAAU,MAAwB,KAAA;AACnE,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,KAAA,EAAA;AAAA,IACC,uBACGD,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MACC,YAAa,EAAA,WAAA;AAAA,MACb,SAAU,EAAA,MAAA;AAAA,MACV,SAAU,EAAA,SAAA;AAAA,MACV,UAAW,EAAA,MAAA;AAAA,MACX,UAAY,EAAA,IAAA,CAAK,OAAY,KAAA,OAAA,GAAU,KAAQ,GAAA,MAAA;AAAA,KAAA,EAE9C,KACH,CAAA;AAAA,IAED,GAAG,IAAA;AAAA,GACN,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -4,8 +4,8 @@ import LabelComponent from './LabelComponent.js';
|
|
|
4
4
|
import { StyledView } from './styled.js';
|
|
5
5
|
|
|
6
6
|
const LabeledSwitch = ({
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
rightLabel,
|
|
8
|
+
leftLabel,
|
|
9
9
|
labelProps,
|
|
10
10
|
pressableLabel = false,
|
|
11
11
|
active,
|
|
@@ -13,9 +13,9 @@ const LabeledSwitch = ({
|
|
|
13
13
|
onChange,
|
|
14
14
|
...rest
|
|
15
15
|
}) => {
|
|
16
|
-
return /* @__PURE__ */ React__default.createElement(StyledView, null,
|
|
16
|
+
return /* @__PURE__ */ React__default.createElement(StyledView, null, leftLabel ? /* @__PURE__ */ React__default.createElement(LabelComponent, {
|
|
17
17
|
active,
|
|
18
|
-
label,
|
|
18
|
+
label: leftLabel,
|
|
19
19
|
labelPosition: "left",
|
|
20
20
|
labelProps,
|
|
21
21
|
disabled: !pressableLabel || disabled,
|
|
@@ -26,9 +26,9 @@ const LabeledSwitch = ({
|
|
|
26
26
|
onChange,
|
|
27
27
|
disabled,
|
|
28
28
|
...rest
|
|
29
|
-
}),
|
|
29
|
+
}), rightLabel ? /* @__PURE__ */ React__default.createElement(LabelComponent, {
|
|
30
30
|
active,
|
|
31
|
-
label,
|
|
31
|
+
label: rightLabel,
|
|
32
32
|
labelPosition: "right",
|
|
33
33
|
labelProps,
|
|
34
34
|
disabled: !pressableLabel || disabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledSwitch.js","sources":["../../../../../src/components/molecules/LabeledSwitch/LabeledSwitch.tsx"],"sourcesContent":["import { LabeledSwitchProps, Switch } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { TextNativeProps } from '../../atoms/Text';\nimport LabelComponent from './LabelComponent';\nimport { StyledView } from './styled';\n\nexport type LabeledSwitchNativeProps = LabeledSwitchProps & {\n labelProps?: TextNativeProps;\n};\n\nconst LabeledSwitch: FC<LabeledSwitchNativeProps> = ({\n
|
|
1
|
+
{"version":3,"file":"LabeledSwitch.js","sources":["../../../../../src/components/molecules/LabeledSwitch/LabeledSwitch.tsx"],"sourcesContent":["import { LabeledSwitchProps, Switch } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { TextNativeProps } from '../../atoms/Text';\nimport LabelComponent from './LabelComponent';\nimport { StyledView } from './styled';\n\nexport type LabeledSwitchNativeProps = LabeledSwitchProps & {\n labelProps?: TextNativeProps;\n};\n\nconst LabeledSwitch: FC<LabeledSwitchNativeProps> = ({\n rightLabel,\n leftLabel,\n labelProps,\n pressableLabel = false,\n active,\n disabled,\n onChange,\n ...rest\n}) => {\n return (\n <StyledView>\n {leftLabel ? (\n <LabelComponent\n active={active}\n label={leftLabel}\n labelPosition={'left'}\n labelProps={labelProps}\n disabled={!pressableLabel || disabled}\n switchDisabled={disabled}\n onPress={() => onChange(!active)}\n />\n ) : (\n <></>\n )}\n <Switch\n active={active}\n onChange={onChange}\n disabled={disabled}\n {...rest}\n />\n {rightLabel ? (\n <LabelComponent\n active={active}\n label={rightLabel}\n labelPosition={'right'}\n labelProps={labelProps}\n disabled={!pressableLabel || disabled}\n switchDisabled={disabled}\n onPress={() => onChange(!active)}\n />\n ) : (\n <></>\n )}\n </StyledView>\n );\n};\n\nexport default LabeledSwitch;\n"],"names":["React"],"mappings":";;;;;AAUA,MAAM,gBAA8C,CAAC;AAAA,EACnD,UAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,cAAiB,GAAA,KAAA;AAAA,EACjB,MAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,UACE,EAAA,IAAA,EAAA,SAAA,mBACEA,cAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IACC,MAAA;AAAA,IACA,KAAO,EAAA,SAAA;AAAA,IACP,aAAe,EAAA,MAAA;AAAA,IACf,UAAA;AAAA,IACA,QAAA,EAAU,CAAC,cAAkB,IAAA,QAAA;AAAA,IAC7B,cAAgB,EAAA,QAAA;AAAA,IAChB,OAAS,EAAA,MAAM,QAAS,CAAA,CAAC,MAAM,CAAA;AAAA,GACjC,CAAA,mBAEEA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA,CAAA,kBAEHA,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,IACC,MAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACC,GAAG,IAAA;AAAA,GACN,CAAA,EACC,6BACEA,cAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IACC,MAAA;AAAA,IACA,KAAO,EAAA,UAAA;AAAA,IACP,aAAe,EAAA,OAAA;AAAA,IACf,UAAA;AAAA,IACA,QAAA,EAAU,CAAC,cAAkB,IAAA,QAAA;AAAA,IAC7B,cAAgB,EAAA,QAAA;AAAA,IAChB,OAAS,EAAA,MAAM,QAAS,CAAA,CAAC,MAAM,CAAA;AAAA,GACjC,CAAA,6EAEE,CAEN,CAAA,CAAA;AAEJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/react-native-kit",
|
|
3
3
|
"description": "TecSinapse React Native components",
|
|
4
|
-
"version": "1.23.
|
|
4
|
+
"version": "1.23.8",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/esm/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@emotion/native": "~11.10.0",
|
|
24
24
|
"@emotion/react": "~11.10.0",
|
|
25
|
-
"@tecsinapse/react-core": "1.22.
|
|
25
|
+
"@tecsinapse/react-core": "1.22.7",
|
|
26
26
|
"react-native-linear-gradient": "~2.5.6"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/uuid": "^8.3.3"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "e1df77c53be6d96608ebb01b2e55de4f08e20b6a"
|
|
49
49
|
}
|