@epam/ai-dial-ui-kit 0.14.0-dev.27 → 0.14.0-dev.28
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/{JsonEditor-ClEQHs7z.js → JsonEditor-ChyHaWtP.js} +1 -1
- package/dist/{JsonEditor-t3imzi4J.cjs → JsonEditor-fNyfC5Xo.cjs} +1 -1
- package/dist/MarkdownEditor-By_nkBEl.cjs +1 -0
- package/dist/{MarkdownEditor-BL6z6He9.cjs → MarkdownEditor-DVYvT-TM.cjs} +1 -1
- package/dist/MarkdownEditor-V5mQ3NiV.js +71 -0
- package/dist/{MarkdownEditor-BJqAweWT.js → MarkdownEditor-Wnyf1Mpi.js} +1 -1
- package/dist/components-manifest.json +14 -2
- package/dist/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +1 -1
- package/dist/{index-C-lQltPA.cjs → index-C-kG32Zq.cjs} +1 -1
- package/dist/{index-DH0wvvGM.js → index-DMCwouOy.js} +2 -2
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +6 -0
- package/package.json +1 -1
- package/dist/MarkdownEditor-BM5HAsVr.cjs +0 -1
- package/dist/MarkdownEditor-DQnwQXiv.js +0 -69
|
@@ -62703,7 +62703,7 @@ const el = ({
|
|
|
62703
62703
|
() => JSON.stringify(e, null, 2)
|
|
62704
62704
|
);
|
|
62705
62705
|
ye(() => {
|
|
62706
|
-
typeof window < "u" && import("./JsonEditor-
|
|
62706
|
+
typeof window < "u" && import("./JsonEditor-ChyHaWtP.js").then((d) => {
|
|
62707
62707
|
r(() => d.DialJsonEditor);
|
|
62708
62708
|
});
|
|
62709
62709
|
}, []);
|
|
@@ -67571,7 +67571,7 @@ const TU = "dial-kit-grid-selection", IU = 150, kU = 100, nq = ({
|
|
|
67571
67571
|
hideTooltip: o
|
|
67572
67572
|
}
|
|
67573
67573
|
);
|
|
67574
|
-
}, oq = () => import("./JsonEditor-
|
|
67574
|
+
}, oq = () => import("./JsonEditor-ChyHaWtP.js"), rq = () => import("./MarkdownEditor-Wnyf1Mpi.js"), aq = () => import("./MarkdownEditor-V5mQ3NiV.js");
|
|
67575
67575
|
export {
|
|
67576
67576
|
XU as $,
|
|
67577
67577
|
_$ as A,
|
|
@@ -10,6 +10,10 @@ export interface MarkdownEditorProps {
|
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
/** Initial edit/live/preview mode; the toolbar lets the user switch it afterwards. */
|
|
12
12
|
defaultPreview?: PreviewType;
|
|
13
|
+
/** `id` of the underlying textarea, so a visible `<label htmlFor>` can name it. */
|
|
14
|
+
id?: string;
|
|
15
|
+
/** Accessible name for the underlying textarea. Use it only where no visible label exists to pair with `id`. */
|
|
16
|
+
ariaLabel?: string;
|
|
13
17
|
}
|
|
14
18
|
/**
|
|
15
19
|
* The 2.0 Markdown editor: a formatting toolbar (bold/italic/strikethrough,
|
|
@@ -29,5 +33,7 @@ export interface MarkdownEditorProps {
|
|
|
29
33
|
* @param [className] - Additional CSS classes for the container
|
|
30
34
|
* @param [placeholder] - Placeholder text shown when the editor is empty
|
|
31
35
|
* @param [defaultPreview='edit'] - Initial edit/live/preview mode
|
|
36
|
+
* @param [id] - `id` of the underlying textarea, for a visible `<label htmlFor>`
|
|
37
|
+
* @param [ariaLabel] - Accessible name for the underlying textarea
|
|
32
38
|
*/
|
|
33
39
|
export declare const MarkdownEditor: FC<MarkdownEditorProps>;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-C-lQltPA.cjs"),x=require("react"),e=require("@uiw/react-md-editor"),o=require("@tabler/icons-react"),I=t.DIAL_ICON_SIZE.SM,s={size:I,stroke:t.DIAL_KIT_ICON_STROKE},n=(i,r)=>({...i,icon:r}),R=()=>[n(e.bold,t.jsxRuntimeExports.jsx(o.IconBold,{...s})),n(e.italic,t.jsxRuntimeExports.jsx(o.IconItalic,{...s})),n(e.strikethrough,t.jsxRuntimeExports.jsx(o.IconStrikethrough,{...s})),e.divider,e.group([e.heading1,e.heading2,e.heading3],{name:"heading",groupName:"heading",icon:t.jsxRuntimeExports.jsx(o.IconTextSize,{...s}),buttonProps:{"aria-label":"Text style",title:"Text style"}}),e.divider,n(e.unorderedListCommand,t.jsxRuntimeExports.jsx(o.IconList,{...s})),n(e.orderedListCommand,t.jsxRuntimeExports.jsx(o.IconListNumbers,{...s})),e.divider,n(e.quote,t.jsxRuntimeExports.jsx(o.IconQuote,{...s})),n(e.link,t.jsxRuntimeExports.jsx(o.IconLink,{...s})),n(e.code,t.jsxRuntimeExports.jsx(o.IconCode,{...s})),e.divider,n(e.table,t.jsxRuntimeExports.jsx(o.IconTable,{...s}))],p=()=>[n(e.codeEdit,t.jsxRuntimeExports.jsx(o.IconPencil,{...s})),n(e.codeLive,t.jsxRuntimeExports.jsx(o.IconLayoutColumns,{...s})),n(e.codePreview,t.jsxRuntimeExports.jsx(o.IconEye,{...s})),e.divider,n(e.fullscreen,t.jsxRuntimeExports.jsx(o.IconMaximize,{...s}))],g=({value:i,onChange:r,height:d=300,theme:c=t.EditorThemes.light,className:a,placeholder:m,defaultPreview:u="edit"})=>{const j=x.useMemo(()=>R(),[]),E=x.useMemo(()=>p(),[]);return t.jsxRuntimeExports.jsx("div",{"data-color-mode":c,className:t.mergeClasses("dial-kit-markdown-editor",a),children:t.jsxRuntimeExports.jsx(e,{value:i,onChange:l=>r?.(l||""),height:d,preview:u,commands:j,extraCommands:E,textareaProps:{placeholder:m}})})};exports.MarkdownEditor=g;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { j as o, D as g, a as u, E as h, m as C } from "./index-DH0wvvGM.js";
|
|
2
|
-
import { useMemo as r } from "react";
|
|
3
|
-
import p, { divider as s, group as E, heading1 as L, heading2 as O, heading3 as k, bold as _, italic as T, strikethrough as M, unorderedListCommand as N, orderedListCommand as w, quote as S, link as b, code as P, table as R, codeEdit as f, codeLive as v, codePreview as A, fullscreen as D } from "@uiw/react-md-editor";
|
|
4
|
-
import { IconTextSize as y, IconBold as z, IconItalic as B, IconStrikethrough as K, IconList as Z, IconListNumbers as q, IconQuote as F, IconLink as Q, IconCode as W, IconTable as G, IconPencil as H, IconLayoutColumns as J, IconEye as U, IconMaximize as V } from "@tabler/icons-react";
|
|
5
|
-
const X = u.SM, e = {
|
|
6
|
-
size: X,
|
|
7
|
-
stroke: g
|
|
8
|
-
}, t = (n, i) => ({
|
|
9
|
-
...n,
|
|
10
|
-
icon: i
|
|
11
|
-
}), Y = () => [
|
|
12
|
-
t(_, /* @__PURE__ */ o.jsx(z, { ...e })),
|
|
13
|
-
t(T, /* @__PURE__ */ o.jsx(B, { ...e })),
|
|
14
|
-
t(M, /* @__PURE__ */ o.jsx(K, { ...e })),
|
|
15
|
-
s,
|
|
16
|
-
E([L, O, k], {
|
|
17
|
-
name: "heading",
|
|
18
|
-
groupName: "heading",
|
|
19
|
-
icon: /* @__PURE__ */ o.jsx(y, { ...e }),
|
|
20
|
-
buttonProps: { "aria-label": "Text style", title: "Text style" }
|
|
21
|
-
}),
|
|
22
|
-
s,
|
|
23
|
-
t(N, /* @__PURE__ */ o.jsx(Z, { ...e })),
|
|
24
|
-
t(w, /* @__PURE__ */ o.jsx(q, { ...e })),
|
|
25
|
-
s,
|
|
26
|
-
t(S, /* @__PURE__ */ o.jsx(F, { ...e })),
|
|
27
|
-
t(b, /* @__PURE__ */ o.jsx(Q, { ...e })),
|
|
28
|
-
t(P, /* @__PURE__ */ o.jsx(W, { ...e })),
|
|
29
|
-
s,
|
|
30
|
-
t(R, /* @__PURE__ */ o.jsx(G, { ...e }))
|
|
31
|
-
], $ = () => [
|
|
32
|
-
t(f, /* @__PURE__ */ o.jsx(H, { ...e })),
|
|
33
|
-
t(v, /* @__PURE__ */ o.jsx(J, { ...e })),
|
|
34
|
-
t(A, /* @__PURE__ */ o.jsx(U, { ...e })),
|
|
35
|
-
s,
|
|
36
|
-
t(D, /* @__PURE__ */ o.jsx(V, { ...e }))
|
|
37
|
-
], no = ({
|
|
38
|
-
value: n,
|
|
39
|
-
onChange: i,
|
|
40
|
-
height: a = 300,
|
|
41
|
-
theme: d = h.light,
|
|
42
|
-
className: c,
|
|
43
|
-
placeholder: m,
|
|
44
|
-
defaultPreview: x = "edit"
|
|
45
|
-
}) => {
|
|
46
|
-
const I = r(() => Y(), []), l = r(() => $(), []);
|
|
47
|
-
return /* @__PURE__ */ o.jsx(
|
|
48
|
-
"div",
|
|
49
|
-
{
|
|
50
|
-
"data-color-mode": d,
|
|
51
|
-
className: C("dial-kit-markdown-editor", c),
|
|
52
|
-
children: /* @__PURE__ */ o.jsx(
|
|
53
|
-
p,
|
|
54
|
-
{
|
|
55
|
-
value: n,
|
|
56
|
-
onChange: (j) => i?.(j || ""),
|
|
57
|
-
height: a,
|
|
58
|
-
preview: x,
|
|
59
|
-
commands: I,
|
|
60
|
-
extraCommands: l,
|
|
61
|
-
textareaProps: { placeholder: m }
|
|
62
|
-
}
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
};
|
|
67
|
-
export {
|
|
68
|
-
no as MarkdownEditor
|
|
69
|
-
};
|