@datum-cloud/datum-ui 0.4.0 → 0.6.0-alpha.b817c77
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 +78 -39
- package/dist/adapter-context-B7L2ucTr.mjs +25 -0
- 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-DsCKgfPe.mjs → app-navigation-84ro28PU.mjs} +5 -8
- package/dist/autocomplete/index.mjs +2 -7
- package/dist/{autocomplete-DRB_kSVx.mjs → autocomplete-V5-qslzS.mjs} +5 -7
- package/dist/avatar/index.mjs +2 -4
- package/dist/{avatar-DyLq0xkt.mjs → avatar-BtKVcvO4.mjs} +2 -4
- package/dist/avatar-stack/index.mjs +2 -6
- package/dist/{avatar-stack-BT0dBswq.mjs → avatar-stack-oVr8tsU7.mjs} +4 -6
- package/dist/badge/index.mjs +2 -3
- package/dist/{badge-BgFj4Nsc.mjs → badge-DJR33ftJ.mjs} +2 -4
- package/dist/breadcrumb/index.mjs +2 -4
- package/dist/{breadcrumb-CJNaYyk1.mjs → breadcrumb-B-9G347O.mjs} +2 -4
- package/dist/button/index.mjs +3 -4
- package/dist/{button-0N61fmAR.mjs → button-BllvE9Lm.mjs} +3 -5
- package/dist/{button-D6AORsOz.mjs → button-D3RrsMfQ.mjs} +2 -4
- package/dist/{link-button-Cby0p4LW.mjs → button-fO8nazJE.mjs} +3 -5
- package/dist/button-group/index.mjs +2 -5
- package/dist/{button-group-BDk8btAy.mjs → button-group-CYPka2zz.mjs} +3 -5
- package/dist/calendar/index.mjs +2 -5
- package/dist/{calendar-BtfraIvX.mjs → calendar-DEkCw7I1.mjs} +4 -6
- package/dist/{calendar-date-picker-B9mxJM7f.mjs → calendar-date-picker-DWK94_DC.mjs} +6 -8
- package/dist/card/index.mjs +2 -4
- package/dist/{card-BiHXFt4s.mjs → card-DKG1Cwlj.mjs} +3 -6
- package/dist/chart/index.mjs +2 -4
- package/dist/{chart-CL0i-xIt.mjs → chart-CUa21ynK.mjs} +2 -4
- package/dist/checkbox/index.mjs +2 -4
- package/dist/{checkbox-CQrjygFt.mjs → checkbox-I5BvrMPe.mjs} +3 -6
- package/dist/{close.icon-D2r5q3bj.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-C9PDhvm5.mjs → col-YBbQ5wlb.mjs} +2 -7
- package/dist/collapsible/index.mjs +2 -3
- package/dist/{collapsible-Dw71o2um.mjs → collapsible-CUphkSBt.mjs} +1 -3
- package/dist/command/index.mjs +2 -5
- package/dist/{command-DVroicgn.mjs → command-DqHWukGK.mjs} +3 -5
- 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/form/adapter-context.d.ts +17 -0
- package/dist/components/features/form/adapter-context.d.ts.map +1 -0
- package/dist/components/features/form/adapter-types.d.ts +100 -0
- package/dist/components/features/form/adapter-types.d.ts.map +1 -0
- package/dist/components/features/form/adapters/conform/conform-adapter.d.ts +9 -0
- package/dist/components/features/form/adapters/conform/conform-adapter.d.ts.map +1 -0
- package/dist/components/features/form/adapters/conform/conform-provider.d.ts +22 -0
- package/dist/components/features/form/adapters/conform/conform-provider.d.ts.map +1 -0
- package/dist/components/features/form/adapters/conform/index.d.ts +3 -0
- package/dist/components/features/form/adapters/conform/index.d.ts.map +1 -0
- package/dist/components/features/form/adapters/rhf/index.d.ts +3 -0
- package/dist/components/features/form/adapters/rhf/index.d.ts.map +1 -0
- package/dist/components/features/form/adapters/rhf/rhf-adapter.d.ts +10 -0
- package/dist/components/features/form/adapters/rhf/rhf-adapter.d.ts.map +1 -0
- package/dist/components/features/form/adapters/rhf/rhf-provider.d.ts +22 -0
- package/dist/components/features/form/adapters/rhf/rhf-provider.d.ts.map +1 -0
- package/dist/components/features/form/components/form-autocomplete.d.ts.map +1 -1
- package/dist/components/features/form/components/form-checkbox.d.ts.map +1 -1
- package/dist/components/features/form/components/form-copy-box.d.ts.map +1 -1
- package/dist/components/features/form/components/form-field-array.d.ts +5 -17
- package/dist/components/features/form/components/form-field-array.d.ts.map +1 -1
- package/dist/components/features/form/components/form-field.d.ts +7 -21
- package/dist/components/features/form/components/form-field.d.ts.map +1 -1
- package/dist/components/features/form/components/form-input-group.d.ts +4 -4
- package/dist/components/features/form/components/form-input-group.d.ts.map +1 -1
- package/dist/components/features/form/components/form-input.d.ts.map +1 -1
- package/dist/components/features/form/components/form-radio-group.d.ts.map +1 -1
- package/dist/components/features/form/components/form-root.d.ts +5 -25
- package/dist/components/features/form/components/form-root.d.ts.map +1 -1
- package/dist/components/features/form/components/form-select.d.ts.map +1 -1
- package/dist/components/features/form/components/form-switch.d.ts.map +1 -1
- package/dist/components/features/form/components/form-textarea.d.ts.map +1 -1
- package/dist/components/features/form/components/stepper/form-stepper.d.ts.map +1 -1
- package/dist/components/features/form/context/form-context.d.ts +2 -2
- package/dist/components/features/form/context/form-context.d.ts.map +1 -1
- package/dist/components/features/form/hooks/use-field.d.ts +12 -18
- package/dist/components/features/form/hooks/use-field.d.ts.map +1 -1
- package/dist/components/features/form/hooks/use-watch.d.ts +9 -20
- package/dist/components/features/form/hooks/use-watch.d.ts.map +1 -1
- package/dist/components/features/form/index.d.ts +33 -27
- package/dist/components/features/form/index.d.ts.map +1 -1
- package/dist/components/features/form/types/index.d.ts +32 -32
- package/dist/components/features/form/types/index.d.ts.map +1 -1
- package/dist/components/features/form/utils/get-field-constraints.d.ts +11 -0
- package/dist/components/features/form/utils/get-field-constraints.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-B0B3Kbfk.mjs → dialog-Bm2H9lrx.mjs} +4 -6
- package/dist/{dialog-DdrHeboM.mjs → dialog-DASRaFxD.mjs} +2 -4
- package/dist/dropdown/index.mjs +2 -3
- package/dist/{dropdown-Cdx7rOKv.mjs → dropdown-DZiAt-jS.mjs} +3 -5
- package/dist/{dropdown-menu-CdShrDz_.mjs → dropdown-menu-lALvDnab.mjs} +5 -7
- package/dist/dropzone/index.mjs +2 -5
- package/dist/{dropzone-B6kSN3DY.mjs → dropzone-ogtpQ4fy.mjs} +5 -8
- package/dist/empty-content/index.mjs +2 -3
- package/dist/{empty-content-B1lwLr40.mjs → empty-content-C63GPJ5d.mjs} +3 -9
- package/dist/form/adapters/conform/index.mjs +237 -0
- package/dist/form/adapters/rhf/index.mjs +181 -0
- package/dist/form/index.mjs +3 -146
- package/dist/{use-stepper-DigoyHhX.mjs → form-BE1xBne4.mjs} +447 -601
- package/dist/get-field-constraints-BPMW8VvY.mjs +48 -0
- package/dist/grid/index.mjs +2 -3
- package/dist/hooks/index.mjs +3 -4
- package/dist/{use-debounce-MnfjH51L.mjs → hooks-DYjN7lvC.mjs} +1 -3
- package/dist/hover-card/index.mjs +2 -4
- package/dist/{hover-card-CEIauuie.mjs → hover-card-DDWWD5Hx.mjs} +2 -4
- package/dist/{icon-wrapper-BBK4z4tj.mjs → icon-wrapper-DuLp3RM1.mjs} +1 -3
- package/dist/icons/index.mjs +4 -5
- package/dist/index.mjs +66 -71
- package/dist/input/index.mjs +2 -5
- package/dist/{input-DEMoi_8F.mjs → input-DOmNpcQJ.mjs} +2 -4
- package/dist/{input-CYFN0Ap2.mjs → input-FKGqZypx.mjs} +3 -5
- package/dist/input-group/index.mjs +2 -7
- package/dist/{input-group-DJgYpOlq.mjs → input-group-DDtz-RT7.mjs} +5 -7
- package/dist/input-number/index.mjs +2 -6
- package/dist/{input-number-Cuy9CCg_.mjs → input-number-DEjXG2I6.mjs} +4 -6
- package/dist/input-with-addons/index.mjs +28 -3
- package/dist/label/index.mjs +2 -4
- package/dist/{label-mOg07fuQ.mjs → label-cnAhY-ej.mjs} +3 -6
- package/dist/loader-overlay/index.mjs +2 -3
- package/dist/{loader-overlay-8IWX_1Ga.mjs → loader-overlay-BTFdkp7W.mjs} +3 -5
- package/dist/map/index.mjs +2 -14
- package/dist/{map-CaI1EshG.mjs → map-Cw7u8r6E.mjs} +10 -14
- package/dist/{map-leaflet-imports-J7w1V7mh.mjs → map-leaflet-imports-D6nTEOIh.mjs} +1 -2
- package/dist/more-actions/index.mjs +2 -5
- package/dist/{more-actions-BO5ikUxY.mjs → more-actions-BNQ2yfWZ.mjs} +5 -7
- package/dist/nprogress/index.mjs +1 -3
- package/dist/page-title/index.mjs +2 -3
- package/dist/{page-title-DWteBy1E.mjs → page-title-CNiRNZ7p.mjs} +2 -4
- package/dist/popover/index.mjs +2 -4
- package/dist/{popover-ugw5MpuT.mjs → popover-FJAcbYoH.mjs} +2 -4
- package/dist/radio-group/index.mjs +2 -4
- package/dist/{radio-group-_gMymwnb.mjs → radio-group-CiITR0LO.mjs} +3 -6
- package/dist/select/index.mjs +2 -4
- package/dist/{select-BZOKWjlH.mjs → select-CiLR_DiQ.mjs} +3 -6
- package/dist/separator/index.mjs +2 -4
- package/dist/{separator-BzyALya2.mjs → separator-DXVTncCK.mjs} +2 -4
- package/dist/sheet/index.mjs +3 -5
- package/dist/{sheet-BX6lae56.mjs → sheet-BzXksqYY.mjs} +4 -6
- package/dist/{sheet-DAcFjaGw.mjs → sheet-Di3b-oPu.mjs} +2 -4
- package/dist/sidebar/index.mjs +2 -10
- package/dist/{sidebar-B3EV33mG.mjs → sidebar-BnhnjvfO.mjs} +10 -14
- package/dist/skeleton/index.mjs +2 -5
- package/dist/{skeleton-2vQ0vFQk.mjs → skeleton-BKl4mfJt.mjs} +2 -4
- package/dist/{skeleton-BgOwIgE0.mjs → skeleton-D1MUhAVo.mjs} +3 -5
- package/dist/spinner/index.mjs +2 -4
- package/dist/{spinner-osyXAlhr.mjs → spinner-OyOf9-Yu.mjs} +2 -4
- package/dist/{spinner.icon-C0MbtgqX.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-C60FpEal.mjs → switch-DQJQhPIQ.mjs} +3 -6
- package/dist/table/index.mjs +2 -4
- package/dist/{table-Cl3UzIhI.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-DR2gukhL.mjs → tag-input-BKed-cul.mjs} +5 -7
- package/dist/task-queue/index.mjs +2 -7
- package/dist/{task-queue-dropdown-C9KHKbGh.mjs → task-queue-dropdown-Di_Wjspz.mjs} +10 -30
- package/dist/textarea/index.mjs +2 -5
- package/dist/{textarea-CVo38n3S.mjs → textarea-94vq_G_S.mjs} +2 -4
- package/dist/{textarea-CZF5n57i.mjs → textarea-BwD-MmTV.mjs} +3 -5
- package/dist/theme/index.mjs +2 -3
- package/dist/{theme.provider-TUHlMsjM.mjs → themes-DG1md8FI.mjs} +1 -6
- package/dist/{to-api-format-naIpF-NI.mjs → to-api-format-Cq4prffn.mjs} +9 -18
- package/dist/toast/index.mjs +3 -3
- package/dist/{use-toast-By9HuFwP.mjs → toast-BWnN5fax.mjs} +5 -42
- package/dist/toast-DpxlFNNx.mjs +37 -0
- package/dist/tooltip/index.mjs +2 -4
- package/dist/{tooltip-CuX2jQA9.mjs → tooltip-Cruvl5F6.mjs} +3 -6
- package/dist/types-BZNk3q65.mjs +357 -0
- package/dist/typography/index.mjs +2 -3
- package/dist/{typography-Iap9fU5P.mjs → typography-ClB8k55E.mjs} +2 -4
- package/dist/{use-copy-to-clipboard-n29wJwvW.mjs → use-copy-to-clipboard-BGdTmkFV.mjs} +2 -4
- package/dist/utils/index.mjs +2 -3
- package/dist/{utils-DJboNGQM.mjs → utils-C8KwMfT_.mjs} +1 -3
- package/dist/visually-hidden/index.mjs +2 -3
- package/dist/{visuallyhidden-BJsQCmg-.mjs → visuallyhidden-BLUsJpYH.mjs} +1 -3
- package/package.json +44 -3
- package/dist/input-with-addons-B8rzNhpq.mjs +0 -30
- package/dist/stepper-BMsn7I78.mjs +0 -323
- package/dist/tabs-DJU7JA3h.mjs +0 -52
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { CopyIcon } from "lucide-react";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
5
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
6
|
//#region src/components/base/typography/typography.tsx
|
|
8
7
|
const titleVariants = cva("font-semibold leading-tight tracking-tight", {
|
|
9
8
|
variants: {
|
|
@@ -195,6 +194,5 @@ function Code({ className, as = "code", children, ...props }) {
|
|
|
195
194
|
children
|
|
196
195
|
});
|
|
197
196
|
}
|
|
198
|
-
|
|
199
197
|
//#endregion
|
|
200
|
-
export { ListItem as a, Title as c, titleVariants as d, List as i, paragraphVariants as l, Code as n, Paragraph as o, Link as r, Text as s, Blockquote as t, textVariants as u };
|
|
198
|
+
export { ListItem as a, Title as c, titleVariants as d, List as i, paragraphVariants as l, Code as n, Paragraph as o, Link as r, Text as s, Blockquote as t, textVariants as u };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as toast } from "./toast-BWnN5fax.mjs";
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
-
|
|
4
3
|
//#region src/hooks/use-copy-to-clipboard.ts
|
|
5
4
|
function useCopyToClipboard() {
|
|
6
5
|
const [isCopied, setIsCopied] = useState(false);
|
|
@@ -26,6 +25,5 @@ function useCopyToClipboard() {
|
|
|
26
25
|
}
|
|
27
26
|
}, [])];
|
|
28
27
|
}
|
|
29
|
-
|
|
30
28
|
//#endregion
|
|
31
|
-
export { useCopyToClipboard as t };
|
|
29
|
+
export { useCopyToClipboard as t };
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { t as cn } from "../cn-
|
|
2
|
-
|
|
3
|
-
export { cn };
|
|
1
|
+
import { t as cn } from "../cn-D2KYQ917.mjs";
|
|
2
|
+
export { cn };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { clsx } from "clsx";
|
|
2
2
|
import { twMerge } from "tailwind-merge";
|
|
3
|
-
|
|
4
3
|
//#region ../shadcn/lib/utils.ts
|
|
5
4
|
/**
|
|
6
5
|
* shadcn/ui Utilities
|
|
@@ -15,6 +14,5 @@ import { twMerge } from "tailwind-merge";
|
|
|
15
14
|
function cn(...inputs) {
|
|
16
15
|
return twMerge(clsx(inputs));
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
//#endregion
|
|
20
|
-
export { cn as t };
|
|
18
|
+
export { cn as t };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { t as VisuallyHidden } from "../visuallyhidden-
|
|
2
|
-
|
|
3
|
-
export { VisuallyHidden };
|
|
1
|
+
import { t as VisuallyHidden } from "../visuallyhidden-BLUsJpYH.mjs";
|
|
2
|
+
export { VisuallyHidden };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datum-cloud/datum-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0-alpha.b817c77",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"url": "https://github.com/datum-cloud/datum-ui"
|
|
@@ -84,6 +84,11 @@
|
|
|
84
84
|
"types": "./dist/components/base/chart/index.d.ts",
|
|
85
85
|
"default": "./dist/chart/index.mjs"
|
|
86
86
|
},
|
|
87
|
+
"./code-editor": {
|
|
88
|
+
"source": "./src/components/features/code-editor/index.ts",
|
|
89
|
+
"types": "./dist/components/features/code-editor/index.d.ts",
|
|
90
|
+
"default": "./dist/code-editor/index.mjs"
|
|
91
|
+
},
|
|
87
92
|
"./checkbox": {
|
|
88
93
|
"source": "./src/components/base/checkbox/index.ts",
|
|
89
94
|
"types": "./dist/components/base/checkbox/index.d.ts",
|
|
@@ -229,6 +234,16 @@
|
|
|
229
234
|
"types": "./dist/components/features/form/index.d.ts",
|
|
230
235
|
"default": "./dist/form/index.mjs"
|
|
231
236
|
},
|
|
237
|
+
"./form/adapters/conform": {
|
|
238
|
+
"source": "./src/components/features/form/adapters/conform/index.ts",
|
|
239
|
+
"types": "./dist/components/features/form/adapters/conform/index.d.ts",
|
|
240
|
+
"default": "./dist/form/adapters/conform/index.mjs"
|
|
241
|
+
},
|
|
242
|
+
"./form/adapters/rhf": {
|
|
243
|
+
"source": "./src/components/features/form/adapters/rhf/index.ts",
|
|
244
|
+
"types": "./dist/components/features/form/adapters/rhf/index.d.ts",
|
|
245
|
+
"default": "./dist/form/adapters/rhf/index.mjs"
|
|
246
|
+
},
|
|
232
247
|
"./grid": {
|
|
233
248
|
"types": "./dist/components/features/grid/index.d.ts",
|
|
234
249
|
"style": "./dist/grid/style.css",
|
|
@@ -316,16 +331,20 @@
|
|
|
316
331
|
"peerDependencies": {
|
|
317
332
|
"@conform-to/react": ">=1",
|
|
318
333
|
"@conform-to/zod": ">=1",
|
|
334
|
+
"@hookform/resolvers": ">=5",
|
|
335
|
+
"@monaco-editor/react": "^4.7.0",
|
|
319
336
|
"@stepperize/react": ">=4",
|
|
320
337
|
"@tanstack/react-table": ">=8",
|
|
321
338
|
"@tanstack/react-virtual": ">=3",
|
|
322
339
|
"date-fns": ">=4",
|
|
323
340
|
"date-fns-tz": ">=3",
|
|
341
|
+
"js-yaml": "^4.1.0",
|
|
324
342
|
"leaflet": ">=1.9",
|
|
325
343
|
"leaflet-draw": ">=1",
|
|
326
344
|
"leaflet.fullscreen": ">=5",
|
|
327
345
|
"leaflet.markercluster": ">=1.5",
|
|
328
346
|
"lucide-react": ">=0.400",
|
|
347
|
+
"monaco-editor": ">=0.44.0",
|
|
329
348
|
"motion": ">=11",
|
|
330
349
|
"nprogress": ">=0.2",
|
|
331
350
|
"nuqs": ">=2",
|
|
@@ -333,12 +352,13 @@
|
|
|
333
352
|
"react-day-picker": ">=9",
|
|
334
353
|
"react-dom": ">=19",
|
|
335
354
|
"react-dropzone": ">=14",
|
|
355
|
+
"react-hook-form": ">=7.55",
|
|
336
356
|
"react-leaflet": ">=5",
|
|
337
357
|
"react-leaflet-markercluster": ">=5.0.0-rc.0",
|
|
338
358
|
"react-number-format": ">=5",
|
|
339
359
|
"recharts": ">=2",
|
|
340
360
|
"sonner": ">=2",
|
|
341
|
-
"zod": ">=
|
|
361
|
+
"zod": ">=4"
|
|
342
362
|
},
|
|
343
363
|
"peerDependenciesMeta": {
|
|
344
364
|
"@conform-to/react": {
|
|
@@ -347,6 +367,12 @@
|
|
|
347
367
|
"@conform-to/zod": {
|
|
348
368
|
"optional": true
|
|
349
369
|
},
|
|
370
|
+
"@hookform/resolvers": {
|
|
371
|
+
"optional": true
|
|
372
|
+
},
|
|
373
|
+
"@monaco-editor/react": {
|
|
374
|
+
"optional": true
|
|
375
|
+
},
|
|
350
376
|
"@stepperize/react": {
|
|
351
377
|
"optional": true
|
|
352
378
|
},
|
|
@@ -362,6 +388,9 @@
|
|
|
362
388
|
"date-fns-tz": {
|
|
363
389
|
"optional": true
|
|
364
390
|
},
|
|
391
|
+
"js-yaml": {
|
|
392
|
+
"optional": true
|
|
393
|
+
},
|
|
365
394
|
"leaflet": {
|
|
366
395
|
"optional": true
|
|
367
396
|
},
|
|
@@ -375,6 +404,9 @@
|
|
|
375
404
|
"optional": true
|
|
376
405
|
},
|
|
377
406
|
"lucide-react": {},
|
|
407
|
+
"monaco-editor": {
|
|
408
|
+
"optional": true
|
|
409
|
+
},
|
|
378
410
|
"motion": {
|
|
379
411
|
"optional": true
|
|
380
412
|
},
|
|
@@ -390,6 +422,9 @@
|
|
|
390
422
|
"react-dropzone": {
|
|
391
423
|
"optional": true
|
|
392
424
|
},
|
|
425
|
+
"react-hook-form": {
|
|
426
|
+
"optional": true
|
|
427
|
+
},
|
|
393
428
|
"react-leaflet": {
|
|
394
429
|
"optional": true
|
|
395
430
|
},
|
|
@@ -435,12 +470,15 @@
|
|
|
435
470
|
"devDependencies": {
|
|
436
471
|
"@conform-to/react": "^1.17.1",
|
|
437
472
|
"@conform-to/zod": "^1.17.1",
|
|
473
|
+
"@hookform/resolvers": "^5.2.2",
|
|
474
|
+
"@monaco-editor/react": "^4.7.0",
|
|
438
475
|
"@stepperize/react": "^6.1.0",
|
|
439
476
|
"@tanstack/react-table": "^8.21.3",
|
|
440
477
|
"@tanstack/react-virtual": "^3.13.19",
|
|
441
478
|
"@testing-library/jest-dom": "^6",
|
|
442
479
|
"@testing-library/react": "^16",
|
|
443
480
|
"@testing-library/user-event": "^14",
|
|
481
|
+
"@types/js-yaml": "^4.0.9",
|
|
444
482
|
"@types/leaflet": "^1.9.21",
|
|
445
483
|
"@types/leaflet-draw": "^1.0.13",
|
|
446
484
|
"@types/leaflet.fullscreen": "^5.2.0",
|
|
@@ -451,12 +489,14 @@
|
|
|
451
489
|
"date-fns": "^4.1.0",
|
|
452
490
|
"date-fns-tz": "^3.2.0",
|
|
453
491
|
"eslint": "^9.39.3",
|
|
492
|
+
"js-yaml": "^4.1.1",
|
|
454
493
|
"jsdom": "^26",
|
|
455
494
|
"leaflet": "^1.9.4",
|
|
456
495
|
"leaflet-draw": "^1.0.4",
|
|
457
496
|
"leaflet.fullscreen": "^5.3.0",
|
|
458
497
|
"leaflet.markercluster": "^1.5.3",
|
|
459
498
|
"lucide-react": "^0.556",
|
|
499
|
+
"monaco-editor": "^0.55.1",
|
|
460
500
|
"motion": "^12.34.4",
|
|
461
501
|
"nprogress": "^0.2.0",
|
|
462
502
|
"nuqs": "^2.8.9",
|
|
@@ -464,12 +504,13 @@
|
|
|
464
504
|
"react-day-picker": "^9.14.0",
|
|
465
505
|
"react-dom": "^19",
|
|
466
506
|
"react-dropzone": "^15.0.0",
|
|
507
|
+
"react-hook-form": "^7.71.2",
|
|
467
508
|
"react-leaflet": "^5.0.0",
|
|
468
509
|
"react-leaflet-markercluster": "5.0.0-rc.0",
|
|
469
510
|
"react-number-format": "^5.4.4",
|
|
470
511
|
"sonner": "^2.0.7",
|
|
471
512
|
"tailwindcss": "^4.2.1",
|
|
472
|
-
"tsdown": "^0.
|
|
513
|
+
"tsdown": "^0.21.5",
|
|
473
514
|
"typescript": "^5.9",
|
|
474
515
|
"vitest": "^3",
|
|
475
516
|
"zod": "^4.3.6",
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { t as cn } from "./cn-DWCc1QRE.mjs";
|
|
2
|
-
import "react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/components/features/input-with-addons/input-with-addons.tsx
|
|
6
|
-
function InputWithAddons({ ref, leading, trailing, containerClassName, className, ...props }) {
|
|
7
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
8
|
-
className: cn("border-input-border bg-input-background/50 text-input-foreground placeholder:text-input-placeholder", "focus-within:border-input-focus-border focus-within:shadow-(--input-focus-shadow)", "group flex h-10 w-full items-stretch overflow-hidden rounded-lg border transition-all", "focus-within:ring-0 focus-within:ring-offset-0 focus-within:outline-hidden", containerClassName),
|
|
9
|
-
children: [
|
|
10
|
-
leading ? /* @__PURE__ */ jsx("div", {
|
|
11
|
-
className: "text-muted-foreground flex items-center bg-transparent pl-3",
|
|
12
|
-
children: leading
|
|
13
|
-
}) : null,
|
|
14
|
-
/* @__PURE__ */ jsx("input", {
|
|
15
|
-
className: cn("flex-1 bg-transparent px-3 text-base md:text-sm", "placeholder:text-input-placeholder text-input-foreground", "focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:outline-hidden", "focus-visible:border-transparent focus-visible:shadow-none", "read-only:cursor-not-allowed read-only:opacity-50 disabled:cursor-not-allowed disabled:opacity-50", "file:text-foreground file:border-0 file:bg-transparent file:text-sm file:font-medium", leading && "pl-2", trailing && "pr-2", className),
|
|
16
|
-
"data-slot": "input-with-addons",
|
|
17
|
-
ref,
|
|
18
|
-
...props
|
|
19
|
-
}),
|
|
20
|
-
trailing ? /* @__PURE__ */ jsx("div", {
|
|
21
|
-
className: "text-muted-foreground flex items-center bg-transparent pr-3",
|
|
22
|
-
children: trailing
|
|
23
|
-
}) : null
|
|
24
|
-
]
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
InputWithAddons.displayName = "InputWithAddons";
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export { InputWithAddons as t };
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
import { t as cn } from "./cn-DWCc1QRE.mjs";
|
|
2
|
-
import { t as Button } from "./button-D6AORsOz.mjs";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
|
-
import * as React$1 from "react";
|
|
5
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
7
|
-
import * as Stepperize from "@stepperize/react";
|
|
8
|
-
|
|
9
|
-
//#region src/components/features/stepper/stepper.tsx
|
|
10
|
-
const StepperContext = React$1.createContext(null);
|
|
11
|
-
function useStepperProvider() {
|
|
12
|
-
const context = React$1.use(StepperContext);
|
|
13
|
-
if (!context) throw new Error("useStepper must be used within a StepperProvider.");
|
|
14
|
-
return context;
|
|
15
|
-
}
|
|
16
|
-
const classForNavigationList = cva("flex gap-2", { variants: { variant: {
|
|
17
|
-
horizontal: "flex-row items-center justify-between",
|
|
18
|
-
vertical: "flex-col",
|
|
19
|
-
circle: "flex-row items-center justify-between"
|
|
20
|
-
} } });
|
|
21
|
-
const classForSeparator = cva([
|
|
22
|
-
"bg-muted",
|
|
23
|
-
"data-[state=completed]:bg-primary data-[disabled]:opacity-50",
|
|
24
|
-
"transition-all duration-300 ease-in-out"
|
|
25
|
-
], { variants: {
|
|
26
|
-
orientation: {
|
|
27
|
-
horizontal: "h-0.5 flex-1",
|
|
28
|
-
vertical: "h-full w-0.5"
|
|
29
|
-
},
|
|
30
|
-
labelOrientation: { vertical: "absolute left-[calc(50%+30px)] right-[calc(-50%+20px)] top-5 block shrink-0" }
|
|
31
|
-
} });
|
|
32
|
-
function defineStepper(...steps) {
|
|
33
|
-
const { Scoped, useStepper, steps: stepList, Stepper: StepperizePrimitives } = Stepperize.defineStepper(...steps);
|
|
34
|
-
const StepperContainer = ({ children, className, ...props }) => {
|
|
35
|
-
const methods = useStepper();
|
|
36
|
-
return /* @__PURE__ */ jsx("div", {
|
|
37
|
-
"date-component": "stepper",
|
|
38
|
-
className: cn("w-full", className),
|
|
39
|
-
...props,
|
|
40
|
-
children: typeof children === "function" ? children({ methods }) : children
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
return {
|
|
44
|
-
steps: stepList,
|
|
45
|
-
useStepper,
|
|
46
|
-
Stepper: {
|
|
47
|
-
...StepperizePrimitives,
|
|
48
|
-
Provider: ({ variant = "horizontal", labelOrientation = "horizontal", tracking = false, children, className, ...props }) => {
|
|
49
|
-
return /* @__PURE__ */ jsx(StepperContext, {
|
|
50
|
-
value: {
|
|
51
|
-
variant,
|
|
52
|
-
labelOrientation,
|
|
53
|
-
tracking
|
|
54
|
-
},
|
|
55
|
-
children: /* @__PURE__ */ jsx(Scoped, {
|
|
56
|
-
initialStep: props.initialStep,
|
|
57
|
-
initialMetadata: props.initialMetadata,
|
|
58
|
-
children: /* @__PURE__ */ jsx(StepperContainer, {
|
|
59
|
-
className,
|
|
60
|
-
...props,
|
|
61
|
-
children
|
|
62
|
-
})
|
|
63
|
-
})
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
Navigation: ({ children, "aria-label": ariaLabel = "Stepper Navigation", ...props }) => {
|
|
67
|
-
const { variant } = useStepperProvider();
|
|
68
|
-
return /* @__PURE__ */ jsx("nav", {
|
|
69
|
-
"date-component": "stepper-navigation",
|
|
70
|
-
"aria-label": ariaLabel,
|
|
71
|
-
role: "tablist",
|
|
72
|
-
...props,
|
|
73
|
-
children: /* @__PURE__ */ jsx("ol", {
|
|
74
|
-
"date-component": "stepper-navigation-list",
|
|
75
|
-
className: classForNavigationList({ variant }),
|
|
76
|
-
children
|
|
77
|
-
})
|
|
78
|
-
});
|
|
79
|
-
},
|
|
80
|
-
Step: ({ children, className, icon, ...props }) => {
|
|
81
|
-
const { variant, labelOrientation } = useStepperProvider();
|
|
82
|
-
const stepper = useStepper();
|
|
83
|
-
const steps = stepList;
|
|
84
|
-
const stepIndex = stepper.lookup.getIndex(props.of);
|
|
85
|
-
const step = steps[stepIndex];
|
|
86
|
-
const currentIndex = stepper.lookup.getIndex(stepper.state.current.data.id);
|
|
87
|
-
const isLast = stepper.lookup.getLast().id === props.of;
|
|
88
|
-
const isActive = stepper.state.current.data.id === props.of;
|
|
89
|
-
const dataState = getStepState(currentIndex, stepIndex);
|
|
90
|
-
const childMap = useStepChildren(children);
|
|
91
|
-
const title = childMap.get("title");
|
|
92
|
-
const description = childMap.get("description");
|
|
93
|
-
const panel = childMap.get("panel");
|
|
94
|
-
if (variant === "circle") return /* @__PURE__ */ jsxs("li", {
|
|
95
|
-
"date-component": "stepper-step",
|
|
96
|
-
className: cn("flex shrink-0 items-center gap-4 rounded-md transition-colors", className),
|
|
97
|
-
children: [/* @__PURE__ */ jsx(CircleStepIndicator, {
|
|
98
|
-
currentStep: stepIndex + 1,
|
|
99
|
-
totalSteps: steps.length
|
|
100
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
101
|
-
"date-component": "stepper-step-content",
|
|
102
|
-
className: "flex flex-col items-start gap-1",
|
|
103
|
-
children: [title, description]
|
|
104
|
-
})]
|
|
105
|
-
});
|
|
106
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
107
|
-
/* @__PURE__ */ jsxs("li", {
|
|
108
|
-
"date-component": "stepper-step",
|
|
109
|
-
className: cn([
|
|
110
|
-
"group peer relative flex items-center gap-2",
|
|
111
|
-
"data-[variant=vertical]:flex-row",
|
|
112
|
-
"data-[label-orientation=vertical]:w-full",
|
|
113
|
-
"data-[label-orientation=vertical]:flex-col",
|
|
114
|
-
"data-[label-orientation=vertical]:justify-center"
|
|
115
|
-
]),
|
|
116
|
-
"data-variant": variant,
|
|
117
|
-
"data-label-orientation": labelOrientation,
|
|
118
|
-
"data-state": dataState,
|
|
119
|
-
"data-disabled": props.disabled,
|
|
120
|
-
children: [
|
|
121
|
-
/* @__PURE__ */ jsx(Button, {
|
|
122
|
-
id: `step-${step.id}`,
|
|
123
|
-
"date-component": "stepper-step-indicator",
|
|
124
|
-
type: "button",
|
|
125
|
-
role: "tab",
|
|
126
|
-
tabIndex: dataState !== "inactive" ? 0 : -1,
|
|
127
|
-
className: cn("rounded-full", className),
|
|
128
|
-
variant: dataState !== "inactive" ? "default" : "secondary",
|
|
129
|
-
size: "icon",
|
|
130
|
-
"aria-controls": `step-panel-${props.of}`,
|
|
131
|
-
"aria-current": isActive ? "step" : void 0,
|
|
132
|
-
"aria-posinset": stepIndex + 1,
|
|
133
|
-
"aria-setsize": steps.length,
|
|
134
|
-
"aria-selected": isActive,
|
|
135
|
-
onKeyDown: (e) => onStepKeyDown(e, stepper.lookup.getNext(props.of), stepper.lookup.getPrev(props.of)),
|
|
136
|
-
...props,
|
|
137
|
-
children: icon ?? stepIndex + 1
|
|
138
|
-
}),
|
|
139
|
-
variant === "horizontal" && labelOrientation === "vertical" && /* @__PURE__ */ jsx(StepperSeparator, {
|
|
140
|
-
orientation: "horizontal",
|
|
141
|
-
labelOrientation,
|
|
142
|
-
isLast,
|
|
143
|
-
state: dataState,
|
|
144
|
-
disabled: props.disabled
|
|
145
|
-
}),
|
|
146
|
-
/* @__PURE__ */ jsxs("div", {
|
|
147
|
-
"date-component": "stepper-step-content",
|
|
148
|
-
className: "flex flex-col items-start",
|
|
149
|
-
children: [title, description]
|
|
150
|
-
})
|
|
151
|
-
]
|
|
152
|
-
}),
|
|
153
|
-
variant === "horizontal" && labelOrientation === "horizontal" && /* @__PURE__ */ jsx(StepperSeparator, {
|
|
154
|
-
orientation: "horizontal",
|
|
155
|
-
isLast,
|
|
156
|
-
state: dataState,
|
|
157
|
-
disabled: props.disabled
|
|
158
|
-
}),
|
|
159
|
-
variant === "vertical" && /* @__PURE__ */ jsxs("div", {
|
|
160
|
-
className: "flex gap-4",
|
|
161
|
-
children: [!isLast && /* @__PURE__ */ jsx("div", {
|
|
162
|
-
className: "flex justify-center ps-[calc(var(--spacing)_*_4.5_-_1px)]",
|
|
163
|
-
children: /* @__PURE__ */ jsx(StepperSeparator, {
|
|
164
|
-
orientation: "vertical",
|
|
165
|
-
isLast,
|
|
166
|
-
state: dataState,
|
|
167
|
-
disabled: props.disabled
|
|
168
|
-
})
|
|
169
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
170
|
-
className: "my-3 flex-1 ps-4",
|
|
171
|
-
children: panel
|
|
172
|
-
})]
|
|
173
|
-
})
|
|
174
|
-
] });
|
|
175
|
-
},
|
|
176
|
-
Title,
|
|
177
|
-
Description,
|
|
178
|
-
Panel: ({ children, asChild, ...props }) => {
|
|
179
|
-
const Comp = asChild ? Slot : "div";
|
|
180
|
-
const { tracking } = useStepperProvider();
|
|
181
|
-
return /* @__PURE__ */ jsx(Comp, {
|
|
182
|
-
"date-component": "stepper-step-panel",
|
|
183
|
-
ref: (node) => scrollIntoStepperPanel(node, tracking),
|
|
184
|
-
...props,
|
|
185
|
-
children
|
|
186
|
-
});
|
|
187
|
-
},
|
|
188
|
-
Controls: ({ children, className, asChild, ...props }) => {
|
|
189
|
-
return /* @__PURE__ */ jsx(asChild ? Slot : "div", {
|
|
190
|
-
"date-component": "stepper-controls",
|
|
191
|
-
className: cn("flex justify-end gap-4", className),
|
|
192
|
-
...props,
|
|
193
|
-
children
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
function Title({ children, className, asChild, ...props }) {
|
|
200
|
-
return /* @__PURE__ */ jsx(asChild ? Slot : "h4", {
|
|
201
|
-
"date-component": "stepper-step-title",
|
|
202
|
-
className: cn("text-base font-medium", className),
|
|
203
|
-
...props,
|
|
204
|
-
children
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
function Description({ children, className, asChild, ...props }) {
|
|
208
|
-
return /* @__PURE__ */ jsx(asChild ? Slot : "p", {
|
|
209
|
-
"date-component": "stepper-step-description",
|
|
210
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
211
|
-
...props,
|
|
212
|
-
children
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
function StepperSeparator({ orientation, isLast, labelOrientation, state, disabled }) {
|
|
216
|
-
if (isLast) return null;
|
|
217
|
-
return /* @__PURE__ */ jsx("div", {
|
|
218
|
-
"date-component": "stepper-separator",
|
|
219
|
-
"data-orientation": orientation,
|
|
220
|
-
"data-state": state,
|
|
221
|
-
"data-disabled": disabled,
|
|
222
|
-
role: "separator",
|
|
223
|
-
tabIndex: -1,
|
|
224
|
-
className: classForSeparator({
|
|
225
|
-
orientation,
|
|
226
|
-
labelOrientation
|
|
227
|
-
})
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
function CircleStepIndicator({ currentStep, totalSteps, size = 80, strokeWidth = 6 }) {
|
|
231
|
-
const radius = (size - strokeWidth) / 2;
|
|
232
|
-
const circumference = radius * 2 * Math.PI;
|
|
233
|
-
const dashOffset = circumference - circumference * (currentStep / totalSteps * 100) / 100;
|
|
234
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
235
|
-
"date-component": "stepper-step-indicator",
|
|
236
|
-
role: "progressbar",
|
|
237
|
-
"aria-valuenow": currentStep,
|
|
238
|
-
"aria-valuemin": 1,
|
|
239
|
-
"aria-valuemax": totalSteps,
|
|
240
|
-
tabIndex: -1,
|
|
241
|
-
className: "relative inline-flex items-center justify-center",
|
|
242
|
-
children: [/* @__PURE__ */ jsxs("svg", {
|
|
243
|
-
width: size,
|
|
244
|
-
height: size,
|
|
245
|
-
children: [
|
|
246
|
-
/* @__PURE__ */ jsx("title", { children: "Step Indicator" }),
|
|
247
|
-
/* @__PURE__ */ jsx("circle", {
|
|
248
|
-
cx: size / 2,
|
|
249
|
-
cy: size / 2,
|
|
250
|
-
r: radius,
|
|
251
|
-
fill: "none",
|
|
252
|
-
stroke: "currentColor",
|
|
253
|
-
strokeWidth,
|
|
254
|
-
className: "text-muted-foreground"
|
|
255
|
-
}),
|
|
256
|
-
/* @__PURE__ */ jsx("circle", {
|
|
257
|
-
cx: size / 2,
|
|
258
|
-
cy: size / 2,
|
|
259
|
-
r: radius,
|
|
260
|
-
fill: "none",
|
|
261
|
-
stroke: "currentColor",
|
|
262
|
-
strokeWidth,
|
|
263
|
-
strokeDasharray: circumference,
|
|
264
|
-
strokeDashoffset: dashOffset,
|
|
265
|
-
className: "text-primary transition-all duration-300 ease-in-out",
|
|
266
|
-
transform: `rotate(-90 ${size / 2} ${size / 2})`
|
|
267
|
-
})
|
|
268
|
-
]
|
|
269
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
270
|
-
className: "absolute inset-0 flex items-center justify-center",
|
|
271
|
-
children: /* @__PURE__ */ jsxs("span", {
|
|
272
|
-
className: "text-sm font-medium",
|
|
273
|
-
"aria-live": "polite",
|
|
274
|
-
children: [
|
|
275
|
-
currentStep,
|
|
276
|
-
" ",
|
|
277
|
-
"of",
|
|
278
|
-
totalSteps
|
|
279
|
-
]
|
|
280
|
-
})
|
|
281
|
-
})]
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
function scrollIntoStepperPanel(node, tracking) {
|
|
285
|
-
if (tracking) node?.scrollIntoView({
|
|
286
|
-
behavior: "smooth",
|
|
287
|
-
block: "center"
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
function useStepChildren(children) {
|
|
291
|
-
return React$1.useMemo(() => extractChildren(children), [children]);
|
|
292
|
-
}
|
|
293
|
-
function extractChildren(children) {
|
|
294
|
-
const childrenArray = React$1.Children.toArray(children);
|
|
295
|
-
const map = /* @__PURE__ */ new Map();
|
|
296
|
-
for (const child of childrenArray) if (React$1.isValidElement(child)) if (child.type === Title) map.set("title", child);
|
|
297
|
-
else if (child.type === Description) map.set("description", child);
|
|
298
|
-
else map.set("panel", child);
|
|
299
|
-
return map;
|
|
300
|
-
}
|
|
301
|
-
function onStepKeyDown(e, nextStep, prevStep) {
|
|
302
|
-
const { key } = e;
|
|
303
|
-
const directions = {
|
|
304
|
-
next: ["ArrowRight", "ArrowDown"],
|
|
305
|
-
prev: ["ArrowLeft", "ArrowUp"]
|
|
306
|
-
};
|
|
307
|
-
if (directions.next.includes(key) || directions.prev.includes(key)) {
|
|
308
|
-
const direction = directions.next.includes(key) ? "next" : "prev";
|
|
309
|
-
const step = direction === "next" ? nextStep : prevStep;
|
|
310
|
-
if (!step) return;
|
|
311
|
-
const stepElement = document.getElementById(`step-${step.id}`);
|
|
312
|
-
if (!stepElement) return;
|
|
313
|
-
if (stepElement.parentElement?.getAttribute("data-state") !== "inactive" || direction === "prev") stepElement.focus();
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
function getStepState(currentIndex, stepIndex) {
|
|
317
|
-
if (currentIndex === stepIndex) return "active";
|
|
318
|
-
if (currentIndex > stepIndex) return "completed";
|
|
319
|
-
return "inactive";
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
//#endregion
|
|
323
|
-
export { defineStepper as t };
|
package/dist/tabs-DJU7JA3h.mjs
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { t as cn } from "./cn-DWCc1QRE.mjs";
|
|
2
|
-
import "react";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
5
|
-
|
|
6
|
-
//#region src/components/base/tabs/tabs.tsx
|
|
7
|
-
/**
|
|
8
|
-
* Datum Tabs Component
|
|
9
|
-
* Extends shadcn Tabs with:
|
|
10
|
-
* - TabsLinkTrigger for router-agnostic link integration
|
|
11
|
-
* - Dark mode customizations
|
|
12
|
-
*/
|
|
13
|
-
function Tabs({ className, ...props }) {
|
|
14
|
-
return /* @__PURE__ */ jsx(TabsPrimitive.Root, {
|
|
15
|
-
className: cn("flex flex-col gap-2", className),
|
|
16
|
-
...props
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function TabsList({ className, ...props }) {
|
|
20
|
-
return /* @__PURE__ */ jsx(TabsPrimitive.List, {
|
|
21
|
-
className: cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1", className),
|
|
22
|
-
...props
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function TabsTrigger({ className, ...props }) {
|
|
26
|
-
return /* @__PURE__ */ jsx(TabsPrimitive.Trigger, {
|
|
27
|
-
className: cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground data-[state=active]:text-foreground dark:hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
28
|
-
...props
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function TabsContent({ className, ...props }) {
|
|
32
|
-
return /* @__PURE__ */ jsx(TabsPrimitive.Content, {
|
|
33
|
-
className: cn("flex-1 outline-none", className),
|
|
34
|
-
...props
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function TabsLinkTrigger({ value, href, linkComponent: LinkComp = "a", children, className, ...props }) {
|
|
38
|
-
const linkProps = LinkComp === "a" ? { href } : { to: href };
|
|
39
|
-
return /* @__PURE__ */ jsx(TabsTrigger, {
|
|
40
|
-
value,
|
|
41
|
-
asChild: true,
|
|
42
|
-
className,
|
|
43
|
-
...props,
|
|
44
|
-
children: /* @__PURE__ */ jsx(LinkComp, {
|
|
45
|
-
...linkProps,
|
|
46
|
-
children
|
|
47
|
-
})
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
//#endregion
|
|
52
|
-
export { TabsTrigger as a, TabsList as i, TabsContent as n, TabsLinkTrigger as r, Tabs as t };
|