vlite3 1.4.40 → 1.5.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/components/AppShell/AppShellLayoutClassic.vue.js +27 -28
- package/components/AppShell/AppShellLayoutDashboard.vue.js +48 -48
- package/components/AppShell/AppShellLayoutDock.vue.js +51 -51
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +69 -69
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.d.ts +2 -2
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +78 -78
- package/components/AppShell/AppShellLayoutStorefront.vue.js +14 -15
- package/components/AppShell/useAppShell.d.ts +4 -0
- package/components/AppShell/useAppShell.js +45 -40
- package/components/AsyncSelect/createAsyncSelect.js +10 -10
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +50 -2
- package/components/AttachmentsList/AttachmentsList.vue.js +289 -272
- package/components/AttachmentsList/types.d.ts +37 -0
- package/components/BackButton.vue.js +2 -2
- package/components/Button.vue.d.ts +1 -0
- package/components/Button.vue.js +5 -241
- package/components/Button.vue2.js +245 -2
- package/components/ButtonGroup.vue.js +2 -2
- package/components/ButtonGroup.vue2.js +4 -1
- package/components/Calendar/Calendar.vue2.js +16 -16
- package/components/Cart/CartCouponInput.vue.js +24 -24
- package/components/Cart/CartEmptyState.vue.js +4 -4
- package/components/Cart/CartLineItem.vue.js +33 -33
- package/components/Cart/CartVariant1.vue.js +3 -3
- package/components/Cart/CartVariant2.vue.js +5 -5
- package/components/Cart/CartVariant3.vue.js +25 -25
- package/components/Cart/CartVariant4.vue.js +9 -9
- package/components/CategoryManager/CategoryManager.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue2.js +18 -18
- package/components/CategoryManager/CategoryNode.vue.js +4 -4
- package/components/CategoryMenu/CategoryMenu.vue.js +3 -2
- package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +3 -2
- package/components/Chat/ChatInterface.vue.js +23 -23
- package/components/Clipboard.vue.d.ts +7 -1
- package/components/Clipboard.vue.js +19 -17
- package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +22 -22
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +8 -8
- package/components/Comment/CommentEditor.vue.js +14 -14
- package/components/Comment/CommentItem.vue2.js +6 -6
- package/components/Comment/CommentThread.vue.js +4 -4
- package/components/DataList/DataList.vue.js +7 -7
- package/components/DataTable/DataTable.vue.d.ts +9 -1
- package/components/DataTable/DataTable.vue.js +374 -263
- package/components/DataTable/DataTableRow.vue.d.ts +23 -2
- package/components/DataTable/DataTableRow.vue.js +5 -198
- package/components/DataTable/DataTableRow.vue2.js +360 -2
- package/components/DataTable/dataTableHeaders.d.ts +18 -0
- package/components/DataTable/dataTableHeaders.js +9 -0
- package/components/DataTable/types.d.ts +6 -0
- package/components/DatePicker.vue.js +8 -9
- package/components/DateRangePicker.vue2.js +34 -34
- package/components/Dropdown/Dropdown.vue.d.ts +7 -2
- package/components/Dropdown/Dropdown.vue.js +146 -139
- package/components/Dropdown/DropdownTrigger.vue.js +6 -6
- package/components/ExportData/ExportData.vue.js +15 -15
- package/components/FilePicker/FilePickerDropzone.vue.js +16 -16
- package/components/FilePicker/FilePickerInput.vue.js +3 -2
- package/components/FilePicker/FilePreview.vue.js +3 -3
- package/components/FileTree/FileTree.vue.js +4 -4
- package/components/FileTree/FileTree.vue2.js +9 -9
- package/components/FileTree/FileTreeNode.vue.js +76 -72
- package/components/Footer/Variant1.vue.js +48 -48
- package/components/Footer/Variant2.vue.js +42 -42
- package/components/Form/AccordionView.vue.d.ts +1 -1
- package/components/Form/AccordionView.vue.js +2 -2
- package/components/Form/AccordionView.vue3.js +61 -57
- package/components/Form/Form.vue2.js +41 -41
- package/components/Form/TableRow.vue.d.ts +7 -0
- package/components/Form/TableRow.vue.js +187 -41
- package/components/Form/TableView.vue.d.ts +11 -1
- package/components/Form/TableView.vue.js +71 -49
- package/components/Form/composables/useForm.js +146 -142
- package/components/Form/index.vue.d.ts +5 -1
- package/components/Form/index.vue.js +2 -2
- package/components/Form/index.vue2.js +44 -37
- package/components/Form/rowHelpers.d.ts +20 -0
- package/components/Form/rowHelpers.js +76 -28
- package/components/Form/types.d.ts +11 -0
- package/components/GoogleLogin.vue.js +4 -4
- package/components/IconPicker.vue.js +9 -9
- package/components/ImportData/ImportData.vue.js +11 -11
- package/components/ImportData/ImportStep1.vue.js +10 -10
- package/components/ImportData/ImportStep2.vue.js +15 -14
- package/components/Input.vue.js +133 -129
- package/components/Kanban/KanbanBoard.vue.js +1 -1
- package/components/Kanban/KanbanBoard.vue2.js +9 -9
- package/components/MultiSelect/MultiSelect.vue.js +3 -2
- package/components/Navbar/Navbar.vue.js +17 -17
- package/components/Navbar/NavbarGroup.vue.js +8 -7
- package/components/Navbar/NavbarItem.vue.js +40 -39
- package/components/Navbar/NavbarTabs.vue.js +6 -184
- package/components/Navbar/NavbarTabs.vue2.js +204 -0
- package/components/Navbar/useNavbar.js +3 -3
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +81 -77
- package/components/OTPInput/OTPInput.vue.js +24 -23
- package/components/Pagination/Pagination.vue.d.ts +1 -1
- package/components/Pagination/Pagination.vue.js +5 -274
- package/components/Pagination/Pagination.vue2.js +283 -2
- package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
- package/components/PricingPlan/PricingPlanItem.vue.js +7 -7
- package/components/Screen/Screen.vue.d.ts +1 -1
- package/components/Screen/Screen.vue.js +21 -21
- package/components/Screen/ScreenFilter.vue.js +5 -5
- package/components/Screen/components/ScreenAddAction.vue.js +3 -3
- package/components/Screen/components/ScreenEmptyState.vue.js +10 -10
- package/components/Screen/components/ScreenExportModal.vue.js +12 -12
- package/components/Screen/components/ScreenOptionsDropdown.vue.js +5 -5
- package/components/Screen/components/ScreenToolbar.vue.js +15 -15
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +6 -6
- package/components/SidebarMenu/SidebarMenu.vue.js +77 -72
- package/components/SidebarMenu/SidebarMenuItem.vue.js +172 -168
- package/components/Slider.vue.js +123 -108
- package/components/Tabes/Tabes.vue.d.ts +25 -4
- package/components/Tabes/Tabes.vue.js +3 -3
- package/components/Tabes/Tabes.vue2.js +274 -211
- package/components/Tabes/tabes.utils.d.ts +30 -0
- package/components/Tabes/tabes.utils.js +49 -18
- package/components/Tabes/types.d.ts +7 -0
- package/components/Textarea.vue.d.ts +2 -0
- package/components/Textarea.vue.js +19 -16
- package/components/ThemeToggle.vue.js +8 -8
- package/components/ToastNotification.vue2.js +10 -10
- package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
- package/components/TreeConnectors/TreeConnectors.vue.js +13 -8
- package/components/TreeConnectors/geometry.js +77 -69
- package/components/Workbook/WorkbookAddButton.vue.js +2 -2
- package/composables/useRtl.d.ts +14 -0
- package/composables/useRtl.js +33 -0
- package/index.js +470 -471
- package/package.json +5 -4
- package/style.css +86 -1
- package/types/button.d.ts +8 -0
- package/components/Navbar/NavbarTabs.vue3.js +0 -5
|
@@ -6,6 +6,43 @@ export interface AttachmentItem {
|
|
|
6
6
|
fileType?: string;
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Scoped props passed to the `#item` slot.
|
|
11
|
+
* Use these to render a fully custom attachment row/card while still
|
|
12
|
+
* reusing the component's preview & download behavior.
|
|
13
|
+
*/
|
|
14
|
+
export interface AttachmentItemSlotProps {
|
|
15
|
+
/** The attachment data for this item */
|
|
16
|
+
file: AttachmentItem;
|
|
17
|
+
/** Zero-based index within the normalized attachments list */
|
|
18
|
+
index: number;
|
|
19
|
+
/** Resolved layout variant */
|
|
20
|
+
variant: 'default' | 'list' | 'inline' | 'card';
|
|
21
|
+
/** Resolved size preset */
|
|
22
|
+
size: 'sm' | 'md' | 'lg';
|
|
23
|
+
/** Whether preview is allowed */
|
|
24
|
+
canView: boolean;
|
|
25
|
+
/** Whether download is allowed */
|
|
26
|
+
canDownload: boolean;
|
|
27
|
+
/** Whether clicking the item should open preview */
|
|
28
|
+
clickToPreview: boolean;
|
|
29
|
+
/** Whether the download button is shown in the list UI */
|
|
30
|
+
showDownloadInList: boolean;
|
|
31
|
+
/** True while this item's download is in progress */
|
|
32
|
+
isDownloading: boolean;
|
|
33
|
+
/** True when the file type supports inline preview */
|
|
34
|
+
isPreviewable: boolean;
|
|
35
|
+
/** True when the file is an image (for thumbnail rendering) */
|
|
36
|
+
isImage: boolean;
|
|
37
|
+
/** Human-readable file size string (e.g. "1.5 MB"), or empty when no size */
|
|
38
|
+
formattedSize: string;
|
|
39
|
+
/** Iconify icon string for the file type */
|
|
40
|
+
icon: string;
|
|
41
|
+
/** Open the built-in preview modal for this item (or download if not previewable) */
|
|
42
|
+
preview: () => void | Promise<void>;
|
|
43
|
+
/** Programmatically download this file */
|
|
44
|
+
download: () => Promise<void>;
|
|
45
|
+
}
|
|
9
46
|
export interface AttachmentsListProps {
|
|
10
47
|
attachments?: AttachmentItem | AttachmentItem[];
|
|
11
48
|
canView?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as c, openBlock as
|
|
1
|
+
import { defineComponent as c, openBlock as l, createBlock as s, normalizeClass as i } from "vue";
|
|
2
2
|
import { useRouter as n } from "vue-router";
|
|
3
3
|
import r from "./Button.vue.js";
|
|
4
4
|
const p = /* @__PURE__ */ c({
|
|
@@ -15,7 +15,7 @@ const p = /* @__PURE__ */ c({
|
|
|
15
15
|
function a() {
|
|
16
16
|
window.history.state?.back ? e.back() : e.push(o.fallback);
|
|
17
17
|
}
|
|
18
|
-
return (
|
|
18
|
+
return (u, f) => (l(), s(r, {
|
|
19
19
|
variant: "ghost",
|
|
20
20
|
icon: t.icon,
|
|
21
21
|
size: t.size,
|
|
@@ -21,6 +21,7 @@ declare const __VLS_component: import('vue').DefineComponent<LocalButtonProps, {
|
|
|
21
21
|
size: ButtonSize;
|
|
22
22
|
rounded: ButtonRounded;
|
|
23
23
|
loading: boolean;
|
|
24
|
+
dir: import('../types').ButtonDirection;
|
|
24
25
|
disabled: boolean;
|
|
25
26
|
layout: "horizontal" | "vertical" | "tile";
|
|
26
27
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
|
package/components/Button.vue.js
CHANGED
|
@@ -1,243 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const J = ["type", "disabled", "data-testid"], K = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "text-xs font-medium leading-tight truncate max-w-full"
|
|
8
|
-
}, P = {
|
|
9
|
-
key: 1,
|
|
10
|
-
class: "text-[10px] font-normal opacity-70 mt-0.5 leading-tight truncate max-w-full"
|
|
11
|
-
}, Q = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "text-[0.75em] font-normal opacity-70 mt-0.5 leading-tight"
|
|
14
|
-
}, ee = /* @__PURE__ */ L({
|
|
15
|
-
__name: "Button",
|
|
16
|
-
props: {
|
|
17
|
-
description: {},
|
|
18
|
-
variant: { default: "primary" },
|
|
19
|
-
size: { default: "md" },
|
|
20
|
-
class: { default: "" },
|
|
21
|
-
disabled: { type: Boolean, default: !1 },
|
|
22
|
-
loading: { type: Boolean, default: !1 },
|
|
23
|
-
icon: {},
|
|
24
|
-
iconRight: {},
|
|
25
|
-
type: { default: "button" },
|
|
26
|
-
text: {},
|
|
27
|
-
textI18n: {},
|
|
28
|
-
rounded: { default: "md" },
|
|
29
|
-
textClass: {},
|
|
30
|
-
iconClass: {},
|
|
31
|
-
iconRightClass: {},
|
|
32
|
-
asIcon: { type: Boolean },
|
|
33
|
-
layout: { default: "horizontal" }
|
|
34
|
-
},
|
|
35
|
-
setup(t) {
|
|
36
|
-
const $ = {
|
|
37
|
-
primary: "bg-primary text-primary-foreground",
|
|
38
|
-
"primary-light": "bg-primary-light text-primary-fg-light",
|
|
39
|
-
secondary: "bg-secondary text-secondary-foreground",
|
|
40
|
-
danger: "bg-danger text-danger-fg",
|
|
41
|
-
"danger-light": "bg-danger-light text-destructive",
|
|
42
|
-
warning: "bg-warning text-warning-fg",
|
|
43
|
-
"warning-light": "bg-warning-light text-warning-fg-light",
|
|
44
|
-
info: "bg-info text-info-fg",
|
|
45
|
-
"info-light": "bg-info-light text-info-fg-light",
|
|
46
|
-
success: "bg-success text-success-fg",
|
|
47
|
-
"success-light": "bg-success-light text-success-fg-light",
|
|
48
|
-
outline: "bg-muted text-foreground",
|
|
49
|
-
"outline-floating": "bg-muted text-foreground",
|
|
50
|
-
"outline-primary": "bg-primary/10 text-primary",
|
|
51
|
-
"outline-danger": "bg-destructive/10 text-destructive",
|
|
52
|
-
"outline-warning": "bg-warning/10 text-warning",
|
|
53
|
-
"outline-info": "bg-info/10 text-info",
|
|
54
|
-
"outline-success": "bg-success/10 text-success",
|
|
55
|
-
ghost: "bg-secondary text-foreground",
|
|
56
|
-
link: "bg-primary/10 text-primary",
|
|
57
|
-
transparent: "bg-muted text-foreground"
|
|
58
|
-
}, e = t, B = N(), o = r(() => {
|
|
59
|
-
const n = e.layout || B.layout;
|
|
60
|
-
return n === "tile" ? "tile" : n === "vertical" ? "vertical" : "horizontal";
|
|
61
|
-
}), f = r(() => o.value === "tile"), R = r(() => $[e.variant] ?? $.primary), C = r(() => ({
|
|
62
|
-
xs: "w-9 h-9",
|
|
63
|
-
sm: "w-10 h-10",
|
|
64
|
-
sm2: "w-11 h-11",
|
|
65
|
-
md: "w-12 h-12",
|
|
66
|
-
lg: "w-14 h-14",
|
|
67
|
-
xl: "w-16 h-16"
|
|
68
|
-
})[e.size]), l = r(() => e.textI18n ? q(e.textI18n) : e.text), j = G(), p = r(() => j.default ? j.default().some((s) => !(s.type === F || s.type === b && Array.isArray(s.children) && s.children.length === 0 || s.type === H && typeof s.children == "string" && s.children.trim() === "")) : !1), y = r(
|
|
69
|
-
() => e?.asIcon || e.icon && !l.value && !p.value
|
|
70
|
-
), g = r(() => e.icon ? e.icon.startsWith("http://") || e.icon.startsWith("https://") || e.icon.startsWith("data:image/") ? !0 : [".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".ico", ".avif"].some((s) => e.icon.toLowerCase().endsWith(s)) : !1), A = r(() => {
|
|
71
|
-
const s = `inline-flex items-center justify-center whitespace-nowrap text-sm font-medium disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98] cursor-pointer focus:outline-none focus-visible:outline-none ${o.value === "tile" ? "flex-col gap-1.5 items-center" : o.value === "vertical" ? "flex-col gap-2" : e.description ? "gap-3" : "gap-2"} ${y.value ? "icon-only shrink-0" : ""}`, z = {
|
|
72
|
-
primary: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
73
|
-
"primary-light": "bg-primary-light text-primary-fg-light hover:bg-primary/15",
|
|
74
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
75
|
-
danger: "bg-danger text-danger-fg hover:bg-danger/90",
|
|
76
|
-
"danger-light": "bg-danger-light text-danger hover:bg-danger/20 dark:hover:bg-danger/40",
|
|
77
|
-
warning: "bg-warning text-warning-fg hover:bg-warning/80",
|
|
78
|
-
"warning-light": "bg-warning-light text-warning-fg-light hover:bg-warning/25",
|
|
79
|
-
info: "bg-info text-info-fg hover:bg-info/80",
|
|
80
|
-
"info-light": "bg-info-light text-info-fg-light hover:bg-info/30",
|
|
81
|
-
success: "bg-success text-success-fg hover:bg-success/80",
|
|
82
|
-
"success-light": "bg-success-light text-success-fg-light hover:bg-success/20 dark:hover:bg-success/35",
|
|
83
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground text-foreground",
|
|
84
|
-
"outline-floating": "border px-3.5! border-input bg-transparent hover:bg-transparent text-foreground border-input active:scale-100!",
|
|
85
|
-
"outline-primary": "border border-primary text-primary hover:bg-primary/10",
|
|
86
|
-
"outline-danger": "border border-destructive text-destructive hover:bg-destructive/10",
|
|
87
|
-
"outline-warning": "border border-warning text-warning hover:bg-warning/10",
|
|
88
|
-
"outline-info": "border border-info text-info hover:bg-info/10",
|
|
89
|
-
"outline-success": "border border-success text-success hover:bg-success/10",
|
|
90
|
-
ghost: "hover:bg-secondary hover:text-foreground text-foreground",
|
|
91
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
92
|
-
transparent: ""
|
|
93
|
-
}, d = {
|
|
94
|
-
xs: e.description ? "h-auto py-1.5 px-2" : "h-6.5 px-2",
|
|
95
|
-
sm: e.description ? "h-auto py-2 px-3" : "h-7.5 px-3",
|
|
96
|
-
sm2: e.description ? "h-auto py-2 px-3" : "h-8 px-3",
|
|
97
|
-
md: e.description ? "h-auto py-2.5 px-4" : "h-9 px-4 py-2",
|
|
98
|
-
lg: e.description ? "h-auto py-3 px-4" : "h-10 px-4",
|
|
99
|
-
xl: e.description ? "h-auto py-4 px-10" : "h-12 px-10"
|
|
100
|
-
}, T = {
|
|
101
|
-
xs: "h-6.5 w-6.5 min-h-6.5 min-w-6.5",
|
|
102
|
-
sm: "h-7.5 w-7.5 min-h-7.5 min-w-7.5",
|
|
103
|
-
sm2: "h-8 w-8 min-h-8 min-w-8",
|
|
104
|
-
md: "h-9 w-9 min-h-9 min-w-9",
|
|
105
|
-
lg: "h-10 w-10 min-h-10 min-w-10",
|
|
106
|
-
xl: "h-12 w-12 min-h-12 min-w-12"
|
|
107
|
-
}, V = {
|
|
108
|
-
none: "rounded-none",
|
|
109
|
-
sm: "rounded-sm",
|
|
110
|
-
sm2: "rounded-sm",
|
|
111
|
-
md: "rounded",
|
|
112
|
-
lg: "rounded-lg",
|
|
113
|
-
xl: "rounded-xl",
|
|
114
|
-
"2xl": "rounded-2xl",
|
|
115
|
-
full: "rounded-full"
|
|
116
|
-
};
|
|
117
|
-
let S = y.value ? T[e.size] : d[e.size];
|
|
118
|
-
o.value === "tile" ? S = {
|
|
119
|
-
xs: "h-auto p-0!",
|
|
120
|
-
sm: "h-auto p-0!",
|
|
121
|
-
sm2: "h-auto p-0!",
|
|
122
|
-
md: "h-auto p-0!",
|
|
123
|
-
lg: "h-auto p-0!",
|
|
124
|
-
xl: "h-auto p-0!"
|
|
125
|
-
}[e.size] : o.value === "vertical" && (S = {
|
|
126
|
-
xs: "h-auto py-1.5 px-2 min-w-16",
|
|
127
|
-
sm: "h-auto py-2 px-3 min-w-20",
|
|
128
|
-
sm2: "h-auto py-2 px-3 min-w-20",
|
|
129
|
-
md: "h-auto py-2.5 px-4 min-w-24",
|
|
130
|
-
lg: "h-auto py-3 px-4 min-w-28",
|
|
131
|
-
xl: "h-auto py-4 px-10 min-w-32"
|
|
132
|
-
}[e.size]);
|
|
133
|
-
const W = f.value ? "group text-foreground focus:outline-none focus-visible:outline-none active:scale-100!" : z[e.variant];
|
|
134
|
-
return [s, W, V[e.rounded], S, e.class].join(
|
|
135
|
-
" "
|
|
136
|
-
);
|
|
137
|
-
}), m = r(() => {
|
|
138
|
-
if (f.value && g.value)
|
|
139
|
-
return `${C.value} object-cover`;
|
|
140
|
-
const n = e.description && o.value === "horizontal", s = {
|
|
141
|
-
xs: n ? "w-3.5 h-3.5" : "w-3 h-3",
|
|
142
|
-
sm: n ? "w-5 h-5" : "w-4 h-4",
|
|
143
|
-
sm2: n ? "w-5 h-5" : "w-4 h-4",
|
|
144
|
-
md: n ? "w-5 h-5" : "w-4 h-4",
|
|
145
|
-
lg: n ? "w-5 h-5" : "w-4 h-4",
|
|
146
|
-
xl: n ? "w-5 h-5" : "w-4 h-4"
|
|
147
|
-
}, z = {
|
|
148
|
-
xs: "w-3 h-3",
|
|
149
|
-
sm: "w-4 h-4",
|
|
150
|
-
sm2: "w-4 h-4",
|
|
151
|
-
md: "w-4 h-4",
|
|
152
|
-
lg: "w-4 h-4",
|
|
153
|
-
xl: "w-4 h-4"
|
|
154
|
-
};
|
|
155
|
-
let d = y.value ? z[e.size] : s[e.size];
|
|
156
|
-
return g.value && (d += " object-cover"), f.value ? d += " scale-[1.45]!" : o.value === "vertical" && (d += " scale-[1.35]! mt-1"), d;
|
|
157
|
-
}), E = r(() => o.value === "vertical" ? "scale-[0.9]" : "");
|
|
158
|
-
return (n, s) => M((i(), c("button", {
|
|
159
|
-
type: t.type,
|
|
160
|
-
class: a([A.value, "cursor-pointer"]),
|
|
161
|
-
disabled: t.disabled || t.loading,
|
|
162
|
-
"data-testid": n.$attrs["data-testid"] || (l.value ? `btn-${l.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : t.icon ? `btn-${t.icon.replace(/[^a-zA-Z0-9]+/g, "-")}` : "button")
|
|
163
|
-
}, [
|
|
164
|
-
f.value ? (i(), c(b, { key: 0 }, [
|
|
165
|
-
I("span", {
|
|
166
|
-
class: a(["inline-flex items-center justify-center shrink-0 transition-transform duration-150 ease-out group-active:scale-[0.92]", [
|
|
167
|
-
g.value ? "" : "rounded-full",
|
|
168
|
-
g.value ? "" : R.value,
|
|
169
|
-
g.value ? "" : C.value
|
|
170
|
-
]])
|
|
171
|
-
}, [
|
|
172
|
-
t.loading ? (i(), x(v, {
|
|
173
|
-
key: 0,
|
|
174
|
-
icon: "lucide:loader-2",
|
|
175
|
-
class: a(["animate-spin pointer-events-none", [m.value, g.value ? C.value : ""]])
|
|
176
|
-
}, null, 8, ["class"])) : t.icon ? (i(), x(v, {
|
|
177
|
-
key: 1,
|
|
178
|
-
icon: t.icon,
|
|
179
|
-
class: a(["pointer-events-none", [t.iconClass, m.value]])
|
|
180
|
-
}, null, 8, ["icon", "class"])) : u("", !0)
|
|
181
|
-
], 2),
|
|
182
|
-
l.value || p.value || e.description ? (i(), c("span", {
|
|
183
|
-
key: 0,
|
|
184
|
-
class: a(["flex flex-col items-center max-w-full", t.textClass])
|
|
185
|
-
}, [
|
|
186
|
-
l.value || p.value ? (i(), c("span", K, [
|
|
187
|
-
w(n.$slots, "default", {}, () => [
|
|
188
|
-
k(h(l.value), 1)
|
|
189
|
-
])
|
|
190
|
-
])) : u("", !0),
|
|
191
|
-
e.description ? (i(), c("span", P, h(e.description), 1)) : u("", !0)
|
|
192
|
-
], 2)) : u("", !0)
|
|
193
|
-
], 64)) : (i(), c(b, { key: 1 }, [
|
|
194
|
-
t.loading ? (i(), x(v, {
|
|
195
|
-
key: 0,
|
|
196
|
-
icon: "lucide:loader-2",
|
|
197
|
-
class: a(["animate-spin pointer-events-none shrink-0", m.value])
|
|
198
|
-
}, null, 8, ["class"])) : t.icon ? (i(), x(v, {
|
|
199
|
-
key: 1,
|
|
200
|
-
icon: t.icon,
|
|
201
|
-
class: a(["pointer-events-none shrink-0", [t.iconClass, m.value, y.value ? "mx-auto" : ""]])
|
|
202
|
-
}, null, 8, ["icon", "class"])) : u("", !0),
|
|
203
|
-
!e.description && o.value === "horizontal" ? (i(), c(b, { key: 2 }, [
|
|
204
|
-
t.textClass ? (i(), c("div", {
|
|
205
|
-
key: 0,
|
|
206
|
-
class: a([t.textClass, "leading-tight truncate inline-flex items-center justify-center gap-1.5"])
|
|
207
|
-
}, [
|
|
208
|
-
w(n.$slots, "default", {}, () => [
|
|
209
|
-
k(h(l.value), 1)
|
|
210
|
-
])
|
|
211
|
-
], 2)) : w(n.$slots, "default", { key: 1 }, () => [
|
|
212
|
-
k(h(l.value), 1)
|
|
213
|
-
])
|
|
214
|
-
], 64)) : l.value || p.value || e.description ? (i(), c("div", {
|
|
215
|
-
key: 3,
|
|
216
|
-
class: a(["flex flex-col justify-center", [
|
|
217
|
-
o.value === "vertical" ? "items-center text-center" : e.description ? "items-start text-left" : "items-center text-center",
|
|
218
|
-
!t.icon && !t.iconRight && !t.loading ? "flex-1 w-full" : ""
|
|
219
|
-
]])
|
|
220
|
-
}, [
|
|
221
|
-
I("div", {
|
|
222
|
-
class: a([[t.textClass, E.value], "inline-flex items-center gap-1.5 w-full leading-tight [&>:where(svg)]:mx-auto [&>:where(img)]:mx-auto"])
|
|
223
|
-
}, [
|
|
224
|
-
w(n.$slots, "default", {}, () => [
|
|
225
|
-
k(h(l.value), 1)
|
|
226
|
-
])
|
|
227
|
-
], 2),
|
|
228
|
-
e.description ? (i(), c("span", Q, h(e.description), 1)) : u("", !0)
|
|
229
|
-
], 2)) : u("", !0),
|
|
230
|
-
t.iconRight && !t.loading ? (i(), x(v, {
|
|
231
|
-
key: 4,
|
|
232
|
-
icon: t.iconRight,
|
|
233
|
-
class: a([[t.iconRightClass, m.value], "h-4 w-4 pointer-events-none shrink-0"])
|
|
234
|
-
}, null, 8, ["icon", "class"])) : u("", !0)
|
|
235
|
-
], 64))
|
|
236
|
-
], 10, J)), [
|
|
237
|
-
[O(Z), !f.value]
|
|
238
|
-
]);
|
|
239
|
-
}
|
|
240
|
-
});
|
|
1
|
+
import o from "./Button.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dc9b3674"]]);
|
|
241
5
|
export {
|
|
242
|
-
|
|
6
|
+
_ as default
|
|
243
7
|
};
|
|
@@ -1,4 +1,247 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as G, useAttrs as H, computed as s, useSlots as F, Comment as M, Fragment as b, Text as O, withDirectives as Z, openBlock as i, createElementBlock as c, normalizeClass as o, createElementVNode as I, createBlock as x, createCommentVNode as u, renderSlot as w, createTextVNode as z, toDisplayString as h, unref as q } from "vue";
|
|
2
|
+
import v from "./Icon.vue.js";
|
|
3
|
+
import { vRipple as J } from "../directives/vRipple.js";
|
|
4
|
+
import { $t as K } from "../utils/i18n.js";
|
|
5
|
+
const P = ["type", "dir", "disabled", "data-testid"], Q = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "text-xs font-medium leading-tight truncate max-w-full"
|
|
8
|
+
}, U = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "text-[10px] font-normal opacity-70 mt-0.5 leading-tight truncate max-w-full"
|
|
11
|
+
}, X = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "text-[0.75em] font-normal opacity-70 mt-0.5 leading-tight"
|
|
14
|
+
}, ne = /* @__PURE__ */ G({
|
|
15
|
+
__name: "Button",
|
|
16
|
+
props: {
|
|
17
|
+
description: {},
|
|
18
|
+
variant: { default: "primary" },
|
|
19
|
+
size: { default: "md" },
|
|
20
|
+
class: { default: "" },
|
|
21
|
+
disabled: { type: Boolean, default: !1 },
|
|
22
|
+
loading: { type: Boolean, default: !1 },
|
|
23
|
+
icon: {},
|
|
24
|
+
iconRight: {},
|
|
25
|
+
type: { default: "button" },
|
|
26
|
+
text: {},
|
|
27
|
+
textI18n: {},
|
|
28
|
+
rounded: { default: "md" },
|
|
29
|
+
textClass: {},
|
|
30
|
+
iconClass: {},
|
|
31
|
+
iconRightClass: {},
|
|
32
|
+
asIcon: { type: Boolean },
|
|
33
|
+
layout: { default: "horizontal" },
|
|
34
|
+
dir: { default: "auto" }
|
|
35
|
+
},
|
|
36
|
+
setup(t) {
|
|
37
|
+
const $ = {
|
|
38
|
+
primary: "bg-primary text-primary-foreground",
|
|
39
|
+
"primary-light": "bg-primary-light text-primary-fg-light",
|
|
40
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
41
|
+
danger: "bg-danger text-danger-fg",
|
|
42
|
+
"danger-light": "bg-danger-light text-destructive",
|
|
43
|
+
warning: "bg-warning text-warning-fg",
|
|
44
|
+
"warning-light": "bg-warning-light text-warning-fg-light",
|
|
45
|
+
info: "bg-info text-info-fg",
|
|
46
|
+
"info-light": "bg-info-light text-info-fg-light",
|
|
47
|
+
success: "bg-success text-success-fg",
|
|
48
|
+
"success-light": "bg-success-light text-success-fg-light",
|
|
49
|
+
outline: "bg-muted text-foreground",
|
|
50
|
+
"outline-floating": "bg-muted text-foreground",
|
|
51
|
+
"outline-primary": "bg-primary/10 text-primary",
|
|
52
|
+
"outline-danger": "bg-destructive/10 text-destructive",
|
|
53
|
+
"outline-warning": "bg-warning/10 text-warning",
|
|
54
|
+
"outline-info": "bg-info/10 text-info",
|
|
55
|
+
"outline-success": "bg-success/10 text-success",
|
|
56
|
+
ghost: "bg-secondary text-foreground",
|
|
57
|
+
link: "bg-primary/10 text-primary",
|
|
58
|
+
transparent: "bg-muted text-foreground"
|
|
59
|
+
}, e = t, B = H(), R = s(() => {
|
|
60
|
+
if (e.dir === "rtl" || e.dir === "ltr") return e.dir;
|
|
61
|
+
}), a = s(() => {
|
|
62
|
+
const n = e.layout || B.layout;
|
|
63
|
+
return n === "tile" ? "tile" : n === "vertical" ? "vertical" : "horizontal";
|
|
64
|
+
}), f = s(() => a.value === "tile"), A = s(() => a.value === "horizontal"), E = s(() => $[e.variant] ?? $.primary), k = s(() => ({
|
|
65
|
+
xs: "w-9 h-9",
|
|
66
|
+
sm: "w-10 h-10",
|
|
67
|
+
sm2: "w-11 h-11",
|
|
68
|
+
md: "w-12 h-12",
|
|
69
|
+
lg: "w-14 h-14",
|
|
70
|
+
xl: "w-16 h-16"
|
|
71
|
+
})[e.size]), l = s(() => e.textI18n ? K(e.textI18n) : e.text), j = F(), p = s(() => j.default ? j.default().some((r) => !(r.type === M || r.type === b && Array.isArray(r.children) && r.children.length === 0 || r.type === O && typeof r.children == "string" && r.children.trim() === "")) : !1), y = s(
|
|
72
|
+
() => e?.asIcon || e.icon && !l.value && !p.value
|
|
73
|
+
), g = s(() => e.icon ? e.icon.startsWith("http://") || e.icon.startsWith("https://") || e.icon.startsWith("data:image/") ? !0 : [".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".ico", ".avif"].some((r) => e.icon.toLowerCase().endsWith(r)) : !1), T = s(() => {
|
|
74
|
+
const r = `v-btn inline-flex items-center justify-center whitespace-nowrap text-sm font-medium disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98] cursor-pointer focus:outline-none focus-visible:outline-none ${a.value === "tile" ? "flex-col gap-1.5 items-center" : a.value === "vertical" ? "flex-col gap-2" : e.description ? "gap-3" : "gap-2"} ${A.value ? "v-btn-horizontal" : ""} ${y.value ? "icon-only shrink-0" : ""}`, C = {
|
|
75
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
76
|
+
"primary-light": "bg-primary-light text-primary-fg-light hover:bg-primary/15",
|
|
77
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
78
|
+
danger: "bg-danger text-danger-fg hover:bg-danger/90",
|
|
79
|
+
"danger-light": "bg-danger-light text-danger hover:bg-danger/20 dark:hover:bg-danger/40",
|
|
80
|
+
warning: "bg-warning text-warning-fg hover:bg-warning/80",
|
|
81
|
+
"warning-light": "bg-warning-light text-warning-fg-light hover:bg-warning/25",
|
|
82
|
+
info: "bg-info text-info-fg hover:bg-info/80",
|
|
83
|
+
"info-light": "bg-info-light text-info-fg-light hover:bg-info/30",
|
|
84
|
+
success: "bg-success text-success-fg hover:bg-success/80",
|
|
85
|
+
"success-light": "bg-success-light text-success-fg-light hover:bg-success/20 dark:hover:bg-success/35",
|
|
86
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground text-foreground",
|
|
87
|
+
"outline-floating": "border px-3.5! border-input bg-transparent hover:bg-transparent text-foreground border-input active:scale-100!",
|
|
88
|
+
"outline-primary": "border border-primary text-primary hover:bg-primary/10",
|
|
89
|
+
"outline-danger": "border border-destructive text-destructive hover:bg-destructive/10",
|
|
90
|
+
"outline-warning": "border border-warning text-warning hover:bg-warning/10",
|
|
91
|
+
"outline-info": "border border-info text-info hover:bg-info/10",
|
|
92
|
+
"outline-success": "border border-success text-success hover:bg-success/10",
|
|
93
|
+
ghost: "hover:bg-secondary hover:text-foreground text-foreground",
|
|
94
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
95
|
+
transparent: ""
|
|
96
|
+
}, d = {
|
|
97
|
+
xs: e.description ? "h-auto py-1.5 px-2" : "h-6.5 px-2",
|
|
98
|
+
sm: e.description ? "h-auto py-2 px-3" : "h-7.5 px-3",
|
|
99
|
+
sm2: e.description ? "h-auto py-2 px-3" : "h-8 px-3",
|
|
100
|
+
md: e.description ? "h-auto py-2.5 px-4" : "h-9 px-4 py-2",
|
|
101
|
+
lg: e.description ? "h-auto py-3 px-4" : "h-10 px-4",
|
|
102
|
+
xl: e.description ? "h-auto py-4 px-10" : "h-12 px-10"
|
|
103
|
+
}, W = {
|
|
104
|
+
xs: "h-6.5 w-6.5 min-h-6.5 min-w-6.5",
|
|
105
|
+
sm: "h-7.5 w-7.5 min-h-7.5 min-w-7.5",
|
|
106
|
+
sm2: "h-8 w-8 min-h-8 min-w-8",
|
|
107
|
+
md: "h-9 w-9 min-h-9 min-w-9",
|
|
108
|
+
lg: "h-10 w-10 min-h-10 min-w-10",
|
|
109
|
+
xl: "h-12 w-12 min-h-12 min-w-12"
|
|
110
|
+
}, D = {
|
|
111
|
+
none: "rounded-none",
|
|
112
|
+
sm: "rounded-sm",
|
|
113
|
+
sm2: "rounded-sm",
|
|
114
|
+
md: "rounded",
|
|
115
|
+
lg: "rounded-lg",
|
|
116
|
+
xl: "rounded-xl",
|
|
117
|
+
"2xl": "rounded-2xl",
|
|
118
|
+
full: "rounded-full"
|
|
119
|
+
};
|
|
120
|
+
let S = y.value ? W[e.size] : d[e.size];
|
|
121
|
+
a.value === "tile" ? S = {
|
|
122
|
+
xs: "h-auto p-0!",
|
|
123
|
+
sm: "h-auto p-0!",
|
|
124
|
+
sm2: "h-auto p-0!",
|
|
125
|
+
md: "h-auto p-0!",
|
|
126
|
+
lg: "h-auto p-0!",
|
|
127
|
+
xl: "h-auto p-0!"
|
|
128
|
+
}[e.size] : a.value === "vertical" && (S = {
|
|
129
|
+
xs: "h-auto py-1.5 px-2 min-w-16",
|
|
130
|
+
sm: "h-auto py-2 px-3 min-w-20",
|
|
131
|
+
sm2: "h-auto py-2 px-3 min-w-20",
|
|
132
|
+
md: "h-auto py-2.5 px-4 min-w-24",
|
|
133
|
+
lg: "h-auto py-3 px-4 min-w-28",
|
|
134
|
+
xl: "h-auto py-4 px-10 min-w-32"
|
|
135
|
+
}[e.size]);
|
|
136
|
+
const L = f.value ? "group text-foreground focus:outline-none focus-visible:outline-none active:scale-100!" : C[e.variant];
|
|
137
|
+
return [r, L, D[e.rounded], S, e.class].join(
|
|
138
|
+
" "
|
|
139
|
+
);
|
|
140
|
+
}), m = s(() => {
|
|
141
|
+
if (f.value && g.value)
|
|
142
|
+
return `${k.value} object-cover`;
|
|
143
|
+
const n = e.description && a.value === "horizontal", r = {
|
|
144
|
+
xs: n ? "w-3.5 h-3.5" : "w-3 h-3",
|
|
145
|
+
sm: n ? "w-5 h-5" : "w-4 h-4",
|
|
146
|
+
sm2: n ? "w-5 h-5" : "w-4 h-4",
|
|
147
|
+
md: n ? "w-5 h-5" : "w-4 h-4",
|
|
148
|
+
lg: n ? "w-5 h-5" : "w-4 h-4",
|
|
149
|
+
xl: n ? "w-5 h-5" : "w-4 h-4"
|
|
150
|
+
}, C = {
|
|
151
|
+
xs: "w-3 h-3",
|
|
152
|
+
sm: "w-4 h-4",
|
|
153
|
+
sm2: "w-4 h-4",
|
|
154
|
+
md: "w-4 h-4",
|
|
155
|
+
lg: "w-4 h-4",
|
|
156
|
+
xl: "w-4 h-4"
|
|
157
|
+
};
|
|
158
|
+
let d = y.value ? C[e.size] : r[e.size];
|
|
159
|
+
return g.value && (d += " object-cover"), f.value ? d += " scale-[1.45]!" : a.value === "vertical" && (d += " scale-[1.35]! mt-1"), d;
|
|
160
|
+
}), V = s(() => a.value === "vertical" ? "scale-[0.9]" : "");
|
|
161
|
+
return (n, r) => Z((i(), c("button", {
|
|
162
|
+
type: t.type,
|
|
163
|
+
class: o([T.value, "cursor-pointer"]),
|
|
164
|
+
dir: R.value,
|
|
165
|
+
disabled: t.disabled || t.loading,
|
|
166
|
+
"data-testid": n.$attrs["data-testid"] || (l.value ? `btn-${l.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : t.icon ? `btn-${t.icon.replace(/[^a-zA-Z0-9]+/g, "-")}` : "button")
|
|
167
|
+
}, [
|
|
168
|
+
f.value ? (i(), c(b, { key: 0 }, [
|
|
169
|
+
I("span", {
|
|
170
|
+
class: o(["inline-flex items-center justify-center shrink-0 transition-transform duration-150 ease-out group-active:scale-[0.92]", [
|
|
171
|
+
g.value ? "" : "rounded-full",
|
|
172
|
+
g.value ? "" : E.value,
|
|
173
|
+
g.value ? "" : k.value
|
|
174
|
+
]])
|
|
175
|
+
}, [
|
|
176
|
+
t.loading ? (i(), x(v, {
|
|
177
|
+
key: 0,
|
|
178
|
+
icon: "lucide:loader-2",
|
|
179
|
+
class: o(["animate-spin pointer-events-none", [m.value, g.value ? k.value : ""]])
|
|
180
|
+
}, null, 8, ["class"])) : t.icon ? (i(), x(v, {
|
|
181
|
+
key: 1,
|
|
182
|
+
icon: t.icon,
|
|
183
|
+
class: o(["pointer-events-none", [t.iconClass, m.value]])
|
|
184
|
+
}, null, 8, ["icon", "class"])) : u("", !0)
|
|
185
|
+
], 2),
|
|
186
|
+
l.value || p.value || e.description ? (i(), c("span", {
|
|
187
|
+
key: 0,
|
|
188
|
+
class: o(["flex flex-col items-center max-w-full", t.textClass])
|
|
189
|
+
}, [
|
|
190
|
+
l.value || p.value ? (i(), c("span", Q, [
|
|
191
|
+
w(n.$slots, "default", {}, () => [
|
|
192
|
+
z(h(l.value), 1)
|
|
193
|
+
], !0)
|
|
194
|
+
])) : u("", !0),
|
|
195
|
+
e.description ? (i(), c("span", U, h(e.description), 1)) : u("", !0)
|
|
196
|
+
], 2)) : u("", !0)
|
|
197
|
+
], 64)) : (i(), c(b, { key: 1 }, [
|
|
198
|
+
t.loading ? (i(), x(v, {
|
|
199
|
+
key: 0,
|
|
200
|
+
icon: "lucide:loader-2",
|
|
201
|
+
class: o(["animate-spin pointer-events-none shrink-0", m.value])
|
|
202
|
+
}, null, 8, ["class"])) : t.icon ? (i(), x(v, {
|
|
203
|
+
key: 1,
|
|
204
|
+
icon: t.icon,
|
|
205
|
+
class: o(["pointer-events-none shrink-0", [t.iconClass, m.value, y.value ? "mx-auto" : ""]])
|
|
206
|
+
}, null, 8, ["icon", "class"])) : u("", !0),
|
|
207
|
+
!e.description && a.value === "horizontal" ? (i(), c(b, { key: 2 }, [
|
|
208
|
+
t.textClass ? (i(), c("div", {
|
|
209
|
+
key: 0,
|
|
210
|
+
class: o([t.textClass, "leading-tight truncate inline-flex items-center justify-center gap-1.5"])
|
|
211
|
+
}, [
|
|
212
|
+
w(n.$slots, "default", {}, () => [
|
|
213
|
+
z(h(l.value), 1)
|
|
214
|
+
], !0)
|
|
215
|
+
], 2)) : w(n.$slots, "default", { key: 1 }, () => [
|
|
216
|
+
z(h(l.value), 1)
|
|
217
|
+
], !0)
|
|
218
|
+
], 64)) : l.value || p.value || e.description ? (i(), c("div", {
|
|
219
|
+
key: 3,
|
|
220
|
+
class: o(["flex flex-col justify-center", [
|
|
221
|
+
a.value === "vertical" ? "items-center text-center" : e.description ? "items-start text-start" : "items-center text-center",
|
|
222
|
+
!t.icon && !t.iconRight && !t.loading ? "flex-1 w-full" : ""
|
|
223
|
+
]])
|
|
224
|
+
}, [
|
|
225
|
+
I("div", {
|
|
226
|
+
class: o([[t.textClass, V.value], "inline-flex items-center gap-1.5 w-full leading-tight [&>:where(svg)]:mx-auto [&>:where(img)]:mx-auto"])
|
|
227
|
+
}, [
|
|
228
|
+
w(n.$slots, "default", {}, () => [
|
|
229
|
+
z(h(l.value), 1)
|
|
230
|
+
], !0)
|
|
231
|
+
], 2),
|
|
232
|
+
e.description ? (i(), c("span", X, h(e.description), 1)) : u("", !0)
|
|
233
|
+
], 2)) : u("", !0),
|
|
234
|
+
t.iconRight && !t.loading ? (i(), x(v, {
|
|
235
|
+
key: 4,
|
|
236
|
+
icon: t.iconRight,
|
|
237
|
+
class: o([[t.iconRightClass, m.value], "h-4 w-4 pointer-events-none shrink-0"])
|
|
238
|
+
}, null, 8, ["icon", "class"])) : u("", !0)
|
|
239
|
+
], 64))
|
|
240
|
+
], 10, P)), [
|
|
241
|
+
[q(J), !f.value]
|
|
242
|
+
]);
|
|
243
|
+
}
|
|
244
|
+
});
|
|
2
245
|
export {
|
|
3
|
-
|
|
246
|
+
ne as default
|
|
4
247
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ButtonGroup.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ae9bcc76"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -14,7 +14,10 @@ const p = /* @__PURE__ */ r({
|
|
|
14
14
|
role: "group",
|
|
15
15
|
class: i([
|
|
16
16
|
"inline-flex button-group",
|
|
17
|
-
|
|
17
|
+
// bare `flex` path (no flex-row): under dir=rtl first item sits on inline-start
|
|
18
|
+
// and logical radii stay aligned. i18n.css `.flex-row { row-reverse }` would
|
|
19
|
+
// keep LTR visual order while radii still flip — inverted outer rounding.
|
|
20
|
+
a.value ? "flex-col items-stretch" : "items-center",
|
|
18
21
|
t.class,
|
|
19
22
|
e.attached ? "attached-group" : "gap-2",
|
|
20
23
|
e.attached && a.value ? "vertical-group" : ""
|