@nxgt/material-vue 0.19.4 → 0.21.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 +93 -0
- package/dist/HoverCardTrigger-CftN4TfW.js +415 -0
- package/dist/{camera-Blw7itHc.js → camera-Cfp_DpaN.js} +5 -5
- package/dist/{components-Qo2-inmY.js → components-Do7bPo_-.js} +11700 -12103
- package/dist/components.js +6 -5
- package/dist/dnd.js +1 -1
- package/dist/lib/map/components/consts.d.ts +18 -0
- package/dist/lib/map/components/index.d.ts +7 -0
- package/dist/lib/map/components/location-field.vue.d.ts +27 -0
- package/dist/lib/map/components/location-form-field.vue.d.ts +7 -0
- package/dist/lib/map/components/map.vue.d.ts +26 -0
- package/dist/lib/map/components/partials/index.d.ts +7 -0
- package/dist/lib/map/components/partials/location-marker.vue.d.ts +22 -0
- package/dist/lib/map/components/partials/location-preview.vue.d.ts +18 -0
- package/dist/lib/map/components/partials/map-actions.vue.d.ts +10 -0
- package/dist/lib/map/components/partials/marker.vue.d.ts +32 -0
- package/dist/lib/map/index.d.ts +43 -0
- package/dist/lib/map/use-geolocation.d.ts +27 -0
- package/dist/main.js +9 -8
- package/dist/map.js +363 -0
- package/dist/material-vue.css +1 -1
- package/dist/{pdf-outline-sidebar-CgWY8A3F.js → pdf-outline-sidebar-DhTW6mJ0.js} +1 -1
- package/dist/{pdf-page-C4VLdj70.js → pdf-page-D4x_NxiO.js} +1 -1
- package/dist/{pdf-page-list-DArCDZ_7.js → pdf-page-list-DkhiXStw.js} +2 -2
- package/dist/{pdf-reader-BEHTdTqJ.js → pdf-reader-CiAIsMnH.js} +25 -24
- package/dist/{pdf-sidebar-BUKnhL1A.js → pdf-sidebar-1NktEcai.js} +2 -2
- package/dist/{pdf-thumbnail-sidebar-CFv1yXaX.js → pdf-thumbnail-sidebar-DFvXWs3_.js} +2 -2
- package/dist/{pdf-toolbar-CMYKhKIA.js → pdf-toolbar-mXnJfhUC.js} +50 -50
- package/dist/{stx-player-CB4oJut-.js → stx-player-C6DZOTxh.js} +5 -5
- package/lib/map/map.css +9 -0
- package/package.json +31 -6
- /package/dist/{dnd-BEuHe7sH.js → sortable-provider-BEuHe7sH.js} +0 -0
package/README.md
CHANGED
|
@@ -32,6 +32,7 @@ the [catalogue](#components) lists the React equivalent for each entry.
|
|
|
32
32
|
- [Setup](#setup): styles, Pinia and router, icons, Nuxt
|
|
33
33
|
- [Subpaths](#subpaths)
|
|
34
34
|
- [Usage](#usage)
|
|
35
|
+
- [Maps](#maps)
|
|
35
36
|
- [Components](#components)
|
|
36
37
|
- [Helpers](#helpers)
|
|
37
38
|
- [SSR](#ssr)
|
|
@@ -173,6 +174,7 @@ It does **not** add the stylesheet. Import it yourself as shown in
|
|
|
173
174
|
| --- | --- |
|
|
174
175
|
| `@nxgt/material-vue` | every barrel below, plus the compiled `style` condition (`dist/material-vue.css`, for apps without Tailwind) |
|
|
175
176
|
| `@nxgt/material-vue/components` | UI components and `*FormField` wrappers |
|
|
177
|
+
| `@nxgt/material-vue/map` | Leaflet maps, markers, a location field — **its own entry, not in the barrel** ([Maps](#maps)) |
|
|
176
178
|
| `@nxgt/material-vue/composables` | `useTheme`, `useIsClient`, `useIsMobile`, `useSearchParam`, … |
|
|
177
179
|
| `@nxgt/material-vue/dnd` | drag-and-drop primitives |
|
|
178
180
|
| `@nxgt/material-vue/i18n` | `I18nProvider`, `mergeResources`, `createTranslator`, … |
|
|
@@ -180,6 +182,7 @@ It does **not** add the stylesheet. Import it yourself as shown in
|
|
|
180
182
|
| `@nxgt/material-vue/models` | `Status<T>` |
|
|
181
183
|
| `@nxgt/material-vue/types` | shared function types |
|
|
182
184
|
| `@nxgt/material-vue/styles.css` | source Tailwind v4 tokens: **this** is what a Tailwind app imports |
|
|
185
|
+
| `@nxgt/material-vue/map.css` | leaflet's stylesheet, for the apps that use `./map`. Not part of `styles.css` |
|
|
183
186
|
| `@nxgt/material-vue/nuxt` | Nuxt module |
|
|
184
187
|
|
|
185
188
|
## Usage
|
|
@@ -333,6 +336,78 @@ export const useCounterStore = defineLocalStore<{ count: number }>('counter', {
|
|
|
333
336
|
// in setup(): const store = useCounterStore({ count: 5 });
|
|
334
337
|
```
|
|
335
338
|
|
|
339
|
+
## Maps
|
|
340
|
+
|
|
341
|
+
`@nxgt/material-vue/map` mirrors the React package's `@nxgt/material/map`:
|
|
342
|
+
`Map`, `Marker`, `LocationMarker`, `LocationPreview`, `MapActions`, the
|
|
343
|
+
`LocationField` / `LocationFormField` pair, and the `useGeolocation` composable
|
|
344
|
+
they share.
|
|
345
|
+
|
|
346
|
+
```sh
|
|
347
|
+
bun add leaflet @vue-leaflet/vue-leaflet
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
```vue
|
|
351
|
+
<script setup lang="ts">
|
|
352
|
+
import '@nxgt/material-vue/map.css';
|
|
353
|
+
import { LocationFormField } from '@nxgt/material-vue/map';
|
|
354
|
+
</script>
|
|
355
|
+
|
|
356
|
+
<template>
|
|
357
|
+
<LocationFormField name="address" label="Address" />
|
|
358
|
+
</template>
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Both are **optional peers**: an app that renders no map never has leaflet in its
|
|
362
|
+
tree. `useGeolocation` wraps `@vueuse/core`'s, a peer this package already
|
|
363
|
+
requires, rather than adding a second geolocation dependency.
|
|
364
|
+
|
|
365
|
+
### What `Map` does when you pass nothing
|
|
366
|
+
|
|
367
|
+
```vue
|
|
368
|
+
<Map class="size-96">
|
|
369
|
+
<Marker :position="[48.8566, 2.3522]" />
|
|
370
|
+
</Map>
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
An `LMap` with an OpenStreetMap tile layer and a zoom control, `use-global-leaflet`
|
|
374
|
+
off so it uses the copy it `import()`s itself. The defaults match the React
|
|
375
|
+
entry's, and are not neutral:
|
|
376
|
+
|
|
377
|
+
| Prop | Default | Why it matters |
|
|
378
|
+
| --- | --- | --- |
|
|
379
|
+
| `center` | the visitor's geolocation, falling back to `[5.44087, 10.06843]` (Yaoundé) | **omitting it asks the browser for location permission** — `Map` calls `useGeolocation` itself. Pass a `center` for a map that must not prompt. |
|
|
380
|
+
| `zoom` | `13` | |
|
|
381
|
+
| `scrollWheelZoom` | `false` | a map inside a scrolling page does not capture the wheel |
|
|
382
|
+
| `zoomControl` | `false` | leaflet's *own* control, off because the component renders an `LControlZoom` at `topleft`. Passing `true` gives you two. |
|
|
383
|
+
|
|
384
|
+
`useGeolocation` passes `enableHighAccuracy: false` and a 5 s timeout to
|
|
385
|
+
`@vueuse/core`, and returns `coords` as `{ latitude, longitude } | null` — null
|
|
386
|
+
until the first fix, rather than the two `NaN`s vueuse starts with.
|
|
387
|
+
|
|
388
|
+
**This entry is not auto-registered by the Nuxt module.** Every other component
|
|
389
|
+
is; this one is imported explicitly, because auto-registration would make
|
|
390
|
+
leaflet resolvable from an app that never renders a map.
|
|
391
|
+
|
|
392
|
+
**Rendering.** `@vue-leaflet/vue-leaflet` loads leaflet with `import()` when a
|
|
393
|
+
component mounts, so — unlike the React mirror, where `react-leaflet` imports it
|
|
394
|
+
statically — this entry *can* be imported in a server process without throwing.
|
|
395
|
+
Leaflet still only initialises in a browser, so the container renders empty until
|
|
396
|
+
it mounts: under Nuxt, wrap it in `<ClientOnly>`.
|
|
397
|
+
|
|
398
|
+
`MinimapControl` is the one thing the React entry has and this one does not: it
|
|
399
|
+
is built on `@react-leaflet/core`'s internals, which have no counterpart here.
|
|
400
|
+
The React `Marker`'s component-marker dependency has none either — here an
|
|
401
|
+
arbitrary marker is `LIcon`'s slot, which is the Vue-native way:
|
|
402
|
+
|
|
403
|
+
```vue
|
|
404
|
+
<Marker :position="[5.44, 10.07]">
|
|
405
|
+
<template #icon><MyPin /></template>
|
|
406
|
+
<template #tooltip>Warehouse</template>
|
|
407
|
+
</Marker>
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
|
|
336
411
|
## Components
|
|
337
412
|
|
|
338
413
|
All components are exported from `@nxgt/material-vue/components` and from the
|
|
@@ -728,6 +803,20 @@ renders the component.
|
|
|
728
803
|
export const MapView = clientOnly(defineAsyncComponent(() => import('./map-view.vue')));
|
|
729
804
|
```
|
|
730
805
|
|
|
806
|
+
- **The build checks both halves of this.** `bun run build` imports every built
|
|
807
|
+
entry in a runtime with no DOM, and fails if any entry statically reaches a
|
|
808
|
+
dependency that must stay behind `import()`. So a barrel that starts dragging
|
|
809
|
+
a browser-only module into your server is caught here, not at your boot.
|
|
810
|
+
- **A barrel drags its dependencies into YOUR bundle, even ones nothing
|
|
811
|
+
renders.** That is a bundler problem as much as a runtime one: the React
|
|
812
|
+
sibling `@nxgt/material` shipped `@react-pdf/renderer` in its barrel, which
|
|
813
|
+
pulled in `pdfkit`, whose standard fonts cannot be resolved inside a bundle —
|
|
814
|
+
three servers answered nothing at all, on every route, with every check green.
|
|
815
|
+
It is fixed there by a separate `@nxgt/material/print` entry. If you add a
|
|
816
|
+
dependency of that kind here, it gets its own entry too.
|
|
817
|
+
- **Maps are their own entry, for the same reason.** `@nxgt/material-vue/map` is
|
|
818
|
+
the only entry that reaches `leaflet`, which reads `window` while it is
|
|
819
|
+
evaluated. `bun run build` fails if another one does. See [Maps](#maps).
|
|
731
820
|
- **Language on first render.** Pass `initial-language` (from a cookie or
|
|
732
821
|
`Accept-Language`) to `I18nProvider` so the server and the client agree.
|
|
733
822
|
- **Never `<svg><title>`.** Some SSR frameworks hoist `<title>` into the
|
|
@@ -744,6 +833,10 @@ renders the component.
|
|
|
744
833
|
| App shell, `AppBreadcrumb` or `LinkButton` throws on `useRoute` | vue-router not installed | `app.use(router)` |
|
|
745
834
|
| `useI18nContext must be used within an I18nProvider` | your `useTranslation()` runs outside the provider | mount `I18nProvider` above the component |
|
|
746
835
|
| `ReferenceError: DOMMatrix` at server boot | a static `pdfjs-dist` import in your own code | `import()` + `clientOnly` |
|
|
836
|
+
| Built server answers nothing (`curl` → `000`) on every route, log names a module it cannot find | a bundled dependency whose own loader resolves paths at runtime — pdfkit's `#standard-fonts/*` is the known one, through `@react-pdf/renderer` | do not import such a dependency from a barrel; take it from its own entry (`@nxgt/material/print` in the React package) or leave the library external in your server build |
|
|
837
|
+
| Map renders as an empty box under SSR | leaflet initialises in the browser only | wrap it in `<ClientOnly>`; it is not an error ([Maps](#maps)) |
|
|
838
|
+
| `Cannot find package 'leaflet'` | the map peers are optional | `bun add leaflet @vue-leaflet/vue-leaflet` |
|
|
839
|
+
| Map tiles render with no controls or broken layout | leaflet's CSS missing | `import '@nxgt/material-vue/map.css'` — it is not part of `styles.css` |
|
|
747
840
|
| `jsbarcode` has no default export (Vite, no Nuxt) | CommonJS dependency not pre-bundled | `optimizeDeps.include: ['@nxgt/material-vue > jsbarcode']` |
|
|
748
841
|
| Both CSS files loaded, duplicated tokens | `styles.css` and the root `style` export imported together | keep one: `styles.css` with Tailwind, the compiled CSS without |
|
|
749
842
|
|
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
import { t as e } from "./utils-Cy-ByIEo.js";
|
|
2
|
+
import { r as t } from "./icon-button-Ghucx7Ah.js";
|
|
3
|
+
import { createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, guardReactiveProps as l, isRef as u, mergeProps as d, normalizeClass as f, normalizeProps as p, openBlock as m, renderSlot as h, toDisplayString as g, unref as _, useId as v, vModelText as y, withCtx as b, withDirectives as x } from "vue";
|
|
4
|
+
import { DialogClose as S, DialogContent as C, DialogDescription as w, DialogOverlay as T, DialogPortal as E, DialogRoot as D, DialogTitle as O, DialogTrigger as k, HoverCardContent as A, HoverCardPortal as j, HoverCardRoot as M, HoverCardTrigger as N, Label as P, useForwardProps as F, useForwardPropsEmits as I } from "reka-ui";
|
|
5
|
+
import { reactiveOmit as L, useVModel as R } from "@vueuse/core";
|
|
6
|
+
import { X as z } from "@lucide/vue";
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region lib/components/ui/helper-text/helper-text.vue
|
|
9
|
+
var B = /* @__PURE__ */ c({
|
|
10
|
+
__name: "helper-text",
|
|
11
|
+
props: {
|
|
12
|
+
error: { type: Boolean },
|
|
13
|
+
class: { type: [
|
|
14
|
+
Boolean,
|
|
15
|
+
null,
|
|
16
|
+
String,
|
|
17
|
+
Object,
|
|
18
|
+
Array
|
|
19
|
+
] }
|
|
20
|
+
},
|
|
21
|
+
setup(t) {
|
|
22
|
+
let n = t;
|
|
23
|
+
return (r, a) => (m(), i("div", {
|
|
24
|
+
"data-slot": "helper-text",
|
|
25
|
+
"data-test": "typogaphy",
|
|
26
|
+
class: f(_(e)("overflow-auto in-[[data-state=selected]]:text-primary-foreground text-[10px] text-muted-foreground flex pl-0.5 truncate text-wrap", { "text-error": t.error }, n.class))
|
|
27
|
+
}, [h(r.$slots, "default")], 2));
|
|
28
|
+
}
|
|
29
|
+
}), V = {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: "inline-flex"
|
|
32
|
+
}, H = /* @__PURE__ */ c({
|
|
33
|
+
__name: "Label",
|
|
34
|
+
props: {
|
|
35
|
+
for: {},
|
|
36
|
+
asChild: { type: Boolean },
|
|
37
|
+
as: {},
|
|
38
|
+
class: { type: [
|
|
39
|
+
Boolean,
|
|
40
|
+
null,
|
|
41
|
+
String,
|
|
42
|
+
Object,
|
|
43
|
+
Array
|
|
44
|
+
] },
|
|
45
|
+
withAsterisk: { type: Boolean }
|
|
46
|
+
},
|
|
47
|
+
setup(t) {
|
|
48
|
+
let r = t, o = L(r, "class");
|
|
49
|
+
return (s, c) => (m(), n(_(P), d({ "data-slot": "label" }, _(o), { class: _(e)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", r.class) }), {
|
|
50
|
+
default: b(() => [t.withAsterisk ? (m(), i("span", V, [h(s.$slots, "default"), c[0] ||= a("span", { class: "text-error" }, "*", -1)])) : h(s.$slots, "default", {}, void 0, void 0, 1)]),
|
|
51
|
+
_: 3
|
|
52
|
+
}, 16, ["class"]));
|
|
53
|
+
}
|
|
54
|
+
}), U = ["data-slot"], W = /* @__PURE__ */ c({
|
|
55
|
+
__name: "Input",
|
|
56
|
+
props: {
|
|
57
|
+
defaultValue: {},
|
|
58
|
+
modelValue: {},
|
|
59
|
+
class: { type: [
|
|
60
|
+
Boolean,
|
|
61
|
+
null,
|
|
62
|
+
String,
|
|
63
|
+
Object,
|
|
64
|
+
Array
|
|
65
|
+
] }
|
|
66
|
+
},
|
|
67
|
+
emits: ["update:modelValue"],
|
|
68
|
+
setup(t, { emit: n }) {
|
|
69
|
+
let r = t, a = R(r, "modelValue", n, {
|
|
70
|
+
passive: !0,
|
|
71
|
+
defaultValue: r.defaultValue
|
|
72
|
+
});
|
|
73
|
+
return (t, n) => x((m(), i("input", {
|
|
74
|
+
"onUpdate:modelValue": n[0] ||= (e) => u(a) ? a.value = e : null,
|
|
75
|
+
"data-slot": t.$attrs["data-slot"] ?? "input",
|
|
76
|
+
class: f(_(e)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", r.class))
|
|
77
|
+
}, null, 10, U)), [[y, _(a)]]);
|
|
78
|
+
}
|
|
79
|
+
}), G = /* @__PURE__ */ c({
|
|
80
|
+
inheritAttrs: !1,
|
|
81
|
+
__name: "text-field",
|
|
82
|
+
props: {
|
|
83
|
+
label: {},
|
|
84
|
+
helperText: {},
|
|
85
|
+
error: { type: Boolean },
|
|
86
|
+
required: { type: Boolean },
|
|
87
|
+
disabled: { type: Boolean },
|
|
88
|
+
id: {},
|
|
89
|
+
name: {},
|
|
90
|
+
placeholder: {},
|
|
91
|
+
type: {},
|
|
92
|
+
modelValue: {},
|
|
93
|
+
class: { type: [
|
|
94
|
+
Boolean,
|
|
95
|
+
null,
|
|
96
|
+
String,
|
|
97
|
+
Object,
|
|
98
|
+
Array
|
|
99
|
+
] }
|
|
100
|
+
},
|
|
101
|
+
emits: ["update:modelValue"],
|
|
102
|
+
setup(t, { emit: c }) {
|
|
103
|
+
let l = t, u = c, p = v(), y = () => l.id ?? p;
|
|
104
|
+
return (c, p) => (m(), i("div", {
|
|
105
|
+
"data-slot": "text-field",
|
|
106
|
+
class: f(_(e)("grid w-full gap-1.5", l.class))
|
|
107
|
+
}, [
|
|
108
|
+
t.label ? (m(), n(H, {
|
|
109
|
+
key: 0,
|
|
110
|
+
"with-asterisk": t.required,
|
|
111
|
+
for: y()
|
|
112
|
+
}, {
|
|
113
|
+
default: b(() => [o(g(t.label), 1)]),
|
|
114
|
+
_: 1
|
|
115
|
+
}, 8, ["with-asterisk", "for"])) : r("", !0),
|
|
116
|
+
a("div", { class: f(_(e)("relative", {
|
|
117
|
+
"*:first:size-8 *:first:absolute *:first:top-[calc(50%-16px)] *:first:left-1.5 [&_input]:pl-10 *:first:bg-muted/80 *:first:text-muted-foreground": !!c.$slots.leading,
|
|
118
|
+
"*:last:size-8 *:last:absolute *:last:top-[calc(50%-16px)] *:last:right-1.5 [&_input]:pr-10 *:last:bg-muted/80 *:last:text-muted-foreground": !!c.$slots.trailing
|
|
119
|
+
})) }, [
|
|
120
|
+
h(c.$slots, "leading"),
|
|
121
|
+
s(W, d({ id: y() }, c.$attrs, {
|
|
122
|
+
name: t.name,
|
|
123
|
+
type: t.type,
|
|
124
|
+
placeholder: t.placeholder,
|
|
125
|
+
disabled: t.disabled,
|
|
126
|
+
required: t.required,
|
|
127
|
+
"model-value": t.modelValue,
|
|
128
|
+
"aria-invalid": t.error || void 0,
|
|
129
|
+
class: "transition-all hover:border-primary hover:ring-[2px] hover:ring-primary/25",
|
|
130
|
+
"onUpdate:modelValue": p[0] ||= (e) => u("update:modelValue", e)
|
|
131
|
+
}), null, 16, [
|
|
132
|
+
"id",
|
|
133
|
+
"name",
|
|
134
|
+
"type",
|
|
135
|
+
"placeholder",
|
|
136
|
+
"disabled",
|
|
137
|
+
"required",
|
|
138
|
+
"model-value",
|
|
139
|
+
"aria-invalid"
|
|
140
|
+
]),
|
|
141
|
+
h(c.$slots, "trailing")
|
|
142
|
+
], 2),
|
|
143
|
+
t.helperText ? (m(), n(B, {
|
|
144
|
+
key: 1,
|
|
145
|
+
error: t.error
|
|
146
|
+
}, {
|
|
147
|
+
default: b(() => [o(g(t.helperText), 1)]),
|
|
148
|
+
_: 1
|
|
149
|
+
}, 8, ["error"])) : r("", !0)
|
|
150
|
+
], 2));
|
|
151
|
+
}
|
|
152
|
+
}), K = /* @__PURE__ */ c({
|
|
153
|
+
__name: "Dialog",
|
|
154
|
+
props: {
|
|
155
|
+
open: { type: Boolean },
|
|
156
|
+
defaultOpen: { type: Boolean },
|
|
157
|
+
modal: { type: Boolean },
|
|
158
|
+
unmountOnHide: { type: Boolean }
|
|
159
|
+
},
|
|
160
|
+
emits: ["update:open"],
|
|
161
|
+
setup(e, { emit: t }) {
|
|
162
|
+
let r = I(e, t);
|
|
163
|
+
return (e, t) => (m(), n(_(D), d({ "data-slot": "dialog" }, _(r)), {
|
|
164
|
+
default: b((t) => [h(e.$slots, "default", p(l(t)))]),
|
|
165
|
+
_: 3
|
|
166
|
+
}, 16));
|
|
167
|
+
}
|
|
168
|
+
}), q = /* @__PURE__ */ c({
|
|
169
|
+
__name: "DialogClose",
|
|
170
|
+
props: {
|
|
171
|
+
asChild: { type: Boolean },
|
|
172
|
+
as: {}
|
|
173
|
+
},
|
|
174
|
+
setup(e) {
|
|
175
|
+
let t = e;
|
|
176
|
+
return (e, r) => (m(), n(_(S), d({ "data-slot": "dialog-close" }, t), {
|
|
177
|
+
default: b(() => [h(e.$slots, "default")]),
|
|
178
|
+
_: 3
|
|
179
|
+
}, 16));
|
|
180
|
+
}
|
|
181
|
+
}), J = /* @__PURE__ */ c({
|
|
182
|
+
__name: "DialogOverlay",
|
|
183
|
+
props: {
|
|
184
|
+
forceMount: { type: Boolean },
|
|
185
|
+
asChild: { type: Boolean },
|
|
186
|
+
as: {},
|
|
187
|
+
class: { type: [
|
|
188
|
+
Boolean,
|
|
189
|
+
null,
|
|
190
|
+
String,
|
|
191
|
+
Object,
|
|
192
|
+
Array
|
|
193
|
+
] }
|
|
194
|
+
},
|
|
195
|
+
setup(t) {
|
|
196
|
+
let r = t, i = L(r, "class");
|
|
197
|
+
return (t, a) => (m(), n(_(T), d({ "data-slot": "dialog-overlay" }, _(i), { class: _(e)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80", r.class) }), {
|
|
198
|
+
default: b(() => [h(t.$slots, "default")]),
|
|
199
|
+
_: 3
|
|
200
|
+
}, 16, ["class"]));
|
|
201
|
+
}
|
|
202
|
+
}), Y = /* @__PURE__ */ c({
|
|
203
|
+
inheritAttrs: !1,
|
|
204
|
+
__name: "DialogContent",
|
|
205
|
+
props: {
|
|
206
|
+
forceMount: { type: Boolean },
|
|
207
|
+
disableOutsidePointerEvents: { type: Boolean },
|
|
208
|
+
asChild: { type: Boolean },
|
|
209
|
+
as: {},
|
|
210
|
+
class: { type: [
|
|
211
|
+
Boolean,
|
|
212
|
+
null,
|
|
213
|
+
String,
|
|
214
|
+
Object,
|
|
215
|
+
Array
|
|
216
|
+
] },
|
|
217
|
+
showCloseButton: {
|
|
218
|
+
type: Boolean,
|
|
219
|
+
default: !0
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
emits: [
|
|
223
|
+
"escapeKeyDown",
|
|
224
|
+
"pointerDownOutside",
|
|
225
|
+
"focusOutside",
|
|
226
|
+
"interactOutside",
|
|
227
|
+
"openAutoFocus",
|
|
228
|
+
"closeAutoFocus"
|
|
229
|
+
],
|
|
230
|
+
setup(t, { emit: i }) {
|
|
231
|
+
let o = t, c = i, l = I(L(o, "class"), c);
|
|
232
|
+
return (i, c) => (m(), n(_(E), null, {
|
|
233
|
+
default: b(() => [s(J), s(_(C), d({ "data-slot": "dialog-content" }, {
|
|
234
|
+
...i.$attrs,
|
|
235
|
+
..._(l)
|
|
236
|
+
}, { class: _(e)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", o.class) }), {
|
|
237
|
+
default: b(() => [h(i.$slots, "default"), t.showCloseButton ? (m(), n(_(S), {
|
|
238
|
+
key: 0,
|
|
239
|
+
"data-slot": "dialog-close",
|
|
240
|
+
class: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
241
|
+
}, {
|
|
242
|
+
default: b(() => [s(_(z)), c[0] ||= a("span", { class: "sr-only" }, "Close", -1)]),
|
|
243
|
+
_: 1
|
|
244
|
+
})) : r("", !0)]),
|
|
245
|
+
_: 3
|
|
246
|
+
}, 16, ["class"])]),
|
|
247
|
+
_: 3
|
|
248
|
+
}));
|
|
249
|
+
}
|
|
250
|
+
}), X = /* @__PURE__ */ c({
|
|
251
|
+
__name: "DialogDescription",
|
|
252
|
+
props: {
|
|
253
|
+
asChild: { type: Boolean },
|
|
254
|
+
as: {},
|
|
255
|
+
class: { type: [
|
|
256
|
+
Boolean,
|
|
257
|
+
null,
|
|
258
|
+
String,
|
|
259
|
+
Object,
|
|
260
|
+
Array
|
|
261
|
+
] }
|
|
262
|
+
},
|
|
263
|
+
setup(t) {
|
|
264
|
+
let r = t, i = F(L(r, "class"));
|
|
265
|
+
return (t, a) => (m(), n(_(w), d({ "data-slot": "dialog-description" }, _(i), { class: _(e)("text-muted-foreground text-sm", r.class) }), {
|
|
266
|
+
default: b(() => [h(t.$slots, "default")]),
|
|
267
|
+
_: 3
|
|
268
|
+
}, 16, ["class"]));
|
|
269
|
+
}
|
|
270
|
+
}), Z = /* @__PURE__ */ c({
|
|
271
|
+
__name: "DialogFooter",
|
|
272
|
+
props: {
|
|
273
|
+
class: { type: [
|
|
274
|
+
Boolean,
|
|
275
|
+
null,
|
|
276
|
+
String,
|
|
277
|
+
Object,
|
|
278
|
+
Array
|
|
279
|
+
] },
|
|
280
|
+
showCloseButton: {
|
|
281
|
+
type: Boolean,
|
|
282
|
+
default: !1
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
setup(a) {
|
|
286
|
+
let c = a;
|
|
287
|
+
return (l, u) => (m(), i("div", {
|
|
288
|
+
"data-slot": "dialog-footer",
|
|
289
|
+
class: f(_(e)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", c.class))
|
|
290
|
+
}, [h(l.$slots, "default"), a.showCloseButton ? (m(), n(_(S), {
|
|
291
|
+
key: 0,
|
|
292
|
+
"as-child": ""
|
|
293
|
+
}, {
|
|
294
|
+
default: b(() => [s(_(t), { variant: "outlined" }, {
|
|
295
|
+
default: b(() => [...u[0] ||= [o(" Close ", -1)]]),
|
|
296
|
+
_: 1
|
|
297
|
+
})]),
|
|
298
|
+
_: 1
|
|
299
|
+
})) : r("", !0)], 2));
|
|
300
|
+
}
|
|
301
|
+
}), Q = /* @__PURE__ */ c({
|
|
302
|
+
__name: "DialogTitle",
|
|
303
|
+
props: {
|
|
304
|
+
asChild: { type: Boolean },
|
|
305
|
+
as: {},
|
|
306
|
+
class: { type: [
|
|
307
|
+
Boolean,
|
|
308
|
+
null,
|
|
309
|
+
String,
|
|
310
|
+
Object,
|
|
311
|
+
Array
|
|
312
|
+
] }
|
|
313
|
+
},
|
|
314
|
+
setup(t) {
|
|
315
|
+
let r = t, i = F(L(r, "class"));
|
|
316
|
+
return (t, a) => (m(), n(_(O), d({ "data-slot": "dialog-title" }, _(i), { class: _(e)("text-lg leading-none font-semibold", r.class) }), {
|
|
317
|
+
default: b(() => [h(t.$slots, "default")]),
|
|
318
|
+
_: 3
|
|
319
|
+
}, 16, ["class"]));
|
|
320
|
+
}
|
|
321
|
+
}), $ = /* @__PURE__ */ c({
|
|
322
|
+
__name: "DialogTrigger",
|
|
323
|
+
props: {
|
|
324
|
+
asChild: { type: Boolean },
|
|
325
|
+
as: {}
|
|
326
|
+
},
|
|
327
|
+
setup(e) {
|
|
328
|
+
let t = e;
|
|
329
|
+
return (e, r) => (m(), n(_(k), d({ "data-slot": "dialog-trigger" }, t), {
|
|
330
|
+
default: b(() => [h(e.$slots, "default")]),
|
|
331
|
+
_: 3
|
|
332
|
+
}, 16));
|
|
333
|
+
}
|
|
334
|
+
}), ee = /* @__PURE__ */ c({
|
|
335
|
+
__name: "HoverCard",
|
|
336
|
+
props: {
|
|
337
|
+
defaultOpen: { type: Boolean },
|
|
338
|
+
open: { type: Boolean },
|
|
339
|
+
openDelay: {},
|
|
340
|
+
closeDelay: {},
|
|
341
|
+
enableTouch: { type: Boolean }
|
|
342
|
+
},
|
|
343
|
+
emits: ["update:open"],
|
|
344
|
+
setup(e, { emit: t }) {
|
|
345
|
+
let r = I(e, t);
|
|
346
|
+
return (e, t) => (m(), n(_(M), d({ "data-slot": "hover-card" }, _(r)), {
|
|
347
|
+
default: b((t) => [h(e.$slots, "default", p(l(t)))]),
|
|
348
|
+
_: 3
|
|
349
|
+
}, 16));
|
|
350
|
+
}
|
|
351
|
+
}), te = /* @__PURE__ */ c({
|
|
352
|
+
inheritAttrs: !1,
|
|
353
|
+
__name: "HoverCardContent",
|
|
354
|
+
props: {
|
|
355
|
+
forceMount: { type: Boolean },
|
|
356
|
+
memoDependencies: {},
|
|
357
|
+
side: {},
|
|
358
|
+
sideOffset: { default: 4 },
|
|
359
|
+
sideFlip: { type: Boolean },
|
|
360
|
+
align: {},
|
|
361
|
+
alignOffset: {},
|
|
362
|
+
alignFlip: { type: Boolean },
|
|
363
|
+
avoidCollisions: { type: Boolean },
|
|
364
|
+
collisionBoundary: {},
|
|
365
|
+
collisionPadding: {},
|
|
366
|
+
arrowPadding: {},
|
|
367
|
+
hideShiftedArrow: { type: Boolean },
|
|
368
|
+
sticky: {},
|
|
369
|
+
hideWhenDetached: { type: Boolean },
|
|
370
|
+
positionStrategy: {},
|
|
371
|
+
updatePositionStrategy: {},
|
|
372
|
+
disableUpdateOnLayoutShift: { type: Boolean },
|
|
373
|
+
prioritizePosition: { type: Boolean },
|
|
374
|
+
reference: {},
|
|
375
|
+
dir: {},
|
|
376
|
+
asChild: { type: Boolean },
|
|
377
|
+
as: {},
|
|
378
|
+
class: { type: [
|
|
379
|
+
Boolean,
|
|
380
|
+
null,
|
|
381
|
+
String,
|
|
382
|
+
Object,
|
|
383
|
+
Array
|
|
384
|
+
] }
|
|
385
|
+
},
|
|
386
|
+
setup(t) {
|
|
387
|
+
let r = t, i = F(L(r, "class"));
|
|
388
|
+
return (t, a) => (m(), n(_(j), null, {
|
|
389
|
+
default: b(() => [s(_(A), d({ "data-slot": "hover-card-content" }, {
|
|
390
|
+
...t.$attrs,
|
|
391
|
+
..._(i)
|
|
392
|
+
}, { class: _(e)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 rounded-md border p-4 shadow-md outline-hidden", r.class) }), {
|
|
393
|
+
default: b(() => [h(t.$slots, "default")]),
|
|
394
|
+
_: 3
|
|
395
|
+
}, 16, ["class"])]),
|
|
396
|
+
_: 3
|
|
397
|
+
}));
|
|
398
|
+
}
|
|
399
|
+
}), ne = /* @__PURE__ */ c({
|
|
400
|
+
__name: "HoverCardTrigger",
|
|
401
|
+
props: {
|
|
402
|
+
reference: {},
|
|
403
|
+
asChild: { type: Boolean },
|
|
404
|
+
as: {}
|
|
405
|
+
},
|
|
406
|
+
setup(e) {
|
|
407
|
+
let t = e;
|
|
408
|
+
return (e, r) => (m(), n(_(N), d({ "data-slot": "hover-card-trigger" }, t), {
|
|
409
|
+
default: b(() => [h(e.$slots, "default")]),
|
|
410
|
+
_: 3
|
|
411
|
+
}, 16));
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
//#endregion
|
|
415
|
+
export { Q as a, Y as c, K as d, G as f, B as h, $ as i, J as l, H as m, te as n, Z as o, W as p, ee as r, X as s, ne as t, q as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ku as e,
|
|
1
|
+
import { Ku as e, Uu as t, Wu as n } from "./components-Do7bPo_-.js";
|
|
2
2
|
import { t as r } from "./utils-Cy-ByIEo.js";
|
|
3
3
|
import { r as i, t as a } from "./icon-button-Ghucx7Ah.js";
|
|
4
4
|
import { n as o } from "./i18n-B7nNF_hw.js";
|
|
@@ -15,8 +15,8 @@ var w = { class: "grid gap-2" }, T = { class: "flex justify-end" }, E = ["src",
|
|
|
15
15
|
Object,
|
|
16
16
|
Array
|
|
17
17
|
] } },
|
|
18
|
-
setup(
|
|
19
|
-
let n =
|
|
18
|
+
setup(e) {
|
|
19
|
+
let n = e, { t: p } = o(), { videoRef: g, state: _, actions: v } = t();
|
|
20
20
|
function D(e) {
|
|
21
21
|
g.value = e instanceof HTMLVideoElement ? e : null;
|
|
22
22
|
}
|
|
@@ -56,8 +56,8 @@ var w = { class: "grid gap-2" }, T = { class: "flex justify-end" }, E = ["src",
|
|
|
56
56
|
}
|
|
57
57
|
}), O = /* @__PURE__ */ p({
|
|
58
58
|
__name: "camera-provider",
|
|
59
|
-
setup(
|
|
60
|
-
let r = g(null), i = g(null), a = v(null), o =
|
|
59
|
+
setup(t) {
|
|
60
|
+
let r = g(null), i = g(null), a = v(null), o = e();
|
|
61
61
|
return n({
|
|
62
62
|
videoRef: r,
|
|
63
63
|
canvasRef: i,
|