@codeleap/mobile 2.1.2 → 2.1.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/dist/components/EmptyPlaceholder/index.js +1 -1
- package/dist/components/EmptyPlaceholder/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/EmptyPlaceholder/index.tsx +1 -1
- package/dist/components/TextInput/Label.d.ts +0 -9
- package/dist/components/TextInput/Label.js +0 -34
- package/dist/components/TextInput/Label.js.map +0 -1
|
@@ -36,7 +36,7 @@ var common_1 = require("@codeleap/common");
|
|
|
36
36
|
var react_native_1 = require("react-native");
|
|
37
37
|
__exportStar(require("./styles"), exports);
|
|
38
38
|
var EmptyPlaceholder = function (props) {
|
|
39
|
-
var itemName = props.itemName, title = props.title, loading = props.loading, _a = props.styles, styles = _a === void 0 ? {} : _a, _b = props.variants, variants = _b === void 0 ? [] : _b, _c = props.emptyIconName, emptyIconName = _c === void 0 ? '
|
|
39
|
+
var itemName = props.itemName, title = props.title, loading = props.loading, _a = props.styles, styles = _a === void 0 ? {} : _a, _b = props.variants, variants = _b === void 0 ? [] : _b, _c = props.emptyIconName, emptyIconName = _c === void 0 ? 'placeholder' : _c;
|
|
40
40
|
var emptyText = title || (itemName && "No ".concat(itemName, " found.")) || 'No items.';
|
|
41
41
|
var componentStyles = (0, common_1.useDefaultComponentStyle)('EmptyPlaceholder', {
|
|
42
42
|
variants: variants,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/EmptyPlaceholder/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAsC;AACtC,gCAA8B;AAC9B,gCAA8B;AAC9B,gCAA8B;AAC9B,0DAAwD;AACxD,2CAMyB;AAOzB,6CAAyC;AAGzC,2CAAwB;AAWjB,IAAM,gBAAgB,GAAmC,UAAC,KAA4B;IACnF,IAAA,QAAQ,
|
|
1
|
+
{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AC,WAAI,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CACnC;MAAA,CAAC,WAAI,CAAC,IAAI,CAAC,CAAC,aAAgC,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,EAC1E;MAAA,CAAC,WAAI,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,EACrD;IAAA,EAAE,WAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AA3BY,QAAA,gBAAgB,oBA2B5B"}
|
package/package.json
CHANGED
|
@@ -31,7 +31,7 @@ export type EmptyPlaceholderProps = {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export const EmptyPlaceholder:React.FC<EmptyPlaceholderProps> = (props: EmptyPlaceholderProps) => {
|
|
34
|
-
const { itemName, title, loading, styles = {}, variants = [], emptyIconName = '
|
|
34
|
+
const { itemName, title, loading, styles = {}, variants = [], emptyIconName = 'placeholder' } = props
|
|
35
35
|
const emptyText = title || (itemName && `No ${itemName} found.`) || 'No items.'
|
|
36
36
|
|
|
37
37
|
const componentStyles = useDefaultComponentStyle('EmptyPlaceholder', {
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.InputLabel = void 0;
|
|
7
|
-
var react_1 = __importDefault(require("react"));
|
|
8
|
-
var common_1 = require("@codeleap/common");
|
|
9
|
-
var react_native_1 = require("react-native");
|
|
10
|
-
var Text_1 = require("../Text");
|
|
11
|
-
var View_1 = require("../View");
|
|
12
|
-
var InputLabel = function (_a) {
|
|
13
|
-
var label = _a.label, _b = _a.variants, variants = _b === void 0 ? [] : _b, _c = _a.styles, styles = _c === void 0 ? {} : _c, _d = _a.style, style = _d === void 0 ? null : _d, _e = _a.asteriskStyle, asteriskStyle = _e === void 0 ? null : _e, _f = _a.required, required = _f === void 0 ? false : _f, _g = _a.wrapperStyle, wrapperStyle = _g === void 0 ? null : _g;
|
|
14
|
-
var labelStyles = (0, common_1.useDefaultComponentStyle)('TextInput', {
|
|
15
|
-
variants: variants,
|
|
16
|
-
styles: styles,
|
|
17
|
-
transform: react_native_1.StyleSheet.flatten,
|
|
18
|
-
});
|
|
19
|
-
if (!label)
|
|
20
|
-
return null;
|
|
21
|
-
switch (typeof label) {
|
|
22
|
-
case 'string':
|
|
23
|
-
return <View_1.View style={wrapperStyle || labelStyles.labelWrapper}>
|
|
24
|
-
<Text_1.Text style={style || labelStyles.label} text={label}/>
|
|
25
|
-
{required && <Text_1.Text style={asteriskStyle || labelStyles.requiredAsterisk} text={' *'}/>}
|
|
26
|
-
</View_1.View>;
|
|
27
|
-
case 'object':
|
|
28
|
-
return label;
|
|
29
|
-
default:
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.InputLabel = InputLabel;
|
|
34
|
-
//# sourceMappingURL=Label.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../src/components/TextInput/Label.tsx"],"names":[],"mappings":";;;;;;AAAA,gDAAyB;AACzB,2CAA2D;AAC3D,6CAAyC;AACzC,gCAA8B;AAC9B,gCAA8B;AAEvB,IAAM,UAAU,GAAG,UAAC,EAAgH;QAA9G,KAAK,WAAA,EAAE,gBAAa,EAAb,QAAQ,mBAAG,EAAE,KAAA,EAAE,cAAW,EAAX,MAAM,mBAAG,EAAE,KAAA,EAAE,aAAY,EAAZ,KAAK,mBAAG,IAAI,KAAA,EAAE,qBAAoB,EAApB,aAAa,mBAAG,IAAI,KAAA,EAAE,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAAE,oBAAmB,EAAnB,YAAY,mBAAG,I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