@code-coaching/vuetiful 0.12.1 → 0.13.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/dist/style.css +1 -1
- package/dist/styles/all.css +97 -509
- package/dist/types/components/atoms/VRadio/VRadioDescription.vue.d.ts +8 -0
- package/dist/types/components/atoms/VRadio/VRadioGroup.vue.d.ts +55 -0
- package/dist/types/components/atoms/VRadio/VRadioLabel.vue.d.ts +14 -0
- package/dist/types/components/atoms/index.d.ts +5 -3
- package/dist/types/components/index.d.ts +2 -3
- package/dist/types/components/molecules/VDrawer.vue.d.ts +1 -1
- package/dist/types/utils/code-block/VCodeBlock.vue.d.ts +1 -1
- package/dist/vuetiful.es.mjs +642 -271
- package/dist/vuetiful.umd.js +14 -11
- package/package.json +2 -1
- package/src/components/atoms/VRadio/VRadioDescription.vue +11 -0
- package/src/components/atoms/VRadio/VRadioGroup.vue +60 -0
- package/src/components/atoms/VRadio/VRadioItem.vue +26 -0
- package/src/components/atoms/VRadio/VRadioLabel.vue +16 -0
- package/src/components/atoms/index.ts +6 -3
- package/src/components/index.ts +2 -4
- package/dist/types/components/atoms/VRadioGroup.vue.d.ts +0 -32
- package/src/components/atoms/VRadioGroup.vue +0 -42
- package/src/components/atoms/VRadioItem.vue +0 -154
- /package/dist/types/components/atoms/{VRadioItem.vue.d.ts → VRadio/VRadioItem.vue.d.ts} +0 -0
package/dist/vuetiful.es.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock, createElementBlock, renderSlot, normalizeClass, defineComponent, createBlock, resolveDynamicComponent, withCtx,
|
|
1
|
+
import { openBlock, createElementBlock, renderSlot, normalizeClass, defineComponent, createBlock, resolveDynamicComponent, withCtx, Fragment, cloneVNode, h as h$1, watchEffect, computed, ref, provide, onMounted, onUnmounted, unref, inject, toRaw, watch, createElementVNode, reactive, readonly, toRefs, createVNode, Transition, createCommentVNode, useAttrs, mergeProps, toDisplayString, withDirectives, createTextVNode, resolveComponent, renderList, pushScopeId, popScopeId } from "vue";
|
|
2
2
|
var _export_sfc = (sfc, props) => {
|
|
3
3
|
const target = sfc.__vccOpts || sfc;
|
|
4
4
|
for (const [key, val] of props) {
|
|
@@ -6,17 +6,17 @@ var _export_sfc = (sfc, props) => {
|
|
|
6
6
|
}
|
|
7
7
|
return target;
|
|
8
8
|
};
|
|
9
|
-
const _sfc_main$
|
|
10
|
-
const _hoisted_1$
|
|
9
|
+
const _sfc_main$d = {};
|
|
10
|
+
const _hoisted_1$7 = {
|
|
11
11
|
class: /* @__PURE__ */ normalizeClass(`vuetiful-badge badge`)
|
|
12
12
|
};
|
|
13
13
|
function _sfc_render$3(_ctx, _cache) {
|
|
14
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
14
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
15
15
|
renderSlot(_ctx.$slots, "default")
|
|
16
16
|
]);
|
|
17
17
|
}
|
|
18
|
-
var VBadge = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
19
|
-
const _sfc_main$
|
|
18
|
+
var VBadge = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$3]]);
|
|
19
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
20
20
|
__name: "VButton",
|
|
21
21
|
props: {
|
|
22
22
|
icon: {
|
|
@@ -66,60 +66,524 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
const _sfc_main$
|
|
70
|
-
const _hoisted_1$
|
|
69
|
+
const _sfc_main$b = {};
|
|
70
|
+
const _hoisted_1$6 = {
|
|
71
71
|
class: /* @__PURE__ */ normalizeClass(`vuetiful-chip chip`)
|
|
72
72
|
};
|
|
73
73
|
function _sfc_render$2(_ctx, _cache) {
|
|
74
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
74
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
75
75
|
renderSlot(_ctx.$slots, "default")
|
|
76
76
|
]);
|
|
77
77
|
}
|
|
78
|
-
var VChip = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
79
|
-
|
|
78
|
+
var VChip = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$2]]);
|
|
79
|
+
function u(r2, n2, ...a2) {
|
|
80
|
+
if (r2 in n2) {
|
|
81
|
+
let e2 = n2[r2];
|
|
82
|
+
return typeof e2 == "function" ? e2(...a2) : e2;
|
|
83
|
+
}
|
|
84
|
+
let t2 = new Error(`Tried to handle "${r2}" but there is no handler defined. Only defined handlers are: ${Object.keys(n2).map((e2) => `"${e2}"`).join(", ")}.`);
|
|
85
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t2, u), t2;
|
|
86
|
+
}
|
|
87
|
+
var N$1 = ((o2) => (o2[o2.None = 0] = "None", o2[o2.RenderStrategy = 1] = "RenderStrategy", o2[o2.Static = 2] = "Static", o2))(N$1 || {}), S = ((e2) => (e2[e2.Unmount = 0] = "Unmount", e2[e2.Hidden = 1] = "Hidden", e2))(S || {});
|
|
88
|
+
function H$2({ visible: r2 = true, features: t2 = 0, ourProps: e2, theirProps: o2, ...i2 }) {
|
|
89
|
+
var a2;
|
|
90
|
+
let n2 = j$1(o2, e2), l = Object.assign(i2, { props: n2 });
|
|
91
|
+
if (r2 || t2 & 2 && n2.static)
|
|
92
|
+
return y$1(l);
|
|
93
|
+
if (t2 & 1) {
|
|
94
|
+
let d2 = (a2 = n2.unmount) == null || a2 ? 0 : 1;
|
|
95
|
+
return u(d2, { [0]() {
|
|
96
|
+
return null;
|
|
97
|
+
}, [1]() {
|
|
98
|
+
return y$1({ ...i2, props: { ...n2, hidden: true, style: { display: "none" } } });
|
|
99
|
+
} });
|
|
100
|
+
}
|
|
101
|
+
return y$1(l);
|
|
102
|
+
}
|
|
103
|
+
function y$1({ props: r2, attrs: t2, slots: e2, slot: o2, name: i2 }) {
|
|
104
|
+
var m2, h2;
|
|
105
|
+
let { as: n2, ...l } = T$2(r2, ["unmount", "static"]), a2 = (m2 = e2.default) == null ? void 0 : m2.call(e2, o2), d2 = {};
|
|
106
|
+
if (o2) {
|
|
107
|
+
let u2 = false, c2 = [];
|
|
108
|
+
for (let [p2, f2] of Object.entries(o2))
|
|
109
|
+
typeof f2 == "boolean" && (u2 = true), f2 === true && c2.push(p2);
|
|
110
|
+
u2 && (d2["data-headlessui-state"] = c2.join(" "));
|
|
111
|
+
}
|
|
112
|
+
if (n2 === "template") {
|
|
113
|
+
if (a2 = b$1(a2 != null ? a2 : []), Object.keys(l).length > 0 || Object.keys(t2).length > 0) {
|
|
114
|
+
let [u2, ...c2] = a2 != null ? a2 : [];
|
|
115
|
+
if (!v(u2) || c2.length > 0)
|
|
116
|
+
throw new Error(['Passing props on "template"!', "", `The current component <${i2} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(l).concat(Object.keys(t2)).map((s2) => s2.trim()).filter((s2, g, R) => R.indexOf(s2) === g).sort((s2, g) => s2.localeCompare(g)).map((s2) => ` - ${s2}`).join(`
|
|
117
|
+
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((s2) => ` - ${s2}`).join(`
|
|
118
|
+
`)].join(`
|
|
119
|
+
`));
|
|
120
|
+
let p2 = j$1((h2 = u2.props) != null ? h2 : {}, l), f2 = cloneVNode(u2, p2);
|
|
121
|
+
for (let s2 in p2)
|
|
122
|
+
s2.startsWith("on") && (f2.props || (f2.props = {}), f2.props[s2] = p2[s2]);
|
|
123
|
+
return f2;
|
|
124
|
+
}
|
|
125
|
+
return Array.isArray(a2) && a2.length === 1 ? a2[0] : a2;
|
|
126
|
+
}
|
|
127
|
+
return h$1(n2, Object.assign({}, l, d2), { default: () => a2 });
|
|
128
|
+
}
|
|
129
|
+
function b$1(r2) {
|
|
130
|
+
return r2.flatMap((t2) => t2.type === Fragment ? b$1(t2.children) : [t2]);
|
|
131
|
+
}
|
|
132
|
+
function j$1(...r2) {
|
|
133
|
+
if (r2.length === 0)
|
|
134
|
+
return {};
|
|
135
|
+
if (r2.length === 1)
|
|
136
|
+
return r2[0];
|
|
137
|
+
let t2 = {}, e2 = {};
|
|
138
|
+
for (let i2 of r2)
|
|
139
|
+
for (let n2 in i2)
|
|
140
|
+
n2.startsWith("on") && typeof i2[n2] == "function" ? (e2[n2] != null || (e2[n2] = []), e2[n2].push(i2[n2])) : t2[n2] = i2[n2];
|
|
141
|
+
if (t2.disabled || t2["aria-disabled"])
|
|
142
|
+
return Object.assign(t2, Object.fromEntries(Object.keys(e2).map((i2) => [i2, void 0])));
|
|
143
|
+
for (let i2 in e2)
|
|
144
|
+
Object.assign(t2, { [i2](n2, ...l) {
|
|
145
|
+
let a2 = e2[i2];
|
|
146
|
+
for (let d2 of a2) {
|
|
147
|
+
if (n2 instanceof Event && n2.defaultPrevented)
|
|
148
|
+
return;
|
|
149
|
+
d2(n2, ...l);
|
|
150
|
+
}
|
|
151
|
+
} });
|
|
152
|
+
return t2;
|
|
153
|
+
}
|
|
154
|
+
function K$1(r2) {
|
|
155
|
+
let t2 = Object.assign({}, r2);
|
|
156
|
+
for (let e2 in t2)
|
|
157
|
+
t2[e2] === void 0 && delete t2[e2];
|
|
158
|
+
return t2;
|
|
159
|
+
}
|
|
160
|
+
function T$2(r2, t2 = []) {
|
|
161
|
+
let e2 = Object.assign({}, r2);
|
|
162
|
+
for (let o2 of t2)
|
|
163
|
+
o2 in e2 && delete e2[o2];
|
|
164
|
+
return e2;
|
|
165
|
+
}
|
|
166
|
+
function v(r2) {
|
|
167
|
+
return r2 == null ? false : typeof r2.type == "string" || typeof r2.type == "object" || typeof r2.type == "function";
|
|
168
|
+
}
|
|
169
|
+
let e$1 = 0;
|
|
170
|
+
function n$1() {
|
|
171
|
+
return ++e$1;
|
|
172
|
+
}
|
|
173
|
+
function t() {
|
|
174
|
+
return n$1();
|
|
175
|
+
}
|
|
176
|
+
var o$1 = ((r2) => (r2.Space = " ", r2.Enter = "Enter", r2.Escape = "Escape", r2.Backspace = "Backspace", r2.Delete = "Delete", r2.ArrowLeft = "ArrowLeft", r2.ArrowUp = "ArrowUp", r2.ArrowRight = "ArrowRight", r2.ArrowDown = "ArrowDown", r2.Home = "Home", r2.End = "End", r2.PageUp = "PageUp", r2.PageDown = "PageDown", r2.Tab = "Tab", r2))(o$1 || {});
|
|
177
|
+
function o(n2) {
|
|
178
|
+
var l;
|
|
179
|
+
return n2 == null || n2.value == null ? null : (l = n2.value.$el) != null ? l : n2.value;
|
|
180
|
+
}
|
|
181
|
+
var i = Object.defineProperty;
|
|
182
|
+
var d$3 = (t2, e2, r2) => e2 in t2 ? i(t2, e2, { enumerable: true, configurable: true, writable: true, value: r2 }) : t2[e2] = r2;
|
|
183
|
+
var n = (t2, e2, r2) => (d$3(t2, typeof e2 != "symbol" ? e2 + "" : e2, r2), r2);
|
|
184
|
+
class s$1 {
|
|
185
|
+
constructor() {
|
|
186
|
+
n(this, "current", this.detect());
|
|
187
|
+
n(this, "currentId", 0);
|
|
188
|
+
}
|
|
189
|
+
set(e2) {
|
|
190
|
+
this.current !== e2 && (this.currentId = 0, this.current = e2);
|
|
191
|
+
}
|
|
192
|
+
reset() {
|
|
193
|
+
this.set(this.detect());
|
|
194
|
+
}
|
|
195
|
+
nextId() {
|
|
196
|
+
return ++this.currentId;
|
|
197
|
+
}
|
|
198
|
+
get isServer() {
|
|
199
|
+
return this.current === "server";
|
|
200
|
+
}
|
|
201
|
+
get isClient() {
|
|
202
|
+
return this.current === "client";
|
|
203
|
+
}
|
|
204
|
+
detect() {
|
|
205
|
+
return typeof window == "undefined" || typeof document == "undefined" ? "server" : "client";
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
let c$2 = new s$1();
|
|
209
|
+
function m(r2) {
|
|
210
|
+
if (c$2.isServer)
|
|
211
|
+
return null;
|
|
212
|
+
if (r2 instanceof Node)
|
|
213
|
+
return r2.ownerDocument;
|
|
214
|
+
if (r2 != null && r2.hasOwnProperty("value")) {
|
|
215
|
+
let n2 = o(r2);
|
|
216
|
+
if (n2)
|
|
217
|
+
return n2.ownerDocument;
|
|
218
|
+
}
|
|
219
|
+
return document;
|
|
220
|
+
}
|
|
221
|
+
function p$2({ container: e2, accept: t2, walk: d2, enabled: o2 }) {
|
|
222
|
+
watchEffect(() => {
|
|
223
|
+
let r2 = e2.value;
|
|
224
|
+
if (!r2 || o2 !== void 0 && !o2.value)
|
|
225
|
+
return;
|
|
226
|
+
let l = m(e2);
|
|
227
|
+
if (!l)
|
|
228
|
+
return;
|
|
229
|
+
let c2 = Object.assign((f2) => t2(f2), { acceptNode: t2 }), n2 = l.createTreeWalker(r2, NodeFilter.SHOW_ELEMENT, c2, false);
|
|
230
|
+
for (; n2.nextNode(); )
|
|
231
|
+
d2(n2.currentNode);
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
let c$1 = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e2) => `${e2}:not([tabindex='-1'])`).join(",");
|
|
235
|
+
var N = ((n2) => (n2[n2.First = 1] = "First", n2[n2.Previous = 2] = "Previous", n2[n2.Next = 4] = "Next", n2[n2.Last = 8] = "Last", n2[n2.WrapAround = 16] = "WrapAround", n2[n2.NoScroll = 32] = "NoScroll", n2))(N || {}), T$1 = ((o2) => (o2[o2.Error = 0] = "Error", o2[o2.Overflow = 1] = "Overflow", o2[o2.Success = 2] = "Success", o2[o2.Underflow = 3] = "Underflow", o2))(T$1 || {}), F = ((t2) => (t2[t2.Previous = -1] = "Previous", t2[t2.Next = 1] = "Next", t2))(F || {});
|
|
236
|
+
function E$1(e2 = document.body) {
|
|
237
|
+
return e2 == null ? [] : Array.from(e2.querySelectorAll(c$1)).sort((r2, t2) => Math.sign((r2.tabIndex || Number.MAX_SAFE_INTEGER) - (t2.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
238
|
+
}
|
|
239
|
+
var h = ((t2) => (t2[t2.Strict = 0] = "Strict", t2[t2.Loose = 1] = "Loose", t2))(h || {});
|
|
240
|
+
var y = ((t2) => (t2[t2.Keyboard = 0] = "Keyboard", t2[t2.Mouse = 1] = "Mouse", t2))(y || {});
|
|
241
|
+
typeof window != "undefined" && typeof document != "undefined" && (document.addEventListener("keydown", (e2) => {
|
|
242
|
+
e2.metaKey || e2.altKey || e2.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
243
|
+
}, true), document.addEventListener("click", (e2) => {
|
|
244
|
+
e2.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e2.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
245
|
+
}, true));
|
|
246
|
+
let H$1 = ["textarea", "input"].join(",");
|
|
247
|
+
function I(e2) {
|
|
248
|
+
var r2, t2;
|
|
249
|
+
return (t2 = (r2 = e2 == null ? void 0 : e2.matches) == null ? void 0 : r2.call(e2, H$1)) != null ? t2 : false;
|
|
250
|
+
}
|
|
251
|
+
function O(e2, r2 = (t2) => t2) {
|
|
252
|
+
return e2.slice().sort((t2, l) => {
|
|
253
|
+
let o2 = r2(t2), i2 = r2(l);
|
|
254
|
+
if (o2 === null || i2 === null)
|
|
255
|
+
return 0;
|
|
256
|
+
let n2 = o2.compareDocumentPosition(i2);
|
|
257
|
+
return n2 & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n2 & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
function P(e2, r2, { sorted: t2 = true, relativeTo: l = null, skipElements: o2 = [] } = {}) {
|
|
261
|
+
var m2;
|
|
262
|
+
let i2 = (m2 = Array.isArray(e2) ? e2.length > 0 ? e2[0].ownerDocument : document : e2 == null ? void 0 : e2.ownerDocument) != null ? m2 : document, n2 = Array.isArray(e2) ? t2 ? O(e2) : e2 : E$1(e2);
|
|
263
|
+
o2.length > 0 && n2.length > 1 && (n2 = n2.filter((s2) => !o2.includes(s2))), l = l != null ? l : i2.activeElement;
|
|
264
|
+
let x = (() => {
|
|
265
|
+
if (r2 & 5)
|
|
266
|
+
return 1;
|
|
267
|
+
if (r2 & 10)
|
|
268
|
+
return -1;
|
|
269
|
+
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
270
|
+
})(), p2 = (() => {
|
|
271
|
+
if (r2 & 1)
|
|
272
|
+
return 0;
|
|
273
|
+
if (r2 & 2)
|
|
274
|
+
return Math.max(0, n2.indexOf(l)) - 1;
|
|
275
|
+
if (r2 & 4)
|
|
276
|
+
return Math.max(0, n2.indexOf(l)) + 1;
|
|
277
|
+
if (r2 & 8)
|
|
278
|
+
return n2.length - 1;
|
|
279
|
+
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
280
|
+
})(), L = r2 & 32 ? { preventScroll: true } : {}, a2 = 0, d2 = n2.length, u2;
|
|
281
|
+
do {
|
|
282
|
+
if (a2 >= d2 || a2 + d2 <= 0)
|
|
283
|
+
return 0;
|
|
284
|
+
let s2 = p2 + a2;
|
|
285
|
+
if (r2 & 16)
|
|
286
|
+
s2 = (s2 + d2) % d2;
|
|
287
|
+
else {
|
|
288
|
+
if (s2 < 0)
|
|
289
|
+
return 3;
|
|
290
|
+
if (s2 >= d2)
|
|
291
|
+
return 1;
|
|
292
|
+
}
|
|
293
|
+
u2 = n2[s2], u2 == null || u2.focus(L), a2 += x;
|
|
294
|
+
} while (u2 !== i2.activeElement);
|
|
295
|
+
return r2 & 6 && I(u2) && u2.select(), 2;
|
|
296
|
+
}
|
|
297
|
+
var a$1 = ((e2) => (e2[e2.None = 1] = "None", e2[e2.Focusable = 2] = "Focusable", e2[e2.Hidden = 4] = "Hidden", e2))(a$1 || {});
|
|
298
|
+
let f$1 = defineComponent({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(r2, { slots: t2, attrs: d2 }) {
|
|
299
|
+
return () => {
|
|
300
|
+
let { features: e2, ...o2 } = r2, n2 = { "aria-hidden": (e2 & 2) === 2 ? true : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(e2 & 4) === 4 && (e2 & 2) !== 2 && { display: "none" } } };
|
|
301
|
+
return H$2({ ourProps: n2, theirProps: o2, slot: {}, attrs: d2, slots: t2, name: "Hidden" });
|
|
302
|
+
};
|
|
303
|
+
} });
|
|
304
|
+
function e(n2 = {}, r2 = null, t2 = []) {
|
|
305
|
+
for (let [i2, o2] of Object.entries(n2))
|
|
306
|
+
f(t2, s(r2, i2), o2);
|
|
307
|
+
return t2;
|
|
308
|
+
}
|
|
309
|
+
function s(n2, r2) {
|
|
310
|
+
return n2 ? n2 + "[" + r2 + "]" : r2;
|
|
311
|
+
}
|
|
312
|
+
function f(n2, r2, t2) {
|
|
313
|
+
if (Array.isArray(t2))
|
|
314
|
+
for (let [i2, o2] of t2.entries())
|
|
315
|
+
f(n2, s(r2, i2.toString()), o2);
|
|
316
|
+
else
|
|
317
|
+
t2 instanceof Date ? n2.push([r2, t2.toISOString()]) : typeof t2 == "boolean" ? n2.push([r2, t2 ? "1" : "0"]) : typeof t2 == "string" ? n2.push([r2, t2]) : typeof t2 == "number" ? n2.push([r2, `${t2}`]) : t2 == null ? n2.push([r2, ""]) : e(t2, r2, n2);
|
|
318
|
+
}
|
|
319
|
+
function p$1(n2) {
|
|
320
|
+
var t2;
|
|
321
|
+
let r2 = (t2 = n2 == null ? void 0 : n2.form) != null ? t2 : n2.closest("form");
|
|
322
|
+
if (r2) {
|
|
323
|
+
for (let i2 of r2.elements)
|
|
324
|
+
if (i2.tagName === "INPUT" && i2.type === "submit" || i2.tagName === "BUTTON" && i2.type === "submit" || i2.nodeName === "INPUT" && i2.type === "image") {
|
|
325
|
+
i2.click();
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
function d$2(u2, e2, r2) {
|
|
331
|
+
let i2 = ref(r2 == null ? void 0 : r2.value), f2 = computed(() => u2.value !== void 0);
|
|
332
|
+
return [computed(() => f2.value ? u2.value : i2.value), function(t2) {
|
|
333
|
+
return f2.value || (i2.value = t2), e2 == null ? void 0 : e2(t2);
|
|
334
|
+
}];
|
|
335
|
+
}
|
|
336
|
+
let p = Symbol("DescriptionContext");
|
|
337
|
+
function b() {
|
|
338
|
+
let t2 = inject(p, null);
|
|
339
|
+
if (t2 === null)
|
|
340
|
+
throw new Error("Missing parent");
|
|
341
|
+
return t2;
|
|
342
|
+
}
|
|
343
|
+
function M({ slot: t2 = ref({}), name: i2 = "Description", props: o2 = {} } = {}) {
|
|
344
|
+
let e2 = ref([]);
|
|
345
|
+
function s2(n2) {
|
|
346
|
+
return e2.value.push(n2), () => {
|
|
347
|
+
let r2 = e2.value.indexOf(n2);
|
|
348
|
+
r2 !== -1 && e2.value.splice(r2, 1);
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
return provide(p, { register: s2, slot: t2, name: i2, props: o2 }), computed(() => e2.value.length > 0 ? e2.value.join(" ") : void 0);
|
|
352
|
+
}
|
|
353
|
+
let E = defineComponent({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${t()}` } }, setup(t2, { attrs: i2, slots: o2 }) {
|
|
354
|
+
let e2 = b();
|
|
355
|
+
return onMounted(() => onUnmounted(e2.register(t2.id))), () => {
|
|
356
|
+
let { name: s2 = "Description", slot: n2 = ref({}), props: r2 = {} } = e2, { id: d2, ...l } = t2, c2 = { ...Object.entries(r2).reduce((f2, [a2, g]) => Object.assign(f2, { [a2]: unref(g) }), {}), id: d2 };
|
|
357
|
+
return H$2({ ourProps: c2, theirProps: l, slot: n2.value, attrs: i2, slots: o2, name: s2 });
|
|
358
|
+
};
|
|
359
|
+
} });
|
|
360
|
+
let a = Symbol("LabelContext");
|
|
361
|
+
function d$1() {
|
|
362
|
+
let t2 = inject(a, null);
|
|
363
|
+
if (t2 === null) {
|
|
364
|
+
let n2 = new Error("You used a <Label /> component, but it is not inside a parent.");
|
|
365
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n2, d$1), n2;
|
|
366
|
+
}
|
|
367
|
+
return t2;
|
|
368
|
+
}
|
|
369
|
+
function K({ slot: t2 = {}, name: n2 = "Label", props: i2 = {} } = {}) {
|
|
370
|
+
let e2 = ref([]);
|
|
371
|
+
function l(r2) {
|
|
372
|
+
return e2.value.push(r2), () => {
|
|
373
|
+
let o2 = e2.value.indexOf(r2);
|
|
374
|
+
o2 !== -1 && e2.value.splice(o2, 1);
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
return provide(a, { register: l, slot: t2, name: n2, props: i2 }), computed(() => e2.value.length > 0 ? e2.value.join(" ") : void 0);
|
|
378
|
+
}
|
|
379
|
+
let T = defineComponent({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: false }, id: { type: String, default: () => `headlessui-label-${t()}` } }, setup(t2, { slots: n2, attrs: i2 }) {
|
|
380
|
+
let e2 = d$1();
|
|
381
|
+
return onMounted(() => onUnmounted(e2.register(t2.id))), () => {
|
|
382
|
+
let { name: l = "Label", slot: r2 = {}, props: o2 = {} } = e2, { id: p2, passive: c2, ...u2 } = t2, s2 = { ...Object.entries(o2).reduce((f2, [b2, g]) => Object.assign(f2, { [b2]: unref(g) }), {}), id: p2 };
|
|
383
|
+
return c2 && (delete s2.onClick, delete s2.htmlFor, delete u2.onClick), H$2({ ourProps: s2, theirProps: u2, slot: r2, attrs: i2, slots: n2, name: l });
|
|
384
|
+
};
|
|
385
|
+
} });
|
|
386
|
+
function re(t2, c2) {
|
|
387
|
+
return t2 === c2;
|
|
388
|
+
}
|
|
389
|
+
let j = Symbol("RadioGroupContext");
|
|
390
|
+
function H(t2) {
|
|
391
|
+
let c2 = inject(j, null);
|
|
392
|
+
if (c2 === null) {
|
|
393
|
+
let u2 = new Error(`<${t2} /> is missing a parent <RadioGroup /> component.`);
|
|
394
|
+
throw Error.captureStackTrace && Error.captureStackTrace(u2, H), u2;
|
|
395
|
+
}
|
|
396
|
+
return c2;
|
|
397
|
+
}
|
|
398
|
+
let ke = defineComponent({ name: "RadioGroup", emits: { "update:modelValue": (t2) => true }, props: { as: { type: [Object, String], default: "div" }, disabled: { type: [Boolean], default: false }, by: { type: [String, Function], default: () => re }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: true }, name: { type: String, optional: true }, id: { type: String, default: () => `headlessui-radiogroup-${t()}` } }, inheritAttrs: false, setup(t2, { emit: c2, attrs: u2, slots: E2, expose: d2 }) {
|
|
399
|
+
let s2 = ref(null), i2 = ref([]), R = K({ name: "RadioGroupLabel" }), w = M({ name: "RadioGroupDescription" });
|
|
400
|
+
d2({ el: s2, $el: s2 });
|
|
401
|
+
let [f2, S2] = d$2(computed(() => t2.modelValue), (e2) => c2("update:modelValue", e2), computed(() => t2.defaultValue)), p2 = { options: i2, value: f2, disabled: computed(() => t2.disabled), firstOption: computed(() => i2.value.find((e2) => !e2.propsRef.disabled)), containsCheckedOption: computed(() => i2.value.some((e2) => p2.compare(toRaw(e2.propsRef.value), toRaw(t2.modelValue)))), compare(e2, a2) {
|
|
402
|
+
if (typeof t2.by == "string") {
|
|
403
|
+
let n2 = t2.by;
|
|
404
|
+
return (e2 == null ? void 0 : e2[n2]) === (a2 == null ? void 0 : a2[n2]);
|
|
405
|
+
}
|
|
406
|
+
return t2.by(e2, a2);
|
|
407
|
+
}, change(e2) {
|
|
408
|
+
var n2;
|
|
409
|
+
if (t2.disabled || p2.compare(toRaw(f2.value), toRaw(e2)))
|
|
410
|
+
return false;
|
|
411
|
+
let a2 = (n2 = i2.value.find((l) => p2.compare(toRaw(l.propsRef.value), toRaw(e2)))) == null ? void 0 : n2.propsRef;
|
|
412
|
+
return a2 != null && a2.disabled ? false : (S2(e2), true);
|
|
413
|
+
}, registerOption(e2) {
|
|
414
|
+
i2.value.push(e2), i2.value = O(i2.value, (a2) => a2.element);
|
|
415
|
+
}, unregisterOption(e2) {
|
|
416
|
+
let a2 = i2.value.findIndex((n2) => n2.id === e2);
|
|
417
|
+
a2 !== -1 && i2.value.splice(a2, 1);
|
|
418
|
+
} };
|
|
419
|
+
provide(j, p2), p$2({ container: computed(() => o(s2)), accept(e2) {
|
|
420
|
+
return e2.getAttribute("role") === "radio" ? NodeFilter.FILTER_REJECT : e2.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
421
|
+
}, walk(e2) {
|
|
422
|
+
e2.setAttribute("role", "none");
|
|
423
|
+
} });
|
|
424
|
+
function m$1(e2) {
|
|
425
|
+
if (!s2.value || !s2.value.contains(e2.target))
|
|
426
|
+
return;
|
|
427
|
+
let a2 = i2.value.filter((n2) => n2.propsRef.disabled === false).map((n2) => n2.element);
|
|
428
|
+
switch (e2.key) {
|
|
429
|
+
case o$1.Enter:
|
|
430
|
+
p$1(e2.currentTarget);
|
|
431
|
+
break;
|
|
432
|
+
case o$1.ArrowLeft:
|
|
433
|
+
case o$1.ArrowUp:
|
|
434
|
+
if (e2.preventDefault(), e2.stopPropagation(), P(a2, N.Previous | N.WrapAround) === T$1.Success) {
|
|
435
|
+
let l = i2.value.find((r2) => {
|
|
436
|
+
var b2;
|
|
437
|
+
return r2.element === ((b2 = m(s2)) == null ? void 0 : b2.activeElement);
|
|
438
|
+
});
|
|
439
|
+
l && p2.change(l.propsRef.value);
|
|
440
|
+
}
|
|
441
|
+
break;
|
|
442
|
+
case o$1.ArrowRight:
|
|
443
|
+
case o$1.ArrowDown:
|
|
444
|
+
if (e2.preventDefault(), e2.stopPropagation(), P(a2, N.Next | N.WrapAround) === T$1.Success) {
|
|
445
|
+
let l = i2.value.find((r2) => {
|
|
446
|
+
var b2;
|
|
447
|
+
return r2.element === ((b2 = m(r2.element)) == null ? void 0 : b2.activeElement);
|
|
448
|
+
});
|
|
449
|
+
l && p2.change(l.propsRef.value);
|
|
450
|
+
}
|
|
451
|
+
break;
|
|
452
|
+
case o$1.Space:
|
|
453
|
+
{
|
|
454
|
+
e2.preventDefault(), e2.stopPropagation();
|
|
455
|
+
let n2 = i2.value.find((l) => {
|
|
456
|
+
var r2;
|
|
457
|
+
return l.element === ((r2 = m(l.element)) == null ? void 0 : r2.activeElement);
|
|
458
|
+
});
|
|
459
|
+
n2 && p2.change(n2.propsRef.value);
|
|
460
|
+
}
|
|
461
|
+
break;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
let v2 = computed(() => {
|
|
465
|
+
var e2;
|
|
466
|
+
return (e2 = o(s2)) == null ? void 0 : e2.closest("form");
|
|
467
|
+
});
|
|
468
|
+
return onMounted(() => {
|
|
469
|
+
watch([v2], () => {
|
|
470
|
+
if (!v2.value || t2.defaultValue === void 0)
|
|
471
|
+
return;
|
|
472
|
+
function e2() {
|
|
473
|
+
p2.change(t2.defaultValue);
|
|
474
|
+
}
|
|
475
|
+
return v2.value.addEventListener("reset", e2), () => {
|
|
476
|
+
var a2;
|
|
477
|
+
(a2 = v2.value) == null || a2.removeEventListener("reset", e2);
|
|
478
|
+
};
|
|
479
|
+
}, { immediate: true });
|
|
480
|
+
}), () => {
|
|
481
|
+
let { disabled: e$12, name: a2, id: n2, form: l, ...r2 } = t2, b2 = { ref: s2, id: n2, role: "radiogroup", "aria-labelledby": R.value, "aria-describedby": w.value, onKeydown: m$1 };
|
|
482
|
+
return h$1(Fragment, [...a2 != null && f2.value != null ? e({ [a2]: f2.value }).map(([T2, G]) => h$1(f$1, K$1({ features: a$1.Hidden, key: T2, as: "input", type: "hidden", hidden: true, readOnly: true, form: l, name: T2, value: G }))) : [], H$2({ ourProps: b2, theirProps: { ...u2, ...T$2(r2, ["modelValue", "defaultValue", "by"]) }, slot: {}, attrs: u2, slots: E2, name: "RadioGroup" })]);
|
|
483
|
+
};
|
|
484
|
+
} });
|
|
485
|
+
var ie = ((u2) => (u2[u2.Empty = 1] = "Empty", u2[u2.Active = 2] = "Active", u2))(ie || {});
|
|
486
|
+
let Ee = defineComponent({ name: "RadioGroupOption", props: { as: { type: [Object, String], default: "div" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: false }, id: { type: String, default: () => `headlessui-radiogroup-option-${t()}` } }, setup(t2, { attrs: c2, slots: u2, expose: E2 }) {
|
|
487
|
+
let d2 = H("RadioGroupOption"), s2 = K({ name: "RadioGroupLabel" }), i2 = M({ name: "RadioGroupDescription" }), R = ref(null), w = computed(() => ({ value: t2.value, disabled: t2.disabled })), f2 = ref(1);
|
|
488
|
+
E2({ el: R, $el: R });
|
|
489
|
+
let S2 = computed(() => o(R));
|
|
490
|
+
onMounted(() => d2.registerOption({ id: t2.id, element: S2, propsRef: w })), onUnmounted(() => d2.unregisterOption(t2.id));
|
|
491
|
+
let p2 = computed(() => {
|
|
492
|
+
var r2;
|
|
493
|
+
return ((r2 = d2.firstOption.value) == null ? void 0 : r2.id) === t2.id;
|
|
494
|
+
}), m2 = computed(() => d2.disabled.value || t2.disabled), v2 = computed(() => d2.compare(toRaw(d2.value.value), toRaw(t2.value))), e2 = computed(() => m2.value ? -1 : v2.value || !d2.containsCheckedOption.value && p2.value ? 0 : -1);
|
|
495
|
+
function a2() {
|
|
496
|
+
var r2;
|
|
497
|
+
d2.change(t2.value) && (f2.value |= 2, (r2 = o(R)) == null || r2.focus());
|
|
498
|
+
}
|
|
499
|
+
function n2() {
|
|
500
|
+
f2.value |= 2;
|
|
501
|
+
}
|
|
502
|
+
function l() {
|
|
503
|
+
f2.value &= -3;
|
|
504
|
+
}
|
|
505
|
+
return () => {
|
|
506
|
+
let { id: r2, value: b2, disabled: T2, ...G } = t2, N2 = { checked: v2.value, disabled: m2.value, active: Boolean(f2.value & 2) }, K2 = { id: r2, ref: R, role: "radio", "aria-checked": v2.value ? "true" : "false", "aria-labelledby": s2.value, "aria-describedby": i2.value, "aria-disabled": m2.value ? true : void 0, tabIndex: e2.value, onClick: m2.value ? void 0 : a2, onFocus: m2.value ? void 0 : n2, onBlur: m2.value ? void 0 : l };
|
|
507
|
+
return H$2({ ourProps: K2, theirProps: G, slot: N2, attrs: c2, slots: u2, name: "RadioGroupOption" });
|
|
508
|
+
};
|
|
509
|
+
} }), we = T, Se = E;
|
|
510
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
511
|
+
__name: "VRadioDescription",
|
|
512
|
+
props: {
|
|
513
|
+
as: Se.props["as"]
|
|
514
|
+
},
|
|
515
|
+
setup(__props) {
|
|
516
|
+
return (_ctx, _cache) => {
|
|
517
|
+
return openBlock(), createBlock(unref(Se), { as: __props.as }, {
|
|
518
|
+
default: withCtx(() => [
|
|
519
|
+
renderSlot(_ctx.$slots, "default")
|
|
520
|
+
]),
|
|
521
|
+
_: 3
|
|
522
|
+
}, 8, ["as"]);
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
80
527
|
__name: "VRadioGroup",
|
|
81
528
|
props: {
|
|
82
|
-
|
|
529
|
+
as: ke.props["as"],
|
|
530
|
+
disabled: ke.props["disabled"],
|
|
531
|
+
by: ke.props["by"],
|
|
532
|
+
modelValue: ke.props["modelValue"],
|
|
533
|
+
active: {
|
|
83
534
|
type: String,
|
|
84
|
-
|
|
535
|
+
default: "variant-filled"
|
|
85
536
|
},
|
|
86
|
-
|
|
87
|
-
type:
|
|
88
|
-
|
|
537
|
+
hover: {
|
|
538
|
+
type: String,
|
|
539
|
+
default: "hover:variant-ghost"
|
|
89
540
|
},
|
|
90
|
-
|
|
541
|
+
background: {
|
|
91
542
|
type: String,
|
|
92
|
-
default: ""
|
|
543
|
+
default: "bg-surface-200-700-token"
|
|
544
|
+
},
|
|
545
|
+
text: {
|
|
546
|
+
type: String,
|
|
547
|
+
default: "text-surface-900 dark:text-surface-50"
|
|
93
548
|
}
|
|
94
549
|
},
|
|
95
550
|
emits: ["update:modelValue"],
|
|
96
|
-
setup(__props, { emit
|
|
551
|
+
setup(__props, { emit }) {
|
|
97
552
|
const props = __props;
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
553
|
+
const parentModelValue = ref(props.modelValue);
|
|
554
|
+
watch(
|
|
555
|
+
() => props.modelValue,
|
|
556
|
+
(newValue) => {
|
|
557
|
+
parentModelValue.value = newValue;
|
|
558
|
+
}
|
|
559
|
+
);
|
|
560
|
+
watch(
|
|
561
|
+
() => parentModelValue.value,
|
|
562
|
+
(newValue) => {
|
|
563
|
+
console.log("test: ", newValue);
|
|
564
|
+
emit("update:modelValue", newValue);
|
|
565
|
+
}
|
|
566
|
+
);
|
|
567
|
+
provide("active", props.active);
|
|
568
|
+
provide("hover", props.hover);
|
|
106
569
|
return (_ctx, _cache) => {
|
|
107
|
-
return openBlock(),
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
570
|
+
return openBlock(), createBlock(unref(ke), {
|
|
571
|
+
modelValue: parentModelValue.value,
|
|
572
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => parentModelValue.value = $event),
|
|
573
|
+
as: __props.as,
|
|
574
|
+
disabled: __props.disabled,
|
|
575
|
+
by: __props.by,
|
|
576
|
+
class: normalizeClass(`radio-group inline-flex gap-1 p-1 ${__props.background} ${__props.text} border-token border-surface-400-500-token rounded-container-token`)
|
|
577
|
+
}, {
|
|
578
|
+
default: withCtx(() => [
|
|
579
|
+
renderSlot(_ctx.$slots, "default")
|
|
580
|
+
]),
|
|
581
|
+
_: 3
|
|
582
|
+
}, 8, ["modelValue", "as", "disabled", "by", "class"]);
|
|
116
583
|
};
|
|
117
584
|
}
|
|
118
585
|
});
|
|
119
|
-
const
|
|
120
|
-
const _hoisted_2$4 = { class: "h-0 w-0 overflow-hidden" };
|
|
121
|
-
const _hoisted_3$2 = ["name", "value"];
|
|
122
|
-
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
586
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
123
587
|
__name: "VRadioItem",
|
|
124
588
|
props: {
|
|
125
589
|
value: {
|
|
@@ -128,133 +592,38 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
128
592
|
}
|
|
129
593
|
},
|
|
130
594
|
setup(__props) {
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const tabbable = computed(() => {
|
|
145
|
-
if (!selectedOption.value)
|
|
146
|
-
return isFirst.value ? 0 : -1;
|
|
147
|
-
return selectedOption.value === props.value ? 0 : -1;
|
|
148
|
-
});
|
|
149
|
-
const setChecked = (target) => {
|
|
150
|
-
const input = target.querySelector("input");
|
|
151
|
-
input == null ? void 0 : input.click();
|
|
152
|
-
input == null ? void 0 : input.focus();
|
|
153
|
-
};
|
|
154
|
-
const setCheckedToNextItem = (target) => {
|
|
155
|
-
var _a, _b;
|
|
156
|
-
const activeId = (_a = target.querySelector("input")) == null ? void 0 : _a.id;
|
|
157
|
-
const children = (_b = radioGroup.value) == null ? void 0 : _b.children;
|
|
158
|
-
const activeChild = Array.from(children).find((child) => {
|
|
159
|
-
const input2 = child.querySelector("input");
|
|
160
|
-
return (input2 == null ? void 0 : input2.id) === activeId;
|
|
161
|
-
});
|
|
162
|
-
const firstchild = children[0];
|
|
163
|
-
const isLast = activeChild === children[children.length - 1];
|
|
164
|
-
if (isLast) {
|
|
165
|
-
const input2 = firstchild.querySelector("input");
|
|
166
|
-
if (input2) {
|
|
167
|
-
input2.click();
|
|
168
|
-
input2.focus();
|
|
169
|
-
}
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
const nextChild = activeChild == null ? void 0 : activeChild.nextElementSibling;
|
|
173
|
-
const input = nextChild == null ? void 0 : nextChild.querySelector("input");
|
|
174
|
-
if (input) {
|
|
175
|
-
input.click();
|
|
176
|
-
input.focus();
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
const setCheckedToPreviousItem = (target) => {
|
|
180
|
-
var _a, _b;
|
|
181
|
-
const activeId = (_a = target.querySelector("input")) == null ? void 0 : _a.id;
|
|
182
|
-
const children = (_b = radioGroup.value) == null ? void 0 : _b.children;
|
|
183
|
-
const activeChild = Array.from(children).find((child) => {
|
|
184
|
-
const input2 = child.querySelector("input");
|
|
185
|
-
return (input2 == null ? void 0 : input2.id) === activeId;
|
|
186
|
-
});
|
|
187
|
-
const lastchild = children[children.length - 1];
|
|
188
|
-
const isFirst2 = activeChild === children[0];
|
|
189
|
-
if (isFirst2) {
|
|
190
|
-
const input2 = lastchild.querySelector("input");
|
|
191
|
-
if (input2) {
|
|
192
|
-
input2.click();
|
|
193
|
-
input2.focus();
|
|
194
|
-
}
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
const previousChild = activeChild == null ? void 0 : activeChild.previousElementSibling;
|
|
198
|
-
const input = previousChild == null ? void 0 : previousChild.querySelector("input");
|
|
199
|
-
if (input) {
|
|
200
|
-
input.click();
|
|
201
|
-
input.focus();
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
const handleKeydown = (event) => {
|
|
205
|
-
const target = event.currentTarget;
|
|
206
|
-
let flag = false;
|
|
207
|
-
switch (event.key) {
|
|
208
|
-
case " ":
|
|
209
|
-
case "Enter":
|
|
210
|
-
setChecked(target);
|
|
211
|
-
flag = true;
|
|
212
|
-
break;
|
|
213
|
-
case "Up":
|
|
214
|
-
case "ArrowUp":
|
|
215
|
-
case "Left":
|
|
216
|
-
case "ArrowLeft":
|
|
217
|
-
setCheckedToPreviousItem(target);
|
|
218
|
-
flag = true;
|
|
219
|
-
break;
|
|
220
|
-
case "Down":
|
|
221
|
-
case "ArrowDown":
|
|
222
|
-
case "Right":
|
|
223
|
-
case "ArrowRight":
|
|
224
|
-
setCheckedToNextItem(target);
|
|
225
|
-
flag = true;
|
|
226
|
-
break;
|
|
227
|
-
}
|
|
228
|
-
if (flag) {
|
|
229
|
-
event.stopPropagation();
|
|
230
|
-
event.preventDefault();
|
|
231
|
-
}
|
|
595
|
+
const active = inject("active") || "variant-filled";
|
|
596
|
+
const hover = inject("hover") || "hover:variant-ghost";
|
|
597
|
+
return (_ctx, _cache) => {
|
|
598
|
+
return openBlock(), createBlock(unref(Ee), { value: __props.value }, {
|
|
599
|
+
default: withCtx(({ checked, disabled }) => [
|
|
600
|
+
createElementVNode("span", {
|
|
601
|
+
class: normalizeClass(`radio-item px-4 py-1 text-center text-base rounded-token ${checked ? unref(active) : unref(hover)} ${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"}`)
|
|
602
|
+
}, [
|
|
603
|
+
renderSlot(_ctx.$slots, "default")
|
|
604
|
+
], 2)
|
|
605
|
+
]),
|
|
606
|
+
_: 3
|
|
607
|
+
}, 8, ["value"]);
|
|
232
608
|
};
|
|
609
|
+
}
|
|
610
|
+
});
|
|
611
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
612
|
+
__name: "VRadioLabel",
|
|
613
|
+
props: {
|
|
614
|
+
as: {
|
|
615
|
+
type: we.props["as"].type,
|
|
616
|
+
default: "p"
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
setup(__props) {
|
|
233
620
|
return (_ctx, _cache) => {
|
|
234
|
-
return openBlock(),
|
|
235
|
-
|
|
236
|
-
class: normalizeClass(`radio-item cursor-pointer px-4 py-1 text-center text-base rounded-token ${unref(checked) ? "variant-filled" : "hover:variant-soft"} `),
|
|
237
|
-
role: "radio",
|
|
238
|
-
"aria-checked": unref(checked),
|
|
239
|
-
tabindex: unref(tabbable),
|
|
240
|
-
name: unref(name),
|
|
241
|
-
onKeydown: handleKeydown
|
|
242
|
-
}, [
|
|
243
|
-
createElementVNode("div", _hoisted_2$4, [
|
|
244
|
-
withDirectives(createElementVNode("input", {
|
|
245
|
-
tabindex: "-1",
|
|
246
|
-
type: "radio",
|
|
247
|
-
id,
|
|
248
|
-
name: unref(name),
|
|
249
|
-
value: __props.value,
|
|
250
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(selectedOption) ? selectedOption.value = $event : null)
|
|
251
|
-
}, null, 8, _hoisted_3$2), [
|
|
252
|
-
[vModelRadio, unref(selectedOption)]
|
|
253
|
-
])
|
|
254
|
-
]),
|
|
621
|
+
return openBlock(), createBlock(unref(we), { as: __props.as }, {
|
|
622
|
+
default: withCtx(() => [
|
|
255
623
|
renderSlot(_ctx.$slots, "default")
|
|
256
|
-
],
|
|
257
|
-
|
|
624
|
+
]),
|
|
625
|
+
_: 3
|
|
626
|
+
}, 8, ["as"]);
|
|
258
627
|
};
|
|
259
628
|
}
|
|
260
629
|
});
|
|
@@ -578,15 +947,17 @@ const _sfc_main$3 = defineComponent({
|
|
|
578
947
|
var components = /* @__PURE__ */ Object.freeze({
|
|
579
948
|
__proto__: null,
|
|
580
949
|
[Symbol.toStringTag]: "Module",
|
|
581
|
-
VButton: _sfc_main$
|
|
950
|
+
VButton: _sfc_main$c,
|
|
951
|
+
VBadge,
|
|
952
|
+
VChip,
|
|
953
|
+
VRadioGroup: _sfc_main$9,
|
|
954
|
+
VRadioItem: _sfc_main$8,
|
|
955
|
+
VRadioLabel: _sfc_main$7,
|
|
956
|
+
VRadioDescription: _sfc_main$a,
|
|
582
957
|
VRail: _sfc_main$5,
|
|
583
958
|
VRailTile: _sfc_main$4,
|
|
584
959
|
VShell: _sfc_main$3,
|
|
585
|
-
VDrawer: _sfc_main$6
|
|
586
|
-
VBadge,
|
|
587
|
-
VChip,
|
|
588
|
-
VRadioGroup: _sfc_main$8,
|
|
589
|
-
VRadioItem: _sfc_main$7
|
|
960
|
+
VDrawer: _sfc_main$6
|
|
590
961
|
});
|
|
591
962
|
var main = "";
|
|
592
963
|
var tailwind = "";
|
|
@@ -648,7 +1019,7 @@ const scopeToCSSClass = (name, { prefix }) => {
|
|
|
648
1019
|
const pieces = name.split(".");
|
|
649
1020
|
return [
|
|
650
1021
|
`${prefix}${pieces.shift()}`,
|
|
651
|
-
...pieces.map((x,
|
|
1022
|
+
...pieces.map((x, i2) => `${x}${"_".repeat(i2 + 1)}`)
|
|
652
1023
|
].join(" ");
|
|
653
1024
|
}
|
|
654
1025
|
return `${prefix}${name}`;
|
|
@@ -782,21 +1153,21 @@ class TokenTreeEmitter extends TokenTree {
|
|
|
782
1153
|
return true;
|
|
783
1154
|
}
|
|
784
1155
|
}
|
|
785
|
-
function source$2(
|
|
786
|
-
if (!
|
|
1156
|
+
function source$2(re2) {
|
|
1157
|
+
if (!re2)
|
|
787
1158
|
return null;
|
|
788
|
-
if (typeof
|
|
789
|
-
return
|
|
790
|
-
return
|
|
1159
|
+
if (typeof re2 === "string")
|
|
1160
|
+
return re2;
|
|
1161
|
+
return re2.source;
|
|
791
1162
|
}
|
|
792
|
-
function lookahead$2(
|
|
793
|
-
return concat$2("(?=",
|
|
1163
|
+
function lookahead$2(re2) {
|
|
1164
|
+
return concat$2("(?=", re2, ")");
|
|
794
1165
|
}
|
|
795
|
-
function anyNumberOfTimes(
|
|
796
|
-
return concat$2("(?:",
|
|
1166
|
+
function anyNumberOfTimes(re2) {
|
|
1167
|
+
return concat$2("(?:", re2, ")*");
|
|
797
1168
|
}
|
|
798
|
-
function optional(
|
|
799
|
-
return concat$2("(?:",
|
|
1169
|
+
function optional(re2) {
|
|
1170
|
+
return concat$2("(?:", re2, ")?");
|
|
800
1171
|
}
|
|
801
1172
|
function concat$2(...args) {
|
|
802
1173
|
const joined = args.map((x) => source$2(x)).join("");
|
|
@@ -816,11 +1187,11 @@ function either$2(...args) {
|
|
|
816
1187
|
const joined = "(" + (opts.capture ? "" : "?:") + args.map((x) => source$2(x)).join("|") + ")";
|
|
817
1188
|
return joined;
|
|
818
1189
|
}
|
|
819
|
-
function countMatchGroups(
|
|
820
|
-
return new RegExp(
|
|
1190
|
+
function countMatchGroups(re2) {
|
|
1191
|
+
return new RegExp(re2.toString() + "|").exec("").length - 1;
|
|
821
1192
|
}
|
|
822
|
-
function startsWith(
|
|
823
|
-
const match =
|
|
1193
|
+
function startsWith(re2, lexeme) {
|
|
1194
|
+
const match = re2 && re2.exec(lexeme);
|
|
824
1195
|
return match && match.index === 0;
|
|
825
1196
|
}
|
|
826
1197
|
const BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
@@ -829,16 +1200,16 @@ function _rewriteBackreferences(regexps, { joinWith }) {
|
|
|
829
1200
|
return regexps.map((regex) => {
|
|
830
1201
|
numCaptures += 1;
|
|
831
1202
|
const offset = numCaptures;
|
|
832
|
-
let
|
|
1203
|
+
let re2 = source$2(regex);
|
|
833
1204
|
let out = "";
|
|
834
|
-
while (
|
|
835
|
-
const match = BACKREF_RE.exec(
|
|
1205
|
+
while (re2.length > 0) {
|
|
1206
|
+
const match = BACKREF_RE.exec(re2);
|
|
836
1207
|
if (!match) {
|
|
837
|
-
out +=
|
|
1208
|
+
out += re2;
|
|
838
1209
|
break;
|
|
839
1210
|
}
|
|
840
|
-
out +=
|
|
841
|
-
|
|
1211
|
+
out += re2.substring(0, match.index);
|
|
1212
|
+
re2 = re2.substring(match.index + match[0].length);
|
|
842
1213
|
if (match[0][0] === "\\" && match[1]) {
|
|
843
1214
|
out += "\\" + String(Number(match[1]) + offset);
|
|
844
1215
|
} else {
|
|
@@ -849,7 +1220,7 @@ function _rewriteBackreferences(regexps, { joinWith }) {
|
|
|
849
1220
|
}
|
|
850
1221
|
}
|
|
851
1222
|
return out;
|
|
852
|
-
}).map((
|
|
1223
|
+
}).map((re2) => `(${re2})`).join(joinWith);
|
|
853
1224
|
}
|
|
854
1225
|
const MATCH_NOTHING_RE = /\b\B/;
|
|
855
1226
|
const IDENT_RE$2 = "[a-zA-Z]\\w*";
|
|
@@ -873,8 +1244,8 @@ const SHEBANG = (opts = {}) => {
|
|
|
873
1244
|
begin: beginShebang,
|
|
874
1245
|
end: /$/,
|
|
875
1246
|
relevance: 0,
|
|
876
|
-
"on:begin": (
|
|
877
|
-
if (
|
|
1247
|
+
"on:begin": (m2, resp) => {
|
|
1248
|
+
if (m2.index !== 0)
|
|
878
1249
|
resp.ignoreMatch();
|
|
879
1250
|
}
|
|
880
1251
|
}, opts);
|
|
@@ -1000,11 +1371,11 @@ const END_SAME_AS_BEGIN = function(mode) {
|
|
|
1000
1371
|
return Object.assign(
|
|
1001
1372
|
mode,
|
|
1002
1373
|
{
|
|
1003
|
-
"on:begin": (
|
|
1004
|
-
resp.data._beginMatch =
|
|
1374
|
+
"on:begin": (m2, resp) => {
|
|
1375
|
+
resp.data._beginMatch = m2[1];
|
|
1005
1376
|
},
|
|
1006
|
-
"on:end": (
|
|
1007
|
-
if (resp.data._beginMatch !==
|
|
1377
|
+
"on:end": (m2, resp) => {
|
|
1378
|
+
if (resp.data._beginMatch !== m2[1])
|
|
1008
1379
|
resp.ignoreMatch();
|
|
1009
1380
|
}
|
|
1010
1381
|
}
|
|
@@ -1165,10 +1536,10 @@ function remapScopeNames(mode, regexes, { key }) {
|
|
|
1165
1536
|
const scopeNames = mode[key];
|
|
1166
1537
|
const emit = {};
|
|
1167
1538
|
const positions = {};
|
|
1168
|
-
for (let
|
|
1169
|
-
positions[
|
|
1170
|
-
emit[
|
|
1171
|
-
offset += countMatchGroups(regexes[
|
|
1539
|
+
for (let i2 = 1; i2 <= regexes.length; i2++) {
|
|
1540
|
+
positions[i2 + offset] = scopeNames[i2];
|
|
1541
|
+
emit[i2 + offset] = true;
|
|
1542
|
+
offset += countMatchGroups(regexes[i2 - 1]);
|
|
1172
1543
|
}
|
|
1173
1544
|
mode[key] = positions;
|
|
1174
1545
|
mode[key]._emit = emit;
|
|
@@ -1233,11 +1604,11 @@ function compileLanguage(language) {
|
|
|
1233
1604
|
this.matchAt = 1;
|
|
1234
1605
|
this.position = 0;
|
|
1235
1606
|
}
|
|
1236
|
-
addRule(
|
|
1607
|
+
addRule(re2, opts) {
|
|
1237
1608
|
opts.position = this.position++;
|
|
1238
1609
|
this.matchIndexes[this.matchAt] = opts;
|
|
1239
|
-
this.regexes.push([opts,
|
|
1240
|
-
this.matchAt += countMatchGroups(
|
|
1610
|
+
this.regexes.push([opts, re2]);
|
|
1611
|
+
this.matchAt += countMatchGroups(re2) + 1;
|
|
1241
1612
|
}
|
|
1242
1613
|
compile() {
|
|
1243
1614
|
if (this.regexes.length === 0) {
|
|
@@ -1247,15 +1618,15 @@ function compileLanguage(language) {
|
|
|
1247
1618
|
this.matcherRe = langRe(_rewriteBackreferences(terminators, { joinWith: "|" }), true);
|
|
1248
1619
|
this.lastIndex = 0;
|
|
1249
1620
|
}
|
|
1250
|
-
exec(
|
|
1621
|
+
exec(s2) {
|
|
1251
1622
|
this.matcherRe.lastIndex = this.lastIndex;
|
|
1252
|
-
const match = this.matcherRe.exec(
|
|
1623
|
+
const match = this.matcherRe.exec(s2);
|
|
1253
1624
|
if (!match) {
|
|
1254
1625
|
return null;
|
|
1255
1626
|
}
|
|
1256
|
-
const
|
|
1257
|
-
const matchData = this.matchIndexes[
|
|
1258
|
-
match.splice(0,
|
|
1627
|
+
const i2 = match.findIndex((el, i3) => i3 > 0 && el !== void 0);
|
|
1628
|
+
const matchData = this.matchIndexes[i2];
|
|
1629
|
+
match.splice(0, i2);
|
|
1259
1630
|
return Object.assign(match, matchData);
|
|
1260
1631
|
}
|
|
1261
1632
|
}
|
|
@@ -1271,7 +1642,7 @@ function compileLanguage(language) {
|
|
|
1271
1642
|
if (this.multiRegexes[index2])
|
|
1272
1643
|
return this.multiRegexes[index2];
|
|
1273
1644
|
const matcher = new MultiRegex();
|
|
1274
|
-
this.rules.slice(index2).forEach(([
|
|
1645
|
+
this.rules.slice(index2).forEach(([re2, opts]) => matcher.addRule(re2, opts));
|
|
1275
1646
|
matcher.compile();
|
|
1276
1647
|
this.multiRegexes[index2] = matcher;
|
|
1277
1648
|
return matcher;
|
|
@@ -1282,22 +1653,22 @@ function compileLanguage(language) {
|
|
|
1282
1653
|
considerAll() {
|
|
1283
1654
|
this.regexIndex = 0;
|
|
1284
1655
|
}
|
|
1285
|
-
addRule(
|
|
1286
|
-
this.rules.push([
|
|
1656
|
+
addRule(re2, opts) {
|
|
1657
|
+
this.rules.push([re2, opts]);
|
|
1287
1658
|
if (opts.type === "begin")
|
|
1288
1659
|
this.count++;
|
|
1289
1660
|
}
|
|
1290
|
-
exec(
|
|
1291
|
-
const
|
|
1292
|
-
|
|
1293
|
-
let result =
|
|
1661
|
+
exec(s2) {
|
|
1662
|
+
const m2 = this.getMatcher(this.regexIndex);
|
|
1663
|
+
m2.lastIndex = this.lastIndex;
|
|
1664
|
+
let result = m2.exec(s2);
|
|
1294
1665
|
if (this.resumingScanAtSamePosition()) {
|
|
1295
1666
|
if (result && result.index === this.lastIndex)
|
|
1296
1667
|
;
|
|
1297
1668
|
else {
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1300
|
-
result =
|
|
1669
|
+
const m22 = this.getMatcher(0);
|
|
1670
|
+
m22.lastIndex = this.lastIndex + 1;
|
|
1671
|
+
result = m22.exec(s2);
|
|
1301
1672
|
}
|
|
1302
1673
|
}
|
|
1303
1674
|
if (result) {
|
|
@@ -1548,15 +1919,15 @@ const HLJS = function(hljs2) {
|
|
|
1548
1919
|
modeBuffer = "";
|
|
1549
1920
|
}
|
|
1550
1921
|
function emitMultiClass(scope, match) {
|
|
1551
|
-
let
|
|
1922
|
+
let i2 = 1;
|
|
1552
1923
|
const max = match.length - 1;
|
|
1553
|
-
while (
|
|
1554
|
-
if (!scope._emit[
|
|
1555
|
-
|
|
1924
|
+
while (i2 <= max) {
|
|
1925
|
+
if (!scope._emit[i2]) {
|
|
1926
|
+
i2++;
|
|
1556
1927
|
continue;
|
|
1557
1928
|
}
|
|
1558
|
-
const klass = language.classNameAliases[scope[
|
|
1559
|
-
const text = match[
|
|
1929
|
+
const klass = language.classNameAliases[scope[i2]] || scope[i2];
|
|
1930
|
+
const text = match[i2];
|
|
1560
1931
|
if (klass) {
|
|
1561
1932
|
emitter.addKeyword(text, klass);
|
|
1562
1933
|
} else {
|
|
@@ -1564,7 +1935,7 @@ const HLJS = function(hljs2) {
|
|
|
1564
1935
|
processKeywords();
|
|
1565
1936
|
modeBuffer = "";
|
|
1566
1937
|
}
|
|
1567
|
-
|
|
1938
|
+
i2++;
|
|
1568
1939
|
}
|
|
1569
1940
|
}
|
|
1570
1941
|
function startNewMode(mode, match) {
|
|
@@ -1821,13 +2192,13 @@ const HLJS = function(hljs2) {
|
|
|
1821
2192
|
(name) => _highlight(name, code, false)
|
|
1822
2193
|
);
|
|
1823
2194
|
results.unshift(plaintext2);
|
|
1824
|
-
const sorted = results.sort((
|
|
1825
|
-
if (
|
|
1826
|
-
return
|
|
1827
|
-
if (
|
|
1828
|
-
if (getLanguage(
|
|
2195
|
+
const sorted = results.sort((a2, b2) => {
|
|
2196
|
+
if (a2.relevance !== b2.relevance)
|
|
2197
|
+
return b2.relevance - a2.relevance;
|
|
2198
|
+
if (a2.language && b2.language) {
|
|
2199
|
+
if (getLanguage(a2.language).supersetOf === b2.language) {
|
|
1829
2200
|
return 1;
|
|
1830
|
-
} else if (getLanguage(
|
|
2201
|
+
} else if (getLanguage(b2.language).supersetOf === a2.language) {
|
|
1831
2202
|
return -1;
|
|
1832
2203
|
}
|
|
1833
2204
|
}
|
|
@@ -10083,8 +10454,8 @@ function markdown(hljs2) {
|
|
|
10083
10454
|
ITALIC,
|
|
10084
10455
|
BOLD_WITHOUT_ITALIC,
|
|
10085
10456
|
ITALIC_WITHOUT_BOLD
|
|
10086
|
-
].forEach((
|
|
10087
|
-
|
|
10457
|
+
].forEach((m2) => {
|
|
10458
|
+
m2.contains = m2.contains.concat(CONTAINABLE);
|
|
10088
10459
|
});
|
|
10089
10460
|
CONTAINABLE = CONTAINABLE.concat(BOLD, ITALIC);
|
|
10090
10461
|
const HEADER = {
|
|
@@ -10244,7 +10615,7 @@ function dart(hljs2) {
|
|
|
10244
10615
|
"Element",
|
|
10245
10616
|
"ElementList"
|
|
10246
10617
|
];
|
|
10247
|
-
const NULLABLE_BUILT_IN_TYPES = BUILT_IN_TYPES.map((
|
|
10618
|
+
const NULLABLE_BUILT_IN_TYPES = BUILT_IN_TYPES.map((e2) => `${e2}?`);
|
|
10248
10619
|
const BASIC_KEYWORDS = [
|
|
10249
10620
|
"abstract",
|
|
10250
10621
|
"as",
|
|
@@ -13415,15 +13786,15 @@ var fortran_1 = fortran;
|
|
|
13415
13786
|
function escape(value) {
|
|
13416
13787
|
return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), "m");
|
|
13417
13788
|
}
|
|
13418
|
-
function source$1(
|
|
13419
|
-
if (!
|
|
13789
|
+
function source$1(re2) {
|
|
13790
|
+
if (!re2)
|
|
13420
13791
|
return null;
|
|
13421
|
-
if (typeof
|
|
13422
|
-
return
|
|
13423
|
-
return
|
|
13792
|
+
if (typeof re2 === "string")
|
|
13793
|
+
return re2;
|
|
13794
|
+
return re2.source;
|
|
13424
13795
|
}
|
|
13425
|
-
function lookahead$1(
|
|
13426
|
-
return concat$1("(?=",
|
|
13796
|
+
function lookahead$1(re2) {
|
|
13797
|
+
return concat$1("(?=", re2, ")");
|
|
13427
13798
|
}
|
|
13428
13799
|
function concat$1(...args) {
|
|
13429
13800
|
const joined = args.map((x) => source$1(x)).join("");
|
|
@@ -19115,11 +19486,11 @@ var NUMERIC$1 = {
|
|
|
19115
19486
|
],
|
|
19116
19487
|
relevance: 0
|
|
19117
19488
|
};
|
|
19118
|
-
function recurRegex(
|
|
19489
|
+
function recurRegex(re2, substitution, depth) {
|
|
19119
19490
|
if (depth === -1)
|
|
19120
19491
|
return "";
|
|
19121
|
-
return
|
|
19122
|
-
return recurRegex(
|
|
19492
|
+
return re2.replace(substitution, (_) => {
|
|
19493
|
+
return recurRegex(re2, substitution, depth - 1);
|
|
19123
19494
|
});
|
|
19124
19495
|
}
|
|
19125
19496
|
function java(hljs2) {
|
|
@@ -19498,14 +19869,14 @@ function javascript$1(hljs2) {
|
|
|
19498
19869
|
response.ignoreMatch();
|
|
19499
19870
|
}
|
|
19500
19871
|
}
|
|
19501
|
-
let
|
|
19872
|
+
let m2;
|
|
19502
19873
|
const afterMatch = match.input.substring(afterMatchIndex);
|
|
19503
|
-
if (
|
|
19874
|
+
if (m2 = afterMatch.match(/^\s*=/)) {
|
|
19504
19875
|
response.ignoreMatch();
|
|
19505
19876
|
return;
|
|
19506
19877
|
}
|
|
19507
|
-
if (
|
|
19508
|
-
if (
|
|
19878
|
+
if (m2 = afterMatch.match(/^\s+extends\s+/)) {
|
|
19879
|
+
if (m2.index === 0) {
|
|
19509
19880
|
response.ignoreMatch();
|
|
19510
19881
|
return;
|
|
19511
19882
|
}
|
|
@@ -42205,15 +42576,15 @@ function subunit(hljs2) {
|
|
|
42205
42576
|
};
|
|
42206
42577
|
}
|
|
42207
42578
|
var subunit_1 = subunit;
|
|
42208
|
-
function source(
|
|
42209
|
-
if (!
|
|
42579
|
+
function source(re2) {
|
|
42580
|
+
if (!re2)
|
|
42210
42581
|
return null;
|
|
42211
|
-
if (typeof
|
|
42212
|
-
return
|
|
42213
|
-
return
|
|
42582
|
+
if (typeof re2 === "string")
|
|
42583
|
+
return re2;
|
|
42584
|
+
return re2.source;
|
|
42214
42585
|
}
|
|
42215
|
-
function lookahead(
|
|
42216
|
-
return concat("(?=",
|
|
42586
|
+
function lookahead(re2) {
|
|
42587
|
+
return concat("(?=", re2, ")");
|
|
42217
42588
|
}
|
|
42218
42589
|
function concat(...args) {
|
|
42219
42590
|
const joined = args.map((x) => source(x)).join("");
|
|
@@ -43703,7 +44074,7 @@ function twig(hljs2) {
|
|
|
43703
44074
|
"verbatim",
|
|
43704
44075
|
"with"
|
|
43705
44076
|
];
|
|
43706
|
-
TAG_NAMES = TAG_NAMES.concat(TAG_NAMES.map((
|
|
44077
|
+
TAG_NAMES = TAG_NAMES.concat(TAG_NAMES.map((t2) => `end${t2}`));
|
|
43707
44078
|
const STRING = {
|
|
43708
44079
|
scope: "string",
|
|
43709
44080
|
variants: [
|
|
@@ -43962,14 +44333,14 @@ function javascript(hljs2) {
|
|
|
43962
44333
|
response.ignoreMatch();
|
|
43963
44334
|
}
|
|
43964
44335
|
}
|
|
43965
|
-
let
|
|
44336
|
+
let m2;
|
|
43966
44337
|
const afterMatch = match.input.substring(afterMatchIndex);
|
|
43967
|
-
if (
|
|
44338
|
+
if (m2 = afterMatch.match(/^\s*=/)) {
|
|
43968
44339
|
response.ignoreMatch();
|
|
43969
44340
|
return;
|
|
43970
44341
|
}
|
|
43971
|
-
if (
|
|
43972
|
-
if (
|
|
44342
|
+
if (m2 = afterMatch.match(/^\s+extends\s+/)) {
|
|
44343
|
+
if (m2.index === 0) {
|
|
43973
44344
|
response.ignoreMatch();
|
|
43974
44345
|
return;
|
|
43975
44346
|
}
|
|
@@ -44464,7 +44835,7 @@ function typescript(hljs2) {
|
|
|
44464
44835
|
begin: "@" + IDENT_RE$12
|
|
44465
44836
|
};
|
|
44466
44837
|
const swapMode = (mode, label, replacement) => {
|
|
44467
|
-
const indx = mode.contains.findIndex((
|
|
44838
|
+
const indx = mode.contains.findIndex((m2) => m2.label === label);
|
|
44468
44839
|
if (indx === -1) {
|
|
44469
44840
|
throw new Error("can not find mode to replace");
|
|
44470
44841
|
}
|
|
@@ -44479,7 +44850,7 @@ function typescript(hljs2) {
|
|
|
44479
44850
|
]);
|
|
44480
44851
|
swapMode(tsLanguage, "shebang", hljs2.SHEBANG());
|
|
44481
44852
|
swapMode(tsLanguage, "use_strict", USE_STRICT);
|
|
44482
|
-
const functionDeclaration = tsLanguage.contains.find((
|
|
44853
|
+
const functionDeclaration = tsLanguage.contains.find((m2) => m2.label === "func.def");
|
|
44483
44854
|
functionDeclaration.relevance = 0;
|
|
44484
44855
|
Object.assign(tsLanguage, {
|
|
44485
44856
|
name: "TypeScript",
|
|
@@ -47232,7 +47603,7 @@ var themeSwitcher_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
|
47232
47603
|
const _sfc_main = defineComponent({
|
|
47233
47604
|
components: {
|
|
47234
47605
|
DarkModeSwitch,
|
|
47235
|
-
VButton: _sfc_main$
|
|
47606
|
+
VButton: _sfc_main$c
|
|
47236
47607
|
},
|
|
47237
47608
|
props: {
|
|
47238
47609
|
bgLight: {
|
|
@@ -47328,7 +47699,7 @@ const _sfc_main = defineComponent({
|
|
|
47328
47699
|
};
|
|
47329
47700
|
}
|
|
47330
47701
|
});
|
|
47331
|
-
const _withScopeId = (
|
|
47702
|
+
const _withScopeId = (n2) => (pushScopeId("data-v-3283243a"), n2 = n2(), popScopeId(), n2);
|
|
47332
47703
|
const _hoisted_1 = { class: "cc-theme-switcher" };
|
|
47333
47704
|
const _hoisted_2 = { class: "space-y-4" };
|
|
47334
47705
|
const _hoisted_3 = { class: "flex items-center justify-between" };
|
|
@@ -47402,7 +47773,7 @@ const defaultTheme = THEMES.VUETIFUL;
|
|
|
47402
47773
|
const chosenTheme = ref(defaultTheme);
|
|
47403
47774
|
const useTheme = () => {
|
|
47404
47775
|
const saveThemeToStorage = (name) => {
|
|
47405
|
-
const theme = themes.value.find((
|
|
47776
|
+
const theme = themes.value.find((t2) => t2.name === name);
|
|
47406
47777
|
if (!theme)
|
|
47407
47778
|
return;
|
|
47408
47779
|
if (isBrowser) {
|
|
@@ -47420,9 +47791,9 @@ const useTheme = () => {
|
|
|
47420
47791
|
}
|
|
47421
47792
|
};
|
|
47422
47793
|
const loadTheme = (themeName, callback) => {
|
|
47423
|
-
let themeToLoad = themes.value.find((
|
|
47794
|
+
let themeToLoad = themes.value.find((t2) => t2.name === themeName);
|
|
47424
47795
|
if (!themeToLoad)
|
|
47425
|
-
themeToLoad = themes.value.find((
|
|
47796
|
+
themeToLoad = themes.value.find((t2) => t2.name === defaultTheme) || themes.value[0];
|
|
47426
47797
|
const theme = themeToLoad;
|
|
47427
47798
|
chosenTheme.value = theme.name;
|
|
47428
47799
|
const existingStyle = document.getElementById("theme");
|
|
@@ -47475,4 +47846,4 @@ function install(app) {
|
|
|
47475
47846
|
}
|
|
47476
47847
|
}
|
|
47477
47848
|
var index = { install };
|
|
47478
|
-
export { DarkModeSwitch, themeSwitcher as ThemeSwitcher, VBadge, _sfc_main$
|
|
47849
|
+
export { DarkModeSwitch, themeSwitcher as ThemeSwitcher, VBadge, _sfc_main$c as VButton, VChip, _sfc_main$2 as VCodeBlock, _sfc_main$6 as VDrawer, _sfc_main$a as VRadioDescription, _sfc_main$9 as VRadioGroup, _sfc_main$8 as VRadioItem, _sfc_main$7 as VRadioLabel, _sfc_main$5 as VRail, _sfc_main$4 as VRailTile, _sfc_main$3 as VShell, index as default, useDarkMode, useDrawer, useRail, useTheme, clipboard as vClipboard };
|