@levo-so/react 0.0.1-alpha → 0.1.0
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/Checbox-sq-atGlJ.js +28 -0
- package/dist/CheckboxWidget-CD4lv7B4.js +118 -0
- package/dist/CollectionFormBuilder-a0pzMkWL.js +734 -0
- package/dist/CurrencyWidget-DRMqUgbP.js +60 -0
- package/dist/DateTimeWidget-FmBvE_lk.js +103 -0
- package/dist/DefaultFormVariant-BzHB74Ie.js +80 -0
- package/dist/DropdownWidget-CW0GSjwE.js +115 -0
- package/dist/EmailWidget-Nyc76pT8.js +42 -0
- package/dist/GeocoderWidget-Ib15NJcx.js +309 -0
- package/dist/Input-2CvZ90f8.js +54 -0
- package/dist/LevoProvider-DNbYyEaf.js +21 -0
- package/dist/MultiGeocoderWidget-BuW8i48_.js +49 -0
- package/dist/PhoneWidget-COo3SBNU.js +47 -0
- package/dist/RadioWidget-C8syq1dO.js +109 -0
- package/dist/RichTextWidget-B5qxi5OE.js +309 -0
- package/dist/Sonner-t6JVKA0a.js +39 -0
- package/dist/Spinner-CuUosd-S.js +297 -0
- package/dist/StepsFormVariant-NSTSIoVV.js +137 -0
- package/dist/SwitchWidget-C-p7lICr.js +53 -0
- package/dist/TextWidget-BtZp3DRk.js +34 -0
- package/dist/TextareaWidget-D0TbFUjX.js +30 -0
- package/dist/ToggleCheckboxWidget-BbVq_dAC.js +44 -0
- package/dist/Tooltip-CI4i4mYr.js +144 -0
- package/dist/URLWidget-00u8Svwt.js +14 -0
- package/dist/UploadWidget-Dim2TEFc.js +503 -0
- package/dist/audience/{block.d.ts → components/block.d.ts} +1 -1
- package/dist/audience/components/block.d.ts.map +1 -0
- package/dist/audience/{component.d.ts → components/component.d.ts} +1 -1
- package/dist/audience/components/component.d.ts.map +1 -0
- package/dist/audience/{page.d.ts → components/page.d.ts} +1 -1
- package/dist/audience/components/page.d.ts.map +1 -0
- package/dist/audience/components/useScrollDepth.d.ts.map +1 -0
- package/dist/audience/index.d.ts +3 -3
- package/dist/audience/index.d.ts.map +1 -0
- package/dist/audience/index.js +4 -2303
- package/dist/byteToSize-BFKZSBu1.js +8 -0
- package/dist/cn-C9QoOYNG.js +6 -0
- package/dist/collection/components/CollectionFormBuilder.d.ts +12 -0
- package/dist/collection/components/CollectionFormBuilder.d.ts.map +1 -0
- package/dist/collection/components/FieldRenderer.d.ts +9 -0
- package/dist/collection/components/FieldRenderer.d.ts.map +1 -0
- package/dist/collection/components/core/AsyncSelectPaginate/AsyncSelectPaginate.d.ts +5 -0
- package/dist/collection/components/core/AsyncSelectPaginate/AsyncSelectPaginate.d.ts.map +1 -0
- package/dist/collection/components/core/Checkbox/Checbox.d.ts +5 -0
- package/dist/collection/components/core/Checkbox/Checbox.d.ts.map +1 -0
- package/dist/collection/components/core/Input/Input.d.ts +11 -0
- package/dist/collection/components/core/Input/Input.d.ts.map +1 -0
- package/dist/collection/components/core/Switch/Switch.d.ts +5 -0
- package/dist/collection/components/core/Switch/Switch.d.ts.map +1 -0
- package/dist/collection/components/renderer/RenderArrayWidget.d.ts +5 -0
- package/dist/collection/components/renderer/RenderArrayWidget.d.ts.map +1 -0
- package/dist/collection/components/renderer/RenderCommonField.d.ts +5 -0
- package/dist/collection/components/renderer/RenderCommonField.d.ts.map +1 -0
- package/dist/collection/components/renderer/RenderRecordWidget.d.ts +4 -0
- package/dist/collection/components/renderer/RenderRecordWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/ErrorMessage.d.ts +6 -0
- package/dist/collection/components/widgets/ErrorMessage.d.ts.map +1 -0
- package/dist/collection/components/widgets/FieldWrapper.d.ts +14 -0
- package/dist/collection/components/widgets/FieldWrapper.d.ts.map +1 -0
- package/dist/collection/components/widgets/FormHelperText.d.ts +6 -0
- package/dist/collection/components/widgets/FormHelperText.d.ts.map +1 -0
- package/dist/collection/components/widgets/FormLabel.d.ts +8 -0
- package/dist/collection/components/widgets/FormLabel.d.ts.map +1 -0
- package/dist/collection/components/widgets/checkboxWidget/CheckboxWidget.d.ts +8 -0
- package/dist/collection/components/widgets/checkboxWidget/CheckboxWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/collectionWidget/CollectionWidget.d.ts +7 -0
- package/dist/collection/components/widgets/collectionWidget/CollectionWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/currencyWidget/CurrencyWidget.d.ts +9 -0
- package/dist/collection/components/widgets/currencyWidget/CurrencyWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts +10 -0
- package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/dropdownWidget/DropdownWidget.d.ts +9 -0
- package/dist/collection/components/widgets/dropdownWidget/DropdownWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/emailWidget/EmailWidget.d.ts +9 -0
- package/dist/collection/components/widgets/emailWidget/EmailWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/geocoderWidget/GeocoderWidget.d.ts +8 -0
- package/dist/collection/components/widgets/geocoderWidget/GeocoderWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/multiGeocoderWidget/MultiGeocoderWidget.d.ts +8 -0
- package/dist/collection/components/widgets/multiGeocoderWidget/MultiGeocoderWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/phoneWidget/PhoneWidget.d.ts +8 -0
- package/dist/collection/components/widgets/phoneWidget/PhoneWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/radioWidget/RadioWidget.d.ts +11 -0
- package/dist/collection/components/widgets/radioWidget/RadioWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/richTextWidget/RichTextWidget.d.ts +12 -0
- package/dist/collection/components/widgets/richTextWidget/RichTextWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/switchWidget/SwitchWidget.d.ts +8 -0
- package/dist/collection/components/widgets/switchWidget/SwitchWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/textWidget/TextWidget.d.ts +10 -0
- package/dist/collection/components/widgets/textWidget/TextWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/textareaWidget/TextareaWidget.d.ts +8 -0
- package/dist/collection/components/widgets/textareaWidget/TextareaWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/toggleCheckboxWidget/ToggleCheckboxWidget.d.ts +8 -0
- package/dist/collection/components/widgets/toggleCheckboxWidget/ToggleCheckboxWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/uploadWidget/FileUploadDropBox.d.ts +10 -0
- package/dist/collection/components/widgets/uploadWidget/FileUploadDropBox.d.ts.map +1 -0
- package/dist/collection/components/widgets/uploadWidget/FileUploadModal.d.ts +13 -0
- package/dist/collection/components/widgets/uploadWidget/FileUploadModal.d.ts.map +1 -0
- package/dist/collection/components/widgets/uploadWidget/ImportFromAssets.d.ts +11 -0
- package/dist/collection/components/widgets/uploadWidget/ImportFromAssets.d.ts.map +1 -0
- package/dist/collection/components/widgets/uploadWidget/UploadWidget.d.ts +19 -0
- package/dist/collection/components/widgets/uploadWidget/UploadWidget.d.ts.map +1 -0
- package/dist/collection/components/widgets/urlWidget/URLWidget.d.ts +5 -0
- package/dist/collection/components/widgets/urlWidget/URLWidget.d.ts.map +1 -0
- package/dist/collection/index.d.ts +5 -0
- package/dist/collection/index.d.ts.map +1 -0
- package/dist/collection/index.js +19 -0
- package/dist/collection/lib/FormBuilder.d.ts +8 -0
- package/dist/collection/lib/FormBuilder.d.ts.map +1 -0
- package/dist/collection/lib/SaveDraftValues.d.ts +7 -0
- package/dist/collection/lib/SaveDraftValues.d.ts.map +1 -0
- package/dist/collection/lib/hooks/useLevoForm.d.ts +18 -0
- package/dist/collection/lib/hooks/useLevoForm.d.ts.map +1 -0
- package/dist/collection/lib/provider/LevoFormProvider.d.ts +9 -0
- package/dist/collection/lib/provider/LevoFormProvider.d.ts.map +1 -0
- package/dist/collection/lib/variants/DefaultFormVariant.d.ts +3 -0
- package/dist/collection/lib/variants/DefaultFormVariant.d.ts.map +1 -0
- package/dist/collection/lib/variants/StepsFormVariant.d.ts +4 -0
- package/dist/collection/lib/variants/StepsFormVariant.d.ts.map +1 -0
- package/dist/collection/types/context.d.ts +34 -0
- package/dist/collection/types/context.d.ts.map +1 -0
- package/dist/collection/types/errors.d.ts +7 -0
- package/dist/collection/types/errors.d.ts.map +1 -0
- package/dist/collection/types/formVariant.d.ts +18 -0
- package/dist/collection/types/formVariant.d.ts.map +1 -0
- package/dist/collection/types/forms.d.ts +31 -0
- package/dist/collection/types/forms.d.ts.map +1 -0
- package/dist/collection/types/index.d.ts +4 -0
- package/dist/collection/types/index.d.ts.map +1 -0
- package/dist/collection/types/renderer.d.ts +6 -0
- package/dist/collection/types/renderer.d.ts.map +1 -0
- package/dist/collection/utils/formHelpers.d.ts +47 -0
- package/dist/collection/utils/formHelpers.d.ts.map +1 -0
- package/dist/collection/utils/getFieldValidations.d.ts +6 -0
- package/dist/collection/utils/getFieldValidations.d.ts.map +1 -0
- package/dist/collection/utils/index.d.ts +4 -0
- package/dist/collection/utils/index.d.ts.map +1 -0
- package/dist/collection/utils/schema.d.ts +3 -0
- package/dist/collection/utils/schema.d.ts.map +1 -0
- package/dist/collection/utils/setFormErrors.d.ts +4 -0
- package/dist/collection/utils/setFormErrors.d.ts.map +1 -0
- package/dist/collection/utils/storage.d.ts +11 -0
- package/dist/collection/utils/storage.d.ts.map +1 -0
- package/dist/components/Dialog.d.ts +21 -0
- package/dist/components/Dialog.d.ts.map +1 -0
- package/dist/components/DialogWrapper.d.ts +11 -0
- package/dist/components/DialogWrapper.d.ts.map +1 -0
- package/dist/components/Sonner.d.ts +7 -0
- package/dist/components/Sonner.d.ts.map +1 -0
- package/dist/components/Spinner.d.ts +5 -0
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/Tabs.d.ts +8 -0
- package/dist/components/Tabs.d.ts.map +1 -0
- package/dist/components/Tooltip.d.ts +16 -0
- package/dist/components/Tooltip.d.ts.map +1 -0
- package/dist/components/button/Button.d.ts +12 -0
- package/dist/components/button/Button.d.ts.map +1 -0
- package/dist/components/button/buttonVariants.d.ts +6 -0
- package/dist/components/button/buttonVariants.d.ts.map +1 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +33 -0
- package/dist/constants/fileUploadPresets.d.ts +34 -0
- package/dist/constants/fileUploadPresets.d.ts.map +1 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/errorHandler-BJcFS2qV.js +26 -0
- package/dist/fileUploadPresets-2raQmHT0.js +74 -0
- package/dist/index-wTf_TtOG.js +131 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +84 -0
- package/dist/isEmptyObject-C5s4GzLE.js +8 -0
- package/dist/jsx-runtime-B6kdoens.js +634 -0
- package/dist/membership/components/OAuth/Button.d.ts +8 -0
- package/dist/membership/components/OAuth/Button.d.ts.map +1 -0
- package/dist/membership/components/OAuth/Container.d.ts +24 -0
- package/dist/membership/components/OAuth/Container.d.ts.map +1 -0
- package/dist/membership/components/OAuth/Core.d.ts +17 -0
- package/dist/membership/components/OAuth/Core.d.ts.map +1 -0
- package/dist/membership/components/OAuth/Popup.d.ts +15 -0
- package/dist/membership/components/OAuth/Popup.d.ts.map +1 -0
- package/dist/membership/components/index.d.ts +8 -0
- package/dist/membership/components/index.d.ts.map +1 -0
- package/dist/membership/index.d.ts +2 -0
- package/dist/membership/index.d.ts.map +1 -0
- package/dist/membership/index.js +4 -0
- package/dist/page-CxaKoH22.js +205 -0
- package/dist/providers/LevoProvider.d.ts +25 -0
- package/dist/providers/LevoProvider.d.ts.map +1 -0
- package/dist/style.css +1 -0
- package/dist/useLevoForm-CR3q-L5Z.js +166 -0
- package/dist/utils/byteToSize.d.ts +3 -0
- package/dist/utils/byteToSize.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +4 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/errorHandler.d.ts +2 -0
- package/dist/utils/errorHandler.d.ts.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +14 -0
- package/dist/utils/isDateObject.d.ts +2 -0
- package/dist/utils/isDateObject.d.ts.map +1 -0
- package/dist/utils/isEmptyObject.d.ts +5 -0
- package/dist/utils/isEmptyObject.d.ts.map +1 -0
- package/dist/utils/isNullOrUndefined.d.ts +2 -0
- package/dist/utils/isNullOrUndefined.d.ts.map +1 -0
- package/dist/utils/isObject.d.ts +3 -0
- package/dist/utils/isObject.d.ts.map +1 -0
- package/package.json +96 -16
- /package/dist/audience/{useScrollDepth.d.ts → components/useScrollDepth.d.ts} +0 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as l } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
+
import B from "@tiptap/extension-bold";
|
|
4
|
+
import d from "@tiptap/extension-bullet-list";
|
|
5
|
+
import w from "@tiptap/extension-document";
|
|
6
|
+
import { HardBreak as z } from "@tiptap/extension-hard-break";
|
|
7
|
+
import y from "@tiptap/extension-history";
|
|
8
|
+
import S from "@tiptap/extension-italic";
|
|
9
|
+
import M from "@tiptap/extension-link";
|
|
10
|
+
import R from "@tiptap/extension-list-item";
|
|
11
|
+
import U from "@tiptap/extension-ordered-list";
|
|
12
|
+
import T from "@tiptap/extension-paragraph";
|
|
13
|
+
import H from "@tiptap/extension-strike";
|
|
14
|
+
import N from "@tiptap/extension-text";
|
|
15
|
+
import O from "@tiptap/extension-text-align";
|
|
16
|
+
import F from "@tiptap/extension-underline";
|
|
17
|
+
import { useEditor as I, EditorContent as E } from "@tiptap/react";
|
|
18
|
+
import { useState as D, useEffect as G } from "react";
|
|
19
|
+
import { useController as q } from "react-hook-form";
|
|
20
|
+
import { G as p, e as J, f as V, g as W, h as Z, i as _, j as P, k as K, l as Q, m as X, n as Y, o as $, p as nn } from "./Spinner-CuUosd-S.js";
|
|
21
|
+
import { h as ln, j as en, k as sn } from "./CollectionFormBuilder-a0pzMkWL.js";
|
|
22
|
+
import { c as j } from "./cn-C9QoOYNG.js";
|
|
23
|
+
function an(n) {
|
|
24
|
+
return p({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 0 1-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 0 1-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 0 0-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z" }, child: [] }] })(n);
|
|
25
|
+
}
|
|
26
|
+
function cn(n) {
|
|
27
|
+
return p({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 0 0-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.64 318.64 0 0 1-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 0 1-68.6 101.7c-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 0 0-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z" }, child: [] }] })(n);
|
|
28
|
+
}
|
|
29
|
+
function tn(n) {
|
|
30
|
+
return p({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M12.6512 14.0654L11.6047 20H9.57389L10.9247 12.339L3.51465 4.92892L4.92886 3.51471L20.4852 19.0711L19.071 20.4853L12.6512 14.0654ZM11.7727 7.53009L12.0425 5.99999H10.2426L8.24257 3.99999H19.9999V5.99999H14.0733L13.4991 9.25652L11.7727 7.53009Z" }, child: [] }] })(n);
|
|
31
|
+
}
|
|
32
|
+
const e = ({
|
|
33
|
+
isSelected: n,
|
|
34
|
+
className: c,
|
|
35
|
+
children: t,
|
|
36
|
+
...i
|
|
37
|
+
}) => /* @__PURE__ */ l.jsx(
|
|
38
|
+
"button",
|
|
39
|
+
{
|
|
40
|
+
className: j(
|
|
41
|
+
"text-gray-900 rounded-[4px] hover:bg-gray-200",
|
|
42
|
+
n ? "bg-gray-400" : "bg-transparent",
|
|
43
|
+
c
|
|
44
|
+
),
|
|
45
|
+
type: "button",
|
|
46
|
+
...i,
|
|
47
|
+
children: t
|
|
48
|
+
}
|
|
49
|
+
), a = ({ children: n }) => /* @__PURE__ */ l.jsx("div", { className: "flex p-1 gap-[2px] border-solid border-r-[1px] border-input", children: n }), rn = ({ editor: n }) => {
|
|
50
|
+
if (!n)
|
|
51
|
+
return null;
|
|
52
|
+
function c(i) {
|
|
53
|
+
const u = i.getAttributes("link").href, r = window.prompt("URL", u);
|
|
54
|
+
if (r !== null) {
|
|
55
|
+
if (r === "") {
|
|
56
|
+
i.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
i.chain().focus().extendMarkRange("link").setLink({ href: r }).run();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const t = n.getAttributes("link").href;
|
|
63
|
+
return /* @__PURE__ */ l.jsxs("div", { className: "w-full bg-white flex flex-wrap border-solid border-b-[1px] rounded-tl-[14px] rounded-br-[14px] overflow", children: [
|
|
64
|
+
/* @__PURE__ */ l.jsxs(a, { children: [
|
|
65
|
+
/* @__PURE__ */ l.jsx(
|
|
66
|
+
e,
|
|
67
|
+
{
|
|
68
|
+
title: "Bold",
|
|
69
|
+
isSelected: n == null ? void 0 : n.isActive("bold"),
|
|
70
|
+
"aria-label": "bold",
|
|
71
|
+
onClick: () => n == null ? void 0 : n.chain().focus().toggleBold().run(),
|
|
72
|
+
children: /* @__PURE__ */ l.jsx(J, { size: "1.125rem" })
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ l.jsx(
|
|
76
|
+
e,
|
|
77
|
+
{
|
|
78
|
+
title: "Italic",
|
|
79
|
+
isSelected: n == null ? void 0 : n.isActive("italic"),
|
|
80
|
+
"aria-label": "italic",
|
|
81
|
+
onClick: () => n == null ? void 0 : n.chain().focus().toggleItalic().run(),
|
|
82
|
+
children: /* @__PURE__ */ l.jsx(V, { size: "1.125rem" })
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ l.jsx(
|
|
86
|
+
e,
|
|
87
|
+
{
|
|
88
|
+
title: "Underline",
|
|
89
|
+
isSelected: n == null ? void 0 : n.isActive("underline"),
|
|
90
|
+
"aria-label": "underline",
|
|
91
|
+
onClick: () => n == null ? void 0 : n.commands.toggleUnderline(),
|
|
92
|
+
children: /* @__PURE__ */ l.jsx(W, { size: "1.25rem" })
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ l.jsx(
|
|
96
|
+
e,
|
|
97
|
+
{
|
|
98
|
+
title: "Strike",
|
|
99
|
+
isSelected: n == null ? void 0 : n.isActive("strike"),
|
|
100
|
+
"aria-label": "strike",
|
|
101
|
+
onClick: () => n == null ? void 0 : n.chain().focus().toggleStrike().run(),
|
|
102
|
+
children: /* @__PURE__ */ l.jsx(Z, { size: "1.125rem" })
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
] }),
|
|
106
|
+
/* @__PURE__ */ l.jsxs(a, { children: [
|
|
107
|
+
/* @__PURE__ */ l.jsx(
|
|
108
|
+
e,
|
|
109
|
+
{
|
|
110
|
+
title: "Bullet list",
|
|
111
|
+
isSelected: n == null ? void 0 : n.isActive("bulletList"),
|
|
112
|
+
"aria-label": "bulletList",
|
|
113
|
+
onClick: () => n == null ? void 0 : n.chain().focus().toggleBulletList().run(),
|
|
114
|
+
children: /* @__PURE__ */ l.jsx(_, { size: "1.25rem" })
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
/* @__PURE__ */ l.jsx(
|
|
118
|
+
e,
|
|
119
|
+
{
|
|
120
|
+
title: "Numbered List",
|
|
121
|
+
isSelected: n == null ? void 0 : n.isActive("orderedList"),
|
|
122
|
+
"aria-label": "numberList",
|
|
123
|
+
onClick: () => n == null ? void 0 : n.chain().focus().toggleOrderedList().run(),
|
|
124
|
+
children: /* @__PURE__ */ l.jsx(P, { size: "1.25rem" })
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
] }),
|
|
128
|
+
/* @__PURE__ */ l.jsxs(a, { children: [
|
|
129
|
+
/* @__PURE__ */ l.jsx(
|
|
130
|
+
e,
|
|
131
|
+
{
|
|
132
|
+
title: "Add Link",
|
|
133
|
+
"aria-label": "link",
|
|
134
|
+
isSelected: n == null ? void 0 : n.isActive("link"),
|
|
135
|
+
onClick: () => c(n),
|
|
136
|
+
children: /* @__PURE__ */ l.jsx(K, { size: "1.25rem" })
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
/* @__PURE__ */ l.jsx(
|
|
140
|
+
e,
|
|
141
|
+
{
|
|
142
|
+
title: "Remove Link",
|
|
143
|
+
"aria-label": "unlink",
|
|
144
|
+
disabled: !t,
|
|
145
|
+
onClick: () => n.chain().focus().extendMarkRange("link").unsetLink().run(),
|
|
146
|
+
children: /* @__PURE__ */ l.jsx(Q, { size: "1.25rem" })
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
] }),
|
|
150
|
+
/* @__PURE__ */ l.jsxs(a, { children: [
|
|
151
|
+
/* @__PURE__ */ l.jsx(
|
|
152
|
+
e,
|
|
153
|
+
{
|
|
154
|
+
title: "Left Align",
|
|
155
|
+
isSelected: n == null ? void 0 : n.isActive({ textAlign: "left" }),
|
|
156
|
+
"aria-label": "leftAlign",
|
|
157
|
+
onClick: () => n == null ? void 0 : n.chain().focus().setTextAlign("left").run(),
|
|
158
|
+
children: /* @__PURE__ */ l.jsx(X, { size: "1.125rem" })
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ l.jsx(
|
|
162
|
+
e,
|
|
163
|
+
{
|
|
164
|
+
title: "Center Align",
|
|
165
|
+
isSelected: n == null ? void 0 : n.isActive({ textAlign: "center" }),
|
|
166
|
+
"aria-label": "centerAlign",
|
|
167
|
+
onClick: () => n == null ? void 0 : n.chain().focus().setTextAlign("center").run(),
|
|
168
|
+
children: /* @__PURE__ */ l.jsx(Y, { size: "1.125rem" })
|
|
169
|
+
}
|
|
170
|
+
),
|
|
171
|
+
/* @__PURE__ */ l.jsx(
|
|
172
|
+
e,
|
|
173
|
+
{
|
|
174
|
+
title: "Right Align",
|
|
175
|
+
isSelected: n == null ? void 0 : n.isActive({ textAlign: "right" }),
|
|
176
|
+
"aria-label": "rightAlign",
|
|
177
|
+
onClick: () => n == null ? void 0 : n.chain().focus().setTextAlign("right").run(),
|
|
178
|
+
children: /* @__PURE__ */ l.jsx($, { size: "1.125rem" })
|
|
179
|
+
}
|
|
180
|
+
),
|
|
181
|
+
/* @__PURE__ */ l.jsx(
|
|
182
|
+
e,
|
|
183
|
+
{
|
|
184
|
+
title: "Justify Align",
|
|
185
|
+
isSelected: n == null ? void 0 : n.isActive({ textAlign: "justify" }),
|
|
186
|
+
"aria-label": "justifyAlign",
|
|
187
|
+
onClick: () => n == null ? void 0 : n.chain().focus().setTextAlign("justify").run(),
|
|
188
|
+
children: /* @__PURE__ */ l.jsx(nn, { size: "1.125rem" })
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
] }),
|
|
192
|
+
/* @__PURE__ */ l.jsx(a, { children: /* @__PURE__ */ l.jsx(
|
|
193
|
+
e,
|
|
194
|
+
{
|
|
195
|
+
title: "Clear Formatting",
|
|
196
|
+
isSelected: n == null ? void 0 : n.isActive("clear-formatting"),
|
|
197
|
+
"aria-label": "clear-formatting",
|
|
198
|
+
onClick: () => n.chain().focus().clearNodes().unsetAllMarks().run(),
|
|
199
|
+
children: /* @__PURE__ */ l.jsx(tn, { size: "1.125rem" })
|
|
200
|
+
}
|
|
201
|
+
) }),
|
|
202
|
+
/* @__PURE__ */ l.jsxs(a, { children: [
|
|
203
|
+
/* @__PURE__ */ l.jsx(
|
|
204
|
+
e,
|
|
205
|
+
{
|
|
206
|
+
title: "Undo",
|
|
207
|
+
"aria-label": "undo",
|
|
208
|
+
onClick: () => n.chain().focus().undo().run(),
|
|
209
|
+
disabled: !n.can().chain().focus().undo().run(),
|
|
210
|
+
children: /* @__PURE__ */ l.jsx(cn, { size: "1.125rem" })
|
|
211
|
+
}
|
|
212
|
+
),
|
|
213
|
+
/* @__PURE__ */ l.jsx(
|
|
214
|
+
e,
|
|
215
|
+
{
|
|
216
|
+
title: "Redo",
|
|
217
|
+
"aria-label": "redo",
|
|
218
|
+
onClick: () => n.chain().focus().redo().run(),
|
|
219
|
+
disabled: !n.can().chain().focus().redo().run(),
|
|
220
|
+
children: /* @__PURE__ */ l.jsx(an, { size: "1.125rem" })
|
|
221
|
+
}
|
|
222
|
+
)
|
|
223
|
+
] })
|
|
224
|
+
] });
|
|
225
|
+
}, Mn = ({ field: n }) => {
|
|
226
|
+
var b;
|
|
227
|
+
const [c, t] = D(!1), { key: i = "", label: u = "", helper_text: r = "", readonly: h = !1 } = n, o = i, {
|
|
228
|
+
field: { value: x, onBlur: k, onChange: L, ...m },
|
|
229
|
+
fieldState: g
|
|
230
|
+
} = q({
|
|
231
|
+
name: o,
|
|
232
|
+
rules: ln(n)
|
|
233
|
+
}), A = !!(n != null && n.required), v = (b = g == null ? void 0 : g.error) == null ? void 0 : b.message, s = I({
|
|
234
|
+
extensions: [
|
|
235
|
+
w,
|
|
236
|
+
T,
|
|
237
|
+
N,
|
|
238
|
+
B,
|
|
239
|
+
F,
|
|
240
|
+
S,
|
|
241
|
+
H,
|
|
242
|
+
U,
|
|
243
|
+
d,
|
|
244
|
+
R,
|
|
245
|
+
z,
|
|
246
|
+
M.configure({
|
|
247
|
+
HTMLAttributes: {
|
|
248
|
+
target: "_blank"
|
|
249
|
+
},
|
|
250
|
+
openOnClick: !1
|
|
251
|
+
}),
|
|
252
|
+
O.configure({
|
|
253
|
+
types: ["heading", "paragraph"]
|
|
254
|
+
}),
|
|
255
|
+
y
|
|
256
|
+
],
|
|
257
|
+
content: x,
|
|
258
|
+
editable: !m.disabled && !h,
|
|
259
|
+
onBlur: () => {
|
|
260
|
+
k();
|
|
261
|
+
},
|
|
262
|
+
onUpdate: ({ editor: f }) => {
|
|
263
|
+
const C = f.getHTML();
|
|
264
|
+
L(C);
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
return G(() => {
|
|
268
|
+
s != null && s.commands && !c && (s.commands.setContent(x || ""), t(!0));
|
|
269
|
+
}, [x]), /* @__PURE__ */ l.jsxs(en, { error: v, helperText: r, readOnly: h, children: [
|
|
270
|
+
u && /* @__PURE__ */ l.jsx(sn, { htmlFor: o, isRequired: A, children: u }),
|
|
271
|
+
/* @__PURE__ */ l.jsxs(
|
|
272
|
+
"div",
|
|
273
|
+
{
|
|
274
|
+
className: j(
|
|
275
|
+
"w-full rounded-md border border-input placeholder:text-muted-foreground focus-within:outline-none focus-within:ring-1 focus-within:ring-ring overflow-hidden",
|
|
276
|
+
(m == null ? void 0 : m.disabled) && "cursor-not-allowed opacity-50 pointer-events-none",
|
|
277
|
+
h && "focus-visible:ring-0 pointer-events-none"
|
|
278
|
+
),
|
|
279
|
+
children: [
|
|
280
|
+
/* @__PURE__ */ l.jsx(rn, { editor: s }),
|
|
281
|
+
/* @__PURE__ */ l.jsx(
|
|
282
|
+
"div",
|
|
283
|
+
{
|
|
284
|
+
className: "overflow-y-auto bg-white flex-1 w-full h-[210px] rounded-b-[inherit]",
|
|
285
|
+
onClick: () => {
|
|
286
|
+
var f;
|
|
287
|
+
return (f = s == null ? void 0 : s.commands) == null ? void 0 : f.focus();
|
|
288
|
+
},
|
|
289
|
+
children: /* @__PURE__ */ l.jsx(
|
|
290
|
+
E,
|
|
291
|
+
{
|
|
292
|
+
id: o,
|
|
293
|
+
className: "prose prose-sm px-4 !w-full [&>div]:outline-none [&>div]:w-full",
|
|
294
|
+
name: o,
|
|
295
|
+
editor: s
|
|
296
|
+
}
|
|
297
|
+
)
|
|
298
|
+
}
|
|
299
|
+
)
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
)
|
|
303
|
+
] });
|
|
304
|
+
};
|
|
305
|
+
export {
|
|
306
|
+
Mn as RichTextWidget,
|
|
307
|
+
e as ToolbarButton,
|
|
308
|
+
Mn as default
|
|
309
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
+
import { Toaster as a, toast as s } from "sonner";
|
|
4
|
+
const n = ({ ...t }) => /* @__PURE__ */ e.jsx(
|
|
5
|
+
a,
|
|
6
|
+
{
|
|
7
|
+
closeButton: !0,
|
|
8
|
+
richColors: !0,
|
|
9
|
+
className: "toaster group",
|
|
10
|
+
toastOptions: {
|
|
11
|
+
classNames: {
|
|
12
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
13
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
14
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
15
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
...t
|
|
19
|
+
}
|
|
20
|
+
), p = (t, o = "Error", r = {}) => {
|
|
21
|
+
s.error(o, {
|
|
22
|
+
description: t,
|
|
23
|
+
duration: 4e3,
|
|
24
|
+
position: "bottom-right",
|
|
25
|
+
...r
|
|
26
|
+
});
|
|
27
|
+
}, g = (t, o = "Success", r = {}) => {
|
|
28
|
+
s.success(o, {
|
|
29
|
+
description: t,
|
|
30
|
+
duration: 4e3,
|
|
31
|
+
position: "bottom-right",
|
|
32
|
+
...r
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
n as T,
|
|
37
|
+
p as e,
|
|
38
|
+
g as s
|
|
39
|
+
};
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as c } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
+
import { Slot as B } from "@radix-ui/react-slot";
|
|
4
|
+
import * as m from "react";
|
|
5
|
+
import l from "react";
|
|
6
|
+
import { twMerge as j } from "tailwind-merge";
|
|
7
|
+
import { cva as O } from "class-variance-authority";
|
|
8
|
+
import { c as u } from "./cn-C9QoOYNG.js";
|
|
9
|
+
import * as d from "@radix-ui/react-tabs";
|
|
10
|
+
var x = {
|
|
11
|
+
color: void 0,
|
|
12
|
+
size: void 0,
|
|
13
|
+
className: void 0,
|
|
14
|
+
style: void 0,
|
|
15
|
+
attr: void 0
|
|
16
|
+
}, p = l.createContext && /* @__PURE__ */ l.createContext(x), P = ["attr", "size", "title"];
|
|
17
|
+
function M(t, e) {
|
|
18
|
+
if (t == null) return {};
|
|
19
|
+
var r = N(t, e), a, n;
|
|
20
|
+
if (Object.getOwnPropertySymbols) {
|
|
21
|
+
var o = Object.getOwnPropertySymbols(t);
|
|
22
|
+
for (n = 0; n < o.length; n++)
|
|
23
|
+
a = o[n], !(e.indexOf(a) >= 0) && Object.prototype.propertyIsEnumerable.call(t, a) && (r[a] = t[a]);
|
|
24
|
+
}
|
|
25
|
+
return r;
|
|
26
|
+
}
|
|
27
|
+
function N(t, e) {
|
|
28
|
+
if (t == null) return {};
|
|
29
|
+
var r = {};
|
|
30
|
+
for (var a in t)
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(t, a)) {
|
|
32
|
+
if (e.indexOf(a) >= 0) continue;
|
|
33
|
+
r[a] = t[a];
|
|
34
|
+
}
|
|
35
|
+
return r;
|
|
36
|
+
}
|
|
37
|
+
function f() {
|
|
38
|
+
return f = Object.assign ? Object.assign.bind() : function(t) {
|
|
39
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
40
|
+
var r = arguments[e];
|
|
41
|
+
for (var a in r)
|
|
42
|
+
Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
45
|
+
}, f.apply(this, arguments);
|
|
46
|
+
}
|
|
47
|
+
function b(t, e) {
|
|
48
|
+
var r = Object.keys(t);
|
|
49
|
+
if (Object.getOwnPropertySymbols) {
|
|
50
|
+
var a = Object.getOwnPropertySymbols(t);
|
|
51
|
+
e && (a = a.filter(function(n) {
|
|
52
|
+
return Object.getOwnPropertyDescriptor(t, n).enumerable;
|
|
53
|
+
})), r.push.apply(r, a);
|
|
54
|
+
}
|
|
55
|
+
return r;
|
|
56
|
+
}
|
|
57
|
+
function g(t) {
|
|
58
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
59
|
+
var r = arguments[e] != null ? arguments[e] : {};
|
|
60
|
+
e % 2 ? b(Object(r), !0).forEach(function(a) {
|
|
61
|
+
L(t, a, r[a]);
|
|
62
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : b(Object(r)).forEach(function(a) {
|
|
63
|
+
Object.defineProperty(t, a, Object.getOwnPropertyDescriptor(r, a));
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return t;
|
|
67
|
+
}
|
|
68
|
+
function L(t, e, r) {
|
|
69
|
+
return e = C(e), e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
70
|
+
}
|
|
71
|
+
function C(t) {
|
|
72
|
+
var e = S(t, "string");
|
|
73
|
+
return typeof e == "symbol" ? e : e + "";
|
|
74
|
+
}
|
|
75
|
+
function S(t, e) {
|
|
76
|
+
if (typeof t != "object" || !t) return t;
|
|
77
|
+
var r = t[Symbol.toPrimitive];
|
|
78
|
+
if (r !== void 0) {
|
|
79
|
+
var a = r.call(t, e || "default");
|
|
80
|
+
if (typeof a != "object") return a;
|
|
81
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
82
|
+
}
|
|
83
|
+
return (e === "string" ? String : Number)(t);
|
|
84
|
+
}
|
|
85
|
+
function z(t) {
|
|
86
|
+
return t && t.map((e, r) => /* @__PURE__ */ l.createElement(e.tag, g({
|
|
87
|
+
key: r
|
|
88
|
+
}, e.attr), z(e.child)));
|
|
89
|
+
}
|
|
90
|
+
function i(t) {
|
|
91
|
+
return (e) => /* @__PURE__ */ l.createElement(E, f({
|
|
92
|
+
attr: g({}, t.attr)
|
|
93
|
+
}, e), z(t.child));
|
|
94
|
+
}
|
|
95
|
+
function E(t) {
|
|
96
|
+
var e = (r) => {
|
|
97
|
+
var {
|
|
98
|
+
attr: a,
|
|
99
|
+
size: n,
|
|
100
|
+
title: o
|
|
101
|
+
} = t, h = M(t, P), v = n || r.size || "1em", s;
|
|
102
|
+
return r.className && (s = r.className), t.className && (s = (s ? s + " " : "") + t.className), /* @__PURE__ */ l.createElement("svg", f({
|
|
103
|
+
stroke: "currentColor",
|
|
104
|
+
fill: "currentColor",
|
|
105
|
+
strokeWidth: "0"
|
|
106
|
+
}, r.attr, a, h, {
|
|
107
|
+
className: s,
|
|
108
|
+
style: g(g({
|
|
109
|
+
color: t.color || r.color
|
|
110
|
+
}, r.style), t.style),
|
|
111
|
+
height: v,
|
|
112
|
+
width: v,
|
|
113
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
114
|
+
}), o && /* @__PURE__ */ l.createElement("title", null, o), t.children);
|
|
115
|
+
};
|
|
116
|
+
return p !== void 0 ? /* @__PURE__ */ l.createElement(p.Consumer, null, (r) => e(r)) : e(x);
|
|
117
|
+
}
|
|
118
|
+
function q(t) {
|
|
119
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 7h16v2H4zm0-4h16v2H4zm0 8h16v2H4zm0 4h16v2H4zm2 4h12v2H6z" }, child: [] }] })(t);
|
|
120
|
+
}
|
|
121
|
+
function F(t) {
|
|
122
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 19h16v2H4zm0-4h11v2H4zm0-4h16v2H4zm0-8h16v2H4zm0 4h11v2H4z" }, child: [] }] })(t);
|
|
123
|
+
}
|
|
124
|
+
function J(t) {
|
|
125
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 19h16v2H4zm3-4h10v2H7zm-3-4h16v2H4zm0-8h16v2H4zm3 4h10v2H7z" }, child: [] }] })(t);
|
|
126
|
+
}
|
|
127
|
+
function K(t) {
|
|
128
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 19h16v2H4zm5-4h11v2H9zm-5-4h16v2H4zm0-8h16v2H4zm5 4h11v2H9z" }, child: [] }] })(t);
|
|
129
|
+
}
|
|
130
|
+
function Q(t) {
|
|
131
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M17.061 11.22A4.46 4.46 0 0 0 18 8.5C18 6.019 15.981 4 13.5 4H6v15h8c2.481 0 4.5-2.019 4.5-4.5a4.48 4.48 0 0 0-1.439-3.28zM13.5 7c.827 0 1.5.673 1.5 1.5s-.673 1.5-1.5 1.5H9V7h4.5zm.5 9H9v-3h5c.827 0 1.5.673 1.5 1.5S14.827 16 14 16z" }, child: [] }] })(t);
|
|
132
|
+
}
|
|
133
|
+
function X(t) {
|
|
134
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M13.293 6.293 7.586 12l5.707 5.707 1.414-1.414L10.414 12l4.293-4.293z" }, child: [] }] })(t);
|
|
135
|
+
}
|
|
136
|
+
function Y(t) {
|
|
137
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M10.707 17.707 16.414 12l-5.707-5.707-1.414 1.414L13.586 12l-4.293 4.293z" }, child: [] }] })(t);
|
|
138
|
+
}
|
|
139
|
+
function Z(t) {
|
|
140
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M19 7V4H9v3h2.868L9.012 17H5v3h10v-3h-2.868l2.856-10z" }, child: [] }] })(t);
|
|
141
|
+
}
|
|
142
|
+
function $(t) {
|
|
143
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M8.465 11.293c1.133-1.133 3.109-1.133 4.242 0l.707.707 1.414-1.414-.707-.707c-.943-.944-2.199-1.465-3.535-1.465s-2.592.521-3.535 1.465L4.929 12a5.008 5.008 0 0 0 0 7.071 4.983 4.983 0 0 0 3.535 1.462A4.982 4.982 0 0 0 12 19.071l.707-.707-1.414-1.414-.707.707a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l2.122-2.121z" }, child: [] }, { tag: "path", attr: { d: "m12 4.929-.707.707 1.414 1.414.707-.707a3.007 3.007 0 0 1 4.243 0 3.005 3.005 0 0 1 0 4.243l-2.122 2.121c-1.133 1.133-3.109 1.133-4.242 0L10.586 12l-1.414 1.414.707.707c.943.944 2.199 1.465 3.535 1.465s2.592-.521 3.535-1.465L19.071 12a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0z" }, child: [] }] })(t);
|
|
144
|
+
}
|
|
145
|
+
function tt(t) {
|
|
146
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M5.282 12.064c-.428.328-.72.609-.875.851-.155.24-.249.498-.279.768h2.679v-.748H5.413c.081-.081.152-.151.212-.201.062-.05.182-.142.361-.27.303-.218.511-.42.626-.604.116-.186.173-.375.173-.578a.898.898 0 0 0-.151-.512.892.892 0 0 0-.412-.341c-.174-.076-.419-.111-.733-.111-.3 0-.537.038-.706.114a.889.889 0 0 0-.396.338c-.094.143-.159.346-.194.604l.894.076c.025-.188.074-.317.147-.394a.375.375 0 0 1 .279-.108c.11 0 .2.035.272.108a.344.344 0 0 1 .108.258.55.55 0 0 1-.108.297c-.074.102-.241.254-.503.453zm.055 6.386a.398.398 0 0 1-.282-.105c-.074-.07-.128-.195-.162-.378L4 18.085c.059.204.142.372.251.506.109.133.248.235.417.306.168.069.399.103.692.103.3 0 .541-.047.725-.14a1 1 0 0 0 .424-.403c.098-.175.146-.354.146-.544a.823.823 0 0 0-.088-.393.708.708 0 0 0-.249-.261 1.015 1.015 0 0 0-.286-.11.943.943 0 0 0 .345-.299.673.673 0 0 0 .113-.383.747.747 0 0 0-.281-.596c-.187-.159-.49-.238-.909-.238-.365 0-.648.072-.847.219-.2.143-.334.353-.404.626l.844.151c.023-.162.067-.274.133-.338s.151-.098.257-.098a.33.33 0 0 1 .241.089c.059.06.087.139.087.238 0 .104-.038.193-.117.27s-.177.112-.293.112a.907.907 0 0 1-.116-.011l-.045.649a1.13 1.13 0 0 1 .289-.056c.132 0 .237.041.313.126.077.082.115.199.115.352 0 .146-.04.266-.119.354a.394.394 0 0 1-.301.134zm.948-10.083V5h-.739a1.47 1.47 0 0 1-.394.523c-.168.142-.404.262-.708.365v.754a2.595 2.595 0 0 0 .937-.48v2.206h.904zM9 6h11v2H9zm0 5h11v2H9zm0 5h11v2H9z" }, child: [] }] })(t);
|
|
147
|
+
}
|
|
148
|
+
function et(t) {
|
|
149
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 6h2v2H4zm0 5h2v2H4zm0 5h2v2H4zm16-8V6H8.023v2H18.8zM8 11h12v2H8zm0 5h12v2H8z" }, child: [] }] })(t);
|
|
150
|
+
}
|
|
151
|
+
function y(t) {
|
|
152
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22c5.421 0 10-4.579 10-10h-2c0 4.337-3.663 8-8 8s-8-3.663-8-8c0-4.336 3.663-8 8-8V2C6.579 2 2 6.58 2 12c0 5.421 4.579 10 10 10z" }, child: [] }] })(t);
|
|
153
|
+
}
|
|
154
|
+
function rt(t) {
|
|
155
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M20 11h-8c-4 0-4-1.816-4-2.5C8 7.882 8 6 12 6c2.8 0 2.99 1.678 3 2.014L16 8h1c0-1.384-1.045-4-5-4-5.416 0-6 3.147-6 4.5 0 .728.148 1.667.736 2.5H4v2h16v-2zm-8 7c-3.793 0-3.99-1.815-4-2H6c0 .04.069 4 6 4 5.221 0 6-2.819 6-4.5 0-.146-.009-.317-.028-.5h-2.006c.032.2.034.376.034.5 0 .684 0 2.5-4 2.5z" }, child: [] }] })(t);
|
|
156
|
+
}
|
|
157
|
+
function at(t) {
|
|
158
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M5 18h14v2H5zM6 4v6c0 3.309 2.691 6 6 6s6-2.691 6-6V4h-2v6c0 2.206-1.794 4-4 4s-4-1.794-4-4V4H6z" }, child: [] }] })(t);
|
|
159
|
+
}
|
|
160
|
+
function it(t) {
|
|
161
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M16.949 14.121 19.071 12a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0l-.707.707 1.414 1.414.707-.707a3.007 3.007 0 0 1 4.243 0 3.005 3.005 0 0 1 0 4.243l-2.122 2.121a2.723 2.723 0 0 1-.844.57L13.414 12l1.414-1.414-.707-.707a4.965 4.965 0 0 0-3.535-1.465c-.235 0-.464.032-.691.066L3.707 2.293 2.293 3.707l18 18 1.414-1.414-5.536-5.536c.277-.184.538-.396.778-.636zm-6.363 3.536a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l1.476-1.475-1.414-1.414L4.929 12a5.008 5.008 0 0 0 0 7.071 4.983 4.983 0 0 0 3.535 1.462A4.982 4.982 0 0 0 12 19.071l.707-.707-1.414-1.414-.707.707z" }, child: [] }] })(t);
|
|
162
|
+
}
|
|
163
|
+
const R = O(
|
|
164
|
+
"inline-flex items-center justify-center text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
165
|
+
{
|
|
166
|
+
variants: {
|
|
167
|
+
variant: {
|
|
168
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
169
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
170
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
171
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
172
|
+
secondaryOutline: "bg-transparent border-[1px] border-solid border-white hover:bg-white hover:border-input",
|
|
173
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
174
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
175
|
+
},
|
|
176
|
+
size: {
|
|
177
|
+
default: "h-10 px-4 py-2",
|
|
178
|
+
xs: "h-8 px-3 text-xs",
|
|
179
|
+
sm: "h-9 px-3",
|
|
180
|
+
lg: "h-11 px-8",
|
|
181
|
+
icon: "h-10 w-10",
|
|
182
|
+
"icon-small": "h-8 w-8"
|
|
183
|
+
},
|
|
184
|
+
rounded: {
|
|
185
|
+
small: "rounded",
|
|
186
|
+
default: "rounded-md",
|
|
187
|
+
large: "rounded-lg",
|
|
188
|
+
full: "rounded-full"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
defaultVariants: {
|
|
192
|
+
variant: "default",
|
|
193
|
+
size: "default",
|
|
194
|
+
rounded: "default"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
), T = m.forwardRef(
|
|
198
|
+
({
|
|
199
|
+
className: t,
|
|
200
|
+
variant: e,
|
|
201
|
+
size: r,
|
|
202
|
+
rounded: a,
|
|
203
|
+
asChild: n = !1,
|
|
204
|
+
isLoading: o = !1,
|
|
205
|
+
loadingText: h,
|
|
206
|
+
disabled: v,
|
|
207
|
+
...s
|
|
208
|
+
}, w) => {
|
|
209
|
+
const H = n ? B : "button";
|
|
210
|
+
return /* @__PURE__ */ c.jsx(
|
|
211
|
+
H,
|
|
212
|
+
{
|
|
213
|
+
className: u(R({ variant: e, size: r, rounded: a, className: t })),
|
|
214
|
+
ref: w,
|
|
215
|
+
disabled: v || o,
|
|
216
|
+
type: "button",
|
|
217
|
+
...s,
|
|
218
|
+
children: o ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
219
|
+
/* @__PURE__ */ c.jsx(
|
|
220
|
+
y,
|
|
221
|
+
{
|
|
222
|
+
className: j(
|
|
223
|
+
"h-4 w-4 animate-spin",
|
|
224
|
+
h ? "mr-2" : ""
|
|
225
|
+
)
|
|
226
|
+
}
|
|
227
|
+
),
|
|
228
|
+
h
|
|
229
|
+
] }) : s.children
|
|
230
|
+
}
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
);
|
|
234
|
+
T.displayName = "Button";
|
|
235
|
+
const nt = d.Root, _ = m.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ c.jsx(
|
|
236
|
+
d.List,
|
|
237
|
+
{
|
|
238
|
+
ref: r,
|
|
239
|
+
className: u(
|
|
240
|
+
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
241
|
+
t
|
|
242
|
+
),
|
|
243
|
+
...e
|
|
244
|
+
}
|
|
245
|
+
));
|
|
246
|
+
_.displayName = d.List.displayName;
|
|
247
|
+
const V = m.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ c.jsx(
|
|
248
|
+
d.Trigger,
|
|
249
|
+
{
|
|
250
|
+
ref: r,
|
|
251
|
+
className: u(
|
|
252
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
253
|
+
t
|
|
254
|
+
),
|
|
255
|
+
"data-levo-studio-interactive": "true",
|
|
256
|
+
...e
|
|
257
|
+
}
|
|
258
|
+
));
|
|
259
|
+
V.displayName = d.Trigger.displayName;
|
|
260
|
+
const A = m.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ c.jsx(
|
|
261
|
+
d.Content,
|
|
262
|
+
{
|
|
263
|
+
ref: r,
|
|
264
|
+
className: u(
|
|
265
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
266
|
+
t
|
|
267
|
+
),
|
|
268
|
+
...e
|
|
269
|
+
}
|
|
270
|
+
));
|
|
271
|
+
A.displayName = d.Content.displayName;
|
|
272
|
+
const ot = ({ className: t }) => /* @__PURE__ */ c.jsx(y, { className: u("h-8 w-8 animate-spin font-light", t) });
|
|
273
|
+
export {
|
|
274
|
+
T as B,
|
|
275
|
+
i as G,
|
|
276
|
+
ot as S,
|
|
277
|
+
nt as T,
|
|
278
|
+
_ as a,
|
|
279
|
+
R as b,
|
|
280
|
+
V as c,
|
|
281
|
+
A as d,
|
|
282
|
+
Q as e,
|
|
283
|
+
Z as f,
|
|
284
|
+
at as g,
|
|
285
|
+
rt as h,
|
|
286
|
+
et as i,
|
|
287
|
+
tt as j,
|
|
288
|
+
$ as k,
|
|
289
|
+
it as l,
|
|
290
|
+
F as m,
|
|
291
|
+
J as n,
|
|
292
|
+
K as o,
|
|
293
|
+
q as p,
|
|
294
|
+
y as q,
|
|
295
|
+
X as r,
|
|
296
|
+
Y as s
|
|
297
|
+
};
|