@livestorm/ui-vue 2.0.4 → 2.0.5
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 +2 -2
- package/dist/{UiTimelineItem.vue_vue_type_style_index_0_lang-BtG5oABt.mjs → UiTimelineItem.vue_vue_type_style_index_0_lang-DJFdCn2R.mjs} +61 -59
- package/dist/a11y-BhF_nl7L.mjs +159 -0
- package/dist/components.mjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/layouts.mjs +1 -1
- package/dist/{useThemeAndModes-CUK56j0z.mjs → useThemeAndModes-BzYwSOEv.mjs} +1 -1
- package/dist/utils.mjs +154 -99
- package/package.json +8 -3
- package/src/components/UiButtonGroup/UiButtonGroup.vue +2 -0
- package/src/components/UiButtonGroup/UiButtonGroupItem.vue +2 -0
- package/src/components/UiPage/UiPage.vue +7 -2
- package/dist/a11y--y7uaY4j.mjs +0 -217
package/README.md
CHANGED
|
@@ -117,7 +117,7 @@ import { setTranslator } from '@livestorm/ui-vue/integrations'
|
|
|
117
117
|
setTranslator((key) => myI18n.t(`ui-vue.${key}`))
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
On an SSR server
|
|
120
|
+
On an SSR server, provide the translator on the app instance instead — `setTranslator` is process-wide state shared by concurrent requests, and without a translator the server falls back to English (it cannot read `<html lang>`). For a non-English SSR app this is the difference between hydrating correct labels and keeping English aria-labels:
|
|
121
121
|
|
|
122
122
|
```ts
|
|
123
123
|
import { UI_VUE_TRANSLATOR } from '@livestorm/ui-vue/integrations'
|
|
@@ -159,7 +159,7 @@ registerComponents(app, 'Ls') // <LsButton>, <LsTextField>, ...
|
|
|
159
159
|
| `@livestorm/ui-vue/style` | Base stylesheet (import once) |
|
|
160
160
|
| `@livestorm/ui-vue/fonts` | Optional: loads Inter from Google Fonts (skip it if you self-host) |
|
|
161
161
|
| `@livestorm/ui-vue/components-vite` | `registerComponents` for global registration |
|
|
162
|
-
| `@livestorm/ui-vue/integrations` | Toast helpers (`openToast`, ...) |
|
|
162
|
+
| `@livestorm/ui-vue/integrations` | Toast helpers (`openToast`, ... — call client-side only: toast state is per-process on a server) and translation wiring (`setTranslator`, `UI_VUE_TRANSLATOR`) |
|
|
163
163
|
| `@livestorm/ui-vue/layouts` | Layout components such as the toast container |
|
|
164
164
|
| `@livestorm/ui-vue/utils` | Helpers (`useCopyToClipboard`, `useRouteQueryModel`, ...) — the one entry that requires `vue-router` |
|
|
165
165
|
| `@livestorm/ui-vue/responsive` | Optional responsive plugin |
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as $, provide as le, computed as r, createElementBlock as s, openBlock as o, normalizeStyle as K, normalizeClass as f, renderSlot as x, inject as Q, createBlock as z, unref as d, withCtx as g, createVNode as k, resolveDynamicComponent as ve, mergeProps as j, createCommentVNode as v, createTextVNode as q, toDisplayString as U, createElementVNode as c, ref as
|
|
1
|
+
import { defineComponent as $, provide as le, computed as r, createElementBlock as s, openBlock as o, normalizeStyle as K, normalizeClass as f, renderSlot as x, inject as Q, createBlock as z, unref as d, withCtx as g, createVNode as k, resolveDynamicComponent as ve, mergeProps as j, createCommentVNode as v, createTextVNode as q, toDisplayString as U, createElementVNode as c, ref as V, watch as Z, useSlots as Y, Fragment as H, renderList as G, toValue as pe, getCurrentInstance as qe, resolveComponent as ie, mergeModels as Le, useModel as ft, onMounted as se, nextTick as ue, withDirectives as vt, vShow as gt, onBeforeUnmount as ce, normalizeProps as W, guardReactiveProps as J, withModifiers as Ke, useAttrs as ht, createSlots as ge, useId as mt, toRef as xe } from "vue";
|
|
2
2
|
import { TooltipProvider as bt, TooltipRoot as pt, TooltipTrigger as yt, TooltipPortal as xt, TooltipContent as wt, TooltipArrow as Ct, ToggleGroupRoot as kt, ToggleGroupItem as $t, useForwardPropsEmits as ae, PopoverRoot as zt, useForwardProps as ze, PopoverTrigger as St, PopoverPortal as Bt, PopoverContent as Mt, SelectRoot as _t, SelectTrigger as Lt, SelectValue as It, SelectIcon as Tt, SelectPortal as Ot, SelectContent as Ut, SelectScrollUpButton as At, SelectViewport as Vt, SelectScrollDownButton as Pt, SelectItem as Et, SelectItemText as Dt, SelectSeparator as Rt, useId as he, convertToHsb as Ie, convertToHsl as jt, convertToRgb as Ht, isValidColor as ye, colorToHex as fe, ColorAreaRoot as Ft, ColorAreaArea as Nt, ColorAreaThumb as qt, ColorSliderRoot as Te, ColorSliderTrack as Oe, ColorSliderThumb as Ue, ColorFieldRoot as Ae, ColorSwatch as Kt, Label as Se, ColorFieldInput as Ve, ColorSwatchPickerRoot as Gt, ColorSwatchPickerItem as Zt, ColorSwatchPickerItemSwatch as Wt, normalizeColor as Pe, colorToString as Ee, DialogRoot as Yt, DialogClose as Xt, DialogPortal as Qt, DialogOverlay as Jt, DialogContent as ea, VisuallyHidden as De, DialogTitle as Re, DialogDescription as je, DialogTrigger as ta, DropdownMenuRoot as aa, DropdownMenuPortal as Ge, DropdownMenuContent as la, DropdownMenuGroup as oa, DropdownMenuLabel as Ze, DropdownMenuItem as na, DropdownMenuSeparator as sa, DropdownMenuSub as ra, DropdownMenuSubContent as ia, DropdownMenuSubTrigger as ua, DropdownMenuTrigger as ca, PopoverAnchor as da, ProgressRoot as fa, ProgressIndicator as va, useForwardExpose as ga, StepperRoot as ha, StepperDescription as ma, StepperIndicator as ba, StepperItem as pa, StepperSeparator as ya, StepperTitle as xa } from "reka-ui";
|
|
3
3
|
import { DotLottieVue as wa } from "@lottiefiles/dotlottie-vue";
|
|
4
4
|
import { useLocalStorage as Ca, useDebounceFn as We, useResizeObserver as Ye, useThrottleFn as ka, useMutationObserver as $a } from "@vueuse/core";
|
|
5
5
|
import { u as Be } from "./i18n-Cktw9hIu.mjs";
|
|
6
6
|
import za from "embla-carousel-vue";
|
|
7
7
|
import Sa from "embla-carousel-autoplay";
|
|
8
|
-
import { _ as de, b as Xe, c as Qe, a as Je, f as Ba } from "./a11y
|
|
8
|
+
import { _ as de, b as Xe, c as Qe, a as Je, f as Ba } from "./a11y-BhF_nl7L.mjs";
|
|
9
9
|
import { BREAKPOINT_LG as Ma } from "./breakpoints.mjs";
|
|
10
10
|
import { useResponsive as _a } from "./responsive.mjs";
|
|
11
|
-
import { u as La } from "./useThemeAndModes-
|
|
11
|
+
import { u as La } from "./useThemeAndModes-BzYwSOEv.mjs";
|
|
12
12
|
import { RenderSlot as Ia, useSlotsAsComponents as Ta } from "./slot.mjs";
|
|
13
13
|
import "./bus.mjs";
|
|
14
14
|
const Me = /* @__PURE__ */ Symbol("ui-action-bar-context"), Oa = ["aria-label", "aria-orientation"], Ts = /* @__PURE__ */ $({
|
|
@@ -217,7 +217,7 @@ const Me = /* @__PURE__ */ Symbol("ui-action-bar-context"), Oa = ["aria-label",
|
|
|
217
217
|
const t = e, a = r(() => {
|
|
218
218
|
if (t.variant !== "more" && !(t.src && !l.value) && t.color)
|
|
219
219
|
return { backgroundColor: t.color };
|
|
220
|
-
}), l =
|
|
220
|
+
}), l = V(!1);
|
|
221
221
|
Z(() => t.src, () => {
|
|
222
222
|
l.value = !1;
|
|
223
223
|
});
|
|
@@ -752,7 +752,7 @@ const tt = /* @__PURE__ */ $({
|
|
|
752
752
|
variant: () => e.variant,
|
|
753
753
|
color: () => e.color,
|
|
754
754
|
disabled: u
|
|
755
|
-
}), h = I, w = r(() => y.value ? [y.value] : []),
|
|
755
|
+
}), h = I, w = r(() => y.value ? [y.value] : []), P = "group-focus-visible:ring-2 group-focus-visible:ring-inset group-focus-visible:ring-focus-ring";
|
|
756
756
|
return Z(() => !e.label && !e.icon && !e.iconRight && !a.value, (L) => {
|
|
757
757
|
L && console.warn("UiButton: You must provide a label or an icon to the button");
|
|
758
758
|
}, { immediate: !0 }), {
|
|
@@ -764,7 +764,7 @@ const tt = /* @__PURE__ */ $({
|
|
|
764
764
|
iconSizeClasses: p,
|
|
765
765
|
buttonClasses: O,
|
|
766
766
|
bgClasses: h,
|
|
767
|
-
focusRingClasses:
|
|
767
|
+
focusRingClasses: P,
|
|
768
768
|
textClasses: w,
|
|
769
769
|
borderClasses: S,
|
|
770
770
|
overlayClasses: M,
|
|
@@ -870,7 +870,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
870
870
|
}),
|
|
871
871
|
emits: /* @__PURE__ */ Le(["banner-action", "close"], ["update:closed"]),
|
|
872
872
|
setup(e, { emit: t }) {
|
|
873
|
-
const a = Be(), l = e, n = t, i = ft(e, "closed"), u = l.bannerId && l.rememberClosed ? Ca(`banner-closed-${l.bannerId}`, null) :
|
|
873
|
+
const a = Be(), l = e, n = t, i = ft(e, "closed"), u = l.bannerId && l.rememberClosed ? Ca(`banner-closed-${l.bannerId}`, null) : V(null), m = r(() => {
|
|
874
874
|
if (!l.rememberClosed || u.value === null) return !1;
|
|
875
875
|
if (l.closedExpirySeconds === -1) return !0;
|
|
876
876
|
if (l.closedExpirySeconds <= 0) return !1;
|
|
@@ -982,7 +982,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
982
982
|
function h() {
|
|
983
983
|
n("banner-action");
|
|
984
984
|
}
|
|
985
|
-
return (w,
|
|
985
|
+
return (w, P) => i.value ? v("", !0) : (o(), s("div", {
|
|
986
986
|
key: 0,
|
|
987
987
|
class: f(O.value),
|
|
988
988
|
"data-testid": "ui-banner",
|
|
@@ -1133,16 +1133,17 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
1133
1133
|
setup(e, { emit: t }) {
|
|
1134
1134
|
const a = e, l = t;
|
|
1135
1135
|
le(at, r(() => a.size)), le(lt, r(() => a.color));
|
|
1136
|
-
const n = /* @__PURE__ */ new Map(), i =
|
|
1136
|
+
const n = /* @__PURE__ */ new Map(), i = V(null), u = V(a.modelValue ?? a.defaultValue);
|
|
1137
1137
|
Z(() => a.modelValue, (L) => {
|
|
1138
1138
|
u.value = L;
|
|
1139
1139
|
});
|
|
1140
|
-
const m =
|
|
1140
|
+
const m = V({
|
|
1141
1141
|
transform: "translate(0px, 0px)",
|
|
1142
1142
|
width: "0px",
|
|
1143
1143
|
height: "0px"
|
|
1144
|
-
}), b =
|
|
1144
|
+
}), b = V(!1);
|
|
1145
1145
|
function p() {
|
|
1146
|
+
if (typeof HTMLElement > "u") return null;
|
|
1146
1147
|
const L = i.value?.$el;
|
|
1147
1148
|
return L instanceof HTMLElement ? L : null;
|
|
1148
1149
|
}
|
|
@@ -1204,7 +1205,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
1204
1205
|
md: "rounded-lg",
|
|
1205
1206
|
lg: "rounded-lg"
|
|
1206
1207
|
}, M = r(() => I[a.color]), h = r(() => y[a.color]), w = r(() => S[a.size]);
|
|
1207
|
-
function
|
|
1208
|
+
function P(L) {
|
|
1208
1209
|
const A = Array.isArray(L) ? L[0] : L, E = typeof A == "string" ? A : void 0;
|
|
1209
1210
|
E === void 0 && !a.allowDeselect || (u.value = E, l("update:modelValue", E));
|
|
1210
1211
|
}
|
|
@@ -1218,7 +1219,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
1218
1219
|
"roving-focus": !0,
|
|
1219
1220
|
type: "single",
|
|
1220
1221
|
class: f(["relative inline-flex w-full items-stretch rounded-lg", [O.value, M.value, { "flex-col h-auto": e.orientation === "vertical" }]]),
|
|
1221
|
-
"onUpdate:modelValue":
|
|
1222
|
+
"onUpdate:modelValue": P
|
|
1222
1223
|
}, {
|
|
1223
1224
|
default: g(() => [
|
|
1224
1225
|
vt(c("div", {
|
|
@@ -1242,8 +1243,9 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
1242
1243
|
ariaLabel: { default: void 0 }
|
|
1243
1244
|
},
|
|
1244
1245
|
setup(e) {
|
|
1245
|
-
const t = e, a = Q(at, r(() => "md")), l = Q(lt, r(() => "neutral")), n = Q(ot, null), i =
|
|
1246
|
+
const t = e, a = Q(at, r(() => "md")), l = Q(lt, r(() => "neutral")), n = Q(ot, null), i = V(null);
|
|
1246
1247
|
function u() {
|
|
1248
|
+
if (typeof HTMLElement > "u") return null;
|
|
1247
1249
|
const C = i.value?.$el;
|
|
1248
1250
|
return C instanceof HTMLElement ? C : null;
|
|
1249
1251
|
}
|
|
@@ -1424,7 +1426,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
1424
1426
|
watchDrag: n.draggable,
|
|
1425
1427
|
containScroll: "trimSnaps",
|
|
1426
1428
|
...n.options
|
|
1427
|
-
})), [m, b] = za(u, i), p =
|
|
1429
|
+
})), [m, b] = za(u, i), p = V(0), C = V([]), B = V(!1), T = V(!0);
|
|
1428
1430
|
function O() {
|
|
1429
1431
|
b.value && (p.value = b.value.selectedScrollSnap(), B.value = b.value.canScrollPrev(), T.value = b.value.canScrollNext(), l("select", p.value));
|
|
1430
1432
|
}
|
|
@@ -1481,7 +1483,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
1481
1483
|
onClick: y
|
|
1482
1484
|
}, null, 8, ["disabled"])) : v("", !0),
|
|
1483
1485
|
e.showDots && C.value.length > 1 ? (o(), s("div", yl, [
|
|
1484
|
-
(o(!0), s(H, null, G(C.value, (
|
|
1486
|
+
(o(!0), s(H, null, G(C.value, (P, L) => (o(), s("button", {
|
|
1485
1487
|
key: L,
|
|
1486
1488
|
"data-testid": `carousel-dot-${L}`,
|
|
1487
1489
|
"aria-label": `Slide ${L + 1}`,
|
|
@@ -1960,11 +1962,11 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
1960
1962
|
if (!(!D || !ye(D)))
|
|
1961
1963
|
return D.trim().startsWith("#") ? "hex" : Pe(D).space;
|
|
1962
1964
|
}
|
|
1963
|
-
const y = I(a.modelValue), S =
|
|
1965
|
+
const y = I(a.modelValue), S = V(
|
|
1964
1966
|
y && a.modes.includes(y) ? y : a.modes[0]
|
|
1965
1967
|
), M = r(
|
|
1966
1968
|
() => a.outputFormat === "auto" ? S.value : a.outputFormat
|
|
1967
|
-
), h = r(() => a.modes.length > 1), w = r(() => a.variant !== "swatch-only"),
|
|
1969
|
+
), h = r(() => a.modes.length > 1), w = r(() => a.variant !== "swatch-only"), P = r(
|
|
1968
1970
|
() => S.value === "hex" ? [] : O[S.value]
|
|
1969
1971
|
), L = r(() => {
|
|
1970
1972
|
switch (S.value) {
|
|
@@ -1977,7 +1979,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
1977
1979
|
default:
|
|
1978
1980
|
return A.value;
|
|
1979
1981
|
}
|
|
1980
|
-
}), A =
|
|
1982
|
+
}), A = V(
|
|
1981
1983
|
B(
|
|
1982
1984
|
a.color ?? (a.modelValue && ye(a.modelValue) ? a.modelValue : Pl)
|
|
1983
1985
|
)
|
|
@@ -2152,7 +2154,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
2152
2154
|
}, null, 8, ["id"])
|
|
2153
2155
|
]),
|
|
2154
2156
|
_: 1
|
|
2155
|
-
}, 8, ["model-value", "disabled", "class"])) : (o(!0), s(H, { key: 2 }, G(
|
|
2157
|
+
}, 8, ["model-value", "disabled", "class"])) : (o(!0), s(H, { key: 2 }, G(P.value, (R) => (o(), z(d(Ae), {
|
|
2156
2158
|
key: R.channel,
|
|
2157
2159
|
"model-value": L.value,
|
|
2158
2160
|
disabled: e.disabled,
|
|
@@ -2326,7 +2328,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
2326
2328
|
},
|
|
2327
2329
|
emits: ["update:modelValue", "clear", "focus", "blur", "keydown", "keyup"],
|
|
2328
2330
|
setup(e, { expose: t, emit: a }) {
|
|
2329
|
-
const l = e, n = a, i = Y(), u =
|
|
2331
|
+
const l = e, n = a, i = Y(), u = V(null), m = V(!1), b = r(() => !!i.icon), p = r(() => !!i["right-action"]), C = r(() => l.clearable && !!l.modelValue && !l.disabled && !l.loading), B = r(() => {
|
|
2330
2332
|
const h = ["ui-text-field-field"];
|
|
2331
2333
|
return l.size === "sm" && h.push("h-8 text-content-text-md-regular"), l.size === "md" && h.push("h-10 text-content-text-md-regular"), l.size === "lg" && h.push("h-12 text-content-text-md-regular"), l.size === "xl" && h.push("h-16 text-content-text-md-regular"), l.error ? h.push("ui-text-field-field--error") : h.push("ui-text-field-field--default"), l.disabled && h.push("ui-text-field-field--disabled"), m.value && !l.disabled && h.push("ui-text-field-field--focused"), h;
|
|
2332
2334
|
});
|
|
@@ -2355,9 +2357,9 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
2355
2357
|
insertAtCursor: (h) => {
|
|
2356
2358
|
const w = u.value;
|
|
2357
2359
|
if (!w) return;
|
|
2358
|
-
const
|
|
2360
|
+
const P = w.selectionStart ?? w.value.length, L = w.selectionEnd ?? P, A = w.value.slice(0, P), E = w.value.slice(L), X = A + h + E;
|
|
2359
2361
|
n("update:modelValue", X), ue(() => {
|
|
2360
|
-
const re =
|
|
2362
|
+
const re = P + h.length;
|
|
2361
2363
|
w.setSelectionRange(re, re), w.focus();
|
|
2362
2364
|
});
|
|
2363
2365
|
}
|
|
@@ -2370,7 +2372,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
2370
2372
|
"helper-message": e.helperMessage,
|
|
2371
2373
|
"error-message": e.errorMessage
|
|
2372
2374
|
}, {
|
|
2373
|
-
default: g(({ fieldId:
|
|
2375
|
+
default: g(({ fieldId: P }) => [
|
|
2374
2376
|
c("div", {
|
|
2375
2377
|
class: f(B.value)
|
|
2376
2378
|
}, [
|
|
@@ -2386,7 +2388,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
2386
2388
|
x(h.$slots, "icon", {}, void 0, !0)
|
|
2387
2389
|
], 2)) : v("", !0),
|
|
2388
2390
|
c("input", {
|
|
2389
|
-
id: e.id ||
|
|
2391
|
+
id: e.id || P,
|
|
2390
2392
|
ref_key: "textFieldRef",
|
|
2391
2393
|
ref: u,
|
|
2392
2394
|
type: e.type,
|
|
@@ -2397,7 +2399,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
2397
2399
|
autocomplete: e.autocomplete,
|
|
2398
2400
|
"aria-label": e.ariaLabel,
|
|
2399
2401
|
"aria-invalid": e.error || void 0,
|
|
2400
|
-
"aria-describedby": e.ariaDescribedby || (e.helperMessage || e.errorMessage ? `${
|
|
2402
|
+
"aria-describedby": e.ariaDescribedby || (e.helperMessage || e.errorMessage ? `${P}-message` : void 0),
|
|
2401
2403
|
class: "ui-text-field-element text-text-neutral-base placeholder:text-text-neutral-tertiary",
|
|
2402
2404
|
onInput: T,
|
|
2403
2405
|
onFocus: I,
|
|
@@ -2446,7 +2448,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
2446
2448
|
},
|
|
2447
2449
|
emits: ["update:modelValue", "change"],
|
|
2448
2450
|
setup(e, { emit: t }) {
|
|
2449
|
-
const a = e, l = t, n = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, i =
|
|
2451
|
+
const a = e, l = t, n = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, i = V(!1), u = V(a.modelValue ?? "");
|
|
2450
2452
|
Z(() => a.modelValue, (y) => {
|
|
2451
2453
|
p(u.value) !== y && (u.value = y ?? "");
|
|
2452
2454
|
});
|
|
@@ -2609,7 +2611,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
2609
2611
|
"3xl": "max-w-3xl",
|
|
2610
2612
|
"5xl": "max-w-5xl",
|
|
2611
2613
|
"7xl": "max-w-7xl"
|
|
2612
|
-
}, n = r(() => l[a.size] ?? ""), u = ae(a, t), m =
|
|
2614
|
+
}, n = r(() => l[a.size] ?? ""), u = ae(a, t), m = V(null), b = V(!1);
|
|
2613
2615
|
function p() {
|
|
2614
2616
|
m.value && (b.value = m.value.scrollHeight > m.value.clientHeight);
|
|
2615
2617
|
}
|
|
@@ -2920,11 +2922,11 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
2920
2922
|
},
|
|
2921
2923
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
2922
2924
|
setup(e, { expose: t, emit: a }) {
|
|
2923
|
-
const l = e, n = a, i =
|
|
2925
|
+
const l = e, n = a, i = V(null);
|
|
2924
2926
|
function u() {
|
|
2925
2927
|
l.disabled || i.value?.click();
|
|
2926
2928
|
}
|
|
2927
|
-
const m =
|
|
2929
|
+
const m = V(!1), b = he(), p = r(() => l.checked !== void 0 ? l.checked : Array.isArray(l.modelValue) ? l.value !== void 0 && l.modelValue.includes(l.value) : typeof l.modelValue == "boolean" ? l.modelValue : l.value !== void 0 && l.modelValue !== void 0 ? l.modelValue === l.value : !1), C = r(() => {
|
|
2928
2930
|
const h = [
|
|
2929
2931
|
"appearance-none",
|
|
2930
2932
|
"relative shrink-0 grid place-content-center",
|
|
@@ -2957,16 +2959,16 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
2957
2959
|
});
|
|
2958
2960
|
function y(h) {
|
|
2959
2961
|
const w = h.target;
|
|
2960
|
-
let
|
|
2962
|
+
let P;
|
|
2961
2963
|
if (Array.isArray(l.modelValue)) {
|
|
2962
|
-
if (
|
|
2963
|
-
l.value !== void 0 && !
|
|
2964
|
+
if (P = [...l.modelValue], w.checked)
|
|
2965
|
+
l.value !== void 0 && !P.includes(l.value) && P.push(l.value);
|
|
2964
2966
|
else if (l.value !== void 0) {
|
|
2965
|
-
const L =
|
|
2966
|
-
L > -1 &&
|
|
2967
|
+
const L = P.indexOf(l.value);
|
|
2968
|
+
L > -1 && P.splice(L, 1);
|
|
2967
2969
|
}
|
|
2968
|
-
} else l.value !== void 0 ?
|
|
2969
|
-
n("update:modelValue",
|
|
2970
|
+
} else l.value !== void 0 ? P = w.checked ? l.value : !1 : P = w.checked;
|
|
2971
|
+
n("update:modelValue", P), n("change", h);
|
|
2970
2972
|
}
|
|
2971
2973
|
function S(h) {
|
|
2972
2974
|
m.value = !0, n("focus", h);
|
|
@@ -3239,7 +3241,7 @@ const oe = /* @__PURE__ */ N(tl, [["render", nl]]), Es = /* @__PURE__ */ Object.
|
|
|
3239
3241
|
},
|
|
3240
3242
|
emits: ["update:modelValue", "focus", "blur", "keydown", "keyup"],
|
|
3241
3243
|
setup(e, { expose: t, emit: a }) {
|
|
3242
|
-
const l = e, n = a, i =
|
|
3244
|
+
const l = e, n = a, i = V(null), u = V(!1), m = r(() => {
|
|
3243
3245
|
const y = { sm: 1.25, md: 1.5, lg: 1.5, xl: 1.75 }, S = { sm: 0.25, md: 0.5, lg: 0.5, xl: 0.5 };
|
|
3244
3246
|
return `${l.rows * y[l.size] + S[l.size] * 2}rem`;
|
|
3245
3247
|
}), b = r(() => {
|
|
@@ -3819,15 +3821,15 @@ const Io = /* @__PURE__ */ N(_o, [["render", Lo], ["__scopeId", "data-v-568a716f
|
|
|
3819
3821
|
}, 16));
|
|
3820
3822
|
}
|
|
3821
3823
|
}), ee = {
|
|
3822
|
-
isMobileMenuOpen:
|
|
3824
|
+
isMobileMenuOpen: V(!1),
|
|
3823
3825
|
// Number of mounted components (e.g. UiPageHeader) that render their own
|
|
3824
3826
|
// open-menu trigger. UiShell uses this to decide whether it must provide a
|
|
3825
3827
|
// fallback hamburger, so a headerless page still has a way to open the menu.
|
|
3826
|
-
triggerCount:
|
|
3828
|
+
triggerCount: V(0),
|
|
3827
3829
|
// Label shown next to UiShell's fallback menu topbar. Pages set this (via
|
|
3828
3830
|
// setMenuLabel) to give the headerless mobile topbar a meaningful title
|
|
3829
3831
|
// (e.g. "Home"); null falls back to UiShell's openMenuLabel prop default.
|
|
3830
|
-
menuLabel:
|
|
3832
|
+
menuLabel: V(null)
|
|
3831
3833
|
};
|
|
3832
3834
|
function be() {
|
|
3833
3835
|
const e = () => {
|
|
@@ -3892,14 +3894,14 @@ const Ao = {
|
|
|
3892
3894
|
const C = qe();
|
|
3893
3895
|
if (!C)
|
|
3894
3896
|
throw new Error("No current instance found");
|
|
3895
|
-
const B = r(() => C.appContext.config.globalProperties.$responsive ?? _a()), T = r(() => B.value.width >= Ma), O =
|
|
3897
|
+
const B = r(() => C.appContext.config.globalProperties.$responsive ?? _a()), T = r(() => B.value.width >= Ma), O = V(), I = V(), { addElementToWatch: y } = La(), S = V(!1);
|
|
3896
3898
|
return se(() => {
|
|
3897
|
-
y(
|
|
3899
|
+
S.value = localStorage.getItem("ls-internal-theming") === "true", y(
|
|
3898
3900
|
"content",
|
|
3899
3901
|
{
|
|
3900
3902
|
selector: '[data-name="ui-page-content"]',
|
|
3901
3903
|
element: I.value,
|
|
3902
|
-
...S ? {} : { modeOverride: "light" }
|
|
3904
|
+
...S.value ? {} : { modeOverride: "light" }
|
|
3903
3905
|
}
|
|
3904
3906
|
);
|
|
3905
3907
|
}), (M, h) => (o(), s("main", {
|
|
@@ -3924,7 +3926,7 @@ const Ao = {
|
|
|
3924
3926
|
ref: I,
|
|
3925
3927
|
"data-name": "pageContent",
|
|
3926
3928
|
class: "page-content flex-1 overflow-y-auto w-full grid has-[>:nth-child(2)]:lg:grid-cols-[1fr_2fr] lg:gap-x-8 min-h-0",
|
|
3927
|
-
"data-colors-semantic": S ? void 0 : "light"
|
|
3929
|
+
"data-colors-semantic": S.value ? void 0 : "light"
|
|
3928
3930
|
}, [
|
|
3929
3931
|
u.value && T.value ? (o(), s("aside", Ro, [
|
|
3930
3932
|
x(M.$slots, "leftSlot")
|
|
@@ -4366,7 +4368,7 @@ const Ao = {
|
|
|
4366
4368
|
default: $e
|
|
4367
4369
|
}, Symbol.toStringTag, { value: "Module" })), zn = "(min-width: 768px) and (max-height: 599.98px) and (hover: hover) and (pointer: fine)";
|
|
4368
4370
|
function Sn() {
|
|
4369
|
-
const e =
|
|
4371
|
+
const e = V(!1);
|
|
4370
4372
|
let t = null;
|
|
4371
4373
|
const a = (l) => {
|
|
4372
4374
|
e.value = l.matches;
|
|
@@ -4481,7 +4483,7 @@ const te = /* @__PURE__ */ $({
|
|
|
4481
4483
|
organizationId: { default: void 0 }
|
|
4482
4484
|
},
|
|
4483
4485
|
setup(e) {
|
|
4484
|
-
const { close: t, isOpen: a } = be(), l = Be(), n =
|
|
4486
|
+
const { close: t, isOpen: a } = be(), l = Be(), n = V(!1), i = V(!1), u = V(null), m = V(!1);
|
|
4485
4487
|
let b = null;
|
|
4486
4488
|
const p = (E) => {
|
|
4487
4489
|
m.value = E.matches;
|
|
@@ -4489,7 +4491,7 @@ const te = /* @__PURE__ */ $({
|
|
|
4489
4491
|
se(() => {
|
|
4490
4492
|
typeof window > "u" || (b = window.matchMedia("(max-height: 768px) and (hover: hover) and (pointer: fine)"), m.value = b.matches, b.addEventListener("change", p));
|
|
4491
4493
|
});
|
|
4492
|
-
const C =
|
|
4494
|
+
const C = V(!1);
|
|
4493
4495
|
let B = null;
|
|
4494
4496
|
const T = (E) => {
|
|
4495
4497
|
C.value = E.matches;
|
|
@@ -4515,7 +4517,7 @@ const te = /* @__PURE__ */ $({
|
|
|
4515
4517
|
i.value = !1;
|
|
4516
4518
|
}, w = (E) => {
|
|
4517
4519
|
h(), E.onClick?.();
|
|
4518
|
-
},
|
|
4520
|
+
}, P = (E) => {
|
|
4519
4521
|
h(), setTimeout(() => E.onClick(), 0);
|
|
4520
4522
|
}, L = r(
|
|
4521
4523
|
() => !!I.collapsedMenuItems && I.collapsedMenuItems.length > 0 || !!O.collapsedMenuExtra
|
|
@@ -4684,7 +4686,7 @@ const te = /* @__PURE__ */ $({
|
|
|
4684
4686
|
icon: _.icon,
|
|
4685
4687
|
"is-active": !1,
|
|
4686
4688
|
"show-label-tooltip": "",
|
|
4687
|
-
onClick: (ne) =>
|
|
4689
|
+
onClick: (ne) => P(_)
|
|
4688
4690
|
}, null, 8, ["label", "icon", "onClick"])
|
|
4689
4691
|
]))), 128))
|
|
4690
4692
|
], 64)) : v("", !0)
|
|
@@ -5084,10 +5086,10 @@ const rs = /* @__PURE__ */ N(ns, [["render", ss]]), Ar = /* @__PURE__ */ Object.
|
|
|
5084
5086
|
container: "gap-4",
|
|
5085
5087
|
tab: a.size === "sm" ? "pb-4" : "pb-6",
|
|
5086
5088
|
text: a.size === "sm" ? "text-action-button-sm" : "text-action-button-md"
|
|
5087
|
-
})), m =
|
|
5089
|
+
})), m = V({
|
|
5088
5090
|
transform: "translateX(0px)",
|
|
5089
5091
|
width: "0px"
|
|
5090
|
-
}), b =
|
|
5092
|
+
}), b = V(null), p = V(/* @__PURE__ */ new Map()), C = r(() => a.tabs.filter((M) => !M.disabled));
|
|
5091
5093
|
function B(M) {
|
|
5092
5094
|
a.tabs.find((w) => w.value === M)?.disabled || l("update:modelValue", M);
|
|
5093
5095
|
}
|
|
@@ -5098,16 +5100,16 @@ const rs = /* @__PURE__ */ N(ns, [["render", ss]]), Ar = /* @__PURE__ */ Object.
|
|
|
5098
5100
|
M && M instanceof HTMLElement ? p.value.set(h, M) : p.value.delete(h);
|
|
5099
5101
|
}
|
|
5100
5102
|
function I(M, h) {
|
|
5101
|
-
const w = C.value.map((E) => E.value),
|
|
5102
|
-
let L =
|
|
5103
|
+
const w = C.value.map((E) => E.value), P = w.indexOf(h);
|
|
5104
|
+
let L = P;
|
|
5103
5105
|
switch (M.key) {
|
|
5104
5106
|
case "ArrowLeft":
|
|
5105
5107
|
case "ArrowUp":
|
|
5106
|
-
M.preventDefault(), L =
|
|
5108
|
+
M.preventDefault(), L = P > 0 ? P - 1 : w.length - 1;
|
|
5107
5109
|
break;
|
|
5108
5110
|
case "ArrowRight":
|
|
5109
5111
|
case "ArrowDown":
|
|
5110
|
-
M.preventDefault(), L =
|
|
5112
|
+
M.preventDefault(), L = P < w.length - 1 ? P + 1 : 0;
|
|
5111
5113
|
break;
|
|
5112
5114
|
case "Home":
|
|
5113
5115
|
M.preventDefault(), L = 0;
|
|
@@ -5150,7 +5152,7 @@ const rs = /* @__PURE__ */ N(ns, [["render", ss]]), Ar = /* @__PURE__ */ Object.
|
|
|
5150
5152
|
(o(!0), s(H, null, G(e.tabs, (w) => (o(), s("button", {
|
|
5151
5153
|
key: w.value,
|
|
5152
5154
|
ref_for: !0,
|
|
5153
|
-
ref: (
|
|
5155
|
+
ref: (P) => O(P, w.value),
|
|
5154
5156
|
type: "button",
|
|
5155
5157
|
role: "tab",
|
|
5156
5158
|
"aria-selected": T(w.value),
|
|
@@ -5166,8 +5168,8 @@ const rs = /* @__PURE__ */ N(ns, [["render", ss]]), Ar = /* @__PURE__ */ Object.
|
|
|
5166
5168
|
}
|
|
5167
5169
|
]]),
|
|
5168
5170
|
disabled: w.disabled,
|
|
5169
|
-
onClick: (
|
|
5170
|
-
onKeydown: (
|
|
5171
|
+
onClick: (P) => B(w.value),
|
|
5172
|
+
onKeydown: (P) => I(P, w.value)
|
|
5171
5173
|
}, [
|
|
5172
5174
|
w.icon ? (o(), s("span", {
|
|
5173
5175
|
key: 0,
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { defineComponent as m, createBlock as i, openBlock as r, unref as a, normalizeProps as f, guardReactiveProps as g, withCtx as n, renderSlot as l, computed as h, createVNode as c, mergeProps as w, createCommentVNode as b, getCurrentInstance as x, createElementBlock as C, Fragment as T, createTextVNode as $, toDisplayString as v } from "vue";
|
|
2
|
+
import { TooltipProvider as k, useForwardProps as P, TooltipTrigger as D, useForwardPropsEmits as B, TooltipPortal as S, TooltipContent as F, TooltipArrow as W, TooltipRoot as y } from "reka-ui";
|
|
3
|
+
import { reactiveOmit as N } from "@vueuse/core";
|
|
4
|
+
const O = /* @__PURE__ */ m({
|
|
5
|
+
__name: "UiTooltipProvider",
|
|
6
|
+
props: {
|
|
7
|
+
delayDuration: { default: 700 },
|
|
8
|
+
skipDelayDuration: { default: 300 },
|
|
9
|
+
disableHoverableContent: { type: Boolean },
|
|
10
|
+
disableClosingTrigger: { type: Boolean },
|
|
11
|
+
disabled: { type: Boolean },
|
|
12
|
+
ignoreNonKeyboardFocus: { type: Boolean },
|
|
13
|
+
content: {}
|
|
14
|
+
},
|
|
15
|
+
setup(e) {
|
|
16
|
+
return (s, t) => (r(), i(a(k), f(g(s.$props)), {
|
|
17
|
+
default: n(() => [
|
|
18
|
+
l(s.$slots, "default")
|
|
19
|
+
]),
|
|
20
|
+
_: 3
|
|
21
|
+
}, 16));
|
|
22
|
+
}
|
|
23
|
+
}), z = /* @__PURE__ */ m({
|
|
24
|
+
__name: "UiTooltipTrigger",
|
|
25
|
+
props: {
|
|
26
|
+
reference: {},
|
|
27
|
+
asChild: { type: Boolean },
|
|
28
|
+
as: {}
|
|
29
|
+
},
|
|
30
|
+
setup(e) {
|
|
31
|
+
const t = P(e);
|
|
32
|
+
return (d, p) => (r(), i(a(D), f(g({ ...a(t), ...d.$attrs })), {
|
|
33
|
+
default: n(() => [
|
|
34
|
+
l(d.$slots, "default")
|
|
35
|
+
]),
|
|
36
|
+
_: 3
|
|
37
|
+
}, 16));
|
|
38
|
+
}
|
|
39
|
+
}), A = /* @__PURE__ */ m({
|
|
40
|
+
__name: "UiTooltipContent",
|
|
41
|
+
props: {
|
|
42
|
+
colorsSemantic: { default: "light" },
|
|
43
|
+
maxWidth: { default: "base" },
|
|
44
|
+
showArrow: { type: Boolean, default: !0 },
|
|
45
|
+
arrowWidth: { default: 10 },
|
|
46
|
+
arrowHeight: { default: 5 },
|
|
47
|
+
forceMount: { type: Boolean },
|
|
48
|
+
ariaLabel: {},
|
|
49
|
+
asChild: { type: Boolean },
|
|
50
|
+
as: {},
|
|
51
|
+
side: {},
|
|
52
|
+
sideOffset: { default: 12 },
|
|
53
|
+
align: {},
|
|
54
|
+
alignOffset: {},
|
|
55
|
+
avoidCollisions: { type: Boolean },
|
|
56
|
+
collisionBoundary: {},
|
|
57
|
+
collisionPadding: {},
|
|
58
|
+
arrowPadding: {},
|
|
59
|
+
sticky: {},
|
|
60
|
+
hideWhenDetached: { type: Boolean },
|
|
61
|
+
positionStrategy: {},
|
|
62
|
+
updatePositionStrategy: {}
|
|
63
|
+
},
|
|
64
|
+
emits: ["escapeKeyDown", "pointerDownOutside"],
|
|
65
|
+
setup(e, { emit: s }) {
|
|
66
|
+
const t = e, p = B(t, s), u = h(() => ({
|
|
67
|
+
xs: "max-w-[150px]",
|
|
68
|
+
sm: "max-w-[240px]",
|
|
69
|
+
md: "max-w-md",
|
|
70
|
+
base: "max-w-xs",
|
|
71
|
+
lg: "max-w-lg",
|
|
72
|
+
xl: "max-w-xl"
|
|
73
|
+
})[t.maxWidth]);
|
|
74
|
+
return (o, _) => (r(), i(a(S), null, {
|
|
75
|
+
default: n(() => [
|
|
76
|
+
c(a(F), w({ ...a(p), ...o.$attrs }, {
|
|
77
|
+
"data-colors-semantic": t.colorsSemantic,
|
|
78
|
+
class: [
|
|
79
|
+
"ui-tooltip-content py-1.5 px-3 bg-surface-neutral-invert-bg-alpha text-text-neutral-invert-base text-content-text-md-regular rounded-md text-center z-50 shadow-shadows-drop-shadow-lg",
|
|
80
|
+
"data-[state=delayed-open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=delayed-open]:zoom-in-95",
|
|
81
|
+
u.value
|
|
82
|
+
]
|
|
83
|
+
}), {
|
|
84
|
+
default: n(() => [
|
|
85
|
+
l(o.$slots, "default"),
|
|
86
|
+
t.showArrow ? (r(), i(a(W), {
|
|
87
|
+
key: 0,
|
|
88
|
+
width: t.arrowWidth,
|
|
89
|
+
height: t.arrowHeight,
|
|
90
|
+
class: "fill-surface-neutral-invert-bg-alpha"
|
|
91
|
+
}, null, 8, ["width", "height"])) : b("", !0)
|
|
92
|
+
]),
|
|
93
|
+
_: 3
|
|
94
|
+
}, 16, ["data-colors-semantic", "class"])
|
|
95
|
+
]),
|
|
96
|
+
_: 3
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
}), K = /* @__PURE__ */ m({
|
|
100
|
+
inheritAttrs: !1,
|
|
101
|
+
__name: "UiTooltip",
|
|
102
|
+
props: {
|
|
103
|
+
content: {},
|
|
104
|
+
side: {},
|
|
105
|
+
defaultOpen: { type: Boolean },
|
|
106
|
+
open: { type: Boolean },
|
|
107
|
+
delayDuration: {},
|
|
108
|
+
disableHoverableContent: { type: Boolean },
|
|
109
|
+
disableClosingTrigger: { type: Boolean },
|
|
110
|
+
disabled: { type: Boolean },
|
|
111
|
+
ignoreNonKeyboardFocus: { type: Boolean }
|
|
112
|
+
},
|
|
113
|
+
emits: ["update:open"],
|
|
114
|
+
setup(e, { emit: s }) {
|
|
115
|
+
const t = e, d = s, p = h(() => {
|
|
116
|
+
const o = x()?.vnode.props;
|
|
117
|
+
return !!o && "content" in o;
|
|
118
|
+
}), u = B(N(t, "content", "side"), d);
|
|
119
|
+
return (o, _) => p.value ? (r(), C(T, { key: 0 }, [
|
|
120
|
+
e.content ? (r(), i(O, { key: 0 }, {
|
|
121
|
+
default: n(() => [
|
|
122
|
+
c(a(y), f(g({ ...a(u), ...o.$attrs })), {
|
|
123
|
+
default: n(() => [
|
|
124
|
+
c(z, { "as-child": "" }, {
|
|
125
|
+
default: n(() => [
|
|
126
|
+
l(o.$slots, "default")
|
|
127
|
+
]),
|
|
128
|
+
_: 3
|
|
129
|
+
}),
|
|
130
|
+
c(A, { side: e.side }, {
|
|
131
|
+
default: n(() => [
|
|
132
|
+
$(v(e.content), 1)
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
}, 8, ["side"])
|
|
136
|
+
]),
|
|
137
|
+
_: 3
|
|
138
|
+
}, 16)
|
|
139
|
+
]),
|
|
140
|
+
_: 3
|
|
141
|
+
})) : l(o.$slots, "default", { key: 1 })
|
|
142
|
+
], 64)) : (r(), i(a(y), f(w({ key: 1 }, { ...a(u), ...o.$attrs })), {
|
|
143
|
+
default: n(() => [
|
|
144
|
+
l(o.$slots, "default")
|
|
145
|
+
]),
|
|
146
|
+
_: 3
|
|
147
|
+
}, 16));
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
function L(e) {
|
|
151
|
+
e.preventDefault(), (e.target.closest('[role="menu"]') || e.target).querySelector("a")?.focus();
|
|
152
|
+
}
|
|
153
|
+
export {
|
|
154
|
+
K as _,
|
|
155
|
+
A as a,
|
|
156
|
+
O as b,
|
|
157
|
+
z as c,
|
|
158
|
+
L as f
|
|
159
|
+
};
|
package/dist/components.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as xe, a as he, b as ke, c as Ge, d as He, e as Re, f as Ee, I as We, g as Ne, h as qe, i as Ke, j as Qe, k as Ve, l as Xe, X as Ye, $ as Ze, Z as Je, t as eo, x as oo, u as to, v as no, w as _o, n as io, z as ro, m as co, o as lo, p as so, r as ao, s as uo, y as po, A as mo, D as vo, F as bo, G as Uo, K as go, L as fo, M as So, N as To, O as yo, P as jo, Q as Oo, R as Mo, S as Po, T as zo, V as $o, W as Bo, Y as Do, a2 as Co, a5 as Io, a4 as Lo, a7 as Ao, a8 as wo, aa as Fo, ab as xo, ae as ho, ag as ko, ah as Go, ai as Ho, aj as Ro, ak as Eo, an as Wo, ao as No, ap as r, aq as c, ar as l, as as s, at as a, au as u, av as p, aw as m, ax as v, ay as b, az as U, aA as g, aB as d, aC as f, aD as S, aE as T, aF as y } from "./UiTimelineItem.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { b as qo, c as Ko, a as Qo, _ as Vo } from "./a11y
|
|
1
|
+
import { _ as xe, a as he, b as ke, c as Ge, d as He, e as Re, f as Ee, I as We, g as Ne, h as qe, i as Ke, j as Qe, k as Ve, l as Xe, X as Ye, $ as Ze, Z as Je, t as eo, x as oo, u as to, v as no, w as _o, n as io, z as ro, m as co, o as lo, p as so, r as ao, s as uo, y as po, A as mo, D as vo, F as bo, G as Uo, K as go, L as fo, M as So, N as To, O as yo, P as jo, Q as Oo, R as Mo, S as Po, T as zo, V as $o, W as Bo, Y as Do, a2 as Co, a5 as Io, a4 as Lo, a7 as Ao, a8 as wo, aa as Fo, ab as xo, ae as ho, ag as ko, ah as Go, ai as Ho, aj as Ro, ak as Eo, an as Wo, ao as No, ap as r, aq as c, ar as l, as as s, at as a, au as u, av as p, aw as m, ax as v, ay as b, az as U, aA as g, aB as d, aC as f, aD as S, aE as T, aF as y } from "./UiTimelineItem.vue_vue_type_style_index_0_lang-DJFdCn2R.mjs";
|
|
2
|
+
import { b as qo, c as Ko, a as Qo, _ as Vo } from "./a11y-BhF_nl7L.mjs";
|
|
3
3
|
import { RenderSlot as j } from "./slot.mjs";
|
|
4
4
|
const O = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5
5
|
__proto__: null,
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as e, a as s, b as o, c as U, d as r, e as t, f as n, g as p, h as l, U as u, i as d, j as g, k as T, l as S, m, n as b, o as C, p as M, q as I, r as c, s as B, t as D, u as P, v as L, w as v, x as A, y as w, z as F, A as x, B as h, C as H, D as f, E as k, F as G, G as y, H as R, I as j, J as z, K as E, L as W, M as _, N as q, O as J, P as K, Q as N, R as O, S as Q, T as V, V as X, W as Y, X as Z, Y as $, Z as aa, $ as ia, a0 as ea, a1 as sa, a2 as oa, a3 as Ua, a4 as ra, a5 as ta, a6 as na, a7 as pa, a8 as la, a9 as ua, aa as da, ab as ga, ac as Ta, ad as Sa, ae as ma, af as ba, ag as Ca, ah as Ma, ai as Ia, aj as ca, ak as Ba, al as Da, am as Pa, an as La, ao as va } from "./UiTimelineItem.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { _ as wa, a as Fa, b as xa, c as ha } from "./a11y
|
|
1
|
+
import { _ as e, a as s, b as o, c as U, d as r, e as t, f as n, g as p, h as l, U as u, i as d, j as g, k as T, l as S, m, n as b, o as C, p as M, q as I, r as c, s as B, t as D, u as P, v as L, w as v, x as A, y as w, z as F, A as x, B as h, C as H, D as f, E as k, F as G, G as y, H as R, I as j, J as z, K as E, L as W, M as _, N as q, O as J, P as K, Q as N, R as O, S as Q, T as V, V as X, W as Y, X as Z, Y as $, Z as aa, $ as ia, a0 as ea, a1 as sa, a2 as oa, a3 as Ua, a4 as ra, a5 as ta, a6 as na, a7 as pa, a8 as la, a9 as ua, aa as da, ab as ga, ac as Ta, ad as Sa, ae as ma, af as ba, ag as Ca, ah as Ma, ai as Ia, aj as ca, ak as Ba, al as Da, am as Pa, an as La, ao as va } from "./UiTimelineItem.vue_vue_type_style_index_0_lang-DJFdCn2R.mjs";
|
|
2
|
+
import { _ as wa, a as Fa, b as xa, c as ha } from "./a11y-BhF_nl7L.mjs";
|
|
3
3
|
export {
|
|
4
4
|
e as UiActionBar,
|
|
5
5
|
s as UiActionBarItem,
|
package/dist/layouts.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as I, computed as w, ref as C, onMounted as M, resolveComponent as E, createElementBlock as n, openBlock as t, createElementVNode as v, createCommentVNode as a, createBlock as y, resolveDynamicComponent as P, normalizeProps as z, guardReactiveProps as H, Fragment as k, normalizeClass as b, normalizeStyle as N, toDisplayString as f, withKeys as S, withCtx as h, createTextVNode as B, getCurrentInstance as D, createVNode as L, Transition as V, TransitionGroup as A, renderList as R, unref as x, mergeProps as j } from "vue";
|
|
2
2
|
import { useResponsive as K } from "./responsive.mjs";
|
|
3
3
|
import { u as U } from "./toastDSV2-wMh-UMzW.mjs";
|
|
4
|
-
import { u as F } from "./useThemeAndModes-
|
|
4
|
+
import { u as F } from "./useThemeAndModes-BzYwSOEv.mjs";
|
|
5
5
|
const G = ["data-testid"], O = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "absolute h-1 bg-grey-100 top-0 left-0 w-full"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useStorage as A } from "@vueuse/core";
|
|
2
|
-
import {
|
|
2
|
+
import { computed as d, watch as f, ref as E, getCurrentInstance as b } from "vue";
|
|
3
3
|
const T = {
|
|
4
4
|
LIVESTORM: "Livestorm",
|
|
5
5
|
CUSTOMER1: "customer1",
|
package/dist/utils.mjs
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { BREAKPOINT_2XL as
|
|
1
|
+
import { BREAKPOINT_2XL as Y, BREAKPOINT_LG as Z, BREAKPOINT_MD as ee, BREAKPOINT_SM as te, BREAKPOINT_XL as ne, BREAKPOINT_XL_PLUS as oe } from "./breakpoints.mjs";
|
|
2
2
|
import "./bus.mjs";
|
|
3
|
-
import { computed as
|
|
4
|
-
import { useClipboard as
|
|
5
|
-
import { u as
|
|
6
|
-
import { b as
|
|
7
|
-
import { f as
|
|
8
|
-
import { useResponsive as
|
|
9
|
-
import { useRoute as $, useRouter as
|
|
10
|
-
import { RenderSlot as
|
|
11
|
-
let
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
document.body.appendChild(
|
|
16
|
-
const
|
|
17
|
-
render: () =>
|
|
18
|
-
|
|
3
|
+
import { computed as l, createApp as g, h as y, ref as T, watch as x, onUnmounted as k, getCurrentInstance as S, onMounted as _, nextTick as w } from "vue";
|
|
4
|
+
import { useClipboard as b, usePermission as A, onKeyDown as C } from "@vueuse/core";
|
|
5
|
+
import { u as E } from "./i18n-Cktw9hIu.mjs";
|
|
6
|
+
import { b as I, _ as R, c as B, a as P } from "./a11y-BhF_nl7L.mjs";
|
|
7
|
+
import { f as ie } from "./a11y-BhF_nl7L.mjs";
|
|
8
|
+
import { useResponsive as ue } from "./responsive.mjs";
|
|
9
|
+
import { useRoute as $, useRouter as q } from "vue-router";
|
|
10
|
+
import { RenderSlot as ae, getSlotAsComponent as de, unwrapFragments as le, useSlotsAsComponents as fe } from "./slot.mjs";
|
|
11
|
+
let v = null;
|
|
12
|
+
function L(s, i) {
|
|
13
|
+
v && v();
|
|
14
|
+
const e = s.getBoundingClientRect(), t = document.createElement("div");
|
|
15
|
+
document.body.appendChild(t);
|
|
16
|
+
const f = g({
|
|
17
|
+
render: () => y(I, null, () => y(R, { open: !0, delayDuration: 0 }, () => [
|
|
18
|
+
y(B, { asChild: !0 }, () => y("span", {
|
|
19
19
|
"aria-hidden": "true",
|
|
20
20
|
style: {
|
|
21
21
|
position: "fixed",
|
|
22
|
-
left: `${
|
|
23
|
-
top: `${
|
|
24
|
-
width: `${
|
|
25
|
-
height: `${
|
|
22
|
+
left: `${e.left}px`,
|
|
23
|
+
top: `${e.top}px`,
|
|
24
|
+
width: `${e.width}px`,
|
|
25
|
+
height: `${e.height}px`,
|
|
26
26
|
pointerEvents: "none"
|
|
27
27
|
}
|
|
28
28
|
})),
|
|
29
|
-
|
|
29
|
+
y(P, { side: "top" }, () => i),
|
|
30
30
|
// The bubble lives in reka's portal where attrs like role are not
|
|
31
31
|
// forwardable; announce the feedback from a visually hidden live
|
|
32
32
|
// region instead so screen readers hear the copy confirmation.
|
|
33
|
-
|
|
33
|
+
y("span", {
|
|
34
34
|
role: "status",
|
|
35
35
|
style: {
|
|
36
36
|
position: "absolute",
|
|
@@ -39,108 +39,163 @@ function k(n, c) {
|
|
|
39
39
|
overflow: "hidden",
|
|
40
40
|
clipPath: "inset(50%)"
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, i)
|
|
43
43
|
]))
|
|
44
44
|
});
|
|
45
|
-
|
|
46
|
-
let
|
|
47
|
-
const
|
|
48
|
-
|
|
45
|
+
f.mount(t);
|
|
46
|
+
let a = !1;
|
|
47
|
+
const u = () => {
|
|
48
|
+
a || (a = !0, v === u && (v = null), f.unmount(), t.remove());
|
|
49
49
|
};
|
|
50
|
-
return
|
|
50
|
+
return v = u, u;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
const { isSupported:
|
|
54
|
-
async function
|
|
55
|
-
if (await
|
|
56
|
-
|
|
57
|
-
const
|
|
52
|
+
function H() {
|
|
53
|
+
const { isSupported: s, copy: i } = b(), e = A("clipboard-write"), t = E(), f = l(() => s.value && e.value);
|
|
54
|
+
async function a(u, d, m = t("general_misc_copied-text")) {
|
|
55
|
+
if (await i(u), d) {
|
|
56
|
+
d.classList.add("copied");
|
|
57
|
+
const n = L(d, m);
|
|
58
58
|
setTimeout(() => {
|
|
59
|
-
|
|
59
|
+
d.classList.remove("copied"), n();
|
|
60
60
|
}, 600);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
return {
|
|
64
|
-
canCopy:
|
|
65
|
-
copy:
|
|
64
|
+
canCopy: f,
|
|
65
|
+
copy: a
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
const
|
|
70
|
-
function
|
|
71
|
-
const
|
|
72
|
-
for (const
|
|
73
|
-
|
|
74
|
-
return
|
|
68
|
+
function Q(s, i = !1) {
|
|
69
|
+
const e = $(), t = q(), f = `${s}-`;
|
|
70
|
+
function a() {
|
|
71
|
+
const n = [];
|
|
72
|
+
for (const r in e.query)
|
|
73
|
+
r.startsWith(f) && n.push(r);
|
|
74
|
+
return n;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
return
|
|
76
|
+
function u(n) {
|
|
77
|
+
return n === "true" ? !0 : n === "false" ? !1 : n ?? !1;
|
|
78
78
|
}
|
|
79
|
-
const
|
|
80
|
-
if (
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
79
|
+
const d = l(() => {
|
|
80
|
+
if (i) {
|
|
81
|
+
const n = a();
|
|
82
|
+
if (n.length === 0)
|
|
83
83
|
return !1;
|
|
84
|
-
const
|
|
85
|
-
for (const
|
|
86
|
-
|
|
87
|
-
return
|
|
84
|
+
const r = {};
|
|
85
|
+
for (const c of n)
|
|
86
|
+
r[c.substring(f.length)] = u(e.query[c]);
|
|
87
|
+
return r;
|
|
88
88
|
} else
|
|
89
|
-
return
|
|
90
|
-
}), m = !!
|
|
91
|
-
return
|
|
92
|
-
get: () =>
|
|
93
|
-
set: (
|
|
94
|
-
if (
|
|
95
|
-
const
|
|
96
|
-
if (
|
|
97
|
-
|
|
89
|
+
return u(e.query[s]);
|
|
90
|
+
}), m = !!d.value;
|
|
91
|
+
return l({
|
|
92
|
+
get: () => d.value,
|
|
93
|
+
set: (n) => {
|
|
94
|
+
if (n === d.value) return;
|
|
95
|
+
const r = n == null || n === !1;
|
|
96
|
+
if (r && !m)
|
|
97
|
+
t.back();
|
|
98
98
|
else {
|
|
99
|
-
let
|
|
100
|
-
if (
|
|
101
|
-
if (
|
|
102
|
-
const
|
|
103
|
-
for (const
|
|
104
|
-
|
|
99
|
+
let c;
|
|
100
|
+
if (i)
|
|
101
|
+
if (c = {}, r) {
|
|
102
|
+
const h = a();
|
|
103
|
+
for (const o of h)
|
|
104
|
+
c[o] = void 0;
|
|
105
105
|
} else
|
|
106
|
-
for (const
|
|
107
|
-
|
|
106
|
+
for (const h in n)
|
|
107
|
+
c[`${s}-${h}`] = n[h];
|
|
108
108
|
else
|
|
109
|
-
|
|
110
|
-
[
|
|
109
|
+
c = {
|
|
110
|
+
[s]: r ? void 0 : n
|
|
111
111
|
};
|
|
112
|
-
|
|
113
|
-
...
|
|
112
|
+
t[r ? "replace" : "push"]({
|
|
113
|
+
...e,
|
|
114
114
|
query: {
|
|
115
|
-
...
|
|
116
|
-
...
|
|
115
|
+
...e.query,
|
|
116
|
+
...c
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
let
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
let K = 0;
|
|
124
|
+
const p = T([]), O = l(() => p.value.length > 0);
|
|
125
|
+
function W(s, i) {
|
|
126
|
+
const e = K++, t = l(() => p.value.findIndex((o) => o.id === e));
|
|
127
|
+
function f() {
|
|
128
|
+
p.value.some((o) => o.id === e) || p.value.push({
|
|
129
|
+
id: e,
|
|
130
|
+
type: i
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function a() {
|
|
134
|
+
t.value !== -1 && p.value.splice(t.value, 1);
|
|
135
|
+
}
|
|
136
|
+
x(s, (o) => {
|
|
137
|
+
o ? f() : a();
|
|
138
|
+
}, {
|
|
139
|
+
immediate: !0
|
|
140
|
+
}), k(() => {
|
|
141
|
+
a();
|
|
142
|
+
});
|
|
143
|
+
const u = l(() => e === p.value[p.value.length - 1]?.id), d = l(() => t.value > 0), m = l(() => p.value.filter((o) => o.type === i)), n = l(() => m.value.findIndex((o) => o.id === e) < m.value.length - 1), r = l(() => m.value.findIndex((o) => o.id === e) > 0), c = [];
|
|
144
|
+
function h(o) {
|
|
145
|
+
c.push(o);
|
|
146
|
+
}
|
|
147
|
+
return C("Escape", () => {
|
|
148
|
+
u.value && c.forEach((o) => o());
|
|
149
|
+
}), {
|
|
150
|
+
isActiveStacked: u,
|
|
151
|
+
hasStackedBehind: d,
|
|
152
|
+
isBehindSameType: n,
|
|
153
|
+
hasStackedSameTypeBehind: r,
|
|
154
|
+
stackIndex: t,
|
|
155
|
+
onClose: h
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
typeof document < "u" && x(O, (s) => {
|
|
159
|
+
s ? document.documentElement.classList.add("overflow-hidden") : document.documentElement.classList.remove("overflow-hidden");
|
|
160
|
+
}, {
|
|
161
|
+
immediate: !0
|
|
162
|
+
});
|
|
163
|
+
function j() {
|
|
164
|
+
const s = S();
|
|
165
|
+
let i = null;
|
|
166
|
+
_(async () => {
|
|
167
|
+
await w();
|
|
168
|
+
const e = s.proxy.$el;
|
|
169
|
+
if (!e?.querySelector) return;
|
|
170
|
+
let t = e.querySelector("[data-stackview-autofocus]");
|
|
171
|
+
t ? ["INPUT", "A", "BUTTON", "TEXTAREA"].includes(t.tagName) || (t = t.querySelector("input, a, button, textarea") || t) : (t = e.querySelector('button[type="submit"]'), console.warn(
|
|
172
|
+
"%cDEV",
|
|
173
|
+
"background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;",
|
|
174
|
+
"A element should have the data-stackview-autofocus attribute in this component. Fallback to submit button."
|
|
175
|
+
)), clearTimeout(i), i = setTimeout(() => t?.focus(), 150);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
let U = 0;
|
|
179
|
+
function G() {
|
|
180
|
+
return ++U;
|
|
126
181
|
}
|
|
127
182
|
export {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
183
|
+
Y as BREAKPOINT_2XL,
|
|
184
|
+
Z as BREAKPOINT_LG,
|
|
185
|
+
ee as BREAKPOINT_MD,
|
|
186
|
+
te as BREAKPOINT_SM,
|
|
187
|
+
ne as BREAKPOINT_XL,
|
|
188
|
+
oe as BREAKPOINT_XL_PLUS,
|
|
189
|
+
ae as RenderSlot,
|
|
190
|
+
ie as focusFirstMenuItem,
|
|
191
|
+
de as getSlotAsComponent,
|
|
192
|
+
G as getUid,
|
|
193
|
+
O as hasStackedComponents,
|
|
194
|
+
le as unwrapFragments,
|
|
195
|
+
H as useCopyToClipboard,
|
|
196
|
+
ue as useResponsive,
|
|
197
|
+
Q as useRouteQueryModel,
|
|
198
|
+
fe as useSlotsAsComponents,
|
|
199
|
+
j as useStackAutofocus,
|
|
200
|
+
W as useStackedComponent
|
|
146
201
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livestorm/ui-vue",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "Livestorm UI components for Vue 3",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
"main": "./dist/index.mjs",
|
|
12
12
|
"module": "./dist/index.mjs",
|
|
13
13
|
"types": "./dist/types/index.d.ts",
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"**/*.css",
|
|
16
|
+
"./index.js",
|
|
17
|
+
"./style.js"
|
|
18
|
+
],
|
|
14
19
|
"files": [
|
|
15
20
|
"dist",
|
|
16
21
|
"src",
|
|
@@ -38,8 +43,8 @@
|
|
|
38
43
|
"i18next": "^26.3.4",
|
|
39
44
|
"mitt": "^3.0.1",
|
|
40
45
|
"reka-ui": "^2.9.10",
|
|
41
|
-
"@livestorm/ui-tokens": "^2.0.
|
|
42
|
-
"@livestorm/ui-icons": "^2.0.
|
|
46
|
+
"@livestorm/ui-tokens": "^2.0.5",
|
|
47
|
+
"@livestorm/ui-icons": "^2.0.5"
|
|
43
48
|
},
|
|
44
49
|
"devDependencies": {
|
|
45
50
|
"@chromatic-com/storybook": "^5.2.1",
|
|
@@ -69,6 +69,8 @@ const indicatorStyle = ref<Record<string, string>>({
|
|
|
69
69
|
const indicatorVisible = ref(false)
|
|
70
70
|
|
|
71
71
|
function getRootEl (): HTMLElement | null {
|
|
72
|
+
// HTMLElement does not exist during SSR — this can run server-side.
|
|
73
|
+
if (typeof HTMLElement === 'undefined') return null
|
|
72
74
|
const el = (rootRef.value as unknown as { $el?: unknown })?.$el
|
|
73
75
|
return el instanceof HTMLElement ? el : null
|
|
74
76
|
}
|
|
@@ -26,6 +26,8 @@ const registry = inject(BUTTON_GROUP_REGISTER_KEY, null)
|
|
|
26
26
|
const itemRef = ref<InstanceType<typeof ToggleGroupItem> | null>(null)
|
|
27
27
|
|
|
28
28
|
function resolveEl (): HTMLElement | null {
|
|
29
|
+
// HTMLElement does not exist during SSR — this can run server-side.
|
|
30
|
+
if (typeof HTMLElement === 'undefined') return null
|
|
29
31
|
const el = (itemRef.value as unknown as { $el?: unknown })?.$el
|
|
30
32
|
return el instanceof HTMLElement ? el : null
|
|
31
33
|
}
|
|
@@ -98,15 +98,20 @@ const { addElementToWatch } = useThemeAndModes()
|
|
|
98
98
|
// the internal theming tooling is enabled, so the stored content mode
|
|
99
99
|
// (driven by the ThemePicker) can apply; for everyone else the content
|
|
100
100
|
// stays light regardless of what localStorage may hold.
|
|
101
|
-
|
|
101
|
+
// Read in onMounted, not at setup: setup also runs during SSR (no
|
|
102
|
+
// localStorage), and server + client-hydration markup must be identical —
|
|
103
|
+
// the pin lifts right after mount for the internal tooling instead.
|
|
104
|
+
const isInternalThemingEnabled = ref(false)
|
|
102
105
|
|
|
103
106
|
onMounted(() => {
|
|
107
|
+
isInternalThemingEnabled.value = localStorage.getItem('ls-internal-theming') === 'true'
|
|
108
|
+
|
|
104
109
|
addElementToWatch(
|
|
105
110
|
'content',
|
|
106
111
|
{
|
|
107
112
|
selector: '[data-name="ui-page-content"]',
|
|
108
113
|
element: PageContent.value!,
|
|
109
|
-
...(isInternalThemingEnabled ? {} : { modeOverride: 'light' }),
|
|
114
|
+
...(isInternalThemingEnabled.value ? {} : { modeOverride: 'light' }),
|
|
110
115
|
})
|
|
111
116
|
})
|
|
112
117
|
|
package/dist/a11y--y7uaY4j.mjs
DELETED
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { defineComponent as g, createBlock as f, openBlock as c, unref as i, normalizeProps as y, guardReactiveProps as b, withCtx as l, renderSlot as m, computed as r, createVNode as h, mergeProps as T, createCommentVNode as D, getCurrentInstance as B, createElementBlock as A, Fragment as E, createTextVNode as U, toDisplayString as F, ref as N, watch as S, onUnmounted as I, onMounted as H, nextTick as O } from "vue";
|
|
2
|
-
import { TooltipProvider as W, useForwardProps as q, TooltipTrigger as L, useForwardPropsEmits as C, TooltipPortal as M, TooltipContent as z, TooltipArrow as K, TooltipRoot as x } from "reka-ui";
|
|
3
|
-
import { reactiveOmit as V, onKeyDown as R } from "@vueuse/core";
|
|
4
|
-
const X = /* @__PURE__ */ g({
|
|
5
|
-
__name: "UiTooltipProvider",
|
|
6
|
-
props: {
|
|
7
|
-
delayDuration: { default: 700 },
|
|
8
|
-
skipDelayDuration: { default: 300 },
|
|
9
|
-
disableHoverableContent: { type: Boolean },
|
|
10
|
-
disableClosingTrigger: { type: Boolean },
|
|
11
|
-
disabled: { type: Boolean },
|
|
12
|
-
ignoreNonKeyboardFocus: { type: Boolean },
|
|
13
|
-
content: {}
|
|
14
|
-
},
|
|
15
|
-
setup(t) {
|
|
16
|
-
return (s, e) => (c(), f(i(W), y(b(s.$props)), {
|
|
17
|
-
default: l(() => [
|
|
18
|
-
m(s.$slots, "default")
|
|
19
|
-
]),
|
|
20
|
-
_: 3
|
|
21
|
-
}, 16));
|
|
22
|
-
}
|
|
23
|
-
}), j = /* @__PURE__ */ g({
|
|
24
|
-
__name: "UiTooltipTrigger",
|
|
25
|
-
props: {
|
|
26
|
-
reference: {},
|
|
27
|
-
asChild: { type: Boolean },
|
|
28
|
-
as: {}
|
|
29
|
-
},
|
|
30
|
-
setup(t) {
|
|
31
|
-
const e = q(t);
|
|
32
|
-
return (o, p) => (c(), f(i(L), y(b({ ...i(e), ...o.$attrs })), {
|
|
33
|
-
default: l(() => [
|
|
34
|
-
m(o.$slots, "default")
|
|
35
|
-
]),
|
|
36
|
-
_: 3
|
|
37
|
-
}, 16));
|
|
38
|
-
}
|
|
39
|
-
}), G = /* @__PURE__ */ g({
|
|
40
|
-
__name: "UiTooltipContent",
|
|
41
|
-
props: {
|
|
42
|
-
colorsSemantic: { default: "light" },
|
|
43
|
-
maxWidth: { default: "base" },
|
|
44
|
-
showArrow: { type: Boolean, default: !0 },
|
|
45
|
-
arrowWidth: { default: 10 },
|
|
46
|
-
arrowHeight: { default: 5 },
|
|
47
|
-
forceMount: { type: Boolean },
|
|
48
|
-
ariaLabel: {},
|
|
49
|
-
asChild: { type: Boolean },
|
|
50
|
-
as: {},
|
|
51
|
-
side: {},
|
|
52
|
-
sideOffset: { default: 12 },
|
|
53
|
-
align: {},
|
|
54
|
-
alignOffset: {},
|
|
55
|
-
avoidCollisions: { type: Boolean },
|
|
56
|
-
collisionBoundary: {},
|
|
57
|
-
collisionPadding: {},
|
|
58
|
-
arrowPadding: {},
|
|
59
|
-
sticky: {},
|
|
60
|
-
hideWhenDetached: { type: Boolean },
|
|
61
|
-
positionStrategy: {},
|
|
62
|
-
updatePositionStrategy: {}
|
|
63
|
-
},
|
|
64
|
-
emits: ["escapeKeyDown", "pointerDownOutside"],
|
|
65
|
-
setup(t, { emit: s }) {
|
|
66
|
-
const e = t, p = C(e, s), u = r(() => ({
|
|
67
|
-
xs: "max-w-[150px]",
|
|
68
|
-
sm: "max-w-[240px]",
|
|
69
|
-
md: "max-w-md",
|
|
70
|
-
base: "max-w-xs",
|
|
71
|
-
lg: "max-w-lg",
|
|
72
|
-
xl: "max-w-xl"
|
|
73
|
-
})[e.maxWidth]);
|
|
74
|
-
return (a, w) => (c(), f(i(M), null, {
|
|
75
|
-
default: l(() => [
|
|
76
|
-
h(i(z), T({ ...i(p), ...a.$attrs }, {
|
|
77
|
-
"data-colors-semantic": e.colorsSemantic,
|
|
78
|
-
class: [
|
|
79
|
-
"ui-tooltip-content py-1.5 px-3 bg-surface-neutral-invert-bg-alpha text-text-neutral-invert-base text-content-text-md-regular rounded-md text-center z-50 shadow-shadows-drop-shadow-lg",
|
|
80
|
-
"data-[state=delayed-open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=delayed-open]:zoom-in-95",
|
|
81
|
-
u.value
|
|
82
|
-
]
|
|
83
|
-
}), {
|
|
84
|
-
default: l(() => [
|
|
85
|
-
m(a.$slots, "default"),
|
|
86
|
-
e.showArrow ? (c(), f(i(K), {
|
|
87
|
-
key: 0,
|
|
88
|
-
width: e.arrowWidth,
|
|
89
|
-
height: e.arrowHeight,
|
|
90
|
-
class: "fill-surface-neutral-invert-bg-alpha"
|
|
91
|
-
}, null, 8, ["width", "height"])) : D("", !0)
|
|
92
|
-
]),
|
|
93
|
-
_: 3
|
|
94
|
-
}, 16, ["data-colors-semantic", "class"])
|
|
95
|
-
]),
|
|
96
|
-
_: 3
|
|
97
|
-
}));
|
|
98
|
-
}
|
|
99
|
-
}), te = /* @__PURE__ */ g({
|
|
100
|
-
inheritAttrs: !1,
|
|
101
|
-
__name: "UiTooltip",
|
|
102
|
-
props: {
|
|
103
|
-
content: {},
|
|
104
|
-
side: {},
|
|
105
|
-
defaultOpen: { type: Boolean },
|
|
106
|
-
open: { type: Boolean },
|
|
107
|
-
delayDuration: {},
|
|
108
|
-
disableHoverableContent: { type: Boolean },
|
|
109
|
-
disableClosingTrigger: { type: Boolean },
|
|
110
|
-
disabled: { type: Boolean },
|
|
111
|
-
ignoreNonKeyboardFocus: { type: Boolean }
|
|
112
|
-
},
|
|
113
|
-
emits: ["update:open"],
|
|
114
|
-
setup(t, { emit: s }) {
|
|
115
|
-
const e = t, o = s, p = r(() => {
|
|
116
|
-
const a = B()?.vnode.props;
|
|
117
|
-
return !!a && "content" in a;
|
|
118
|
-
}), u = C(V(e, "content", "side"), o);
|
|
119
|
-
return (a, w) => p.value ? (c(), A(E, { key: 0 }, [
|
|
120
|
-
t.content ? (c(), f(X, { key: 0 }, {
|
|
121
|
-
default: l(() => [
|
|
122
|
-
h(i(x), y(b({ ...i(u), ...a.$attrs })), {
|
|
123
|
-
default: l(() => [
|
|
124
|
-
h(j, { "as-child": "" }, {
|
|
125
|
-
default: l(() => [
|
|
126
|
-
m(a.$slots, "default")
|
|
127
|
-
]),
|
|
128
|
-
_: 3
|
|
129
|
-
}),
|
|
130
|
-
h(G, { side: t.side }, {
|
|
131
|
-
default: l(() => [
|
|
132
|
-
U(F(t.content), 1)
|
|
133
|
-
]),
|
|
134
|
-
_: 1
|
|
135
|
-
}, 8, ["side"])
|
|
136
|
-
]),
|
|
137
|
-
_: 3
|
|
138
|
-
}, 16)
|
|
139
|
-
]),
|
|
140
|
-
_: 3
|
|
141
|
-
})) : m(a.$slots, "default", { key: 1 })
|
|
142
|
-
], 64)) : (c(), f(i(x), y(T({ key: 1 }, { ...i(u), ...a.$attrs })), {
|
|
143
|
-
default: l(() => [
|
|
144
|
-
m(a.$slots, "default")
|
|
145
|
-
]),
|
|
146
|
-
_: 3
|
|
147
|
-
}, 16));
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
let J = 0;
|
|
151
|
-
const d = N([]), Q = r(() => d.value.length > 0);
|
|
152
|
-
function oe(t, s) {
|
|
153
|
-
const e = J++, o = r(() => d.value.findIndex((n) => n.id === e));
|
|
154
|
-
function p() {
|
|
155
|
-
d.value.some((n) => n.id === e) || d.value.push({
|
|
156
|
-
id: e,
|
|
157
|
-
type: s
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
function u() {
|
|
161
|
-
o.value !== -1 && d.value.splice(o.value, 1);
|
|
162
|
-
}
|
|
163
|
-
S(t, (n) => {
|
|
164
|
-
n ? p() : u();
|
|
165
|
-
}, {
|
|
166
|
-
immediate: !0
|
|
167
|
-
}), I(() => {
|
|
168
|
-
u();
|
|
169
|
-
});
|
|
170
|
-
const a = r(() => e === d.value[d.value.length - 1]?.id), w = r(() => o.value > 0), v = r(() => d.value.filter((n) => n.type === s)), _ = r(() => v.value.findIndex((n) => n.id === e) < v.value.length - 1), $ = r(() => v.value.findIndex((n) => n.id === e) > 0), k = [];
|
|
171
|
-
function P(n) {
|
|
172
|
-
k.push(n);
|
|
173
|
-
}
|
|
174
|
-
return R("Escape", () => {
|
|
175
|
-
a.value && k.forEach((n) => n());
|
|
176
|
-
}), {
|
|
177
|
-
isActiveStacked: a,
|
|
178
|
-
hasStackedBehind: w,
|
|
179
|
-
isBehindSameType: _,
|
|
180
|
-
hasStackedSameTypeBehind: $,
|
|
181
|
-
stackIndex: o,
|
|
182
|
-
onClose: P
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
typeof document < "u" && S(Q, (t) => {
|
|
186
|
-
t ? document.documentElement.classList.add("overflow-hidden") : document.documentElement.classList.remove("overflow-hidden");
|
|
187
|
-
}, {
|
|
188
|
-
immediate: !0
|
|
189
|
-
});
|
|
190
|
-
function ae() {
|
|
191
|
-
const t = B();
|
|
192
|
-
let s = null;
|
|
193
|
-
H(async () => {
|
|
194
|
-
await O();
|
|
195
|
-
const e = t.proxy.$el;
|
|
196
|
-
if (!e?.querySelector) return;
|
|
197
|
-
let o = e.querySelector("[data-stackview-autofocus]");
|
|
198
|
-
o ? ["INPUT", "A", "BUTTON", "TEXTAREA"].includes(o.tagName) || (o = o.querySelector("input, a, button, textarea") || o) : (o = e.querySelector('button[type="submit"]'), console.warn(
|
|
199
|
-
"%cDEV",
|
|
200
|
-
"background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;",
|
|
201
|
-
"A element should have the data-stackview-autofocus attribute in this component. Fallback to submit button."
|
|
202
|
-
)), clearTimeout(s), s = setTimeout(() => o?.focus(), 150);
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
function ne(t) {
|
|
206
|
-
t.preventDefault(), (t.target.closest('[role="menu"]') || t.target).querySelector("a")?.focus();
|
|
207
|
-
}
|
|
208
|
-
export {
|
|
209
|
-
te as _,
|
|
210
|
-
G as a,
|
|
211
|
-
X as b,
|
|
212
|
-
j as c,
|
|
213
|
-
ae as d,
|
|
214
|
-
ne as f,
|
|
215
|
-
Q as h,
|
|
216
|
-
oe as u
|
|
217
|
-
};
|