@livestorm/ui-vue 2.0.3 → 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.
Files changed (41) hide show
  1. package/README.md +30 -2
  2. package/dist/{UiTimelineItem.vue_vue_type_style_index_0_lang-UNNkatTS.mjs → UiTimelineItem.vue_vue_type_style_index_0_lang-DJFdCn2R.mjs} +1522 -1518
  3. package/dist/a11y-BhF_nl7L.mjs +159 -0
  4. package/dist/components.mjs +2 -2
  5. package/dist/i18n-Cktw9hIu.mjs +49 -0
  6. package/dist/index.mjs +2 -2
  7. package/dist/integrations.mjs +10 -4
  8. package/dist/layouts.mjs +1 -1
  9. package/dist/types/src/components/Toast/ToastMessage.vue.d.ts +4 -4
  10. package/dist/types/src/components/UiBanner/UiBanner.vue.d.ts +2 -2
  11. package/dist/types/src/components/UiButton/UiButton.vue.d.ts +1 -1
  12. package/dist/types/src/components/UiButtonGroup/UiButtonGroup.vue.d.ts +1 -1
  13. package/dist/types/src/components/UiColorField/UiColorField.vue.d.ts +2 -2
  14. package/dist/types/src/components/UiColorPicker/UiColorPicker.vue.d.ts +2 -2
  15. package/dist/types/src/components/UiDropdown/UiDropdownTrigger.vue.d.ts +1 -1
  16. package/dist/types/src/components/UiFieldWrapper/UiFieldWrapper.vue.d.ts +1 -1
  17. package/dist/types/src/components/UiForm/UiFormField.vue.d.ts +1 -1
  18. package/dist/types/src/components/UiInputCheckbox/UiInputCheckbox.vue.d.ts +5 -5
  19. package/dist/types/src/components/UiInputSelect/UiInputSelect.vue.d.ts +3 -3
  20. package/dist/types/src/components/UiInputTextarea/UiInputTextarea.vue.d.ts +3 -3
  21. package/dist/types/src/components/UiTextField/UiTextField.vue.d.ts +5 -5
  22. package/dist/types/src/composables/useButtonStyles.d.ts +1 -1
  23. package/dist/types/src/integrations/index.d.ts +1 -0
  24. package/dist/types/src/utils/i18n.d.ts +51 -0
  25. package/dist/ui-vue.css +1 -1
  26. package/dist/{useThemeAndModes-CUK56j0z.mjs → useThemeAndModes-BzYwSOEv.mjs} +1 -1
  27. package/dist/utils.mjs +152 -97
  28. package/integrations.d.ts +1 -0
  29. package/package.json +26 -19
  30. package/src/components/UiBanner/UiBanner.vue +4 -2
  31. package/src/components/UiButtonGroup/UiButtonGroup.vue +2 -0
  32. package/src/components/UiButtonGroup/UiButtonGroupItem.vue +2 -0
  33. package/src/components/UiDialog/UiDialogContent.vue +12 -4
  34. package/src/components/UiPage/UiPage.vue +7 -2
  35. package/src/components/UiSideMenu/UiSideMenu.vue +4 -3
  36. package/src/css/body.css +15 -7
  37. package/src/css/fonts.css +10 -0
  38. package/src/integrations/index.js +1 -0
  39. package/src/utils/clipboard.js +5 -2
  40. package/src/utils/i18n.ts +113 -0
  41. package/dist/a11y--y7uaY4j.mjs +0 -217
@@ -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
+ };
@@ -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-UNNkatTS.mjs";
2
- import { b as qo, c as Ko, a as Qo, _ as Vo } from "./a11y--y7uaY4j.mjs";
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,
@@ -0,0 +1,49 @@
1
+ import r from "i18next";
2
+ import { getCurrentInstance as c, inject as _ } from "vue";
3
+ const o = {
4
+ en: {
5
+ general_close: "Close",
6
+ general_dialog_title: "Dialog",
7
+ "general_misc_copied-text": "Copied!",
8
+ "room_bottom-bar_controls-label_more": "More"
9
+ },
10
+ fr: {
11
+ general_close: "Fermer",
12
+ general_dialog_title: "Dialog",
13
+ "general_misc_copied-text": "Copié !",
14
+ "room_bottom-bar_controls-label_more": "Plus"
15
+ }
16
+ }, p = Object.freeze(Object.keys(o.en)), m = /* @__PURE__ */ Symbol("ui-vue-translator");
17
+ let i = null;
18
+ function b(n) {
19
+ i = n;
20
+ }
21
+ function s(n, e) {
22
+ if (!n) return null;
23
+ const t = n(e);
24
+ return typeof t == "string" && t !== e ? t : null;
25
+ }
26
+ function L(n) {
27
+ return a(null, n);
28
+ }
29
+ function A() {
30
+ const n = c() ? _(m, null) : null;
31
+ return (e) => a(n, e);
32
+ }
33
+ function a(n, e) {
34
+ const t = s(n, e);
35
+ if (t !== null) return t;
36
+ const l = s(i, e);
37
+ if (l !== null) return l;
38
+ if (r.isInitialized && r.exists(e))
39
+ return r.t(e);
40
+ const u = typeof document > "u" ? "en" : (document.documentElement.lang || "en").toLowerCase().split("-")[0];
41
+ return (o[u] || o.en)[e] ?? o.en[e] ?? e;
42
+ }
43
+ export {
44
+ p as B,
45
+ m as U,
46
+ b as s,
47
+ L as t,
48
+ A as u
49
+ };
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-UNNkatTS.mjs";
2
- import { _ as wa, a as Fa, b as xa, c as ha } from "./a11y--y7uaY4j.mjs";
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,
@@ -1,8 +1,14 @@
1
- import { a as o, c as e, o as t, r, u as T } from "./toastDSV2-wMh-UMzW.mjs";
1
+ import { a as e, c as o, o as t, r, u as T } from "./toastDSV2-wMh-UMzW.mjs";
2
+ import { B as n, U as _, s as c, t as u, u as L } from "./i18n-Cktw9hIu.mjs";
2
3
  export {
3
- o as cancelCloseTimer,
4
- e as closeToast,
4
+ n as BUILT_IN_LABEL_KEYS,
5
+ _ as UI_VUE_TRANSLATOR,
6
+ e as cancelCloseTimer,
7
+ o as closeToast,
5
8
  t as openToast,
6
9
  r as resetToasts,
7
- T as useToasts
10
+ c as setTranslator,
11
+ u as translate,
12
+ T as useToasts,
13
+ L as useTranslate
8
14
  };
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-CUK56j0z.mjs";
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,15 +1,15 @@
1
1
  import type { ToastOptions } from './toastDSV2';
2
2
  declare const __VLS_export: import("vue").DefineComponent<Partial<ToastOptions>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
- cancel: (...args: any[]) => void;
4
- close: (...args: any[]) => void;
5
3
  mouseenter: (...args: any[]) => void;
6
4
  mouseleave: (...args: any[]) => void;
5
+ close: (...args: any[]) => void;
6
+ cancel: (...args: any[]) => void;
7
7
  confirm: (...args: any[]) => void;
8
8
  }, string, import("vue").PublicProps, Readonly<Partial<ToastOptions>> & Readonly<{
9
- onCancel?: ((...args: any[]) => any) | undefined;
10
- onClose?: ((...args: any[]) => any) | undefined;
11
9
  onMouseenter?: ((...args: any[]) => any) | undefined;
12
10
  onMouseleave?: ((...args: any[]) => any) | undefined;
11
+ onClose?: ((...args: any[]) => any) | undefined;
12
+ onCancel?: ((...args: any[]) => any) | undefined;
13
13
  onConfirm?: ((...args: any[]) => any) | undefined;
14
14
  }>, {
15
15
  type: import("../../theme").ThemeColorType;
@@ -65,12 +65,12 @@ type __VLS_Slots = {} & {
65
65
  description?: (props: typeof __VLS_3) => any;
66
66
  };
67
67
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
68
- close: () => any;
69
68
  "banner-action": () => any;
69
+ close: () => any;
70
70
  "update:closed": (value: boolean) => any;
71
71
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
72
- onClose?: (() => any) | undefined;
73
72
  "onBanner-action"?: (() => any) | undefined;
73
+ onClose?: (() => any) | undefined;
74
74
  "onUpdate:closed"?: ((value: boolean) => any) | undefined;
75
75
  }>, {
76
76
  variant: "full-width" | "horizontal" | "vertical";
@@ -221,7 +221,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
221
221
  to: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
222
222
  href: string;
223
223
  variant: "cta" | "cta-alpha" | "secondary" | "tertiary";
224
- color: "error" | "primary" | "neutral" | "warning" | "success" | "neutral-invert";
224
+ color: "primary" | "neutral" | "warning" | "success" | "error" | "neutral-invert";
225
225
  showIconLeft: boolean;
226
226
  iconRight: string | boolean;
227
227
  loading: boolean;
@@ -27,8 +27,8 @@ declare const __VLS_base: import("vue").DefineComponent<UiButtonGroupProps, {},
27
27
  size: ButtonGroupSize;
28
28
  disabled: boolean;
29
29
  color: ButtonGroupColor;
30
- name: string;
31
30
  defaultValue: string;
31
+ name: string;
32
32
  modelValue: string;
33
33
  allowDeselect: boolean;
34
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,10 +1,10 @@
1
1
  import type { UiColorFieldProps } from './types';
2
2
  declare const __VLS_export: import("vue").DefineComponent<UiColorFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
- change: (value: string) => any;
4
3
  "update:modelValue": (value: string) => any;
4
+ change: (value: string) => any;
5
5
  }, string, import("vue").PublicProps, Readonly<UiColorFieldProps> & Readonly<{
6
- onChange?: ((value: string) => any) | undefined;
7
6
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
7
+ onChange?: ((value: string) => any) | undefined;
8
8
  }>, {
9
9
  size: import("../UiTextField").TextFieldSize;
10
10
  ariaLabel: string;
@@ -5,15 +5,15 @@ type __VLS_Slots = {} & {
5
5
  footer?: (props: typeof __VLS_144) => any;
6
6
  };
7
7
  declare const __VLS_base: import("vue").DefineComponent<UiColorPickerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
- change: (value: string) => any;
9
8
  "update:modelValue": (value: string) => any;
10
9
  "update:color": (color: Color) => any;
11
10
  "update:selectedPresetValue": (value: string) => any;
11
+ change: (value: string) => any;
12
12
  }, string, import("vue").PublicProps, Readonly<UiColorPickerProps> & Readonly<{
13
- onChange?: ((value: string) => any) | undefined;
14
13
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
15
14
  "onUpdate:color"?: ((color: Color) => any) | undefined;
16
15
  "onUpdate:selectedPresetValue"?: ((value: string) => any) | undefined;
16
+ onChange?: ((value: string) => any) | undefined;
17
17
  }>, {
18
18
  disabled: boolean;
19
19
  variant: import("./types").UiColorPickerVariant;
@@ -28,10 +28,10 @@ type __VLS_Slots = {} & {
28
28
  };
29
29
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
30
30
  size: TSize;
31
- error: boolean;
32
31
  disabled: boolean;
33
32
  variant: TVariant;
34
33
  color: TColor;
34
+ error: boolean;
35
35
  showIcon: boolean;
36
36
  placeholder: string;
37
37
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -19,8 +19,8 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {
19
19
  fieldId: import("vue").ComputedRef<string>;
20
20
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
21
21
  label: string;
22
- error: boolean;
23
22
  required: boolean;
23
+ error: boolean;
24
24
  id: string;
25
25
  labelInfo: string;
26
26
  helperMessage: string;
@@ -23,7 +23,7 @@ declare const __VLS_export: <TFormData extends object, TName extends keyof TForm
23
23
  };
24
24
  emit: {};
25
25
  }>) => import("vue").VNode & {
26
- __ctx?: Awaited<typeof __VLS_setup>;
26
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
27
27
  };
28
28
  declare const _default: typeof __VLS_export;
29
29
  export default _default;
@@ -80,21 +80,21 @@ declare const __VLS_base: import("vue").DefineComponent<UiInputCheckboxProps, {
80
80
  focus: () => void | undefined;
81
81
  blur: () => void | undefined;
82
82
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
83
- blur: (event: FocusEvent) => any;
83
+ "update:modelValue": (value: string | number | boolean | (string | number)[]) => any;
84
84
  change: (event: Event) => any;
85
+ blur: (event: FocusEvent) => any;
85
86
  focus: (event: FocusEvent) => any;
86
- "update:modelValue": (value: string | number | boolean | (string | number)[]) => any;
87
87
  }, string, import("vue").PublicProps, Readonly<UiInputCheckboxProps> & Readonly<{
88
- onBlur?: ((event: FocusEvent) => any) | undefined;
88
+ "onUpdate:modelValue"?: ((value: string | number | boolean | (string | number)[]) => any) | undefined;
89
89
  onChange?: ((event: Event) => any) | undefined;
90
+ onBlur?: ((event: FocusEvent) => any) | undefined;
90
91
  onFocus?: ((event: FocusEvent) => any) | undefined;
91
- "onUpdate:modelValue"?: ((value: string | number | boolean | (string | number)[]) => any) | undefined;
92
92
  }>, {
93
93
  orientation: "horizontal" | "vertical";
94
94
  size: CheckboxSize;
95
- error: boolean;
96
95
  disabled: boolean;
97
96
  required: boolean;
97
+ error: boolean;
98
98
  checked: boolean;
99
99
  indeterminate: boolean;
100
100
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -32,18 +32,18 @@ type __VLS_Slots = {} & {
32
32
  default?: (props: typeof __VLS_37) => any;
33
33
  };
34
34
  declare const __VLS_base: import("vue").DefineComponent<UiInputSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
35
- blur: (event: FocusEvent) => any;
36
35
  "update:modelValue": (value: string | string[] | undefined) => any;
36
+ blur: (event: FocusEvent) => any;
37
37
  }, string, import("vue").PublicProps, Readonly<UiInputSelectProps> & Readonly<{
38
- onBlur?: ((event: FocusEvent) => any) | undefined;
39
38
  "onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
39
+ onBlur?: ((event: FocusEvent) => any) | undefined;
40
40
  }>, {
41
41
  size: SelectSize;
42
42
  label: string;
43
- error: boolean;
44
43
  disabled: boolean;
45
44
  defaultOpen: boolean;
46
45
  required: boolean;
46
+ error: boolean;
47
47
  loading: boolean;
48
48
  name: string;
49
49
  modelValue: string | string[] | null;
@@ -22,22 +22,22 @@ declare const __VLS_export: import("vue").DefineComponent<UiInputTextareaProps,
22
22
  focus: () => void | undefined;
23
23
  blur: () => void | undefined;
24
24
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ "update:modelValue": (value: string) => any;
25
26
  blur: (event: FocusEvent) => any;
26
27
  focus: (event: FocusEvent) => any;
27
28
  keydown: (event: KeyboardEvent) => any;
28
29
  keyup: (event: KeyboardEvent) => any;
29
- "update:modelValue": (value: string) => any;
30
30
  }, string, import("vue").PublicProps, Readonly<UiInputTextareaProps> & Readonly<{
31
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
31
32
  onBlur?: ((event: FocusEvent) => any) | undefined;
32
33
  onFocus?: ((event: FocusEvent) => any) | undefined;
33
34
  onKeydown?: ((event: KeyboardEvent) => any) | undefined;
34
35
  onKeyup?: ((event: KeyboardEvent) => any) | undefined;
35
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
36
36
  }>, {
37
37
  size: TextareaSize;
38
- error: boolean;
39
38
  disabled: boolean;
40
39
  required: boolean;
40
+ error: boolean;
41
41
  loading: boolean;
42
42
  modelValue: string;
43
43
  placeholder: string;
@@ -30,26 +30,26 @@ declare const __VLS_base: import("vue").DefineComponent<UiTextFieldProps, {
30
30
  blur: () => void | undefined;
31
31
  insertAtCursor: (text: string) => void;
32
32
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
+ clear: () => any;
34
+ "update:modelValue": (value: string) => any;
33
35
  blur: (event: FocusEvent) => any;
34
36
  focus: (event: FocusEvent) => any;
35
37
  keydown: (event: KeyboardEvent) => any;
36
38
  keyup: (event: KeyboardEvent) => any;
37
- clear: () => any;
38
- "update:modelValue": (value: string) => any;
39
39
  }, string, import("vue").PublicProps, Readonly<UiTextFieldProps> & Readonly<{
40
+ onClear?: (() => any) | undefined;
41
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
40
42
  onBlur?: ((event: FocusEvent) => any) | undefined;
41
43
  onFocus?: ((event: FocusEvent) => any) | undefined;
42
44
  onKeydown?: ((event: KeyboardEvent) => any) | undefined;
43
45
  onKeyup?: ((event: KeyboardEvent) => any) | undefined;
44
- onClear?: (() => any) | undefined;
45
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
46
46
  }>, {
47
47
  size: TextFieldSize;
48
48
  ariaLabel: string;
49
- error: boolean;
50
49
  type: string;
51
50
  disabled: boolean;
52
51
  required: boolean;
52
+ error: boolean;
53
53
  loading: boolean;
54
54
  modelValue: string;
55
55
  clearable: boolean;
@@ -11,7 +11,7 @@ export interface UseButtonStylesOptions {
11
11
  }
12
12
  export declare function useButtonStyles(options: UseButtonStylesOptions): {
13
13
  variant: import("vue").ComputedRef<"cta" | "cta-alpha" | "secondary" | "tertiary">;
14
- color: import("vue").ComputedRef<"error" | "primary" | "neutral" | "warning" | "success" | "neutral-invert">;
14
+ color: import("vue").ComputedRef<"primary" | "neutral" | "warning" | "success" | "error" | "neutral-invert">;
15
15
  bgClass: import("vue").ComputedRef<string>;
16
16
  textClass: import("vue").ComputedRef<string>;
17
17
  borderClasses: import("vue").ComputedRef<string[]>;
@@ -1 +1,2 @@
1
1
  export * from "../components/Toast/toastDSV2";
2
+ export * from "../utils/i18n";
@@ -0,0 +1,51 @@
1
+ import type { InjectionKey } from 'vue';
2
+ /**
3
+ * Keys of the built-in labels. They MUST stay identical to the Livestorm
4
+ * app locale keys (Phrase): inside the app, translate() resolves through
5
+ * the app's i18next with these exact keys, and a silent mismatch would
6
+ * downgrade users to the EN/FR fallbacks. A spec in packages/frontend
7
+ * locks this contract against the app locales.
8
+ */
9
+ export declare const BUILT_IN_LABEL_KEYS: readonly string[];
10
+ /**
11
+ * A host-provided translate function. Return the translated string, or the
12
+ * key itself / null / undefined to decline and let the built-in bundles
13
+ * answer.
14
+ */
15
+ export type Translator = (key: string) => string | null | undefined;
16
+ /**
17
+ * App-scoped translator: `app.provide(UI_VUE_TRANSLATOR, fn)` wires the
18
+ * host's i18n per application instance. This is the ONLY safe wiring for
19
+ * SSR servers rendering per-request locales — module state is shared
20
+ * between concurrent requests, an app-provided translator is not.
21
+ */
22
+ export declare const UI_VUE_TRANSLATOR: InjectionKey<Translator>;
23
+ /**
24
+ * Plug the host app's own i18n stack (an i18next `createInstance()`,
25
+ * vue-i18n, anything callable) into the library's built-in labels. An
26
+ * explicitly wired translator wins over the ambient i18next singleton.
27
+ * Pass null to restore the default behavior.
28
+ *
29
+ * This is process-level state, right for SPAs and static setups. On an SSR
30
+ * server with per-request locales, provide UI_VUE_TRANSLATOR on the app
31
+ * instead: concurrent renders would otherwise overwrite each other here.
32
+ */
33
+ export declare function setTranslator(translator: Translator | null): void;
34
+ /**
35
+ * Translate a key for a component's built-in label. Resolution order:
36
+ * 1. the translator wired via setTranslator(), when it answers;
37
+ * 2. the ambient i18next singleton, when initialized and it has the key
38
+ * (the Livestorm app path);
39
+ * 3. the built-in EN/FR bundles, language picked from `<html lang>`.
40
+ * Apps not using i18next at all get proper strings instead of raw keys.
41
+ *
42
+ * Components call this through useTranslate(), which puts an app-provided
43
+ * UI_VUE_TRANSLATOR at the very top of that chain.
44
+ */
45
+ export declare function translate(key: string): string;
46
+ /**
47
+ * Component-side accessor: returns a translate function bound to the
48
+ * app-provided UI_VUE_TRANSLATOR when called inside setup(), falling back
49
+ * to the process-level chain otherwise. Safe to call outside a component.
50
+ */
51
+ export declare function useTranslate(): (key: string) => string;