vlite3 0.5.6 → 0.5.8

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 (33) hide show
  1. package/components/Badge.vue.d.ts +3 -3
  2. package/components/Badge.vue.js +27 -16
  3. package/components/Breadcrumb/Breadcrumb.vue.js +2 -2
  4. package/components/Button.vue.js +1 -1
  5. package/components/Chip/Chip.vue.d.ts +6 -3
  6. package/components/Chip/Chip.vue.js +48 -40
  7. package/components/CommandPaletteContent.vue.d.ts +1 -0
  8. package/components/CommandPaletteContent.vue.js +1 -1
  9. package/components/CommandPaletteContent.vue2.js +129 -105
  10. package/components/Dropdown/Dropdown.vue.d.ts +16 -12
  11. package/components/Dropdown/Dropdown.vue.js +127 -114
  12. package/components/Dropdown/DropdownItem.vue.js +2 -1
  13. package/components/Dropdown/DropdownMenu.vue.d.ts +3 -3
  14. package/components/Dropdown/DropdownMenu.vue.js +107 -99
  15. package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -1
  16. package/components/Dropdown/composables/useDropdownSelection.js +28 -28
  17. package/components/NavbarCommandPalette.vue.d.ts +8 -2
  18. package/components/NavbarCommandPalette.vue.js +55 -45
  19. package/components/PermissionMatrix/PermissionMatrix.vue.js +2 -2
  20. package/components/Screen/Screen.vue.js +35 -34
  21. package/components/StatusChip/StatusChip.vue.d.ts +21 -0
  22. package/components/StatusChip/StatusChip.vue.js +28 -0
  23. package/components/StatusChip/StatusChip.vue2.js +4 -0
  24. package/components/StatusChip/index.d.ts +3 -0
  25. package/components/StatusChip/status-map.d.ts +23 -0
  26. package/components/StatusChip/status-map.js +112 -0
  27. package/composables/useTheme.d.ts +1 -0
  28. package/composables/useTheme.js +20 -12
  29. package/index.d.ts +1 -0
  30. package/index.js +148 -141
  31. package/package.json +1 -1
  32. package/style.css +184 -4
  33. package/types/styles.d.ts +11 -0
@@ -1,6 +1,6 @@
1
- export type BadgeVariant = 'default' | 'secondary' | 'danger' | 'outline' | 'warning' | 'info' | 'success';
1
+ export type BadgeVariant = 'default' | 'secondary' | 'danger' | 'outline' | 'warning' | 'info' | 'success' | 'purple' | 'teal' | 'indigo' | 'orange' | 'pink' | 'cyan';
2
2
  interface Props {
3
- variant?: BadgeVariant;
3
+ variant?: BadgeVariant | string;
4
4
  class?: string;
5
5
  }
6
6
  declare function __VLS_template(): {
@@ -13,7 +13,7 @@ declare function __VLS_template(): {
13
13
  };
14
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
15
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
16
- variant: BadgeVariant;
16
+ variant: BadgeVariant | string;
17
17
  class: string;
18
18
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
19
19
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,27 +1,38 @@
1
- import { defineComponent as o, computed as a, openBlock as c, createElementBlock as d, normalizeClass as i, renderSlot as u } from "vue";
2
- const g = /* @__PURE__ */ o({
1
+ import { defineComponent as b, computed as n, openBlock as a, createElementBlock as l, normalizeClass as u, renderSlot as d } from "vue";
2
+ const c = /* @__PURE__ */ b({
3
3
  __name: "Badge",
4
4
  props: {
5
5
  variant: { default: "default" },
6
6
  class: { default: "" }
7
7
  },
8
- setup(n) {
9
- const e = n, t = a(() => ["inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
10
- default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
11
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
12
- danger: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
13
- warning: "border-transparent bg-warning text-warning-fg hover:bg-warning/80",
14
- info: "border-transparent bg-info text-info-fg hover:bg-info/80",
15
- success: "border-transparent bg-success text-success-fg hover:bg-success/80",
16
- outline: "text-foreground border-border"
17
- }[e.variant], e.class].join(" "));
18
- return (r, s) => (c(), d("div", {
19
- class: i(t.value)
8
+ setup(o) {
9
+ const t = o, s = n(() => {
10
+ const e = "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", r = {
11
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
12
+ outline: "text-foreground border-border",
13
+ /* Base Semantics */
14
+ secondary: "border-secondary-subtle-border bg-secondary-subtle text-secondary-subtle-fg hover:opacity-80",
15
+ danger: "border-danger-subtle-border bg-danger-subtle text-danger-subtle-fg hover:opacity-80",
16
+ warning: "border-warning-subtle-border bg-warning-subtle text-warning-subtle-fg hover:opacity-80",
17
+ info: "border-info-subtle-border bg-info-subtle text-info-subtle-fg hover:opacity-80",
18
+ success: "border-success-subtle-border bg-success-subtle text-success-subtle-fg hover:opacity-80",
19
+ /* Extended Semantics */
20
+ purple: "border-purple-subtle-border bg-purple-subtle text-purple-subtle-fg hover:opacity-80",
21
+ teal: "border-teal-subtle-border bg-teal-subtle text-teal-subtle-fg hover:opacity-80",
22
+ indigo: "border-indigo-subtle-border bg-indigo-subtle text-indigo-subtle-fg hover:opacity-80",
23
+ orange: "border-orange-subtle-border bg-orange-subtle text-orange-subtle-fg hover:opacity-80",
24
+ pink: "border-pink-subtle-border bg-pink-subtle text-pink-subtle-fg hover:opacity-80",
25
+ cyan: "border-cyan-subtle-border bg-cyan-subtle text-cyan-subtle-fg hover:opacity-80"
26
+ };
27
+ return [e, r[t.variant] || r.default, t.class].join(" ");
28
+ });
29
+ return (e, r) => (a(), l("div", {
30
+ class: u(s.value)
20
31
  }, [
21
- u(r.$slots, "default")
32
+ d(e.$slots, "default")
22
33
  ], 2));
23
34
  }
24
35
  });
25
36
  export {
26
- g as default
37
+ c as default
27
38
  };
@@ -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 f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a68fd721"]]);
4
+ const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ae18a95c"]]);
5
5
  export {
6
- f as default
6
+ c as default
7
7
  };
@@ -105,7 +105,7 @@ const D = ["type", "disabled"], q = /* @__PURE__ */ B({
105
105
  });
106
106
  return (n, r) => G((s(), h("button", {
107
107
  type: e.type,
108
- class: i(y.value),
108
+ class: i([y.value, "cursor-pointer"]),
109
109
  disabled: e.disabled || e.loading
110
110
  }, [
111
111
  e.loading ? (s(), d(g, {
@@ -1,4 +1,7 @@
1
1
  import { ChipProps, ChipVariant } from './types';
2
+ interface ExtendedProps extends Omit<ChipProps, 'variant'> {
3
+ variant?: ChipVariant | string;
4
+ }
2
5
  declare function __VLS_template(): {
3
6
  attrs: Partial<{}>;
4
7
  slots: {
@@ -9,15 +12,15 @@ declare function __VLS_template(): {
9
12
  rootEl: HTMLDivElement;
10
13
  };
11
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
- declare const __VLS_component: import('vue').DefineComponent<ChipProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
15
+ declare const __VLS_component: import('vue').DefineComponent<ExtendedProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
13
16
  click: (event: MouseEvent) => any;
14
17
  delete: (event: MouseEvent) => any;
15
- }, string, import('vue').PublicProps, Readonly<ChipProps> & Readonly<{
18
+ }, string, import('vue').PublicProps, Readonly<ExtendedProps> & Readonly<{
16
19
  onClick?: (event: MouseEvent) => any;
17
20
  onDelete?: (event: MouseEvent) => any;
18
21
  }>, {
19
22
  text: string;
20
- variant: ChipVariant;
23
+ variant: ChipVariant | string;
21
24
  size: import('./types').ChipSize;
22
25
  class: string;
23
26
  disabled: boolean;
@@ -1,5 +1,5 @@
1
- import { defineComponent as C, computed as s, openBlock as o, createElementBlock as u, normalizeClass as i, renderSlot as d, createBlock as f, createCommentVNode as c, createTextVNode as z, toDisplayString as B, withCtx as D, createVNode as I } from "vue";
2
- import b from "../Icon.vue.js";
1
+ import { defineComponent as C, computed as l, openBlock as n, createElementBlock as d, normalizeClass as i, renderSlot as b, createBlock as f, createCommentVNode as c, createTextVNode as z, toDisplayString as B, withCtx as D, createVNode as I } from "vue";
2
+ import g from "../Icon.vue.js";
3
3
  import S from "../Button.vue.js";
4
4
  import { $t as N } from "../../utils/i18n.js";
5
5
  const V = ["role", "tabindex"], j = {
@@ -8,10 +8,10 @@ const V = ["role", "tabindex"], j = {
8
8
  }, E = "inline-flex items-center justify-center font-medium rounded-full transition-all duration-200 border box-border whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary", q = /* @__PURE__ */ C({
9
9
  __name: "Chip",
10
10
  props: {
11
+ variant: { default: "subtle" },
11
12
  text: { default: "" },
12
13
  textI18n: {},
13
14
  icon: {},
14
- variant: { default: "subtle" },
15
15
  size: { default: "medium" },
16
16
  disabled: { type: Boolean, default: !1 },
17
17
  clickable: { type: Boolean, default: !1 },
@@ -19,38 +19,46 @@ const V = ["role", "tabindex"], j = {
19
19
  class: { default: "" }
20
20
  },
21
21
  emits: ["click", "delete"],
22
- setup(r, { emit: v }) {
23
- const e = r, n = v, l = s(() => e.textI18n ? N(e.textI18n) : e.text), a = s(() => e.clickable && !e.disabled), g = (t) => {
24
- e.disabled || e.clickable && n("click", t);
22
+ setup(a, { emit: v }) {
23
+ const e = a, s = v, o = l(() => e.textI18n ? N(e.textI18n) : e.text), r = l(() => e.clickable && !e.disabled), p = (t) => {
24
+ e.disabled || e.clickable && s("click", t);
25
25
  }, m = (t) => {
26
- e.disabled || (t.stopPropagation(), n("delete", t));
26
+ e.disabled || (t.stopPropagation(), s("delete", t));
27
27
  }, h = (t) => {
28
- e.disabled || !e.clickable && !e.deletable || ((t.key === "Enter" || t.key === " ") && (t.preventDefault(), e.clickable && n("click", t)), (t.key === "Backspace" || t.key === "Delete") && e.deletable && (t.preventDefault(), n("delete", t)));
29
- }, p = s(() => {
28
+ e.disabled || !e.clickable && !e.deletable || ((t.key === "Enter" || t.key === " ") && (t.preventDefault(), e.clickable && s("click", t)), (t.key === "Backspace" || t.key === "Delete") && e.deletable && (t.preventDefault(), s("delete", t)));
29
+ }, x = l(() => {
30
30
  switch (e.size) {
31
31
  case "small":
32
- return "h-5 text-[10px] px-1.5 gap-1";
32
+ return "h-5.5 text-[11px] px-2.5 gap-1";
33
33
  case "large":
34
34
  return "h-8 text-sm px-3 gap-2";
35
35
  default:
36
36
  return "h-6 text-xs px-2.5 gap-1.5";
37
37
  }
38
- }), x = s(() => {
38
+ }), y = l(() => {
39
39
  if (e.disabled)
40
40
  return "bg-muted text-muted-foreground border-transparent opacity-50 cursor-not-allowed";
41
- const t = a.value ? "cursor-pointer hover:shadow-sm active:scale-[0.98]" : "cursor-default";
42
- return `${{
43
- solid: `bg-primary text-primary-fg border-transparent ${a.value ? "hover:bg-primary/90" : ""}`,
44
- outline: `bg-transparent border-input text-foreground ${a.value ? "hover:bg-accent hover:text-accent-foreground" : ""}`,
45
- ghost: `bg-transparent border-transparent text-muted-foreground ${a.value ? "hover:bg-accent hover:text-accent-foreground" : ""}`,
46
- subtle: `bg-accent/50 text-foreground border-transparent ${a.value ? "hover:bg-accent" : ""}`,
47
- secondary: `bg-secondary text-secondary-foreground border-transparent ${a.value ? "hover:bg-secondary/80" : ""}`,
48
- success: `bg-success text-success-fg border-transparent ${a.value ? "hover:bg-success/80" : ""}`,
49
- warning: `bg-warning text-warning-fg border-transparent ${a.value ? "hover:bg-warning/80" : ""}`,
50
- danger: `bg-destructive text-destructive-foreground border-transparent ${a.value ? "hover:bg-destructive/90" : ""}`,
51
- info: `bg-info text-info-fg border-transparent ${a.value ? "hover:bg-info/80" : ""}`
52
- }[e.variant]} ${t}`;
53
- }), k = s(() => [E, p.value, x.value, e.class].join(" ")), y = s(() => {
41
+ const t = r.value ? "cursor-pointer hover:shadow-sm active:scale-[0.98]" : "cursor-default", u = {
42
+ solid: `bg-primary text-primary-fg border-transparent ${r.value ? "hover:bg-primary/90" : ""}`,
43
+ outline: `bg-transparent border-input text-foreground ${r.value ? "hover:bg-accent hover:text-accent-foreground" : ""}`,
44
+ ghost: `bg-transparent border-transparent text-muted-foreground ${r.value ? "hover:bg-accent hover:text-accent-foreground" : ""}`,
45
+ subtle: `bg-accent/50 text-foreground border-transparent ${r.value ? "hover:bg-accent" : ""}`,
46
+ /* Base Semantics */
47
+ secondary: `bg-secondary-subtle text-secondary-subtle-fg border-secondary-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
48
+ success: `bg-success-subtle text-success-subtle-fg border-success-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
49
+ warning: `bg-warning-subtle text-warning-subtle-fg border-warning-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
50
+ danger: `bg-danger-subtle text-danger-subtle-fg border-danger-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
51
+ info: `bg-info-subtle text-info-subtle-fg border-info-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
52
+ /* Extended Semantics */
53
+ purple: `bg-purple-subtle text-purple-subtle-fg border-purple-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
54
+ teal: `bg-teal-subtle text-teal-subtle-fg border-teal-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
55
+ indigo: `bg-indigo-subtle text-indigo-subtle-fg border-indigo-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
56
+ orange: `bg-orange-subtle text-orange-subtle-fg border-orange-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
57
+ pink: `bg-pink-subtle text-pink-subtle-fg border-pink-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
58
+ cyan: `bg-cyan-subtle text-cyan-subtle-fg border-cyan-subtle-border ${r.value ? "hover:opacity-80" : ""}`
59
+ };
60
+ return `${u[e.variant] || u.subtle} ${t}`;
61
+ }), k = l(() => [E, x.value, y.value, e.class].join(" ")), $ = l(() => {
54
62
  switch (e.size) {
55
63
  case "small":
56
64
  return "h-3 w-3";
@@ -59,7 +67,7 @@ const V = ["role", "tabindex"], j = {
59
67
  default:
60
68
  return "h-3.5 w-3.5";
61
69
  }
62
- }), w = s(() => {
70
+ }), w = l(() => {
63
71
  switch (e.size) {
64
72
  case "small":
65
73
  return "h-2.5 w-2.5";
@@ -69,36 +77,36 @@ const V = ["role", "tabindex"], j = {
69
77
  return "h-3 w-3";
70
78
  }
71
79
  });
72
- return (t, $) => (o(), u("div", {
80
+ return (t, u) => (n(), d("div", {
73
81
  class: i(k.value),
74
- role: r.clickable ? "button" : "status",
75
- tabindex: a.value || r.deletable ? 0 : void 0,
76
- onClick: g,
82
+ role: a.clickable ? "button" : "status",
83
+ tabindex: r.value || a.deletable ? 0 : void 0,
84
+ onClick: p,
77
85
  onKeydown: h
78
86
  }, [
79
- d(t.$slots, "icon", {}, () => [
80
- r.icon ? (o(), f(b, {
87
+ b(t.$slots, "icon", {}, () => [
88
+ a.icon ? (n(), f(g, {
81
89
  key: 0,
82
- icon: r.icon,
83
- class: i([y.value, "shrink-0", l.value ? "-ml-0.5" : ""])
90
+ icon: a.icon,
91
+ class: i([$.value, "shrink-0", o.value ? "-ml-0.5" : ""])
84
92
  }, null, 8, ["icon", "class"])) : c("", !0)
85
93
  ]),
86
- l.value || t.$slots.default ? (o(), u("span", j, [
87
- d(t.$slots, "default", {}, () => [
88
- z(B(l.value), 1)
94
+ o.value || t.$slots.default ? (n(), d("span", j, [
95
+ b(t.$slots, "default", {}, () => [
96
+ z(B(o.value), 1)
89
97
  ])
90
98
  ])) : c("", !0),
91
- r.deletable ? (o(), f(S, {
99
+ a.deletable ? (n(), f(S, {
92
100
  key: 1,
93
101
  variant: "ghost",
94
102
  size: "xs",
95
103
  rounded: "full",
96
- disabled: r.disabled,
97
- class: i(["ml-auto p-0.5! h-auto! w-auto! hover:bg-[#8282823c]", [l.value ? r.size === "small" ? "-mr-0.5" : "-mr-1" : ""]]),
104
+ disabled: a.disabled,
105
+ class: i(["ml-auto p-0.5! h-auto! w-auto! hover:bg-[#8282823c]", [o.value ? a.size === "small" ? "-mr-0.5" : "-mr-1" : ""]]),
98
106
  onClick: m
99
107
  }, {
100
108
  default: D(() => [
101
- I(b, {
109
+ I(g, {
102
110
  icon: "lucide:x",
103
111
  class: i(w.value)
104
112
  }, null, 8, ["class"])
@@ -7,6 +7,7 @@ type __VLS_Props = {
7
7
  placeholder: string;
8
8
  placeholderI18n?: string;
9
9
  maxResultsPerGroup: number;
10
+ onOpenDynamicModal: (body: any, props: any) => void;
10
11
  };
11
12
  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, {
12
13
  inputRef: HTMLInputElement;
@@ -1,7 +1,7 @@
1
1
  import t from "./CommandPaletteContent.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-c2e803a4"]]);
4
+ const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-6b4a4b96"]]);
5
5
  export {
6
6
  r as default
7
7
  };