@tecsinapse/react-native-kit 1.22.6 → 1.22.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/Avatar/Avatar.js +3 -21
- package/dist/cjs/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/cjs/components/atoms/Badge/Badge.js +9 -43
- package/dist/cjs/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/cjs/components/atoms/BottomNavigator/BottomNavigator.js +14 -43
- package/dist/cjs/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -1
- package/dist/cjs/components/atoms/BottomNavigator/Item.js +13 -43
- package/dist/cjs/components/atoms/BottomNavigator/Item.js.map +1 -1
- package/dist/cjs/components/atoms/Button/Button.js +9 -42
- 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/Loading.js +3 -21
- package/dist/cjs/components/atoms/Button/States/Loading.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/GroupButton/GroupButtonOption.js +3 -21
- package/dist/cjs/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/cjs/components/atoms/Header/Header.d.ts +1 -0
- package/dist/cjs/components/atoms/Header/Header.js +25 -51
- package/dist/cjs/components/atoms/Header/Header.js.map +1 -1
- package/dist/cjs/components/atoms/Header/styled.js +1 -0
- package/dist/cjs/components/atoms/Header/styled.js.map +1 -1
- package/dist/cjs/components/atoms/Input/Input.js +32 -84
- package/dist/cjs/components/atoms/Input/Input.js.map +1 -1
- package/dist/cjs/components/atoms/InputMask/InputMask.js +29 -83
- package/dist/cjs/components/atoms/InputMask/InputMask.js.map +1 -1
- package/dist/cjs/components/atoms/Modal/ModalGroupManager.js +5 -33
- package/dist/cjs/components/atoms/Modal/ModalGroupManager.js.map +1 -1
- package/dist/cjs/components/atoms/Modal/ModalLifecycleHandler.js +67 -86
- package/dist/cjs/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -1
- package/dist/cjs/components/atoms/Modal/useLazyModalManager.js +1 -1
- package/dist/cjs/components/atoms/Modal/useLazyModalManager.js.map +1 -1
- package/dist/cjs/components/atoms/Modal/useModalManager.js +1 -1
- package/dist/cjs/components/atoms/Modal/useModalManager.js.map +1 -1
- package/dist/cjs/components/atoms/Skeleton/Pulse.js +4 -5
- package/dist/cjs/components/atoms/Skeleton/Pulse.js.map +1 -1
- package/dist/cjs/components/atoms/Skeleton/Skeleton.js +13 -47
- package/dist/cjs/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/cjs/components/atoms/Skeleton/Wave.js +5 -6
- package/dist/cjs/components/atoms/Skeleton/Wave.js.map +1 -1
- package/dist/cjs/components/atoms/SnappingSlider/SnappingSlider.js +11 -43
- package/dist/cjs/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -1
- package/dist/cjs/components/atoms/Tag/Tag.js +5 -33
- package/dist/cjs/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/cjs/components/atoms/Text/Text.js +4 -31
- package/dist/cjs/components/atoms/Text/Text.js.map +1 -1
- package/dist/cjs/components/atoms/Text/styled.js +3 -3
- package/dist/cjs/components/atoms/Text/styled.js.map +1 -1
- package/dist/cjs/components/atoms/TextArea/TextArea.js +29 -83
- package/dist/cjs/components/atoms/TextArea/TextArea.js.map +1 -1
- package/dist/cjs/components/molecules/Calendar/Calendar.js +8 -40
- package/dist/cjs/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/cjs/components/molecules/DatePicker/DatePicker.js +15 -48
- package/dist/cjs/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js +12 -43
- package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/cjs/components/molecules/DateTimeSelector/DateTimeSelector.js +8 -40
- package/dist/cjs/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/cjs/components/molecules/Grid/Grid.js +20 -55
- package/dist/cjs/components/molecules/Grid/Grid.js.map +1 -1
- package/dist/cjs/components/molecules/Grid/Item/Item.js +28 -75
- package/dist/cjs/components/molecules/Grid/Item/Item.js.map +1 -1
- package/dist/cjs/components/molecules/IconTextButton/IconTextButton.js +13 -47
- package/dist/cjs/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
- package/dist/cjs/components/molecules/IconTextButton/TextComponent.js +7 -23
- package/dist/cjs/components/molecules/IconTextButton/TextComponent.js.map +1 -1
- package/dist/cjs/components/molecules/IconTextButton/styled.js +3 -3
- package/dist/cjs/components/molecules/IconTextButton/styled.js.map +1 -1
- package/dist/cjs/components/molecules/InputPassword/InputPassword.js +4 -35
- package/dist/cjs/components/molecules/InputPassword/InputPassword.js.map +1 -1
- package/dist/cjs/components/molecules/LabeledSwitch/LabelComponent.js +15 -47
- package/dist/cjs/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
- package/dist/cjs/components/molecules/LabeledSwitch/LabeledSwitch.js +14 -49
- package/dist/cjs/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
- package/dist/cjs/components/molecules/LabeledSwitch/styled.js +2 -2
- package/dist/cjs/components/molecules/LabeledSwitch/styled.js.map +1 -1
- package/dist/cjs/components/molecules/Select/Modal.js +25 -71
- package/dist/cjs/components/molecules/Select/Modal.js.map +1 -1
- package/dist/cjs/components/molecules/Select/Select.js +37 -91
- package/dist/cjs/components/molecules/Select/Select.js.map +1 -1
- package/dist/cjs/components/molecules/Select/styled.js +3 -6
- package/dist/cjs/components/molecules/Select/styled.js.map +1 -1
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js +10 -41
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/esm/components/atoms/Avatar/Avatar.js +3 -21
- package/dist/esm/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/esm/components/atoms/Badge/Badge.js +9 -43
- package/dist/esm/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/esm/components/atoms/BottomNavigator/BottomNavigator.js +14 -43
- package/dist/esm/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -1
- package/dist/esm/components/atoms/BottomNavigator/Item.js +13 -43
- package/dist/esm/components/atoms/BottomNavigator/Item.js.map +1 -1
- package/dist/esm/components/atoms/Button/Button.js +9 -42
- package/dist/esm/components/atoms/Button/Button.js.map +1 -1
- package/dist/esm/components/atoms/Button/States/Error.js +6 -24
- package/dist/esm/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/esm/components/atoms/Button/States/Loading.js +3 -21
- package/dist/esm/components/atoms/Button/States/Loading.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/GroupButton/GroupButtonOption.js +3 -21
- package/dist/esm/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/esm/components/atoms/Header/Header.d.ts +1 -0
- package/dist/esm/components/atoms/Header/Header.js +26 -52
- package/dist/esm/components/atoms/Header/Header.js.map +1 -1
- package/dist/esm/components/atoms/Header/styled.js +2 -1
- package/dist/esm/components/atoms/Header/styled.js.map +1 -1
- package/dist/esm/components/atoms/Input/Input.js +32 -84
- package/dist/esm/components/atoms/Input/Input.js.map +1 -1
- package/dist/esm/components/atoms/InputMask/InputMask.js +29 -83
- package/dist/esm/components/atoms/InputMask/InputMask.js.map +1 -1
- package/dist/esm/components/atoms/Modal/ModalGroupManager.js +5 -33
- package/dist/esm/components/atoms/Modal/ModalGroupManager.js.map +1 -1
- package/dist/esm/components/atoms/Modal/ModalLifecycleHandler.js +67 -86
- package/dist/esm/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -1
- package/dist/esm/components/atoms/Modal/useLazyModalManager.js +1 -1
- package/dist/esm/components/atoms/Modal/useLazyModalManager.js.map +1 -1
- package/dist/esm/components/atoms/Modal/useModalManager.js +1 -1
- package/dist/esm/components/atoms/Modal/useModalManager.js.map +1 -1
- package/dist/esm/components/atoms/Skeleton/Pulse.js +4 -5
- package/dist/esm/components/atoms/Skeleton/Pulse.js.map +1 -1
- package/dist/esm/components/atoms/Skeleton/Skeleton.js +13 -47
- package/dist/esm/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/esm/components/atoms/Skeleton/Wave.js +5 -6
- package/dist/esm/components/atoms/Skeleton/Wave.js.map +1 -1
- package/dist/esm/components/atoms/SnappingSlider/SnappingSlider.js +11 -43
- package/dist/esm/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -1
- package/dist/esm/components/atoms/Tag/Tag.js +5 -33
- package/dist/esm/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/esm/components/atoms/Text/Text.js +4 -31
- package/dist/esm/components/atoms/Text/Text.js.map +1 -1
- package/dist/esm/components/atoms/Text/styled.js +3 -3
- package/dist/esm/components/atoms/Text/styled.js.map +1 -1
- package/dist/esm/components/atoms/TextArea/TextArea.js +29 -83
- package/dist/esm/components/atoms/TextArea/TextArea.js.map +1 -1
- package/dist/esm/components/molecules/Calendar/Calendar.js +8 -40
- package/dist/esm/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/esm/components/molecules/DatePicker/DatePicker.js +15 -48
- package/dist/esm/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js +12 -43
- package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +8 -40
- package/dist/esm/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/esm/components/molecules/Grid/Grid.js +20 -55
- package/dist/esm/components/molecules/Grid/Grid.js.map +1 -1
- package/dist/esm/components/molecules/Grid/Item/Item.js +28 -75
- package/dist/esm/components/molecules/Grid/Item/Item.js.map +1 -1
- package/dist/esm/components/molecules/IconTextButton/IconTextButton.js +13 -47
- package/dist/esm/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
- package/dist/esm/components/molecules/IconTextButton/TextComponent.js +7 -23
- package/dist/esm/components/molecules/IconTextButton/TextComponent.js.map +1 -1
- package/dist/esm/components/molecules/IconTextButton/styled.js +3 -3
- package/dist/esm/components/molecules/IconTextButton/styled.js.map +1 -1
- package/dist/esm/components/molecules/InputPassword/InputPassword.js +4 -35
- package/dist/esm/components/molecules/InputPassword/InputPassword.js.map +1 -1
- package/dist/esm/components/molecules/LabeledSwitch/LabelComponent.js +15 -47
- package/dist/esm/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
- package/dist/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +14 -49
- package/dist/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
- package/dist/esm/components/molecules/LabeledSwitch/styled.js +2 -2
- package/dist/esm/components/molecules/LabeledSwitch/styled.js.map +1 -1
- package/dist/esm/components/molecules/Select/Modal.js +25 -71
- package/dist/esm/components/molecules/Select/Modal.js.map +1 -1
- package/dist/esm/components/molecules/Select/Select.js +38 -92
- package/dist/esm/components/molecules/Select/Select.js.map +1 -1
- package/dist/esm/components/molecules/Select/styled.js +3 -6
- package/dist/esm/components/molecules/Select/styled.js.map +1 -1
- package/dist/esm/components/molecules/Snackbar/Snackbar.js +10 -41
- package/dist/esm/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sources":["../../../../../src/components/atoms/Text/Text.tsx"],"sourcesContent":["import { TextProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { StyledNativeText } from './styled';\n\nexport type TextNativeProps = TextProps;\n\nconst Text: FC<TextNativeProps> = ({ children, ...rest }): JSX.Element => {\n return <StyledNativeText {...rest}>{children}</StyledNativeText>;\n};\n\nexport default Text;\n"],"names":["React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../../../src/components/atoms/Text/Text.tsx"],"sourcesContent":["import { TextProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { StyledNativeText } from './styled';\n\nexport type TextNativeProps = TextProps;\n\nconst Text: FC<TextNativeProps> = ({ children, ...rest }): JSX.Element => {\n return <StyledNativeText {...rest}>{children}</StyledNativeText>;\n};\n\nexport default Text;\n"],"names":["React"],"mappings":";;;AAMA,MAAM,IAA4B,GAAA,CAAC,EAAE,QAAA,EAAA,GAAa,MAAwB,KAAA;AACxE,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAA,gBAAA,EAAA;AAAA,IAAkB,GAAG,IAAA;AAAA,GAAA,EAAO,QAAS,CAAA,CAAA;AAC/C;;;;"}
|
|
@@ -7,11 +7,11 @@ const fontStyles = ({
|
|
|
7
7
|
fontStack = "default",
|
|
8
8
|
fontWeight = "regular"
|
|
9
9
|
}) => {
|
|
10
|
-
const fontFamily =
|
|
11
|
-
const fontStyle = theme
|
|
10
|
+
const fontFamily = theme?.font.stack[fontStack] || "";
|
|
11
|
+
const fontStyle = theme?.font.files[fontWeight];
|
|
12
12
|
return css`
|
|
13
13
|
${Platform.OS === "android" ? "font-weight: normal;" : void 0}
|
|
14
|
-
font-family: ${fontStyle
|
|
14
|
+
font-family: ${fontStyle?.replace("{0}", fontFamily)};
|
|
15
15
|
`;
|
|
16
16
|
};
|
|
17
17
|
const StyledNativeText = styled(Text)(fontStyles);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../src/components/atoms/Text/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport {\n FontStackType,\n FontWeightType,\n StyleProps,\n Text,\n} from '@tecsinapse/react-core';\nimport { Platform } from 'react-native';\nimport { TextNativeProps } from './Text';\n\nexport interface Font {\n fontStack?: FontStackType;\n fontWeight?: FontWeightType;\n}\n\nexport const fontStyles = ({\n theme,\n fontStack = 'default',\n fontWeight = 'regular',\n}: Partial<Font & Partial<StyleProps>>) => {\n const fontFamily = theme?.font.stack[fontStack] || '';\n const fontStyle = theme?.font.files[fontWeight];\n return css`\n ${Platform.OS === 'android' ? 'font-weight: normal;' : undefined}\n font-family: ${fontStyle?.replace('{0}', fontFamily)};\n `;\n};\n\nexport const StyledNativeText = styled(Text)<\n Font & Partial<TextNativeProps> & Partial<StyleProps>\n>(fontStyles);\n"],"names":[],"mappings":";;;;AAeO,MAAM,aAAa,CAAC;AAAA,EACzB,KAAA;AAAA,EACA,SAAY,GAAA,SAAA;AAAA,EACZ,UAAa,GAAA,SAAA;AACf,CAA2C,KAAA;AACzC,EAAA,MAAM,UAAa,GAAA,
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../src/components/atoms/Text/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport {\n FontStackType,\n FontWeightType,\n StyleProps,\n Text,\n} from '@tecsinapse/react-core';\nimport { Platform } from 'react-native';\nimport { TextNativeProps } from './Text';\n\nexport interface Font {\n fontStack?: FontStackType;\n fontWeight?: FontWeightType;\n}\n\nexport const fontStyles = ({\n theme,\n fontStack = 'default',\n fontWeight = 'regular',\n}: Partial<Font & Partial<StyleProps>>) => {\n const fontFamily = theme?.font.stack[fontStack] || '';\n const fontStyle = theme?.font.files[fontWeight];\n return css`\n ${Platform.OS === 'android' ? 'font-weight: normal;' : undefined}\n font-family: ${fontStyle?.replace('{0}', fontFamily)};\n `;\n};\n\nexport const StyledNativeText = styled(Text)<\n Font & Partial<TextNativeProps> & Partial<StyleProps>\n>(fontStyles);\n"],"names":[],"mappings":";;;;AAeO,MAAM,aAAa,CAAC;AAAA,EACzB,KAAA;AAAA,EACA,SAAY,GAAA,SAAA;AAAA,EACZ,UAAa,GAAA,SAAA;AACf,CAA2C,KAAA;AACzC,EAAA,MAAM,UAAa,GAAA,KAAA,EAAO,IAAK,CAAA,KAAA,CAAM,SAAc,CAAA,IAAA,EAAA,CAAA;AACnD,EAAM,MAAA,SAAA,GAAY,KAAO,EAAA,IAAA,CAAK,KAAM,CAAA,UAAA,CAAA,CAAA;AACpC,EAAO,OAAA,GAAA,CAAA;AAAA,IACH,EAAA,QAAA,CAAS,EAAO,KAAA,SAAA,GAAY,sBAAyB,GAAA,KAAA,CAAA,CAAA;AAAA,iBACxC,EAAA,SAAA,EAAW,OAAQ,CAAA,KAAA,EAAO,UAAU,CAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAEvD,EAAA;AAEO,MAAM,gBAAmB,GAAA,MAAA,CAAO,IAAI,CAAA,CAEzC,UAAU;;;;"}
|
|
@@ -3,87 +3,32 @@ import { useInputFocus, TextArea as TextArea$1 } from '@tecsinapse/react-core';
|
|
|
3
3
|
import Text from '../Text/Text.js';
|
|
4
4
|
import { StyledNativeInput } from './styled.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
-
target[prop] = source[prop];
|
|
34
|
-
}
|
|
35
|
-
return target;
|
|
36
|
-
};
|
|
37
|
-
const TextArea = (_a) => {
|
|
38
|
-
var _b = _a, {
|
|
39
|
-
label,
|
|
40
|
-
labelColor,
|
|
41
|
-
labelColorVariant,
|
|
42
|
-
labelColorTone,
|
|
43
|
-
labelTypography,
|
|
44
|
-
labelStack,
|
|
45
|
-
labelWeight,
|
|
46
|
-
leftComponent,
|
|
47
|
-
rightComponent,
|
|
48
|
-
disabled,
|
|
49
|
-
style,
|
|
50
|
-
borderColor,
|
|
51
|
-
borderColorGradation,
|
|
52
|
-
inputFontStack = "default",
|
|
53
|
-
inputFontWeight = "bold",
|
|
54
|
-
inputContainerStyle,
|
|
55
|
-
variant = "default",
|
|
56
|
-
hintComponent,
|
|
57
|
-
hint,
|
|
58
|
-
onFocus,
|
|
59
|
-
onBlur,
|
|
60
|
-
value,
|
|
61
|
-
maxLength
|
|
62
|
-
} = _b, rest = __objRest(_b, [
|
|
63
|
-
"label",
|
|
64
|
-
"labelColor",
|
|
65
|
-
"labelColorVariant",
|
|
66
|
-
"labelColorTone",
|
|
67
|
-
"labelTypography",
|
|
68
|
-
"labelStack",
|
|
69
|
-
"labelWeight",
|
|
70
|
-
"leftComponent",
|
|
71
|
-
"rightComponent",
|
|
72
|
-
"disabled",
|
|
73
|
-
"style",
|
|
74
|
-
"borderColor",
|
|
75
|
-
"borderColorGradation",
|
|
76
|
-
"inputFontStack",
|
|
77
|
-
"inputFontWeight",
|
|
78
|
-
"inputContainerStyle",
|
|
79
|
-
"variant",
|
|
80
|
-
"hintComponent",
|
|
81
|
-
"hint",
|
|
82
|
-
"onFocus",
|
|
83
|
-
"onBlur",
|
|
84
|
-
"value",
|
|
85
|
-
"maxLength"
|
|
86
|
-
]);
|
|
6
|
+
const TextArea = ({
|
|
7
|
+
label,
|
|
8
|
+
labelColor,
|
|
9
|
+
labelColorVariant,
|
|
10
|
+
labelColorTone,
|
|
11
|
+
labelTypography,
|
|
12
|
+
labelStack,
|
|
13
|
+
labelWeight,
|
|
14
|
+
leftComponent,
|
|
15
|
+
rightComponent,
|
|
16
|
+
disabled,
|
|
17
|
+
style,
|
|
18
|
+
borderColor,
|
|
19
|
+
borderColorGradation,
|
|
20
|
+
inputFontStack = "default",
|
|
21
|
+
inputFontWeight = "bold",
|
|
22
|
+
inputContainerStyle,
|
|
23
|
+
variant = "default",
|
|
24
|
+
hintComponent,
|
|
25
|
+
hint,
|
|
26
|
+
onFocus,
|
|
27
|
+
onBlur,
|
|
28
|
+
value,
|
|
29
|
+
maxLength,
|
|
30
|
+
...rest
|
|
31
|
+
}) => {
|
|
87
32
|
const { focused, handleBlur, handleFocus } = useInputFocus(
|
|
88
33
|
onFocus,
|
|
89
34
|
onBlur,
|
|
@@ -112,7 +57,8 @@ const TextArea = (_a) => {
|
|
|
112
57
|
style,
|
|
113
58
|
TextComponent: Text,
|
|
114
59
|
maxLength
|
|
115
|
-
}, /* @__PURE__ */ React__default.createElement(StyledNativeInput,
|
|
60
|
+
}, /* @__PURE__ */ React__default.createElement(StyledNativeInput, {
|
|
61
|
+
...rest,
|
|
116
62
|
fontStack: inputFontStack,
|
|
117
63
|
fontWeight: inputFontWeight,
|
|
118
64
|
disabled,
|
|
@@ -122,7 +68,7 @@ const TextArea = (_a) => {
|
|
|
122
68
|
multiline: true,
|
|
123
69
|
value,
|
|
124
70
|
maxLength
|
|
125
|
-
}))
|
|
71
|
+
}));
|
|
126
72
|
};
|
|
127
73
|
|
|
128
74
|
export { TextArea as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","sources":["../../../../../src/components/atoms/TextArea/TextArea.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport {\n useInputFocus,\n TextAreaProps as ITACore,\n TextArea as TACore,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\nimport { StyledNativeInput } from './styled';\n\nexport type TextAreaProps = Omit<ITACore, 'TextComponent' | 'focused'>;\n\nconst TextArea: FC<TextAreaProps> = ({\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n style,\n borderColor,\n borderColorGradation,\n inputFontStack = 'default',\n inputFontWeight = 'bold',\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n value,\n maxLength,\n ...rest\n}) => {\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n return (\n <TACore\n label={label}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={Text}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n value={value}\n hintComponent={hintComponent}\n hint={hint}\n style={style}\n TextComponent={Text}\n maxLength={maxLength}\n >\n <StyledNativeInput\n {...rest}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n textAlignVertical={'top'}\n multiline\n value={value}\n maxLength={maxLength}\n />\n </TACore>\n );\n};\n\nexport default TextArea;\n"],"names":["React","TACore"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextArea.js","sources":["../../../../../src/components/atoms/TextArea/TextArea.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport {\n useInputFocus,\n TextAreaProps as ITACore,\n TextArea as TACore,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\nimport { StyledNativeInput } from './styled';\n\nexport type TextAreaProps = Omit<ITACore, 'TextComponent' | 'focused'>;\n\nconst TextArea: FC<TextAreaProps> = ({\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n style,\n borderColor,\n borderColorGradation,\n inputFontStack = 'default',\n inputFontWeight = 'bold',\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n value,\n maxLength,\n ...rest\n}) => {\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n return (\n <TACore\n label={label}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={Text}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n value={value}\n hintComponent={hintComponent}\n hint={hint}\n style={style}\n TextComponent={Text}\n maxLength={maxLength}\n >\n <StyledNativeInput\n {...rest}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n textAlignVertical={'top'}\n multiline\n value={value}\n maxLength={maxLength}\n />\n </TACore>\n );\n};\n\nexport default TextArea;\n"],"names":["React","TACore"],"mappings":";;;;;AAWA,MAAM,WAA8B,CAAC;AAAA,EACnC,KAAA;AAAA,EACA,UAAA;AAAA,EACA,iBAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA;AAAA,EACA,aAAA;AAAA,EACA,cAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,oBAAA;AAAA,EACA,cAAiB,GAAA,SAAA;AAAA,EACjB,eAAkB,GAAA,MAAA;AAAA,EAClB,mBAAA;AAAA,EACA,OAAU,GAAA,SAAA;AAAA,EACV,aAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EAAA,MAAM,EAAE,OAAA,EAAS,UAAY,EAAA,WAAA,EAAgB,GAAA,aAAA;AAAA,IAC3C,OAAA;AAAA,IACA,MAAA;AAAA,IACA,CAAC,QAAA;AAAA,GACH,CAAA;AAEA,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,UAAA,EAAA;AAAA,IACC,KAAA;AAAA,IACA,UAAA;AAAA,IACA,iBAAA;AAAA,IACA,cAAA;AAAA,IACA,eAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA,cAAgB,EAAA,IAAA;AAAA,IAChB,aAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,oBAAA;AAAA,IACA,mBAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,aAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,aAAe,EAAA,IAAA;AAAA,IACf,SAAA;AAAA,GAAA,kBAECD,cAAA,CAAA,aAAA,CAAA,iBAAA,EAAA;AAAA,IACE,GAAG,IAAA;AAAA,IACJ,SAAW,EAAA,cAAA;AAAA,IACX,UAAY,EAAA,eAAA;AAAA,IACZ,QAAA;AAAA,IACA,OAAS,EAAA,WAAA;AAAA,IACT,MAAQ,EAAA,UAAA;AAAA,IACR,iBAAmB,EAAA,KAAA;AAAA,IACnB,SAAS,EAAA,IAAA;AAAA,IACT,KAAA;AAAA,IACA,SAAA;AAAA,GACF,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -3,47 +3,15 @@ import React__default from 'react';
|
|
|
3
3
|
import { getLocale } from '../../../utils/date.js';
|
|
4
4
|
import Text from '../../atoms/Text/Text.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
-
var __objRest = (source, exclude) => {
|
|
26
|
-
var target = {};
|
|
27
|
-
for (var prop in source)
|
|
28
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
if (source != null && __getOwnPropSymbols)
|
|
31
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
-
target[prop] = source[prop];
|
|
34
|
-
}
|
|
35
|
-
return target;
|
|
36
|
-
};
|
|
37
|
-
const Calendar = (_a) => {
|
|
38
|
-
var _b = _a, {
|
|
39
|
-
locale
|
|
40
|
-
} = _b, rest = __objRest(_b, [
|
|
41
|
-
"locale"
|
|
42
|
-
]);
|
|
43
|
-
return /* @__PURE__ */ React__default.createElement(Calendar$1, __spreadProps(__spreadValues({}, rest), {
|
|
6
|
+
const Calendar = ({
|
|
7
|
+
locale,
|
|
8
|
+
...rest
|
|
9
|
+
}) => {
|
|
10
|
+
return /* @__PURE__ */ React__default.createElement(Calendar$1, {
|
|
11
|
+
...rest,
|
|
44
12
|
TextComponent: Text,
|
|
45
|
-
locale: locale
|
|
46
|
-
})
|
|
13
|
+
locale: locale ?? getLocale()
|
|
14
|
+
});
|
|
47
15
|
};
|
|
48
16
|
|
|
49
17
|
export { Calendar };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.js","sources":["../../../../../src/components/molecules/Calendar/Calendar.tsx"],"sourcesContent":["import {\n Calendar as CalendarCore,\n CalendarProps,\n SelectionType,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { getLocale } from '../../../utils/date';\nimport { Text } from '../../atoms/Text';\n\nexport const Calendar = <T extends SelectionType>({\n locale,\n ...rest\n}: CalendarProps<T>): JSX.Element => {\n return (\n <CalendarCore\n {...rest}\n TextComponent={Text}\n locale={locale ?? getLocale()}\n />\n );\n};\n"],"names":["React","CalendarCore"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Calendar.js","sources":["../../../../../src/components/molecules/Calendar/Calendar.tsx"],"sourcesContent":["import {\n Calendar as CalendarCore,\n CalendarProps,\n SelectionType,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { getLocale } from '../../../utils/date';\nimport { Text } from '../../atoms/Text';\n\nexport const Calendar = <T extends SelectionType>({\n locale,\n ...rest\n}: CalendarProps<T>): JSX.Element => {\n return (\n <CalendarCore\n {...rest}\n TextComponent={Text}\n locale={locale ?? getLocale()}\n />\n );\n};\n"],"names":["React","CalendarCore"],"mappings":";;;;;AASO,MAAM,WAAW,CAA0B;AAAA,EAChD,MAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAqC,KAAA;AACnC,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,UAAA,EAAA;AAAA,IACE,GAAG,IAAA;AAAA,IACJ,aAAe,EAAA,IAAA;AAAA,IACf,MAAA,EAAQ,UAAU,SAAU,EAAA;AAAA,GAC9B,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -9,67 +9,34 @@ import Text from '../../atoms/Text/Text.js';
|
|
|
9
9
|
import { Calendar } from '../Calendar/Calendar.js';
|
|
10
10
|
import { CalendarBoxContent } from './styled.js';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
18
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19
|
-
var __spreadValues = (a, b) => {
|
|
20
|
-
for (var prop in b || (b = {}))
|
|
21
|
-
if (__hasOwnProp.call(b, prop))
|
|
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 DatePicker = (_a) => {
|
|
44
|
-
var _b = _a, {
|
|
45
|
-
locale,
|
|
46
|
-
onChange
|
|
47
|
-
} = _b, rest = __objRest(_b, [
|
|
48
|
-
"locale",
|
|
49
|
-
"onChange"
|
|
50
|
-
]);
|
|
12
|
+
const DatePicker = ({
|
|
13
|
+
locale,
|
|
14
|
+
onChange,
|
|
15
|
+
...rest
|
|
16
|
+
}) => {
|
|
51
17
|
const modal = useLazyModalManager();
|
|
52
18
|
const handleChange = (value) => {
|
|
53
|
-
onChange
|
|
19
|
+
onChange?.(value);
|
|
54
20
|
modal.requestUpdate();
|
|
55
21
|
};
|
|
56
|
-
return /* @__PURE__ */ React__default.createElement(DatePicker$1,
|
|
22
|
+
return /* @__PURE__ */ React__default.createElement(DatePicker$1, {
|
|
23
|
+
...rest,
|
|
57
24
|
TextComponent: Text,
|
|
58
25
|
CalendarComponent: Calendar,
|
|
59
|
-
locale: locale
|
|
26
|
+
locale: locale ?? getLocale(),
|
|
60
27
|
onChange: handleChange,
|
|
61
28
|
requestShowCalendar: () => modal.show(),
|
|
62
29
|
requestCloseCalendar: () => modal.close(),
|
|
63
30
|
renderCalendar: (calendar, blur) => modal.sync(/* @__PURE__ */ React__default.createElement(NativeModal, {
|
|
64
31
|
onClose: blur
|
|
65
32
|
}, calendar))
|
|
66
|
-
})
|
|
33
|
+
});
|
|
67
34
|
};
|
|
68
|
-
const NativeModal = (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
},
|
|
35
|
+
const NativeModal = ({ children, ...others }) => {
|
|
36
|
+
return /* @__PURE__ */ React__default.createElement(ModalView, {
|
|
37
|
+
BoxComponent: CalendarBoxContent,
|
|
38
|
+
...others
|
|
39
|
+
}, children);
|
|
73
40
|
};
|
|
74
41
|
|
|
75
42
|
export { DatePicker };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.js","sources":["../../../../../src/components/molecules/DatePicker/DatePicker.tsx"],"sourcesContent":["import {\n DatePicker as DatePickerCore,\n DatePickerProps,\n SelectionType,\n Value,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { getLocale } from '../../../utils/date';\nimport { IBaseModal, ModalView, useLazyModalManager } from '../../atoms/Modal';\nimport { Text } from '../../atoms/Text';\nimport { Calendar } from '../Calendar';\nimport { CalendarBoxContent } from './styled';\n\nexport type NativeDatePickerProps<T extends SelectionType> = Omit<\n DatePickerProps<T>,\n | 'CalendarComponent'\n | 'renderCalendar'\n | 'requestCloseCalendar'\n | 'requestShowCalendar'\n>;\n\nexport const DatePicker = <T extends SelectionType>({\n locale,\n onChange,\n ...rest\n}: NativeDatePickerProps<T>): JSX.Element => {\n const modal = useLazyModalManager();\n\n const handleChange = (value?: Value<T>) => {\n onChange?.(value);\n modal.requestUpdate();\n };\n\n return (\n <DatePickerCore\n {...rest}\n TextComponent={Text}\n CalendarComponent={Calendar}\n locale={locale ?? getLocale()}\n onChange={handleChange}\n requestShowCalendar={() => modal.show()}\n requestCloseCalendar={() => modal.close()}\n renderCalendar={(calendar, blur) =>\n modal.sync(<NativeModal onClose={blur}>{calendar}</NativeModal>)\n }\n />\n );\n};\n\nconst NativeModal: FC<IBaseModal> = ({ children, ...others }) => {\n return (\n <ModalView BoxComponent={CalendarBoxContent} {...others}>\n {children}\n </ModalView>\n );\n};\n"],"names":["React","DatePickerCore"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sources":["../../../../../src/components/molecules/DatePicker/DatePicker.tsx"],"sourcesContent":["import {\n DatePicker as DatePickerCore,\n DatePickerProps,\n SelectionType,\n Value,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { getLocale } from '../../../utils/date';\nimport { IBaseModal, ModalView, useLazyModalManager } from '../../atoms/Modal';\nimport { Text } from '../../atoms/Text';\nimport { Calendar } from '../Calendar';\nimport { CalendarBoxContent } from './styled';\n\nexport type NativeDatePickerProps<T extends SelectionType> = Omit<\n DatePickerProps<T>,\n | 'CalendarComponent'\n | 'renderCalendar'\n | 'requestCloseCalendar'\n | 'requestShowCalendar'\n>;\n\nexport const DatePicker = <T extends SelectionType>({\n locale,\n onChange,\n ...rest\n}: NativeDatePickerProps<T>): JSX.Element => {\n const modal = useLazyModalManager();\n\n const handleChange = (value?: Value<T>) => {\n onChange?.(value);\n modal.requestUpdate();\n };\n\n return (\n <DatePickerCore\n {...rest}\n TextComponent={Text}\n CalendarComponent={Calendar}\n locale={locale ?? getLocale()}\n onChange={handleChange}\n requestShowCalendar={() => modal.show()}\n requestCloseCalendar={() => modal.close()}\n renderCalendar={(calendar, blur) =>\n modal.sync(<NativeModal onClose={blur}>{calendar}</NativeModal>)\n }\n />\n );\n};\n\nconst NativeModal: FC<IBaseModal> = ({ children, ...others }) => {\n return (\n <ModalView BoxComponent={CalendarBoxContent} {...others}>\n {children}\n </ModalView>\n );\n};\n"],"names":["React","DatePickerCore"],"mappings":";;;;;;;;;;;AAqBO,MAAM,aAAa,CAA0B;AAAA,EAClD,MAAA;AAAA,EACA,QAAA;AAAA,EACG,GAAA,IAAA;AACL,CAA6C,KAAA;AAC3C,EAAA,MAAM,QAAQ,mBAAoB,EAAA,CAAA;AAElC,EAAM,MAAA,YAAA,GAAe,CAAC,KAAqB,KAAA;AACzC,IAAA,QAAA,GAAW,KAAK,CAAA,CAAA;AAChB,IAAA,KAAA,CAAM,aAAc,EAAA,CAAA;AAAA,GACtB,CAAA;AAEA,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,YAAA,EAAA;AAAA,IACE,GAAG,IAAA;AAAA,IACJ,aAAe,EAAA,IAAA;AAAA,IACf,iBAAmB,EAAA,QAAA;AAAA,IACnB,MAAA,EAAQ,UAAU,SAAU,EAAA;AAAA,IAC5B,QAAU,EAAA,YAAA;AAAA,IACV,mBAAA,EAAqB,MAAM,KAAA,CAAM,IAAK,EAAA;AAAA,IACtC,oBAAA,EAAsB,MAAM,KAAA,CAAM,KAAM,EAAA;AAAA,IACxC,gBAAgB,CAAC,QAAA,EAAU,IACzB,KAAA,KAAA,CAAM,qBAAMD,cAAA,CAAA,aAAA,CAAA,WAAA,EAAA;AAAA,MAAY,OAAS,EAAA,IAAA;AAAA,KAAA,EAAO,QAAS,CAAc,CAAA;AAAA,GAEnE,CAAA,CAAA;AAEJ,EAAA;AAEA,MAAM,WAA8B,GAAA,CAAC,EAAE,QAAA,EAAA,GAAa,QAAa,KAAA;AAC/D,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,SAAA,EAAA;AAAA,IAAU,YAAc,EAAA,kBAAA;AAAA,IAAqB,GAAG,MAAA;AAAA,GAAA,EAC9C,QACH,CAAA,CAAA;AAEJ,CAAA;;;;"}
|
|
@@ -8,58 +8,27 @@ import { useLazyModalManager } from '../../atoms/Modal/useLazyModalManager.js';
|
|
|
8
8
|
import Text from '../../atoms/Text/Text.js';
|
|
9
9
|
import { DateTimeSelector } from '../DateTimeSelector/DateTimeSelector.js';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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 DateTimePicker = (_a) => {
|
|
43
|
-
var _b = _a, {
|
|
44
|
-
locale
|
|
45
|
-
} = _b, rest = __objRest(_b, [
|
|
46
|
-
"locale"
|
|
47
|
-
]);
|
|
11
|
+
const DateTimePicker = ({
|
|
12
|
+
locale,
|
|
13
|
+
...rest
|
|
14
|
+
}) => {
|
|
48
15
|
const modal = useLazyModalManager();
|
|
49
|
-
return /* @__PURE__ */ React__default.createElement(DateTimePicker$1,
|
|
16
|
+
return /* @__PURE__ */ React__default.createElement(DateTimePicker$1, {
|
|
17
|
+
...rest,
|
|
50
18
|
TextComponent: Text,
|
|
51
19
|
DateTimeSelectorComponent: DateTimeSelector,
|
|
52
|
-
locale: locale
|
|
20
|
+
locale: locale ?? getLocale(),
|
|
53
21
|
requestShowSelector: () => modal.show(),
|
|
54
22
|
requestCloseSelector: () => modal.close(),
|
|
55
23
|
renderSelector: (selector, blur) => modal.sync(/* @__PURE__ */ React__default.createElement(NativeModal, {
|
|
56
24
|
onClose: blur
|
|
57
25
|
}, selector))
|
|
58
|
-
})
|
|
26
|
+
});
|
|
59
27
|
};
|
|
60
|
-
const NativeModal = (
|
|
61
|
-
|
|
62
|
-
|
|
28
|
+
const NativeModal = ({ children, ...others }) => {
|
|
29
|
+
return /* @__PURE__ */ React__default.createElement(ModalView, {
|
|
30
|
+
...others
|
|
31
|
+
}, children);
|
|
63
32
|
};
|
|
64
33
|
|
|
65
34
|
export { DateTimePicker };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimePicker.js","sources":["../../../../../src/components/molecules/DateTimePicker/DateTimePicker.tsx"],"sourcesContent":["import {\n DateTimePicker as DateTimePickerCore,\n DateTimePickerProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { getLocale } from '../../../utils/date';\nimport { IBaseModal, ModalView, useLazyModalManager } from '../../atoms/Modal';\nimport { Text } from '../../atoms/Text';\nimport { DateTimeSelector } from '../DateTimeSelector';\n\nexport type NativeDateTimePickerProps = Omit<\n DateTimePickerProps,\n | 'DateTimeSelectorComponent'\n | 'renderSelector'\n | 'requestCloseSelector'\n | 'requestShowSelector'\n>;\n\nexport const DateTimePicker: FC<NativeDateTimePickerProps> = ({\n locale,\n ...rest\n}) => {\n const modal = useLazyModalManager();\n\n return (\n <DateTimePickerCore\n {...rest}\n TextComponent={Text}\n DateTimeSelectorComponent={DateTimeSelector}\n locale={locale ?? getLocale()}\n requestShowSelector={() => modal.show()}\n requestCloseSelector={() => modal.close()}\n renderSelector={(selector, blur) =>\n modal.sync(<NativeModal onClose={blur}>{selector}</NativeModal>)\n }\n />\n );\n};\n\nconst NativeModal: FC<IBaseModal> = ({ children, ...others }) => {\n return <ModalView {...others}>{children}</ModalView>;\n};\n"],"names":["React","DateTimePickerCore"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateTimePicker.js","sources":["../../../../../src/components/molecules/DateTimePicker/DateTimePicker.tsx"],"sourcesContent":["import {\n DateTimePicker as DateTimePickerCore,\n DateTimePickerProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { getLocale } from '../../../utils/date';\nimport { IBaseModal, ModalView, useLazyModalManager } from '../../atoms/Modal';\nimport { Text } from '../../atoms/Text';\nimport { DateTimeSelector } from '../DateTimeSelector';\n\nexport type NativeDateTimePickerProps = Omit<\n DateTimePickerProps,\n | 'DateTimeSelectorComponent'\n | 'renderSelector'\n | 'requestCloseSelector'\n | 'requestShowSelector'\n>;\n\nexport const DateTimePicker: FC<NativeDateTimePickerProps> = ({\n locale,\n ...rest\n}) => {\n const modal = useLazyModalManager();\n\n return (\n <DateTimePickerCore\n {...rest}\n TextComponent={Text}\n DateTimeSelectorComponent={DateTimeSelector}\n locale={locale ?? getLocale()}\n requestShowSelector={() => modal.show()}\n requestCloseSelector={() => modal.close()}\n renderSelector={(selector, blur) =>\n modal.sync(<NativeModal onClose={blur}>{selector}</NativeModal>)\n }\n />\n );\n};\n\nconst NativeModal: FC<IBaseModal> = ({ children, ...others }) => {\n return <ModalView {...others}>{children}</ModalView>;\n};\n"],"names":["React","DateTimePickerCore"],"mappings":";;;;;;;;;;AAkBO,MAAM,iBAAgD,CAAC;AAAA,EAC5D,MAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EAAA,MAAM,QAAQ,mBAAoB,EAAA,CAAA;AAElC,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,gBAAA,EAAA;AAAA,IACE,GAAG,IAAA;AAAA,IACJ,aAAe,EAAA,IAAA;AAAA,IACf,yBAA2B,EAAA,gBAAA;AAAA,IAC3B,MAAA,EAAQ,UAAU,SAAU,EAAA;AAAA,IAC5B,mBAAA,EAAqB,MAAM,KAAA,CAAM,IAAK,EAAA;AAAA,IACtC,oBAAA,EAAsB,MAAM,KAAA,CAAM,KAAM,EAAA;AAAA,IACxC,gBAAgB,CAAC,QAAA,EAAU,IACzB,KAAA,KAAA,CAAM,qBAAMD,cAAA,CAAA,aAAA,CAAA,WAAA,EAAA;AAAA,MAAY,OAAS,EAAA,IAAA;AAAA,KAAA,EAAO,QAAS,CAAc,CAAA;AAAA,GAEnE,CAAA,CAAA;AAEJ,EAAA;AAEA,MAAM,WAA8B,GAAA,CAAC,EAAE,QAAA,EAAA,GAAa,QAAa,KAAA;AAC/D,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAA,SAAA,EAAA;AAAA,IAAW,GAAG,MAAA;AAAA,GAAA,EAAS,QAAS,CAAA,CAAA;AAC1C,CAAA;;;;"}
|
|
@@ -3,47 +3,15 @@ import React__default from 'react';
|
|
|
3
3
|
import Text from '../../atoms/Text/Text.js';
|
|
4
4
|
import { getLocale } from '../../../utils/date.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
-
var __objRest = (source, exclude) => {
|
|
26
|
-
var target = {};
|
|
27
|
-
for (var prop in source)
|
|
28
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
if (source != null && __getOwnPropSymbols)
|
|
31
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
-
target[prop] = source[prop];
|
|
34
|
-
}
|
|
35
|
-
return target;
|
|
36
|
-
};
|
|
37
|
-
const DateTimeSelector = (_a) => {
|
|
38
|
-
var _b = _a, {
|
|
39
|
-
locale
|
|
40
|
-
} = _b, rest = __objRest(_b, [
|
|
41
|
-
"locale"
|
|
42
|
-
]);
|
|
43
|
-
return /* @__PURE__ */ React__default.createElement(DateTimeSelector$1, __spreadProps(__spreadValues({}, rest), {
|
|
6
|
+
const DateTimeSelector = ({
|
|
7
|
+
locale,
|
|
8
|
+
...rest
|
|
9
|
+
}) => {
|
|
10
|
+
return /* @__PURE__ */ React__default.createElement(DateTimeSelector$1, {
|
|
11
|
+
...rest,
|
|
44
12
|
TextComponent: Text,
|
|
45
|
-
locale: locale
|
|
46
|
-
})
|
|
13
|
+
locale: locale ?? getLocale()
|
|
14
|
+
});
|
|
47
15
|
};
|
|
48
16
|
|
|
49
17
|
export { DateTimeSelector };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeSelector.js","sources":["../../../../../src/components/molecules/DateTimeSelector/DateTimeSelector.tsx"],"sourcesContent":["import {\n DateTimeSelector as DateTimeSelectorCore,\n DateTimeSelectorProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../atoms/Text';\nimport { getLocale } from '../../../utils/date';\n\nexport const DateTimeSelector: FC<DateTimeSelectorProps> = ({\n locale,\n ...rest\n}) => {\n return (\n <DateTimeSelectorCore\n {...rest}\n TextComponent={Text}\n locale={locale ?? getLocale()}\n />\n );\n};\n"],"names":["React","DateTimeSelectorCore"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateTimeSelector.js","sources":["../../../../../src/components/molecules/DateTimeSelector/DateTimeSelector.tsx"],"sourcesContent":["import {\n DateTimeSelector as DateTimeSelectorCore,\n DateTimeSelectorProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../atoms/Text';\nimport { getLocale } from '../../../utils/date';\n\nexport const DateTimeSelector: FC<DateTimeSelectorProps> = ({\n locale,\n ...rest\n}) => {\n return (\n <DateTimeSelectorCore\n {...rest}\n TextComponent={Text}\n locale={locale ?? getLocale()}\n />\n );\n};\n"],"names":["React","DateTimeSelectorCore"],"mappings":";;;;;AAQO,MAAM,mBAA8C,CAAC;AAAA,EAC1D,MAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,kBAAA,EAAA;AAAA,IACE,GAAG,IAAA;AAAA,IACJ,aAAe,EAAA,IAAA;AAAA,IACf,MAAA,EAAQ,UAAU,SAAU,EAAA;AAAA,GAC9B,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -2,54 +2,17 @@ import React__default from 'react';
|
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import GridItem from './Item/Item.js';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __objRest = (source, exclude) => {
|
|
25
|
-
var target = {};
|
|
26
|
-
for (var prop in source)
|
|
27
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
if (source != null && __getOwnPropSymbols)
|
|
30
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
-
target[prop] = source[prop];
|
|
33
|
-
}
|
|
34
|
-
return target;
|
|
35
|
-
};
|
|
36
|
-
const Grid = (_a) => {
|
|
37
|
-
var _b = _a, {
|
|
38
|
-
children,
|
|
39
|
-
columns = 12,
|
|
40
|
-
layout,
|
|
41
|
-
style,
|
|
42
|
-
spacing
|
|
43
|
-
} = _b, rest = __objRest(_b, [
|
|
44
|
-
"children",
|
|
45
|
-
"columns",
|
|
46
|
-
"layout",
|
|
47
|
-
"style",
|
|
48
|
-
"spacing"
|
|
49
|
-
]);
|
|
5
|
+
const Grid = ({
|
|
6
|
+
children,
|
|
7
|
+
columns = 12,
|
|
8
|
+
layout,
|
|
9
|
+
style,
|
|
10
|
+
spacing,
|
|
11
|
+
...rest
|
|
12
|
+
}) => {
|
|
50
13
|
if (layout) {
|
|
51
14
|
const flatLayout = layout.flat();
|
|
52
|
-
return /* @__PURE__ */ React__default.createElement(View,
|
|
15
|
+
return /* @__PURE__ */ React__default.createElement(View, {
|
|
53
16
|
style: [
|
|
54
17
|
style,
|
|
55
18
|
{
|
|
@@ -57,15 +20,16 @@ const Grid = (_a) => {
|
|
|
57
20
|
flexDirection: "row",
|
|
58
21
|
flexWrap: "wrap"
|
|
59
22
|
}
|
|
60
|
-
]
|
|
61
|
-
|
|
23
|
+
],
|
|
24
|
+
...rest
|
|
25
|
+
}, React__default.Children.map(children, (child, index) => /* @__PURE__ */ React__default.createElement(GridItem, {
|
|
62
26
|
key: `child-${index}`,
|
|
63
27
|
columns,
|
|
64
28
|
span: flatLayout[index],
|
|
65
29
|
spacing
|
|
66
30
|
}, child)));
|
|
67
31
|
}
|
|
68
|
-
return /* @__PURE__ */ React__default.createElement(View,
|
|
32
|
+
return /* @__PURE__ */ React__default.createElement(View, {
|
|
69
33
|
style: [
|
|
70
34
|
style,
|
|
71
35
|
{
|
|
@@ -73,14 +37,15 @@ const Grid = (_a) => {
|
|
|
73
37
|
flexDirection: "row",
|
|
74
38
|
flexWrap: "wrap"
|
|
75
39
|
}
|
|
76
|
-
]
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return React__default.cloneElement(child,
|
|
40
|
+
],
|
|
41
|
+
...rest
|
|
42
|
+
}, React__default.Children.map(children, (child, index) => {
|
|
43
|
+
return React__default.cloneElement(child, {
|
|
44
|
+
...child?.props,
|
|
80
45
|
columns,
|
|
81
|
-
spacing:
|
|
46
|
+
spacing: child?.props.spacing ?? spacing,
|
|
82
47
|
key: `child-${index}`
|
|
83
|
-
})
|
|
48
|
+
});
|
|
84
49
|
}));
|
|
85
50
|
};
|
|
86
51
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.js","sources":["../../../../../src/components/molecules/Grid/Grid.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewProps } from 'react-native';\nimport { GridItem } from './Item';\nimport { IGrid } from '@tecsinapse/react-core';\n\nexport type IGridNative = IGrid & ViewProps;\n\nconst Grid = ({\n children,\n columns = 12,\n layout,\n style,\n spacing,\n ...rest\n}: IGridNative): JSX.Element => {\n if (layout) {\n const flatLayout = layout.flat();\n return (\n <View\n style={[\n style,\n {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n ]}\n {...rest}\n >\n {React.Children.map(children, (child, index) => (\n <GridItem\n key={`child-${index}`}\n columns={columns}\n span={flatLayout[index]}\n spacing={spacing}\n >\n {child}\n </GridItem>\n ))}\n </View>\n );\n }\n\n return (\n <View\n style={[\n style,\n {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n ]}\n {...rest}\n >\n {React.Children.map(children, (child, index) => {\n return React.cloneElement(child, {\n ...child?.props,\n columns,\n spacing: child?.props.spacing ?? spacing,\n key: `child-${index}`,\n });\n })}\n </View>\n );\n};\n\nexport default Grid;\n"],"names":["React"
|
|
1
|
+
{"version":3,"file":"Grid.js","sources":["../../../../../src/components/molecules/Grid/Grid.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewProps } from 'react-native';\nimport { GridItem } from './Item';\nimport { IGrid } from '@tecsinapse/react-core';\n\nexport type IGridNative = IGrid & ViewProps;\n\nconst Grid = ({\n children,\n columns = 12,\n layout,\n style,\n spacing,\n ...rest\n}: IGridNative): JSX.Element => {\n if (layout) {\n const flatLayout = layout.flat();\n return (\n <View\n style={[\n style,\n {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n ]}\n {...rest}\n >\n {React.Children.map(children, (child, index) => (\n <GridItem\n key={`child-${index}`}\n columns={columns}\n span={flatLayout[index]}\n spacing={spacing}\n >\n {child}\n </GridItem>\n ))}\n </View>\n );\n }\n\n return (\n <View\n style={[\n style,\n {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n ]}\n {...rest}\n >\n {React.Children.map(children, (child, index) => {\n return React.cloneElement(child, {\n ...child?.props,\n columns,\n spacing: child?.props.spacing ?? spacing,\n key: `child-${index}`,\n });\n })}\n </View>\n );\n};\n\nexport default Grid;\n"],"names":["React"],"mappings":";;;;AAOA,MAAM,OAAO,CAAC;AAAA,EACZ,QAAA;AAAA,EACA,OAAU,GAAA,EAAA;AAAA,EACV,MAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAgC,KAAA;AAC9B,EAAA,IAAI,MAAQ,EAAA;AACV,IAAM,MAAA,UAAA,GAAa,OAAO,IAAK,EAAA,CAAA;AAC/B,IAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,KAAA;AAAA,QACA;AAAA,UACE,OAAS,EAAA,MAAA;AAAA,UACT,aAAe,EAAA,KAAA;AAAA,UACf,QAAU,EAAA,MAAA;AAAA,SACZ;AAAA,OACF;AAAA,MACC,GAAG,IAAA;AAAA,KAAA,EAEHA,eAAM,QAAS,CAAA,GAAA,CAAI,UAAU,CAAC,KAAA,EAAO,0BACnCA,cAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,MACC,KAAK,CAAS,MAAA,EAAA,KAAA,CAAA,CAAA;AAAA,MACd,OAAA;AAAA,MACA,MAAM,UAAW,CAAA,KAAA,CAAA;AAAA,MACjB,OAAA;AAAA,KAEC,EAAA,KACH,CACD,CACH,CAAA,CAAA;AAAA,GAEJ;AAEA,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IACC,KAAO,EAAA;AAAA,MACL,KAAA;AAAA,MACA;AAAA,QACE,OAAS,EAAA,MAAA;AAAA,QACT,aAAe,EAAA,KAAA;AAAA,QACf,QAAU,EAAA,MAAA;AAAA,OACZ;AAAA,KACF;AAAA,IACC,GAAG,IAAA;AAAA,GAAA,EAEHA,eAAM,QAAS,CAAA,GAAA,CAAI,QAAU,EAAA,CAAC,OAAO,KAAU,KAAA;AAC9C,IAAO,OAAAA,cAAA,CAAM,aAAa,KAAO,EAAA;AAAA,MAC/B,GAAG,KAAO,EAAA,KAAA;AAAA,MACV,OAAA;AAAA,MACA,OAAA,EAAS,KAAO,EAAA,KAAA,CAAM,OAAW,IAAA,OAAA;AAAA,MACjC,KAAK,CAAS,MAAA,EAAA,KAAA,CAAA,CAAA;AAAA,KACf,CAAA,CAAA;AAAA,GACF,CACH,CAAA,CAAA;AAEJ;;;;"}
|