@livestorm/ui-vue 2.0.4 → 3.0.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 +8 -5
- package/dist/UiTimelineItem.vue_vue_type_style_index_0_lang-LpdvGf5X.mjs +6093 -0
- package/dist/a11y-BhF_nl7L.mjs +159 -0
- package/dist/components.mjs +105 -96
- package/dist/index.mjs +68 -64
- package/dist/layouts.mjs +16 -16
- package/dist/types/index.d.ts +5 -1
- package/dist/types/src/components/UiActionBar/UiActionBar.vue.d.ts +3 -1
- package/dist/types/src/components/UiActionBar/UiActionBarItem.vue.d.ts +18 -3
- package/dist/types/src/components/UiActionBar/types.d.ts +3 -1
- package/dist/types/src/components/UiButton/UiButton.vue.d.ts +17 -13
- package/dist/types/src/components/UiButtonGroup/UiButtonGroupItem.vue.d.ts +3 -0
- package/dist/types/src/components/UiButtonGroup/types.d.ts +1 -1
- package/dist/types/src/components/UiDropdown/UiDropdownItem.vue.d.ts +6 -4
- package/dist/types/src/components/UiInputEmoji/UiInputEmoji.vue.d.ts +45 -0
- package/dist/types/src/components/UiInputEmoji/index.d.ts +1 -0
- package/dist/types/src/components/UiInputRadio/UiInputRadio.vue.d.ts +67 -0
- package/dist/types/src/components/UiInputRadio/UiInputRadioGroup.vue.d.ts +81 -0
- package/dist/types/src/components/UiInputRadio/index.d.ts +3 -0
- package/dist/types/src/components/UiInputRadio/types.d.ts +19 -0
- package/dist/types/src/components/UiLoader/UiLoader.vue.d.ts +6 -5
- package/dist/types/src/components/UiLogo/UiLogo.vue.d.ts +9 -3
- package/dist/types/src/components/UiPage/UiPage.vue.d.ts +34 -0
- package/dist/types/src/components/UiProgress/UiProgress.vue.d.ts +1 -1
- package/dist/types/src/components/UiSwitch/UiSwitch.vue.d.ts +109 -0
- package/dist/types/src/components/UiSwitch/index.d.ts +2 -0
- package/dist/types/src/components/UiSwitch/types.d.ts +3 -0
- package/dist/types/src/components/UiTabs/UiTabs.vue.d.ts +5 -2
- package/dist/types/src/composables/useContentMode.d.ts +25 -0
- package/dist/types/src/composables/useIconSize.d.ts +11 -0
- package/dist/types/src/constants/sizes.d.ts +1 -1
- package/dist/ui-vue.css +1 -1
- package/dist/{useThemeAndModes-CUK56j0z.mjs → useThemeAndModes-BzYwSOEv.mjs} +1 -1
- package/dist/utils.mjs +154 -99
- package/index.d.ts +4 -0
- package/index.js +8 -0
- package/package.json +11 -3
- package/src/components/Toast/ToastMessage.vue +6 -6
- package/src/components/UiActionBar/UiActionBar.vue +11 -2
- package/src/components/UiActionBar/UiActionBarItem.vue +56 -32
- package/src/components/UiActionBar/types.ts +3 -1
- package/src/components/UiAvatar/UiAvatar.vue +1 -1
- package/src/components/UiBanner/UiBanner.vue +7 -7
- package/src/components/UiButton/UiButton.vue +9 -9
- package/src/components/UiButtonGroup/UiButtonGroup.vue +4 -0
- package/src/components/UiButtonGroup/UiButtonGroupItem.vue +14 -0
- package/src/components/UiButtonGroup/types.ts +1 -1
- package/src/components/UiCarousel/UiCarousel.vue +2 -2
- package/src/components/UiColorPicker/UiColorPicker.vue +5 -5
- package/src/components/UiDialog/MarketplaceHeaderExample.vue +2 -2
- package/src/components/UiDialog/UiDialogClose.vue +1 -1
- package/src/components/UiDropdown/UiDropdownContent.vue +2 -2
- package/src/components/UiDropdown/UiDropdownItem.vue +8 -1
- package/src/components/UiDropdown/UiDropdownTrigger.vue +6 -7
- package/src/components/UiFieldWrapper/UiFieldWrapper.vue +1 -1
- package/src/components/UiInputCheckbox/UiInputCheckbox.vue +2 -2
- package/src/components/UiInputEmoji/UiInputEmoji.vue +173 -0
- package/src/components/UiInputEmoji/index.ts +1 -0
- package/src/components/UiInputRadio/UiInputRadio.vue +374 -0
- package/src/components/UiInputRadio/UiInputRadioGroup.vue +156 -0
- package/src/components/UiInputRadio/index.ts +3 -0
- package/src/components/UiInputRadio/types.ts +25 -0
- package/src/components/UiLoader/UiLoader.vue +8 -10
- package/src/components/UiLogo/UiLogo.vue +41 -7
- package/src/components/UiMenu/UiMenuContent.vue +1 -1
- package/src/components/UiMenu/UiMenuGroup.vue +1 -1
- package/src/components/UiMenu/UiMenuItem.vue +1 -1
- package/src/components/UiMenu/UiMenuSubContent.vue +1 -1
- package/src/components/UiMenu/UiMenuSubTrigger.vue +2 -2
- package/src/components/UiPage/UiPage.vue +102 -29
- package/src/components/UiPageHeader/UiPageHeader.vue +29 -9
- package/src/components/UiRoomButton/UiRoomButton.vue +4 -4
- package/src/components/UiShell/UiShell.vue +1 -1
- package/src/components/UiSideMenu/UiSideMenu.vue +13 -10
- package/src/components/UiSideMenu/UiSideMenuItemContent.vue +2 -2
- package/src/components/UiStepper/UiStepperIndicator.vue +8 -11
- package/src/components/UiSwitch/UiSwitch.vue +359 -0
- package/src/components/UiSwitch/index.ts +2 -0
- package/src/components/UiSwitch/types.ts +5 -0
- package/src/components/UiTabs/UiTabs.vue +7 -4
- package/src/components/UiTextField/UiTextField.vue +6 -11
- package/src/components/UiTimeline/README.md +6 -6
- package/src/components/UiTimeline/UiTimelineItem.vue +3 -3
- package/src/composables/useContentMode.ts +53 -0
- package/src/composables/useIconSize.ts +28 -0
- package/src/constants/sizes.ts +1 -1
- package/src/global.d.ts +8 -0
- package/dist/UiTimelineItem.vue_vue_type_style_index_0_lang-BtG5oABt.mjs +0 -5454
- package/dist/a11y--y7uaY4j.mjs +0 -217
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
|
-
};
|