@vobs/ui 0.2.0 → 1.0.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.
Files changed (208) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +60 -0
  3. package/package.json +52 -102
  4. package/src/activity-rail.ts +125 -0
  5. package/src/alert.ts +65 -0
  6. package/src/assets/icons/alert-circle.svg +1 -0
  7. package/src/assets/icons/alert-triangle.svg +1 -0
  8. package/src/assets/icons/alert.d27e24.svg +1 -0
  9. package/src/assets/icons/alert.svg +1 -0
  10. package/src/assets/icons/apple.svg +1 -0
  11. package/src/assets/icons/arrow-down.svg +1 -0
  12. package/src/assets/icons/arrow-expand.svg +1 -0
  13. package/src/assets/icons/arrow-left.svg +1 -0
  14. package/src/assets/icons/arrow-minimize.svg +1 -0
  15. package/src/assets/icons/arrow-right-to-line.svg +1 -0
  16. package/src/assets/icons/arrow-right.svg +1 -0
  17. package/src/assets/icons/arrow-up-right.svg +1 -0
  18. package/src/assets/icons/arrow-up.0c0c0d.svg +1 -0
  19. package/src/assets/icons/arrow-up.svg +1 -0
  20. package/src/assets/icons/at.svg +1 -0
  21. package/src/assets/icons/atom.0c0c0d.svg +1 -0
  22. package/src/assets/icons/atom.svg +1 -0
  23. package/src/assets/icons/bar.svg +1 -0
  24. package/src/assets/icons/bell.svg +1 -0
  25. package/src/assets/icons/box.svg +1 -0
  26. package/src/assets/icons/bug.svg +1 -0
  27. package/src/assets/icons/calendar.svg +1 -0
  28. package/src/assets/icons/check-circle.33c192.svg +1 -0
  29. package/src/assets/icons/check-circle.svg +1 -0
  30. package/src/assets/icons/check.d1d3db.svg +1 -0
  31. package/src/assets/icons/check.svg +1 -0
  32. package/src/assets/icons/chevron-down.svg +1 -0
  33. package/src/assets/icons/chevron-right.svg +1 -0
  34. package/src/assets/icons/chevron-up.svg +1 -0
  35. package/src/assets/icons/circle.svg +1 -0
  36. package/src/assets/icons/clock.svg +1 -0
  37. package/src/assets/icons/cmd.svg +1 -0
  38. package/src/assets/icons/code.svg +1 -0
  39. package/src/assets/icons/columns.svg +1 -0
  40. package/src/assets/icons/copy.svg +1 -0
  41. package/src/assets/icons/cpu.svg +1 -0
  42. package/src/assets/icons/dashboard.0c0c0d.svg +1 -0
  43. package/src/assets/icons/dashboard.svg +1 -0
  44. package/src/assets/icons/dollar.svg +1 -0
  45. package/src/assets/icons/download.svg +1 -0
  46. package/src/assets/icons/edit.svg +1 -0
  47. package/src/assets/icons/extensions.svg +1 -0
  48. package/src/assets/icons/external.svg +1 -0
  49. package/src/assets/icons/eye.svg +1 -0
  50. package/src/assets/icons/file-text.svg +1 -0
  51. package/src/assets/icons/file.svg +1 -0
  52. package/src/assets/icons/files.svg +1 -0
  53. package/src/assets/icons/filter.svg +1 -0
  54. package/src/assets/icons/folder.svg +1 -0
  55. package/src/assets/icons/gear.svg +1 -0
  56. package/src/assets/icons/git.svg +1 -0
  57. package/src/assets/icons/github.svg +1 -0
  58. package/src/assets/icons/globe.svg +1 -0
  59. package/src/assets/icons/grid-2x2.svg +1 -0
  60. package/src/assets/icons/hash.svg +1 -0
  61. package/src/assets/icons/heart.svg +1 -0
  62. package/src/assets/icons/help.svg +1 -0
  63. package/src/assets/icons/home.svg +1 -0
  64. package/src/assets/icons/image.svg +1 -0
  65. package/src/assets/icons/info-circle.svg +1 -0
  66. package/src/assets/icons/info-square.svg +1 -0
  67. package/src/assets/icons/info.387bff.svg +1 -0
  68. package/src/assets/icons/info.svg +1 -0
  69. package/src/assets/icons/key.svg +1 -0
  70. package/src/assets/icons/layers.svg +1 -0
  71. package/src/assets/icons/layout.svg +1 -0
  72. package/src/assets/icons/link.svg +1 -0
  73. package/src/assets/icons/list.svg +1 -0
  74. package/src/assets/icons/lock.svg +1 -0
  75. package/src/assets/icons/log-out.svg +1 -0
  76. package/src/assets/icons/logo.svg +1 -0
  77. package/src/assets/icons/mail.svg +1 -0
  78. package/src/assets/icons/menu.svg +1 -0
  79. package/src/assets/icons/message-circle.svg +1 -0
  80. package/src/assets/icons/message-plus.svg +1 -0
  81. package/src/assets/icons/message-square.svg +1 -0
  82. package/src/assets/icons/mic.svg +1 -0
  83. package/src/assets/icons/minus.svg +1 -0
  84. package/src/assets/icons/moon.svg +1 -0
  85. package/src/assets/icons/more-h.svg +1 -0
  86. package/src/assets/icons/mouse.svg +1 -0
  87. package/src/assets/icons/palette.svg +1 -0
  88. package/src/assets/icons/panel-bottom.svg +1 -0
  89. package/src/assets/icons/pause.svg +1 -0
  90. package/src/assets/icons/play.svg +1 -0
  91. package/src/assets/icons/plug.svg +1 -0
  92. package/src/assets/icons/plus.0c0c0d.svg +1 -0
  93. package/src/assets/icons/plus.svg +1 -0
  94. package/src/assets/icons/refresh.svg +1 -0
  95. package/src/assets/icons/ruler.svg +1 -0
  96. package/src/assets/icons/scroll-text.svg +1 -0
  97. package/src/assets/icons/search-menu.svg +1 -0
  98. package/src/assets/icons/search.svg +1 -0
  99. package/src/assets/icons/send.0c0c0d.svg +1 -0
  100. package/src/assets/icons/send.svg +1 -0
  101. package/src/assets/icons/settings.0c0c0d.svg +1 -0
  102. package/src/assets/icons/settings.svg +1 -0
  103. package/src/assets/icons/shield.svg +1 -0
  104. package/src/assets/icons/sidebar-left.svg +1 -0
  105. package/src/assets/icons/sidebar-right.svg +1 -0
  106. package/src/assets/icons/sliders.svg +1 -0
  107. package/src/assets/icons/sparkles.32f08c.svg +1 -0
  108. package/src/assets/icons/sparkles.svg +1 -0
  109. package/src/assets/icons/square.svg +1 -0
  110. package/src/assets/icons/star.svg +1 -0
  111. package/src/assets/icons/sun.svg +1 -0
  112. package/src/assets/icons/terminal.svg +1 -0
  113. package/src/assets/icons/trash.svg +1 -0
  114. package/src/assets/icons/trending-down.svg +1 -0
  115. package/src/assets/icons/trending-up.svg +1 -0
  116. package/src/assets/icons/type.svg +1 -0
  117. package/src/assets/icons/upload.svg +1 -0
  118. package/src/assets/icons/user-circle.svg +1 -0
  119. package/src/assets/icons/user.svg +1 -0
  120. package/src/assets/icons/users.svg +1 -0
  121. package/src/assets/icons/wrench.svg +1 -0
  122. package/src/assets/icons/x-circle.svg +1 -0
  123. package/src/assets/icons/x.svg +1 -0
  124. package/src/assets/icons/zap.0c0c0d.svg +1 -0
  125. package/src/assets/icons/zap.svg +1 -0
  126. package/src/avatar.ts +64 -0
  127. package/src/button.ts +88 -0
  128. package/src/card.ts +59 -0
  129. package/src/chat-composer.ts +156 -0
  130. package/src/dialog.ts +127 -0
  131. package/src/drawer.ts +131 -0
  132. package/src/editor-tabs.ts +184 -0
  133. package/src/file-tree.ts +214 -0
  134. package/src/forms.ts +270 -0
  135. package/src/icon.ts +117 -0
  136. package/src/icons.js +165 -0
  137. package/src/index.test.ts +213 -0
  138. package/src/index.ts +94 -0
  139. package/src/kbd.ts +72 -0
  140. package/src/menu.ts +119 -0
  141. package/src/nav-list.ts +157 -0
  142. package/src/overlay.test.ts +66 -0
  143. package/src/overlay.ts +205 -0
  144. package/src/page-header.ts +97 -0
  145. package/src/pagination.ts +163 -0
  146. package/src/second-batch.test.ts +205 -0
  147. package/src/stat-card.ts +92 -0
  148. package/src/status-bar.ts +108 -0
  149. package/src/styles/base.css +240 -0
  150. package/src/styles/components.css +1234 -0
  151. package/{dist → src/styles}/styles.css +2 -0
  152. package/src/styles/toast.css +57 -0
  153. package/src/styles/tokens.css +438 -0
  154. package/src/styles/vui.css +47 -0
  155. package/src/table.ts +191 -0
  156. package/src/tabs.ts +100 -0
  157. package/src/tag.ts +33 -0
  158. package/src/third-batch.test.ts +137 -0
  159. package/src/toast.test.ts +55 -0
  160. package/src/toast.ts +79 -0
  161. package/src/types.ts +25 -0
  162. package/src/utils.ts +221 -0
  163. package/src/workbench-titlebar.ts +137 -0
  164. package/dist/app-shell-dom.d.ts +0 -24
  165. package/dist/app-shell-dom.js +0 -573
  166. package/dist/app-shell.d.ts +0 -199
  167. package/dist/app-shell.js +0 -370
  168. package/dist/base.css +0 -52
  169. package/dist/calendar-picker.d.ts +0 -45
  170. package/dist/calendar-picker.js +0 -217
  171. package/dist/calendar.d.ts +0 -95
  172. package/dist/calendar.js +0 -194
  173. package/dist/complex-inputs.d.ts +0 -300
  174. package/dist/complex-inputs.js +0 -862
  175. package/dist/components.css +0 -4568
  176. package/dist/data-display.d.ts +0 -1063
  177. package/dist/data-display.js +0 -2298
  178. package/dist/feedback.d.ts +0 -88
  179. package/dist/feedback.js +0 -281
  180. package/dist/forms.d.ts +0 -378
  181. package/dist/forms.js +0 -1015
  182. package/dist/icons-config.d.ts +0 -25
  183. package/dist/icons-config.js +0 -14
  184. package/dist/icons.d.ts +0 -41
  185. package/dist/icons.js +0 -185
  186. package/dist/index.d.ts +0 -27
  187. package/dist/index.js +0 -34
  188. package/dist/locale/en-US.d.ts +0 -31
  189. package/dist/locale/en-US.js +0 -20
  190. package/dist/locale/zh-CN.d.ts +0 -31
  191. package/dist/locale/zh-CN.js +0 -20
  192. package/dist/navigation.d.ts +0 -609
  193. package/dist/navigation.js +0 -1707
  194. package/dist/overlay.d.ts +0 -304
  195. package/dist/overlay.js +0 -969
  196. package/dist/primitives.d.ts +0 -268
  197. package/dist/primitives.js +0 -764
  198. package/dist/theme-data.d.ts +0 -363
  199. package/dist/theme-data.js +0 -374
  200. package/dist/theme.d.ts +0 -79
  201. package/dist/theme.js +0 -262
  202. package/dist/tokens.css +0 -449
  203. package/dist/tree.d.ts +0 -144
  204. package/dist/tree.js +0 -469
  205. package/dist/virtual-list.d.ts +0 -190
  206. package/dist/virtual-list.js +0 -521
  207. package/dist/workbench.d.ts +0 -136
  208. package/dist/workbench.js +0 -156
@@ -1,25 +0,0 @@
1
- /** @license MIT
2
- * Copyright (c) 2026 vobsjs
3
- * @vobs/ui
4
- */
5
- export interface IconConfig {
6
- readonly sources: Readonly<Record<string, SvgIconSource>>;
7
- readonly shell?: IconShellManifest;
8
- }
9
- export interface IconShellManifest {
10
- readonly topbar?: readonly string[];
11
- readonly sidebar?: readonly string[];
12
- readonly statusbar?: readonly string[];
13
- }
14
- export interface SvgIconSource {
15
- readonly kind: 'vobs.svg-icon-source';
16
- readonly packageName: string;
17
- readonly options?: SvgIconSourceOptions;
18
- }
19
- export interface SvgIconSourceOptions {
20
- readonly size?: 16 | 20 | 24 | (number & {});
21
- readonly variant?: string;
22
- readonly path?: string;
23
- }
24
- export declare function defineIconConfig<const Config extends IconConfig>(config: Config): Config;
25
- export declare function svgIconSource(packageName: string, options?: SvgIconSourceOptions): SvgIconSource;
@@ -1,14 +0,0 @@
1
- /** @license MIT
2
- * Copyright (c) 2026 vobsjs
3
- * @vobs/ui
4
- */
5
- export function defineIconConfig(config) {
6
- return config;
7
- }
8
- export function svgIconSource(packageName, options) {
9
- return {
10
- kind: 'vobs.svg-icon-source',
11
- packageName,
12
- ...(options === undefined ? {} : { options }),
13
- };
14
- }
package/dist/icons.d.ts DELETED
@@ -1,41 +0,0 @@
1
- /** @license MIT
2
- * Copyright (c) 2026 vobsjs
3
- * @vobs/ui
4
- */
5
- import { createIconRegistry, type IconDefinition, type IconRegistry, type IconResolver } from '@vobs/icons';
6
- import { type ComponentProps, type InjectionKey } from '@vobs/runtime-dom';
7
- export interface UiIconEnvironment {
8
- readonly icons?: IconRegistry | IconResolver;
9
- }
10
- export interface IconProps {
11
- readonly name?: string;
12
- readonly icon?: IconDefinition;
13
- readonly title?: string;
14
- readonly decorative?: boolean | string;
15
- readonly size?: string | number;
16
- readonly color?: string;
17
- }
18
- export interface UiIconRenderModel {
19
- readonly icon: IconDefinition;
20
- readonly title?: string;
21
- readonly decorative?: boolean;
22
- readonly size?: string | number;
23
- readonly color?: string;
24
- }
25
- export type UiEnvironment = UiIconEnvironment;
26
- export type CreateUiEnvironmentOptions = UiIconEnvironment;
27
- export type UiIconSource = UiIconEnvironment | IconRegistry | IconResolver;
28
- export interface UiIconProviderContext {
29
- provide<T>(key: InjectionKey<T>, value: T): () => void;
30
- }
31
- export declare const UiIconEnvironmentKey: InjectionKey<UiIconEnvironment>;
32
- export declare function createUiEnvironment(options?: CreateUiEnvironmentOptions): UiEnvironment;
33
- export declare function provideUiIcons(context: UiIconProviderContext, source: UiIconSource): () => void;
34
- export declare function resolveUiIcon(environment: UiIconEnvironment, icon: IconDefinition | string): IconDefinition | undefined;
35
- export declare function createIconRenderModel(props: ComponentProps<IconProps>, environment: UiIconEnvironment): UiIconRenderModel;
36
- export declare const Icon: import("@vobs/runtime-core").ComponentDefinition<IconProps, Record<string, never>, IconComponentScope, Readonly<Record<string, Readonly<Record<string, unknown>>>>>;
37
- interface IconComponentScope {
38
- readonly props: ComponentProps<IconProps>;
39
- readonly environment: UiIconEnvironment;
40
- }
41
- export { createIconRegistry, type IconDefinition, type IconRegistry, type IconResolver };
package/dist/icons.js DELETED
@@ -1,185 +0,0 @@
1
- /** @license MIT
2
- * Copyright (c) 2026 vobsjs
3
- * @vobs/ui
4
- */
5
- import { createIconElement, createIconRegistry, resolveIcon, } from '@vobs/icons';
6
- import { effect } from '@vobs/reactivity';
7
- import { createCompiledTemplate, createInjectionKey, createRuntimeError, defineComponent, } from '@vobs/runtime-dom';
8
- export const UiIconEnvironmentKey = createInjectionKey('vobs.ui.icons');
9
- export function createUiEnvironment(options = {}) {
10
- return options.icons === undefined ? {} : { icons: options.icons };
11
- }
12
- export function provideUiIcons(context, source) {
13
- return context.provide(UiIconEnvironmentKey, normalizeUiIconEnvironment(source));
14
- }
15
- export function resolveUiIcon(environment, icon) {
16
- return resolveIcon(icon, environment.icons);
17
- }
18
- export function createIconRenderModel(props, environment) {
19
- const icon = resolveIconProp(props, environment);
20
- return {
21
- icon,
22
- ...readIconTitle(props),
23
- ...readIconDecorative(props),
24
- ...readIconSize(props),
25
- ...readIconColor(props),
26
- };
27
- }
28
- export const Icon = defineComponent({
29
- template: createCompiledTemplate({
30
- templateId: 'k-icon',
31
- sourceId: '@vobs/ui/icons',
32
- rootTag: 'svg',
33
- mount(owner, scope, environment) {
34
- const root = document.createElementNS(svgNamespace, 'svg');
35
- applyProtocolAttributes(root);
36
- applyBaseClass(root);
37
- bindIconRoot(owner, root, scope, environment);
38
- return { root, refs: {} };
39
- },
40
- hydrate(owner, root, scope, environment) {
41
- const svg = root;
42
- applyProtocolAttributes(svg);
43
- applyBaseClass(svg);
44
- bindIconRoot(owner, svg, scope, environment);
45
- return { root: svg, refs: {} };
46
- },
47
- }),
48
- props: ['name', 'icon', 'title', 'decorative', 'size', 'color'],
49
- setup(context) {
50
- return {
51
- props: context.props,
52
- environment: context.maybeInject(UiIconEnvironmentKey) ?? createUiEnvironment(),
53
- };
54
- },
55
- });
56
- const svgNamespace = 'http://www.w3.org/2000/svg';
57
- function bindIconRoot(owner, root, scope, environment) {
58
- owner.run(() => {
59
- const stop = effect(() => {
60
- const model = createIconRenderModel(scope.props, scope.environment);
61
- renderIconRoot(root, model);
62
- }, { scheduler: environment.scheduler });
63
- owner.own(stop);
64
- });
65
- }
66
- function renderIconRoot(root, model) {
67
- const next = createIconElement(document, model.icon, toIconRenderOptions(model));
68
- applyProtocolAttributes(next);
69
- next.setAttribute('data-icon-name', model.icon.name);
70
- root.replaceChildren(...Array.from(next.childNodes).map((node) => node.cloneNode(true)));
71
- syncIconAttributes(root, next);
72
- applyIconPresentation(root, model);
73
- }
74
- function syncIconAttributes(root, source) {
75
- for (const attribute of controlledIconAttributes)
76
- root.removeAttribute(attribute);
77
- for (const attribute of Array.from(source.attributes)) {
78
- root.setAttribute(attribute.name, attribute.value);
79
- }
80
- }
81
- const controlledIconAttributes = [
82
- 'xmlns',
83
- 'viewBox',
84
- 'width',
85
- 'height',
86
- 'fill',
87
- 'aria-hidden',
88
- 'role',
89
- 'aria-label',
90
- 'color',
91
- 'data-icon-name',
92
- 'data-vobs-template',
93
- 'data-vobs-protocol',
94
- ];
95
- function toIconRenderOptions(model) {
96
- return {
97
- ...readDefined('title', model.title),
98
- ...readDefined('decorative', model.decorative),
99
- ...readDefined('size', normalizeIconSize(model.size)),
100
- };
101
- }
102
- function resolveIconProp(props, environment) {
103
- const direct = props.icon?.value;
104
- if (direct !== undefined)
105
- return direct;
106
- const name = readOptionalString(props.name?.value);
107
- if (name === undefined) {
108
- throw createRuntimeError('KUI001', 'Icon requires either `name` or `icon`');
109
- }
110
- const icon = resolveUiIcon(environment, name);
111
- if (icon === undefined) {
112
- throw createRuntimeError('KUI002', `Icon is not registered: ${name}`);
113
- }
114
- return icon;
115
- }
116
- function normalizeUiIconEnvironment(source) {
117
- if (typeof source === 'function')
118
- return { icons: source };
119
- if ('resolve' in source)
120
- return { icons: source };
121
- return source;
122
- }
123
- function readIconTitle(props) {
124
- const title = readOptionalString(props.title?.value);
125
- return title === undefined ? {} : { title };
126
- }
127
- function readIconDecorative(props) {
128
- const decorative = readOptionalBoolean(props.decorative?.value);
129
- return decorative === undefined ? {} : { decorative };
130
- }
131
- function readIconSize(props) {
132
- const size = props.size?.value;
133
- return typeof size === 'string' || typeof size === 'number' ? { size } : {};
134
- }
135
- function readIconColor(props) {
136
- const color = readOptionalString(props.color?.value);
137
- return color === undefined ? {} : { color };
138
- }
139
- function readOptionalString(value) {
140
- return typeof value === 'string' && value.length > 0 ? value : undefined;
141
- }
142
- function readOptionalBoolean(value) {
143
- if (typeof value === 'boolean')
144
- return value;
145
- if (value === '')
146
- return true;
147
- if (value === 'true')
148
- return true;
149
- if (value === 'false')
150
- return false;
151
- return undefined;
152
- }
153
- function readDefined(name, value) {
154
- return (value === undefined ? {} : { [name]: value });
155
- }
156
- function applyProtocolAttributes(root) {
157
- root.setAttribute('data-vobs-template', 'k-icon');
158
- root.setAttribute('data-vobs-protocol', '1');
159
- }
160
- function applyBaseClass(root) {
161
- root.classList.add('k-icon');
162
- }
163
- function applyIconPresentation(root, model) {
164
- if (model.color === undefined)
165
- root.removeAttribute('color');
166
- else
167
- root.setAttribute('color', model.color);
168
- }
169
- function normalizeIconSize(size) {
170
- if (size === undefined || typeof size === 'number')
171
- return size;
172
- switch (size) {
173
- case 'xs':
174
- return 'var(--k-icon-xs)';
175
- case 'sm':
176
- return 'var(--k-icon-sm)';
177
- case 'md':
178
- return 'var(--k-icon-md)';
179
- case 'lg':
180
- return 'var(--k-icon-lg)';
181
- default:
182
- return /^\d+(?:\.\d+)?$/u.test(size) ? `${size}px` : size;
183
- }
184
- }
185
- export { createIconRegistry };
package/dist/index.d.ts DELETED
@@ -1,27 +0,0 @@
1
- /** @license MIT
2
- * Copyright (c) 2026 vobsjs
3
- * @vobs/ui
4
- */
5
- import { type ComponentRegistry, type InjectionScope } from '@vobs/runtime-dom';
6
- import { type AppShellConfigInput } from './app-shell.js';
7
- import { type UiIconSource } from './icons.js';
8
- export * from './theme.js';
9
- export * from './icons.js';
10
- export * from './calendar.js';
11
- export * from './calendar-picker.js';
12
- export * from './workbench.js';
13
- export { AppShell, UiAppShellEnvironmentKey, createAppShellRegistry, defineAppShell, defineAppShellConfig, provideUiAppShells, resolveActiveAppShellNavItemId, resolveAppShellState, resolveAppShellStatus, type AppShellAccountConfig, type AppShellAccountMenuItem, type AppShellAccountMenuItemKind, type AppShellAccountMenuItemTone, type AppShellAction, type AppShellBrandConfig, type AppShellConfigInput, type AppShellContentMode, type AppShellDefinition, type AppShellDefinitionRecord, type AppShellNavigationConfig, type AppShellNavItem, type AppShellNavItemTone, type AppShellPageHeaderConfig, type AppShellProps, type AppShellRegistry, type AppShellRouteConfig, type AppShellSidebarMode, type AppShellStatusbarConfig, type AppShellThemeIconConfig, type AppShellThemeConfig, type AppShellTopbarConfig, type ResolvedAppShellState, type ResolvedAppShellStatus, } from './app-shell.js';
14
- export interface SetupUiOptions {
15
- readonly icons?: true | UiIconSource;
16
- readonly appShells?: AppShellConfigInput;
17
- }
18
- declare const uiComponents: {
19
- 'k-app-shell': ComponentRegistry[string];
20
- 'k-icon': ComponentRegistry[string];
21
- 'k-calendar-picker': ComponentRegistry[string];
22
- };
23
- export interface UiSetupEnvironment {
24
- readonly components: typeof uiComponents;
25
- readonly injections?: InjectionScope;
26
- }
27
- export declare function setupUi(options?: SetupUiOptions): UiSetupEnvironment;
package/dist/index.js DELETED
@@ -1,34 +0,0 @@
1
- /** @license MIT
2
- * Copyright (c) 2026 vobsjs
3
- * @vobs/ui
4
- */
5
- import { createInjectionScope, } from '@vobs/runtime-dom';
6
- import { AppShell, provideUiAppShells } from './app-shell.js';
7
- import { CalendarPicker } from './calendar-picker.js';
8
- import { Icon, provideUiIcons } from './icons.js';
9
- export * from './theme.js';
10
- export * from './icons.js';
11
- export * from './calendar.js';
12
- export * from './calendar-picker.js';
13
- export * from './workbench.js';
14
- export { AppShell, UiAppShellEnvironmentKey, createAppShellRegistry, defineAppShell, defineAppShellConfig, provideUiAppShells, resolveActiveAppShellNavItemId, resolveAppShellState, resolveAppShellStatus, } from './app-shell.js';
15
- const uiComponents = {
16
- 'k-app-shell': AppShell,
17
- 'k-icon': Icon,
18
- 'k-calendar-picker': CalendarPicker,
19
- };
20
- export function setupUi(options = {}) {
21
- const injections = createInjectionScope();
22
- if (options.icons !== undefined && options.icons !== true) {
23
- provideUiIcons(injections, options.icons);
24
- }
25
- if (options.appShells !== undefined) {
26
- provideUiAppShells(injections, options.appShells);
27
- }
28
- if (options.icons === undefined || options.icons === true) {
29
- return options.appShells === undefined
30
- ? { components: uiComponents }
31
- : { components: uiComponents, injections };
32
- }
33
- return { components: uiComponents, injections };
34
- }
@@ -1,31 +0,0 @@
1
- /** @license MIT
2
- * Copyright (c) 2026 vobsjs
3
- * @vobs/ui
4
- */
5
- export declare const enUSLocale = "en-US";
6
- export declare const enUSMessages: {
7
- close: string;
8
- previous: string;
9
- next: string;
10
- noData: string;
11
- loading: string;
12
- chooseDate: string;
13
- notification: string;
14
- menu: string;
15
- tabs: string;
16
- };
17
- declare const _default: {
18
- locale: string;
19
- messages: {
20
- close: string;
21
- previous: string;
22
- next: string;
23
- noData: string;
24
- loading: string;
25
- chooseDate: string;
26
- notification: string;
27
- menu: string;
28
- tabs: string;
29
- };
30
- };
31
- export default _default;
@@ -1,20 +0,0 @@
1
- /** @license MIT
2
- * Copyright (c) 2026 vobsjs
3
- * @vobs/ui
4
- */
5
- export const enUSLocale = 'en-US';
6
- export const enUSMessages = {
7
- close: 'Close',
8
- previous: 'Previous',
9
- next: 'Next',
10
- noData: 'No data',
11
- loading: 'Loading',
12
- chooseDate: 'Choose date',
13
- notification: 'Notification',
14
- menu: 'Menu',
15
- tabs: 'Tabs',
16
- };
17
- export default {
18
- locale: enUSLocale,
19
- messages: enUSMessages,
20
- };
@@ -1,31 +0,0 @@
1
- /** @license MIT
2
- * Copyright (c) 2026 vobsjs
3
- * @vobs/ui
4
- */
5
- export declare const zhCNLocale = "zh-CN";
6
- export declare const zhCNMessages: {
7
- close: string;
8
- previous: string;
9
- next: string;
10
- noData: string;
11
- loading: string;
12
- chooseDate: string;
13
- notification: string;
14
- menu: string;
15
- tabs: string;
16
- };
17
- declare const _default: {
18
- locale: string;
19
- messages: {
20
- close: string;
21
- previous: string;
22
- next: string;
23
- noData: string;
24
- loading: string;
25
- chooseDate: string;
26
- notification: string;
27
- menu: string;
28
- tabs: string;
29
- };
30
- };
31
- export default _default;
@@ -1,20 +0,0 @@
1
- /** @license MIT
2
- * Copyright (c) 2026 vobsjs
3
- * @vobs/ui
4
- */
5
- export const zhCNLocale = 'zh-CN';
6
- export const zhCNMessages = {
7
- close: '关闭',
8
- previous: '上一页',
9
- next: '下一页',
10
- noData: '暂无数据',
11
- loading: '加载中',
12
- chooseDate: '选择日期',
13
- notification: '通知',
14
- menu: '菜单',
15
- tabs: '标签页',
16
- };
17
- export default {
18
- locale: zhCNLocale,
19
- messages: zhCNMessages,
20
- };