@digitalwalletcorp/vue-core 1.2.1 → 1.3.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/README.md +79 -3
- package/lib/accordion-fieldset.d.cts +14 -4
- package/lib/accordion-fieldset.d.ts +14 -4
- package/lib/accordion-section.d.cts +20 -10
- package/lib/accordion-section.d.ts +20 -10
- package/lib/components-2zQ2SZuY.js +26 -0
- package/lib/components-HaiHcseF.cjs +1 -0
- package/lib/components.d.cts +10 -0
- package/lib/components.d.ts +10 -0
- package/lib/copy-button.d.cts +34 -0
- package/lib/copy-button.d.ts +34 -0
- package/lib/dark-mode-selector.d.cts +32 -0
- package/lib/dark-mode-selector.d.ts +32 -0
- package/lib/data-table.d.cts +30 -0
- package/lib/data-table.d.ts +30 -0
- package/lib/help-button.d.cts +39 -0
- package/lib/help-button.d.ts +39 -0
- package/lib/help-popper.d.cts +39 -0
- package/lib/help-popper.d.ts +39 -0
- package/lib/helpers/data-table-csv.d.cts +17 -0
- package/lib/helpers/data-table-csv.d.ts +17 -0
- package/lib/helpers/show-floating-component.d.cts +82 -0
- package/lib/helpers/show-floating-component.d.ts +82 -0
- package/lib/helpers/show-modal-dialog.d.cts +73 -0
- package/lib/helpers/show-modal-dialog.d.ts +73 -0
- package/lib/helpers/show-overlay-box.d.cts +53 -0
- package/lib/helpers/show-overlay-box.d.ts +53 -0
- package/lib/helpers/show-screen-loading.d.cts +20 -0
- package/lib/helpers/show-screen-loading.d.ts +20 -0
- package/lib/helpers/show-snackbar.d.cts +47 -0
- package/lib/helpers/show-snackbar.d.ts +47 -0
- package/lib/hourglass-loading.d.cts +1 -1
- package/lib/hourglass-loading.d.ts +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +34 -0
- package/lib/index.d.ts +34 -0
- package/lib/index.js +445 -18
- package/lib/internal/anchored-popover.d.cts +35 -0
- package/lib/internal/anchored-popover.d.ts +35 -0
- package/lib/internal/anchored-position.d.cts +50 -0
- package/lib/internal/anchored-position.d.ts +50 -0
- package/lib/internal/data-table-controls.d.cts +42 -0
- package/lib/internal/data-table-controls.d.ts +42 -0
- package/lib/internal/data-table-value.d.cts +32 -0
- package/lib/internal/data-table-value.d.ts +32 -0
- package/lib/internal/floating-component.d.cts +52 -0
- package/lib/internal/floating-component.d.ts +52 -0
- package/lib/internal/icon-popper.d.cts +32 -0
- package/lib/internal/icon-popper.d.ts +32 -0
- package/lib/internal/mount-window.d.cts +39 -0
- package/lib/internal/mount-window.d.ts +39 -0
- package/lib/internal/movable-window.d.cts +55 -0
- package/lib/internal/movable-window.d.ts +55 -0
- package/lib/internal/opened-overlay-boxes.d.cts +2 -0
- package/lib/internal/opened-overlay-boxes.d.ts +2 -0
- package/lib/internal/pagination.d.cts +22 -0
- package/lib/internal/pagination.d.ts +22 -0
- package/lib/internal/snackbar-container.d.cts +20 -0
- package/lib/internal/snackbar-container.d.ts +20 -0
- package/lib/internal/snackbar-item.d.cts +17 -0
- package/lib/internal/snackbar-item.d.ts +17 -0
- package/lib/internal/tab-group-context.d.cts +4 -2
- package/lib/internal/tab-group-context.d.ts +4 -2
- package/lib/internal/use-movable-window.d.cts +44 -0
- package/lib/internal/use-movable-window.d.ts +44 -0
- package/lib/internal/window-order.d.cts +6 -0
- package/lib/internal/window-order.d.ts +6 -0
- package/lib/intersection-lazy-component.d.cts +32 -0
- package/lib/intersection-lazy-component.d.ts +32 -0
- package/lib/label-button.d.cts +2 -2
- package/lib/label-button.d.ts +2 -2
- package/lib/label-icon.d.cts +2 -2
- package/lib/label-icon.d.ts +2 -2
- package/lib/modal-dialog.d.cts +67 -0
- package/lib/modal-dialog.d.ts +67 -0
- package/lib/nuxt.cjs +1 -1
- package/lib/nuxt.js +1 -1
- package/lib/overlay-box.d.cts +52 -0
- package/lib/overlay-box.d.ts +52 -0
- package/lib/page-section.d.cts +2 -2
- package/lib/page-section.d.ts +2 -2
- package/lib/page-title.d.cts +2 -2
- package/lib/page-title.d.ts +2 -2
- package/lib/register.cjs +1 -1
- package/lib/register.js +1 -1
- package/lib/screen-loading.d.cts +7 -0
- package/lib/screen-loading.d.ts +7 -0
- package/lib/style.css +1 -1
- package/lib/tab-content.d.cts +5 -5
- package/lib/tab-content.d.ts +5 -5
- package/lib/tab-group.d.cts +7 -10
- package/lib/tab-group.d.ts +7 -10
- package/lib/types/data-table.d.cts +185 -0
- package/lib/types/data-table.d.ts +185 -0
- package/lib/types/modal-dialog.d.cts +13 -0
- package/lib/types/modal-dialog.d.ts +13 -0
- package/lib/types/movable-window.d.cts +16 -0
- package/lib/types/movable-window.d.ts +16 -0
- package/lib/warning-popper.d.cts +39 -0
- package/lib/warning-popper.d.ts +39 -0
- package/lib/warning-popper.vue_vue_type_style_index_0_lang-CxVzqsbn.cjs +1 -0
- package/lib/warning-popper.vue_vue_type_style_index_0_lang-zt-jCsvz.js +1833 -0
- package/package.json +40 -14
- package/src/accordion-fieldset.vue +24 -19
- package/src/accordion-section.vue +33 -28
- package/src/components.ts +10 -0
- package/src/copy-button.vue +89 -0
- package/src/dark-mode-selector.vue +212 -0
- package/src/data-table.vue +643 -0
- package/src/help-button.vue +128 -0
- package/src/help-popper.vue +70 -0
- package/src/helpers/data-table-csv.ts +55 -0
- package/src/helpers/show-floating-component.ts +169 -0
- package/src/helpers/show-modal-dialog.ts +121 -0
- package/src/helpers/show-overlay-box.ts +106 -0
- package/src/helpers/show-screen-loading.ts +37 -0
- package/src/helpers/show-snackbar.ts +153 -0
- package/src/hourglass-loading.vue +1 -1
- package/src/index.ts +34 -0
- package/src/internal/anchored-popover.vue +192 -0
- package/src/internal/anchored-position.ts +135 -0
- package/src/internal/data-table-controls.vue +203 -0
- package/src/internal/data-table-value.ts +99 -0
- package/src/internal/floating-component.vue +202 -0
- package/src/internal/icon-popper.vue +185 -0
- package/src/internal/mount-window.ts +110 -0
- package/src/internal/movable-window.vue +315 -0
- package/src/internal/opened-overlay-boxes.ts +2 -0
- package/src/internal/pagination.vue +325 -0
- package/src/internal/snackbar-container.vue +258 -0
- package/src/internal/snackbar-item.ts +20 -0
- package/src/internal/tab-group-context.ts +4 -2
- package/src/internal/use-movable-window.ts +208 -0
- package/src/internal/window-order.ts +11 -0
- package/src/intersection-lazy-component.vue +84 -0
- package/src/label-button.vue +9 -6
- package/src/label-icon.vue +2 -2
- package/src/modal-dialog.vue +287 -0
- package/src/overlay-box.vue +218 -0
- package/src/page-section.vue +7 -7
- package/src/page-title.vue +4 -4
- package/src/screen-loading.vue +90 -0
- package/src/tab-content.vue +16 -15
- package/src/tab-group.vue +34 -36
- package/src/types/data-table.ts +196 -0
- package/src/types/modal-dialog.ts +16 -0
- package/src/types/movable-window.ts +18 -0
- package/src/warning-popper.vue +70 -0
- package/lib/accordion-fieldset.cjs +0 -1
- package/lib/accordion-fieldset.js +0 -4
- package/lib/accordion-fieldset.vue_vue_type_style_index_0_lang-Cf4czDXz.js +0 -66
- package/lib/accordion-fieldset.vue_vue_type_style_index_0_lang-DoM5QjpJ.cjs +0 -1
- package/lib/accordion-section.cjs +0 -1
- package/lib/accordion-section.js +0 -4
- package/lib/accordion-section.vue_vue_type_style_index_0_lang-CFDdUEnn.cjs +0 -1
- package/lib/accordion-section.vue_vue_type_style_index_0_lang-Gvjjx02P.js +0 -78
- package/lib/components-C63HJoCn.cjs +0 -1
- package/lib/components-q4Cf97bO.js +0 -24
- package/lib/hourglass-loading.cjs +0 -1
- package/lib/hourglass-loading.js +0 -4
- package/lib/hourglass-loading.vue_vue_type_style_index_0_lang-C72UVA9W.cjs +0 -1
- package/lib/hourglass-loading.vue_vue_type_style_index_0_lang-DkUGIxQ2.js +0 -22
- package/lib/label-button.cjs +0 -1
- package/lib/label-button.js +0 -4
- package/lib/label-button.vue_vue_type_style_index_0_lang-D7ZgfZOL.cjs +0 -1
- package/lib/label-button.vue_vue_type_style_index_0_lang-DqRYddVt.js +0 -44
- package/lib/label-icon.cjs +0 -1
- package/lib/label-icon.js +0 -4
- package/lib/label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs +0 -1
- package/lib/label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js +0 -38
- package/lib/page-section.cjs +0 -1
- package/lib/page-section.js +0 -4
- package/lib/page-section.vue_vue_type_style_index_0_lang-DEAkTLxd.cjs +0 -1
- package/lib/page-section.vue_vue_type_style_index_0_lang-DpVQe_rV.js +0 -54
- package/lib/page-title.cjs +0 -1
- package/lib/page-title.js +0 -4
- package/lib/page-title.vue_vue_type_style_index_0_lang-BqIsIks5.cjs +0 -1
- package/lib/page-title.vue_vue_type_style_index_0_lang-ChZot85K.js +0 -36
- package/lib/tab-content.cjs +0 -1
- package/lib/tab-content.js +0 -4
- package/lib/tab-content.vue_vue_type_style_index_0_lang-BeCi7Xkp.cjs +0 -1
- package/lib/tab-content.vue_vue_type_style_index_0_lang-CcQLHmIF.js +0 -44
- package/lib/tab-group.cjs +0 -1
- package/lib/tab-group.js +0 -4
- package/lib/tab-group.vue_vue_type_style_index_0_lang-C84mDEOC.js +0 -103
- package/lib/tab-group.vue_vue_type_style_index_0_lang-CMaufRJV.cjs +0 -1
- package/lib/use-shrinkable-CS2bmsJJ.js +0 -17
- package/lib/use-shrinkable-Cu9JQZll.cjs +0 -1
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, useSlots as i, openBlock as l, createElementBlock as s, normalizeStyle as n, renderSlot as o, createBlock as y, resolveDynamicComponent as u, mergeProps as b, createCommentVNode as a, normalizeClass as m, createTextVNode as S, toDisplayString as d } from "vue";
|
|
2
|
-
const f = /* @__PURE__ */ p({
|
|
3
|
-
__name: "label-icon",
|
|
4
|
-
props: {
|
|
5
|
-
preset: {},
|
|
6
|
-
gap: {},
|
|
7
|
-
iconClass: { type: [Boolean, null, String, Object, Array] },
|
|
8
|
-
iconStyle: { type: [Boolean, null, String, Object, Array] },
|
|
9
|
-
labelClass: { type: [Boolean, null, String, Object, Array] },
|
|
10
|
-
labelStyle: { type: [Boolean, null, String, Object, Array] }
|
|
11
|
-
},
|
|
12
|
-
setup(r) {
|
|
13
|
-
const e = r, c = i();
|
|
14
|
-
return (t, g) => (l(), s("span", {
|
|
15
|
-
class: "dwui-label-icon",
|
|
16
|
-
style: n(e.gap == null ? void 0 : { "--dwui-gap-label-icon": e.gap })
|
|
17
|
-
}, [
|
|
18
|
-
o(t.$slots, "icon", {}, () => [
|
|
19
|
-
e.preset != null ? (l(), y(u(e.preset.icon), b({ key: 0 }, e.preset.iconProps, {
|
|
20
|
-
class: e.iconClass,
|
|
21
|
-
style: e.iconStyle
|
|
22
|
-
}), null, 16, ["class", "style"])) : a("", !0)
|
|
23
|
-
]),
|
|
24
|
-
c.default != null || e.preset != null ? (l(), s("span", {
|
|
25
|
-
key: 0,
|
|
26
|
-
class: m(["dwui-label", e.labelClass]),
|
|
27
|
-
style: n(e.labelStyle)
|
|
28
|
-
}, [
|
|
29
|
-
o(t.$slots, "default", {}, () => [
|
|
30
|
-
S(d(typeof e.preset?.label == "function" ? e.preset.label() : e.preset?.label), 1)
|
|
31
|
-
])
|
|
32
|
-
], 6)) : a("", !0)
|
|
33
|
-
], 4));
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
export {
|
|
37
|
-
f as _
|
|
38
|
-
};
|
package/lib/page-section.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./page-section.vue_vue_type_style_index_0_lang-DEAkTLxd.cjs");exports.default=e._sfc_main;
|
package/lib/page-section.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),n=require("@digitalwalletcorp/vue-svg-icons"),r=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs"),a={class:"dwui-page-section"},i={class:"dwui-page-section-content"},p=e.defineComponent({__name:"page-section",props:{title:{},icon:{default:"diamond"},iconVariant:{},iconColor:{},titleClass:{type:[Boolean,null,String,Object,Array]},titleStyle:{type:[Boolean,null,String,Object,Array]}},setup(l){const o=l,s={diamond:{component:n.SvgDiamond,shape:!0,color:"#1a44b6"},circle:{component:n.SvgCircle,shape:!0,color:"#e78b2f"},square:{component:n.SvgSquare,shape:!0,color:"#d13a2b"},pushpin:{component:n.SvgPushpin,shape:!1},"round-pushpin":{component:n.SvgRoundPushpin,shape:!1}},c=e.computed(()=>{const t=s[o.icon];return{component:t.component,props:t.shape?{variant:o.iconVariant,color:o.iconColor??t.color}:{}}});return(t,u)=>(e.openBlock(),e.createElementBlock("section",a,[o.title!=null?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dwui-page-section-title",o.titleClass]),style:e.normalizeStyle(o.titleStyle)},[e.createVNode(r._sfc_main,null,{icon:e.withCtx(()=>[e.renderSlot(t.$slots,"icon",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value.component),e.normalizeProps(e.guardReactiveProps(c.value.props)),null,16))])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.title),1)]),_:3})],6)):e.createCommentVNode("",!0),e.createElementVNode("div",i,[e.renderSlot(t.$slots,"default")])]))}});exports._sfc_main=p;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { defineComponent as i, computed as p, openBlock as t, createElementBlock as r, normalizeStyle as m, normalizeClass as u, createVNode as d, withCtx as a, createTextVNode as S, toDisplayString as h, renderSlot as l, createBlock as _, resolveDynamicComponent as g, normalizeProps as f, guardReactiveProps as v, createCommentVNode as y, createElementVNode as C } from "vue";
|
|
2
|
-
import { SvgRoundPushpin as V, SvgPushpin as b, SvgSquare as B, SvgCircle as N, SvgDiamond as P } from "@digitalwalletcorp/vue-svg-icons";
|
|
3
|
-
import { _ as k } from "./label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js";
|
|
4
|
-
const w = { class: "dwui-page-section" }, E = { class: "dwui-page-section-content" }, $ = /* @__PURE__ */ i({
|
|
5
|
-
__name: "page-section",
|
|
6
|
-
props: {
|
|
7
|
-
title: {},
|
|
8
|
-
icon: { default: "diamond" },
|
|
9
|
-
iconVariant: {},
|
|
10
|
-
iconColor: {},
|
|
11
|
-
titleClass: { type: [Boolean, null, String, Object, Array] },
|
|
12
|
-
titleStyle: { type: [Boolean, null, String, Object, Array] }
|
|
13
|
-
},
|
|
14
|
-
setup(s) {
|
|
15
|
-
const e = s, c = {
|
|
16
|
-
diamond: { component: P, shape: !0, color: "#1a44b6" },
|
|
17
|
-
circle: { component: N, shape: !0, color: "#e78b2f" },
|
|
18
|
-
square: { component: B, shape: !0, color: "#d13a2b" },
|
|
19
|
-
pushpin: { component: b, shape: !1 },
|
|
20
|
-
"round-pushpin": { component: V, shape: !1 }
|
|
21
|
-
}, n = p(() => {
|
|
22
|
-
const o = c[e.icon];
|
|
23
|
-
return {
|
|
24
|
-
component: o.component,
|
|
25
|
-
props: o.shape ? { variant: e.iconVariant, color: e.iconColor ?? o.color } : {}
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
return (o, z) => (t(), r("section", w, [
|
|
29
|
-
e.title != null ? (t(), r("div", {
|
|
30
|
-
key: 0,
|
|
31
|
-
class: u(["dwui-page-section-title", e.titleClass]),
|
|
32
|
-
style: m(e.titleStyle)
|
|
33
|
-
}, [
|
|
34
|
-
d(k, null, {
|
|
35
|
-
icon: a(() => [
|
|
36
|
-
l(o.$slots, "icon", {}, () => [
|
|
37
|
-
(t(), _(g(n.value.component), f(v(n.value.props)), null, 16))
|
|
38
|
-
])
|
|
39
|
-
]),
|
|
40
|
-
default: a(() => [
|
|
41
|
-
S(" " + h(e.title), 1)
|
|
42
|
-
]),
|
|
43
|
-
_: 3
|
|
44
|
-
})
|
|
45
|
-
], 6)) : y("", !0),
|
|
46
|
-
C("div", E, [
|
|
47
|
-
l(o.$slots, "default")
|
|
48
|
-
])
|
|
49
|
-
]));
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
export {
|
|
53
|
-
$ as _
|
|
54
|
-
};
|
package/lib/page-title.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./page-title.vue_vue_type_style_index_0_lang-BqIsIks5.cjs");exports.default=e._sfc_main;
|
package/lib/page-title.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),l=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs"),c={class:"dwui-page-title"},i={key:0,class:"dwui-page-title-actions"},a=e.defineComponent({__name:"page-title",props:{title:{}},setup(n){const s=n,t=e.useSlots();return(o,r)=>(e.openBlock(),e.createElementBlock("section",c,[e.createVNode(l._sfc_main,{class:"dwui-page-title-label"},e.createSlots({default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(s.title),1)]),_:2},[t.icon!=null?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"icon")]),key:"0"}:void 0]),1024),t.default!=null?(e.openBlock(),e.createElementBlock("span",i,[e.renderSlot(o.$slots,"default")])):e.createCommentVNode("",!0)]))}});exports._sfc_main=a;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { defineComponent as c, useSlots as r, openBlock as o, createElementBlock as s, createVNode as p, createSlots as d, withCtx as l, createTextVNode as u, toDisplayString as _, renderSlot as n, createCommentVNode as m } from "vue";
|
|
2
|
-
import { _ as f } from "./label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js";
|
|
3
|
-
const g = { class: "dwui-page-title" }, h = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "dwui-page-title-actions"
|
|
6
|
-
}, y = /* @__PURE__ */ c({
|
|
7
|
-
__name: "page-title",
|
|
8
|
-
props: {
|
|
9
|
-
title: {}
|
|
10
|
-
},
|
|
11
|
-
setup(a) {
|
|
12
|
-
const i = a, e = r();
|
|
13
|
-
return (t, k) => (o(), s("section", g, [
|
|
14
|
-
p(f, { class: "dwui-page-title-label" }, d({
|
|
15
|
-
default: l(() => [
|
|
16
|
-
u(" " + _(i.title), 1)
|
|
17
|
-
]),
|
|
18
|
-
_: 2
|
|
19
|
-
}, [
|
|
20
|
-
e.icon != null ? {
|
|
21
|
-
name: "icon",
|
|
22
|
-
fn: l(() => [
|
|
23
|
-
n(t.$slots, "icon")
|
|
24
|
-
]),
|
|
25
|
-
key: "0"
|
|
26
|
-
} : void 0
|
|
27
|
-
]), 1024),
|
|
28
|
-
e.default != null ? (o(), s("span", h, [
|
|
29
|
-
n(t.$slots, "default")
|
|
30
|
-
])) : m("", !0)
|
|
31
|
-
]));
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
export {
|
|
35
|
-
y as _
|
|
36
|
-
};
|
package/lib/tab-content.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tab-content.vue_vue_type_style_index_0_lang-BeCi7Xkp.cjs");exports.default=e._sfc_main;
|
package/lib/tab-content.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),s=Symbol("dwui-tab-group"),u=["aria-label","aria-checked","aria-description","aria-busy","data-test-tab-content"],p={key:0,class:"dwui-tab-loading"},b={key:1,class:"dwui-tab-loading-spinner"},m=e.defineComponent({__name:"tab-content",props:{labelId:{},description:{},disabled:{type:Boolean},status:{},headerClass:{type:[Boolean,null,String,Object,Array]},headerStyle:{type:[Boolean,null,String,Object,Array]}},setup(i){const t=i,a=e.inject(s,void 0),o=e.ref(!1),l=()=>a?.loadingSlot(),c=e.computed(()=>a?.activeLabelId.value===t.labelId),d=e.computed(()=>!!a?.mounted.value&&c.value),r=n=>{o.value=n};return(n,v)=>t.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"dwui-tab-content","aria-label":t.labelId,"aria-checked":c.value?"true":"false","aria-description":t.description,"aria-busy":o.value?"true":void 0,"data-test-tab-content":t.labelId},[e.renderSlot(n.$slots,"default",{activated:d.value,setLoading:r}),o.value?(e.openBlock(),e.createElementBlock("div",p,[l()!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l()),{key:0})):(e.openBlock(),e.createElementBlock("span",b))])):e.createCommentVNode("",!0)],8,u))}});exports._sfc_main=m;exports.tabGroupContextKey=s;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, inject as v, ref as y, computed as i, openBlock as t, createElementBlock as l, renderSlot as m, createBlock as _, resolveDynamicComponent as g, createCommentVNode as d } from "vue";
|
|
2
|
-
const k = /* @__PURE__ */ Symbol("dwui-tab-group"), h = ["aria-label", "aria-checked", "aria-description", "aria-busy", "data-test-tab-content"], f = {
|
|
3
|
-
key: 0,
|
|
4
|
-
class: "dwui-tab-loading"
|
|
5
|
-
}, S = {
|
|
6
|
-
key: 1,
|
|
7
|
-
class: "dwui-tab-loading-spinner"
|
|
8
|
-
}, I = /* @__PURE__ */ p({
|
|
9
|
-
__name: "tab-content",
|
|
10
|
-
props: {
|
|
11
|
-
labelId: {},
|
|
12
|
-
description: {},
|
|
13
|
-
disabled: { type: Boolean },
|
|
14
|
-
status: {},
|
|
15
|
-
headerClass: { type: [Boolean, null, String, Object, Array] },
|
|
16
|
-
headerStyle: { type: [Boolean, null, String, Object, Array] }
|
|
17
|
-
},
|
|
18
|
-
setup(r) {
|
|
19
|
-
const e = r, a = v(k, void 0), o = y(!1), s = () => a?.loadingSlot(), c = i(() => a?.activeLabelId.value === e.labelId), u = i(() => !!a?.mounted.value && c.value), b = (n) => {
|
|
20
|
-
o.value = n;
|
|
21
|
-
};
|
|
22
|
-
return (n, B) => e.disabled ? d("", !0) : (t(), l("div", {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "dwui-tab-content",
|
|
25
|
-
"aria-label": e.labelId,
|
|
26
|
-
"aria-checked": c.value ? "true" : "false",
|
|
27
|
-
"aria-description": e.description,
|
|
28
|
-
"aria-busy": o.value ? "true" : void 0,
|
|
29
|
-
"data-test-tab-content": e.labelId
|
|
30
|
-
}, [
|
|
31
|
-
m(n.$slots, "default", {
|
|
32
|
-
activated: u.value,
|
|
33
|
-
setLoading: b
|
|
34
|
-
}),
|
|
35
|
-
o.value ? (t(), l("div", f, [
|
|
36
|
-
s() != null ? (t(), _(g(s()), { key: 0 })) : (t(), l("span", S))
|
|
37
|
-
])) : d("", !0)
|
|
38
|
-
], 8, h));
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
export {
|
|
42
|
-
I as _,
|
|
43
|
-
k as t
|
|
44
|
-
};
|
package/lib/tab-group.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tab-group.vue_vue_type_style_index_0_lang-CMaufRJV.cjs");exports.default=e._sfc_main;
|
package/lib/tab-group.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { defineComponent as L, useModel as B, useSlots as N, useId as x, computed as y, ref as A, provide as E, onMounted as M, openBlock as s, createElementBlock as i, createBlock as _, Teleport as F, createElementVNode as o, normalizeStyle as v, normalizeClass as g, Fragment as S, renderList as G, unref as c, createVNode as V, createSlots as j, withCtx as I, createTextVNode as z, toDisplayString as D, resolveDynamicComponent as O, renderSlot as H, mergeModels as C } from "vue";
|
|
2
|
-
import { _ as K } from "./label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js";
|
|
3
|
-
import { t as P, _ as q } from "./tab-content.vue_vue_type_style_index_0_lang-CcQLHmIF.js";
|
|
4
|
-
const J = { class: "dwui-tab-group" }, Q = ["id", "name", "disabled", "checked", "onChange"], R = ["for", "data-test-tab-content-control"], U = { class: "dwui-tab-items" }, Z = /* @__PURE__ */ L({
|
|
5
|
-
__name: "tab-group",
|
|
6
|
-
props: /* @__PURE__ */ C({
|
|
7
|
-
tabGroupName: {},
|
|
8
|
-
selectFirstEnabled: { type: Boolean },
|
|
9
|
-
headerClass: { type: [Boolean, null, String, Object, Array] },
|
|
10
|
-
headerStyle: { type: [Boolean, null, String, Object, Array] },
|
|
11
|
-
teleport: {}
|
|
12
|
-
}, {
|
|
13
|
-
selectedTabLabelId: {},
|
|
14
|
-
selectedTabLabelIdModifiers: {}
|
|
15
|
-
}),
|
|
16
|
-
emits: /* @__PURE__ */ C(["emit:changeSelectedTab"], ["update:selectedTabLabelId"]),
|
|
17
|
-
setup(u, { emit: T }) {
|
|
18
|
-
const l = u, $ = T, d = B(u, "selectedTabLabelId"), b = N(), n = l.tabGroupName ?? x(), k = (a) => {
|
|
19
|
-
if (a.type !== q)
|
|
20
|
-
return;
|
|
21
|
-
const t = a.props ?? {}, e = t.disabled;
|
|
22
|
-
return {
|
|
23
|
-
labelId: String(t["label-id"] ?? t.labelId),
|
|
24
|
-
description: t.description,
|
|
25
|
-
// 属性だけを書いた場合(<TabContent disabled>)は空文字になる
|
|
26
|
-
disabled: e === "" || !!e,
|
|
27
|
-
status: t.status,
|
|
28
|
-
headerClass: t["header-class"] ?? t.headerClass,
|
|
29
|
-
headerStyle: t["header-style"] ?? t.headerStyle,
|
|
30
|
-
// TabContentの#iconスロットは、TabContentではなくここで見出しに描画する
|
|
31
|
-
icon: a.children?.icon
|
|
32
|
-
};
|
|
33
|
-
}, r = y(() => {
|
|
34
|
-
const a = [];
|
|
35
|
-
for (const t of b.default?.() ?? []) {
|
|
36
|
-
const e = Array.isArray(t.children) ? t.children : [t];
|
|
37
|
-
for (const h of e) {
|
|
38
|
-
const f = k(h);
|
|
39
|
-
f && a.push(f);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return a;
|
|
43
|
-
}), p = y(() => d.value != null ? d.value : (l.selectFirstEnabled ? r.value.find((t) => !t.disabled) : r.value[0])?.labelId), m = A(!1);
|
|
44
|
-
E(P, { activeLabelId: p, mounted: m, loadingSlot: () => b.loading }), M(() => {
|
|
45
|
-
m.value = !0;
|
|
46
|
-
});
|
|
47
|
-
const w = (a) => {
|
|
48
|
-
d.value = a, $("emit:changeSelectedTab", a);
|
|
49
|
-
};
|
|
50
|
-
return (a, t) => (s(), i("div", J, [
|
|
51
|
-
(s(), _(F, {
|
|
52
|
-
to: l.teleport ?? "body",
|
|
53
|
-
disabled: l.teleport == null
|
|
54
|
-
}, [
|
|
55
|
-
o("div", {
|
|
56
|
-
class: g(["dwui-tab-headers", l.headerClass]),
|
|
57
|
-
style: v(l.headerStyle)
|
|
58
|
-
}, [
|
|
59
|
-
(s(!0), i(S, null, G(r.value, (e) => (s(), i(S, {
|
|
60
|
-
key: e.labelId
|
|
61
|
-
}, [
|
|
62
|
-
o("input", {
|
|
63
|
-
id: `${c(n)}-${e.labelId}`,
|
|
64
|
-
type: "radio",
|
|
65
|
-
class: "dwui-tab-radio",
|
|
66
|
-
name: c(n),
|
|
67
|
-
disabled: e.disabled,
|
|
68
|
-
checked: e.labelId === p.value,
|
|
69
|
-
onChange: (h) => w(e.labelId)
|
|
70
|
-
}, null, 40, Q),
|
|
71
|
-
o("label", {
|
|
72
|
-
for: `${c(n)}-${e.labelId}`,
|
|
73
|
-
class: g(["dwui-tab-item", [e.status != null ? `dwui-tab-${e.status}` : void 0, e.headerClass]]),
|
|
74
|
-
style: v(e.headerStyle),
|
|
75
|
-
"data-test-tab-content-control": e.labelId
|
|
76
|
-
}, [
|
|
77
|
-
V(K, null, j({
|
|
78
|
-
default: I(() => [
|
|
79
|
-
z(" " + D(e.description), 1)
|
|
80
|
-
]),
|
|
81
|
-
_: 2
|
|
82
|
-
}, [
|
|
83
|
-
e.icon != null ? {
|
|
84
|
-
name: "icon",
|
|
85
|
-
fn: I(() => [
|
|
86
|
-
(s(), _(O(e.icon)))
|
|
87
|
-
]),
|
|
88
|
-
key: "0"
|
|
89
|
-
} : void 0
|
|
90
|
-
]), 1024)
|
|
91
|
-
], 14, R)
|
|
92
|
-
], 64))), 128))
|
|
93
|
-
], 6)
|
|
94
|
-
], 8, ["to", "disabled"])),
|
|
95
|
-
o("div", U, [
|
|
96
|
-
H(a.$slots, "default")
|
|
97
|
-
])
|
|
98
|
-
]));
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
export {
|
|
102
|
-
Z as _
|
|
103
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),v=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs"),m=require("./tab-content.vue_vue_type_style_index_0_lang-BeCi7Xkp.cjs"),g={class:"dwui-tab-group"},S=["id","name","disabled","checked","onChange"],C=["for","data-test-tab-content-control"],I={class:"dwui-tab-items"},k=e.defineComponent({__name:"tab-group",props:e.mergeModels({tabGroupName:{},selectFirstEnabled:{type:Boolean},headerClass:{type:[Boolean,null,String,Object,Array]},headerStyle:{type:[Boolean,null,String,Object,Array]},teleport:{}},{selectedTabLabelId:{},selectedTabLabelIdModifiers:{}}),emits:e.mergeModels(["emit:changeSelectedTab"],["update:selectedTabLabelId"]),setup(r,{emit:h}){const n=r,_=h,o=e.useModel(r,"selectedTabLabelId"),c=e.useSlots(),s=n.tabGroupName??e.useId(),y=a=>{if(a.type!==m._sfc_main)return;const l=a.props??{},t=l.disabled;return{labelId:String(l["label-id"]??l.labelId),description:l.description,disabled:t===""||!!t,status:l.status,headerClass:l["header-class"]??l.headerClass,headerStyle:l["header-style"]??l.headerStyle,icon:a.children?.icon}},d=e.computed(()=>{const a=[];for(const l of c.default?.()??[]){const t=Array.isArray(l.children)?l.children:[l];for(const b of t){const p=y(b);p&&a.push(p)}}return a}),i=e.computed(()=>o.value!=null?o.value:(n.selectFirstEnabled?d.value.find(l=>!l.disabled):d.value[0])?.labelId),u=e.ref(!1);e.provide(m.tabGroupContextKey,{activeLabelId:i,mounted:u,loadingSlot:()=>c.loading}),e.onMounted(()=>{u.value=!0});const f=a=>{o.value=a,_("emit:changeSelectedTab",a)};return(a,l)=>(e.openBlock(),e.createElementBlock("div",g,[(e.openBlock(),e.createBlock(e.Teleport,{to:n.teleport??"body",disabled:n.teleport==null},[e.createElementVNode("div",{class:e.normalizeClass(["dwui-tab-headers",n.headerClass]),style:e.normalizeStyle(n.headerStyle)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.labelId},[e.createElementVNode("input",{id:`${e.unref(s)}-${t.labelId}`,type:"radio",class:"dwui-tab-radio",name:e.unref(s),disabled:t.disabled,checked:t.labelId===i.value,onChange:b=>f(t.labelId)},null,40,S),e.createElementVNode("label",{for:`${e.unref(s)}-${t.labelId}`,class:e.normalizeClass(["dwui-tab-item",[t.status!=null?`dwui-tab-${t.status}`:void 0,t.headerClass]]),style:e.normalizeStyle(t.headerStyle),"data-test-tab-content-control":t.labelId},[e.createVNode(v._sfc_main,null,e.createSlots({default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(t.description),1)]),_:2},[t.icon!=null?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))]),key:"0"}:void 0]),1024)],14,C)],64))),128))],6)],8,["to","disabled"])),e.createElementVNode("div",I,[e.renderSlot(a.$slots,"default")])]))}});exports._sfc_main=k;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ref as t, onMounted as s, onBeforeUnmount as u } from "vue";
|
|
2
|
-
const l = 70;
|
|
3
|
-
function c(o) {
|
|
4
|
-
const r = t(!0);
|
|
5
|
-
let e;
|
|
6
|
-
return s(() => {
|
|
7
|
-
const n = o.value;
|
|
8
|
-
n != null && (e = new ResizeObserver(() => {
|
|
9
|
-
r.value = l <= n.scrollHeight;
|
|
10
|
-
}), e.observe(n));
|
|
11
|
-
}), u(() => {
|
|
12
|
-
e?.disconnect();
|
|
13
|
-
}), r;
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
c as u
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("vue"),u=70;function o(t){const s=r.ref(!0);let e;return r.onMounted(()=>{const n=t.value;n!=null&&(e=new ResizeObserver(()=>{s.value=u<=n.scrollHeight}),e.observe(n))}),r.onBeforeUnmount(()=>{e?.disconnect()}),s}exports.useShrinkable=o;
|