rn-feav-ui 1.0.3 → 1.0.5
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/Alert/index.js +10 -16
- package/dist/components/AlertDialog/index.d.ts +11 -0
- package/dist/components/AlertDialog/index.js +54 -0
- package/dist/components/AspectRatio/index.d.ts +7 -0
- package/dist/components/AspectRatio/index.js +43 -0
- package/dist/components/Avatar/index.js +3 -3
- package/dist/components/Badge/index.js +3 -4
- package/dist/components/Breadcrumb/index.d.ts +11 -0
- package/dist/components/Breadcrumb/index.js +60 -0
- package/dist/components/Button/index.js +7 -15
- package/dist/components/Calendar/index.d.ts +7 -0
- package/dist/components/Calendar/index.js +105 -0
- package/dist/components/Card/index.js +2 -2
- package/dist/components/Carousel/index.d.ts +7 -0
- package/dist/components/Carousel/index.js +47 -0
- package/dist/components/Chart/index.d.ts +12 -0
- package/dist/components/Chart/index.js +75 -0
- package/dist/components/Checkbox/index.js +2 -2
- package/dist/components/Collapsible/index.d.ts +15 -0
- package/dist/components/Collapsible/index.js +73 -0
- package/dist/components/Combobox/index.d.ts +13 -0
- package/dist/components/Combobox/index.js +107 -0
- package/dist/components/Command/index.d.ts +16 -0
- package/dist/components/Command/index.js +87 -0
- package/dist/components/ContextMenu/index.d.ts +6 -0
- package/dist/components/ContextMenu/index.js +45 -0
- package/dist/components/DataTable/index.d.ts +16 -0
- package/dist/components/DataTable/index.js +72 -0
- package/dist/components/DatePicker/index.d.ts +9 -0
- package/dist/components/DatePicker/index.js +83 -0
- package/dist/components/Dialog/index.js +3 -1
- package/dist/components/Drawer/index.d.ts +9 -0
- package/dist/components/Drawer/index.js +70 -0
- package/dist/components/DropdownMenu/index.d.ts +15 -0
- package/dist/components/DropdownMenu/index.js +80 -0
- package/dist/components/Empty/index.d.ts +7 -0
- package/dist/components/Empty/index.js +63 -0
- package/dist/components/Field/index.d.ts +9 -0
- package/dist/components/Field/index.js +54 -0
- package/dist/components/GlassCard/index.js +3 -3
- package/dist/components/Input/index.js +4 -4
- package/dist/components/InputGroup/index.d.ts +6 -0
- package/dist/components/InputGroup/index.js +59 -0
- package/dist/components/InputOTP/index.d.ts +8 -0
- package/dist/components/InputOTP/index.js +79 -0
- package/dist/components/Kbd/index.d.ts +6 -0
- package/dist/components/Kbd/index.js +62 -0
- package/dist/components/Menubar/index.d.ts +11 -0
- package/dist/components/Menubar/index.js +69 -0
- package/dist/components/Modal/index.js +1 -3
- package/dist/components/NativeSelect/index.d.ts +21 -0
- package/dist/components/NativeSelect/index.js +76 -0
- package/dist/components/NavigationMenu/index.d.ts +13 -0
- package/dist/components/NavigationMenu/index.js +81 -0
- package/dist/components/Pagination/index.d.ts +9 -0
- package/dist/components/Pagination/index.js +101 -0
- package/dist/components/Popover/index.d.ts +9 -0
- package/dist/components/Popover/index.js +69 -0
- package/dist/components/Progress/index.js +1 -1
- package/dist/components/RadioGroup/index.d.ts +13 -0
- package/dist/components/RadioGroup/index.js +66 -0
- package/dist/components/Resizable/index.d.ts +8 -0
- package/dist/components/Resizable/index.js +45 -0
- package/dist/components/ScrollArea/index.d.ts +6 -0
- package/dist/components/ScrollArea/index.js +65 -0
- package/dist/components/Separator/index.js +1 -1
- package/dist/components/Sheet/index.d.ts +8 -0
- package/dist/components/Sheet/index.js +65 -0
- package/dist/components/Sidebar/index.d.ts +17 -0
- package/dist/components/Sidebar/index.js +81 -0
- package/dist/components/Skeleton/index.js +6 -6
- package/dist/components/Slider/index.d.ts +10 -0
- package/dist/components/Slider/index.js +104 -0
- package/dist/components/Sonner/index.d.ts +16 -0
- package/dist/components/Sonner/index.js +97 -0
- package/dist/components/Spinner/index.d.ts +6 -0
- package/dist/components/Spinner/index.js +46 -0
- package/dist/components/Switch/index.js +2 -2
- package/dist/components/TabBar/index.js +1 -1
- package/dist/components/Table/index.d.ts +20 -0
- package/dist/components/Table/index.js +91 -0
- package/dist/components/Tabs/index.js +5 -5
- package/dist/components/Textarea/index.js +4 -4
- package/dist/components/Toggle/index.d.ts +9 -0
- package/dist/components/Toggle/index.js +68 -0
- package/dist/components/ToggleGroup/index.d.ts +13 -0
- package/dist/components/ToggleGroup/index.js +68 -0
- package/dist/components/Tooltip/index.d.ts +9 -0
- package/dist/components/Tooltip/index.js +77 -0
- package/dist/components/Typography/index.js +7 -1
- package/dist/components/index.d.ts +36 -0
- package/dist/components/index.js +36 -0
- package/dist/examples/Showcase.js +197 -58
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/theme/colors.d.ts +34 -4
- package/dist/theme/colors.js +43 -10
- package/package.json +1 -1
- package/readme.md +83 -87
|
@@ -44,25 +44,19 @@ var AlertFEA = function (_a) {
|
|
|
44
44
|
return (React.createElement(react_native_1.View, { style: [
|
|
45
45
|
styles.container,
|
|
46
46
|
{
|
|
47
|
-
backgroundColor: destructive
|
|
48
|
-
|
|
49
|
-
? "#fef2f2"
|
|
50
|
-
: "rgba(127,29,29,0.35)"
|
|
51
|
-
: theme.mode === "light"
|
|
52
|
-
? "#ffffff"
|
|
53
|
-
: "#020617",
|
|
54
|
-
borderColor: destructive
|
|
55
|
-
? theme.mode === "light"
|
|
56
|
-
? "#fecaca"
|
|
57
|
-
: "rgba(248,113,113,0.4)"
|
|
58
|
-
: theme.mode === "light"
|
|
59
|
-
? "#e5e7eb"
|
|
60
|
-
: "#1f2937",
|
|
47
|
+
backgroundColor: destructive ? theme.colors.destructive : theme.colors.card,
|
|
48
|
+
borderColor: destructive ? theme.colors.destructive : theme.colors.border,
|
|
61
49
|
},
|
|
62
50
|
style,
|
|
63
51
|
] },
|
|
64
|
-
React.createElement(react_native_1.Text, { style: [
|
|
65
|
-
|
|
52
|
+
React.createElement(react_native_1.Text, { style: [
|
|
53
|
+
styles.title,
|
|
54
|
+
{ color: destructive ? theme.colors.destructiveForeground : theme.colors.cardForeground },
|
|
55
|
+
] }, title),
|
|
56
|
+
description ? (React.createElement(react_native_1.Text, { style: [
|
|
57
|
+
styles.description,
|
|
58
|
+
{ color: destructive ? theme.colors.destructiveForeground : theme.colors.cardForeground, opacity: 0.85 },
|
|
59
|
+
] }, description)) : null));
|
|
66
60
|
};
|
|
67
61
|
exports.AlertFEA = AlertFEA;
|
|
68
62
|
var styles = react_native_1.StyleSheet.create({
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const AlertDialogFEA: ({ open, onOpenChange, title, description, cancelText, actionText, destructive, onAction, }: {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (next: boolean) => void;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
cancelText?: string;
|
|
8
|
+
actionText?: string;
|
|
9
|
+
destructive?: boolean;
|
|
10
|
+
onAction?: () => void;
|
|
11
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.AlertDialogFEA = void 0;
|
|
37
|
+
var React = __importStar(require("react"));
|
|
38
|
+
var Dialog_1 = require("../Dialog");
|
|
39
|
+
var Button_1 = require("../Button");
|
|
40
|
+
var Typography_1 = require("../Typography");
|
|
41
|
+
var AlertDialogFEA = function (_a) {
|
|
42
|
+
var open = _a.open, onOpenChange = _a.onOpenChange, title = _a.title, description = _a.description, _b = _a.cancelText, cancelText = _b === void 0 ? "Cancel" : _b, _c = _a.actionText, actionText = _c === void 0 ? "Continue" : _c, _d = _a.destructive, destructive = _d === void 0 ? false : _d, onAction = _a.onAction;
|
|
43
|
+
return (React.createElement(Dialog_1.DialogFEA, { open: open, onOpenChange: onOpenChange },
|
|
44
|
+
React.createElement(Dialog_1.DialogHeaderFEA, null,
|
|
45
|
+
React.createElement(Typography_1.TypographyFEA, { variant: "h3" }, title),
|
|
46
|
+
description ? React.createElement(Typography_1.TypographyFEA, { variant: "muted" }, description) : null),
|
|
47
|
+
React.createElement(Dialog_1.DialogFooterFEA, null,
|
|
48
|
+
React.createElement(Button_1.ButtonFEA, { title: cancelText, variant: "ghost", onPress: function () { return onOpenChange(false); } }),
|
|
49
|
+
React.createElement(Button_1.ButtonFEA, { title: actionText, onPress: function () {
|
|
50
|
+
onAction === null || onAction === void 0 ? void 0 : onAction();
|
|
51
|
+
onOpenChange(false);
|
|
52
|
+
}, variant: destructive ? "soft" : "primary" }))));
|
|
53
|
+
};
|
|
54
|
+
exports.AlertDialogFEA = AlertDialogFEA;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.AspectRatioFEA = void 0;
|
|
37
|
+
var React = __importStar(require("react"));
|
|
38
|
+
var react_native_1 = require("react-native");
|
|
39
|
+
var AspectRatioFEA = function (_a) {
|
|
40
|
+
var _b = _a.ratio, ratio = _b === void 0 ? 1 : _b, children = _a.children, style = _a.style;
|
|
41
|
+
return React.createElement(react_native_1.View, { style: [{ width: "100%", aspectRatio: ratio }, style] }, children);
|
|
42
|
+
};
|
|
43
|
+
exports.AspectRatioFEA = AspectRatioFEA;
|
|
@@ -50,11 +50,11 @@ var AvatarFEA = function (_a) {
|
|
|
50
50
|
width: size,
|
|
51
51
|
height: size,
|
|
52
52
|
borderRadius: size / 2,
|
|
53
|
-
backgroundColor: theme.
|
|
54
|
-
borderColor: theme.
|
|
53
|
+
backgroundColor: theme.colors.muted,
|
|
54
|
+
borderColor: theme.colors.border,
|
|
55
55
|
},
|
|
56
56
|
] },
|
|
57
|
-
React.createElement(react_native_1.Text, { style: { color: theme.colors.
|
|
57
|
+
React.createElement(react_native_1.Text, { style: { color: theme.colors.foreground, fontWeight: "600", fontSize: Math.max(12, size / 3) } }, initials)));
|
|
58
58
|
};
|
|
59
59
|
exports.AvatarFEA = AvatarFEA;
|
|
60
60
|
var styles = react_native_1.StyleSheet.create({
|
|
@@ -40,18 +40,17 @@ var react_native_1 = require("react-native");
|
|
|
40
40
|
var BadgeFEA = function (_a) {
|
|
41
41
|
var label = _a.label, _b = _a.style, style = _b === void 0 ? {} : _b;
|
|
42
42
|
var theme = (0, ThemeFEAVUiProvider_1.useTheme)().theme;
|
|
43
|
-
var isLight = theme.mode === "light";
|
|
44
43
|
return (React.createElement(react_native_1.View, { style: [
|
|
45
44
|
styles.badge,
|
|
46
45
|
{
|
|
47
|
-
backgroundColor:
|
|
48
|
-
borderColor:
|
|
46
|
+
backgroundColor: theme.colors.secondary,
|
|
47
|
+
borderColor: theme.colors.border,
|
|
49
48
|
},
|
|
50
49
|
style,
|
|
51
50
|
] },
|
|
52
51
|
React.createElement(react_native_1.Text, { style: [
|
|
53
52
|
styles.label,
|
|
54
|
-
{ color:
|
|
53
|
+
{ color: theme.colors.secondaryForeground },
|
|
55
54
|
] }, label)));
|
|
56
55
|
};
|
|
57
56
|
exports.BadgeFEA = BadgeFEA;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
export type BreadcrumbItemFEA = {
|
|
4
|
+
label: string;
|
|
5
|
+
onPress?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const BreadcrumbFEA: ({ items, separator, style, }: {
|
|
8
|
+
items: BreadcrumbItemFEA[];
|
|
9
|
+
separator?: string;
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.BreadcrumbFEA = void 0;
|
|
37
|
+
var React = __importStar(require("react"));
|
|
38
|
+
var react_native_1 = require("react-native");
|
|
39
|
+
var ThemeFEAVUiProvider_1 = require("../../theme/ThemeFEAVUiProvider");
|
|
40
|
+
var BreadcrumbFEA = function (_a) {
|
|
41
|
+
var items = _a.items, _b = _a.separator, separator = _b === void 0 ? "/" : _b, style = _a.style;
|
|
42
|
+
var theme = (0, ThemeFEAVUiProvider_1.useTheme)().theme;
|
|
43
|
+
return (React.createElement(react_native_1.View, { style: [styles.row, style] }, items.map(function (it, idx) {
|
|
44
|
+
var last = idx === items.length - 1;
|
|
45
|
+
var content = (React.createElement(react_native_1.Text, { style: {
|
|
46
|
+
color: last ? theme.colors.foreground : theme.colors.mutedForeground,
|
|
47
|
+
fontWeight: last ? "600" : "500",
|
|
48
|
+
} }, it.label));
|
|
49
|
+
return (React.createElement(React.Fragment, { key: "".concat(it.label, "-").concat(idx) },
|
|
50
|
+
it.onPress && !last ? (React.createElement(react_native_1.Pressable, { onPress: it.onPress }, content)) : (content),
|
|
51
|
+
!last ? React.createElement(react_native_1.Text, { style: { color: theme.colors.mutedForeground } },
|
|
52
|
+
" ",
|
|
53
|
+
separator,
|
|
54
|
+
" ") : null));
|
|
55
|
+
})));
|
|
56
|
+
};
|
|
57
|
+
exports.BreadcrumbFEA = BreadcrumbFEA;
|
|
58
|
+
var styles = react_native_1.StyleSheet.create({
|
|
59
|
+
row: { flexDirection: "row", alignItems: "center", flexWrap: "wrap" },
|
|
60
|
+
});
|
|
@@ -51,7 +51,7 @@ var ButtonFEA = function (_a) {
|
|
|
51
51
|
React.createElement(react_native_1.TouchableOpacity, { onPress: onPress, activeOpacity: 0.85, style: [styles.baseButton, sizeStyle], disabled: disabled },
|
|
52
52
|
React.createElement(react_native_1.Text, { style: [
|
|
53
53
|
styles.text,
|
|
54
|
-
{ color: theme.colors.
|
|
54
|
+
{ color: theme.colors.foreground, opacity: disabled ? 0.5 : 1 },
|
|
55
55
|
] }, title))));
|
|
56
56
|
}
|
|
57
57
|
if (variant === "soft") {
|
|
@@ -59,13 +59,13 @@ var ButtonFEA = function (_a) {
|
|
|
59
59
|
styles.baseButton,
|
|
60
60
|
sizeStyle,
|
|
61
61
|
styles.softButton,
|
|
62
|
-
|
|
62
|
+
{ backgroundColor: theme.colors.secondary, borderColor: theme.colors.border },
|
|
63
63
|
disabled && styles.disabled,
|
|
64
64
|
style,
|
|
65
65
|
] },
|
|
66
66
|
React.createElement(react_native_1.Text, { style: [
|
|
67
67
|
styles.text,
|
|
68
|
-
{ color: theme.colors.
|
|
68
|
+
{ color: theme.colors.secondaryForeground, opacity: disabled ? 0.6 : 1 },
|
|
69
69
|
] }, title)));
|
|
70
70
|
}
|
|
71
71
|
if (variant === "outline") {
|
|
@@ -74,7 +74,7 @@ var ButtonFEA = function (_a) {
|
|
|
74
74
|
sizeStyle,
|
|
75
75
|
styles.outlineButton,
|
|
76
76
|
{
|
|
77
|
-
borderColor: theme.
|
|
77
|
+
borderColor: theme.colors.border,
|
|
78
78
|
},
|
|
79
79
|
disabled && styles.disabled,
|
|
80
80
|
style,
|
|
@@ -82,7 +82,7 @@ var ButtonFEA = function (_a) {
|
|
|
82
82
|
React.createElement(react_native_1.Text, { style: [
|
|
83
83
|
styles.text,
|
|
84
84
|
{
|
|
85
|
-
color: theme.colors.
|
|
85
|
+
color: theme.colors.foreground,
|
|
86
86
|
opacity: disabled ? 0.6 : 1,
|
|
87
87
|
},
|
|
88
88
|
] }, title)));
|
|
@@ -98,7 +98,7 @@ var ButtonFEA = function (_a) {
|
|
|
98
98
|
React.createElement(react_native_1.Text, { style: [
|
|
99
99
|
styles.text,
|
|
100
100
|
{
|
|
101
|
-
color: theme.colors.
|
|
101
|
+
color: theme.colors.foreground,
|
|
102
102
|
opacity: disabled ? 0.5 : 1,
|
|
103
103
|
},
|
|
104
104
|
] }, title)));
|
|
@@ -112,7 +112,7 @@ var ButtonFEA = function (_a) {
|
|
|
112
112
|
] },
|
|
113
113
|
React.createElement(react_native_1.Text, { style: [
|
|
114
114
|
styles.text,
|
|
115
|
-
|
|
115
|
+
{ color: theme.colors.primaryForeground },
|
|
116
116
|
disabled && { opacity: 0.8 },
|
|
117
117
|
] }, title)));
|
|
118
118
|
};
|
|
@@ -152,14 +152,6 @@ var styles = react_native_1.StyleSheet.create({
|
|
|
152
152
|
borderWidth: 1,
|
|
153
153
|
width: "100%",
|
|
154
154
|
},
|
|
155
|
-
softLight: {
|
|
156
|
-
backgroundColor: "#f9fafb",
|
|
157
|
-
borderColor: "#e5e7eb",
|
|
158
|
-
},
|
|
159
|
-
softDark: {
|
|
160
|
-
backgroundColor: "rgba(15,23,42,0.75)",
|
|
161
|
-
borderColor: "rgba(148,163,184,0.5)",
|
|
162
|
-
},
|
|
163
155
|
outlineButton: {
|
|
164
156
|
backgroundColor: "transparent",
|
|
165
157
|
borderWidth: 1,
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CalendarFEA = void 0;
|
|
37
|
+
var React = __importStar(require("react"));
|
|
38
|
+
var react_native_1 = require("react-native");
|
|
39
|
+
var ThemeFEAVUiProvider_1 = require("../../theme/ThemeFEAVUiProvider");
|
|
40
|
+
var Button_1 = require("../Button");
|
|
41
|
+
var startOfMonth = function (d) { return new Date(d.getFullYear(), d.getMonth(), 1); };
|
|
42
|
+
var endOfMonth = function (d) { return new Date(d.getFullYear(), d.getMonth() + 1, 0); };
|
|
43
|
+
var addMonths = function (d, delta) { return new Date(d.getFullYear(), d.getMonth() + delta, 1); };
|
|
44
|
+
var sameDay = function (a, b) {
|
|
45
|
+
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
46
|
+
};
|
|
47
|
+
var CalendarFEA = function (_a) {
|
|
48
|
+
var value = _a.value, onChange = _a.onChange, style = _a.style;
|
|
49
|
+
var theme = (0, ThemeFEAVUiProvider_1.useTheme)().theme;
|
|
50
|
+
var _b = React.useState(function () { return value !== null && value !== void 0 ? value : new Date(); }), cursor = _b[0], setCursor = _b[1];
|
|
51
|
+
var selected = value;
|
|
52
|
+
var first = startOfMonth(cursor);
|
|
53
|
+
var last = endOfMonth(cursor);
|
|
54
|
+
var startWeekday = (first.getDay() + 6) % 7; // Monday=0
|
|
55
|
+
var daysInMonth = last.getDate();
|
|
56
|
+
var cells = [];
|
|
57
|
+
for (var i = 0; i < startWeekday; i++)
|
|
58
|
+
cells.push({});
|
|
59
|
+
for (var d = 1; d <= daysInMonth; d++)
|
|
60
|
+
cells.push({ day: d });
|
|
61
|
+
while (cells.length % 7 !== 0)
|
|
62
|
+
cells.push({});
|
|
63
|
+
var monthLabel = "".concat(cursor.getFullYear(), "-").concat(String(cursor.getMonth() + 1).padStart(2, "0"));
|
|
64
|
+
return (React.createElement(react_native_1.View, { style: [styles.wrap, { borderColor: theme.colors.border, backgroundColor: theme.colors.card }, style] },
|
|
65
|
+
React.createElement(react_native_1.View, { style: styles.header },
|
|
66
|
+
React.createElement(Button_1.ButtonFEA, { title: "\u2039", variant: "ghost", onPress: function () { return setCursor(function (d) { return addMonths(d, -1); }); } }),
|
|
67
|
+
React.createElement(react_native_1.Text, { style: { color: theme.colors.foreground, fontWeight: "700" } }, monthLabel),
|
|
68
|
+
React.createElement(Button_1.ButtonFEA, { title: "\u203A", variant: "ghost", onPress: function () { return setCursor(function (d) { return addMonths(d, 1); }); } })),
|
|
69
|
+
React.createElement(react_native_1.View, { style: styles.weekRow }, ["M", "T", "W", "T", "F", "S", "S"].map(function (w) { return (React.createElement(react_native_1.Text, { key: w, style: [styles.weekday, { color: theme.colors.mutedForeground }] }, w)); })),
|
|
70
|
+
React.createElement(react_native_1.View, { style: styles.grid }, cells.map(function (c, idx) {
|
|
71
|
+
if (!c.day)
|
|
72
|
+
return React.createElement(react_native_1.View, { key: idx, style: styles.cell });
|
|
73
|
+
var date = new Date(cursor.getFullYear(), cursor.getMonth(), c.day);
|
|
74
|
+
var isSelected = selected ? sameDay(selected, date) : false;
|
|
75
|
+
return (React.createElement(react_native_1.Pressable, { key: idx, onPress: function () { return onChange === null || onChange === void 0 ? void 0 : onChange(date); }, style: function (_a) {
|
|
76
|
+
var pressed = _a.pressed;
|
|
77
|
+
return [
|
|
78
|
+
styles.cell,
|
|
79
|
+
styles.dayCell,
|
|
80
|
+
{
|
|
81
|
+
backgroundColor: isSelected
|
|
82
|
+
? theme.colors.primary
|
|
83
|
+
: pressed
|
|
84
|
+
? theme.colors.muted
|
|
85
|
+
: "transparent",
|
|
86
|
+
borderColor: isSelected ? theme.colors.primary : "transparent",
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
} },
|
|
90
|
+
React.createElement(react_native_1.Text, { style: {
|
|
91
|
+
color: isSelected ? theme.colors.primaryForeground : theme.colors.foreground,
|
|
92
|
+
fontWeight: isSelected ? "700" : "600",
|
|
93
|
+
} }, c.day)));
|
|
94
|
+
}))));
|
|
95
|
+
};
|
|
96
|
+
exports.CalendarFEA = CalendarFEA;
|
|
97
|
+
var styles = react_native_1.StyleSheet.create({
|
|
98
|
+
wrap: { borderWidth: 1, borderRadius: 12, padding: 12 },
|
|
99
|
+
header: { flexDirection: "row", justifyContent: "space-between", alignItems: "center", marginBottom: 10 },
|
|
100
|
+
weekRow: { flexDirection: "row", marginBottom: 6 },
|
|
101
|
+
weekday: { flex: 1, textAlign: "center", fontSize: 12, fontWeight: "700" },
|
|
102
|
+
grid: { flexDirection: "row", flexWrap: "wrap" },
|
|
103
|
+
cell: { width: "".concat(100 / 7, "%"), aspectRatio: 1, alignItems: "center", justifyContent: "center" },
|
|
104
|
+
dayCell: { borderRadius: 10, borderWidth: 1 },
|
|
105
|
+
});
|
|
@@ -43,8 +43,8 @@ var CardFEA = function (_a) {
|
|
|
43
43
|
return (React.createElement(react_native_1.View, { style: [
|
|
44
44
|
styles.card,
|
|
45
45
|
{
|
|
46
|
-
backgroundColor: theme.
|
|
47
|
-
borderColor: theme.
|
|
46
|
+
backgroundColor: theme.colors.card,
|
|
47
|
+
borderColor: theme.colors.border,
|
|
48
48
|
},
|
|
49
49
|
style,
|
|
50
50
|
] }, children));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
export declare const CarouselFEA: ({ children, style, pageWidth, }: {
|
|
4
|
+
children: React.ReactNode[];
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
6
|
+
pageWidth?: number;
|
|
7
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CarouselFEA = void 0;
|
|
37
|
+
var React = __importStar(require("react"));
|
|
38
|
+
var react_native_1 = require("react-native");
|
|
39
|
+
var CarouselFEA = function (_a) {
|
|
40
|
+
var children = _a.children, style = _a.style, pageWidth = _a.pageWidth;
|
|
41
|
+
return (React.createElement(react_native_1.ScrollView, { horizontal: true, pagingEnabled: true, showsHorizontalScrollIndicator: false, style: style, contentContainerStyle: styles.row }, React.Children.map(children, function (child, idx) { return (React.createElement(react_native_1.View, { key: idx, style: [styles.page, pageWidth ? { width: pageWidth } : undefined] }, child)); })));
|
|
42
|
+
};
|
|
43
|
+
exports.CarouselFEA = CarouselFEA;
|
|
44
|
+
var styles = react_native_1.StyleSheet.create({
|
|
45
|
+
row: { alignItems: "stretch" },
|
|
46
|
+
page: { width: 320, paddingRight: 12 },
|
|
47
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
export type ChartSeriesPointFEA = {
|
|
4
|
+
label: string;
|
|
5
|
+
value: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const ChartFEA: ({ data, height, style, title, }: {
|
|
8
|
+
data: ChartSeriesPointFEA[];
|
|
9
|
+
height?: number;
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
title?: string;
|
|
12
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
36
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
37
|
+
if (ar || !(i in from)) {
|
|
38
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
39
|
+
ar[i] = from[i];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.ChartFEA = void 0;
|
|
46
|
+
var React = __importStar(require("react"));
|
|
47
|
+
var react_native_1 = require("react-native");
|
|
48
|
+
var ThemeFEAVUiProvider_1 = require("../../theme/ThemeFEAVUiProvider");
|
|
49
|
+
var ChartFEA = function (_a) {
|
|
50
|
+
var data = _a.data, _b = _a.height, height = _b === void 0 ? 140 : _b, style = _a.style, title = _a.title;
|
|
51
|
+
var theme = (0, ThemeFEAVUiProvider_1.useTheme)().theme;
|
|
52
|
+
var max = Math.max.apply(Math, __spreadArray([1], data.map(function (d) { return d.value; }), false));
|
|
53
|
+
return (React.createElement(react_native_1.View, { style: [styles.wrap, { borderColor: theme.colors.border, backgroundColor: theme.colors.card }, style] },
|
|
54
|
+
title ? React.createElement(react_native_1.Text, { style: { color: theme.colors.foreground, fontWeight: "700", marginBottom: 10 } }, title) : null,
|
|
55
|
+
React.createElement(react_native_1.View, { style: [styles.chart, { height: height }] }, data.map(function (d) {
|
|
56
|
+
var h = Math.max(2, (d.value / max) * height);
|
|
57
|
+
return (React.createElement(react_native_1.View, { key: d.label, style: styles.col },
|
|
58
|
+
React.createElement(react_native_1.View, { style: [
|
|
59
|
+
styles.bar,
|
|
60
|
+
{
|
|
61
|
+
height: h,
|
|
62
|
+
backgroundColor: theme.colors.primary,
|
|
63
|
+
},
|
|
64
|
+
] }),
|
|
65
|
+
React.createElement(react_native_1.Text, { numberOfLines: 1, style: [styles.xlab, { color: theme.colors.mutedForeground }] }, d.label)));
|
|
66
|
+
}))));
|
|
67
|
+
};
|
|
68
|
+
exports.ChartFEA = ChartFEA;
|
|
69
|
+
var styles = react_native_1.StyleSheet.create({
|
|
70
|
+
wrap: { borderWidth: 1, borderRadius: 12, padding: 12 },
|
|
71
|
+
chart: { flexDirection: "row", alignItems: "flex-end", gap: 10 },
|
|
72
|
+
col: { flex: 1, alignItems: "center", gap: 6 },
|
|
73
|
+
bar: { width: "100%", borderRadius: 10 },
|
|
74
|
+
xlab: { fontSize: 10 },
|
|
75
|
+
});
|
|
@@ -44,12 +44,12 @@ var CheckboxFEA = function (_a) {
|
|
|
44
44
|
React.createElement(react_native_1.View, { style: [
|
|
45
45
|
styles.box,
|
|
46
46
|
{
|
|
47
|
-
borderColor: checked ? theme.colors.primary : theme.
|
|
47
|
+
borderColor: checked ? theme.colors.primary : theme.colors.input,
|
|
48
48
|
backgroundColor: checked ? theme.colors.primary : "transparent",
|
|
49
49
|
opacity: disabled ? 0.5 : 1,
|
|
50
50
|
},
|
|
51
51
|
] }, checked ? React.createElement(react_native_1.Text, { style: styles.tick }, "\u2713") : null),
|
|
52
|
-
label ? React.createElement(react_native_1.Text, { style: { color: theme.colors.
|
|
52
|
+
label ? (React.createElement(react_native_1.Text, { style: { color: theme.colors.foreground, opacity: disabled ? 0.6 : 1 } }, label)) : null));
|
|
53
53
|
};
|
|
54
54
|
exports.CheckboxFEA = CheckboxFEA;
|
|
55
55
|
var styles = react_native_1.StyleSheet.create({
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
export declare const CollapsibleFEA: ({ open, onOpenChange, trigger, children, style, }: {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (next: boolean) => void;
|
|
6
|
+
trigger?: React.ReactNode;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
style?: StyleProp<ViewStyle>;
|
|
9
|
+
}) => React.JSX.Element;
|
|
10
|
+
export declare const CollapsibleTriggerFEA: ({ title, open, onPress, style, }: {
|
|
11
|
+
title: string;
|
|
12
|
+
open: boolean;
|
|
13
|
+
onPress: () => void;
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
}) => React.JSX.Element;
|