@code-coaching/vuetiful 0.15.1 → 0.16.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 +679 -1
- package/dist/types/components/atoms/VCodeBlock.test.d.ts +1 -0
- package/dist/types/components/atoms/VLightSwitch.test.d.ts +1 -0
- package/dist/types/components/molecules/VDrawer.test.d.ts +1 -0
- package/dist/types/components/molecules/VPreview.test.d.ts +1 -0
- package/dist/types/components/molecules/VPreview.vue.d.ts +77 -0
- package/dist/types/components/molecules/VRail.test.d.ts +1 -0
- package/dist/types/components/molecules/VRailTile.test.d.ts +1 -0
- package/dist/types/components/molecules/VShell.test.d.ts +1 -0
- package/dist/types/components/molecules/index.d.ts +2 -1
- package/dist/vuetiful.es.mjs +325 -67
- package/dist/vuetiful.umd.js +11 -11
- package/package.json +1 -1
- package/src/components/atoms/VCodeBlock.test.ts +14 -0
- package/src/components/atoms/VLightSwitch.test.ts +20 -0
- package/src/components/atoms/VRadio/VRadioItem.test.ts +6 -6
- package/src/components/atoms/VRadio/VRadioItem.vue +5 -4
- package/src/components/molecules/VDrawer.test.ts +14 -0
- package/src/components/molecules/VPreview.test.ts +93 -0
- package/src/components/molecules/VPreview.vue +231 -0
- package/src/components/molecules/VRail.test.ts +14 -0
- package/src/components/molecules/VRailTile.test.ts +14 -0
- package/src/components/molecules/VShell.test.ts +14 -0
- package/src/components/molecules/index.ts +2 -1
package/dist/vuetiful.es.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, useAttrs, openBlock, createElementBlock, normalizeClass, createElementVNode, unref, toDisplayString, renderSlot, createBlock, resolveDynamicComponent, withCtx, withDirectives, createTextVNode, onMounted, Fragment, cloneVNode, h as h$1, watchEffect, provide, onUnmounted, inject, toRaw, watch, createCommentVNode, reactive, readonly, toRefs, createVNode, Transition, mergeProps,
|
|
2
|
-
const _hoisted_1$
|
|
3
|
-
const _hoisted_2$
|
|
1
|
+
import { defineComponent, ref, computed, useAttrs, openBlock, createElementBlock, normalizeClass, createElementVNode, unref, toDisplayString, renderSlot, createBlock, resolveDynamicComponent, withCtx, withDirectives, createTextVNode, onMounted, Fragment, cloneVNode, h as h$1, watchEffect, provide, onUnmounted, inject, toRaw, watch, createCommentVNode, reactive, readonly, toRefs, createVNode, Transition, mergeProps, renderList, pushScopeId, popScopeId, resolveComponent } from "vue";
|
|
2
|
+
const _hoisted_1$a = ["src", "alt"];
|
|
3
|
+
const _hoisted_2$5 = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "avatar-initials h-full w-full",
|
|
6
6
|
viewBox: "0 0 512 512"
|
|
7
7
|
};
|
|
8
|
-
const _sfc_main$
|
|
8
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
9
9
|
__name: "VAvatar",
|
|
10
10
|
props: {
|
|
11
11
|
initials: { type: String, default: "" },
|
|
@@ -39,7 +39,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
39
39
|
src: imgSrc.value,
|
|
40
40
|
alt: __props.alt,
|
|
41
41
|
onError: _cache[0] || (_cache[0] = () => imgSrc.value = __props.fallback)
|
|
42
|
-
}, null, 40, _hoisted_1$
|
|
42
|
+
}, null, 40, _hoisted_1$a)) : (openBlock(), createElementBlock("svg", _hoisted_2$5, [
|
|
43
43
|
createElementVNode("text", {
|
|
44
44
|
x: "50%",
|
|
45
45
|
y: "50%",
|
|
@@ -61,17 +61,17 @@ var _export_sfc = (sfc, props) => {
|
|
|
61
61
|
}
|
|
62
62
|
return target;
|
|
63
63
|
};
|
|
64
|
-
const _sfc_main$
|
|
65
|
-
const _hoisted_1$
|
|
64
|
+
const _sfc_main$i = {};
|
|
65
|
+
const _hoisted_1$9 = {
|
|
66
66
|
class: /* @__PURE__ */ normalizeClass(`vuetiful-badge badge`)
|
|
67
67
|
};
|
|
68
68
|
function _sfc_render$3(_ctx, _cache) {
|
|
69
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
69
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
70
70
|
renderSlot(_ctx.$slots, "default")
|
|
71
71
|
]);
|
|
72
72
|
}
|
|
73
|
-
var VBadge = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
74
|
-
const _sfc_main$
|
|
73
|
+
var VBadge = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$3]]);
|
|
74
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
75
75
|
__name: "VButton",
|
|
76
76
|
props: {
|
|
77
77
|
icon: {
|
|
@@ -121,16 +121,16 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
|
-
const _sfc_main$
|
|
125
|
-
const _hoisted_1$
|
|
124
|
+
const _sfc_main$g = {};
|
|
125
|
+
const _hoisted_1$8 = {
|
|
126
126
|
class: /* @__PURE__ */ normalizeClass(`vuetiful-chip chip`)
|
|
127
127
|
};
|
|
128
128
|
function _sfc_render$2(_ctx, _cache) {
|
|
129
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
129
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
130
130
|
renderSlot(_ctx.$slots, "default")
|
|
131
131
|
]);
|
|
132
132
|
}
|
|
133
|
-
var VChip = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
133
|
+
var VChip = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$2]]);
|
|
134
134
|
var deepFreezeEs6 = { exports: {} };
|
|
135
135
|
function deepFreeze(obj) {
|
|
136
136
|
if (obj instanceof Map) {
|
|
@@ -46471,12 +46471,12 @@ const useHighlight = () => {
|
|
|
46471
46471
|
};
|
|
46472
46472
|
};
|
|
46473
46473
|
var githubDark = "";
|
|
46474
|
-
const _hoisted_1$
|
|
46475
|
-
const _hoisted_2$
|
|
46474
|
+
const _hoisted_1$7 = { class: "code-block bg-neutral-900/90 text-sm text-white shadow rounded-container-token" };
|
|
46475
|
+
const _hoisted_2$4 = {
|
|
46476
46476
|
class: /* @__PURE__ */ normalizeClass(`code-block-language`)
|
|
46477
46477
|
};
|
|
46478
|
-
const _hoisted_3$
|
|
46479
|
-
const _sfc_main$
|
|
46478
|
+
const _hoisted_3$2 = ["innerHTML"];
|
|
46479
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
46480
46480
|
__name: "VCodeBlock",
|
|
46481
46481
|
props: {
|
|
46482
46482
|
language: {
|
|
@@ -46534,11 +46534,11 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
46534
46534
|
emit("copy");
|
|
46535
46535
|
}
|
|
46536
46536
|
return (_ctx, _cache) => {
|
|
46537
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
46537
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
46538
46538
|
createElementVNode("header", {
|
|
46539
46539
|
class: normalizeClass(`code-block-header flex items-center justify-between p-2 pb-0 pl-4 text-xs uppercase text-white/50 ${__props.headerClass}`)
|
|
46540
46540
|
}, [
|
|
46541
|
-
createElementVNode("span", _hoisted_2$
|
|
46541
|
+
createElementVNode("span", _hoisted_2$4, toDisplayString(languageFormatter(__props.language)), 1),
|
|
46542
46542
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
46543
46543
|
class: normalizeClass(`code-block-btn ${__props.buttonClass}`),
|
|
46544
46544
|
onClick: _cache[0] || (_cache[0] = ($event) => onCopyClick())
|
|
@@ -46554,13 +46554,13 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
46554
46554
|
createElementVNode("code", {
|
|
46555
46555
|
class: normalizeClass(`code-block-code language-${__props.language}`),
|
|
46556
46556
|
innerHTML: unref(highlight2)(props.code, props.language)
|
|
46557
|
-
}, null, 10, _hoisted_3$
|
|
46557
|
+
}, null, 10, _hoisted_3$2)
|
|
46558
46558
|
], 2)
|
|
46559
46559
|
]);
|
|
46560
46560
|
};
|
|
46561
46561
|
}
|
|
46562
46562
|
});
|
|
46563
|
-
const _sfc_main$
|
|
46563
|
+
const _sfc_main$e = defineComponent({
|
|
46564
46564
|
props: {
|
|
46565
46565
|
bgLight: {
|
|
46566
46566
|
type: String,
|
|
@@ -46651,8 +46651,8 @@ const _sfc_main$d = defineComponent({
|
|
|
46651
46651
|
};
|
|
46652
46652
|
}
|
|
46653
46653
|
});
|
|
46654
|
-
const _hoisted_1$
|
|
46655
|
-
const _hoisted_2$
|
|
46654
|
+
const _hoisted_1$6 = ["aria-checked", "title"];
|
|
46655
|
+
const _hoisted_2$3 = ["d"];
|
|
46656
46656
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
46657
46657
|
return openBlock(), createElementBlock("div", {
|
|
46658
46658
|
class: normalizeClass(`lightswitch-track ${_ctx.classesTrack}`),
|
|
@@ -46677,12 +46677,12 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
46677
46677
|
createElementVNode("path", {
|
|
46678
46678
|
fill: "currentColor",
|
|
46679
46679
|
d: _ctx.currentMode ? _ctx.svgPath.sun : _ctx.svgPath.moon
|
|
46680
|
-
}, null, 8, _hoisted_2$
|
|
46680
|
+
}, null, 8, _hoisted_2$3)
|
|
46681
46681
|
], 2))
|
|
46682
46682
|
], 2)
|
|
46683
|
-
], 42, _hoisted_1$
|
|
46683
|
+
], 42, _hoisted_1$6);
|
|
46684
46684
|
}
|
|
46685
|
-
var VLightSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
46685
|
+
var VLightSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$1]]);
|
|
46686
46686
|
function u(r2, n2, ...a2) {
|
|
46687
46687
|
if (r2 in n2) {
|
|
46688
46688
|
let e2 = n2[r2];
|
|
@@ -47175,7 +47175,7 @@ let S = Symbol("GroupContext"), ae = defineComponent({ name: "SwitchGroup", prop
|
|
|
47175
47175
|
return h$1(Fragment, [n2 != null && i2.value != null ? h$1(f$1, K$1({ features: a$1.Hidden, as: "input", type: "checkbox", hidden: true, readOnly: true, checked: i2.value, form: D, name: n2, value: L })) : null, H$2({ ourProps: x, theirProps: { ...a2, ...T$2(R, ["modelValue", "defaultChecked"]) }, slot: K2, attrs: a2, slots: o$2, name: "Switch" })]);
|
|
47176
47176
|
};
|
|
47177
47177
|
} }), de = T, ce = E;
|
|
47178
|
-
const _sfc_main$
|
|
47178
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
47179
47179
|
__name: "VRadioDescription",
|
|
47180
47180
|
props: {
|
|
47181
47181
|
as: {
|
|
@@ -47194,7 +47194,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
47194
47194
|
};
|
|
47195
47195
|
}
|
|
47196
47196
|
});
|
|
47197
|
-
const _sfc_main$
|
|
47197
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
47198
47198
|
__name: "VRadioGroup",
|
|
47199
47199
|
props: {
|
|
47200
47200
|
as: {
|
|
@@ -47262,7 +47262,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
47262
47262
|
};
|
|
47263
47263
|
}
|
|
47264
47264
|
});
|
|
47265
|
-
const _sfc_main$
|
|
47265
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
47266
47266
|
__name: "VRadioItem",
|
|
47267
47267
|
props: {
|
|
47268
47268
|
value: {
|
|
@@ -47276,7 +47276,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
47276
47276
|
return (_ctx, _cache) => {
|
|
47277
47277
|
return openBlock(), createBlock(unref(Ee), { value: __props.value }, {
|
|
47278
47278
|
default: withCtx(({ checked, disabled }) => [
|
|
47279
|
-
createElementVNode("
|
|
47279
|
+
createElementVNode("div", {
|
|
47280
|
+
"data-test": "radio-item",
|
|
47280
47281
|
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"}`)
|
|
47281
47282
|
}, [
|
|
47282
47283
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -47287,7 +47288,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
47287
47288
|
};
|
|
47288
47289
|
}
|
|
47289
47290
|
});
|
|
47290
|
-
const _sfc_main$
|
|
47291
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
47291
47292
|
__name: "VRadioLabel",
|
|
47292
47293
|
props: {
|
|
47293
47294
|
as: {
|
|
@@ -47306,11 +47307,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
47306
47307
|
};
|
|
47307
47308
|
}
|
|
47308
47309
|
});
|
|
47309
|
-
const _hoisted_1$
|
|
47310
|
+
const _hoisted_1$5 = {
|
|
47310
47311
|
key: 0,
|
|
47311
47312
|
class: "sr-only"
|
|
47312
47313
|
};
|
|
47313
|
-
const _sfc_main$
|
|
47314
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
47314
47315
|
__name: "VSwitch",
|
|
47315
47316
|
props: {
|
|
47316
47317
|
modelValue: {
|
|
@@ -47386,7 +47387,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
47386
47387
|
createElementVNode("div", {
|
|
47387
47388
|
class: normalizeClass(`slide-toggle-track flex transition-all duration-[150ms] border-token rounded-token ${unref(trackSize)} ${__props.disabled ? "cursor-not-allowed" : "cursor-pointer"} ${__props.switchClass}`)
|
|
47388
47389
|
}, [
|
|
47389
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
47390
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_1$5, [
|
|
47390
47391
|
renderSlot(_ctx.$slots, "default")
|
|
47391
47392
|
])) : createCommentVNode("", true),
|
|
47392
47393
|
createElementVNode("div", {
|
|
@@ -47399,7 +47400,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
47399
47400
|
};
|
|
47400
47401
|
}
|
|
47401
47402
|
});
|
|
47402
|
-
const _sfc_main$
|
|
47403
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
47403
47404
|
__name: "VSwitchDescription",
|
|
47404
47405
|
props: {
|
|
47405
47406
|
as: {
|
|
@@ -47418,7 +47419,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
47418
47419
|
};
|
|
47419
47420
|
}
|
|
47420
47421
|
});
|
|
47421
|
-
const _sfc_main$
|
|
47422
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
47422
47423
|
__name: "VSwitchGroup",
|
|
47423
47424
|
props: {
|
|
47424
47425
|
as: {
|
|
@@ -47437,7 +47438,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
47437
47438
|
};
|
|
47438
47439
|
}
|
|
47439
47440
|
});
|
|
47440
|
-
const _sfc_main$
|
|
47441
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
47441
47442
|
__name: "VSwitchLabel",
|
|
47442
47443
|
props: {
|
|
47443
47444
|
as: {
|
|
@@ -47582,8 +47583,8 @@ const useDarkMode = () => {
|
|
|
47582
47583
|
MODE
|
|
47583
47584
|
};
|
|
47584
47585
|
};
|
|
47585
|
-
const _hoisted_1$
|
|
47586
|
-
const _sfc_main$
|
|
47586
|
+
const _hoisted_1$4 = ["aria-labelledby", "aria-describedby"];
|
|
47587
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
47587
47588
|
__name: "VDrawer",
|
|
47588
47589
|
props: {
|
|
47589
47590
|
regionBackdrop: {
|
|
@@ -47647,7 +47648,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
47647
47648
|
"aria-describedby": unref(describedby)
|
|
47648
47649
|
}, [
|
|
47649
47650
|
renderSlot(_ctx.$slots, "default")
|
|
47650
|
-
], 10, _hoisted_1$
|
|
47651
|
+
], 10, _hoisted_1$4)) : createCommentVNode("", true)
|
|
47651
47652
|
]),
|
|
47652
47653
|
_: 3
|
|
47653
47654
|
}, 8, ["name"]),
|
|
@@ -47670,8 +47671,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
47670
47671
|
};
|
|
47671
47672
|
}
|
|
47672
47673
|
});
|
|
47673
|
-
const _hoisted_1$
|
|
47674
|
-
const _sfc_main$
|
|
47674
|
+
const _hoisted_1$3 = { class: "v-rail grid h-full w-[70px] grid-rows-[auto_1fr_auto] gap-0 overflow-y-auto sm:w-20" };
|
|
47675
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
47675
47676
|
__name: "VRail",
|
|
47676
47677
|
props: {
|
|
47677
47678
|
active: {
|
|
@@ -47700,7 +47701,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
47700
47701
|
provide("active", props.active);
|
|
47701
47702
|
provide("hover", props.hover);
|
|
47702
47703
|
return (_ctx, _cache) => {
|
|
47703
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
47704
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
47704
47705
|
createElementVNode("div", {
|
|
47705
47706
|
class: normalizeClass(["v-bar-lead", __props.regionLead])
|
|
47706
47707
|
}, [
|
|
@@ -47720,7 +47721,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
47720
47721
|
};
|
|
47721
47722
|
}
|
|
47722
47723
|
});
|
|
47723
|
-
const _sfc_main$
|
|
47724
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
47724
47725
|
__name: "VRailTile",
|
|
47725
47726
|
props: {
|
|
47726
47727
|
value: {
|
|
@@ -47796,9 +47797,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
47796
47797
|
};
|
|
47797
47798
|
}
|
|
47798
47799
|
});
|
|
47799
|
-
const _hoisted_1$
|
|
47800
|
-
const _hoisted_2$
|
|
47801
|
-
const _sfc_main$
|
|
47800
|
+
const _hoisted_1$2 = { class: "vuetiful-shell flex h-full w-full flex-col overflow-hidden" };
|
|
47801
|
+
const _hoisted_2$2 = { class: "vuetiful-shell-content flex h-full w-full flex-auto overflow-hidden" };
|
|
47802
|
+
const _sfc_main$2 = defineComponent({
|
|
47802
47803
|
__name: "VShell",
|
|
47803
47804
|
props: {
|
|
47804
47805
|
regionPage: { type: String, default: "" },
|
|
@@ -47813,14 +47814,14 @@ const _sfc_main$1 = defineComponent({
|
|
|
47813
47814
|
setup(__props) {
|
|
47814
47815
|
return (_ctx, _cache) => {
|
|
47815
47816
|
var _a;
|
|
47816
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
47817
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
47817
47818
|
_ctx.$slots.fixedHeader ? (openBlock(), createElementBlock("header", {
|
|
47818
47819
|
key: 0,
|
|
47819
47820
|
class: normalizeClass(`vuetiful-fixed-header ${__props.slotFixedHeader}`)
|
|
47820
47821
|
}, [
|
|
47821
47822
|
renderSlot(_ctx.$slots, "fixedHeader")
|
|
47822
47823
|
], 2)) : createCommentVNode("", true),
|
|
47823
|
-
createElementVNode("div", _hoisted_2$
|
|
47824
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
47824
47825
|
_ctx.$slots.sidebarLeft ? (openBlock(), createElementBlock("aside", {
|
|
47825
47826
|
key: 0,
|
|
47826
47827
|
class: normalizeClass(`vuetiful-sidebar-left overflow-y-auto overflow-x-hidden ${__props.slotSidebarLeft}`)
|
|
@@ -47866,34 +47867,291 @@ const _sfc_main$1 = defineComponent({
|
|
|
47866
47867
|
};
|
|
47867
47868
|
}
|
|
47868
47869
|
});
|
|
47870
|
+
var VPreview_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
47871
|
+
const _withScopeId = (n2) => (pushScopeId("data-v-11c10f2c"), n2 = n2(), popScopeId(), n2);
|
|
47872
|
+
const _hoisted_1$1 = { class: "vuetiful-previewer overflow-hidden shadow-2xl shadow-surface-500/10 rounded-container-token dark:shadow-black/10" };
|
|
47873
|
+
const _hoisted_2$1 = { class: "flex items-center gap-2" };
|
|
47874
|
+
const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
47875
|
+
class: "icon",
|
|
47876
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47877
|
+
viewBox: "0 0 576 512"
|
|
47878
|
+
}, [
|
|
47879
|
+
/* @__PURE__ */ createElementVNode("path", { d: "M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z" })
|
|
47880
|
+
], -1));
|
|
47881
|
+
const _hoisted_4$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
47882
|
+
class: "icon",
|
|
47883
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47884
|
+
viewBox: "0 0 640 512"
|
|
47885
|
+
}, [
|
|
47886
|
+
/* @__PURE__ */ createElementVNode("path", { d: "M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z" })
|
|
47887
|
+
], -1));
|
|
47888
|
+
const _hoisted_5$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
47889
|
+
class: "icon",
|
|
47890
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47891
|
+
viewBox: "0 0 384 512"
|
|
47892
|
+
}, [
|
|
47893
|
+
/* @__PURE__ */ createElementVNode("path", { d: "M16 64C16 28.7 44.7 0 80 0H304c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H80c-35.3 0-64-28.7-64-64V64zM144 448c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16s-7.2-16-16-16H160c-8.8 0-16 7.2-16 16zM304 64H80V384H304V64z" })
|
|
47894
|
+
], -1));
|
|
47895
|
+
const _hoisted_6$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
47896
|
+
class: "icon",
|
|
47897
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47898
|
+
viewBox: "0 0 576 512"
|
|
47899
|
+
}, [
|
|
47900
|
+
/* @__PURE__ */ createElementVNode("path", { d: "M64 0C28.7 0 0 28.7 0 64V352c0 35.3 28.7 64 64 64H240l-10.7 32H160c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H346.7L336 416H512c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H64zM512 64V352H64V64H512z" })
|
|
47901
|
+
], -1));
|
|
47902
|
+
const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
47903
|
+
class: "icon",
|
|
47904
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47905
|
+
viewBox: "0 0 512 512"
|
|
47906
|
+
}, [
|
|
47907
|
+
/* @__PURE__ */ createElementVNode("path", { d: "M0 32C0 14.3 14.3 0 32 0H160c17.7 0 32 14.3 32 32V416c0 53-43 96-96 96s-96-43-96-96V32zM223.6 425.9c.3-3.3 .4-6.6 .4-9.9V154l75.4-75.4c12.5-12.5 32.8-12.5 45.3 0l90.5 90.5c12.5 12.5 12.5 32.8 0 45.3L223.6 425.9zM182.8 512l192-192H480c17.7 0 32 14.3 32 32V480c0 17.7-14.3 32-32 32H182.8zM128 64H64v64h64V64zM64 192v64h64V192H64zM96 440a24 24 0 1 0 0-48 24 24 0 1 0 0 48z" })
|
|
47908
|
+
], -1));
|
|
47909
|
+
const _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
47910
|
+
class: "icon",
|
|
47911
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47912
|
+
viewBox: "0 0 512 512"
|
|
47913
|
+
}, [
|
|
47914
|
+
/* @__PURE__ */ createElementVNode("path", { d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z" })
|
|
47915
|
+
], -1));
|
|
47916
|
+
const _hoisted_9 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
47917
|
+
class: "icon",
|
|
47918
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47919
|
+
viewBox: "0 0 512 512"
|
|
47920
|
+
}, [
|
|
47921
|
+
/* @__PURE__ */ createElementVNode("path", { d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z" })
|
|
47922
|
+
], -1));
|
|
47923
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
47924
|
+
__name: "VPreview",
|
|
47925
|
+
props: {
|
|
47926
|
+
hideMobileToggle: {
|
|
47927
|
+
type: Boolean,
|
|
47928
|
+
default: false
|
|
47929
|
+
},
|
|
47930
|
+
hideSwatches: {
|
|
47931
|
+
type: Boolean,
|
|
47932
|
+
default: false
|
|
47933
|
+
},
|
|
47934
|
+
background: {
|
|
47935
|
+
type: String,
|
|
47936
|
+
default: "neutral"
|
|
47937
|
+
},
|
|
47938
|
+
regionHeader: {
|
|
47939
|
+
type: String,
|
|
47940
|
+
default: ""
|
|
47941
|
+
},
|
|
47942
|
+
regionViewport: {
|
|
47943
|
+
type: String,
|
|
47944
|
+
default: ""
|
|
47945
|
+
},
|
|
47946
|
+
regionPreview: {
|
|
47947
|
+
type: String,
|
|
47948
|
+
default: ""
|
|
47949
|
+
},
|
|
47950
|
+
regionFooter: {
|
|
47951
|
+
type: String,
|
|
47952
|
+
default: ""
|
|
47953
|
+
},
|
|
47954
|
+
regionSource: {
|
|
47955
|
+
type: String,
|
|
47956
|
+
default: ""
|
|
47957
|
+
}
|
|
47958
|
+
},
|
|
47959
|
+
setup(__props) {
|
|
47960
|
+
const props = __props;
|
|
47961
|
+
const backgrounds = {
|
|
47962
|
+
"bg-transparent": "bg-transparent",
|
|
47963
|
+
neutral: "bg-white/25 dark:bg-black/25",
|
|
47964
|
+
"neutral-opaque": "bg-white/50 dark:bg-black/50",
|
|
47965
|
+
"variant-filled-surface": "variant-filled-surface",
|
|
47966
|
+
"variant-filled-primary": "variant-filled-primary",
|
|
47967
|
+
"variant-filled-secondary": "variant-filled-secondary",
|
|
47968
|
+
"variant-filled-tertiary": "variant-filled-tertiary",
|
|
47969
|
+
"variant-filled-success": "variant-filled-success",
|
|
47970
|
+
"variant-filled-warning": "variant-filled-warning",
|
|
47971
|
+
"variant-filled-error": "variant-filled-error"
|
|
47972
|
+
};
|
|
47973
|
+
const chosenBackground = ref(props.background);
|
|
47974
|
+
const tabView = ref("preview");
|
|
47975
|
+
const radioSize = ref("full");
|
|
47976
|
+
const swatches = ref(false);
|
|
47977
|
+
const toggleSwatches = () => swatches.value = !swatches.value;
|
|
47978
|
+
return (_ctx, _cache) => {
|
|
47979
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
47980
|
+
createElementVNode("header", {
|
|
47981
|
+
class: normalizeClass(`vuetiful-previewer-header flex items-center justify-between gap-4 p-4 bg-surface-200-700-token ${__props.regionHeader}`)
|
|
47982
|
+
}, [
|
|
47983
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
47984
|
+
createVNode(unref(_sfc_main$c), {
|
|
47985
|
+
modelValue: tabView.value,
|
|
47986
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => tabView.value = $event)
|
|
47987
|
+
}, {
|
|
47988
|
+
default: withCtx(() => [
|
|
47989
|
+
createVNode(unref(_sfc_main$b), {
|
|
47990
|
+
"data-test": "radio-item-preview",
|
|
47991
|
+
value: "preview",
|
|
47992
|
+
title: "Preview"
|
|
47993
|
+
}, {
|
|
47994
|
+
default: withCtx(() => [
|
|
47995
|
+
renderSlot(_ctx.$slots, "preview-item", {}, () => [
|
|
47996
|
+
_hoisted_3$1
|
|
47997
|
+
], true)
|
|
47998
|
+
]),
|
|
47999
|
+
_: 3
|
|
48000
|
+
}),
|
|
48001
|
+
createVNode(unref(_sfc_main$b), {
|
|
48002
|
+
"data-test": "radio-item-code",
|
|
48003
|
+
value: "code",
|
|
48004
|
+
title: "Code"
|
|
48005
|
+
}, {
|
|
48006
|
+
default: withCtx(() => [
|
|
48007
|
+
renderSlot(_ctx.$slots, "code-item", {}, () => [
|
|
48008
|
+
_hoisted_4$1
|
|
48009
|
+
], true)
|
|
48010
|
+
]),
|
|
48011
|
+
_: 3
|
|
48012
|
+
})
|
|
48013
|
+
]),
|
|
48014
|
+
_: 3
|
|
48015
|
+
}, 8, ["modelValue"]),
|
|
48016
|
+
!__props.hideMobileToggle && tabView.value === "preview" ? (openBlock(), createBlock(unref(_sfc_main$c), {
|
|
48017
|
+
key: 0,
|
|
48018
|
+
class: "hidden sm:!inline-flex",
|
|
48019
|
+
modelValue: radioSize.value,
|
|
48020
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => radioSize.value = $event)
|
|
48021
|
+
}, {
|
|
48022
|
+
default: withCtx(() => [
|
|
48023
|
+
createVNode(unref(_sfc_main$b), {
|
|
48024
|
+
"data-test": "radio-item-mobile",
|
|
48025
|
+
value: "mobile"
|
|
48026
|
+
}, {
|
|
48027
|
+
default: withCtx(() => [
|
|
48028
|
+
renderSlot(_ctx.$slots, "mobile-item", {}, () => [
|
|
48029
|
+
_hoisted_5$1
|
|
48030
|
+
], true)
|
|
48031
|
+
]),
|
|
48032
|
+
_: 3
|
|
48033
|
+
}),
|
|
48034
|
+
createVNode(unref(_sfc_main$b), { value: "full" }, {
|
|
48035
|
+
default: withCtx(() => [
|
|
48036
|
+
renderSlot(_ctx.$slots, "desktop-item", {}, () => [
|
|
48037
|
+
_hoisted_6$1
|
|
48038
|
+
], true)
|
|
48039
|
+
]),
|
|
48040
|
+
_: 3
|
|
48041
|
+
})
|
|
48042
|
+
]),
|
|
48043
|
+
_: 3
|
|
48044
|
+
}, 8, ["modelValue"])) : createCommentVNode("", true)
|
|
48045
|
+
]),
|
|
48046
|
+
!__props.hideSwatches ? (openBlock(), createBlock(unref(_sfc_main$h), {
|
|
48047
|
+
key: 0,
|
|
48048
|
+
"data-test": "swatch-button",
|
|
48049
|
+
class: normalizeClass(`${swatches.value ? "variant-filled" : "variant-ghost"} px-4 py-1 border-token border-surface-400-500-token`),
|
|
48050
|
+
onClick: toggleSwatches,
|
|
48051
|
+
title: "Backgrounds"
|
|
48052
|
+
}, {
|
|
48053
|
+
default: withCtx(() => [
|
|
48054
|
+
renderSlot(_ctx.$slots, "swatchbook-item", {}, () => [
|
|
48055
|
+
_hoisted_7
|
|
48056
|
+
], true)
|
|
48057
|
+
]),
|
|
48058
|
+
_: 3
|
|
48059
|
+
}, 8, ["class"])) : createCommentVNode("", true)
|
|
48060
|
+
], 2),
|
|
48061
|
+
swatches.value ? (openBlock(), createBlock(unref(_sfc_main$c), {
|
|
48062
|
+
key: 0,
|
|
48063
|
+
"data-test": "swatches",
|
|
48064
|
+
class: normalizeClass(`vuetiful-previewer-swatches variant-soft grid grid-cols-6 gap-2 !rounded-none p-4 sm:grid-cols-12`),
|
|
48065
|
+
active: "bg-transparent",
|
|
48066
|
+
hover: "bg-transparent",
|
|
48067
|
+
modelValue: chosenBackground.value,
|
|
48068
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => chosenBackground.value = $event)
|
|
48069
|
+
}, {
|
|
48070
|
+
default: withCtx(() => [
|
|
48071
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(Object.entries(backgrounds), ([key, value], index2) => {
|
|
48072
|
+
return openBlock(), createBlock(unref(_sfc_main$b), {
|
|
48073
|
+
value: key,
|
|
48074
|
+
key: index2,
|
|
48075
|
+
class: normalizeClass(`${value} flex aspect-square cursor-pointer items-center justify-center rounded ring-[1px] ring-surface-500/50`),
|
|
48076
|
+
title: key
|
|
48077
|
+
}, {
|
|
48078
|
+
default: withCtx(() => [
|
|
48079
|
+
index2 === 0 && chosenBackground.value !== key ? renderSlot(_ctx.$slots, "cancel-item", { key: 0 }, () => [
|
|
48080
|
+
_hoisted_8
|
|
48081
|
+
], true) : createCommentVNode("", true),
|
|
48082
|
+
chosenBackground.value === key ? renderSlot(_ctx.$slots, "selected-item", { key: 1 }, () => [
|
|
48083
|
+
_hoisted_9
|
|
48084
|
+
], true) : createCommentVNode("", true)
|
|
48085
|
+
]),
|
|
48086
|
+
_: 2
|
|
48087
|
+
}, 1032, ["value", "class", "title"]);
|
|
48088
|
+
}), 128))
|
|
48089
|
+
]),
|
|
48090
|
+
_: 3
|
|
48091
|
+
}, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
48092
|
+
tabView.value === "preview" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
48093
|
+
createElementVNode("div", {
|
|
48094
|
+
class: normalizeClass(`vuetiful-previewer-viewport p-4 md:p-10 ${backgrounds[chosenBackground.value]} ${__props.regionViewport}`)
|
|
48095
|
+
}, [
|
|
48096
|
+
createElementVNode("div", {
|
|
48097
|
+
"data-test": "previewer-preview",
|
|
48098
|
+
class: normalizeClass(`vuetiful-previewer-preview mx-auto flex duration-300 ${radioSize.value === "mobile" ? "mobile-screen flex h-[812px] max-w-[375px] flex-col overflow-hidden rounded-3xl border-8 border-black/50 p-2 shadow-2xl dark:border-white/50" : "w-full items-center justify-center"} ${__props.regionPreview}`)
|
|
48099
|
+
}, [
|
|
48100
|
+
renderSlot(_ctx.$slots, "preview", {}, () => [
|
|
48101
|
+
createTextVNode("(preview)")
|
|
48102
|
+
], true)
|
|
48103
|
+
], 2)
|
|
48104
|
+
], 2),
|
|
48105
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", {
|
|
48106
|
+
key: 0,
|
|
48107
|
+
class: normalizeClass(`vuetiful-previewer-footer variant-soft p-4 ${__props.regionFooter}`)
|
|
48108
|
+
}, [
|
|
48109
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
48110
|
+
], 2)) : createCommentVNode("", true)
|
|
48111
|
+
], 64)) : createCommentVNode("", true),
|
|
48112
|
+
tabView.value === "code" ? (openBlock(), createElementBlock("div", {
|
|
48113
|
+
key: 2,
|
|
48114
|
+
"data-test": "previewer-source",
|
|
48115
|
+
class: normalizeClass(`vuetiful-previewer-source space-y-4 p-4 bg-surface-200-700-token ${__props.regionSource}`)
|
|
48116
|
+
}, [
|
|
48117
|
+
renderSlot(_ctx.$slots, "source", {}, () => [
|
|
48118
|
+
createTextVNode("(source)")
|
|
48119
|
+
], true)
|
|
48120
|
+
], 2)) : createCommentVNode("", true)
|
|
48121
|
+
]);
|
|
48122
|
+
};
|
|
48123
|
+
}
|
|
48124
|
+
});
|
|
48125
|
+
var VPreview = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-11c10f2c"]]);
|
|
47869
48126
|
var components = /* @__PURE__ */ Object.freeze({
|
|
47870
48127
|
__proto__: null,
|
|
47871
48128
|
[Symbol.toStringTag]: "Module",
|
|
47872
|
-
VAvatar: _sfc_main$
|
|
47873
|
-
VButton: _sfc_main$
|
|
48129
|
+
VAvatar: _sfc_main$j,
|
|
48130
|
+
VButton: _sfc_main$h,
|
|
47874
48131
|
VBadge,
|
|
47875
48132
|
VChip,
|
|
47876
|
-
VCodeBlock: _sfc_main$
|
|
48133
|
+
VCodeBlock: _sfc_main$f,
|
|
47877
48134
|
VLightSwitch,
|
|
47878
|
-
VRadioGroup: _sfc_main$
|
|
47879
|
-
VRadioItem: _sfc_main$
|
|
47880
|
-
VRadioLabel: _sfc_main$
|
|
47881
|
-
VRadioDescription: _sfc_main$
|
|
47882
|
-
VSwitchGroup: _sfc_main$
|
|
47883
|
-
VSwitchLabel: _sfc_main$
|
|
47884
|
-
VSwitchDescription: _sfc_main$
|
|
47885
|
-
VSwitch: _sfc_main$
|
|
47886
|
-
VRail: _sfc_main$
|
|
47887
|
-
VRailTile: _sfc_main$
|
|
47888
|
-
VShell: _sfc_main$
|
|
47889
|
-
VDrawer: _sfc_main$
|
|
48135
|
+
VRadioGroup: _sfc_main$c,
|
|
48136
|
+
VRadioItem: _sfc_main$b,
|
|
48137
|
+
VRadioLabel: _sfc_main$a,
|
|
48138
|
+
VRadioDescription: _sfc_main$d,
|
|
48139
|
+
VSwitchGroup: _sfc_main$7,
|
|
48140
|
+
VSwitchLabel: _sfc_main$6,
|
|
48141
|
+
VSwitchDescription: _sfc_main$8,
|
|
48142
|
+
VSwitch: _sfc_main$9,
|
|
48143
|
+
VRail: _sfc_main$4,
|
|
48144
|
+
VRailTile: _sfc_main$3,
|
|
48145
|
+
VShell: _sfc_main$2,
|
|
48146
|
+
VDrawer: _sfc_main$5,
|
|
48147
|
+
VPreview
|
|
47890
48148
|
});
|
|
47891
48149
|
var main = "";
|
|
47892
48150
|
var tailwind = "";
|
|
47893
48151
|
const _sfc_main = defineComponent({
|
|
47894
48152
|
components: {
|
|
47895
48153
|
VLightSwitch,
|
|
47896
|
-
VButton: _sfc_main$
|
|
48154
|
+
VButton: _sfc_main$h
|
|
47897
48155
|
},
|
|
47898
48156
|
props: {
|
|
47899
48157
|
bgLight: {
|
|
@@ -48133,4 +48391,4 @@ function install(app) {
|
|
|
48133
48391
|
}
|
|
48134
48392
|
}
|
|
48135
48393
|
var index = { install };
|
|
48136
|
-
export { themeSwitcher as ThemeSwitcher, _sfc_main$
|
|
48394
|
+
export { themeSwitcher as ThemeSwitcher, _sfc_main$j as VAvatar, VBadge, _sfc_main$h as VButton, VChip, _sfc_main$f as VCodeBlock, _sfc_main$5 as VDrawer, VLightSwitch, VPreview, _sfc_main$d as VRadioDescription, _sfc_main$c as VRadioGroup, _sfc_main$b as VRadioItem, _sfc_main$a as VRadioLabel, _sfc_main$4 as VRail, _sfc_main$3 as VRailTile, _sfc_main$2 as VShell, _sfc_main$9 as VSwitch, _sfc_main$8 as VSwitchDescription, _sfc_main$7 as VSwitchGroup, _sfc_main$6 as VSwitchLabel, index as default, useDarkMode, useDrawer, useHighlight, useRail, useTheme, clipboard as vClipboard };
|