@tecsinapse/react-native-kit 1.20.0 → 1.21.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.
- package/CHANGELOG.md +8 -0
- package/dist/components/atoms/Avatar/Avatar.js +3 -1
- package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/components/atoms/Avatar/index.js +9 -4
- package/dist/components/atoms/Avatar/index.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.js +10 -7
- package/dist/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/components/atoms/Badge/index.js +15 -5
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/BottomNavigator.js +12 -9
- package/dist/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/Item.js +10 -7
- package/dist/components/atoms/BottomNavigator/Item.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/index.js +21 -7
- package/dist/components/atoms/BottomNavigator/index.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/styled.js +63 -44
- package/dist/components/atoms/BottomNavigator/styled.js.map +1 -1
- package/dist/components/atoms/Button/Button.js +10 -7
- package/dist/components/atoms/Button/Button.js.map +1 -1
- package/dist/components/atoms/Button/States/Error.js +3 -1
- package/dist/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/components/atoms/Button/States/Loading.js +3 -1
- package/dist/components/atoms/Button/States/Loading.js.map +1 -1
- package/dist/components/atoms/Button/States/Success.js +3 -1
- package/dist/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/components/atoms/Button/States/index.js +21 -8
- package/dist/components/atoms/Button/States/index.js.map +1 -1
- package/dist/components/atoms/Button/index.js +33 -9
- package/dist/components/atoms/Button/index.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.js +3 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/components/atoms/GroupButton/index.js +9 -4
- package/dist/components/atoms/GroupButton/index.js.map +1 -1
- package/dist/components/atoms/Header/Header.js +18 -15
- package/dist/components/atoms/Header/Header.js.map +1 -1
- package/dist/components/atoms/Header/index.js +15 -5
- package/dist/components/atoms/Header/index.js.map +1 -1
- package/dist/components/atoms/Header/styled.js +16 -16
- package/dist/components/atoms/Header/styled.js.map +1 -1
- package/dist/components/atoms/Input/Input.js +30 -26
- package/dist/components/atoms/Input/Input.js.map +1 -1
- package/dist/components/atoms/Input/index.js +15 -5
- package/dist/components/atoms/Input/index.js.map +1 -1
- package/dist/components/atoms/Input/styled.js +13 -8
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/InputMask/InputMask.js +31 -27
- package/dist/components/atoms/InputMask/InputMask.js.map +1 -1
- package/dist/components/atoms/InputMask/index.js +15 -5
- package/dist/components/atoms/InputMask/index.js.map +1 -1
- package/dist/components/atoms/InputMask/styled.js +14 -11
- package/dist/components/atoms/InputMask/styled.js.map +1 -1
- package/dist/components/atoms/Modal/ModalGroupManager.js +8 -5
- package/dist/components/atoms/Modal/ModalGroupManager.js.map +1 -1
- package/dist/components/atoms/Modal/ModalLifecycleHandler.js +87 -72
- package/dist/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -1
- package/dist/components/atoms/Modal/index.js +45 -8
- package/dist/components/atoms/Modal/index.js.map +1 -1
- package/dist/components/atoms/Modal/ui/BaseModalView.js +15 -12
- package/dist/components/atoms/Modal/ui/BaseModalView.js.map +1 -1
- package/dist/components/atoms/Modal/ui/styled.js +18 -20
- package/dist/components/atoms/Modal/ui/styled.js.map +1 -1
- package/dist/components/atoms/Modal/ui/types.js +3 -1
- package/dist/components/atoms/Modal/useLazyModalManager.js +4 -2
- package/dist/components/atoms/Modal/useLazyModalManager.js.map +1 -1
- package/dist/components/atoms/Modal/useModalManager.js +4 -2
- package/dist/components/atoms/Modal/useModalManager.js.map +1 -1
- package/dist/components/atoms/Modal/useModalRemoteControl.js +3 -1
- package/dist/components/atoms/Modal/useModalRemoteControl.js.map +1 -1
- package/dist/components/atoms/Skeleton/Pulse.js +16 -11
- package/dist/components/atoms/Skeleton/Pulse.js.map +1 -1
- package/dist/components/atoms/Skeleton/Skeleton.js +13 -10
- package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/atoms/Skeleton/Wave.js +17 -12
- package/dist/components/atoms/Skeleton/Wave.js.map +1 -1
- package/dist/components/atoms/Skeleton/animation.js +3 -1
- package/dist/components/atoms/Skeleton/animation.js.map +1 -1
- package/dist/components/atoms/Skeleton/index.js +15 -5
- package/dist/components/atoms/Skeleton/index.js.map +1 -1
- package/dist/components/atoms/Skeleton/styled.js +25 -15
- package/dist/components/atoms/Skeleton/styled.js.map +1 -1
- package/dist/components/atoms/Skeleton/types.js +3 -1
- package/dist/components/atoms/SnappingSlider/SnappingSlider.js +11 -8
- package/dist/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -1
- package/dist/components/atoms/SnappingSlider/index.js +15 -5
- package/dist/components/atoms/SnappingSlider/index.js.map +1 -1
- package/dist/components/atoms/Tag/Tag.js +8 -5
- package/dist/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/components/atoms/Tag/index.js +15 -5
- package/dist/components/atoms/Tag/index.js.map +1 -1
- package/dist/components/atoms/Text/Text.js +8 -5
- package/dist/components/atoms/Text/Text.js.map +1 -1
- package/dist/components/atoms/Text/index.js +15 -5
- package/dist/components/atoms/Text/index.js.map +1 -1
- package/dist/components/atoms/Text/styled.js +16 -12
- package/dist/components/atoms/Text/styled.js.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.js +30 -27
- package/dist/components/atoms/TextArea/TextArea.js.map +1 -1
- package/dist/components/atoms/TextArea/index.js +15 -5
- package/dist/components/atoms/TextArea/index.js.map +1 -1
- package/dist/components/atoms/TextArea/styled.js +3 -1
- package/dist/components/atoms/TextArea/styled.js.map +1 -1
- package/dist/components/molecules/Calendar/Calendar.js +9 -6
- package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/components/molecules/Calendar/index.js +9 -4
- package/dist/components/molecules/Calendar/index.js.map +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js +16 -12
- package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/molecules/DatePicker/index.js +15 -5
- package/dist/components/molecules/DatePicker/index.js.map +1 -1
- package/dist/components/molecules/DatePicker/styled.js +13 -6
- package/dist/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js +14 -10
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/index.js +15 -5
- package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +9 -6
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/index.js +9 -4
- package/dist/components/molecules/DateTimeSelector/index.js.map +1 -1
- package/dist/components/molecules/Grid/Grid.js +19 -13
- package/dist/components/molecules/Grid/Grid.js.map +1 -1
- package/dist/components/molecules/Grid/Item/Item.js +28 -25
- package/dist/components/molecules/Grid/Item/Item.js.map +1 -1
- package/dist/components/molecules/Grid/Item/index.js +15 -5
- package/dist/components/molecules/Grid/Item/index.js.map +1 -1
- package/dist/components/molecules/Grid/index.js +15 -6
- package/dist/components/molecules/Grid/index.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconTextButton.js +13 -10
- package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
- package/dist/components/molecules/IconTextButton/TextComponent.js +17 -12
- package/dist/components/molecules/IconTextButton/TextComponent.js.map +1 -1
- package/dist/components/molecules/IconTextButton/index.js +15 -5
- package/dist/components/molecules/IconTextButton/index.js.map +1 -1
- package/dist/components/molecules/IconTextButton/styled.js +31 -29
- package/dist/components/molecules/IconTextButton/styled.js.map +1 -1
- package/dist/components/molecules/InputPassword/InputPassword.js +8 -5
- package/dist/components/molecules/InputPassword/InputPassword.js.map +1 -1
- package/dist/components/molecules/InputPassword/index.js +15 -5
- package/dist/components/molecules/InputPassword/index.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabelComponent.js +16 -11
- package/dist/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +14 -11
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/index.js +15 -5
- package/dist/components/molecules/LabeledSwitch/index.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/styled.js +15 -18
- package/dist/components/molecules/LabeledSwitch/styled.js.map +1 -1
- package/dist/components/molecules/Select/Modal.js +43 -36
- package/dist/components/molecules/Select/Modal.js.map +1 -1
- package/dist/components/molecules/Select/Select.js +36 -33
- package/dist/components/molecules/Select/Select.js.map +1 -1
- package/dist/components/molecules/Select/index.js +15 -5
- package/dist/components/molecules/Select/index.js.map +1 -1
- package/dist/components/molecules/Select/styled.js +77 -84
- package/dist/components/molecules/Select/styled.js.map +1 -1
- package/dist/components/molecules/Snackbar/Snackbar.js +12 -9
- package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/molecules/Snackbar/index.js +15 -5
- package/dist/components/molecules/Snackbar/index.js.map +1 -1
- package/dist/components/molecules/Snackbar/styled.js +18 -9
- package/dist/components/molecules/Snackbar/styled.js.map +1 -1
- package/dist/index.js +321 -79
- package/dist/index.js.map +1 -1
- package/dist/utils/date.js +3 -1
- package/dist/utils/date.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -13,26 +15,27 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
13
15
|
|
|
14
16
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
17
|
|
|
16
|
-
const GridItem =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
const GridItem = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
children,
|
|
21
|
+
span,
|
|
22
|
+
columns = 12,
|
|
23
|
+
loadingComponent,
|
|
24
|
+
loading = false,
|
|
25
|
+
spacing: _spacing,
|
|
26
|
+
wrapper = false,
|
|
27
|
+
alignContent,
|
|
28
|
+
alignItems,
|
|
29
|
+
alignSelf,
|
|
30
|
+
flex,
|
|
31
|
+
flexDirection,
|
|
32
|
+
flexGrow,
|
|
33
|
+
flexShrink,
|
|
34
|
+
justifyContent,
|
|
35
|
+
flexBasis,
|
|
36
|
+
style,
|
|
37
|
+
...rest
|
|
38
|
+
} = _ref;
|
|
36
39
|
const {
|
|
37
40
|
spacing
|
|
38
41
|
} = (0, _reactCore.useTheme)();
|
|
@@ -55,16 +58,16 @@ const GridItem = ({
|
|
|
55
58
|
flexShrink,
|
|
56
59
|
justifyContent,
|
|
57
60
|
boxSizing: 'border-box',
|
|
58
|
-
flexBasis: flexBasis
|
|
61
|
+
flexBasis: flexBasis !== null && flexBasis !== void 0 ? flexBasis : "".concat((0, _reactCore.getGridItemColumSpan)(columns, span), "%"),
|
|
59
62
|
paddingTop: (0, _reactCore.getGridItemPadding)('top', _spacing, spacing),
|
|
60
63
|
paddingBottom: (0, _reactCore.getGridItemPadding)('bottom', _spacing, spacing),
|
|
61
64
|
paddingRight: (0, _reactCore.getGridItemPadding)('right', _spacing, spacing),
|
|
62
65
|
paddingLeft: (0, _reactCore.getGridItemPadding)('left', _spacing, spacing)
|
|
63
66
|
};
|
|
64
67
|
|
|
65
|
-
const clone = _react.default.cloneElement(children, { ...(children
|
|
66
|
-
style: wrapper ? children
|
|
67
|
-
...(children
|
|
68
|
+
const clone = _react.default.cloneElement(children, { ...(children === null || children === void 0 ? void 0 : children.props),
|
|
69
|
+
style: wrapper ? children === null || children === void 0 ? void 0 : children.props.style : { ..._style,
|
|
70
|
+
...(children === null || children === void 0 ? void 0 : children.props.style)
|
|
68
71
|
}
|
|
69
72
|
});
|
|
70
73
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.js","names":["GridItem","children","span","columns","loadingComponent","loading","spacing","_spacing","wrapper","alignContent","alignItems","alignSelf","flex","flexDirection","flexGrow","flexShrink","justifyContent","flexBasis","style","rest","useTheme","React","Children","only","Error","_style","boxSizing","getGridItemColumSpan","paddingTop","getGridItemPadding","paddingBottom","paddingRight","paddingLeft","clone","cloneElement","props"],"sources":["../../../../../src/components/molecules/Grid/Item/Item.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewProps } from 'react-native';\nimport {\n IGridItem,\n useTheme,\n getGridItemColumSpan,\n getGridItemPadding,\n} from '@tecsinapse/react-core';\n\nexport type IGridItemNative = IGridItem &\n ViewProps & {\n /** Only specify this property if the GridItem will be 'dynamic', adjusting itself to content. Use this with `wrapper` for better result. */\n flexBasis?: string | 'auto';\n };\n\nconst GridItem = ({\n children,\n span,\n columns = 12,\n loadingComponent,\n loading = false,\n spacing: _spacing,\n wrapper = false,\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n justifyContent,\n flexBasis,\n style,\n ...rest\n}: IGridItemNative): JSX.Element => {\n const { spacing } = useTheme();\n if (!React.Children.only(children)) {\n throw new Error('The number of children in GridItem should be one');\n }\n if (loadingComponent && loading) {\n return loadingComponent;\n }\n\n const _style = {\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n justifyContent,\n boxSizing: 'border-box',\n flexBasis: flexBasis ?? `${getGridItemColumSpan(columns, span)}%`,\n paddingTop: getGridItemPadding('top', _spacing, spacing),\n paddingBottom: getGridItemPadding('bottom', _spacing, spacing),\n paddingRight: getGridItemPadding('right', _spacing, spacing),\n paddingLeft: getGridItemPadding('left', _spacing, spacing),\n };\n\n const clone = React.cloneElement(children, {\n ...children?.props,\n style: wrapper\n ? children?.props.style\n : { ..._style, ...children?.props.style },\n });\n\n return wrapper ? (\n <View {...rest} style={[style, _style]}>\n {clone}\n </View>\n ) : (\n clone\n );\n};\n\nexport default GridItem;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Item.js","names":["GridItem","children","span","columns","loadingComponent","loading","spacing","_spacing","wrapper","alignContent","alignItems","alignSelf","flex","flexDirection","flexGrow","flexShrink","justifyContent","flexBasis","style","rest","useTheme","React","Children","only","Error","_style","boxSizing","getGridItemColumSpan","paddingTop","getGridItemPadding","paddingBottom","paddingRight","paddingLeft","clone","cloneElement","props"],"sources":["../../../../../src/components/molecules/Grid/Item/Item.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewProps } from 'react-native';\nimport {\n IGridItem,\n useTheme,\n getGridItemColumSpan,\n getGridItemPadding,\n} from '@tecsinapse/react-core';\n\nexport type IGridItemNative = IGridItem &\n ViewProps & {\n /** Only specify this property if the GridItem will be 'dynamic', adjusting itself to content. Use this with `wrapper` for better result. */\n flexBasis?: string | 'auto';\n };\n\nconst GridItem = ({\n children,\n span,\n columns = 12,\n loadingComponent,\n loading = false,\n spacing: _spacing,\n wrapper = false,\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n justifyContent,\n flexBasis,\n style,\n ...rest\n}: IGridItemNative): JSX.Element => {\n const { spacing } = useTheme();\n if (!React.Children.only(children)) {\n throw new Error('The number of children in GridItem should be one');\n }\n if (loadingComponent && loading) {\n return loadingComponent;\n }\n\n const _style = {\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n justifyContent,\n boxSizing: 'border-box',\n flexBasis: flexBasis ?? `${getGridItemColumSpan(columns, span)}%`,\n paddingTop: getGridItemPadding('top', _spacing, spacing),\n paddingBottom: getGridItemPadding('bottom', _spacing, spacing),\n paddingRight: getGridItemPadding('right', _spacing, spacing),\n paddingLeft: getGridItemPadding('left', _spacing, spacing),\n };\n\n const clone = React.cloneElement(children, {\n ...children?.props,\n style: wrapper\n ? children?.props.style\n : { ..._style, ...children?.props.style },\n });\n\n return wrapper ? (\n <View {...rest} style={[style, _style]}>\n {clone}\n </View>\n ) : (\n clone\n );\n};\n\nexport default GridItem;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAaA,MAAMA,QAAQ,GAAG,QAmBmB;EAAA,IAnBlB;IAChBC,QADgB;IAEhBC,IAFgB;IAGhBC,OAAO,GAAG,EAHM;IAIhBC,gBAJgB;IAKhBC,OAAO,GAAG,KALM;IAMhBC,OAAO,EAAEC,QANO;IAOhBC,OAAO,GAAG,KAPM;IAQhBC,YARgB;IAShBC,UATgB;IAUhBC,SAVgB;IAWhBC,IAXgB;IAYhBC,aAZgB;IAahBC,QAbgB;IAchBC,UAdgB;IAehBC,cAfgB;IAgBhBC,SAhBgB;IAiBhBC,KAjBgB;IAkBhB,GAAGC;EAlBa,CAmBkB;EAClC,MAAM;IAAEb;EAAF,IAAc,IAAAc,mBAAA,GAApB;;EACA,IAAI,CAACC,cAAA,CAAMC,QAAN,CAAeC,IAAf,CAAoBtB,QAApB,CAAL,EAAoC;IAClC,MAAM,IAAIuB,KAAJ,CAAU,kDAAV,CAAN;EACD;;EACD,IAAIpB,gBAAgB,IAAIC,OAAxB,EAAiC;IAC/B,OAAOD,gBAAP;EACD;;EAED,MAAMqB,MAAM,GAAG;IACbhB,YADa;IAEbC,UAFa;IAGbC,SAHa;IAIbC,IAJa;IAKbC,aALa;IAMbC,QANa;IAObC,UAPa;IAQbC,cARa;IASbU,SAAS,EAAE,YATE;IAUbT,SAAS,EAAEA,SAAF,aAAEA,SAAF,cAAEA,SAAF,aAAkB,IAAAU,+BAAA,EAAqBxB,OAArB,EAA8BD,IAA9B,CAAlB,MAVI;IAWb0B,UAAU,EAAE,IAAAC,6BAAA,EAAmB,KAAnB,EAA0BtB,QAA1B,EAAoCD,OAApC,CAXC;IAYbwB,aAAa,EAAE,IAAAD,6BAAA,EAAmB,QAAnB,EAA6BtB,QAA7B,EAAuCD,OAAvC,CAZF;IAabyB,YAAY,EAAE,IAAAF,6BAAA,EAAmB,OAAnB,EAA4BtB,QAA5B,EAAsCD,OAAtC,CAbD;IAcb0B,WAAW,EAAE,IAAAH,6BAAA,EAAmB,MAAnB,EAA2BtB,QAA3B,EAAqCD,OAArC;EAdA,CAAf;;EAiBA,MAAM2B,KAAK,GAAGZ,cAAA,CAAMa,YAAN,CAAmBjC,QAAnB,EAA6B,EACzC,IAAGA,QAAH,aAAGA,QAAH,uBAAGA,QAAQ,CAAEkC,KAAb,CADyC;IAEzCjB,KAAK,EAAEV,OAAO,GACVP,QADU,aACVA,QADU,uBACVA,QAAQ,CAAEkC,KAAV,CAAgBjB,KADN,GAEV,EAAE,GAAGO,MAAL;MAAa,IAAGxB,QAAH,aAAGA,QAAH,uBAAGA,QAAQ,CAAEkC,KAAV,CAAgBjB,KAAnB;IAAb;EAJqC,CAA7B,CAAd;;EAOA,OAAOV,OAAO,GACZ,6BAAC,iBAAD,eAAUW,IAAV;IAAgB,KAAK,EAAE,CAACD,KAAD,EAAQO,MAAR;EAAvB,IACGQ,KADH,CADY,GAKZA,KALF;AAOD,CA3DD;;eA6DejC,Q"}
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "GridItem", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Item.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "IGridItemNative", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _Item.IGridItemNative;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
5
18
|
|
|
6
19
|
var _Item = _interopRequireWildcard(require("./Item"));
|
|
7
20
|
|
|
8
|
-
exports.GridItem = _Item.default;
|
|
9
|
-
exports.IGridItemNative = _Item.IGridItemNative;
|
|
10
|
-
|
|
11
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
22
|
|
|
13
23
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/molecules/Grid/Item/index.ts"],"sourcesContent":["export { default as GridItem, IGridItemNative } from './Item';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/molecules/Grid/Item/index.ts"],"sourcesContent":["export { default as GridItem, IGridItemNative } from './Item';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Grid", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Grid.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "GridItem", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _Item.GridItem;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
5
18
|
|
|
6
19
|
var _Item = require("./Item");
|
|
7
20
|
|
|
8
|
-
exports.GridItem = _Item.GridItem;
|
|
9
|
-
|
|
10
21
|
var _Grid = _interopRequireDefault(require("./Grid"));
|
|
11
22
|
|
|
12
|
-
exports.Grid = _Grid.default;
|
|
13
|
-
|
|
14
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/Grid/index.ts"],"sourcesContent":["export { GridItem } from './Item';\nexport { default as Grid } from './Grid';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/Grid/index.ts"],"sourcesContent":["export { GridItem } from './Item';\nexport { default as Grid } from './Grid';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AACA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var _reactCore = require("@tecsinapse/react-core");
|
|
@@ -15,15 +17,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
17
|
|
|
16
18
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
19
|
|
|
18
|
-
const IconTextButton =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
const IconTextButton = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
iconProps,
|
|
23
|
+
iconPosition = 'left',
|
|
24
|
+
textProps,
|
|
25
|
+
label,
|
|
26
|
+
variant = 'filled',
|
|
27
|
+
size = 'default',
|
|
28
|
+
...rest
|
|
29
|
+
} = _ref;
|
|
27
30
|
return _react.default.createElement(_styled.StyledIconTextButton, _extends({
|
|
28
31
|
boxed: !label,
|
|
29
32
|
variant: variant
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconTextButton.js","names":["IconTextButton","iconProps","iconPosition","textProps","label","variant","size","rest","fontColorVC"],"sources":["../../../../src/components/molecules/IconTextButton/IconTextButton.tsx"],"sourcesContent":["import {\n fontColorVC,\n IconComponent,\n IconTextButtonProps,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { ButtonNativeProps } from '../../atoms/Button';\nimport { StyledIconTextButton } from './styled';\nimport TextComponent from './TextComponent';\n\nexport type NativeIconTextButtonProps = IconTextButtonProps &\n Omit<ButtonNativeProps, 'ButtonProps'>;\n\nconst IconTextButton: React.FC<NativeIconTextButtonProps> = ({\n iconProps,\n iconPosition = 'left',\n textProps,\n label,\n variant = 'filled',\n size = 'default',\n ...rest\n}) => {\n return (\n <StyledIconTextButton boxed={!label} variant={variant} {...rest}>\n {iconPosition === 'left' ? (\n <IconComponent\n iconProps={iconProps}\n size={size}\n defaultFontColor={fontColorVC[variant]}\n />\n ) : (\n <></>\n )}\n <TextComponent\n label={label}\n defaultFontColor={fontColorVC[variant]}\n hasIcon={!!iconProps}\n iconPosition={iconPosition}\n textProps={textProps}\n size={size}\n />\n {iconPosition === 'right' ? (\n <IconComponent\n iconProps={iconProps}\n size={size}\n defaultFontColor={fontColorVC[variant]}\n />\n ) : (\n <></>\n )}\n </StyledIconTextButton>\n );\n};\n\nexport default IconTextButton;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconTextButton.js","names":["IconTextButton","iconProps","iconPosition","textProps","label","variant","size","rest","fontColorVC"],"sources":["../../../../src/components/molecules/IconTextButton/IconTextButton.tsx"],"sourcesContent":["import {\n fontColorVC,\n IconComponent,\n IconTextButtonProps,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { ButtonNativeProps } from '../../atoms/Button';\nimport { StyledIconTextButton } from './styled';\nimport TextComponent from './TextComponent';\n\nexport type NativeIconTextButtonProps = IconTextButtonProps &\n Omit<ButtonNativeProps, 'ButtonProps'>;\n\nconst IconTextButton: React.FC<NativeIconTextButtonProps> = ({\n iconProps,\n iconPosition = 'left',\n textProps,\n label,\n variant = 'filled',\n size = 'default',\n ...rest\n}) => {\n return (\n <StyledIconTextButton boxed={!label} variant={variant} {...rest}>\n {iconPosition === 'left' ? (\n <IconComponent\n iconProps={iconProps}\n size={size}\n defaultFontColor={fontColorVC[variant]}\n />\n ) : (\n <></>\n )}\n <TextComponent\n label={label}\n defaultFontColor={fontColorVC[variant]}\n hasIcon={!!iconProps}\n iconPosition={iconPosition}\n textProps={textProps}\n size={size}\n />\n {iconPosition === 'right' ? (\n <IconComponent\n iconProps={iconProps}\n size={size}\n defaultFontColor={fontColorVC[variant]}\n />\n ) : (\n <></>\n )}\n </StyledIconTextButton>\n );\n};\n\nexport default IconTextButton;\n"],"mappings":";;;;;;;AAAA;;AAKA;;AAEA;;AACA;;;;;;AAKA,MAAMA,cAAmD,GAAG,QAQtD;EAAA,IARuD;IAC3DC,SAD2D;IAE3DC,YAAY,GAAG,MAF4C;IAG3DC,SAH2D;IAI3DC,KAJ2D;IAK3DC,OAAO,GAAG,QALiD;IAM3DC,IAAI,GAAG,SANoD;IAO3D,GAAGC;EAPwD,CAQvD;EACJ,OACE,6BAAC,4BAAD;IAAsB,KAAK,EAAE,CAACH,KAA9B;IAAqC,OAAO,EAAEC;EAA9C,GAA2DE,IAA3D,GACGL,YAAY,KAAK,MAAjB,GACC,6BAAC,wBAAD;IACE,SAAS,EAAED,SADb;IAEE,IAAI,EAAEK,IAFR;IAGE,gBAAgB,EAAEE,sBAAA,CAAYH,OAAZ;EAHpB,EADD,GAOC,2DARJ,EAUE,6BAAC,sBAAD;IACE,KAAK,EAAED,KADT;IAEE,gBAAgB,EAAEI,sBAAA,CAAYH,OAAZ,CAFpB;IAGE,OAAO,EAAE,CAAC,CAACJ,SAHb;IAIE,YAAY,EAAEC,YAJhB;IAKE,SAAS,EAAEC,SALb;IAME,IAAI,EAAEG;EANR,EAVF,EAkBGJ,YAAY,KAAK,OAAjB,GACC,6BAAC,wBAAD;IACE,SAAS,EAAED,SADb;IAEE,IAAI,EAAEK,IAFR;IAGE,gBAAgB,EAAEE,sBAAA,CAAYH,OAAZ;EAHpB,EADD,GAOC,2DAzBJ,CADF;AA8BD,CAvCD;;eAyCeL,c"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -11,18 +13,21 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
11
13
|
|
|
12
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
15
|
|
|
14
|
-
const TextComponent =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
const TextComponent = _ref => {
|
|
17
|
+
var _textProps$typography, _textProps$fontWeight, _textProps$fontColor;
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
textProps,
|
|
21
|
+
size = 'default',
|
|
22
|
+
defaultFontColor,
|
|
23
|
+
label,
|
|
24
|
+
iconPosition = 'left',
|
|
25
|
+
hasIcon = false
|
|
26
|
+
} = _ref;
|
|
22
27
|
return label ? _react.default.createElement(_styled.StyledText, _extends({
|
|
23
|
-
typography: (textProps
|
|
24
|
-
fontWeight: (textProps
|
|
25
|
-
fontColor: (textProps
|
|
28
|
+
typography: ((_textProps$typography = textProps === null || textProps === void 0 ? void 0 : textProps.typography) !== null && _textProps$typography !== void 0 ? _textProps$typography : size === 'small') ? 'sub' : 'base',
|
|
29
|
+
fontWeight: (_textProps$fontWeight = textProps === null || textProps === void 0 ? void 0 : textProps.fontWeight) !== null && _textProps$fontWeight !== void 0 ? _textProps$fontWeight : 'bold',
|
|
30
|
+
fontColor: (_textProps$fontColor = textProps === null || textProps === void 0 ? void 0 : textProps.fontColor) !== null && _textProps$fontColor !== void 0 ? _textProps$fontColor : defaultFontColor,
|
|
26
31
|
iconPosition: iconPosition,
|
|
27
32
|
hasIcon: hasIcon
|
|
28
33
|
}, textProps), label) : _react.default.createElement(_react.default.Fragment, null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextComponent.js","names":["TextComponent","textProps","size","defaultFontColor","label","iconPosition","hasIcon","typography","fontWeight","fontColor","React","memo"],"sources":["../../../../src/components/molecules/IconTextButton/TextComponent.tsx"],"sourcesContent":["import {\n ButtonSizeType,\n FontColor,\n IconPositionOptions,\n TextProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { StyledText } from './styled';\n\ninterface TextComponentProps {\n textProps?: TextProps;\n size?: ButtonSizeType;\n defaultFontColor: keyof FontColor;\n label?: string;\n iconPosition?: IconPositionOptions;\n hasIcon?: boolean;\n}\n\nconst TextComponent: FC<TextComponentProps> = ({\n textProps,\n size = 'default',\n defaultFontColor,\n label,\n iconPosition = 'left',\n hasIcon = false,\n}) => {\n return label ? (\n <StyledText\n typography={textProps?.typography ?? size === 'small' ? 'sub' : 'base'}\n fontWeight={textProps?.fontWeight ?? 'bold'}\n fontColor={textProps?.fontColor ?? defaultFontColor}\n iconPosition={iconPosition}\n hasIcon={hasIcon}\n {...textProps}\n >\n {label}\n </StyledText>\n ) : (\n <></>\n );\n};\n\nexport default React.memo(TextComponent);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextComponent.js","names":["TextComponent","textProps","size","defaultFontColor","label","iconPosition","hasIcon","typography","fontWeight","fontColor","React","memo"],"sources":["../../../../src/components/molecules/IconTextButton/TextComponent.tsx"],"sourcesContent":["import {\n ButtonSizeType,\n FontColor,\n IconPositionOptions,\n TextProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { StyledText } from './styled';\n\ninterface TextComponentProps {\n textProps?: TextProps;\n size?: ButtonSizeType;\n defaultFontColor: keyof FontColor;\n label?: string;\n iconPosition?: IconPositionOptions;\n hasIcon?: boolean;\n}\n\nconst TextComponent: FC<TextComponentProps> = ({\n textProps,\n size = 'default',\n defaultFontColor,\n label,\n iconPosition = 'left',\n hasIcon = false,\n}) => {\n return label ? (\n <StyledText\n typography={textProps?.typography ?? size === 'small' ? 'sub' : 'base'}\n fontWeight={textProps?.fontWeight ?? 'bold'}\n fontColor={textProps?.fontColor ?? defaultFontColor}\n iconPosition={iconPosition}\n hasIcon={hasIcon}\n {...textProps}\n >\n {label}\n </StyledText>\n ) : (\n <></>\n );\n};\n\nexport default React.memo(TextComponent);\n"],"mappings":";;;;;;;AAMA;;AACA;;;;;;AAWA,MAAMA,aAAqC,GAAG,QAOxC;EAAA;;EAAA,IAPyC;IAC7CC,SAD6C;IAE7CC,IAAI,GAAG,SAFsC;IAG7CC,gBAH6C;IAI7CC,KAJ6C;IAK7CC,YAAY,GAAG,MAL8B;IAM7CC,OAAO,GAAG;EANmC,CAOzC;EACJ,OAAOF,KAAK,GACV,6BAAC,kBAAD;IACE,UAAU,EAAE,0BAAAH,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAEM,UAAX,yEAAyBL,IAAI,KAAK,OAAlC,IAA4C,KAA5C,GAAoD,MADlE;IAEE,UAAU,2BAAED,SAAF,aAAEA,SAAF,uBAAEA,SAAS,CAAEO,UAAb,yEAA2B,MAFvC;IAGE,SAAS,0BAAEP,SAAF,aAAEA,SAAF,uBAAEA,SAAS,CAAEQ,SAAb,uEAA0BN,gBAHrC;IAIE,YAAY,EAAEE,YAJhB;IAKE,OAAO,EAAEC;EALX,GAMML,SANN,GAQGG,KARH,CADU,GAYV,2DAZF;AAcD,CAtBD;;eAwBeM,cAAA,CAAMC,IAAN,CAAWX,aAAX,C"}
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "IconTextButton", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _IconTextButton.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "NativeIconTextButtonProps", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _IconTextButton.NativeIconTextButtonProps;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
5
18
|
|
|
6
19
|
var _IconTextButton = _interopRequireWildcard(require("./IconTextButton"));
|
|
7
20
|
|
|
8
|
-
exports.IconTextButton = _IconTextButton.default;
|
|
9
|
-
exports.NativeIconTextButtonProps = _IconTextButton.NativeIconTextButtonProps;
|
|
10
|
-
|
|
11
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
22
|
|
|
13
23
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/IconTextButton/index.ts"],"sourcesContent":["export {\n default as IconTextButton,\n NativeIconTextButtonProps,\n} from './IconTextButton';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/IconTextButton/index.ts"],"sourcesContent":["export {\n default as IconTextButton,\n NativeIconTextButtonProps,\n} from './IconTextButton';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.StyledText = exports.StyledIconTextButton = void 0;
|
|
5
7
|
|
|
6
8
|
var _native = _interopRequireWildcard(require("@emotion/native"));
|
|
@@ -9,38 +11,38 @@ var _Button = require("../../atoms/Button");
|
|
|
9
11
|
|
|
10
12
|
var _Text = require("../../atoms/Text");
|
|
11
13
|
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
15
|
+
|
|
12
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
17
|
|
|
14
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
20
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
|
+
|
|
22
|
+
const boxedStyle = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
theme
|
|
25
|
+
} = _ref;
|
|
26
|
+
return "\n padding: ".concat(theme === null || theme === void 0 ? void 0 : theme.spacing.centi, ";\n aspect-ratio: 1;\n ");
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const StyledIconTextButton = (0, _native.default)(_Button.Button)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", ";\n"])), _ref2 => {
|
|
30
|
+
let {
|
|
31
|
+
boxed,
|
|
32
|
+
theme
|
|
33
|
+
} = _ref2;
|
|
34
|
+
return boxed && boxedStyle({
|
|
35
|
+
theme
|
|
36
|
+
});
|
|
37
|
+
});
|
|
31
38
|
exports.StyledIconTextButton = StyledIconTextButton;
|
|
32
|
-
const StyledText = (0, _native.default)(_Text.Text)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
if (hasIcon && iconPosition === 'left') return (0, _native.css)
|
|
39
|
-
|
|
40
|
-
`;else if (hasIcon && iconPosition === 'right') return (0, _native.css)`
|
|
41
|
-
margin-right: ${theme == null ? void 0 : theme.spacing.mili};
|
|
42
|
-
`;
|
|
43
|
-
}}
|
|
44
|
-
`;
|
|
39
|
+
const StyledText = (0, _native.default)(_Text.Text)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n"])), _ref3 => {
|
|
40
|
+
let {
|
|
41
|
+
theme,
|
|
42
|
+
iconPosition,
|
|
43
|
+
hasIcon = false
|
|
44
|
+
} = _ref3;
|
|
45
|
+
if (hasIcon && iconPosition === 'left') return (0, _native.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.spacing.mili);else if (hasIcon && iconPosition === 'right') return (0, _native.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-right: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.spacing.mili);
|
|
46
|
+
});
|
|
45
47
|
exports.StyledText = StyledText;
|
|
46
48
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","names":["boxedStyle","theme","spacing","centi","StyledIconTextButton","styled","Button","boxed","StyledText","Text","iconPosition","hasIcon","css","mili"],"sources":["../../../../src/components/molecules/IconTextButton/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { IconPositionOptions, StyleProps } from '@tecsinapse/react-core';\nimport { Button } from '../../atoms/Button';\nimport { Text } from '../../atoms/Text';\n\nconst boxedStyle = ({ theme }: Partial<StyleProps>) => `\n padding: ${theme?.spacing.centi};\n aspect-ratio: 1;\n `;\n\nexport const StyledIconTextButton = styled(Button)<\n Partial<StyleProps> & {\n boxed: boolean;\n }\n>`\n ${({ boxed, theme }) => boxed && boxedStyle({ theme })};\n`;\n\nexport const StyledText = styled(Text)<\n Partial<StyleProps> & {\n iconPosition: IconPositionOptions;\n hasIcon?: boolean;\n }\n>`\n ${({ theme, iconPosition, hasIcon = false }) => {\n if (hasIcon && iconPosition === 'left')\n return css`\n margin-left: ${theme?.spacing.mili};\n `;\n else if (hasIcon && iconPosition === 'right')\n return css`\n margin-right: ${theme?.spacing.mili};\n `;\n }}\n`;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"styled.js","names":["boxedStyle","theme","spacing","centi","StyledIconTextButton","styled","Button","boxed","StyledText","Text","iconPosition","hasIcon","css","mili"],"sources":["../../../../src/components/molecules/IconTextButton/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { IconPositionOptions, StyleProps } from '@tecsinapse/react-core';\nimport { Button } from '../../atoms/Button';\nimport { Text } from '../../atoms/Text';\n\nconst boxedStyle = ({ theme }: Partial<StyleProps>) => `\n padding: ${theme?.spacing.centi};\n aspect-ratio: 1;\n `;\n\nexport const StyledIconTextButton = styled(Button)<\n Partial<StyleProps> & {\n boxed: boolean;\n }\n>`\n ${({ boxed, theme }) => boxed && boxedStyle({ theme })};\n`;\n\nexport const StyledText = styled(Text)<\n Partial<StyleProps> & {\n iconPosition: IconPositionOptions;\n hasIcon?: boolean;\n }\n>`\n ${({ theme, iconPosition, hasIcon = false }) => {\n if (hasIcon && iconPosition === 'left')\n return css`\n margin-left: ${theme?.spacing.mili};\n `;\n else if (hasIcon && iconPosition === 'right')\n return css`\n margin-right: ${theme?.spacing.mili};\n `;\n }}\n`;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;EAAA,IAAC;IAAEC;EAAF,CAAD;EAAA,gCACJA,KADI,aACJA,KADI,uBACJA,KAAK,CAAEC,OAAP,CAAeC,KADX;AAAA,CAAnB;;AAKO,MAAMC,oBAAoB,GAAG,IAAAC,eAAA,EAAOC,cAAP,CAAH,iFAK7B;EAAA,IAAC;IAAEC,KAAF;IAASN;EAAT,CAAD;EAAA,OAAsBM,KAAK,IAAIP,UAAU,CAAC;IAAEC;EAAF,CAAD,CAAzC;AAAA,CAL6B,CAA1B;;AAQA,MAAMO,UAAU,GAAG,IAAAH,eAAA,EAAOI,UAAP,CAAH,kFAMnB,SAA8C;EAAA,IAA7C;IAAER,KAAF;IAASS,YAAT;IAAuBC,OAAO,GAAG;EAAjC,CAA6C;EAC9C,IAAIA,OAAO,IAAID,YAAY,KAAK,MAAhC,EACE,WAAOE,WAAP,6GACiBX,KADjB,aACiBA,KADjB,uBACiBA,KAAK,CAAEC,OAAP,CAAeW,IADhC,EADF,KAIK,IAAIF,OAAO,IAAID,YAAY,KAAK,OAAhC,EACH,WAAOE,WAAP,8GACkBX,KADlB,aACkBA,KADlB,uBACkBA,KAAK,CAAEC,OAAP,CAAeW,IADjC;AAGH,CAfoB,CAAhB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var _reactCore = require("@tecsinapse/react-core");
|
|
@@ -15,10 +17,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
15
17
|
|
|
16
18
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
19
|
|
|
18
|
-
const InputPassword = _react.default.forwardRef(({
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const InputPassword = _react.default.forwardRef((_ref, ref) => {
|
|
21
|
+
let {
|
|
22
|
+
rightComponent,
|
|
23
|
+
...rest
|
|
24
|
+
} = _ref;
|
|
22
25
|
const [revealed, setRevealed] = (0, _react.useState)(false);
|
|
23
26
|
return _react.default.createElement(_Input.Input, _extends({}, rest, {
|
|
24
27
|
ref: ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPassword.js","names":["InputPassword","React","forwardRef","
|
|
1
|
+
{"version":3,"file":"InputPassword.js","names":["InputPassword","React","forwardRef","ref","rightComponent","rest","revealed","setRevealed","useState","displayName"],"sources":["../../../../src/components/molecules/InputPassword/InputPassword.tsx"],"sourcesContent":["import { InputPasswordIcon } from '@tecsinapse/react-core';\nimport React, { useState } from 'react';\nimport { Input, InputNativeProps } from '../../atoms/Input';\nimport { TextInput } from 'react-native';\n\nexport type InputPasswordNativeProps = InputNativeProps;\n\nconst InputPassword = React.forwardRef<TextInput, InputPasswordNativeProps>(\n ({ rightComponent, ...rest }, ref) => {\n const [revealed, setRevealed] = useState(false);\n return (\n <Input\n {...rest}\n ref={ref}\n secureTextEntry={!revealed}\n rightComponent={\n <>\n <InputPasswordIcon\n onChangeState={setRevealed}\n revealed={revealed}\n effect=\"none\"\n />\n {rightComponent}\n </>\n }\n />\n );\n }\n);\n\nInputPassword.displayName = 'InputPassword';\n\nexport default InputPassword;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAKA,MAAMA,aAAa,GAAGC,cAAA,CAAMC,UAAN,CACpB,OAA8BC,GAA9B,KAAsC;EAAA,IAArC;IAAEC,cAAF;IAAkB,GAAGC;EAArB,CAAqC;EACpC,MAAM,CAACC,QAAD,EAAWC,WAAX,IAA0B,IAAAC,eAAA,EAAS,KAAT,CAAhC;EACA,OACE,6BAAC,YAAD,eACMH,IADN;IAEE,GAAG,EAAEF,GAFP;IAGE,eAAe,EAAE,CAACG,QAHpB;IAIE,cAAc,EACZ,4DACE,6BAAC,4BAAD;MACE,aAAa,EAAEC,WADjB;MAEE,QAAQ,EAAED,QAFZ;MAGE,MAAM,EAAC;IAHT,EADF,EAMGF,cANH;EALJ,GADF;AAiBD,CApBmB,CAAtB;;AAuBAJ,aAAa,CAACS,WAAd,GAA4B,eAA5B;eAEeT,a"}
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "InputPassword", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _InputPassword.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "InputPasswordNativeProps", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _InputPassword.InputPasswordNativeProps;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
5
18
|
|
|
6
19
|
var _InputPassword = _interopRequireWildcard(require("./InputPassword"));
|
|
7
20
|
|
|
8
|
-
exports.InputPassword = _InputPassword.default;
|
|
9
|
-
exports.InputPasswordNativeProps = _InputPassword.InputPasswordNativeProps;
|
|
10
|
-
|
|
11
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
22
|
|
|
13
23
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/InputPassword/index.ts"],"sourcesContent":["export {\n default as InputPassword,\n InputPasswordNativeProps,\n} from './InputPassword';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/InputPassword/index.ts"],"sourcesContent":["export {\n default as InputPassword,\n InputPasswordNativeProps,\n} from './InputPassword';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -13,20 +15,23 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
13
15
|
|
|
14
16
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
17
|
|
|
16
|
-
const LabelComponent =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
const LabelComponent = _ref => {
|
|
19
|
+
var _labelProps$fontColor, _labelProps$fontWeigh;
|
|
20
|
+
|
|
21
|
+
let {
|
|
22
|
+
label,
|
|
23
|
+
labelPosition,
|
|
24
|
+
labelProps,
|
|
25
|
+
active,
|
|
26
|
+
switchDisabled = false,
|
|
27
|
+
...rest
|
|
28
|
+
} = _ref;
|
|
24
29
|
const defaultFontColor = active && !switchDisabled ? 'dark' : 'medium';
|
|
25
30
|
const defaultFontWeight = active && !switchDisabled ? 'bold' : 'regular';
|
|
26
31
|
return _react.default.createElement(_reactNative.Pressable, rest, _react.default.createElement(_styled.StyledLabel, _extends({
|
|
27
32
|
labelPosition: labelPosition,
|
|
28
|
-
fontColor: (labelProps
|
|
29
|
-
fontWeight: (labelProps
|
|
33
|
+
fontColor: (_labelProps$fontColor = labelProps === null || labelProps === void 0 ? void 0 : labelProps.fontColor) !== null && _labelProps$fontColor !== void 0 ? _labelProps$fontColor : defaultFontColor,
|
|
34
|
+
fontWeight: (_labelProps$fontWeigh = labelProps === null || labelProps === void 0 ? void 0 : labelProps.fontWeight) !== null && _labelProps$fontWeigh !== void 0 ? _labelProps$fontWeigh : defaultFontWeight
|
|
30
35
|
}, labelProps), label));
|
|
31
36
|
};
|
|
32
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelComponent.js","names":["LabelComponent","label","labelPosition","labelProps","active","switchDisabled","rest","defaultFontColor","defaultFontWeight","fontColor","fontWeight","React","memo"],"sources":["../../../../src/components/molecules/LabeledSwitch/LabelComponent.tsx"],"sourcesContent":["import {\n FontColor,\n FontWeight,\n LabelPositionOptions,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Pressable, PressableProps } from 'react-native';\nimport { TextNativeProps } from '../../atoms/Text';\nimport { StyledLabel } from './styled';\n\nexport interface LabelComponentProps extends PressableProps {\n label: string;\n labelPosition: LabelPositionOptions;\n labelProps?: TextNativeProps;\n active: boolean;\n switchDisabled?: boolean;\n}\n\nconst LabelComponent: FC<LabelComponentProps> = ({\n label,\n labelPosition,\n labelProps,\n active,\n switchDisabled = false,\n ...rest\n}) => {\n const defaultFontColor: keyof FontColor =\n active && !switchDisabled ? 'dark' : 'medium';\n const defaultFontWeight: keyof FontWeight =\n active && !switchDisabled ? 'bold' : 'regular';\n\n return (\n <Pressable {...rest}>\n <StyledLabel\n labelPosition={labelPosition}\n fontColor={labelProps?.fontColor ?? defaultFontColor}\n fontWeight={labelProps?.fontWeight ?? defaultFontWeight}\n {...labelProps}\n >\n {label}\n </StyledLabel>\n </Pressable>\n );\n};\n\nexport default React.memo(LabelComponent);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"LabelComponent.js","names":["LabelComponent","label","labelPosition","labelProps","active","switchDisabled","rest","defaultFontColor","defaultFontWeight","fontColor","fontWeight","React","memo"],"sources":["../../../../src/components/molecules/LabeledSwitch/LabelComponent.tsx"],"sourcesContent":["import {\n FontColor,\n FontWeight,\n LabelPositionOptions,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Pressable, PressableProps } from 'react-native';\nimport { TextNativeProps } from '../../atoms/Text';\nimport { StyledLabel } from './styled';\n\nexport interface LabelComponentProps extends PressableProps {\n label: string;\n labelPosition: LabelPositionOptions;\n labelProps?: TextNativeProps;\n active: boolean;\n switchDisabled?: boolean;\n}\n\nconst LabelComponent: FC<LabelComponentProps> = ({\n label,\n labelPosition,\n labelProps,\n active,\n switchDisabled = false,\n ...rest\n}) => {\n const defaultFontColor: keyof FontColor =\n active && !switchDisabled ? 'dark' : 'medium';\n const defaultFontWeight: keyof FontWeight =\n active && !switchDisabled ? 'bold' : 'regular';\n\n return (\n <Pressable {...rest}>\n <StyledLabel\n labelPosition={labelPosition}\n fontColor={labelProps?.fontColor ?? defaultFontColor}\n fontWeight={labelProps?.fontWeight ?? defaultFontWeight}\n {...labelProps}\n >\n {label}\n </StyledLabel>\n </Pressable>\n );\n};\n\nexport default React.memo(LabelComponent);\n"],"mappings":";;;;;;;AAKA;;AACA;;AAEA;;;;;;AAUA,MAAMA,cAAuC,GAAG,QAO1C;EAAA;;EAAA,IAP2C;IAC/CC,KAD+C;IAE/CC,aAF+C;IAG/CC,UAH+C;IAI/CC,MAJ+C;IAK/CC,cAAc,GAAG,KAL8B;IAM/C,GAAGC;EAN4C,CAO3C;EACJ,MAAMC,gBAAiC,GACrCH,MAAM,IAAI,CAACC,cAAX,GAA4B,MAA5B,GAAqC,QADvC;EAEA,MAAMG,iBAAmC,GACvCJ,MAAM,IAAI,CAACC,cAAX,GAA4B,MAA5B,GAAqC,SADvC;EAGA,OACE,6BAAC,sBAAD,EAAeC,IAAf,EACE,6BAAC,mBAAD;IACE,aAAa,EAAEJ,aADjB;IAEE,SAAS,2BAAEC,UAAF,aAAEA,UAAF,uBAAEA,UAAU,CAAEM,SAAd,yEAA2BF,gBAFtC;IAGE,UAAU,2BAAEJ,UAAF,aAAEA,UAAF,uBAAEA,UAAU,CAAEO,UAAd,yEAA4BF;EAHxC,GAIML,UAJN,GAMGF,KANH,CADF,CADF;AAYD,CAzBD;;eA2BeU,cAAA,CAAMC,IAAN,CAAWZ,cAAX,C"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var _reactCore = require("@tecsinapse/react-core");
|
|
@@ -15,16 +17,17 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
17
|
|
|
16
18
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
19
|
|
|
18
|
-
const LabeledSwitch =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
const LabeledSwitch = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
label,
|
|
23
|
+
labelPosition = 'right',
|
|
24
|
+
labelProps,
|
|
25
|
+
pressableLabel = false,
|
|
26
|
+
active,
|
|
27
|
+
disabled,
|
|
28
|
+
onChange,
|
|
29
|
+
...rest
|
|
30
|
+
} = _ref;
|
|
28
31
|
return _react.default.createElement(_styled.StyledView, null, labelPosition === 'left' ? _react.default.createElement(_LabelComponent.default, {
|
|
29
32
|
active: active,
|
|
30
33
|
label: label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledSwitch.js","names":["LabeledSwitch","label","labelPosition","labelProps","pressableLabel","active","disabled","onChange","rest"],"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 label,\n labelPosition = 'right',\n labelProps,\n pressableLabel = false,\n active,\n disabled,\n onChange,\n ...rest\n}) => {\n return (\n <StyledView>\n {labelPosition === 'left' ? (\n <LabelComponent\n active={active}\n label={label}\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 {labelPosition === 'right' ? (\n <LabelComponent\n active={active}\n label={label}\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"],"mappings":"
|
|
1
|
+
{"version":3,"file":"LabeledSwitch.js","names":["LabeledSwitch","label","labelPosition","labelProps","pressableLabel","active","disabled","onChange","rest"],"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 label,\n labelPosition = 'right',\n labelProps,\n pressableLabel = false,\n active,\n disabled,\n onChange,\n ...rest\n}) => {\n return (\n <StyledView>\n {labelPosition === 'left' ? (\n <LabelComponent\n active={active}\n label={label}\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 {labelPosition === 'right' ? (\n <LabelComponent\n active={active}\n label={label}\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"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;AAMA,MAAMA,aAA2C,GAAG,QAS9C;EAAA,IAT+C;IACnDC,KADmD;IAEnDC,aAAa,GAAG,OAFmC;IAGnDC,UAHmD;IAInDC,cAAc,GAAG,KAJkC;IAKnDC,MALmD;IAMnDC,QANmD;IAOnDC,QAPmD;IAQnD,GAAGC;EARgD,CAS/C;EACJ,OACE,6BAAC,kBAAD,QACGN,aAAa,KAAK,MAAlB,GACC,6BAAC,uBAAD;IACE,MAAM,EAAEG,MADV;IAEE,KAAK,EAAEJ,KAFT;IAGE,aAAa,EAAE,MAHjB;IAIE,UAAU,EAAEE,UAJd;IAKE,QAAQ,EAAE,CAACC,cAAD,IAAmBE,QAL/B;IAME,cAAc,EAAEA,QANlB;IAOE,OAAO,EAAE,MAAMC,QAAQ,CAAC,CAACF,MAAF;EAPzB,EADD,GAWC,2DAZJ,EAcE,6BAAC,iBAAD;IACE,MAAM,EAAEA,MADV;IAEE,QAAQ,EAAEE,QAFZ;IAGE,QAAQ,EAAED;EAHZ,GAIME,IAJN,EAdF,EAoBGN,aAAa,KAAK,OAAlB,GACC,6BAAC,uBAAD;IACE,MAAM,EAAEG,MADV;IAEE,KAAK,EAAEJ,KAFT;IAGE,aAAa,EAAE,OAHjB;IAIE,UAAU,EAAEE,UAJd;IAKE,QAAQ,EAAE,CAACC,cAAD,IAAmBE,QAL/B;IAME,cAAc,EAAEA,QANlB;IAOE,OAAO,EAAE,MAAMC,QAAQ,CAAC,CAACF,MAAF;EAPzB,EADD,GAWC,2DA/BJ,CADF;AAoCD,CA9CD;;eAgDeL,a"}
|