utopia-ui 3.0.0-alpha.71 → 3.0.0-alpha.72
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/index.js +1 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -23,8 +23,6 @@ import 'react-image-crop/dist/ReactCrop.css';
|
|
23
23
|
import 'react-toastify/dist/ReactToastify.css';
|
24
24
|
import ReactCrop, { centerCrop, makeAspectCrop } from 'react-image-crop';
|
25
25
|
import { HexColorPicker } from 'react-colorful';
|
26
|
-
import MDEditor from '@uiw/react-md-editor';
|
27
|
-
import rehypeSanitize from 'rehype-sanitize';
|
28
26
|
|
29
27
|
function styleInject(css, ref) {
|
30
28
|
if ( ref === void 0 ) ref = {};
|
@@ -3905,29 +3903,6 @@ function OverlayProfile() {
|
|
3905
3903
|
React.createElement(TextView, { item: item })))));
|
3906
3904
|
}
|
3907
3905
|
|
3908
|
-
function TextEditor(_a) {
|
3909
|
-
var value = _a.value, updateFormValue = _a.updateFormValue;
|
3910
|
-
useEffect(function () {
|
3911
|
-
setHeightFromSourceToTarget("wmde-markdown-color", "w-md-editor-text-input");
|
3912
|
-
}, [value]);
|
3913
|
-
return (React.createElement("div", { className: "container" },
|
3914
|
-
React.createElement(MDEditor, { value: value, onChange: function (val) { return updateFormValue(val); }, preview: "edit", height: "100%", previewOptions: {
|
3915
|
-
rehypePlugins: [[rehypeSanitize]],
|
3916
|
-
} })));
|
3917
|
-
}
|
3918
|
-
// TypeScript
|
3919
|
-
var setHeightFromSourceToTarget = function (sourceClassName, targetClassName) {
|
3920
|
-
// Select the source element and get its height
|
3921
|
-
var sourceElement = document.querySelector(".".concat(sourceClassName));
|
3922
|
-
var height = sourceElement ? (sourceElement.clientHeight + 10) + 'px' : '0'; // Convert to string to use in style
|
3923
|
-
// Select all target elements
|
3924
|
-
var targetElements = document.querySelectorAll(".".concat(targetClassName));
|
3925
|
-
// Set the height of all target elements to match the source element's height
|
3926
|
-
targetElements.forEach(function (element) {
|
3927
|
-
element.style.height = height;
|
3928
|
-
});
|
3929
|
-
};
|
3930
|
-
|
3931
3906
|
function OverlayProfileSettings() {
|
3932
3907
|
var _a = useAuth(), user = _a.user, updateUser = _a.updateUser, loading = _a.loading, token = _a.token;
|
3933
3908
|
var _b = useState(""), id = _b[0], setId = _b[1];
|
@@ -4081,7 +4056,7 @@ function OverlayProfileSettings() {
|
|
4081
4056
|
React.createElement("div", { role: "tablist", className: "tw-tabs tw-tabs-lifted tw-mt-4" },
|
4082
4057
|
React.createElement("input", { type: "radio", name: "my_tabs_2", role: "tab", className: "tw-tab [--tab-border-color:var(--fallback-bc,oklch(var(--bc)/0.2))]", "aria-label": "Text", checked: activeTab == 1 && true, onChange: function () { return setActiveTab(1); } }),
|
4083
4058
|
React.createElement("div", { role: "tabpanel", className: "tw-tab-content tw-bg-base-100 tw-border-[var(--fallback-bc,oklch(var(--bc)/0.2))] tw-rounded-box tw-h-[calc(100dvh-332px)]" },
|
4084
|
-
React.createElement(
|
4059
|
+
React.createElement(TextAreaInput, { placeholder: "About me, Contact, #Tags, ...", defaultValue: (user === null || user === void 0 ? void 0 : user.description) ? user.description : "", updateFormValue: function (v) { return setText(v); }, containerStyle: 'tw-h-full', inputStyle: 'tw-h-full' })),
|
4085
4060
|
React.createElement("input", { type: "radio", name: "my_tabs_2", role: "tab", className: "tw-tab tw-min-w-[10em] [--tab-border-color:var(--fallback-bc,oklch(var(--bc)/0.2))]", "aria-label": "Offers & Needs", checked: activeTab == 2 && true, onChange: function () { return setActiveTab(2); } }),
|
4086
4061
|
React.createElement("div", { role: "tabpanel", className: "tw-tab-content tw-bg-base-100 tw-rounded-box tw-pt-6 tw-h-[calc(100dvh-332px)]" },
|
4087
4062
|
React.createElement("textarea", { className: "tw-textarea tw-textarea-bordered tw-w-full tw-mb-4 tw-h-32 ", placeholder: "Offers" }),
|