vlite3 1.3.11 → 1.4.2
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/components/Accordion/Accordion.vue.d.ts +2 -2
- package/components/Accordion/AccordionItem.vue.d.ts +1 -1
- package/components/Accordion/AccordionItem.vue.js +11 -7
- package/components/Accordion/AccordionTrigger.vue.d.ts +1 -1
- package/components/AppShell/AppShell.vue.d.ts +1 -0
- package/components/AppShell/AppShell.vue.js +33 -26
- package/components/AppShell/AppShellLayoutStorefront.vue.d.ts +54 -0
- package/components/AppShell/AppShellLayoutStorefront.vue.js +222 -0
- package/components/AppShell/AppShellLayoutStorefront.vue2.js +4 -0
- package/components/AsyncSelect/createAsyncSelect.js +3 -2
- package/components/CategoryManager/CategoryManager.vue2.js +36 -31
- package/components/CategoryMenu/CategoryMenu.vue.d.ts +22 -0
- package/components/CategoryMenu/CategoryMenu.vue.js +106 -0
- package/components/CategoryMenu/CategoryMenu.vue2.js +4 -0
- package/components/CategoryMenu/CategoryMenuVariant1.vue.d.ts +17 -0
- package/components/CategoryMenu/CategoryMenuVariant1.vue.js +146 -0
- package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +4 -0
- package/components/CategoryMenu/CategoryMenuVariant2.vue.d.ts +18 -0
- package/components/CategoryMenu/CategoryMenuVariant2.vue.js +162 -0
- package/components/CategoryMenu/CategoryMenuVariant2.vue2.js +4 -0
- package/components/CategoryMenu/index.d.ts +2 -0
- package/components/CategoryMenu/types.d.ts +32 -0
- package/components/CategoryMenu/utils.d.ts +16 -0
- package/components/CategoryMenu/utils.js +45 -0
- package/components/ColorPicker/ColorPicker.vue.d.ts +7 -3
- package/components/ColorPicker/ColorPicker.vue.js +59 -45
- package/components/DatePicker.vue.js +5 -4
- package/components/DateRangePicker.vue.js +3 -2
- package/components/Dropdown/Dropdown.vue.d.ts +4 -1
- package/components/Dropdown/Dropdown.vue.js +8 -7
- package/components/Dropdown/DropdownGroupedLayout.vue2.js +5 -2
- package/components/Dropdown/DropdownGroupedLayout.vue3.js +111 -0
- package/components/Dropdown/DropdownItem.vue.d.ts +2 -2
- package/components/Dropdown/DropdownItem.vue.js +66 -49
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +40 -40
- package/components/Dropdown/composables/useDropdownHydration.d.ts +4 -0
- package/components/Dropdown/composables/useDropdownNavigation.js +30 -18
- package/components/Form/Form.vue.d.ts +13 -1
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +313 -275
- package/components/Form/FormField.vue.js +103 -74
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +7 -6
- package/components/Form/composables/useForm.js +71 -67
- package/components/Form/types.d.ts +21 -1
- package/components/IconPicker.vue.js +3 -2
- package/components/ImportData/ImportStep2.vue.js +3 -2
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +4 -0
- package/components/NavbarCommandPalette.vue.d.ts +1 -1
- package/components/PermissionMatrix/PermissionTopBar.vue.js +3 -2
- package/components/RichTextEditor/RichTextEditor.vue.js +43 -48
- package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
- package/components/RichTextEditor/RichTextToolbar.vue.d.ts +12 -3
- package/components/RichTextEditor/{RichTextToolbar.vue.js → RichTextToolbar.vue2.js} +157 -121
- package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
- package/components/RichTextEditor/index.d.ts +2 -0
- package/components/RichTextEditor/types.d.ts +38 -0
- package/components/RichTextEditor/types.js +52 -0
- package/components/Screen/ScreenFilter.vue.js +26 -21
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +2 -2
- package/components/SidebarMenu/SidebarMenuItem.vue.js +3 -2
- package/components/Switch.vue.js +8 -8
- package/components/Tooltip.vue.js +1 -0
- package/components/Workbook/Sheet.vue.d.ts +1 -1
- package/components/Workbook/Sheet.vue.js +14 -13
- package/components/index.d.ts +1 -0
- package/index.d.ts +1 -0
- package/index.js +306 -301
- package/package.json +2 -2
- package/style.css +2 -2
- package/types/appshell.type.d.ts +2 -1
- package/types/styles.d.ts +2 -0
- package/components/Dropdown/DropdownGroupedLayout.vue.js +0 -75
- /package/components/RichTextEditor/{RichTextLinkPopover.vue.js → RichTextLinkPopover.vue2.js} +0 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { defineComponent as V, computed as u, ref as I, onMounted as A, openBlock as s, createElementBlock as l, normalizeClass as M, createVNode as y, unref as L, withCtx as f, createCommentVNode as d, createElementVNode as m, toDisplayString as v, createTextVNode as N, Fragment as D, renderList as S, createBlock as b, resolveDynamicComponent as z, mergeProps as E } from "vue";
|
|
2
|
+
import R from "../Dropdown/Dropdown.vue.js";
|
|
3
|
+
import k from "../Icon.vue.js";
|
|
4
|
+
import "../../core/config.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
8
|
+
import j from "../Button.vue.js";
|
|
9
|
+
import { categoriesToDropdownOptions as H, buildCategoryRoute as q } from "./utils.js";
|
|
10
|
+
const G = {
|
|
11
|
+
class: "flex items-center gap-1 overflow-x-auto -mx-1 px-1 scrollbar-thin",
|
|
12
|
+
style: { "will-change": "transform", contain: "layout style" }
|
|
13
|
+
}, J = ["onMouseenter", "onFocus", "onClick"], K = { class: "truncate max-w-[180px]" }, Q = { class: "truncate max-w-[180px]" }, U = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "flex items-center gap-4 p-4 bg-muted/20 border-t border-border"
|
|
16
|
+
}, W = ["src", "alt"], X = { class: "flex-1 min-w-0" }, Y = { class: "font-semibold text-foreground text-sm truncate" }, Z = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "text-xs text-muted-foreground mt-1 line-clamp-2"
|
|
19
|
+
}, ce = /* @__PURE__ */ V({
|
|
20
|
+
__name: "CategoryMenuVariant2",
|
|
21
|
+
props: {
|
|
22
|
+
items: {},
|
|
23
|
+
maxDepth: {},
|
|
24
|
+
showIcons: { type: Boolean },
|
|
25
|
+
showImages: { type: Boolean },
|
|
26
|
+
showDescriptions: { type: Boolean },
|
|
27
|
+
megaColumns: {},
|
|
28
|
+
activeId: {},
|
|
29
|
+
routePrefix: {},
|
|
30
|
+
class: {}
|
|
31
|
+
},
|
|
32
|
+
emits: ["select"],
|
|
33
|
+
setup(a, { emit: O }) {
|
|
34
|
+
const r = a, p = O, g = u(() => r.items || []), i = I(null), x = I(!1), o = u(
|
|
35
|
+
() => g.value.find((t) => t.id === i.value) || null
|
|
36
|
+
), C = u(
|
|
37
|
+
() => o.value?.children ? H(o.value.children, r.routePrefix, [o.value]) : []
|
|
38
|
+
), _ = u(() => C.value.length > 0), h = (t) => {
|
|
39
|
+
i.value = t.id;
|
|
40
|
+
}, $ = (t) => q(r.routePrefix, t), B = (t) => t ? "router-link" : "button", F = (t) => t ? { to: t } : { type: "button" }, w = (t) => r.activeId ? t.id === r.activeId ? !0 : (t.children || []).some((n) => w(n)) : !1, P = (t) => {
|
|
41
|
+
const n = t.option?.data;
|
|
42
|
+
p("select", n || t);
|
|
43
|
+
}, T = u(() => Math.max(1, Math.min(6, r.megaColumns || 4)));
|
|
44
|
+
return A(() => {
|
|
45
|
+
if (i.value !== null) return;
|
|
46
|
+
const t = g.value.find((n) => n.children && n.children.length > 0);
|
|
47
|
+
t && (i.value = t.id);
|
|
48
|
+
}), (t, n) => (s(), l("nav", {
|
|
49
|
+
class: M(["relative w-full flex", r.class]),
|
|
50
|
+
role: "navigation",
|
|
51
|
+
"aria-label": "Categories"
|
|
52
|
+
}, [
|
|
53
|
+
y(L(R), {
|
|
54
|
+
options: C.value,
|
|
55
|
+
disabled: !_.value,
|
|
56
|
+
layout: "grouped",
|
|
57
|
+
columns: T.value,
|
|
58
|
+
"close-on-select": !0,
|
|
59
|
+
searchable: !1,
|
|
60
|
+
"show-selected-label": !1,
|
|
61
|
+
"show-selected-icon": !1,
|
|
62
|
+
selectable: !0,
|
|
63
|
+
trigger: "hover",
|
|
64
|
+
"keep-alive": !0,
|
|
65
|
+
placement: "bottom-start",
|
|
66
|
+
offset: [0, 4],
|
|
67
|
+
maxHeight: "500px",
|
|
68
|
+
"menu-id": "cat-menu-mega",
|
|
69
|
+
"nested-position": "right-start",
|
|
70
|
+
"nested-offset": [0, -5],
|
|
71
|
+
width: "w-full max-w-5xl",
|
|
72
|
+
onOnSelect: P,
|
|
73
|
+
onOnOpen: n[1] || (n[1] = (e) => x.value = !0),
|
|
74
|
+
onOnClose: n[2] || (n[2] = (e) => x.value = !1)
|
|
75
|
+
}, {
|
|
76
|
+
trigger: f(() => [
|
|
77
|
+
m("div", G, [
|
|
78
|
+
(s(!0), l(D, null, S(g.value, (e) => (s(), l(D, {
|
|
79
|
+
key: e.id
|
|
80
|
+
}, [
|
|
81
|
+
e.children && e.children.length > 0 ? (s(), l("button", {
|
|
82
|
+
key: 0,
|
|
83
|
+
type: "button",
|
|
84
|
+
tabindex: "0",
|
|
85
|
+
class: M([
|
|
86
|
+
"shrink-0 inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-md transition-colors",
|
|
87
|
+
w(e) || i.value === e.id && _.value && x.value ? "bg-primary/10 text-primary" : "text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
88
|
+
]),
|
|
89
|
+
onMouseenter: (c) => h(e),
|
|
90
|
+
onFocus: (c) => h(e),
|
|
91
|
+
onClick: (c) => p("select", e)
|
|
92
|
+
}, [
|
|
93
|
+
r.showIcons && e.icon ? (s(), b(k, {
|
|
94
|
+
key: 0,
|
|
95
|
+
icon: e.icon,
|
|
96
|
+
class: "w-3.5 h-3.5 shrink-0"
|
|
97
|
+
}, null, 8, ["icon"])) : d("", !0),
|
|
98
|
+
m("span", K, v(e.title || e.name), 1),
|
|
99
|
+
y(k, {
|
|
100
|
+
icon: "lucide:chevron-down",
|
|
101
|
+
class: "w-3 h-3 opacity-60"
|
|
102
|
+
})
|
|
103
|
+
], 42, J)) : (s(), b(z(B($(e))), E({
|
|
104
|
+
key: 1,
|
|
105
|
+
ref_for: !0
|
|
106
|
+
}, F($(e)), {
|
|
107
|
+
tabindex: "0",
|
|
108
|
+
class: [
|
|
109
|
+
"shrink-0 inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-md transition-colors",
|
|
110
|
+
w(e) ? "bg-primary/10 text-primary" : "text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
111
|
+
],
|
|
112
|
+
onMouseenter: (c) => h(e),
|
|
113
|
+
onFocus: (c) => h(e),
|
|
114
|
+
onClick: (c) => p("select", e)
|
|
115
|
+
}), {
|
|
116
|
+
default: f(() => [
|
|
117
|
+
r.showIcons && e.icon ? (s(), b(k, {
|
|
118
|
+
key: 0,
|
|
119
|
+
icon: e.icon,
|
|
120
|
+
class: "w-3.5 h-3.5 shrink-0"
|
|
121
|
+
}, null, 8, ["icon"])) : d("", !0),
|
|
122
|
+
m("span", Q, v(e.title || e.name), 1)
|
|
123
|
+
]),
|
|
124
|
+
_: 2
|
|
125
|
+
}, 1040, ["class", "onMouseenter", "onFocus", "onClick"]))
|
|
126
|
+
], 64))), 128))
|
|
127
|
+
])
|
|
128
|
+
]),
|
|
129
|
+
footer: f(() => [
|
|
130
|
+
o.value && (a.showImages && o.value.image || a.showDescriptions && o.value.description) ? (s(), l("div", U, [
|
|
131
|
+
a.showImages && o.value.image ? (s(), l("img", {
|
|
132
|
+
key: 0,
|
|
133
|
+
src: o.value.image,
|
|
134
|
+
alt: o.value.title || "Category",
|
|
135
|
+
class: "w-24 h-16 object-cover rounded-md shadow-sm border border-border"
|
|
136
|
+
}, null, 8, W)) : d("", !0),
|
|
137
|
+
m("div", X, [
|
|
138
|
+
m("h4", Y, v(o.value.title || o.value.name), 1),
|
|
139
|
+
a.showDescriptions && o.value.description ? (s(), l("p", Z, v(o.value.description), 1)) : d("", !0)
|
|
140
|
+
]),
|
|
141
|
+
y(j, {
|
|
142
|
+
variant: "outline",
|
|
143
|
+
size: "sm",
|
|
144
|
+
class: "shrink-0",
|
|
145
|
+
"icon-right": "lucide:arrow-right",
|
|
146
|
+
onClick: n[0] || (n[0] = (e) => p("select", o.value))
|
|
147
|
+
}, {
|
|
148
|
+
default: f(() => [
|
|
149
|
+
N(" Shop All " + v(o.value.title || o.value.name), 1)
|
|
150
|
+
]),
|
|
151
|
+
_: 1
|
|
152
|
+
})
|
|
153
|
+
])) : d("", !0)
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
}, 8, ["options", "disabled", "columns"])
|
|
157
|
+
], 2));
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
export {
|
|
161
|
+
ce as default
|
|
162
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CategoryItem } from '../CategoryManager/types';
|
|
2
|
+
export type CategoryMenuVariant = 'tabs' | 'mega' | 'sidebar';
|
|
3
|
+
export type CategoryMenuItem = CategoryItem;
|
|
4
|
+
export interface CategoryMenuProps {
|
|
5
|
+
/** Hierarchical category tree. Accepts the same shape as `CategoryManager`. */
|
|
6
|
+
items?: CategoryMenuItem[];
|
|
7
|
+
/** Layout variant. See {@link CategoryMenuVariant}. */
|
|
8
|
+
variant?: CategoryMenuVariant;
|
|
9
|
+
/** Maximum depth to render. `1` = top-level only. Defaults to `2`. */
|
|
10
|
+
maxDepth?: number;
|
|
11
|
+
/** Whether to render the icon prefix on each item. Defaults to `true`. */
|
|
12
|
+
showIcons?: boolean;
|
|
13
|
+
/** Show an "All" / "Shop all" pseudo-item at the start. */
|
|
14
|
+
showAllItem?: boolean;
|
|
15
|
+
/** Label for the "All" item (only used when `showAllItem` is true). */
|
|
16
|
+
allItemLabel?: string;
|
|
17
|
+
/** When `true`, multiple parent categories can be open at once (sidebar/accordion). */
|
|
18
|
+
multiExpand?: boolean;
|
|
19
|
+
/** Active category id (highlights the matching node). */
|
|
20
|
+
activeId?: string | number | null;
|
|
21
|
+
/** Route prefix used to auto-generate Vue Router links for every category. */
|
|
22
|
+
routePrefix?: string;
|
|
23
|
+
/** Tailwind breakpoint where the desktop mega menu collapses to mobile. */
|
|
24
|
+
mobileBreakpoint?: 'sm' | 'md' | 'lg' | 'xl';
|
|
25
|
+
/** Number of columns in the mega menu. Defaults to `4`. */
|
|
26
|
+
megaColumns?: number;
|
|
27
|
+
/** Whether to render the category image in mega-menu columns. */
|
|
28
|
+
showImages?: boolean;
|
|
29
|
+
/** Whether to render the description in mega-menu columns. */
|
|
30
|
+
showDescriptions?: boolean;
|
|
31
|
+
class?: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IDropdownOption } from '../../types';
|
|
2
|
+
import { CategoryMenuItem } from './types';
|
|
3
|
+
export declare const CATEGORY_MENU_ROUTE_PREFIX_KEY: unique symbol;
|
|
4
|
+
export declare function slugifyCategorySegment(value: unknown): string;
|
|
5
|
+
export declare function normalizeRoutePrefix(prefix?: string | null): string;
|
|
6
|
+
export declare function buildCategoryRoute(routePrefix: string | undefined | null, item: CategoryMenuItem, ancestors?: CategoryMenuItem[]): string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Convert a single CategoryMenuItem into an IDropdownOption.
|
|
9
|
+
* Preserves the original item on `option.data` so consumers can recover
|
|
10
|
+
* it from `@on-select` payloads.
|
|
11
|
+
*/
|
|
12
|
+
export declare function categoryToDropdownOption(item: CategoryMenuItem, routePrefix?: string, ancestors?: CategoryMenuItem[]): IDropdownOption;
|
|
13
|
+
/**
|
|
14
|
+
* Convert a CategoryMenuItem[] tree to an IDropdownOption[] list.
|
|
15
|
+
*/
|
|
16
|
+
export declare function categoriesToDropdownOptions(items: CategoryMenuItem[], routePrefix?: string, ancestors?: CategoryMenuItem[]): IDropdownOption[];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const d = /* @__PURE__ */ Symbol("category-menu-route-prefix"), i = (n) => String(n.slug || n.title || n.name || n.label || n.id || "category");
|
|
2
|
+
function c(n) {
|
|
3
|
+
return String(n ?? "").normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/&/g, " and ").toLowerCase().trim().replace(/['"]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
4
|
+
}
|
|
5
|
+
function g(n) {
|
|
6
|
+
if (!n) return "";
|
|
7
|
+
const r = n.trim();
|
|
8
|
+
return r ? (r.startsWith("/") ? r : `/${r}`).replace(/\/+$/g, "") : "";
|
|
9
|
+
}
|
|
10
|
+
function u(n, r, e = []) {
|
|
11
|
+
const o = g(n);
|
|
12
|
+
if (!o) return;
|
|
13
|
+
const t = [...e, r].map((l) => c(i(l))).filter(Boolean).join("-");
|
|
14
|
+
return t ? `${o}/${t}` : o;
|
|
15
|
+
}
|
|
16
|
+
function a(n, r, e = []) {
|
|
17
|
+
return {
|
|
18
|
+
label: n.title || n.name || "Untitled",
|
|
19
|
+
to: u(r, n, e),
|
|
20
|
+
value: n.id,
|
|
21
|
+
icon: n.icon,
|
|
22
|
+
description: n.description,
|
|
23
|
+
badge: n.badge,
|
|
24
|
+
// Preserve any consumer-specific fields by attaching the original item.
|
|
25
|
+
// The Dropdown passes `option` through `@on-select`, so the consumer
|
|
26
|
+
// can do `option.data` to recover the original CategoryMenuItem.
|
|
27
|
+
data: n,
|
|
28
|
+
// Recursively convert children — Dropdown's nested-Dropdown machinery
|
|
29
|
+
// picks these up automatically and renders them in a side popover.
|
|
30
|
+
children: n.children && n.children.length > 0 ? n.children.map(
|
|
31
|
+
(o) => a(o, r, [...e, n])
|
|
32
|
+
) : void 0
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function p(n, r, e = []) {
|
|
36
|
+
return (n || []).map((o) => a(o, r, e));
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
d as CATEGORY_MENU_ROUTE_PREFIX_KEY,
|
|
40
|
+
u as buildCategoryRoute,
|
|
41
|
+
p as categoriesToDropdownOptions,
|
|
42
|
+
a as categoryToDropdownOption,
|
|
43
|
+
g as normalizeRoutePrefix,
|
|
44
|
+
c as slugifyCategorySegment
|
|
45
|
+
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { TooltTipPlacement } from 'v-tooltip-lite/types';
|
|
2
|
-
import { ButtonProps } from '../../types';
|
|
2
|
+
import { ButtonProps, InputSize, InputVariant, InputRounded } from '../../types';
|
|
3
3
|
interface Props {
|
|
4
4
|
modelValue?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
|
-
size?:
|
|
6
|
+
size?: InputSize;
|
|
7
|
+
variant?: InputVariant;
|
|
8
|
+
rounded?: InputRounded;
|
|
7
9
|
position?: TooltTipPlacement;
|
|
8
10
|
btnProps?: ButtonProps;
|
|
9
11
|
showInput?: boolean;
|
|
@@ -15,7 +17,9 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
15
17
|
onChange?: (value: string) => any;
|
|
16
18
|
"onUpdate:modelValue"?: (value: string) => any;
|
|
17
19
|
}>, {
|
|
18
|
-
|
|
20
|
+
variant: InputVariant;
|
|
21
|
+
size: InputSize;
|
|
22
|
+
rounded: InputRounded;
|
|
19
23
|
disabled: boolean;
|
|
20
24
|
modelValue: string;
|
|
21
25
|
position: TooltTipPlacement;
|
|
@@ -1,97 +1,111 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as C, ref as p, watch as d, openBlock as s, createBlock as v, unref as b, withCtx as u, createElementBlock as h, createVNode as c, createCommentVNode as m, createElementVNode as n, normalizeClass as $, normalizeStyle as B } from "vue";
|
|
2
|
+
import O from "../Dropdown/Dropdown.vue.js";
|
|
3
3
|
import "@iconify/vue";
|
|
4
|
-
import
|
|
4
|
+
import y from "../Input.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
import "../../core/config.js";
|
|
7
|
+
/* empty css */
|
|
7
8
|
/* empty css */
|
|
8
|
-
import
|
|
9
|
-
import
|
|
9
|
+
import E from "../Button.vue.js";
|
|
10
|
+
import _ from "./ColorIro.vue.js";
|
|
10
11
|
/* empty css */
|
|
11
|
-
import { useEyeDropper as
|
|
12
|
-
const
|
|
12
|
+
import { useEyeDropper as I } from "@vueuse/core";
|
|
13
|
+
const N = { class: "absolute left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center z-20 pointer-events-none" }, j = {
|
|
13
14
|
key: 0,
|
|
14
15
|
class: "p-1 w-max flex flex-col justify-center"
|
|
15
|
-
},
|
|
16
|
+
}, D = {
|
|
16
17
|
key: 0,
|
|
17
18
|
class: "flex items-center gap-1.5 w-full"
|
|
18
|
-
},
|
|
19
|
+
}, P = { class: "w-32" }, T = /* @__PURE__ */ C({
|
|
19
20
|
__name: "ColorPicker",
|
|
20
21
|
props: {
|
|
21
22
|
modelValue: { default: "#000000" },
|
|
22
23
|
disabled: { type: Boolean, default: !1 },
|
|
23
24
|
size: { default: "md" },
|
|
25
|
+
variant: { default: "outline" },
|
|
26
|
+
rounded: { default: "md" },
|
|
24
27
|
position: { default: "bottom" },
|
|
25
28
|
btnProps: {},
|
|
26
29
|
showInput: { type: Boolean, default: !0 }
|
|
27
30
|
},
|
|
28
31
|
emits: ["update:modelValue", "change"],
|
|
29
|
-
setup(o, { emit:
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
+
setup(o, { emit: x }) {
|
|
33
|
+
const i = o, f = x, r = p(!1), t = p(i.modelValue || "#000000"), { isSupported: V, open: g, sRGBHex: k } = I();
|
|
34
|
+
d(k, (e) => {
|
|
32
35
|
e && (t.value = e);
|
|
33
36
|
});
|
|
34
|
-
const
|
|
37
|
+
const z = async () => {
|
|
35
38
|
try {
|
|
36
39
|
await g();
|
|
37
40
|
} catch (e) {
|
|
38
41
|
console.error("Error opening eyedropper:", e);
|
|
39
42
|
}
|
|
40
43
|
};
|
|
41
|
-
|
|
42
|
-
() =>
|
|
44
|
+
d(
|
|
45
|
+
() => i.modelValue,
|
|
43
46
|
(e) => {
|
|
44
47
|
e && e !== t.value && (t.value = e);
|
|
45
48
|
}
|
|
46
|
-
),
|
|
47
|
-
/^#([0-9A-F]{3,8})$/i.test(e) && e !==
|
|
49
|
+
), d(t, (e) => {
|
|
50
|
+
/^#([0-9A-F]{3,8})$/i.test(e) && e !== i.modelValue && (f("update:modelValue", e), f("change", e));
|
|
48
51
|
});
|
|
49
|
-
const
|
|
52
|
+
const w = (e) => {
|
|
50
53
|
t.value = e;
|
|
51
54
|
};
|
|
52
|
-
return (e, l) => (
|
|
55
|
+
return (e, l) => (s(), v(b(O), {
|
|
53
56
|
disabled: o.disabled,
|
|
54
|
-
class: "w-
|
|
57
|
+
class: "w-full",
|
|
55
58
|
position: o.position,
|
|
56
59
|
offset: [0, 8],
|
|
57
60
|
searchable: !1,
|
|
58
61
|
"close-on-select": !1,
|
|
59
|
-
onOnOpen: l[1] || (l[1] = (
|
|
60
|
-
onOnClose: l[2] || (l[2] = (
|
|
62
|
+
onOnOpen: l[1] || (l[1] = (a) => r.value = !0),
|
|
63
|
+
onOnClose: l[2] || (l[2] = (a) => r.value = !1)
|
|
61
64
|
}, {
|
|
62
|
-
trigger: u(({ isOpen:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
trigger: u(({ isOpen: a }) => [
|
|
66
|
+
n("div", {
|
|
67
|
+
class: $(["w-full relative cursor-pointer", [o.disabled ? "opacity-50 pointer-events-none" : ""]])
|
|
68
|
+
}, [
|
|
69
|
+
c(y, {
|
|
70
|
+
"model-value": o.modelValue,
|
|
71
|
+
readonly: "",
|
|
72
|
+
disabled: o.disabled,
|
|
73
|
+
size: o.size,
|
|
74
|
+
variant: o.variant,
|
|
75
|
+
rounded: o.rounded,
|
|
76
|
+
class: "pointer-events-none",
|
|
77
|
+
"input-class": "pl-9 font-mono uppercase cursor-pointer"
|
|
78
|
+
}, null, 8, ["model-value", "disabled", "size", "variant", "rounded"]),
|
|
79
|
+
n("div", N, [
|
|
80
|
+
n("div", {
|
|
81
|
+
class: "w-4 h-4 rounded-full shadow-[inset_0_0_0_1px_rgba(0,0,0,0.1)] dark:shadow-[inset_0_0_0_1px_rgba(255,255,255,0.1)]",
|
|
82
|
+
style: B({ backgroundColor: o.modelValue })
|
|
83
|
+
}, null, 4)
|
|
84
|
+
])
|
|
85
|
+
], 2)
|
|
72
86
|
]),
|
|
73
87
|
default: u(() => [
|
|
74
|
-
|
|
75
|
-
|
|
88
|
+
r.value ? (s(), h("div", j, [
|
|
89
|
+
c(_, {
|
|
76
90
|
color: o.modelValue,
|
|
77
91
|
"show-header": !1,
|
|
78
92
|
size: o.size,
|
|
79
|
-
"onUpdate:color":
|
|
93
|
+
"onUpdate:color": w
|
|
80
94
|
}, {
|
|
81
95
|
bottom: u(() => [
|
|
82
|
-
o.showInput ? (
|
|
83
|
-
|
|
96
|
+
o.showInput ? (s(), h("div", D, [
|
|
97
|
+
b(V) ? (s(), v(E, {
|
|
84
98
|
key: 0,
|
|
85
|
-
onClick:
|
|
99
|
+
onClick: z,
|
|
86
100
|
icon: "pepicons-pop:color-picker",
|
|
87
101
|
variant: "outline",
|
|
88
102
|
size: "sm",
|
|
89
103
|
class: "px-2 shrink-0"
|
|
90
|
-
})) :
|
|
91
|
-
|
|
92
|
-
|
|
104
|
+
})) : m("", !0),
|
|
105
|
+
n("div", P, [
|
|
106
|
+
c(y, {
|
|
93
107
|
modelValue: t.value,
|
|
94
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
108
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => t.value = a),
|
|
95
109
|
size: "sm",
|
|
96
110
|
"show-clear-button": !1,
|
|
97
111
|
placeholder: "#000000",
|
|
@@ -99,16 +113,16 @@ const I = {
|
|
|
99
113
|
"input-class": "font-mono text-xs uppercase "
|
|
100
114
|
}, null, 8, ["modelValue"])
|
|
101
115
|
])
|
|
102
|
-
])) :
|
|
116
|
+
])) : m("", !0)
|
|
103
117
|
]),
|
|
104
118
|
_: 1
|
|
105
119
|
}, 8, ["color", "size"])
|
|
106
|
-
])) :
|
|
120
|
+
])) : m("", !0)
|
|
107
121
|
]),
|
|
108
122
|
_: 1
|
|
109
123
|
}, 8, ["disabled", "position"]));
|
|
110
124
|
}
|
|
111
125
|
});
|
|
112
126
|
export {
|
|
113
|
-
|
|
127
|
+
T as default
|
|
114
128
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, computed as m, openBlock as w, createBlock as $, unref as D, withCtx as h, createElementVNode as z, createVNode as g, renderSlot as L, mergeProps as x } from "vue";
|
|
2
2
|
import P from "./Button.vue.js";
|
|
3
3
|
import B from "./Dropdown/Dropdown.vue.js";
|
|
4
4
|
import "@iconify/vue";
|
|
5
5
|
import { $t as V } from "../utils/i18n.js";
|
|
6
6
|
/* empty css */
|
|
7
|
+
/* empty css */
|
|
7
8
|
/* empty css */
|
|
8
9
|
import U, { TimePicker as j } from "v-datepicker-lite";
|
|
9
10
|
import "v-datepicker-lite/style.css";
|
|
10
|
-
const C = { class: "overflow-hidden min-w-[300px]" },
|
|
11
|
+
const C = { class: "overflow-hidden min-w-[300px]" }, J = /* @__PURE__ */ p({
|
|
11
12
|
__name: "DatePicker",
|
|
12
13
|
props: {
|
|
13
14
|
placeholder: {},
|
|
@@ -160,7 +161,7 @@ const C = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ z({
|
|
|
160
161
|
])
|
|
161
162
|
]),
|
|
162
163
|
default: h(() => [
|
|
163
|
-
|
|
164
|
+
z("div", C, [
|
|
164
165
|
g(D(U), {
|
|
165
166
|
value: T.value,
|
|
166
167
|
mode: t.mode,
|
|
@@ -211,5 +212,5 @@ const C = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ z({
|
|
|
211
212
|
}
|
|
212
213
|
});
|
|
213
214
|
export {
|
|
214
|
-
|
|
215
|
+
J as default
|
|
215
216
|
};
|
|
@@ -3,6 +3,7 @@ import E from "./Dropdown/Dropdown.vue.js";
|
|
|
3
3
|
import R from "./Icon.vue.js";
|
|
4
4
|
import { $t as l } from "../utils/i18n.js";
|
|
5
5
|
/* empty css */
|
|
6
|
+
/* empty css */
|
|
6
7
|
/* empty css */
|
|
7
8
|
import P from "./Button.vue.js";
|
|
8
9
|
import p from "v-datepicker-lite";
|
|
@@ -10,7 +11,7 @@ import "v-datepicker-lite/style.css";
|
|
|
10
11
|
const j = { class: "flex items-center justify-start gap-2 w-full" }, H = { class: "flex flex-col sm:flex-row bg-background rounded-md" }, Q = {
|
|
11
12
|
key: 0,
|
|
12
13
|
class: "flex flex-col gap-1 sm:pr-3 py-2 sm:border-r border-border max-h-[280px]"
|
|
13
|
-
}, O = { class: "flex flex-col sm:flex-row items-center gap-4 py-2 p-3" }, I = { class: "border border-border rounded-md overflow-hidden bg-background" }, U = { class: "flex items-center justify-center shrink-0" }, q = { class: "border border-border rounded-md overflow-hidden bg-background" },
|
|
14
|
+
}, O = { class: "flex flex-col sm:flex-row items-center gap-4 py-2 p-3" }, I = { class: "border border-border rounded-md overflow-hidden bg-background" }, U = { class: "flex items-center justify-center shrink-0" }, q = { class: "border border-border rounded-md overflow-hidden bg-background" }, le = /* @__PURE__ */ $({
|
|
14
15
|
__name: "DateRangePicker",
|
|
15
16
|
props: {
|
|
16
17
|
modelValue: {},
|
|
@@ -236,5 +237,5 @@ const j = { class: "flex items-center justify-start gap-2 w-full" }, H = { class
|
|
|
236
237
|
}
|
|
237
238
|
});
|
|
238
239
|
export {
|
|
239
|
-
|
|
240
|
+
le as default
|
|
240
241
|
};
|
|
@@ -41,6 +41,7 @@ type __VLS_Props = {
|
|
|
41
41
|
disabled?: boolean;
|
|
42
42
|
readonly?: boolean;
|
|
43
43
|
variant?: 'default' | 'transparent' | 'secondary';
|
|
44
|
+
trigger?: import('v-tooltip-lite/types').TooltTipTrigger;
|
|
44
45
|
};
|
|
45
46
|
declare function __VLS_template(): {
|
|
46
47
|
attrs: Partial<{}>;
|
|
@@ -48,7 +49,7 @@ declare function __VLS_template(): {
|
|
|
48
49
|
trigger?(_: {
|
|
49
50
|
selectedLabel: string;
|
|
50
51
|
selectedIcon: string;
|
|
51
|
-
isOpen:
|
|
52
|
+
isOpen: any;
|
|
52
53
|
}): any;
|
|
53
54
|
menu?(_: {}): any;
|
|
54
55
|
default?(_: {}): any;
|
|
@@ -92,12 +93,14 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
92
93
|
onOnOpen?: () => any;
|
|
93
94
|
"onUpdate:isOpen"?: (value: boolean) => any;
|
|
94
95
|
}>, {
|
|
96
|
+
width: string;
|
|
95
97
|
variant: "default" | "transparent" | "secondary";
|
|
96
98
|
columns: number | string;
|
|
97
99
|
loading: boolean;
|
|
98
100
|
readonly: boolean;
|
|
99
101
|
disabled: boolean;
|
|
100
102
|
layout: "default" | "grouped";
|
|
103
|
+
trigger: import('v-tooltip-lite/types').TooltTipTrigger;
|
|
101
104
|
direction: "ltr" | "rtl";
|
|
102
105
|
selectable: boolean;
|
|
103
106
|
options: (IDropdownOption | string | number)[];
|
|
@@ -26,8 +26,8 @@ const He = /* @__PURE__ */ ae({
|
|
|
26
26
|
teleport: { type: Boolean, default: !0 },
|
|
27
27
|
selectedIndex: { default: null },
|
|
28
28
|
maxHeight: { default: "300px" },
|
|
29
|
-
width: {},
|
|
30
|
-
minWidth: { default: "
|
|
29
|
+
width: { default: "min-content" },
|
|
30
|
+
minWidth: { default: "140px" },
|
|
31
31
|
ignoreClickOutside: {},
|
|
32
32
|
menuId: {},
|
|
33
33
|
nestedPosition: {},
|
|
@@ -49,7 +49,8 @@ const He = /* @__PURE__ */ ae({
|
|
|
49
49
|
isNested: { type: Boolean, default: !1 },
|
|
50
50
|
disabled: { type: Boolean, default: !1 },
|
|
51
51
|
readonly: { type: Boolean, default: !1 },
|
|
52
|
-
variant: { default: "default" }
|
|
52
|
+
variant: { default: "default" },
|
|
53
|
+
trigger: { default: "click" }
|
|
53
54
|
},
|
|
54
55
|
emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
|
|
55
56
|
setup(t, { emit: U }) {
|
|
@@ -189,7 +190,7 @@ const He = /* @__PURE__ */ ae({
|
|
|
189
190
|
}, [
|
|
190
191
|
N(u(be), {
|
|
191
192
|
content: "",
|
|
192
|
-
trigger:
|
|
193
|
+
trigger: t.trigger,
|
|
193
194
|
arrow: !1,
|
|
194
195
|
disabled: t.disabled || t.readonly,
|
|
195
196
|
teleport: t.teleport,
|
|
@@ -199,12 +200,12 @@ const He = /* @__PURE__ */ ae({
|
|
|
199
200
|
keepAlive: C.value > 0,
|
|
200
201
|
menuId: I.value,
|
|
201
202
|
ignoreClickOutside: te.value,
|
|
202
|
-
class: "w-full",
|
|
203
|
+
class: "w-full flex!",
|
|
203
204
|
className: "dropdown " + (t.className || "") + (t.variant === "transparent" ? " unstyled-dropdown" : "") + (t.variant === "secondary" ? " dropdown-secondary" : ""),
|
|
204
205
|
onOnShow: o[2] || (o[2] = (n) => e.$emit("onOpen")),
|
|
205
206
|
onOnHide: o[3] || (o[3] = (n) => e.$emit("onClose")),
|
|
206
207
|
"onUpdate:isOpen": A,
|
|
207
|
-
triggerClass: "w-full",
|
|
208
|
+
triggerClass: "w-full flex items-center",
|
|
208
209
|
styles: {
|
|
209
210
|
padding: "0",
|
|
210
211
|
...t.width ? { width: t.width, maxWidth: t.width } : {},
|
|
@@ -290,7 +291,7 @@ const He = /* @__PURE__ */ ae({
|
|
|
290
291
|
]), 1032, ["options", "cachedOptions", "class", "emptyMessage", "searchEmptyMessage", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "isCustomSlotMenu", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : ye("", !0)
|
|
291
292
|
]),
|
|
292
293
|
_: 3
|
|
293
|
-
}, 8, ["disabled", "teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className", "styles"]),
|
|
294
|
+
}, 8, ["trigger", "disabled", "teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className", "styles"]),
|
|
294
295
|
N(we, {
|
|
295
296
|
show: b.value,
|
|
296
297
|
title: r.value.title,
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./DropdownGroupedLayout.vue3.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-512aa158"]]);
|
|
2
5
|
export {
|
|
3
|
-
|
|
6
|
+
m as default
|
|
4
7
|
};
|