@draftbit/core 43.2.3-cee5a8.0 → 43.2.3
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/lib/commonjs/components/Accordion/index.js.map +1 -1
- package/lib/commonjs/components/CardContainer.js +16 -5
- package/lib/commonjs/components/CardContainer.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +19 -4
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.android.js +20 -6
- package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -1
- package/lib/commonjs/components/Swiper/Swiper.js +1 -19
- package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
- package/lib/commonjs/components/TextField.js +11 -4
- package/lib/commonjs/components/TextField.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheet.js.map +1 -1
- package/lib/commonjs/mappings/CardBlock.js.map +1 -1
- package/lib/commonjs/mappings/CheckboxGroup.js.map +1 -1
- package/lib/commonjs/mappings/CircleImage.js.map +1 -1
- package/lib/commonjs/mappings/Modal.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/mappings/StarRating.js +6 -2
- package/lib/commonjs/mappings/StarRating.js.map +1 -1
- package/lib/commonjs/mappings/Swiper.js +0 -14
- package/lib/commonjs/mappings/Swiper.js.map +1 -1
- package/lib/commonjs/mappings/Touchable.js.map +1 -1
- package/lib/commonjs/theming.js.map +1 -1
- package/lib/module/components/RadioButton/index.js.map +1 -1
- package/lib/module/components/Swiper/Swiper.js +1 -19
- package/lib/module/components/Swiper/Swiper.js.map +1 -1
- package/lib/module/components/TextField.js +11 -4
- package/lib/module/components/TextField.js.map +1 -1
- package/lib/module/mappings/Swiper.js +1 -15
- package/lib/module/mappings/Swiper.js.map +1 -1
- package/lib/typescript/src/components/Swiper/Swiper.d.ts +1 -5
- package/lib/typescript/src/mappings/Swiper.d.ts +0 -40
- package/package.json +2 -2
- package/src/components/Swiper/Swiper.js +1 -5
- package/src/components/Swiper/Swiper.tsx +0 -12
- package/src/components/TextField.js +9 -2
- package/src/components/TextField.tsx +8 -2
- package/src/mappings/Swiper.js +1 -15
- package/src/mappings/Swiper.ts +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AACA","sourcesContent":["export { default as AccordionGroup } from \"./AccordionGroup\";\nexport { default as AccordionItem } from \"./AccordionItem\";\n"]}
|
|
@@ -23,8 +23,6 @@ var _Config = _interopRequireDefault(require("./Config"));
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
|
-
|
|
28
26
|
const ICON_CONTAINER_SIZE = _Config.default.cardIconSize * 2;
|
|
29
27
|
const ICON_CONTAINER_PADDING = _Config.default.cardIconSize / 2 - 1;
|
|
30
28
|
|
|
@@ -68,11 +66,12 @@ const CardContainer = _ref => {
|
|
|
68
66
|
break;
|
|
69
67
|
}
|
|
70
68
|
|
|
71
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default,
|
|
69
|
+
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, {
|
|
72
70
|
style: style,
|
|
73
71
|
onPress: onPress,
|
|
74
|
-
numColumns: numColumns
|
|
75
|
-
|
|
72
|
+
numColumns: numColumns,
|
|
73
|
+
...rest
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
76
75
|
style: {
|
|
77
76
|
elevation,
|
|
78
77
|
borderRadius: roundness
|
|
@@ -144,5 +143,17 @@ const CardContainer = _ref => {
|
|
|
144
143
|
|
|
145
144
|
var _default = (0, _theming.withTheme)(CardContainer);
|
|
146
145
|
|
|
146
|
+
exports.default = _default;
|
|
147
|
+
//# sourceMappingURL=CardContainer.js.mapackgroundOpacity).rgb().string()
|
|
148
|
+
}
|
|
149
|
+
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
150
|
+
name: icon,
|
|
151
|
+
size: _Config.default.cardIconSize,
|
|
152
|
+
color: colors.surface
|
|
153
|
+
})) : null)));
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
var _default = (0, _theming.withTheme)(CardContainer);
|
|
157
|
+
|
|
147
158
|
exports.default = _default;
|
|
148
159
|
//# sourceMappingURL=CardContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CardContainer.
|
|
1
|
+
{"version":3,"sources":["CardContainer.js"],"names":["ICON_CONTAINER_SIZE","Config","cardIconSize","ICON_CONTAINER_PADDING","CardContainer","Icon","icon","image","cardImageUrl","title","leftDescription","rightDescription","textCentered","aspectRatio","elevation","numColumns","theme","colors","roundness","typography","style","onPress","rest","textJustification","titleStyle","headline6","headline5","React","createElement","Card","Elevation","borderRadius","View","overflow","backgroundColor","surface","Image","source","uri","resizeMode","padding","flexDirection","alignItems","justifyContent","Text","numberOfLines","color","strong","marginTop","body2","medium","subtitle2","light","cardIconElevation","position","top","right","width","height","alpha","cardIconBackgroundOpacity","rgb","string","name","size"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA,MAAMA,mBAAmB,GAAGC,gBAAOC,YAAP,GAAsB,CAAlD;AACA,MAAMC,sBAAsB,GAAGF,gBAAOC,YAAP,GAAsB,CAAtB,GAA0B,CAAzD;;AACA,MAAME,aAAa,GAAG,QAA8N;AAAA,MAA7N;AAAEC,IAAAA,IA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kB;AAAvD,GAA1B,CAdI,CAAJ,GAcgG,IArCxG,CADJ,CADI,CAAR;AAwCH,CAzDD;;eA0De,wBAAU/B,aAAV,C","sourcesContent":["import React from \"react\";\nimport { View, Text, } from \"react-native\";\nimport color from \"color\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst ICON_CONTAINER_SIZE = Config.cardIconSize * 2;\nconst ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;\nconst CardContainer = ({ Icon, icon, image = Config.cardImageUrl, title, leftDescription, rightDescription, textCentered, aspectRatio = 1.5, elevation = 2, numColumns = 3, theme: { colors, roundness, typography }, style, onPress, ...rest }) => {\n let textJustification;\n let titleStyle;\n if (textCentered && !rightDescription) {\n textJustification = \"center\";\n }\n else {\n textJustification = \"space-between\";\n }\n switch (numColumns) {\n case 2:\n titleStyle = typography.headline6;\n break;\n case 3:\n titleStyle = typography.headline5;\n break;\n }\n return (React.createElement(Card, { style: style, onPress: onPress, numColumns: numColumns, ...rest },\n React.createElement(Elevation, { style: { elevation, borderRadius: roundness } },\n React.createElement(View, { style: {\n borderRadius: roundness,\n overflow: \"hidden\",\n backgroundColor: colors.surface,\n } },\n React.createElement(Image, { style: { aspectRatio }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" }),\n React.createElement(View, { style: {\n padding: numColumns === 1 ? 8 : 16,\n } },\n title ? (React.createElement(View, { style: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: textJustification,\n } },\n React.createElement(Text, { numberOfLines: 1, style: [titleStyle, { color: colors.strong }] }, title))) : null,\n leftDescription ? (React.createElement(View, { style: {\n flexDirection: \"row\",\n justifyContent: textJustification,\n alignItems: \"center\",\n marginTop: numColumns === 3 ? 4 : 4 / 2,\n } },\n React.createElement(Text, { numberOfLines: 1, style: [typography.body2, { color: colors.medium }] }, leftDescription),\n rightDescription ? (React.createElement(Text, { numberOfLines: 1, style: [typography.subtitle2, { color: colors.light }] }, rightDescription)) : null)) : null),\n icon ? (React.createElement(Elevation, { style: {\n elevation: Config.cardIconElevation,\n position: \"absolute\",\n top: 12,\n right: 12,\n width: ICON_CONTAINER_SIZE,\n height: ICON_CONTAINER_SIZE,\n padding: ICON_CONTAINER_PADDING,\n borderRadius: ICON_CONTAINER_SIZE,\n backgroundColor: color(colors.strong)\n .alpha(Config.cardIconBackgroundOpacity)\n .rgb()\n .string(),\n } },\n React.createElement(Icon, { name: icon, size: Config.cardIconSize, color: colors.surface }))) : null))));\n};\nexport default withTheme(CardContainer);\n"]}
|
|
@@ -25,8 +25,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
-
|
|
30
28
|
const Button = _ref => {
|
|
31
29
|
let {
|
|
32
30
|
Icon,
|
|
@@ -128,7 +126,7 @@ const Button = _ref => {
|
|
|
128
126
|
alignSelf: "stretch",
|
|
129
127
|
...margins
|
|
130
128
|
}
|
|
131
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default,
|
|
129
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, { ...rest,
|
|
132
130
|
onPress: onPress,
|
|
133
131
|
accessibilityState: {
|
|
134
132
|
disabled
|
|
@@ -136,7 +134,7 @@ const Button = _ref => {
|
|
|
136
134
|
accessibilityRole: "button",
|
|
137
135
|
disabled: disabled || loading,
|
|
138
136
|
style: [styles.button, buttonStyle, innerStyles]
|
|
139
|
-
}
|
|
137
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
140
138
|
style: styles.content
|
|
141
139
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
142
140
|
style: iconStyle
|
|
@@ -171,5 +169,22 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
171
169
|
|
|
172
170
|
var _default = (0, _theming.withTheme)(Button);
|
|
173
171
|
|
|
172
|
+
exports.default = _default;
|
|
173
|
+
//# sourceMappingURL=DeprecatedButton.js.map
|
|
174
|
+
minWidth: 64,
|
|
175
|
+
borderStyle: "solid"
|
|
176
|
+
},
|
|
177
|
+
content: {
|
|
178
|
+
flexDirection: "row",
|
|
179
|
+
alignItems: "center",
|
|
180
|
+
justifyContent: "center"
|
|
181
|
+
},
|
|
182
|
+
icon: {
|
|
183
|
+
width: _Config.default.buttonIconSize
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
var _default = (0, _theming.withTheme)(Button);
|
|
188
|
+
|
|
174
189
|
exports.default = _default;
|
|
175
190
|
//# sourceMappingURL=DeprecatedButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DeprecatedButton.
|
|
1
|
+
{"version":3,"sources":["DeprecatedButton.js"],"names":["Button","Icon","icon","disabled","type","loading","labelColor","color","colorOverride","children","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","textStyle","textAlign","marginVertical","marginHorizontal","iconStyle","styles","marginLeft","marginRight","width","Config","buttonIconSize","margin","marginEnd","marginTop","marginBottom","innerStyles","flatten","margins","React","createElement","Elevation","alignSelf","Touchable","accessibilityState","accessibilityRole","button","View","content","name","size","ActivityIndicator","Text","numberOfLines","create","minWidth","borderStyle","flexDirection","alignItems","justifyContent"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,MAAM,GAAG,QAAsN;AAAA,MAArN;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,QAAQ,GAAG,KAAzB;AAAgCC,IAAAA,IAAI,GAAG,OAAvC;AAAgDC,IAAAA,OAAO,GAAG,KAA1D;AAAiEC,IAAAA,UAAjE;AAA6EC,IAAAA,KAAK,EAAEC,aAApF;AAAmGC,IAAAA,QAAnG;AAA6GC,IAAAA,OAA7G;AAAsHC,IAAAA,SAAS,GAAG,CAAlI;AAAqIC,IAAAA,KAArI;AAA4IC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,eAAV;AAA2BC,MAAAA,SAA3B;AAAsCC,MAAAA;AAAtC,KAAnJ;AAAuM,OAAGC;AAA1M,GAAqN;AACjO,MAAIC,eAAJ,EAAqBC,WAArB,EAAkCC,SAAlC,EAA6CC,WAA7C;AACA,QAAMC,WAAW,GAAGf,aAAa,IAAIM,MAAM,CAACU,OAA5C;;AACA,MAAIpB,IAAI,KAAK,OAAb,EAAsB;AAClBe,IAAAA,eAAe,GAAGI,WAAlB;;AACA,QAAIpB,QAAJ,EAAc;AACVkB,MAAAA,SAAS,GAAG,oBAAMP,MAAM,CAACW,OAAb,EAAsBC,KAAtB,CAA4BX,eAA5B,EAA6CY,GAA7C,GAAmDC,MAAnD,EAAZ;AACH,KAFD,MAGK;AACDP,MAAAA,SAAS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AAAc4D,IAAAA,IAAI,EAAEpB,gBAAOC,cAA3B;AAA2CpC,IAAAA,KAAK,EAAEc;AAAlD,GAA1B,CADwB,CAA5B,GACiG,IAFrG,EAGIhB,OAAO,gBAAI8C,KAAK,CAACC,aAAN,CAAoBW,8BAApB,EAAuC;AAAED,IAAAA,IAAI,EAAE,OAAR;AAAiBvD,IAAAA,KAAK,EAAEc,SAAxB;AAAmCT,IAAAA,KAAK,EAAEyB;AAA1C,GAAvC,CAAJ,GAAqG,IAHhH,eAIIc,KAAK,CAACC,aAAN,CAAoBY,iBAApB,EAA0B;AAAEC,IAAAA,aAAa,EAAE,CAAjB;AAAoBrD,IAAAA,KAAK,EAAE,CAACqB,SAAD,EAAYhB,UAAU,CAACyC,MAAvB;AAA3B,GAA1B,EAAuFjD,QAAvF,CAJJ,CADJ,CADI,CAAR;AAOH,CAxED;;AAyEA,MAAM6B,MAAM,GAAGT,wBAAWqC,MAAX,CAAkB;AAC7BR,EAAAA,MAAM,EAAE;AACJS,IAAAA,QAAQ,EAAE,EADN;AAEJC,IAAAA,WAAW,EAAE;AAFT,GADqB;AAK7BR,EAAAA,OAAO,EAAE;AACLS,IAAAA,aAAa,EAAE,KADV;AAELC,IAAAA,UAAU,EAAE,QAFP;AAGLC,IAAAA,cAAc,EAAE;AAHX,GALoB;AAU7BrE,EAAAA,IAAI,EAAE;AACFuC,IAAAA,KAAK,EAAEC,gBAAOC;AADZ;AAVuB,CAAlB,CAAf;;eAce,wBAAU3C,MAAV,C","sourcesContent":["import * as React from \"react\";\nimport { ActivityIndicator, View, Text, StyleSheet, } from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nconst Button = ({ Icon, icon, disabled = false, type = \"solid\", loading = false, labelColor, color: colorOverride, children, onPress, elevation = 0, style, theme: { colors, disabledOpacity, roundness, typography }, ...rest }) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n if (type === \"solid\") {\n backgroundColor = buttonColor;\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = labelColor || colors.surface;\n }\n }\n else {\n backgroundColor = \"transparent\";\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = labelColor || buttonColor;\n }\n }\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n }\n else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n };\n const textStyle = {\n textAlign: \"center\",\n color: textColor,\n marginVertical: 16,\n marginHorizontal: 16,\n };\n const iconStyle = [\n styles.icon,\n {\n marginLeft: 16,\n marginRight: -8,\n width: Config.buttonIconSize,\n },\n ];\n const { margin, marginEnd, marginTop, marginLeft, marginRight, marginBottom, marginHorizontal, marginVertical, ...innerStyles } = StyleSheet.flatten(style || {});\n const margins = {\n margin,\n marginEnd,\n marginTop,\n marginLeft,\n marginRight,\n marginBottom,\n marginHorizontal,\n marginVertical,\n };\n return (React.createElement(Elevation, { style: { elevation, alignSelf: \"stretch\", ...margins } },\n React.createElement(Touchable, { ...rest, onPress: onPress, accessibilityState: { disabled }, accessibilityRole: \"button\", disabled: disabled || loading, style: [styles.button, buttonStyle, innerStyles] },\n React.createElement(View, { style: styles.content },\n icon && loading !== true ? (React.createElement(View, { style: iconStyle },\n React.createElement(Icon, { name: icon, size: Config.buttonIconSize, color: textColor }))) : null,\n loading ? (React.createElement(ActivityIndicator, { size: \"small\", color: textColor, style: iconStyle })) : null,\n React.createElement(Text, { numberOfLines: 1, style: [textStyle, typography.button] }, children)))));\n};\nconst styles = StyleSheet.create({\n button: {\n minWidth: 64,\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n width: Config.buttonIconSize,\n },\n});\nexport default withTheme(Button);\n"]}
|
|
@@ -27,8 +27,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
29
|
|
|
30
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
|
-
|
|
32
30
|
const Picker = _ref => {
|
|
33
31
|
var _options$find$label, _options$find;
|
|
34
32
|
|
|
@@ -111,11 +109,27 @@ const Picker = _ref => {
|
|
|
111
109
|
key: o.value
|
|
112
110
|
}))), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
113
111
|
pointerEvents: "none"
|
|
114
|
-
}, /*#__PURE__*/React.createElement(_TextField.default,
|
|
112
|
+
}, /*#__PURE__*/React.createElement(_TextField.default, { ...props,
|
|
115
113
|
value: selectedLabel,
|
|
116
|
-
placeholder: placeholder
|
|
117
|
-
|
|
118
|
-
ref: textField
|
|
114
|
+
placeholder: placeholder,
|
|
115
|
+
// @ts-ignore
|
|
116
|
+
ref: textField,
|
|
117
|
+
disabled: disabled,
|
|
118
|
+
// @ts-expect-error
|
|
119
|
+
style: stylesWithoutMargin
|
|
120
|
+
}))));
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const styles = _reactNative.StyleSheet.create({
|
|
124
|
+
container: {
|
|
125
|
+
alignSelf: "stretch"
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
var _default = (0, _theming.withTheme)(Picker);
|
|
130
|
+
|
|
131
|
+
exports.default = _default;
|
|
132
|
+
//# sourceMappingURL=PickerComponent.android.js.map: textField // cannot determine if ref is of correct type due to component being wrapped in a withTheme()
|
|
119
133
|
,
|
|
120
134
|
disabled: disabled // @ts-expect-error
|
|
121
135
|
,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PickerComponent.android.
|
|
1
|
+
{"version":3,"sources":["PickerComponent.android.js"],"names":["Picker","style","options","placeholder","selectedValue","disabled","onValueChange","onValueChangeOverride","props","viewStyles","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","backgroundColor","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","textField","React","useRef","undefined","itemValue","itemIndex","toggleFocus","current","stylesWithoutMargin","StyleSheet","flatten","selectedLabel","find","o","value","label","createElement","Touchable","onPress","styles","container","View","NativePicker","enabled","opacity","position","top","left","right","bottom","width","map","Item","key","pointerEvents","TextField","ref","create","alignSelf"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,MAAM,GAAG,QAAkI;AAAA;;AAAA,MAAjI;AAAEC,IAAAA,KAAF;AAASC,IAAAA,OAAT;AAAkBC,IAAAA,WAAlB;AAA+BC,IAAAA,aAA/B;AAA8CC,IAAAA,QAAQ,GAAG,KAAzD;AAAgEC,IAAAA,aAAa,EAAEC,qBAAqB,GAAG,MAAM,CAAG,CAAhH;AAAkH,OAAGC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QAFC;AAG3B;AACAJ,IAAAA,KAAK,EAAE8B;AAJoB,GAA/B,CADJ,CAVJ,CADI,CAAR;AAiBH,CArDD;;AAsDA,MAAMW,MAAM,GAAGV,wBAAW4B,MAAX,CAAkB;AAC7BjB,EAAAA,SAAS,EAAE;AACPkB,IAAAA,SAAS,EAAE;AADJ;AADkB,CAAlB,CAAf;;eAKe,wBAAU7D,MAAV,C","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nimport omit from \"lodash.omit\";\nimport { withTheme } from \"../../theming\";\nimport { Picker as NativePicker } from \"@react-native-picker/picker\";\nimport { extractStyles } from \"../../utilities\";\nimport TextField from \"../TextField\";\nimport Touchable from \"../Touchable\";\nconst Picker = ({ style, options, placeholder, selectedValue, disabled = false, onValueChange: onValueChangeOverride = () => { }, ...props }) => {\n const { viewStyles: { borderRadius, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderTopWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderRightWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderBottomWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderLeftWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n backgroundColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n padding, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingTop, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingRight, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingBottom, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingLeft, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...viewStyles }, } = extractStyles(style);\n const textField = React.useRef(undefined);\n const onValueChange = (itemValue, itemIndex) => {\n toggleFocus();\n onValueChangeOverride(itemValue, itemIndex);\n };\n const toggleFocus = () => {\n if (!disabled) {\n // @ts-ignore\n textField.current.toggleFocus(); // cannot determine if method exists due to component being wrapped in a withTheme()\n }\n };\n const stylesWithoutMargin = style &&\n omit(StyleSheet.flatten(style), [\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n ]);\n const selectedLabel = selectedValue &&\n (options.find((o) => o.value === selectedValue)?.label ?? selectedValue);\n return (React.createElement(Touchable, { disabled: disabled, onPress: toggleFocus, style: [styles.container, viewStyles] },\n React.createElement(View, null,\n React.createElement(NativePicker, { enabled: !disabled, selectedValue: selectedValue, onValueChange: onValueChange, style: {\n opacity: 0,\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: \"100%\",\n } }, options.map((o) => (React.createElement(NativePicker.Item, { label: o.label, value: o.value, key: o.value })))),\n React.createElement(View, { pointerEvents: \"none\" },\n React.createElement(TextField, { ...props, value: selectedLabel, placeholder: placeholder, \n // @ts-ignore\n ref: textField, disabled: disabled, \n // @ts-expect-error\n style: stylesWithoutMargin })))));\n};\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n});\nexport default withTheme(Picker);\n"]}
|
|
@@ -21,11 +21,7 @@ const Swiper = _ref => {
|
|
|
21
21
|
from = 0,
|
|
22
22
|
prevTitle = "",
|
|
23
23
|
nextTitle = "",
|
|
24
|
-
prevTitleColor = "red",
|
|
25
|
-
nextTitleColor = "blue",
|
|
26
24
|
dotsTouchable = true,
|
|
27
|
-
dotColor,
|
|
28
|
-
dotActiveColor,
|
|
29
25
|
children,
|
|
30
26
|
style
|
|
31
27
|
} = _ref;
|
|
@@ -39,21 +35,7 @@ const Swiper = _ref => {
|
|
|
39
35
|
controlsProps: {
|
|
40
36
|
prevTitle,
|
|
41
37
|
nextTitle,
|
|
42
|
-
|
|
43
|
-
color: prevTitleColor
|
|
44
|
-
},
|
|
45
|
-
nextTitleStyle: {
|
|
46
|
-
color: nextTitleColor
|
|
47
|
-
},
|
|
48
|
-
dotsTouchable,
|
|
49
|
-
dotActiveStyle: {
|
|
50
|
-
backgroundColor: dotActiveColor
|
|
51
|
-
},
|
|
52
|
-
dotProps: {
|
|
53
|
-
badgeStyle: {
|
|
54
|
-
backgroundColor: dotColor
|
|
55
|
-
}
|
|
56
|
-
}
|
|
38
|
+
dotsTouchable
|
|
57
39
|
}
|
|
58
40
|
}, children));
|
|
59
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Swiper.tsx"],"names":["Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","
|
|
1
|
+
{"version":3,"sources":["Swiper.tsx"],"names":["Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","dotsTouchable","children","style"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAcA,MAAMA,MAAM,GAAG;AAAA,MAAC;AACdC,IAAAA,QAAQ,GAAG,KADG;AAEdC,IAAAA,IAAI,GAAG,KAFO;AAGdC,IAAAA,OAAO,GAAG,CAHI;AAIdC,IAAAA,IAAI,GAAG,CAJO;AAKdC,IAAAA,SAAS,GAAG,EALE;AAMdC,IAAAA,SAAS,GAAG,EANE;AAOdC,IAAAA,aAAa,GAAG,IAPF;AAQdC,IAAAA,QARc;AASdC,IAAAA;AATc,GAAD;AAAA,sBAWb,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAEA;AAAb,kBACE,6BAAC,6BAAD;AACE,IAAA,IAAI,EAAEL,IADR;AAEE,IAAA,IAAI,EAAEF,IAFR;AAGE,IAAA,OAAO,EAAEC,OAHX;AAIE,IAAA,QAAQ,EAAEF,QAJZ;AAKE,IAAA,aAAa,EAAE;AACbI,MAAAA,SADa;AAEbC,MAAAA,SAFa;AAGbC,MAAAA;AAHa;AALjB,KAWGC,QAXH,CADF,CAXa;AAAA,CAAf;;eA4BeR,M","sourcesContent":["import React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport SwiperComponent from \"react-native-web-swiper\";\n\nexport interface SwiperProps {\n vertical?: boolean;\n loop?: boolean;\n from?: number;\n timeout?: number;\n prevTitle?: string;\n nextTitle?: string;\n dotsTouchable?: boolean;\n children: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Swiper = ({\n vertical = false,\n loop = false,\n timeout = 0,\n from = 0,\n prevTitle = \"\",\n nextTitle = \"\",\n dotsTouchable = true,\n children,\n style,\n}: SwiperProps) => (\n <View style={style}>\n <SwiperComponent\n from={from}\n loop={loop}\n timeout={timeout}\n vertical={vertical}\n controlsProps={{\n prevTitle,\n nextTitle,\n dotsTouchable,\n }}\n >\n {children}\n </SwiperComponent>\n </View>\n);\n\nexport default Swiper;\n"]}
|
|
@@ -93,10 +93,17 @@ class TextField extends React.Component {
|
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
if (typeof value === "string") {
|
|
97
|
+
this.setState({
|
|
98
|
+
value
|
|
99
|
+
});
|
|
100
|
+
this.props.onChangeText && this.props.onChangeText(value);
|
|
101
|
+
} else {
|
|
102
|
+
this.setState({
|
|
103
|
+
value: value.nativeEvent.text
|
|
104
|
+
});
|
|
105
|
+
this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
|
|
106
|
+
}
|
|
100
107
|
});
|
|
101
108
|
|
|
102
109
|
_defineProperty(this, "_root", undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TextField.tsx"],"names":["AnimatedText","Animated","createAnimatedComponent","Text","FOCUS_ANIMATION_DURATION","BLUR_ANIMATION_DURATION","ICON_SIZE","TextField","React","Component","labeled","Value","props","value","error","focused","placeholder","labelLayout","measured","width","setTimeout","clearTimeout","_timer","setState","timing","state","toValue","duration","useNativeDriver","start","disabled","onChangeText","undefined","getDerivedStateFromProps","nextProps","prevState","componentDidMount","defaultValue","_handleChangeText","_minmizeLabel","componentDidUpdate","prevProps","_restoreLabel","label","_showPlaceholder","_hidePlaceholder","componentWillUnmount","toggleFocus","setNativeProps","args","_root","isFocused","clear","focus","blur","render","Icon","type","leftIconName","leftIconMode","rightIconName","assistiveText","underlineColor","underlineColorProp","multiline","numberOfLines","style","theme","colors","typography","roundness","disabledOpacity","rest","MINIMIZED_LABEL_Y_OFFSET","caption","lineHeight","OUTLINE_MINIMIZED_LABEL_Y_OFFSET","MAXIMIZED_LABEL_FONT_SIZE","subtitle1","fontSize","MINIMIZED_LABEL_FONT_SIZE","hasActiveOutline","inputTextColor","activeColor","borderColor","placeholderColor","containerStyle","backgroundColor","inputStyle","strong","light","divider","primary","background","placeholderTextColor","paddingVertical","color","paddingLeft","paddingRight","height","assistiveTextLeftMargin","borderTopLeftRadius","borderTopRightRadius","paddingBottom","marginTop","borderRadius","borderWidth","paddingTop","opacity","paddingHorizontal","marginLeft","leftIconColor","leftIconProps","size","name","leftIconStyle","position","labelStyle","top","left","transform","translateY","interpolate","inputRange","outputRange","scale","translateX","textStyles","inputStyles","styles","input","marginHorizontal","bgColor","padding","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderCol","styleProp","StyleSheet","flatten","container","underline","scaleY","absoluteFill","e","nativeEvent","layout","ref","c","onChange","editable","selectionColor","onFocus","_handleFocus","onBlur","_handleBlur","underlineColorAndroid","right","create","alignSelf","bottom","flexGrow","justifyContent","textAlignVertical","margin","textAlign","I18nManager","isRTL"],"mappings":";;;;;;;AAAA;;AACA;;AAgBA;;AAGA;;;;;;;;;;AAEA,MAAMA,YAAY,GAAGC,sBAASC,uBAAT,CAAiCC,iBAAjC,CAArB;;AAEA,MAAMC,wBAAwB,GAAG,GAAjC;AACA,MAAMC,uBAAuB,GAAG,GAAhC;AACA,MAAMC,SAAS,GAAG,EAAlB;;AAqCA,MAAMC,SAAN,SAAwBC,KAAK,CAACC,SAA9B,CAAsD;AAAA;AAAA;;AAAA,mCAUrC;AACbC,MAAAA,OAAO,EAAE,IAAIT,sBAASU,KAAb,CAAmB,KAAKC,KAAL,CAAWC,KAAX,IAAoB,KAAKD,KAAL,CAAWE,KAA/B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AAA,SAAS,EAAE,CAFb;AAGEM,QAAAA,UAAU,EAAEV;AAHd,OADK;AADT,OASGvC,aATH,CADY,GAYV,IA9JN,CADF;AAkKD;;AA/gBmD;;eAkhBvC,wBAAUtD,SAAV,C;;;;AAEf,MAAM0H,MAAM,GAAGW,wBAAWoB,MAAX,CAAkB;AAC/BlB,EAAAA,SAAS,EAAE;AACTmB,IAAAA,SAAS,EAAE;AADF,GADoB;AAI/BjJ,EAAAA,WAAW,EAAE;AACXoG,IAAAA,QAAQ,EAAE,UADC;AAEXG,IAAAA,IAAI,EAAE;AAFK,GAJkB;AAQ/BwB,EAAAA,SAAS,EAAE;AACT3B,IAAAA,QAAQ,EAAE,UADD;AAETG,IAAAA,IAAI,EAAE,CAFG;AAGTwC,IAAAA,KAAK,EAAE,CAHE;AAITG,IAAAA,MAAM,EAAE,CAJC;AAKT/D,IAAAA,MAAM,EAAE;AALC,GARoB;AAe/B+B,EAAAA,KAAK,EAAE;AACLiC,IAAAA,QAAQ,EAAE,CADL;AAELC,IAAAA,cAAc,EAAE,QAFX;AAGLC,IAAAA,iBAAiB,EAAE,QAHd;AAILC,IAAAA,MAAM,EAAE,CAJH;AAKLC,IAAAA,SAAS,EAAEC,yBAAYC,KAAZ,GAAoB,OAApB,GAA8B;AALpC;AAfwB,CAAlB,CAAf","sourcesContent":["import * as React from \"react\";\nimport {\n View,\n Animated,\n TextInput as NativeTextInput,\n StyleSheet,\n Text,\n I18nManager,\n StyleProp,\n TextInputProps,\n NativeSyntheticEvent,\n TextInputChangeEventData,\n ViewStyle,\n TextStyle,\n LayoutChangeEvent,\n ImageStyle,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport { applyStyles, extractStyles } from \"../utilities\";\n\nconst AnimatedText = Animated.createAnimatedComponent(Text);\n\nconst FOCUS_ANIMATION_DURATION = 150;\nconst BLUR_ANIMATION_DURATION = 180;\nconst ICON_SIZE = 24;\n\nexport type Props = {\n type?: \"solid\" | \"underline\";\n defaultValue?: string;\n disabled?: boolean;\n label?: string;\n error?: boolean;\n leftIconName?: string;\n leftIconMode?: \"inset\" | \"outset\";\n onChangeText: (\n text: string | NativeSyntheticEvent<TextInputChangeEventData>\n ) => void;\n rightIconName?: string;\n assistiveText?: string;\n multiline?: boolean;\n numberOfLines: number;\n underlineColor?: string;\n style?: StyleProp<ViewStyle> & { height?: number };\n theme: Theme;\n render?: (\n props: TextInputProps & { ref: (c: NativeTextInput) => void }\n ) => React.ReactNode;\n} & TextInputProps &\n IconSlot;\n\ninterface State {\n labeled: Animated.Value;\n focused?: boolean;\n placeholder?: string | undefined;\n labelLayout: {\n measured: boolean;\n width: number;\n };\n value?: string;\n}\n\nclass TextField extends React.Component<Props, State> {\n static getDerivedStateFromProps(nextProps: Props, prevState: State) {\n return {\n value:\n typeof nextProps.value !== \"undefined\"\n ? nextProps.value\n : prevState.value,\n };\n }\n\n state: State = {\n labeled: new Animated.Value(this.props.value || this.props.error ? 0 : 1),\n focused: false,\n placeholder: this.props.error ? this.props.placeholder : \"\",\n labelLayout: {\n measured: false,\n width: 0,\n },\n };\n\n componentDidMount() {\n if (this.props.defaultValue) {\n this._handleChangeText(this.props.defaultValue);\n }\n\n if (this.props.placeholder) {\n this._minmizeLabel();\n }\n }\n\n componentDidUpdate(prevProps: Props, prevState: State) {\n if (\n prevState.focused !== this.state.focused ||\n prevState.value !== this.state.value\n ) {\n // The label should be minimized if the text input is focused, or has text\n // In minimized mode, the label moves up and becomes small\n if (\n this.state.value ||\n this.state.focused ||\n this.props.error ||\n this.props.placeholder\n ) {\n this._minmizeLabel();\n } else {\n this._restoreLabel();\n }\n }\n\n if (\n prevState.focused !== this.state.focused ||\n prevProps.label !== this.props.label\n ) {\n // Show placeholder text only if the input is focused, or has error, or there's no label\n // We don't show placeholder if there's a label because the label acts as placeholder\n // When focused, the label moves up, so we can show a placeholder\n if (this.state.focused || this.props.error || !this.props.label) {\n this._showPlaceholder();\n } else {\n this._hidePlaceholder();\n }\n }\n }\n\n _timer = setTimeout(() => {}, 0);\n\n componentWillUnmount() {\n clearTimeout(this._timer);\n }\n\n _showPlaceholder = () => {\n clearTimeout(this._timer);\n\n // Set the placeholder in a delay to offset the label animation\n // If we show it immediately, they'll overlap and look ugly\n this._timer = setTimeout(\n () =>\n this.setState({\n placeholder: this.props.placeholder,\n }),\n 50\n );\n };\n\n _hidePlaceholder = () =>\n this.setState({\n placeholder: \"\",\n });\n\n _restoreLabel = () =>\n Animated.timing(this.state.labeled, {\n toValue: 1,\n duration: FOCUS_ANIMATION_DURATION,\n useNativeDriver: true,\n }).start();\n\n _minmizeLabel = () =>\n Animated.timing(this.state.labeled, {\n toValue: 0,\n duration: BLUR_ANIMATION_DURATION,\n useNativeDriver: true,\n }).start();\n\n _handleFocus = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.setState({ focused: true });\n };\n\n _handleBlur = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.setState({ focused: false });\n };\n\n _handleChangeText = (\n value: NativeSyntheticEvent<TextInputChangeEventData> | string\n ) => {\n if (this.props.disabled) {\n return;\n }\n\n this.setState({ value: value as string });\n this.props.onChangeText && this.props.onChangeText(value);\n };\n\n toggleFocus() {\n this.setState((prevState: State) => ({ focused: !prevState.focused }));\n }\n\n _root: NativeTextInput | undefined = undefined;\n /**\n * @internal\n */\n setNativeProps(args: Props) {\n return this._root && this._root.setNativeProps(args);\n }\n\n isFocused() {\n return this._root && this._root.isFocused();\n }\n\n clear() {\n return this._root && this._root.clear();\n }\n\n focus() {\n return this._root && this._root.focus();\n }\n\n blur() {\n return this._root && this._root.blur();\n }\n\n render() {\n const {\n Icon,\n type = \"underline\",\n disabled = false,\n label,\n error = false,\n leftIconName,\n leftIconMode,\n rightIconName,\n assistiveText,\n underlineColor: underlineColorProp,\n multiline = false,\n numberOfLines = 4,\n style,\n theme: { colors, typography, roundness, disabledOpacity },\n render = (props) => <NativeTextInput {...props} />,\n ...rest\n } = this.props;\n\n const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);\n const OUTLINE_MINIMIZED_LABEL_Y_OFFSET = -(16 * 0.5 + 4);\n const MAXIMIZED_LABEL_FONT_SIZE = typography.subtitle1.fontSize;\n const MINIMIZED_LABEL_FONT_SIZE = typography.caption.fontSize;\n\n const hasActiveOutline = this.state.focused || error;\n\n let inputTextColor,\n activeColor,\n underlineColor,\n borderColor,\n placeholderColor,\n containerStyle: StyleProp<ViewStyle>,\n backgroundColor,\n inputStyle: StyleProp<TextStyle>;\n\n inputTextColor = colors.strong;\n if (disabled) {\n activeColor = colors.light;\n placeholderColor = colors.light;\n borderColor = \"transparent\";\n underlineColor = \"transparent\";\n backgroundColor = colors.divider;\n } else {\n activeColor = error ? colors.error : colors.primary;\n placeholderColor = borderColor = colors.light;\n underlineColor = underlineColorProp;\n backgroundColor = colors.background;\n }\n\n if (rest.placeholderTextColor) {\n placeholderColor = rest.placeholderTextColor;\n }\n\n const { lineHeight, ...subtitle1 } = typography.subtitle1;\n\n inputStyle = {\n paddingVertical: 0,\n color: inputTextColor,\n paddingLeft:\n leftIconName && leftIconMode === \"inset\"\n ? ICON_SIZE + 12 + (type === \"solid\" ? 16 : 0)\n : 0,\n paddingRight: rightIconName ? ICON_SIZE + 16 + 4 : 12,\n ...subtitle1,\n };\n\n if (!multiline) {\n inputStyle.height = lineHeight;\n }\n\n let assistiveTextLeftMargin;\n if (type === \"underline\") {\n containerStyle = {\n borderTopLeftRadius: roundness,\n borderTopRightRadius: roundness,\n paddingBottom: 12,\n marginTop: 16,\n };\n\n if (leftIconName && leftIconMode === \"outset\") {\n assistiveTextLeftMargin = ICON_SIZE + 8;\n } else {\n assistiveTextLeftMargin = 0;\n }\n } else {\n containerStyle = {\n borderRadius: roundness,\n borderColor: hasActiveOutline ? activeColor : borderColor,\n borderWidth: 1,\n paddingTop: label ? 16 * 1.5 : 16,\n paddingBottom: label ? 16 * 0.5 : 16,\n opacity: disabled ? disabledOpacity : 1,\n backgroundColor,\n };\n\n if (leftIconName && leftIconMode === \"inset\") {\n assistiveTextLeftMargin = 16 + 4;\n } else if (leftIconName && leftIconMode === \"outset\") {\n assistiveTextLeftMargin = ICON_SIZE + 8 + 12;\n } else {\n assistiveTextLeftMargin = 12;\n }\n\n inputStyle.paddingHorizontal = 12;\n }\n\n if (leftIconName && leftIconMode === \"outset\") {\n containerStyle.marginLeft = ICON_SIZE + 8;\n }\n\n let leftIconColor;\n if (error) {\n leftIconColor = colors.error;\n } else if (this.state.focused) {\n leftIconColor = colors.primary;\n } else {\n leftIconColor = colors.light;\n }\n\n const leftIconProps = {\n size: 24,\n color: leftIconColor,\n name: leftIconName || \"\",\n };\n\n const leftIconStyle: ImageStyle = {\n position: \"absolute\",\n marginTop:\n type === \"solid\"\n ? MINIMIZED_LABEL_FONT_SIZE + 4\n : leftIconMode === \"outset\"\n ? 16\n : 0,\n };\n\n const labelStyle = {\n ...typography.subtitle1,\n top: type === \"solid\" ? 16 : 0,\n left:\n leftIconName && leftIconMode === \"inset\"\n ? ICON_SIZE + (type === \"solid\" ? 16 : 12)\n : 0,\n transform: [\n {\n // Move label to top\n translateY: this.state.labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [\n type === \"solid\"\n ? OUTLINE_MINIMIZED_LABEL_Y_OFFSET\n : MINIMIZED_LABEL_Y_OFFSET,\n 0,\n ],\n }),\n },\n {\n // Make label smaller\n scale: this.state.labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [\n MINIMIZED_LABEL_FONT_SIZE / MAXIMIZED_LABEL_FONT_SIZE,\n 1,\n ],\n }),\n },\n {\n // Offset label scale since RN doesn't support transform origin\n translateX: this.state.labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [\n -(1 - MINIMIZED_LABEL_FONT_SIZE / MAXIMIZED_LABEL_FONT_SIZE) *\n (this.state.labelLayout.width / 2),\n 0,\n ],\n }),\n },\n ],\n };\n\n const { textStyles } = extractStyles(style);\n const inputStyles = applyStyles(\n [\n styles.input,\n inputStyle,\n type === \"solid\" ? { marginHorizontal: 12 } : {},\n ],\n textStyles\n );\n\n const {\n backgroundColor: bgColor,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n borderRadius,\n borderWidth,\n borderTopWidth,\n borderRightWidth,\n borderBottomWidth,\n borderLeftWidth,\n borderColor: borderCol,\n ...styleProp\n } = StyleSheet.flatten(style || {}) as ViewStyle & { height?: number };\n\n return (\n <View style={[styles.container, styleProp]}>\n {leftIconName && leftIconMode === \"outset\" ? (\n <Icon {...leftIconProps} style={leftIconStyle} />\n ) : null}\n <View\n style={applyStyles([containerStyle], {\n height: style?.height,\n backgroundColor: bgColor,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n borderRadius,\n borderWidth,\n borderTopWidth,\n borderRightWidth,\n borderBottomWidth,\n borderLeftWidth,\n borderColor: borderCol,\n })}\n >\n {type === \"underline\" ? (\n // When type === 'flat', render an underline\n <Animated.View\n style={[\n styles.underline,\n {\n backgroundColor:\n bgColor ||\n (error\n ? colors.error\n : this.state.focused\n ? activeColor\n : underlineColor),\n // Underlines is thinner when input is not focused\n transform: [{ scaleY: this.state.focused ? 1 : 0.5 }],\n },\n ]}\n />\n ) : null}\n\n {label ? (\n // Position colored placeholder and gray placeholder on top of each other and crossfade them\n // This gives the effect of animating the color, but allows us to use native driver\n <View\n pointerEvents=\"none\"\n style={[\n StyleSheet.absoluteFill,\n {\n opacity:\n // Hide the label in minimized state until we measure its width\n this.state.value || this.state.focused\n ? this.state.labelLayout.measured\n ? 1\n : 0\n : 1,\n },\n ]}\n >\n <AnimatedText\n onLayout={(e: LayoutChangeEvent) =>\n this.setState({\n labelLayout: {\n width: e.nativeEvent.layout.width,\n measured: true,\n },\n })\n }\n style={[\n styles.placeholder,\n type === \"solid\" ? { paddingHorizontal: 12 } : {},\n labelStyle,\n {\n color: placeholderColor,\n opacity: this.state.labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [hasActiveOutline ? 1 : 0, 0],\n }),\n },\n ]}\n numberOfLines={1}\n >\n {label}\n </AnimatedText>\n <AnimatedText\n style={[\n styles.placeholder,\n type === \"solid\" ? { paddingHorizontal: 12 } : {},\n labelStyle,\n {\n color: placeholderColor,\n opacity: hasActiveOutline ? this.state.labeled : 1,\n },\n ]}\n numberOfLines={1}\n >\n {label}\n </AnimatedText>\n </View>\n ) : null}\n\n {leftIconName && leftIconMode === \"inset\" ? (\n <Icon\n {...leftIconProps}\n style={{\n ...leftIconStyle,\n marginLeft: type === \"solid\" ? 16 : 0,\n }}\n />\n ) : null}\n\n {render({\n ref: (c: NativeTextInput) => {\n this._root = c;\n },\n onChange: this._handleChangeText,\n placeholder: label\n ? this.state.placeholder\n : this.props.placeholder,\n placeholderTextColor: placeholderColor,\n editable: !disabled,\n selectionColor: activeColor,\n multiline,\n numberOfLines,\n onFocus: this._handleFocus,\n onBlur: this._handleBlur,\n underlineColorAndroid: \"transparent\",\n style: inputStyles,\n ...rest,\n value: this.state.value,\n })}\n </View>\n {rightIconName ? (\n <Icon\n name={rightIconName}\n size={ICON_SIZE}\n color={colors.light}\n style={{\n position: \"absolute\",\n right: 16,\n marginTop: type === \"solid\" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16,\n }}\n />\n ) : null}\n\n {assistiveText ? (\n <Text\n style={[\n {\n color: error ? colors.error : colors.light,\n marginTop: 8,\n marginLeft: assistiveTextLeftMargin,\n },\n ]}\n >\n {assistiveText}\n </Text>\n ) : null}\n </View>\n );\n }\n}\n\nexport default withTheme(TextField);\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n placeholder: {\n position: \"absolute\",\n left: 0,\n },\n underline: {\n position: \"absolute\",\n left: 0,\n right: 0,\n bottom: 0,\n height: 2,\n },\n input: {\n flexGrow: 1,\n justifyContent: \"center\",\n textAlignVertical: \"center\",\n margin: 0,\n textAlign: I18nManager.isRTL ? \"right\" : \"left\",\n },\n});\n"]}
|
|
1
|
+
{"version":3,"sources":["TextField.tsx"],"names":["AnimatedText","Animated","createAnimatedComponent","Text","FOCUS_ANIMATION_DURATION","BLUR_ANIMATION_DURATION","ICON_SIZE","TextField","React","Component","labeled","Value","props","value","error","focused","placeholder","labelLayout","measured","width","setTimeout","clearTimeout","_timer","setState","timing","state","toValue","duration","useNativeDriver","start","disabled","onChangeText","nativeEvent","text","undefined","getDerivedStateFromProps","nextProps","prevState","componentDidMount","defaultValue","_handleChangeText","_minmizeLabel","componentDidUpdate","prevProps","_restoreLabel","label","_showPlaceholder","_hidePlaceholder","componentWillUnmount","toggleFocus","setNativeProps","args","_root","isFocused","clear","focus","blur","render","Icon","type","leftIconName","leftIconMode","rightIconName","assistiveText","underlineColor","underlineColorProp","multiline","numberOfLines","style","theme","colors","typography","roundness","disabledOpacity","rest","MINIMIZED_LABEL_Y_OFFSET","caption","lineHeight","OUTLINE_MINIMIZED_LABEL_Y_OFFSET","MAXIMIZED_LABEL_FONT_SIZE","subtitle1","fontSize","MINIMIZED_LABEL_FONT_SIZE","hasActiveOutline","inputTextColor","activeColor","borderColor","placeholderColor","containerStyle","backgroundColor","inputStyle","strong","light","divider","primary","background","placeholderTextColor","paddingVertical","color","paddingLeft","paddingRight","height","assistiveTextLeftMargin","borderTopLeftRadius","borderTopRightRadius","paddingBottom","marginTop","borderRadius","borderWidth","paddingTop","opacity","paddingHorizontal","marginLeft","leftIconColor","leftIconProps","size","name","leftIconStyle","position","labelStyle","top","left","transform","translateY","interpolate","inputRange","outputRange","scale","translateX","textStyles","inputStyles","styles","input","marginHorizontal","bgColor","padding","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderCol","styleProp","StyleSheet","flatten","container","underline","scaleY","absoluteFill","e","layout","ref","c","onChange","editable","selectionColor","onFocus","_handleFocus","onBlur","_handleBlur","underlineColorAndroid","right","create","alignSelf","bottom","flexGrow","justifyContent","textAlignVertical","margin","textAlign","I18nManager","isRTL"],"mappings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AALC,GARoB;AAe/B+B,EAAAA,KAAK,EAAE;AACLgC,IAAAA,QAAQ,EAAE,CADL;AAELC,IAAAA,cAAc,EAAE,QAFX;AAGLC,IAAAA,iBAAiB,EAAE,QAHd;AAILC,IAAAA,MAAM,EAAE,CAJH;AAKLC,IAAAA,SAAS,EAAEC,yBAAYC,KAAZ,GAAoB,OAApB,GAA8B;AALpC;AAfwB,CAAlB,CAAf","sourcesContent":["import * as React from \"react\";\nimport {\n View,\n Animated,\n TextInput as NativeTextInput,\n StyleSheet,\n Text,\n I18nManager,\n StyleProp,\n TextInputProps,\n NativeSyntheticEvent,\n TextInputChangeEventData,\n ViewStyle,\n TextStyle,\n LayoutChangeEvent,\n ImageStyle,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport { applyStyles, extractStyles } from \"../utilities\";\n\nconst AnimatedText = Animated.createAnimatedComponent(Text);\n\nconst FOCUS_ANIMATION_DURATION = 150;\nconst BLUR_ANIMATION_DURATION = 180;\nconst ICON_SIZE = 24;\n\nexport type Props = {\n type?: \"solid\" | \"underline\";\n defaultValue?: string;\n disabled?: boolean;\n label?: string;\n error?: boolean;\n leftIconName?: string;\n leftIconMode?: \"inset\" | \"outset\";\n onChangeText: (\n text: string | NativeSyntheticEvent<TextInputChangeEventData>\n ) => void;\n rightIconName?: string;\n assistiveText?: string;\n multiline?: boolean;\n numberOfLines: number;\n underlineColor?: string;\n style?: StyleProp<ViewStyle> & { height?: number };\n theme: Theme;\n render?: (\n props: TextInputProps & { ref: (c: NativeTextInput) => void }\n ) => React.ReactNode;\n} & TextInputProps &\n IconSlot;\n\ninterface State {\n labeled: Animated.Value;\n focused?: boolean;\n placeholder?: string | undefined;\n labelLayout: {\n measured: boolean;\n width: number;\n };\n value?: string;\n}\n\nclass TextField extends React.Component<Props, State> {\n static getDerivedStateFromProps(nextProps: Props, prevState: State) {\n return {\n value:\n typeof nextProps.value !== \"undefined\"\n ? nextProps.value\n : prevState.value,\n };\n }\n\n state: State = {\n labeled: new Animated.Value(this.props.value || this.props.error ? 0 : 1),\n focused: false,\n placeholder: this.props.error ? this.props.placeholder : \"\",\n labelLayout: {\n measured: false,\n width: 0,\n },\n };\n\n componentDidMount() {\n if (this.props.defaultValue) {\n this._handleChangeText(this.props.defaultValue);\n }\n\n if (this.props.placeholder) {\n this._minmizeLabel();\n }\n }\n\n componentDidUpdate(prevProps: Props, prevState: State) {\n if (\n prevState.focused !== this.state.focused ||\n prevState.value !== this.state.value\n ) {\n // The label should be minimized if the text input is focused, or has text\n // In minimized mode, the label moves up and becomes small\n if (\n this.state.value ||\n this.state.focused ||\n this.props.error ||\n this.props.placeholder\n ) {\n this._minmizeLabel();\n } else {\n this._restoreLabel();\n }\n }\n\n if (\n prevState.focused !== this.state.focused ||\n prevProps.label !== this.props.label\n ) {\n // Show placeholder text only if the input is focused, or has error, or there's no label\n // We don't show placeholder if there's a label because the label acts as placeholder\n // When focused, the label moves up, so we can show a placeholder\n if (this.state.focused || this.props.error || !this.props.label) {\n this._showPlaceholder();\n } else {\n this._hidePlaceholder();\n }\n }\n }\n\n _timer = setTimeout(() => {}, 0);\n\n componentWillUnmount() {\n clearTimeout(this._timer);\n }\n\n _showPlaceholder = () => {\n clearTimeout(this._timer);\n\n // Set the placeholder in a delay to offset the label animation\n // If we show it immediately, they'll overlap and look ugly\n this._timer = setTimeout(\n () =>\n this.setState({\n placeholder: this.props.placeholder,\n }),\n 50\n );\n };\n\n _hidePlaceholder = () =>\n this.setState({\n placeholder: \"\",\n });\n\n _restoreLabel = () =>\n Animated.timing(this.state.labeled, {\n toValue: 1,\n duration: FOCUS_ANIMATION_DURATION,\n useNativeDriver: true,\n }).start();\n\n _minmizeLabel = () =>\n Animated.timing(this.state.labeled, {\n toValue: 0,\n duration: BLUR_ANIMATION_DURATION,\n useNativeDriver: true,\n }).start();\n\n _handleFocus = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.setState({ focused: true });\n };\n\n _handleBlur = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.setState({ focused: false });\n };\n\n _handleChangeText = (\n value: NativeSyntheticEvent<TextInputChangeEventData> | string\n ) => {\n if (this.props.disabled) {\n return;\n }\n\n if (typeof value === \"string\") {\n this.setState({ value });\n this.props.onChangeText && this.props.onChangeText(value);\n } else {\n this.setState({ value: value.nativeEvent.text });\n this.props.onChangeText &&\n this.props.onChangeText(value.nativeEvent.text);\n }\n };\n\n toggleFocus() {\n this.setState((prevState: State) => ({ focused: !prevState.focused }));\n }\n\n _root: NativeTextInput | undefined = undefined;\n /**\n * @internal\n */\n setNativeProps(args: Props) {\n return this._root && this._root.setNativeProps(args);\n }\n\n isFocused() {\n return this._root && this._root.isFocused();\n }\n\n clear() {\n return this._root && this._root.clear();\n }\n\n focus() {\n return this._root && this._root.focus();\n }\n\n blur() {\n return this._root && this._root.blur();\n }\n\n render() {\n const {\n Icon,\n type = \"underline\",\n disabled = false,\n label,\n error = false,\n leftIconName,\n leftIconMode,\n rightIconName,\n assistiveText,\n underlineColor: underlineColorProp,\n multiline = false,\n numberOfLines = 4,\n style,\n theme: { colors, typography, roundness, disabledOpacity },\n render = (props) => <NativeTextInput {...props} />,\n ...rest\n } = this.props;\n\n const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);\n const OUTLINE_MINIMIZED_LABEL_Y_OFFSET = -(16 * 0.5 + 4);\n const MAXIMIZED_LABEL_FONT_SIZE = typography.subtitle1.fontSize;\n const MINIMIZED_LABEL_FONT_SIZE = typography.caption.fontSize;\n\n const hasActiveOutline = this.state.focused || error;\n\n let inputTextColor,\n activeColor,\n underlineColor,\n borderColor,\n placeholderColor,\n containerStyle: StyleProp<ViewStyle>,\n backgroundColor,\n inputStyle: StyleProp<TextStyle>;\n\n inputTextColor = colors.strong;\n if (disabled) {\n activeColor = colors.light;\n placeholderColor = colors.light;\n borderColor = \"transparent\";\n underlineColor = \"transparent\";\n backgroundColor = colors.divider;\n } else {\n activeColor = error ? colors.error : colors.primary;\n placeholderColor = borderColor = colors.light;\n underlineColor = underlineColorProp;\n backgroundColor = colors.background;\n }\n\n if (rest.placeholderTextColor) {\n placeholderColor = rest.placeholderTextColor;\n }\n\n const { lineHeight, ...subtitle1 } = typography.subtitle1;\n\n inputStyle = {\n paddingVertical: 0,\n color: inputTextColor,\n paddingLeft:\n leftIconName && leftIconMode === \"inset\"\n ? ICON_SIZE + 12 + (type === \"solid\" ? 16 : 0)\n : 0,\n paddingRight: rightIconName ? ICON_SIZE + 16 + 4 : 12,\n ...subtitle1,\n };\n\n if (!multiline) {\n inputStyle.height = lineHeight;\n }\n\n let assistiveTextLeftMargin;\n if (type === \"underline\") {\n containerStyle = {\n borderTopLeftRadius: roundness,\n borderTopRightRadius: roundness,\n paddingBottom: 12,\n marginTop: 16,\n };\n\n if (leftIconName && leftIconMode === \"outset\") {\n assistiveTextLeftMargin = ICON_SIZE + 8;\n } else {\n assistiveTextLeftMargin = 0;\n }\n } else {\n containerStyle = {\n borderRadius: roundness,\n borderColor: hasActiveOutline ? activeColor : borderColor,\n borderWidth: 1,\n paddingTop: label ? 16 * 1.5 : 16,\n paddingBottom: label ? 16 * 0.5 : 16,\n opacity: disabled ? disabledOpacity : 1,\n backgroundColor,\n };\n\n if (leftIconName && leftIconMode === \"inset\") {\n assistiveTextLeftMargin = 16 + 4;\n } else if (leftIconName && leftIconMode === \"outset\") {\n assistiveTextLeftMargin = ICON_SIZE + 8 + 12;\n } else {\n assistiveTextLeftMargin = 12;\n }\n\n inputStyle.paddingHorizontal = 12;\n }\n\n if (leftIconName && leftIconMode === \"outset\") {\n containerStyle.marginLeft = ICON_SIZE + 8;\n }\n\n let leftIconColor;\n if (error) {\n leftIconColor = colors.error;\n } else if (this.state.focused) {\n leftIconColor = colors.primary;\n } else {\n leftIconColor = colors.light;\n }\n\n const leftIconProps = {\n size: 24,\n color: leftIconColor,\n name: leftIconName || \"\",\n };\n\n const leftIconStyle: ImageStyle = {\n position: \"absolute\",\n marginTop:\n type === \"solid\"\n ? MINIMIZED_LABEL_FONT_SIZE + 4\n : leftIconMode === \"outset\"\n ? 16\n : 0,\n };\n\n const labelStyle = {\n ...typography.subtitle1,\n top: type === \"solid\" ? 16 : 0,\n left:\n leftIconName && leftIconMode === \"inset\"\n ? ICON_SIZE + (type === \"solid\" ? 16 : 12)\n : 0,\n transform: [\n {\n // Move label to top\n translateY: this.state.labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [\n type === \"solid\"\n ? OUTLINE_MINIMIZED_LABEL_Y_OFFSET\n : MINIMIZED_LABEL_Y_OFFSET,\n 0,\n ],\n }),\n },\n {\n // Make label smaller\n scale: this.state.labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [\n MINIMIZED_LABEL_FONT_SIZE / MAXIMIZED_LABEL_FONT_SIZE,\n 1,\n ],\n }),\n },\n {\n // Offset label scale since RN doesn't support transform origin\n translateX: this.state.labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [\n -(1 - MINIMIZED_LABEL_FONT_SIZE / MAXIMIZED_LABEL_FONT_SIZE) *\n (this.state.labelLayout.width / 2),\n 0,\n ],\n }),\n },\n ],\n };\n\n const { textStyles } = extractStyles(style);\n const inputStyles = applyStyles(\n [\n styles.input,\n inputStyle,\n type === \"solid\" ? { marginHorizontal: 12 } : {},\n ],\n textStyles\n );\n\n const {\n backgroundColor: bgColor,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n borderRadius,\n borderWidth,\n borderTopWidth,\n borderRightWidth,\n borderBottomWidth,\n borderLeftWidth,\n borderColor: borderCol,\n ...styleProp\n } = StyleSheet.flatten(style || {}) as ViewStyle & { height?: number };\n\n return (\n <View style={[styles.container, styleProp]}>\n {leftIconName && leftIconMode === \"outset\" ? (\n <Icon {...leftIconProps} style={leftIconStyle} />\n ) : null}\n <View\n style={applyStyles([containerStyle], {\n height: style?.height,\n backgroundColor: bgColor,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n borderRadius,\n borderWidth,\n borderTopWidth,\n borderRightWidth,\n borderBottomWidth,\n borderLeftWidth,\n borderColor: borderCol,\n })}\n >\n {type === \"underline\" ? (\n // When type === 'flat', render an underline\n <Animated.View\n style={[\n styles.underline,\n {\n backgroundColor:\n bgColor ||\n (error\n ? colors.error\n : this.state.focused\n ? activeColor\n : underlineColor),\n // Underlines is thinner when input is not focused\n transform: [{ scaleY: this.state.focused ? 1 : 0.5 }],\n },\n ]}\n />\n ) : null}\n\n {label ? (\n // Position colored placeholder and gray placeholder on top of each other and crossfade them\n // This gives the effect of animating the color, but allows us to use native driver\n <View\n pointerEvents=\"none\"\n style={[\n StyleSheet.absoluteFill,\n {\n opacity:\n // Hide the label in minimized state until we measure its width\n this.state.value || this.state.focused\n ? this.state.labelLayout.measured\n ? 1\n : 0\n : 1,\n },\n ]}\n >\n <AnimatedText\n onLayout={(e: LayoutChangeEvent) =>\n this.setState({\n labelLayout: {\n width: e.nativeEvent.layout.width,\n measured: true,\n },\n })\n }\n style={[\n styles.placeholder,\n type === \"solid\" ? { paddingHorizontal: 12 } : {},\n labelStyle,\n {\n color: placeholderColor,\n opacity: this.state.labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [hasActiveOutline ? 1 : 0, 0],\n }),\n },\n ]}\n numberOfLines={1}\n >\n {label}\n </AnimatedText>\n <AnimatedText\n style={[\n styles.placeholder,\n type === \"solid\" ? { paddingHorizontal: 12 } : {},\n labelStyle,\n {\n color: placeholderColor,\n opacity: hasActiveOutline ? this.state.labeled : 1,\n },\n ]}\n numberOfLines={1}\n >\n {label}\n </AnimatedText>\n </View>\n ) : null}\n\n {leftIconName && leftIconMode === \"inset\" ? (\n <Icon\n {...leftIconProps}\n style={{\n ...leftIconStyle,\n marginLeft: type === \"solid\" ? 16 : 0,\n }}\n />\n ) : null}\n\n {render({\n ref: (c: NativeTextInput) => {\n this._root = c;\n },\n onChange: this._handleChangeText,\n placeholder: label\n ? this.state.placeholder\n : this.props.placeholder,\n placeholderTextColor: placeholderColor,\n editable: !disabled,\n selectionColor: activeColor,\n multiline,\n numberOfLines,\n onFocus: this._handleFocus,\n onBlur: this._handleBlur,\n underlineColorAndroid: \"transparent\",\n style: inputStyles,\n ...rest,\n value: this.state.value,\n })}\n </View>\n {rightIconName ? (\n <Icon\n name={rightIconName}\n size={ICON_SIZE}\n color={colors.light}\n style={{\n position: \"absolute\",\n right: 16,\n marginTop: type === \"solid\" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16,\n }}\n />\n ) : null}\n\n {assistiveText ? (\n <Text\n style={[\n {\n color: error ? colors.error : colors.light,\n marginTop: 8,\n marginLeft: assistiveTextLeftMargin,\n },\n ]}\n >\n {assistiveText}\n </Text>\n ) : null}\n </View>\n );\n }\n}\n\nexport default withTheme(TextField);\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n placeholder: {\n position: \"absolute\",\n left: 0,\n },\n underline: {\n position: \"absolute\",\n left: 0,\n right: 0,\n bottom: 0,\n height: 2,\n },\n input: {\n flexGrow: 1,\n justifyContent: \"center\",\n textAlignVertical: \"center\",\n margin: 0,\n textAlign: I18nManager.isRTL ? \"right\" : \"left\",\n },\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export { injectIcon } from \"./interfaces/Icon\";\nexport { withTheme, ThemeProvider } from \"./theming\";\nexport { default as Provider } from \"./Provider\";\nexport { default as DefaultTheme } from \"./styles/DefaultTheme\";\nexport { Link } from \"./components/Text\";\nexport { ButtonSolid, ButtonOutline } from \"./components/Button\";\nexport { default as Avatar } from \"./components/CircleImage\";\nexport { default as AvatarEdit } from \"./components/AvatarEdit\";\nexport { default as Card } from \"./components/Card\";\nexport { default as Carousel } from \"./components/Carousel\";\nexport { Checkbox, CheckboxGroup, CheckboxRow } from \"./components/Checkbox\";\nexport { default as CircleImage } from \"./components/CircleImage\";\nexport { default as Container } from \"./components/Container\";\nexport { default as Divider } from \"./components/Divider\";\nexport { default as FAB } from \"./components/FAB\";\nexport { default as FieldSearchBarFull } from \"./components/FieldSearchBarFull\";\nexport { default as IconButton } from \"./components/IconButton\";\nexport { default as Image } from \"./components/Image\";\nexport { default as NumberInput } from \"./components/NumberInput\";\nexport { default as ScreenContainer } from \"./components/ScreenContainer\";\nexport { default as StarRating } from \"./components/StarRating\";\nexport { default as Surface } from \"./components/Surface\";\nexport { default as Switch, SwitchRow } from \"./components/Switch\";\nexport { default as TextField } from \"./components/TextField\";\nexport { default as ToggleButton } from \"./components/ToggleButton\";\nexport { default as Touchable } from \"./components/Touchable\";\nexport { AccordionGroup, AccordionItem } from \"./components/Accordion\";\nexport { ActionSheet, ActionSheetItem, ActionSheetCancel, } from \"./components/ActionSheet\";\nexport { Swiper, SwiperItem } from \"./components/Swiper\";\nexport { Center, Circle, Square, Row, Stack, Spacer, } from \"./components/Layout\";\nexport { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from \"./components/RadioButton/index\";\n/* Deprecated: Fix or Delete! */\nexport { default as Button } from \"./components/DeprecatedButton\";\nexport { default as CardBlock } from \"./components/CardBlock\";\nexport { default as CardContainer } from \"./components/CardContainer\";\nexport { default as CardContainerRating } from \"./components/CardContainerRating\";\nexport { default as CardInline } from \"./components/CardInline\";\nexport { default as DatePicker } from \"./components/DatePicker/DatePicker\";\nexport { default as HeaderLarge } from \"./components/HeaderLarge\";\nexport { default as HeaderMedium } from \"./components/HeaderMedium\";\nexport { default as HeaderOverline } from \"./components/HeaderOverline\";\nexport { default as Picker } from \"./components/Picker/Picker\";\nexport { default as ProgressBar } from \"./components/ProgressBar\";\nexport { default as ProgressCircle } from \"./components/ProgressCircle\";\nexport { default as RowBodyIcon } from \"./components/RowBodyIcon\";\nexport { default as RowHeadlineImageCaption } from \"./components/RowHeadlineImageCaption\";\nexport { default as RowHeadlineImageIcon } from \"./components/RowHeadlineImageIcon\";\nexport { default as Slider } from \"./components/Slider\";\nexport { default as Stepper } from \"./components/Stepper\";\nexport { useAuthState } from \"./components/useAuthState\";\n"]}
|