@loafacto/ui 0.8.5 → 0.8.6
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/components/AppShell.vue.d.ts +18 -0
- package/dist/index.js +35 -22
- package/dist/index.js.map +1 -1
- package/dist/loafacto-ui.css +60 -52
- package/package.json +1 -1
|
@@ -13,6 +13,22 @@ type __VLS_Props = {
|
|
|
13
13
|
themeToggle?: boolean;
|
|
14
14
|
brandName?: string;
|
|
15
15
|
brandHref?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 사용자 메뉴의 「내 정보」가 가리키는 곳. 빈 문자열이면 항목을 내지 않는다.
|
|
18
|
+
*
|
|
19
|
+
* 기본값이 같은 오리진의 절대 경로인 것이 요점이다 — /macro 에서 눌러도 /agent 에서
|
|
20
|
+
* 눌러도 플랫폼의 같은 화면으로 간다. 다른 오리진에서 쓰는 서비스(아직 서브도메인인
|
|
21
|
+
* hub 등)는 전체 URL 을 넘긴다.
|
|
22
|
+
*/
|
|
23
|
+
myPageHref?: string;
|
|
24
|
+
/**
|
|
25
|
+
* 「로그아웃」이 가리키는 곳. 빈 문자열이면 항목을 내지 않는다.
|
|
26
|
+
*
|
|
27
|
+
* 이벤트가 아니라 링크인 것은 **서비스마다 로그아웃을 구현하지 않게** 하기 위해서다.
|
|
28
|
+
* 세션을 발급하는 곳이 하나이므로 끊는 곳도 하나면 된다. 전체 페이지 이동이지만
|
|
29
|
+
* 어차피 나가는 길이고, 메모리에 남은 상태까지 확실히 비워진다.
|
|
30
|
+
*/
|
|
31
|
+
logoutHref?: string;
|
|
16
32
|
logoUrl?: string;
|
|
17
33
|
user?: ShellUser | null;
|
|
18
34
|
backgroundColor?: string;
|
|
@@ -48,6 +64,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
48
64
|
themeToggle: boolean;
|
|
49
65
|
brandName: string;
|
|
50
66
|
brandHref: string;
|
|
67
|
+
myPageHref: string;
|
|
68
|
+
logoutHref: string;
|
|
51
69
|
user: ShellUser | null;
|
|
52
70
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
53
71
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
package/dist/index.js
CHANGED
|
@@ -172,26 +172,28 @@ const _hoisted_19 = {
|
|
|
172
172
|
key: 0,
|
|
173
173
|
class: "lf-user__email"
|
|
174
174
|
};
|
|
175
|
-
const _hoisted_20 =
|
|
175
|
+
const _hoisted_20 = ["href"];
|
|
176
|
+
const _hoisted_21 = ["href"];
|
|
177
|
+
const _hoisted_22 = {
|
|
176
178
|
key: 3,
|
|
177
179
|
class: "lf-shortcuts",
|
|
178
180
|
"aria-label": "바로가기"
|
|
179
181
|
};
|
|
180
|
-
const
|
|
181
|
-
const
|
|
182
|
+
const _hoisted_23 = ["href", "title", "aria-label"];
|
|
183
|
+
const _hoisted_24 = {
|
|
182
184
|
viewBox: "0 0 24 24",
|
|
183
185
|
"aria-hidden": "true"
|
|
184
186
|
};
|
|
185
|
-
const
|
|
186
|
-
const
|
|
187
|
-
const
|
|
187
|
+
const _hoisted_25 = ["d"];
|
|
188
|
+
const _hoisted_26 = ["title", "aria-label"];
|
|
189
|
+
const _hoisted_27 = {
|
|
188
190
|
viewBox: "0 0 24 24",
|
|
189
191
|
"aria-hidden": "true"
|
|
190
192
|
};
|
|
191
|
-
const
|
|
192
|
-
const
|
|
193
|
-
const
|
|
194
|
-
const
|
|
193
|
+
const _hoisted_28 = ["d"];
|
|
194
|
+
const _hoisted_29 = { class: "lf-content" };
|
|
195
|
+
const _hoisted_30 = { class: "site-footer" };
|
|
196
|
+
const _hoisted_31 = { class: "site-footer-inner" };
|
|
195
197
|
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";
|
|
196
198
|
const ICON_MOON = "M12.3 3a7 7 0 1 0 8.7 8.7A9 9 0 1 1 12.3 3z";
|
|
197
199
|
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
@@ -203,6 +205,8 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
203
205
|
themeToggle: { type: Boolean, default: true },
|
|
204
206
|
brandName: { default: "Loafacto" },
|
|
205
207
|
brandHref: { default: "/" },
|
|
208
|
+
myPageHref: { default: "/me" },
|
|
209
|
+
logoutHref: { default: "/logout" },
|
|
206
210
|
logoUrl: {},
|
|
207
211
|
user: { default: null },
|
|
208
212
|
backgroundColor: {},
|
|
@@ -385,10 +389,19 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
385
389
|
onClick: _cache[3] || (_cache[3] = ($event) => userOpen.value = false)
|
|
386
390
|
}, [
|
|
387
391
|
__props.user.email ? (openBlock(), createElementBlock("p", _hoisted_19, toDisplayString(__props.user.email), 1)) : createCommentVNode("", true),
|
|
388
|
-
|
|
392
|
+
__props.myPageHref ? (openBlock(), createElementBlock("a", {
|
|
393
|
+
key: 1,
|
|
394
|
+
href: __props.myPageHref
|
|
395
|
+
}, "내 정보", 8, _hoisted_20)) : createCommentVNode("", true),
|
|
396
|
+
renderSlot(_ctx.$slots, "user-menu", {}, void 0, true),
|
|
397
|
+
__props.logoutHref ? (openBlock(), createElementBlock("a", {
|
|
398
|
+
key: 2,
|
|
399
|
+
class: "lf-user__logout",
|
|
400
|
+
href: __props.logoutHref
|
|
401
|
+
}, "로그아웃", 8, _hoisted_21)) : createCommentVNode("", true)
|
|
389
402
|
])) : createCommentVNode("", true)
|
|
390
403
|
], 512)) : renderSlot(_ctx.$slots, "auth-actions", {}, void 0, true, 2),
|
|
391
|
-
__props.shortcuts.length ? (openBlock(), createElementBlock("nav",
|
|
404
|
+
__props.shortcuts.length ? (openBlock(), createElementBlock("nav", _hoisted_22, [
|
|
392
405
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.shortcuts, (s) => {
|
|
393
406
|
return openBlock(), createElementBlock("a", {
|
|
394
407
|
key: s.id,
|
|
@@ -399,13 +412,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
399
412
|
title: s.label,
|
|
400
413
|
"aria-label": `${s.label} (새 탭에서 열림)`
|
|
401
414
|
}, [
|
|
402
|
-
(openBlock(), createElementBlock("svg",
|
|
415
|
+
(openBlock(), createElementBlock("svg", _hoisted_24, [
|
|
403
416
|
createElementVNode("path", {
|
|
404
417
|
d: s.iconPath,
|
|
405
418
|
fill: "currentColor"
|
|
406
|
-
}, null, 8,
|
|
419
|
+
}, null, 8, _hoisted_25)
|
|
407
420
|
]))
|
|
408
|
-
], 8,
|
|
421
|
+
], 8, _hoisted_23);
|
|
409
422
|
}), 128))
|
|
410
423
|
])) : createCommentVNode("", true),
|
|
411
424
|
__props.themeToggle ? (openBlock(), createElementBlock("button", {
|
|
@@ -417,21 +430,21 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
417
430
|
onClick: _cache[4] || (_cache[4] = //@ts-ignore
|
|
418
431
|
(...args) => unref(toggle) && unref(toggle)(...args))
|
|
419
432
|
}, [
|
|
420
|
-
(openBlock(), createElementBlock("svg",
|
|
433
|
+
(openBlock(), createElementBlock("svg", _hoisted_27, [
|
|
421
434
|
createElementVNode("path", {
|
|
422
435
|
d: unref(mode2) === "dark" ? ICON_MOON : ICON_SUN,
|
|
423
436
|
fill: "currentColor"
|
|
424
|
-
}, null, 8,
|
|
437
|
+
}, null, 8, _hoisted_28)
|
|
425
438
|
]))
|
|
426
|
-
], 8,
|
|
439
|
+
], 8, _hoisted_26)) : createCommentVNode("", true),
|
|
427
440
|
renderSlot(_ctx.$slots, "actions", {}, void 0, true)
|
|
428
441
|
])
|
|
429
442
|
]),
|
|
430
|
-
createElementVNode("main",
|
|
443
|
+
createElementVNode("main", _hoisted_29, [
|
|
431
444
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
432
445
|
]),
|
|
433
|
-
createElementVNode("footer",
|
|
434
|
-
createElementVNode("div",
|
|
446
|
+
createElementVNode("footer", _hoisted_30, [
|
|
447
|
+
createElementVNode("div", _hoisted_31, [
|
|
435
448
|
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
436
449
|
_cache[8] || (_cache[8] = createElementVNode("p", { class: "site-footer-copy" }, "© Loafacto. All rights reserved.", -1))
|
|
437
450
|
], true)
|
|
@@ -441,7 +454,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
441
454
|
};
|
|
442
455
|
}
|
|
443
456
|
});
|
|
444
|
-
const AppShell = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-
|
|
457
|
+
const AppShell = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-e58d11d0"]]);
|
|
445
458
|
function generateId() {
|
|
446
459
|
return `toast-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
447
460
|
}
|