@tecsinapse/react-core 1.21.7 → 1.21.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/BoxContent/BoxContent.js +4 -31
- package/dist/cjs/components/atoms/BoxContent/BoxContent.js.map +1 -1
- package/dist/cjs/components/atoms/BoxContent/styled.js +1 -1
- package/dist/cjs/components/atoms/BoxContent/styled.js.map +1 -1
- package/dist/cjs/components/atoms/Button/Button.js +18 -61
- package/dist/cjs/components/atoms/Button/Button.js.map +1 -1
- package/dist/cjs/components/atoms/Button/States/Error.js +5 -23
- package/dist/cjs/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/cjs/components/atoms/Button/States/Success.js +3 -21
- package/dist/cjs/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/cjs/components/atoms/Card/Card.js +12 -45
- package/dist/cjs/components/atoms/Card/Card.js.map +1 -1
- package/dist/cjs/components/atoms/Checkbox/Checkbox.js +13 -51
- package/dist/cjs/components/atoms/Checkbox/Checkbox.js.map +1 -1
- package/dist/cjs/components/atoms/Divider/Divider.js +4 -31
- package/dist/cjs/components/atoms/Divider/Divider.js.map +1 -1
- package/dist/cjs/components/atoms/GroupButton/GroupButton.js +19 -57
- package/dist/cjs/components/atoms/GroupButton/GroupButton.js.map +1 -1
- package/dist/cjs/components/atoms/GroupButton/styled.js +11 -11
- package/dist/cjs/components/atoms/GroupButton/styled.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/AntDesign.js +4 -35
- package/dist/cjs/components/atoms/Icon/AntDesign.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/Entypo.js +4 -35
- package/dist/cjs/components/atoms/Icon/Entypo.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/Evil.js +4 -35
- package/dist/cjs/components/atoms/Icon/Evil.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/Feather.js +4 -35
- package/dist/cjs/components/atoms/Icon/Feather.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/FontAwesome.js +4 -35
- package/dist/cjs/components/atoms/Icon/FontAwesome.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/FontAwesomeFive.js +4 -35
- package/dist/cjs/components/atoms/Icon/FontAwesomeFive.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/Fontisto.js +4 -35
- package/dist/cjs/components/atoms/Icon/Fontisto.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/Foundation.js +4 -35
- package/dist/cjs/components/atoms/Icon/Foundation.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/Icon.js +13 -51
- package/dist/cjs/components/atoms/Icon/Icon.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/Ionicon.js +4 -35
- package/dist/cjs/components/atoms/Icon/Ionicon.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/Material.js +4 -35
- package/dist/cjs/components/atoms/Icon/Material.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/MaterialCommunity.js +9 -43
- package/dist/cjs/components/atoms/Icon/MaterialCommunity.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/Octicon.js +4 -35
- package/dist/cjs/components/atoms/Icon/Octicon.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/SimpleLine.js +4 -35
- package/dist/cjs/components/atoms/Icon/SimpleLine.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/Zocial.js +4 -35
- package/dist/cjs/components/atoms/Icon/Zocial.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/functions.js +1 -1
- package/dist/cjs/components/atoms/Icon/functions.js.map +1 -1
- package/dist/cjs/components/atoms/Input/InputContainer/InputContainer.js +21 -67
- package/dist/cjs/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
- package/dist/cjs/components/atoms/Input/InputElement/InputElement.js +11 -47
- package/dist/cjs/components/atoms/Input/InputElement/InputElement.js.map +1 -1
- package/dist/cjs/components/atoms/Input/InputMaskElement/InputMaskElement.js +15 -52
- package/dist/cjs/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
- package/dist/cjs/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +11 -43
- package/dist/cjs/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
- package/dist/cjs/components/atoms/Input/hooks/useNumberMask.js +1 -17
- package/dist/cjs/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
- package/dist/cjs/components/atoms/Input/hooks/useStringMask.js +2 -2
- package/dist/cjs/components/atoms/Input/hooks/useStringMask.js.map +1 -1
- package/dist/cjs/components/atoms/Input/styled.js +1 -1
- package/dist/cjs/components/atoms/Input/styled.js.map +1 -1
- package/dist/cjs/components/atoms/Paper/Paper.js +8 -43
- package/dist/cjs/components/atoms/Paper/Paper.js.map +1 -1
- package/dist/cjs/components/atoms/PressableSurface/PressableSurface.js +12 -49
- package/dist/cjs/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
- package/dist/cjs/components/atoms/ProgressBar/ProgressBar.js +16 -52
- package/dist/cjs/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/cjs/components/atoms/RadioButton/RadioButton.js +13 -51
- package/dist/cjs/components/atoms/RadioButton/RadioButton.js.map +1 -1
- package/dist/cjs/components/atoms/Switch/Switch.js +14 -53
- package/dist/cjs/components/atoms/Switch/Switch.js.map +1 -1
- package/dist/cjs/components/atoms/Tag/Tag.js +16 -52
- package/dist/cjs/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/cjs/components/atoms/Text/Text.js +17 -59
- package/dist/cjs/components/atoms/Text/Text.js.map +1 -1
- package/dist/cjs/components/molecules/Calendar/Calendar.js +20 -60
- package/dist/cjs/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/cjs/components/molecules/Calendar/components/MonthWeek.js +3 -3
- package/dist/cjs/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
- package/dist/cjs/components/molecules/Calendar/styled.js +5 -8
- package/dist/cjs/components/molecules/Calendar/styled.js.map +1 -1
- package/dist/cjs/components/molecules/DatePicker/DatePicker.js +30 -81
- package/dist/cjs/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/cjs/components/molecules/DatePicker/styled.js +3 -6
- package/dist/cjs/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js +42 -104
- package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/cjs/components/molecules/DateTimeSelector/DateTimeSelector.js +26 -72
- package/dist/cjs/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/cjs/components/molecules/DateTimeSelector/Selector.js +15 -51
- package/dist/cjs/components/molecules/DateTimeSelector/Selector.js.map +1 -1
- package/dist/cjs/components/molecules/Grid/functions.js +1 -2
- package/dist/cjs/components/molecules/Grid/functions.js.map +1 -1
- package/dist/cjs/components/molecules/HintInputContainer/HintInputContainer.js +17 -55
- package/dist/cjs/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
- package/dist/cjs/components/molecules/IconTextButton/IconComponent.js +5 -21
- package/dist/cjs/components/molecules/IconTextButton/IconComponent.js.map +1 -1
- package/dist/cjs/components/molecules/InputPassword/InputPasswordIcon.js +8 -41
- package/dist/cjs/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js +8 -25
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/cjs/styles/light.js +7 -20
- package/dist/cjs/styles/light.js.map +1 -1
- package/dist/cjs/utils/masks.js +2 -2
- package/dist/cjs/utils/masks.js.map +1 -1
- package/dist/esm/components/atoms/BoxContent/BoxContent.js +4 -31
- package/dist/esm/components/atoms/BoxContent/BoxContent.js.map +1 -1
- package/dist/esm/components/atoms/BoxContent/styled.js +1 -1
- package/dist/esm/components/atoms/BoxContent/styled.js.map +1 -1
- package/dist/esm/components/atoms/Button/Button.js +18 -61
- package/dist/esm/components/atoms/Button/Button.js.map +1 -1
- package/dist/esm/components/atoms/Button/States/Error.js +5 -23
- package/dist/esm/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/esm/components/atoms/Button/States/Success.js +3 -21
- package/dist/esm/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/esm/components/atoms/Card/Card.js +12 -45
- package/dist/esm/components/atoms/Card/Card.js.map +1 -1
- package/dist/esm/components/atoms/Checkbox/Checkbox.js +13 -51
- package/dist/esm/components/atoms/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/atoms/Divider/Divider.js +4 -31
- package/dist/esm/components/atoms/Divider/Divider.js.map +1 -1
- package/dist/esm/components/atoms/GroupButton/GroupButton.js +19 -57
- package/dist/esm/components/atoms/GroupButton/GroupButton.js.map +1 -1
- package/dist/esm/components/atoms/GroupButton/styled.js +11 -11
- package/dist/esm/components/atoms/GroupButton/styled.js.map +1 -1
- package/dist/esm/components/atoms/Icon/AntDesign.js +4 -35
- package/dist/esm/components/atoms/Icon/AntDesign.js.map +1 -1
- package/dist/esm/components/atoms/Icon/Entypo.js +4 -35
- package/dist/esm/components/atoms/Icon/Entypo.js.map +1 -1
- package/dist/esm/components/atoms/Icon/Evil.js +4 -35
- package/dist/esm/components/atoms/Icon/Evil.js.map +1 -1
- package/dist/esm/components/atoms/Icon/Feather.js +4 -35
- package/dist/esm/components/atoms/Icon/Feather.js.map +1 -1
- package/dist/esm/components/atoms/Icon/FontAwesome.js +4 -35
- package/dist/esm/components/atoms/Icon/FontAwesome.js.map +1 -1
- package/dist/esm/components/atoms/Icon/FontAwesomeFive.js +4 -35
- package/dist/esm/components/atoms/Icon/FontAwesomeFive.js.map +1 -1
- package/dist/esm/components/atoms/Icon/Fontisto.js +4 -35
- package/dist/esm/components/atoms/Icon/Fontisto.js.map +1 -1
- package/dist/esm/components/atoms/Icon/Foundation.js +4 -35
- package/dist/esm/components/atoms/Icon/Foundation.js.map +1 -1
- package/dist/esm/components/atoms/Icon/Icon.js +13 -51
- package/dist/esm/components/atoms/Icon/Icon.js.map +1 -1
- package/dist/esm/components/atoms/Icon/Ionicon.js +4 -35
- package/dist/esm/components/atoms/Icon/Ionicon.js.map +1 -1
- package/dist/esm/components/atoms/Icon/Material.js +4 -35
- package/dist/esm/components/atoms/Icon/Material.js.map +1 -1
- package/dist/esm/components/atoms/Icon/MaterialCommunity.js +9 -43
- package/dist/esm/components/atoms/Icon/MaterialCommunity.js.map +1 -1
- package/dist/esm/components/atoms/Icon/Octicon.js +4 -35
- package/dist/esm/components/atoms/Icon/Octicon.js.map +1 -1
- package/dist/esm/components/atoms/Icon/SimpleLine.js +4 -35
- package/dist/esm/components/atoms/Icon/SimpleLine.js.map +1 -1
- package/dist/esm/components/atoms/Icon/Zocial.js +4 -35
- package/dist/esm/components/atoms/Icon/Zocial.js.map +1 -1
- package/dist/esm/components/atoms/Icon/functions.js +1 -1
- package/dist/esm/components/atoms/Icon/functions.js.map +1 -1
- package/dist/esm/components/atoms/Input/InputContainer/InputContainer.js +21 -67
- package/dist/esm/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
- package/dist/esm/components/atoms/Input/InputElement/InputElement.js +11 -47
- package/dist/esm/components/atoms/Input/InputElement/InputElement.js.map +1 -1
- package/dist/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js +15 -52
- package/dist/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
- package/dist/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +11 -43
- package/dist/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
- package/dist/esm/components/atoms/Input/hooks/useNumberMask.js +1 -17
- package/dist/esm/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
- package/dist/esm/components/atoms/Input/hooks/useStringMask.js +2 -2
- package/dist/esm/components/atoms/Input/hooks/useStringMask.js.map +1 -1
- package/dist/esm/components/atoms/Input/styled.js +1 -1
- package/dist/esm/components/atoms/Input/styled.js.map +1 -1
- package/dist/esm/components/atoms/Paper/Paper.js +8 -43
- package/dist/esm/components/atoms/Paper/Paper.js.map +1 -1
- package/dist/esm/components/atoms/PressableSurface/PressableSurface.js +12 -49
- package/dist/esm/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
- package/dist/esm/components/atoms/ProgressBar/ProgressBar.js +16 -52
- package/dist/esm/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/esm/components/atoms/RadioButton/RadioButton.js +13 -51
- package/dist/esm/components/atoms/RadioButton/RadioButton.js.map +1 -1
- package/dist/esm/components/atoms/Switch/Switch.js +14 -53
- package/dist/esm/components/atoms/Switch/Switch.js.map +1 -1
- package/dist/esm/components/atoms/Tag/Tag.js +16 -52
- package/dist/esm/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/esm/components/atoms/Text/Text.js +17 -59
- package/dist/esm/components/atoms/Text/Text.js.map +1 -1
- package/dist/esm/components/molecules/Calendar/Calendar.js +20 -60
- package/dist/esm/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/esm/components/molecules/Calendar/components/MonthWeek.js +3 -3
- package/dist/esm/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
- package/dist/esm/components/molecules/Calendar/styled.js +5 -8
- package/dist/esm/components/molecules/Calendar/styled.js.map +1 -1
- package/dist/esm/components/molecules/DatePicker/DatePicker.js +30 -81
- package/dist/esm/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/components/molecules/DatePicker/styled.js +3 -6
- package/dist/esm/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js +42 -104
- package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +26 -72
- package/dist/esm/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/esm/components/molecules/DateTimeSelector/Selector.js +15 -51
- package/dist/esm/components/molecules/DateTimeSelector/Selector.js.map +1 -1
- package/dist/esm/components/molecules/Grid/functions.js +1 -2
- package/dist/esm/components/molecules/Grid/functions.js.map +1 -1
- package/dist/esm/components/molecules/HintInputContainer/HintInputContainer.js +17 -55
- package/dist/esm/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
- package/dist/esm/components/molecules/IconTextButton/IconComponent.js +5 -21
- package/dist/esm/components/molecules/IconTextButton/IconComponent.js.map +1 -1
- package/dist/esm/components/molecules/InputPassword/InputPasswordIcon.js +8 -41
- package/dist/esm/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
- package/dist/esm/components/molecules/Snackbar/Snackbar.js +8 -25
- package/dist/esm/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/esm/styles/light.js +8 -21
- package/dist/esm/styles/light.js.map +1 -1
- package/dist/esm/utils/masks.js +2 -2
- package/dist/esm/utils/masks.js.map +1 -1
- package/package.json +2 -2
|
@@ -7,37 +7,10 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
7
7
|
|
|
8
8
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15
|
-
var __spreadValues = (a, b) => {
|
|
16
|
-
for (var prop in b || (b = {}))
|
|
17
|
-
if (__hasOwnProp.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
if (__getOwnPropSymbols)
|
|
20
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
21
|
-
if (__propIsEnum.call(b, prop))
|
|
22
|
-
__defNormalProp(a, prop, b[prop]);
|
|
23
|
-
}
|
|
24
|
-
return a;
|
|
25
|
-
};
|
|
26
|
-
var __objRest = (source, exclude) => {
|
|
27
|
-
var target = {};
|
|
28
|
-
for (var prop in source)
|
|
29
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
30
|
-
target[prop] = source[prop];
|
|
31
|
-
if (source != null && __getOwnPropSymbols)
|
|
32
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
33
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
34
|
-
target[prop] = source[prop];
|
|
35
|
-
}
|
|
36
|
-
return target;
|
|
37
|
-
};
|
|
38
|
-
const BoxContent = (_a) => {
|
|
39
|
-
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
40
|
-
return /* @__PURE__ */ React__default["default"].createElement(styled.StyledBoxContent, __spreadValues({}, rest), children);
|
|
10
|
+
const BoxContent = ({ children, ...rest }) => {
|
|
11
|
+
return /* @__PURE__ */ React__default["default"].createElement(styled.StyledBoxContent, {
|
|
12
|
+
...rest
|
|
13
|
+
}, children);
|
|
41
14
|
};
|
|
42
15
|
|
|
43
16
|
module.exports = BoxContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoxContent.js","sources":["../../../../../src/components/atoms/BoxContent/BoxContent.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ViewProps } from 'react-native';\nimport { StyledBoxContent } from './styled';\n\nexport interface BoxContentProps extends ViewProps {\n variant: 'top' | 'bottom' | 'left' | 'right';\n}\n\nconst BoxContent: FC<BoxContentProps> = ({ children, ...rest }) => {\n return <StyledBoxContent {...rest}>{children}</StyledBoxContent>;\n};\n\nexport default BoxContent;\n"],"names":["React","StyledBoxContent"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BoxContent.js","sources":["../../../../../src/components/atoms/BoxContent/BoxContent.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ViewProps } from 'react-native';\nimport { StyledBoxContent } from './styled';\n\nexport interface BoxContentProps extends ViewProps {\n variant: 'top' | 'bottom' | 'left' | 'right';\n}\n\nconst BoxContent: FC<BoxContentProps> = ({ children, ...rest }) => {\n return <StyledBoxContent {...rest}>{children}</StyledBoxContent>;\n};\n\nexport default BoxContent;\n"],"names":["React","StyledBoxContent"],"mappings":";;;;;;;;;AAQA,MAAM,UAAkC,GAAA,CAAC,EAAE,QAAA,EAAA,GAAa,MAAW,KAAA;AACjE,EAAA,uBAAQA,yBAAA,CAAA,aAAA,CAAAC,uBAAA,EAAA;AAAA,IAAkB,GAAG,IAAA;AAAA,GAAA,EAAO,QAAS,CAAA,CAAA;AAC/C;;;;"}
|
|
@@ -11,7 +11,7 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
11
11
|
|
|
12
12
|
const elevatedStyles = ({ theme }) => [
|
|
13
13
|
styled.css({
|
|
14
|
-
shadowColor: theme
|
|
14
|
+
shadowColor: theme?.miscellaneous.shadow,
|
|
15
15
|
shadowOffset: { width: 0, height: 2 },
|
|
16
16
|
shadowOpacity: 0.25,
|
|
17
17
|
shadowRadius: 3.84,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../src/components/atoms/BoxContent/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { View } from 'react-native';\nimport { BoxContentProps } from './BoxContent';\n\nexport const elevatedStyles = ({ theme }: Partial<StyleProps>) => [\n css({\n shadowColor: theme?.miscellaneous.shadow,\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.25,\n shadowRadius: 3.84,\n elevation: 5,\n }),\n];\n\nconst topStyles = ({ theme, variant }: Partial<BoxContentProps> & StyleProps) =>\n variant === 'top' &&\n css`\n border-bottom-left-radius: ${theme.borderRadius.deca};\n border-bottom-right-radius: ${theme.borderRadius.deca};\n `;\n\nconst bottomStyles = ({\n theme,\n variant,\n}: Partial<BoxContentProps> & StyleProps) =>\n variant === 'bottom' &&\n css`\n border-top-left-radius: ${theme.borderRadius.deca};\n border-top-right-radius: ${theme.borderRadius.deca};\n `;\n\nconst leftStyles = ({\n theme,\n variant,\n}: Partial<BoxContentProps> & StyleProps) =>\n variant === 'left' &&\n css`\n border-top-right-radius: ${theme.borderRadius.deca};\n border-bottom-right-radius: ${theme.borderRadius.deca};\n `;\n\nconst rightStyles = ({\n theme,\n variant,\n}: Partial<BoxContentProps> & StyleProps) =>\n variant === 'right' &&\n css`\n border-top-left-radius: ${theme.borderRadius.deca};\n border-bottom-left-radius: ${theme.borderRadius.deca};\n `;\n\nconst StyledBoxContentBase = styled(View)<Partial<StyleProps>>`\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n min-height: ${({ theme }) => theme.spacing.kilo};\n overflow: hidden;\n`;\n\nexport const StyledBoxContent = styled(StyledBoxContentBase)(\n props => css`\n ${elevatedStyles(props)}\n ${topStyles(props)}\n ${bottomStyles(props)}\n ${leftStyles(props)}\n ${rightStyles(props)}\n `\n);\n"],"names":["css","styled","View"],"mappings":";;;;;;;;;;;AAKO,MAAM,cAAiB,GAAA,CAAC,EAAE,KAAA,EAAiC,KAAA;AAAA,EAChEA,UAAI,CAAA;AAAA,IACF,WAAA,EAAa
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../src/components/atoms/BoxContent/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { View } from 'react-native';\nimport { BoxContentProps } from './BoxContent';\n\nexport const elevatedStyles = ({ theme }: Partial<StyleProps>) => [\n css({\n shadowColor: theme?.miscellaneous.shadow,\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.25,\n shadowRadius: 3.84,\n elevation: 5,\n }),\n];\n\nconst topStyles = ({ theme, variant }: Partial<BoxContentProps> & StyleProps) =>\n variant === 'top' &&\n css`\n border-bottom-left-radius: ${theme.borderRadius.deca};\n border-bottom-right-radius: ${theme.borderRadius.deca};\n `;\n\nconst bottomStyles = ({\n theme,\n variant,\n}: Partial<BoxContentProps> & StyleProps) =>\n variant === 'bottom' &&\n css`\n border-top-left-radius: ${theme.borderRadius.deca};\n border-top-right-radius: ${theme.borderRadius.deca};\n `;\n\nconst leftStyles = ({\n theme,\n variant,\n}: Partial<BoxContentProps> & StyleProps) =>\n variant === 'left' &&\n css`\n border-top-right-radius: ${theme.borderRadius.deca};\n border-bottom-right-radius: ${theme.borderRadius.deca};\n `;\n\nconst rightStyles = ({\n theme,\n variant,\n}: Partial<BoxContentProps> & StyleProps) =>\n variant === 'right' &&\n css`\n border-top-left-radius: ${theme.borderRadius.deca};\n border-bottom-left-radius: ${theme.borderRadius.deca};\n `;\n\nconst StyledBoxContentBase = styled(View)<Partial<StyleProps>>`\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n min-height: ${({ theme }) => theme.spacing.kilo};\n overflow: hidden;\n`;\n\nexport const StyledBoxContent = styled(StyledBoxContentBase)(\n props => css`\n ${elevatedStyles(props)}\n ${topStyles(props)}\n ${bottomStyles(props)}\n ${leftStyles(props)}\n ${rightStyles(props)}\n `\n);\n"],"names":["css","styled","View"],"mappings":";;;;;;;;;;;AAKO,MAAM,cAAiB,GAAA,CAAC,EAAE,KAAA,EAAiC,KAAA;AAAA,EAChEA,UAAI,CAAA;AAAA,IACF,WAAA,EAAa,OAAO,aAAc,CAAA,MAAA;AAAA,IAClC,YAAc,EAAA,EAAE,KAAO,EAAA,CAAA,EAAG,QAAQ,CAAE,EAAA;AAAA,IACpC,aAAe,EAAA,IAAA;AAAA,IACf,YAAc,EAAA,IAAA;AAAA,IACd,SAAW,EAAA,CAAA;AAAA,GACZ,CAAA;AACH,EAAA;AAEA,MAAM,YAAY,CAAC,EAAE,OAAO,OAAQ,EAAA,KAClC,YAAY,KACZ,IAAAA,UAAA,CAAA;AAAA,+BAAA,EAC+B,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,gCAAA,EAClB,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAGrD,MAAM,eAAe,CAAC;AAAA,EACpB,KAAA;AAAA,EACA,OAAA;AACF,CAAA,KACE,YAAY,QACZ,IAAAA,UAAA,CAAA;AAAA,4BAAA,EAC4B,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,6BAAA,EAClB,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAGlD,MAAM,aAAa,CAAC;AAAA,EAClB,KAAA;AAAA,EACA,OAAA;AACF,CAAA,KACE,YAAY,MACZ,IAAAA,UAAA,CAAA;AAAA,6BAAA,EAC6B,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,gCAAA,EAChB,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAGrD,MAAM,cAAc,CAAC;AAAA,EACnB,KAAA;AAAA,EACA,OAAA;AACF,CAAA,KACE,YAAY,OACZ,IAAAA,UAAA,CAAA;AAAA,4BAAA,EAC4B,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,+BAAA,EAChB,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAGpD,MAAM,oBAAA,GAAuBC,2BAAOC,gBAAI,CAAA,CAAA;AAAA,oBAAA,EAClB,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,aAAc,CAAA,YAAA,CAAA;AAAA,cAAA,EACzC,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,OAAQ,CAAA,IAAA,CAAA;AAAA;AAAA,CAAA,CAAA;AAIhC,MAAA,gBAAA,GAAmBD,2BAAO,oBAAoB,CAAA;AAAA,EACzD,CAAS,KAAA,KAAAD,UAAA,CAAA;AAAA,IAAA,EACL,eAAe,KAAK,CAAA,CAAA;AAAA,IAAA,EACpB,UAAU,KAAK,CAAA,CAAA;AAAA,EAAA,EACjB,aAAa,KAAK,CAAA,CAAA;AAAA,EAAA,EAClB,WAAW,KAAK,CAAA,CAAA;AAAA,EAAA,EAChB,YAAY,KAAK,CAAA,CAAA;AAAA,EAAA,CAAA;AAErB;;;;;"}
|
|
@@ -8,65 +8,21 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
8
8
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
return a;
|
|
28
|
-
};
|
|
29
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
30
|
-
var __objRest = (source, exclude) => {
|
|
31
|
-
var target = {};
|
|
32
|
-
for (var prop in source)
|
|
33
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
34
|
-
target[prop] = source[prop];
|
|
35
|
-
if (source != null && __getOwnPropSymbols)
|
|
36
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
37
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
38
|
-
target[prop] = source[prop];
|
|
39
|
-
}
|
|
40
|
-
return target;
|
|
41
|
-
};
|
|
42
|
-
const Button = (_a) => {
|
|
43
|
-
var _b = _a, {
|
|
44
|
-
children,
|
|
45
|
-
style,
|
|
46
|
-
color = "primary",
|
|
47
|
-
variant = "filled",
|
|
48
|
-
tone = "medium",
|
|
49
|
-
state = "default",
|
|
50
|
-
loadingComponent,
|
|
51
|
-
errorComponent,
|
|
52
|
-
successComponent,
|
|
53
|
-
size,
|
|
54
|
-
frozen,
|
|
55
|
-
disabled
|
|
56
|
-
} = _b, rest = __objRest(_b, [
|
|
57
|
-
"children",
|
|
58
|
-
"style",
|
|
59
|
-
"color",
|
|
60
|
-
"variant",
|
|
61
|
-
"tone",
|
|
62
|
-
"state",
|
|
63
|
-
"loadingComponent",
|
|
64
|
-
"errorComponent",
|
|
65
|
-
"successComponent",
|
|
66
|
-
"size",
|
|
67
|
-
"frozen",
|
|
68
|
-
"disabled"
|
|
69
|
-
]);
|
|
11
|
+
const Button = ({
|
|
12
|
+
children,
|
|
13
|
+
style,
|
|
14
|
+
color = "primary",
|
|
15
|
+
variant = "filled",
|
|
16
|
+
tone = "medium",
|
|
17
|
+
state = "default",
|
|
18
|
+
loadingComponent,
|
|
19
|
+
errorComponent,
|
|
20
|
+
successComponent,
|
|
21
|
+
size,
|
|
22
|
+
frozen,
|
|
23
|
+
disabled,
|
|
24
|
+
...rest
|
|
25
|
+
}) => {
|
|
70
26
|
const theme = react.useTheme();
|
|
71
27
|
const _frozen = frozen || state === "loading";
|
|
72
28
|
let _color;
|
|
@@ -88,7 +44,8 @@ const Button = (_a) => {
|
|
|
88
44
|
if (disabled) {
|
|
89
45
|
_surfaceColor = theme.color[_color].light;
|
|
90
46
|
}
|
|
91
|
-
return /* @__PURE__ */ React__default["default"].createElement(styled.StyledButton,
|
|
47
|
+
return /* @__PURE__ */ React__default["default"].createElement(styled.StyledButton, {
|
|
48
|
+
...rest,
|
|
92
49
|
accessibilityRole: "button",
|
|
93
50
|
style,
|
|
94
51
|
color: _color,
|
|
@@ -98,7 +55,7 @@ const Button = (_a) => {
|
|
|
98
55
|
size,
|
|
99
56
|
disabled: _frozen || disabled,
|
|
100
57
|
frozen: disabled
|
|
101
|
-
}
|
|
58
|
+
}, state === "loading" && loadingComponent, state === "error" && errorComponent, state === "success" && successComponent, state === "default" && children);
|
|
102
59
|
};
|
|
103
60
|
|
|
104
61
|
module.exports = Button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../../../src/components/atoms/Button/Button.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport React, { FC } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport {\n BorderRadiusType,\n ColorGradationType,\n ColorType,\n FontColorType,\n ThemeProp,\n VariantType,\n} from '../../../types/defaults';\nimport { PressableSurfaceProps } from '../PressableSurface';\nimport { TextProps } from '../Text';\nimport { StyledButton } from './styled';\n\nexport type ButtonSizeType = 'small' | 'default';\n\nexport type ButtonStateType = 'loading' | 'error' | 'success' | 'default';\n\nexport interface ButtonStateProps {\n buttonSize?: ButtonSizeType;\n fontColor?: FontColorType;\n textComponent?: React.FC<TextProps>;\n text?: string;\n}\n\nexport interface ButtonProps extends PressableSurfaceProps {\n style?: StyleProp<ViewStyle>;\n color?: ColorType;\n variant?: VariantType;\n tone?: ColorGradationType;\n frozen?: boolean | null;\n borderRadius?: BorderRadiusType;\n size?: ButtonSizeType;\n state?: ButtonStateType;\n loadingComponent?: JSX.Element;\n errorComponent?: JSX.Element;\n successComponent?: JSX.Element;\n}\n\nconst Button: FC<ButtonProps> = ({\n children,\n style,\n color = 'primary',\n variant = 'filled',\n tone = 'medium',\n state = 'default',\n loadingComponent,\n errorComponent,\n successComponent,\n size,\n frozen,\n disabled,\n ...rest\n}): JSX.Element => {\n const theme = useTheme() as ThemeProp;\n const _frozen = frozen || state === 'loading';\n let _color: ColorType;\n switch (state) {\n case 'error':\n _color = 'error';\n break;\n\n case 'success':\n _color = 'success';\n break;\n\n default:\n _color = color;\n break;\n }\n\n let _surfaceColor;\n if (variant === 'filled') {\n _surfaceColor = theme.color[_color][tone];\n }\n\n if (disabled) {\n _surfaceColor = theme.color[_color].light;\n }\n\n return (\n <StyledButton\n {...rest}\n accessibilityRole=\"button\"\n style={style}\n color={_color}\n tone={tone}\n surfaceColor={_surfaceColor}\n variant={variant}\n size={size}\n disabled={_frozen || disabled}\n frozen={disabled}\n >\n {state === 'loading' && loadingComponent}\n {state === 'error' && errorComponent}\n {state === 'success' && successComponent}\n {state === 'default' && children}\n </StyledButton>\n );\n};\n\nexport default Button;\n"],"names":["useTheme","React","StyledButton"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../../../src/components/atoms/Button/Button.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport React, { FC } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport {\n BorderRadiusType,\n ColorGradationType,\n ColorType,\n FontColorType,\n ThemeProp,\n VariantType,\n} from '../../../types/defaults';\nimport { PressableSurfaceProps } from '../PressableSurface';\nimport { TextProps } from '../Text';\nimport { StyledButton } from './styled';\n\nexport type ButtonSizeType = 'small' | 'default';\n\nexport type ButtonStateType = 'loading' | 'error' | 'success' | 'default';\n\nexport interface ButtonStateProps {\n buttonSize?: ButtonSizeType;\n fontColor?: FontColorType;\n textComponent?: React.FC<TextProps>;\n text?: string;\n}\n\nexport interface ButtonProps extends PressableSurfaceProps {\n style?: StyleProp<ViewStyle>;\n color?: ColorType;\n variant?: VariantType;\n tone?: ColorGradationType;\n frozen?: boolean | null;\n borderRadius?: BorderRadiusType;\n size?: ButtonSizeType;\n state?: ButtonStateType;\n loadingComponent?: JSX.Element;\n errorComponent?: JSX.Element;\n successComponent?: JSX.Element;\n}\n\nconst Button: FC<ButtonProps> = ({\n children,\n style,\n color = 'primary',\n variant = 'filled',\n tone = 'medium',\n state = 'default',\n loadingComponent,\n errorComponent,\n successComponent,\n size,\n frozen,\n disabled,\n ...rest\n}): JSX.Element => {\n const theme = useTheme() as ThemeProp;\n const _frozen = frozen || state === 'loading';\n let _color: ColorType;\n switch (state) {\n case 'error':\n _color = 'error';\n break;\n\n case 'success':\n _color = 'success';\n break;\n\n default:\n _color = color;\n break;\n }\n\n let _surfaceColor;\n if (variant === 'filled') {\n _surfaceColor = theme.color[_color][tone];\n }\n\n if (disabled) {\n _surfaceColor = theme.color[_color].light;\n }\n\n return (\n <StyledButton\n {...rest}\n accessibilityRole=\"button\"\n style={style}\n color={_color}\n tone={tone}\n surfaceColor={_surfaceColor}\n variant={variant}\n size={size}\n disabled={_frozen || disabled}\n frozen={disabled}\n >\n {state === 'loading' && loadingComponent}\n {state === 'error' && errorComponent}\n {state === 'success' && successComponent}\n {state === 'default' && children}\n </StyledButton>\n );\n};\n\nexport default Button;\n"],"names":["useTheme","React","StyledButton"],"mappings":";;;;;;;;;;AAwCA,MAAM,SAA0B,CAAC;AAAA,EAC/B,QAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAQ,GAAA,SAAA;AAAA,EACR,OAAU,GAAA,QAAA;AAAA,EACV,IAAO,GAAA,QAAA;AAAA,EACP,KAAQ,GAAA,SAAA;AAAA,EACR,gBAAA;AAAA,EACA,cAAA;AAAA,EACA,gBAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAmB,KAAA;AACjB,EAAA,MAAM,QAAQA,cAAS,EAAA,CAAA;AACvB,EAAM,MAAA,OAAA,GAAU,UAAU,KAAU,KAAA,SAAA,CAAA;AACpC,EAAI,IAAA,MAAA,CAAA;AACJ,EAAA,QAAQ,KAAO;AAAA,IACb,KAAK,OAAA;AACH,MAAS,MAAA,GAAA,OAAA,CAAA;AACT,MAAA,MAAA;AAAA,IAEF,KAAK,SAAA;AACH,MAAS,MAAA,GAAA,SAAA,CAAA;AACT,MAAA,MAAA;AAAA,IAEF;AACE,MAAS,MAAA,GAAA,KAAA,CAAA;AACT,MAAA,MAAA;AAAA,GACJ;AAEA,EAAI,IAAA,aAAA,CAAA;AACJ,EAAA,IAAI,YAAY,QAAU,EAAA;AACxB,IAAgB,aAAA,GAAA,KAAA,CAAM,MAAM,MAAQ,CAAA,CAAA,IAAA,CAAA,CAAA;AAAA,GACtC;AAEA,EAAA,IAAI,QAAU,EAAA;AACZ,IAAgB,aAAA,GAAA,KAAA,CAAM,MAAM,MAAQ,CAAA,CAAA,KAAA,CAAA;AAAA,GACtC;AAEA,EAAA,uBACGC,yBAAA,CAAA,aAAA,CAAAC,mBAAA,EAAA;AAAA,IACE,GAAG,IAAA;AAAA,IACJ,iBAAkB,EAAA,QAAA;AAAA,IAClB,KAAA;AAAA,IACA,KAAO,EAAA,MAAA;AAAA,IACP,IAAA;AAAA,IACA,YAAc,EAAA,aAAA;AAAA,IACd,OAAA;AAAA,IACA,IAAA;AAAA,IACA,UAAU,OAAW,IAAA,QAAA;AAAA,IACrB,MAAQ,EAAA,QAAA;AAAA,GAEP,EAAA,KAAA,KAAU,SAAa,IAAA,gBAAA,EACvB,KAAU,KAAA,OAAA,IAAW,cACrB,EAAA,KAAA,KAAU,SAAa,IAAA,gBAAA,EACvB,KAAU,KAAA,SAAA,IAAa,QAC1B,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -7,30 +7,12 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
7
7
|
|
|
8
8
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
14
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
16
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17
|
-
var __spreadValues = (a, b) => {
|
|
18
|
-
for (var prop in b || (b = {}))
|
|
19
|
-
if (__hasOwnProp.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
if (__getOwnPropSymbols)
|
|
22
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
23
|
-
if (__propIsEnum.call(b, prop))
|
|
24
|
-
__defNormalProp(a, prop, b[prop]);
|
|
25
|
-
}
|
|
26
|
-
return a;
|
|
27
|
-
};
|
|
28
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
29
|
-
const Error2 = (props) => {
|
|
30
|
-
return /* @__PURE__ */ React__default["default"].createElement(BaseState, __spreadProps(__spreadValues({}, props), {
|
|
10
|
+
const Error = (props) => {
|
|
11
|
+
return /* @__PURE__ */ React__default["default"].createElement(BaseState, {
|
|
12
|
+
...props,
|
|
31
13
|
icon: "close-circle-outline"
|
|
32
|
-
})
|
|
14
|
+
});
|
|
33
15
|
};
|
|
34
16
|
|
|
35
|
-
module.exports =
|
|
17
|
+
module.exports = Error;
|
|
36
18
|
//# sourceMappingURL=Error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Error.js","sources":["../../../../../../src/components/atoms/Button/States/Error.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ButtonStateProps } from '../Button';\nimport { default as BaseState } from './BaseState';\n\nconst Error: FC<ButtonStateProps> = props => {\n return <BaseState {...props} icon=\"close-circle-outline\" />;\n};\n\nexport default Error;\n"],"names":["
|
|
1
|
+
{"version":3,"file":"Error.js","sources":["../../../../../../src/components/atoms/Button/States/Error.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ButtonStateProps } from '../Button';\nimport { default as BaseState } from './BaseState';\n\nconst Error: FC<ButtonStateProps> = props => {\n return <BaseState {...props} icon=\"close-circle-outline\" />;\n};\n\nexport default Error;\n"],"names":["React"],"mappings":";;;;;;;;;AAIA,MAAM,QAA8B,CAAS,KAAA,KAAA;AAC3C,EAAA,uBAAQA,yBAAA,CAAA,aAAA,CAAA,SAAA,EAAA;AAAA,IAAW,GAAG,KAAA;AAAA,IAAO,IAAK,EAAA,sBAAA;AAAA,GAAuB,CAAA,CAAA;AAC3D;;;;"}
|
|
@@ -7,29 +7,11 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
7
7
|
|
|
8
8
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
9
9
|
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __defProps = Object.defineProperties;
|
|
12
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
13
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
14
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
16
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17
|
-
var __spreadValues = (a, b) => {
|
|
18
|
-
for (var prop in b || (b = {}))
|
|
19
|
-
if (__hasOwnProp.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
if (__getOwnPropSymbols)
|
|
22
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
23
|
-
if (__propIsEnum.call(b, prop))
|
|
24
|
-
__defNormalProp(a, prop, b[prop]);
|
|
25
|
-
}
|
|
26
|
-
return a;
|
|
27
|
-
};
|
|
28
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
29
10
|
const Success = (props) => {
|
|
30
|
-
return /* @__PURE__ */ React__default["default"].createElement(BaseState,
|
|
11
|
+
return /* @__PURE__ */ React__default["default"].createElement(BaseState, {
|
|
12
|
+
...props,
|
|
31
13
|
icon: "checkmark-circle-outline"
|
|
32
|
-
})
|
|
14
|
+
});
|
|
33
15
|
};
|
|
34
16
|
|
|
35
17
|
module.exports = Success;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Success.js","sources":["../../../../../../src/components/atoms/Button/States/Success.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ButtonStateProps } from '../Button';\nimport { default as BaseState } from './BaseState';\n\nconst Success: FC<ButtonStateProps> = props => {\n return <BaseState {...props} icon=\"checkmark-circle-outline\" />;\n};\n\nexport default Success;\n"],"names":["React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Success.js","sources":["../../../../../../src/components/atoms/Button/States/Success.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ButtonStateProps } from '../Button';\nimport { default as BaseState } from './BaseState';\n\nconst Success: FC<ButtonStateProps> = props => {\n return <BaseState {...props} icon=\"checkmark-circle-outline\" />;\n};\n\nexport default Success;\n"],"names":["React"],"mappings":";;;;;;;;;AAIA,MAAM,UAAgC,CAAS,KAAA,KAAA;AAC7C,EAAA,uBAAQA,yBAAA,CAAA,aAAA,CAAA,SAAA,EAAA;AAAA,IAAW,GAAG,KAAA;AAAA,IAAO,IAAK,EAAA,0BAAA;AAAA,GAA2B,CAAA,CAAA;AAC/D;;;;"}
|
|
@@ -8,56 +8,23 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
8
8
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18
|
-
var __spreadValues = (a, b) => {
|
|
19
|
-
for (var prop in b || (b = {}))
|
|
20
|
-
if (__hasOwnProp.call(b, prop))
|
|
21
|
-
__defNormalProp(a, prop, b[prop]);
|
|
22
|
-
if (__getOwnPropSymbols)
|
|
23
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
24
|
-
if (__propIsEnum.call(b, prop))
|
|
25
|
-
__defNormalProp(a, prop, b[prop]);
|
|
26
|
-
}
|
|
27
|
-
return a;
|
|
28
|
-
};
|
|
29
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
30
|
-
var __objRest = (source, exclude) => {
|
|
31
|
-
var target = {};
|
|
32
|
-
for (var prop in source)
|
|
33
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
34
|
-
target[prop] = source[prop];
|
|
35
|
-
if (source != null && __getOwnPropSymbols)
|
|
36
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
37
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
38
|
-
target[prop] = source[prop];
|
|
39
|
-
}
|
|
40
|
-
return target;
|
|
41
|
-
};
|
|
42
|
-
const Card = (_a) => {
|
|
43
|
-
var _b = _a, {
|
|
44
|
-
children,
|
|
45
|
-
elevated = false,
|
|
46
|
-
onPress
|
|
47
|
-
} = _b, rest = __objRest(_b, [
|
|
48
|
-
"children",
|
|
49
|
-
"elevated",
|
|
50
|
-
"onPress"
|
|
51
|
-
]);
|
|
11
|
+
const Card = ({
|
|
12
|
+
children,
|
|
13
|
+
elevated = false,
|
|
14
|
+
onPress,
|
|
15
|
+
...rest
|
|
16
|
+
}) => {
|
|
52
17
|
if (onPress) {
|
|
53
|
-
return /* @__PURE__ */ React__default["default"].createElement(styled.StyledCard,
|
|
18
|
+
return /* @__PURE__ */ React__default["default"].createElement(styled.StyledCard, {
|
|
19
|
+
...rest,
|
|
54
20
|
elevated,
|
|
55
21
|
onPress
|
|
56
|
-
}
|
|
22
|
+
}, children);
|
|
57
23
|
}
|
|
58
|
-
return /* @__PURE__ */ React__default["default"].createElement(Paper,
|
|
24
|
+
return /* @__PURE__ */ React__default["default"].createElement(Paper, {
|
|
25
|
+
...rest,
|
|
59
26
|
elevated
|
|
60
|
-
}
|
|
27
|
+
}, children);
|
|
61
28
|
};
|
|
62
29
|
|
|
63
30
|
module.exports = Card;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../../../../../src/components/atoms/Card/Card.tsx"],"sourcesContent":["import { PressableSurfaceProps } from '@tecsinapse/react-native-kit';\nimport React, { FC } from 'react';\nimport { GestureResponderEvent } from 'react-native';\nimport { Paper, PaperProps } from '../Paper';\nimport { StyledCard } from './styled';\n\nexport interface CardProps\n extends PaperProps,\n Omit<PressableSurfaceProps, 'style'> {\n /** Click handler */\n onPress?: null | ((event: GestureResponderEvent) => void);\n}\n\nconst Card: FC<CardProps> = ({\n children,\n elevated = false,\n onPress,\n ...rest\n}): JSX.Element => {\n if (onPress) {\n return (\n <StyledCard {...rest} elevated={elevated} onPress={onPress}>\n {children}\n </StyledCard>\n );\n }\n\n return (\n <Paper {...rest} elevated={elevated}>\n {children}\n </Paper>\n );\n};\n\nexport default Card;\n"],"names":["React","StyledCard"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../../../../src/components/atoms/Card/Card.tsx"],"sourcesContent":["import { PressableSurfaceProps } from '@tecsinapse/react-native-kit';\nimport React, { FC } from 'react';\nimport { GestureResponderEvent } from 'react-native';\nimport { Paper, PaperProps } from '../Paper';\nimport { StyledCard } from './styled';\n\nexport interface CardProps\n extends PaperProps,\n Omit<PressableSurfaceProps, 'style'> {\n /** Click handler */\n onPress?: null | ((event: GestureResponderEvent) => void);\n}\n\nconst Card: FC<CardProps> = ({\n children,\n elevated = false,\n onPress,\n ...rest\n}): JSX.Element => {\n if (onPress) {\n return (\n <StyledCard {...rest} elevated={elevated} onPress={onPress}>\n {children}\n </StyledCard>\n );\n }\n\n return (\n <Paper {...rest} elevated={elevated}>\n {children}\n </Paper>\n );\n};\n\nexport default Card;\n"],"names":["React","StyledCard"],"mappings":";;;;;;;;;;AAaA,MAAM,OAAsB,CAAC;AAAA,EAC3B,QAAA;AAAA,EACA,QAAW,GAAA,KAAA;AAAA,EACX,OAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAmB,KAAA;AACjB,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,uBACGA,yBAAA,CAAA,aAAA,CAAAC,iBAAA,EAAA;AAAA,MAAY,GAAG,IAAA;AAAA,MAAM,QAAA;AAAA,MAAoB,OAAA;AAAA,KAAA,EACvC,QACH,CAAA,CAAA;AAAA,GAEJ;AAEA,EAAA,uBACGD,yBAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAO,GAAG,IAAA;AAAA,IAAM,QAAA;AAAA,GAAA,EACd,QACH,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -9,63 +9,25 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
__defNormalProp(a, prop, b[prop]);
|
|
23
|
-
if (__getOwnPropSymbols)
|
|
24
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
25
|
-
if (__propIsEnum.call(b, prop))
|
|
26
|
-
__defNormalProp(a, prop, b[prop]);
|
|
27
|
-
}
|
|
28
|
-
return a;
|
|
29
|
-
};
|
|
30
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
31
|
-
var __objRest = (source, exclude) => {
|
|
32
|
-
var target = {};
|
|
33
|
-
for (var prop in source)
|
|
34
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35
|
-
target[prop] = source[prop];
|
|
36
|
-
if (source != null && __getOwnPropSymbols)
|
|
37
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
38
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
39
|
-
target[prop] = source[prop];
|
|
40
|
-
}
|
|
41
|
-
return target;
|
|
42
|
-
};
|
|
43
|
-
const Checkbox = (_a) => {
|
|
44
|
-
var _b = _a, {
|
|
45
|
-
children,
|
|
46
|
-
checked,
|
|
47
|
-
onChange,
|
|
48
|
-
color = "primary",
|
|
49
|
-
colorTone = "medium",
|
|
50
|
-
labelPosition = "left",
|
|
51
|
-
disabled = false
|
|
52
|
-
} = _b, rest = __objRest(_b, [
|
|
53
|
-
"children",
|
|
54
|
-
"checked",
|
|
55
|
-
"onChange",
|
|
56
|
-
"color",
|
|
57
|
-
"colorTone",
|
|
58
|
-
"labelPosition",
|
|
59
|
-
"disabled"
|
|
60
|
-
]);
|
|
12
|
+
const Checkbox = ({
|
|
13
|
+
children,
|
|
14
|
+
checked,
|
|
15
|
+
onChange,
|
|
16
|
+
color = "primary",
|
|
17
|
+
colorTone = "medium",
|
|
18
|
+
labelPosition = "left",
|
|
19
|
+
disabled = false,
|
|
20
|
+
...rest
|
|
21
|
+
}) => {
|
|
61
22
|
const handleChange = () => {
|
|
62
23
|
onChange && onChange(!checked);
|
|
63
24
|
};
|
|
64
|
-
return /* @__PURE__ */ React__default["default"].createElement(reactNative.Pressable,
|
|
25
|
+
return /* @__PURE__ */ React__default["default"].createElement(reactNative.Pressable, {
|
|
26
|
+
...rest,
|
|
65
27
|
disabled,
|
|
66
28
|
onPress: handleChange,
|
|
67
29
|
accessibilityRole: "checkbox"
|
|
68
|
-
}
|
|
30
|
+
}, /* @__PURE__ */ React__default["default"].createElement(styled.ViewStyled, null, labelPosition === "left" && children, checked && /* @__PURE__ */ React__default["default"].createElement(styled.IconViewStyled, null, /* @__PURE__ */ React__default["default"].createElement(styled.IconCheckedStyled, {
|
|
69
31
|
color,
|
|
70
32
|
colorTone
|
|
71
33
|
}, /* @__PURE__ */ React__default["default"].createElement(Icon, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../../../../../src/components/atoms/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Pressable, StyleProp, ViewStyle } from 'react-native';\nimport { ColorGradationType, ColorType } from '@tecsinapse/react-core';\nimport { Icon } from '../Icon';\nimport {\n IconUncheckedStyled,\n IconCheckedStyled,\n ViewStyled,\n IconViewStyled,\n} from './styled';\n\nexport interface CheckboxProps {\n /** Element is checked */\n checked?: boolean;\n /** Change handler */\n onChange?: (checked: boolean) => void;\n /** Position of children */\n labelPosition?: 'left' | 'right';\n /** Element is not clickable */\n disabled?: boolean;\n /** Color definition from theme */\n color?: ColorType;\n /** Color gradation from theme */\n colorTone?: ColorGradationType;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Checkbox: FC<CheckboxProps> = ({\n children,\n checked,\n onChange,\n color = 'primary',\n colorTone = 'medium',\n labelPosition = 'left',\n disabled = false,\n ...rest\n}) => {\n const handleChange = () => {\n onChange && onChange(!checked);\n };\n\n return (\n <Pressable\n {...rest}\n disabled={disabled}\n onPress={handleChange}\n accessibilityRole=\"checkbox\"\n >\n <ViewStyled>\n {labelPosition === 'left' && children}\n {checked && (\n <IconViewStyled>\n <IconCheckedStyled color={color} colorTone={colorTone}>\n <Icon\n name=\"check\"\n fontColor=\"light\"\n type=\"material-community\"\n size=\"centi\"\n />\n </IconCheckedStyled>\n </IconViewStyled>\n )}\n {!checked && (\n <IconViewStyled>\n <IconUncheckedStyled color={color} colorTone={colorTone}>\n <Icon\n name=\"checkbox-blank\"\n fontColor=\"light\"\n type=\"material-community\"\n size=\"centi\"\n />\n </IconUncheckedStyled>\n </IconViewStyled>\n )}\n {labelPosition === 'right' && children}\n </ViewStyled>\n </Pressable>\n );\n};\n\nexport default Checkbox;\n"],"names":["React","Pressable","ViewStyled","IconViewStyled","IconCheckedStyled","IconUncheckedStyled"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":["../../../../../src/components/atoms/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Pressable, StyleProp, ViewStyle } from 'react-native';\nimport { ColorGradationType, ColorType } from '@tecsinapse/react-core';\nimport { Icon } from '../Icon';\nimport {\n IconUncheckedStyled,\n IconCheckedStyled,\n ViewStyled,\n IconViewStyled,\n} from './styled';\n\nexport interface CheckboxProps {\n /** Element is checked */\n checked?: boolean;\n /** Change handler */\n onChange?: (checked: boolean) => void;\n /** Position of children */\n labelPosition?: 'left' | 'right';\n /** Element is not clickable */\n disabled?: boolean;\n /** Color definition from theme */\n color?: ColorType;\n /** Color gradation from theme */\n colorTone?: ColorGradationType;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Checkbox: FC<CheckboxProps> = ({\n children,\n checked,\n onChange,\n color = 'primary',\n colorTone = 'medium',\n labelPosition = 'left',\n disabled = false,\n ...rest\n}) => {\n const handleChange = () => {\n onChange && onChange(!checked);\n };\n\n return (\n <Pressable\n {...rest}\n disabled={disabled}\n onPress={handleChange}\n accessibilityRole=\"checkbox\"\n >\n <ViewStyled>\n {labelPosition === 'left' && children}\n {checked && (\n <IconViewStyled>\n <IconCheckedStyled color={color} colorTone={colorTone}>\n <Icon\n name=\"check\"\n fontColor=\"light\"\n type=\"material-community\"\n size=\"centi\"\n />\n </IconCheckedStyled>\n </IconViewStyled>\n )}\n {!checked && (\n <IconViewStyled>\n <IconUncheckedStyled color={color} colorTone={colorTone}>\n <Icon\n name=\"checkbox-blank\"\n fontColor=\"light\"\n type=\"material-community\"\n size=\"centi\"\n />\n </IconUncheckedStyled>\n </IconViewStyled>\n )}\n {labelPosition === 'right' && children}\n </ViewStyled>\n </Pressable>\n );\n};\n\nexport default Checkbox;\n"],"names":["React","Pressable","ViewStyled","IconViewStyled","IconCheckedStyled","IconUncheckedStyled"],"mappings":";;;;;;;;;;;AA2BA,MAAM,WAA8B,CAAC;AAAA,EACnC,QAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAQ,GAAA,SAAA;AAAA,EACR,SAAY,GAAA,QAAA;AAAA,EACZ,aAAgB,GAAA,MAAA;AAAA,EAChB,QAAW,GAAA,KAAA;AAAA,EACR,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EAAA,MAAM,eAAe,MAAM;AACzB,IAAY,QAAA,IAAA,QAAA,CAAS,CAAC,OAAO,CAAA,CAAA;AAAA,GAC/B,CAAA;AAEA,EAAA,uBACGA,yBAAA,CAAA,aAAA,CAAAC,qBAAA,EAAA;AAAA,IACE,GAAG,IAAA;AAAA,IACJ,QAAA;AAAA,IACA,OAAS,EAAA,YAAA;AAAA,IACT,iBAAkB,EAAA,UAAA;AAAA,GAElB,kBAAAD,yBAAA,CAAA,aAAA,CAACE,yBACE,aAAkB,KAAA,MAAA,IAAU,UAC5B,OACC,oBAAAF,yBAAA,CAAA,aAAA,CAACG,6CACEH,yBAAA,CAAA,aAAA,CAAAI,wBAAA,EAAA;AAAA,IAAkB,KAAA;AAAA,IAAc,SAAA;AAAA,GAAA,kBAC9BJ,yBAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IACC,IAAK,EAAA,OAAA;AAAA,IACL,SAAU,EAAA,OAAA;AAAA,IACV,IAAK,EAAA,oBAAA;AAAA,IACL,IAAK,EAAA,OAAA;AAAA,GACP,CACF,CACF,CAAA,EAED,CAAC,OACA,oBAAAA,yBAAA,CAAA,aAAA,CAACG,6CACEH,yBAAA,CAAA,aAAA,CAAAK,0BAAA,EAAA;AAAA,IAAoB,KAAA;AAAA,IAAc,SAAA;AAAA,GAAA,kBAChCL,yBAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IACC,IAAK,EAAA,gBAAA;AAAA,IACL,SAAU,EAAA,OAAA;AAAA,IACV,IAAK,EAAA,oBAAA;AAAA,IACL,IAAK,EAAA,OAAA;AAAA,GACP,CACF,CACF,CAAA,EAED,aAAkB,KAAA,OAAA,IAAW,QAChC,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -7,37 +7,10 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
7
7
|
|
|
8
8
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15
|
-
var __spreadValues = (a, b) => {
|
|
16
|
-
for (var prop in b || (b = {}))
|
|
17
|
-
if (__hasOwnProp.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
if (__getOwnPropSymbols)
|
|
20
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
21
|
-
if (__propIsEnum.call(b, prop))
|
|
22
|
-
__defNormalProp(a, prop, b[prop]);
|
|
23
|
-
}
|
|
24
|
-
return a;
|
|
25
|
-
};
|
|
26
|
-
var __objRest = (source, exclude) => {
|
|
27
|
-
var target = {};
|
|
28
|
-
for (var prop in source)
|
|
29
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
30
|
-
target[prop] = source[prop];
|
|
31
|
-
if (source != null && __getOwnPropSymbols)
|
|
32
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
33
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
34
|
-
target[prop] = source[prop];
|
|
35
|
-
}
|
|
36
|
-
return target;
|
|
37
|
-
};
|
|
38
|
-
const Divider = (_a) => {
|
|
39
|
-
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
40
|
-
return /* @__PURE__ */ React__default["default"].createElement(styled.StyledDivider, __spreadValues({}, rest), children);
|
|
10
|
+
const Divider = ({ children, ...rest }) => {
|
|
11
|
+
return /* @__PURE__ */ React__default["default"].createElement(styled.StyledDivider, {
|
|
12
|
+
...rest
|
|
13
|
+
}, children);
|
|
41
14
|
};
|
|
42
15
|
|
|
43
16
|
module.exports = Divider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.js","sources":["../../../../../src/components/atoms/Divider/Divider.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ViewProps } from 'react-native';\nimport { StyledDivider } from './styled';\n\nexport interface DividerProps extends ViewProps {\n linePosition: 'top' | 'bottom';\n noLine?: boolean;\n}\n\nconst Divider: FC<DividerProps> = ({ children, ...rest }) => {\n return <StyledDivider {...rest}>{children}</StyledDivider>;\n};\n\nexport default Divider;\n"],"names":["React","StyledDivider"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Divider.js","sources":["../../../../../src/components/atoms/Divider/Divider.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ViewProps } from 'react-native';\nimport { StyledDivider } from './styled';\n\nexport interface DividerProps extends ViewProps {\n linePosition: 'top' | 'bottom';\n noLine?: boolean;\n}\n\nconst Divider: FC<DividerProps> = ({ children, ...rest }) => {\n return <StyledDivider {...rest}>{children}</StyledDivider>;\n};\n\nexport default Divider;\n"],"names":["React","StyledDivider"],"mappings":";;;;;;;;;AASA,MAAM,OAA4B,GAAA,CAAC,EAAE,QAAA,EAAA,GAAa,MAAW,KAAA;AAC3D,EAAA,uBAAQA,yBAAA,CAAA,aAAA,CAAAC,oBAAA,EAAA;AAAA,IAAe,GAAG,IAAA;AAAA,GAAA,EAAO,QAAS,CAAA,CAAA;AAC5C;;;;"}
|
|
@@ -8,62 +8,22 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
8
8
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
var __defProps = Object.defineProperties;
|
|
13
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
14
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
17
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18
|
-
var __spreadValues = (a, b) => {
|
|
19
|
-
for (var prop in b || (b = {}))
|
|
20
|
-
if (__hasOwnProp.call(b, prop))
|
|
21
|
-
__defNormalProp(a, prop, b[prop]);
|
|
22
|
-
if (__getOwnPropSymbols)
|
|
23
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
24
|
-
if (__propIsEnum.call(b, prop))
|
|
25
|
-
__defNormalProp(a, prop, b[prop]);
|
|
26
|
-
}
|
|
27
|
-
return a;
|
|
28
|
-
};
|
|
29
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
30
|
-
var __objRest = (source, exclude) => {
|
|
31
|
-
var target = {};
|
|
32
|
-
for (var prop in source)
|
|
33
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
34
|
-
target[prop] = source[prop];
|
|
35
|
-
if (source != null && __getOwnPropSymbols)
|
|
36
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
37
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
38
|
-
target[prop] = source[prop];
|
|
39
|
-
}
|
|
40
|
-
return target;
|
|
41
|
-
};
|
|
42
|
-
const GroupButton = (_a) => {
|
|
43
|
-
var _b = _a, { style } = _b, rest = __objRest(_b, ["style"]);
|
|
11
|
+
const GroupButton = ({ style, ...rest }) => {
|
|
44
12
|
return /* @__PURE__ */ React__default["default"].createElement(styled.StyledGroupButton, {
|
|
45
13
|
style
|
|
46
14
|
}, groupOptions(rest));
|
|
47
15
|
};
|
|
48
|
-
const groupOptions = (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"options",
|
|
58
|
-
"renderOption",
|
|
59
|
-
"renderKey",
|
|
60
|
-
"onChange",
|
|
61
|
-
"value",
|
|
62
|
-
"disableAllOptions"
|
|
63
|
-
]);
|
|
16
|
+
const groupOptions = ({
|
|
17
|
+
options,
|
|
18
|
+
renderOption,
|
|
19
|
+
renderKey,
|
|
20
|
+
onChange,
|
|
21
|
+
value,
|
|
22
|
+
disableAllOptions,
|
|
23
|
+
...rest
|
|
24
|
+
}) => {
|
|
64
25
|
const theme = react.useTheme();
|
|
65
|
-
return options
|
|
66
|
-
var _a;
|
|
26
|
+
return options?.map((option, idx) => {
|
|
67
27
|
const {
|
|
68
28
|
value: optionValue,
|
|
69
29
|
options: {
|
|
@@ -73,11 +33,11 @@ const groupOptions = (_c) => {
|
|
|
73
33
|
activeBackgroundColorTone,
|
|
74
34
|
inactiveBackgroundColor,
|
|
75
35
|
inactiveBackgroundColorTone,
|
|
76
|
-
disabled = disableAllOptions ||
|
|
36
|
+
disabled = disableAllOptions || option.options?.disabled
|
|
77
37
|
} = {}
|
|
78
38
|
} = option;
|
|
79
|
-
const key = renderKey
|
|
80
|
-
const active = key ===
|
|
39
|
+
const key = renderKey?.(optionValue);
|
|
40
|
+
const active = key === renderKey?.(value);
|
|
81
41
|
const isFirst = idx === 0;
|
|
82
42
|
const isLast = idx === options.length - 1;
|
|
83
43
|
let colors = theme.miscellaneous.surfaceColor;
|
|
@@ -89,15 +49,17 @@ const groupOptions = (_c) => {
|
|
|
89
49
|
}
|
|
90
50
|
return /* @__PURE__ */ React__default["default"].createElement(styled.StyledOption, {
|
|
91
51
|
key
|
|
92
|
-
}, /* @__PURE__ */ React__default["default"].createElement(styled.StyledPressable,
|
|
52
|
+
}, /* @__PURE__ */ React__default["default"].createElement(styled.StyledPressable, {
|
|
53
|
+
...rest,
|
|
54
|
+
...option.options,
|
|
93
55
|
disabled,
|
|
94
56
|
isActive: active,
|
|
95
57
|
isFirstOption: isFirst,
|
|
96
58
|
isLastOption: isLast,
|
|
97
|
-
onPress: () => onChange
|
|
59
|
+
onPress: () => onChange?.(optionValue),
|
|
98
60
|
surfaceColor: colors,
|
|
99
61
|
style: active ? activeStyle : inactiveStyle
|
|
100
|
-
}
|
|
62
|
+
}, renderOption?.(option.value, active)), !isLast && /* @__PURE__ */ React__default["default"].createElement(styled.StyledDivider, null));
|
|
101
63
|
});
|
|
102
64
|
};
|
|
103
65
|
|