@krometra/ui-kit 0.0.0-stage → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +235 -2
- package/dist/ui-kit.css +2 -0
- package/dist/ui-kit.js +15222 -0
- package/dist/ui-kit.umd.cjs +3 -0
- package/package.json +74 -3
- package/src/base.css +32 -0
- package/src/components/KAlert.vue +65 -0
- package/src/components/KAvatar.vue +67 -0
- package/src/components/KBadge.vue +47 -0
- package/src/components/KButton.vue +98 -0
- package/src/components/KCard.vue +63 -0
- package/src/components/KCheckbox.vue +105 -0
- package/src/components/KCombobox.vue +232 -0
- package/src/components/KCountdown.vue +74 -0
- package/src/components/KDescriptions.vue +40 -0
- package/src/components/KDropdown.vue +111 -0
- package/src/components/KEmpty.vue +39 -0
- package/src/components/KFileUpload.vue +121 -0
- package/src/components/KFilterBar.vue +91 -0
- package/src/components/KGantt.vue +398 -0
- package/src/components/KIcon.vue +53 -0
- package/src/components/KInput.vue +108 -0
- package/src/components/KMenuItem.vue +56 -0
- package/src/components/KModal.vue +136 -0
- package/src/components/KMoney.vue +44 -0
- package/src/components/KPage.vue +93 -0
- package/src/components/KPagination.vue +113 -0
- package/src/components/KProgress.vue +63 -0
- package/src/components/KRadioGroup.vue +103 -0
- package/src/components/KSegmented.vue +88 -0
- package/src/components/KSelect.vue +231 -0
- package/src/components/KShell.vue +176 -0
- package/src/components/KStat.vue +74 -0
- package/src/components/KSteps.vue +119 -0
- package/src/components/KSwitch.vue +82 -0
- package/src/components/KTable.vue +161 -0
- package/src/components/KTabs.vue +102 -0
- package/src/components/KTextarea.vue +79 -0
- package/src/components/KTimeline.vue +72 -0
- package/src/components/KToast.vue +34 -0
- package/src/components/KToastItem.vue +86 -0
- package/src/components/KTooltip.vue +67 -0
- package/src/components/icon-registry.js +143 -0
- package/src/composables/useToast.js +52 -0
- package/src/format.js +137 -0
- package/src/index.js +85 -0
- package/src/theme.js +417 -0
- package/src/tokens.css +109 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Реестр иконок кита: семантическое имя → компонент Lucide.
|
|
3
|
+
*
|
|
4
|
+
* Отдельный модуль, чтобы витрина и тесты могли перечислить имена, не
|
|
5
|
+
* инстанцируя компонент. Имена задаются по роли в интерфейсе ("delete",
|
|
6
|
+
* "settings"), а не по форме ("trash", "gear"): так набор можно заменить
|
|
7
|
+
* целиком, не переписывая вызовы.
|
|
8
|
+
*
|
|
9
|
+
* Набор общего назначения. Иконки, специфичные для конкретного продукта,
|
|
10
|
+
* добавляйте в приложении через проп `component` или собственный реестр.
|
|
11
|
+
*/
|
|
12
|
+
import {
|
|
13
|
+
Activity, AlertTriangle, ArchiveRestore, ArrowDown, ArrowLeft, ArrowRight, ArrowUp,
|
|
14
|
+
BadgeCheck, Banknote, Bell, Bookmark, Building2, Calendar, Check,
|
|
15
|
+
ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Clipboard, Clock,
|
|
16
|
+
Copy, CreditCard, Database, Download, ExternalLink, Eye, EyeOff, File,
|
|
17
|
+
FileText, FileUp, Filter, Folder, FolderInput, FolderOpen, Globe, Heart, Home, Image, Info,
|
|
18
|
+
KeyRound, LayoutDashboard, LayoutGrid, LifeBuoy, Link, List, ListChecks, Loader2, Lock,
|
|
19
|
+
LogIn, LogOut, Mail, MapPin, Menu, MessageSquare, MinusCircle,
|
|
20
|
+
MoreHorizontal, MoreVertical, Paperclip, Pencil, Percent, Phone, Play,
|
|
21
|
+
Plus, RefreshCw, RotateCw, Save, Scissors, Search, Send, Settings, Share2, Shield,
|
|
22
|
+
ShieldCheck, SlidersHorizontal, Star, Sun, Moon, Tag, Trash2, TrendingDown,
|
|
23
|
+
TrendingUp, Upload, User, Users, Wallet, X, XCircle, Zap,
|
|
24
|
+
} from 'lucide-vue-next'
|
|
25
|
+
|
|
26
|
+
export const iconRegistry = {
|
|
27
|
+
// навигация
|
|
28
|
+
back: ArrowLeft,
|
|
29
|
+
forward: ArrowRight,
|
|
30
|
+
up: ArrowUp,
|
|
31
|
+
down: ArrowDown,
|
|
32
|
+
'chevron-up': ChevronUp,
|
|
33
|
+
'chevron-down': ChevronDown,
|
|
34
|
+
'chevron-left': ChevronLeft,
|
|
35
|
+
'chevron-right': ChevronRight,
|
|
36
|
+
menu: Menu,
|
|
37
|
+
more: MoreVertical,
|
|
38
|
+
'more-horizontal': MoreHorizontal,
|
|
39
|
+
home: Home,
|
|
40
|
+
dashboard: LayoutDashboard,
|
|
41
|
+
external: ExternalLink,
|
|
42
|
+
link: Link,
|
|
43
|
+
|
|
44
|
+
// действия
|
|
45
|
+
add: Plus,
|
|
46
|
+
edit: Pencil,
|
|
47
|
+
delete: Trash2,
|
|
48
|
+
save: Save,
|
|
49
|
+
copy: Copy,
|
|
50
|
+
search: Search,
|
|
51
|
+
filter: Filter,
|
|
52
|
+
sliders: SlidersHorizontal,
|
|
53
|
+
refresh: RefreshCw,
|
|
54
|
+
rotate: RotateCw,
|
|
55
|
+
scissors: Scissors,
|
|
56
|
+
restore: ArchiveRestore,
|
|
57
|
+
'file-up': FileUp,
|
|
58
|
+
move: FolderInput,
|
|
59
|
+
upload: Upload,
|
|
60
|
+
download: Download,
|
|
61
|
+
share: Share2,
|
|
62
|
+
send: Send,
|
|
63
|
+
play: Play,
|
|
64
|
+
close: X,
|
|
65
|
+
check: Check,
|
|
66
|
+
reject: XCircle,
|
|
67
|
+
remove: MinusCircle,
|
|
68
|
+
|
|
69
|
+
// состояния и статусы
|
|
70
|
+
info: Info,
|
|
71
|
+
alert: AlertTriangle,
|
|
72
|
+
'check-badge': BadgeCheck,
|
|
73
|
+
spinner: Loader2,
|
|
74
|
+
activity: Activity,
|
|
75
|
+
trending: TrendingUp,
|
|
76
|
+
declining: TrendingDown,
|
|
77
|
+
zap: Zap,
|
|
78
|
+
|
|
79
|
+
// объекты
|
|
80
|
+
document: FileText,
|
|
81
|
+
file: File,
|
|
82
|
+
folder: Folder,
|
|
83
|
+
'folder-open': FolderOpen,
|
|
84
|
+
attach: Paperclip,
|
|
85
|
+
image: Image,
|
|
86
|
+
clipboard: Clipboard,
|
|
87
|
+
checklist: ListChecks,
|
|
88
|
+
list: List,
|
|
89
|
+
grid: LayoutGrid,
|
|
90
|
+
database: Database,
|
|
91
|
+
tag: Tag,
|
|
92
|
+
bookmark: Bookmark,
|
|
93
|
+
star: Star,
|
|
94
|
+
heart: Heart,
|
|
95
|
+
|
|
96
|
+
// люди и организации
|
|
97
|
+
user: User,
|
|
98
|
+
users: Users,
|
|
99
|
+
organization: Building2,
|
|
100
|
+
|
|
101
|
+
// связь
|
|
102
|
+
mail: Mail,
|
|
103
|
+
phone: Phone,
|
|
104
|
+
message: MessageSquare,
|
|
105
|
+
bell: Bell,
|
|
106
|
+
|
|
107
|
+
// безопасность
|
|
108
|
+
lock: Lock,
|
|
109
|
+
key: KeyRound,
|
|
110
|
+
shield: Shield,
|
|
111
|
+
'shield-check': ShieldCheck,
|
|
112
|
+
login: LogIn,
|
|
113
|
+
logout: LogOut,
|
|
114
|
+
eye: Eye,
|
|
115
|
+
'eye-off': EyeOff,
|
|
116
|
+
|
|
117
|
+
// деньги
|
|
118
|
+
finance: Banknote,
|
|
119
|
+
wallet: Wallet,
|
|
120
|
+
card: CreditCard,
|
|
121
|
+
percent: Percent,
|
|
122
|
+
|
|
123
|
+
// прочее
|
|
124
|
+
calendar: Calendar,
|
|
125
|
+
clock: Clock,
|
|
126
|
+
location: MapPin,
|
|
127
|
+
globe: Globe,
|
|
128
|
+
settings: Settings,
|
|
129
|
+
help: LifeBuoy,
|
|
130
|
+
sun: Sun,
|
|
131
|
+
moon: Moon,
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Расширяет реестр из приложения: registerIcons({ rescan: RotateCw }). Имена
|
|
136
|
+
* действуют для всех компонентов кита, включая проп `icon` у KButton.
|
|
137
|
+
*/
|
|
138
|
+
export function registerIcons(icons) {
|
|
139
|
+
Object.assign(iconRegistry, icons)
|
|
140
|
+
iconNames.splice(0, iconNames.length, ...Object.keys(iconRegistry))
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export const iconNames = Object.keys(iconRegistry)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Всплывающие уведомления на @zag-js/toast.
|
|
3
|
+
*
|
|
4
|
+
* Очередь живёт в модуле, а не в компоненте: любому стору или обработчику
|
|
5
|
+
* достаточно импортировать useToast(), не пробрасывая ссылку на <KToast>.
|
|
6
|
+
* Сам контейнер монтируется один раз в корне приложения.
|
|
7
|
+
*
|
|
8
|
+
* const toast = useToast()
|
|
9
|
+
* toast.success('Сохранено', 'Изменения применены')
|
|
10
|
+
* toast.error('Ошибка', 'Не удалось связаться с сервером')
|
|
11
|
+
* pushToast({ title: 'Идёт загрузка', tone: 'loading', timeout: 0 }) // висит до dismiss
|
|
12
|
+
*/
|
|
13
|
+
import { createStore } from '@zag-js/toast'
|
|
14
|
+
|
|
15
|
+
export const toastStore = createStore({
|
|
16
|
+
placement: 'top-end',
|
|
17
|
+
duration: 4000,
|
|
18
|
+
removeDelay: 400,
|
|
19
|
+
gap: 12,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const types = {
|
|
23
|
+
info: 'info',
|
|
24
|
+
success: 'success',
|
|
25
|
+
warning: 'warning',
|
|
26
|
+
danger: 'error',
|
|
27
|
+
error: 'error',
|
|
28
|
+
loading: 'loading',
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function pushToast({ title = '', text = '', tone = 'info', timeout } = {}) {
|
|
32
|
+
const data = { title, description: text, type: types[tone] ?? 'info' }
|
|
33
|
+
if (timeout === 0) data.duration = Infinity
|
|
34
|
+
else if (timeout != null) data.duration = timeout
|
|
35
|
+
return toastStore.create(data)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function dismissToast(id) {
|
|
39
|
+
toastStore.dismiss(id)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function useToast() {
|
|
43
|
+
return {
|
|
44
|
+
toast: pushToast,
|
|
45
|
+
success: (title, text) => pushToast({ title, text, tone: 'success' }),
|
|
46
|
+
info: (title, text) => pushToast({ title, text, tone: 'info' }),
|
|
47
|
+
warning: (title, text) => pushToast({ title, text, tone: 'warning' }),
|
|
48
|
+
error: (title, text) => pushToast({ title, text, tone: 'danger' }),
|
|
49
|
+
loading: (title, text) => pushToast({ title, text, tone: 'loading', timeout: 0 }),
|
|
50
|
+
dismiss: dismissToast,
|
|
51
|
+
}
|
|
52
|
+
}
|
package/src/format.js
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Форматтеры для интерфейса.
|
|
3
|
+
*
|
|
4
|
+
* Небольшой набор общих утилит: числа, деньги, даты, размеры файлов,
|
|
5
|
+
* склонение. Живут в ките, потому что одни и те же значения показываются на
|
|
6
|
+
* десятках экранов и должны выглядеть одинаково. Все функции чистые и не
|
|
7
|
+
* зависят от Vue.
|
|
8
|
+
*
|
|
9
|
+
* Локаль по умолчанию — ru-RU; переопределяется параметром `locale`.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const DEFAULT_LOCALE = 'ru-RU'
|
|
13
|
+
|
|
14
|
+
/** Денежная сумма: formatMoney(1234567) → «1 234 567 ₽» */
|
|
15
|
+
export function formatMoney(value, { fraction = false, currency = 'RUB', compact = false, locale = DEFAULT_LOCALE } = {}) {
|
|
16
|
+
const n = Number(value)
|
|
17
|
+
if (!Number.isFinite(n)) return '—'
|
|
18
|
+
return new Intl.NumberFormat(locale, {
|
|
19
|
+
style: 'currency',
|
|
20
|
+
currency,
|
|
21
|
+
minimumFractionDigits: fraction ? 2 : 0,
|
|
22
|
+
maximumFractionDigits: fraction ? 2 : 0,
|
|
23
|
+
notation: compact ? 'compact' : 'standard',
|
|
24
|
+
}).format(n)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Число с разделителями разрядов. */
|
|
28
|
+
export function formatNumber(value, { digits = 0, compact = false, locale = DEFAULT_LOCALE } = {}) {
|
|
29
|
+
const n = Number(value)
|
|
30
|
+
if (!Number.isFinite(n)) return '—'
|
|
31
|
+
return new Intl.NumberFormat(locale, {
|
|
32
|
+
minimumFractionDigits: digits,
|
|
33
|
+
maximumFractionDigits: digits,
|
|
34
|
+
notation: compact ? 'compact' : 'standard',
|
|
35
|
+
}).format(n)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Процент: formatPercent(0.125) → «12,5 %» */
|
|
39
|
+
export function formatPercent(value, { digits = 1, locale = DEFAULT_LOCALE } = {}) {
|
|
40
|
+
const n = Number(value)
|
|
41
|
+
if (!Number.isFinite(n)) return '—'
|
|
42
|
+
return new Intl.NumberFormat(locale, {
|
|
43
|
+
style: 'percent',
|
|
44
|
+
minimumFractionDigits: digits,
|
|
45
|
+
maximumFractionDigits: digits,
|
|
46
|
+
}).format(n)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Дата: «05.09.2026» */
|
|
50
|
+
export function formatDate(value, { locale = DEFAULT_LOCALE, style = 'short' } = {}) {
|
|
51
|
+
if (!value) return '—'
|
|
52
|
+
return new Intl.DateTimeFormat(locale, { dateStyle: style }).format(new Date(value))
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Дата и время: «05.09.2026, 14:30» */
|
|
56
|
+
export function formatDateTime(value, { locale = DEFAULT_LOCALE } = {}) {
|
|
57
|
+
if (!value) return '—'
|
|
58
|
+
return new Intl.DateTimeFormat(locale, { dateStyle: 'short', timeStyle: 'short' }).format(new Date(value))
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Относительное время: «через 3 дня», «2 часа назад». */
|
|
62
|
+
export function formatRelative(value, { locale = DEFAULT_LOCALE } = {}) {
|
|
63
|
+
if (!value) return '—'
|
|
64
|
+
const diff = new Date(value).getTime() - Date.now()
|
|
65
|
+
const rtf = new Intl.RelativeTimeFormat(locale, { numeric: 'auto' })
|
|
66
|
+
const units = [
|
|
67
|
+
['year', 31536000000],
|
|
68
|
+
['month', 2592000000],
|
|
69
|
+
['day', 86400000],
|
|
70
|
+
['hour', 3600000],
|
|
71
|
+
['minute', 60000],
|
|
72
|
+
['second', 1000],
|
|
73
|
+
]
|
|
74
|
+
for (const [unit, ms] of units) {
|
|
75
|
+
if (Math.abs(diff) >= ms || unit === 'second') return rtf.format(Math.round(diff / ms), unit)
|
|
76
|
+
}
|
|
77
|
+
return ''
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Длительность в секундах → «02:45:10» или «3 д 04:12:00». */
|
|
81
|
+
export function formatDuration(totalSeconds) {
|
|
82
|
+
const s = Math.max(0, Math.floor(Number(totalSeconds) || 0))
|
|
83
|
+
const pad = (n) => String(n).padStart(2, '0')
|
|
84
|
+
const d = Math.floor(s / 86400)
|
|
85
|
+
const h = Math.floor((s % 86400) / 3600)
|
|
86
|
+
const m = Math.floor((s % 3600) / 60)
|
|
87
|
+
const sec = s % 60
|
|
88
|
+
return d > 0 ? `${d} д ${pad(h)}:${pad(m)}:${pad(sec)}` : `${pad(h)}:${pad(m)}:${pad(sec)}`
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Размер файла: formatBytes(482301) → «471 КБ» */
|
|
92
|
+
export function formatBytes(bytes, { units = ['Б', 'КБ', 'МБ', 'ГБ', 'ТБ'] } = {}) {
|
|
93
|
+
const b = Number(bytes)
|
|
94
|
+
if (!Number.isFinite(b) || b <= 0) return '—'
|
|
95
|
+
let n = b
|
|
96
|
+
let u = 0
|
|
97
|
+
while (n >= 1024 && u < units.length - 1) {
|
|
98
|
+
n /= 1024
|
|
99
|
+
u++
|
|
100
|
+
}
|
|
101
|
+
return `${n.toFixed(u === 0 ? 0 : 1).replace('.', ',')} ${units[u]}`
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** Обрезка строки по длине с многоточием. */
|
|
105
|
+
export function truncate(text, max = 80) {
|
|
106
|
+
const s = String(text ?? '')
|
|
107
|
+
return s.length > max ? `${s.slice(0, max - 1)}…` : s
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** Инициалы из имени: «Иванов Иван» → «ИИ» */
|
|
111
|
+
export function initials(name, count = 2) {
|
|
112
|
+
return String(name ?? '')
|
|
113
|
+
.replace(/["«»]/g, '')
|
|
114
|
+
.split(/[\s-]+/)
|
|
115
|
+
.filter(Boolean)
|
|
116
|
+
.slice(0, count)
|
|
117
|
+
.map((w) => w[0].toUpperCase())
|
|
118
|
+
.join('')
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Склонение по числу: plural(3, ['файл', 'файла', 'файлов']) → «файла».
|
|
123
|
+
* Формы: [одна, две-четыре, много].
|
|
124
|
+
*/
|
|
125
|
+
export function plural(count, forms) {
|
|
126
|
+
const n = Math.abs(Number(count)) % 100
|
|
127
|
+
const n1 = n % 10
|
|
128
|
+
if (n > 10 && n < 20) return forms[2]
|
|
129
|
+
if (n1 > 1 && n1 < 5) return forms[1]
|
|
130
|
+
if (n1 === 1) return forms[0]
|
|
131
|
+
return forms[2]
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** Число вместе со склонённым словом: «3 файла». */
|
|
135
|
+
export function pluralize(count, forms, { locale = DEFAULT_LOCALE } = {}) {
|
|
136
|
+
return `${formatNumber(count, { locale })} ${plural(count, forms)}`
|
|
137
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @krometra/ui-kit — UI-kit на Vue 3 со сменными темами оформления и светлой /
|
|
3
|
+
* тёмной схемой. Интерактивные компоненты построены на машинах @zag-js.
|
|
4
|
+
*
|
|
5
|
+
* Точка входа: именованные экспорты компонентов + плагин для глобальной
|
|
6
|
+
* регистрации. Стили токенов подключаются автоматически; базовый reset
|
|
7
|
+
* (`@krometra/ui-kit/src/base.css`) приложение импортирует само, чтобы кит не
|
|
8
|
+
* навязывал глобальные правила.
|
|
9
|
+
*
|
|
10
|
+
* import { KButton, KTable } from '@krometra/ui-kit'
|
|
11
|
+
* import '@krometra/ui-kit/style.css'
|
|
12
|
+
*
|
|
13
|
+
* либо всё сразу:
|
|
14
|
+
* import KrometraUiKit from '@krometra/ui-kit'
|
|
15
|
+
* app.use(KrometraUiKit)
|
|
16
|
+
*/
|
|
17
|
+
import './tokens.css'
|
|
18
|
+
|
|
19
|
+
import KAlert from './components/KAlert.vue'
|
|
20
|
+
import KAvatar from './components/KAvatar.vue'
|
|
21
|
+
import KBadge from './components/KBadge.vue'
|
|
22
|
+
import KButton from './components/KButton.vue'
|
|
23
|
+
import KCard from './components/KCard.vue'
|
|
24
|
+
import KCheckbox from './components/KCheckbox.vue'
|
|
25
|
+
import KCombobox from './components/KCombobox.vue'
|
|
26
|
+
import KCountdown from './components/KCountdown.vue'
|
|
27
|
+
import KDescriptions from './components/KDescriptions.vue'
|
|
28
|
+
import KDropdown from './components/KDropdown.vue'
|
|
29
|
+
import KEmpty from './components/KEmpty.vue'
|
|
30
|
+
import KFileUpload from './components/KFileUpload.vue'
|
|
31
|
+
import KFilterBar from './components/KFilterBar.vue'
|
|
32
|
+
import KGantt from './components/KGantt.vue'
|
|
33
|
+
import KIcon from './components/KIcon.vue'
|
|
34
|
+
import KInput from './components/KInput.vue'
|
|
35
|
+
import KMenuItem from './components/KMenuItem.vue'
|
|
36
|
+
import KModal from './components/KModal.vue'
|
|
37
|
+
import KMoney from './components/KMoney.vue'
|
|
38
|
+
import KPage from './components/KPage.vue'
|
|
39
|
+
import KPagination from './components/KPagination.vue'
|
|
40
|
+
import KProgress from './components/KProgress.vue'
|
|
41
|
+
import KRadioGroup from './components/KRadioGroup.vue'
|
|
42
|
+
import KSegmented from './components/KSegmented.vue'
|
|
43
|
+
import KSelect from './components/KSelect.vue'
|
|
44
|
+
import KShell from './components/KShell.vue'
|
|
45
|
+
import KStat from './components/KStat.vue'
|
|
46
|
+
import KSteps from './components/KSteps.vue'
|
|
47
|
+
import KSwitch from './components/KSwitch.vue'
|
|
48
|
+
import KTable from './components/KTable.vue'
|
|
49
|
+
import KTabs from './components/KTabs.vue'
|
|
50
|
+
import KTextarea from './components/KTextarea.vue'
|
|
51
|
+
import KTimeline from './components/KTimeline.vue'
|
|
52
|
+
import KToast from './components/KToast.vue'
|
|
53
|
+
import KTooltip from './components/KTooltip.vue'
|
|
54
|
+
|
|
55
|
+
export {
|
|
56
|
+
KAlert, KAvatar, KBadge, KButton, KCard, KCheckbox, KCombobox, KCountdown,
|
|
57
|
+
KDescriptions, KDropdown, KEmpty, KFileUpload, KFilterBar, KGantt, KIcon,
|
|
58
|
+
KInput, KMenuItem, KModal, KMoney, KPage, KPagination, KProgress,
|
|
59
|
+
KRadioGroup, KSegmented, KSelect, KShell, KStat, KSteps, KSwitch, KTable,
|
|
60
|
+
KTabs, KTextarea, KTimeline, KToast, KTooltip,
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { iconNames, iconRegistry, registerIcons } from './components/icon-registry.js'
|
|
64
|
+
export {
|
|
65
|
+
applyTheme, buildTheme, themeToCss, resolveScheme, themes, schemes,
|
|
66
|
+
presets, neutrals, semantics, radiusScales, densities, elevations, fontStacks,
|
|
67
|
+
} from './theme.js'
|
|
68
|
+
export { useToast, pushToast, dismissToast, toastStore } from './composables/useToast.js'
|
|
69
|
+
export * from './format.js'
|
|
70
|
+
|
|
71
|
+
const components = {
|
|
72
|
+
KAlert, KAvatar, KBadge, KButton, KCard, KCheckbox, KCombobox, KCountdown,
|
|
73
|
+
KDescriptions, KDropdown, KEmpty, KFileUpload, KFilterBar, KGantt, KIcon,
|
|
74
|
+
KInput, KMenuItem, KModal, KMoney, KPage, KPagination, KProgress,
|
|
75
|
+
KRadioGroup, KSegmented, KSelect, KShell, KStat, KSteps, KSwitch, KTable,
|
|
76
|
+
KTabs, KTextarea, KTimeline, KToast, KTooltip,
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export default {
|
|
80
|
+
install(app) {
|
|
81
|
+
for (const [name, component] of Object.entries(components)) {
|
|
82
|
+
app.component(name, component)
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
}
|