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