@sabrenski/spire-ui-vue 0.2.4 → 0.2.6
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/composables/index.d.ts +1 -0
- package/dist/composables/useComponentAs.d.ts +17 -3
- package/dist/config/types.d.ts +12 -0
- package/dist/plugin.d.ts +4 -0
- package/dist/spire-ui.cjs +34 -34
- package/dist/spire-ui.css +1 -1
- package/dist/spire-ui.js +20724 -20800
- package/dist/theme/semantic.css +4 -0
- package/package.json +1 -1
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
import { Component } from 'vue';
|
|
1
|
+
import { Component, InjectionKey } from 'vue';
|
|
2
2
|
type AsValue = 'a' | 'button' | 'router-link' | 'inertia-link' | Component;
|
|
3
|
+
/** Injection key for the Inertia Link component */
|
|
4
|
+
export declare const INERTIA_LINK_KEY: InjectionKey<Component>;
|
|
5
|
+
/** Injection key for the Vue Router Link component */
|
|
6
|
+
export declare const ROUTER_LINK_KEY: InjectionKey<Component>;
|
|
3
7
|
/**
|
|
4
8
|
* Composable that resolves string aliases like 'inertia-link' and 'router-link'
|
|
5
9
|
* to their actual Vue components. Falls back to the specified fallback element
|
|
6
|
-
* if the component
|
|
10
|
+
* if the component was not provided via the SpireUI plugin.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // In app.js, pass your Link component to SpireUI
|
|
15
|
+
* import { Link } from '@inertiajs/vue3'
|
|
16
|
+
* app.use(SpireUI, { links: { InertiaLink: Link } })
|
|
17
|
+
*
|
|
18
|
+
* // Then use as="inertia-link" in Sidebar components
|
|
19
|
+
* <SidebarItem as="inertia-link" href="/dashboard">Dashboard</SidebarItem>
|
|
20
|
+
* ```
|
|
7
21
|
*/
|
|
8
|
-
export declare function useComponentAs(as: () => AsValue | undefined, fallback?: string): import('vue').ComputedRef<
|
|
22
|
+
export declare function useComponentAs(as: () => AsValue | undefined, fallback?: string): import('vue').ComputedRef<string | Component>;
|
|
9
23
|
export {};
|
package/dist/config/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
1
2
|
import { InputSize, InputVariant } from '../components/Input/types';
|
|
2
3
|
import { ButtonSize, ButtonVariant } from '../components/Button/types';
|
|
3
4
|
import { BadgeSize, BadgeVariant, BadgeColor } from '../components/Badge/types';
|
|
@@ -151,10 +152,21 @@ export interface SpireUIDefaults {
|
|
|
151
152
|
/** Icon component defaults */
|
|
152
153
|
icon?: IconDefaults;
|
|
153
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Link component configuration for routing integrations
|
|
157
|
+
*/
|
|
158
|
+
export interface LinkComponents {
|
|
159
|
+
/** Inertia Link component from @inertiajs/vue3 */
|
|
160
|
+
InertiaLink?: Component;
|
|
161
|
+
/** Vue Router Link component */
|
|
162
|
+
RouterLink?: Component;
|
|
163
|
+
}
|
|
154
164
|
/**
|
|
155
165
|
* Full Spire UI plugin options
|
|
156
166
|
*/
|
|
157
167
|
export interface SpireUIOptions {
|
|
158
168
|
/** Component default prop values */
|
|
159
169
|
defaults?: SpireUIDefaults;
|
|
170
|
+
/** Link components for navigation (Inertia, Vue Router) */
|
|
171
|
+
links?: LinkComponents;
|
|
160
172
|
}
|
package/dist/plugin.d.ts
CHANGED
|
@@ -5,10 +5,14 @@ import { Plugin } from 'vue';
|
|
|
5
5
|
* @example
|
|
6
6
|
* ```ts
|
|
7
7
|
* import { createApp } from 'vue'
|
|
8
|
+
* import { Link } from '@inertiajs/vue3'
|
|
8
9
|
* import { SpireUI } from 'spire-ui'
|
|
9
10
|
*
|
|
10
11
|
* const app = createApp(App)
|
|
11
12
|
* app.use(SpireUI, {
|
|
13
|
+
* links: {
|
|
14
|
+
* InertiaLink: Link,
|
|
15
|
+
* },
|
|
12
16
|
* defaults: {
|
|
13
17
|
* form: { variant: 'filled', size: 'lg' },
|
|
14
18
|
* button: { size: 'lg', variant: 'secondary' },
|