@skdx/vue-blocks 0.40.0 → 0.41.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/internal/part-core.cjs +1 -0
- package/dist/internal/part-core.d.cts +21 -0
- package/dist/internal/part-core.d.ts +21 -0
- package/dist/internal/part-core.js +1 -0
- package/dist/internal/part.cjs +1 -1
- package/dist/internal/part.js +1 -1
- package/dist/page-container/PageContainer.vue.d.cts +8 -4
- package/dist/page-container/PageContainer.vue.d.ts +8 -4
- package/dist/page-container/PageContainer.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/page-container/PageContainer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(a,t){return t==="root"?`skdx-${a}`:`skdx-${a}__${t}`}function o(a,t,s){const r={"data-part":t};return t==="root"&&(r["data-skdx-component"]=s??a),r}exports.partClass=n;exports.partData=o;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Join string classes without discarding the consumer's class. */
|
|
2
|
+
export declare function cx(...values: Array<string | false | null | undefined>): string;
|
|
3
|
+
/** Class hook shared by JSX, template frameworks and custom-element hosts. */
|
|
4
|
+
export declare function partClass(component: string, part: string): string;
|
|
5
|
+
/** Framework-neutral data hooks, with an inherited family taking precedence. */
|
|
6
|
+
export declare function partData(component: string, part: string, inheritedComponent?: string): {
|
|
7
|
+
'data-part': string;
|
|
8
|
+
'data-skdx-component'?: string;
|
|
9
|
+
};
|
|
10
|
+
/** React's string class convention, without depending on React. */
|
|
11
|
+
export declare function stringPart(component: string, part: string, className?: string, inheritedComponent?: string): {
|
|
12
|
+
className: string;
|
|
13
|
+
'data-part': string;
|
|
14
|
+
'data-skdx-component'?: string;
|
|
15
|
+
};
|
|
16
|
+
/** Preserve framework class values (objects/arrays) without flattening them. */
|
|
17
|
+
export declare function arrayPart<T>(component: string, part: string, className?: T | null, inheritedComponent?: string): {
|
|
18
|
+
class: (string | T | null | undefined)[];
|
|
19
|
+
'data-part': string;
|
|
20
|
+
'data-skdx-component'?: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Join string classes without discarding the consumer's class. */
|
|
2
|
+
export declare function cx(...values: Array<string | false | null | undefined>): string;
|
|
3
|
+
/** Class hook shared by JSX, template frameworks and custom-element hosts. */
|
|
4
|
+
export declare function partClass(component: string, part: string): string;
|
|
5
|
+
/** Framework-neutral data hooks, with an inherited family taking precedence. */
|
|
6
|
+
export declare function partData(component: string, part: string, inheritedComponent?: string): {
|
|
7
|
+
'data-part': string;
|
|
8
|
+
'data-skdx-component'?: string;
|
|
9
|
+
};
|
|
10
|
+
/** React's string class convention, without depending on React. */
|
|
11
|
+
export declare function stringPart(component: string, part: string, className?: string, inheritedComponent?: string): {
|
|
12
|
+
className: string;
|
|
13
|
+
'data-part': string;
|
|
14
|
+
'data-skdx-component'?: string;
|
|
15
|
+
};
|
|
16
|
+
/** Preserve framework class values (objects/arrays) without flattening them. */
|
|
17
|
+
export declare function arrayPart<T>(component: string, part: string, className?: T | null, inheritedComponent?: string): {
|
|
18
|
+
class: (string | T | null | undefined)[];
|
|
19
|
+
'data-part': string;
|
|
20
|
+
'data-skdx-component'?: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t,a){return"root"===a?`skdx-${t}`:`skdx-${t}__${a}`}function a(t,a,o){const r={"data-part":a};return"root"===a&&(r["data-skdx-component"]=o??t),r}export{t as partClass,a as partData};
|
package/dist/internal/part.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const s=require("./part-core.cjs");function t(r,a){return{class:s.partClass(r,a),...s.partData(r,a)}}exports.skdxPart=t;
|
package/dist/internal/part.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{partClass as a,partData as r}from"./part-core.js";function s(s,t){return{class:a(s,t),...r(s,t)}}export{s as skdxPart};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BreadcrumbItem } from '@skdx/vue';
|
|
2
2
|
/**
|
|
3
|
-
* Composes Breadcrumb, Heading and
|
|
3
|
+
* Composes Breadcrumb, Heading and page actions into a `<section>` named by its own heading.
|
|
4
4
|
*
|
|
5
5
|
* @example
|
|
6
6
|
* ```vue
|
|
@@ -31,17 +31,20 @@ type __VLS_Props = {
|
|
|
31
31
|
*/
|
|
32
32
|
breadcrumbLabel?: string;
|
|
33
33
|
/**
|
|
34
|
-
* Accessible name of the
|
|
34
|
+
* Accessible name of the page actions group or optional toolbar.
|
|
35
35
|
* @default 'Page actions'
|
|
36
36
|
*/
|
|
37
37
|
actionsLabel?: string;
|
|
38
|
+
/** Render a keyboard toolbar for bare toolbar parts. @default false */
|
|
39
|
+
actionsAsToolbar?: boolean;
|
|
38
40
|
};
|
|
39
41
|
type __VLS_Slots = {
|
|
40
42
|
/** The page content rendered below the header. */
|
|
41
43
|
default?(): unknown;
|
|
42
44
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
+
* Page controls beside the heading. Ordinary buttons keep their own Tab stops.
|
|
46
|
+
* Compose an explicit Toolbar for keyboard grouping, or enable actionsAsToolbar
|
|
47
|
+
* when passing bare toolbar parts. No group renders without this slot.
|
|
45
48
|
*/
|
|
46
49
|
actions?(): unknown;
|
|
47
50
|
};
|
|
@@ -50,6 +53,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
50
53
|
breadcrumbs: readonly BreadcrumbItem[] | undefined;
|
|
51
54
|
breadcrumbLabel: string;
|
|
52
55
|
actionsLabel: string;
|
|
56
|
+
actionsAsToolbar: boolean;
|
|
53
57
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
54
58
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
55
59
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BreadcrumbItem } from '@skdx/vue';
|
|
2
2
|
/**
|
|
3
|
-
* Composes Breadcrumb, Heading and
|
|
3
|
+
* Composes Breadcrumb, Heading and page actions into a `<section>` named by its own heading.
|
|
4
4
|
*
|
|
5
5
|
* @example
|
|
6
6
|
* ```vue
|
|
@@ -31,17 +31,20 @@ type __VLS_Props = {
|
|
|
31
31
|
*/
|
|
32
32
|
breadcrumbLabel?: string;
|
|
33
33
|
/**
|
|
34
|
-
* Accessible name of the
|
|
34
|
+
* Accessible name of the page actions group or optional toolbar.
|
|
35
35
|
* @default 'Page actions'
|
|
36
36
|
*/
|
|
37
37
|
actionsLabel?: string;
|
|
38
|
+
/** Render a keyboard toolbar for bare toolbar parts. @default false */
|
|
39
|
+
actionsAsToolbar?: boolean;
|
|
38
40
|
};
|
|
39
41
|
type __VLS_Slots = {
|
|
40
42
|
/** The page content rendered below the header. */
|
|
41
43
|
default?(): unknown;
|
|
42
44
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
+
* Page controls beside the heading. Ordinary buttons keep their own Tab stops.
|
|
46
|
+
* Compose an explicit Toolbar for keyboard grouping, or enable actionsAsToolbar
|
|
47
|
+
* when passing bare toolbar parts. No group renders without this slot.
|
|
45
48
|
*/
|
|
46
49
|
actions?(): unknown;
|
|
47
50
|
};
|
|
@@ -50,6 +53,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
50
53
|
breadcrumbs: readonly BreadcrumbItem[] | undefined;
|
|
51
54
|
breadcrumbLabel: string;
|
|
52
55
|
actionsLabel: string;
|
|
56
|
+
actionsAsToolbar: boolean;
|
|
53
57
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
54
58
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
55
59
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r=require("../internal/part.cjs");let e=require("vue"),o=require("@skdx/vue");var i=["aria-labelledby"],s=(0,e.defineComponent)({__name:"PageContainer",props:{title:{},headingLevel:{default:1},breadcrumbs:{default:void 0},breadcrumbLabel:{default:"Breadcrumb"},actionsLabel:{default:"Page actions"},actionsAsToolbar:{type:Boolean,default:!1}},setup(a){const n=a,l=(0,e.useId)(),d=(0,e.computed)(()=>`h${n.headingLevel}`);return(t,u)=>((0,e.openBlock)(),(0,e.createElementBlock)("section",(0,e.mergeProps)((0,e.unref)(r.skdxPart)("page-container","root"),{"aria-labelledby":(0,e.unref)(l)}),[(0,e.createElementVNode)("header",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(r.skdxPart)("page-container","header"))),[a.breadcrumbs?.length?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(o.SkdxBreadcrumb),(0,e.mergeProps)({key:0},(0,e.unref)(r.skdxPart)("page-container","breadcrumbs"),{label:n.breadcrumbLabel,items:a.breadcrumbs}),null,16,["label","items"])):(0,e.createCommentVNode)("",!0),(0,e.createElementVNode)("div",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(r.skdxPart)("page-container","heading-row"))),[(0,e.createVNode)((0,e.unref)(o.SkdxHeading),(0,e.mergeProps)({id:(0,e.unref)(l)},(0,e.unref)(r.skdxPart)("page-container","title"),{as:d.value}),{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(a.title),1)]),_:1},16,["id","as"]),t.$slots.actions?((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)(a.actionsAsToolbar?(0,e.unref)(o.SkdxToolbar):"div"),(0,e.mergeProps)({key:0,role:a.actionsAsToolbar?"toolbar":"group"},(0,e.unref)(r.skdxPart)("page-container","actions"),{"aria-label":a.actionsLabel}),{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(t.$slots,"actions")]),_:3},16,["role","aria-label"])):(0,e.createCommentVNode)("",!0)],16)],16),(0,e.createElementVNode)("div",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(r.skdxPart)("page-container","content"))),[(0,e.renderSlot)(t.$slots,"default")],16)],16,i))}});exports.default=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{skdxPart as e}from"../internal/part.js";import{computed as a,createBlock as t,createCommentVNode as
|
|
1
|
+
import{skdxPart as e}from"../internal/part.js";import{computed as a,createBlock as t,createCommentVNode as o,createElementBlock as r,createElementVNode as s,createTextVNode as l,createVNode as n,defineComponent as i,guardReactiveProps as d,mergeProps as c,normalizeProps as b,openBlock as u,renderSlot as m,resolveDynamicComponent as p,toDisplayString as g,unref as f,useId as v,withCtx as k}from"vue";import{SkdxBreadcrumb as h,SkdxHeading as x,SkdxToolbar as y}from"@skdx/vue";var B=["aria-labelledby"],L=/* @__PURE__ */i({__name:"PageContainer",props:{title:{},headingLevel:{default:1},breadcrumbs:{default:void 0},breadcrumbLabel:{default:"Breadcrumb"},actionsLabel:{default:"Page actions"},actionsAsToolbar:{type:Boolean,default:!1}},setup(i){const L=i,P=v(),C=a(()=>`h${L.headingLevel}`);return(a,v)=>(u(),r("section",c(f(e)("page-container","root"),{"aria-labelledby":f(P)}),[s("header",b(d(f(e)("page-container","header"))),[i.breadcrumbs?.length?(u(),t(f(h),c({key:0},f(e)("page-container","breadcrumbs"),{label:L.breadcrumbLabel,items:i.breadcrumbs}),null,16,["label","items"])):o("",!0),s("div",b(d(f(e)("page-container","heading-row"))),[n(f(x),c({id:f(P)},f(e)("page-container","title"),{as:C.value}),{default:k(()=>[l(g(i.title),1)]),_:1},16,["id","as"]),a.$slots.actions?(u(),t(p(i.actionsAsToolbar?f(y):"div"),c({key:0,role:i.actionsAsToolbar?"toolbar":"group"},f(e)("page-container","actions"),{"aria-label":i.actionsLabel}),{default:k(()=>[m(a.$slots,"actions")]),_:3},16,["role","aria-label"])):o("",!0)],16)],16),s("div",b(d(f(e)("page-container","content"))),[m(a.$slots,"default")],16)],16,B))}});export{L as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skdx/vue-blocks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "Vue blocks for the SkandaDX design system — page-level compositions of @skdx/vue styled by @skdx/skins",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
"sideEffects": false,
|
|
255
255
|
"peerDependencies": {
|
|
256
256
|
"vue": "^3.5.0",
|
|
257
|
-
"@skdx/vue": "^0.
|
|
257
|
+
"@skdx/vue": "^0.41.0"
|
|
258
258
|
},
|
|
259
259
|
"devDependencies": {
|
|
260
260
|
"@vitejs/plugin-vue": "^5.0.0",
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
"vitest": "^4.1.10",
|
|
267
267
|
"vue": "^3.5.39",
|
|
268
268
|
"vue-tsc": "^2.0.0",
|
|
269
|
-
"@skdx/vue": "0.
|
|
269
|
+
"@skdx/vue": "0.41.0"
|
|
270
270
|
},
|
|
271
271
|
"scripts": {
|
|
272
272
|
"lint": "eslint . --cache --cache-location node_modules/.cache/eslint/",
|