@skdx/vue-blocks 0.1.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/LICENSE +21 -0
- package/README.md +9 -0
- package/dist/dashboard-layout/DashboardLayout.vue.cjs +1 -0
- package/dist/dashboard-layout/DashboardLayout.vue.d.cts +72 -0
- package/dist/dashboard-layout/DashboardLayout.vue.d.ts +72 -0
- package/dist/dashboard-layout/DashboardLayout.vue.js +1 -0
- package/dist/dashboard-layout/DashboardLayout.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/dashboard-layout/DashboardLayout.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/dashboard-layout/DashboardNavList.vue.cjs +1 -0
- package/dist/dashboard-layout/DashboardNavList.vue.d.cts +6 -0
- package/dist/dashboard-layout/DashboardNavList.vue.d.ts +6 -0
- package/dist/dashboard-layout/DashboardNavList.vue.js +1 -0
- package/dist/dashboard-layout/DashboardNavList.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/dashboard-layout/DashboardNavList.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/dashboard-layout/index.cjs +1 -0
- package/dist/dashboard-layout/index.d.cts +2 -0
- package/dist/dashboard-layout/index.d.ts +2 -0
- package/dist/dashboard-layout/index.js +1 -0
- package/dist/dashboard-layout/types.d.cts +28 -0
- package/dist/dashboard-layout/types.d.ts +28 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/dist/internal/part.cjs +1 -0
- package/dist/internal/part.d.cts +19 -0
- package/dist/internal/part.d.ts +19 -0
- package/dist/internal/part.js +1 -0
- package/dist/page-container/PageContainer.vue.cjs +1 -0
- package/dist/page-container/PageContainer.vue.d.cts +57 -0
- package/dist/page-container/PageContainer.vue.d.ts +57 -0
- package/dist/page-container/PageContainer.vue.js +1 -0
- package/dist/page-container/PageContainer.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/page-container/PageContainer.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/page-container/index.cjs +1 -0
- package/dist/page-container/index.d.cts +1 -0
- package/dist/page-container/index.d.ts +1 -0
- package/dist/page-container/index.js +1 -0
- package/dist/sign-in-page/SignInPage.vue.cjs +1 -0
- package/dist/sign-in-page/SignInPage.vue.d.cts +66 -0
- package/dist/sign-in-page/SignInPage.vue.d.ts +66 -0
- package/dist/sign-in-page/SignInPage.vue.js +1 -0
- package/dist/sign-in-page/SignInPage.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/sign-in-page/SignInPage.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/sign-in-page/index.cjs +1 -0
- package/dist/sign-in-page/index.d.cts +3 -0
- package/dist/sign-in-page/index.d.ts +3 -0
- package/dist/sign-in-page/index.js +1 -0
- package/dist/sign-in-page/types.cjs +1 -0
- package/dist/sign-in-page/types.d.cts +24 -0
- package/dist/sign-in-page/types.d.ts +24 -0
- package/dist/sign-in-page/types.js +1 -0
- package/package.json +100 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SkandaDX
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# @skdx/vue-blocks
|
|
2
|
+
|
|
3
|
+
Page-level Vue compositions of [`@skdx/vue`](../vue/README.md) — a page container, a dashboard shell and a sign-in page — styled by `@skdx/skins`.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pnpm add @skdx/vue-blocks @skdx/vue
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Live demos, props tables and styling hooks: <https://ui.skandadx.dev/components/>.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./DashboardLayout.vue_vue_type_script_setup_true_lang.cjs");var a=e.default;exports.default=a;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { DashboardNavigationItem } from './types.cjs';
|
|
2
|
+
/**
|
|
3
|
+
* An application shell: an app bar with a navigation toggle, a collapsible side `<nav>` derived from `navigation`, and a `<main>` content region.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```vue
|
|
7
|
+
* <SkdxDashboardLayout
|
|
8
|
+
* title="Console"
|
|
9
|
+
* :navigation="[{ label: 'Home', href: '/', current: true }]"
|
|
10
|
+
* v-model:nav-open="open"
|
|
11
|
+
* >
|
|
12
|
+
* <p>Everything is fine.</p>
|
|
13
|
+
* </SkdxDashboardLayout>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
type __VLS_Props = {
|
|
17
|
+
/**
|
|
18
|
+
* Application title shown in the app bar after the branding.
|
|
19
|
+
* @default undefined — no title renders.
|
|
20
|
+
*/
|
|
21
|
+
title?: string | undefined;
|
|
22
|
+
/** The side navigation, one entry per item, in render order. */
|
|
23
|
+
navigation: readonly DashboardNavigationItem[];
|
|
24
|
+
/**
|
|
25
|
+
* Whether the side navigation is shown, for controlled usage. Pair with `v-model:nav-open` or `@nav-open-change`.
|
|
26
|
+
* @default undefined — uncontrolled, seeded from `defaultNavOpen`.
|
|
27
|
+
*/
|
|
28
|
+
navOpen?: boolean | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the side navigation starts shown, for uncontrolled usage.
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
defaultNavOpen?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Accessible name of the side `<nav>`, telling several navigation landmarks apart.
|
|
36
|
+
* @default 'Main navigation'
|
|
37
|
+
*/
|
|
38
|
+
navLabel?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Accessible name of the icon-only button that shows and hides the navigation.
|
|
41
|
+
* @default 'Toggle navigation'
|
|
42
|
+
*/
|
|
43
|
+
navToggleLabel?: string;
|
|
44
|
+
};
|
|
45
|
+
type __VLS_Slots = {
|
|
46
|
+
/** The page content rendered inside the `<main>` region. */
|
|
47
|
+
default?(): unknown;
|
|
48
|
+
/** Logo or product mark placed at the start of the app bar. */
|
|
49
|
+
branding?(): unknown;
|
|
50
|
+
/** Controls placed at the end of the app bar. */
|
|
51
|
+
actions?(): unknown;
|
|
52
|
+
};
|
|
53
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
54
|
+
"update:navOpen": (navOpen: boolean) => any;
|
|
55
|
+
"nav-open-change": (navOpen: boolean) => any;
|
|
56
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
57
|
+
"onUpdate:navOpen"?: (navOpen: boolean) => any;
|
|
58
|
+
"onNav-open-change"?: (navOpen: boolean) => any;
|
|
59
|
+
}>, {
|
|
60
|
+
title: string | undefined;
|
|
61
|
+
navOpen: boolean | undefined;
|
|
62
|
+
defaultNavOpen: boolean;
|
|
63
|
+
navLabel: string;
|
|
64
|
+
navToggleLabel: string;
|
|
65
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
66
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
67
|
+
export default _default;
|
|
68
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
69
|
+
new (): {
|
|
70
|
+
$slots: S;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { DashboardNavigationItem } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* An application shell: an app bar with a navigation toggle, a collapsible side `<nav>` derived from `navigation`, and a `<main>` content region.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```vue
|
|
7
|
+
* <SkdxDashboardLayout
|
|
8
|
+
* title="Console"
|
|
9
|
+
* :navigation="[{ label: 'Home', href: '/', current: true }]"
|
|
10
|
+
* v-model:nav-open="open"
|
|
11
|
+
* >
|
|
12
|
+
* <p>Everything is fine.</p>
|
|
13
|
+
* </SkdxDashboardLayout>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
type __VLS_Props = {
|
|
17
|
+
/**
|
|
18
|
+
* Application title shown in the app bar after the branding.
|
|
19
|
+
* @default undefined — no title renders.
|
|
20
|
+
*/
|
|
21
|
+
title?: string | undefined;
|
|
22
|
+
/** The side navigation, one entry per item, in render order. */
|
|
23
|
+
navigation: readonly DashboardNavigationItem[];
|
|
24
|
+
/**
|
|
25
|
+
* Whether the side navigation is shown, for controlled usage. Pair with `v-model:nav-open` or `@nav-open-change`.
|
|
26
|
+
* @default undefined — uncontrolled, seeded from `defaultNavOpen`.
|
|
27
|
+
*/
|
|
28
|
+
navOpen?: boolean | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the side navigation starts shown, for uncontrolled usage.
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
defaultNavOpen?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Accessible name of the side `<nav>`, telling several navigation landmarks apart.
|
|
36
|
+
* @default 'Main navigation'
|
|
37
|
+
*/
|
|
38
|
+
navLabel?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Accessible name of the icon-only button that shows and hides the navigation.
|
|
41
|
+
* @default 'Toggle navigation'
|
|
42
|
+
*/
|
|
43
|
+
navToggleLabel?: string;
|
|
44
|
+
};
|
|
45
|
+
type __VLS_Slots = {
|
|
46
|
+
/** The page content rendered inside the `<main>` region. */
|
|
47
|
+
default?(): unknown;
|
|
48
|
+
/** Logo or product mark placed at the start of the app bar. */
|
|
49
|
+
branding?(): unknown;
|
|
50
|
+
/** Controls placed at the end of the app bar. */
|
|
51
|
+
actions?(): unknown;
|
|
52
|
+
};
|
|
53
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
54
|
+
"update:navOpen": (navOpen: boolean) => any;
|
|
55
|
+
"nav-open-change": (navOpen: boolean) => any;
|
|
56
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
57
|
+
"onUpdate:navOpen"?: (navOpen: boolean) => any;
|
|
58
|
+
"onNav-open-change"?: (navOpen: boolean) => any;
|
|
59
|
+
}>, {
|
|
60
|
+
title: string | undefined;
|
|
61
|
+
navOpen: boolean | undefined;
|
|
62
|
+
defaultNavOpen: boolean;
|
|
63
|
+
navLabel: string;
|
|
64
|
+
navToggleLabel: string;
|
|
65
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
66
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
67
|
+
export default _default;
|
|
68
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
69
|
+
new (): {
|
|
70
|
+
$slots: S;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./DashboardLayout.vue_vue_type_script_setup_true_lang.js";var a=t;export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a=require("../internal/part.cjs"),p=require("./DashboardNavList.vue.cjs");let e=require("vue"),c=require("@skdx/vue");var g=["data-nav-open"],m=["id","aria-label","hidden"],f=(0,e.defineComponent)({__name:"DashboardLayout",props:{title:{default:void 0},navigation:{},navOpen:{type:Boolean,default:void 0},defaultNavOpen:{type:Boolean,default:!0},navLabel:{default:"Main navigation"},navToggleLabel:{default:"Toggle navigation"}},emits:["update:navOpen","nav-open-change"],setup(r,{emit:s}){const o=r,d=s,l=(0,e.useId)(),i=(0,e.ref)(o.defaultNavOpen),n=(0,e.computed)(()=>o.navOpen??i.value);function v(){const t=!n.value;o.navOpen===void 0&&(i.value=t),d("update:navOpen",t),d("nav-open-change",t)}return(t,u)=>((0,e.openBlock)(),(0,e.createElementBlock)("div",(0,e.mergeProps)((0,e.unref)(a.skdxPart)("dashboard-layout","root"),{"data-nav-open":n.value?"":void 0}),[(0,e.createElementVNode)("header",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(a.skdxPart)("dashboard-layout","app-bar"))),[(0,e.createVNode)((0,e.unref)(c.SkdxButton),(0,e.mergeProps)((0,e.unref)(a.skdxPart)("dashboard-layout","nav-toggle"),{"icon-only":"","aria-expanded":n.value,"aria-controls":(0,e.unref)(l),"aria-label":r.navToggleLabel,onClick:v}),{default:(0,e.withCtx)(()=>[...u[0]||(u[0]=[(0,e.createTextVNode)("☰",-1)])]),_:1},16,["aria-expanded","aria-controls","aria-label"]),(0,e.createElementVNode)("div",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(a.skdxPart)("dashboard-layout","branding"))),[(0,e.renderSlot)(t.$slots,"branding")],16),r.title?((0,e.openBlock)(),(0,e.createElementBlock)("span",(0,e.normalizeProps)((0,e.mergeProps)({key:0},(0,e.unref)(a.skdxPart)("dashboard-layout","title"))),(0,e.toDisplayString)(r.title),17)):(0,e.createCommentVNode)("",!0),(0,e.createElementVNode)("div",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(a.skdxPart)("dashboard-layout","actions"))),[(0,e.renderSlot)(t.$slots,"actions")],16)],16),(0,e.createElementVNode)("div",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(a.skdxPart)("dashboard-layout","body"))),[(0,e.createElementVNode)("nav",(0,e.mergeProps)({id:(0,e.unref)(l)},(0,e.unref)(a.skdxPart)("dashboard-layout","nav"),{"aria-label":r.navLabel,hidden:!n.value}),[(0,e.createVNode)(p.default,{items:r.navigation},null,8,["items"])],16,m),(0,e.createElementVNode)("main",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(a.skdxPart)("dashboard-layout","content"))),[(0,e.renderSlot)(t.$slots,"default")],16)],16)],16,g))}});exports.default=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{skdxPart as a}from"../internal/part.js";import e from"./DashboardNavList.vue.js";import{computed as o,createCommentVNode as t,createElementBlock as n,createElementVNode as d,createTextVNode as l,createVNode as s,defineComponent as r,guardReactiveProps as i,mergeProps as v,normalizeProps as u,openBlock as p,ref as b,renderSlot as m,toDisplayString as c,unref as g,useId as f,withCtx as h}from"vue";import{SkdxButton as y}from"@skdx/vue";var x=["data-nav-open"],k=["id","aria-label","hidden"],N=/* @__PURE__ */r({__name:"DashboardLayout",props:{title:{default:void 0},navigation:{},navOpen:{type:Boolean,default:void 0},defaultNavOpen:{type:Boolean,default:!0},navLabel:{default:"Main navigation"},navToggleLabel:{default:"Toggle navigation"}},emits:["update:navOpen","nav-open-change"],setup(r,{emit:N}){const O=r,L=N,B=f(),C=b(O.defaultNavOpen),P=o(()=>O.navOpen??C.value);function T(){const a=!P.value;void 0===O.navOpen&&(C.value=a),L("update:navOpen",a),L("nav-open-change",a)}return(o,b)=>(p(),n("div",v(g(a)("dashboard-layout","root"),{"data-nav-open":P.value?"":void 0}),[d("header",u(i(g(a)("dashboard-layout","app-bar"))),[s(g(y),v(g(a)("dashboard-layout","nav-toggle"),{"icon-only":"","aria-expanded":P.value,"aria-controls":g(B),"aria-label":r.navToggleLabel,onClick:T}),{default:h(()=>[...b[0]||(b[0]=[l("☰",-1)])]),_:1},16,["aria-expanded","aria-controls","aria-label"]),d("div",u(i(g(a)("dashboard-layout","branding"))),[m(o.$slots,"branding")],16),r.title?(p(),n("span",u(v({key:0},g(a)("dashboard-layout","title"))),c(r.title),17)):t("",!0),d("div",u(i(g(a)("dashboard-layout","actions"))),[m(o.$slots,"actions")],16)],16),d("div",u(i(g(a)("dashboard-layout","body"))),[d("nav",v({id:g(B)},g(a)("dashboard-layout","nav"),{"aria-label":r.navLabel,hidden:!P.value}),[s(e,{items:r.navigation},null,8,["items"])],16,k),d("main",u(i(g(a)("dashboard-layout","content"))),[m(o.$slots,"default")],16)],16)],16,x))}});export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./DashboardNavList.vue_vue_type_script_setup_true_lang.cjs");var a=e.default;exports.default=a;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DashboardNavigationItem } from './types.cjs';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
items: readonly DashboardNavigationItem[];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DashboardNavigationItem } from './types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
items: readonly DashboardNavigationItem[];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./DashboardNavList.vue_vue_type_script_setup_true_lang.js";var a=t;export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a=require("../internal/part.cjs");let e=require("vue");var n={key:2},s={key:3},d=["href","aria-current"],u=(0,e.defineComponent)({__name:"DashboardNavList",props:{items:{}},setup(t){return(c,i)=>{const o=(0,e.resolveComponent)("DashboardNavList",!0);return(0,e.openBlock)(),(0,e.createElementBlock)("ul",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(a.skdxPart)("dashboard-layout","nav-list"))),[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.items,(r,l)=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:l},[r.kind==="divider"?((0,e.openBlock)(),(0,e.createElementBlock)("li",(0,e.mergeProps)({key:0,role:"separator"},{ref_for:!0},(0,e.unref)(a.skdxPart)("dashboard-layout","nav-divider")),null,16)):r.kind==="header"?((0,e.openBlock)(),(0,e.createElementBlock)("li",(0,e.mergeProps)({key:1,ref_for:!0},(0,e.unref)(a.skdxPart)("dashboard-layout","nav-header")),(0,e.toDisplayString)(r.label),17)):r.children?.length&&r.href===void 0?((0,e.openBlock)(),(0,e.createElementBlock)("li",n,[(0,e.createElementVNode)("span",(0,e.mergeProps)({ref_for:!0},(0,e.unref)(a.skdxPart)("dashboard-layout","nav-item")),(0,e.toDisplayString)(r.label),17),(0,e.createVNode)(o,{items:r.children},null,8,["items"])])):((0,e.openBlock)(),(0,e.createElementBlock)("li",s,[(0,e.createElementVNode)("a",(0,e.mergeProps)({ref_for:!0},(0,e.unref)(a.skdxPart)("dashboard-layout","nav-item"),{href:r.href,"aria-current":r.current?"page":void 0}),(0,e.toDisplayString)(r.label),17,d)]))],64))),128))],16)}}});exports.default=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{skdxPart as e}from"../internal/part.js";import{Fragment as a,createElementBlock as r,createElementVNode as o,createVNode as s,defineComponent as t,guardReactiveProps as l,mergeProps as n,normalizeProps as i,openBlock as d,renderList as m,resolveComponent as u,toDisplayString as f,unref as p}from"vue";var h={key:2},v={key:3},c=["href","aria-current"],y=/* @__PURE__ */t({__name:"DashboardNavList",props:{items:{}},setup:t=>(y,b)=>{const k=u("DashboardNavList",!0);return d(),r("ul",i(l(p(e)("dashboard-layout","nav-list"))),[(d(!0),r(a,null,m(t.items,(t,l)=>(d(),r(a,{key:l},["divider"===t.kind?(d(),r("li",n({key:0,role:"separator"},{ref_for:!0},p(e)("dashboard-layout","nav-divider")),null,16)):"header"===t.kind?(d(),r("li",n({key:1,ref_for:!0},p(e)("dashboard-layout","nav-header")),f(t.label),17)):t.children?.length&&void 0===t.href?(d(),r("li",h,[o("span",n({ref_for:!0},p(e)("dashboard-layout","nav-item")),f(t.label),17),s(k,{items:t.children},null,8,["items"])])):(d(),r("li",v,[o("a",n({ref_for:!0},p(e)("dashboard-layout","nav-item"),{href:t.href,"aria-current":t.current?"page":void 0}),f(t.label),17,c)]))],64))),128))],16)}});export{y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./DashboardLayout.vue.cjs");exports.SkdxDashboardLayout=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import a from"./DashboardLayout.vue.js";export{a as SkdxDashboardLayout};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** One entry of a `SkdxDashboardLayout`'s `navigation`, from which the side `<nav>` is derived. */
|
|
2
|
+
export interface DashboardNavigationItem {
|
|
3
|
+
/**
|
|
4
|
+
* What this entry is: a link or group label, a group heading, or a separator.
|
|
5
|
+
* @default 'item'
|
|
6
|
+
*/
|
|
7
|
+
kind?: 'item' | 'header' | 'divider' | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* The entry's visible text, unused by a divider.
|
|
10
|
+
* @default undefined — renders an empty entry.
|
|
11
|
+
*/
|
|
12
|
+
label?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Where the entry navigates to; an entry with no `href` and `children` renders a group label instead of a link.
|
|
15
|
+
* @default undefined — renders a link with no destination.
|
|
16
|
+
*/
|
|
17
|
+
href?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Marks this entry as the current page, emitting `aria-current="page"`.
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
current?: boolean | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Nested entries rendered as a list inside this one's `<li>`.
|
|
25
|
+
* @default undefined — the entry has no nested list.
|
|
26
|
+
*/
|
|
27
|
+
children?: readonly DashboardNavigationItem[] | undefined;
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** One entry of a `SkdxDashboardLayout`'s `navigation`, from which the side `<nav>` is derived. */
|
|
2
|
+
export interface DashboardNavigationItem {
|
|
3
|
+
/**
|
|
4
|
+
* What this entry is: a link or group label, a group heading, or a separator.
|
|
5
|
+
* @default 'item'
|
|
6
|
+
*/
|
|
7
|
+
kind?: 'item' | 'header' | 'divider' | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* The entry's visible text, unused by a divider.
|
|
10
|
+
* @default undefined — renders an empty entry.
|
|
11
|
+
*/
|
|
12
|
+
label?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Where the entry navigates to; an entry with no `href` and `children` renders a group label instead of a link.
|
|
15
|
+
* @default undefined — renders a link with no destination.
|
|
16
|
+
*/
|
|
17
|
+
href?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Marks this entry as the current page, emitting `aria-current="page"`.
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
current?: boolean | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Nested entries rendered as a list inside this one's `<li>`.
|
|
25
|
+
* @default undefined — the entry has no nested list.
|
|
26
|
+
*/
|
|
27
|
+
children?: readonly DashboardNavigationItem[] | undefined;
|
|
28
|
+
}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./page-container/PageContainer.vue.cjs"),r=require("./dashboard-layout/DashboardLayout.vue.cjs"),a=require("./sign-in-page/types.cjs"),t=require("./sign-in-page/SignInPage.vue.cjs");exports.SkdxDashboardLayout=r.default;exports.SkdxPageContainer=e.default;exports.SkdxSignInPage=t.default;exports.defaultProviderLabel=a.defaultProviderLabel;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { SkdxPageContainer } from './page-container/index.cjs';
|
|
2
|
+
export { SkdxDashboardLayout, type DashboardNavigationItem } from './dashboard-layout/index.cjs';
|
|
3
|
+
export { SkdxSignInPage, defaultProviderLabel } from './sign-in-page/index.cjs';
|
|
4
|
+
export type { SignInDetail, SignInProvider } from './sign-in-page/index.cjs';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { SkdxPageContainer } from './page-container/index.js';
|
|
2
|
+
export { SkdxDashboardLayout, type DashboardNavigationItem } from './dashboard-layout/index.js';
|
|
3
|
+
export { SkdxSignInPage, defaultProviderLabel } from './sign-in-page/index.js';
|
|
4
|
+
export type { SignInDetail, SignInProvider } from './sign-in-page/index.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import a from"./page-container/PageContainer.vue.js";import e from"./dashboard-layout/DashboardLayout.vue.js";import{defaultProviderLabel as o}from"./sign-in-page/types.js";import r from"./sign-in-page/SignInPage.vue.js";export{e as SkdxDashboardLayout,a as SkdxPageContainer,r as SkdxSignInPage,o as defaultProviderLabel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function k(s,t){const a=t==="root",d={class:a?`skdx-${s}`:`skdx-${s}__${t}`,"data-part":t};return a&&(d["data-skdx-component"]=s),d}exports.skdxPart=k;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The attribute bag {@link skdxPart} returns, bound onto a part's element with `v-bind`.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface SkdxPartAttributes {
|
|
7
|
+
class: string;
|
|
8
|
+
'data-part': string;
|
|
9
|
+
'data-skdx-component'?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Builds the class and `data-*` styling hooks for one part of one block; bind it with `v-bind` so a consumer's own class still merges.
|
|
13
|
+
*
|
|
14
|
+
* @param component - Block name in kebab-case, e.g. `'page-container'`. Becomes the `skdx-` class stem and, on the root, `data-skdx-component`.
|
|
15
|
+
* @param part - Part name from the block's `styling.cssParts`, or `'root'`.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function skdxPart(component: string, part: string): SkdxPartAttributes;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The attribute bag {@link skdxPart} returns, bound onto a part's element with `v-bind`.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface SkdxPartAttributes {
|
|
7
|
+
class: string;
|
|
8
|
+
'data-part': string;
|
|
9
|
+
'data-skdx-component'?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Builds the class and `data-*` styling hooks for one part of one block; bind it with `v-bind` so a consumer's own class still merges.
|
|
13
|
+
*
|
|
14
|
+
* @param component - Block name in kebab-case, e.g. `'page-container'`. Becomes the `skdx-` class stem and, on the root, `data-skdx-component`.
|
|
15
|
+
* @param part - Part name from the block's `styling.cssParts`, or `'root'`.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function skdxPart(component: string, part: string): SkdxPartAttributes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t,a){const s="root"===a,o={class:s?`skdx-${t}`:`skdx-${t}__${a}`,"data-part":a};return s&&(o["data-skdx-component"]=t),o}export{t as skdxPart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./PageContainer.vue_vue_type_script_setup_true_lang.cjs");var t=e.default;exports.default=t;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type BreadcrumbItem } from '@skdx/vue';
|
|
2
|
+
/**
|
|
3
|
+
* Composes Breadcrumb, Heading and Toolbar into a `<section>` named by its own heading, above the page content.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```vue
|
|
7
|
+
* <SkdxPageContainer
|
|
8
|
+
* title="Billing"
|
|
9
|
+
* :breadcrumbs="[{ label: 'Home', href: '/' }, { label: 'Billing', current: true }]"
|
|
10
|
+
* >
|
|
11
|
+
* <p>Invoices and payment methods.</p>
|
|
12
|
+
* </SkdxPageContainer>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
type __VLS_Props = {
|
|
16
|
+
/** The page heading text, which also names the section through `aria-labelledby`. */
|
|
17
|
+
title: string;
|
|
18
|
+
/**
|
|
19
|
+
* Outline level of the derived heading, lowered when the block sits inside a larger page.
|
|
20
|
+
* @default 1
|
|
21
|
+
*/
|
|
22
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
23
|
+
/**
|
|
24
|
+
* Trail rendered into a derived Breadcrumb above the heading.
|
|
25
|
+
* @default undefined — no breadcrumb region renders.
|
|
26
|
+
*/
|
|
27
|
+
breadcrumbs?: readonly BreadcrumbItem[] | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Accessible name of the derived breadcrumb `<nav>`.
|
|
30
|
+
* @default 'Breadcrumb'
|
|
31
|
+
*/
|
|
32
|
+
breadcrumbLabel?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Accessible name of the derived actions Toolbar.
|
|
35
|
+
* @default 'Page actions'
|
|
36
|
+
*/
|
|
37
|
+
actionsLabel?: string;
|
|
38
|
+
};
|
|
39
|
+
type __VLS_Slots = {
|
|
40
|
+
/** The page content rendered below the header. */
|
|
41
|
+
default?(): unknown;
|
|
42
|
+
/** Controls placed inside the derived Toolbar beside the heading; no toolbar renders without it. */
|
|
43
|
+
actions?(): unknown;
|
|
44
|
+
};
|
|
45
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
46
|
+
headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
|
|
47
|
+
breadcrumbs: readonly BreadcrumbItem[] | undefined;
|
|
48
|
+
breadcrumbLabel: string;
|
|
49
|
+
actionsLabel: string;
|
|
50
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type BreadcrumbItem } from '@skdx/vue';
|
|
2
|
+
/**
|
|
3
|
+
* Composes Breadcrumb, Heading and Toolbar into a `<section>` named by its own heading, above the page content.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```vue
|
|
7
|
+
* <SkdxPageContainer
|
|
8
|
+
* title="Billing"
|
|
9
|
+
* :breadcrumbs="[{ label: 'Home', href: '/' }, { label: 'Billing', current: true }]"
|
|
10
|
+
* >
|
|
11
|
+
* <p>Invoices and payment methods.</p>
|
|
12
|
+
* </SkdxPageContainer>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
type __VLS_Props = {
|
|
16
|
+
/** The page heading text, which also names the section through `aria-labelledby`. */
|
|
17
|
+
title: string;
|
|
18
|
+
/**
|
|
19
|
+
* Outline level of the derived heading, lowered when the block sits inside a larger page.
|
|
20
|
+
* @default 1
|
|
21
|
+
*/
|
|
22
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
23
|
+
/**
|
|
24
|
+
* Trail rendered into a derived Breadcrumb above the heading.
|
|
25
|
+
* @default undefined — no breadcrumb region renders.
|
|
26
|
+
*/
|
|
27
|
+
breadcrumbs?: readonly BreadcrumbItem[] | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Accessible name of the derived breadcrumb `<nav>`.
|
|
30
|
+
* @default 'Breadcrumb'
|
|
31
|
+
*/
|
|
32
|
+
breadcrumbLabel?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Accessible name of the derived actions Toolbar.
|
|
35
|
+
* @default 'Page actions'
|
|
36
|
+
*/
|
|
37
|
+
actionsLabel?: string;
|
|
38
|
+
};
|
|
39
|
+
type __VLS_Slots = {
|
|
40
|
+
/** The page content rendered below the header. */
|
|
41
|
+
default?(): unknown;
|
|
42
|
+
/** Controls placed inside the derived Toolbar beside the heading; no toolbar renders without it. */
|
|
43
|
+
actions?(): unknown;
|
|
44
|
+
};
|
|
45
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
46
|
+
headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
|
|
47
|
+
breadcrumbs: readonly BreadcrumbItem[] | undefined;
|
|
48
|
+
breadcrumbLabel: string;
|
|
49
|
+
actionsLabel: string;
|
|
50
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./PageContainer.vue_vue_type_script_setup_true_lang.js";var t=e;export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a=require("../internal/part.cjs");let e=require("vue"),n=require("@skdx/vue");var i=["aria-labelledby"],u=(0,e.defineComponent)({__name:"PageContainer",props:{title:{},headingLevel:{default:1},breadcrumbs:{default:void 0},breadcrumbLabel:{default:"Breadcrumb"},actionsLabel:{default:"Page actions"}},setup(r){const o=r,l=(0,e.useId)(),d=(0,e.computed)(()=>`h${o.headingLevel}`);return(t,c)=>((0,e.openBlock)(),(0,e.createElementBlock)("section",(0,e.mergeProps)((0,e.unref)(a.skdxPart)("page-container","root"),{"aria-labelledby":(0,e.unref)(l)}),[(0,e.createElementVNode)("header",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(a.skdxPart)("page-container","header"))),[r.breadcrumbs?.length?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(n.SkdxBreadcrumb),(0,e.mergeProps)({key:0},(0,e.unref)(a.skdxPart)("page-container","breadcrumbs"),{label:o.breadcrumbLabel,items:r.breadcrumbs}),null,16,["label","items"])):(0,e.createCommentVNode)("",!0),(0,e.createElementVNode)("div",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(a.skdxPart)("page-container","heading-row"))),[(0,e.createVNode)((0,e.unref)(n.SkdxHeading),(0,e.mergeProps)({id:(0,e.unref)(l)},(0,e.unref)(a.skdxPart)("page-container","title"),{as:d.value}),{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(r.title),1)]),_:1},16,["id","as"]),t.$slots.actions?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(n.SkdxToolbar),(0,e.mergeProps)({key:0},(0,e.unref)(a.skdxPart)("page-container","actions"),{"aria-label":r.actionsLabel}),{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(t.$slots,"actions")]),_:3},16,["aria-label"])):(0,e.createCommentVNode)("",!0)],16)],16),(0,e.createElementVNode)("div",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(a.skdxPart)("page-container","content"))),[(0,e.renderSlot)(t.$slots,"default")],16)],16,i))}});exports.default=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{skdxPart as e}from"../internal/part.js";import{computed as a,createBlock as t,createCommentVNode as r,createElementBlock as s,createElementVNode as o,createTextVNode as l,createVNode as n,defineComponent as d,guardReactiveProps as i,mergeProps as c,normalizeProps as b,openBlock as u,renderSlot as m,toDisplayString as p,unref as g,useId as f,withCtx as k}from"vue";import{SkdxBreadcrumb as v,SkdxHeading as h,SkdxToolbar as x}from"@skdx/vue";var L=["aria-labelledby"],P=/* @__PURE__ */d({__name:"PageContainer",props:{title:{},headingLevel:{default:1},breadcrumbs:{default:void 0},breadcrumbLabel:{default:"Breadcrumb"},actionsLabel:{default:"Page actions"}},setup(d){const P=d,y=f(),B=a(()=>`h${P.headingLevel}`);return(a,f)=>(u(),s("section",c(g(e)("page-container","root"),{"aria-labelledby":g(y)}),[o("header",b(i(g(e)("page-container","header"))),[d.breadcrumbs?.length?(u(),t(g(v),c({key:0},g(e)("page-container","breadcrumbs"),{label:P.breadcrumbLabel,items:d.breadcrumbs}),null,16,["label","items"])):r("",!0),o("div",b(i(g(e)("page-container","heading-row"))),[n(g(h),c({id:g(y)},g(e)("page-container","title"),{as:B.value}),{default:k(()=>[l(p(d.title),1)]),_:1},16,["id","as"]),a.$slots.actions?(u(),t(g(x),c({key:0},g(e)("page-container","actions"),{"aria-label":d.actionsLabel}),{default:k(()=>[m(a.$slots,"actions")]),_:3},16,["aria-label"])):r("",!0)],16)],16),o("div",b(i(g(e)("page-container","content"))),[m(a.$slots,"default")],16)],16,L))}});export{P as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PageContainer.vue.cjs");exports.SkdxPageContainer=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SkdxPageContainer } from './PageContainer.vue.cjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SkdxPageContainer } from './PageContainer.vue.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./PageContainer.vue.js";export{e as SkdxPageContainer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./SignInPage.vue_vue_type_script_setup_true_lang.cjs");var u=e.default;exports.default=u;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type SignInDetail, type SignInProvider } from './types.cjs';
|
|
2
|
+
/**
|
|
3
|
+
* A sign-in panel: provider buttons, an email and password form, and a magic-link form, reporting the user's choice as one `sign-in` event.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```vue
|
|
7
|
+
* <SkdxSignInPage
|
|
8
|
+
* :providers="[{ id: 'google', name: 'Google' }, { id: 'credentials', name: 'Email' }]"
|
|
9
|
+
* :error="error"
|
|
10
|
+
* @sign-in="signIn"
|
|
11
|
+
* />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
type __VLS_Props = {
|
|
15
|
+
/**
|
|
16
|
+
* Heading text, rendered into a derived `<h1>` that names the section.
|
|
17
|
+
* @default 'Sign in'
|
|
18
|
+
*/
|
|
19
|
+
title?: string;
|
|
20
|
+
/** The ways to sign in, in render order; `'credentials'` and `'magic-link'` render forms, anything else a button. */
|
|
21
|
+
providers: readonly SignInProvider[];
|
|
22
|
+
/**
|
|
23
|
+
* Message rendered into a derived error Alert; the block never clears it, the consumer does.
|
|
24
|
+
* @default undefined — no alert renders.
|
|
25
|
+
*/
|
|
26
|
+
error?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Label of the email field in both forms.
|
|
29
|
+
* @default 'Email'
|
|
30
|
+
*/
|
|
31
|
+
emailLabel?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Label of the password field in the credentials form.
|
|
34
|
+
* @default 'Password'
|
|
35
|
+
*/
|
|
36
|
+
passwordLabel?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Text of the credentials form's submit button.
|
|
39
|
+
* @default 'Sign in'
|
|
40
|
+
*/
|
|
41
|
+
submitLabel?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Text of the magic-link form's submit button.
|
|
44
|
+
* @default 'Send magic link'
|
|
45
|
+
*/
|
|
46
|
+
magicLinkLabel?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Formats a provider button's text from its entry, for wording or translation.
|
|
49
|
+
* @default defaultProviderLabel — reads "Sign in with Google".
|
|
50
|
+
*/
|
|
51
|
+
getProviderLabel?: (provider: SignInProvider) => string;
|
|
52
|
+
};
|
|
53
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
54
|
+
"sign-in": (detail: SignInDetail) => any;
|
|
55
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
56
|
+
"onSign-in"?: (detail: SignInDetail) => any;
|
|
57
|
+
}>, {
|
|
58
|
+
title: string;
|
|
59
|
+
error: string | undefined;
|
|
60
|
+
emailLabel: string;
|
|
61
|
+
passwordLabel: string;
|
|
62
|
+
submitLabel: string;
|
|
63
|
+
magicLinkLabel: string;
|
|
64
|
+
getProviderLabel: (provider: SignInProvider) => string;
|
|
65
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
66
|
+
export default _default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type SignInDetail, type SignInProvider } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* A sign-in panel: provider buttons, an email and password form, and a magic-link form, reporting the user's choice as one `sign-in` event.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```vue
|
|
7
|
+
* <SkdxSignInPage
|
|
8
|
+
* :providers="[{ id: 'google', name: 'Google' }, { id: 'credentials', name: 'Email' }]"
|
|
9
|
+
* :error="error"
|
|
10
|
+
* @sign-in="signIn"
|
|
11
|
+
* />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
type __VLS_Props = {
|
|
15
|
+
/**
|
|
16
|
+
* Heading text, rendered into a derived `<h1>` that names the section.
|
|
17
|
+
* @default 'Sign in'
|
|
18
|
+
*/
|
|
19
|
+
title?: string;
|
|
20
|
+
/** The ways to sign in, in render order; `'credentials'` and `'magic-link'` render forms, anything else a button. */
|
|
21
|
+
providers: readonly SignInProvider[];
|
|
22
|
+
/**
|
|
23
|
+
* Message rendered into a derived error Alert; the block never clears it, the consumer does.
|
|
24
|
+
* @default undefined — no alert renders.
|
|
25
|
+
*/
|
|
26
|
+
error?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Label of the email field in both forms.
|
|
29
|
+
* @default 'Email'
|
|
30
|
+
*/
|
|
31
|
+
emailLabel?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Label of the password field in the credentials form.
|
|
34
|
+
* @default 'Password'
|
|
35
|
+
*/
|
|
36
|
+
passwordLabel?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Text of the credentials form's submit button.
|
|
39
|
+
* @default 'Sign in'
|
|
40
|
+
*/
|
|
41
|
+
submitLabel?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Text of the magic-link form's submit button.
|
|
44
|
+
* @default 'Send magic link'
|
|
45
|
+
*/
|
|
46
|
+
magicLinkLabel?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Formats a provider button's text from its entry, for wording or translation.
|
|
49
|
+
* @default defaultProviderLabel — reads "Sign in with Google".
|
|
50
|
+
*/
|
|
51
|
+
getProviderLabel?: (provider: SignInProvider) => string;
|
|
52
|
+
};
|
|
53
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
54
|
+
"sign-in": (detail: SignInDetail) => any;
|
|
55
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
56
|
+
"onSign-in"?: (detail: SignInDetail) => any;
|
|
57
|
+
}>, {
|
|
58
|
+
title: string;
|
|
59
|
+
error: string | undefined;
|
|
60
|
+
emailLabel: string;
|
|
61
|
+
passwordLabel: string;
|
|
62
|
+
submitLabel: string;
|
|
63
|
+
magicLinkLabel: string;
|
|
64
|
+
getProviderLabel: (provider: SignInProvider) => string;
|
|
65
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
66
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./SignInPage.vue_vue_type_script_setup_true_lang.js";var t=e;export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const r=require("../internal/part.cjs"),P=require("./types.cjs");let e=require("vue"),a=require("@skdx/vue");var v=["aria-labelledby"],b=(0,e.defineComponent)({__name:"SignInPage",props:{title:{default:"Sign in"},providers:{},error:{default:void 0},emailLabel:{default:"Email"},passwordLabel:{default:"Password"},submitLabel:{default:"Sign in"},magicLinkLabel:{default:"Send magic link"},getProviderLabel:{type:Function,default:P.defaultProviderLabel}},emits:["sign-in"],setup(n,{emit:k}){const o=n,s=k,m=(0,e.useId)(),c=(0,e.computed)(()=>o.providers.some(i=>i.id==="credentials")),g=(0,e.computed)(()=>o.providers.some(i=>i.id==="magic-link")),d=(0,e.computed)(()=>o.providers.filter(i=>i.id!=="credentials"&&i.id!=="magic-link")),x=(0,e.computed)(()=>d.value.length>0&&(c.value||g.value));function p(i,l){const t=i.get(l);return typeof t=="string"?t:""}function f(i,l){l.preventDefault();const t=new FormData(l.target),u=p(t,"email");s("sign-in",i==="credentials"?{providerId:i,email:u,password:p(t,"password")}:{providerId:i,email:u})}return(i,l)=>((0,e.openBlock)(),(0,e.createElementBlock)("section",(0,e.mergeProps)((0,e.unref)(r.skdxPart)("sign-in-page","root"),{"aria-labelledby":(0,e.unref)(m)}),[(0,e.createElementVNode)("div",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(r.skdxPart)("sign-in-page","panel"))),[(0,e.createVNode)((0,e.unref)(a.SkdxHeading),(0,e.mergeProps)({id:(0,e.unref)(m)},(0,e.unref)(r.skdxPart)("sign-in-page","title"),{as:"h1"}),{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(n.title),1)]),_:1},16,["id"]),n.error?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(a.SkdxAlert),(0,e.mergeProps)({key:0},(0,e.unref)(r.skdxPart)("sign-in-page","error"),{status:"danger"}),{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(n.error),1)]),_:1},16)):(0,e.createCommentVNode)("",!0),d.value.length?((0,e.openBlock)(),(0,e.createElementBlock)("div",(0,e.normalizeProps)((0,e.mergeProps)({key:1},(0,e.unref)(r.skdxPart)("sign-in-page","providers"))),[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(d.value,t=>((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(a.SkdxButton),(0,e.mergeProps)({key:t.id},{ref_for:!0},(0,e.unref)(r.skdxPart)("sign-in-page","provider"),{type:"button","data-provider":t.id,onClick:u=>s("sign-in",{providerId:t.id})}),{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(o.getProviderLabel(t)),1)]),_:2},1040,["data-provider","onClick"]))),128))],16)):(0,e.createCommentVNode)("",!0),x.value?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(a.SkdxDivider),(0,e.normalizeProps)((0,e.mergeProps)({key:2},(0,e.unref)(r.skdxPart)("sign-in-page","divider"))),null,16)):(0,e.createCommentVNode)("",!0),c.value?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(a.SkdxForm),(0,e.mergeProps)({key:3},(0,e.unref)(r.skdxPart)("sign-in-page","form"),{"data-provider":"credentials",onSubmit:l[0]||(l[0]=t=>f("credentials",t))}),{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(a.SkdxField),(0,e.mergeProps)((0,e.unref)(r.skdxPart)("sign-in-page","field"),{label:n.emailLabel,required:""}),{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(a.SkdxTextField),{type:"email",name:"email",autocomplete:"email"})]),_:1},16,["label"]),(0,e.createVNode)((0,e.unref)(a.SkdxField),(0,e.mergeProps)((0,e.unref)(r.skdxPart)("sign-in-page","field"),{label:n.passwordLabel,required:""}),{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(a.SkdxPasswordInput),{name:"password",autocomplete:"current-password"})]),_:1},16,["label"]),(0,e.createVNode)((0,e.unref)(a.SkdxButton),(0,e.mergeProps)((0,e.unref)(r.skdxPart)("sign-in-page","submit"),{type:"submit"}),{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(n.submitLabel),1)]),_:1},16)]),_:1},16)):(0,e.createCommentVNode)("",!0),g.value?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(a.SkdxForm),(0,e.mergeProps)({key:4},(0,e.unref)(r.skdxPart)("sign-in-page","form"),{"data-provider":"magic-link",onSubmit:l[1]||(l[1]=t=>f("magic-link",t))}),{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(a.SkdxField),(0,e.mergeProps)((0,e.unref)(r.skdxPart)("sign-in-page","field"),{label:n.emailLabel,required:""}),{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(a.SkdxTextField),{type:"email",name:"email",autocomplete:"email"})]),_:1},16,["label"]),(0,e.createVNode)((0,e.unref)(a.SkdxButton),(0,e.mergeProps)((0,e.unref)(r.skdxPart)("sign-in-page","submit"),{type:"submit"}),{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(n.magicLinkLabel),1)]),_:1},16)]),_:1},16)):(0,e.createCommentVNode)("",!0)],16)],16,v))}});exports.default=b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{skdxPart as e}from"../internal/part.js";import{defaultProviderLabel as a}from"./types.js";import{Fragment as i,computed as t,createBlock as r,createCommentVNode as l,createElementBlock as d,createElementVNode as s,createTextVNode as n,createVNode as o,defineComponent as p,guardReactiveProps as u,mergeProps as m,normalizeProps as g,openBlock as f,renderList as c,toDisplayString as v,unref as b,useId as k,withCtx as y}from"vue";import{SkdxAlert as L,SkdxButton as S,SkdxDivider as x,SkdxField as _,SkdxForm as w,SkdxHeading as P,SkdxPasswordInput as F,SkdxTextField as I}from"@skdx/vue";var C=["aria-labelledby"],h=/* @__PURE__ */p({__name:"SignInPage",props:{title:{default:"Sign in"},providers:{},error:{default:void 0},emailLabel:{default:"Email"},passwordLabel:{default:"Password"},submitLabel:{default:"Sign in"},magicLinkLabel:{default:"Send magic link"},getProviderLabel:{type:Function,default:a}},emits:["sign-in"],setup(a,{emit:p}){const h=a,B=p,D=k(),N=t(()=>h.providers.some(e=>"credentials"===e.id)),V=t(()=>h.providers.some(e=>"magic-link"===e.id)),q=t(()=>h.providers.filter(e=>"credentials"!==e.id&&"magic-link"!==e.id)),E=t(()=>q.value.length>0&&(N.value||V.value));function j(e,a){const i=e.get(a);return"string"==typeof i?i:""}function T(e,a){a.preventDefault();const i=new FormData(a.target),t=j(i,"email");B("sign-in","credentials"===e?{providerId:e,email:t,password:j(i,"password")}:{providerId:e,email:t})}return(t,p)=>(f(),d("section",m(b(e)("sign-in-page","root"),{"aria-labelledby":b(D)}),[s("div",g(u(b(e)("sign-in-page","panel"))),[o(b(P),m({id:b(D)},b(e)("sign-in-page","title"),{as:"h1"}),{default:y(()=>[n(v(a.title),1)]),_:1},16,["id"]),a.error?(f(),r(b(L),m({key:0},b(e)("sign-in-page","error"),{status:"danger"}),{default:y(()=>[n(v(a.error),1)]),_:1},16)):l("",!0),q.value.length?(f(),d("div",g(m({key:1},b(e)("sign-in-page","providers"))),[(f(!0),d(i,null,c(q.value,a=>(f(),r(b(S),m({key:a.id},{ref_for:!0},b(e)("sign-in-page","provider"),{type:"button","data-provider":a.id,onClick:e=>B("sign-in",{providerId:a.id})}),{default:y(()=>[n(v(h.getProviderLabel(a)),1)]),_:2},1040,["data-provider","onClick"]))),128))],16)):l("",!0),E.value?(f(),r(b(x),g(m({key:2},b(e)("sign-in-page","divider"))),null,16)):l("",!0),N.value?(f(),r(b(w),m({key:3},b(e)("sign-in-page","form"),{"data-provider":"credentials",onSubmit:p[0]||(p[0]=e=>T("credentials",e))}),{default:y(()=>[o(b(_),m(b(e)("sign-in-page","field"),{label:a.emailLabel,required:""}),{default:y(()=>[o(b(I),{type:"email",name:"email",autocomplete:"email"})]),_:1},16,["label"]),o(b(_),m(b(e)("sign-in-page","field"),{label:a.passwordLabel,required:""}),{default:y(()=>[o(b(F),{name:"password",autocomplete:"current-password"})]),_:1},16,["label"]),o(b(S),m(b(e)("sign-in-page","submit"),{type:"submit"}),{default:y(()=>[n(v(a.submitLabel),1)]),_:1},16)]),_:1},16)):l("",!0),V.value?(f(),r(b(w),m({key:4},b(e)("sign-in-page","form"),{"data-provider":"magic-link",onSubmit:p[1]||(p[1]=e=>T("magic-link",e))}),{default:y(()=>[o(b(_),m(b(e)("sign-in-page","field"),{label:a.emailLabel,required:""}),{default:y(()=>[o(b(I),{type:"email",name:"email",autocomplete:"email"})]),_:1},16,["label"]),o(b(S),m(b(e)("sign-in-page","submit"),{type:"submit"}),{default:y(()=>[n(v(a.magicLinkLabel),1)]),_:1},16)]),_:1},16)):l("",!0)],16)],16,C))}});export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./types.cjs"),r=require("./SignInPage.vue.cjs");exports.SkdxSignInPage=r.default;exports.defaultProviderLabel=e.defaultProviderLabel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defaultProviderLabel as e}from"./types.js";import a from"./SignInPage.vue.js";export{a as SkdxSignInPage,e as defaultProviderLabel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function i(e){return`Sign in with ${e.name}`}exports.defaultProviderLabel=i;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** One way to sign in, listed in a `SkdxSignInPage`'s `providers`. */
|
|
2
|
+
export interface SignInProvider {
|
|
3
|
+
/** The provider's id, `'credentials'` and `'magic-link'` rendering forms and anything else a button. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** The provider's display name, from which its button label is formatted. */
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
/** The payload a `SkdxSignInPage` reports when a provider button or a form is used. */
|
|
9
|
+
export interface SignInDetail {
|
|
10
|
+
/** The id of the provider the user chose. */
|
|
11
|
+
providerId: string;
|
|
12
|
+
/**
|
|
13
|
+
* The submitted email address, present for the credentials and magic-link forms.
|
|
14
|
+
* @default undefined — a provider button carries no email.
|
|
15
|
+
*/
|
|
16
|
+
email?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The submitted password, present only for the credentials form.
|
|
19
|
+
* @default undefined — every other provider carries no password.
|
|
20
|
+
*/
|
|
21
|
+
password?: string | undefined;
|
|
22
|
+
}
|
|
23
|
+
/** Formats a provider button's text as `Sign in with <name>`, the default of `getProviderLabel`. */
|
|
24
|
+
export declare function defaultProviderLabel(provider: SignInProvider): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** One way to sign in, listed in a `SkdxSignInPage`'s `providers`. */
|
|
2
|
+
export interface SignInProvider {
|
|
3
|
+
/** The provider's id, `'credentials'` and `'magic-link'` rendering forms and anything else a button. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** The provider's display name, from which its button label is formatted. */
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
/** The payload a `SkdxSignInPage` reports when a provider button or a form is used. */
|
|
9
|
+
export interface SignInDetail {
|
|
10
|
+
/** The id of the provider the user chose. */
|
|
11
|
+
providerId: string;
|
|
12
|
+
/**
|
|
13
|
+
* The submitted email address, present for the credentials and magic-link forms.
|
|
14
|
+
* @default undefined — a provider button carries no email.
|
|
15
|
+
*/
|
|
16
|
+
email?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The submitted password, present only for the credentials form.
|
|
19
|
+
* @default undefined — every other provider carries no password.
|
|
20
|
+
*/
|
|
21
|
+
password?: string | undefined;
|
|
22
|
+
}
|
|
23
|
+
/** Formats a provider button's text as `Sign in with <name>`, the default of `getProviderLabel`. */
|
|
24
|
+
export declare function defaultProviderLabel(provider: SignInProvider): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return`Sign in with ${e.name}`}export{e as defaultProviderLabel};
|
package/package.json
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@skdx/vue-blocks",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Vue blocks for the SkandaDX design system — page-level compositions of @skdx/vue styled by @skdx/skins",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/SkandaDX/ui.skdx/tree/main/packages/vue-blocks#readme",
|
|
10
|
+
"repository": {
|
|
11
|
+
"directory": "packages/vue-blocks",
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/SkandaDX/ui.skdx.git"
|
|
14
|
+
},
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/SkandaDX/ui.skdx/issues"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18.18.0"
|
|
21
|
+
},
|
|
22
|
+
"main": "./dist/index.cjs",
|
|
23
|
+
"module": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"import": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"require": {
|
|
32
|
+
"types": "./dist/index.d.cts",
|
|
33
|
+
"default": "./dist/index.cjs"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"./dashboard-layout": {
|
|
37
|
+
"import": {
|
|
38
|
+
"types": "./dist/dashboard-layout/index.d.ts",
|
|
39
|
+
"default": "./dist/dashboard-layout/index.js"
|
|
40
|
+
},
|
|
41
|
+
"require": {
|
|
42
|
+
"types": "./dist/dashboard-layout/index.d.cts",
|
|
43
|
+
"default": "./dist/dashboard-layout/index.cjs"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"./page-container": {
|
|
47
|
+
"import": {
|
|
48
|
+
"types": "./dist/page-container/index.d.ts",
|
|
49
|
+
"default": "./dist/page-container/index.js"
|
|
50
|
+
},
|
|
51
|
+
"require": {
|
|
52
|
+
"types": "./dist/page-container/index.d.cts",
|
|
53
|
+
"default": "./dist/page-container/index.cjs"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"./sign-in-page": {
|
|
57
|
+
"import": {
|
|
58
|
+
"types": "./dist/sign-in-page/index.d.ts",
|
|
59
|
+
"default": "./dist/sign-in-page/index.js"
|
|
60
|
+
},
|
|
61
|
+
"require": {
|
|
62
|
+
"types": "./dist/sign-in-page/index.d.cts",
|
|
63
|
+
"default": "./dist/sign-in-page/index.cjs"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"./package.json": "./package.json"
|
|
67
|
+
},
|
|
68
|
+
"files": [
|
|
69
|
+
"dist",
|
|
70
|
+
"!dist/**/*.md",
|
|
71
|
+
"!dist/**/*.map",
|
|
72
|
+
"!dist/**/*.test.*"
|
|
73
|
+
],
|
|
74
|
+
"sideEffects": false,
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"vue": "^3.5.0",
|
|
77
|
+
"@skdx/vue": "^0.33.0"
|
|
78
|
+
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
81
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
82
|
+
"@vue/test-utils": "^2.4.0",
|
|
83
|
+
"axe-core": "^4.12.1",
|
|
84
|
+
"typescript": "^6.0.3",
|
|
85
|
+
"vite": "^8.1.3",
|
|
86
|
+
"vitest": "^4.1.10",
|
|
87
|
+
"vue": "^3.5.39",
|
|
88
|
+
"vue-tsc": "^2.0.0",
|
|
89
|
+
"@skdx/vue": "0.33.0"
|
|
90
|
+
},
|
|
91
|
+
"scripts": {
|
|
92
|
+
"lint": "eslint . --cache --cache-location node_modules/.cache/eslint/",
|
|
93
|
+
"build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && vite build && vue-tsc -p tsconfig.build.json --emitDeclarationOnly && node ../../scripts/declarations-cjs.mjs && node ../../scripts/minify-js.mjs dist",
|
|
94
|
+
"dev": "vite build --watch",
|
|
95
|
+
"typecheck": "vue-tsc --noEmit --incremental --tsBuildInfoFile node_modules/.cache/tsc/typecheck.tsbuildinfo",
|
|
96
|
+
"test": "vitest run",
|
|
97
|
+
"test:watch": "vitest",
|
|
98
|
+
"test:coverage": "vitest run --coverage"
|
|
99
|
+
}
|
|
100
|
+
}
|