@nons-dev/uikit 0.1.8 → 0.1.10
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/dist/index.css +1 -1
- package/dist/index.js +1356 -1256
- package/locales/en.json +7 -0
- package/locales/fa.json +7 -0
- package/package.json +1 -1
- package/scripts/vite-plugin-nons-config.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as A, computed as g, openBlock as a, createElementBlock as l, normalizeClass as
|
|
5
|
-
import { Tag as
|
|
6
|
-
class
|
|
1
|
+
var Xe = Object.defineProperty;
|
|
2
|
+
var Ze = (e, s, t) => s in e ? Xe(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
3
|
+
var ze = (e, s, t) => Ze(e, typeof s != "symbol" ? s + "" : s, t);
|
|
4
|
+
import { defineComponent as A, computed as g, openBlock as a, createElementBlock as l, normalizeClass as S, createBlock as T, resolveDynamicComponent as re, reactive as Ee, withCtx as U, renderSlot as K, createTextVNode as Y, toDisplayString as C, useSlots as Je, createCommentVNode as f, createVNode as x, createElementVNode as m, ref as P, watch as ee, onMounted as te, onUnmounted as oe, withModifiers as X, Transition as ae, Fragment as j, renderList as W, withDirectives as ue, vModelText as Me, normalizeStyle as Q, unref as R, mergeProps as Pe, h as De, onBeforeUnmount as Qe, nextTick as et, vShow as Ae, useCssVars as tt } from "vue";
|
|
5
|
+
import { Tag as at, Folder as st, Globe as nt, Minimize2 as ke, Maximize2 as we, Clock as lt, Bell as ot, Info as it, HelpCircle as ct, AlertCircle as Le, X as $e, ChartPie as rt, Moon as dt, Sun as ut, Check as mt, MoreHorizontal as ft, ArrowRight as vt, ArrowLeft as pt, Edit2 as bt, Trash2 as ht, Filter as gt, ChevronDown as Oe, Search as _t, Plus as yt, Menu as kt, Bolt as wt, Terminal as $t, Settings as Ct, Fingerprint as xt, BarChart3 as St, Flag as It, MessageSquare as Bt, Archive as Vt, Package as zt, ShoppingBag as Dt, Users as At, LayoutDashboard as Te, ChevronUp as Lt, ChevronsUpDown as Tt } from "@lucide/vue";
|
|
6
|
+
class Et {
|
|
7
7
|
constructor() {
|
|
8
|
-
|
|
8
|
+
ze(this, "registry", /* @__PURE__ */ new Map());
|
|
9
9
|
}
|
|
10
10
|
register(s, t) {
|
|
11
11
|
this.registry.set(s, t);
|
|
@@ -17,7 +17,7 @@ class Tt {
|
|
|
17
17
|
return this.registry.has(s);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
const
|
|
20
|
+
const E = new Et(), Mt = /* @__PURE__ */ A({
|
|
21
21
|
__name: "Icon",
|
|
22
22
|
props: {
|
|
23
23
|
name: {},
|
|
@@ -26,60 +26,60 @@ const T = new Tt(), Et = /* @__PURE__ */ A({
|
|
|
26
26
|
},
|
|
27
27
|
setup(e) {
|
|
28
28
|
const s = {
|
|
29
|
-
"layout-dashboard":
|
|
30
|
-
dashboard:
|
|
31
|
-
users:
|
|
32
|
-
"shopping-bag":
|
|
33
|
-
package:
|
|
34
|
-
archive:
|
|
35
|
-
"message-square":
|
|
36
|
-
flag:
|
|
37
|
-
"bar-chart":
|
|
38
|
-
fingerprint:
|
|
39
|
-
settings:
|
|
40
|
-
terminal:
|
|
41
|
-
bolt:
|
|
42
|
-
menu:
|
|
43
|
-
plus:
|
|
44
|
-
search:
|
|
29
|
+
"layout-dashboard": Te,
|
|
30
|
+
dashboard: Te,
|
|
31
|
+
users: At,
|
|
32
|
+
"shopping-bag": Dt,
|
|
33
|
+
package: zt,
|
|
34
|
+
archive: Vt,
|
|
35
|
+
"message-square": Bt,
|
|
36
|
+
flag: It,
|
|
37
|
+
"bar-chart": St,
|
|
38
|
+
fingerprint: xt,
|
|
39
|
+
settings: Ct,
|
|
40
|
+
terminal: $t,
|
|
41
|
+
bolt: wt,
|
|
42
|
+
menu: kt,
|
|
43
|
+
plus: yt,
|
|
44
|
+
search: _t,
|
|
45
45
|
"chevron-down": Oe,
|
|
46
|
-
filter:
|
|
47
|
-
trash:
|
|
48
|
-
edit:
|
|
49
|
-
"arrow-left":
|
|
50
|
-
"arrow-right":
|
|
51
|
-
more:
|
|
52
|
-
check:
|
|
53
|
-
sun:
|
|
54
|
-
moon:
|
|
46
|
+
filter: gt,
|
|
47
|
+
trash: ht,
|
|
48
|
+
edit: bt,
|
|
49
|
+
"arrow-left": pt,
|
|
50
|
+
"arrow-right": vt,
|
|
51
|
+
more: ft,
|
|
52
|
+
check: mt,
|
|
53
|
+
sun: ut,
|
|
54
|
+
moon: dt,
|
|
55
55
|
"chart-pie": rt,
|
|
56
|
-
x:
|
|
57
|
-
"alert-circle":
|
|
58
|
-
attention:
|
|
59
|
-
help:
|
|
60
|
-
info:
|
|
61
|
-
bell:
|
|
62
|
-
clock:
|
|
63
|
-
"maximize-2":
|
|
64
|
-
"minimize-2":
|
|
65
|
-
globe:
|
|
66
|
-
folder:
|
|
67
|
-
tag:
|
|
56
|
+
x: $e,
|
|
57
|
+
"alert-circle": Le,
|
|
58
|
+
attention: Le,
|
|
59
|
+
help: ct,
|
|
60
|
+
info: it,
|
|
61
|
+
bell: ot,
|
|
62
|
+
clock: lt,
|
|
63
|
+
"maximize-2": we,
|
|
64
|
+
"minimize-2": ke,
|
|
65
|
+
globe: nt,
|
|
66
|
+
folder: st,
|
|
67
|
+
tag: at
|
|
68
68
|
}, t = e, n = g(() => t.name.startsWith("ti-") || t.name.startsWith("ti ") || t.name.includes(" ")), i = g(() => s[t.name.toLowerCase()]), o = g(() => [
|
|
69
69
|
"ds-icon",
|
|
70
70
|
`ds-icon--size-${t.size}`,
|
|
71
71
|
`ds-icon--variant-${t.variant}`
|
|
72
72
|
]);
|
|
73
|
-
return (
|
|
73
|
+
return (r, c) => n.value ? (a(), l("i", {
|
|
74
74
|
key: 0,
|
|
75
|
-
class:
|
|
76
|
-
}, null, 2)) : i.value ? (a(),
|
|
75
|
+
class: S([e.name, o.value])
|
|
76
|
+
}, null, 2)) : i.value ? (a(), T(re(i.value), {
|
|
77
77
|
key: 1,
|
|
78
|
-
class:
|
|
78
|
+
class: S(o.value),
|
|
79
79
|
"aria-hidden": "true"
|
|
80
80
|
}, null, 8, ["class"])) : (a(), l("span", {
|
|
81
81
|
key: 2,
|
|
82
|
-
class:
|
|
82
|
+
class: S(o.value)
|
|
83
83
|
}, "?", 2));
|
|
84
84
|
}
|
|
85
85
|
}), L = (e, s) => {
|
|
@@ -87,38 +87,40 @@ const T = new Tt(), Et = /* @__PURE__ */ A({
|
|
|
87
87
|
for (const [n, i] of s)
|
|
88
88
|
t[n] = i;
|
|
89
89
|
return t;
|
|
90
|
-
},
|
|
91
|
-
app:
|
|
92
|
-
nav:
|
|
93
|
-
profile:
|
|
94
|
-
header:
|
|
95
|
-
home:
|
|
96
|
-
role:
|
|
97
|
-
explorer:
|
|
98
|
-
pagination:
|
|
99
|
-
loading:
|
|
100
|
-
table:
|
|
101
|
-
common:
|
|
102
|
-
textarea:
|
|
103
|
-
schema:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
90
|
+
}, N = /* @__PURE__ */ L(Mt, [["__scopeId", "data-v-06b2598d"]]), Pt = { name: "نونز", footer: "پنل مدیریت" }, Ot = { dashboard: "دکمهها (Buttons)", users: "آیکونها (Icons)", stores: "تایپوگرافی (Text)", products: "فیلدهای فرم (Forms)", orders: "چیدمان (Layouts)", chat: "نشان و آواتار (Badges)", reports: "جداکننده (Divider)", stats: "رندر اسکیما (Schema)", components: "کامپوننتها" }, Rt = { name: "بهروز", email: "admin@Nons.ir" }, Nt = { search: "جستجو کنید...", child_panel: "پنل فروشنده", child_finance: "امور مالی", child_content: "مدیریت محتوا", panel_finance: "مالی", panel_seller: "فروشنده", panel_support: "پشتیبانی", theme_toggle: "تغییر پوسته", settings: "تنظیمات", reports: "گزارش", add: "افزودن", lang_fa: "فارسی", lang_en: "English" }, Ft = { title: "فهرست نقشها", subtitle: "فهرست کاربران خود را در اینجا مدیریت کنید", add_new: "افزودن جدید", search: "جستجو...", filter: "فیلتر", filter_all: "همه نقشها", filter_admin: "ادمین", filter_seller: "فروشنده", filter_viewer: "بازدیدکننده", next: "بعدی", prev: "قبلی", delete: "حذف", edit: "ویرایش", cancel: "انصراف", save: "ذخیره", add_role: "افزودن نقش جدید", edit_role: "ویرایش نقش", no_data: "هیچ دادهای یافت نشد." }, Ut = { name: "نقش", key: "شناسه", capabilities: "تواناییها", count: "تعداد", actions: "اقدام", name_placeholder: "مثال: فروشنده", key_placeholder: "مثال: SELLER", name_label: "نام نقش", key_label: "شناسه نقش", access_type: "نوع دسترسی", access_placeholder: "انتخاب کنید...", access_full: "دسترسی کامل", access_limited: "دسترسی محدود", access_readonly: "فقط مشاهده", cap_full_access: "دسترسی کامل", cap_shop: "فروشگاه", cap_support: "پشتیبانی", cap_products: "محصولات", cap_report: "گزارش", cap_buy: "خرید", cap_sell: "فروش", cap_view: "مشاهده", cap_limited: "محدود", error_name_required: "نام نقش الزامی است", error_key_required: "شناسه نقش الزامی است", error_key_exists: "نقشی با این شناسه قبلاً ثبت شده است" }, jt = { title: "کاوشگر کامپوننتها", subtitle: "مرور و پیشنمایش تمام کامپوننتهای سیستم طراحی", categories: { actions: "عملیات (Actions)", forms: "فرمها (Forms)", feedback: "بازخورد (Feedback)", base: "پایه (Base)", layouts: "چیدمان (Layouts)", components: "کامپوننتها (Components)", navigation: "ناوبری (Navigation)", "data-display": "نمایش داده (Data Display)", disclosure: "نمایش انتخابی (Disclosure)" }, tabs: { preview: "پیشنمایش", props: "مشخصات (Props)", schema: "اسکیما (Schema)", usage: "نحوه استفاده" }, components: { button: { name: "دکمه (Button)", desc: "دکمههای تعاملی با انواع، اندازهها و حالتهای مختلف" }, "icon-button": { name: "دکمه آیکونی (IconButton)", desc: "دکمه مربعی فقط با آیکون برای عملیات فشرده" }, icon: { name: "آیکون (Icon)", desc: "سیستم آیکون یکپارچه با اندازههای توکن و رنگهای معنایی" }, text: { name: "متن (Text)", desc: "کامپوننت تایپوگرافی با مقیاسها و وزنهای از پیش تعریف شده" }, input: { name: "ورودی (Input)", desc: "فیلد ورودی متن با پشتیبانی از آیکون و حالت خطا" }, spacer: { name: "فاصلهانداز (Spacer)", desc: "ایجاد فضا و فواصل یکنواخت و استاندارد در چیدمان لایهها" }, textarea: { name: "ورودی چندخطی (Textarea)", desc: "فیلد ورودی متن چند خطی با پشتیبانی از شمارشگر کاراکتر و کلمه" }, select: { name: "انتخاب (Select)", desc: "منوی کشویی انتخاب با گزینههای سفارشی" }, "multi-select": { name: "انتخاب چندگانه (MultiSelect)", desc: "منوی کشویی انتخاب چندگانه با قابلیت جستجو، چکلیست و نمایش تگها" }, "search-box": { name: "جعبه جستجو (SearchBox)", desc: "ترکیب فیلد ورودی و آیکون جستجو همراه با دکمه پاکسازی" }, dropdown: { name: "منوی کشویی (Dropdown)", desc: "منوی انتخابی با پشتیبانی از گزینههای ثابت و فراخوانی API" }, autocomplete: { name: "تکمیل خودکار (AsyncAutocomplete)", desc: "ورودی متن با قابلیت بارگذاری پویا و غیرهمزمان اطلاعات از سرور" }, menu: { name: "منو (Menu)", desc: "منوی عمومی حاوی گزینهها برای سایدبار یا منوهای بازشو" }, "menu-item": { name: "آیتم منو (MenuItem)", desc: "گزینه تکی داخل منو با پشتیبانی از آیکون و وضعیت فعال" }, tooltip: { name: "تولتیپ (Tooltip)", desc: "نمایش اطلاعات کمکی بر روی عناصر با نگهداشتن موس" }, popover: { name: "پاپاور (Popover)", desc: "نمایش محتوای شناور و تعاملی در جریان صفحه" }, tabs: { name: "تبها (Tabs)", desc: "ابزار ناوبری و جابجایی بین بخشهای مختلف محتوا" }, checkbox: { name: "کادر انتخاب (Checkbox)", desc: "کادر انتخاب با طراحی سفارشی و پشتیبانی از حالت غیرفعال" }, switch: { name: "سوئیچ (Switch)", desc: "سوئیچ دوحالته با انیمیشن و پشتیبانی از حالت غیرفعال" }, badge: { name: "نشان (Badge)", desc: "نشانهای رنگی با انواع معنایی و آیکون" }, avatar: { name: "آواتار (Avatar)", desc: "تصویر پروفایل کاربر با تصویر یا حروف اول نام" }, divider: { name: "جداکننده (Divider)", desc: "خط جداکننده افقی با ضخامت توکن" }, card: { name: "کارت (Card)", desc: "کارت محتوا شامل بخشهای سربرگ، بدنه و پاورقی" }, table: { name: "جدول (SchemaTable)", desc: "جدول Schema-Driven با قابلیت sort، انتخاب سطر و یکپارچهسازی TableCell" }, "table-cell": { name: "سلول جدول (TableCell)", desc: "سلول جدول مبتنی بر اسکیما با ۶ نوع مختلف (text, date, profile, tag, checkbox, actions)" }, "filter-bar": { name: "نوار فیلتر (FilterBar)", desc: "ترکیبی از فیلدها برای فیلتر و جستجوی دادهها" }, pagination: { name: "صفحهبندی (Pagination)", desc: "کنترل صفحهبندی دادهها با اطلاعات صفحه فعلی" }, "empty-state": { name: "وضعیت خالی (EmptyState)", desc: "نمایش پیام استاندارد در صورت عدم وجود دادهها" }, "loading-state": { name: "وضعیت بارگذاری (LoadingState)", desc: "نمایش انیمیشن بارگذاری، اسپینر یا اسکلتون" }, sidepanel: { name: "پنل جانبی (SidePanel)", desc: "پنل کشویی جانبی با سربرگ و پاورقی" }, stack: { name: "پشته (Stack)", desc: "چیدمان عمودی یا افقی با فاصله و جداکننده" }, row: { name: "ردیف (Row)", desc: "چیدمان افقی انعطافپذیر با گزینههای تراز" }, grid: { name: "شبکه (Grid)", desc: "سیستم شبکه پاسخگوی ۱۲ ستونی" }, section: { name: "بخش (Section)", desc: "بخش صفحه همراه با عنوان و زیرعنوان" }, accordion: { name: "آکاردئون (Accordion)", desc: "نمایش محتوای گروهبندی شده با قابلیت باز و بسته شدن" }, alert: { name: "اعلان (Alert)", desc: "نمایش پیامهای سیستمی و هشدارهای درون صفحهای" }, progress: { name: "پیشرفت (Progress)", desc: "نمایش درصد پیشرفت عملیات جاری" }, breadcrumb: { name: "مسیر راهنما (Breadcrumb)", desc: "نمایش مسیر جاری کاربر در صفحات برنامه" }, chip: { name: "چیپ (Chip)", desc: "برچسبهای کوچک تعاملی با قابلیت حذف" }, "command-menu": { name: "منوی دستورات (CommandMenu)", desc: "منوی جستجوی سریع و اجرای عملیات با کلیدهای میانبر" }, "swipe-item": { name: "آیتم کشویی (SwipeItem)", desc: "آیتم لیست با قابلیت کشیدن برای نمایش دکمههای عملیات" }, sidebar: { name: "سایدبار (SidebarNav)", desc: "سایدبار ناوبری مبتنی بر اسکیما با حالت باز/بسته" }, "user-card": { name: "کاربر (UserCard)", desc: "کارت پروفایل کاربر برای فوتر سایدبار با آواتار، نام، نقش و آیکون عملیات" }, "page-title": { name: "عنوان صفحه (PageTitle)", desc: "هدر صفحه با عنوان، زیرعنوان و دکمه عملیات اختیاری" }, "notification-bell": { name: "زنگ اعلان (NotificationBell)", desc: "دکمه زنگ با نشانگر اعلان خوانده نشده" }, "notification-panel": { name: "پنل اعلان (NotificationPanel)", desc: "پنل کشویی لیست اعلانها با ردیفهای SwipeItem" }, "toggle-button": { name: "دکمه تغییر حالت (ToggleButton)", desc: "دکمه دو حالته با آیکون و برچسب مجزا برای هر حالت" }, "action-toggle": { name: "تغییردهنده عملیات (ActionToggle)", desc: "تغییردهنده قطعهبندیشده با ۲ یا ۳ گزینه و لغزنده" } } }, qt = { previous: "قبلی", next: "بعدی", page_of: "صفحه {page} از {total}" }, Kt = { text: "در حال بارگذاری..." }, Ht = { empty: "هیچ دادهای یافت نشد." }, Wt = { no_results: "نتیجهای یافت نشد", remove: "حذف", go: "برو", run: "اجرا", transfer: "انتقال" }, Gt = { words: "کلمه" }, Yt = { demo_title: "تست رندر پویا از روی اسکیما (Schema UI Engine)", demo_subtitle: "این کادر به طور کامل از یک مشخصات JSON رندر شده است و عملکرد واقعی دارد.", input_placeholder: "ورودی اسکیما...", submit: "ثبت از اسکیما" }, Xt = { close: "بستن", cancel: "انصراف", save: "ذخیره", minimize: "کوچکنمایی", maximize: "بزرگنمایی" }, Zt = {
|
|
91
|
+
app: Pt,
|
|
92
|
+
nav: Ot,
|
|
93
|
+
profile: Rt,
|
|
94
|
+
header: Nt,
|
|
95
|
+
home: Ft,
|
|
96
|
+
role: Ut,
|
|
97
|
+
explorer: jt,
|
|
98
|
+
pagination: qt,
|
|
99
|
+
loading: Kt,
|
|
100
|
+
table: Ht,
|
|
101
|
+
common: Wt,
|
|
102
|
+
textarea: Gt,
|
|
103
|
+
schema: Yt,
|
|
104
|
+
sidepanel: Xt
|
|
105
|
+
}, Jt = { name: "Nons", footer: "Admin Panel" }, Qt = { dashboard: "Buttons", users: "Icons", stores: "Typography", products: "Form Fields", orders: "Layouts", chat: "Badges & Avatars", reports: "Dividers", stats: "Schema Renderer", components: "Components" }, ea = { name: "Behrouz", email: "admin@Nons.ir" }, ta = { search: "Search...", child_panel: "Seller Panel", child_finance: "Finance", child_content: "Content Management", panel_finance: "Finance", panel_seller: "Seller", panel_support: "Support", theme_toggle: "Toggle Theme", settings: "Settings", reports: "Reports", add: "Add", lang_fa: "Persian", lang_en: "English" }, aa = { title: "Roles List", subtitle: "Manage your users here", add_new: "Add New", search: "Search...", filter: "Filter", filter_all: "All Roles", filter_admin: "Admin", filter_seller: "Seller", filter_viewer: "Viewer", next: "Next", prev: "Previous", delete: "Delete", edit: "Edit", cancel: "Cancel", save: "Save", add_role: "Add New Role", edit_role: "Edit Role", no_data: "No data found." }, sa = { name: "Role", key: "Key", capabilities: "Capabilities", count: "Count", actions: "Actions", name_placeholder: "e.g. Seller", key_placeholder: "e.g. SELLER", name_label: "Role Name", key_label: "Role Key", access_type: "Access Type", access_placeholder: "Select...", access_full: "Full Access", access_limited: "Limited Access", access_readonly: "Read Only", cap_full_access: "Full Access", cap_shop: "Shop", cap_support: "Support", cap_products: "Products", cap_report: "Report", cap_buy: "Buy", cap_sell: "Sell", cap_view: "View", cap_limited: "Limited", error_name_required: "Role name is required", error_key_required: "Role key is required", error_key_exists: "A role with this key already exists" }, na = { title: "Component Explorer", subtitle: "Browse and preview all design system components", categories: { actions: "Actions", forms: "Forms", feedback: "Feedback", base: "Base", layouts: "Layouts", components: "Components", navigation: "Navigation", "data-display": "Data Display", disclosure: "Disclosure" }, tabs: { preview: "Preview", props: "Props", schema: "Schema", usage: "Usage" }, components: { button: { name: "Button", desc: "Interactive buttons with variants, sizes and states" }, "icon-button": { name: "IconButton", desc: "Icon-only square button for compact actions" }, icon: { name: "Icon", desc: "Unified icon system with token sizes and semantic colors" }, text: { name: "Text", desc: "Typography component with predefined scales and weights" }, input: { name: "Input", desc: "Text input field with icon and error state support" }, spacer: { name: "Spacer", desc: "Fixed token-based layout spacer for spacing sections" }, textarea: { name: "Textarea", desc: "Multiline text input with character and word limits support" }, select: { name: "Select", desc: "Dropdown select menu with custom options" }, "multi-select": { name: "MultiSelect", desc: "Dropdown select menu with multiple checkable options and display tags" }, "search-box": { name: "SearchBox", desc: "Text input combined with search icon and clear actions" }, dropdown: { name: "Dropdown", desc: "General selection dropdown with static items and API source loading" }, autocomplete: { name: "AsyncAutocomplete", desc: "Text input with dynamic and asynchronous suggestion loading from server" }, menu: { name: "Menu", desc: "Structured menu layout with dynamic options" }, "menu-item": { name: "MenuItem", desc: "Individual choice element in a Menu block" }, tooltip: { name: "Tooltip", desc: "Helpful overlay text displaying on mouse-over" }, popover: { name: "Popover", desc: "Floating interactive content panel mapping to logical flow" }, tabs: { name: "Tabs", desc: "Navigation controls for switching between content sections" }, checkbox: { name: "Checkbox", desc: "Custom styled checkbox with disabled state" }, switch: { name: "Switch", desc: "Toggle switch with animation and disabled state" }, badge: { name: "Badge", desc: "Colored badges with semantic variants and icon" }, avatar: { name: "Avatar", desc: "User avatar with image or fallback initials" }, divider: { name: "Divider", desc: "Horizontal divider line with token thickness" }, card: { name: "Card", desc: "Content card with header, body and footer sections" }, table: { name: "SchemaTable", desc: "Schema-driven table with sort, row selection, and TableCell integration" }, "table-cell": { name: "TableCell", desc: "Schema-driven table cell with 6 type variants (text, date, profile, tag, checkbox, actions)" }, "filter-bar": { name: "FilterBar", desc: "Composed search and filter controls for datasets" }, pagination: { name: "Pagination", desc: "Navigation controls for datasets pages" }, "empty-state": { name: "EmptyState", desc: "Informational banner when zero records are returned" }, "loading-state": { name: "LoadingState", desc: "Spinner, shimmering skeletons or placeholders for pending processes" }, sidepanel: { name: "SidePanel", desc: "Slide-in side panel with header and footer" }, stack: { name: "Stack", desc: "Vertical or horizontal layout with gap and separator" }, row: { name: "Row", desc: "Flexible horizontal layout with alignment options" }, grid: { name: "Grid", desc: "12-column responsive grid system" }, section: { name: "Section", desc: "Page section with title and subtitle" }, accordion: { name: "Accordion", desc: "Collapsible content panels for grouping related information" }, alert: { name: "Alert", desc: "Inline message panels for notifications and confirmation actions" }, progress: { name: "Progress", desc: "Visual progress indicators for ongoing operations" }, breadcrumb: { name: "Breadcrumb", desc: "Navigation trail for displaying current page hierarchy" }, chip: { name: "Chip", desc: "Compact, interactive tags with delete action buttons" }, "command-menu": { name: "CommandMenu", desc: "Keyboard-navigable search and action command palette" }, "swipe-item": { name: "SwipeItem", desc: "Swipeable list item that reveals action buttons on swipe" }, sidebar: { name: "SidebarNav", desc: "Schema-driven navigation sidebar with collapsed/expanded modes" }, "user-card": { name: "UserCard", desc: "Compact user profile card for sidebar footers with avatar, name, role and action icon" }, "page-title": { name: "PageTitle", desc: "Page header with title, subtitle and optional action button" }, "notification-bell": { name: "NotificationBell", desc: "Bell button with unread notification dot indicator" }, "notification-panel": { name: "NotificationPanel", desc: "Dropdown panel listing notification items with SwipeItem rows" }, "toggle-button": { name: "ToggleButton", desc: "Two-state button with separate icon and label for each state" }, "action-toggle": { name: "ActionToggle", desc: "Segmented toggle with 2 or 3 options and sliding thumb" } } }, la = { previous: "Previous", next: "Next", page_of: "Page {page} of {total}" }, oa = { text: "Loading..." }, ia = { empty: "No data found." }, ca = { no_results: "No results found", remove: "Remove", go: "Go", run: "Run", transfer: "Transfer" }, ra = { words: "words" }, da = { demo_title: "Dynamic Schema Rendering Test (Schema UI Engine)", demo_subtitle: "This card is fully rendered from a JSON specification and has real functionality.", input_placeholder: "Schema input...", submit: "Submit from Schema" }, ua = { close: "Close", cancel: "Cancel", save: "Save", minimize: "Minimize", maximize: "Maximize" }, ma = {
|
|
106
|
+
app: Jt,
|
|
107
|
+
nav: Qt,
|
|
108
|
+
profile: ea,
|
|
109
|
+
header: ta,
|
|
110
|
+
home: aa,
|
|
111
|
+
role: sa,
|
|
112
|
+
explorer: na,
|
|
113
|
+
pagination: la,
|
|
114
|
+
loading: oa,
|
|
115
|
+
table: ia,
|
|
116
|
+
common: ca,
|
|
117
|
+
textarea: ra,
|
|
118
|
+
schema: da,
|
|
119
|
+
sidepanel: ua
|
|
120
|
+
}, fa = { fa: Zt, en: ma }, Ie = Ee({
|
|
119
121
|
locale: "fa"
|
|
120
122
|
});
|
|
121
|
-
function
|
|
123
|
+
function va(e, s) {
|
|
122
124
|
const t = s.split(".");
|
|
123
125
|
let n = e;
|
|
124
126
|
for (const i of t)
|
|
@@ -129,12 +131,12 @@ function ua(e, s) {
|
|
|
129
131
|
return typeof n == "string" ? n : s;
|
|
130
132
|
}
|
|
131
133
|
function Re(e) {
|
|
132
|
-
|
|
134
|
+
Ie.locale = e, document.documentElement.lang = e;
|
|
133
135
|
}
|
|
134
|
-
function
|
|
135
|
-
const t =
|
|
136
|
+
function F(e, s) {
|
|
137
|
+
const t = fa[Ie.locale];
|
|
136
138
|
if (!t) return e;
|
|
137
|
-
let n =
|
|
139
|
+
let n = va(t, e);
|
|
138
140
|
if (s)
|
|
139
141
|
for (const [i, o] of Object.entries(s))
|
|
140
142
|
n = n.replace(`{${i}}`, o);
|
|
@@ -142,12 +144,12 @@ function W(e, s) {
|
|
|
142
144
|
}
|
|
143
145
|
function Ne() {
|
|
144
146
|
return {
|
|
145
|
-
locale: g(() =>
|
|
146
|
-
t: (e, s) =>
|
|
147
|
+
locale: g(() => Ie.locale),
|
|
148
|
+
t: (e, s) => F(e, s),
|
|
147
149
|
setLocale: Re
|
|
148
150
|
};
|
|
149
151
|
}
|
|
150
|
-
const
|
|
152
|
+
const pa = /* @__PURE__ */ A({
|
|
151
153
|
__name: "Text",
|
|
152
154
|
props: {
|
|
153
155
|
variant: { default: "body-md" },
|
|
@@ -156,7 +158,7 @@ const ma = /* @__PURE__ */ A({
|
|
|
156
158
|
tag: {}
|
|
157
159
|
},
|
|
158
160
|
setup(e) {
|
|
159
|
-
const s = e, t = g(() => s.value ?
|
|
161
|
+
const s = e, t = g(() => s.value ? F(s.value) : ""), n = g(() => [
|
|
160
162
|
"ds-text",
|
|
161
163
|
`ds-text--${s.variant}`,
|
|
162
164
|
{
|
|
@@ -185,24 +187,24 @@ const ma = /* @__PURE__ */ A({
|
|
|
185
187
|
return "span";
|
|
186
188
|
}
|
|
187
189
|
});
|
|
188
|
-
return (o,
|
|
189
|
-
class:
|
|
190
|
+
return (o, r) => (a(), T(re(i.value), {
|
|
191
|
+
class: S(n.value)
|
|
190
192
|
}, {
|
|
191
|
-
default:
|
|
192
|
-
|
|
193
|
-
|
|
193
|
+
default: U(() => [
|
|
194
|
+
K(o.$slots, "default", {}, () => [
|
|
195
|
+
Y(C(t.value), 1)
|
|
194
196
|
], !0)
|
|
195
197
|
]),
|
|
196
198
|
_: 3
|
|
197
199
|
}, 8, ["class"]));
|
|
198
200
|
}
|
|
199
|
-
}), G = /* @__PURE__ */ L(
|
|
201
|
+
}), G = /* @__PURE__ */ L(pa, [["__scopeId", "data-v-1742615b"]]), ba = ["type", "disabled"], ha = {
|
|
200
202
|
key: 0,
|
|
201
203
|
class: "ds-button__spinner"
|
|
202
|
-
},
|
|
204
|
+
}, ga = {
|
|
203
205
|
key: 2,
|
|
204
206
|
class: "ds-button__content"
|
|
205
|
-
},
|
|
207
|
+
}, _a = /* @__PURE__ */ A({
|
|
206
208
|
__name: "Button",
|
|
207
209
|
props: {
|
|
208
210
|
variant: { default: "primary" },
|
|
@@ -216,7 +218,7 @@ const ma = /* @__PURE__ */ A({
|
|
|
216
218
|
},
|
|
217
219
|
emits: ["click"],
|
|
218
220
|
setup(e, { emit: s }) {
|
|
219
|
-
const t = e, n = s, i =
|
|
221
|
+
const t = e, n = s, i = Je(), o = g(() => [
|
|
220
222
|
"ds-button",
|
|
221
223
|
`ds-button--${t.variant}`,
|
|
222
224
|
`ds-button--${t.size}`,
|
|
@@ -226,39 +228,39 @@ const ma = /* @__PURE__ */ A({
|
|
|
226
228
|
"ds-button--icon-only": t.icon && !t.label && !i.default
|
|
227
229
|
}
|
|
228
230
|
]);
|
|
229
|
-
function c
|
|
230
|
-
!t.disabled && !t.loading && n("click",
|
|
231
|
+
function r(c) {
|
|
232
|
+
!t.disabled && !t.loading && n("click", c);
|
|
231
233
|
}
|
|
232
|
-
return (
|
|
234
|
+
return (c, d) => (a(), l("button", {
|
|
233
235
|
type: e.type,
|
|
234
|
-
class:
|
|
236
|
+
class: S(o.value),
|
|
235
237
|
disabled: e.disabled || e.loading,
|
|
236
|
-
onClick:
|
|
238
|
+
onClick: r
|
|
237
239
|
}, [
|
|
238
|
-
e.loading ? (a(), l("span",
|
|
239
|
-
e.icon && e.iconPosition === "start" && !e.loading ? (a(),
|
|
240
|
+
e.loading ? (a(), l("span", ha)) : f("", !0),
|
|
241
|
+
e.icon && e.iconPosition === "start" && !e.loading ? (a(), T(N, {
|
|
240
242
|
key: 1,
|
|
241
243
|
name: e.icon,
|
|
242
244
|
size: "sm",
|
|
243
245
|
variant: "default"
|
|
244
246
|
}, null, 8, ["name"])) : f("", !0),
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
247
|
+
c.$slots.default || e.label ? (a(), l("span", ga, [
|
|
248
|
+
K(c.$slots, "default", {}, () => [
|
|
249
|
+
x(G, {
|
|
248
250
|
variant: "body-md",
|
|
249
251
|
value: e.label
|
|
250
252
|
}, null, 8, ["value"])
|
|
251
253
|
], !0)
|
|
252
254
|
])) : f("", !0),
|
|
253
|
-
e.icon && e.iconPosition === "end" && !e.loading ? (a(),
|
|
255
|
+
e.icon && e.iconPosition === "end" && !e.loading ? (a(), T(N, {
|
|
254
256
|
key: 3,
|
|
255
257
|
name: e.icon,
|
|
256
258
|
size: "sm",
|
|
257
259
|
variant: "default"
|
|
258
260
|
}, null, 8, ["name"])) : f("", !0)
|
|
259
|
-
], 10,
|
|
261
|
+
], 10, ba));
|
|
260
262
|
}
|
|
261
|
-
}),
|
|
263
|
+
}), Z = /* @__PURE__ */ L(_a, [["__scopeId", "data-v-f75ae69d"]]), ya = { class: "ds-input__container" }, ka = ["id", "type", "value", "placeholder", "disabled", "readonly"], wa = /* @__PURE__ */ A({
|
|
262
264
|
__name: "Input",
|
|
263
265
|
props: {
|
|
264
266
|
modelValue: { default: "" },
|
|
@@ -283,15 +285,15 @@ const ma = /* @__PURE__ */ A({
|
|
|
283
285
|
"ds-input--has-icon": !!t.icon
|
|
284
286
|
}
|
|
285
287
|
]);
|
|
286
|
-
function o(
|
|
287
|
-
const
|
|
288
|
-
n("update:modelValue",
|
|
288
|
+
function o(r) {
|
|
289
|
+
const c = r.target;
|
|
290
|
+
n("update:modelValue", c.value), n("input", r);
|
|
289
291
|
}
|
|
290
|
-
return (
|
|
291
|
-
class:
|
|
292
|
+
return (r, c) => (a(), l("div", {
|
|
293
|
+
class: S(i.value)
|
|
292
294
|
}, [
|
|
293
|
-
m("div",
|
|
294
|
-
e.icon ? (a(),
|
|
295
|
+
m("div", ya, [
|
|
296
|
+
e.icon ? (a(), T(N, {
|
|
295
297
|
key: 0,
|
|
296
298
|
name: e.icon,
|
|
297
299
|
size: "sm",
|
|
@@ -306,22 +308,22 @@ const ma = /* @__PURE__ */ A({
|
|
|
306
308
|
readonly: e.readonly,
|
|
307
309
|
class: "ds-input__field",
|
|
308
310
|
onInput: o,
|
|
309
|
-
onFocus:
|
|
310
|
-
onBlur:
|
|
311
|
-
onKeydown:
|
|
312
|
-
}, null, 40,
|
|
311
|
+
onFocus: c[0] || (c[0] = (d) => n("focus", d)),
|
|
312
|
+
onBlur: c[1] || (c[1] = (d) => n("blur", d)),
|
|
313
|
+
onKeydown: c[2] || (c[2] = (d) => n("keydown", d))
|
|
314
|
+
}, null, 40, ka)
|
|
313
315
|
])
|
|
314
316
|
], 2));
|
|
315
317
|
}
|
|
316
|
-
}), ve = /* @__PURE__ */ L(
|
|
318
|
+
}), ve = /* @__PURE__ */ L(wa, [["__scopeId", "data-v-7227544b"]]), $a = {
|
|
317
319
|
class: "ds-divider",
|
|
318
320
|
role: "separator"
|
|
319
|
-
},
|
|
321
|
+
}, Ca = /* @__PURE__ */ A({
|
|
320
322
|
__name: "Divider",
|
|
321
323
|
setup(e) {
|
|
322
|
-
return (s, t) => (a(), l("hr",
|
|
324
|
+
return (s, t) => (a(), l("hr", $a));
|
|
323
325
|
}
|
|
324
|
-
}), Fe = /* @__PURE__ */ L(
|
|
326
|
+
}), Fe = /* @__PURE__ */ L(Ca, [["__scopeId", "data-v-aa037cc0"]]), xa = /* @__PURE__ */ A({
|
|
325
327
|
__name: "Badge",
|
|
326
328
|
props: {
|
|
327
329
|
variant: { default: "default" },
|
|
@@ -334,17 +336,17 @@ const ma = /* @__PURE__ */ A({
|
|
|
334
336
|
`ds-badge--${s.variant}`
|
|
335
337
|
]);
|
|
336
338
|
return (n, i) => (a(), l("span", {
|
|
337
|
-
class:
|
|
339
|
+
class: S(t.value)
|
|
338
340
|
}, [
|
|
339
|
-
e.icon ? (a(),
|
|
341
|
+
e.icon ? (a(), T(N, {
|
|
340
342
|
key: 0,
|
|
341
343
|
name: e.icon,
|
|
342
344
|
size: "xs",
|
|
343
345
|
variant: "default",
|
|
344
346
|
class: "ds-badge__icon"
|
|
345
347
|
}, null, 8, ["name"])) : f("", !0),
|
|
346
|
-
|
|
347
|
-
|
|
348
|
+
K(n.$slots, "default", {}, () => [
|
|
349
|
+
x(G, {
|
|
348
350
|
variant: "caption",
|
|
349
351
|
value: e.text,
|
|
350
352
|
class: "ds-badge__text"
|
|
@@ -352,10 +354,10 @@ const ma = /* @__PURE__ */ A({
|
|
|
352
354
|
], !0)
|
|
353
355
|
], 2));
|
|
354
356
|
}
|
|
355
|
-
}),
|
|
357
|
+
}), Sa = /* @__PURE__ */ L(xa, [["__scopeId", "data-v-2be2004d"]]), Ia = ["src", "alt"], Ba = {
|
|
356
358
|
key: 1,
|
|
357
359
|
class: "ds-avatar__fallback"
|
|
358
|
-
},
|
|
360
|
+
}, Va = /* @__PURE__ */ A({
|
|
359
361
|
__name: "Avatar",
|
|
360
362
|
props: {
|
|
361
363
|
src: {},
|
|
@@ -365,8 +367,8 @@ const ma = /* @__PURE__ */ A({
|
|
|
365
367
|
square: { type: Boolean, default: !1 }
|
|
366
368
|
},
|
|
367
369
|
setup(e) {
|
|
368
|
-
const s = e, t =
|
|
369
|
-
|
|
370
|
+
const s = e, t = P(!1);
|
|
371
|
+
ee(() => s.src, () => {
|
|
370
372
|
t.value = !1;
|
|
371
373
|
});
|
|
372
374
|
const n = g(() => {
|
|
@@ -379,32 +381,32 @@ const ma = /* @__PURE__ */ A({
|
|
|
379
381
|
const u = o[0];
|
|
380
382
|
return u ? u.charAt(0).toUpperCase() : "?";
|
|
381
383
|
}
|
|
382
|
-
const
|
|
383
|
-
return (
|
|
384
|
+
const r = ((d = o[0]) == null ? void 0 : d.charAt(0)) || "", c = ((v = o[o.length - 1]) == null ? void 0 : v.charAt(0)) || "";
|
|
385
|
+
return (r + c).toUpperCase();
|
|
384
386
|
}), i = g(() => [
|
|
385
387
|
"ds-avatar",
|
|
386
388
|
`ds-avatar--${s.size}`,
|
|
387
389
|
{ "ds-avatar--square": s.square }
|
|
388
390
|
]);
|
|
389
|
-
return (o,
|
|
390
|
-
class:
|
|
391
|
+
return (o, r) => (a(), l("div", {
|
|
392
|
+
class: S(i.value)
|
|
391
393
|
}, [
|
|
392
394
|
e.src && !t.value ? (a(), l("img", {
|
|
393
395
|
key: 0,
|
|
394
396
|
src: e.src,
|
|
395
397
|
alt: e.name,
|
|
396
398
|
class: "ds-avatar__image",
|
|
397
|
-
onError:
|
|
398
|
-
}, null, 40,
|
|
399
|
+
onError: r[0] || (r[0] = (c) => t.value = !0)
|
|
400
|
+
}, null, 40, Ia)) : (a(), l("div", Ba, C(n.value), 1))
|
|
399
401
|
], 2));
|
|
400
402
|
}
|
|
401
|
-
}),
|
|
403
|
+
}), de = /* @__PURE__ */ L(Va, [["__scopeId", "data-v-e32afb9f"]]), za = { class: "ds-select__wrapper" }, Da = ["id", "aria-expanded", "aria-controls"], Aa = {
|
|
402
404
|
key: 0,
|
|
403
405
|
class: "ds-select__value"
|
|
404
|
-
},
|
|
406
|
+
}, La = {
|
|
405
407
|
key: 1,
|
|
406
408
|
class: "ds-select__placeholder"
|
|
407
|
-
},
|
|
409
|
+
}, Ta = ["id"], Ea = ["aria-selected", "onClick", "onMouseenter"], Ma = /* @__PURE__ */ A({
|
|
408
410
|
__name: "Select",
|
|
409
411
|
props: {
|
|
410
412
|
modelValue: { type: [String, Number, Boolean], default: "" },
|
|
@@ -423,41 +425,41 @@ const ma = /* @__PURE__ */ A({
|
|
|
423
425
|
function o(p) {
|
|
424
426
|
return i(p).value;
|
|
425
427
|
}
|
|
426
|
-
function
|
|
428
|
+
function r(p) {
|
|
427
429
|
return i(p).label;
|
|
428
430
|
}
|
|
429
|
-
const
|
|
431
|
+
const c = g(() => {
|
|
430
432
|
const p = t.modelValue;
|
|
431
433
|
if (p === "" || p === void 0) return "";
|
|
432
|
-
const
|
|
433
|
-
return
|
|
434
|
-
}), d =
|
|
434
|
+
const z = t.options.find((y) => o(y) === p);
|
|
435
|
+
return z ? r(z) : "";
|
|
436
|
+
}), d = P(!1), v = P(null), u = P(null), h = P(-1);
|
|
435
437
|
function _() {
|
|
436
|
-
t.disabled || (d.value = !d.value,
|
|
438
|
+
t.disabled || (d.value = !d.value, M());
|
|
437
439
|
}
|
|
438
|
-
function
|
|
439
|
-
t.disabled || d.value || (d.value = !0,
|
|
440
|
+
function k() {
|
|
441
|
+
t.disabled || d.value || (d.value = !0, M());
|
|
440
442
|
}
|
|
441
|
-
function
|
|
443
|
+
function M() {
|
|
442
444
|
const p = t.modelValue;
|
|
443
|
-
h.value = t.options.findIndex((
|
|
445
|
+
h.value = t.options.findIndex((z) => o(z) === p);
|
|
444
446
|
}
|
|
445
447
|
function B() {
|
|
446
448
|
var p;
|
|
447
449
|
d.value = !1, h.value = -1, (p = v.value) == null || p.focus();
|
|
448
450
|
}
|
|
449
|
-
function
|
|
450
|
-
const
|
|
451
|
-
if (
|
|
451
|
+
function V(p) {
|
|
452
|
+
const z = o(p);
|
|
453
|
+
if (z === t.modelValue) {
|
|
452
454
|
B();
|
|
453
455
|
return;
|
|
454
456
|
}
|
|
455
|
-
n("update:modelValue",
|
|
457
|
+
n("update:modelValue", z), n("change", z), B();
|
|
456
458
|
}
|
|
457
|
-
function
|
|
459
|
+
function H(p) {
|
|
458
460
|
if (!t.disabled) {
|
|
459
461
|
if (!d.value) {
|
|
460
|
-
(p.key === "Enter" || p.key === "ArrowDown" || p.key === " ") && (p.preventDefault(),
|
|
462
|
+
(p.key === "Enter" || p.key === "ArrowDown" || p.key === " ") && (p.preventDefault(), k());
|
|
461
463
|
return;
|
|
462
464
|
}
|
|
463
465
|
switch (p.key) {
|
|
@@ -471,21 +473,21 @@ const ma = /* @__PURE__ */ A({
|
|
|
471
473
|
p.preventDefault(), h.value = h.value > 0 ? h.value - 1 : t.options.length - 1;
|
|
472
474
|
break;
|
|
473
475
|
case "Enter":
|
|
474
|
-
p.preventDefault(), h.value >= 0 && h.value < t.options.length &&
|
|
476
|
+
p.preventDefault(), h.value >= 0 && h.value < t.options.length && V(t.options[h.value]);
|
|
475
477
|
break;
|
|
476
478
|
}
|
|
477
479
|
}
|
|
478
480
|
}
|
|
479
|
-
function
|
|
480
|
-
const
|
|
481
|
-
!y && !$ || y && y.contains(
|
|
481
|
+
function w(p) {
|
|
482
|
+
const z = p.target, y = v.value, $ = u.value;
|
|
483
|
+
!y && !$ || y && y.contains(z) || $ && $.contains(z) || d.value && B();
|
|
482
484
|
}
|
|
483
|
-
|
|
484
|
-
document.addEventListener("click",
|
|
485
|
+
te(() => {
|
|
486
|
+
document.addEventListener("click", w);
|
|
485
487
|
}), oe(() => {
|
|
486
|
-
document.removeEventListener("click",
|
|
488
|
+
document.removeEventListener("click", w);
|
|
487
489
|
});
|
|
488
|
-
const
|
|
490
|
+
const I = g(() => [
|
|
489
491
|
"ds-select",
|
|
490
492
|
{
|
|
491
493
|
"ds-select--disabled": t.disabled,
|
|
@@ -493,10 +495,10 @@ const ma = /* @__PURE__ */ A({
|
|
|
493
495
|
"ds-select--open": d.value
|
|
494
496
|
}
|
|
495
497
|
]), O = g(() => t.id ? `${t.id}-listbox` : void 0);
|
|
496
|
-
return (p,
|
|
497
|
-
class: I
|
|
498
|
+
return (p, z) => (a(), l("div", {
|
|
499
|
+
class: S(I.value)
|
|
498
500
|
}, [
|
|
499
|
-
m("div",
|
|
501
|
+
m("div", za, [
|
|
500
502
|
m("div", {
|
|
501
503
|
id: e.id,
|
|
502
504
|
ref_key: "triggerRef",
|
|
@@ -506,19 +508,19 @@ const ma = /* @__PURE__ */ A({
|
|
|
506
508
|
"aria-controls": O.value,
|
|
507
509
|
"aria-haspopup": "listbox",
|
|
508
510
|
tabindex: "0",
|
|
509
|
-
class:
|
|
510
|
-
onClick:
|
|
511
|
-
onKeydown:
|
|
511
|
+
class: S(["ds-select__trigger", { "ds-select__trigger--open": d.value }]),
|
|
512
|
+
onClick: X(_, ["stop"]),
|
|
513
|
+
onKeydown: H
|
|
512
514
|
}, [
|
|
513
|
-
|
|
514
|
-
|
|
515
|
+
c.value ? (a(), l("span", Aa, C(c.value), 1)) : (a(), l("span", La, C(e.placeholder), 1)),
|
|
516
|
+
x(N, {
|
|
515
517
|
name: "chevron-down",
|
|
516
518
|
class: "ds-select__chevron",
|
|
517
519
|
size: "sm"
|
|
518
520
|
})
|
|
519
|
-
], 42,
|
|
520
|
-
|
|
521
|
-
default:
|
|
521
|
+
], 42, Da),
|
|
522
|
+
x(ae, { name: "ds-select-drop" }, {
|
|
523
|
+
default: U(() => [
|
|
522
524
|
d.value ? (a(), l("div", {
|
|
523
525
|
key: 0,
|
|
524
526
|
id: O.value,
|
|
@@ -526,34 +528,34 @@ const ma = /* @__PURE__ */ A({
|
|
|
526
528
|
ref: u,
|
|
527
529
|
role: "listbox",
|
|
528
530
|
class: "ds-select__dropdown",
|
|
529
|
-
onClick:
|
|
531
|
+
onClick: z[0] || (z[0] = X(() => {
|
|
530
532
|
}, ["stop"]))
|
|
531
533
|
}, [
|
|
532
|
-
(a(!0), l(
|
|
534
|
+
(a(!0), l(j, null, W(t.options, (y, $) => (a(), l("div", {
|
|
533
535
|
key: String(o(y)),
|
|
534
536
|
role: "option",
|
|
535
537
|
"aria-selected": o(y) === e.modelValue,
|
|
536
|
-
class:
|
|
538
|
+
class: S(["ds-select__option", {
|
|
537
539
|
"ds-select__option--selected": o(y) === e.modelValue,
|
|
538
540
|
"ds-select__option--focused": $ === h.value
|
|
539
541
|
}]),
|
|
540
|
-
onClick:
|
|
542
|
+
onClick: X((b) => V(y), ["stop"]),
|
|
541
543
|
onMouseenter: (b) => h.value = $
|
|
542
|
-
},
|
|
543
|
-
], 8,
|
|
544
|
+
}, C(r(y)), 43, Ea))), 128))
|
|
545
|
+
], 8, Ta)) : f("", !0)
|
|
544
546
|
]),
|
|
545
547
|
_: 1
|
|
546
548
|
})
|
|
547
549
|
])
|
|
548
550
|
], 2));
|
|
549
551
|
}
|
|
550
|
-
}),
|
|
552
|
+
}), Ce = /* @__PURE__ */ L(Ma, [["__scopeId", "data-v-b01777dd"]]), Pa = { class: "ds-multi-select__wrapper" }, Oa = ["id", "placeholder", "disabled"], Ra = {
|
|
551
553
|
key: 0,
|
|
552
554
|
class: "ds-multi-select__no-results"
|
|
553
|
-
},
|
|
555
|
+
}, Na = ["aria-selected", "onClick", "onMouseenter"], Fa = { class: "ds-multi-select__option-label" }, Ua = {
|
|
554
556
|
key: 0,
|
|
555
557
|
class: "ds-multi-select__tags"
|
|
556
|
-
},
|
|
558
|
+
}, ja = { class: "ds-multi-select__tag-label" }, qa = ["disabled", "onClick"], Ka = /* @__PURE__ */ A({
|
|
557
559
|
__name: "MultiSelect",
|
|
558
560
|
props: {
|
|
559
561
|
modelValue: { default: () => [] },
|
|
@@ -565,40 +567,40 @@ const ma = /* @__PURE__ */ A({
|
|
|
565
567
|
},
|
|
566
568
|
emits: ["update:modelValue", "change"],
|
|
567
569
|
setup(e, { emit: s }) {
|
|
568
|
-
const t = e, n = s, i =
|
|
570
|
+
const t = e, n = s, i = P(""), o = P(!1), r = P(null), c = P(null), d = P(-1);
|
|
569
571
|
function v(p) {
|
|
570
572
|
return typeof p == "object" && p !== null ? p : { label: String(p), value: p };
|
|
571
573
|
}
|
|
572
574
|
const u = g(() => t.options.map(v)), h = g(() => {
|
|
573
575
|
const p = i.value.toLowerCase().trim();
|
|
574
576
|
return p ? u.value.filter(
|
|
575
|
-
(
|
|
577
|
+
(z) => z.label.toLowerCase().includes(p)
|
|
576
578
|
) : u.value;
|
|
577
579
|
}), _ = g(() => u.value.filter(
|
|
578
580
|
(p) => t.modelValue.includes(p.value)
|
|
579
581
|
));
|
|
580
|
-
function
|
|
582
|
+
function k(p) {
|
|
581
583
|
return t.modelValue.includes(p);
|
|
582
584
|
}
|
|
583
|
-
function
|
|
585
|
+
function M() {
|
|
584
586
|
t.disabled || o.value || (o.value = !0, d.value = -1);
|
|
585
587
|
}
|
|
586
588
|
function B() {
|
|
587
589
|
o.value = !1, d.value = -1;
|
|
588
590
|
}
|
|
589
|
-
function
|
|
590
|
-
const
|
|
591
|
-
y > -1 ?
|
|
591
|
+
function V(p) {
|
|
592
|
+
const z = [...t.modelValue], y = z.indexOf(p.value);
|
|
593
|
+
y > -1 ? z.splice(y, 1) : z.push(p.value), n("update:modelValue", z), n("change", z), i.value = "";
|
|
592
594
|
}
|
|
593
|
-
function
|
|
595
|
+
function H(p) {
|
|
594
596
|
if (t.disabled) return;
|
|
595
|
-
const
|
|
596
|
-
n("update:modelValue",
|
|
597
|
+
const z = t.modelValue.filter((y) => y !== p);
|
|
598
|
+
n("update:modelValue", z), n("change", z);
|
|
597
599
|
}
|
|
598
|
-
function
|
|
600
|
+
function w(p) {
|
|
599
601
|
if (!t.disabled) {
|
|
600
602
|
if (!o.value) {
|
|
601
|
-
(p.key === "Enter" || p.key === "ArrowDown" || p.key === " ") && (p.preventDefault(),
|
|
603
|
+
(p.key === "Enter" || p.key === "ArrowDown" || p.key === " ") && (p.preventDefault(), M());
|
|
602
604
|
return;
|
|
603
605
|
}
|
|
604
606
|
switch (p.key) {
|
|
@@ -615,21 +617,21 @@ const ma = /* @__PURE__ */ A({
|
|
|
615
617
|
break;
|
|
616
618
|
case "Enter":
|
|
617
619
|
if (p.preventDefault(), d.value >= 0 && d.value < h.value.length) {
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
+
const z = h.value[d.value];
|
|
621
|
+
z && V(z);
|
|
620
622
|
}
|
|
621
623
|
break;
|
|
622
624
|
}
|
|
623
625
|
}
|
|
624
626
|
}
|
|
625
|
-
function
|
|
626
|
-
const
|
|
627
|
-
!y && !$ || y && y.contains(
|
|
627
|
+
function I(p) {
|
|
628
|
+
const z = p.target, y = r.value, $ = c.value;
|
|
629
|
+
!y && !$ || y && y.contains(z) || $ && $.contains(z) || o.value && B();
|
|
628
630
|
}
|
|
629
|
-
|
|
630
|
-
document.addEventListener("click",
|
|
631
|
+
te(() => {
|
|
632
|
+
document.addEventListener("click", I);
|
|
631
633
|
}), oe(() => {
|
|
632
|
-
document.removeEventListener("click",
|
|
634
|
+
document.removeEventListener("click", I);
|
|
633
635
|
});
|
|
634
636
|
const O = g(() => [
|
|
635
637
|
"ds-multi-select",
|
|
@@ -639,95 +641,95 @@ const ma = /* @__PURE__ */ A({
|
|
|
639
641
|
"ds-multi-select--open": o.value
|
|
640
642
|
}
|
|
641
643
|
]);
|
|
642
|
-
return (p,
|
|
643
|
-
class:
|
|
644
|
+
return (p, z) => (a(), l("div", {
|
|
645
|
+
class: S(O.value)
|
|
644
646
|
}, [
|
|
645
|
-
m("div",
|
|
647
|
+
m("div", Pa, [
|
|
646
648
|
m("div", {
|
|
647
649
|
ref_key: "triggerRef",
|
|
648
|
-
ref:
|
|
649
|
-
class:
|
|
650
|
-
onClick:
|
|
650
|
+
ref: r,
|
|
651
|
+
class: S(["ds-multi-select__trigger", { "ds-multi-select__trigger--open": o.value }]),
|
|
652
|
+
onClick: M
|
|
651
653
|
}, [
|
|
652
|
-
|
|
654
|
+
ue(m("input", {
|
|
653
655
|
id: e.id,
|
|
654
|
-
"onUpdate:modelValue":
|
|
656
|
+
"onUpdate:modelValue": z[0] || (z[0] = (y) => i.value = y),
|
|
655
657
|
type: "text",
|
|
656
658
|
placeholder: e.placeholder,
|
|
657
659
|
disabled: e.disabled,
|
|
658
660
|
class: "ds-multi-select__input",
|
|
659
|
-
onKeydown:
|
|
660
|
-
onFocus:
|
|
661
|
-
}, null, 40,
|
|
662
|
-
[
|
|
661
|
+
onKeydown: w,
|
|
662
|
+
onFocus: M
|
|
663
|
+
}, null, 40, Oa), [
|
|
664
|
+
[Me, i.value]
|
|
663
665
|
]),
|
|
664
|
-
|
|
666
|
+
x(N, {
|
|
665
667
|
name: "chevron-down",
|
|
666
668
|
class: "ds-multi-select__chevron",
|
|
667
669
|
size: "sm"
|
|
668
670
|
})
|
|
669
671
|
], 2),
|
|
670
|
-
|
|
671
|
-
default:
|
|
672
|
+
x(ae, { name: "ds-multi-select-drop" }, {
|
|
673
|
+
default: U(() => [
|
|
672
674
|
o.value ? (a(), l("div", {
|
|
673
675
|
key: 0,
|
|
674
676
|
ref_key: "dropdownRef",
|
|
675
|
-
ref:
|
|
677
|
+
ref: c,
|
|
676
678
|
role: "listbox",
|
|
677
679
|
class: "ds-multi-select__dropdown",
|
|
678
|
-
onClick:
|
|
680
|
+
onClick: z[1] || (z[1] = X(() => {
|
|
679
681
|
}, ["stop"]))
|
|
680
682
|
}, [
|
|
681
|
-
h.value.length === 0 ? (a(), l("div",
|
|
682
|
-
(a(!0), l(
|
|
683
|
+
h.value.length === 0 ? (a(), l("div", Ra, C(i.value ? "نتیجهای یافت نشد" : "گزینهای وجود ندارد"), 1)) : f("", !0),
|
|
684
|
+
(a(!0), l(j, null, W(h.value, (y, $) => (a(), l("div", {
|
|
683
685
|
key: String(y.value),
|
|
684
686
|
role: "option",
|
|
685
|
-
"aria-selected":
|
|
686
|
-
class:
|
|
687
|
-
"ds-multi-select__option--selected":
|
|
687
|
+
"aria-selected": k(y.value),
|
|
688
|
+
class: S(["ds-multi-select__option", {
|
|
689
|
+
"ds-multi-select__option--selected": k(y.value),
|
|
688
690
|
"ds-multi-select__option--focused": $ === d.value
|
|
689
691
|
}]),
|
|
690
|
-
onClick:
|
|
692
|
+
onClick: X((b) => V(y), ["stop"]),
|
|
691
693
|
onMouseenter: (b) => d.value = $
|
|
692
694
|
}, [
|
|
693
|
-
m("span",
|
|
694
|
-
|
|
695
|
+
m("span", Fa, C(y.label), 1),
|
|
696
|
+
k(y.value) ? (a(), T(N, {
|
|
695
697
|
key: 0,
|
|
696
698
|
name: "check",
|
|
697
699
|
class: "ds-multi-select__check-icon",
|
|
698
700
|
size: "sm"
|
|
699
701
|
})) : f("", !0)
|
|
700
|
-
], 42,
|
|
702
|
+
], 42, Na))), 128))
|
|
701
703
|
], 512)) : f("", !0)
|
|
702
704
|
]),
|
|
703
705
|
_: 1
|
|
704
706
|
})
|
|
705
707
|
]),
|
|
706
|
-
_.value.length > 0 ? (a(), l("div",
|
|
707
|
-
(a(!0), l(
|
|
708
|
+
_.value.length > 0 ? (a(), l("div", Ua, [
|
|
709
|
+
(a(!0), l(j, null, W(_.value, (y) => (a(), l("div", {
|
|
708
710
|
key: String(y.value),
|
|
709
711
|
class: "ds-multi-select__tag"
|
|
710
712
|
}, [
|
|
711
|
-
m("span",
|
|
713
|
+
m("span", ja, C(y.label), 1),
|
|
712
714
|
m("button", {
|
|
713
715
|
type: "button",
|
|
714
716
|
disabled: e.disabled,
|
|
715
717
|
class: "ds-multi-select__tag-remove",
|
|
716
|
-
onClick:
|
|
718
|
+
onClick: X(($) => H(y.value), ["stop"])
|
|
717
719
|
}, [
|
|
718
|
-
|
|
720
|
+
x(N, {
|
|
719
721
|
name: "x",
|
|
720
722
|
size: "xs"
|
|
721
723
|
})
|
|
722
|
-
], 8,
|
|
724
|
+
], 8, qa)
|
|
723
725
|
]))), 128))
|
|
724
726
|
])) : f("", !0)
|
|
725
727
|
], 2));
|
|
726
728
|
}
|
|
727
|
-
}),
|
|
729
|
+
}), Ha = /* @__PURE__ */ L(Ka, [["__scopeId", "data-v-885409ca"]]), Wa = ["id", "checked", "disabled"], Ga = { class: "ds-checkbox__box" }, Ya = {
|
|
728
730
|
key: 0,
|
|
729
731
|
class: "ds-checkbox__label"
|
|
730
|
-
},
|
|
732
|
+
}, Xa = /* @__PURE__ */ A({
|
|
731
733
|
__name: "Checkbox",
|
|
732
734
|
props: {
|
|
733
735
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -746,14 +748,14 @@ const ma = /* @__PURE__ */ A({
|
|
|
746
748
|
"ds-checkbox--error": !!t.error
|
|
747
749
|
}
|
|
748
750
|
]);
|
|
749
|
-
function
|
|
751
|
+
function r() {
|
|
750
752
|
if (t.disabled) return;
|
|
751
|
-
const
|
|
752
|
-
n("update:modelValue",
|
|
753
|
+
const c = !i.value;
|
|
754
|
+
n("update:modelValue", c), n("change", c);
|
|
753
755
|
}
|
|
754
|
-
return (
|
|
755
|
-
class:
|
|
756
|
-
onClick:
|
|
756
|
+
return (c, d) => (a(), l("div", {
|
|
757
|
+
class: S(o.value),
|
|
758
|
+
onClick: r
|
|
757
759
|
}, [
|
|
758
760
|
m("input", {
|
|
759
761
|
id: e.id,
|
|
@@ -761,12 +763,12 @@ const ma = /* @__PURE__ */ A({
|
|
|
761
763
|
checked: i.value,
|
|
762
764
|
disabled: e.disabled,
|
|
763
765
|
class: "ds-checkbox__input",
|
|
764
|
-
onClick: d[0] || (d[0] =
|
|
766
|
+
onClick: d[0] || (d[0] = X(() => {
|
|
765
767
|
}, ["stop"])),
|
|
766
|
-
onChange:
|
|
767
|
-
}, null, 40,
|
|
768
|
-
m("div",
|
|
769
|
-
i.value ? (a(),
|
|
768
|
+
onChange: r
|
|
769
|
+
}, null, 40, Wa),
|
|
770
|
+
m("div", Ga, [
|
|
771
|
+
i.value ? (a(), T(N, {
|
|
770
772
|
key: 0,
|
|
771
773
|
name: "check",
|
|
772
774
|
size: "xs",
|
|
@@ -774,9 +776,9 @@ const ma = /* @__PURE__ */ A({
|
|
|
774
776
|
class: "ds-checkbox__check-icon"
|
|
775
777
|
})) : f("", !0)
|
|
776
778
|
]),
|
|
777
|
-
e.label ||
|
|
778
|
-
|
|
779
|
-
|
|
779
|
+
e.label || c.$slots.default ? (a(), l("span", Ya, [
|
|
780
|
+
K(c.$slots, "default", {}, () => [
|
|
781
|
+
x(G, {
|
|
780
782
|
variant: "body-sm",
|
|
781
783
|
value: e.label
|
|
782
784
|
}, null, 8, ["value"])
|
|
@@ -784,10 +786,10 @@ const ma = /* @__PURE__ */ A({
|
|
|
784
786
|
])) : f("", !0)
|
|
785
787
|
], 2));
|
|
786
788
|
}
|
|
787
|
-
}),
|
|
789
|
+
}), me = /* @__PURE__ */ L(Xa, [["__scopeId", "data-v-590d6988"]]), Za = ["id", "aria-checked", "checked", "disabled"], Ja = {
|
|
788
790
|
key: 0,
|
|
789
791
|
class: "ds-switch__label"
|
|
790
|
-
},
|
|
792
|
+
}, Qa = /* @__PURE__ */ A({
|
|
791
793
|
__name: "Switch",
|
|
792
794
|
props: {
|
|
793
795
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -804,14 +806,14 @@ const ma = /* @__PURE__ */ A({
|
|
|
804
806
|
"ds-switch--disabled": t.disabled
|
|
805
807
|
}
|
|
806
808
|
]);
|
|
807
|
-
function
|
|
809
|
+
function r() {
|
|
808
810
|
if (t.disabled) return;
|
|
809
|
-
const
|
|
810
|
-
n("update:modelValue",
|
|
811
|
+
const c = !i.value;
|
|
812
|
+
n("update:modelValue", c), n("change", c);
|
|
811
813
|
}
|
|
812
|
-
return (
|
|
813
|
-
class:
|
|
814
|
-
onClick:
|
|
814
|
+
return (c, d) => (a(), l("div", {
|
|
815
|
+
class: S(o.value),
|
|
816
|
+
onClick: r
|
|
815
817
|
}, [
|
|
816
818
|
m("input", {
|
|
817
819
|
id: e.id,
|
|
@@ -821,16 +823,16 @@ const ma = /* @__PURE__ */ A({
|
|
|
821
823
|
checked: i.value,
|
|
822
824
|
disabled: e.disabled,
|
|
823
825
|
class: "ds-switch__input",
|
|
824
|
-
onClick: d[0] || (d[0] =
|
|
826
|
+
onClick: d[0] || (d[0] = X(() => {
|
|
825
827
|
}, ["stop"])),
|
|
826
|
-
onChange:
|
|
827
|
-
}, null, 40,
|
|
828
|
+
onChange: r
|
|
829
|
+
}, null, 40, Za),
|
|
828
830
|
d[1] || (d[1] = m("div", { class: "ds-switch__track" }, [
|
|
829
831
|
m("div", { class: "ds-switch__thumb" })
|
|
830
832
|
], -1)),
|
|
831
|
-
e.label ||
|
|
832
|
-
|
|
833
|
-
|
|
833
|
+
e.label || c.$slots.default ? (a(), l("span", Ja, [
|
|
834
|
+
K(c.$slots, "default", {}, () => [
|
|
835
|
+
x(G, {
|
|
834
836
|
variant: "body-sm",
|
|
835
837
|
value: e.label
|
|
836
838
|
}, null, 8, ["value"])
|
|
@@ -838,16 +840,16 @@ const ma = /* @__PURE__ */ A({
|
|
|
838
840
|
])) : f("", !0)
|
|
839
841
|
], 2));
|
|
840
842
|
}
|
|
841
|
-
}),
|
|
843
|
+
}), es = /* @__PURE__ */ L(Qa, [["__scopeId", "data-v-907da2d8"]]), ts = ["for"], as = {
|
|
842
844
|
key: 0,
|
|
843
845
|
class: "ds-form-field__required"
|
|
844
|
-
},
|
|
846
|
+
}, ss = { class: "ds-form-field__control" }, ns = {
|
|
845
847
|
key: 1,
|
|
846
848
|
class: "ds-form-field__hint"
|
|
847
|
-
},
|
|
849
|
+
}, ls = {
|
|
848
850
|
key: 2,
|
|
849
851
|
class: "ds-form-field__error"
|
|
850
|
-
},
|
|
852
|
+
}, os = /* @__PURE__ */ A({
|
|
851
853
|
__name: "FormField",
|
|
852
854
|
props: {
|
|
853
855
|
label: {},
|
|
@@ -860,37 +862,37 @@ const ma = /* @__PURE__ */ A({
|
|
|
860
862
|
setup(e) {
|
|
861
863
|
const s = e, t = g(() => (typeof s.error == "string", !!s.error));
|
|
862
864
|
return (n, i) => (a(), l("div", {
|
|
863
|
-
class:
|
|
865
|
+
class: S(["ds-form-field", { "ds-form-field--error": t.value, "ds-form-field--disabled": e.disabled }])
|
|
864
866
|
}, [
|
|
865
867
|
e.label ? (a(), l("label", {
|
|
866
868
|
key: 0,
|
|
867
869
|
for: e.id,
|
|
868
870
|
class: "ds-form-field__label"
|
|
869
871
|
}, [
|
|
870
|
-
|
|
872
|
+
x(G, {
|
|
871
873
|
variant: "body-sm",
|
|
872
874
|
value: e.label
|
|
873
875
|
}, null, 8, ["value"]),
|
|
874
|
-
e.required ? (a(), l("span",
|
|
875
|
-
], 8,
|
|
876
|
-
m("div",
|
|
877
|
-
|
|
876
|
+
e.required ? (a(), l("span", as, "*")) : f("", !0)
|
|
877
|
+
], 8, ts)) : f("", !0),
|
|
878
|
+
m("div", ss, [
|
|
879
|
+
K(n.$slots, "default", {}, void 0, !0)
|
|
878
880
|
]),
|
|
879
|
-
e.hint && !t.value ? (a(), l("span",
|
|
880
|
-
|
|
881
|
+
e.hint && !t.value ? (a(), l("span", ns, [
|
|
882
|
+
x(G, {
|
|
881
883
|
variant: "caption",
|
|
882
884
|
value: e.hint
|
|
883
885
|
}, null, 8, ["value"])
|
|
884
886
|
])) : f("", !0),
|
|
885
|
-
typeof e.error == "string" && e.error ? (a(), l("span",
|
|
886
|
-
|
|
887
|
+
typeof e.error == "string" && e.error ? (a(), l("span", ls, [
|
|
888
|
+
x(G, {
|
|
887
889
|
variant: "caption",
|
|
888
890
|
value: e.error
|
|
889
891
|
}, null, 8, ["value"])
|
|
890
892
|
])) : f("", !0)
|
|
891
893
|
], 2));
|
|
892
894
|
}
|
|
893
|
-
}),
|
|
895
|
+
}), is = /* @__PURE__ */ L(os, [["__scopeId", "data-v-f014bd45"]]), cs = /* @__PURE__ */ A({
|
|
894
896
|
__name: "Spacer",
|
|
895
897
|
props: {
|
|
896
898
|
size: { default: "md" },
|
|
@@ -901,37 +903,37 @@ const ma = /* @__PURE__ */ A({
|
|
|
901
903
|
setup(e) {
|
|
902
904
|
const s = e, t = (o) => {
|
|
903
905
|
if (!o) return "var(--space-4)";
|
|
904
|
-
const
|
|
906
|
+
const c = {
|
|
905
907
|
xs: "1",
|
|
906
908
|
sm: "2",
|
|
907
909
|
md: "4",
|
|
908
910
|
lg: "6",
|
|
909
911
|
xl: "8"
|
|
910
912
|
}[o];
|
|
911
|
-
return
|
|
913
|
+
return c ? `var(--space-${c})` : /^\d+(-\d+)?$/.test(o) ? `var(--space-${o})` : o;
|
|
912
914
|
}, n = g(() => {
|
|
913
|
-
const o = {},
|
|
914
|
-
return s.orientation === "vertical" ? (o["--spacer-height"] =
|
|
915
|
+
const o = {}, r = t(s.size), c = s.mobile ? t(s.mobile) : void 0, d = s.desktop ? t(s.desktop) : void 0;
|
|
916
|
+
return s.orientation === "vertical" ? (o["--spacer-height"] = r, c && (o["--spacer-mobile-height"] = c), d && (o["--spacer-desktop-height"] = d)) : (o["--spacer-width"] = r, c && (o["--spacer-mobile-width"] = c), d && (o["--spacer-desktop-width"] = d)), o;
|
|
915
917
|
}), i = g(() => [
|
|
916
918
|
"ds-spacer",
|
|
917
919
|
`ds-spacer--${s.orientation}`
|
|
918
920
|
]);
|
|
919
|
-
return (o,
|
|
920
|
-
class:
|
|
921
|
+
return (o, r) => (a(), l("div", {
|
|
922
|
+
class: S(i.value),
|
|
921
923
|
style: Q(n.value),
|
|
922
924
|
role: "presentation"
|
|
923
925
|
}, null, 6));
|
|
924
926
|
}
|
|
925
|
-
}),
|
|
927
|
+
}), rs = /* @__PURE__ */ L(cs, [["__scopeId", "data-v-f0547263"]]), ds = ["id", "value", "placeholder", "disabled", "readonly", "rows", "maxlength", "minlength"], us = {
|
|
926
928
|
key: 0,
|
|
927
929
|
class: "ds-textarea__footer"
|
|
928
|
-
},
|
|
930
|
+
}, ms = {
|
|
929
931
|
key: 0,
|
|
930
932
|
class: "ds-textarea__counter"
|
|
931
|
-
},
|
|
933
|
+
}, fs = {
|
|
932
934
|
key: 1,
|
|
933
935
|
class: "ds-textarea__counter"
|
|
934
|
-
},
|
|
936
|
+
}, vs = /* @__PURE__ */ A({
|
|
935
937
|
__name: "Textarea",
|
|
936
938
|
props: {
|
|
937
939
|
modelValue: { default: "" },
|
|
@@ -953,7 +955,7 @@ const ma = /* @__PURE__ */ A({
|
|
|
953
955
|
const t = e, n = s, { t: i } = Ne(), o = g(() => {
|
|
954
956
|
const d = (t.modelValue || "").trim();
|
|
955
957
|
return d ? d.split(/\s+/).filter(Boolean).length : 0;
|
|
956
|
-
}),
|
|
958
|
+
}), r = g(() => [
|
|
957
959
|
"ds-textarea",
|
|
958
960
|
`ds-textarea--resize-${t.resize}`,
|
|
959
961
|
{
|
|
@@ -962,12 +964,12 @@ const ma = /* @__PURE__ */ A({
|
|
|
962
964
|
"ds-textarea--error": !!t.error
|
|
963
965
|
}
|
|
964
966
|
]);
|
|
965
|
-
function
|
|
967
|
+
function c(d) {
|
|
966
968
|
const v = d.target;
|
|
967
969
|
n("update:modelValue", v.value), n("input", d);
|
|
968
970
|
}
|
|
969
971
|
return (d, v) => (a(), l("div", {
|
|
970
|
-
class:
|
|
972
|
+
class: S(r.value)
|
|
971
973
|
}, [
|
|
972
974
|
m("textarea", {
|
|
973
975
|
id: e.id,
|
|
@@ -979,17 +981,17 @@ const ma = /* @__PURE__ */ A({
|
|
|
979
981
|
maxlength: e.maxlength,
|
|
980
982
|
minlength: e.minlength,
|
|
981
983
|
class: "ds-textarea__field",
|
|
982
|
-
onInput:
|
|
984
|
+
onInput: c,
|
|
983
985
|
onFocus: v[0] || (v[0] = (u) => n("focus", u)),
|
|
984
986
|
onBlur: v[1] || (v[1] = (u) => n("blur", u))
|
|
985
|
-
}, null, 40,
|
|
986
|
-
e.showCounter && e.maxlength || e.showWordCount && e.maxWords ? (a(), l("div",
|
|
987
|
-
e.showCounter && e.maxlength ? (a(), l("span",
|
|
988
|
-
e.showWordCount && e.maxWords ? (a(), l("span",
|
|
987
|
+
}, null, 40, ds),
|
|
988
|
+
e.showCounter && e.maxlength || e.showWordCount && e.maxWords ? (a(), l("div", us, [
|
|
989
|
+
e.showCounter && e.maxlength ? (a(), l("span", ms, C((e.modelValue || "").length) + " / " + C(e.maxlength), 1)) : f("", !0),
|
|
990
|
+
e.showWordCount && e.maxWords ? (a(), l("span", fs, C(o.value) + " / " + C(e.maxWords) + " " + C(R(i)("textarea.words")), 1)) : f("", !0)
|
|
989
991
|
])) : f("", !0)
|
|
990
992
|
], 2));
|
|
991
993
|
}
|
|
992
|
-
}),
|
|
994
|
+
}), ps = /* @__PURE__ */ L(vs, [["__scopeId", "data-v-cf0c9283"]]), bs = /* @__PURE__ */ A({
|
|
993
995
|
__name: "Stack",
|
|
994
996
|
props: {
|
|
995
997
|
direction: { default: "column" },
|
|
@@ -1010,12 +1012,12 @@ const ma = /* @__PURE__ */ A({
|
|
|
1010
1012
|
}
|
|
1011
1013
|
]);
|
|
1012
1014
|
return (n, i) => (a(), l("div", {
|
|
1013
|
-
class:
|
|
1015
|
+
class: S(t.value)
|
|
1014
1016
|
}, [
|
|
1015
|
-
|
|
1017
|
+
K(n.$slots, "default", {}, void 0, !0)
|
|
1016
1018
|
], 2));
|
|
1017
1019
|
}
|
|
1018
|
-
}),
|
|
1020
|
+
}), hs = /* @__PURE__ */ L(bs, [["__scopeId", "data-v-cf20cd02"]]), gs = /* @__PURE__ */ A({
|
|
1019
1021
|
__name: "Row",
|
|
1020
1022
|
props: {
|
|
1021
1023
|
align: { default: "center" },
|
|
@@ -1034,12 +1036,12 @@ const ma = /* @__PURE__ */ A({
|
|
|
1034
1036
|
}
|
|
1035
1037
|
]);
|
|
1036
1038
|
return (n, i) => (a(), l("div", {
|
|
1037
|
-
class:
|
|
1039
|
+
class: S(t.value)
|
|
1038
1040
|
}, [
|
|
1039
|
-
|
|
1041
|
+
K(n.$slots, "default", {}, void 0, !0)
|
|
1040
1042
|
], 2));
|
|
1041
1043
|
}
|
|
1042
|
-
}),
|
|
1044
|
+
}), _s = /* @__PURE__ */ L(gs, [["__scopeId", "data-v-b1229c0b"]]), ys = /* @__PURE__ */ A({
|
|
1043
1045
|
__name: "Grid",
|
|
1044
1046
|
props: {
|
|
1045
1047
|
cols: { default: 12 },
|
|
@@ -1059,19 +1061,19 @@ const ma = /* @__PURE__ */ A({
|
|
|
1059
1061
|
`ds-grid--gap-${s.gap}`
|
|
1060
1062
|
]);
|
|
1061
1063
|
return (i, o) => (a(), l("div", {
|
|
1062
|
-
class:
|
|
1064
|
+
class: S(n.value),
|
|
1063
1065
|
style: Q(t.value)
|
|
1064
1066
|
}, [
|
|
1065
|
-
|
|
1067
|
+
K(i.$slots, "default", {}, void 0, !0)
|
|
1066
1068
|
], 6));
|
|
1067
1069
|
}
|
|
1068
|
-
}),
|
|
1070
|
+
}), ks = /* @__PURE__ */ L(ys, [["__scopeId", "data-v-1ba93f4f"]]), ws = {
|
|
1069
1071
|
key: 0,
|
|
1070
1072
|
class: "ds-section__header"
|
|
1071
|
-
},
|
|
1073
|
+
}, $s = { class: "ds-section__title-group" }, Cs = {
|
|
1072
1074
|
key: 0,
|
|
1073
1075
|
class: "ds-section__actions"
|
|
1074
|
-
},
|
|
1076
|
+
}, xs = { class: "ds-section__content" }, Ss = /* @__PURE__ */ A({
|
|
1075
1077
|
__name: "Section",
|
|
1076
1078
|
props: {
|
|
1077
1079
|
title: {},
|
|
@@ -1086,51 +1088,51 @@ const ma = /* @__PURE__ */ A({
|
|
|
1086
1088
|
}
|
|
1087
1089
|
]);
|
|
1088
1090
|
return (n, i) => (a(), l("section", {
|
|
1089
|
-
class:
|
|
1091
|
+
class: S(t.value)
|
|
1090
1092
|
}, [
|
|
1091
|
-
e.title || e.subtitle || n.$slots.actions ? (a(), l("div",
|
|
1092
|
-
m("div",
|
|
1093
|
-
e.title ? (a(),
|
|
1093
|
+
e.title || e.subtitle || n.$slots.actions ? (a(), l("div", ws, [
|
|
1094
|
+
m("div", $s, [
|
|
1095
|
+
e.title ? (a(), T(G, {
|
|
1094
1096
|
key: 0,
|
|
1095
1097
|
variant: "title",
|
|
1096
1098
|
value: e.title,
|
|
1097
1099
|
class: "ds-section__title"
|
|
1098
1100
|
}, null, 8, ["value"])) : f("", !0),
|
|
1099
|
-
e.subtitle ? (a(),
|
|
1101
|
+
e.subtitle ? (a(), T(G, {
|
|
1100
1102
|
key: 1,
|
|
1101
1103
|
variant: "subtitle",
|
|
1102
1104
|
value: e.subtitle,
|
|
1103
1105
|
class: "ds-section__subtitle"
|
|
1104
1106
|
}, null, 8, ["value"])) : f("", !0)
|
|
1105
1107
|
]),
|
|
1106
|
-
n.$slots.actions ? (a(), l("div",
|
|
1107
|
-
|
|
1108
|
+
n.$slots.actions ? (a(), l("div", Cs, [
|
|
1109
|
+
K(n.$slots, "actions", {}, void 0, !0)
|
|
1108
1110
|
])) : f("", !0)
|
|
1109
1111
|
])) : f("", !0),
|
|
1110
|
-
m("div",
|
|
1111
|
-
|
|
1112
|
+
m("div", xs, [
|
|
1113
|
+
K(n.$slots, "default", {}, void 0, !0)
|
|
1112
1114
|
])
|
|
1113
1115
|
], 2));
|
|
1114
1116
|
}
|
|
1115
|
-
}),
|
|
1117
|
+
}), Is = /* @__PURE__ */ L(Ss, [["__scopeId", "data-v-07f2f674"]]), Bs = { class: "ds-card" }, Vs = {
|
|
1116
1118
|
key: 0,
|
|
1117
1119
|
class: "ds-card__header"
|
|
1118
|
-
},
|
|
1120
|
+
}, zs = {
|
|
1119
1121
|
key: 0,
|
|
1120
1122
|
class: "ds-card__title-group"
|
|
1121
|
-
},
|
|
1123
|
+
}, Ds = {
|
|
1122
1124
|
key: 0,
|
|
1123
1125
|
class: "ds-card__title"
|
|
1124
|
-
},
|
|
1126
|
+
}, As = {
|
|
1125
1127
|
key: 1,
|
|
1126
1128
|
class: "ds-card__subtitle"
|
|
1127
|
-
},
|
|
1129
|
+
}, Ls = {
|
|
1128
1130
|
key: 1,
|
|
1129
1131
|
class: "ds-card__header-actions"
|
|
1130
|
-
},
|
|
1132
|
+
}, Ts = {
|
|
1131
1133
|
key: 1,
|
|
1132
1134
|
class: "ds-card__footer"
|
|
1133
|
-
},
|
|
1135
|
+
}, Es = /* @__PURE__ */ A({
|
|
1134
1136
|
__name: "Card",
|
|
1135
1137
|
props: {
|
|
1136
1138
|
title: {},
|
|
@@ -1138,36 +1140,43 @@ const ma = /* @__PURE__ */ A({
|
|
|
1138
1140
|
padding: { type: Boolean, default: !0 }
|
|
1139
1141
|
},
|
|
1140
1142
|
setup(e) {
|
|
1141
|
-
return (s, t) => (a(), l("div",
|
|
1142
|
-
e.title || s.$slots.header ? (a(), l("div",
|
|
1143
|
-
e.title || e.subtitle ? (a(), l("div",
|
|
1144
|
-
e.title ? (a(), l("h3",
|
|
1145
|
-
e.subtitle ? (a(), l("p",
|
|
1143
|
+
return (s, t) => (a(), l("div", Bs, [
|
|
1144
|
+
e.title || s.$slots.header ? (a(), l("div", Vs, [
|
|
1145
|
+
e.title || e.subtitle ? (a(), l("div", zs, [
|
|
1146
|
+
e.title ? (a(), l("h3", Ds, C(e.title), 1)) : f("", !0),
|
|
1147
|
+
e.subtitle ? (a(), l("p", As, C(e.subtitle), 1)) : f("", !0)
|
|
1146
1148
|
])) : f("", !0),
|
|
1147
|
-
s.$slots.header ? (a(), l("div",
|
|
1148
|
-
|
|
1149
|
+
s.$slots.header ? (a(), l("div", Ls, [
|
|
1150
|
+
K(s.$slots, "header", {}, void 0, !0)
|
|
1149
1151
|
])) : f("", !0)
|
|
1150
1152
|
])) : f("", !0),
|
|
1151
1153
|
m("div", {
|
|
1152
|
-
class:
|
|
1154
|
+
class: S(["ds-card__body", { "ds-card__body--no-padding": !e.padding }])
|
|
1153
1155
|
}, [
|
|
1154
|
-
|
|
1156
|
+
K(s.$slots, "default", {}, void 0, !0)
|
|
1155
1157
|
], 2),
|
|
1156
|
-
s.$slots.footer ? (a(), l("div",
|
|
1157
|
-
|
|
1158
|
+
s.$slots.footer ? (a(), l("div", Ts, [
|
|
1159
|
+
K(s.$slots, "footer", {}, void 0, !0)
|
|
1158
1160
|
])) : f("", !0)
|
|
1159
1161
|
]));
|
|
1160
1162
|
}
|
|
1161
|
-
}),
|
|
1163
|
+
}), Ms = /* @__PURE__ */ L(Es, [["__scopeId", "data-v-51d0748a"]]), Ps = { class: "sp-head" }, Os = { class: "sp-title" }, Rs = { key: 0 }, Ns = {
|
|
1164
|
+
key: 1,
|
|
1165
|
+
class: "sp-meta"
|
|
1166
|
+
}, Fs = { key: 0 }, Us = { key: 0 }, js = { class: "sp-actions" }, qs = ["aria-label"], Ks = ["aria-label"], Hs = { class: "sp-content" }, Ws = {
|
|
1167
|
+
key: 0,
|
|
1168
|
+
class: "sp-footer"
|
|
1169
|
+
}, Gs = { class: "sp-head" }, Ys = { class: "sp-title" }, Xs = { key: 0 }, Zs = {
|
|
1162
1170
|
key: 1,
|
|
1163
1171
|
class: "sp-meta"
|
|
1164
|
-
},
|
|
1172
|
+
}, Js = { key: 0 }, Qs = { key: 0 }, en = { class: "sp-actions" }, tn = ["aria-label"], an = ["aria-label"], sn = { class: "sp-content" }, nn = {
|
|
1165
1173
|
key: 0,
|
|
1166
1174
|
class: "sp-footer"
|
|
1167
|
-
},
|
|
1175
|
+
}, ln = /* @__PURE__ */ A({
|
|
1168
1176
|
__name: "SidePanel",
|
|
1169
1177
|
props: {
|
|
1170
1178
|
modelValue: { type: Boolean, default: !1 },
|
|
1179
|
+
maximized: { type: Boolean, default: !1 },
|
|
1171
1180
|
title: {},
|
|
1172
1181
|
subtitle: {},
|
|
1173
1182
|
metaItems: {},
|
|
@@ -1177,126 +1186,288 @@ const ma = /* @__PURE__ */ A({
|
|
|
1177
1186
|
width: { default: "410px" },
|
|
1178
1187
|
closeOnOverlayClick: { type: Boolean, default: !0 },
|
|
1179
1188
|
maximizable: { type: Boolean, default: !1 },
|
|
1180
|
-
inline: { type: Boolean, default: !1 }
|
|
1189
|
+
inline: { type: Boolean, default: !1 },
|
|
1190
|
+
docked: { type: Boolean, default: !1 }
|
|
1181
1191
|
},
|
|
1182
|
-
emits: ["update:modelValue", "close", "cancel", "confirm"],
|
|
1192
|
+
emits: ["update:modelValue", "update:maximized", "close", "cancel", "confirm"],
|
|
1183
1193
|
setup(e, { emit: s }) {
|
|
1184
|
-
const t = e, n = s, i =
|
|
1194
|
+
const t = e, n = s, i = P(!1);
|
|
1195
|
+
ee(() => t.maximized, (u) => {
|
|
1196
|
+
i.value = u;
|
|
1197
|
+
}, { immediate: !0 });
|
|
1185
1198
|
function o() {
|
|
1186
|
-
i.value = !i.value;
|
|
1199
|
+
i.value = !i.value, n("update:maximized", i.value);
|
|
1187
1200
|
}
|
|
1188
|
-
function
|
|
1201
|
+
function r() {
|
|
1189
1202
|
n("update:modelValue", !1), n("close");
|
|
1190
1203
|
}
|
|
1191
|
-
function
|
|
1192
|
-
t.closeOnOverlayClick && u.target === u.currentTarget &&
|
|
1204
|
+
function c(u) {
|
|
1205
|
+
t.closeOnOverlayClick && u.target === u.currentTarget && r();
|
|
1193
1206
|
}
|
|
1194
|
-
|
|
1195
|
-
u ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
|
|
1207
|
+
ee(() => t.modelValue, (u) => {
|
|
1208
|
+
t.docked || (u ? document.body.style.overflow = "hidden" : document.body.style.overflow = "");
|
|
1196
1209
|
});
|
|
1197
1210
|
function d() {
|
|
1198
|
-
n("cancel"),
|
|
1211
|
+
n("cancel"), r();
|
|
1199
1212
|
}
|
|
1200
1213
|
function v() {
|
|
1201
1214
|
n("confirm");
|
|
1202
1215
|
}
|
|
1203
|
-
return (u, h) =>
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1216
|
+
return (u, h) => {
|
|
1217
|
+
var _;
|
|
1218
|
+
return e.docked ? (a(), l("div", {
|
|
1219
|
+
key: 1,
|
|
1220
|
+
class: S(["sp-docked", {
|
|
1221
|
+
"sp-docked--open": e.modelValue,
|
|
1222
|
+
"sp-docked--maximized": i.value
|
|
1223
|
+
}]),
|
|
1224
|
+
style: Q({
|
|
1225
|
+
width: e.modelValue ? i.value ? "100%" : e.width : "0"
|
|
1226
|
+
})
|
|
1227
|
+
}, [
|
|
1228
|
+
m("div", {
|
|
1229
|
+
class: S(["sp sp--docked", { "sp--maximized": i.value }])
|
|
1230
|
+
}, [
|
|
1231
|
+
m("div", Gs, [
|
|
1232
|
+
m("div", Ys, [
|
|
1233
|
+
e.title ? (a(), l("h2", Xs, C(e.title), 1)) : f("", !0),
|
|
1234
|
+
e.subtitle || u.$slots.subtitle || (_ = e.metaItems) != null && _.length ? (a(), l("div", Zs, [
|
|
1235
|
+
K(u.$slots, "subtitle", {}, () => {
|
|
1236
|
+
var k;
|
|
1237
|
+
return [
|
|
1238
|
+
e.subtitle ? (a(), l("span", Js, C(e.subtitle), 1)) : (k = e.metaItems) != null && k.length ? (a(!0), l(j, { key: 1 }, W(e.metaItems, (M, B) => (a(), l(j, { key: B }, [
|
|
1239
|
+
m("span", null, C(M), 1),
|
|
1240
|
+
B < e.metaItems.length - 1 ? (a(), l("span", Qs, "·")) : f("", !0)
|
|
1241
|
+
], 64))), 128)) : f("", !0)
|
|
1242
|
+
];
|
|
1243
|
+
}, !0)
|
|
1244
|
+
])) : f("", !0)
|
|
1245
|
+
]),
|
|
1246
|
+
m("div", en, [
|
|
1247
|
+
e.maximizable ? (a(), l("button", {
|
|
1248
|
+
key: 0,
|
|
1249
|
+
class: "sp-icon-btn",
|
|
1250
|
+
onClick: o,
|
|
1251
|
+
"aria-label": i.value ? R(F)("sidepanel.minimize") : R(F)("sidepanel.maximize")
|
|
1252
|
+
}, [
|
|
1253
|
+
i.value ? (a(), T(R(ke), {
|
|
1254
|
+
key: 0,
|
|
1255
|
+
size: 18
|
|
1256
|
+
})) : (a(), T(R(we), {
|
|
1257
|
+
key: 1,
|
|
1258
|
+
size: 18
|
|
1259
|
+
}))
|
|
1260
|
+
], 8, tn)) : f("", !0),
|
|
1261
|
+
m("button", {
|
|
1262
|
+
class: "sp-icon-btn",
|
|
1263
|
+
onClick: r,
|
|
1264
|
+
"aria-label": R(F)("sidepanel.close")
|
|
1265
|
+
}, [
|
|
1266
|
+
x(R($e), { size: 18 })
|
|
1267
|
+
], 8, an)
|
|
1268
|
+
])
|
|
1269
|
+
]),
|
|
1270
|
+
m("div", sn, [
|
|
1271
|
+
K(u.$slots, "default", {}, void 0, !0)
|
|
1272
|
+
]),
|
|
1273
|
+
u.$slots.footer || e.cancelLabel || e.confirmLabel ? (a(), l("div", nn, [
|
|
1274
|
+
K(u.$slots, "footer", {}, () => [
|
|
1275
|
+
x(Z, {
|
|
1276
|
+
variant: "secondary",
|
|
1277
|
+
onClick: d
|
|
1278
|
+
}, {
|
|
1279
|
+
default: U(() => [
|
|
1280
|
+
Y(C(e.cancelLabel ?? R(F)("sidepanel.cancel")), 1)
|
|
1232
1281
|
]),
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1282
|
+
_: 1
|
|
1283
|
+
}),
|
|
1284
|
+
x(Z, {
|
|
1285
|
+
variant: "primary",
|
|
1286
|
+
onClick: v
|
|
1287
|
+
}, {
|
|
1288
|
+
default: U(() => [
|
|
1289
|
+
Y(C(e.confirmLabel ?? R(F)("sidepanel.save")) + " ", 1),
|
|
1290
|
+
e.confirmIcon ? (a(), T(re(e.confirmIcon), { key: 0 })) : f("", !0)
|
|
1291
|
+
]),
|
|
1292
|
+
_: 1
|
|
1293
|
+
})
|
|
1294
|
+
], !0)
|
|
1295
|
+
])) : f("", !0)
|
|
1296
|
+
], 2)
|
|
1297
|
+
], 6)) : (a(), T(ae, {
|
|
1298
|
+
key: 0,
|
|
1299
|
+
name: "ds-slide"
|
|
1300
|
+
}, {
|
|
1301
|
+
default: U(() => {
|
|
1302
|
+
var k;
|
|
1303
|
+
return [
|
|
1304
|
+
e.modelValue ? (a(), l("div", {
|
|
1305
|
+
key: 0,
|
|
1306
|
+
class: S(["ds-panel-overlay", { "sp-overlay--inline": e.inline }]),
|
|
1307
|
+
onClick: c
|
|
1308
|
+
}, [
|
|
1309
|
+
m("div", {
|
|
1310
|
+
class: S(["sp", { "sp--maximized": i.value }]),
|
|
1311
|
+
style: Q({ width: i.value ? "100%" : e.width }),
|
|
1312
|
+
role: "dialog",
|
|
1313
|
+
"aria-modal": "true"
|
|
1314
|
+
}, [
|
|
1315
|
+
m("div", Ps, [
|
|
1316
|
+
m("div", Os, [
|
|
1317
|
+
e.title ? (a(), l("h2", Rs, C(e.title), 1)) : f("", !0),
|
|
1318
|
+
e.subtitle || u.$slots.subtitle || (k = e.metaItems) != null && k.length ? (a(), l("div", Ns, [
|
|
1319
|
+
K(u.$slots, "subtitle", {}, () => {
|
|
1320
|
+
var M;
|
|
1321
|
+
return [
|
|
1322
|
+
e.subtitle ? (a(), l("span", Fs, C(e.subtitle), 1)) : (M = e.metaItems) != null && M.length ? (a(!0), l(j, { key: 1 }, W(e.metaItems, (B, V) => (a(), l(j, { key: V }, [
|
|
1323
|
+
m("span", null, C(B), 1),
|
|
1324
|
+
V < e.metaItems.length - 1 ? (a(), l("span", Us, "·")) : f("", !0)
|
|
1325
|
+
], 64))), 128)) : f("", !0)
|
|
1326
|
+
];
|
|
1327
|
+
}, !0)
|
|
1328
|
+
])) : f("", !0)
|
|
1329
|
+
]),
|
|
1330
|
+
m("div", js, [
|
|
1331
|
+
e.maximizable ? (a(), l("button", {
|
|
1241
1332
|
key: 0,
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1333
|
+
class: "sp-icon-btn",
|
|
1334
|
+
onClick: o,
|
|
1335
|
+
"aria-label": i.value ? R(F)("sidepanel.minimize") : R(F)("sidepanel.maximize")
|
|
1336
|
+
}, [
|
|
1337
|
+
i.value ? (a(), T(R(ke), {
|
|
1338
|
+
key: 0,
|
|
1339
|
+
size: 18
|
|
1340
|
+
})) : (a(), T(R(we), {
|
|
1341
|
+
key: 1,
|
|
1342
|
+
size: 18
|
|
1343
|
+
}))
|
|
1344
|
+
], 8, qs)) : f("", !0),
|
|
1345
|
+
m("button", {
|
|
1346
|
+
class: "sp-icon-btn",
|
|
1347
|
+
onClick: r,
|
|
1348
|
+
"aria-label": R(F)("sidepanel.close")
|
|
1349
|
+
}, [
|
|
1350
|
+
x(R($e), { size: 18 })
|
|
1351
|
+
], 8, Ks)
|
|
1254
1352
|
])
|
|
1255
|
-
])
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
], !0)
|
|
1282
|
-
]
|
|
1283
|
-
],
|
|
1284
|
-
]
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
}
|
|
1353
|
+
]),
|
|
1354
|
+
m("div", Hs, [
|
|
1355
|
+
K(u.$slots, "default", {}, void 0, !0)
|
|
1356
|
+
]),
|
|
1357
|
+
u.$slots.footer || e.cancelLabel || e.confirmLabel ? (a(), l("div", Ws, [
|
|
1358
|
+
K(u.$slots, "footer", {}, () => [
|
|
1359
|
+
x(Z, {
|
|
1360
|
+
variant: "secondary",
|
|
1361
|
+
onClick: d
|
|
1362
|
+
}, {
|
|
1363
|
+
default: U(() => [
|
|
1364
|
+
Y(C(e.cancelLabel ?? R(F)("sidepanel.cancel")), 1)
|
|
1365
|
+
]),
|
|
1366
|
+
_: 1
|
|
1367
|
+
}),
|
|
1368
|
+
x(Z, {
|
|
1369
|
+
variant: "primary",
|
|
1370
|
+
onClick: v
|
|
1371
|
+
}, {
|
|
1372
|
+
default: U(() => [
|
|
1373
|
+
Y(C(e.confirmLabel ?? R(F)("sidepanel.save")) + " ", 1),
|
|
1374
|
+
e.confirmIcon ? (a(), T(re(e.confirmIcon), { key: 0 })) : f("", !0)
|
|
1375
|
+
]),
|
|
1376
|
+
_: 1
|
|
1377
|
+
})
|
|
1378
|
+
], !0)
|
|
1379
|
+
])) : f("", !0)
|
|
1380
|
+
], 6)
|
|
1381
|
+
], 2)) : f("", !0)
|
|
1382
|
+
];
|
|
1383
|
+
}),
|
|
1384
|
+
_: 3
|
|
1385
|
+
}));
|
|
1386
|
+
};
|
|
1289
1387
|
}
|
|
1290
|
-
}),
|
|
1388
|
+
}), on = /* @__PURE__ */ L(ln, [["__scopeId", "data-v-aecb3469"]]), cn = { class: "ds-bulk-edit-bar" }, rn = { class: "ds-bulk-edit-bar__count" }, dn = { class: "ds-bulk-edit-bar__controls" }, un = { class: "ds-bulk-edit-bar__actions" }, mn = /* @__PURE__ */ A({
|
|
1389
|
+
__name: "BulkEditBar",
|
|
1390
|
+
props: {
|
|
1391
|
+
columns: { default: () => [] },
|
|
1392
|
+
selectedCount: { default: 0 }
|
|
1393
|
+
},
|
|
1394
|
+
emits: ["apply", "cancel"],
|
|
1395
|
+
setup(e, { emit: s }) {
|
|
1396
|
+
const t = e, n = s, i = g(() => t.columns.filter((v) => v.editable)), o = P(""), r = P("");
|
|
1397
|
+
ee(o, () => {
|
|
1398
|
+
r.value = "";
|
|
1399
|
+
});
|
|
1400
|
+
const c = g(() => i.value.find((v) => v.id === o.value));
|
|
1401
|
+
function d() {
|
|
1402
|
+
o.value && (n("apply", { field: o.value, value: r.value }), o.value = "", r.value = "");
|
|
1403
|
+
}
|
|
1404
|
+
return (v, u) => {
|
|
1405
|
+
var h, _;
|
|
1406
|
+
return a(), l("div", cn, [
|
|
1407
|
+
m("span", rn, C(e.selectedCount) + " selected", 1),
|
|
1408
|
+
m("div", dn, [
|
|
1409
|
+
x(Ce, {
|
|
1410
|
+
modelValue: o.value,
|
|
1411
|
+
"onUpdate:modelValue": u[0] || (u[0] = (k) => o.value = k),
|
|
1412
|
+
options: i.value.map((k) => ({ label: k.label, value: k.id })),
|
|
1413
|
+
placeholder: "Select field...",
|
|
1414
|
+
class: "ds-bulk-edit-bar__field-select"
|
|
1415
|
+
}, null, 8, ["modelValue", "options"]),
|
|
1416
|
+
c.value ? (a(), l(j, { key: 0 }, [
|
|
1417
|
+
((h = c.value.editorOptions) == null ? void 0 : h.type) === "input" ? (a(), T(ve, {
|
|
1418
|
+
key: 0,
|
|
1419
|
+
modelValue: r.value,
|
|
1420
|
+
"onUpdate:modelValue": u[1] || (u[1] = (k) => r.value = k),
|
|
1421
|
+
type: c.value.editorOptions.inputType || "text",
|
|
1422
|
+
placeholder: "New value...",
|
|
1423
|
+
class: "ds-bulk-edit-bar__editor"
|
|
1424
|
+
}, null, 8, ["modelValue", "type"])) : f("", !0),
|
|
1425
|
+
((_ = c.value.editorOptions) == null ? void 0 : _.type) === "select" ? (a(), T(Ce, {
|
|
1426
|
+
key: 1,
|
|
1427
|
+
modelValue: r.value,
|
|
1428
|
+
"onUpdate:modelValue": u[2] || (u[2] = (k) => r.value = k),
|
|
1429
|
+
options: c.value.editorOptions.options || [],
|
|
1430
|
+
placeholder: "Select value...",
|
|
1431
|
+
class: "ds-bulk-edit-bar__editor"
|
|
1432
|
+
}, null, 8, ["modelValue", "options"])) : f("", !0)
|
|
1433
|
+
], 64)) : f("", !0)
|
|
1434
|
+
]),
|
|
1435
|
+
m("div", un, [
|
|
1436
|
+
x(Z, {
|
|
1437
|
+
variant: "ghost",
|
|
1438
|
+
size: "sm",
|
|
1439
|
+
onClick: u[3] || (u[3] = (k) => n("cancel"))
|
|
1440
|
+
}, {
|
|
1441
|
+
default: U(() => [...u[4] || (u[4] = [
|
|
1442
|
+
Y("Cancel", -1)
|
|
1443
|
+
])]),
|
|
1444
|
+
_: 1
|
|
1445
|
+
}),
|
|
1446
|
+
x(Z, {
|
|
1447
|
+
variant: "primary",
|
|
1448
|
+
size: "sm",
|
|
1449
|
+
disabled: !o.value,
|
|
1450
|
+
onClick: d
|
|
1451
|
+
}, {
|
|
1452
|
+
default: U(() => [...u[5] || (u[5] = [
|
|
1453
|
+
Y("Apply", -1)
|
|
1454
|
+
])]),
|
|
1455
|
+
_: 1
|
|
1456
|
+
}, 8, ["disabled"])
|
|
1457
|
+
])
|
|
1458
|
+
]);
|
|
1459
|
+
};
|
|
1460
|
+
}
|
|
1461
|
+
}), Ue = /* @__PURE__ */ L(mn, [["__scopeId", "data-v-ea3e8318"]]), fn = { class: "ds-search-box__wrapper" }, vn = {
|
|
1291
1462
|
key: 0,
|
|
1292
1463
|
class: "ds-search-box__action-container"
|
|
1293
|
-
},
|
|
1464
|
+
}, pn = {
|
|
1294
1465
|
key: 0,
|
|
1295
1466
|
class: "ds-search-box__spinner"
|
|
1296
|
-
},
|
|
1467
|
+
}, bn = {
|
|
1297
1468
|
key: 0,
|
|
1298
1469
|
class: "ds-search-box__dropdown"
|
|
1299
|
-
},
|
|
1470
|
+
}, hn = ["onClick", "onMouseenter"], gn = /* @__PURE__ */ A({
|
|
1300
1471
|
__name: "SearchBox",
|
|
1301
1472
|
props: {
|
|
1302
1473
|
modelValue: { default: "" },
|
|
@@ -1308,98 +1479,98 @@ const ma = /* @__PURE__ */ A({
|
|
|
1308
1479
|
},
|
|
1309
1480
|
emits: ["update:modelValue", "clear", "select"],
|
|
1310
1481
|
setup(e, { emit: s }) {
|
|
1311
|
-
const t = e, n = s, i = g(() => t.modelValue), o =
|
|
1312
|
-
const
|
|
1313
|
-
return
|
|
1314
|
-
(
|
|
1482
|
+
const t = e, n = s, i = g(() => t.modelValue), o = P(!1), r = P(null), c = P(-1), d = g(() => t.options.map((V) => typeof V == "object" && V !== null ? V : { label: String(V), value: String(V) })), v = g(() => {
|
|
1483
|
+
const V = i.value.toLowerCase().trim();
|
|
1484
|
+
return V ? d.value.filter(
|
|
1485
|
+
(H) => H.label.toLowerCase().includes(V)
|
|
1315
1486
|
) : [];
|
|
1316
1487
|
}), u = g(() => o.value && v.value.length > 0 && !t.disabled);
|
|
1317
|
-
|
|
1318
|
-
|
|
1488
|
+
ee(v, () => {
|
|
1489
|
+
c.value = -1;
|
|
1319
1490
|
});
|
|
1320
|
-
function h(
|
|
1321
|
-
n("update:modelValue",
|
|
1491
|
+
function h(V) {
|
|
1492
|
+
n("update:modelValue", V);
|
|
1322
1493
|
}
|
|
1323
1494
|
function _() {
|
|
1324
1495
|
t.disabled || (n("update:modelValue", ""), n("clear"));
|
|
1325
1496
|
}
|
|
1326
|
-
function
|
|
1327
|
-
n("update:modelValue",
|
|
1497
|
+
function k(V) {
|
|
1498
|
+
n("update:modelValue", V.value), n("select", V.value), o.value = !1, c.value = -1;
|
|
1328
1499
|
}
|
|
1329
|
-
function
|
|
1500
|
+
function M(V) {
|
|
1330
1501
|
if (!t.disabled) {
|
|
1331
1502
|
if (!u.value) {
|
|
1332
|
-
|
|
1503
|
+
V.key === "ArrowDown" && (o.value = !0);
|
|
1333
1504
|
return;
|
|
1334
1505
|
}
|
|
1335
|
-
switch (
|
|
1506
|
+
switch (V.key) {
|
|
1336
1507
|
case "Escape":
|
|
1337
|
-
|
|
1508
|
+
V.preventDefault(), o.value = !1, c.value = -1;
|
|
1338
1509
|
break;
|
|
1339
1510
|
case "ArrowDown":
|
|
1340
|
-
|
|
1511
|
+
V.preventDefault(), c.value = c.value < v.value.length - 1 ? c.value + 1 : 0;
|
|
1341
1512
|
break;
|
|
1342
1513
|
case "ArrowUp":
|
|
1343
|
-
|
|
1514
|
+
V.preventDefault(), c.value = c.value > 0 ? c.value - 1 : v.value.length - 1;
|
|
1344
1515
|
break;
|
|
1345
1516
|
case "Enter":
|
|
1346
|
-
if (
|
|
1347
|
-
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1517
|
+
if (c.value >= 0 && c.value < v.value.length) {
|
|
1518
|
+
V.preventDefault();
|
|
1519
|
+
const H = v.value[c.value];
|
|
1520
|
+
H && k(H);
|
|
1350
1521
|
}
|
|
1351
1522
|
break;
|
|
1352
1523
|
}
|
|
1353
1524
|
}
|
|
1354
1525
|
}
|
|
1355
|
-
function B(
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1526
|
+
function B(V) {
|
|
1527
|
+
const H = V.target;
|
|
1528
|
+
r.value && !r.value.contains(H) && (o.value = !1);
|
|
1358
1529
|
}
|
|
1359
|
-
return
|
|
1530
|
+
return te(() => {
|
|
1360
1531
|
document.addEventListener("click", B);
|
|
1361
1532
|
}), oe(() => {
|
|
1362
1533
|
document.removeEventListener("click", B);
|
|
1363
|
-
}), (
|
|
1534
|
+
}), (V, H) => (a(), l("div", {
|
|
1364
1535
|
ref_key: "containerRef",
|
|
1365
|
-
ref:
|
|
1536
|
+
ref: r,
|
|
1366
1537
|
class: "ds-search-box"
|
|
1367
1538
|
}, [
|
|
1368
|
-
m("div",
|
|
1369
|
-
|
|
1539
|
+
m("div", fn, [
|
|
1540
|
+
x(ve, {
|
|
1370
1541
|
"model-value": i.value,
|
|
1371
1542
|
placeholder: e.placeholder,
|
|
1372
1543
|
disabled: e.disabled,
|
|
1373
1544
|
icon: "search",
|
|
1374
1545
|
class: "ds-search-box__input",
|
|
1375
1546
|
"onUpdate:modelValue": h,
|
|
1376
|
-
onFocus:
|
|
1377
|
-
onKeydown:
|
|
1547
|
+
onFocus: H[0] || (H[0] = (w) => o.value = !0),
|
|
1548
|
+
onKeydown: M
|
|
1378
1549
|
}, null, 8, ["model-value", "placeholder", "disabled"]),
|
|
1379
|
-
e.loading || e.clearable && i.value ? (a(), l("div",
|
|
1380
|
-
e.loading ? (a(), l("span",
|
|
1550
|
+
e.loading || e.clearable && i.value ? (a(), l("div", vn, [
|
|
1551
|
+
e.loading ? (a(), l("span", pn)) : e.clearable && i.value ? (a(), l("button", {
|
|
1381
1552
|
key: 1,
|
|
1382
1553
|
type: "button",
|
|
1383
1554
|
class: "ds-search-box__clear",
|
|
1384
1555
|
onClick: _
|
|
1385
1556
|
}, [
|
|
1386
|
-
|
|
1557
|
+
x(N, {
|
|
1387
1558
|
name: "x",
|
|
1388
1559
|
size: "xs"
|
|
1389
1560
|
})
|
|
1390
1561
|
])) : f("", !0)
|
|
1391
1562
|
])) : f("", !0),
|
|
1392
|
-
|
|
1393
|
-
default:
|
|
1394
|
-
u.value ? (a(), l("div",
|
|
1395
|
-
(a(!0), l(
|
|
1396
|
-
key:
|
|
1397
|
-
class:
|
|
1398
|
-
"ds-search-box__option--focused":
|
|
1563
|
+
x(ae, { name: "ds-search-box-drop" }, {
|
|
1564
|
+
default: U(() => [
|
|
1565
|
+
u.value ? (a(), l("div", bn, [
|
|
1566
|
+
(a(!0), l(j, null, W(v.value, (w, I) => (a(), l("div", {
|
|
1567
|
+
key: w.value,
|
|
1568
|
+
class: S(["ds-search-box__option", {
|
|
1569
|
+
"ds-search-box__option--focused": I === c.value
|
|
1399
1570
|
}]),
|
|
1400
|
-
onClick:
|
|
1401
|
-
onMouseenter: (O) =>
|
|
1402
|
-
},
|
|
1571
|
+
onClick: X((O) => k(w), ["stop"]),
|
|
1572
|
+
onMouseenter: (O) => c.value = I
|
|
1573
|
+
}, C(w.label), 43, hn))), 128))
|
|
1403
1574
|
])) : f("", !0)
|
|
1404
1575
|
]),
|
|
1405
1576
|
_: 1
|
|
@@ -1407,10 +1578,10 @@ const ma = /* @__PURE__ */ A({
|
|
|
1407
1578
|
])
|
|
1408
1579
|
], 512));
|
|
1409
1580
|
}
|
|
1410
|
-
}),
|
|
1581
|
+
}), _n = /* @__PURE__ */ L(gn, [["__scopeId", "data-v-59094448"]]), yn = {
|
|
1411
1582
|
key: 0,
|
|
1412
1583
|
class: "ds-dropdown__empty"
|
|
1413
|
-
},
|
|
1584
|
+
}, kn = ["onClick", "onMouseenter"], wn = { class: "ds-dropdown__item-content" }, $n = { class: "ds-dropdown__item-label" }, Cn = /* @__PURE__ */ A({
|
|
1414
1585
|
__name: "Dropdown",
|
|
1415
1586
|
props: {
|
|
1416
1587
|
modelValue: { default: "" },
|
|
@@ -1435,67 +1606,67 @@ const ma = /* @__PURE__ */ A({
|
|
|
1435
1606
|
{ id: "edit", label: "ویرایش", value: "edit", icon: "edit" },
|
|
1436
1607
|
{ id: "delete", label: "حذف", value: "delete", icon: "trash" }
|
|
1437
1608
|
]
|
|
1438
|
-
},
|
|
1439
|
-
function
|
|
1609
|
+
}, r = g(() => n.source && o[n.source] ? o[n.source] : n.items), c = g(() => n.modelValue || ""), d = g(() => r.value.find((I) => I.value === c.value)), v = g(() => n.label ? n.label : d.value ? d.value.label : n.placeholder), u = P(!1), h = P(null), _ = P(null), k = P(-1);
|
|
1610
|
+
function M() {
|
|
1440
1611
|
n.disabled || (u.value = !u.value);
|
|
1441
1612
|
}
|
|
1442
1613
|
function B() {
|
|
1443
|
-
u.value = !1,
|
|
1614
|
+
u.value = !1, k.value = -1;
|
|
1444
1615
|
}
|
|
1445
|
-
function
|
|
1446
|
-
|
|
1616
|
+
function V(I) {
|
|
1617
|
+
I.disabled || (i("update:modelValue", I.value), i("change", I.value), i("select", I), B());
|
|
1447
1618
|
}
|
|
1448
|
-
function
|
|
1619
|
+
function H(I) {
|
|
1449
1620
|
if (!n.disabled) {
|
|
1450
1621
|
if (!u.value) {
|
|
1451
|
-
(
|
|
1622
|
+
(I.key === "Enter" || I.key === "ArrowDown" || I.key === " ") && (I.preventDefault(), u.value = !0);
|
|
1452
1623
|
return;
|
|
1453
1624
|
}
|
|
1454
|
-
switch (
|
|
1625
|
+
switch (I.key) {
|
|
1455
1626
|
case "Escape":
|
|
1456
|
-
|
|
1627
|
+
I.preventDefault(), B();
|
|
1457
1628
|
break;
|
|
1458
1629
|
case "ArrowDown":
|
|
1459
|
-
|
|
1630
|
+
I.preventDefault(), k.value = k.value < r.value.length - 1 ? k.value + 1 : 0;
|
|
1460
1631
|
break;
|
|
1461
1632
|
case "ArrowUp":
|
|
1462
|
-
|
|
1633
|
+
I.preventDefault(), k.value = k.value > 0 ? k.value - 1 : r.value.length - 1;
|
|
1463
1634
|
break;
|
|
1464
1635
|
case "Enter":
|
|
1465
|
-
if (
|
|
1466
|
-
const O =
|
|
1467
|
-
O &&
|
|
1636
|
+
if (I.preventDefault(), k.value >= 0 && k.value < r.value.length) {
|
|
1637
|
+
const O = r.value[k.value];
|
|
1638
|
+
O && V(O);
|
|
1468
1639
|
}
|
|
1469
1640
|
break;
|
|
1470
1641
|
}
|
|
1471
1642
|
}
|
|
1472
1643
|
}
|
|
1473
|
-
function
|
|
1474
|
-
const O =
|
|
1475
|
-
!p && !
|
|
1644
|
+
function w(I) {
|
|
1645
|
+
const O = I.target, p = h.value, z = _.value;
|
|
1646
|
+
!p && !z || p && p.contains(O) || z && z.contains(O) || u.value && B();
|
|
1476
1647
|
}
|
|
1477
|
-
return
|
|
1478
|
-
document.addEventListener("click",
|
|
1648
|
+
return te(() => {
|
|
1649
|
+
document.addEventListener("click", w);
|
|
1479
1650
|
}), oe(() => {
|
|
1480
|
-
document.removeEventListener("click",
|
|
1651
|
+
document.removeEventListener("click", w);
|
|
1481
1652
|
}), s({
|
|
1482
1653
|
isOpen: u,
|
|
1483
1654
|
open: () => u.value = !0,
|
|
1484
1655
|
close: () => u.value = !1,
|
|
1485
1656
|
toggle: () => u.value = !u.value
|
|
1486
|
-
}), (
|
|
1487
|
-
class:
|
|
1657
|
+
}), (I, O) => (a(), l("div", {
|
|
1658
|
+
class: S(["ds-dropdown", { "ds-dropdown--open": u.value, "ds-dropdown--disabled": e.disabled }])
|
|
1488
1659
|
}, [
|
|
1489
1660
|
m("div", {
|
|
1490
1661
|
ref_key: "triggerRef",
|
|
1491
1662
|
ref: h,
|
|
1492
1663
|
class: "ds-dropdown__trigger",
|
|
1493
|
-
onClick:
|
|
1494
|
-
onKeydown:
|
|
1664
|
+
onClick: X(M, ["stop"]),
|
|
1665
|
+
onKeydown: H,
|
|
1495
1666
|
tabindex: "0"
|
|
1496
1667
|
}, [
|
|
1497
|
-
|
|
1498
|
-
|
|
1668
|
+
K(I.$slots, "trigger", {}, () => [
|
|
1669
|
+
x(Z, {
|
|
1499
1670
|
variant: "secondary",
|
|
1500
1671
|
disabled: e.disabled,
|
|
1501
1672
|
icon: e.icon || "chevron-down",
|
|
@@ -1503,43 +1674,43 @@ const ma = /* @__PURE__ */ A({
|
|
|
1503
1674
|
loading: e.loading,
|
|
1504
1675
|
class: "ds-dropdown__btn"
|
|
1505
1676
|
}, {
|
|
1506
|
-
default:
|
|
1507
|
-
|
|
1677
|
+
default: U(() => [
|
|
1678
|
+
Y(C(v.value), 1)
|
|
1508
1679
|
]),
|
|
1509
1680
|
_: 1
|
|
1510
1681
|
}, 8, ["disabled", "icon", "loading"])
|
|
1511
1682
|
], !0)
|
|
1512
1683
|
], 544),
|
|
1513
|
-
|
|
1514
|
-
default:
|
|
1684
|
+
x(ae, { name: "ds-dropdown-drop" }, {
|
|
1685
|
+
default: U(() => [
|
|
1515
1686
|
u.value ? (a(), l("div", {
|
|
1516
1687
|
key: 0,
|
|
1517
1688
|
ref_key: "dropdownRef",
|
|
1518
1689
|
ref: _,
|
|
1519
1690
|
class: "ds-dropdown__menu"
|
|
1520
1691
|
}, [
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
(a(!0), l(
|
|
1692
|
+
K(I.$slots, "default", {}, () => [
|
|
1693
|
+
r.value.length === 0 ? (a(), l("div", yn, C(e.emptyState ? e.emptyState.includes(".") ? R(F)(e.emptyState) : e.emptyState : "گزینهای وجود ندارد"), 1)) : f("", !0),
|
|
1694
|
+
(a(!0), l(j, null, W(r.value, (p, z) => (a(), l("div", {
|
|
1524
1695
|
key: p.id,
|
|
1525
|
-
class:
|
|
1526
|
-
"ds-dropdown__item--selected": p.value ===
|
|
1696
|
+
class: S(["ds-dropdown__item", {
|
|
1697
|
+
"ds-dropdown__item--selected": p.value === c.value,
|
|
1527
1698
|
"ds-dropdown__item--disabled": p.disabled,
|
|
1528
|
-
"ds-dropdown__item--focused":
|
|
1699
|
+
"ds-dropdown__item--focused": z === k.value
|
|
1529
1700
|
}]),
|
|
1530
|
-
onClick:
|
|
1531
|
-
onMouseenter: (y) =>
|
|
1701
|
+
onClick: X((y) => V(p), ["stop"]),
|
|
1702
|
+
onMouseenter: (y) => k.value = z
|
|
1532
1703
|
}, [
|
|
1533
|
-
m("div",
|
|
1534
|
-
p.icon ? (a(),
|
|
1704
|
+
m("div", wn, [
|
|
1705
|
+
p.icon ? (a(), T(N, {
|
|
1535
1706
|
key: 0,
|
|
1536
1707
|
name: p.icon,
|
|
1537
1708
|
size: "sm",
|
|
1538
1709
|
class: "ds-dropdown__item-icon"
|
|
1539
1710
|
}, null, 8, ["name"])) : f("", !0),
|
|
1540
|
-
m("span",
|
|
1711
|
+
m("span", $n, C(p.label), 1)
|
|
1541
1712
|
])
|
|
1542
|
-
], 42,
|
|
1713
|
+
], 42, kn))), 128))
|
|
1543
1714
|
], !0)
|
|
1544
1715
|
], 512)) : f("", !0)
|
|
1545
1716
|
]),
|
|
@@ -1547,19 +1718,19 @@ const ma = /* @__PURE__ */ A({
|
|
|
1547
1718
|
})
|
|
1548
1719
|
], 2));
|
|
1549
1720
|
}
|
|
1550
|
-
}),
|
|
1721
|
+
}), Be = /* @__PURE__ */ L(Cn, [["__scopeId", "data-v-21c067bb"]]), xn = /* @__PURE__ */ A({
|
|
1551
1722
|
__name: "Menu",
|
|
1552
1723
|
props: {
|
|
1553
1724
|
variant: { default: "vertical" }
|
|
1554
1725
|
},
|
|
1555
1726
|
setup(e) {
|
|
1556
1727
|
return (s, t) => (a(), l("div", {
|
|
1557
|
-
class:
|
|
1728
|
+
class: S(["ds-menu", `ds-menu--${e.variant}`])
|
|
1558
1729
|
}, [
|
|
1559
|
-
|
|
1730
|
+
K(s.$slots, "default", {}, void 0, !0)
|
|
1560
1731
|
], 2));
|
|
1561
1732
|
}
|
|
1562
|
-
}),
|
|
1733
|
+
}), je = /* @__PURE__ */ L(xn, [["__scopeId", "data-v-9e21cb4a"]]), Sn = ["aria-disabled"], In = { class: "ds-menu-item__content" }, Bn = { class: "ds-menu-item__label" }, Vn = /* @__PURE__ */ A({
|
|
1563
1734
|
__name: "MenuItem",
|
|
1564
1735
|
props: {
|
|
1565
1736
|
label: {},
|
|
@@ -1577,8 +1748,8 @@ const ma = /* @__PURE__ */ A({
|
|
|
1577
1748
|
}
|
|
1578
1749
|
n("click", o);
|
|
1579
1750
|
}
|
|
1580
|
-
return (o,
|
|
1581
|
-
class:
|
|
1751
|
+
return (o, r) => (a(), l("div", {
|
|
1752
|
+
class: S(["ds-menu-item", {
|
|
1582
1753
|
"ds-menu-item--active": e.active,
|
|
1583
1754
|
"ds-menu-item--disabled": e.disabled
|
|
1584
1755
|
}]),
|
|
@@ -1586,25 +1757,25 @@ const ma = /* @__PURE__ */ A({
|
|
|
1586
1757
|
"aria-disabled": e.disabled,
|
|
1587
1758
|
onClick: i
|
|
1588
1759
|
}, [
|
|
1589
|
-
m("div",
|
|
1590
|
-
e.icon ? (a(),
|
|
1760
|
+
m("div", In, [
|
|
1761
|
+
e.icon ? (a(), T(N, {
|
|
1591
1762
|
key: 0,
|
|
1592
1763
|
name: e.icon,
|
|
1593
1764
|
size: "sm",
|
|
1594
1765
|
class: "ds-menu-item__icon"
|
|
1595
1766
|
}, null, 8, ["name"])) : f("", !0),
|
|
1596
|
-
m("span",
|
|
1597
|
-
|
|
1598
|
-
|
|
1767
|
+
m("span", Bn, [
|
|
1768
|
+
K(o.$slots, "default", {}, () => [
|
|
1769
|
+
x(G, {
|
|
1599
1770
|
variant: "body-md",
|
|
1600
1771
|
value: e.label
|
|
1601
1772
|
}, null, 8, ["value"])
|
|
1602
1773
|
], !0)
|
|
1603
1774
|
])
|
|
1604
1775
|
])
|
|
1605
|
-
], 10,
|
|
1776
|
+
], 10, Sn));
|
|
1606
1777
|
}
|
|
1607
|
-
}),
|
|
1778
|
+
}), fe = /* @__PURE__ */ L(Vn, [["__scopeId", "data-v-37b12109"]]), zn = /* @__PURE__ */ A({
|
|
1608
1779
|
__name: "Tooltip",
|
|
1609
1780
|
props: {
|
|
1610
1781
|
text: {},
|
|
@@ -1614,7 +1785,7 @@ const ma = /* @__PURE__ */ A({
|
|
|
1614
1785
|
disabled: { type: Boolean, default: !1 }
|
|
1615
1786
|
},
|
|
1616
1787
|
setup(e) {
|
|
1617
|
-
const s = e, t =
|
|
1788
|
+
const s = e, t = P(!1);
|
|
1618
1789
|
let n = null;
|
|
1619
1790
|
function i() {
|
|
1620
1791
|
s.disabled || (n && clearTimeout(n), n = window.setTimeout(() => {
|
|
@@ -1624,28 +1795,28 @@ const ma = /* @__PURE__ */ A({
|
|
|
1624
1795
|
function o() {
|
|
1625
1796
|
n && clearTimeout(n), t.value = !1;
|
|
1626
1797
|
}
|
|
1627
|
-
return (
|
|
1798
|
+
return (r, c) => (a(), l("div", {
|
|
1628
1799
|
class: "ds-tooltip-container",
|
|
1629
1800
|
onMouseenter: i,
|
|
1630
1801
|
onMouseleave: o,
|
|
1631
1802
|
onFocusin: i,
|
|
1632
1803
|
onFocusout: o
|
|
1633
1804
|
}, [
|
|
1634
|
-
|
|
1635
|
-
e.icon ? (a(),
|
|
1805
|
+
K(r.$slots, "default", {}, () => [
|
|
1806
|
+
e.icon ? (a(), T(N, {
|
|
1636
1807
|
key: 0,
|
|
1637
1808
|
name: e.icon,
|
|
1638
1809
|
class: "ds-tooltip__icon"
|
|
1639
1810
|
}, null, 8, ["name"])) : f("", !0)
|
|
1640
1811
|
], !0),
|
|
1641
|
-
|
|
1642
|
-
default:
|
|
1812
|
+
x(ae, { name: "ds-tooltip-fade" }, {
|
|
1813
|
+
default: U(() => [
|
|
1643
1814
|
t.value ? (a(), l("div", {
|
|
1644
1815
|
key: 0,
|
|
1645
|
-
class:
|
|
1816
|
+
class: S(["ds-tooltip", `ds-tooltip--${e.position}`]),
|
|
1646
1817
|
role: "tooltip"
|
|
1647
1818
|
}, [
|
|
1648
|
-
|
|
1819
|
+
x(G, {
|
|
1649
1820
|
variant: "caption",
|
|
1650
1821
|
value: e.text,
|
|
1651
1822
|
class: "ds-tooltip__text"
|
|
@@ -1656,58 +1827,58 @@ const ma = /* @__PURE__ */ A({
|
|
|
1656
1827
|
})
|
|
1657
1828
|
], 32));
|
|
1658
1829
|
}
|
|
1659
|
-
}),
|
|
1830
|
+
}), xe = /* @__PURE__ */ L(zn, [["__scopeId", "data-v-c0feb722"]]), Dn = /* @__PURE__ */ A({
|
|
1660
1831
|
__name: "Popover",
|
|
1661
1832
|
props: {
|
|
1662
1833
|
disabled: { type: Boolean, default: !1 },
|
|
1663
1834
|
position: { default: "bottom-start" }
|
|
1664
1835
|
},
|
|
1665
1836
|
setup(e) {
|
|
1666
|
-
const s = e, t =
|
|
1837
|
+
const s = e, t = P(!1), n = P(null), i = P(null);
|
|
1667
1838
|
function o() {
|
|
1668
1839
|
s.disabled || (t.value = !t.value);
|
|
1669
1840
|
}
|
|
1670
|
-
function
|
|
1841
|
+
function r() {
|
|
1671
1842
|
t.value = !1;
|
|
1672
1843
|
}
|
|
1673
|
-
function
|
|
1844
|
+
function c(d) {
|
|
1674
1845
|
const v = d.target, u = n.value, h = i.value;
|
|
1675
|
-
!u && !h || u && u.contains(v) || h && h.contains(v) || t.value &&
|
|
1846
|
+
!u && !h || u && u.contains(v) || h && h.contains(v) || t.value && r();
|
|
1676
1847
|
}
|
|
1677
|
-
return
|
|
1678
|
-
document.addEventListener("click",
|
|
1848
|
+
return te(() => {
|
|
1849
|
+
document.addEventListener("click", c);
|
|
1679
1850
|
}), oe(() => {
|
|
1680
|
-
document.removeEventListener("click",
|
|
1851
|
+
document.removeEventListener("click", c);
|
|
1681
1852
|
}), (d, v) => (a(), l("div", {
|
|
1682
|
-
class:
|
|
1853
|
+
class: S(["ds-popover-container", { "ds-popover-container--disabled": e.disabled }])
|
|
1683
1854
|
}, [
|
|
1684
1855
|
m("div", {
|
|
1685
1856
|
ref_key: "triggerRef",
|
|
1686
1857
|
ref: n,
|
|
1687
1858
|
class: "ds-popover-trigger",
|
|
1688
|
-
onClick:
|
|
1859
|
+
onClick: X(o, ["stop"])
|
|
1689
1860
|
}, [
|
|
1690
|
-
|
|
1861
|
+
K(d.$slots, "trigger", {}, void 0, !0)
|
|
1691
1862
|
], 512),
|
|
1692
|
-
|
|
1693
|
-
default:
|
|
1863
|
+
x(ae, { name: "ds-popover-fade" }, {
|
|
1864
|
+
default: U(() => [
|
|
1694
1865
|
t.value ? (a(), l("div", {
|
|
1695
1866
|
key: 0,
|
|
1696
1867
|
ref_key: "popoverRef",
|
|
1697
1868
|
ref: i,
|
|
1698
|
-
class:
|
|
1869
|
+
class: S(["ds-popover", `ds-popover--${e.position}`])
|
|
1699
1870
|
}, [
|
|
1700
|
-
|
|
1871
|
+
K(d.$slots, "default", {}, void 0, !0)
|
|
1701
1872
|
], 2)) : f("", !0)
|
|
1702
1873
|
]),
|
|
1703
1874
|
_: 3
|
|
1704
1875
|
})
|
|
1705
1876
|
], 2));
|
|
1706
1877
|
}
|
|
1707
|
-
}),
|
|
1878
|
+
}), An = /* @__PURE__ */ L(Dn, [["__scopeId", "data-v-a8781e33"]]), Ln = {
|
|
1708
1879
|
class: "ds-tabs__header",
|
|
1709
1880
|
role: "tablist"
|
|
1710
|
-
},
|
|
1881
|
+
}, Tn = ["aria-selected", "disabled", "onClick"], En = { class: "ds-tabs__content" }, Mn = /* @__PURE__ */ A({
|
|
1711
1882
|
__name: "Tabs",
|
|
1712
1883
|
props: {
|
|
1713
1884
|
modelValue: { default: "" },
|
|
@@ -1717,47 +1888,47 @@ const ma = /* @__PURE__ */ A({
|
|
|
1717
1888
|
emits: ["update:modelValue", "change"],
|
|
1718
1889
|
setup(e, { emit: s }) {
|
|
1719
1890
|
const t = e, n = s;
|
|
1720
|
-
function i(o,
|
|
1721
|
-
t.disabled ||
|
|
1891
|
+
function i(o, r) {
|
|
1892
|
+
t.disabled || r || (n("update:modelValue", o), n("change", o));
|
|
1722
1893
|
}
|
|
1723
|
-
return (o,
|
|
1724
|
-
class:
|
|
1894
|
+
return (o, r) => (a(), l("div", {
|
|
1895
|
+
class: S(["ds-tabs", { "ds-tabs--disabled": e.disabled }])
|
|
1725
1896
|
}, [
|
|
1726
|
-
m("div",
|
|
1727
|
-
(a(!0), l(
|
|
1728
|
-
key:
|
|
1897
|
+
m("div", Ln, [
|
|
1898
|
+
(a(!0), l(j, null, W(e.items, (c) => (a(), l("button", {
|
|
1899
|
+
key: c.value,
|
|
1729
1900
|
type: "button",
|
|
1730
1901
|
role: "tab",
|
|
1731
|
-
"aria-selected":
|
|
1732
|
-
disabled:
|
|
1733
|
-
class:
|
|
1734
|
-
"ds-tabs__tab-btn--active":
|
|
1735
|
-
"ds-tabs__tab-btn--disabled":
|
|
1902
|
+
"aria-selected": c.value === e.modelValue,
|
|
1903
|
+
disabled: c.disabled,
|
|
1904
|
+
class: S(["ds-tabs__tab-btn", {
|
|
1905
|
+
"ds-tabs__tab-btn--active": c.value === e.modelValue,
|
|
1906
|
+
"ds-tabs__tab-btn--disabled": c.disabled
|
|
1736
1907
|
}]),
|
|
1737
|
-
onClick: (d) => i(
|
|
1908
|
+
onClick: (d) => i(c.value, c.disabled)
|
|
1738
1909
|
}, [
|
|
1739
|
-
|
|
1910
|
+
c.icon ? (a(), T(N, {
|
|
1740
1911
|
key: 0,
|
|
1741
|
-
name:
|
|
1912
|
+
name: c.icon,
|
|
1742
1913
|
size: "sm",
|
|
1743
1914
|
class: "ds-tabs__tab-icon"
|
|
1744
1915
|
}, null, 8, ["name"])) : f("", !0),
|
|
1745
|
-
|
|
1916
|
+
x(G, {
|
|
1746
1917
|
variant: "body-md",
|
|
1747
|
-
value:
|
|
1918
|
+
value: c.label,
|
|
1748
1919
|
class: "ds-tabs__tab-label"
|
|
1749
1920
|
}, null, 8, ["value"])
|
|
1750
|
-
], 10,
|
|
1921
|
+
], 10, Tn))), 128))
|
|
1751
1922
|
]),
|
|
1752
|
-
m("div",
|
|
1753
|
-
|
|
1923
|
+
m("div", En, [
|
|
1924
|
+
K(o.$slots, "default", {}, void 0, !0)
|
|
1754
1925
|
])
|
|
1755
1926
|
], 2));
|
|
1756
1927
|
}
|
|
1757
|
-
}),
|
|
1928
|
+
}), Pn = /* @__PURE__ */ L(Mn, [["__scopeId", "data-v-e77b7886"]]), On = ["disabled", "aria-label"], Rn = {
|
|
1758
1929
|
key: 0,
|
|
1759
1930
|
class: "ds-icon-button__spinner"
|
|
1760
|
-
},
|
|
1931
|
+
}, Nn = /* @__PURE__ */ A({
|
|
1761
1932
|
__name: "IconButton",
|
|
1762
1933
|
props: {
|
|
1763
1934
|
icon: {},
|
|
@@ -1789,44 +1960,44 @@ const ma = /* @__PURE__ */ A({
|
|
|
1789
1960
|
return "md";
|
|
1790
1961
|
}
|
|
1791
1962
|
});
|
|
1792
|
-
function c
|
|
1793
|
-
!t.disabled && !t.loading && n("click",
|
|
1963
|
+
function r(c) {
|
|
1964
|
+
!t.disabled && !t.loading && n("click", c);
|
|
1794
1965
|
}
|
|
1795
|
-
return (
|
|
1796
|
-
class:
|
|
1966
|
+
return (c, d) => (a(), l("button", {
|
|
1967
|
+
class: S(i.value),
|
|
1797
1968
|
disabled: e.disabled || e.loading,
|
|
1798
1969
|
"aria-label": e.ariaLabel,
|
|
1799
|
-
onClick:
|
|
1970
|
+
onClick: r
|
|
1800
1971
|
}, [
|
|
1801
|
-
e.loading ? (a(), l("span",
|
|
1972
|
+
e.loading ? (a(), l("span", Rn)) : (a(), T(N, {
|
|
1802
1973
|
key: 1,
|
|
1803
1974
|
name: e.icon,
|
|
1804
1975
|
size: o.value
|
|
1805
1976
|
}, null, 8, ["name", "size"]))
|
|
1806
|
-
], 10,
|
|
1977
|
+
], 10, On));
|
|
1807
1978
|
}
|
|
1808
|
-
}),
|
|
1979
|
+
}), qe = /* @__PURE__ */ L(Nn, [["__scopeId", "data-v-545f6e22"]]), Fn = {
|
|
1809
1980
|
key: 0,
|
|
1810
1981
|
class: "ds-table-cell ds-table-cell--text"
|
|
1811
|
-
},
|
|
1982
|
+
}, Un = {
|
|
1812
1983
|
key: 1,
|
|
1813
1984
|
class: "ds-table-cell ds-table-cell--date"
|
|
1814
|
-
},
|
|
1985
|
+
}, jn = {
|
|
1815
1986
|
key: 2,
|
|
1816
1987
|
class: "ds-table-cell ds-table-cell--profile"
|
|
1817
|
-
},
|
|
1988
|
+
}, qn = ["href"], Kn = { class: "ds-table-cell__profile-text" }, Hn = { class: "ds-table-cell__profile-name" }, Wn = {
|
|
1818
1989
|
key: 0,
|
|
1819
1990
|
class: "ds-table-cell__profile-email"
|
|
1820
|
-
},
|
|
1991
|
+
}, Gn = {
|
|
1821
1992
|
key: 3,
|
|
1822
1993
|
class: "ds-table-cell ds-table-cell--tag"
|
|
1823
|
-
},
|
|
1994
|
+
}, Yn = {
|
|
1824
1995
|
key: 4,
|
|
1825
1996
|
class: "ds-table-cell ds-table-cell--checkbox"
|
|
1826
|
-
},
|
|
1997
|
+
}, Xn = {
|
|
1827
1998
|
key: 5,
|
|
1828
1999
|
class: "ds-table-cell ds-table-cell--actions"
|
|
1829
|
-
},
|
|
2000
|
+
}, Zn = /* @__PURE__ */ A({
|
|
1830
2001
|
__name: "TableCell",
|
|
1831
2002
|
props: {
|
|
1832
2003
|
type: {},
|
|
@@ -1858,7 +2029,7 @@ const ma = /* @__PURE__ */ A({
|
|
|
1858
2029
|
mm: String(h.getMinutes()).padStart(2, "0"),
|
|
1859
2030
|
ss: String(h.getSeconds()).padStart(2, "0")
|
|
1860
2031
|
};
|
|
1861
|
-
return u.replace(/YYYY|MM|DD|HH|mm|ss/g, (
|
|
2032
|
+
return u.replace(/YYYY|MM|DD|HH|mm|ss/g, (k) => _[k] ?? k);
|
|
1862
2033
|
}
|
|
1863
2034
|
return new Intl.DateTimeFormat("fa-IR", {
|
|
1864
2035
|
year: "numeric",
|
|
@@ -1869,10 +2040,10 @@ const ma = /* @__PURE__ */ A({
|
|
|
1869
2040
|
function o(v) {
|
|
1870
2041
|
return v == null ? "" : String(v);
|
|
1871
2042
|
}
|
|
1872
|
-
function
|
|
2043
|
+
function r(v) {
|
|
1873
2044
|
n("update:modelValue", v);
|
|
1874
2045
|
}
|
|
1875
|
-
function
|
|
2046
|
+
function c(v) {
|
|
1876
2047
|
n("action-click", v), v.onClick();
|
|
1877
2048
|
}
|
|
1878
2049
|
const d = g(() => {
|
|
@@ -1880,129 +2051,56 @@ const ma = /* @__PURE__ */ A({
|
|
|
1880
2051
|
const v = t.value;
|
|
1881
2052
|
return Array.isArray(v) ? v.map((u) => ({ value: o(u), variant: t.variant })) : v != null ? [{ value: o(v), variant: t.variant }] : [];
|
|
1882
2053
|
});
|
|
1883
|
-
return (v, u) => e.type === "text" ? (a(), l("span",
|
|
2054
|
+
return (v, u) => e.type === "text" ? (a(), l("span", Fn, C(o(e.value)), 1)) : e.type === "date" ? (a(), l("span", Un, C(i(e.value, e.format)), 1)) : e.type === "profile" ? (a(), l("span", jn, [
|
|
1884
2055
|
e.profileLink ? (a(), l("a", {
|
|
1885
2056
|
key: 0,
|
|
1886
2057
|
href: e.profileLink,
|
|
1887
2058
|
class: "ds-table-cell__profile-avatar-link"
|
|
1888
2059
|
}, [
|
|
1889
|
-
|
|
2060
|
+
x(de, {
|
|
1890
2061
|
src: e.avatarUrl,
|
|
1891
2062
|
name: e.name,
|
|
1892
2063
|
size: "sm"
|
|
1893
2064
|
}, null, 8, ["src", "name"])
|
|
1894
|
-
], 8,
|
|
2065
|
+
], 8, qn)) : (a(), T(de, {
|
|
1895
2066
|
key: 1,
|
|
1896
2067
|
src: e.avatarUrl,
|
|
1897
2068
|
name: e.name,
|
|
1898
2069
|
size: "sm"
|
|
1899
2070
|
}, null, 8, ["src", "name"])),
|
|
1900
|
-
m("span",
|
|
1901
|
-
m("span",
|
|
1902
|
-
e.email ? (a(), l("span",
|
|
2071
|
+
m("span", Kn, [
|
|
2072
|
+
m("span", Hn, C(e.name), 1),
|
|
2073
|
+
e.email ? (a(), l("span", Wn, C(e.email), 1)) : f("", !0)
|
|
1903
2074
|
])
|
|
1904
|
-
])) : e.type === "tag" ? (a(), l("span",
|
|
1905
|
-
(a(!0), l(
|
|
2075
|
+
])) : e.type === "tag" ? (a(), l("span", Gn, [
|
|
2076
|
+
(a(!0), l(j, null, W(d.value, (h, _) => (a(), l("span", {
|
|
1906
2077
|
key: _,
|
|
1907
|
-
class:
|
|
1908
|
-
},
|
|
1909
|
-
])) : e.type === "checkbox" ? (a(), l("span",
|
|
1910
|
-
|
|
2078
|
+
class: S(["ds-table-cell__tag", h.variant ? `ds-table-cell__tag--${h.variant}` : ""])
|
|
2079
|
+
}, C(h.value), 3))), 128))
|
|
2080
|
+
])) : e.type === "checkbox" ? (a(), l("span", Yn, [
|
|
2081
|
+
x(me, {
|
|
1911
2082
|
"model-value": e.modelValue,
|
|
1912
2083
|
disabled: e.disabled,
|
|
1913
|
-
"onUpdate:modelValue":
|
|
2084
|
+
"onUpdate:modelValue": r
|
|
1914
2085
|
}, null, 8, ["model-value", "disabled"])
|
|
1915
|
-
])) : e.type === "actions" ? (a(), l("span",
|
|
1916
|
-
(a(!0), l(
|
|
2086
|
+
])) : e.type === "actions" ? (a(), l("span", Xn, [
|
|
2087
|
+
(a(!0), l(j, null, W(e.actions, (h, _) => (a(), T(qe, {
|
|
1917
2088
|
key: _,
|
|
1918
2089
|
icon: h.icon ?? "more",
|
|
1919
2090
|
variant: h.variant ?? "ghost",
|
|
1920
2091
|
size: "sm",
|
|
1921
2092
|
"aria-label": h.label,
|
|
1922
|
-
onClick: (
|
|
2093
|
+
onClick: (k) => c(h)
|
|
1923
2094
|
}, null, 8, ["icon", "variant", "aria-label", "onClick"]))), 128))
|
|
1924
2095
|
])) : f("", !0);
|
|
1925
2096
|
}
|
|
1926
|
-
}),
|
|
1927
|
-
__name: "BulkEditBar",
|
|
1928
|
-
props: {
|
|
1929
|
-
columns: { default: () => [] },
|
|
1930
|
-
selectedCount: { default: 0 }
|
|
1931
|
-
},
|
|
1932
|
-
emits: ["apply", "cancel"],
|
|
1933
|
-
setup(e, { emit: s }) {
|
|
1934
|
-
const t = e, n = s, i = g(() => t.columns.filter((v) => v.editable)), o = M(""), c = M("");
|
|
1935
|
-
ne(o, () => {
|
|
1936
|
-
c.value = "";
|
|
1937
|
-
});
|
|
1938
|
-
const r = g(() => i.value.find((v) => v.id === o.value));
|
|
1939
|
-
function d() {
|
|
1940
|
-
o.value && (n("apply", { field: o.value, value: c.value }), o.value = "", c.value = "");
|
|
1941
|
-
}
|
|
1942
|
-
return (v, u) => {
|
|
1943
|
-
var h, _;
|
|
1944
|
-
return a(), l("div", An, [
|
|
1945
|
-
m("span", Ln, x(e.selectedCount) + " selected", 1),
|
|
1946
|
-
m("div", Tn, [
|
|
1947
|
-
C(ke, {
|
|
1948
|
-
modelValue: o.value,
|
|
1949
|
-
"onUpdate:modelValue": u[0] || (u[0] = (w) => o.value = w),
|
|
1950
|
-
options: i.value.map((w) => ({ label: w.label, value: w.id })),
|
|
1951
|
-
placeholder: "Select field...",
|
|
1952
|
-
class: "ds-bulk-edit-bar__field-select"
|
|
1953
|
-
}, null, 8, ["modelValue", "options"]),
|
|
1954
|
-
r.value ? (a(), l(U, { key: 0 }, [
|
|
1955
|
-
((h = r.value.editorOptions) == null ? void 0 : h.type) === "input" ? (a(), E(ve, {
|
|
1956
|
-
key: 0,
|
|
1957
|
-
modelValue: c.value,
|
|
1958
|
-
"onUpdate:modelValue": u[1] || (u[1] = (w) => c.value = w),
|
|
1959
|
-
type: r.value.editorOptions.inputType || "text",
|
|
1960
|
-
placeholder: "New value...",
|
|
1961
|
-
class: "ds-bulk-edit-bar__editor"
|
|
1962
|
-
}, null, 8, ["modelValue", "type"])) : f("", !0),
|
|
1963
|
-
((_ = r.value.editorOptions) == null ? void 0 : _.type) === "select" ? (a(), E(ke, {
|
|
1964
|
-
key: 1,
|
|
1965
|
-
modelValue: c.value,
|
|
1966
|
-
"onUpdate:modelValue": u[2] || (u[2] = (w) => c.value = w),
|
|
1967
|
-
options: r.value.editorOptions.options || [],
|
|
1968
|
-
placeholder: "Select value...",
|
|
1969
|
-
class: "ds-bulk-edit-bar__editor"
|
|
1970
|
-
}, null, 8, ["modelValue", "options"])) : f("", !0)
|
|
1971
|
-
], 64)) : f("", !0)
|
|
1972
|
-
]),
|
|
1973
|
-
m("div", En, [
|
|
1974
|
-
C(J, {
|
|
1975
|
-
variant: "ghost",
|
|
1976
|
-
size: "sm",
|
|
1977
|
-
onClick: u[3] || (u[3] = (w) => n("cancel"))
|
|
1978
|
-
}, {
|
|
1979
|
-
default: F(() => [...u[4] || (u[4] = [
|
|
1980
|
-
X("Cancel", -1)
|
|
1981
|
-
])]),
|
|
1982
|
-
_: 1
|
|
1983
|
-
}),
|
|
1984
|
-
C(J, {
|
|
1985
|
-
variant: "primary",
|
|
1986
|
-
size: "sm",
|
|
1987
|
-
disabled: !o.value,
|
|
1988
|
-
onClick: d
|
|
1989
|
-
}, {
|
|
1990
|
-
default: F(() => [...u[5] || (u[5] = [
|
|
1991
|
-
X("Apply", -1)
|
|
1992
|
-
])]),
|
|
1993
|
-
_: 1
|
|
1994
|
-
}, 8, ["disabled"])
|
|
1995
|
-
])
|
|
1996
|
-
]);
|
|
1997
|
-
};
|
|
1998
|
-
}
|
|
1999
|
-
}), Pn = /* @__PURE__ */ L(Mn, [["__scopeId", "data-v-ea3e8318"]]), On = { class: "ds-table-container" }, Rn = { class: "ds-table" }, Nn = { class: "ds-table__thead" }, Fn = { class: "ds-table__row" }, Un = ["onClick"], jn = {
|
|
2097
|
+
}), Ke = /* @__PURE__ */ L(Zn, [["__scopeId", "data-v-939d302b"]]), Jn = { class: "ds-table-container" }, Qn = { class: "ds-table" }, el = { class: "ds-table__thead" }, tl = { class: "ds-table__row" }, al = ["onClick"], sl = {
|
|
2000
2098
|
key: 1,
|
|
2001
2099
|
class: "ds-table__header-content"
|
|
2002
|
-
},
|
|
2100
|
+
}, nl = { class: "ds-table__header-label" }, ll = { class: "ds-table__tbody" }, ol = ["onClick"], il = {
|
|
2003
2101
|
key: 0,
|
|
2004
2102
|
class: "ds-table__row ds-table__row--empty"
|
|
2005
|
-
},
|
|
2103
|
+
}, cl = ["colspan"], rl = /* @__PURE__ */ A({
|
|
2006
2104
|
__name: "SchemaTable",
|
|
2007
2105
|
props: {
|
|
2008
2106
|
columns: { default: () => [] },
|
|
@@ -2014,24 +2112,24 @@ const ma = /* @__PURE__ */ A({
|
|
|
2014
2112
|
},
|
|
2015
2113
|
emits: ["row-click", "update:modelValue", "update:modelValue-cell", "action-click", "update:sort", "bulk-update"],
|
|
2016
2114
|
setup(e, { emit: s }) {
|
|
2017
|
-
const t = e, n = s, i =
|
|
2115
|
+
const t = e, n = s, i = P({}), o = g(() => t.items.length > 0), r = g(() => t.selectable ? [{ id: "__selection", label: "", cell: "checkbox", align: "center" }, ...t.columns] : t.columns), c = g(() => {
|
|
2018
2116
|
var b;
|
|
2019
2117
|
let y = [...t.items];
|
|
2020
2118
|
const $ = Object.entries(i.value).filter(([, D]) => D !== null);
|
|
2021
2119
|
if ($.length === 0) return y;
|
|
2022
|
-
for (const [D,
|
|
2023
|
-
if (!
|
|
2024
|
-
const
|
|
2025
|
-
if (!
|
|
2026
|
-
const
|
|
2027
|
-
y.sort((le,
|
|
2028
|
-
const ie = le[
|
|
2120
|
+
for (const [D, q] of $) {
|
|
2121
|
+
if (!q) continue;
|
|
2122
|
+
const J = t.columns.find((le) => le.id === D);
|
|
2123
|
+
if (!J) continue;
|
|
2124
|
+
const se = ((b = J.fields) == null ? void 0 : b.value) || D;
|
|
2125
|
+
y.sort((le, Ye) => {
|
|
2126
|
+
const ie = le[se], ce = Ye[se];
|
|
2029
2127
|
if (ie == null) return 1;
|
|
2030
|
-
if (
|
|
2031
|
-
if (typeof ie == "number" && typeof
|
|
2032
|
-
return
|
|
2033
|
-
const be = String(ie), he = String(
|
|
2034
|
-
return !isNaN(ge) && !isNaN(_e) ?
|
|
2128
|
+
if (ce == null) return -1;
|
|
2129
|
+
if (typeof ie == "number" && typeof ce == "number")
|
|
2130
|
+
return q === "asc" ? ie - ce : ce - ie;
|
|
2131
|
+
const be = String(ie), he = String(ce), ge = Number(be), _e = Number(he);
|
|
2132
|
+
return !isNaN(ge) && !isNaN(_e) ? q === "asc" ? ge - _e : _e - ge : q === "asc" ? be.localeCompare(he) : he.localeCompare(be);
|
|
2035
2133
|
});
|
|
2036
2134
|
}
|
|
2037
2135
|
return y;
|
|
@@ -2039,11 +2137,11 @@ const ma = /* @__PURE__ */ A({
|
|
|
2039
2137
|
function d(y, $) {
|
|
2040
2138
|
const b = {};
|
|
2041
2139
|
if (y.fields)
|
|
2042
|
-
for (const [D,
|
|
2043
|
-
b[D] = $[
|
|
2140
|
+
for (const [D, q] of Object.entries(y.fields))
|
|
2141
|
+
b[D] = $[q];
|
|
2044
2142
|
if (y.staticProps)
|
|
2045
|
-
for (const [D,
|
|
2046
|
-
b[D] =
|
|
2143
|
+
for (const [D, q] of Object.entries(y.staticProps))
|
|
2144
|
+
b[D] = q;
|
|
2047
2145
|
return b;
|
|
2048
2146
|
}
|
|
2049
2147
|
function v(y, $) {
|
|
@@ -2057,113 +2155,113 @@ const ma = /* @__PURE__ */ A({
|
|
|
2057
2155
|
b > -1 ? $.splice(b, 1) : $.push(y), n("update:modelValue", $);
|
|
2058
2156
|
}
|
|
2059
2157
|
function _() {
|
|
2060
|
-
|
|
2158
|
+
k.value ? n("update:modelValue", []) : n("update:modelValue", c.value.map((y, $) => String($)));
|
|
2061
2159
|
}
|
|
2062
|
-
const
|
|
2160
|
+
const k = g(() => o.value && t.modelValue.length === c.value.length), M = g(() => t.modelValue.length > 0 && !k.value);
|
|
2063
2161
|
function B(y, $) {
|
|
2064
2162
|
return String($);
|
|
2065
2163
|
}
|
|
2066
|
-
function
|
|
2164
|
+
function V(y) {
|
|
2067
2165
|
if (!t.sortable) return;
|
|
2068
2166
|
const $ = i.value[y];
|
|
2069
2167
|
let b;
|
|
2070
2168
|
$ == null ? b = "asc" : $ === "asc" ? b = "desc" : b = null, i.value = { ...i.value, [y]: b }, n("update:sort", y, b);
|
|
2071
2169
|
}
|
|
2072
|
-
function
|
|
2170
|
+
function H(y) {
|
|
2073
2171
|
const $ = i.value[y];
|
|
2074
|
-
return $ === "asc" ?
|
|
2172
|
+
return $ === "asc" ? Lt : $ === "desc" ? Oe : Tt;
|
|
2075
2173
|
}
|
|
2076
|
-
function
|
|
2174
|
+
function w(y) {
|
|
2077
2175
|
return i.value[y] != null;
|
|
2078
2176
|
}
|
|
2079
|
-
function
|
|
2177
|
+
function I() {
|
|
2080
2178
|
const y = t.columns.length;
|
|
2081
2179
|
return t.selectable ? y + 1 : y;
|
|
2082
2180
|
}
|
|
2083
2181
|
const O = g(() => t.modelValue.length > 0), p = g(() => t.bulkEdit && O.value);
|
|
2084
|
-
function
|
|
2182
|
+
function z(y) {
|
|
2085
2183
|
n("bulk-update", { ...y, rows: [...t.modelValue] }), n("update:modelValue", []);
|
|
2086
2184
|
}
|
|
2087
|
-
return (y, $) => (a(), l("div",
|
|
2185
|
+
return (y, $) => (a(), l("div", Jn, [
|
|
2088
2186
|
e.bulkEdit ? (a(), l("div", {
|
|
2089
2187
|
key: 0,
|
|
2090
|
-
class:
|
|
2188
|
+
class: S([{ "ds-table__bulk-edit-wrapper--hidden": !p.value }, "ds-table__bulk-edit-wrapper"])
|
|
2091
2189
|
}, [
|
|
2092
|
-
|
|
2190
|
+
x(Ue, {
|
|
2093
2191
|
columns: e.columns,
|
|
2094
2192
|
"selected-count": e.modelValue.length,
|
|
2095
|
-
onApply:
|
|
2193
|
+
onApply: z,
|
|
2096
2194
|
onCancel: $[0] || ($[0] = (b) => n("update:modelValue", []))
|
|
2097
2195
|
}, null, 8, ["columns", "selected-count"])
|
|
2098
2196
|
], 2)) : f("", !0),
|
|
2099
|
-
m("table",
|
|
2100
|
-
m("thead",
|
|
2101
|
-
m("tr",
|
|
2102
|
-
(a(!0), l(
|
|
2197
|
+
m("table", Qn, [
|
|
2198
|
+
m("thead", el, [
|
|
2199
|
+
m("tr", tl, [
|
|
2200
|
+
(a(!0), l(j, null, W(r.value, (b) => (a(), l("th", {
|
|
2103
2201
|
key: b.id,
|
|
2104
|
-
class:
|
|
2202
|
+
class: S([
|
|
2105
2203
|
"ds-table__header-cell",
|
|
2106
2204
|
b.align ? `ds-table__header-cell--align-${b.align}` : "",
|
|
2107
2205
|
{ "ds-table__header-cell--sortable": e.sortable && b.id !== "__selection" },
|
|
2108
2206
|
{ "ds-table__header-cell--selection": b.id === "__selection" }
|
|
2109
2207
|
]),
|
|
2110
|
-
onClick: (D) => b.id !== "__selection" ?
|
|
2208
|
+
onClick: (D) => b.id !== "__selection" ? V(b.id) : void 0
|
|
2111
2209
|
}, [
|
|
2112
|
-
b.id === "__selection" ? (a(),
|
|
2210
|
+
b.id === "__selection" ? (a(), T(me, {
|
|
2113
2211
|
key: 0,
|
|
2114
|
-
"model-value":
|
|
2115
|
-
indeterminate:
|
|
2212
|
+
"model-value": k.value,
|
|
2213
|
+
indeterminate: M.value,
|
|
2116
2214
|
"onUpdate:modelValue": _
|
|
2117
|
-
}, null, 8, ["model-value", "indeterminate"])) : (a(), l("span",
|
|
2118
|
-
m("span",
|
|
2215
|
+
}, null, 8, ["model-value", "indeterminate"])) : (a(), l("span", sl, [
|
|
2216
|
+
m("span", nl, C(b.label), 1),
|
|
2119
2217
|
e.sortable ? (a(), l("span", {
|
|
2120
2218
|
key: 0,
|
|
2121
|
-
class:
|
|
2219
|
+
class: S(["ds-table__sort-icon", { "ds-table__sort-icon--active": w(b.id) }])
|
|
2122
2220
|
}, [
|
|
2123
|
-
(a(),
|
|
2221
|
+
(a(), T(re(H(b.id)), { class: "ds-table__sort-icon-svg" }))
|
|
2124
2222
|
], 2)) : f("", !0)
|
|
2125
2223
|
]))
|
|
2126
|
-
], 10,
|
|
2224
|
+
], 10, al))), 128))
|
|
2127
2225
|
])
|
|
2128
2226
|
]),
|
|
2129
|
-
m("tbody",
|
|
2130
|
-
(a(!0), l(
|
|
2227
|
+
m("tbody", ll, [
|
|
2228
|
+
(a(!0), l(j, null, W(c.value, (b, D) => (a(), l("tr", {
|
|
2131
2229
|
key: D,
|
|
2132
|
-
class:
|
|
2133
|
-
onClick: (
|
|
2230
|
+
class: S(["ds-table__row ds-table__row--body", { "ds-table__row--selected": t.selectable && t.modelValue.includes(B(b, D)) }]),
|
|
2231
|
+
onClick: (q) => v(b, D)
|
|
2134
2232
|
}, [
|
|
2135
|
-
(a(!0), l(
|
|
2136
|
-
key:
|
|
2137
|
-
class:
|
|
2138
|
-
onClick: $[1] || ($[1] =
|
|
2233
|
+
(a(!0), l(j, null, W(r.value, (q) => (a(), l("td", {
|
|
2234
|
+
key: q.id,
|
|
2235
|
+
class: S(["ds-table__data-cell", q.align ? `ds-table__data-cell--align-${q.align}` : "", { "ds-table__data-cell--selection": q.id === "__selection" }]),
|
|
2236
|
+
onClick: $[1] || ($[1] = X(() => {
|
|
2139
2237
|
}, ["stop"]))
|
|
2140
2238
|
}, [
|
|
2141
|
-
|
|
2239
|
+
q.id === "__selection" ? (a(), T(me, {
|
|
2142
2240
|
key: 0,
|
|
2143
2241
|
"model-value": t.selectable ? t.modelValue.includes(B(b, D)) : !1,
|
|
2144
|
-
"onUpdate:modelValue": (
|
|
2145
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])) : (a(),
|
|
2242
|
+
"onUpdate:modelValue": (J) => h(B(b, D))
|
|
2243
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])) : (a(), T(Ke, Pe({
|
|
2146
2244
|
key: 1,
|
|
2147
|
-
type:
|
|
2148
|
-
}, { ref_for: !0 }, d(
|
|
2149
|
-
onActionClick: (
|
|
2245
|
+
type: q.cell
|
|
2246
|
+
}, { ref_for: !0 }, d(q, b), {
|
|
2247
|
+
onActionClick: (J) => u(J, b, D)
|
|
2150
2248
|
}), null, 16, ["type", "onActionClick"]))
|
|
2151
2249
|
], 2))), 128))
|
|
2152
|
-
], 10,
|
|
2153
|
-
o.value ? f("", !0) : (a(), l("tr",
|
|
2250
|
+
], 10, ol))), 128)),
|
|
2251
|
+
o.value ? f("", !0) : (a(), l("tr", il, [
|
|
2154
2252
|
m("td", {
|
|
2155
|
-
colspan:
|
|
2253
|
+
colspan: I(),
|
|
2156
2254
|
class: "ds-table__empty-cell"
|
|
2157
|
-
}, " هیچ دادهای یافت نشد. ", 8,
|
|
2255
|
+
}, " هیچ دادهای یافت نشد. ", 8, cl)
|
|
2158
2256
|
]))
|
|
2159
2257
|
])
|
|
2160
2258
|
])
|
|
2161
2259
|
]));
|
|
2162
2260
|
}
|
|
2163
|
-
}),
|
|
2261
|
+
}), dl = /* @__PURE__ */ L(rl, [["__scopeId", "data-v-ec5f4274"]]), ul = { class: "ds-filter-bar" }, ml = { class: "ds-filter-bar__filters" }, fl = {
|
|
2164
2262
|
key: 0,
|
|
2165
2263
|
class: "ds-filter-bar__actions"
|
|
2166
|
-
},
|
|
2264
|
+
}, vl = /* @__PURE__ */ A({
|
|
2167
2265
|
__name: "FilterBar",
|
|
2168
2266
|
props: {
|
|
2169
2267
|
showClear: { type: Boolean, default: !1 }
|
|
@@ -2171,29 +2269,29 @@ const ma = /* @__PURE__ */ A({
|
|
|
2171
2269
|
emits: ["clear"],
|
|
2172
2270
|
setup(e, { emit: s }) {
|
|
2173
2271
|
const t = s;
|
|
2174
|
-
return (n, i) => (a(), l("div",
|
|
2175
|
-
m("div",
|
|
2176
|
-
|
|
2272
|
+
return (n, i) => (a(), l("div", ul, [
|
|
2273
|
+
m("div", ml, [
|
|
2274
|
+
K(n.$slots, "default", {}, void 0, !0)
|
|
2177
2275
|
]),
|
|
2178
|
-
e.showClear ? (a(), l("div",
|
|
2179
|
-
|
|
2276
|
+
e.showClear ? (a(), l("div", fl, [
|
|
2277
|
+
x(Z, {
|
|
2180
2278
|
variant: "ghost",
|
|
2181
2279
|
size: "sm",
|
|
2182
2280
|
onClick: i[0] || (i[0] = (o) => t("clear"))
|
|
2183
2281
|
}, {
|
|
2184
|
-
default:
|
|
2185
|
-
|
|
2282
|
+
default: U(() => [...i[1] || (i[1] = [
|
|
2283
|
+
Y(" پاک کردن فیلترها ", -1)
|
|
2186
2284
|
])]),
|
|
2187
2285
|
_: 1
|
|
2188
2286
|
})
|
|
2189
2287
|
])) : f("", !0)
|
|
2190
2288
|
]));
|
|
2191
2289
|
}
|
|
2192
|
-
}),
|
|
2290
|
+
}), pl = /* @__PURE__ */ L(vl, [["__scopeId", "data-v-76a12d68"]]), bl = {
|
|
2193
2291
|
class: "ds-pagination",
|
|
2194
2292
|
role: "navigation",
|
|
2195
2293
|
"aria-label": "Pagination"
|
|
2196
|
-
},
|
|
2294
|
+
}, hl = { class: "ds-pagination__info" }, gl = /* @__PURE__ */ A({
|
|
2197
2295
|
__name: "Pagination",
|
|
2198
2296
|
props: {
|
|
2199
2297
|
page: { default: 1 },
|
|
@@ -2202,53 +2300,53 @@ const ma = /* @__PURE__ */ A({
|
|
|
2202
2300
|
},
|
|
2203
2301
|
emits: ["update:page", "update:value", "change"],
|
|
2204
2302
|
setup(e, { emit: s }) {
|
|
2205
|
-
const t = e, n = s, i = g(() => Math.max(1, Math.ceil(t.total / t.pageSize))), o = g(() => t.page <= 1),
|
|
2303
|
+
const t = e, n = s, i = g(() => Math.max(1, Math.ceil(t.total / t.pageSize))), o = g(() => t.page <= 1), r = g(() => t.page >= i.value), c = g(() => "arrow-right"), d = g(() => "arrow-left");
|
|
2206
2304
|
function v(u) {
|
|
2207
2305
|
u < 1 || u > i.value || (n("update:page", u), n("update:value", u), n("change", u));
|
|
2208
2306
|
}
|
|
2209
|
-
return (u, h) => (a(), l("div",
|
|
2210
|
-
|
|
2307
|
+
return (u, h) => (a(), l("div", bl, [
|
|
2308
|
+
x(Z, {
|
|
2211
2309
|
variant: "secondary",
|
|
2212
2310
|
size: "sm",
|
|
2213
|
-
icon:
|
|
2311
|
+
icon: c.value,
|
|
2214
2312
|
disabled: o.value,
|
|
2215
2313
|
onClick: h[0] || (h[0] = (_) => v(e.page - 1))
|
|
2216
2314
|
}, {
|
|
2217
|
-
default:
|
|
2218
|
-
|
|
2315
|
+
default: U(() => [
|
|
2316
|
+
Y(C(R(F)("pagination.previous")), 1)
|
|
2219
2317
|
]),
|
|
2220
2318
|
_: 1
|
|
2221
2319
|
}, 8, ["icon", "disabled"]),
|
|
2222
|
-
m("div",
|
|
2223
|
-
|
|
2224
|
-
default:
|
|
2225
|
-
|
|
2320
|
+
m("div", hl, [
|
|
2321
|
+
x(G, { variant: "body-sm" }, {
|
|
2322
|
+
default: U(() => [
|
|
2323
|
+
Y(C(R(F)("pagination.page_of", { page: String(e.page), total: String(i.value) })), 1)
|
|
2226
2324
|
]),
|
|
2227
2325
|
_: 1
|
|
2228
2326
|
})
|
|
2229
2327
|
]),
|
|
2230
|
-
|
|
2328
|
+
x(Z, {
|
|
2231
2329
|
variant: "secondary",
|
|
2232
2330
|
size: "sm",
|
|
2233
2331
|
icon: d.value,
|
|
2234
2332
|
"icon-position": "end",
|
|
2235
|
-
disabled:
|
|
2333
|
+
disabled: r.value,
|
|
2236
2334
|
onClick: h[1] || (h[1] = (_) => v(e.page + 1))
|
|
2237
2335
|
}, {
|
|
2238
|
-
default:
|
|
2239
|
-
|
|
2336
|
+
default: U(() => [
|
|
2337
|
+
Y(C(R(F)("pagination.next")), 1)
|
|
2240
2338
|
]),
|
|
2241
2339
|
_: 1
|
|
2242
2340
|
}, 8, ["icon", "disabled"])
|
|
2243
2341
|
]));
|
|
2244
2342
|
}
|
|
2245
|
-
}),
|
|
2343
|
+
}), _l = /* @__PURE__ */ L(gl, [["__scopeId", "data-v-2732ec5f"]]), yl = { class: "ds-empty-state" }, kl = { class: "ds-empty-state__icon-wrapper" }, wl = {
|
|
2246
2344
|
key: 1,
|
|
2247
2345
|
class: "ds-empty-state__action"
|
|
2248
|
-
},
|
|
2346
|
+
}, $l = /* @__PURE__ */ A({
|
|
2249
2347
|
__name: "EmptyState",
|
|
2250
2348
|
props: {
|
|
2251
|
-
title: { default:
|
|
2349
|
+
title: { default: F("table.empty") },
|
|
2252
2350
|
description: {},
|
|
2253
2351
|
icon: { default: "archive" },
|
|
2254
2352
|
actionLabel: {}
|
|
@@ -2256,74 +2354,74 @@ const ma = /* @__PURE__ */ A({
|
|
|
2256
2354
|
emits: ["action"],
|
|
2257
2355
|
setup(e, { emit: s }) {
|
|
2258
2356
|
const t = s;
|
|
2259
|
-
return (n, i) => (a(), l("div",
|
|
2260
|
-
m("div",
|
|
2261
|
-
|
|
2357
|
+
return (n, i) => (a(), l("div", yl, [
|
|
2358
|
+
m("div", kl, [
|
|
2359
|
+
x(N, {
|
|
2262
2360
|
name: e.icon,
|
|
2263
2361
|
size: "lg",
|
|
2264
2362
|
class: "ds-empty-state__icon"
|
|
2265
2363
|
}, null, 8, ["name"])
|
|
2266
2364
|
]),
|
|
2267
|
-
|
|
2365
|
+
x(G, {
|
|
2268
2366
|
variant: "heading-lg",
|
|
2269
2367
|
value: e.title,
|
|
2270
2368
|
class: "ds-empty-state__title"
|
|
2271
2369
|
}, null, 8, ["value"]),
|
|
2272
|
-
e.description ? (a(),
|
|
2370
|
+
e.description ? (a(), T(G, {
|
|
2273
2371
|
key: 0,
|
|
2274
2372
|
variant: "body-md",
|
|
2275
2373
|
value: e.description,
|
|
2276
2374
|
class: "ds-empty-state__desc"
|
|
2277
2375
|
}, null, 8, ["value"])) : f("", !0),
|
|
2278
|
-
e.actionLabel ? (a(), l("div",
|
|
2279
|
-
|
|
2376
|
+
e.actionLabel ? (a(), l("div", wl, [
|
|
2377
|
+
x(Z, {
|
|
2280
2378
|
variant: "primary",
|
|
2281
2379
|
size: "md",
|
|
2282
2380
|
onClick: i[0] || (i[0] = (o) => t("action"))
|
|
2283
2381
|
}, {
|
|
2284
|
-
default:
|
|
2285
|
-
|
|
2382
|
+
default: U(() => [
|
|
2383
|
+
Y(C(e.actionLabel), 1)
|
|
2286
2384
|
]),
|
|
2287
2385
|
_: 1
|
|
2288
2386
|
})
|
|
2289
2387
|
])) : f("", !0)
|
|
2290
2388
|
]));
|
|
2291
2389
|
}
|
|
2292
|
-
}),
|
|
2390
|
+
}), Cl = /* @__PURE__ */ L($l, [["__scopeId", "data-v-62f76e13"]]), xl = {
|
|
2293
2391
|
key: 1,
|
|
2294
2392
|
class: "ds-loading-state__skeleton-wrapper"
|
|
2295
|
-
},
|
|
2393
|
+
}, Sl = {
|
|
2296
2394
|
key: 2,
|
|
2297
2395
|
class: "ds-loading-state__placeholder-wrapper"
|
|
2298
|
-
},
|
|
2396
|
+
}, Il = /* @__PURE__ */ A({
|
|
2299
2397
|
__name: "LoadingState",
|
|
2300
2398
|
props: {
|
|
2301
2399
|
variant: { default: "spinner" },
|
|
2302
|
-
text: { default:
|
|
2400
|
+
text: { default: F("loading.text") }
|
|
2303
2401
|
},
|
|
2304
2402
|
setup(e) {
|
|
2305
2403
|
return (s, t) => (a(), l("div", {
|
|
2306
|
-
class:
|
|
2404
|
+
class: S(["ds-loading-state", [`ds-loading-state--${e.variant}`]])
|
|
2307
2405
|
}, [
|
|
2308
|
-
e.variant === "spinner" ? (a(), l(
|
|
2406
|
+
e.variant === "spinner" ? (a(), l(j, { key: 0 }, [
|
|
2309
2407
|
t[0] || (t[0] = m("div", { class: "ds-loading-state__spinner" }, null, -1)),
|
|
2310
|
-
e.text ? (a(),
|
|
2408
|
+
e.text ? (a(), T(G, {
|
|
2311
2409
|
key: 0,
|
|
2312
2410
|
variant: "body-sm",
|
|
2313
2411
|
value: e.text,
|
|
2314
2412
|
class: "ds-loading-state__text"
|
|
2315
2413
|
}, null, 8, ["value"])) : f("", !0)
|
|
2316
|
-
], 64)) : e.variant === "skeleton" ? (a(), l("div",
|
|
2414
|
+
], 64)) : e.variant === "skeleton" ? (a(), l("div", xl, [...t[1] || (t[1] = [
|
|
2317
2415
|
m("div", { class: "ds-loading-state__skeleton-line ds-loading-state__skeleton-line--title" }, null, -1),
|
|
2318
2416
|
m("div", { class: "ds-loading-state__skeleton-line" }, null, -1),
|
|
2319
2417
|
m("div", { class: "ds-loading-state__skeleton-line ds-loading-state__skeleton-line--short" }, null, -1)
|
|
2320
|
-
])])) : e.variant === "placeholder" ? (a(), l("div",
|
|
2418
|
+
])])) : e.variant === "placeholder" ? (a(), l("div", Sl, [...t[2] || (t[2] = [
|
|
2321
2419
|
m("div", { class: "ds-loading-state__placeholder-circle" }, null, -1),
|
|
2322
2420
|
m("div", { class: "ds-loading-state__skeleton-line ds-loading-state__skeleton-line--title" }, null, -1)
|
|
2323
2421
|
])])) : f("", !0)
|
|
2324
2422
|
], 2));
|
|
2325
2423
|
}
|
|
2326
|
-
}),
|
|
2424
|
+
}), He = /* @__PURE__ */ L(Il, [["__scopeId", "data-v-23811991"]]), Bl = {
|
|
2327
2425
|
users: [
|
|
2328
2426
|
{ id: "1", name: "علیرضا علوی", email: "alireza@example.com", role: "مدیر کل" },
|
|
2329
2427
|
{ id: "2", name: "سارا رضایی", email: "sara@example.com", role: "نویسنده" },
|
|
@@ -2337,28 +2435,28 @@ const ma = /* @__PURE__ */ A({
|
|
|
2337
2435
|
{ id: "p3", name: "تبلت لنوو", price: "12,000,000" }
|
|
2338
2436
|
]
|
|
2339
2437
|
};
|
|
2340
|
-
function
|
|
2438
|
+
function Vl(e, s = "") {
|
|
2341
2439
|
return new Promise((t) => {
|
|
2342
2440
|
setTimeout(() => {
|
|
2343
|
-
const n =
|
|
2441
|
+
const n = Bl[e] || [];
|
|
2344
2442
|
if (!s.trim()) {
|
|
2345
2443
|
t(n);
|
|
2346
2444
|
return;
|
|
2347
2445
|
}
|
|
2348
|
-
const i = s.toLowerCase().trim(), o = n.filter((
|
|
2349
|
-
(
|
|
2446
|
+
const i = s.toLowerCase().trim(), o = n.filter((r) => Object.values(r).some(
|
|
2447
|
+
(c) => String(c).toLowerCase().includes(i)
|
|
2350
2448
|
));
|
|
2351
2449
|
t(o);
|
|
2352
2450
|
}, 200);
|
|
2353
2451
|
});
|
|
2354
2452
|
}
|
|
2355
|
-
const
|
|
2453
|
+
const zl = { class: "ds-autocomplete" }, Dl = { class: "ds-autocomplete__trigger-wrapper" }, Al = {
|
|
2356
2454
|
key: 0,
|
|
2357
2455
|
class: "ds-autocomplete__loading"
|
|
2358
|
-
},
|
|
2456
|
+
}, Ll = {
|
|
2359
2457
|
key: 1,
|
|
2360
2458
|
class: "ds-autocomplete__empty"
|
|
2361
|
-
},
|
|
2459
|
+
}, Tl = /* @__PURE__ */ A({
|
|
2362
2460
|
__name: "AsyncAutocomplete",
|
|
2363
2461
|
props: {
|
|
2364
2462
|
modelValue: { default: void 0 },
|
|
@@ -2375,47 +2473,47 @@ const bl = { class: "ds-autocomplete" }, hl = { class: "ds-autocomplete__trigger
|
|
|
2375
2473
|
},
|
|
2376
2474
|
emits: ["update:modelValue", "change", "clear"],
|
|
2377
2475
|
setup(e, { emit: s }) {
|
|
2378
|
-
const t = e, n = s, i = g(() => t.modelValue), o =
|
|
2476
|
+
const t = e, n = s, i = g(() => t.modelValue), o = P(null), r = P(""), c = P(!1), d = P(!1), v = P([]), u = P(-1), h = g(() => t.loading || d.value);
|
|
2379
2477
|
function _(b) {
|
|
2380
2478
|
if (typeof b == "string" || typeof b == "number") return String(b);
|
|
2381
2479
|
if (!b || typeof b != "object") return "";
|
|
2382
2480
|
const D = b;
|
|
2383
2481
|
return String(D[t.labelKey] ?? D.label ?? "");
|
|
2384
2482
|
}
|
|
2385
|
-
function
|
|
2483
|
+
function k(b) {
|
|
2386
2484
|
if (typeof b == "string" || typeof b == "number") return b;
|
|
2387
2485
|
if (!b || typeof b != "object") return null;
|
|
2388
2486
|
const D = b;
|
|
2389
2487
|
return D[t.valueKey] ?? D.value ?? null;
|
|
2390
2488
|
}
|
|
2391
|
-
const
|
|
2392
|
-
if (!
|
|
2393
|
-
const b =
|
|
2489
|
+
const M = g(() => {
|
|
2490
|
+
if (!r.value.trim()) return v.value;
|
|
2491
|
+
const b = r.value.toLowerCase().trim();
|
|
2394
2492
|
return v.value.filter(
|
|
2395
2493
|
(D) => _(D).toLowerCase().includes(b)
|
|
2396
2494
|
);
|
|
2397
2495
|
}), B = g(() => {
|
|
2398
2496
|
if (t.source)
|
|
2399
|
-
return
|
|
2400
|
-
if (!
|
|
2401
|
-
const b =
|
|
2497
|
+
return M.value;
|
|
2498
|
+
if (!r.value.trim()) return t.items;
|
|
2499
|
+
const b = r.value.toLowerCase().trim();
|
|
2402
2500
|
return t.items.filter(
|
|
2403
2501
|
(D) => _(D).toLowerCase().includes(b)
|
|
2404
2502
|
);
|
|
2405
|
-
}),
|
|
2503
|
+
}), V = g(() => {
|
|
2406
2504
|
const b = /* @__PURE__ */ new Map();
|
|
2407
|
-
return t.items.forEach((D) => b.set(
|
|
2408
|
-
}),
|
|
2409
|
-
if (
|
|
2410
|
-
return
|
|
2411
|
-
const b =
|
|
2505
|
+
return t.items.forEach((D) => b.set(k(D), D)), v.value.forEach((D) => b.set(k(D), D)), Array.from(b.values());
|
|
2506
|
+
}), H = g(() => {
|
|
2507
|
+
if (c.value)
|
|
2508
|
+
return r.value;
|
|
2509
|
+
const b = V.value.find((D) => k(D) === i.value);
|
|
2412
2510
|
return b ? _(b) : "";
|
|
2413
2511
|
});
|
|
2414
|
-
async function
|
|
2512
|
+
async function w(b) {
|
|
2415
2513
|
if (t.source) {
|
|
2416
2514
|
d.value = !0;
|
|
2417
2515
|
try {
|
|
2418
|
-
const D = await
|
|
2516
|
+
const D = await Vl(t.source, b);
|
|
2419
2517
|
v.value = D;
|
|
2420
2518
|
} catch (D) {
|
|
2421
2519
|
console.error(D), v.value = [];
|
|
@@ -2424,32 +2522,32 @@ const bl = { class: "ds-autocomplete" }, hl = { class: "ds-autocomplete__trigger
|
|
|
2424
2522
|
}
|
|
2425
2523
|
}
|
|
2426
2524
|
}
|
|
2427
|
-
let
|
|
2525
|
+
let I = null;
|
|
2428
2526
|
function O(b) {
|
|
2429
|
-
t.searchable && (
|
|
2430
|
-
t.source &&
|
|
2527
|
+
t.searchable && (r.value = b, c.value = !0, o.value && !o.value.isOpen && o.value.open(), I && clearTimeout(I), I = window.setTimeout(() => {
|
|
2528
|
+
t.source && w(b);
|
|
2431
2529
|
}, 200));
|
|
2432
2530
|
}
|
|
2433
2531
|
function p() {
|
|
2434
|
-
t.disabled || (
|
|
2532
|
+
t.disabled || (c.value = !0, r.value = "", u.value = -1, o.value && !o.value.isOpen && o.value.open(), t.source && v.value.length === 0 && w(""));
|
|
2435
2533
|
}
|
|
2436
|
-
function
|
|
2437
|
-
const D =
|
|
2438
|
-
n("update:modelValue", D), n("change", D),
|
|
2534
|
+
function z(b) {
|
|
2535
|
+
const D = k(b);
|
|
2536
|
+
n("update:modelValue", D), n("change", D), c.value = !1, r.value = _(b), u.value = -1, o.value && o.value.close();
|
|
2439
2537
|
}
|
|
2440
2538
|
function y() {
|
|
2441
|
-
t.disabled || (n("update:modelValue", null), n("change", null), n("clear"),
|
|
2539
|
+
t.disabled || (n("update:modelValue", null), n("change", null), n("clear"), r.value = "", c.value = !1, u.value = -1);
|
|
2442
2540
|
}
|
|
2443
2541
|
function $(b) {
|
|
2444
|
-
var
|
|
2542
|
+
var q, J, se;
|
|
2445
2543
|
if (t.disabled) return;
|
|
2446
|
-
if (!((
|
|
2447
|
-
b.key === "ArrowDown" && (b.preventDefault(), (
|
|
2544
|
+
if (!((q = o.value) == null ? void 0 : q.isOpen)) {
|
|
2545
|
+
b.key === "ArrowDown" && (b.preventDefault(), (J = o.value) == null || J.open());
|
|
2448
2546
|
return;
|
|
2449
2547
|
}
|
|
2450
2548
|
switch (b.key) {
|
|
2451
2549
|
case "Escape":
|
|
2452
|
-
b.preventDefault(), (
|
|
2550
|
+
b.preventDefault(), (se = o.value) == null || se.close(), c.value = !1;
|
|
2453
2551
|
break;
|
|
2454
2552
|
case "ArrowDown":
|
|
2455
2553
|
b.preventDefault(), u.value = u.value < B.value.length - 1 ? u.value + 1 : 0;
|
|
@@ -2461,28 +2559,28 @@ const bl = { class: "ds-autocomplete" }, hl = { class: "ds-autocomplete__trigger
|
|
|
2461
2559
|
if (u.value >= 0 && u.value < B.value.length) {
|
|
2462
2560
|
b.preventDefault();
|
|
2463
2561
|
const le = B.value[u.value];
|
|
2464
|
-
le &&
|
|
2562
|
+
le && z(le);
|
|
2465
2563
|
}
|
|
2466
2564
|
break;
|
|
2467
2565
|
}
|
|
2468
2566
|
}
|
|
2469
|
-
return
|
|
2567
|
+
return ee(() => {
|
|
2470
2568
|
var b;
|
|
2471
2569
|
return (b = o.value) == null ? void 0 : b.isOpen;
|
|
2472
2570
|
}, (b) => {
|
|
2473
2571
|
b || setTimeout(() => {
|
|
2474
|
-
|
|
2572
|
+
c.value = !1;
|
|
2475
2573
|
}, 100);
|
|
2476
|
-
}), (b, D) => (a(), l("div",
|
|
2477
|
-
|
|
2574
|
+
}), (b, D) => (a(), l("div", zl, [
|
|
2575
|
+
x(Be, {
|
|
2478
2576
|
ref_key: "dropdownRef",
|
|
2479
2577
|
ref: o,
|
|
2480
2578
|
class: "ds-autocomplete__dropdown"
|
|
2481
2579
|
}, {
|
|
2482
|
-
trigger:
|
|
2483
|
-
m("div",
|
|
2484
|
-
|
|
2485
|
-
"model-value":
|
|
2580
|
+
trigger: U(() => [
|
|
2581
|
+
m("div", Dl, [
|
|
2582
|
+
x(ve, {
|
|
2583
|
+
"model-value": H.value,
|
|
2486
2584
|
placeholder: e.placeholder,
|
|
2487
2585
|
disabled: e.disabled,
|
|
2488
2586
|
icon: "search",
|
|
@@ -2496,32 +2594,32 @@ const bl = { class: "ds-autocomplete" }, hl = { class: "ds-autocomplete__trigger
|
|
|
2496
2594
|
key: 0,
|
|
2497
2595
|
type: "button",
|
|
2498
2596
|
class: "ds-autocomplete__clear",
|
|
2499
|
-
onClick:
|
|
2597
|
+
onClick: X(y, ["stop"])
|
|
2500
2598
|
}, [
|
|
2501
|
-
|
|
2599
|
+
x(N, {
|
|
2502
2600
|
name: "x",
|
|
2503
2601
|
size: "xs"
|
|
2504
2602
|
})
|
|
2505
2603
|
])) : f("", !0)
|
|
2506
2604
|
])
|
|
2507
2605
|
]),
|
|
2508
|
-
default:
|
|
2509
|
-
|
|
2606
|
+
default: U(() => [
|
|
2607
|
+
x(je, {
|
|
2510
2608
|
variant: "vertical",
|
|
2511
2609
|
class: "ds-autocomplete__menu-container"
|
|
2512
2610
|
}, {
|
|
2513
|
-
default:
|
|
2514
|
-
h.value ? (a(), l("div",
|
|
2515
|
-
|
|
2611
|
+
default: U(() => [
|
|
2612
|
+
h.value ? (a(), l("div", Al, [
|
|
2613
|
+
x(He, {
|
|
2516
2614
|
variant: "spinner",
|
|
2517
2615
|
text: "در حال بارگذاری..."
|
|
2518
2616
|
})
|
|
2519
|
-
])) : B.value.length === 0 ? (a(), l("div",
|
|
2520
|
-
key: String(
|
|
2521
|
-
label: _(
|
|
2522
|
-
active:
|
|
2523
|
-
onClick: (
|
|
2524
|
-
onMouseenter: (
|
|
2617
|
+
])) : B.value.length === 0 ? (a(), l("div", Ll, " نتیجهای یافت نشد ")) : (a(!0), l(j, { key: 2 }, W(B.value, (q, J) => (a(), T(fe, {
|
|
2618
|
+
key: String(k(q)),
|
|
2619
|
+
label: _(q),
|
|
2620
|
+
active: k(q) === i.value || J === u.value,
|
|
2621
|
+
onClick: (se) => z(q),
|
|
2622
|
+
onMouseenter: (se) => u.value = J
|
|
2525
2623
|
}, null, 8, ["label", "active", "onClick", "onMouseenter"]))), 128))
|
|
2526
2624
|
]),
|
|
2527
2625
|
_: 1
|
|
@@ -2531,23 +2629,23 @@ const bl = { class: "ds-autocomplete" }, hl = { class: "ds-autocomplete__trigger
|
|
|
2531
2629
|
}, 512)
|
|
2532
2630
|
]));
|
|
2533
2631
|
}
|
|
2534
|
-
}),
|
|
2632
|
+
}), El = /* @__PURE__ */ L(Tl, [["__scopeId", "data-v-9faf0edb"]]), Ve = Ee({
|
|
2535
2633
|
theme: "dark",
|
|
2536
2634
|
locale: "fa",
|
|
2537
2635
|
direction: "rtl",
|
|
2538
2636
|
permissions: ["finance.view", "roles.manage"],
|
|
2539
2637
|
data: {}
|
|
2540
2638
|
});
|
|
2541
|
-
function
|
|
2542
|
-
return e ?
|
|
2639
|
+
function Ml(e) {
|
|
2640
|
+
return e ? Ve.permissions.includes(e) : !0;
|
|
2543
2641
|
}
|
|
2544
|
-
function
|
|
2545
|
-
|
|
2642
|
+
function Ri(e) {
|
|
2643
|
+
Ve.locale = e, Re(e);
|
|
2546
2644
|
}
|
|
2547
|
-
function
|
|
2548
|
-
|
|
2645
|
+
function Ni(e) {
|
|
2646
|
+
Ve.direction = e, document.documentElement.dir = e;
|
|
2549
2647
|
}
|
|
2550
|
-
const
|
|
2648
|
+
const We = A({
|
|
2551
2649
|
name: "SchemaRenderer",
|
|
2552
2650
|
props: {
|
|
2553
2651
|
schema: {
|
|
@@ -2559,26 +2657,26 @@ const He = A({
|
|
|
2559
2657
|
setup(e, { emit: s }) {
|
|
2560
2658
|
const t = (n) => {
|
|
2561
2659
|
var u;
|
|
2562
|
-
if (n.permission && !
|
|
2660
|
+
if (n.permission && !Ml(n.permission))
|
|
2563
2661
|
return null;
|
|
2564
2662
|
if (n.type === "text" && !(n.props && Object.keys(n.props).some((_) => _ !== "value"))) {
|
|
2565
2663
|
const _ = ((u = n.props) == null ? void 0 : u.value) || "";
|
|
2566
|
-
return _.includes(".") ?
|
|
2664
|
+
return _.includes(".") ? F(_) : _;
|
|
2567
2665
|
}
|
|
2568
|
-
const o =
|
|
2569
|
-
return
|
|
2570
|
-
const
|
|
2571
|
-
d[
|
|
2572
|
-
s("event", { name: _, event:
|
|
2666
|
+
const o = E.get(n.type) || n.type, r = n.type === "accordion", c = n.children && !r ? n.children.map((h) => t(h)).filter(Boolean) : void 0, d = { ...n.props };
|
|
2667
|
+
return r && n.children && (d.items = n.children), n.events && Object.entries(n.events).forEach(([h, _]) => {
|
|
2668
|
+
const k = `on${h.charAt(0).toUpperCase()}${h.slice(1)}`;
|
|
2669
|
+
d[k] = (M) => {
|
|
2670
|
+
s("event", { name: _, event: M, node: n });
|
|
2573
2671
|
};
|
|
2574
|
-
}),
|
|
2672
|
+
}), De(o, d, c ? { default: () => c } : void 0);
|
|
2575
2673
|
};
|
|
2576
|
-
return () => Array.isArray(e.schema) ?
|
|
2674
|
+
return () => Array.isArray(e.schema) ? De("div", { class: "schema-tree" }, e.schema.map((n) => t(n)).filter(Boolean)) : t(e.schema);
|
|
2577
2675
|
}
|
|
2578
|
-
}),
|
|
2676
|
+
}), Pl = {
|
|
2579
2677
|
class: "ds-accordion",
|
|
2580
2678
|
role: "presentation"
|
|
2581
|
-
},
|
|
2679
|
+
}, Ol = ["aria-expanded", "disabled", "onClick"], Rl = { class: "ds-accordion__title" }, Nl = { class: "ds-accordion__content" }, Fl = { class: "ds-accordion__content-inner" }, Ul = /* @__PURE__ */ A({
|
|
2582
2680
|
__name: "Accordion",
|
|
2583
2681
|
props: {
|
|
2584
2682
|
items: { default: () => [] },
|
|
@@ -2587,16 +2685,16 @@ const He = A({
|
|
|
2587
2685
|
disabled: { type: Boolean, default: !1 }
|
|
2588
2686
|
},
|
|
2589
2687
|
setup(e) {
|
|
2590
|
-
const s = e, t =
|
|
2688
|
+
const s = e, t = P([]), n = (o) => {
|
|
2591
2689
|
if (s.disabled) return;
|
|
2592
|
-
t.value.indexOf(o) > -1 ? t.value = t.value.filter((
|
|
2690
|
+
t.value.indexOf(o) > -1 ? t.value = t.value.filter((c) => c !== o) : s.multiple ? t.value.push(o) : t.value = [o];
|
|
2593
2691
|
}, i = (o) => t.value.includes(o);
|
|
2594
|
-
return
|
|
2595
|
-
s.defaultOpen && s.items.length > 0 && (s.multiple ? t.value = s.items.map((o,
|
|
2596
|
-
}), (o,
|
|
2597
|
-
(a(!0), l(
|
|
2692
|
+
return te(() => {
|
|
2693
|
+
s.defaultOpen && s.items.length > 0 && (s.multiple ? t.value = s.items.map((o, r) => r) : t.value = [0]);
|
|
2694
|
+
}), (o, r) => (a(), l("div", Pl, [
|
|
2695
|
+
(a(!0), l(j, null, W(e.items, (c, d) => (a(), l("div", {
|
|
2598
2696
|
key: d,
|
|
2599
|
-
class:
|
|
2697
|
+
class: S([
|
|
2600
2698
|
"ds-accordion__item",
|
|
2601
2699
|
{ "ds-accordion__item--open": i(d) },
|
|
2602
2700
|
{ "ds-accordion__item--disabled": e.disabled }
|
|
@@ -2609,23 +2707,23 @@ const He = A({
|
|
|
2609
2707
|
disabled: e.disabled,
|
|
2610
2708
|
onClick: (v) => n(d)
|
|
2611
2709
|
}, [
|
|
2612
|
-
m("span",
|
|
2613
|
-
|
|
2710
|
+
m("span", Rl, C(c.title.includes(".") ? R(F)(c.title) : c.title), 1),
|
|
2711
|
+
x(N, {
|
|
2614
2712
|
name: "chevron-down",
|
|
2615
2713
|
size: "sm",
|
|
2616
2714
|
class: "ds-accordion__chevron"
|
|
2617
2715
|
})
|
|
2618
|
-
], 8,
|
|
2716
|
+
], 8, Ol),
|
|
2619
2717
|
m("div", {
|
|
2620
|
-
class:
|
|
2718
|
+
class: S([
|
|
2621
2719
|
"ds-accordion__content-wrapper",
|
|
2622
2720
|
{ "ds-accordion__content-wrapper--open": i(d) }
|
|
2623
2721
|
])
|
|
2624
2722
|
}, [
|
|
2625
|
-
m("div",
|
|
2626
|
-
m("div",
|
|
2627
|
-
|
|
2628
|
-
schema:
|
|
2723
|
+
m("div", Nl, [
|
|
2724
|
+
m("div", Fl, [
|
|
2725
|
+
x(We, {
|
|
2726
|
+
schema: c.content
|
|
2629
2727
|
}, null, 8, ["schema"])
|
|
2630
2728
|
])
|
|
2631
2729
|
])
|
|
@@ -2633,16 +2731,16 @@ const He = A({
|
|
|
2633
2731
|
], 2))), 128))
|
|
2634
2732
|
]));
|
|
2635
2733
|
}
|
|
2636
|
-
}),
|
|
2734
|
+
}), jl = /* @__PURE__ */ L(Ul, [["__scopeId", "data-v-24e0f847"]]), ql = { class: "ds-alert__main" }, Kl = { class: "ds-alert__icon-container" }, Hl = { class: "ds-alert__content" }, Wl = { class: "ds-alert__text-group" }, Gl = {
|
|
2637
2735
|
key: 0,
|
|
2638
2736
|
class: "ds-alert__title"
|
|
2639
|
-
},
|
|
2737
|
+
}, Yl = {
|
|
2640
2738
|
key: 1,
|
|
2641
2739
|
class: "ds-alert__description"
|
|
2642
|
-
},
|
|
2740
|
+
}, Xl = {
|
|
2643
2741
|
key: 0,
|
|
2644
2742
|
class: "ds-alert__actions"
|
|
2645
|
-
},
|
|
2743
|
+
}, Zl = ["aria-label"], Jl = /* @__PURE__ */ A({
|
|
2646
2744
|
__name: "Alert",
|
|
2647
2745
|
props: {
|
|
2648
2746
|
variant: { default: "info" },
|
|
@@ -2652,11 +2750,12 @@ const He = A({
|
|
|
2652
2750
|
actions: { default: () => [] },
|
|
2653
2751
|
layout: { default: "column" }
|
|
2654
2752
|
},
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2753
|
+
emits: ["event"],
|
|
2754
|
+
setup(e, { emit: s }) {
|
|
2755
|
+
const t = e, n = s, i = P(!1), o = () => {
|
|
2756
|
+
i.value = !0;
|
|
2757
|
+
}, r = g(() => {
|
|
2758
|
+
switch (t.variant) {
|
|
2660
2759
|
case "success":
|
|
2661
2760
|
return "check";
|
|
2662
2761
|
case "warning":
|
|
@@ -2668,32 +2767,33 @@ const He = A({
|
|
|
2668
2767
|
default:
|
|
2669
2768
|
return "info";
|
|
2670
2769
|
}
|
|
2671
|
-
}),
|
|
2770
|
+
}), c = g(() => [
|
|
2672
2771
|
"ds-alert",
|
|
2673
|
-
`ds-alert--${
|
|
2674
|
-
`ds-alert--layout-${
|
|
2772
|
+
`ds-alert--${t.variant}`,
|
|
2773
|
+
`ds-alert--layout-${t.layout}`
|
|
2675
2774
|
]);
|
|
2676
|
-
return (
|
|
2775
|
+
return (d, v) => i.value ? f("", !0) : (a(), l("div", {
|
|
2677
2776
|
key: 0,
|
|
2678
|
-
class:
|
|
2777
|
+
class: S(c.value),
|
|
2679
2778
|
role: "alert"
|
|
2680
2779
|
}, [
|
|
2681
|
-
m("div",
|
|
2682
|
-
m("div",
|
|
2683
|
-
|
|
2684
|
-
name:
|
|
2780
|
+
m("div", ql, [
|
|
2781
|
+
m("div", Kl, [
|
|
2782
|
+
x(N, {
|
|
2783
|
+
name: r.value,
|
|
2685
2784
|
size: "lg"
|
|
2686
2785
|
}, null, 8, ["name"])
|
|
2687
2786
|
]),
|
|
2688
|
-
m("div",
|
|
2689
|
-
m("div",
|
|
2690
|
-
e.title ? (a(), l("h4",
|
|
2691
|
-
e.description ? (a(), l("p",
|
|
2787
|
+
m("div", Hl, [
|
|
2788
|
+
m("div", Wl, [
|
|
2789
|
+
e.title ? (a(), l("h4", Gl, C(e.title.includes(".") ? R(F)(e.title) : e.title), 1)) : f("", !0),
|
|
2790
|
+
e.description ? (a(), l("p", Yl, C(e.description.includes(".") ? R(F)(e.description) : e.description), 1)) : f("", !0)
|
|
2692
2791
|
]),
|
|
2693
|
-
e.actions && e.actions.length > 0 ? (a(), l("div",
|
|
2694
|
-
(a(!0), l(
|
|
2695
|
-
key:
|
|
2696
|
-
schema:
|
|
2792
|
+
e.actions && e.actions.length > 0 ? (a(), l("div", Xl, [
|
|
2793
|
+
(a(!0), l(j, null, W(e.actions, (u, h) => (a(), T(We, {
|
|
2794
|
+
key: h,
|
|
2795
|
+
schema: u,
|
|
2796
|
+
onEvent: v[0] || (v[0] = (_) => n("event", _))
|
|
2697
2797
|
}, null, 8, ["schema"]))), 128))
|
|
2698
2798
|
])) : f("", !0)
|
|
2699
2799
|
]),
|
|
@@ -2701,27 +2801,27 @@ const He = A({
|
|
|
2701
2801
|
key: 0,
|
|
2702
2802
|
type: "button",
|
|
2703
2803
|
class: "ds-alert__dismiss-btn",
|
|
2704
|
-
onClick:
|
|
2705
|
-
"aria-label":
|
|
2804
|
+
onClick: o,
|
|
2805
|
+
"aria-label": R(F)("common.close") || "Close"
|
|
2706
2806
|
}, [
|
|
2707
|
-
|
|
2807
|
+
x(N, {
|
|
2708
2808
|
name: "x",
|
|
2709
2809
|
size: "lg"
|
|
2710
2810
|
})
|
|
2711
|
-
], 8,
|
|
2811
|
+
], 8, Zl)) : f("", !0)
|
|
2712
2812
|
])
|
|
2713
2813
|
], 2));
|
|
2714
2814
|
}
|
|
2715
|
-
}),
|
|
2815
|
+
}), Ql = /* @__PURE__ */ L(Jl, [["__scopeId", "data-v-7893c0df"]]), eo = ["aria-valuenow", "aria-valuemax"], to = {
|
|
2716
2816
|
key: 0,
|
|
2717
2817
|
class: "ds-progress__header"
|
|
2718
|
-
},
|
|
2818
|
+
}, ao = {
|
|
2719
2819
|
key: 0,
|
|
2720
2820
|
class: "ds-progress__label"
|
|
2721
|
-
},
|
|
2821
|
+
}, so = {
|
|
2722
2822
|
key: 1,
|
|
2723
2823
|
class: "ds-progress__value"
|
|
2724
|
-
},
|
|
2824
|
+
}, no = { class: "ds-progress__track" }, lo = /* @__PURE__ */ A({
|
|
2725
2825
|
__name: "Progress",
|
|
2726
2826
|
props: {
|
|
2727
2827
|
value: { default: 0 },
|
|
@@ -2741,30 +2841,30 @@ const He = A({
|
|
|
2741
2841
|
"aria-valuemin": 0,
|
|
2742
2842
|
"aria-valuemax": e.max
|
|
2743
2843
|
}, [
|
|
2744
|
-
e.label || e.showValue ? (a(), l("div",
|
|
2745
|
-
e.label ? (a(), l("span",
|
|
2746
|
-
e.showValue ? (a(), l("span",
|
|
2844
|
+
e.label || e.showValue ? (a(), l("div", to, [
|
|
2845
|
+
e.label ? (a(), l("span", ao, C(e.label.includes(".") ? R(F)(e.label) : e.label), 1)) : f("", !0),
|
|
2846
|
+
e.showValue ? (a(), l("span", so, C(t.value) + "% ", 1)) : f("", !0)
|
|
2747
2847
|
])) : f("", !0),
|
|
2748
|
-
m("div",
|
|
2848
|
+
m("div", no, [
|
|
2749
2849
|
m("div", {
|
|
2750
2850
|
class: "ds-progress__bar",
|
|
2751
2851
|
style: Q({ width: `${t.value}%` })
|
|
2752
2852
|
}, null, 4)
|
|
2753
2853
|
])
|
|
2754
|
-
], 8,
|
|
2854
|
+
], 8, eo));
|
|
2755
2855
|
}
|
|
2756
|
-
}),
|
|
2856
|
+
}), oo = /* @__PURE__ */ L(lo, [["__scopeId", "data-v-d9bb4686"]]), io = {
|
|
2757
2857
|
class: "ds-breadcrumb",
|
|
2758
2858
|
"aria-label": "Breadcrumb"
|
|
2759
|
-
},
|
|
2859
|
+
}, co = { class: "ds-breadcrumb__list" }, ro = {
|
|
2760
2860
|
key: 0,
|
|
2761
2861
|
class: "ds-breadcrumb__separator",
|
|
2762
2862
|
"aria-hidden": "true"
|
|
2763
|
-
},
|
|
2863
|
+
}, uo = {
|
|
2764
2864
|
key: 1,
|
|
2765
2865
|
class: "ds-breadcrumb__current",
|
|
2766
2866
|
"aria-current": "page"
|
|
2767
|
-
},
|
|
2867
|
+
}, mo = ["href", "onClick"], fo = /* @__PURE__ */ A({
|
|
2768
2868
|
__name: "Breadcrumb",
|
|
2769
2869
|
props: {
|
|
2770
2870
|
items: { default: () => [] },
|
|
@@ -2775,24 +2875,24 @@ const He = A({
|
|
|
2775
2875
|
const t = s, n = (i) => {
|
|
2776
2876
|
i && t("navigate", i);
|
|
2777
2877
|
};
|
|
2778
|
-
return (i, o) => (a(), l("nav",
|
|
2779
|
-
m("ol",
|
|
2780
|
-
(a(!0), l(
|
|
2781
|
-
key:
|
|
2878
|
+
return (i, o) => (a(), l("nav", io, [
|
|
2879
|
+
m("ol", co, [
|
|
2880
|
+
(a(!0), l(j, null, W(e.items, (r, c) => (a(), l("li", {
|
|
2881
|
+
key: c,
|
|
2782
2882
|
class: "ds-breadcrumb__item"
|
|
2783
2883
|
}, [
|
|
2784
|
-
|
|
2785
|
-
|
|
2884
|
+
c > 0 ? (a(), l("span", ro, C(e.separator), 1)) : f("", !0),
|
|
2885
|
+
c === e.items.length - 1 ? (a(), l("span", uo, C(r.label.includes(".") ? R(F)(r.label) : r.label), 1)) : (a(), l("a", {
|
|
2786
2886
|
key: 2,
|
|
2787
|
-
href:
|
|
2887
|
+
href: r.path || "#",
|
|
2788
2888
|
class: "ds-breadcrumb__link",
|
|
2789
|
-
onClick:
|
|
2790
|
-
},
|
|
2889
|
+
onClick: X((d) => n(r.path), ["prevent"])
|
|
2890
|
+
}, C(r.label.includes(".") ? R(F)(r.label) : r.label), 9, mo))
|
|
2791
2891
|
]))), 128))
|
|
2792
2892
|
])
|
|
2793
2893
|
]));
|
|
2794
2894
|
}
|
|
2795
|
-
}),
|
|
2895
|
+
}), vo = /* @__PURE__ */ L(fo, [["__scopeId", "data-v-ea7e8d33"]]), po = ["tabindex"], bo = { class: "ds-chip__label" }, ho = ["disabled", "aria-label"], go = /* @__PURE__ */ A({
|
|
2796
2896
|
__name: "Chip",
|
|
2797
2897
|
props: {
|
|
2798
2898
|
label: {},
|
|
@@ -2802,57 +2902,57 @@ const He = A({
|
|
|
2802
2902
|
},
|
|
2803
2903
|
emits: ["close", "click"],
|
|
2804
2904
|
setup(e, { emit: s }) {
|
|
2805
|
-
const t = e, n = s, i = (
|
|
2806
|
-
|
|
2905
|
+
const t = e, n = s, i = (c) => {
|
|
2906
|
+
c.stopPropagation(), !t.disabled && n("close");
|
|
2807
2907
|
}, o = () => {
|
|
2808
2908
|
t.disabled || n("click");
|
|
2809
|
-
},
|
|
2909
|
+
}, r = g(() => [
|
|
2810
2910
|
"ds-chip",
|
|
2811
2911
|
{ "ds-chip--disabled": t.disabled },
|
|
2812
2912
|
{ "ds-chip--interactive": !t.disabled }
|
|
2813
2913
|
]);
|
|
2814
|
-
return (
|
|
2815
|
-
class:
|
|
2914
|
+
return (c, d) => (a(), l("div", {
|
|
2915
|
+
class: S(r.value),
|
|
2816
2916
|
onClick: o,
|
|
2817
2917
|
role: "button",
|
|
2818
2918
|
tabindex: e.disabled ? -1 : 0
|
|
2819
2919
|
}, [
|
|
2820
|
-
e.icon ? (a(),
|
|
2920
|
+
e.icon ? (a(), T(N, {
|
|
2821
2921
|
key: 0,
|
|
2822
2922
|
name: e.icon,
|
|
2823
2923
|
size: "xs",
|
|
2824
2924
|
class: "ds-chip__icon"
|
|
2825
2925
|
}, null, 8, ["name"])) : f("", !0),
|
|
2826
|
-
m("span",
|
|
2926
|
+
m("span", bo, C(e.label.includes(".") ? R(F)(e.label) : e.label), 1),
|
|
2827
2927
|
e.closable ? (a(), l("button", {
|
|
2828
2928
|
key: 1,
|
|
2829
2929
|
type: "button",
|
|
2830
2930
|
class: "ds-chip__close-btn",
|
|
2831
2931
|
disabled: e.disabled,
|
|
2832
2932
|
onClick: i,
|
|
2833
|
-
"aria-label":
|
|
2933
|
+
"aria-label": R(F)("common.remove") || "Remove"
|
|
2834
2934
|
}, [
|
|
2835
|
-
|
|
2935
|
+
x(N, {
|
|
2836
2936
|
name: "x",
|
|
2837
2937
|
size: "xs"
|
|
2838
2938
|
})
|
|
2839
|
-
], 8,
|
|
2840
|
-
], 10,
|
|
2939
|
+
], 8, ho)) : f("", !0)
|
|
2940
|
+
], 10, po));
|
|
2841
2941
|
}
|
|
2842
|
-
}),
|
|
2942
|
+
}), _o = /* @__PURE__ */ L(go, [["__scopeId", "data-v-a511bfd1"]]), yo = { class: "ds-command-trigger__left" }, ko = { class: "ds-command-trigger__shortcut-group" }, wo = { class: "ds-command-key" }, $o = {
|
|
2843
2943
|
key: 0,
|
|
2844
2944
|
class: "ds-command-key-separator"
|
|
2845
|
-
},
|
|
2945
|
+
}, Co = {
|
|
2846
2946
|
class: "ds-command-dialog",
|
|
2847
2947
|
role: "dialog",
|
|
2848
2948
|
"aria-modal": "true"
|
|
2849
|
-
},
|
|
2949
|
+
}, xo = { class: "ds-command-dialog__header" }, So = ["placeholder"], Io = { class: "ds-command-dialog__body" }, Bo = {
|
|
2850
2950
|
key: 0,
|
|
2851
2951
|
class: "ds-command-list"
|
|
2852
|
-
},
|
|
2952
|
+
}, Vo = ["onClick", "onMouseenter"], zo = { class: "ds-command-item__left" }, Do = { class: "ds-command-item__label" }, Ao = { class: "ds-command-item__action-hint" }, Lo = { class: "ds-command-item__action-text" }, To = {
|
|
2853
2953
|
key: 1,
|
|
2854
2954
|
class: "ds-command-empty"
|
|
2855
|
-
},
|
|
2955
|
+
}, Eo = /* @__PURE__ */ A({
|
|
2856
2956
|
__name: "CommandMenu",
|
|
2857
2957
|
props: {
|
|
2858
2958
|
items: { default: () => [] },
|
|
@@ -2862,122 +2962,122 @@ const He = A({
|
|
|
2862
2962
|
},
|
|
2863
2963
|
emits: ["select", "navigate"],
|
|
2864
2964
|
setup(e, { emit: s }) {
|
|
2865
|
-
const t = e, n = s, { locale: i } = Ne(), o = g(() => t.shortcut ? t.shortcut.split("+") : []),
|
|
2866
|
-
const
|
|
2867
|
-
return O &&
|
|
2868
|
-
}, h = (
|
|
2869
|
-
u(
|
|
2965
|
+
const t = e, n = s, { locale: i } = Ne(), o = g(() => t.shortcut ? t.shortcut.split("+") : []), r = P(!1), c = P(""), d = P(0), v = P(null), u = (w) => {
|
|
2966
|
+
const I = t.shortcut.toLowerCase().split("+"), O = I[I.length - 1], p = I.includes("ctrl") || I.includes("control"), z = I.includes("meta") || I.includes("cmd") || I.includes("⌘"), y = I.includes("alt"), $ = I.includes("shift");
|
|
2967
|
+
return O && w.key.toLowerCase() === O ? !(p && !w.ctrlKey || z && !w.metaKey || y && !w.altKey || $ && !w.shiftKey) : !1;
|
|
2968
|
+
}, h = (w) => {
|
|
2969
|
+
u(w) ? (w.preventDefault(), _()) : r.value && (w.key === "Escape" ? (w.preventDefault(), M()) : w.key === "ArrowDown" ? (w.preventDefault(), d.value = (d.value + 1) % V.value.length) : w.key === "ArrowUp" ? (w.preventDefault(), d.value = (d.value - 1 + V.value.length) % V.value.length) : w.key === "Enter" && (w.preventDefault(), V.value[d.value] && B(V.value[d.value])));
|
|
2870
2970
|
};
|
|
2871
|
-
|
|
2971
|
+
te(() => {
|
|
2872
2972
|
window.addEventListener("keydown", h);
|
|
2873
|
-
}),
|
|
2973
|
+
}), Qe(() => {
|
|
2874
2974
|
window.removeEventListener("keydown", h), document.body.style.overflow = "";
|
|
2875
2975
|
});
|
|
2876
2976
|
const _ = () => {
|
|
2877
|
-
|
|
2878
|
-
},
|
|
2879
|
-
|
|
2880
|
-
var
|
|
2881
|
-
(
|
|
2977
|
+
r.value ? M() : k();
|
|
2978
|
+
}, k = () => {
|
|
2979
|
+
r.value = !0, c.value = "", d.value = 0, document.body.style.overflow = "hidden", et(() => {
|
|
2980
|
+
var w;
|
|
2981
|
+
(w = v.value) == null || w.focus();
|
|
2882
2982
|
});
|
|
2883
|
-
},
|
|
2884
|
-
|
|
2885
|
-
}, B = (
|
|
2886
|
-
if (n("select",
|
|
2887
|
-
const
|
|
2888
|
-
n("navigate",
|
|
2983
|
+
}, M = () => {
|
|
2984
|
+
r.value = !1, document.body.style.overflow = "";
|
|
2985
|
+
}, B = (w) => {
|
|
2986
|
+
if (n("select", w), w.action.startsWith("navigate:")) {
|
|
2987
|
+
const I = w.action.replace("navigate:", "");
|
|
2988
|
+
n("navigate", I);
|
|
2889
2989
|
}
|
|
2890
|
-
|
|
2891
|
-
},
|
|
2892
|
-
const
|
|
2893
|
-
return
|
|
2894
|
-
const O =
|
|
2895
|
-
return O.includes(
|
|
2990
|
+
M();
|
|
2991
|
+
}, V = g(() => {
|
|
2992
|
+
const w = c.value.trim().toLowerCase();
|
|
2993
|
+
return w ? t.items.filter((I) => {
|
|
2994
|
+
const O = F(I.label).toLowerCase(), p = I.label.toLowerCase();
|
|
2995
|
+
return O.includes(w) || p.includes(w);
|
|
2896
2996
|
}) : t.items;
|
|
2897
2997
|
});
|
|
2898
|
-
|
|
2998
|
+
ee(V, () => {
|
|
2899
2999
|
d.value = 0;
|
|
2900
3000
|
});
|
|
2901
|
-
const
|
|
2902
|
-
|
|
3001
|
+
const H = (w) => {
|
|
3002
|
+
w.target === w.currentTarget && M();
|
|
2903
3003
|
};
|
|
2904
|
-
return (
|
|
3004
|
+
return (w, I) => (a(), l("div", null, [
|
|
2905
3005
|
m("button", {
|
|
2906
3006
|
type: "button",
|
|
2907
3007
|
class: "ds-command-trigger",
|
|
2908
|
-
onClick:
|
|
3008
|
+
onClick: k
|
|
2909
3009
|
}, [
|
|
2910
|
-
m("span",
|
|
2911
|
-
|
|
3010
|
+
m("span", yo, [
|
|
3011
|
+
x(N, {
|
|
2912
3012
|
name: "search",
|
|
2913
3013
|
size: "sm"
|
|
2914
3014
|
}),
|
|
2915
|
-
m("span", null,
|
|
3015
|
+
m("span", null, C(e.placeholder.includes(".") ? R(F)(e.placeholder) : e.placeholder), 1)
|
|
2916
3016
|
]),
|
|
2917
|
-
m("span",
|
|
2918
|
-
(a(!0), l(
|
|
2919
|
-
m("kbd",
|
|
2920
|
-
p < o.value.length - 1 ? (a(), l("span",
|
|
3017
|
+
m("span", ko, [
|
|
3018
|
+
(a(!0), l(j, null, W(o.value, (O, p) => (a(), l(j, { key: p }, [
|
|
3019
|
+
m("kbd", wo, C(O), 1),
|
|
3020
|
+
p < o.value.length - 1 ? (a(), l("span", $o, "+")) : f("", !0)
|
|
2921
3021
|
], 64))), 128))
|
|
2922
3022
|
])
|
|
2923
3023
|
]),
|
|
2924
|
-
|
|
2925
|
-
default:
|
|
2926
|
-
|
|
3024
|
+
x(ae, { name: "ds-command-fade" }, {
|
|
3025
|
+
default: U(() => [
|
|
3026
|
+
r.value ? (a(), l("div", {
|
|
2927
3027
|
key: 0,
|
|
2928
3028
|
class: "ds-command-overlay",
|
|
2929
|
-
onClick:
|
|
3029
|
+
onClick: H
|
|
2930
3030
|
}, [
|
|
2931
|
-
m("div",
|
|
2932
|
-
m("div",
|
|
2933
|
-
|
|
3031
|
+
m("div", Co, [
|
|
3032
|
+
m("div", xo, [
|
|
3033
|
+
x(N, {
|
|
2934
3034
|
name: "search",
|
|
2935
3035
|
size: "md",
|
|
2936
3036
|
class: "ds-command-dialog__search-icon"
|
|
2937
3037
|
}),
|
|
2938
|
-
|
|
3038
|
+
ue(m("input", {
|
|
2939
3039
|
ref_key: "searchInput",
|
|
2940
3040
|
ref: v,
|
|
2941
3041
|
type: "text",
|
|
2942
|
-
"onUpdate:modelValue":
|
|
3042
|
+
"onUpdate:modelValue": I[0] || (I[0] = (O) => c.value = O),
|
|
2943
3043
|
class: "ds-command-dialog__input",
|
|
2944
|
-
placeholder: e.placeholder.includes(".") ?
|
|
3044
|
+
placeholder: e.placeholder.includes(".") ? R(F)(e.placeholder) : e.placeholder,
|
|
2945
3045
|
"aria-label": "Search commands"
|
|
2946
|
-
}, null, 8,
|
|
2947
|
-
[
|
|
3046
|
+
}, null, 8, So), [
|
|
3047
|
+
[Me, c.value]
|
|
2948
3048
|
]),
|
|
2949
|
-
|
|
3049
|
+
I[1] || (I[1] = m("kbd", { class: "ds-command-dialog__escape-kbd" }, "ESC", -1))
|
|
2950
3050
|
]),
|
|
2951
|
-
m("div",
|
|
2952
|
-
|
|
2953
|
-
(a(!0), l(
|
|
3051
|
+
m("div", Io, [
|
|
3052
|
+
V.value.length > 0 ? (a(), l("ul", Bo, [
|
|
3053
|
+
(a(!0), l(j, null, W(V.value, (O, p) => (a(), l("li", {
|
|
2954
3054
|
key: O.id,
|
|
2955
|
-
class:
|
|
3055
|
+
class: S([
|
|
2956
3056
|
"ds-command-item",
|
|
2957
3057
|
{ "ds-command-item--active": p === d.value }
|
|
2958
3058
|
]),
|
|
2959
|
-
onClick: (
|
|
2960
|
-
onMouseenter: (
|
|
3059
|
+
onClick: (z) => B(O),
|
|
3060
|
+
onMouseenter: (z) => d.value = p
|
|
2961
3061
|
}, [
|
|
2962
|
-
m("div",
|
|
2963
|
-
O.icon ? (a(),
|
|
3062
|
+
m("div", zo, [
|
|
3063
|
+
O.icon ? (a(), T(N, {
|
|
2964
3064
|
key: 0,
|
|
2965
3065
|
name: O.icon,
|
|
2966
3066
|
size: "sm",
|
|
2967
3067
|
class: "ds-command-item__icon"
|
|
2968
3068
|
}, null, 8, ["name"])) : f("", !0),
|
|
2969
|
-
m("span",
|
|
3069
|
+
m("span", Do, C(O.label.includes(".") ? R(F)(O.label) : O.label), 1)
|
|
2970
3070
|
]),
|
|
2971
|
-
m("span",
|
|
2972
|
-
m("span",
|
|
2973
|
-
|
|
2974
|
-
name:
|
|
3071
|
+
m("span", Ao, [
|
|
3072
|
+
m("span", Lo, C(O.action.startsWith("navigate:") ? R(i) === "fa" ? "انتقال" : "Go" : R(i) === "fa" ? "اجرا" : "Run"), 1),
|
|
3073
|
+
x(N, {
|
|
3074
|
+
name: R(i) === "fa" ? "arrow-left" : "arrow-right",
|
|
2975
3075
|
size: "xs",
|
|
2976
3076
|
class: "ds-command-item__action-icon"
|
|
2977
3077
|
}, null, 8, ["name"])
|
|
2978
3078
|
])
|
|
2979
|
-
], 42,
|
|
2980
|
-
])) : (a(), l("div",
|
|
3079
|
+
], 42, Vo))), 128))
|
|
3080
|
+
])) : (a(), l("div", To, C(R(F)("common.no_results") || "نتیجهای یافت نشد (No results found)"), 1))
|
|
2981
3081
|
])
|
|
2982
3082
|
])
|
|
2983
3083
|
])) : f("", !0)
|
|
@@ -2986,7 +3086,7 @@ const He = A({
|
|
|
2986
3086
|
})
|
|
2987
3087
|
]));
|
|
2988
3088
|
}
|
|
2989
|
-
}),
|
|
3089
|
+
}), Mo = /* @__PURE__ */ L(Eo, [["__scopeId", "data-v-0ca8a2e5"]]), Po = { class: "ds-user-card__info" }, Oo = /* @__PURE__ */ A({
|
|
2990
3090
|
__name: "UserCard",
|
|
2991
3091
|
props: {
|
|
2992
3092
|
name: { default: "User" },
|
|
@@ -2998,51 +3098,51 @@ const He = A({
|
|
|
2998
3098
|
},
|
|
2999
3099
|
setup(e) {
|
|
3000
3100
|
return (s, t) => (a(), l("div", {
|
|
3001
|
-
class:
|
|
3101
|
+
class: S(["ds-user-card", { "ds-user-card--collapsed": e.collapsed }])
|
|
3002
3102
|
}, [
|
|
3003
|
-
e.avatar ? (a(),
|
|
3103
|
+
e.avatar ? (a(), T(de, {
|
|
3004
3104
|
key: 0,
|
|
3005
3105
|
src: e.avatar,
|
|
3006
3106
|
size: "sm",
|
|
3007
3107
|
square: e.squareAvatar
|
|
3008
|
-
}, null, 8, ["src", "square"])) : (a(),
|
|
3108
|
+
}, null, 8, ["src", "square"])) : (a(), T(de, {
|
|
3009
3109
|
key: 1,
|
|
3010
3110
|
name: e.name,
|
|
3011
3111
|
size: "sm",
|
|
3012
3112
|
square: e.squareAvatar
|
|
3013
3113
|
}, null, 8, ["name", "square"])),
|
|
3014
|
-
|
|
3015
|
-
|
|
3114
|
+
ue(m("div", Po, [
|
|
3115
|
+
x(G, {
|
|
3016
3116
|
variant: "body-sm",
|
|
3017
3117
|
class: "ds-user-card__name"
|
|
3018
3118
|
}, {
|
|
3019
|
-
default:
|
|
3020
|
-
|
|
3119
|
+
default: U(() => [
|
|
3120
|
+
Y(C(e.name), 1)
|
|
3021
3121
|
]),
|
|
3022
3122
|
_: 1
|
|
3023
3123
|
}),
|
|
3024
|
-
|
|
3124
|
+
x(G, {
|
|
3025
3125
|
variant: "caption",
|
|
3026
3126
|
class: "ds-user-card__role"
|
|
3027
3127
|
}, {
|
|
3028
|
-
default:
|
|
3029
|
-
|
|
3128
|
+
default: U(() => [
|
|
3129
|
+
Y(C(e.role), 1)
|
|
3030
3130
|
]),
|
|
3031
3131
|
_: 1
|
|
3032
3132
|
})
|
|
3033
3133
|
], 512), [
|
|
3034
|
-
[
|
|
3134
|
+
[Ae, !e.collapsed]
|
|
3035
3135
|
]),
|
|
3036
|
-
|
|
3136
|
+
ue(x(N, {
|
|
3037
3137
|
name: e.icon,
|
|
3038
3138
|
size: "sm",
|
|
3039
3139
|
class: "ds-user-card__action"
|
|
3040
3140
|
}, null, 8, ["name"]), [
|
|
3041
|
-
[
|
|
3141
|
+
[Ae, !e.collapsed]
|
|
3042
3142
|
])
|
|
3043
3143
|
], 2));
|
|
3044
3144
|
}
|
|
3045
|
-
}),
|
|
3145
|
+
}), Ge = /* @__PURE__ */ L(Oo, [["__scopeId", "data-v-29686b7a"]]), Ro = ["width", "height"], No = /* @__PURE__ */ A({
|
|
3046
3146
|
__name: "Logo",
|
|
3047
3147
|
props: {
|
|
3048
3148
|
size: { default: 24 }
|
|
@@ -3070,15 +3170,15 @@ const He = A({
|
|
|
3070
3170
|
d: "M305 0C329.853 4.18769e-06 350 20.1472 350 45V305C350 329.853 329.853 350 305 350H45C20.1472 350 1.36923e-06 329.853 0 305V45C4.18824e-06 20.1472 20.1472 1.36905e-06 45 0H305ZM229.557 102C229.438 102 229.32 102.001 229.201 102.002C228.932 102.003 228.663 102.005 228.395 102.009C228.071 102.014 227.748 102.023 227.425 102.032C227.368 102.034 227.312 102.034 227.256 102.036C226.948 102.046 226.64 102.058 226.333 102.071C226.251 102.075 226.168 102.077 226.086 102.081C225.723 102.098 225.36 102.118 224.998 102.141C224.986 102.141 224.974 102.142 224.962 102.143C202.145 103.552 182.149 115.382 169.675 132.932C169.679 132.925 169.683 132.919 169.687 132.913C146.755 157.756 135.638 168.421 105.954 146.218C105.799 146.1 105.644 145.982 105.487 145.866C105.314 145.735 105.137 145.605 104.962 145.472C104.986 145.493 105.011 145.516 105.035 145.537C99.0239 141.239 91.6619 138.709 83.709 138.709C63.4351 138.709 47 155.145 47 175.419C47 195.693 63.4352 212.128 83.709 212.128C91.6626 212.128 99.0246 209.597 105.036 205.299C105.011 205.321 104.987 205.344 104.962 205.366C105.148 205.224 105.336 205.085 105.521 204.945C105.652 204.848 105.782 204.75 105.912 204.651C135.627 182.407 146.744 193.071 169.687 217.925C169.646 217.855 169.605 217.785 169.564 217.716C182.857 236.542 204.783 248.838 229.581 248.838C270.129 248.838 303 215.967 303 175.419C303 136.241 272.312 104.23 233.663 102.112C233.656 102.112 233.649 102.112 233.643 102.111C232.784 102.065 231.921 102.033 231.055 102.016C230.981 102.014 230.908 102.013 230.834 102.012C230.417 102.005 230 102 229.581 102H229.557Z",
|
|
3071
3171
|
fill: "currentColor"
|
|
3072
3172
|
}, null, -1)
|
|
3073
|
-
])], 8,
|
|
3173
|
+
])], 8, Ro));
|
|
3074
3174
|
}
|
|
3075
|
-
}),
|
|
3175
|
+
}), Fo = /* @__PURE__ */ L(No, [["__scopeId", "data-v-7f65507a"]]), Uo = { class: "ds-sidebar__header" }, jo = { class: "ds-sidebar__nav" }, qo = { class: "ds-sidebar__footer" }, Ko = {
|
|
3076
3176
|
key: 0,
|
|
3077
3177
|
class: "ds-sidebar__divider-line"
|
|
3078
|
-
},
|
|
3178
|
+
}, Ho = {
|
|
3079
3179
|
key: 1,
|
|
3080
3180
|
class: "ds-sidebar__child"
|
|
3081
|
-
},
|
|
3181
|
+
}, Wo = { class: "ds-sidebar__child-dropdown" }, Go = { class: "ds-sidebar__child-items" }, Yo = ["onClick"], Xo = /* @__PURE__ */ A({
|
|
3082
3182
|
__name: "SidebarNav",
|
|
3083
3183
|
props: {
|
|
3084
3184
|
navigation: { default: () => [] },
|
|
@@ -3093,16 +3193,16 @@ const He = A({
|
|
|
3093
3193
|
},
|
|
3094
3194
|
emits: ["navigate"],
|
|
3095
3195
|
setup(e, { emit: s }) {
|
|
3096
|
-
const t = e, n = s, i =
|
|
3097
|
-
|
|
3098
|
-
var
|
|
3196
|
+
const t = e, n = s, i = P(""), o = P(!1);
|
|
3197
|
+
ee(() => t.activeId, (_) => {
|
|
3198
|
+
var k, M;
|
|
3099
3199
|
if (_) {
|
|
3100
3200
|
for (const B of t.navigation) {
|
|
3101
3201
|
if (B.id === _) {
|
|
3102
3202
|
i.value = B.id, o.value = !!(B.children && B.children.length > 0);
|
|
3103
3203
|
return;
|
|
3104
3204
|
}
|
|
3105
|
-
if ((
|
|
3205
|
+
if ((k = B.children) != null && k.some((V) => V.id === _)) {
|
|
3106
3206
|
i.value = B.id, o.value = !0;
|
|
3107
3207
|
return;
|
|
3108
3208
|
}
|
|
@@ -3112,100 +3212,100 @@ const He = A({
|
|
|
3112
3212
|
i.value = B.id, o.value = !!(B.children && B.children.length > 0);
|
|
3113
3213
|
return;
|
|
3114
3214
|
}
|
|
3115
|
-
if ((
|
|
3215
|
+
if ((M = B.children) != null && M.some((V) => V.id === _)) {
|
|
3116
3216
|
i.value = B.id, o.value = !0;
|
|
3117
3217
|
return;
|
|
3118
3218
|
}
|
|
3119
3219
|
}
|
|
3120
3220
|
}
|
|
3121
3221
|
}, { immediate: !0 });
|
|
3122
|
-
const
|
|
3123
|
-
function
|
|
3124
|
-
if (t.navigation.some((
|
|
3222
|
+
const r = g(() => i.value && (t.navigation.find((_) => _.id === i.value) || t.footer.find((_) => _.id === i.value)) || null);
|
|
3223
|
+
function c(_) {
|
|
3224
|
+
if (t.navigation.some((M) => M.id === _) || t.footer.some((M) => M.id === _)) {
|
|
3125
3225
|
i.value = _;
|
|
3126
|
-
const
|
|
3127
|
-
o.value = !!(
|
|
3226
|
+
const M = [...t.navigation, ...t.footer].find((B) => B.id === _);
|
|
3227
|
+
o.value = !!(M != null && M.children && M.children.length > 0);
|
|
3128
3228
|
}
|
|
3129
3229
|
n("navigate", _);
|
|
3130
3230
|
}
|
|
3131
3231
|
function d(_) {
|
|
3132
|
-
|
|
3232
|
+
c(_.value);
|
|
3133
3233
|
}
|
|
3134
3234
|
function v() {
|
|
3135
3235
|
o.value = !o.value;
|
|
3136
3236
|
}
|
|
3137
3237
|
function u(_) {
|
|
3138
|
-
var
|
|
3139
|
-
return !!(_.id === t.activeId || (
|
|
3238
|
+
var k;
|
|
3239
|
+
return !!(_.id === t.activeId || (k = _.children) != null && k.some((M) => M.id === t.activeId));
|
|
3140
3240
|
}
|
|
3141
3241
|
const h = g(() => (t.navigation || []).map((_) => ({
|
|
3142
3242
|
id: _.id,
|
|
3143
3243
|
label: _.label,
|
|
3144
3244
|
value: _.id
|
|
3145
3245
|
})));
|
|
3146
|
-
return (_,
|
|
3147
|
-
var
|
|
3246
|
+
return (_, k) => {
|
|
3247
|
+
var M, B, V, H;
|
|
3148
3248
|
return a(), l("div", {
|
|
3149
|
-
class:
|
|
3249
|
+
class: S(["ds-sidebar-container", { "ds-sidebar-container--child-closed": !o.value }])
|
|
3150
3250
|
}, [
|
|
3151
3251
|
m("aside", {
|
|
3152
|
-
class:
|
|
3252
|
+
class: S(["ds-sidebar", { "ds-sidebar--collapsed": e.collapsed }])
|
|
3153
3253
|
}, [
|
|
3154
|
-
m("div",
|
|
3155
|
-
e.brand.icon ? (a(),
|
|
3254
|
+
m("div", Uo, [
|
|
3255
|
+
e.brand.icon ? (a(), T(Fo, {
|
|
3156
3256
|
key: 0,
|
|
3157
3257
|
size: 24,
|
|
3158
3258
|
class: "ds-sidebar__logo-icon"
|
|
3159
3259
|
})) : f("", !0),
|
|
3160
|
-
e.brand.title ? (a(),
|
|
3260
|
+
e.brand.title ? (a(), T(G, {
|
|
3161
3261
|
key: 1,
|
|
3162
3262
|
variant: "body-md",
|
|
3163
3263
|
class: "ds-sidebar__brand-title"
|
|
3164
3264
|
}, {
|
|
3165
|
-
default:
|
|
3166
|
-
|
|
3265
|
+
default: U(() => [
|
|
3266
|
+
Y(C(e.brand.title), 1)
|
|
3167
3267
|
]),
|
|
3168
3268
|
_: 1
|
|
3169
3269
|
})) : f("", !0)
|
|
3170
3270
|
]),
|
|
3171
|
-
m("nav",
|
|
3172
|
-
(a(!0), l(
|
|
3173
|
-
key:
|
|
3174
|
-
text:
|
|
3271
|
+
m("nav", jo, [
|
|
3272
|
+
(a(!0), l(j, null, W(e.navigation, (w) => (a(), T(xe, {
|
|
3273
|
+
key: w.id,
|
|
3274
|
+
text: w.label,
|
|
3175
3275
|
position: "end"
|
|
3176
3276
|
}, {
|
|
3177
|
-
default:
|
|
3178
|
-
|
|
3179
|
-
label:
|
|
3180
|
-
icon:
|
|
3181
|
-
active: u(
|
|
3182
|
-
onClick: (
|
|
3277
|
+
default: U(() => [
|
|
3278
|
+
x(fe, {
|
|
3279
|
+
label: w.label,
|
|
3280
|
+
icon: w.icon || "menu",
|
|
3281
|
+
active: u(w),
|
|
3282
|
+
onClick: (I) => c(w.id)
|
|
3183
3283
|
}, null, 8, ["label", "icon", "active", "onClick"])
|
|
3184
3284
|
]),
|
|
3185
3285
|
_: 2
|
|
3186
3286
|
}, 1032, ["text"]))), 128))
|
|
3187
3287
|
]),
|
|
3188
|
-
m("div",
|
|
3189
|
-
(a(!0), l(
|
|
3190
|
-
key:
|
|
3191
|
-
text:
|
|
3288
|
+
m("div", qo, [
|
|
3289
|
+
(a(!0), l(j, null, W(e.footer, (w) => (a(), T(xe, {
|
|
3290
|
+
key: w.id,
|
|
3291
|
+
text: w.label,
|
|
3192
3292
|
position: "end"
|
|
3193
3293
|
}, {
|
|
3194
|
-
default:
|
|
3195
|
-
|
|
3196
|
-
label:
|
|
3197
|
-
icon:
|
|
3198
|
-
active: u(
|
|
3199
|
-
onClick: (
|
|
3294
|
+
default: U(() => [
|
|
3295
|
+
x(fe, {
|
|
3296
|
+
label: w.label,
|
|
3297
|
+
icon: w.icon || "settings",
|
|
3298
|
+
active: u(w),
|
|
3299
|
+
onClick: (I) => c(w.id)
|
|
3200
3300
|
}, null, 8, ["label", "icon", "active", "onClick"])
|
|
3201
3301
|
]),
|
|
3202
3302
|
_: 2
|
|
3203
3303
|
}, 1032, ["text"]))), 128)),
|
|
3204
|
-
(
|
|
3304
|
+
(M = e.profile) != null && M.enabled ? (a(), T(Fe, {
|
|
3205
3305
|
key: 0,
|
|
3206
3306
|
class: "ds-sidebar__divider"
|
|
3207
3307
|
})) : f("", !0),
|
|
3208
|
-
(B = e.profile) != null && B.enabled ? (a(),
|
|
3308
|
+
(B = e.profile) != null && B.enabled ? (a(), T(Ge, {
|
|
3209
3309
|
key: 1,
|
|
3210
3310
|
name: e.userName,
|
|
3211
3311
|
role: e.userRole,
|
|
@@ -3213,7 +3313,7 @@ const He = A({
|
|
|
3213
3313
|
collapsed: !0,
|
|
3214
3314
|
icon: "more"
|
|
3215
3315
|
}, null, 8, ["name", "role", "avatar"])) : f("", !0),
|
|
3216
|
-
|
|
3316
|
+
x(qe, {
|
|
3217
3317
|
icon: o.value ? "minimize-2" : "maximize-2",
|
|
3218
3318
|
variant: "ghost",
|
|
3219
3319
|
class: "ds-sidebar__child-toggle",
|
|
@@ -3221,43 +3321,43 @@ const He = A({
|
|
|
3221
3321
|
}, null, 8, ["icon"])
|
|
3222
3322
|
])
|
|
3223
3323
|
], 2),
|
|
3224
|
-
o.value ? (a(), l("div",
|
|
3225
|
-
o.value ? (a(), l("div",
|
|
3226
|
-
m("div",
|
|
3227
|
-
|
|
3324
|
+
o.value ? (a(), l("div", Ko)) : f("", !0),
|
|
3325
|
+
o.value ? (a(), l("div", Ho, [
|
|
3326
|
+
m("div", Wo, [
|
|
3327
|
+
x(Be, {
|
|
3228
3328
|
items: h.value,
|
|
3229
|
-
label: ((
|
|
3329
|
+
label: ((V = r.value) == null ? void 0 : V.label) || "",
|
|
3230
3330
|
icon: "chevron-down",
|
|
3231
3331
|
onSelect: d
|
|
3232
3332
|
}, null, 8, ["items", "label"])
|
|
3233
3333
|
]),
|
|
3234
|
-
m("div",
|
|
3235
|
-
(a(!0), l(
|
|
3236
|
-
key:
|
|
3237
|
-
class:
|
|
3238
|
-
onClick: (
|
|
3334
|
+
m("div", Go, [
|
|
3335
|
+
(a(!0), l(j, null, W((H = r.value) == null ? void 0 : H.children, (w) => (a(), l("div", {
|
|
3336
|
+
key: w.id,
|
|
3337
|
+
class: S(["ds-sidebar__child-item", { "ds-sidebar__child-item--active": e.activeId === w.id }]),
|
|
3338
|
+
onClick: (I) => c(w.id)
|
|
3239
3339
|
}, [
|
|
3240
|
-
|
|
3241
|
-
name:
|
|
3340
|
+
x(N, {
|
|
3341
|
+
name: w.icon || "menu",
|
|
3242
3342
|
size: "sm",
|
|
3243
3343
|
class: "ds-sidebar__child-item-icon"
|
|
3244
3344
|
}, null, 8, ["name"]),
|
|
3245
|
-
|
|
3345
|
+
x(G, {
|
|
3246
3346
|
variant: "body-md",
|
|
3247
3347
|
class: "ds-sidebar__child-item-label"
|
|
3248
3348
|
}, {
|
|
3249
|
-
default:
|
|
3250
|
-
|
|
3349
|
+
default: U(() => [
|
|
3350
|
+
Y(C(w.label), 1)
|
|
3251
3351
|
]),
|
|
3252
3352
|
_: 2
|
|
3253
3353
|
}, 1024)
|
|
3254
|
-
], 10,
|
|
3354
|
+
], 10, Yo))), 128))
|
|
3255
3355
|
])
|
|
3256
3356
|
])) : f("", !0)
|
|
3257
3357
|
], 2);
|
|
3258
3358
|
};
|
|
3259
3359
|
}
|
|
3260
|
-
}),
|
|
3360
|
+
}), Zo = /* @__PURE__ */ L(Xo, [["__scopeId", "data-v-48184815"]]), Jo = ["aria-checked", "onClick"], Qo = { key: 1 }, ei = /* @__PURE__ */ A({
|
|
3261
3361
|
__name: "ActionToggle",
|
|
3262
3362
|
props: {
|
|
3263
3363
|
options: {},
|
|
@@ -3265,41 +3365,41 @@ const He = A({
|
|
|
3265
3365
|
},
|
|
3266
3366
|
emits: ["update:modelValue"],
|
|
3267
3367
|
setup(e, { emit: s }) {
|
|
3268
|
-
|
|
3269
|
-
v142bb2c5:
|
|
3270
|
-
bdc18452:
|
|
3368
|
+
tt((r) => ({
|
|
3369
|
+
v142bb2c5: r.options.length,
|
|
3370
|
+
bdc18452: r.modelValue
|
|
3271
3371
|
}));
|
|
3272
3372
|
const t = e, n = s;
|
|
3273
|
-
function i(
|
|
3274
|
-
n("update:modelValue",
|
|
3373
|
+
function i(r) {
|
|
3374
|
+
n("update:modelValue", r);
|
|
3275
3375
|
}
|
|
3276
|
-
function o(
|
|
3277
|
-
|
|
3376
|
+
function o(r) {
|
|
3377
|
+
r.key === "ArrowRight" || r.key === "ArrowDown" ? (r.preventDefault(), i((t.modelValue + 1) % t.options.length)) : (r.key === "ArrowLeft" || r.key === "ArrowUp") && (r.preventDefault(), i((t.modelValue - 1 + t.options.length) % t.options.length));
|
|
3278
3378
|
}
|
|
3279
|
-
return (
|
|
3379
|
+
return (r, c) => (a(), l("div", {
|
|
3280
3380
|
class: "ds-action-toggle",
|
|
3281
3381
|
tabindex: "0",
|
|
3282
3382
|
role: "radiogroup",
|
|
3283
3383
|
onKeydown: o
|
|
3284
3384
|
}, [
|
|
3285
|
-
|
|
3286
|
-
(a(!0), l(
|
|
3385
|
+
c[0] || (c[0] = m("div", { class: "ds-action-toggle__thumb" }, null, -1)),
|
|
3386
|
+
(a(!0), l(j, null, W(e.options, (d, v) => (a(), l("div", {
|
|
3287
3387
|
key: v,
|
|
3288
|
-
class:
|
|
3388
|
+
class: S(["ds-action-toggle__option", { "ds-action-toggle__option--active": e.modelValue === v }]),
|
|
3289
3389
|
role: "radio",
|
|
3290
3390
|
"aria-checked": e.modelValue === v,
|
|
3291
|
-
onClick:
|
|
3391
|
+
onClick: X((u) => i(v), ["stop"])
|
|
3292
3392
|
}, [
|
|
3293
|
-
d.icon ? (a(),
|
|
3393
|
+
d.icon ? (a(), T(N, {
|
|
3294
3394
|
key: 0,
|
|
3295
3395
|
name: d.icon,
|
|
3296
3396
|
size: "md"
|
|
3297
3397
|
}, null, 8, ["name"])) : f("", !0),
|
|
3298
|
-
d.label ? (a(), l("span",
|
|
3299
|
-
], 10,
|
|
3398
|
+
d.label ? (a(), l("span", Qo, C(d.label), 1)) : f("", !0)
|
|
3399
|
+
], 10, Jo))), 128))
|
|
3300
3400
|
], 32));
|
|
3301
3401
|
}
|
|
3302
|
-
}),
|
|
3402
|
+
}), ti = /* @__PURE__ */ L(ei, [["__scopeId", "data-v-30aa8411"]]), ai = ["disabled"], si = { key: 1 }, ni = /* @__PURE__ */ A({
|
|
3303
3403
|
__name: "ToggleButton",
|
|
3304
3404
|
props: {
|
|
3305
3405
|
offLabel: {},
|
|
@@ -3312,7 +3412,7 @@ const He = A({
|
|
|
3312
3412
|
},
|
|
3313
3413
|
emits: ["update:modelValue"],
|
|
3314
3414
|
setup(e, { emit: s }) {
|
|
3315
|
-
const t = e, n = s, i = g(() => t.modelValue ? t.onLabel : t.offLabel), o = g(() => t.modelValue ? t.onIcon : t.offIcon),
|
|
3415
|
+
const t = e, n = s, i = g(() => t.modelValue ? t.onLabel : t.offLabel), o = g(() => t.modelValue ? t.onIcon : t.offIcon), r = g(() => {
|
|
3316
3416
|
switch (t.size) {
|
|
3317
3417
|
case "sm":
|
|
3318
3418
|
return "sm";
|
|
@@ -3323,7 +3423,7 @@ const He = A({
|
|
|
3323
3423
|
default:
|
|
3324
3424
|
return "md";
|
|
3325
3425
|
}
|
|
3326
|
-
}),
|
|
3426
|
+
}), c = g(() => [
|
|
3327
3427
|
"ds-toggle-btn",
|
|
3328
3428
|
`ds-toggle-btn--${t.size}`,
|
|
3329
3429
|
{
|
|
@@ -3336,28 +3436,28 @@ const He = A({
|
|
|
3336
3436
|
t.disabled || n("update:modelValue", !t.modelValue);
|
|
3337
3437
|
}
|
|
3338
3438
|
return (v, u) => (a(), l("button", {
|
|
3339
|
-
class:
|
|
3439
|
+
class: S(c.value),
|
|
3340
3440
|
disabled: e.disabled,
|
|
3341
3441
|
onClick: d
|
|
3342
3442
|
}, [
|
|
3343
|
-
o.value ? (a(),
|
|
3443
|
+
o.value ? (a(), T(N, {
|
|
3344
3444
|
key: 0,
|
|
3345
3445
|
name: o.value,
|
|
3346
|
-
size:
|
|
3446
|
+
size: r.value
|
|
3347
3447
|
}, null, 8, ["name", "size"])) : f("", !0),
|
|
3348
|
-
i.value ? (a(), l("span",
|
|
3349
|
-
], 10,
|
|
3448
|
+
i.value ? (a(), l("span", si, C(i.value), 1)) : f("", !0)
|
|
3449
|
+
], 10, ai));
|
|
3350
3450
|
}
|
|
3351
|
-
}),
|
|
3451
|
+
}), li = /* @__PURE__ */ L(ni, [["__scopeId", "data-v-41d7a903"]]), oi = ["aria-label", "onClick"], ii = { key: 1 }, ci = ["aria-label", "aria-pressed"], ri = ["src", "alt"], di = { class: "ds-swipe-item__body" }, ui = {
|
|
3352
3452
|
key: 0,
|
|
3353
3453
|
class: "ds-swipe-item__title"
|
|
3354
|
-
},
|
|
3454
|
+
}, mi = {
|
|
3355
3455
|
key: 1,
|
|
3356
3456
|
class: "ds-swipe-item__description"
|
|
3357
|
-
},
|
|
3457
|
+
}, fi = {
|
|
3358
3458
|
key: 2,
|
|
3359
3459
|
class: "ds-swipe-item__timestamp"
|
|
3360
|
-
}, ye = 92,
|
|
3460
|
+
}, ye = 92, vi = 0.3, pi = /* @__PURE__ */ A({
|
|
3361
3461
|
__name: "SwipeItem",
|
|
3362
3462
|
props: {
|
|
3363
3463
|
id: {},
|
|
@@ -3374,70 +3474,70 @@ const He = A({
|
|
|
3374
3474
|
},
|
|
3375
3475
|
emits: ["action"],
|
|
3376
3476
|
setup(e, { emit: s }) {
|
|
3377
|
-
const t = e, n = s, i =
|
|
3378
|
-
() =>
|
|
3379
|
-
), u = g(() =>
|
|
3477
|
+
const t = e, n = s, i = P(0), o = P(0), r = P(!1), c = P(!1), d = P(0), v = g(
|
|
3478
|
+
() => c.value ? 0 : Math.min(0, i.value + o.value)
|
|
3479
|
+
), u = g(() => c.value ? { transform: "translateX(-100%)" } : {
|
|
3380
3480
|
transform: `translateX(${v.value}px)`,
|
|
3381
|
-
transition:
|
|
3481
|
+
transition: r.value ? "none" : void 0
|
|
3382
3482
|
}), h = g(
|
|
3383
|
-
() =>
|
|
3384
|
-
), _ = g(() => `${t.actions.length * ye}px`),
|
|
3483
|
+
() => c.value ? { maxHeight: "0", marginBottom: "0", overflow: "hidden", pointerEvents: "none", opacity: "0" } : {}
|
|
3484
|
+
), _ = g(() => `${t.actions.length * ye}px`), k = {
|
|
3385
3485
|
default: { bg: "var(--alert-default-bg)", fg: "var(--alert-default-icon)" },
|
|
3386
3486
|
primary: { bg: "var(--color-primary-bg)", fg: "var(--color-primary)" },
|
|
3387
3487
|
secondary: { bg: "var(--alert-secondary-bg)", fg: "var(--alert-secondary-icon)" },
|
|
3388
3488
|
success: { bg: "var(--alert-success-bg)", fg: "var(--alert-success-icon)" },
|
|
3389
3489
|
warning: { bg: "var(--alert-warning-bg)", fg: "var(--alert-warning-icon)" },
|
|
3390
3490
|
danger: { bg: "var(--alert-danger-bg)", fg: "var(--alert-danger-icon)" }
|
|
3391
|
-
},
|
|
3392
|
-
function
|
|
3393
|
-
t.disabled ||
|
|
3394
|
-
}
|
|
3395
|
-
function
|
|
3396
|
-
!
|
|
3397
|
-
}
|
|
3398
|
-
function
|
|
3399
|
-
var
|
|
3400
|
-
if (!
|
|
3401
|
-
|
|
3402
|
-
const b = Math.abs(v.value), D = ((
|
|
3403
|
-
if (b > D *
|
|
3491
|
+
}, M = g(() => k[t.variant].bg), B = g(() => k[t.variant].fg), V = g(() => k[t.variant].fg);
|
|
3492
|
+
function H($) {
|
|
3493
|
+
t.disabled || c.value || (r.value = !0, d.value = $.clientX, o.value = 0, $.currentTarget.setPointerCapture($.pointerId));
|
|
3494
|
+
}
|
|
3495
|
+
function w($) {
|
|
3496
|
+
!r.value || t.disabled || (o.value = $.clientX - d.value);
|
|
3497
|
+
}
|
|
3498
|
+
function I($) {
|
|
3499
|
+
var q;
|
|
3500
|
+
if (!r.value) return;
|
|
3501
|
+
r.value = !1, $.currentTarget.releasePointerCapture($.pointerId);
|
|
3502
|
+
const b = Math.abs(v.value), D = ((q = $.currentTarget.parentElement) == null ? void 0 : q.offsetWidth) || 300;
|
|
3503
|
+
if (b > D * vi) {
|
|
3404
3504
|
i.value = -D, setTimeout(() => {
|
|
3405
|
-
|
|
3505
|
+
c.value = !0, setTimeout(() => n("action", t.id, "__delete"), 300);
|
|
3406
3506
|
}, 150);
|
|
3407
3507
|
return;
|
|
3408
3508
|
}
|
|
3409
3509
|
i.value = b > ye / 2 ? -ye * t.actions.length : 0, o.value = 0;
|
|
3410
3510
|
}
|
|
3411
3511
|
function O() {
|
|
3412
|
-
|
|
3512
|
+
r.value = !1, i.value = 0, o.value = 0;
|
|
3413
3513
|
}
|
|
3414
3514
|
function p($) {
|
|
3415
|
-
t.disabled || (($.key === "Delete" || $.key === "Backspace") &&
|
|
3515
|
+
t.disabled || (($.key === "Delete" || $.key === "Backspace") && z(), $.key === "Escape" && (i.value = 0, o.value = 0));
|
|
3416
3516
|
}
|
|
3417
|
-
function
|
|
3418
|
-
|
|
3517
|
+
function z() {
|
|
3518
|
+
c.value = !0, setTimeout(() => n("action", t.id, "__delete"), 300);
|
|
3419
3519
|
}
|
|
3420
3520
|
function y($) {
|
|
3421
3521
|
if ($ === "__delete" || $ === "delete") {
|
|
3422
|
-
|
|
3522
|
+
z();
|
|
3423
3523
|
return;
|
|
3424
3524
|
}
|
|
3425
3525
|
i.value = 0, n("action", t.id, $);
|
|
3426
3526
|
}
|
|
3427
3527
|
return ($, b) => (a(), l("div", {
|
|
3428
|
-
class:
|
|
3528
|
+
class: S([
|
|
3429
3529
|
"ds-swipe-item",
|
|
3430
3530
|
`ds-swipe-item--${e.variant}`,
|
|
3431
3531
|
e.unread && !e.read && "ds-swipe-item--unread",
|
|
3432
3532
|
e.read && "ds-swipe-item--read",
|
|
3433
|
-
|
|
3533
|
+
c.value && "ds-swipe-item--deleting"
|
|
3434
3534
|
]),
|
|
3435
3535
|
style: Q(h.value)
|
|
3436
3536
|
}, [
|
|
3437
3537
|
e.unread ? (a(), l("span", {
|
|
3438
3538
|
key: 0,
|
|
3439
3539
|
class: "ds-swipe-item__unread-bar",
|
|
3440
|
-
style: Q({ backgroundColor:
|
|
3540
|
+
style: Q({ backgroundColor: V.value, opacity: e.read ? 0.3 : 1 }),
|
|
3441
3541
|
"aria-hidden": "true"
|
|
3442
3542
|
}, null, 4)) : f("", !0),
|
|
3443
3543
|
e.actions.length > 0 ? (a(), l("div", {
|
|
@@ -3445,35 +3545,35 @@ const He = A({
|
|
|
3445
3545
|
class: "ds-swipe-item__actions",
|
|
3446
3546
|
style: Q({ width: _.value })
|
|
3447
3547
|
}, [
|
|
3448
|
-
(a(!0), l(
|
|
3548
|
+
(a(!0), l(j, null, W(e.actions, (D) => (a(), l("button", {
|
|
3449
3549
|
key: D.id,
|
|
3450
|
-
class:
|
|
3550
|
+
class: S(["ds-swipe-item__action-btn", `ds-swipe-item__action-btn--${D.variant || "secondary"}`]),
|
|
3451
3551
|
"aria-label": D.label,
|
|
3452
|
-
onClick: (
|
|
3552
|
+
onClick: (q) => y(D.id)
|
|
3453
3553
|
}, [
|
|
3454
|
-
D.icon ? (a(),
|
|
3554
|
+
D.icon ? (a(), T(N, {
|
|
3455
3555
|
key: 0,
|
|
3456
3556
|
name: D.icon,
|
|
3457
3557
|
size: "sm"
|
|
3458
|
-
}, null, 8, ["name"])) : (a(), l("span",
|
|
3459
|
-
], 10,
|
|
3558
|
+
}, null, 8, ["name"])) : (a(), l("span", ii, C(D.label), 1))
|
|
3559
|
+
], 10, oi))), 128))
|
|
3460
3560
|
], 4)) : f("", !0),
|
|
3461
3561
|
m("div", {
|
|
3462
|
-
class:
|
|
3562
|
+
class: S(["ds-swipe-item__content", r.value && "ds-swipe-item__content--dragging"]),
|
|
3463
3563
|
style: Q(u.value),
|
|
3464
3564
|
tabindex: "0",
|
|
3465
3565
|
role: "button",
|
|
3466
3566
|
"aria-label": e.title,
|
|
3467
3567
|
"aria-pressed": !e.unread || e.read,
|
|
3468
|
-
onPointerdown:
|
|
3469
|
-
onPointermove:
|
|
3470
|
-
onPointerup:
|
|
3568
|
+
onPointerdown: H,
|
|
3569
|
+
onPointermove: w,
|
|
3570
|
+
onPointerup: I,
|
|
3471
3571
|
onPointercancel: O,
|
|
3472
3572
|
onKeydown: p
|
|
3473
3573
|
}, [
|
|
3474
3574
|
m("span", {
|
|
3475
3575
|
class: "ds-swipe-item__icon-bg",
|
|
3476
|
-
style: Q({ backgroundColor:
|
|
3576
|
+
style: Q({ backgroundColor: M.value, color: B.value })
|
|
3477
3577
|
}, [
|
|
3478
3578
|
e.image ? (a(), l("img", {
|
|
3479
3579
|
key: 0,
|
|
@@ -3481,28 +3581,28 @@ const He = A({
|
|
|
3481
3581
|
alt: e.title || "",
|
|
3482
3582
|
class: "ds-swipe-item__image",
|
|
3483
3583
|
loading: "lazy"
|
|
3484
|
-
}, null, 8,
|
|
3584
|
+
}, null, 8, ri)) : e.icon ? (a(), T(N, {
|
|
3485
3585
|
key: 1,
|
|
3486
3586
|
name: e.icon,
|
|
3487
3587
|
size: "sm",
|
|
3488
3588
|
class: "ds-swipe-item__icon"
|
|
3489
3589
|
}, null, 8, ["name"])) : f("", !0)
|
|
3490
3590
|
], 4),
|
|
3491
|
-
m("span",
|
|
3492
|
-
e.title ? (a(), l("span",
|
|
3493
|
-
e.description ? (a(), l("span",
|
|
3494
|
-
e.timestamp ? (a(), l("span",
|
|
3495
|
-
|
|
3591
|
+
m("span", di, [
|
|
3592
|
+
e.title ? (a(), l("span", ui, C(e.title), 1)) : f("", !0),
|
|
3593
|
+
e.description ? (a(), l("span", mi, C(e.description), 1)) : f("", !0),
|
|
3594
|
+
e.timestamp ? (a(), l("span", fi, [
|
|
3595
|
+
x(N, {
|
|
3496
3596
|
name: "clock",
|
|
3497
3597
|
size: "xs"
|
|
3498
3598
|
}),
|
|
3499
|
-
|
|
3599
|
+
Y(" " + C(e.timestamp), 1)
|
|
3500
3600
|
])) : f("", !0)
|
|
3501
3601
|
])
|
|
3502
|
-
], 46,
|
|
3602
|
+
], 46, ci)
|
|
3503
3603
|
], 6));
|
|
3504
3604
|
}
|
|
3505
|
-
}),
|
|
3605
|
+
}), bi = /* @__PURE__ */ L(pi, [["__scopeId", "data-v-4f08a415"]]), hi = { class: "ds-notification-panel" }, gi = { class: "ds-notification-panel__list" }, _i = /* @__PURE__ */ A({
|
|
3506
3606
|
__name: "NotificationPanel",
|
|
3507
3607
|
props: {
|
|
3508
3608
|
items: {},
|
|
@@ -3510,9 +3610,9 @@ const He = A({
|
|
|
3510
3610
|
},
|
|
3511
3611
|
emits: ["action", "view-more"],
|
|
3512
3612
|
setup(e) {
|
|
3513
|
-
return (s, t) => (a(), l("div",
|
|
3514
|
-
m("div",
|
|
3515
|
-
(a(!0), l(
|
|
3613
|
+
return (s, t) => (a(), l("div", hi, [
|
|
3614
|
+
m("div", gi, [
|
|
3615
|
+
(a(!0), l(j, null, W(e.items, (n) => (a(), T(bi, Pe({
|
|
3516
3616
|
key: n.id
|
|
3517
3617
|
}, { ref_for: !0 }, n, {
|
|
3518
3618
|
onAction: t[0] || (t[0] = (i, o) => s.$emit("action", i, o))
|
|
@@ -3523,17 +3623,17 @@ const He = A({
|
|
|
3523
3623
|
class: "ds-notification-panel__view-more",
|
|
3524
3624
|
onClick: t[1] || (t[1] = (n) => s.$emit("view-more"))
|
|
3525
3625
|
}, [
|
|
3526
|
-
m("span", null,
|
|
3626
|
+
m("span", null, C(e.viewMoreLabel), 1)
|
|
3527
3627
|
])) : f("", !0)
|
|
3528
3628
|
]));
|
|
3529
3629
|
}
|
|
3530
|
-
}),
|
|
3630
|
+
}), yi = /* @__PURE__ */ L(_i, [["__scopeId", "data-v-a261dc59"]]), ki = { class: "ds-notification-bell__inner" }, wi = {
|
|
3531
3631
|
key: 0,
|
|
3532
3632
|
class: "ds-notification-bell__dot"
|
|
3533
|
-
},
|
|
3633
|
+
}, $i = {
|
|
3534
3634
|
key: 0,
|
|
3535
3635
|
class: "ds-notification-bell__panel"
|
|
3536
|
-
},
|
|
3636
|
+
}, Ci = /* @__PURE__ */ A({
|
|
3537
3637
|
__name: "NotificationBell",
|
|
3538
3638
|
props: {
|
|
3539
3639
|
unread: { type: Boolean, default: !1 },
|
|
@@ -3543,7 +3643,7 @@ const He = A({
|
|
|
3543
3643
|
},
|
|
3544
3644
|
emits: ["read", "action", "view-more"],
|
|
3545
3645
|
setup(e, { emit: s }) {
|
|
3546
|
-
const t = e, n = s, i =
|
|
3646
|
+
const t = e, n = s, i = P(!1), o = P(null), r = g(() => {
|
|
3547
3647
|
switch (t.size) {
|
|
3548
3648
|
case "sm":
|
|
3549
3649
|
return "sm";
|
|
@@ -3555,7 +3655,7 @@ const He = A({
|
|
|
3555
3655
|
return "md";
|
|
3556
3656
|
}
|
|
3557
3657
|
});
|
|
3558
|
-
function
|
|
3658
|
+
function c() {
|
|
3559
3659
|
i.value = !i.value, i.value && n("read");
|
|
3560
3660
|
}
|
|
3561
3661
|
function d(u, h) {
|
|
@@ -3567,7 +3667,7 @@ const He = A({
|
|
|
3567
3667
|
const _ = u.target;
|
|
3568
3668
|
h.contains(_) || (i.value = !1);
|
|
3569
3669
|
}
|
|
3570
|
-
return
|
|
3670
|
+
return te(() => {
|
|
3571
3671
|
document.addEventListener("click", v);
|
|
3572
3672
|
}), oe(() => {
|
|
3573
3673
|
document.removeEventListener("click", v);
|
|
@@ -3577,19 +3677,19 @@ const He = A({
|
|
|
3577
3677
|
class: "ds-notification-bell"
|
|
3578
3678
|
}, [
|
|
3579
3679
|
m("button", {
|
|
3580
|
-
class:
|
|
3581
|
-
onClick:
|
|
3680
|
+
class: S(["ds-notification-bell__btn", `ds-notification-bell__btn--${e.size}`]),
|
|
3681
|
+
onClick: X(c, ["stop"])
|
|
3582
3682
|
}, [
|
|
3583
|
-
m("span",
|
|
3584
|
-
|
|
3683
|
+
m("span", ki, [
|
|
3684
|
+
x(N, {
|
|
3585
3685
|
name: "bell",
|
|
3586
|
-
size:
|
|
3686
|
+
size: r.value
|
|
3587
3687
|
}, null, 8, ["size"]),
|
|
3588
|
-
e.unread ? (a(), l("span",
|
|
3688
|
+
e.unread ? (a(), l("span", wi)) : f("", !0)
|
|
3589
3689
|
])
|
|
3590
3690
|
], 2),
|
|
3591
|
-
i.value && e.items.length ? (a(), l("div",
|
|
3592
|
-
|
|
3691
|
+
i.value && e.items.length ? (a(), l("div", $i, [
|
|
3692
|
+
x(yi, {
|
|
3593
3693
|
items: e.items,
|
|
3594
3694
|
"view-more-label": e.viewMoreLabel,
|
|
3595
3695
|
onAction: d,
|
|
@@ -3598,10 +3698,10 @@ const He = A({
|
|
|
3598
3698
|
])) : f("", !0)
|
|
3599
3699
|
], 512));
|
|
3600
3700
|
}
|
|
3601
|
-
}),
|
|
3701
|
+
}), xi = /* @__PURE__ */ L(Ci, [["__scopeId", "data-v-87e100f7"]]), Si = { class: "ds-page-title" }, Ii = { class: "ds-page-title__info" }, Bi = { class: "ds-page-title__title" }, Vi = {
|
|
3602
3702
|
key: 0,
|
|
3603
3703
|
class: "ds-page-title__subtitle"
|
|
3604
|
-
},
|
|
3704
|
+
}, zi = /* @__PURE__ */ A({
|
|
3605
3705
|
__name: "PageTitle",
|
|
3606
3706
|
props: {
|
|
3607
3707
|
title: {},
|
|
@@ -3611,12 +3711,12 @@ const He = A({
|
|
|
3611
3711
|
},
|
|
3612
3712
|
emits: ["action"],
|
|
3613
3713
|
setup(e) {
|
|
3614
|
-
return (s, t) => (a(), l("div",
|
|
3615
|
-
m("div",
|
|
3616
|
-
m("h1",
|
|
3617
|
-
e.subtitle ? (a(), l("p",
|
|
3714
|
+
return (s, t) => (a(), l("div", Si, [
|
|
3715
|
+
m("div", Ii, [
|
|
3716
|
+
m("h1", Bi, C(e.title), 1),
|
|
3717
|
+
e.subtitle ? (a(), l("p", Vi, C(e.subtitle), 1)) : f("", !0)
|
|
3618
3718
|
]),
|
|
3619
|
-
e.btnLabel ? (a(),
|
|
3719
|
+
e.btnLabel ? (a(), T(Z, {
|
|
3620
3720
|
key: 0,
|
|
3621
3721
|
variant: "primary",
|
|
3622
3722
|
icon: e.btnIcon,
|
|
@@ -3626,15 +3726,15 @@ const He = A({
|
|
|
3626
3726
|
}, null, 8, ["icon", "label"])) : f("", !0)
|
|
3627
3727
|
]));
|
|
3628
3728
|
}
|
|
3629
|
-
}),
|
|
3630
|
-
function
|
|
3631
|
-
|
|
3729
|
+
}), Di = /* @__PURE__ */ L(zi, [["__scopeId", "data-v-0bc89876"]]);
|
|
3730
|
+
function Fi() {
|
|
3731
|
+
E.register("button", Z), E.register("input", ve), E.register("icon", N), E.register("text", G), E.register("divider", Fe), E.register("badge", Sa), E.register("avatar", de), E.register("select", Ce), E.register("multi-select", Ha), E.register("checkbox", me), E.register("switch", es), E.register("form-field", is), E.register("spacer", rs), E.register("textarea", ps), E.register("stack", hs), E.register("row", _s), E.register("grid", ks), E.register("section", Is), E.register("card", Ms), E.register("table", dl), E.register("table-cell", Ke), E.register("side-panel", on), E.register("bulk-edit", Ue), E.register("search-box", _n), E.register("dropdown", Be), E.register("menu", je), E.register("menu-item", fe), E.register("tooltip", xe), E.register("popover", An), E.register("tabs", Pn), E.register("filter-bar", pl), E.register("pagination", _l), E.register("empty-state", Cl), E.register("loading-state", He), E.register("autocomplete", El), E.register("accordion", jl), E.register("alert", Ql), E.register("progress", oo), E.register("breadcrumb", vo), E.register("chip", _o), E.register("command-menu", Mo), E.register("sidebar", Zo), E.register("user-card", Ge), E.register("action-toggle", ti), E.register("toggle-button", li), E.register("notification-bell", xi), E.register("page-title", Di);
|
|
3632
3732
|
}
|
|
3633
|
-
function
|
|
3733
|
+
function ne(e, s) {
|
|
3634
3734
|
return Object.entries(e || {}).map(([t, n]) => `${s}${t}: ${n};`).join(`
|
|
3635
3735
|
`);
|
|
3636
3736
|
}
|
|
3637
|
-
function
|
|
3737
|
+
function Ai(e) {
|
|
3638
3738
|
var t;
|
|
3639
3739
|
const s = (t = e.font) == null ? void 0 : t.faces;
|
|
3640
3740
|
return !s || !s.length ? "" : s.map(
|
|
@@ -3651,13 +3751,13 @@ function gi(e) {
|
|
|
3651
3751
|
|
|
3652
3752
|
`;
|
|
3653
3753
|
}
|
|
3654
|
-
function
|
|
3754
|
+
function Li(e) {
|
|
3655
3755
|
var v, u, h, _;
|
|
3656
|
-
const s = [], t =
|
|
3756
|
+
const s = [], t = Ai(e);
|
|
3657
3757
|
t && s.push(t);
|
|
3658
3758
|
const n = e.tokens, i = ((v = n.colors) == null ? void 0 : v.light) && Object.keys(n.colors.light).length, o = ((u = n.colors) == null ? void 0 : u.dark) && Object.keys(n.colors.dark).length;
|
|
3659
|
-
i && (s.push(":root {"), s.push(" color-scheme: light;"), s.push(
|
|
3660
|
-
const
|
|
3759
|
+
i && (s.push(":root {"), s.push(" color-scheme: light;"), s.push(ne(n.colors.light, " ")), s.push("}"), s.push("")), o && (s.push('[data-theme="dark"] {'), s.push(" color-scheme: dark;"), s.push(ne(n.colors.dark, " ")), s.push("}"), s.push(""));
|
|
3760
|
+
const r = [
|
|
3661
3761
|
["spacing", "Spacing"],
|
|
3662
3762
|
["typography", "Typography"],
|
|
3663
3763
|
["radius", "Border Radius"],
|
|
@@ -3666,79 +3766,79 @@ function _i(e) {
|
|
|
3666
3766
|
["button", "Button"],
|
|
3667
3767
|
["alert", "Alert"]
|
|
3668
3768
|
];
|
|
3669
|
-
for (const [
|
|
3670
|
-
const B = n[
|
|
3671
|
-
!B || !Object.keys(B).length || (s.push(`/* ${
|
|
3769
|
+
for (const [k, M] of r) {
|
|
3770
|
+
const B = n[k];
|
|
3771
|
+
!B || !Object.keys(B).length || (s.push(`/* ${M} */`), s.push(":root {"), s.push(ne(B, " ")), s.push("}"), s.push(""));
|
|
3672
3772
|
}
|
|
3673
|
-
const
|
|
3674
|
-
return
|
|
3773
|
+
const c = ((h = n.shadows) == null ? void 0 : h.light) && Object.keys(n.shadows.light).length, d = ((_ = n.shadows) == null ? void 0 : _.dark) && Object.keys(n.shadows.dark).length;
|
|
3774
|
+
return c && (s.push(":root {"), s.push(" color-scheme: light;"), s.push(ne(n.shadows.light, " ")), s.push("}"), s.push("")), d && (s.push('[data-theme="dark"] {'), s.push(" color-scheme: dark;"), s.push(ne(n.shadows.dark, " ")), s.push("}"), s.push("")), s.join(`
|
|
3675
3775
|
`);
|
|
3676
3776
|
}
|
|
3677
|
-
function
|
|
3777
|
+
function Ti(e) {
|
|
3678
3778
|
const s = e["theme-mappings"];
|
|
3679
3779
|
if (!s) return "";
|
|
3680
3780
|
const t = [];
|
|
3681
|
-
return t.push(":root {"), t.push(" color-scheme: light;"), s.light && t.push(
|
|
3781
|
+
return t.push(":root {"), t.push(" color-scheme: light;"), s.light && t.push(ne(s.light, " ")), t.push("}"), t.push(""), t.push('[data-theme="dark"] {'), t.push(" color-scheme: dark;"), s.dark && t.push(ne(s.dark, " ")), t.push("}"), t.join(`
|
|
3682
3782
|
`);
|
|
3683
3783
|
}
|
|
3684
|
-
function
|
|
3685
|
-
const s = [], t =
|
|
3784
|
+
function Ui(e) {
|
|
3785
|
+
const s = [], t = Li(e);
|
|
3686
3786
|
t && s.push(t);
|
|
3687
|
-
const n =
|
|
3787
|
+
const n = Ti(e);
|
|
3688
3788
|
return n && s.push(n), s.join(`
|
|
3689
3789
|
`);
|
|
3690
3790
|
}
|
|
3691
|
-
let
|
|
3692
|
-
function
|
|
3693
|
-
|
|
3791
|
+
let Se = null;
|
|
3792
|
+
function ji(e) {
|
|
3793
|
+
Se = e;
|
|
3694
3794
|
}
|
|
3695
3795
|
function pe() {
|
|
3696
|
-
if (
|
|
3796
|
+
if (!Se)
|
|
3697
3797
|
throw new Error("Config not loaded. Call loadConfig() first.");
|
|
3698
|
-
return
|
|
3798
|
+
return Se;
|
|
3699
3799
|
}
|
|
3700
|
-
function
|
|
3800
|
+
function qi() {
|
|
3701
3801
|
return pe().direction.default;
|
|
3702
3802
|
}
|
|
3703
|
-
function
|
|
3803
|
+
function Ki() {
|
|
3704
3804
|
return pe().locale.default;
|
|
3705
3805
|
}
|
|
3706
|
-
function
|
|
3806
|
+
function Hi() {
|
|
3707
3807
|
return pe().locale.supported;
|
|
3708
3808
|
}
|
|
3709
|
-
function
|
|
3809
|
+
function Wi(e) {
|
|
3710
3810
|
var t, n;
|
|
3711
3811
|
const s = pe().font;
|
|
3712
3812
|
return e === "fa" && ((t = s.fa) != null && t.family) ? s.fa.family : (n = s.en) != null && n.family ? s.en.family : "IRANSansX";
|
|
3713
3813
|
}
|
|
3714
|
-
function
|
|
3814
|
+
function Gi(e) {
|
|
3715
3815
|
return !e || typeof e != "object" ? !1 : typeof e.type == "string";
|
|
3716
3816
|
}
|
|
3717
|
-
function
|
|
3817
|
+
function Ei(e) {
|
|
3718
3818
|
return {
|
|
3719
3819
|
...e,
|
|
3720
3820
|
props: e.props || {},
|
|
3721
|
-
children: e.children ? e.children.map(
|
|
3821
|
+
children: e.children ? e.children.map(Ei) : void 0,
|
|
3722
3822
|
events: e.events || {}
|
|
3723
3823
|
};
|
|
3724
3824
|
}
|
|
3725
3825
|
export {
|
|
3726
|
-
|
|
3727
|
-
|
|
3826
|
+
Fi as bootstrapRegistry,
|
|
3827
|
+
Ui as generateFullCSS,
|
|
3728
3828
|
pe as getConfig,
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3829
|
+
Ki as getDefaultLocale,
|
|
3830
|
+
qi as getDirection,
|
|
3831
|
+
Wi as getFontFamily,
|
|
3832
|
+
Hi as getSupportedLocales,
|
|
3833
|
+
Ml as hasPermission,
|
|
3834
|
+
ji as loadConfig,
|
|
3835
|
+
Ei as normalizeSchema,
|
|
3836
|
+
E as registry,
|
|
3837
|
+
Ve as runtimeContext,
|
|
3738
3838
|
Re as setLocale,
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3839
|
+
Ni as setUIDirection,
|
|
3840
|
+
Ri as setUILocale,
|
|
3841
|
+
F as t,
|
|
3742
3842
|
Ne as useI18n,
|
|
3743
|
-
|
|
3843
|
+
Gi as validateSchema
|
|
3744
3844
|
};
|