@datum-cloud/datum-ui 0.3.2-dev.5bd364b → 0.5.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/README.md +118 -49
- package/dist/alert/index.mjs +2 -3
- package/dist/{alert-BC2Mccfo.mjs → alert-BDj6od5I.mjs} +2 -4
- package/dist/app-navigation/index.mjs +4 -12
- package/dist/{app-navigation-CCvjPijd.mjs → app-navigation-84ro28PU.mjs} +5 -8
- package/dist/autocomplete/index.mjs +2 -7
- package/dist/{autocomplete-DcKO7pj5.mjs → autocomplete-V5-qslzS.mjs} +5 -7
- package/dist/avatar/index.mjs +2 -0
- package/dist/avatar-BtKVcvO4.mjs +28 -0
- package/dist/avatar-stack/index.mjs +2 -5
- package/dist/{avatar-stack-B21McFeb.mjs → avatar-stack-oVr8tsU7.mjs} +4 -31
- package/dist/badge/index.mjs +2 -3
- package/dist/{badge-bFgeYceE.mjs → badge-DJR33ftJ.mjs} +2 -4
- package/dist/breadcrumb/index.mjs +2 -4
- package/dist/{breadcrumb-BGYJgom_.mjs → breadcrumb-B-9G347O.mjs} +2 -4
- package/dist/button/index.mjs +3 -4
- package/dist/{button-C1wRfGtT.mjs → button-BllvE9Lm.mjs} +3 -5
- package/dist/{button-AzpnV-WB.mjs → button-D3RrsMfQ.mjs} +2 -4
- package/dist/{link-button-TIF2Zdrk.mjs → button-fO8nazJE.mjs} +3 -5
- package/dist/button-group/index.mjs +2 -5
- package/dist/{button-group-C1IB2K5s.mjs → button-group-CYPka2zz.mjs} +3 -5
- package/dist/calendar/index.mjs +2 -5
- package/dist/{calendar-DlIHeWb0.mjs → calendar-DEkCw7I1.mjs} +4 -6
- package/dist/{calendar-date-picker-Bw6Mrr-P.mjs → calendar-date-picker-DWK94_DC.mjs} +6 -8
- package/dist/card/index.mjs +2 -4
- package/dist/{card-3Kd0VdNf.mjs → card-DKG1Cwlj.mjs} +3 -6
- package/dist/chart/index.mjs +2 -4
- package/dist/{chart-BZqUKpkh.mjs → chart-CUa21ynK.mjs} +2 -4
- package/dist/checkbox/index.mjs +2 -4
- package/dist/{checkbox-LG1OKTpG.mjs → checkbox-I5BvrMPe.mjs} +3 -6
- package/dist/{close.icon-CMNMoXM_.mjs → close.icon-HCfS4Y-N.mjs} +2 -4
- package/dist/{cn-DWCc1QRE.mjs → cn-D2KYQ917.mjs} +1 -3
- package/dist/code-editor/index.mjs +2 -0
- package/dist/{col-DCneNxQj.mjs → col-q-J99UHe.mjs} +2 -7
- package/dist/collapsible/index.mjs +2 -3
- package/dist/{collapsible-Bt9UYfv3.mjs → collapsible-CUphkSBt.mjs} +1 -3
- package/dist/command/index.mjs +2 -5
- package/dist/{command-s0Yv3abE.mjs → command-DqHWukGK.mjs} +3 -5
- package/dist/components/base/avatar/index.d.ts +2 -0
- package/dist/components/base/avatar/index.d.ts.map +1 -0
- package/dist/components/base/index.d.ts +1 -0
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/features/code-editor/code-editor-tabs.d.ts +63 -0
- package/dist/components/features/code-editor/code-editor-tabs.d.ts.map +1 -0
- package/dist/components/features/code-editor/code-editor.d.ts +58 -0
- package/dist/components/features/code-editor/code-editor.d.ts.map +1 -0
- package/dist/components/features/code-editor/index.d.ts +6 -0
- package/dist/components/features/code-editor/index.d.ts.map +1 -0
- package/dist/components/features/code-editor/lib/editor.d.ts +7 -0
- package/dist/components/features/code-editor/lib/editor.d.ts.map +1 -0
- package/dist/components/features/code-editor/types.d.ts +98 -0
- package/dist/components/features/code-editor/types.d.ts.map +1 -0
- package/dist/components/features/index.d.ts +1 -0
- package/dist/components/features/index.d.ts.map +1 -1
- package/dist/components/toast.d.ts +2 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/data-table/index.mjs +21 -51
- package/dist/date-picker/index.mjs +3 -10
- package/dist/dialog/index.mjs +2 -5
- package/dist/{dialog-bnMMf9GD.mjs → dialog-Bm2H9lrx.mjs} +4 -6
- package/dist/{dialog-DXBaT9gA.mjs → dialog-DASRaFxD.mjs} +2 -4
- package/dist/dropdown/index.mjs +2 -3
- package/dist/{dropdown-Dgm_b6Mm.mjs → dropdown-DZiAt-jS.mjs} +3 -5
- package/dist/{dropdown-menu-DAFyO-qD.mjs → dropdown-menu-lALvDnab.mjs} +5 -7
- package/dist/dropzone/index.mjs +2 -5
- package/dist/{dropzone-DR6O9OdU.mjs → dropzone-ogtpQ4fy.mjs} +5 -8
- package/dist/empty-content/index.mjs +2 -3
- package/dist/{empty-content-Dm7_5jO9.mjs → empty-content-C63GPJ5d.mjs} +3 -9
- package/dist/form/index.mjs +2 -146
- package/dist/{use-stepper-DJd8o9dV.mjs → form-Co3fM4B7.mjs} +148 -51
- package/dist/grid/index.mjs +2 -3
- package/dist/hooks/index.mjs +3 -4
- package/dist/{use-debounce-Dc95PFRX.mjs → hooks-Cb7YlxN4.mjs} +1 -3
- package/dist/hover-card/index.mjs +2 -4
- package/dist/{hover-card-CUPfFUqE.mjs → hover-card-DDWWD5Hx.mjs} +2 -4
- package/dist/{icon-wrapper-9ticVbRL.mjs → icon-wrapper-DuLp3RM1.mjs} +1 -3
- package/dist/icons/index.mjs +4 -5
- package/dist/index.mjs +65 -70
- package/dist/input/index.mjs +2 -5
- package/dist/{input-DuyjEKEW.mjs → input-DOmNpcQJ.mjs} +2 -4
- package/dist/{input-fzXBheCN.mjs → input-FKGqZypx.mjs} +3 -5
- package/dist/input-group/index.mjs +2 -7
- package/dist/{input-group-CPaFSTEV.mjs → input-group-DDtz-RT7.mjs} +5 -7
- package/dist/input-number/index.mjs +2 -6
- package/dist/{input-number-D1HCcTXO.mjs → input-number-mDB-5M5C.mjs} +4 -6
- package/dist/input-with-addons/index.mjs +28 -3
- package/dist/label/index.mjs +2 -4
- package/dist/{label-_ste_Re3.mjs → label-cnAhY-ej.mjs} +3 -6
- package/dist/loader-overlay/index.mjs +2 -3
- package/dist/{loader-overlay-CpA0zV8D.mjs → loader-overlay-BTFdkp7W.mjs} +3 -5
- package/dist/map/index.mjs +2 -14
- package/dist/{map-2RG9pYZR.mjs → map-ClxB41Hg.mjs} +10 -14
- package/dist/{map-leaflet-imports-CgEyVRnp.mjs → map-leaflet-imports-CaMm_rdF.mjs} +1 -2
- package/dist/more-actions/index.mjs +2 -5
- package/dist/{more-actions-BODYgG1C.mjs → more-actions-CGagbIDT.mjs} +5 -7
- package/dist/nprogress/index.mjs +1 -3
- package/dist/page-title/index.mjs +2 -3
- package/dist/{page-title-D62FV6vD.mjs → page-title-R7QbfbWp.mjs} +2 -4
- package/dist/popover/index.mjs +2 -4
- package/dist/{popover-Ds9624qY.mjs → popover-FJAcbYoH.mjs} +2 -4
- package/dist/radio-group/index.mjs +2 -4
- package/dist/{radio-group-B9Hm77LQ.mjs → radio-group-CiITR0LO.mjs} +3 -6
- package/dist/select/index.mjs +2 -4
- package/dist/{select-CwVIFWFO.mjs → select-CiLR_DiQ.mjs} +3 -6
- package/dist/separator/index.mjs +2 -4
- package/dist/{separator-T2ppyD-8.mjs → separator-DXVTncCK.mjs} +2 -4
- package/dist/sheet/index.mjs +3 -5
- package/dist/{sheet-mx5XjyEY.mjs → sheet-BzXksqYY.mjs} +4 -6
- package/dist/{sheet-Cemwh78x.mjs → sheet-Di3b-oPu.mjs} +2 -4
- package/dist/sidebar/index.mjs +2 -10
- package/dist/{sidebar-BW76ss_f.mjs → sidebar-BnhnjvfO.mjs} +10 -14
- package/dist/skeleton/index.mjs +2 -5
- package/dist/{skeleton-CkE23wsL.mjs → skeleton-BKl4mfJt.mjs} +2 -4
- package/dist/{skeleton-DZ31pU4B.mjs → skeleton-D1MUhAVo.mjs} +3 -5
- package/dist/spinner/index.mjs +2 -4
- package/dist/{spinner-earfjpJs.mjs → spinner-OyOf9-Yu.mjs} +2 -4
- package/dist/{spinner.icon-Bg8zgGh0.mjs → spinner.icon-C-vjSM6o.mjs} +2 -4
- package/dist/stepper/index.mjs +321 -5
- package/dist/switch/index.mjs +2 -4
- package/dist/{switch-Cn9IM2gC.mjs → switch-DQJQhPIQ.mjs} +3 -6
- package/dist/table/index.mjs +2 -4
- package/dist/{table-Dpzh0VPK.mjs → table-Cdsh-39-.mjs} +2 -4
- package/dist/tabs/index.mjs +50 -3
- package/dist/tag-input/index.mjs +2 -5
- package/dist/{tag-input-DorFQ9bA.mjs → tag-input-BVSwNcRd.mjs} +5 -7
- package/dist/task-queue/index.mjs +2 -7
- package/dist/{task-queue-dropdown-DtS0IKci.mjs → task-queue-dropdown-DyM5R8KF.mjs} +10 -30
- package/dist/textarea/index.mjs +2 -5
- package/dist/{textarea-QYRcDEpK.mjs → textarea-94vq_G_S.mjs} +2 -4
- package/dist/{textarea-KZUKGHlO.mjs → textarea-BwD-MmTV.mjs} +3 -5
- package/dist/theme/index.mjs +2 -3
- package/dist/{theme.provider-BG3cS9xe.mjs → themes-DG1md8FI.mjs} +1 -6
- package/dist/{to-api-format-CzPt5UAX.mjs → to-api-format-BnbRFYQI.mjs} +9 -18
- package/dist/toast/index.mjs +3 -3
- package/dist/{use-toast-DBmysDS6.mjs → toast-BWnN5fax.mjs} +5 -42
- package/dist/toast-DpxlFNNx.mjs +37 -0
- package/dist/tooltip/index.mjs +2 -4
- package/dist/{tooltip-U3XxlW4l.mjs → tooltip-Cruvl5F6.mjs} +3 -6
- package/dist/types-BZNk3q65.mjs +357 -0
- package/dist/typography/index.mjs +2 -3
- package/dist/{typography-DdrxIJMd.mjs → typography-ClB8k55E.mjs} +2 -4
- package/dist/{use-copy-to-clipboard-C9cT2Qb-.mjs → use-copy-to-clipboard-BGdTmkFV.mjs} +2 -4
- package/dist/utils/index.mjs +2 -3
- package/dist/{utils-Bfgoe-Gm.mjs → utils-C8KwMfT_.mjs} +1 -3
- package/dist/visually-hidden/index.mjs +2 -3
- package/dist/{visuallyhidden-CfBnXfvh.mjs → visuallyhidden-BLUsJpYH.mjs} +1 -3
- package/package.json +30 -4
- package/dist/input-with-addons-DN9LGwUU.mjs +0 -30
- package/dist/stepper-CZeks9Ex.mjs +0 -323
- package/dist/tabs-OYVCDOif.mjs +0 -52
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
2
|
-
import { n as buttonVariants } from "./button-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { n as buttonVariants } from "./button-BllvE9Lm.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
5
|
//#region src/components/base/button/link-button.tsx
|
|
7
6
|
function LinkButton({ ref, className, type, theme, size, block, icon, iconPosition = "left", children, as: Component = "a", href, ...props }) {
|
|
8
7
|
const isIconOnly = icon && !children;
|
|
@@ -31,6 +30,5 @@ function LinkButton({ ref, className, type, theme, size, block, icon, iconPositi
|
|
|
31
30
|
});
|
|
32
31
|
}
|
|
33
32
|
LinkButton.displayName = "LinkButton";
|
|
34
|
-
|
|
35
33
|
//#endregion
|
|
36
|
-
export { LinkButton as t };
|
|
34
|
+
export { LinkButton as t };
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
|
|
3
|
-
import { i as buttonGroupVariants, n as ButtonGroupSeparator, r as ButtonGroupText, t as ButtonGroup } from "../button-group-C1IB2K5s.mjs";
|
|
4
|
-
|
|
5
|
-
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
1
|
+
import { i as buttonGroupVariants, n as ButtonGroupSeparator, r as ButtonGroupText, t as ButtonGroup } from "../button-group-CYPka2zz.mjs";
|
|
2
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
2
|
-
import { t as Separator } from "./separator-
|
|
1
|
+
import { t as cn } from "./utils-C8KwMfT_.mjs";
|
|
2
|
+
import { t as Separator } from "./separator-DXVTncCK.mjs";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { Slot } from "@radix-ui/react-slot";
|
|
6
|
-
|
|
7
6
|
//#region ../shadcn/ui/button-group.tsx
|
|
8
7
|
const buttonGroupVariants = cva("flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
9
8
|
variants: { orientation: {
|
|
@@ -35,6 +34,5 @@ function ButtonGroupSeparator({ className, orientation = "vertical", ...props })
|
|
|
35
34
|
...props
|
|
36
35
|
});
|
|
37
36
|
}
|
|
38
|
-
|
|
39
37
|
//#endregion
|
|
40
|
-
export { buttonGroupVariants as i, ButtonGroupSeparator as n, ButtonGroupText as r, ButtonGroup as t };
|
|
38
|
+
export { buttonGroupVariants as i, ButtonGroupSeparator as n, ButtonGroupText as r, ButtonGroup as t };
|
package/dist/calendar/index.mjs
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
|
|
3
|
-
import { n as CalendarDayButton, t as Calendar } from "../calendar-DlIHeWb0.mjs";
|
|
4
|
-
|
|
5
|
-
export { Calendar, CalendarDayButton };
|
|
1
|
+
import { n as CalendarDayButton, t as Calendar } from "../calendar-DEkCw7I1.mjs";
|
|
2
|
+
export { Calendar, CalendarDayButton };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
2
|
-
import { n as buttonVariants, t as Button } from "./button-
|
|
3
|
-
import { t as Icon } from "./icon-wrapper-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { n as buttonVariants, t as Button } from "./button-D3RrsMfQ.mjs";
|
|
3
|
+
import { t as Icon } from "./icon-wrapper-DuLp3RM1.mjs";
|
|
4
4
|
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
8
|
-
|
|
9
8
|
//#region src/components/base/calendar/calendar.tsx
|
|
10
9
|
function CalendarRoot({ className, rootRef, ...props }) {
|
|
11
10
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -108,6 +107,5 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
|
108
107
|
...props
|
|
109
108
|
});
|
|
110
109
|
}
|
|
111
|
-
|
|
112
110
|
//#endregion
|
|
113
|
-
export { CalendarDayButton as n, Calendar$1 as t };
|
|
111
|
+
export { CalendarDayButton as n, Calendar$1 as t };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
2
|
-
import { t as Button } from "./button-
|
|
3
|
-
import { t as Calendar$1 } from "./calendar-
|
|
4
|
-
import { i as PopoverTrigger, r as PopoverContent, t as Popover } from "./popover-
|
|
5
|
-
import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "./select-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as Button } from "./button-D3RrsMfQ.mjs";
|
|
3
|
+
import { t as Calendar$1 } from "./calendar-DEkCw7I1.mjs";
|
|
4
|
+
import { i as PopoverTrigger, r as PopoverContent, t as Popover } from "./popover-FJAcbYoH.mjs";
|
|
5
|
+
import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "./select-CiLR_DiQ.mjs";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
import { CalendarIcon, X } from "lucide-react";
|
|
8
8
|
import * as React$1 from "react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { endOfDay, endOfMonth, endOfWeek, endOfYear, startOfDay, startOfMonth, startOfWeek, startOfYear, subDays } from "date-fns";
|
|
11
11
|
import { formatInTimeZone, toDate } from "date-fns-tz";
|
|
12
|
-
|
|
13
12
|
//#region src/components/features/calendar-date-picker/calendar-date-picker.tsx
|
|
14
13
|
const months = [
|
|
15
14
|
"January",
|
|
@@ -661,6 +660,5 @@ function CalendarDatePicker({ ref, id = "calendar-date-picker", className, trigg
|
|
|
661
660
|
})] });
|
|
662
661
|
}
|
|
663
662
|
CalendarDatePicker.displayName = "CalendarDatePicker";
|
|
664
|
-
|
|
665
663
|
//#endregion
|
|
666
|
-
export { CalendarDatePicker as t };
|
|
664
|
+
export { CalendarDatePicker as t };
|
package/dist/card/index.mjs
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
1
|
+
import { a as CardDescription, i as CardContent, n as CardFooter, o as CardTitle, r as CardHeader, t as Card } from "../card-DKG1Cwlj.mjs";
|
|
2
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
2
|
-
import { t as cn$1 } from "./utils-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as cn$1 } from "./utils-C8KwMfT_.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
5
|
//#region ../shadcn/ui/card.tsx
|
|
7
6
|
const CardTitle = ({ className, ...props }) => {
|
|
8
7
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -25,7 +24,6 @@ const CardContent = ({ className, ...props }) => {
|
|
|
25
24
|
...props
|
|
26
25
|
});
|
|
27
26
|
};
|
|
28
|
-
|
|
29
27
|
//#endregion
|
|
30
28
|
//#region src/components/base/card/card.tsx
|
|
31
29
|
/**
|
|
@@ -58,6 +56,5 @@ function CardFooter({ className, ...props }) {
|
|
|
58
56
|
...props
|
|
59
57
|
});
|
|
60
58
|
}
|
|
61
|
-
|
|
62
59
|
//#endregion
|
|
63
|
-
export { CardDescription as a, CardContent as i, CardFooter as n, CardTitle as o, CardHeader as r, Card as t };
|
|
60
|
+
export { CardDescription as a, CardContent as i, CardFooter as n, CardTitle as o, CardHeader as r, Card as t };
|
package/dist/chart/index.mjs
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
|
|
1
|
+
import { a as ChartTooltip, i as ChartStyle, n as ChartLegend, o as ChartTooltipContent, r as ChartLegendContent, t as ChartContainer } from "../chart-CUa21ynK.mjs";
|
|
2
|
+
export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
1
|
+
import { t as cn } from "./utils-C8KwMfT_.mjs";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import * as RechartsPrimitive from "recharts";
|
|
5
|
-
|
|
6
5
|
//#region ../shadcn/ui/chart.tsx
|
|
7
6
|
const THEMES = {
|
|
8
7
|
light: "",
|
|
@@ -138,6 +137,5 @@ function getPayloadConfigFromPayload(config, payload, key) {
|
|
|
138
137
|
else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") configLabelKey = payloadPayload[key];
|
|
139
138
|
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
140
139
|
}
|
|
141
|
-
|
|
142
140
|
//#endregion
|
|
143
|
-
export { ChartTooltip as a, ChartStyle as i, ChartLegend as n, ChartTooltipContent as o, ChartLegendContent as r, ChartContainer as t };
|
|
141
|
+
export { ChartTooltip as a, ChartStyle as i, ChartLegend as n, ChartTooltipContent as o, ChartLegendContent as r, ChartContainer as t };
|
package/dist/checkbox/index.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
2
|
-
import { t as cn$1 } from "./utils-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as cn$1 } from "./utils-C8KwMfT_.mjs";
|
|
3
3
|
import { CheckIcon } from "lucide-react";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
7
|
-
|
|
8
7
|
//#region ../shadcn/ui/checkbox.tsx
|
|
9
8
|
function Checkbox$1({ className, ...props }) {
|
|
10
9
|
return /* @__PURE__ */ jsx(CheckboxPrimitive.Root, {
|
|
@@ -18,7 +17,6 @@ function Checkbox$1({ className, ...props }) {
|
|
|
18
17
|
})
|
|
19
18
|
});
|
|
20
19
|
}
|
|
21
|
-
|
|
22
20
|
//#endregion
|
|
23
21
|
//#region src/components/base/checkbox/checkbox.tsx
|
|
24
22
|
function Checkbox({ ref, className, ...props }) {
|
|
@@ -29,6 +27,5 @@ function Checkbox({ ref, className, ...props }) {
|
|
|
29
27
|
});
|
|
30
28
|
}
|
|
31
29
|
Checkbox.displayName = "Checkbox";
|
|
32
|
-
|
|
33
30
|
//#endregion
|
|
34
|
-
export { Checkbox as t };
|
|
31
|
+
export { Checkbox as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
3
|
//#region src/components/icons/close.icon.tsx
|
|
5
4
|
function CloseIcon({ className, fill = "fill-foreground" }) {
|
|
6
5
|
return /* @__PURE__ */ jsx("svg", {
|
|
@@ -17,6 +16,5 @@ function CloseIcon({ className, fill = "fill-foreground" }) {
|
|
|
17
16
|
})
|
|
18
17
|
});
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
//#endregion
|
|
22
|
-
export { CloseIcon as t };
|
|
20
|
+
export { CloseIcon as t };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as formatJson, c as isValidYaml, d as CodeEditor, i as CodeEditorTabs, l as jsonToYaml, n as jsonSchema, o as formatYaml, r as yamlSchema, s as isValidJson, t as createCodeEditorSchema, u as yamlToJson } from "../types-BZNk3q65.mjs";
|
|
2
|
+
export { CodeEditor, CodeEditorTabs, createCodeEditorSchema, formatJson, formatYaml, isValidJson, isValidYaml, jsonSchema, jsonToYaml, yamlSchema, yamlToJson };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
2
|
import React, { use, useEffect, useState } from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
4
|
//#region src/components/features/grid/constants/grid.constants.ts
|
|
6
5
|
const GRID_BREAKPOINTS = {
|
|
7
6
|
xs: 480,
|
|
@@ -29,7 +28,6 @@ const RESPONSIVE_MAP = {
|
|
|
29
28
|
xl: "(min-width: 1200px)",
|
|
30
29
|
xxl: "(min-width: 1600px)"
|
|
31
30
|
};
|
|
32
|
-
|
|
33
31
|
//#endregion
|
|
34
32
|
//#region src/components/features/grid/utils/responsive.ts
|
|
35
33
|
function registerMediaQuery(query, callback) {
|
|
@@ -68,7 +66,6 @@ function getResponsiveValue(value, screens) {
|
|
|
68
66
|
}
|
|
69
67
|
return value;
|
|
70
68
|
}
|
|
71
|
-
|
|
72
69
|
//#endregion
|
|
73
70
|
//#region src/components/features/grid/components/row.tsx
|
|
74
71
|
const RowContext = React.createContext(null);
|
|
@@ -130,7 +127,6 @@ const Row = ({ type, align, justify, className, style, children, gutter = 0, pre
|
|
|
130
127
|
})
|
|
131
128
|
});
|
|
132
129
|
};
|
|
133
|
-
|
|
134
130
|
//#endregion
|
|
135
131
|
//#region src/components/features/grid/components/col.tsx
|
|
136
132
|
const Col = ({ span, order, offset, push, pull, className, prefixCls = GRID_PREFIX, style, children, ...rest }) => {
|
|
@@ -179,6 +175,5 @@ const Col = ({ span, order, offset, push, pull, className, prefixCls = GRID_PREF
|
|
|
179
175
|
children
|
|
180
176
|
});
|
|
181
177
|
};
|
|
182
|
-
|
|
183
178
|
//#endregion
|
|
184
|
-
export { getResponsiveValue as a, GRID_COLUMNS as c, RESPONSIVE_MAP as d, getGutter as i, GRID_PREFIX as l, Row as n, registerMediaQuery as o, RowContext as r, GRID_BREAKPOINTS as s, Col as t, RESPONSIVE_ARRAY as u };
|
|
179
|
+
export { getResponsiveValue as a, GRID_COLUMNS as c, RESPONSIVE_MAP as d, getGutter as i, GRID_PREFIX as l, Row as n, registerMediaQuery as o, RowContext as r, GRID_BREAKPOINTS as s, Col as t, RESPONSIVE_ARRAY as u };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { n as CollapsibleContent, r as CollapsibleTrigger, t as Collapsible } from "../collapsible-
|
|
2
|
-
|
|
3
|
-
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
1
|
+
import { n as CollapsibleContent, r as CollapsibleTrigger, t as Collapsible } from "../collapsible-CUphkSBt.mjs";
|
|
2
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
2
|
-
|
|
3
2
|
//#region ../shadcn/ui/collapsible.tsx
|
|
4
3
|
const Collapsible = CollapsiblePrimitive.Root;
|
|
5
4
|
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
|
|
6
5
|
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
|
-
export { CollapsibleContent as n, CollapsibleTrigger as r, Collapsible as t };
|
|
7
|
+
export { CollapsibleContent as n, CollapsibleTrigger as r, Collapsible as t };
|
package/dist/command/index.mjs
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
|
|
3
|
-
import { a as CommandInput, c as CommandSeparator, i as CommandGroup, l as CommandShortcut, n as CommandDialog, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "../command-s0Yv3abE.mjs";
|
|
4
|
-
|
|
5
|
-
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
1
|
+
import { a as CommandInput, c as CommandSeparator, i as CommandGroup, l as CommandShortcut, n as CommandDialog, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "../command-DqHWukGK.mjs";
|
|
2
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
2
|
-
import { i as DialogDescription, l as DialogTitle, o as DialogHeader, r as DialogContent, t as Dialog } from "./dialog-
|
|
1
|
+
import { t as cn } from "./utils-C8KwMfT_.mjs";
|
|
2
|
+
import { i as DialogDescription, l as DialogTitle, o as DialogHeader, r as DialogContent, t as Dialog } from "./dialog-DASRaFxD.mjs";
|
|
3
3
|
import { SearchIcon } from "lucide-react";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Command } from "cmdk";
|
|
7
|
-
|
|
8
7
|
//#region ../shadcn/ui/command.tsx
|
|
9
8
|
const Command$1 = ({ className, ...props }) => {
|
|
10
9
|
return /* @__PURE__ */ jsx(Command, {
|
|
@@ -81,6 +80,5 @@ const CommandShortcut = ({ className, ...props }) => {
|
|
|
81
80
|
...props
|
|
82
81
|
});
|
|
83
82
|
};
|
|
84
|
-
|
|
85
83
|
//#endregion
|
|
86
|
-
export { CommandInput as a, CommandSeparator as c, CommandGroup as i, CommandShortcut as l, CommandDialog as n, CommandItem as o, CommandEmpty as r, CommandList as s, Command$1 as t };
|
|
84
|
+
export { CommandInput as a, CommandSeparator as c, CommandGroup as i, CommandShortcut as l, CommandDialog as n, CommandItem as o, CommandEmpty as r, CommandList as s, Command$1 as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/base/avatar/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,SAAS,CAAA;AAEvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AAEvB,cAAc,OAAO,CAAA;AACrB,cAAc,sBAAsB,CAAA;AACpC,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { CodeEditorTabsProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* CodeEditorTabs - Dual-format code editor with JSON ↔ YAML conversion
|
|
4
|
+
*
|
|
5
|
+
* A tabbed interface that provides JSON and YAML editing with automatic
|
|
6
|
+
* bidirectional conversion and validation. Prevents tab switching when
|
|
7
|
+
* content has syntax errors and shows error toasts for conversion failures.
|
|
8
|
+
*
|
|
9
|
+
* Features:
|
|
10
|
+
* - Dual-format editing (JSON ↔ YAML)
|
|
11
|
+
* - Automatic bidirectional conversion
|
|
12
|
+
* - Real-time validation before conversion
|
|
13
|
+
* - Error toasts for conversion failures
|
|
14
|
+
* - Maintains sync between both formats
|
|
15
|
+
* - Hidden format field for form submission
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* import { CodeEditorTabs } from '@datum-cloud/datum-ui/code-editor'
|
|
20
|
+
*
|
|
21
|
+
* // Basic usage
|
|
22
|
+
* <CodeEditorTabs
|
|
23
|
+
* value={config}
|
|
24
|
+
* format="yaml"
|
|
25
|
+
* onChange={(value, format) => {
|
|
26
|
+
* setConfig(value)
|
|
27
|
+
* setFormat(format)
|
|
28
|
+
* }}
|
|
29
|
+
* name="configuration"
|
|
30
|
+
* minHeight="500px"
|
|
31
|
+
* />
|
|
32
|
+
*
|
|
33
|
+
* // With React Hook Form
|
|
34
|
+
* const { watch, setValue } = useForm()
|
|
35
|
+
*
|
|
36
|
+
* <CodeEditorTabs
|
|
37
|
+
* value={watch('config')}
|
|
38
|
+
* onChange={(value) => setValue('config', value)}
|
|
39
|
+
* name="config"
|
|
40
|
+
* />
|
|
41
|
+
*
|
|
42
|
+
* // With format change handler
|
|
43
|
+
* <CodeEditorTabs
|
|
44
|
+
* value={data}
|
|
45
|
+
* format={currentFormat}
|
|
46
|
+
* onChange={(value, format) => console.log({ value, format })}
|
|
47
|
+
* onFormatChange={(format) => setCurrentFormat(format)}
|
|
48
|
+
* />
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @param props - Component props
|
|
52
|
+
* @param props.value - Editor content
|
|
53
|
+
* @param props.onChange - Content and format change callback
|
|
54
|
+
* @param props.format - Active format ('json' or 'yaml', default: 'yaml')
|
|
55
|
+
* @param props.onFormatChange - Format change callback
|
|
56
|
+
* @param props.error - Error message to display below the editor
|
|
57
|
+
* @param props.id - Input element ID for form integration
|
|
58
|
+
* @param props.name - Input element name for form submission (default: 'code-editor')
|
|
59
|
+
* @param props.minHeight - Minimum editor height (default: '300px')
|
|
60
|
+
* @returns Rendered tabbed editor with JSON/YAML conversion
|
|
61
|
+
*/
|
|
62
|
+
export declare function CodeEditorTabs({ value, onChange, format, onFormatChange, error, id, name, minHeight, }: CodeEditorTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
//# sourceMappingURL=code-editor-tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-editor-tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/features/code-editor/code-editor-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAkB,MAAM,SAAS,CAAA;AAOlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,MAAe,EACf,cAAc,EACd,KAAK,EACL,EAAE,EACF,IAAoB,EACpB,SAAmB,GACpB,EAAE,mBAAmB,2CA6GrB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { CodeEditorProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* CodeEditor - Monaco-based code editor component
|
|
4
|
+
*
|
|
5
|
+
* A Monaco Editor wrapper with single language support, theme integration,
|
|
6
|
+
* and form compatibility. Provides a VS Code-like editing experience with
|
|
7
|
+
* automatic formatting, responsive layout, and error state handling.
|
|
8
|
+
*
|
|
9
|
+
* Features:
|
|
10
|
+
* - Monaco Editor with VS Code experience
|
|
11
|
+
* - Theme-aware (automatic light/dark mode)
|
|
12
|
+
* - Form-compatible (hidden input for React Hook Form)
|
|
13
|
+
* - Responsive layout with automatic resizing
|
|
14
|
+
* - Read-only mode support
|
|
15
|
+
* - Custom error state styling
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* import { CodeEditor } from '@datum-cloud/datum-ui/code-editor'
|
|
20
|
+
*
|
|
21
|
+
* // Basic usage
|
|
22
|
+
* <CodeEditor
|
|
23
|
+
* value={code}
|
|
24
|
+
* onChange={(newValue) => setCode(newValue)}
|
|
25
|
+
* language="yaml"
|
|
26
|
+
* minHeight="400px"
|
|
27
|
+
* />
|
|
28
|
+
*
|
|
29
|
+
* // With error state
|
|
30
|
+
* <CodeEditor
|
|
31
|
+
* value={invalidJson}
|
|
32
|
+
* onChange={handleChange}
|
|
33
|
+
* language="json"
|
|
34
|
+
* error="Invalid JSON format"
|
|
35
|
+
* />
|
|
36
|
+
*
|
|
37
|
+
* // Read-only mode
|
|
38
|
+
* <CodeEditor
|
|
39
|
+
* value={config}
|
|
40
|
+
* language="yaml"
|
|
41
|
+
* readOnly={true}
|
|
42
|
+
* />
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @param props - Component props
|
|
46
|
+
* @param props.value - Editor content
|
|
47
|
+
* @param props.onChange - Content change callback
|
|
48
|
+
* @param props.language - Syntax highlighting language
|
|
49
|
+
* @param props.id - Input element ID for form integration
|
|
50
|
+
* @param props.name - Input element name for form submission (default: 'code-editor')
|
|
51
|
+
* @param props.error - Error message to display below the editor
|
|
52
|
+
* @param props.className - Additional CSS classes
|
|
53
|
+
* @param props.readOnly - Read-only mode (default: false)
|
|
54
|
+
* @param props.minHeight - Minimum editor height (default: '200px')
|
|
55
|
+
* @returns Rendered Monaco editor with form integration
|
|
56
|
+
*/
|
|
57
|
+
export declare function CodeEditor({ value, onChange, language, id, name, error, className, readOnly, minHeight, }: CodeEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
//# sourceMappingURL=code-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-editor.d.ts","sourceRoot":"","sources":["../../../../src/components/features/code-editor/code-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,EAAE,EACF,IAAoB,EACpB,KAAK,EACL,SAAS,EACT,QAAgB,EAChB,SAAmB,GACpB,EAAE,eAAe,2CAiDjB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { CodeEditor } from './code-editor';
|
|
2
|
+
export { CodeEditorTabs } from './code-editor-tabs';
|
|
3
|
+
export { formatJson, formatYaml, isValidJson, isValidYaml, jsonToYaml, yamlToJson } from './lib/editor';
|
|
4
|
+
export { createCodeEditorSchema, jsonSchema, yamlSchema } from './types';
|
|
5
|
+
export type { CodeEditorProps, CodeEditorTabsProps, EditorLanguage } from './types';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/features/code-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACvG,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACxE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function isValidJson(jsonStr: string): boolean;
|
|
2
|
+
export declare function isValidYaml(yamlStr: string): boolean;
|
|
3
|
+
export declare function formatJson(jsonStr: string): string;
|
|
4
|
+
export declare function formatYaml(yamlStr: string): string;
|
|
5
|
+
export declare function jsonToYaml(jsonStr: string): string;
|
|
6
|
+
export declare function yamlToJson(yamlStr: string): string;
|
|
7
|
+
//# sourceMappingURL=editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/code-editor/lib/editor.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQpD;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQpD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAQlD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAYlD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAYlD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAQlD"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type EditorLanguage = 'json' | 'yaml' | 'typescript' | 'javascript' | 'python' | 'sql' | 'html' | 'css' | 'markdown';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the CodeEditor component.
|
|
5
|
+
*
|
|
6
|
+
* Base Monaco Editor wrapper with single language support, theme integration,
|
|
7
|
+
* and form compatibility.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { CodeEditor } from '@datum-cloud/datum-ui/code-editor'
|
|
12
|
+
*
|
|
13
|
+
* <CodeEditor
|
|
14
|
+
* value={code}
|
|
15
|
+
* onChange={(newValue) => setCode(newValue)}
|
|
16
|
+
* language="yaml"
|
|
17
|
+
* minHeight="400px"
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export interface CodeEditorProps {
|
|
22
|
+
/** Editor content */
|
|
23
|
+
value: string;
|
|
24
|
+
/** Content change callback */
|
|
25
|
+
onChange?: (value: string) => void;
|
|
26
|
+
/** Syntax highlighting language */
|
|
27
|
+
language: EditorLanguage;
|
|
28
|
+
/** Input element ID for form integration */
|
|
29
|
+
id?: string;
|
|
30
|
+
/** Input element name for form submission (default: 'code-editor') */
|
|
31
|
+
name?: string;
|
|
32
|
+
/** Error message to display below the editor */
|
|
33
|
+
error?: string;
|
|
34
|
+
/** Additional CSS classes */
|
|
35
|
+
className?: string;
|
|
36
|
+
/** Read-only mode (default: false) */
|
|
37
|
+
readOnly?: boolean;
|
|
38
|
+
/** Minimum editor height (default: '200px') */
|
|
39
|
+
minHeight?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Props for the CodeEditorTabs component.
|
|
43
|
+
*
|
|
44
|
+
* Tabbed interface with JSON ↔ YAML conversion, validation, and automatic
|
|
45
|
+
* bidirectional synchronization.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* import { CodeEditorTabs } from '@datum-cloud/datum-ui/code-editor'
|
|
50
|
+
*
|
|
51
|
+
* <CodeEditorTabs
|
|
52
|
+
* value={config}
|
|
53
|
+
* format="yaml"
|
|
54
|
+
* onChange={(value, format) => {
|
|
55
|
+
* setConfig(value)
|
|
56
|
+
* setFormat(format)
|
|
57
|
+
* }}
|
|
58
|
+
* onFormatChange={(format) => setFormat(format)}
|
|
59
|
+
* name="configuration"
|
|
60
|
+
* minHeight="500px"
|
|
61
|
+
* />
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export interface CodeEditorTabsProps {
|
|
65
|
+
/** Editor content */
|
|
66
|
+
value: string;
|
|
67
|
+
/** Content and format change callback */
|
|
68
|
+
onChange?: (value: string, format: EditorLanguage) => void;
|
|
69
|
+
/** Active format ('json' or 'yaml', default: 'yaml') */
|
|
70
|
+
format?: EditorLanguage;
|
|
71
|
+
/** Format change callback */
|
|
72
|
+
onFormatChange?: (format: EditorLanguage) => void;
|
|
73
|
+
/** Error message to display below the editor */
|
|
74
|
+
error?: string;
|
|
75
|
+
/** Input element ID for form integration */
|
|
76
|
+
id?: string;
|
|
77
|
+
/** Input element name for form submission (default: 'code-editor') */
|
|
78
|
+
name?: string;
|
|
79
|
+
/** Minimum editor height (default: '300px') */
|
|
80
|
+
minHeight?: string;
|
|
81
|
+
}
|
|
82
|
+
export declare const jsonSchema: z.ZodObject<{
|
|
83
|
+
jsonContent: z.ZodString;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export declare const yamlSchema: z.ZodObject<{
|
|
86
|
+
yamlContent: z.ZodString;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
export declare function createCodeEditorSchema(name?: string): z.ZodObject<{
|
|
89
|
+
[x: string]: z.ZodString | z.ZodEnum<{
|
|
90
|
+
json: "json";
|
|
91
|
+
yaml: "yaml";
|
|
92
|
+
}>;
|
|
93
|
+
format: z.ZodEnum<{
|
|
94
|
+
json: "json";
|
|
95
|
+
yaml: "yaml";
|
|
96
|
+
}>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/features/code-editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,UAAU,CAAA;AAE3H;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,mCAAmC;IACnC,QAAQ,EAAE,cAAc,CAAA;IACxB,4CAA4C;IAC5C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,yCAAyC;IACzC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,KAAK,IAAI,CAAA;IAC1D,wDAAwD;IACxD,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,6BAA6B;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAA;IACjD,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4CAA4C;IAC5C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,UAAU;;iBAKrB,CAAA;AAEF,eAAO,MAAM,UAAU;;iBAKrB,CAAA;AAEF,wBAAgB,sBAAsB,CAAC,IAAI,SAAgB;;;;;;;;;kBAuB1D"}
|
|
@@ -7,6 +7,7 @@ export * from './app-navigation';
|
|
|
7
7
|
export * from './autocomplete';
|
|
8
8
|
export * from './avatar-stack';
|
|
9
9
|
export * from './calendar-date-picker';
|
|
10
|
+
export * from './code-editor';
|
|
10
11
|
export * from './dropdown';
|
|
11
12
|
export * from './dropzone';
|
|
12
13
|
export * from './empty-content';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/features/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/features/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,SAAS,CAAA"}
|