@loafacto/ui 0.16.1 → 0.16.2
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/index.js +48 -26
- package/dist/index.js.map +1 -1
- package/dist/loafacto-ui.css +99 -78
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readonly, ref, openBlock, createElementBlock, createStaticVNode, createElementVNode, defineComponent, computed, watch, onBeforeUnmount, normalizeClass, normalizeStyle, createCommentVNode, Fragment, toDisplayString, createVNode, Transition, withCtx, renderList, renderSlot, unref, onUnmounted, createBlock, Teleport, TransitionGroup, withModifiers, useTemplateRef, onMounted,
|
|
1
|
+
import { readonly, ref, openBlock, createElementBlock, createStaticVNode, createElementVNode, defineComponent, computed, watch, onBeforeUnmount, normalizeClass, normalizeStyle, createCommentVNode, Fragment, toDisplayString, createVNode, Transition, withCtx, renderList, renderSlot, unref, nextTick, onUnmounted, createBlock, Teleport, TransitionGroup, withModifiers, useTemplateRef, onMounted, createTextVNode, withDirectives, withKeys, vModelText, resolveDynamicComponent, useAttrs, useModel, useId, mergeProps, isRef, vModelDynamic, mergeModels, vModelSelect, vModelCheckbox, vModelRadio, useSlots } from "vue";
|
|
2
2
|
import { a as applyTheme, D as DARK_THEME, L as LIGHT_THEME } from "./applyTheme-8AxcQbPB.js";
|
|
3
3
|
import { b, c, d, e, f, h, i, l } from "./applyTheme-8AxcQbPB.js";
|
|
4
4
|
import { defineStore } from "pinia";
|
|
@@ -253,18 +253,14 @@ const _hoisted_24 = {
|
|
|
253
253
|
};
|
|
254
254
|
const _hoisted_25 = ["d"];
|
|
255
255
|
const _hoisted_26 = ["title", "aria-label"];
|
|
256
|
-
const _hoisted_27 =
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
};
|
|
260
|
-
const _hoisted_28 = ["d"];
|
|
261
|
-
const _hoisted_29 = { class: "lf-content lf-content--rail" };
|
|
262
|
-
const _hoisted_30 = {
|
|
256
|
+
const _hoisted_27 = ["d"];
|
|
257
|
+
const _hoisted_28 = { class: "lf-content lf-content--rail" };
|
|
258
|
+
const _hoisted_29 = {
|
|
263
259
|
key: 2,
|
|
264
260
|
class: "lf-content"
|
|
265
261
|
};
|
|
266
|
-
const
|
|
267
|
-
const
|
|
262
|
+
const _hoisted_30 = { class: "site-footer" };
|
|
263
|
+
const _hoisted_31 = { class: "site-footer-inner" };
|
|
268
264
|
const ICON_SUN = "M12 7a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0-5v3h0V2zm0 17v3h0v-3zM2 11h3v2H2v-2zm17 0h3v2h-3v-2zM4.2 4.2l2.1 2.1L4.9 7.7 2.8 5.6l1.4-1.4zm13.5 13.5 2.1 2.1-1.4 1.4-2.1-2.1 1.4-1.4zM19.8 4.2l1.4 1.4-2.1 2.1-1.4-1.4 2.1-2.1zM6.3 17.7l1.4 1.4-2.1 2.1-1.4-1.4 2.1-2.1z";
|
|
269
265
|
const ICON_MOON = "M12.3 3a7 7 0 1 0 8.7 8.7A9 9 0 1 1 12.3 3z";
|
|
270
266
|
const RAIL_KEY = "lf-rail-hidden";
|
|
@@ -287,6 +283,28 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
287
283
|
emits: ["navigate"],
|
|
288
284
|
setup(__props, { emit: __emit }) {
|
|
289
285
|
const { mode: mode2, toggle } = useTheme();
|
|
286
|
+
const spun = ref(false);
|
|
287
|
+
function onThemeClick() {
|
|
288
|
+
var _a;
|
|
289
|
+
spun.value = true;
|
|
290
|
+
const doc = document;
|
|
291
|
+
const reduce = typeof window !== "undefined" && ((_a = window.matchMedia) == null ? void 0 : _a.call(window, "(prefers-reduced-motion: reduce)").matches);
|
|
292
|
+
if (!doc.startViewTransition || reduce) {
|
|
293
|
+
toggle();
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
const root = document.documentElement;
|
|
297
|
+
root.classList.add("lf-theme-switching");
|
|
298
|
+
try {
|
|
299
|
+
doc.startViewTransition(async () => {
|
|
300
|
+
toggle();
|
|
301
|
+
await nextTick();
|
|
302
|
+
}).finished.finally(() => root.classList.remove("lf-theme-switching"));
|
|
303
|
+
} catch {
|
|
304
|
+
root.classList.remove("lf-theme-switching");
|
|
305
|
+
toggle();
|
|
306
|
+
}
|
|
307
|
+
}
|
|
290
308
|
const props = __props;
|
|
291
309
|
const emit = __emit;
|
|
292
310
|
const switcherOpen = ref(false);
|
|
@@ -395,7 +413,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
395
413
|
title: railHidden.value ? "메뉴 열기" : "메뉴 닫기",
|
|
396
414
|
"aria-expanded": !railHidden.value,
|
|
397
415
|
onClick: toggleRail
|
|
398
|
-
}, [..._cache[
|
|
416
|
+
}, [..._cache[5] || (_cache[5] = [
|
|
399
417
|
createElementVNode("svg", {
|
|
400
418
|
viewBox: "0 0 24 24",
|
|
401
419
|
"aria-hidden": "true"
|
|
@@ -438,7 +456,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
438
456
|
onClick: _cache[1] || (_cache[1] = ($event) => switcherOpen.value = !switcherOpen.value)
|
|
439
457
|
}, [
|
|
440
458
|
createElementVNode("span", null, toDisplayString(((_a = currentService.value) == null ? void 0 : _a.name) ?? "서비스"), 1),
|
|
441
|
-
_cache[
|
|
459
|
+
_cache[6] || (_cache[6] = createElementVNode("svg", {
|
|
442
460
|
class: "lf-switcher__caret",
|
|
443
461
|
viewBox: "0 0 24 24",
|
|
444
462
|
"aria-hidden": "true"
|
|
@@ -478,7 +496,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
478
496
|
_: 1
|
|
479
497
|
})
|
|
480
498
|
], 512)) : createCommentVNode("", true),
|
|
481
|
-
_cache[
|
|
499
|
+
_cache[8] || (_cache[8] = createElementVNode("div", { class: "lf-topbar__spacer" }, null, -1)),
|
|
482
500
|
__props.user ? (openBlock(), createElementBlock("div", {
|
|
483
501
|
key: 2,
|
|
484
502
|
ref_key: "userEl",
|
|
@@ -499,7 +517,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
499
517
|
class: "lf-user__avatar"
|
|
500
518
|
}, null, 8, _hoisted_16)) : (openBlock(), createElementBlock("span", _hoisted_17, toDisplayString(userInitial.value), 1)),
|
|
501
519
|
createElementVNode("span", _hoisted_18, toDisplayString(__props.user.displayName), 1),
|
|
502
|
-
_cache[
|
|
520
|
+
_cache[7] || (_cache[7] = createElementVNode("svg", {
|
|
503
521
|
class: "lf-user__caret",
|
|
504
522
|
viewBox: "0 0 24 24",
|
|
505
523
|
"aria-hidden": "true"
|
|
@@ -560,15 +578,19 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
560
578
|
class: "lf-glass lf-icon-btn",
|
|
561
579
|
title: unref(mode2) === "dark" ? "밝은 테마로" : "어두운 테마로",
|
|
562
580
|
"aria-label": unref(mode2) === "dark" ? "밝은 테마로 전환" : "어두운 테마로 전환",
|
|
563
|
-
onClick:
|
|
564
|
-
(...args) => unref(toggle) && unref(toggle)(...args))
|
|
581
|
+
onClick: onThemeClick
|
|
565
582
|
}, [
|
|
566
|
-
(openBlock(), createElementBlock("svg",
|
|
583
|
+
(openBlock(), createElementBlock("svg", {
|
|
584
|
+
key: unref(mode2),
|
|
585
|
+
viewBox: "0 0 24 24",
|
|
586
|
+
"aria-hidden": "true",
|
|
587
|
+
class: normalizeClass({ "lf-theme-icon--spin": spun.value })
|
|
588
|
+
}, [
|
|
567
589
|
createElementVNode("path", {
|
|
568
590
|
d: unref(mode2) === "dark" ? ICON_MOON : ICON_SUN,
|
|
569
591
|
fill: "currentColor"
|
|
570
|
-
}, null, 8,
|
|
571
|
-
]))
|
|
592
|
+
}, null, 8, _hoisted_27)
|
|
593
|
+
], 2))
|
|
572
594
|
], 8, _hoisted_26)) : createCommentVNode("", true),
|
|
573
595
|
renderSlot(_ctx.$slots, "actions", {}, void 0, true)
|
|
574
596
|
])
|
|
@@ -580,20 +602,20 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
580
602
|
createElementVNode("nav", {
|
|
581
603
|
class: normalizeClass(["lf-rail", { "lf-rail--open": railOpen.value, "lf-rail--hidden": railHidden.value, "lf-rail--overlay": railOverlay.value }]),
|
|
582
604
|
"aria-label": "메뉴",
|
|
583
|
-
onClick: _cache[
|
|
605
|
+
onClick: _cache[4] || (_cache[4] = ($event) => railOpen.value = false)
|
|
584
606
|
}, [
|
|
585
607
|
renderSlot(_ctx.$slots, "rail", {}, void 0, true)
|
|
586
608
|
], 2),
|
|
587
|
-
createElementVNode("main",
|
|
609
|
+
createElementVNode("main", _hoisted_28, [
|
|
588
610
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
589
611
|
])
|
|
590
|
-
], 2)) : (openBlock(), createElementBlock("main",
|
|
612
|
+
], 2)) : (openBlock(), createElementBlock("main", _hoisted_29, [
|
|
591
613
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
592
614
|
])),
|
|
593
|
-
createElementVNode("footer",
|
|
594
|
-
createElementVNode("div",
|
|
615
|
+
createElementVNode("footer", _hoisted_30, [
|
|
616
|
+
createElementVNode("div", _hoisted_31, [
|
|
595
617
|
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
596
|
-
_cache[
|
|
618
|
+
_cache[9] || (_cache[9] = createElementVNode("p", { class: "site-footer-copy" }, "© Loafacto. All rights reserved.", -1))
|
|
597
619
|
], true)
|
|
598
620
|
])
|
|
599
621
|
])
|
|
@@ -601,7 +623,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
601
623
|
};
|
|
602
624
|
}
|
|
603
625
|
});
|
|
604
|
-
const AppShell = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-
|
|
626
|
+
const AppShell = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-ff76069c"]]);
|
|
605
627
|
function generateId() {
|
|
606
628
|
return `toast-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
607
629
|
}
|