utopia-ui 3.0.0-alpha.22 → 3.0.0-alpha.24
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.
@@ -10,7 +10,7 @@ declare type AuthCredentials = {
|
|
10
10
|
otp?: string | undefined;
|
11
11
|
};
|
12
12
|
declare type AuthContextProps = {
|
13
|
-
isAuthenticated:
|
13
|
+
isAuthenticated: boolean;
|
14
14
|
user: UserItem | null;
|
15
15
|
login: (credentials: AuthCredentials) => Promise<UserItem | undefined>;
|
16
16
|
register: (credentials: AuthCredentials, userName: string) => Promise<UserItem | undefined>;
|
@@ -5,5 +5,6 @@ declare type ChapterProps = {
|
|
5
5
|
export declare function Welcome1({ clickAction }: ChapterProps): JSX.Element;
|
6
6
|
export declare function Welcome2({ clickAction }: ChapterProps): JSX.Element;
|
7
7
|
export declare function Welcome3({ clickAction }: ChapterProps): JSX.Element;
|
8
|
+
export declare function Welcome4({ clickAction }: ChapterProps): JSX.Element;
|
8
9
|
export declare function Modal(): JSX.Element;
|
9
10
|
export {};
|
@@ -8,7 +8,8 @@ declare type InputTextProps = {
|
|
8
8
|
inputStyle?: string;
|
9
9
|
defaultValue?: string;
|
10
10
|
placeholder?: string;
|
11
|
+
autocomplete?: string;
|
11
12
|
updateFormValue?: (value: string) => void;
|
12
13
|
};
|
13
|
-
export declare function TextInput({ labelTitle, labelStyle, type, dataField, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: InputTextProps): JSX.Element;
|
14
|
+
export declare function TextInput({ labelTitle, labelStyle, type, dataField, containerStyle, inputStyle, defaultValue, placeholder, autocomplete, updateFormValue }: InputTextProps): JSX.Element;
|
14
15
|
export {};
|
package/dist/index.js
CHANGED
@@ -339,12 +339,12 @@ function ErrorText(_a) {
|
|
339
339
|
}
|
340
340
|
|
341
341
|
function TextInput(_a) {
|
342
|
-
var labelTitle = _a.labelTitle, labelStyle = _a.labelStyle, type = _a.type, dataField = _a.dataField, containerStyle = _a.containerStyle, inputStyle = _a.inputStyle, defaultValue = _a.defaultValue, placeholder = _a.placeholder, updateFormValue = _a.updateFormValue;
|
342
|
+
var labelTitle = _a.labelTitle, labelStyle = _a.labelStyle, type = _a.type, dataField = _a.dataField, containerStyle = _a.containerStyle, inputStyle = _a.inputStyle, defaultValue = _a.defaultValue, placeholder = _a.placeholder, autocomplete = _a.autocomplete, updateFormValue = _a.updateFormValue;
|
343
343
|
return (React.createElement("div", { className: "tw-form-control tw-w-full ".concat(containerStyle) },
|
344
344
|
labelTitle ? React.createElement("label", { className: "tw-label" },
|
345
345
|
React.createElement("span", { className: "tw-label-text tw-text-base-content " + labelStyle }, labelTitle))
|
346
346
|
: " ",
|
347
|
-
React.createElement("input", { required: true, type: type || "text", name: dataField, defaultValue: defaultValue, placeholder: placeholder || "", onChange: function (e) { return updateFormValue && updateFormValue(e.target.value); }, className: "tw-input tw-input-bordered tw-w-full ".concat(inputStyle ? inputStyle : "") })));
|
347
|
+
React.createElement("input", { required: true, type: type || "text", name: dataField, defaultValue: defaultValue, placeholder: placeholder || "", autoComplete: autocomplete, onChange: function (e) { return updateFormValue && updateFormValue(e.target.value); }, className: "tw-input tw-input-bordered tw-w-full ".concat(inputStyle ? inputStyle : "") })));
|
348
348
|
}
|
349
349
|
|
350
350
|
function LoginPage() {
|
@@ -1676,8 +1676,8 @@ var PopupTextAreaInput = function (_a) {
|
|
1676
1676
|
var PopupStartEndInput = function (_a) {
|
1677
1677
|
var item = _a.item;
|
1678
1678
|
return (React.createElement("div", { className: 'tw-grid tw-grid-cols-2 tw-gap-2 tw-mb-5' },
|
1679
|
-
React.createElement(TextInput, { type: 'date', placeholder: 'start', dataField: 'start', inputStyle: 'tw-text-sm tw-px-2', labelTitle: 'start', defaultValue: item && item.start ? item.start.substring(0, 10) : "" }),
|
1680
|
-
React.createElement(TextInput, { type: 'date', placeholder: 'end', dataField: 'end', inputStyle: 'tw-text-sm tw-px-2', labelTitle: 'end', defaultValue: item && item.end ? item.end.substring(0, 10) : "" })));
|
1679
|
+
React.createElement(TextInput, { type: 'date', placeholder: 'start', dataField: 'start', inputStyle: 'tw-text-sm tw-px-2', labelTitle: 'start', defaultValue: item && item.start ? item.start.substring(0, 10) : "", autocomplete: 'one-time-code' }),
|
1680
|
+
React.createElement(TextInput, { type: 'date', placeholder: 'end', dataField: 'end', inputStyle: 'tw-text-sm tw-px-2', labelTitle: 'end', defaultValue: item && item.end ? item.end.substring(0, 10) : "", autocomplete: 'one-time-code' })));
|
1681
1681
|
};
|
1682
1682
|
|
1683
1683
|
var StartEndView = function (_a) {
|
@@ -1940,7 +1940,7 @@ function SideBar(_a) {
|
|
1940
1940
|
React.createElement("ul", { className: "tw-menu tw-w-full tw-bg-base-100 tw-text-base-content tw-p-0 tw-mb-0", "data-te-sidenav-menu-ref": true }, bottomRoutes === null || bottomRoutes === void 0 ? void 0 : bottomRoutes.map(function (route, k) {
|
1941
1941
|
return (React.createElement("li", { className: "", key: k }, route.submenu ?
|
1942
1942
|
React.createElement(SidebarSubmenu, __assign({}, route)) :
|
1943
|
-
(React.createElement(NavLink, { end: true, to: route.path, className: function (_a) {
|
1943
|
+
(React.createElement(NavLink, { end: true, target: route.blank ? "_blank" : "_self", to: route.path, className: function (_a) {
|
1944
1944
|
var isActive = _a.isActive;
|
1945
1945
|
return "".concat(isActive ? 'tw-font-semibold tw-bg-base-200 !tw-rounded-none' : 'tw-font-normal !tw-rounded-none');
|
1946
1946
|
}, onClick: function () {
|
@@ -2026,45 +2026,37 @@ function Settings() {
|
|
2026
2026
|
function Welcome1(_a) {
|
2027
2027
|
var clickAction = _a.clickAction;
|
2028
2028
|
return (React.createElement(React.Fragment, null,
|
2029
|
-
React.createElement("h3", { className: "tw-font-bold tw-text-lg" }, "
|
2029
|
+
React.createElement("h3", { className: "tw-font-bold tw-text-lg" }, "Welcome, glad you are here!"),
|
2030
2030
|
React.createElement("p", { className: "tw-py-4" },
|
2031
|
-
"
|
2031
|
+
"Let's play a game together where we explore ourselves and our dreams and come together to make them come true.",
|
2032
2032
|
React.createElement("br", null),
|
2033
2033
|
React.createElement("br", null),
|
2034
|
-
React.createElement("b", null, "
|
2034
|
+
React.createElement("b", null, "Would you like to join us?")),
|
2035
2035
|
React.createElement("div", { className: "tw-modal-action" },
|
2036
|
-
React.createElement("label", { className: "tw-btn tw-btn-neutral", onClick: function () { return clickAction(); } }, "
|
2036
|
+
React.createElement("label", { className: "tw-btn tw-btn-neutral", onClick: function () { return clickAction(); } }, "Yes"),
|
2037
|
+
React.createElement("label", { className: "tw-btn tw-btn-neutral", onClick: function () { return close(); } }, "No"))));
|
2037
2038
|
}
|
2038
2039
|
function Welcome2(_a) {
|
2039
2040
|
var clickAction = _a.clickAction;
|
2040
2041
|
return (React.createElement(React.Fragment, null,
|
2041
|
-
React.createElement("h3", { className: "tw-font-bold tw-text-lg" }, "
|
2042
|
-
React.createElement("p", { className: "tw-py-4" },
|
2043
|
-
"Mal ganz ehrlich: 99% unser Zeit am Bildschirm ist sinnlose Zeit- und Energie-Verschwendung.",
|
2044
|
-
React.createElement("br", null),
|
2045
|
-
React.createElement("br", null),
|
2046
|
-
"Darum tauchen wir wieder in das echte Leben ein und nutzen digitale Medien nur dort, wo sie uns wirklich helfen in echt zusammen zu kommen"),
|
2042
|
+
React.createElement("h3", { className: "tw-font-bold tw-text-lg" }, " Imagine ..."),
|
2043
|
+
React.createElement("p", { className: "tw-py-4" }, "you wake up sometime in the early twenties of the 21st century on planet Earth from a hypnosis that has somehow kept you and all other people under some kind of external control all your life."),
|
2047
2044
|
React.createElement("div", { className: "tw-modal-action" },
|
2048
|
-
React.createElement("label", { className: "tw-btn tw-btn-neutral", onClick: function () { return clickAction(); } }, "
|
2045
|
+
React.createElement("label", { className: "tw-btn tw-btn-neutral", onClick: function () { return clickAction(); } }, "next"))));
|
2049
2046
|
}
|
2050
2047
|
function Welcome3(_a) {
|
2051
2048
|
var clickAction = _a.clickAction;
|
2052
2049
|
return (React.createElement(React.Fragment, null,
|
2053
|
-
React.createElement("h3", { className: "tw-font-bold tw-text-lg" }, "
|
2054
|
-
React.createElement("
|
2055
|
-
React.createElement("li", null, "\uD83E\uDD55 Essen & Trinken"),
|
2056
|
-
React.createElement("li", null, "\uD83C\uDFE1 Wohn- & Lebensraum"),
|
2057
|
-
React.createElement("li", null, "\uD83D\uDCAC Kommunikation"),
|
2058
|
-
React.createElement("li", null, "\uD83D\uDCA1 Energie"),
|
2059
|
-
React.createElement("li", null, "\uD83D\uDE90 Mobilit\u00E4t")),
|
2050
|
+
React.createElement("h3", { className: "tw-font-bold tw-text-lg" }, "Many people ... "),
|
2051
|
+
React.createElement("p", { className: "tw-py-4" }, "are still trapped in old and dysfunctional structures. But magically, a new consciousness is suddenly rising. More and more people are awakening from hypnosis. "),
|
2060
2052
|
React.createElement("div", { className: "tw-modal-action" },
|
2061
|
-
React.createElement("
|
2053
|
+
React.createElement("label", { className: "tw-btn tw-btn-neutral", onClick: function () { return clickAction(); } }, "next"))));
|
2062
2054
|
}
|
2055
|
+
var close = function () {
|
2056
|
+
window.my_modal_3.close();
|
2057
|
+
};
|
2063
2058
|
function Modal() {
|
2064
2059
|
var _a = useState(1), chapter = _a[0], setChapter = _a[1];
|
2065
|
-
var close = function () {
|
2066
|
-
window.my_modal_3.close();
|
2067
|
-
};
|
2068
2060
|
var ActiveChapter = function () {
|
2069
2061
|
switch (chapter) {
|
2070
2062
|
case 1:
|
@@ -2090,6 +2082,7 @@ function Modal() {
|
|
2090
2082
|
|
2091
2083
|
function Quests() {
|
2092
2084
|
var _a = React.useState(true), open = _a[0], setOpen = _a[1];
|
2085
|
+
var _b = useAuth(), isAuthenticated = _b.isAuthenticated, user = _b.user;
|
2093
2086
|
if (open)
|
2094
2087
|
return (React.createElement(React.Fragment, null,
|
2095
2088
|
React.createElement("div", { className: "tw-card tw-w-48 tw-bg-base-100 tw-shadow-xl tw-absolute tw-bottom-4 tw-left-4 tw-z-[2000]" },
|
@@ -2100,20 +2093,20 @@ function Quests() {
|
|
2100
2093
|
React.createElement("ul", { className: 'tw-flex-row' },
|
2101
2094
|
React.createElement("li", null,
|
2102
2095
|
React.createElement("label", { className: "tw-label tw-justify-normal tw-pt-1 tw-pb-0" },
|
2103
|
-
React.createElement("input", { type: "checkbox", readOnly: true, className: "tw-checkbox tw-checkbox-xs tw-checkbox-success", checked:
|
2104
|
-
React.createElement("span", { className: 'tw-text-sm tw-label-text tw-mx-2' }, "
|
2096
|
+
React.createElement("input", { type: "checkbox", readOnly: true, className: "tw-checkbox tw-checkbox-xs tw-checkbox-success", checked: isAuthenticated ? isAuthenticated : false }),
|
2097
|
+
React.createElement("span", { className: 'tw-text-sm tw-label-text tw-mx-2' }, "Sign Up"))),
|
2105
2098
|
React.createElement("li", null,
|
2106
2099
|
React.createElement("label", { className: "tw-label tw-justify-normal tw-pt-1 tw-pb-0" },
|
2107
|
-
React.createElement("input", { type: "checkbox", readOnly: true, className: "tw-checkbox tw-checkbox-xs tw-checkbox-success", checked: true }),
|
2108
|
-
React.createElement("span", { className: 'tw-text-sm tw-label-text tw-mx-2' }, "Avatar
|
2100
|
+
React.createElement("input", { type: "checkbox", readOnly: true, className: "tw-checkbox tw-checkbox-xs tw-checkbox-success", checked: (user === null || user === void 0 ? void 0 : user.avatar) ? true : false }),
|
2101
|
+
React.createElement("span", { className: 'tw-text-sm tw-label-text tw-mx-2' }, "Upload Avatar"))),
|
2109
2102
|
React.createElement("li", null,
|
2110
2103
|
React.createElement("label", { className: "tw-label tw-justify-normal tw-pt-1 tw-pb-0" },
|
2111
|
-
React.createElement("input", { type: "checkbox", readOnly: true, className: "tw-checkbox tw-checkbox-xs tw-checkbox-success",
|
2112
|
-
React.createElement("span", { className: 'tw-text-sm tw-label-text tw-mx-2' }, "
|
2104
|
+
React.createElement("input", { type: "checkbox", readOnly: true, className: "tw-checkbox tw-checkbox-xs tw-checkbox-success", checked: (user === null || user === void 0 ? void 0 : user.description) ? true : false }),
|
2105
|
+
React.createElement("span", { className: 'tw-text-sm tw-label-text tw-mx-2' }, "Fill Profile"))),
|
2113
2106
|
React.createElement("li", null,
|
2114
2107
|
React.createElement("label", { className: "tw-label tw-justify-normal tw-pt-1 tw-pb-0" },
|
2115
|
-
React.createElement("input", { type: "checkbox", readOnly: true, className: "tw-checkbox tw-checkbox-xs tw-checkbox-success"
|
2116
|
-
React.createElement("span", { className: 'tw-text-sm tw-label-text tw-mx-2' }, "
|
2108
|
+
React.createElement("input", { type: "checkbox", readOnly: true, className: "tw-checkbox tw-checkbox-xs tw-checkbox-success" }),
|
2109
|
+
React.createElement("span", { className: 'tw-text-sm tw-label-text tw-mx-2' }, "Join Group"))))))));
|
2117
2110
|
else
|
2118
2111
|
return (React.createElement(React.Fragment, null));
|
2119
2112
|
}
|