vlite3 0.6.5 → 0.6.7

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.
Files changed (30) hide show
  1. package/components/Breadcrumb/Breadcrumb.vue.d.ts +12 -2
  2. package/components/Breadcrumb/Breadcrumb.vue.js +1 -1
  3. package/components/Breadcrumb/Breadcrumb.vue2.js +54 -43
  4. package/components/Breadcrumb/BreadcrumbItem.vue.d.ts +13 -1
  5. package/components/Breadcrumb/BreadcrumbItem.vue.js +2 -2
  6. package/components/Breadcrumb/BreadcrumbItem.vue2.js +36 -21
  7. package/components/DataTable/DataTable.vue.js +232 -209
  8. package/components/DataTable/types.d.ts +15 -0
  9. package/components/DataTable/types.js +4 -0
  10. package/components/Dropdown/Dropdown.vue.js +13 -21
  11. package/components/Modal.vue.js +2 -2
  12. package/components/Modal.vue2.js +58 -56
  13. package/components/PermissionMatrix/PermissionEditor.vue.d.ts +0 -12
  14. package/components/PermissionMatrix/PermissionEditor.vue.js +120 -524
  15. package/components/PermissionMatrix/PermissionEditorList.vue.d.ts +18 -0
  16. package/components/PermissionMatrix/PermissionEditorList.vue.js +156 -0
  17. package/components/PermissionMatrix/PermissionEditorList.vue2.js +4 -0
  18. package/components/PermissionMatrix/PermissionEditorMatrix.vue.d.ts +18 -0
  19. package/components/PermissionMatrix/PermissionEditorMatrix.vue.js +207 -0
  20. package/components/PermissionMatrix/PermissionEditorMatrix.vue2.js +4 -0
  21. package/components/PermissionMatrix/PermissionTopBar.vue.d.ts +28 -0
  22. package/components/PermissionMatrix/PermissionTopBar.vue.js +132 -0
  23. package/components/PermissionMatrix/PermissionTopBar.vue2.js +4 -0
  24. package/components/PermissionMatrix/utils.d.ts +11 -0
  25. package/components/PermissionMatrix/utils.js +20 -0
  26. package/components/Screen/Screen.vue.js +113 -107
  27. package/components/SidePanel.vue.js +57 -53
  28. package/index.js +179 -177
  29. package/package.json +1 -1
  30. package/style.css +1 -1
@@ -1,4 +1,4 @@
1
- import { BreadcrumbProps, BreadcrumbVariant, BreadcrumbSeparator, BreadcrumbSize } from './types';
1
+ import { BreadcrumbProps, BreadcrumbItemSchema, BreadcrumbVariant, BreadcrumbSeparator, BreadcrumbSize } from './types';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -8,7 +8,17 @@ declare function __VLS_template(): {
8
8
  rootEl: HTMLElement;
9
9
  };
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<BreadcrumbProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BreadcrumbProps> & Readonly<{}>, {
11
+ declare const __VLS_component: import('vue').DefineComponent<BreadcrumbProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
12
+ "item-click": (payload: {
13
+ item: BreadcrumbItemSchema;
14
+ index: number;
15
+ }) => any;
16
+ }, string, import('vue').PublicProps, Readonly<BreadcrumbProps> & Readonly<{
17
+ "onItem-click"?: (payload: {
18
+ item: BreadcrumbItemSchema;
19
+ index: number;
20
+ }) => any;
21
+ }>, {
12
22
  variant: BreadcrumbVariant;
13
23
  size: BreadcrumbSize;
14
24
  class: string;
@@ -1,7 +1,7 @@
1
1
  import o from "./Breadcrumb.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ae18a95c"]]);
4
+ const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-12cf2491"]]);
5
5
  export {
6
6
  c as default
7
7
  };
@@ -1,13 +1,9 @@
1
- import { defineComponent as C, ref as y, computed as s, openBlock as l, createElementBlock as n, normalizeClass as z, createElementVNode as r, Fragment as i, renderList as I, toDisplayString as f, createCommentVNode as v, createVNode as x, mergeProps as B, renderSlot as w } from "vue";
2
- import _ from "./BreadcrumbItem.vue.js";
3
- const M = { class: "breadcrumb-list" }, N = {
4
- key: 0,
1
+ import { defineComponent as B, ref as w, computed as l, openBlock as i, createElementBlock as m, normalizeClass as p, createElementVNode as s, Fragment as u, renderList as M, toDisplayString as v, createCommentVNode as h, createVNode as N, mergeProps as S, renderSlot as V } from "vue";
2
+ import E from "./BreadcrumbItem.vue.js";
3
+ const O = { class: "breadcrumb-list" }, _ = {
5
4
  class: "breadcrumb-separator",
6
5
  "aria-hidden": "true"
7
- }, S = {
8
- class: "breadcrumb-separator",
9
- "aria-hidden": "true"
10
- }, j = /* @__PURE__ */ C({
6
+ }, F = /* @__PURE__ */ B({
11
7
  __name: "Breadcrumb",
12
8
  props: {
13
9
  items: {},
@@ -17,68 +13,83 @@ const M = { class: "breadcrumb-list" }, N = {
17
13
  maxItems: {},
18
14
  class: { default: "" }
19
15
  },
20
- setup(t) {
21
- const e = t, c = y(!0), m = s(() => !e.maxItems || !e.items ? !1 : e.items.length > e.maxItems && c.value), d = s(() => {
16
+ emits: ["item-click"],
17
+ setup(n, { emit: x }) {
18
+ const e = n, k = x, d = w(!0), c = l(() => !e.maxItems || !e.items ? !1 : e.items.length > e.maxItems && d.value), b = l(() => {
22
19
  if (!e.items) return [];
23
- if (!m.value) return e.items;
24
- const a = e.maxItems, u = Math.max(a - 1, 1);
25
- return [e.items[0], ...e.items.slice(-u)];
26
- }), h = s(() => m.value ? 1 : -1);
27
- function g() {
28
- c.value = !1;
20
+ if (!c.value) return e.items;
21
+ const t = e.maxItems, r = Math.max(t - 1, 1);
22
+ return [e.items[0], ...e.items.slice(-r)];
23
+ }), g = l(() => c.value ? 1 : -1);
24
+ function C() {
25
+ d.value = !1;
26
+ }
27
+ function I(t) {
28
+ if (!e.items || !c.value) return t;
29
+ const r = e.maxItems, o = Math.max(r - 1, 1), a = e.items.length - o;
30
+ return t === 0 ? 0 : a + (t - 1);
31
+ }
32
+ function z(t) {
33
+ k("item-click", { item: t.item, index: I(t.index) });
29
34
  }
30
- const k = s(() => {
31
- const a = {
35
+ const y = l(() => {
36
+ const t = {
32
37
  default: "breadcrumb--default",
33
38
  contained: "breadcrumb--contained",
34
39
  pills: "breadcrumb--pills",
35
40
  arrow: "breadcrumb--arrow"
36
- }, u = {
41
+ }, r = {
37
42
  sm: "breadcrumb--sm",
38
43
  md: "breadcrumb--md",
39
44
  lg: "breadcrumb--lg"
40
45
  };
41
- return ["breadcrumb", a[e.variant], u[e.size], e.class].filter(Boolean).join(" ");
42
- }), b = s(() => ({
46
+ return ["breadcrumb", t[e.variant], r[e.size], e.class].filter(Boolean).join(" ");
47
+ }), f = l(() => ({
43
48
  slash: "/",
44
49
  chevron: "›",
45
50
  dot: "·",
46
51
  arrow: "→"
47
52
  })[e.separator] || "›");
48
- return (a, u) => (l(), n("nav", {
49
- class: z(k.value),
53
+ return (t, r) => (i(), m("nav", {
54
+ class: p(y.value),
50
55
  "aria-label": "Breadcrumb"
51
56
  }, [
52
- r("ol", M, [
53
- t.items && t.items.length ? (l(!0), n(i, { key: 0 }, I(d.value, (p, o) => (l(), n(i, {
54
- key: p.label + o
57
+ s("ol", O, [
58
+ n.items && n.items.length ? (i(!0), m(u, { key: 0 }, M(b.value, (o, a) => (i(), m(u, {
59
+ key: o.label + a
55
60
  }, [
56
- o > 0 ? (l(), n("li", N, [
57
- r("span", null, f(b.value), 1)
58
- ])) : v("", !0),
59
- o === h.value ? (l(), n(i, { key: 1 }, [
60
- r("li", S, [
61
- r("span", null, f(b.value), 1)
61
+ a > 0 ? (i(), m("li", {
62
+ key: 0,
63
+ class: p(["breadcrumb-separator", (e.separator == "chevron" || e?.separator === "dot") && "text-fs-3!"]),
64
+ "aria-hidden": "true"
65
+ }, [
66
+ s("span", null, v(f.value), 1)
67
+ ], 2)) : h("", !0),
68
+ a === g.value ? (i(), m(u, { key: 1 }, [
69
+ s("li", _, [
70
+ s("span", null, v(f.value), 1)
62
71
  ]),
63
- r("li", { class: "breadcrumb-ellipsis" }, [
64
- r("button", {
72
+ s("li", { class: "breadcrumb-ellipsis" }, [
73
+ s("button", {
65
74
  type: "button",
66
75
  class: "breadcrumb-ellipsis-btn",
67
76
  "aria-label": "Show all breadcrumb items",
68
- onClick: g
77
+ onClick: C
69
78
  }, " … ")
70
79
  ])
71
- ], 64)) : v("", !0),
72
- x(_, B({ ref_for: !0 }, p, {
73
- size: t.size,
74
- variant: t.variant,
75
- "is-current": o === d.value.length - 1
76
- }), null, 16, ["size", "variant", "is-current"])
77
- ], 64))), 128)) : w(a.$slots, "default", { key: 1 }, void 0, !0)
80
+ ], 64)) : h("", !0),
81
+ N(E, S({ ref_for: !0 }, o, {
82
+ size: n.size,
83
+ variant: n.variant,
84
+ "is-current": a === b.value.length - 1,
85
+ "item-index": a,
86
+ onItemClick: z
87
+ }), null, 16, ["size", "variant", "is-current", "item-index"])
88
+ ], 64))), 128)) : V(t.$slots, "default", { key: 1 }, void 0, !0)
78
89
  ])
79
90
  ], 2));
80
91
  }
81
92
  });
82
93
  export {
83
- j as default
94
+ F as default
84
95
  };
@@ -3,6 +3,7 @@ interface Props extends BreadcrumbItemSchema {
3
3
  size?: BreadcrumbSize;
4
4
  isCurrent?: boolean;
5
5
  variant?: string;
6
+ itemIndex?: number;
6
7
  }
7
8
  declare function __VLS_template(): {
8
9
  attrs: Partial<{}>;
@@ -13,10 +14,21 @@ declare function __VLS_template(): {
13
14
  rootEl: HTMLLIElement;
14
15
  };
15
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
17
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
18
+ "item-click": (payload: {
19
+ item: BreadcrumbItemSchema;
20
+ index: number;
21
+ }) => any;
22
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
23
+ "onItem-click"?: (payload: {
24
+ item: BreadcrumbItemSchema;
25
+ index: number;
26
+ }) => any;
27
+ }>, {
17
28
  variant: string;
18
29
  size: BreadcrumbSize;
19
30
  isCurrent: boolean;
31
+ itemIndex: number;
20
32
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLIElement>;
21
33
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
34
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import o from "./BreadcrumbItem.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0b2efcbc"]]);
4
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-5c9662c5"]]);
5
5
  export {
6
- e as default
6
+ a as default
7
7
  };
@@ -1,11 +1,12 @@
1
- import { defineComponent as u, computed as a, openBlock as i, createElementBlock as c, normalizeClass as n, createBlock as l, resolveDynamicComponent as m, mergeProps as f, withCtx as b, createCommentVNode as C, renderSlot as h, createTextVNode as v, toDisplayString as k } from "vue";
2
- import B from "../Icon.vue.js";
3
- const w = /* @__PURE__ */ u({
1
+ import { defineComponent as f, computed as r, openBlock as a, createElementBlock as b, normalizeClass as n, createBlock as l, resolveDynamicComponent as C, mergeProps as h, withCtx as k, createCommentVNode as v, renderSlot as B, createTextVNode as x, toDisplayString as y } from "vue";
2
+ import g from "../Icon.vue.js";
3
+ const I = /* @__PURE__ */ f({
4
4
  __name: "BreadcrumbItem",
5
5
  props: {
6
6
  size: { default: "md" },
7
7
  isCurrent: { type: Boolean, default: !1 },
8
8
  variant: { default: "default" },
9
+ itemIndex: { default: 0 },
9
10
  label: {},
10
11
  to: {},
11
12
  href: {},
@@ -13,31 +14,45 @@ const w = /* @__PURE__ */ u({
13
14
  disabled: { type: Boolean },
14
15
  active: { type: Boolean }
15
16
  },
16
- setup(r) {
17
- const e = r, s = a(() => e.disabled || e.isCurrent ? "span" : e.to ? "router-link" : e.href ? "a" : "span"), o = a(() => e.to && !e.disabled && !e.isCurrent ? { to: e.to } : e.href && !e.disabled && !e.isCurrent ? { href: e.href } : {}), d = a(() => {
18
- const t = {
17
+ emits: ["item-click"],
18
+ setup(t, { emit: s }) {
19
+ const e = t, c = s, d = r(() => e.disabled || e.isCurrent ? "span" : e.to ? "router-link" : e.href ? "a" : "span"), o = r(() => e.disabled || e.isCurrent ? {} : e.to ? { to: e.to } : e.href ? { href: e.href } : {}), u = r(() => {
20
+ const i = {
19
21
  sm: "w-3 h-3",
20
22
  md: "w-3.5 h-3.5",
21
23
  lg: "w-4 h-4"
22
24
  };
23
- return t[e.size] || t.md;
25
+ return i[e.size] || i.md;
24
26
  });
25
- return (t, y) => (i(), c("li", {
26
- class: n(["breadcrumb-item", { "is-current": r.isCurrent, "is-disabled": r.disabled }])
27
+ function m() {
28
+ if (e.disabled || e.isCurrent) return;
29
+ const i = {
30
+ label: e.label,
31
+ to: e.to,
32
+ href: e.href,
33
+ icon: e.icon,
34
+ disabled: e.disabled,
35
+ active: e.active
36
+ };
37
+ c("item-click", { item: i, index: e.itemIndex });
38
+ }
39
+ return (i, z) => (a(), b("li", {
40
+ class: n(["breadcrumb-item", { "is-current": t.isCurrent, "is-disabled": t.disabled }])
27
41
  }, [
28
- (i(), l(m(s.value), f(o.value, {
29
- class: ["breadcrumb-link", { current: r.isCurrent, disabled: r.disabled }],
30
- "aria-current": r.isCurrent ? "page" : void 0,
31
- "aria-disabled": r.disabled || void 0
42
+ (a(), l(C(d.value), h(o.value, {
43
+ class: ["breadcrumb-link", { current: t.isCurrent, disabled: t.disabled }],
44
+ "aria-current": t.isCurrent ? "page" : void 0,
45
+ "aria-disabled": t.disabled || void 0,
46
+ onClick: m
32
47
  }), {
33
- default: b(() => [
34
- r.icon ? (i(), l(B, {
48
+ default: k(() => [
49
+ t.icon ? (a(), l(g, {
35
50
  key: 0,
36
- icon: r.icon,
37
- class: n(["breadcrumb-icon", d.value])
38
- }, null, 8, ["icon", "class"])) : C("", !0),
39
- h(t.$slots, "default", {}, () => [
40
- v(k(r.label), 1)
51
+ icon: t.icon,
52
+ class: n(["breadcrumb-icon", u.value])
53
+ }, null, 8, ["icon", "class"])) : v("", !0),
54
+ B(i.$slots, "default", {}, () => [
55
+ x(y(t.label), 1)
41
56
  ], !0)
42
57
  ]),
43
58
  _: 3
@@ -46,5 +61,5 @@ const w = /* @__PURE__ */ u({
46
61
  }
47
62
  });
48
63
  export {
49
- w as default
64
+ I as default
50
65
  };