@epam/ai-dial-ui-kit 0.13.0-dev.57 → 0.13.0-dev.60
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/README.md +5 -0
- package/dist/CHANGELOG.md +10 -0
- package/dist/{JsonEditor-BCvdqbcv.js → JsonEditor-B5vfpxzh.js} +1 -1
- package/dist/{JsonEditor-Yy3JFyR4.cjs → JsonEditor-CjemqUZ2.cjs} +1 -1
- package/dist/{MarkdownEditor-BUC6u9en.cjs → MarkdownEditor-BrUvRwsB.cjs} +1 -1
- package/dist/{MarkdownEditor-_RQIObYV.js → MarkdownEditor-DKG9YlGS.js} +1 -1
- package/dist/{MarkdownEditor-L5wQ88mr.js → MarkdownEditor-DWcVxbdX.js} +15 -15
- package/dist/{MarkdownEditor-DdvzJy9k.cjs → MarkdownEditor-xg-rmepY.cjs} +1 -1
- package/dist/components-manifest.json +562 -164
- package/dist/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +106 -101
- package/dist/{index-DcwG5QhT.js → index-B4fgly61.js} +16215 -15620
- package/dist/{index-ARMvZo4h.cjs → index-CY5qji3j.cjs} +34 -34
- package/dist/index.css +2 -2
- package/dist/migration-guides/0.13.0/field-label-props-unification.md +94 -0
- package/dist/migration-guides/0.13.0/progress-bar-2-0-rewrite.md +103 -0
- package/dist/migration-guides/README.md +2 -0
- package/dist/src/components/Accordion/Accordion.d.ts +1 -0
- package/dist/src/components/Analytics/Bar/Bar.d.ts +1 -0
- package/dist/src/components/Analytics/BarGroup/BarGroup.d.ts +1 -0
- package/dist/src/components/Analytics/Card/Card.d.ts +1 -0
- package/dist/src/components/Analytics/ErrorTag/ErrorTag.d.ts +1 -0
- package/dist/src/components/Analytics/Histogram/Histogram.d.ts +1 -0
- package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +1 -0
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +1 -0
- package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +3 -0
- package/dist/src/components/Button/Button.d.ts +1 -0
- package/dist/src/components/Button/ButtonWrappers.d.ts +1 -0
- package/dist/src/components/ButtonDropdown/ButtonDropdown.d.ts +1 -0
- package/dist/src/components/CaptionText/CaptionText.d.ts +1 -0
- package/dist/src/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/src/components/CloseButton/CloseButton.d.ts +1 -0
- package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +1 -0
- package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +1 -0
- package/dist/src/components/DraggableItem/DraggableItem.d.ts +1 -0
- package/dist/src/components/DropdownIcon/DropdownIcon.d.ts +1 -0
- package/dist/src/components/EllipsisTooltip/EllipsisTooltip.d.ts +1 -0
- package/dist/src/components/FabButton/FabButton.d.ts +1 -0
- package/dist/src/components/FileIcon/FileIcon.d.ts +1 -0
- package/dist/src/components/FileManager/FileManager.d.ts +1 -0
- package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +1 -0
- package/dist/src/components/FileManager/components/FoldersTree/FoldersTree.d.ts +1 -0
- package/dist/src/components/FileName/FileName.d.ts +1 -0
- package/dist/src/components/FolderName/FolderName.d.ts +1 -0
- package/dist/src/components/FormItem/FormItem.d.ts +1 -0
- package/dist/src/components/FormPopup/FormPopup.d.ts +1 -0
- package/dist/src/components/Grid/Grid.d.ts +1 -0
- package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +1 -0
- package/dist/src/components/Icon/Icon.d.ts +1 -0
- package/dist/src/components/IconButton/IconButton.d.ts +1 -0
- package/dist/src/components/IconButton/IconButtonWrappers.d.ts +1 -0
- package/dist/src/components/Input/Input.d.ts +1 -0
- package/dist/src/components/InputPopup/InputPopup.d.ts +1 -0
- package/dist/src/components/JsonEditor/JsonEditor.d.ts +1 -0
- package/dist/src/components/Label/Label.d.ts +1 -0
- package/dist/src/components/LabelledText/LabelledText.d.ts +1 -0
- package/dist/src/components/LoadFileArea/LoadFileArea.d.ts +1 -0
- package/dist/src/components/LoadFileArea/LoadFileAreaField.d.ts +1 -0
- package/dist/src/components/Loader/Loader.d.ts +1 -0
- package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +1 -0
- package/dist/src/components/New/Accordion/Accordion.d.ts +1 -0
- package/dist/src/components/New/Button/Button.d.ts +1 -0
- package/dist/src/components/New/Button/ButtonWrappers.d.ts +1 -0
- package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +1 -0
- package/dist/src/components/New/Calendar/Calendar.d.ts +5 -2
- package/dist/src/components/New/CaptionText/CaptionText.d.ts +1 -0
- package/dist/src/components/New/CardShell/CardShell.d.ts +1 -0
- package/dist/src/components/New/CloseButton/CloseButton.d.ts +1 -0
- package/dist/src/components/New/ConfirmationPopup/ConfirmationPopup.d.ts +1 -0
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +1 -0
- package/dist/src/components/New/FileDropzone/FileDropzone.d.ts +81 -0
- package/dist/src/components/New/FolderPath/FolderPath.d.ts +1 -0
- package/dist/src/components/New/Highlight/Highlight.d.ts +4 -1
- package/dist/src/components/New/IconButton/IconButton.d.ts +1 -0
- package/dist/src/components/New/IconButton/IconButtonWrappers.d.ts +1 -0
- package/dist/src/components/New/InfoButton/InfoButton.d.ts +1 -0
- package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +1 -0
- package/dist/src/components/New/Input/Input.d.ts +7 -0
- package/dist/src/components/New/Label/Label.d.ts +1 -0
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +1 -0
- package/dist/src/components/New/MarkdownEditor/constants.d.ts +6 -1
- package/dist/src/components/New/Notification/Notification.d.ts +1 -0
- package/dist/src/components/New/NumberInput/NumberInput.d.ts +1 -0
- package/dist/src/components/New/PasswordInput/PasswordInput.d.ts +1 -0
- package/dist/src/components/New/Popup/Popup.d.ts +2 -1
- package/dist/src/components/New/Select/MultiSelectTags.d.ts +1 -0
- package/dist/src/components/New/Select/Select.d.ts +1 -0
- package/dist/src/components/New/Switch/Switch.d.ts +38 -0
- package/dist/src/components/New/Tabs/Tabs.d.ts +59 -0
- package/dist/src/components/New/Tag/Tag.d.ts +45 -0
- package/dist/src/components/New/TagInput/TagInput.d.ts +72 -0
- package/dist/src/components/New/TagInput/utils.d.ts +21 -0
- package/dist/src/components/New/TagInput/utils.spec.d.ts +1 -0
- package/dist/src/components/New/Textarea/Textarea.d.ts +1 -0
- package/dist/src/components/NoDataContent/NoDataContent.d.ts +1 -0
- package/dist/src/components/Notification/Notification.d.ts +1 -0
- package/dist/src/components/NumberInput/NumberInput.d.ts +1 -0
- package/dist/src/components/Pagination/Pagination.d.ts +3 -0
- package/dist/src/components/PasswordInput/PasswordInput.d.ts +1 -0
- package/dist/src/components/Popup/Popup.d.ts +2 -1
- package/dist/src/components/ProgressBar/ProgressBar.d.ts +51 -10
- package/dist/src/components/RadioButton/RadioButton.d.ts +1 -0
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +1 -0
- package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +1 -0
- package/dist/src/components/RemoveButton/RemoveButton.d.ts +1 -0
- package/dist/src/components/ResizableContainer/ConditionalResizableContainer.d.ts +1 -0
- package/dist/src/components/ResizableContainer/ResizableContainer.d.ts +1 -0
- package/dist/src/components/SchemaRenderer/SchemaRenderer.d.ts +1 -0
- package/dist/src/components/Search/Search.d.ts +1 -0
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +1 -0
- package/dist/src/components/Select/Select.d.ts +1 -0
- package/dist/src/components/SelectField/SelectField.d.ts +1 -0
- package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +1 -0
- package/dist/src/components/Skeleton/Skeleton.d.ts +1 -0
- package/dist/src/components/Slider/Slider.d.ts +1 -0
- package/dist/src/components/Spinner/Spinner.d.ts +3 -0
- package/dist/src/components/Steps/Steps.d.ts +1 -0
- package/dist/src/components/Switch/Switch.d.ts +1 -0
- package/dist/src/components/Tabs/Tabs.d.ts +1 -0
- package/dist/src/components/Tag/Tag.d.ts +1 -0
- package/dist/src/components/TagInput/TagInput.d.ts +1 -0
- package/dist/src/components/Textarea/Textarea.d.ts +1 -0
- package/dist/src/components/Tooltip/Tooltip.d.ts +1 -0
- package/dist/src/components/Tooltip/TooltipContainer.d.ts +1 -0
- package/dist/src/components/Tooltip/TooltipContent.d.ts +1 -0
- package/dist/src/components/Tooltip/TooltipTrigger.d.ts +1 -0
- package/dist/src/index.d.ts +13 -2
- package/dist/src/utils/__tests__/file-accept.spec.d.ts +1 -0
- package/dist/src/utils/file-accept.d.ts +16 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -194,6 +194,10 @@ pseudo-element. The visible control is unchanged, so layouts keep their existing
|
|
|
194
194
|
metrics. WCAG 2.5.5 measures the region that accepts a pointer action, not the
|
|
195
195
|
visible decoration.
|
|
196
196
|
|
|
197
|
+
A control too small for a 44px target to clear its neighbours uses
|
|
198
|
+
`dial-kit-minimum-target` instead, which applies the same pseudo-element at the
|
|
199
|
+
Level AA minimum of 24×24 (WCAG 2.5.8).
|
|
200
|
+
|
|
197
201
|
These controls are **documented exceptions** and meet Level AA (2.5.8, 24×24) but
|
|
198
202
|
not AAA:
|
|
199
203
|
|
|
@@ -204,6 +208,7 @@ not AAA:
|
|
|
204
208
|
| `DialCloseButton` | icon-sized | Renders `h-auto w-auto`, so its target follows the caller's icon size |
|
|
205
209
|
| `DialInfoButton`, `InfoButton` | 24×24 | Fixed small affordance, same overlap constraint as small variants |
|
|
206
210
|
| Standard 2.0 fields (`Input`, `Select`) | 40px tall | The pointer target spans the full field width but stays 4px short of 44 vertically; the height is a shared form design token, not a per-control choice |
|
|
211
|
+
| `Tag` remove button | 16×16 rendered | Reaches 24×24 through `dial-kit-minimum-target`; a 44px target would overhang 14px per side and swallow the neighbouring tags of a `TagInput` row |
|
|
207
212
|
|
|
208
213
|
Give small-variant controls at least 20px of surrounding space if you need to reach
|
|
209
214
|
AAA in a specific layout, or use the standard size instead.
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -21,9 +21,14 @@ Versions match the git tags on the `development` branch.
|
|
|
21
21
|
See [migration guide](migration-guides/0.13.0/caption-semi-text-lead-rename.md).
|
|
22
22
|
- **`Notification` (2.0) — live-region role now follows the variant** — the container was hardcoded to `role="alert"` for every variant. `role="alert"` is implicitly `aria-live="assertive"` and interrupts the screen reader, which is wrong for routine feedback and for section messages that are static page content. `error` and `warning` keep `role="alert"`; `info`, `success`, and `loading` now use the polite `role="status"`. Pass an explicit `role` to override.
|
|
23
23
|
Consumers asserting `getByRole('alert')` on a non-error notification must query `status` instead.
|
|
24
|
+
- **`Calendar`, `Switch`, `ProgressBar` — `label` → `labelProps`** — the three components rendered their own label from a bare `label` prop, so `required`, `caption` and `size` were unreachable while every other 2.0 field (`Input`, `Textarea`, `Select`, `TagInput`, …) took them through a `labelProps` object. All three now take `labelProps: LabelProps` and render the shared `Label`. In `Switch` the track and the label text become two sibling `<label for>` elements rather than one wrapper — a `caption` info button nested in a label forwards its clicks to the labelled control — which moves `className` onto the row and the focus ring onto the track.
|
|
25
|
+
See [migration guide](migration-guides/0.13.0/field-label-props-unification.md).
|
|
26
|
+
- **`DialProgressBar` → `ProgressBar`** — the progress bar was built on 1.0 tokens slated for removal (`bg-layer-4`, `bg-controls-accent-primary`), so it could not appear in a 2.0 screen without pulling the legacy palette along. It is rebuilt on the 2.0 set and adopts the 2.0 conventions: the `Dial*` prefix is dropped, the bespoke `DialProgressBarSize` gives way to the shared `ElementSize` (`Medium` → `Standard`), and `ariaLabel` becomes the native `aria-label`. A new optional `labelProps` renders a `Label` above the bar and names it, replacing the generic `"Progress"` default that every bar shared, and `valueLabel` puts a readout (`"3.31 / 500"`) at the end of that row.
|
|
27
|
+
See [migration guide](migration-guides/0.13.0/progress-bar-2-0-rewrite.md).
|
|
24
28
|
|
|
25
29
|
### Fixed
|
|
26
30
|
|
|
31
|
+
- **`DialPopup` and `Popup` (2.0) — Enter closed the dialog the moment it opened** — the focus manager's default focuses the first tabbable descendant, and in a dialog whose header is a heading plus a close button, that is the close button. Every modal form therefore opened with the × focused, so the first Enter dismissed it instead of submitting ([ai-dial-chat#2579](https://github.com/epam/ai-dial-chat/issues/2579)). Initial focus now goes to the dialog container, which the focus manager marks `tabindex="-1"`: it is not a tab stop, screen readers announce the dialog on open, and Tab still moves to the first real control. `preventKeyboardOnOpen` is unchanged but no longer needed for this — the new default cannot raise the virtual keyboard either.
|
|
27
32
|
- **Focus rings were invisible on hosts still themed with the pre-0.13 token names** — the `focus-black` border token dropped straight to its light default (`#161B2D`) when `--stroke-focus-black` was undefined. Hosts themed by the DIAL themes service still ship the old `--stroke-focus`, so every focus ring built on the token — inputs, buttons, icon buttons, dropdowns, accordion, calendar, slider — was painted `#161B2D`, which is the dark theme's own `--bg-layer-2`: a border drawn in the background colour. The token now falls back through `--stroke-focus` before reaching the light default, so those hosts get their real focus colour again. Light themes and hosts with no theme at all are unchanged.
|
|
28
33
|
- **`DialGrid` — the legacy-token fallback inverted the raised/sunken relationship** — when a host defines the legacy DIAL layers but not `--bg-layer-raised`, the row surface fell back to `--bg-layer-0`, the _deepest_ layer in that palette (`#000000` in the DIAL dark theme), while odd rows fell back to the lighter `--bg-layer-2`. A grid whose base surface sits below its own sunken rows reads as inside-out, and pure black matches no other surface in the theme. The fallback is now `--bg-layer-3`, the elevated layer, which is what consumers already use for their own grid surfaces. The light default when no theme is present is unchanged (`#FCFCFC`).
|
|
29
34
|
- **`Notification` (2.0)** — the variant icon is hidden from assistive tech. The `loading` spinner carries its own `role="status"`, so it previously formed a live region nested inside the notification's, announcing the content twice.
|
|
@@ -38,6 +43,11 @@ Versions match the git tags on the `development` branch.
|
|
|
38
43
|
|
|
39
44
|
### Added
|
|
40
45
|
|
|
46
|
+
- **`Tag` (2.0)** — the generation 2.0 counterpart of `DialTag`: a compact label for selections, filters, and categories, with `standard` (24px) and `small` (20px) sizes, an optional icon, a `selected` state, and a removable variant. A tag given `onClick` is a keyboard-operable `role="button"`; its remove control is named `Remove <label>` and stops the click from also activating the tag. Built on 2.0 tokens and `IconButton`, so it pulls none of the 1.0 styling `DialTag` still carries.
|
|
47
|
+
- **`TagInput` (2.0)** — the generation 2.0 counterpart of `DialTagInput`, built on the 2.0 `Input`, so it shares its sizes, label, caption, error and disabled states. Works controlled (`value`) or uncontrolled (`defaultValue`), commits on Enter or comma, removes the last tag on Backspace in an empty input, and renders the tags as a named list of `Tag`s rather than as unlabelled markup. `collapseTagOverflow` keeps the row on one line behind a `+N` chip that names the tags it hides.
|
|
48
|
+
- **`FileDropzone` (2.0) — `labelProps`** — a `Label` above the drop area naming the field it fills, with the `required` marker and `caption` info button the other 2.0 fields already had. The existing `label` stays the copy inside the area: it says how to use the control, not what it is for. Both point at the same input, so its accessible name reads as the field name followed by that copy.
|
|
49
|
+
- **`Input` (2.0) — `wrapperRef`** — exposes the bordered field wrapper, so a caller rendering into the `children` slot can measure the space its content has to fit into. The input itself only ever reports its own share of the row.
|
|
50
|
+
- **`dial-kit-minimum-target`** — the `dial-kit-enhanced-target` mechanism at WCAG 2.5.8's Level AA minimum of 24×24, for controls where the 44px AAA target would overhang far enough to swallow their neighbours. Used by the `Tag` remove button; the rendered size is untouched.
|
|
41
51
|
- **Typography — `dial-display3-text` and `dial-tiny-lead-semi-text`** — the two steps the design scale defined but the kit never shipped: Display 3 (22px/32px semibold) and Tiny Text Lead (Semi Bold) (12px/16px semibold, `+0.03em`, uppercase). The `dial-*-text` scale now covers every row of the design table.
|
|
42
52
|
- **Typography — `dial-code-text` names a monospace face** — it previously inherited the body font despite being the Code style. It resolves through `var(--theme-font-mono, var(--font-fira-code, 'Fira Code'))` before the system monospace stack, mirroring the existing `--theme-font` / `--font-inter` hook. The kit ships no font file; hosts that want Fira Code load it themselves.
|
|
43
53
|
- **Enhanced pointer targets** — standard-size buttons expose a 44×44 pointer target (WCAG 2.5.5, Level AAA) via the `dial-kit-enhanced-target` utility, with no change to their rendered size. See the [Accessibility section of the README](README.md#-accessibility) for the documented exceptions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CY5qji3j.cjs"),l=require("@monaco-editor/react"),u={[r.EditorThemes.dark]:{base:"vs-dark",inherit:!1,rules:[{token:"string.key.json",foreground:"#37BABC"},{token:"string.value.json",foreground:"#5C8DEA"},{token:"number",foreground:"#D97C27"},{token:"keyword.json",foreground:"#F4CE46"},{token:"delimiter",foreground:"#EEF1F7"},{token:"delimiter.bracket.json",foreground:"#A972FF"},{token:"delimiter.parenthesis",foreground:"#A972FF"}],colors:{"editor.foreground":"#F76464","editor.background":"#161B2D","editorCursor.foreground":"#EEF1F7","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}},[r.EditorThemes.light]:{base:"vs",inherit:!1,rules:[{token:"string.key.json",foreground:"#009D9F"},{token:"string.value.json",foreground:"#2764D9"},{token:"number",foreground:"#B25500"},{token:"keyword.json",foreground:"#3F3D25"},{token:"delimiter",foreground:"#161B2D"},{token:"delimiter.bracket.json",foreground:"#7E39EC"},{token:"delimiter.parenthesis",foreground:"#7E39EC"}],colors:{"editor.foreground":"#AE2F2F","editor.background":"#EEF1F7","editorCursor.foreground":"#161B2D","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}}},c=({value:n,onChange:t,onValidateJSON:i,options:s,currentTheme:e,themesConfig:d=u})=>{function a(o){o?.editor?.defineTheme(e,d[e]),o.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,schemas:[{uri:"http://custom-schema/object-required.json",fileMatch:["*"],schema:{type:"object",description:"Top-level value must be an object",additionalProperties:!0}}]})}return r.jsxRuntimeExports.jsx(l.Editor,{beforeMount:a,height:"100%",defaultLanguage:"json",value:n,onChange:t,theme:e,onValidate:i,options:{minimap:{enabled:!1},formatOnType:!0,formatOnPaste:!0,selectOnLineNumbers:!1,automaticLayout:!0,scrollBeyondLastLine:!1,wordWrap:"on",smoothScrolling:!0,overviewRulerLanes:0,scrollbar:{horizontal:"hidden",verticalScrollbarSize:4,verticalSliderSize:4},...s??{}}})};exports.DialJsonEditor=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CY5qji3j.cjs"),c=require("@uiw/react-md-editor"),x=({value:t,onChange:s,height:r=300,preview:i="edit",theme:n=e.EditorThemes.dark,className:a,placeholder:o})=>{const d=o!==void 0&&!t;return e.jsxRuntimeExports.jsxs("div",{"data-color-mode":n,className:e.mergeClasses("relative",a),children:[e.jsxRuntimeExports.jsx(c,{value:t,onChange:l=>s?.(l||""),height:r,preview:i}),d&&e.jsxRuntimeExports.jsx("div",{className:"pointer-events-none absolute left-0 top-8 px-2 dial-small-text text-secondary opacity-40",children:o})]})};exports.DialMarkdownEditor=x;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as e, D as
|
|
1
|
+
import { j as e, D as z, E as g, m as u } from "./index-B4fgly61.js";
|
|
2
2
|
import { useMemo as r } from "react";
|
|
3
|
-
import h, { divider as i, group as
|
|
4
|
-
import { IconTextSize as
|
|
5
|
-
const o =
|
|
3
|
+
import h, { divider as i, group as p, heading1 as C, heading2 as E, heading3 as k, bold as L, italic as M, strikethrough as w, unorderedListCommand as b, orderedListCommand as N, quote as T, link as f, code as v, table as O, codeEdit as S, codeLive as _, codePreview as y, fullscreen as D } from "@uiw/react-md-editor";
|
|
4
|
+
import { IconTextSize as P, IconBold as A, IconItalic as R, IconStrikethrough as B, IconList as Z, IconListNumbers as q, IconQuote as F, IconLink as K, IconCode as Q, IconTable as W, IconPencil as G, IconLayoutColumns as H, IconEye as J, IconMaximize as U } from "@tabler/icons-react";
|
|
5
|
+
const o = z.SM, s = (t, n) => ({
|
|
6
6
|
...t,
|
|
7
7
|
icon: n
|
|
8
8
|
}), V = () => [
|
|
@@ -13,38 +13,38 @@ const o = u.MD, s = (t, n) => ({
|
|
|
13
13
|
/* @__PURE__ */ e.jsx(B, { size: o })
|
|
14
14
|
),
|
|
15
15
|
i,
|
|
16
|
-
|
|
16
|
+
p([C, E, k], {
|
|
17
17
|
name: "heading",
|
|
18
18
|
groupName: "heading",
|
|
19
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
19
|
+
icon: /* @__PURE__ */ e.jsx(P, { size: o }),
|
|
20
20
|
buttonProps: { "aria-label": "Text style", title: "Text style" }
|
|
21
21
|
}),
|
|
22
22
|
i,
|
|
23
23
|
s(
|
|
24
|
-
|
|
24
|
+
b,
|
|
25
25
|
/* @__PURE__ */ e.jsx(Z, { size: o })
|
|
26
26
|
),
|
|
27
27
|
s(
|
|
28
|
-
|
|
28
|
+
N,
|
|
29
29
|
/* @__PURE__ */ e.jsx(q, { size: o })
|
|
30
30
|
),
|
|
31
31
|
i,
|
|
32
|
-
s(
|
|
33
|
-
s(
|
|
34
|
-
s(
|
|
32
|
+
s(T, /* @__PURE__ */ e.jsx(F, { size: o })),
|
|
33
|
+
s(f, /* @__PURE__ */ e.jsx(K, { size: o })),
|
|
34
|
+
s(v, /* @__PURE__ */ e.jsx(Q, { size: o })),
|
|
35
35
|
i,
|
|
36
36
|
s(O, /* @__PURE__ */ e.jsx(W, { size: o }))
|
|
37
37
|
], X = () => [
|
|
38
|
-
s(
|
|
38
|
+
s(S, /* @__PURE__ */ e.jsx(G, { size: o })),
|
|
39
39
|
s(_, /* @__PURE__ */ e.jsx(H, { size: o })),
|
|
40
40
|
s(y, /* @__PURE__ */ e.jsx(J, { size: o })),
|
|
41
41
|
i,
|
|
42
|
-
s(
|
|
42
|
+
s(D, /* @__PURE__ */ e.jsx(U, { size: o }))
|
|
43
43
|
], se = ({
|
|
44
44
|
value: t,
|
|
45
45
|
onChange: n,
|
|
46
46
|
height: a = 300,
|
|
47
|
-
theme: d =
|
|
47
|
+
theme: d = g.light,
|
|
48
48
|
className: c,
|
|
49
49
|
placeholder: m,
|
|
50
50
|
defaultPreview: x = "edit"
|
|
@@ -54,7 +54,7 @@ const o = u.MD, s = (t, n) => ({
|
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
56
|
"data-color-mode": d,
|
|
57
|
-
className:
|
|
57
|
+
className: u("dial-kit-markdown-editor", c),
|
|
58
58
|
children: /* @__PURE__ */ e.jsx(
|
|
59
59
|
h,
|
|
60
60
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CY5qji3j.cjs"),x=require("react"),e=require("@uiw/react-md-editor"),t=require("@tabler/icons-react"),o=s.DIAL_ICON_SIZE.SM,i=(n,r)=>({...n,icon:r}),p=()=>[i(e.bold,s.jsxRuntimeExports.jsx(t.IconBold,{size:o})),i(e.italic,s.jsxRuntimeExports.jsx(t.IconItalic,{size:o})),i(e.strikethrough,s.jsxRuntimeExports.jsx(t.IconStrikethrough,{size:o})),e.divider,e.group([e.heading1,e.heading2,e.heading3],{name:"heading",groupName:"heading",icon:s.jsxRuntimeExports.jsx(t.IconTextSize,{size:o}),buttonProps:{"aria-label":"Text style",title:"Text style"}}),e.divider,i(e.unorderedListCommand,s.jsxRuntimeExports.jsx(t.IconList,{size:o})),i(e.orderedListCommand,s.jsxRuntimeExports.jsx(t.IconListNumbers,{size:o})),e.divider,i(e.quote,s.jsxRuntimeExports.jsx(t.IconQuote,{size:o})),i(e.link,s.jsxRuntimeExports.jsx(t.IconLink,{size:o})),i(e.code,s.jsxRuntimeExports.jsx(t.IconCode,{size:o})),e.divider,i(e.table,s.jsxRuntimeExports.jsx(t.IconTable,{size:o}))],I=()=>[i(e.codeEdit,s.jsxRuntimeExports.jsx(t.IconPencil,{size:o})),i(e.codeLive,s.jsxRuntimeExports.jsx(t.IconLayoutColumns,{size:o})),i(e.codePreview,s.jsxRuntimeExports.jsx(t.IconEye,{size:o})),e.divider,i(e.fullscreen,s.jsxRuntimeExports.jsx(t.IconMaximize,{size:o}))],R=({value:n,onChange:r,height:d=300,theme:c=s.EditorThemes.light,className:a,placeholder:m,defaultPreview:u="edit"})=>{const j=x.useMemo(()=>p(),[]),l=x.useMemo(()=>I(),[]);return s.jsxRuntimeExports.jsx("div",{"data-color-mode":c,className:s.mergeClasses("dial-kit-markdown-editor",a),children:s.jsxRuntimeExports.jsx(e,{value:n,onChange:E=>r?.(E||""),height:d,preview:u,commands:j,extraCommands:l,textareaProps:{placeholder:m}})})};exports.MarkdownEditor=R;
|