@nons-dev/uikit 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +444 -442
- package/package.json +1 -1
- package/scripts/vite-plugin-nons-config.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Xe = Object.defineProperty;
|
|
2
2
|
var Ze = (e, s, t) => s in e ? Xe(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
3
3
|
var ze = (e, s, t) => Ze(e, typeof s != "symbol" ? s + "" : s, t);
|
|
4
|
-
import { defineComponent as A, computed as g, openBlock as a, createElementBlock as
|
|
5
|
-
import { Tag as at, Folder as st, Globe as
|
|
4
|
+
import { defineComponent as A, computed as g, openBlock as a, createElementBlock as l, normalizeClass as S, createBlock as T, resolveDynamicComponent as re, reactive as Ee, withCtx as U, renderSlot as K, createTextVNode as Y, toDisplayString as C, useSlots as Je, createCommentVNode as f, createVNode as x, createElementVNode as m, ref as P, watch as ee, onMounted as te, onUnmounted as oe, withModifiers as X, Transition as ae, Fragment as j, renderList as W, withDirectives as ue, vModelText as Me, normalizeStyle as Q, unref as R, mergeProps as Pe, h as De, onBeforeUnmount as Qe, nextTick as et, vShow as Ae, useCssVars as tt } from "vue";
|
|
5
|
+
import { Tag as at, Folder as st, Globe as nt, Minimize2 as ke, Maximize2 as we, Clock as lt, Bell as ot, Info as it, HelpCircle as ct, AlertCircle as Le, X as $e, ChartPie as rt, Moon as dt, Sun as ut, Check as mt, MoreHorizontal as ft, ArrowRight as vt, ArrowLeft as pt, Edit2 as bt, Trash2 as ht, Filter as gt, ChevronDown as Oe, Search as _t, Plus as yt, Menu as kt, Bolt as wt, Terminal as $t, Settings as Ct, Fingerprint as xt, BarChart3 as St, Flag as It, MessageSquare as Bt, Archive as Vt, Package as zt, ShoppingBag as Dt, Users as At, LayoutDashboard as Te, ChevronUp as Lt, ChevronsUpDown as Tt } from "@lucide/vue";
|
|
6
6
|
class Et {
|
|
7
7
|
constructor() {
|
|
8
8
|
ze(this, "registry", /* @__PURE__ */ new Map());
|
|
@@ -59,33 +59,33 @@ const E = new Et(), Mt = /* @__PURE__ */ A({
|
|
|
59
59
|
help: ct,
|
|
60
60
|
info: it,
|
|
61
61
|
bell: ot,
|
|
62
|
-
clock:
|
|
62
|
+
clock: lt,
|
|
63
63
|
"maximize-2": we,
|
|
64
64
|
"minimize-2": ke,
|
|
65
|
-
globe:
|
|
65
|
+
globe: nt,
|
|
66
66
|
folder: st,
|
|
67
67
|
tag: at
|
|
68
|
-
}, t = e,
|
|
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 (r, c) =>
|
|
73
|
+
return (r, c) => n.value ? (a(), l("i", {
|
|
74
74
|
key: 0,
|
|
75
75
|
class: S([e.name, o.value])
|
|
76
76
|
}, null, 2)) : i.value ? (a(), T(re(i.value), {
|
|
77
77
|
key: 1,
|
|
78
78
|
class: S(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: S(o.value)
|
|
83
83
|
}, "?", 2));
|
|
84
84
|
}
|
|
85
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
90
|
}, N = /* @__PURE__ */ L(Mt, [["__scopeId", "data-v-06b2598d"]]), Pt = { name: "نونز", footer: "پنل مدیریت" }, Ot = { dashboard: "دکمهها (Buttons)", users: "آیکونها (Icons)", stores: "تایپوگرافی (Text)", products: "فیلدهای فرم (Forms)", orders: "چیدمان (Layouts)", chat: "نشان و آواتار (Badges)", reports: "جداکننده (Divider)", stats: "رندر اسکیما (Schema)", components: "کامپوننتها" }, Rt = { name: "بهروز", email: "admin@Nons.ir" }, Nt = { search: "جستجو کنید...", child_panel: "پنل فروشنده", child_finance: "امور مالی", child_content: "مدیریت محتوا", panel_finance: "مالی", panel_seller: "فروشنده", panel_support: "پشتیبانی", theme_toggle: "تغییر پوسته", settings: "تنظیمات", reports: "گزارش", add: "افزودن", lang_fa: "فارسی", lang_en: "English" }, Ft = { title: "فهرست نقشها", subtitle: "فهرست کاربران خود را در اینجا مدیریت کنید", add_new: "افزودن جدید", search: "جستجو...", filter: "فیلتر", filter_all: "همه نقشها", filter_admin: "ادمین", filter_seller: "فروشنده", filter_viewer: "بازدیدکننده", next: "بعدی", prev: "قبلی", delete: "حذف", edit: "ویرایش", cancel: "انصراف", save: "ذخیره", add_role: "افزودن نقش جدید", edit_role: "ویرایش نقش", no_data: "هیچ دادهای یافت نشد." }, Ut = { name: "نقش", key: "شناسه", capabilities: "تواناییها", count: "تعداد", actions: "اقدام", name_placeholder: "مثال: فروشنده", key_placeholder: "مثال: SELLER", name_label: "نام نقش", key_label: "شناسه نقش", access_type: "نوع دسترسی", access_placeholder: "انتخاب کنید...", access_full: "دسترسی کامل", access_limited: "دسترسی محدود", access_readonly: "فقط مشاهده", cap_full_access: "دسترسی کامل", cap_shop: "فروشگاه", cap_support: "پشتیبانی", cap_products: "محصولات", cap_report: "گزارش", cap_buy: "خرید", cap_sell: "فروش", cap_view: "مشاهده", cap_limited: "محدود", error_name_required: "نام نقش الزامی است", error_key_required: "شناسه نقش الزامی است", error_key_exists: "نقشی با این شناسه قبلاً ثبت شده است" }, jt = { title: "کاوشگر کامپوننتها", subtitle: "مرور و پیشنمایش تمام کامپوننتهای سیستم طراحی", categories: { actions: "عملیات (Actions)", forms: "فرمها (Forms)", feedback: "بازخورد (Feedback)", base: "پایه (Base)", layouts: "چیدمان (Layouts)", components: "کامپوننتها (Components)", navigation: "ناوبری (Navigation)", "data-display": "نمایش داده (Data Display)", disclosure: "نمایش انتخابی (Disclosure)" }, tabs: { preview: "پیشنمایش", props: "مشخصات (Props)", schema: "اسکیما (Schema)", usage: "نحوه استفاده" }, components: { button: { name: "دکمه (Button)", desc: "دکمههای تعاملی با انواع، اندازهها و حالتهای مختلف" }, "icon-button": { name: "دکمه آیکونی (IconButton)", desc: "دکمه مربعی فقط با آیکون برای عملیات فشرده" }, icon: { name: "آیکون (Icon)", desc: "سیستم آیکون یکپارچه با اندازههای توکن و رنگهای معنایی" }, text: { name: "متن (Text)", desc: "کامپوننت تایپوگرافی با مقیاسها و وزنهای از پیش تعریف شده" }, input: { name: "ورودی (Input)", desc: "فیلد ورودی متن با پشتیبانی از آیکون و حالت خطا" }, spacer: { name: "فاصلهانداز (Spacer)", desc: "ایجاد فضا و فواصل یکنواخت و استاندارد در چیدمان لایهها" }, textarea: { name: "ورودی چندخطی (Textarea)", desc: "فیلد ورودی متن چند خطی با پشتیبانی از شمارشگر کاراکتر و کلمه" }, select: { name: "انتخاب (Select)", desc: "منوی کشویی انتخاب با گزینههای سفارشی" }, "multi-select": { name: "انتخاب چندگانه (MultiSelect)", desc: "منوی کشویی انتخاب چندگانه با قابلیت جستجو، چکلیست و نمایش تگها" }, "search-box": { name: "جعبه جستجو (SearchBox)", desc: "ترکیب فیلد ورودی و آیکون جستجو همراه با دکمه پاکسازی" }, dropdown: { name: "منوی کشویی (Dropdown)", desc: "منوی انتخابی با پشتیبانی از گزینههای ثابت و فراخوانی API" }, autocomplete: { name: "تکمیل خودکار (AsyncAutocomplete)", desc: "ورودی متن با قابلیت بارگذاری پویا و غیرهمزمان اطلاعات از سرور" }, menu: { name: "منو (Menu)", desc: "منوی عمومی حاوی گزینهها برای سایدبار یا منوهای بازشو" }, "menu-item": { name: "آیتم منو (MenuItem)", desc: "گزینه تکی داخل منو با پشتیبانی از آیکون و وضعیت فعال" }, tooltip: { name: "تولتیپ (Tooltip)", desc: "نمایش اطلاعات کمکی بر روی عناصر با نگهداشتن موس" }, popover: { name: "پاپاور (Popover)", desc: "نمایش محتوای شناور و تعاملی در جریان صفحه" }, tabs: { name: "تبها (Tabs)", desc: "ابزار ناوبری و جابجایی بین بخشهای مختلف محتوا" }, checkbox: { name: "کادر انتخاب (Checkbox)", desc: "کادر انتخاب با طراحی سفارشی و پشتیبانی از حالت غیرفعال" }, switch: { name: "سوئیچ (Switch)", desc: "سوئیچ دوحالته با انیمیشن و پشتیبانی از حالت غیرفعال" }, badge: { name: "نشان (Badge)", desc: "نشانهای رنگی با انواع معنایی و آیکون" }, avatar: { name: "آواتار (Avatar)", desc: "تصویر پروفایل کاربر با تصویر یا حروف اول نام" }, divider: { name: "جداکننده (Divider)", desc: "خط جداکننده افقی با ضخامت توکن" }, card: { name: "کارت (Card)", desc: "کارت محتوا شامل بخشهای سربرگ، بدنه و پاورقی" }, table: { name: "جدول (SchemaTable)", desc: "جدول Schema-Driven با قابلیت sort، انتخاب سطر و یکپارچهسازی TableCell" }, "table-cell": { name: "سلول جدول (TableCell)", desc: "سلول جدول مبتنی بر اسکیما با ۶ نوع مختلف (text, date, profile, tag, checkbox, actions)" }, "filter-bar": { name: "نوار فیلتر (FilterBar)", desc: "ترکیبی از فیلدها برای فیلتر و جستجوی دادهها" }, pagination: { name: "صفحهبندی (Pagination)", desc: "کنترل صفحهبندی دادهها با اطلاعات صفحه فعلی" }, "empty-state": { name: "وضعیت خالی (EmptyState)", desc: "نمایش پیام استاندارد در صورت عدم وجود دادهها" }, "loading-state": { name: "وضعیت بارگذاری (LoadingState)", desc: "نمایش انیمیشن بارگذاری، اسپینر یا اسکلتون" }, sidepanel: { name: "پنل جانبی (SidePanel)", desc: "پنل کشویی جانبی با سربرگ و پاورقی" }, stack: { name: "پشته (Stack)", desc: "چیدمان عمودی یا افقی با فاصله و جداکننده" }, row: { name: "ردیف (Row)", desc: "چیدمان افقی انعطافپذیر با گزینههای تراز" }, grid: { name: "شبکه (Grid)", desc: "سیستم شبکه پاسخگوی ۱۲ ستونی" }, section: { name: "بخش (Section)", desc: "بخش صفحه همراه با عنوان و زیرعنوان" }, accordion: { name: "آکاردئون (Accordion)", desc: "نمایش محتوای گروهبندی شده با قابلیت باز و بسته شدن" }, alert: { name: "اعلان (Alert)", desc: "نمایش پیامهای سیستمی و هشدارهای درون صفحهای" }, progress: { name: "پیشرفت (Progress)", desc: "نمایش درصد پیشرفت عملیات جاری" }, breadcrumb: { name: "مسیر راهنما (Breadcrumb)", desc: "نمایش مسیر جاری کاربر در صفحات برنامه" }, chip: { name: "چیپ (Chip)", desc: "برچسبهای کوچک تعاملی با قابلیت حذف" }, "command-menu": { name: "منوی دستورات (CommandMenu)", desc: "منوی جستجوی سریع و اجرای عملیات با کلیدهای میانبر" }, "swipe-item": { name: "آیتم کشویی (SwipeItem)", desc: "آیتم لیست با قابلیت کشیدن برای نمایش دکمههای عملیات" }, sidebar: { name: "سایدبار (SidebarNav)", desc: "سایدبار ناوبری مبتنی بر اسکیما با حالت باز/بسته" }, "user-card": { name: "کاربر (UserCard)", desc: "کارت پروفایل کاربر برای فوتر سایدبار با آواتار، نام، نقش و آیکون عملیات" }, "page-title": { name: "عنوان صفحه (PageTitle)", desc: "هدر صفحه با عنوان، زیرعنوان و دکمه عملیات اختیاری" }, "notification-bell": { name: "زنگ اعلان (NotificationBell)", desc: "دکمه زنگ با نشانگر اعلان خوانده نشده" }, "notification-panel": { name: "پنل اعلان (NotificationPanel)", desc: "پنل کشویی لیست اعلانها با ردیفهای SwipeItem" }, "toggle-button": { name: "دکمه تغییر حالت (ToggleButton)", desc: "دکمه دو حالته با آیکون و برچسب مجزا برای هر حالت" }, "action-toggle": { name: "تغییردهنده عملیات (ActionToggle)", desc: "تغییردهنده قطعهبندیشده با ۲ یا ۳ گزینه و لغزنده" } } }, qt = { previous: "قبلی", next: "بعدی", page_of: "صفحه {page} از {total}" }, Kt = { text: "در حال بارگذاری..." }, Ht = { empty: "هیچ دادهای یافت نشد." }, Wt = { no_results: "نتیجهای یافت نشد", remove: "حذف", go: "برو", run: "اجرا", transfer: "انتقال" }, Gt = { words: "کلمه" }, Yt = { demo_title: "تست رندر پویا از روی اسکیما (Schema UI Engine)", demo_subtitle: "این کادر به طور کامل از یک مشخصات JSON رندر شده است و عملکرد واقعی دارد.", input_placeholder: "ورودی اسکیما...", submit: "ثبت از اسکیما" }, Xt = { close: "بستن", cancel: "انصراف", save: "ذخیره", minimize: "کوچکنمایی", maximize: "بزرگنمایی" }, Zt = {
|
|
91
91
|
app: Pt,
|
|
@@ -102,15 +102,15 @@ const E = new Et(), Mt = /* @__PURE__ */ A({
|
|
|
102
102
|
textarea: Gt,
|
|
103
103
|
schema: Yt,
|
|
104
104
|
sidepanel: Xt
|
|
105
|
-
}, Jt = { name: "Nons", footer: "Admin Panel" }, Qt = { dashboard: "Buttons", users: "Icons", stores: "Typography", products: "Form Fields", orders: "Layouts", chat: "Badges & Avatars", reports: "Dividers", stats: "Schema Renderer", components: "Components" }, ea = { name: "Behrouz", email: "admin@Nons.ir" }, ta = { search: "Search...", child_panel: "Seller Panel", child_finance: "Finance", child_content: "Content Management", panel_finance: "Finance", panel_seller: "Seller", panel_support: "Support", theme_toggle: "Toggle Theme", settings: "Settings", reports: "Reports", add: "Add", lang_fa: "Persian", lang_en: "English" }, aa = { title: "Roles List", subtitle: "Manage your users here", add_new: "Add New", search: "Search...", filter: "Filter", filter_all: "All Roles", filter_admin: "Admin", filter_seller: "Seller", filter_viewer: "Viewer", next: "Next", prev: "Previous", delete: "Delete", edit: "Edit", cancel: "Cancel", save: "Save", add_role: "Add New Role", edit_role: "Edit Role", no_data: "No data found." }, sa = { name: "Role", key: "Key", capabilities: "Capabilities", count: "Count", actions: "Actions", name_placeholder: "e.g. Seller", key_placeholder: "e.g. SELLER", name_label: "Role Name", key_label: "Role Key", access_type: "Access Type", access_placeholder: "Select...", access_full: "Full Access", access_limited: "Limited Access", access_readonly: "Read Only", cap_full_access: "Full Access", cap_shop: "Shop", cap_support: "Support", cap_products: "Products", cap_report: "Report", cap_buy: "Buy", cap_sell: "Sell", cap_view: "View", cap_limited: "Limited", error_name_required: "Role name is required", error_key_required: "Role key is required", error_key_exists: "A role with this key already exists" },
|
|
105
|
+
}, Jt = { name: "Nons", footer: "Admin Panel" }, Qt = { dashboard: "Buttons", users: "Icons", stores: "Typography", products: "Form Fields", orders: "Layouts", chat: "Badges & Avatars", reports: "Dividers", stats: "Schema Renderer", components: "Components" }, ea = { name: "Behrouz", email: "admin@Nons.ir" }, ta = { search: "Search...", child_panel: "Seller Panel", child_finance: "Finance", child_content: "Content Management", panel_finance: "Finance", panel_seller: "Seller", panel_support: "Support", theme_toggle: "Toggle Theme", settings: "Settings", reports: "Reports", add: "Add", lang_fa: "Persian", lang_en: "English" }, aa = { title: "Roles List", subtitle: "Manage your users here", add_new: "Add New", search: "Search...", filter: "Filter", filter_all: "All Roles", filter_admin: "Admin", filter_seller: "Seller", filter_viewer: "Viewer", next: "Next", prev: "Previous", delete: "Delete", edit: "Edit", cancel: "Cancel", save: "Save", add_role: "Add New Role", edit_role: "Edit Role", no_data: "No data found." }, sa = { name: "Role", key: "Key", capabilities: "Capabilities", count: "Count", actions: "Actions", name_placeholder: "e.g. Seller", key_placeholder: "e.g. SELLER", name_label: "Role Name", key_label: "Role Key", access_type: "Access Type", access_placeholder: "Select...", access_full: "Full Access", access_limited: "Limited Access", access_readonly: "Read Only", cap_full_access: "Full Access", cap_shop: "Shop", cap_support: "Support", cap_products: "Products", cap_report: "Report", cap_buy: "Buy", cap_sell: "Sell", cap_view: "View", cap_limited: "Limited", error_name_required: "Role name is required", error_key_required: "Role key is required", error_key_exists: "A role with this key already exists" }, na = { title: "Component Explorer", subtitle: "Browse and preview all design system components", categories: { actions: "Actions", forms: "Forms", feedback: "Feedback", base: "Base", layouts: "Layouts", components: "Components", navigation: "Navigation", "data-display": "Data Display", disclosure: "Disclosure" }, tabs: { preview: "Preview", props: "Props", schema: "Schema", usage: "Usage" }, components: { button: { name: "Button", desc: "Interactive buttons with variants, sizes and states" }, "icon-button": { name: "IconButton", desc: "Icon-only square button for compact actions" }, icon: { name: "Icon", desc: "Unified icon system with token sizes and semantic colors" }, text: { name: "Text", desc: "Typography component with predefined scales and weights" }, input: { name: "Input", desc: "Text input field with icon and error state support" }, spacer: { name: "Spacer", desc: "Fixed token-based layout spacer for spacing sections" }, textarea: { name: "Textarea", desc: "Multiline text input with character and word limits support" }, select: { name: "Select", desc: "Dropdown select menu with custom options" }, "multi-select": { name: "MultiSelect", desc: "Dropdown select menu with multiple checkable options and display tags" }, "search-box": { name: "SearchBox", desc: "Text input combined with search icon and clear actions" }, dropdown: { name: "Dropdown", desc: "General selection dropdown with static items and API source loading" }, autocomplete: { name: "AsyncAutocomplete", desc: "Text input with dynamic and asynchronous suggestion loading from server" }, menu: { name: "Menu", desc: "Structured menu layout with dynamic options" }, "menu-item": { name: "MenuItem", desc: "Individual choice element in a Menu block" }, tooltip: { name: "Tooltip", desc: "Helpful overlay text displaying on mouse-over" }, popover: { name: "Popover", desc: "Floating interactive content panel mapping to logical flow" }, tabs: { name: "Tabs", desc: "Navigation controls for switching between content sections" }, checkbox: { name: "Checkbox", desc: "Custom styled checkbox with disabled state" }, switch: { name: "Switch", desc: "Toggle switch with animation and disabled state" }, badge: { name: "Badge", desc: "Colored badges with semantic variants and icon" }, avatar: { name: "Avatar", desc: "User avatar with image or fallback initials" }, divider: { name: "Divider", desc: "Horizontal divider line with token thickness" }, card: { name: "Card", desc: "Content card with header, body and footer sections" }, table: { name: "SchemaTable", desc: "Schema-driven table with sort, row selection, and TableCell integration" }, "table-cell": { name: "TableCell", desc: "Schema-driven table cell with 6 type variants (text, date, profile, tag, checkbox, actions)" }, "filter-bar": { name: "FilterBar", desc: "Composed search and filter controls for datasets" }, pagination: { name: "Pagination", desc: "Navigation controls for datasets pages" }, "empty-state": { name: "EmptyState", desc: "Informational banner when zero records are returned" }, "loading-state": { name: "LoadingState", desc: "Spinner, shimmering skeletons or placeholders for pending processes" }, sidepanel: { name: "SidePanel", desc: "Slide-in side panel with header and footer" }, stack: { name: "Stack", desc: "Vertical or horizontal layout with gap and separator" }, row: { name: "Row", desc: "Flexible horizontal layout with alignment options" }, grid: { name: "Grid", desc: "12-column responsive grid system" }, section: { name: "Section", desc: "Page section with title and subtitle" }, accordion: { name: "Accordion", desc: "Collapsible content panels for grouping related information" }, alert: { name: "Alert", desc: "Inline message panels for notifications and confirmation actions" }, progress: { name: "Progress", desc: "Visual progress indicators for ongoing operations" }, breadcrumb: { name: "Breadcrumb", desc: "Navigation trail for displaying current page hierarchy" }, chip: { name: "Chip", desc: "Compact, interactive tags with delete action buttons" }, "command-menu": { name: "CommandMenu", desc: "Keyboard-navigable search and action command palette" }, "swipe-item": { name: "SwipeItem", desc: "Swipeable list item that reveals action buttons on swipe" }, sidebar: { name: "SidebarNav", desc: "Schema-driven navigation sidebar with collapsed/expanded modes" }, "user-card": { name: "UserCard", desc: "Compact user profile card for sidebar footers with avatar, name, role and action icon" }, "page-title": { name: "PageTitle", desc: "Page header with title, subtitle and optional action button" }, "notification-bell": { name: "NotificationBell", desc: "Bell button with unread notification dot indicator" }, "notification-panel": { name: "NotificationPanel", desc: "Dropdown panel listing notification items with SwipeItem rows" }, "toggle-button": { name: "ToggleButton", desc: "Two-state button with separate icon and label for each state" }, "action-toggle": { name: "ActionToggle", desc: "Segmented toggle with 2 or 3 options and sliding thumb" } } }, la = { previous: "Previous", next: "Next", page_of: "Page {page} of {total}" }, oa = { text: "Loading..." }, ia = { empty: "No data found." }, ca = { no_results: "No results found", remove: "Remove", go: "Go", run: "Run", transfer: "Transfer" }, ra = { words: "words" }, da = { demo_title: "Dynamic Schema Rendering Test (Schema UI Engine)", demo_subtitle: "This card is fully rendered from a JSON specification and has real functionality.", input_placeholder: "Schema input...", submit: "Submit from Schema" }, ua = { close: "Close", cancel: "Cancel", save: "Save", minimize: "Minimize", maximize: "Maximize" }, ma = {
|
|
106
106
|
app: Jt,
|
|
107
107
|
nav: Qt,
|
|
108
108
|
profile: ea,
|
|
109
109
|
header: ta,
|
|
110
110
|
home: aa,
|
|
111
111
|
role: sa,
|
|
112
|
-
explorer:
|
|
113
|
-
pagination:
|
|
112
|
+
explorer: na,
|
|
113
|
+
pagination: la,
|
|
114
114
|
loading: oa,
|
|
115
115
|
table: ia,
|
|
116
116
|
common: ca,
|
|
@@ -122,13 +122,13 @@ const E = new Et(), Mt = /* @__PURE__ */ A({
|
|
|
122
122
|
});
|
|
123
123
|
function va(e, s) {
|
|
124
124
|
const t = s.split(".");
|
|
125
|
-
let
|
|
125
|
+
let n = e;
|
|
126
126
|
for (const i of t)
|
|
127
|
-
if (
|
|
128
|
-
|
|
127
|
+
if (n && typeof n == "object" && i in n)
|
|
128
|
+
n = n[i];
|
|
129
129
|
else
|
|
130
130
|
return s;
|
|
131
|
-
return typeof
|
|
131
|
+
return typeof n == "string" ? n : s;
|
|
132
132
|
}
|
|
133
133
|
function Re(e) {
|
|
134
134
|
Ie.locale = e, document.documentElement.lang = e;
|
|
@@ -136,11 +136,11 @@ function Re(e) {
|
|
|
136
136
|
function F(e, s) {
|
|
137
137
|
const t = fa[Ie.locale];
|
|
138
138
|
if (!t) return e;
|
|
139
|
-
let
|
|
139
|
+
let n = va(t, e);
|
|
140
140
|
if (s)
|
|
141
141
|
for (const [i, o] of Object.entries(s))
|
|
142
|
-
|
|
143
|
-
return
|
|
142
|
+
n = n.replace(`{${i}}`, o);
|
|
143
|
+
return n;
|
|
144
144
|
}
|
|
145
145
|
function Ne() {
|
|
146
146
|
return {
|
|
@@ -158,7 +158,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
158
158
|
tag: {}
|
|
159
159
|
},
|
|
160
160
|
setup(e) {
|
|
161
|
-
const s = e, t = g(() => s.value ? F(s.value) : ""),
|
|
161
|
+
const s = e, t = g(() => s.value ? F(s.value) : ""), n = g(() => [
|
|
162
162
|
"ds-text",
|
|
163
163
|
`ds-text--${s.variant}`,
|
|
164
164
|
{
|
|
@@ -188,7 +188,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
188
188
|
}
|
|
189
189
|
});
|
|
190
190
|
return (o, r) => (a(), T(re(i.value), {
|
|
191
|
-
class: S(
|
|
191
|
+
class: S(n.value)
|
|
192
192
|
}, {
|
|
193
193
|
default: U(() => [
|
|
194
194
|
K(o.$slots, "default", {}, () => [
|
|
@@ -218,7 +218,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
218
218
|
},
|
|
219
219
|
emits: ["click"],
|
|
220
220
|
setup(e, { emit: s }) {
|
|
221
|
-
const t = e,
|
|
221
|
+
const t = e, n = s, i = Je(), o = g(() => [
|
|
222
222
|
"ds-button",
|
|
223
223
|
`ds-button--${t.variant}`,
|
|
224
224
|
`ds-button--${t.size}`,
|
|
@@ -229,22 +229,22 @@ const pa = /* @__PURE__ */ A({
|
|
|
229
229
|
}
|
|
230
230
|
]);
|
|
231
231
|
function r(c) {
|
|
232
|
-
!t.disabled && !t.loading &&
|
|
232
|
+
!t.disabled && !t.loading && n("click", c);
|
|
233
233
|
}
|
|
234
|
-
return (c, d) => (a(),
|
|
234
|
+
return (c, d) => (a(), l("button", {
|
|
235
235
|
type: e.type,
|
|
236
236
|
class: S(o.value),
|
|
237
237
|
disabled: e.disabled || e.loading,
|
|
238
238
|
onClick: r
|
|
239
239
|
}, [
|
|
240
|
-
e.loading ? (a(),
|
|
240
|
+
e.loading ? (a(), l("span", ha)) : f("", !0),
|
|
241
241
|
e.icon && e.iconPosition === "start" && !e.loading ? (a(), T(N, {
|
|
242
242
|
key: 1,
|
|
243
243
|
name: e.icon,
|
|
244
244
|
size: "sm",
|
|
245
245
|
variant: "default"
|
|
246
246
|
}, null, 8, ["name"])) : f("", !0),
|
|
247
|
-
c.$slots.default || e.label ? (a(),
|
|
247
|
+
c.$slots.default || e.label ? (a(), l("span", ga, [
|
|
248
248
|
K(c.$slots, "default", {}, () => [
|
|
249
249
|
x(G, {
|
|
250
250
|
variant: "body-md",
|
|
@@ -276,7 +276,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
276
276
|
},
|
|
277
277
|
emits: ["update:modelValue", "focus", "blur", "input", "keydown"],
|
|
278
278
|
setup(e, { emit: s }) {
|
|
279
|
-
const t = e,
|
|
279
|
+
const t = e, n = s, i = g(() => [
|
|
280
280
|
"ds-input",
|
|
281
281
|
{
|
|
282
282
|
"ds-input--disabled": t.disabled,
|
|
@@ -287,9 +287,9 @@ const pa = /* @__PURE__ */ A({
|
|
|
287
287
|
]);
|
|
288
288
|
function o(r) {
|
|
289
289
|
const c = r.target;
|
|
290
|
-
|
|
290
|
+
n("update:modelValue", c.value), n("input", r);
|
|
291
291
|
}
|
|
292
|
-
return (r, c) => (a(),
|
|
292
|
+
return (r, c) => (a(), l("div", {
|
|
293
293
|
class: S(i.value)
|
|
294
294
|
}, [
|
|
295
295
|
m("div", ya, [
|
|
@@ -308,9 +308,9 @@ const pa = /* @__PURE__ */ A({
|
|
|
308
308
|
readonly: e.readonly,
|
|
309
309
|
class: "ds-input__field",
|
|
310
310
|
onInput: o,
|
|
311
|
-
onFocus: c[0] || (c[0] = (d) =>
|
|
312
|
-
onBlur: c[1] || (c[1] = (d) =>
|
|
313
|
-
onKeydown: c[2] || (c[2] = (d) =>
|
|
311
|
+
onFocus: c[0] || (c[0] = (d) => n("focus", d)),
|
|
312
|
+
onBlur: c[1] || (c[1] = (d) => n("blur", d)),
|
|
313
|
+
onKeydown: c[2] || (c[2] = (d) => n("keydown", d))
|
|
314
314
|
}, null, 40, ka)
|
|
315
315
|
])
|
|
316
316
|
], 2));
|
|
@@ -321,7 +321,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
321
321
|
}, Ca = /* @__PURE__ */ A({
|
|
322
322
|
__name: "Divider",
|
|
323
323
|
setup(e) {
|
|
324
|
-
return (s, t) => (a(),
|
|
324
|
+
return (s, t) => (a(), l("hr", $a));
|
|
325
325
|
}
|
|
326
326
|
}), Fe = /* @__PURE__ */ L(Ca, [["__scopeId", "data-v-aa037cc0"]]), xa = /* @__PURE__ */ A({
|
|
327
327
|
__name: "Badge",
|
|
@@ -335,7 +335,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
335
335
|
"ds-badge",
|
|
336
336
|
`ds-badge--${s.variant}`
|
|
337
337
|
]);
|
|
338
|
-
return (
|
|
338
|
+
return (n, i) => (a(), l("span", {
|
|
339
339
|
class: S(t.value)
|
|
340
340
|
}, [
|
|
341
341
|
e.icon ? (a(), T(N, {
|
|
@@ -345,7 +345,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
345
345
|
variant: "default",
|
|
346
346
|
class: "ds-badge__icon"
|
|
347
347
|
}, null, 8, ["name"])) : f("", !0),
|
|
348
|
-
K(
|
|
348
|
+
K(n.$slots, "default", {}, () => [
|
|
349
349
|
x(G, {
|
|
350
350
|
variant: "caption",
|
|
351
351
|
value: e.text,
|
|
@@ -371,7 +371,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
371
371
|
ee(() => s.src, () => {
|
|
372
372
|
t.value = !1;
|
|
373
373
|
});
|
|
374
|
-
const
|
|
374
|
+
const n = g(() => {
|
|
375
375
|
var d, v;
|
|
376
376
|
if (s.fallback) return s.fallback;
|
|
377
377
|
if (!s.name) return "?";
|
|
@@ -388,16 +388,16 @@ const pa = /* @__PURE__ */ A({
|
|
|
388
388
|
`ds-avatar--${s.size}`,
|
|
389
389
|
{ "ds-avatar--square": s.square }
|
|
390
390
|
]);
|
|
391
|
-
return (o, r) => (a(),
|
|
391
|
+
return (o, r) => (a(), l("div", {
|
|
392
392
|
class: S(i.value)
|
|
393
393
|
}, [
|
|
394
|
-
e.src && !t.value ? (a(),
|
|
394
|
+
e.src && !t.value ? (a(), l("img", {
|
|
395
395
|
key: 0,
|
|
396
396
|
src: e.src,
|
|
397
397
|
alt: e.name,
|
|
398
398
|
class: "ds-avatar__image",
|
|
399
399
|
onError: r[0] || (r[0] = (c) => t.value = !0)
|
|
400
|
-
}, null, 40, Ia)) : (a(),
|
|
400
|
+
}, null, 40, Ia)) : (a(), l("div", Ba, C(n.value), 1))
|
|
401
401
|
], 2));
|
|
402
402
|
}
|
|
403
403
|
}), de = /* @__PURE__ */ L(Va, [["__scopeId", "data-v-e32afb9f"]]), za = { class: "ds-select__wrapper" }, Da = ["id", "aria-expanded", "aria-controls"], Aa = {
|
|
@@ -418,7 +418,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
418
418
|
},
|
|
419
419
|
emits: ["update:modelValue", "change"],
|
|
420
420
|
setup(e, { emit: s }) {
|
|
421
|
-
const t = e,
|
|
421
|
+
const t = e, n = s;
|
|
422
422
|
function i(p) {
|
|
423
423
|
return typeof p == "object" && p !== null ? p : { label: String(p), value: p };
|
|
424
424
|
}
|
|
@@ -454,7 +454,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
454
454
|
B();
|
|
455
455
|
return;
|
|
456
456
|
}
|
|
457
|
-
|
|
457
|
+
n("update:modelValue", z), n("change", z), B();
|
|
458
458
|
}
|
|
459
459
|
function H(p) {
|
|
460
460
|
if (!t.disabled) {
|
|
@@ -495,7 +495,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
495
495
|
"ds-select--open": d.value
|
|
496
496
|
}
|
|
497
497
|
]), O = g(() => t.id ? `${t.id}-listbox` : void 0);
|
|
498
|
-
return (p, z) => (a(),
|
|
498
|
+
return (p, z) => (a(), l("div", {
|
|
499
499
|
class: S(I.value)
|
|
500
500
|
}, [
|
|
501
501
|
m("div", za, [
|
|
@@ -512,7 +512,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
512
512
|
onClick: X(_, ["stop"]),
|
|
513
513
|
onKeydown: H
|
|
514
514
|
}, [
|
|
515
|
-
c.value ? (a(),
|
|
515
|
+
c.value ? (a(), l("span", Aa, C(c.value), 1)) : (a(), l("span", La, C(e.placeholder), 1)),
|
|
516
516
|
x(N, {
|
|
517
517
|
name: "chevron-down",
|
|
518
518
|
class: "ds-select__chevron",
|
|
@@ -521,7 +521,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
521
521
|
], 42, Da),
|
|
522
522
|
x(ae, { name: "ds-select-drop" }, {
|
|
523
523
|
default: U(() => [
|
|
524
|
-
d.value ? (a(),
|
|
524
|
+
d.value ? (a(), l("div", {
|
|
525
525
|
key: 0,
|
|
526
526
|
id: O.value,
|
|
527
527
|
ref_key: "dropdownRef",
|
|
@@ -531,7 +531,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
531
531
|
onClick: z[0] || (z[0] = X(() => {
|
|
532
532
|
}, ["stop"]))
|
|
533
533
|
}, [
|
|
534
|
-
(a(!0),
|
|
534
|
+
(a(!0), l(j, null, W(t.options, (y, $) => (a(), l("div", {
|
|
535
535
|
key: String(o(y)),
|
|
536
536
|
role: "option",
|
|
537
537
|
"aria-selected": o(y) === e.modelValue,
|
|
@@ -567,7 +567,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
567
567
|
},
|
|
568
568
|
emits: ["update:modelValue", "change"],
|
|
569
569
|
setup(e, { emit: s }) {
|
|
570
|
-
const t = e,
|
|
570
|
+
const t = e, n = s, i = P(""), o = P(!1), r = P(null), c = P(null), d = P(-1);
|
|
571
571
|
function v(p) {
|
|
572
572
|
return typeof p == "object" && p !== null ? p : { label: String(p), value: p };
|
|
573
573
|
}
|
|
@@ -590,12 +590,12 @@ const pa = /* @__PURE__ */ A({
|
|
|
590
590
|
}
|
|
591
591
|
function V(p) {
|
|
592
592
|
const z = [...t.modelValue], y = z.indexOf(p.value);
|
|
593
|
-
y > -1 ? z.splice(y, 1) : z.push(p.value),
|
|
593
|
+
y > -1 ? z.splice(y, 1) : z.push(p.value), n("update:modelValue", z), n("change", z), i.value = "";
|
|
594
594
|
}
|
|
595
595
|
function H(p) {
|
|
596
596
|
if (t.disabled) return;
|
|
597
597
|
const z = t.modelValue.filter((y) => y !== p);
|
|
598
|
-
|
|
598
|
+
n("update:modelValue", z), n("change", z);
|
|
599
599
|
}
|
|
600
600
|
function w(p) {
|
|
601
601
|
if (!t.disabled) {
|
|
@@ -641,7 +641,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
641
641
|
"ds-multi-select--open": o.value
|
|
642
642
|
}
|
|
643
643
|
]);
|
|
644
|
-
return (p, z) => (a(),
|
|
644
|
+
return (p, z) => (a(), l("div", {
|
|
645
645
|
class: S(O.value)
|
|
646
646
|
}, [
|
|
647
647
|
m("div", Pa, [
|
|
@@ -671,7 +671,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
671
671
|
], 2),
|
|
672
672
|
x(ae, { name: "ds-multi-select-drop" }, {
|
|
673
673
|
default: U(() => [
|
|
674
|
-
o.value ? (a(),
|
|
674
|
+
o.value ? (a(), l("div", {
|
|
675
675
|
key: 0,
|
|
676
676
|
ref_key: "dropdownRef",
|
|
677
677
|
ref: c,
|
|
@@ -680,8 +680,8 @@ const pa = /* @__PURE__ */ A({
|
|
|
680
680
|
onClick: z[1] || (z[1] = X(() => {
|
|
681
681
|
}, ["stop"]))
|
|
682
682
|
}, [
|
|
683
|
-
h.value.length === 0 ? (a(),
|
|
684
|
-
(a(!0),
|
|
683
|
+
h.value.length === 0 ? (a(), l("div", Ra, C(i.value ? "نتیجهای یافت نشد" : "گزینهای وجود ندارد"), 1)) : f("", !0),
|
|
684
|
+
(a(!0), l(j, null, W(h.value, (y, $) => (a(), l("div", {
|
|
685
685
|
key: String(y.value),
|
|
686
686
|
role: "option",
|
|
687
687
|
"aria-selected": k(y.value),
|
|
@@ -705,8 +705,8 @@ const pa = /* @__PURE__ */ A({
|
|
|
705
705
|
_: 1
|
|
706
706
|
})
|
|
707
707
|
]),
|
|
708
|
-
_.value.length > 0 ? (a(),
|
|
709
|
-
(a(!0),
|
|
708
|
+
_.value.length > 0 ? (a(), l("div", Ua, [
|
|
709
|
+
(a(!0), l(j, null, W(_.value, (y) => (a(), l("div", {
|
|
710
710
|
key: String(y.value),
|
|
711
711
|
class: "ds-multi-select__tag"
|
|
712
712
|
}, [
|
|
@@ -740,7 +740,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
740
740
|
},
|
|
741
741
|
emits: ["update:modelValue", "change"],
|
|
742
742
|
setup(e, { emit: s }) {
|
|
743
|
-
const t = e,
|
|
743
|
+
const t = e, n = s, i = g(() => !!t.modelValue), o = g(() => [
|
|
744
744
|
"ds-checkbox",
|
|
745
745
|
{
|
|
746
746
|
"ds-checkbox--checked": i.value,
|
|
@@ -751,9 +751,9 @@ const pa = /* @__PURE__ */ A({
|
|
|
751
751
|
function r() {
|
|
752
752
|
if (t.disabled) return;
|
|
753
753
|
const c = !i.value;
|
|
754
|
-
|
|
754
|
+
n("update:modelValue", c), n("change", c);
|
|
755
755
|
}
|
|
756
|
-
return (c, d) => (a(),
|
|
756
|
+
return (c, d) => (a(), l("div", {
|
|
757
757
|
class: S(o.value),
|
|
758
758
|
onClick: r
|
|
759
759
|
}, [
|
|
@@ -776,7 +776,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
776
776
|
class: "ds-checkbox__check-icon"
|
|
777
777
|
})) : f("", !0)
|
|
778
778
|
]),
|
|
779
|
-
e.label || c.$slots.default ? (a(),
|
|
779
|
+
e.label || c.$slots.default ? (a(), l("span", Ya, [
|
|
780
780
|
K(c.$slots, "default", {}, () => [
|
|
781
781
|
x(G, {
|
|
782
782
|
variant: "body-sm",
|
|
@@ -799,7 +799,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
799
799
|
},
|
|
800
800
|
emits: ["update:modelValue", "change"],
|
|
801
801
|
setup(e, { emit: s }) {
|
|
802
|
-
const t = e,
|
|
802
|
+
const t = e, n = s, i = g(() => !!t.modelValue), o = g(() => [
|
|
803
803
|
"ds-switch",
|
|
804
804
|
{
|
|
805
805
|
"ds-switch--checked": i.value,
|
|
@@ -809,9 +809,9 @@ const pa = /* @__PURE__ */ A({
|
|
|
809
809
|
function r() {
|
|
810
810
|
if (t.disabled) return;
|
|
811
811
|
const c = !i.value;
|
|
812
|
-
|
|
812
|
+
n("update:modelValue", c), n("change", c);
|
|
813
813
|
}
|
|
814
|
-
return (c, d) => (a(),
|
|
814
|
+
return (c, d) => (a(), l("div", {
|
|
815
815
|
class: S(o.value),
|
|
816
816
|
onClick: r
|
|
817
817
|
}, [
|
|
@@ -830,7 +830,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
830
830
|
d[1] || (d[1] = m("div", { class: "ds-switch__track" }, [
|
|
831
831
|
m("div", { class: "ds-switch__thumb" })
|
|
832
832
|
], -1)),
|
|
833
|
-
e.label || c.$slots.default ? (a(),
|
|
833
|
+
e.label || c.$slots.default ? (a(), l("span", Ja, [
|
|
834
834
|
K(c.$slots, "default", {}, () => [
|
|
835
835
|
x(G, {
|
|
836
836
|
variant: "body-sm",
|
|
@@ -843,10 +843,10 @@ const pa = /* @__PURE__ */ A({
|
|
|
843
843
|
}), es = /* @__PURE__ */ L(Qa, [["__scopeId", "data-v-907da2d8"]]), ts = ["for"], as = {
|
|
844
844
|
key: 0,
|
|
845
845
|
class: "ds-form-field__required"
|
|
846
|
-
}, ss = { class: "ds-form-field__control" },
|
|
846
|
+
}, ss = { class: "ds-form-field__control" }, ns = {
|
|
847
847
|
key: 1,
|
|
848
848
|
class: "ds-form-field__hint"
|
|
849
|
-
},
|
|
849
|
+
}, ls = {
|
|
850
850
|
key: 2,
|
|
851
851
|
class: "ds-form-field__error"
|
|
852
852
|
}, os = /* @__PURE__ */ A({
|
|
@@ -861,10 +861,10 @@ const pa = /* @__PURE__ */ A({
|
|
|
861
861
|
},
|
|
862
862
|
setup(e) {
|
|
863
863
|
const s = e, t = g(() => (typeof s.error == "string", !!s.error));
|
|
864
|
-
return (
|
|
864
|
+
return (n, i) => (a(), l("div", {
|
|
865
865
|
class: S(["ds-form-field", { "ds-form-field--error": t.value, "ds-form-field--disabled": e.disabled }])
|
|
866
866
|
}, [
|
|
867
|
-
e.label ? (a(),
|
|
867
|
+
e.label ? (a(), l("label", {
|
|
868
868
|
key: 0,
|
|
869
869
|
for: e.id,
|
|
870
870
|
class: "ds-form-field__label"
|
|
@@ -873,18 +873,18 @@ const pa = /* @__PURE__ */ A({
|
|
|
873
873
|
variant: "body-sm",
|
|
874
874
|
value: e.label
|
|
875
875
|
}, null, 8, ["value"]),
|
|
876
|
-
e.required ? (a(),
|
|
876
|
+
e.required ? (a(), l("span", as, "*")) : f("", !0)
|
|
877
877
|
], 8, ts)) : f("", !0),
|
|
878
878
|
m("div", ss, [
|
|
879
|
-
K(
|
|
879
|
+
K(n.$slots, "default", {}, void 0, !0)
|
|
880
880
|
]),
|
|
881
|
-
e.hint && !t.value ? (a(),
|
|
881
|
+
e.hint && !t.value ? (a(), l("span", ns, [
|
|
882
882
|
x(G, {
|
|
883
883
|
variant: "caption",
|
|
884
884
|
value: e.hint
|
|
885
885
|
}, null, 8, ["value"])
|
|
886
886
|
])) : f("", !0),
|
|
887
|
-
typeof e.error == "string" && e.error ? (a(),
|
|
887
|
+
typeof e.error == "string" && e.error ? (a(), l("span", ls, [
|
|
888
888
|
x(G, {
|
|
889
889
|
variant: "caption",
|
|
890
890
|
value: e.error
|
|
@@ -911,16 +911,16 @@ const pa = /* @__PURE__ */ A({
|
|
|
911
911
|
xl: "8"
|
|
912
912
|
}[o];
|
|
913
913
|
return c ? `var(--space-${c})` : /^\d+(-\d+)?$/.test(o) ? `var(--space-${o})` : o;
|
|
914
|
-
},
|
|
914
|
+
}, n = g(() => {
|
|
915
915
|
const o = {}, r = t(s.size), c = s.mobile ? t(s.mobile) : void 0, d = s.desktop ? t(s.desktop) : void 0;
|
|
916
916
|
return s.orientation === "vertical" ? (o["--spacer-height"] = r, c && (o["--spacer-mobile-height"] = c), d && (o["--spacer-desktop-height"] = d)) : (o["--spacer-width"] = r, c && (o["--spacer-mobile-width"] = c), d && (o["--spacer-desktop-width"] = d)), o;
|
|
917
917
|
}), i = g(() => [
|
|
918
918
|
"ds-spacer",
|
|
919
919
|
`ds-spacer--${s.orientation}`
|
|
920
920
|
]);
|
|
921
|
-
return (o, r) => (a(),
|
|
921
|
+
return (o, r) => (a(), l("div", {
|
|
922
922
|
class: S(i.value),
|
|
923
|
-
style: Q(
|
|
923
|
+
style: Q(n.value),
|
|
924
924
|
role: "presentation"
|
|
925
925
|
}, null, 6));
|
|
926
926
|
}
|
|
@@ -952,7 +952,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
952
952
|
},
|
|
953
953
|
emits: ["update:modelValue", "focus", "blur", "input"],
|
|
954
954
|
setup(e, { emit: s }) {
|
|
955
|
-
const t = e,
|
|
955
|
+
const t = e, n = s, { t: i } = Ne(), o = g(() => {
|
|
956
956
|
const d = (t.modelValue || "").trim();
|
|
957
957
|
return d ? d.split(/\s+/).filter(Boolean).length : 0;
|
|
958
958
|
}), r = g(() => [
|
|
@@ -966,9 +966,9 @@ const pa = /* @__PURE__ */ A({
|
|
|
966
966
|
]);
|
|
967
967
|
function c(d) {
|
|
968
968
|
const v = d.target;
|
|
969
|
-
|
|
969
|
+
n("update:modelValue", v.value), n("input", d);
|
|
970
970
|
}
|
|
971
|
-
return (d, v) => (a(),
|
|
971
|
+
return (d, v) => (a(), l("div", {
|
|
972
972
|
class: S(r.value)
|
|
973
973
|
}, [
|
|
974
974
|
m("textarea", {
|
|
@@ -982,12 +982,12 @@ const pa = /* @__PURE__ */ A({
|
|
|
982
982
|
minlength: e.minlength,
|
|
983
983
|
class: "ds-textarea__field",
|
|
984
984
|
onInput: c,
|
|
985
|
-
onFocus: v[0] || (v[0] = (u) =>
|
|
986
|
-
onBlur: v[1] || (v[1] = (u) =>
|
|
985
|
+
onFocus: v[0] || (v[0] = (u) => n("focus", u)),
|
|
986
|
+
onBlur: v[1] || (v[1] = (u) => n("blur", u))
|
|
987
987
|
}, null, 40, ds),
|
|
988
|
-
e.showCounter && e.maxlength || e.showWordCount && e.maxWords ? (a(),
|
|
989
|
-
e.showCounter && e.maxlength ? (a(),
|
|
990
|
-
e.showWordCount && e.maxWords ? (a(),
|
|
988
|
+
e.showCounter && e.maxlength || e.showWordCount && e.maxWords ? (a(), l("div", us, [
|
|
989
|
+
e.showCounter && e.maxlength ? (a(), l("span", ms, C((e.modelValue || "").length) + " / " + C(e.maxlength), 1)) : f("", !0),
|
|
990
|
+
e.showWordCount && e.maxWords ? (a(), l("span", fs, C(o.value) + " / " + C(e.maxWords) + " " + C(R(i)("textarea.words")), 1)) : f("", !0)
|
|
991
991
|
])) : f("", !0)
|
|
992
992
|
], 2));
|
|
993
993
|
}
|
|
@@ -1011,10 +1011,10 @@ const pa = /* @__PURE__ */ A({
|
|
|
1011
1011
|
"ds-stack--separator": s.separator
|
|
1012
1012
|
}
|
|
1013
1013
|
]);
|
|
1014
|
-
return (
|
|
1014
|
+
return (n, i) => (a(), l("div", {
|
|
1015
1015
|
class: S(t.value)
|
|
1016
1016
|
}, [
|
|
1017
|
-
K(
|
|
1017
|
+
K(n.$slots, "default", {}, void 0, !0)
|
|
1018
1018
|
], 2));
|
|
1019
1019
|
}
|
|
1020
1020
|
}), hs = /* @__PURE__ */ L(bs, [["__scopeId", "data-v-cf20cd02"]]), gs = /* @__PURE__ */ A({
|
|
@@ -1035,10 +1035,10 @@ const pa = /* @__PURE__ */ A({
|
|
|
1035
1035
|
"ds-row--wrap": s.wrap
|
|
1036
1036
|
}
|
|
1037
1037
|
]);
|
|
1038
|
-
return (
|
|
1038
|
+
return (n, i) => (a(), l("div", {
|
|
1039
1039
|
class: S(t.value)
|
|
1040
1040
|
}, [
|
|
1041
|
-
K(
|
|
1041
|
+
K(n.$slots, "default", {}, void 0, !0)
|
|
1042
1042
|
], 2));
|
|
1043
1043
|
}
|
|
1044
1044
|
}), _s = /* @__PURE__ */ L(gs, [["__scopeId", "data-v-b1229c0b"]]), ys = /* @__PURE__ */ A({
|
|
@@ -1056,12 +1056,12 @@ const pa = /* @__PURE__ */ A({
|
|
|
1056
1056
|
"--grid-cols-sm": s.sm || s.cols,
|
|
1057
1057
|
"--grid-cols-md": s.md || s.sm || s.cols,
|
|
1058
1058
|
"--grid-cols-lg": s.lg || s.md || s.sm || s.cols
|
|
1059
|
-
})),
|
|
1059
|
+
})), n = g(() => [
|
|
1060
1060
|
"ds-grid",
|
|
1061
1061
|
`ds-grid--gap-${s.gap}`
|
|
1062
1062
|
]);
|
|
1063
|
-
return (i, o) => (a(),
|
|
1064
|
-
class: S(
|
|
1063
|
+
return (i, o) => (a(), l("div", {
|
|
1064
|
+
class: S(n.value),
|
|
1065
1065
|
style: Q(t.value)
|
|
1066
1066
|
}, [
|
|
1067
1067
|
K(i.$slots, "default", {}, void 0, !0)
|
|
@@ -1087,10 +1087,10 @@ const pa = /* @__PURE__ */ A({
|
|
|
1087
1087
|
"ds-section--bordered": s.bordered
|
|
1088
1088
|
}
|
|
1089
1089
|
]);
|
|
1090
|
-
return (
|
|
1090
|
+
return (n, i) => (a(), l("section", {
|
|
1091
1091
|
class: S(t.value)
|
|
1092
1092
|
}, [
|
|
1093
|
-
e.title || e.subtitle ||
|
|
1093
|
+
e.title || e.subtitle || n.$slots.actions ? (a(), l("div", ws, [
|
|
1094
1094
|
m("div", $s, [
|
|
1095
1095
|
e.title ? (a(), T(G, {
|
|
1096
1096
|
key: 0,
|
|
@@ -1105,12 +1105,12 @@ const pa = /* @__PURE__ */ A({
|
|
|
1105
1105
|
class: "ds-section__subtitle"
|
|
1106
1106
|
}, null, 8, ["value"])) : f("", !0)
|
|
1107
1107
|
]),
|
|
1108
|
-
|
|
1109
|
-
K(
|
|
1108
|
+
n.$slots.actions ? (a(), l("div", Cs, [
|
|
1109
|
+
K(n.$slots, "actions", {}, void 0, !0)
|
|
1110
1110
|
])) : f("", !0)
|
|
1111
1111
|
])) : f("", !0),
|
|
1112
1112
|
m("div", xs, [
|
|
1113
|
-
K(
|
|
1113
|
+
K(n.$slots, "default", {}, void 0, !0)
|
|
1114
1114
|
])
|
|
1115
1115
|
], 2));
|
|
1116
1116
|
}
|
|
@@ -1140,13 +1140,13 @@ const pa = /* @__PURE__ */ A({
|
|
|
1140
1140
|
padding: { type: Boolean, default: !0 }
|
|
1141
1141
|
},
|
|
1142
1142
|
setup(e) {
|
|
1143
|
-
return (s, t) => (a(),
|
|
1144
|
-
e.title || s.$slots.header ? (a(),
|
|
1145
|
-
e.title || e.subtitle ? (a(),
|
|
1146
|
-
e.title ? (a(),
|
|
1147
|
-
e.subtitle ? (a(),
|
|
1143
|
+
return (s, t) => (a(), l("div", Bs, [
|
|
1144
|
+
e.title || s.$slots.header ? (a(), l("div", Vs, [
|
|
1145
|
+
e.title || e.subtitle ? (a(), l("div", zs, [
|
|
1146
|
+
e.title ? (a(), l("h3", Ds, C(e.title), 1)) : f("", !0),
|
|
1147
|
+
e.subtitle ? (a(), l("p", As, C(e.subtitle), 1)) : f("", !0)
|
|
1148
1148
|
])) : f("", !0),
|
|
1149
|
-
s.$slots.header ? (a(),
|
|
1149
|
+
s.$slots.header ? (a(), l("div", Ls, [
|
|
1150
1150
|
K(s.$slots, "header", {}, void 0, !0)
|
|
1151
1151
|
])) : f("", !0)
|
|
1152
1152
|
])) : f("", !0),
|
|
@@ -1155,7 +1155,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
1155
1155
|
}, [
|
|
1156
1156
|
K(s.$slots, "default", {}, void 0, !0)
|
|
1157
1157
|
], 2),
|
|
1158
|
-
s.$slots.footer ? (a(),
|
|
1158
|
+
s.$slots.footer ? (a(), l("div", Ts, [
|
|
1159
1159
|
K(s.$slots, "footer", {}, void 0, !0)
|
|
1160
1160
|
])) : f("", !0)
|
|
1161
1161
|
]));
|
|
@@ -1169,10 +1169,10 @@ const pa = /* @__PURE__ */ A({
|
|
|
1169
1169
|
}, Gs = { class: "sp-head" }, Ys = { class: "sp-title" }, Xs = { key: 0 }, Zs = {
|
|
1170
1170
|
key: 1,
|
|
1171
1171
|
class: "sp-meta"
|
|
1172
|
-
}, Js = { key: 0 }, Qs = { key: 0 },
|
|
1172
|
+
}, Js = { key: 0 }, Qs = { key: 0 }, en = { class: "sp-actions" }, tn = ["aria-label"], an = ["aria-label"], sn = { class: "sp-content" }, nn = {
|
|
1173
1173
|
key: 0,
|
|
1174
1174
|
class: "sp-footer"
|
|
1175
|
-
},
|
|
1175
|
+
}, ln = /* @__PURE__ */ A({
|
|
1176
1176
|
__name: "SidePanel",
|
|
1177
1177
|
props: {
|
|
1178
1178
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1191,15 +1191,15 @@ const pa = /* @__PURE__ */ A({
|
|
|
1191
1191
|
},
|
|
1192
1192
|
emits: ["update:modelValue", "update:maximized", "close", "cancel", "confirm"],
|
|
1193
1193
|
setup(e, { emit: s }) {
|
|
1194
|
-
const t = e,
|
|
1194
|
+
const t = e, n = s, i = P(!1);
|
|
1195
1195
|
ee(() => t.maximized, (u) => {
|
|
1196
1196
|
i.value = u;
|
|
1197
1197
|
}, { immediate: !0 });
|
|
1198
1198
|
function o() {
|
|
1199
|
-
i.value = !i.value,
|
|
1199
|
+
i.value = !i.value, n("update:maximized", i.value);
|
|
1200
1200
|
}
|
|
1201
1201
|
function r() {
|
|
1202
|
-
|
|
1202
|
+
n("update:modelValue", !1), n("close");
|
|
1203
1203
|
}
|
|
1204
1204
|
function c(u) {
|
|
1205
1205
|
t.closeOnOverlayClick && u.target === u.currentTarget && r();
|
|
@@ -1208,14 +1208,14 @@ const pa = /* @__PURE__ */ A({
|
|
|
1208
1208
|
t.docked || (u ? document.body.style.overflow = "hidden" : document.body.style.overflow = "");
|
|
1209
1209
|
});
|
|
1210
1210
|
function d() {
|
|
1211
|
-
|
|
1211
|
+
n("cancel"), r();
|
|
1212
1212
|
}
|
|
1213
1213
|
function v() {
|
|
1214
|
-
|
|
1214
|
+
n("confirm");
|
|
1215
1215
|
}
|
|
1216
1216
|
return (u, h) => {
|
|
1217
1217
|
var _;
|
|
1218
|
-
return e.docked ? (a(),
|
|
1218
|
+
return e.docked ? (a(), l("div", {
|
|
1219
1219
|
key: 1,
|
|
1220
1220
|
class: S(["sp-docked", {
|
|
1221
1221
|
"sp-docked--open": e.modelValue,
|
|
@@ -1230,21 +1230,21 @@ const pa = /* @__PURE__ */ A({
|
|
|
1230
1230
|
}, [
|
|
1231
1231
|
m("div", Gs, [
|
|
1232
1232
|
m("div", Ys, [
|
|
1233
|
-
e.title ? (a(),
|
|
1234
|
-
e.subtitle || u.$slots.subtitle || (_ = e.metaItems) != null && _.length ? (a(),
|
|
1233
|
+
e.title ? (a(), l("h2", Xs, C(e.title), 1)) : f("", !0),
|
|
1234
|
+
e.subtitle || u.$slots.subtitle || (_ = e.metaItems) != null && _.length ? (a(), l("div", Zs, [
|
|
1235
1235
|
K(u.$slots, "subtitle", {}, () => {
|
|
1236
1236
|
var k;
|
|
1237
1237
|
return [
|
|
1238
|
-
e.subtitle ? (a(),
|
|
1238
|
+
e.subtitle ? (a(), l("span", Js, C(e.subtitle), 1)) : (k = e.metaItems) != null && k.length ? (a(!0), l(j, { key: 1 }, W(e.metaItems, (M, B) => (a(), l(j, { key: B }, [
|
|
1239
1239
|
m("span", null, C(M), 1),
|
|
1240
|
-
B < e.metaItems.length - 1 ? (a(),
|
|
1240
|
+
B < e.metaItems.length - 1 ? (a(), l("span", Qs, "·")) : f("", !0)
|
|
1241
1241
|
], 64))), 128)) : f("", !0)
|
|
1242
1242
|
];
|
|
1243
1243
|
}, !0)
|
|
1244
1244
|
])) : f("", !0)
|
|
1245
1245
|
]),
|
|
1246
|
-
m("div",
|
|
1247
|
-
e.maximizable ? (a(),
|
|
1246
|
+
m("div", en, [
|
|
1247
|
+
e.maximizable ? (a(), l("button", {
|
|
1248
1248
|
key: 0,
|
|
1249
1249
|
class: "sp-icon-btn",
|
|
1250
1250
|
onClick: o,
|
|
@@ -1257,20 +1257,20 @@ const pa = /* @__PURE__ */ A({
|
|
|
1257
1257
|
key: 1,
|
|
1258
1258
|
size: 18
|
|
1259
1259
|
}))
|
|
1260
|
-
], 8,
|
|
1260
|
+
], 8, tn)) : f("", !0),
|
|
1261
1261
|
m("button", {
|
|
1262
1262
|
class: "sp-icon-btn",
|
|
1263
1263
|
onClick: r,
|
|
1264
1264
|
"aria-label": R(F)("sidepanel.close")
|
|
1265
1265
|
}, [
|
|
1266
1266
|
x(R($e), { size: 18 })
|
|
1267
|
-
], 8,
|
|
1267
|
+
], 8, an)
|
|
1268
1268
|
])
|
|
1269
1269
|
]),
|
|
1270
|
-
m("div",
|
|
1270
|
+
m("div", sn, [
|
|
1271
1271
|
K(u.$slots, "default", {}, void 0, !0)
|
|
1272
1272
|
]),
|
|
1273
|
-
u.$slots.footer || e.cancelLabel || e.confirmLabel ? (a(),
|
|
1273
|
+
u.$slots.footer || e.cancelLabel || e.confirmLabel ? (a(), l("div", nn, [
|
|
1274
1274
|
K(u.$slots, "footer", {}, () => [
|
|
1275
1275
|
x(Z, {
|
|
1276
1276
|
variant: "secondary",
|
|
@@ -1301,7 +1301,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
1301
1301
|
default: U(() => {
|
|
1302
1302
|
var k;
|
|
1303
1303
|
return [
|
|
1304
|
-
e.modelValue ? (a(),
|
|
1304
|
+
e.modelValue ? (a(), l("div", {
|
|
1305
1305
|
key: 0,
|
|
1306
1306
|
class: S(["ds-panel-overlay", { "sp-overlay--inline": e.inline }]),
|
|
1307
1307
|
onClick: c
|
|
@@ -1314,21 +1314,21 @@ const pa = /* @__PURE__ */ A({
|
|
|
1314
1314
|
}, [
|
|
1315
1315
|
m("div", Ps, [
|
|
1316
1316
|
m("div", Os, [
|
|
1317
|
-
e.title ? (a(),
|
|
1318
|
-
e.subtitle || u.$slots.subtitle || (k = e.metaItems) != null && k.length ? (a(),
|
|
1317
|
+
e.title ? (a(), l("h2", Rs, C(e.title), 1)) : f("", !0),
|
|
1318
|
+
e.subtitle || u.$slots.subtitle || (k = e.metaItems) != null && k.length ? (a(), l("div", Ns, [
|
|
1319
1319
|
K(u.$slots, "subtitle", {}, () => {
|
|
1320
1320
|
var M;
|
|
1321
1321
|
return [
|
|
1322
|
-
e.subtitle ? (a(),
|
|
1322
|
+
e.subtitle ? (a(), l("span", Fs, C(e.subtitle), 1)) : (M = e.metaItems) != null && M.length ? (a(!0), l(j, { key: 1 }, W(e.metaItems, (B, V) => (a(), l(j, { key: V }, [
|
|
1323
1323
|
m("span", null, C(B), 1),
|
|
1324
|
-
V < e.metaItems.length - 1 ? (a(),
|
|
1324
|
+
V < e.metaItems.length - 1 ? (a(), l("span", Us, "·")) : f("", !0)
|
|
1325
1325
|
], 64))), 128)) : f("", !0)
|
|
1326
1326
|
];
|
|
1327
1327
|
}, !0)
|
|
1328
1328
|
])) : f("", !0)
|
|
1329
1329
|
]),
|
|
1330
1330
|
m("div", js, [
|
|
1331
|
-
e.maximizable ? (a(),
|
|
1331
|
+
e.maximizable ? (a(), l("button", {
|
|
1332
1332
|
key: 0,
|
|
1333
1333
|
class: "sp-icon-btn",
|
|
1334
1334
|
onClick: o,
|
|
@@ -1354,7 +1354,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
1354
1354
|
m("div", Hs, [
|
|
1355
1355
|
K(u.$slots, "default", {}, void 0, !0)
|
|
1356
1356
|
]),
|
|
1357
|
-
u.$slots.footer || e.cancelLabel || e.confirmLabel ? (a(),
|
|
1357
|
+
u.$slots.footer || e.cancelLabel || e.confirmLabel ? (a(), l("div", Ws, [
|
|
1358
1358
|
K(u.$slots, "footer", {}, () => [
|
|
1359
1359
|
x(Z, {
|
|
1360
1360
|
variant: "secondary",
|
|
@@ -1385,7 +1385,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
1385
1385
|
}));
|
|
1386
1386
|
};
|
|
1387
1387
|
}
|
|
1388
|
-
}),
|
|
1388
|
+
}), on = /* @__PURE__ */ L(ln, [["__scopeId", "data-v-aecb3469"]]), cn = { class: "ds-bulk-edit-bar" }, rn = { class: "ds-bulk-edit-bar__count" }, dn = { class: "ds-bulk-edit-bar__controls" }, un = { class: "ds-bulk-edit-bar__actions" }, mn = /* @__PURE__ */ A({
|
|
1389
1389
|
__name: "BulkEditBar",
|
|
1390
1390
|
props: {
|
|
1391
1391
|
columns: { default: () => [] },
|
|
@@ -1393,19 +1393,19 @@ const pa = /* @__PURE__ */ A({
|
|
|
1393
1393
|
},
|
|
1394
1394
|
emits: ["apply", "cancel"],
|
|
1395
1395
|
setup(e, { emit: s }) {
|
|
1396
|
-
const t = e,
|
|
1396
|
+
const t = e, n = s, i = g(() => t.columns.filter((v) => v.editable)), o = P(""), r = P("");
|
|
1397
1397
|
ee(o, () => {
|
|
1398
1398
|
r.value = "";
|
|
1399
1399
|
});
|
|
1400
1400
|
const c = g(() => i.value.find((v) => v.id === o.value));
|
|
1401
1401
|
function d() {
|
|
1402
|
-
o.value && (
|
|
1402
|
+
o.value && (n("apply", { field: o.value, value: r.value }), o.value = "", r.value = "");
|
|
1403
1403
|
}
|
|
1404
1404
|
return (v, u) => {
|
|
1405
1405
|
var h, _;
|
|
1406
|
-
return a(),
|
|
1407
|
-
m("span",
|
|
1408
|
-
m("div",
|
|
1406
|
+
return a(), l("div", cn, [
|
|
1407
|
+
m("span", rn, C(e.selectedCount) + " selected", 1),
|
|
1408
|
+
m("div", dn, [
|
|
1409
1409
|
x(Ce, {
|
|
1410
1410
|
modelValue: o.value,
|
|
1411
1411
|
"onUpdate:modelValue": u[0] || (u[0] = (k) => o.value = k),
|
|
@@ -1413,7 +1413,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
1413
1413
|
placeholder: "Select field...",
|
|
1414
1414
|
class: "ds-bulk-edit-bar__field-select"
|
|
1415
1415
|
}, null, 8, ["modelValue", "options"]),
|
|
1416
|
-
c.value ? (a(),
|
|
1416
|
+
c.value ? (a(), l(j, { key: 0 }, [
|
|
1417
1417
|
((h = c.value.editorOptions) == null ? void 0 : h.type) === "input" ? (a(), T(ve, {
|
|
1418
1418
|
key: 0,
|
|
1419
1419
|
modelValue: r.value,
|
|
@@ -1432,11 +1432,11 @@ const pa = /* @__PURE__ */ A({
|
|
|
1432
1432
|
}, null, 8, ["modelValue", "options"])) : f("", !0)
|
|
1433
1433
|
], 64)) : f("", !0)
|
|
1434
1434
|
]),
|
|
1435
|
-
m("div",
|
|
1435
|
+
m("div", un, [
|
|
1436
1436
|
x(Z, {
|
|
1437
1437
|
variant: "ghost",
|
|
1438
1438
|
size: "sm",
|
|
1439
|
-
onClick: u[3] || (u[3] = (k) =>
|
|
1439
|
+
onClick: u[3] || (u[3] = (k) => n("cancel"))
|
|
1440
1440
|
}, {
|
|
1441
1441
|
default: U(() => [...u[4] || (u[4] = [
|
|
1442
1442
|
Y("Cancel", -1)
|
|
@@ -1458,16 +1458,16 @@ const pa = /* @__PURE__ */ A({
|
|
|
1458
1458
|
]);
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
|
-
}), Ue = /* @__PURE__ */ L(
|
|
1461
|
+
}), Ue = /* @__PURE__ */ L(mn, [["__scopeId", "data-v-ea3e8318"]]), fn = { class: "ds-search-box__wrapper" }, vn = {
|
|
1462
1462
|
key: 0,
|
|
1463
1463
|
class: "ds-search-box__action-container"
|
|
1464
|
-
},
|
|
1464
|
+
}, pn = {
|
|
1465
1465
|
key: 0,
|
|
1466
1466
|
class: "ds-search-box__spinner"
|
|
1467
|
-
},
|
|
1467
|
+
}, bn = {
|
|
1468
1468
|
key: 0,
|
|
1469
1469
|
class: "ds-search-box__dropdown"
|
|
1470
|
-
},
|
|
1470
|
+
}, hn = ["onClick", "onMouseenter"], gn = /* @__PURE__ */ A({
|
|
1471
1471
|
__name: "SearchBox",
|
|
1472
1472
|
props: {
|
|
1473
1473
|
modelValue: { default: "" },
|
|
@@ -1479,7 +1479,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
1479
1479
|
},
|
|
1480
1480
|
emits: ["update:modelValue", "clear", "select"],
|
|
1481
1481
|
setup(e, { emit: s }) {
|
|
1482
|
-
const t = e,
|
|
1482
|
+
const t = e, n = s, i = g(() => t.modelValue), o = P(!1), r = P(null), c = P(-1), d = g(() => t.options.map((V) => typeof V == "object" && V !== null ? V : { label: String(V), value: String(V) })), v = g(() => {
|
|
1483
1483
|
const V = i.value.toLowerCase().trim();
|
|
1484
1484
|
return V ? d.value.filter(
|
|
1485
1485
|
(H) => H.label.toLowerCase().includes(V)
|
|
@@ -1489,13 +1489,13 @@ const pa = /* @__PURE__ */ A({
|
|
|
1489
1489
|
c.value = -1;
|
|
1490
1490
|
});
|
|
1491
1491
|
function h(V) {
|
|
1492
|
-
|
|
1492
|
+
n("update:modelValue", V);
|
|
1493
1493
|
}
|
|
1494
1494
|
function _() {
|
|
1495
|
-
t.disabled || (
|
|
1495
|
+
t.disabled || (n("update:modelValue", ""), n("clear"));
|
|
1496
1496
|
}
|
|
1497
1497
|
function k(V) {
|
|
1498
|
-
|
|
1498
|
+
n("update:modelValue", V.value), n("select", V.value), o.value = !1, c.value = -1;
|
|
1499
1499
|
}
|
|
1500
1500
|
function M(V) {
|
|
1501
1501
|
if (!t.disabled) {
|
|
@@ -1531,12 +1531,12 @@ const pa = /* @__PURE__ */ A({
|
|
|
1531
1531
|
document.addEventListener("click", B);
|
|
1532
1532
|
}), oe(() => {
|
|
1533
1533
|
document.removeEventListener("click", B);
|
|
1534
|
-
}), (V, H) => (a(),
|
|
1534
|
+
}), (V, H) => (a(), l("div", {
|
|
1535
1535
|
ref_key: "containerRef",
|
|
1536
1536
|
ref: r,
|
|
1537
1537
|
class: "ds-search-box"
|
|
1538
1538
|
}, [
|
|
1539
|
-
m("div",
|
|
1539
|
+
m("div", fn, [
|
|
1540
1540
|
x(ve, {
|
|
1541
1541
|
"model-value": i.value,
|
|
1542
1542
|
placeholder: e.placeholder,
|
|
@@ -1547,8 +1547,8 @@ const pa = /* @__PURE__ */ A({
|
|
|
1547
1547
|
onFocus: H[0] || (H[0] = (w) => o.value = !0),
|
|
1548
1548
|
onKeydown: M
|
|
1549
1549
|
}, null, 8, ["model-value", "placeholder", "disabled"]),
|
|
1550
|
-
e.loading || e.clearable && i.value ? (a(),
|
|
1551
|
-
e.loading ? (a(),
|
|
1550
|
+
e.loading || e.clearable && i.value ? (a(), l("div", vn, [
|
|
1551
|
+
e.loading ? (a(), l("span", pn)) : e.clearable && i.value ? (a(), l("button", {
|
|
1552
1552
|
key: 1,
|
|
1553
1553
|
type: "button",
|
|
1554
1554
|
class: "ds-search-box__clear",
|
|
@@ -1562,15 +1562,15 @@ const pa = /* @__PURE__ */ A({
|
|
|
1562
1562
|
])) : f("", !0),
|
|
1563
1563
|
x(ae, { name: "ds-search-box-drop" }, {
|
|
1564
1564
|
default: U(() => [
|
|
1565
|
-
u.value ? (a(),
|
|
1566
|
-
(a(!0),
|
|
1565
|
+
u.value ? (a(), l("div", bn, [
|
|
1566
|
+
(a(!0), l(j, null, W(v.value, (w, I) => (a(), l("div", {
|
|
1567
1567
|
key: w.value,
|
|
1568
1568
|
class: S(["ds-search-box__option", {
|
|
1569
1569
|
"ds-search-box__option--focused": I === c.value
|
|
1570
1570
|
}]),
|
|
1571
1571
|
onClick: X((O) => k(w), ["stop"]),
|
|
1572
1572
|
onMouseenter: (O) => c.value = I
|
|
1573
|
-
}, C(w.label), 43,
|
|
1573
|
+
}, C(w.label), 43, hn))), 128))
|
|
1574
1574
|
])) : f("", !0)
|
|
1575
1575
|
]),
|
|
1576
1576
|
_: 1
|
|
@@ -1578,10 +1578,10 @@ const pa = /* @__PURE__ */ A({
|
|
|
1578
1578
|
])
|
|
1579
1579
|
], 512));
|
|
1580
1580
|
}
|
|
1581
|
-
}),
|
|
1581
|
+
}), _n = /* @__PURE__ */ L(gn, [["__scopeId", "data-v-59094448"]]), yn = {
|
|
1582
1582
|
key: 0,
|
|
1583
1583
|
class: "ds-dropdown__empty"
|
|
1584
|
-
},
|
|
1584
|
+
}, kn = ["onClick", "onMouseenter"], wn = { class: "ds-dropdown__item-content" }, $n = { class: "ds-dropdown__item-label" }, Cn = /* @__PURE__ */ A({
|
|
1585
1585
|
__name: "Dropdown",
|
|
1586
1586
|
props: {
|
|
1587
1587
|
modelValue: { default: "" },
|
|
@@ -1596,7 +1596,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
1596
1596
|
},
|
|
1597
1597
|
emits: ["update:modelValue", "change", "select"],
|
|
1598
1598
|
setup(e, { expose: s, emit: t }) {
|
|
1599
|
-
const
|
|
1599
|
+
const n = e, i = t, o = {
|
|
1600
1600
|
users: [
|
|
1601
1601
|
{ id: "1", label: "کاربر ۱ (مدیر)", value: "user1", icon: "users" },
|
|
1602
1602
|
{ id: "2", label: "کاربر ۲ (نویسنده)", value: "user2", icon: "users" },
|
|
@@ -1606,9 +1606,9 @@ const pa = /* @__PURE__ */ A({
|
|
|
1606
1606
|
{ id: "edit", label: "ویرایش", value: "edit", icon: "edit" },
|
|
1607
1607
|
{ id: "delete", label: "حذف", value: "delete", icon: "trash" }
|
|
1608
1608
|
]
|
|
1609
|
-
}, r = g(() =>
|
|
1609
|
+
}, r = g(() => n.source && o[n.source] ? o[n.source] : n.items), c = g(() => n.modelValue || ""), d = g(() => r.value.find((I) => I.value === c.value)), v = g(() => n.label ? n.label : d.value ? d.value.label : n.placeholder), u = P(!1), h = P(null), _ = P(null), k = P(-1);
|
|
1610
1610
|
function M() {
|
|
1611
|
-
|
|
1611
|
+
n.disabled || (u.value = !u.value);
|
|
1612
1612
|
}
|
|
1613
1613
|
function B() {
|
|
1614
1614
|
u.value = !1, k.value = -1;
|
|
@@ -1617,7 +1617,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
1617
1617
|
I.disabled || (i("update:modelValue", I.value), i("change", I.value), i("select", I), B());
|
|
1618
1618
|
}
|
|
1619
1619
|
function H(I) {
|
|
1620
|
-
if (!
|
|
1620
|
+
if (!n.disabled) {
|
|
1621
1621
|
if (!u.value) {
|
|
1622
1622
|
(I.key === "Enter" || I.key === "ArrowDown" || I.key === " ") && (I.preventDefault(), u.value = !0);
|
|
1623
1623
|
return;
|
|
@@ -1654,7 +1654,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
1654
1654
|
open: () => u.value = !0,
|
|
1655
1655
|
close: () => u.value = !1,
|
|
1656
1656
|
toggle: () => u.value = !u.value
|
|
1657
|
-
}), (I, O) => (a(),
|
|
1657
|
+
}), (I, O) => (a(), l("div", {
|
|
1658
1658
|
class: S(["ds-dropdown", { "ds-dropdown--open": u.value, "ds-dropdown--disabled": e.disabled }])
|
|
1659
1659
|
}, [
|
|
1660
1660
|
m("div", {
|
|
@@ -1683,15 +1683,15 @@ const pa = /* @__PURE__ */ A({
|
|
|
1683
1683
|
], 544),
|
|
1684
1684
|
x(ae, { name: "ds-dropdown-drop" }, {
|
|
1685
1685
|
default: U(() => [
|
|
1686
|
-
u.value ? (a(),
|
|
1686
|
+
u.value ? (a(), l("div", {
|
|
1687
1687
|
key: 0,
|
|
1688
1688
|
ref_key: "dropdownRef",
|
|
1689
1689
|
ref: _,
|
|
1690
1690
|
class: "ds-dropdown__menu"
|
|
1691
1691
|
}, [
|
|
1692
1692
|
K(I.$slots, "default", {}, () => [
|
|
1693
|
-
r.value.length === 0 ? (a(),
|
|
1694
|
-
(a(!0),
|
|
1693
|
+
r.value.length === 0 ? (a(), l("div", yn, C(e.emptyState ? e.emptyState.includes(".") ? R(F)(e.emptyState) : e.emptyState : "گزینهای وجود ندارد"), 1)) : f("", !0),
|
|
1694
|
+
(a(!0), l(j, null, W(r.value, (p, z) => (a(), l("div", {
|
|
1695
1695
|
key: p.id,
|
|
1696
1696
|
class: S(["ds-dropdown__item", {
|
|
1697
1697
|
"ds-dropdown__item--selected": p.value === c.value,
|
|
@@ -1701,16 +1701,16 @@ const pa = /* @__PURE__ */ A({
|
|
|
1701
1701
|
onClick: X((y) => V(p), ["stop"]),
|
|
1702
1702
|
onMouseenter: (y) => k.value = z
|
|
1703
1703
|
}, [
|
|
1704
|
-
m("div",
|
|
1704
|
+
m("div", wn, [
|
|
1705
1705
|
p.icon ? (a(), T(N, {
|
|
1706
1706
|
key: 0,
|
|
1707
1707
|
name: p.icon,
|
|
1708
1708
|
size: "sm",
|
|
1709
1709
|
class: "ds-dropdown__item-icon"
|
|
1710
1710
|
}, null, 8, ["name"])) : f("", !0),
|
|
1711
|
-
m("span",
|
|
1711
|
+
m("span", $n, C(p.label), 1)
|
|
1712
1712
|
])
|
|
1713
|
-
], 42,
|
|
1713
|
+
], 42, kn))), 128))
|
|
1714
1714
|
], !0)
|
|
1715
1715
|
], 512)) : f("", !0)
|
|
1716
1716
|
]),
|
|
@@ -1718,19 +1718,19 @@ const pa = /* @__PURE__ */ A({
|
|
|
1718
1718
|
})
|
|
1719
1719
|
], 2));
|
|
1720
1720
|
}
|
|
1721
|
-
}), Be = /* @__PURE__ */ L(
|
|
1721
|
+
}), Be = /* @__PURE__ */ L(Cn, [["__scopeId", "data-v-21c067bb"]]), xn = /* @__PURE__ */ A({
|
|
1722
1722
|
__name: "Menu",
|
|
1723
1723
|
props: {
|
|
1724
1724
|
variant: { default: "vertical" }
|
|
1725
1725
|
},
|
|
1726
1726
|
setup(e) {
|
|
1727
|
-
return (s, t) => (a(),
|
|
1727
|
+
return (s, t) => (a(), l("div", {
|
|
1728
1728
|
class: S(["ds-menu", `ds-menu--${e.variant}`])
|
|
1729
1729
|
}, [
|
|
1730
1730
|
K(s.$slots, "default", {}, void 0, !0)
|
|
1731
1731
|
], 2));
|
|
1732
1732
|
}
|
|
1733
|
-
}), je = /* @__PURE__ */ L(
|
|
1733
|
+
}), je = /* @__PURE__ */ L(xn, [["__scopeId", "data-v-9e21cb4a"]]), Sn = ["aria-disabled"], In = { class: "ds-menu-item__content" }, Bn = { class: "ds-menu-item__label" }, Vn = /* @__PURE__ */ A({
|
|
1734
1734
|
__name: "MenuItem",
|
|
1735
1735
|
props: {
|
|
1736
1736
|
label: {},
|
|
@@ -1740,15 +1740,15 @@ const pa = /* @__PURE__ */ A({
|
|
|
1740
1740
|
},
|
|
1741
1741
|
emits: ["click"],
|
|
1742
1742
|
setup(e, { emit: s }) {
|
|
1743
|
-
const t = e,
|
|
1743
|
+
const t = e, n = s;
|
|
1744
1744
|
function i(o) {
|
|
1745
1745
|
if (t.disabled) {
|
|
1746
1746
|
o.preventDefault(), o.stopPropagation();
|
|
1747
1747
|
return;
|
|
1748
1748
|
}
|
|
1749
|
-
|
|
1749
|
+
n("click", o);
|
|
1750
1750
|
}
|
|
1751
|
-
return (o, r) => (a(),
|
|
1751
|
+
return (o, r) => (a(), l("div", {
|
|
1752
1752
|
class: S(["ds-menu-item", {
|
|
1753
1753
|
"ds-menu-item--active": e.active,
|
|
1754
1754
|
"ds-menu-item--disabled": e.disabled
|
|
@@ -1757,14 +1757,14 @@ const pa = /* @__PURE__ */ A({
|
|
|
1757
1757
|
"aria-disabled": e.disabled,
|
|
1758
1758
|
onClick: i
|
|
1759
1759
|
}, [
|
|
1760
|
-
m("div",
|
|
1760
|
+
m("div", In, [
|
|
1761
1761
|
e.icon ? (a(), T(N, {
|
|
1762
1762
|
key: 0,
|
|
1763
1763
|
name: e.icon,
|
|
1764
1764
|
size: "sm",
|
|
1765
1765
|
class: "ds-menu-item__icon"
|
|
1766
1766
|
}, null, 8, ["name"])) : f("", !0),
|
|
1767
|
-
m("span",
|
|
1767
|
+
m("span", Bn, [
|
|
1768
1768
|
K(o.$slots, "default", {}, () => [
|
|
1769
1769
|
x(G, {
|
|
1770
1770
|
variant: "body-md",
|
|
@@ -1773,9 +1773,9 @@ const pa = /* @__PURE__ */ A({
|
|
|
1773
1773
|
], !0)
|
|
1774
1774
|
])
|
|
1775
1775
|
])
|
|
1776
|
-
], 10,
|
|
1776
|
+
], 10, Sn));
|
|
1777
1777
|
}
|
|
1778
|
-
}), fe = /* @__PURE__ */ L(
|
|
1778
|
+
}), fe = /* @__PURE__ */ L(Vn, [["__scopeId", "data-v-37b12109"]]), zn = /* @__PURE__ */ A({
|
|
1779
1779
|
__name: "Tooltip",
|
|
1780
1780
|
props: {
|
|
1781
1781
|
text: {},
|
|
@@ -1786,16 +1786,16 @@ const pa = /* @__PURE__ */ A({
|
|
|
1786
1786
|
},
|
|
1787
1787
|
setup(e) {
|
|
1788
1788
|
const s = e, t = P(!1);
|
|
1789
|
-
let
|
|
1789
|
+
let n = null;
|
|
1790
1790
|
function i() {
|
|
1791
|
-
s.disabled || (
|
|
1791
|
+
s.disabled || (n && clearTimeout(n), n = window.setTimeout(() => {
|
|
1792
1792
|
t.value = !0;
|
|
1793
1793
|
}, s.delay));
|
|
1794
1794
|
}
|
|
1795
1795
|
function o() {
|
|
1796
|
-
|
|
1796
|
+
n && clearTimeout(n), t.value = !1;
|
|
1797
1797
|
}
|
|
1798
|
-
return (r, c) => (a(),
|
|
1798
|
+
return (r, c) => (a(), l("div", {
|
|
1799
1799
|
class: "ds-tooltip-container",
|
|
1800
1800
|
onMouseenter: i,
|
|
1801
1801
|
onMouseleave: o,
|
|
@@ -1811,7 +1811,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
1811
1811
|
], !0),
|
|
1812
1812
|
x(ae, { name: "ds-tooltip-fade" }, {
|
|
1813
1813
|
default: U(() => [
|
|
1814
|
-
t.value ? (a(),
|
|
1814
|
+
t.value ? (a(), l("div", {
|
|
1815
1815
|
key: 0,
|
|
1816
1816
|
class: S(["ds-tooltip", `ds-tooltip--${e.position}`]),
|
|
1817
1817
|
role: "tooltip"
|
|
@@ -1827,14 +1827,14 @@ const pa = /* @__PURE__ */ A({
|
|
|
1827
1827
|
})
|
|
1828
1828
|
], 32));
|
|
1829
1829
|
}
|
|
1830
|
-
}), xe = /* @__PURE__ */ L(
|
|
1830
|
+
}), xe = /* @__PURE__ */ L(zn, [["__scopeId", "data-v-c0feb722"]]), Dn = /* @__PURE__ */ A({
|
|
1831
1831
|
__name: "Popover",
|
|
1832
1832
|
props: {
|
|
1833
1833
|
disabled: { type: Boolean, default: !1 },
|
|
1834
1834
|
position: { default: "bottom-start" }
|
|
1835
1835
|
},
|
|
1836
1836
|
setup(e) {
|
|
1837
|
-
const s = e, t = P(!1),
|
|
1837
|
+
const s = e, t = P(!1), n = P(null), i = P(null);
|
|
1838
1838
|
function o() {
|
|
1839
1839
|
s.disabled || (t.value = !t.value);
|
|
1840
1840
|
}
|
|
@@ -1842,19 +1842,19 @@ const pa = /* @__PURE__ */ A({
|
|
|
1842
1842
|
t.value = !1;
|
|
1843
1843
|
}
|
|
1844
1844
|
function c(d) {
|
|
1845
|
-
const v = d.target, u =
|
|
1845
|
+
const v = d.target, u = n.value, h = i.value;
|
|
1846
1846
|
!u && !h || u && u.contains(v) || h && h.contains(v) || t.value && r();
|
|
1847
1847
|
}
|
|
1848
1848
|
return te(() => {
|
|
1849
1849
|
document.addEventListener("click", c);
|
|
1850
1850
|
}), oe(() => {
|
|
1851
1851
|
document.removeEventListener("click", c);
|
|
1852
|
-
}), (d, v) => (a(),
|
|
1852
|
+
}), (d, v) => (a(), l("div", {
|
|
1853
1853
|
class: S(["ds-popover-container", { "ds-popover-container--disabled": e.disabled }])
|
|
1854
1854
|
}, [
|
|
1855
1855
|
m("div", {
|
|
1856
1856
|
ref_key: "triggerRef",
|
|
1857
|
-
ref:
|
|
1857
|
+
ref: n,
|
|
1858
1858
|
class: "ds-popover-trigger",
|
|
1859
1859
|
onClick: X(o, ["stop"])
|
|
1860
1860
|
}, [
|
|
@@ -1862,7 +1862,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
1862
1862
|
], 512),
|
|
1863
1863
|
x(ae, { name: "ds-popover-fade" }, {
|
|
1864
1864
|
default: U(() => [
|
|
1865
|
-
t.value ? (a(),
|
|
1865
|
+
t.value ? (a(), l("div", {
|
|
1866
1866
|
key: 0,
|
|
1867
1867
|
ref_key: "popoverRef",
|
|
1868
1868
|
ref: i,
|
|
@@ -1875,10 +1875,10 @@ const pa = /* @__PURE__ */ A({
|
|
|
1875
1875
|
})
|
|
1876
1876
|
], 2));
|
|
1877
1877
|
}
|
|
1878
|
-
}),
|
|
1878
|
+
}), An = /* @__PURE__ */ L(Dn, [["__scopeId", "data-v-a8781e33"]]), Ln = {
|
|
1879
1879
|
class: "ds-tabs__header",
|
|
1880
1880
|
role: "tablist"
|
|
1881
|
-
},
|
|
1881
|
+
}, Tn = ["aria-selected", "disabled", "onClick"], En = { class: "ds-tabs__content" }, Mn = /* @__PURE__ */ A({
|
|
1882
1882
|
__name: "Tabs",
|
|
1883
1883
|
props: {
|
|
1884
1884
|
modelValue: { default: "" },
|
|
@@ -1887,15 +1887,15 @@ const pa = /* @__PURE__ */ A({
|
|
|
1887
1887
|
},
|
|
1888
1888
|
emits: ["update:modelValue", "change"],
|
|
1889
1889
|
setup(e, { emit: s }) {
|
|
1890
|
-
const t = e,
|
|
1890
|
+
const t = e, n = s;
|
|
1891
1891
|
function i(o, r) {
|
|
1892
|
-
t.disabled || r || (
|
|
1892
|
+
t.disabled || r || (n("update:modelValue", o), n("change", o));
|
|
1893
1893
|
}
|
|
1894
|
-
return (o, r) => (a(),
|
|
1894
|
+
return (o, r) => (a(), l("div", {
|
|
1895
1895
|
class: S(["ds-tabs", { "ds-tabs--disabled": e.disabled }])
|
|
1896
1896
|
}, [
|
|
1897
|
-
m("div",
|
|
1898
|
-
(a(!0),
|
|
1897
|
+
m("div", Ln, [
|
|
1898
|
+
(a(!0), l(j, null, W(e.items, (c) => (a(), l("button", {
|
|
1899
1899
|
key: c.value,
|
|
1900
1900
|
type: "button",
|
|
1901
1901
|
role: "tab",
|
|
@@ -1918,17 +1918,17 @@ const pa = /* @__PURE__ */ A({
|
|
|
1918
1918
|
value: c.label,
|
|
1919
1919
|
class: "ds-tabs__tab-label"
|
|
1920
1920
|
}, null, 8, ["value"])
|
|
1921
|
-
], 10,
|
|
1921
|
+
], 10, Tn))), 128))
|
|
1922
1922
|
]),
|
|
1923
|
-
m("div",
|
|
1923
|
+
m("div", En, [
|
|
1924
1924
|
K(o.$slots, "default", {}, void 0, !0)
|
|
1925
1925
|
])
|
|
1926
1926
|
], 2));
|
|
1927
1927
|
}
|
|
1928
|
-
}),
|
|
1928
|
+
}), Pn = /* @__PURE__ */ L(Mn, [["__scopeId", "data-v-e77b7886"]]), On = ["disabled", "aria-label"], Rn = {
|
|
1929
1929
|
key: 0,
|
|
1930
1930
|
class: "ds-icon-button__spinner"
|
|
1931
|
-
},
|
|
1931
|
+
}, Nn = /* @__PURE__ */ A({
|
|
1932
1932
|
__name: "IconButton",
|
|
1933
1933
|
props: {
|
|
1934
1934
|
icon: {},
|
|
@@ -1940,7 +1940,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
1940
1940
|
},
|
|
1941
1941
|
emits: ["click"],
|
|
1942
1942
|
setup(e, { emit: s }) {
|
|
1943
|
-
const t = e,
|
|
1943
|
+
const t = e, n = s, i = g(() => [
|
|
1944
1944
|
"ds-icon-button",
|
|
1945
1945
|
`ds-icon-button--${t.variant}`,
|
|
1946
1946
|
`ds-icon-button--${t.size}`,
|
|
@@ -1961,43 +1961,43 @@ const pa = /* @__PURE__ */ A({
|
|
|
1961
1961
|
}
|
|
1962
1962
|
});
|
|
1963
1963
|
function r(c) {
|
|
1964
|
-
!t.disabled && !t.loading &&
|
|
1964
|
+
!t.disabled && !t.loading && n("click", c);
|
|
1965
1965
|
}
|
|
1966
|
-
return (c, d) => (a(),
|
|
1966
|
+
return (c, d) => (a(), l("button", {
|
|
1967
1967
|
class: S(i.value),
|
|
1968
1968
|
disabled: e.disabled || e.loading,
|
|
1969
1969
|
"aria-label": e.ariaLabel,
|
|
1970
1970
|
onClick: r
|
|
1971
1971
|
}, [
|
|
1972
|
-
e.loading ? (a(),
|
|
1972
|
+
e.loading ? (a(), l("span", Rn)) : (a(), T(N, {
|
|
1973
1973
|
key: 1,
|
|
1974
1974
|
name: e.icon,
|
|
1975
1975
|
size: o.value
|
|
1976
1976
|
}, null, 8, ["name", "size"]))
|
|
1977
|
-
], 10,
|
|
1977
|
+
], 10, On));
|
|
1978
1978
|
}
|
|
1979
|
-
}), qe = /* @__PURE__ */ L(
|
|
1979
|
+
}), qe = /* @__PURE__ */ L(Nn, [["__scopeId", "data-v-545f6e22"]]), Fn = {
|
|
1980
1980
|
key: 0,
|
|
1981
1981
|
class: "ds-table-cell ds-table-cell--text"
|
|
1982
|
-
},
|
|
1982
|
+
}, Un = {
|
|
1983
1983
|
key: 1,
|
|
1984
1984
|
class: "ds-table-cell ds-table-cell--date"
|
|
1985
|
-
},
|
|
1985
|
+
}, jn = {
|
|
1986
1986
|
key: 2,
|
|
1987
1987
|
class: "ds-table-cell ds-table-cell--profile"
|
|
1988
|
-
},
|
|
1988
|
+
}, qn = ["href"], Kn = { class: "ds-table-cell__profile-text" }, Hn = { class: "ds-table-cell__profile-name" }, Wn = {
|
|
1989
1989
|
key: 0,
|
|
1990
1990
|
class: "ds-table-cell__profile-email"
|
|
1991
|
-
},
|
|
1991
|
+
}, Gn = {
|
|
1992
1992
|
key: 3,
|
|
1993
1993
|
class: "ds-table-cell ds-table-cell--tag"
|
|
1994
|
-
},
|
|
1994
|
+
}, Yn = {
|
|
1995
1995
|
key: 4,
|
|
1996
1996
|
class: "ds-table-cell ds-table-cell--checkbox"
|
|
1997
|
-
},
|
|
1997
|
+
}, Xn = {
|
|
1998
1998
|
key: 5,
|
|
1999
1999
|
class: "ds-table-cell ds-table-cell--actions"
|
|
2000
|
-
},
|
|
2000
|
+
}, Zn = /* @__PURE__ */ A({
|
|
2001
2001
|
__name: "TableCell",
|
|
2002
2002
|
props: {
|
|
2003
2003
|
type: {},
|
|
@@ -2015,7 +2015,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
2015
2015
|
},
|
|
2016
2016
|
emits: ["update:modelValue", "action-click"],
|
|
2017
2017
|
setup(e, { emit: s }) {
|
|
2018
|
-
const t = e,
|
|
2018
|
+
const t = e, n = s;
|
|
2019
2019
|
function i(v, u) {
|
|
2020
2020
|
if (v == null) return "";
|
|
2021
2021
|
const h = typeof v == "string" || typeof v == "number" ? new Date(v) : v instanceof Date ? v : null;
|
|
@@ -2041,18 +2041,18 @@ const pa = /* @__PURE__ */ A({
|
|
|
2041
2041
|
return v == null ? "" : String(v);
|
|
2042
2042
|
}
|
|
2043
2043
|
function r(v) {
|
|
2044
|
-
|
|
2044
|
+
n("update:modelValue", v);
|
|
2045
2045
|
}
|
|
2046
2046
|
function c(v) {
|
|
2047
|
-
|
|
2047
|
+
n("action-click", v), v.onClick();
|
|
2048
2048
|
}
|
|
2049
2049
|
const d = g(() => {
|
|
2050
2050
|
if (t.tags && t.tags.length > 0) return t.tags;
|
|
2051
2051
|
const v = t.value;
|
|
2052
2052
|
return Array.isArray(v) ? v.map((u) => ({ value: o(u), variant: t.variant })) : v != null ? [{ value: o(v), variant: t.variant }] : [];
|
|
2053
2053
|
});
|
|
2054
|
-
return (v, u) => e.type === "text" ? (a(),
|
|
2055
|
-
e.profileLink ? (a(),
|
|
2054
|
+
return (v, u) => e.type === "text" ? (a(), l("span", Fn, C(o(e.value)), 1)) : e.type === "date" ? (a(), l("span", Un, C(i(e.value, e.format)), 1)) : e.type === "profile" ? (a(), l("span", jn, [
|
|
2055
|
+
e.profileLink ? (a(), l("a", {
|
|
2056
2056
|
key: 0,
|
|
2057
2057
|
href: e.profileLink,
|
|
2058
2058
|
class: "ds-table-cell__profile-avatar-link"
|
|
@@ -2062,29 +2062,29 @@ const pa = /* @__PURE__ */ A({
|
|
|
2062
2062
|
name: e.name,
|
|
2063
2063
|
size: "sm"
|
|
2064
2064
|
}, null, 8, ["src", "name"])
|
|
2065
|
-
], 8,
|
|
2065
|
+
], 8, qn)) : (a(), T(de, {
|
|
2066
2066
|
key: 1,
|
|
2067
2067
|
src: e.avatarUrl,
|
|
2068
2068
|
name: e.name,
|
|
2069
2069
|
size: "sm"
|
|
2070
2070
|
}, null, 8, ["src", "name"])),
|
|
2071
|
-
m("span",
|
|
2072
|
-
m("span",
|
|
2073
|
-
e.email ? (a(),
|
|
2071
|
+
m("span", Kn, [
|
|
2072
|
+
m("span", Hn, C(e.name), 1),
|
|
2073
|
+
e.email ? (a(), l("span", Wn, C(e.email), 1)) : f("", !0)
|
|
2074
2074
|
])
|
|
2075
|
-
])) : e.type === "tag" ? (a(),
|
|
2076
|
-
(a(!0),
|
|
2075
|
+
])) : e.type === "tag" ? (a(), l("span", Gn, [
|
|
2076
|
+
(a(!0), l(j, null, W(d.value, (h, _) => (a(), l("span", {
|
|
2077
2077
|
key: _,
|
|
2078
2078
|
class: S(["ds-table-cell__tag", h.variant ? `ds-table-cell__tag--${h.variant}` : ""])
|
|
2079
2079
|
}, C(h.value), 3))), 128))
|
|
2080
|
-
])) : e.type === "checkbox" ? (a(),
|
|
2080
|
+
])) : e.type === "checkbox" ? (a(), l("span", Yn, [
|
|
2081
2081
|
x(me, {
|
|
2082
2082
|
"model-value": e.modelValue,
|
|
2083
2083
|
disabled: e.disabled,
|
|
2084
2084
|
"onUpdate:modelValue": r
|
|
2085
2085
|
}, null, 8, ["model-value", "disabled"])
|
|
2086
|
-
])) : e.type === "actions" ? (a(),
|
|
2087
|
-
(a(!0),
|
|
2086
|
+
])) : e.type === "actions" ? (a(), l("span", Xn, [
|
|
2087
|
+
(a(!0), l(j, null, W(e.actions, (h, _) => (a(), T(qe, {
|
|
2088
2088
|
key: _,
|
|
2089
2089
|
icon: h.icon ?? "more",
|
|
2090
2090
|
variant: h.variant ?? "ghost",
|
|
@@ -2094,13 +2094,13 @@ const pa = /* @__PURE__ */ A({
|
|
|
2094
2094
|
}, null, 8, ["icon", "variant", "aria-label", "onClick"]))), 128))
|
|
2095
2095
|
])) : f("", !0);
|
|
2096
2096
|
}
|
|
2097
|
-
}), Ke = /* @__PURE__ */ L(
|
|
2097
|
+
}), Ke = /* @__PURE__ */ L(Zn, [["__scopeId", "data-v-939d302b"]]), Jn = { class: "ds-table-container" }, Qn = { class: "ds-table" }, el = { class: "ds-table__thead" }, tl = { class: "ds-table__row" }, al = ["onClick"], sl = {
|
|
2098
2098
|
key: 1,
|
|
2099
2099
|
class: "ds-table__header-content"
|
|
2100
|
-
},
|
|
2100
|
+
}, nl = { class: "ds-table__header-label" }, ll = { class: "ds-table__tbody" }, ol = ["onClick"], il = {
|
|
2101
2101
|
key: 0,
|
|
2102
2102
|
class: "ds-table__row ds-table__row--empty"
|
|
2103
|
-
},
|
|
2103
|
+
}, cl = ["colspan"], rl = /* @__PURE__ */ A({
|
|
2104
2104
|
__name: "SchemaTable",
|
|
2105
2105
|
props: {
|
|
2106
2106
|
columns: { default: () => [] },
|
|
@@ -2112,18 +2112,18 @@ const pa = /* @__PURE__ */ A({
|
|
|
2112
2112
|
},
|
|
2113
2113
|
emits: ["row-click", "update:modelValue", "update:modelValue-cell", "action-click", "update:sort", "bulk-update"],
|
|
2114
2114
|
setup(e, { emit: s }) {
|
|
2115
|
-
const t = e,
|
|
2115
|
+
const t = e, n = s, i = P({}), o = g(() => t.items.length > 0), r = g(() => t.selectable ? [{ id: "__selection", label: "", cell: "checkbox", align: "center" }, ...t.columns] : t.columns), c = g(() => {
|
|
2116
2116
|
var b;
|
|
2117
2117
|
let y = [...t.items];
|
|
2118
2118
|
const $ = Object.entries(i.value).filter(([, D]) => D !== null);
|
|
2119
2119
|
if ($.length === 0) return y;
|
|
2120
2120
|
for (const [D, q] of $) {
|
|
2121
2121
|
if (!q) continue;
|
|
2122
|
-
const J = t.columns.find((
|
|
2122
|
+
const J = t.columns.find((le) => le.id === D);
|
|
2123
2123
|
if (!J) continue;
|
|
2124
2124
|
const se = ((b = J.fields) == null ? void 0 : b.value) || D;
|
|
2125
|
-
y.sort((
|
|
2126
|
-
const ie =
|
|
2125
|
+
y.sort((le, Ye) => {
|
|
2126
|
+
const ie = le[se], ce = Ye[se];
|
|
2127
2127
|
if (ie == null) return 1;
|
|
2128
2128
|
if (ce == null) return -1;
|
|
2129
2129
|
if (typeof ie == "number" && typeof ce == "number")
|
|
@@ -2145,17 +2145,17 @@ const pa = /* @__PURE__ */ A({
|
|
|
2145
2145
|
return b;
|
|
2146
2146
|
}
|
|
2147
2147
|
function v(y, $) {
|
|
2148
|
-
|
|
2148
|
+
n("row-click", y, $);
|
|
2149
2149
|
}
|
|
2150
2150
|
function u(y, $, b) {
|
|
2151
|
-
|
|
2151
|
+
n("action-click", { action: y, item: $, index: b });
|
|
2152
2152
|
}
|
|
2153
2153
|
function h(y) {
|
|
2154
2154
|
const $ = [...t.modelValue], b = $.indexOf(y);
|
|
2155
|
-
b > -1 ? $.splice(b, 1) : $.push(y),
|
|
2155
|
+
b > -1 ? $.splice(b, 1) : $.push(y), n("update:modelValue", $);
|
|
2156
2156
|
}
|
|
2157
2157
|
function _() {
|
|
2158
|
-
k.value ?
|
|
2158
|
+
k.value ? n("update:modelValue", []) : n("update:modelValue", c.value.map((y, $) => String($)));
|
|
2159
2159
|
}
|
|
2160
2160
|
const k = g(() => o.value && t.modelValue.length === c.value.length), M = g(() => t.modelValue.length > 0 && !k.value);
|
|
2161
2161
|
function B(y, $) {
|
|
@@ -2165,7 +2165,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
2165
2165
|
if (!t.sortable) return;
|
|
2166
2166
|
const $ = i.value[y];
|
|
2167
2167
|
let b;
|
|
2168
|
-
$ == null ? b = "asc" : $ === "asc" ? b = "desc" : b = null, i.value = { ...i.value, [y]: b },
|
|
2168
|
+
$ == null ? b = "asc" : $ === "asc" ? b = "desc" : b = null, i.value = { ...i.value, [y]: b }, n("update:sort", y, b);
|
|
2169
2169
|
}
|
|
2170
2170
|
function H(y) {
|
|
2171
2171
|
const $ = i.value[y];
|
|
@@ -2180,10 +2180,10 @@ const pa = /* @__PURE__ */ A({
|
|
|
2180
2180
|
}
|
|
2181
2181
|
const O = g(() => t.modelValue.length > 0), p = g(() => t.bulkEdit && O.value);
|
|
2182
2182
|
function z(y) {
|
|
2183
|
-
|
|
2183
|
+
n("bulk-update", { ...y, rows: [...t.modelValue] }), n("update:modelValue", []);
|
|
2184
2184
|
}
|
|
2185
|
-
return (y, $) => (a(),
|
|
2186
|
-
e.bulkEdit ? (a(),
|
|
2185
|
+
return (y, $) => (a(), l("div", Jn, [
|
|
2186
|
+
e.bulkEdit ? (a(), l("div", {
|
|
2187
2187
|
key: 0,
|
|
2188
2188
|
class: S([{ "ds-table__bulk-edit-wrapper--hidden": !p.value }, "ds-table__bulk-edit-wrapper"])
|
|
2189
2189
|
}, [
|
|
@@ -2191,13 +2191,13 @@ const pa = /* @__PURE__ */ A({
|
|
|
2191
2191
|
columns: e.columns,
|
|
2192
2192
|
"selected-count": e.modelValue.length,
|
|
2193
2193
|
onApply: z,
|
|
2194
|
-
onCancel: $[0] || ($[0] = (b) =>
|
|
2194
|
+
onCancel: $[0] || ($[0] = (b) => n("update:modelValue", []))
|
|
2195
2195
|
}, null, 8, ["columns", "selected-count"])
|
|
2196
2196
|
], 2)) : f("", !0),
|
|
2197
|
-
m("table",
|
|
2198
|
-
m("thead",
|
|
2199
|
-
m("tr",
|
|
2200
|
-
(a(!0),
|
|
2197
|
+
m("table", Qn, [
|
|
2198
|
+
m("thead", el, [
|
|
2199
|
+
m("tr", tl, [
|
|
2200
|
+
(a(!0), l(j, null, W(r.value, (b) => (a(), l("th", {
|
|
2201
2201
|
key: b.id,
|
|
2202
2202
|
class: S([
|
|
2203
2203
|
"ds-table__header-cell",
|
|
@@ -2212,25 +2212,25 @@ const pa = /* @__PURE__ */ A({
|
|
|
2212
2212
|
"model-value": k.value,
|
|
2213
2213
|
indeterminate: M.value,
|
|
2214
2214
|
"onUpdate:modelValue": _
|
|
2215
|
-
}, null, 8, ["model-value", "indeterminate"])) : (a(),
|
|
2216
|
-
m("span",
|
|
2217
|
-
e.sortable ? (a(),
|
|
2215
|
+
}, null, 8, ["model-value", "indeterminate"])) : (a(), l("span", sl, [
|
|
2216
|
+
m("span", nl, C(b.label), 1),
|
|
2217
|
+
e.sortable ? (a(), l("span", {
|
|
2218
2218
|
key: 0,
|
|
2219
2219
|
class: S(["ds-table__sort-icon", { "ds-table__sort-icon--active": w(b.id) }])
|
|
2220
2220
|
}, [
|
|
2221
2221
|
(a(), T(re(H(b.id)), { class: "ds-table__sort-icon-svg" }))
|
|
2222
2222
|
], 2)) : f("", !0)
|
|
2223
2223
|
]))
|
|
2224
|
-
], 10,
|
|
2224
|
+
], 10, al))), 128))
|
|
2225
2225
|
])
|
|
2226
2226
|
]),
|
|
2227
|
-
m("tbody",
|
|
2228
|
-
(a(!0),
|
|
2227
|
+
m("tbody", ll, [
|
|
2228
|
+
(a(!0), l(j, null, W(c.value, (b, D) => (a(), l("tr", {
|
|
2229
2229
|
key: D,
|
|
2230
2230
|
class: S(["ds-table__row ds-table__row--body", { "ds-table__row--selected": t.selectable && t.modelValue.includes(B(b, D)) }]),
|
|
2231
2231
|
onClick: (q) => v(b, D)
|
|
2232
2232
|
}, [
|
|
2233
|
-
(a(!0),
|
|
2233
|
+
(a(!0), l(j, null, W(r.value, (q) => (a(), l("td", {
|
|
2234
2234
|
key: q.id,
|
|
2235
2235
|
class: S(["ds-table__data-cell", q.align ? `ds-table__data-cell--align-${q.align}` : "", { "ds-table__data-cell--selection": q.id === "__selection" }]),
|
|
2236
2236
|
onClick: $[1] || ($[1] = X(() => {
|
|
@@ -2247,21 +2247,21 @@ const pa = /* @__PURE__ */ A({
|
|
|
2247
2247
|
onActionClick: (J) => u(J, b, D)
|
|
2248
2248
|
}), null, 16, ["type", "onActionClick"]))
|
|
2249
2249
|
], 2))), 128))
|
|
2250
|
-
], 10,
|
|
2251
|
-
o.value ? f("", !0) : (a(),
|
|
2250
|
+
], 10, ol))), 128)),
|
|
2251
|
+
o.value ? f("", !0) : (a(), l("tr", il, [
|
|
2252
2252
|
m("td", {
|
|
2253
2253
|
colspan: I(),
|
|
2254
2254
|
class: "ds-table__empty-cell"
|
|
2255
|
-
}, " هیچ دادهای یافت نشد. ", 8,
|
|
2255
|
+
}, " هیچ دادهای یافت نشد. ", 8, cl)
|
|
2256
2256
|
]))
|
|
2257
2257
|
])
|
|
2258
2258
|
])
|
|
2259
2259
|
]));
|
|
2260
2260
|
}
|
|
2261
|
-
}),
|
|
2261
|
+
}), dl = /* @__PURE__ */ L(rl, [["__scopeId", "data-v-ec5f4274"]]), ul = { class: "ds-filter-bar" }, ml = { class: "ds-filter-bar__filters" }, fl = {
|
|
2262
2262
|
key: 0,
|
|
2263
2263
|
class: "ds-filter-bar__actions"
|
|
2264
|
-
},
|
|
2264
|
+
}, vl = /* @__PURE__ */ A({
|
|
2265
2265
|
__name: "FilterBar",
|
|
2266
2266
|
props: {
|
|
2267
2267
|
showClear: { type: Boolean, default: !1 }
|
|
@@ -2269,11 +2269,11 @@ const pa = /* @__PURE__ */ A({
|
|
|
2269
2269
|
emits: ["clear"],
|
|
2270
2270
|
setup(e, { emit: s }) {
|
|
2271
2271
|
const t = s;
|
|
2272
|
-
return (
|
|
2273
|
-
m("div",
|
|
2274
|
-
K(
|
|
2272
|
+
return (n, i) => (a(), l("div", ul, [
|
|
2273
|
+
m("div", ml, [
|
|
2274
|
+
K(n.$slots, "default", {}, void 0, !0)
|
|
2275
2275
|
]),
|
|
2276
|
-
e.showClear ? (a(),
|
|
2276
|
+
e.showClear ? (a(), l("div", fl, [
|
|
2277
2277
|
x(Z, {
|
|
2278
2278
|
variant: "ghost",
|
|
2279
2279
|
size: "sm",
|
|
@@ -2287,11 +2287,11 @@ const pa = /* @__PURE__ */ A({
|
|
|
2287
2287
|
])) : f("", !0)
|
|
2288
2288
|
]));
|
|
2289
2289
|
}
|
|
2290
|
-
}),
|
|
2290
|
+
}), pl = /* @__PURE__ */ L(vl, [["__scopeId", "data-v-76a12d68"]]), bl = {
|
|
2291
2291
|
class: "ds-pagination",
|
|
2292
2292
|
role: "navigation",
|
|
2293
2293
|
"aria-label": "Pagination"
|
|
2294
|
-
},
|
|
2294
|
+
}, hl = { class: "ds-pagination__info" }, gl = /* @__PURE__ */ A({
|
|
2295
2295
|
__name: "Pagination",
|
|
2296
2296
|
props: {
|
|
2297
2297
|
page: { default: 1 },
|
|
@@ -2300,11 +2300,11 @@ const pa = /* @__PURE__ */ A({
|
|
|
2300
2300
|
},
|
|
2301
2301
|
emits: ["update:page", "update:value", "change"],
|
|
2302
2302
|
setup(e, { emit: s }) {
|
|
2303
|
-
const t = e,
|
|
2303
|
+
const t = e, n = s, i = g(() => Math.max(1, Math.ceil(t.total / t.pageSize))), o = g(() => t.page <= 1), r = g(() => t.page >= i.value), c = g(() => "arrow-right"), d = g(() => "arrow-left");
|
|
2304
2304
|
function v(u) {
|
|
2305
|
-
u < 1 || u > i.value || (
|
|
2305
|
+
u < 1 || u > i.value || (n("update:page", u), n("update:value", u), n("change", u));
|
|
2306
2306
|
}
|
|
2307
|
-
return (u, h) => (a(),
|
|
2307
|
+
return (u, h) => (a(), l("div", bl, [
|
|
2308
2308
|
x(Z, {
|
|
2309
2309
|
variant: "secondary",
|
|
2310
2310
|
size: "sm",
|
|
@@ -2317,7 +2317,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
2317
2317
|
]),
|
|
2318
2318
|
_: 1
|
|
2319
2319
|
}, 8, ["icon", "disabled"]),
|
|
2320
|
-
m("div",
|
|
2320
|
+
m("div", hl, [
|
|
2321
2321
|
x(G, { variant: "body-sm" }, {
|
|
2322
2322
|
default: U(() => [
|
|
2323
2323
|
Y(C(R(F)("pagination.page_of", { page: String(e.page), total: String(i.value) })), 1)
|
|
@@ -2340,10 +2340,10 @@ const pa = /* @__PURE__ */ A({
|
|
|
2340
2340
|
}, 8, ["icon", "disabled"])
|
|
2341
2341
|
]));
|
|
2342
2342
|
}
|
|
2343
|
-
}),
|
|
2343
|
+
}), _l = /* @__PURE__ */ L(gl, [["__scopeId", "data-v-2732ec5f"]]), yl = { class: "ds-empty-state" }, kl = { class: "ds-empty-state__icon-wrapper" }, wl = {
|
|
2344
2344
|
key: 1,
|
|
2345
2345
|
class: "ds-empty-state__action"
|
|
2346
|
-
}, $
|
|
2346
|
+
}, $l = /* @__PURE__ */ A({
|
|
2347
2347
|
__name: "EmptyState",
|
|
2348
2348
|
props: {
|
|
2349
2349
|
title: { default: F("table.empty") },
|
|
@@ -2354,8 +2354,8 @@ const pa = /* @__PURE__ */ A({
|
|
|
2354
2354
|
emits: ["action"],
|
|
2355
2355
|
setup(e, { emit: s }) {
|
|
2356
2356
|
const t = s;
|
|
2357
|
-
return (
|
|
2358
|
-
m("div",
|
|
2357
|
+
return (n, i) => (a(), l("div", yl, [
|
|
2358
|
+
m("div", kl, [
|
|
2359
2359
|
x(N, {
|
|
2360
2360
|
name: e.icon,
|
|
2361
2361
|
size: "lg",
|
|
@@ -2373,7 +2373,7 @@ const pa = /* @__PURE__ */ A({
|
|
|
2373
2373
|
value: e.description,
|
|
2374
2374
|
class: "ds-empty-state__desc"
|
|
2375
2375
|
}, null, 8, ["value"])) : f("", !0),
|
|
2376
|
-
e.actionLabel ? (a(),
|
|
2376
|
+
e.actionLabel ? (a(), l("div", wl, [
|
|
2377
2377
|
x(Z, {
|
|
2378
2378
|
variant: "primary",
|
|
2379
2379
|
size: "md",
|
|
@@ -2387,23 +2387,23 @@ const pa = /* @__PURE__ */ A({
|
|
|
2387
2387
|
])) : f("", !0)
|
|
2388
2388
|
]));
|
|
2389
2389
|
}
|
|
2390
|
-
}),
|
|
2390
|
+
}), Cl = /* @__PURE__ */ L($l, [["__scopeId", "data-v-62f76e13"]]), xl = {
|
|
2391
2391
|
key: 1,
|
|
2392
2392
|
class: "ds-loading-state__skeleton-wrapper"
|
|
2393
|
-
},
|
|
2393
|
+
}, Sl = {
|
|
2394
2394
|
key: 2,
|
|
2395
2395
|
class: "ds-loading-state__placeholder-wrapper"
|
|
2396
|
-
},
|
|
2396
|
+
}, Il = /* @__PURE__ */ A({
|
|
2397
2397
|
__name: "LoadingState",
|
|
2398
2398
|
props: {
|
|
2399
2399
|
variant: { default: "spinner" },
|
|
2400
2400
|
text: { default: F("loading.text") }
|
|
2401
2401
|
},
|
|
2402
2402
|
setup(e) {
|
|
2403
|
-
return (s, t) => (a(),
|
|
2403
|
+
return (s, t) => (a(), l("div", {
|
|
2404
2404
|
class: S(["ds-loading-state", [`ds-loading-state--${e.variant}`]])
|
|
2405
2405
|
}, [
|
|
2406
|
-
e.variant === "spinner" ? (a(),
|
|
2406
|
+
e.variant === "spinner" ? (a(), l(j, { key: 0 }, [
|
|
2407
2407
|
t[0] || (t[0] = m("div", { class: "ds-loading-state__spinner" }, null, -1)),
|
|
2408
2408
|
e.text ? (a(), T(G, {
|
|
2409
2409
|
key: 0,
|
|
@@ -2411,17 +2411,17 @@ const pa = /* @__PURE__ */ A({
|
|
|
2411
2411
|
value: e.text,
|
|
2412
2412
|
class: "ds-loading-state__text"
|
|
2413
2413
|
}, null, 8, ["value"])) : f("", !0)
|
|
2414
|
-
], 64)) : e.variant === "skeleton" ? (a(),
|
|
2414
|
+
], 64)) : e.variant === "skeleton" ? (a(), l("div", xl, [...t[1] || (t[1] = [
|
|
2415
2415
|
m("div", { class: "ds-loading-state__skeleton-line ds-loading-state__skeleton-line--title" }, null, -1),
|
|
2416
2416
|
m("div", { class: "ds-loading-state__skeleton-line" }, null, -1),
|
|
2417
2417
|
m("div", { class: "ds-loading-state__skeleton-line ds-loading-state__skeleton-line--short" }, null, -1)
|
|
2418
|
-
])])) : e.variant === "placeholder" ? (a(),
|
|
2418
|
+
])])) : e.variant === "placeholder" ? (a(), l("div", Sl, [...t[2] || (t[2] = [
|
|
2419
2419
|
m("div", { class: "ds-loading-state__placeholder-circle" }, null, -1),
|
|
2420
2420
|
m("div", { class: "ds-loading-state__skeleton-line ds-loading-state__skeleton-line--title" }, null, -1)
|
|
2421
2421
|
])])) : f("", !0)
|
|
2422
2422
|
], 2));
|
|
2423
2423
|
}
|
|
2424
|
-
}), He = /* @__PURE__ */ L(
|
|
2424
|
+
}), He = /* @__PURE__ */ L(Il, [["__scopeId", "data-v-23811991"]]), Bl = {
|
|
2425
2425
|
users: [
|
|
2426
2426
|
{ id: "1", name: "علیرضا علوی", email: "alireza@example.com", role: "مدیر کل" },
|
|
2427
2427
|
{ id: "2", name: "سارا رضایی", email: "sara@example.com", role: "نویسنده" },
|
|
@@ -2435,28 +2435,28 @@ const pa = /* @__PURE__ */ A({
|
|
|
2435
2435
|
{ id: "p3", name: "تبلت لنوو", price: "12,000,000" }
|
|
2436
2436
|
]
|
|
2437
2437
|
};
|
|
2438
|
-
function
|
|
2438
|
+
function Vl(e, s = "") {
|
|
2439
2439
|
return new Promise((t) => {
|
|
2440
2440
|
setTimeout(() => {
|
|
2441
|
-
const
|
|
2441
|
+
const n = Bl[e] || [];
|
|
2442
2442
|
if (!s.trim()) {
|
|
2443
|
-
t(
|
|
2443
|
+
t(n);
|
|
2444
2444
|
return;
|
|
2445
2445
|
}
|
|
2446
|
-
const i = s.toLowerCase().trim(), o =
|
|
2446
|
+
const i = s.toLowerCase().trim(), o = n.filter((r) => Object.values(r).some(
|
|
2447
2447
|
(c) => String(c).toLowerCase().includes(i)
|
|
2448
2448
|
));
|
|
2449
2449
|
t(o);
|
|
2450
2450
|
}, 200);
|
|
2451
2451
|
});
|
|
2452
2452
|
}
|
|
2453
|
-
const
|
|
2453
|
+
const zl = { class: "ds-autocomplete" }, Dl = { class: "ds-autocomplete__trigger-wrapper" }, Al = {
|
|
2454
2454
|
key: 0,
|
|
2455
2455
|
class: "ds-autocomplete__loading"
|
|
2456
|
-
},
|
|
2456
|
+
}, Ll = {
|
|
2457
2457
|
key: 1,
|
|
2458
2458
|
class: "ds-autocomplete__empty"
|
|
2459
|
-
},
|
|
2459
|
+
}, Tl = /* @__PURE__ */ A({
|
|
2460
2460
|
__name: "AsyncAutocomplete",
|
|
2461
2461
|
props: {
|
|
2462
2462
|
modelValue: { default: void 0 },
|
|
@@ -2473,7 +2473,7 @@ const zn = { class: "ds-autocomplete" }, Dn = { class: "ds-autocomplete__trigger
|
|
|
2473
2473
|
},
|
|
2474
2474
|
emits: ["update:modelValue", "change", "clear"],
|
|
2475
2475
|
setup(e, { emit: s }) {
|
|
2476
|
-
const t = e,
|
|
2476
|
+
const t = e, n = s, i = g(() => t.modelValue), o = P(null), r = P(""), c = P(!1), d = P(!1), v = P([]), u = P(-1), h = g(() => t.loading || d.value);
|
|
2477
2477
|
function _(b) {
|
|
2478
2478
|
if (typeof b == "string" || typeof b == "number") return String(b);
|
|
2479
2479
|
if (!b || typeof b != "object") return "";
|
|
@@ -2513,7 +2513,7 @@ const zn = { class: "ds-autocomplete" }, Dn = { class: "ds-autocomplete__trigger
|
|
|
2513
2513
|
if (t.source) {
|
|
2514
2514
|
d.value = !0;
|
|
2515
2515
|
try {
|
|
2516
|
-
const D = await
|
|
2516
|
+
const D = await Vl(t.source, b);
|
|
2517
2517
|
v.value = D;
|
|
2518
2518
|
} catch (D) {
|
|
2519
2519
|
console.error(D), v.value = [];
|
|
@@ -2533,10 +2533,10 @@ const zn = { class: "ds-autocomplete" }, Dn = { class: "ds-autocomplete__trigger
|
|
|
2533
2533
|
}
|
|
2534
2534
|
function z(b) {
|
|
2535
2535
|
const D = k(b);
|
|
2536
|
-
|
|
2536
|
+
n("update:modelValue", D), n("change", D), c.value = !1, r.value = _(b), u.value = -1, o.value && o.value.close();
|
|
2537
2537
|
}
|
|
2538
2538
|
function y() {
|
|
2539
|
-
t.disabled || (
|
|
2539
|
+
t.disabled || (n("update:modelValue", null), n("change", null), n("clear"), r.value = "", c.value = !1, u.value = -1);
|
|
2540
2540
|
}
|
|
2541
2541
|
function $(b) {
|
|
2542
2542
|
var q, J, se;
|
|
@@ -2558,8 +2558,8 @@ const zn = { class: "ds-autocomplete" }, Dn = { class: "ds-autocomplete__trigger
|
|
|
2558
2558
|
case "Enter":
|
|
2559
2559
|
if (u.value >= 0 && u.value < B.value.length) {
|
|
2560
2560
|
b.preventDefault();
|
|
2561
|
-
const
|
|
2562
|
-
|
|
2561
|
+
const le = B.value[u.value];
|
|
2562
|
+
le && z(le);
|
|
2563
2563
|
}
|
|
2564
2564
|
break;
|
|
2565
2565
|
}
|
|
@@ -2571,14 +2571,14 @@ const zn = { class: "ds-autocomplete" }, Dn = { class: "ds-autocomplete__trigger
|
|
|
2571
2571
|
b || setTimeout(() => {
|
|
2572
2572
|
c.value = !1;
|
|
2573
2573
|
}, 100);
|
|
2574
|
-
}), (b, D) => (a(),
|
|
2574
|
+
}), (b, D) => (a(), l("div", zl, [
|
|
2575
2575
|
x(Be, {
|
|
2576
2576
|
ref_key: "dropdownRef",
|
|
2577
2577
|
ref: o,
|
|
2578
2578
|
class: "ds-autocomplete__dropdown"
|
|
2579
2579
|
}, {
|
|
2580
2580
|
trigger: U(() => [
|
|
2581
|
-
m("div",
|
|
2581
|
+
m("div", Dl, [
|
|
2582
2582
|
x(ve, {
|
|
2583
2583
|
"model-value": H.value,
|
|
2584
2584
|
placeholder: e.placeholder,
|
|
@@ -2590,7 +2590,7 @@ const zn = { class: "ds-autocomplete" }, Dn = { class: "ds-autocomplete__trigger
|
|
|
2590
2590
|
onFocus: p,
|
|
2591
2591
|
onKeydown: $
|
|
2592
2592
|
}, null, 8, ["model-value", "placeholder", "disabled", "error"]),
|
|
2593
|
-
e.clearable && i.value ? (a(),
|
|
2593
|
+
e.clearable && i.value ? (a(), l("button", {
|
|
2594
2594
|
key: 0,
|
|
2595
2595
|
type: "button",
|
|
2596
2596
|
class: "ds-autocomplete__clear",
|
|
@@ -2609,12 +2609,12 @@ const zn = { class: "ds-autocomplete" }, Dn = { class: "ds-autocomplete__trigger
|
|
|
2609
2609
|
class: "ds-autocomplete__menu-container"
|
|
2610
2610
|
}, {
|
|
2611
2611
|
default: U(() => [
|
|
2612
|
-
h.value ? (a(),
|
|
2612
|
+
h.value ? (a(), l("div", Al, [
|
|
2613
2613
|
x(He, {
|
|
2614
2614
|
variant: "spinner",
|
|
2615
2615
|
text: "در حال بارگذاری..."
|
|
2616
2616
|
})
|
|
2617
|
-
])) : B.value.length === 0 ? (a(),
|
|
2617
|
+
])) : B.value.length === 0 ? (a(), l("div", Ll, " نتیجهای یافت نشد ")) : (a(!0), l(j, { key: 2 }, W(B.value, (q, J) => (a(), T(fe, {
|
|
2618
2618
|
key: String(k(q)),
|
|
2619
2619
|
label: _(q),
|
|
2620
2620
|
active: k(q) === i.value || J === u.value,
|
|
@@ -2629,14 +2629,14 @@ const zn = { class: "ds-autocomplete" }, Dn = { class: "ds-autocomplete__trigger
|
|
|
2629
2629
|
}, 512)
|
|
2630
2630
|
]));
|
|
2631
2631
|
}
|
|
2632
|
-
}),
|
|
2632
|
+
}), El = /* @__PURE__ */ L(Tl, [["__scopeId", "data-v-9faf0edb"]]), Ve = Ee({
|
|
2633
2633
|
theme: "dark",
|
|
2634
2634
|
locale: "fa",
|
|
2635
2635
|
direction: "rtl",
|
|
2636
2636
|
permissions: ["finance.view", "roles.manage"],
|
|
2637
2637
|
data: {}
|
|
2638
2638
|
});
|
|
2639
|
-
function
|
|
2639
|
+
function Ml(e) {
|
|
2640
2640
|
return e ? Ve.permissions.includes(e) : !0;
|
|
2641
2641
|
}
|
|
2642
2642
|
function Ri(e) {
|
|
@@ -2655,28 +2655,28 @@ const We = A({
|
|
|
2655
2655
|
},
|
|
2656
2656
|
emits: ["event"],
|
|
2657
2657
|
setup(e, { emit: s }) {
|
|
2658
|
-
const t = (
|
|
2658
|
+
const t = (n) => {
|
|
2659
2659
|
var u;
|
|
2660
|
-
if (
|
|
2660
|
+
if (n.permission && !Ml(n.permission))
|
|
2661
2661
|
return null;
|
|
2662
|
-
if (
|
|
2663
|
-
const _ = ((u =
|
|
2662
|
+
if (n.type === "text" && !(n.props && Object.keys(n.props).some((_) => _ !== "value"))) {
|
|
2663
|
+
const _ = ((u = n.props) == null ? void 0 : u.value) || "";
|
|
2664
2664
|
return _.includes(".") ? F(_) : _;
|
|
2665
2665
|
}
|
|
2666
|
-
const o = E.get(
|
|
2667
|
-
return r &&
|
|
2666
|
+
const o = E.get(n.type) || n.type, r = n.type === "accordion", c = n.children && !r ? n.children.map((h) => t(h)).filter(Boolean) : void 0, d = { ...n.props };
|
|
2667
|
+
return r && n.children && (d.items = n.children), n.events && Object.entries(n.events).forEach(([h, _]) => {
|
|
2668
2668
|
const k = `on${h.charAt(0).toUpperCase()}${h.slice(1)}`;
|
|
2669
2669
|
d[k] = (M) => {
|
|
2670
|
-
s("event", { name: _, event: M, node:
|
|
2670
|
+
s("event", { name: _, event: M, node: n });
|
|
2671
2671
|
};
|
|
2672
2672
|
}), De(o, d, c ? { default: () => c } : void 0);
|
|
2673
2673
|
};
|
|
2674
|
-
return () => Array.isArray(e.schema) ? De("div", { class: "schema-tree" }, e.schema.map((
|
|
2674
|
+
return () => Array.isArray(e.schema) ? De("div", { class: "schema-tree" }, e.schema.map((n) => t(n)).filter(Boolean)) : t(e.schema);
|
|
2675
2675
|
}
|
|
2676
|
-
}),
|
|
2676
|
+
}), Pl = {
|
|
2677
2677
|
class: "ds-accordion",
|
|
2678
2678
|
role: "presentation"
|
|
2679
|
-
},
|
|
2679
|
+
}, Ol = ["aria-expanded", "disabled", "onClick"], Rl = { class: "ds-accordion__title" }, Nl = { class: "ds-accordion__content" }, Fl = { class: "ds-accordion__content-inner" }, Ul = /* @__PURE__ */ A({
|
|
2680
2680
|
__name: "Accordion",
|
|
2681
2681
|
props: {
|
|
2682
2682
|
items: { default: () => [] },
|
|
@@ -2685,14 +2685,14 @@ const We = A({
|
|
|
2685
2685
|
disabled: { type: Boolean, default: !1 }
|
|
2686
2686
|
},
|
|
2687
2687
|
setup(e) {
|
|
2688
|
-
const s = e, t = P([]),
|
|
2688
|
+
const s = e, t = P([]), n = (o) => {
|
|
2689
2689
|
if (s.disabled) return;
|
|
2690
2690
|
t.value.indexOf(o) > -1 ? t.value = t.value.filter((c) => c !== o) : s.multiple ? t.value.push(o) : t.value = [o];
|
|
2691
2691
|
}, i = (o) => t.value.includes(o);
|
|
2692
2692
|
return te(() => {
|
|
2693
2693
|
s.defaultOpen && s.items.length > 0 && (s.multiple ? t.value = s.items.map((o, r) => r) : t.value = [0]);
|
|
2694
|
-
}), (o, r) => (a(),
|
|
2695
|
-
(a(!0),
|
|
2694
|
+
}), (o, r) => (a(), l("div", Pl, [
|
|
2695
|
+
(a(!0), l(j, null, W(e.items, (c, d) => (a(), l("div", {
|
|
2696
2696
|
key: d,
|
|
2697
2697
|
class: S([
|
|
2698
2698
|
"ds-accordion__item",
|
|
@@ -2705,23 +2705,23 @@ const We = A({
|
|
|
2705
2705
|
class: "ds-accordion__header",
|
|
2706
2706
|
"aria-expanded": i(d),
|
|
2707
2707
|
disabled: e.disabled,
|
|
2708
|
-
onClick: (v) =>
|
|
2708
|
+
onClick: (v) => n(d)
|
|
2709
2709
|
}, [
|
|
2710
|
-
m("span",
|
|
2710
|
+
m("span", Rl, C(c.title.includes(".") ? R(F)(c.title) : c.title), 1),
|
|
2711
2711
|
x(N, {
|
|
2712
2712
|
name: "chevron-down",
|
|
2713
2713
|
size: "sm",
|
|
2714
2714
|
class: "ds-accordion__chevron"
|
|
2715
2715
|
})
|
|
2716
|
-
], 8,
|
|
2716
|
+
], 8, Ol),
|
|
2717
2717
|
m("div", {
|
|
2718
2718
|
class: S([
|
|
2719
2719
|
"ds-accordion__content-wrapper",
|
|
2720
2720
|
{ "ds-accordion__content-wrapper--open": i(d) }
|
|
2721
2721
|
])
|
|
2722
2722
|
}, [
|
|
2723
|
-
m("div",
|
|
2724
|
-
m("div",
|
|
2723
|
+
m("div", Nl, [
|
|
2724
|
+
m("div", Fl, [
|
|
2725
2725
|
x(We, {
|
|
2726
2726
|
schema: c.content
|
|
2727
2727
|
}, null, 8, ["schema"])
|
|
@@ -2731,16 +2731,16 @@ const We = A({
|
|
|
2731
2731
|
], 2))), 128))
|
|
2732
2732
|
]));
|
|
2733
2733
|
}
|
|
2734
|
-
}),
|
|
2734
|
+
}), jl = /* @__PURE__ */ L(Ul, [["__scopeId", "data-v-24e0f847"]]), ql = { class: "ds-alert__main" }, Kl = { class: "ds-alert__icon-container" }, Hl = { class: "ds-alert__content" }, Wl = { class: "ds-alert__text-group" }, Gl = {
|
|
2735
2735
|
key: 0,
|
|
2736
2736
|
class: "ds-alert__title"
|
|
2737
|
-
},
|
|
2737
|
+
}, Yl = {
|
|
2738
2738
|
key: 1,
|
|
2739
2739
|
class: "ds-alert__description"
|
|
2740
|
-
},
|
|
2740
|
+
}, Xl = {
|
|
2741
2741
|
key: 0,
|
|
2742
2742
|
class: "ds-alert__actions"
|
|
2743
|
-
},
|
|
2743
|
+
}, Zl = ["aria-label"], Jl = /* @__PURE__ */ A({
|
|
2744
2744
|
__name: "Alert",
|
|
2745
2745
|
props: {
|
|
2746
2746
|
variant: { default: "info" },
|
|
@@ -2750,11 +2750,12 @@ const We = A({
|
|
|
2750
2750
|
actions: { default: () => [] },
|
|
2751
2751
|
layout: { default: "column" }
|
|
2752
2752
|
},
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2753
|
+
emits: ["event"],
|
|
2754
|
+
setup(e, { emit: s }) {
|
|
2755
|
+
const t = e, n = s, i = P(!1), o = () => {
|
|
2756
|
+
i.value = !0;
|
|
2757
|
+
}, r = g(() => {
|
|
2758
|
+
switch (t.variant) {
|
|
2758
2759
|
case "success":
|
|
2759
2760
|
return "check";
|
|
2760
2761
|
case "warning":
|
|
@@ -2766,51 +2767,52 @@ const We = A({
|
|
|
2766
2767
|
default:
|
|
2767
2768
|
return "info";
|
|
2768
2769
|
}
|
|
2769
|
-
}),
|
|
2770
|
+
}), c = g(() => [
|
|
2770
2771
|
"ds-alert",
|
|
2771
|
-
`ds-alert--${
|
|
2772
|
-
`ds-alert--layout-${
|
|
2772
|
+
`ds-alert--${t.variant}`,
|
|
2773
|
+
`ds-alert--layout-${t.layout}`
|
|
2773
2774
|
]);
|
|
2774
|
-
return (
|
|
2775
|
+
return (d, v) => i.value ? f("", !0) : (a(), l("div", {
|
|
2775
2776
|
key: 0,
|
|
2776
|
-
class: S(
|
|
2777
|
+
class: S(c.value),
|
|
2777
2778
|
role: "alert"
|
|
2778
2779
|
}, [
|
|
2779
|
-
m("div",
|
|
2780
|
-
m("div",
|
|
2780
|
+
m("div", ql, [
|
|
2781
|
+
m("div", Kl, [
|
|
2781
2782
|
x(N, {
|
|
2782
|
-
name:
|
|
2783
|
+
name: r.value,
|
|
2783
2784
|
size: "lg"
|
|
2784
2785
|
}, null, 8, ["name"])
|
|
2785
2786
|
]),
|
|
2786
|
-
m("div",
|
|
2787
|
-
m("div",
|
|
2788
|
-
e.title ? (a(),
|
|
2789
|
-
e.description ? (a(),
|
|
2787
|
+
m("div", Hl, [
|
|
2788
|
+
m("div", Wl, [
|
|
2789
|
+
e.title ? (a(), l("h4", Gl, C(e.title.includes(".") ? R(F)(e.title) : e.title), 1)) : f("", !0),
|
|
2790
|
+
e.description ? (a(), l("p", Yl, C(e.description.includes(".") ? R(F)(e.description) : e.description), 1)) : f("", !0)
|
|
2790
2791
|
]),
|
|
2791
|
-
e.actions && e.actions.length > 0 ? (a(),
|
|
2792
|
-
(a(!0),
|
|
2793
|
-
key:
|
|
2794
|
-
schema:
|
|
2792
|
+
e.actions && e.actions.length > 0 ? (a(), l("div", Xl, [
|
|
2793
|
+
(a(!0), l(j, null, W(e.actions, (u, h) => (a(), T(We, {
|
|
2794
|
+
key: h,
|
|
2795
|
+
schema: u,
|
|
2796
|
+
onEvent: v[0] || (v[0] = (_) => n("event", _))
|
|
2795
2797
|
}, null, 8, ["schema"]))), 128))
|
|
2796
2798
|
])) : f("", !0)
|
|
2797
2799
|
]),
|
|
2798
|
-
e.dismissible ? (a(),
|
|
2800
|
+
e.dismissible ? (a(), l("button", {
|
|
2799
2801
|
key: 0,
|
|
2800
2802
|
type: "button",
|
|
2801
2803
|
class: "ds-alert__dismiss-btn",
|
|
2802
|
-
onClick:
|
|
2804
|
+
onClick: o,
|
|
2803
2805
|
"aria-label": R(F)("common.close") || "Close"
|
|
2804
2806
|
}, [
|
|
2805
2807
|
x(N, {
|
|
2806
2808
|
name: "x",
|
|
2807
2809
|
size: "lg"
|
|
2808
2810
|
})
|
|
2809
|
-
], 8,
|
|
2811
|
+
], 8, Zl)) : f("", !0)
|
|
2810
2812
|
])
|
|
2811
2813
|
], 2));
|
|
2812
2814
|
}
|
|
2813
|
-
}),
|
|
2815
|
+
}), Ql = /* @__PURE__ */ L(Jl, [["__scopeId", "data-v-7893c0df"]]), eo = ["aria-valuenow", "aria-valuemax"], to = {
|
|
2814
2816
|
key: 0,
|
|
2815
2817
|
class: "ds-progress__header"
|
|
2816
2818
|
}, ao = {
|
|
@@ -2819,7 +2821,7 @@ const We = A({
|
|
|
2819
2821
|
}, so = {
|
|
2820
2822
|
key: 1,
|
|
2821
2823
|
class: "ds-progress__value"
|
|
2822
|
-
},
|
|
2824
|
+
}, no = { class: "ds-progress__track" }, lo = /* @__PURE__ */ A({
|
|
2823
2825
|
__name: "Progress",
|
|
2824
2826
|
props: {
|
|
2825
2827
|
value: { default: 0 },
|
|
@@ -2829,21 +2831,21 @@ const We = A({
|
|
|
2829
2831
|
},
|
|
2830
2832
|
setup(e) {
|
|
2831
2833
|
const s = e, t = g(() => {
|
|
2832
|
-
const
|
|
2833
|
-
return Math.round(
|
|
2834
|
+
const n = Math.max(0, Math.min(s.value, s.max));
|
|
2835
|
+
return Math.round(n / s.max * 100);
|
|
2834
2836
|
});
|
|
2835
|
-
return (
|
|
2837
|
+
return (n, i) => (a(), l("div", {
|
|
2836
2838
|
class: "ds-progress",
|
|
2837
2839
|
role: "progressbar",
|
|
2838
2840
|
"aria-valuenow": e.value,
|
|
2839
2841
|
"aria-valuemin": 0,
|
|
2840
2842
|
"aria-valuemax": e.max
|
|
2841
2843
|
}, [
|
|
2842
|
-
e.label || e.showValue ? (a(),
|
|
2843
|
-
e.label ? (a(),
|
|
2844
|
-
e.showValue ? (a(),
|
|
2844
|
+
e.label || e.showValue ? (a(), l("div", to, [
|
|
2845
|
+
e.label ? (a(), l("span", ao, C(e.label.includes(".") ? R(F)(e.label) : e.label), 1)) : f("", !0),
|
|
2846
|
+
e.showValue ? (a(), l("span", so, C(t.value) + "% ", 1)) : f("", !0)
|
|
2845
2847
|
])) : f("", !0),
|
|
2846
|
-
m("div",
|
|
2848
|
+
m("div", no, [
|
|
2847
2849
|
m("div", {
|
|
2848
2850
|
class: "ds-progress__bar",
|
|
2849
2851
|
style: Q({ width: `${t.value}%` })
|
|
@@ -2851,7 +2853,7 @@ const We = A({
|
|
|
2851
2853
|
])
|
|
2852
2854
|
], 8, eo));
|
|
2853
2855
|
}
|
|
2854
|
-
}), oo = /* @__PURE__ */ L(
|
|
2856
|
+
}), oo = /* @__PURE__ */ L(lo, [["__scopeId", "data-v-d9bb4686"]]), io = {
|
|
2855
2857
|
class: "ds-breadcrumb",
|
|
2856
2858
|
"aria-label": "Breadcrumb"
|
|
2857
2859
|
}, co = { class: "ds-breadcrumb__list" }, ro = {
|
|
@@ -2870,21 +2872,21 @@ const We = A({
|
|
|
2870
2872
|
},
|
|
2871
2873
|
emits: ["navigate"],
|
|
2872
2874
|
setup(e, { emit: s }) {
|
|
2873
|
-
const t = s,
|
|
2875
|
+
const t = s, n = (i) => {
|
|
2874
2876
|
i && t("navigate", i);
|
|
2875
2877
|
};
|
|
2876
|
-
return (i, o) => (a(),
|
|
2878
|
+
return (i, o) => (a(), l("nav", io, [
|
|
2877
2879
|
m("ol", co, [
|
|
2878
|
-
(a(!0),
|
|
2880
|
+
(a(!0), l(j, null, W(e.items, (r, c) => (a(), l("li", {
|
|
2879
2881
|
key: c,
|
|
2880
2882
|
class: "ds-breadcrumb__item"
|
|
2881
2883
|
}, [
|
|
2882
|
-
c > 0 ? (a(),
|
|
2883
|
-
c === e.items.length - 1 ? (a(),
|
|
2884
|
+
c > 0 ? (a(), l("span", ro, C(e.separator), 1)) : f("", !0),
|
|
2885
|
+
c === e.items.length - 1 ? (a(), l("span", uo, C(r.label.includes(".") ? R(F)(r.label) : r.label), 1)) : (a(), l("a", {
|
|
2884
2886
|
key: 2,
|
|
2885
2887
|
href: r.path || "#",
|
|
2886
2888
|
class: "ds-breadcrumb__link",
|
|
2887
|
-
onClick: X((d) =>
|
|
2889
|
+
onClick: X((d) => n(r.path), ["prevent"])
|
|
2888
2890
|
}, C(r.label.includes(".") ? R(F)(r.label) : r.label), 9, mo))
|
|
2889
2891
|
]))), 128))
|
|
2890
2892
|
])
|
|
@@ -2900,16 +2902,16 @@ const We = A({
|
|
|
2900
2902
|
},
|
|
2901
2903
|
emits: ["close", "click"],
|
|
2902
2904
|
setup(e, { emit: s }) {
|
|
2903
|
-
const t = e,
|
|
2904
|
-
c.stopPropagation(), !t.disabled &&
|
|
2905
|
+
const t = e, n = s, i = (c) => {
|
|
2906
|
+
c.stopPropagation(), !t.disabled && n("close");
|
|
2905
2907
|
}, o = () => {
|
|
2906
|
-
t.disabled ||
|
|
2908
|
+
t.disabled || n("click");
|
|
2907
2909
|
}, r = g(() => [
|
|
2908
2910
|
"ds-chip",
|
|
2909
2911
|
{ "ds-chip--disabled": t.disabled },
|
|
2910
2912
|
{ "ds-chip--interactive": !t.disabled }
|
|
2911
2913
|
]);
|
|
2912
|
-
return (c, d) => (a(),
|
|
2914
|
+
return (c, d) => (a(), l("div", {
|
|
2913
2915
|
class: S(r.value),
|
|
2914
2916
|
onClick: o,
|
|
2915
2917
|
role: "button",
|
|
@@ -2922,7 +2924,7 @@ const We = A({
|
|
|
2922
2924
|
class: "ds-chip__icon"
|
|
2923
2925
|
}, null, 8, ["name"])) : f("", !0),
|
|
2924
2926
|
m("span", bo, C(e.label.includes(".") ? R(F)(e.label) : e.label), 1),
|
|
2925
|
-
e.closable ? (a(),
|
|
2927
|
+
e.closable ? (a(), l("button", {
|
|
2926
2928
|
key: 1,
|
|
2927
2929
|
type: "button",
|
|
2928
2930
|
class: "ds-chip__close-btn",
|
|
@@ -2960,7 +2962,7 @@ const We = A({
|
|
|
2960
2962
|
},
|
|
2961
2963
|
emits: ["select", "navigate"],
|
|
2962
2964
|
setup(e, { emit: s }) {
|
|
2963
|
-
const t = e,
|
|
2965
|
+
const t = e, n = s, { locale: i } = Ne(), o = g(() => t.shortcut ? t.shortcut.split("+") : []), r = P(!1), c = P(""), d = P(0), v = P(null), u = (w) => {
|
|
2964
2966
|
const I = t.shortcut.toLowerCase().split("+"), O = I[I.length - 1], p = I.includes("ctrl") || I.includes("control"), z = I.includes("meta") || I.includes("cmd") || I.includes("⌘"), y = I.includes("alt"), $ = I.includes("shift");
|
|
2965
2967
|
return O && w.key.toLowerCase() === O ? !(p && !w.ctrlKey || z && !w.metaKey || y && !w.altKey || $ && !w.shiftKey) : !1;
|
|
2966
2968
|
}, h = (w) => {
|
|
@@ -2981,9 +2983,9 @@ const We = A({
|
|
|
2981
2983
|
}, M = () => {
|
|
2982
2984
|
r.value = !1, document.body.style.overflow = "";
|
|
2983
2985
|
}, B = (w) => {
|
|
2984
|
-
if (
|
|
2986
|
+
if (n("select", w), w.action.startsWith("navigate:")) {
|
|
2985
2987
|
const I = w.action.replace("navigate:", "");
|
|
2986
|
-
|
|
2988
|
+
n("navigate", I);
|
|
2987
2989
|
}
|
|
2988
2990
|
M();
|
|
2989
2991
|
}, V = g(() => {
|
|
@@ -2999,7 +3001,7 @@ const We = A({
|
|
|
2999
3001
|
const H = (w) => {
|
|
3000
3002
|
w.target === w.currentTarget && M();
|
|
3001
3003
|
};
|
|
3002
|
-
return (w, I) => (a(),
|
|
3004
|
+
return (w, I) => (a(), l("div", null, [
|
|
3003
3005
|
m("button", {
|
|
3004
3006
|
type: "button",
|
|
3005
3007
|
class: "ds-command-trigger",
|
|
@@ -3013,15 +3015,15 @@ const We = A({
|
|
|
3013
3015
|
m("span", null, C(e.placeholder.includes(".") ? R(F)(e.placeholder) : e.placeholder), 1)
|
|
3014
3016
|
]),
|
|
3015
3017
|
m("span", ko, [
|
|
3016
|
-
(a(!0),
|
|
3018
|
+
(a(!0), l(j, null, W(o.value, (O, p) => (a(), l(j, { key: p }, [
|
|
3017
3019
|
m("kbd", wo, C(O), 1),
|
|
3018
|
-
p < o.value.length - 1 ? (a(),
|
|
3020
|
+
p < o.value.length - 1 ? (a(), l("span", $o, "+")) : f("", !0)
|
|
3019
3021
|
], 64))), 128))
|
|
3020
3022
|
])
|
|
3021
3023
|
]),
|
|
3022
3024
|
x(ae, { name: "ds-command-fade" }, {
|
|
3023
3025
|
default: U(() => [
|
|
3024
|
-
r.value ? (a(),
|
|
3026
|
+
r.value ? (a(), l("div", {
|
|
3025
3027
|
key: 0,
|
|
3026
3028
|
class: "ds-command-overlay",
|
|
3027
3029
|
onClick: H
|
|
@@ -3047,8 +3049,8 @@ const We = A({
|
|
|
3047
3049
|
I[1] || (I[1] = m("kbd", { class: "ds-command-dialog__escape-kbd" }, "ESC", -1))
|
|
3048
3050
|
]),
|
|
3049
3051
|
m("div", Io, [
|
|
3050
|
-
V.value.length > 0 ? (a(),
|
|
3051
|
-
(a(!0),
|
|
3052
|
+
V.value.length > 0 ? (a(), l("ul", Bo, [
|
|
3053
|
+
(a(!0), l(j, null, W(V.value, (O, p) => (a(), l("li", {
|
|
3052
3054
|
key: O.id,
|
|
3053
3055
|
class: S([
|
|
3054
3056
|
"ds-command-item",
|
|
@@ -3075,7 +3077,7 @@ const We = A({
|
|
|
3075
3077
|
}, null, 8, ["name"])
|
|
3076
3078
|
])
|
|
3077
3079
|
], 42, Vo))), 128))
|
|
3078
|
-
])) : (a(),
|
|
3080
|
+
])) : (a(), l("div", To, C(R(F)("common.no_results") || "نتیجهای یافت نشد (No results found)"), 1))
|
|
3079
3081
|
])
|
|
3080
3082
|
])
|
|
3081
3083
|
])) : f("", !0)
|
|
@@ -3095,7 +3097,7 @@ const We = A({
|
|
|
3095
3097
|
squareAvatar: { type: Boolean, default: !1 }
|
|
3096
3098
|
},
|
|
3097
3099
|
setup(e) {
|
|
3098
|
-
return (s, t) => (a(),
|
|
3100
|
+
return (s, t) => (a(), l("div", {
|
|
3099
3101
|
class: S(["ds-user-card", { "ds-user-card--collapsed": e.collapsed }])
|
|
3100
3102
|
}, [
|
|
3101
3103
|
e.avatar ? (a(), T(de, {
|
|
@@ -3146,7 +3148,7 @@ const We = A({
|
|
|
3146
3148
|
size: { default: 24 }
|
|
3147
3149
|
},
|
|
3148
3150
|
setup(e) {
|
|
3149
|
-
return (s, t) => (a(),
|
|
3151
|
+
return (s, t) => (a(), l("svg", {
|
|
3150
3152
|
width: e.size,
|
|
3151
3153
|
height: e.size,
|
|
3152
3154
|
viewBox: "0 0 350 350",
|
|
@@ -3191,7 +3193,7 @@ const We = A({
|
|
|
3191
3193
|
},
|
|
3192
3194
|
emits: ["navigate"],
|
|
3193
3195
|
setup(e, { emit: s }) {
|
|
3194
|
-
const t = e,
|
|
3196
|
+
const t = e, n = s, i = P(""), o = P(!1);
|
|
3195
3197
|
ee(() => t.activeId, (_) => {
|
|
3196
3198
|
var k, M;
|
|
3197
3199
|
if (_) {
|
|
@@ -3224,7 +3226,7 @@ const We = A({
|
|
|
3224
3226
|
const M = [...t.navigation, ...t.footer].find((B) => B.id === _);
|
|
3225
3227
|
o.value = !!(M != null && M.children && M.children.length > 0);
|
|
3226
3228
|
}
|
|
3227
|
-
|
|
3229
|
+
n("navigate", _);
|
|
3228
3230
|
}
|
|
3229
3231
|
function d(_) {
|
|
3230
3232
|
c(_.value);
|
|
@@ -3243,7 +3245,7 @@ const We = A({
|
|
|
3243
3245
|
})));
|
|
3244
3246
|
return (_, k) => {
|
|
3245
3247
|
var M, B, V, H;
|
|
3246
|
-
return a(),
|
|
3248
|
+
return a(), l("div", {
|
|
3247
3249
|
class: S(["ds-sidebar-container", { "ds-sidebar-container--child-closed": !o.value }])
|
|
3248
3250
|
}, [
|
|
3249
3251
|
m("aside", {
|
|
@@ -3267,7 +3269,7 @@ const We = A({
|
|
|
3267
3269
|
})) : f("", !0)
|
|
3268
3270
|
]),
|
|
3269
3271
|
m("nav", jo, [
|
|
3270
|
-
(a(!0),
|
|
3272
|
+
(a(!0), l(j, null, W(e.navigation, (w) => (a(), T(xe, {
|
|
3271
3273
|
key: w.id,
|
|
3272
3274
|
text: w.label,
|
|
3273
3275
|
position: "end"
|
|
@@ -3284,7 +3286,7 @@ const We = A({
|
|
|
3284
3286
|
}, 1032, ["text"]))), 128))
|
|
3285
3287
|
]),
|
|
3286
3288
|
m("div", qo, [
|
|
3287
|
-
(a(!0),
|
|
3289
|
+
(a(!0), l(j, null, W(e.footer, (w) => (a(), T(xe, {
|
|
3288
3290
|
key: w.id,
|
|
3289
3291
|
text: w.label,
|
|
3290
3292
|
position: "end"
|
|
@@ -3319,8 +3321,8 @@ const We = A({
|
|
|
3319
3321
|
}, null, 8, ["icon"])
|
|
3320
3322
|
])
|
|
3321
3323
|
], 2),
|
|
3322
|
-
o.value ? (a(),
|
|
3323
|
-
o.value ? (a(),
|
|
3324
|
+
o.value ? (a(), l("div", Ko)) : f("", !0),
|
|
3325
|
+
o.value ? (a(), l("div", Ho, [
|
|
3324
3326
|
m("div", Wo, [
|
|
3325
3327
|
x(Be, {
|
|
3326
3328
|
items: h.value,
|
|
@@ -3330,7 +3332,7 @@ const We = A({
|
|
|
3330
3332
|
}, null, 8, ["items", "label"])
|
|
3331
3333
|
]),
|
|
3332
3334
|
m("div", Go, [
|
|
3333
|
-
(a(!0),
|
|
3335
|
+
(a(!0), l(j, null, W((H = r.value) == null ? void 0 : H.children, (w) => (a(), l("div", {
|
|
3334
3336
|
key: w.id,
|
|
3335
3337
|
class: S(["ds-sidebar__child-item", { "ds-sidebar__child-item--active": e.activeId === w.id }]),
|
|
3336
3338
|
onClick: (I) => c(w.id)
|
|
@@ -3355,7 +3357,7 @@ const We = A({
|
|
|
3355
3357
|
], 2);
|
|
3356
3358
|
};
|
|
3357
3359
|
}
|
|
3358
|
-
}), Zo = /* @__PURE__ */ L(Xo, [["__scopeId", "data-v-
|
|
3360
|
+
}), Zo = /* @__PURE__ */ L(Xo, [["__scopeId", "data-v-48184815"]]), Jo = ["aria-checked", "onClick"], Qo = { key: 1 }, ei = /* @__PURE__ */ A({
|
|
3359
3361
|
__name: "ActionToggle",
|
|
3360
3362
|
props: {
|
|
3361
3363
|
options: {},
|
|
@@ -3367,21 +3369,21 @@ const We = A({
|
|
|
3367
3369
|
v142bb2c5: r.options.length,
|
|
3368
3370
|
bdc18452: r.modelValue
|
|
3369
3371
|
}));
|
|
3370
|
-
const t = e,
|
|
3372
|
+
const t = e, n = s;
|
|
3371
3373
|
function i(r) {
|
|
3372
|
-
|
|
3374
|
+
n("update:modelValue", r);
|
|
3373
3375
|
}
|
|
3374
3376
|
function o(r) {
|
|
3375
3377
|
r.key === "ArrowRight" || r.key === "ArrowDown" ? (r.preventDefault(), i((t.modelValue + 1) % t.options.length)) : (r.key === "ArrowLeft" || r.key === "ArrowUp") && (r.preventDefault(), i((t.modelValue - 1 + t.options.length) % t.options.length));
|
|
3376
3378
|
}
|
|
3377
|
-
return (r, c) => (a(),
|
|
3379
|
+
return (r, c) => (a(), l("div", {
|
|
3378
3380
|
class: "ds-action-toggle",
|
|
3379
3381
|
tabindex: "0",
|
|
3380
3382
|
role: "radiogroup",
|
|
3381
3383
|
onKeydown: o
|
|
3382
3384
|
}, [
|
|
3383
3385
|
c[0] || (c[0] = m("div", { class: "ds-action-toggle__thumb" }, null, -1)),
|
|
3384
|
-
(a(!0),
|
|
3386
|
+
(a(!0), l(j, null, W(e.options, (d, v) => (a(), l("div", {
|
|
3385
3387
|
key: v,
|
|
3386
3388
|
class: S(["ds-action-toggle__option", { "ds-action-toggle__option--active": e.modelValue === v }]),
|
|
3387
3389
|
role: "radio",
|
|
@@ -3393,11 +3395,11 @@ const We = A({
|
|
|
3393
3395
|
name: d.icon,
|
|
3394
3396
|
size: "md"
|
|
3395
3397
|
}, null, 8, ["name"])) : f("", !0),
|
|
3396
|
-
d.label ? (a(),
|
|
3398
|
+
d.label ? (a(), l("span", Qo, C(d.label), 1)) : f("", !0)
|
|
3397
3399
|
], 10, Jo))), 128))
|
|
3398
3400
|
], 32));
|
|
3399
3401
|
}
|
|
3400
|
-
}), ti = /* @__PURE__ */ L(ei, [["__scopeId", "data-v-30aa8411"]]), ai = ["disabled"], si = { key: 1 },
|
|
3402
|
+
}), ti = /* @__PURE__ */ L(ei, [["__scopeId", "data-v-30aa8411"]]), ai = ["disabled"], si = { key: 1 }, ni = /* @__PURE__ */ A({
|
|
3401
3403
|
__name: "ToggleButton",
|
|
3402
3404
|
props: {
|
|
3403
3405
|
offLabel: {},
|
|
@@ -3410,7 +3412,7 @@ const We = A({
|
|
|
3410
3412
|
},
|
|
3411
3413
|
emits: ["update:modelValue"],
|
|
3412
3414
|
setup(e, { emit: s }) {
|
|
3413
|
-
const t = e,
|
|
3415
|
+
const t = e, n = s, i = g(() => t.modelValue ? t.onLabel : t.offLabel), o = g(() => t.modelValue ? t.onIcon : t.offIcon), r = g(() => {
|
|
3414
3416
|
switch (t.size) {
|
|
3415
3417
|
case "sm":
|
|
3416
3418
|
return "sm";
|
|
@@ -3431,9 +3433,9 @@ const We = A({
|
|
|
3431
3433
|
}
|
|
3432
3434
|
]);
|
|
3433
3435
|
function d() {
|
|
3434
|
-
t.disabled ||
|
|
3436
|
+
t.disabled || n("update:modelValue", !t.modelValue);
|
|
3435
3437
|
}
|
|
3436
|
-
return (v, u) => (a(),
|
|
3438
|
+
return (v, u) => (a(), l("button", {
|
|
3437
3439
|
class: S(c.value),
|
|
3438
3440
|
disabled: e.disabled,
|
|
3439
3441
|
onClick: d
|
|
@@ -3443,10 +3445,10 @@ const We = A({
|
|
|
3443
3445
|
name: o.value,
|
|
3444
3446
|
size: r.value
|
|
3445
3447
|
}, null, 8, ["name", "size"])) : f("", !0),
|
|
3446
|
-
i.value ? (a(),
|
|
3448
|
+
i.value ? (a(), l("span", si, C(i.value), 1)) : f("", !0)
|
|
3447
3449
|
], 10, ai));
|
|
3448
3450
|
}
|
|
3449
|
-
}),
|
|
3451
|
+
}), li = /* @__PURE__ */ L(ni, [["__scopeId", "data-v-41d7a903"]]), oi = ["aria-label", "onClick"], ii = { key: 1 }, ci = ["aria-label", "aria-pressed"], ri = ["src", "alt"], di = { class: "ds-swipe-item__body" }, ui = {
|
|
3450
3452
|
key: 0,
|
|
3451
3453
|
class: "ds-swipe-item__title"
|
|
3452
3454
|
}, mi = {
|
|
@@ -3472,7 +3474,7 @@ const We = A({
|
|
|
3472
3474
|
},
|
|
3473
3475
|
emits: ["action"],
|
|
3474
3476
|
setup(e, { emit: s }) {
|
|
3475
|
-
const t = e,
|
|
3477
|
+
const t = e, n = s, i = P(0), o = P(0), r = P(!1), c = P(!1), d = P(0), v = g(
|
|
3476
3478
|
() => c.value ? 0 : Math.min(0, i.value + o.value)
|
|
3477
3479
|
), u = g(() => c.value ? { transform: "translateX(-100%)" } : {
|
|
3478
3480
|
transform: `translateX(${v.value}px)`,
|
|
@@ -3500,7 +3502,7 @@ const We = A({
|
|
|
3500
3502
|
const b = Math.abs(v.value), D = ((q = $.currentTarget.parentElement) == null ? void 0 : q.offsetWidth) || 300;
|
|
3501
3503
|
if (b > D * vi) {
|
|
3502
3504
|
i.value = -D, setTimeout(() => {
|
|
3503
|
-
c.value = !0, setTimeout(() =>
|
|
3505
|
+
c.value = !0, setTimeout(() => n("action", t.id, "__delete"), 300);
|
|
3504
3506
|
}, 150);
|
|
3505
3507
|
return;
|
|
3506
3508
|
}
|
|
@@ -3513,16 +3515,16 @@ const We = A({
|
|
|
3513
3515
|
t.disabled || (($.key === "Delete" || $.key === "Backspace") && z(), $.key === "Escape" && (i.value = 0, o.value = 0));
|
|
3514
3516
|
}
|
|
3515
3517
|
function z() {
|
|
3516
|
-
c.value = !0, setTimeout(() =>
|
|
3518
|
+
c.value = !0, setTimeout(() => n("action", t.id, "__delete"), 300);
|
|
3517
3519
|
}
|
|
3518
3520
|
function y($) {
|
|
3519
3521
|
if ($ === "__delete" || $ === "delete") {
|
|
3520
3522
|
z();
|
|
3521
3523
|
return;
|
|
3522
3524
|
}
|
|
3523
|
-
i.value = 0,
|
|
3525
|
+
i.value = 0, n("action", t.id, $);
|
|
3524
3526
|
}
|
|
3525
|
-
return ($, b) => (a(),
|
|
3527
|
+
return ($, b) => (a(), l("div", {
|
|
3526
3528
|
class: S([
|
|
3527
3529
|
"ds-swipe-item",
|
|
3528
3530
|
`ds-swipe-item--${e.variant}`,
|
|
@@ -3532,18 +3534,18 @@ const We = A({
|
|
|
3532
3534
|
]),
|
|
3533
3535
|
style: Q(h.value)
|
|
3534
3536
|
}, [
|
|
3535
|
-
e.unread ? (a(),
|
|
3537
|
+
e.unread ? (a(), l("span", {
|
|
3536
3538
|
key: 0,
|
|
3537
3539
|
class: "ds-swipe-item__unread-bar",
|
|
3538
3540
|
style: Q({ backgroundColor: V.value, opacity: e.read ? 0.3 : 1 }),
|
|
3539
3541
|
"aria-hidden": "true"
|
|
3540
3542
|
}, null, 4)) : f("", !0),
|
|
3541
|
-
e.actions.length > 0 ? (a(),
|
|
3543
|
+
e.actions.length > 0 ? (a(), l("div", {
|
|
3542
3544
|
key: 1,
|
|
3543
3545
|
class: "ds-swipe-item__actions",
|
|
3544
3546
|
style: Q({ width: _.value })
|
|
3545
3547
|
}, [
|
|
3546
|
-
(a(!0),
|
|
3548
|
+
(a(!0), l(j, null, W(e.actions, (D) => (a(), l("button", {
|
|
3547
3549
|
key: D.id,
|
|
3548
3550
|
class: S(["ds-swipe-item__action-btn", `ds-swipe-item__action-btn--${D.variant || "secondary"}`]),
|
|
3549
3551
|
"aria-label": D.label,
|
|
@@ -3553,7 +3555,7 @@ const We = A({
|
|
|
3553
3555
|
key: 0,
|
|
3554
3556
|
name: D.icon,
|
|
3555
3557
|
size: "sm"
|
|
3556
|
-
}, null, 8, ["name"])) : (a(),
|
|
3558
|
+
}, null, 8, ["name"])) : (a(), l("span", ii, C(D.label), 1))
|
|
3557
3559
|
], 10, oi))), 128))
|
|
3558
3560
|
], 4)) : f("", !0),
|
|
3559
3561
|
m("div", {
|
|
@@ -3573,7 +3575,7 @@ const We = A({
|
|
|
3573
3575
|
class: "ds-swipe-item__icon-bg",
|
|
3574
3576
|
style: Q({ backgroundColor: M.value, color: B.value })
|
|
3575
3577
|
}, [
|
|
3576
|
-
e.image ? (a(),
|
|
3578
|
+
e.image ? (a(), l("img", {
|
|
3577
3579
|
key: 0,
|
|
3578
3580
|
src: e.image,
|
|
3579
3581
|
alt: e.title || "",
|
|
@@ -3587,9 +3589,9 @@ const We = A({
|
|
|
3587
3589
|
}, null, 8, ["name"])) : f("", !0)
|
|
3588
3590
|
], 4),
|
|
3589
3591
|
m("span", di, [
|
|
3590
|
-
e.title ? (a(),
|
|
3591
|
-
e.description ? (a(),
|
|
3592
|
-
e.timestamp ? (a(),
|
|
3592
|
+
e.title ? (a(), l("span", ui, C(e.title), 1)) : f("", !0),
|
|
3593
|
+
e.description ? (a(), l("span", mi, C(e.description), 1)) : f("", !0),
|
|
3594
|
+
e.timestamp ? (a(), l("span", fi, [
|
|
3593
3595
|
x(N, {
|
|
3594
3596
|
name: "clock",
|
|
3595
3597
|
size: "xs"
|
|
@@ -3608,18 +3610,18 @@ const We = A({
|
|
|
3608
3610
|
},
|
|
3609
3611
|
emits: ["action", "view-more"],
|
|
3610
3612
|
setup(e) {
|
|
3611
|
-
return (s, t) => (a(),
|
|
3613
|
+
return (s, t) => (a(), l("div", hi, [
|
|
3612
3614
|
m("div", gi, [
|
|
3613
|
-
(a(!0),
|
|
3614
|
-
key:
|
|
3615
|
-
}, { ref_for: !0 },
|
|
3615
|
+
(a(!0), l(j, null, W(e.items, (n) => (a(), T(bi, Pe({
|
|
3616
|
+
key: n.id
|
|
3617
|
+
}, { ref_for: !0 }, n, {
|
|
3616
3618
|
onAction: t[0] || (t[0] = (i, o) => s.$emit("action", i, o))
|
|
3617
3619
|
}), null, 16))), 128))
|
|
3618
3620
|
]),
|
|
3619
|
-
e.viewMoreLabel ? (a(),
|
|
3621
|
+
e.viewMoreLabel ? (a(), l("button", {
|
|
3620
3622
|
key: 0,
|
|
3621
3623
|
class: "ds-notification-panel__view-more",
|
|
3622
|
-
onClick: t[1] || (t[1] = (
|
|
3624
|
+
onClick: t[1] || (t[1] = (n) => s.$emit("view-more"))
|
|
3623
3625
|
}, [
|
|
3624
3626
|
m("span", null, C(e.viewMoreLabel), 1)
|
|
3625
3627
|
])) : f("", !0)
|
|
@@ -3641,7 +3643,7 @@ const We = A({
|
|
|
3641
3643
|
},
|
|
3642
3644
|
emits: ["read", "action", "view-more"],
|
|
3643
3645
|
setup(e, { emit: s }) {
|
|
3644
|
-
const t = e,
|
|
3646
|
+
const t = e, n = s, i = P(!1), o = P(null), r = g(() => {
|
|
3645
3647
|
switch (t.size) {
|
|
3646
3648
|
case "sm":
|
|
3647
3649
|
return "sm";
|
|
@@ -3654,10 +3656,10 @@ const We = A({
|
|
|
3654
3656
|
}
|
|
3655
3657
|
});
|
|
3656
3658
|
function c() {
|
|
3657
|
-
i.value = !i.value, i.value &&
|
|
3659
|
+
i.value = !i.value, i.value && n("read");
|
|
3658
3660
|
}
|
|
3659
3661
|
function d(u, h) {
|
|
3660
|
-
|
|
3662
|
+
n("action", u, h);
|
|
3661
3663
|
}
|
|
3662
3664
|
function v(u) {
|
|
3663
3665
|
const h = o.value;
|
|
@@ -3669,7 +3671,7 @@ const We = A({
|
|
|
3669
3671
|
document.addEventListener("click", v);
|
|
3670
3672
|
}), oe(() => {
|
|
3671
3673
|
document.removeEventListener("click", v);
|
|
3672
|
-
}), (u, h) => (a(),
|
|
3674
|
+
}), (u, h) => (a(), l("div", {
|
|
3673
3675
|
ref_key: "panelRef",
|
|
3674
3676
|
ref: o,
|
|
3675
3677
|
class: "ds-notification-bell"
|
|
@@ -3683,10 +3685,10 @@ const We = A({
|
|
|
3683
3685
|
name: "bell",
|
|
3684
3686
|
size: r.value
|
|
3685
3687
|
}, null, 8, ["size"]),
|
|
3686
|
-
e.unread ? (a(),
|
|
3688
|
+
e.unread ? (a(), l("span", wi)) : f("", !0)
|
|
3687
3689
|
])
|
|
3688
3690
|
], 2),
|
|
3689
|
-
i.value && e.items.length ? (a(),
|
|
3691
|
+
i.value && e.items.length ? (a(), l("div", $i, [
|
|
3690
3692
|
x(yi, {
|
|
3691
3693
|
items: e.items,
|
|
3692
3694
|
"view-more-label": e.viewMoreLabel,
|
|
@@ -3709,10 +3711,10 @@ const We = A({
|
|
|
3709
3711
|
},
|
|
3710
3712
|
emits: ["action"],
|
|
3711
3713
|
setup(e) {
|
|
3712
|
-
return (s, t) => (a(),
|
|
3714
|
+
return (s, t) => (a(), l("div", Si, [
|
|
3713
3715
|
m("div", Ii, [
|
|
3714
3716
|
m("h1", Bi, C(e.title), 1),
|
|
3715
|
-
e.subtitle ? (a(),
|
|
3717
|
+
e.subtitle ? (a(), l("p", Vi, C(e.subtitle), 1)) : f("", !0)
|
|
3716
3718
|
]),
|
|
3717
3719
|
e.btnLabel ? (a(), T(Z, {
|
|
3718
3720
|
key: 0,
|
|
@@ -3720,26 +3722,26 @@ const We = A({
|
|
|
3720
3722
|
icon: e.btnIcon,
|
|
3721
3723
|
"icon-position": "start",
|
|
3722
3724
|
label: e.btnLabel,
|
|
3723
|
-
onClick: t[0] || (t[0] = (
|
|
3725
|
+
onClick: t[0] || (t[0] = (n) => s.$emit("action"))
|
|
3724
3726
|
}, null, 8, ["icon", "label"])) : f("", !0)
|
|
3725
3727
|
]));
|
|
3726
3728
|
}
|
|
3727
3729
|
}), Di = /* @__PURE__ */ L(zi, [["__scopeId", "data-v-0bc89876"]]);
|
|
3728
3730
|
function Fi() {
|
|
3729
|
-
E.register("button", Z), E.register("input", ve), E.register("icon", N), E.register("text", G), E.register("divider", Fe), E.register("badge", Sa), E.register("avatar", de), E.register("select", Ce), E.register("multi-select", Ha), E.register("checkbox", me), E.register("switch", es), E.register("form-field", is), E.register("spacer", rs), E.register("textarea", ps), E.register("stack", hs), E.register("row", _s), E.register("grid", ks), E.register("section", Is), E.register("card", Ms), E.register("table",
|
|
3731
|
+
E.register("button", Z), E.register("input", ve), E.register("icon", N), E.register("text", G), E.register("divider", Fe), E.register("badge", Sa), E.register("avatar", de), E.register("select", Ce), E.register("multi-select", Ha), E.register("checkbox", me), E.register("switch", es), E.register("form-field", is), E.register("spacer", rs), E.register("textarea", ps), E.register("stack", hs), E.register("row", _s), E.register("grid", ks), E.register("section", Is), E.register("card", Ms), E.register("table", dl), E.register("table-cell", Ke), E.register("side-panel", on), E.register("bulk-edit", Ue), E.register("search-box", _n), E.register("dropdown", Be), E.register("menu", je), E.register("menu-item", fe), E.register("tooltip", xe), E.register("popover", An), E.register("tabs", Pn), E.register("filter-bar", pl), E.register("pagination", _l), E.register("empty-state", Cl), E.register("loading-state", He), E.register("autocomplete", El), E.register("accordion", jl), E.register("alert", Ql), E.register("progress", oo), E.register("breadcrumb", vo), E.register("chip", _o), E.register("command-menu", Mo), E.register("sidebar", Zo), E.register("user-card", Ge), E.register("action-toggle", ti), E.register("toggle-button", li), E.register("notification-bell", xi), E.register("page-title", Di);
|
|
3730
3732
|
}
|
|
3731
|
-
function
|
|
3732
|
-
return Object.entries(e || {}).map(([t,
|
|
3733
|
+
function ne(e, s) {
|
|
3734
|
+
return Object.entries(e || {}).map(([t, n]) => `${s}${t}: ${n};`).join(`
|
|
3733
3735
|
`);
|
|
3734
3736
|
}
|
|
3735
3737
|
function Ai(e) {
|
|
3736
3738
|
var t;
|
|
3737
3739
|
const s = (t = e.font) == null ? void 0 : t.faces;
|
|
3738
3740
|
return !s || !s.length ? "" : s.map(
|
|
3739
|
-
(
|
|
3740
|
-
font-family: '${
|
|
3741
|
-
src: url('./font/${
|
|
3742
|
-
font-weight: ${
|
|
3741
|
+
(n) => `@font-face {
|
|
3742
|
+
font-family: '${n.family}';
|
|
3743
|
+
src: url('./font/${n.src.split("/").pop()}') format('${n.format}');
|
|
3744
|
+
font-weight: ${n.weight};
|
|
3743
3745
|
font-style: normal;
|
|
3744
3746
|
font-display: swap;
|
|
3745
3747
|
}`
|
|
@@ -3753,8 +3755,8 @@ function Li(e) {
|
|
|
3753
3755
|
var v, u, h, _;
|
|
3754
3756
|
const s = [], t = Ai(e);
|
|
3755
3757
|
t && s.push(t);
|
|
3756
|
-
const
|
|
3757
|
-
i && (s.push(":root {"), s.push(" color-scheme: light;"), s.push(
|
|
3758
|
+
const n = e.tokens, i = ((v = n.colors) == null ? void 0 : v.light) && Object.keys(n.colors.light).length, o = ((u = n.colors) == null ? void 0 : u.dark) && Object.keys(n.colors.dark).length;
|
|
3759
|
+
i && (s.push(":root {"), s.push(" color-scheme: light;"), s.push(ne(n.colors.light, " ")), s.push("}"), s.push("")), o && (s.push('[data-theme="dark"] {'), s.push(" color-scheme: dark;"), s.push(ne(n.colors.dark, " ")), s.push("}"), s.push(""));
|
|
3758
3760
|
const r = [
|
|
3759
3761
|
["spacing", "Spacing"],
|
|
3760
3762
|
["typography", "Typography"],
|
|
@@ -3765,25 +3767,25 @@ function Li(e) {
|
|
|
3765
3767
|
["alert", "Alert"]
|
|
3766
3768
|
];
|
|
3767
3769
|
for (const [k, M] of r) {
|
|
3768
|
-
const B =
|
|
3769
|
-
!B || !Object.keys(B).length || (s.push(`/* ${M} */`), s.push(":root {"), s.push(
|
|
3770
|
+
const B = n[k];
|
|
3771
|
+
!B || !Object.keys(B).length || (s.push(`/* ${M} */`), s.push(":root {"), s.push(ne(B, " ")), s.push("}"), s.push(""));
|
|
3770
3772
|
}
|
|
3771
|
-
const c = ((h =
|
|
3772
|
-
return c && (s.push(":root {"), s.push(" color-scheme: light;"), s.push(
|
|
3773
|
+
const c = ((h = n.shadows) == null ? void 0 : h.light) && Object.keys(n.shadows.light).length, d = ((_ = n.shadows) == null ? void 0 : _.dark) && Object.keys(n.shadows.dark).length;
|
|
3774
|
+
return c && (s.push(":root {"), s.push(" color-scheme: light;"), s.push(ne(n.shadows.light, " ")), s.push("}"), s.push("")), d && (s.push('[data-theme="dark"] {'), s.push(" color-scheme: dark;"), s.push(ne(n.shadows.dark, " ")), s.push("}"), s.push("")), s.join(`
|
|
3773
3775
|
`);
|
|
3774
3776
|
}
|
|
3775
3777
|
function Ti(e) {
|
|
3776
3778
|
const s = e["theme-mappings"];
|
|
3777
3779
|
if (!s) return "";
|
|
3778
3780
|
const t = [];
|
|
3779
|
-
return t.push(":root {"), t.push(" color-scheme: light;"), s.light && t.push(
|
|
3781
|
+
return t.push(":root {"), t.push(" color-scheme: light;"), s.light && t.push(ne(s.light, " ")), t.push("}"), t.push(""), t.push('[data-theme="dark"] {'), t.push(" color-scheme: dark;"), s.dark && t.push(ne(s.dark, " ")), t.push("}"), t.join(`
|
|
3780
3782
|
`);
|
|
3781
3783
|
}
|
|
3782
3784
|
function Ui(e) {
|
|
3783
3785
|
const s = [], t = Li(e);
|
|
3784
3786
|
t && s.push(t);
|
|
3785
|
-
const
|
|
3786
|
-
return
|
|
3787
|
+
const n = Ti(e);
|
|
3788
|
+
return n && s.push(n), s.join(`
|
|
3787
3789
|
`);
|
|
3788
3790
|
}
|
|
3789
3791
|
let Se = null;
|
|
@@ -3805,9 +3807,9 @@ function Hi() {
|
|
|
3805
3807
|
return pe().locale.supported;
|
|
3806
3808
|
}
|
|
3807
3809
|
function Wi(e) {
|
|
3808
|
-
var t,
|
|
3810
|
+
var t, n;
|
|
3809
3811
|
const s = pe().font;
|
|
3810
|
-
return e === "fa" && ((t = s.fa) != null && t.family) ? s.fa.family : (
|
|
3812
|
+
return e === "fa" && ((t = s.fa) != null && t.family) ? s.fa.family : (n = s.en) != null && n.family ? s.en.family : "IRANSansX";
|
|
3811
3813
|
}
|
|
3812
3814
|
function Gi(e) {
|
|
3813
3815
|
return !e || typeof e != "object" ? !1 : typeof e.type == "string";
|
|
@@ -3828,7 +3830,7 @@ export {
|
|
|
3828
3830
|
qi as getDirection,
|
|
3829
3831
|
Wi as getFontFamily,
|
|
3830
3832
|
Hi as getSupportedLocales,
|
|
3831
|
-
|
|
3833
|
+
Ml as hasPermission,
|
|
3832
3834
|
ji as loadConfig,
|
|
3833
3835
|
Ei as normalizeSchema,
|
|
3834
3836
|
E as registry,
|