@ulu/frontend-vue 0.6.0 → 0.6.2
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/components/elements/UluBadge.vue.d.ts +2 -0
- package/dist/components/elements/UluBadge.vue.d.ts.map +1 -1
- package/dist/components/elements/UluBadge.vue.js +30 -21
- package/dist/components/systems/facets/useFacets.d.ts.map +1 -1
- package/dist/components/systems/scroll-anchors/useScrollAnchorSection.d.ts.map +1 -1
- package/dist/components/systems/scroll-anchors/useScrollAnchorSections.d.ts.map +1 -1
- package/dist/components/systems/scroll-anchors/useScrollAnchors.d.ts.map +1 -1
- package/dist/composables/useBreakpointManager.d.ts.map +1 -1
- package/dist/composables/useDocumentTitle.d.ts.map +1 -1
- package/dist/composables/useIcon.d.ts +3 -0
- package/dist/composables/useIcon.d.ts.map +1 -1
- package/dist/composables/useModifiers.d.ts.map +1 -1
- package/dist/composables/usePagination.d.ts.map +1 -1
- package/dist/composables/useRequiredInject.d.ts.map +1 -1
- package/dist/composables/useTableData.d.ts.map +1 -1
- package/dist/composables/useUluFloating.d.ts.map +1 -1
- package/dist/composables/useWindowResize.d.ts.map +1 -1
- package/dist/index.js +44 -42
- package/dist/mcp-data.json +17685 -0
- package/dist/plugins/breakpoints/index.d.ts.map +1 -1
- package/dist/plugins/core/index.d.ts.map +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/modals/api.d.ts.map +1 -1
- package/dist/plugins/modals/index.d.ts +2 -0
- package/dist/plugins/modals/index.d.ts.map +1 -1
- package/dist/plugins/modals/useModals.d.ts.map +1 -1
- package/dist/plugins/modals/useModals.js +10 -0
- package/dist/plugins/popovers/defaults.d.ts.map +1 -1
- package/dist/plugins/popovers/index.d.ts.map +1 -1
- package/dist/plugins/popovers/useTooltip.d.ts.map +1 -1
- package/dist/plugins/popovers/useTooltipFollow.d.ts.map +1 -1
- package/dist/plugins/toast/index.d.ts.map +1 -1
- package/dist/plugins/toast/store.d.ts.map +1 -1
- package/dist/plugins/toast/useToast.d.ts.map +1 -1
- package/dist/resolver.d.ts.map +1 -1
- package/dist/utils/dom.d.ts +3 -0
- package/dist/utils/dom.d.ts.map +1 -1
- package/dist/utils/props.d.ts +3 -0
- package/dist/utils/props.d.ts.map +1 -1
- package/dist/utils/router.d.ts +12 -15
- package/dist/utils/router.d.ts.map +1 -1
- package/lib/components/elements/UluBadge.vue +16 -5
- package/lib/components/index.js +3 -0
- package/lib/components/systems/facets/useFacets.js +3 -0
- package/lib/components/systems/index.js +3 -0
- package/lib/components/systems/scroll-anchors/useScrollAnchorSection.js +3 -0
- package/lib/components/systems/scroll-anchors/useScrollAnchorSections.js +3 -0
- package/lib/components/systems/scroll-anchors/useScrollAnchors.js +3 -0
- package/lib/composables/useBreakpointManager.js +3 -0
- package/lib/composables/useDocumentTitle.js +3 -0
- package/lib/composables/useIcon.js +3 -0
- package/lib/composables/useModifiers.js +3 -1
- package/lib/composables/usePagination.js +3 -0
- package/lib/composables/useRequiredInject.js +3 -0
- package/lib/composables/useTableData.js +3 -0
- package/lib/composables/useUluFloating.js +3 -0
- package/lib/composables/useWindowResize.js +3 -0
- package/lib/index.js +1 -1
- package/lib/meta.js +1 -1
- package/lib/plugins/breakpoints/index.js +3 -0
- package/lib/plugins/core/index.js +2 -1
- package/lib/plugins/index.js +2 -2
- package/lib/plugins/modals/api.js +3 -0
- package/lib/plugins/modals/index.js +9 -4
- package/lib/plugins/modals/useModals.js +3 -0
- package/lib/plugins/popovers/defaults.js +3 -0
- package/lib/plugins/popovers/index.js +3 -0
- package/lib/plugins/popovers/useTooltip.js +3 -0
- package/lib/plugins/popovers/useTooltipFollow.js +3 -0
- package/lib/plugins/toast/defaults.js +3 -0
- package/lib/plugins/toast/index.js +3 -0
- package/lib/plugins/toast/store.js +3 -0
- package/lib/plugins/toast/useToast.js +3 -0
- package/lib/resolver.js +3 -0
- package/lib/utils/dom.js +3 -0
- package/lib/utils/index.js +3 -0
- package/lib/utils/props.js +3 -0
- package/lib/utils/router.js +10 -10
- package/lib/vite.js +3 -0
- package/package.json +17 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/breakpoints/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/breakpoints/index.js"],"names":[],"mappings":"AAoBA;;;;;;;;;GASG;AACH,qCALW,MAAM,eAEd;IAA6B,gBAAgB;IAChB,cAAc;CAC7C,QA8BA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/core/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/core/index.js"],"names":[],"mappings":"AAqCA;;;;;;;;;;GAUG;AACH,qCAPW,MAAM,iBAEd;IAA+B,iBAAiB;IAClB,aAAa;IACX,gBAAgB;IAClB,WAAW;CAC3C,QA0DA;AAtED,gCAA0D"}
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as corePlugin } from './core/index.js';
|
|
2
|
-
export { default as modalsPlugin } from './modals/index.js';
|
|
3
2
|
export { default as toastPlugin } from './toast/index.js';
|
|
4
3
|
export { default as breakpointsPlugin } from './breakpoints/index.js';
|
|
5
4
|
export { default as popoversPlugin, useTooltip, useTooltipFollow } from './popovers/index.js';
|
|
5
|
+
export { default as modalsPlugin, useModals } from './modals/index.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../lib/plugins/modals/api.js"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../lib/plugins/modals/api.js"],"names":[],"mappings":";;;;AAgCO;;IAML;;;;OAIG;;IAKH;;;OAGG;oBADS,MAAM;IAUlB;;OAEG;;IAKH;;;OAGG;uBADS,MAAM;EAUlB;AAxDF;;GAEG;AACH;;;EAAyB;AAnBzB,4BAAkB"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { useModals } from './useModals.js';
|
|
1
2
|
/**
|
|
2
3
|
* Modals Vue Plugin
|
|
3
4
|
* @param {Object} App Vue app instance passed to plugin
|
|
4
5
|
* @param {UluModalsPluginOptions} userOptions Options to change (see defaults)
|
|
5
6
|
*/
|
|
6
7
|
export default function install(app: any, userOptions: UluModalsPluginOptions): void;
|
|
8
|
+
export { useModals };
|
|
7
9
|
/**
|
|
8
10
|
* Default plugin options
|
|
9
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/modals/index.js"],"names":[],"mappings":"AAsBA;;;;GAIG;AACH,uDAFW,sBAAsB,QA8BhC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/modals/index.js"],"names":[],"mappings":"AAsBA;;;;GAIG;AACH,uDAFW,sBAAsB,QA8BhC;;;;;;;;;;;;;kBAxCa,eAAe;;0BANH,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModals.d.ts","sourceRoot":"","sources":["../../../lib/plugins/modals/useModals.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useModals.d.ts","sourceRoot":"","sources":["../../../lib/plugins/modals/useModals.js"],"names":[],"mappings":"AAYO,6BAHM,MAAM,CASlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/defaults.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/defaults.js"],"names":[],"mappings":";gBAMY,MAAM;;;;;;;;;iBA8CN,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/index.js"],"names":[],"mappings":"AAoDA;;;;GAIG;AACH,qCAHW,MAAM,gBACN,MAAM,QAgJhB;AA9LD;;GAEG;AACH,kCAAmC,mBAAmB,CAAC;AAEvD;;GAEG;AACH,gCAAiC,iBAAiB,CAAC;AAEnD;;GAEG;AACH,yBAA0B,oBAAoB,CAAC;;;AAcxC,gDAJI,GAAC,mBACD,MAAM,GACJ,MAAM,GAAC,IAAI,CAgBvB;2BA3C0B,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/useTooltip.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/useTooltip.js"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,8BAFa;IAAC,WAAW,WAAW;IAAC,WAAW,WAAW;IAAC,YAAY,EAAE,MAAM,CAAA;CAAC,CAmBhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltipFollow.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/useTooltipFollow.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTooltipFollow.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/useTooltipFollow.js"],"names":[],"mappings":"AAQA;;;;;;EA4DC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/toast/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/toast/index.js"],"names":[],"mappings":"AAOA;;GAEG;AACH,kEASC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../lib/plugins/toast/store.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../lib/plugins/toast/store.js"],"names":[],"mappings":"AASA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBG;;IAMD;;;;OAIG;IACH,sBAHW,MAAM,OAYhB;IACD;;;OAGG;IACH,gCAKC;IACD;;OAEG;IACH,2BAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToast.d.ts","sourceRoot":"","sources":["../../../lib/plugins/toast/useToast.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useToast.d.ts","sourceRoot":"","sources":["../../../lib/plugins/toast/useToast.js"],"names":[],"mappings":"AAcO,4BAPM,MAAM,CAalB"}
|
package/dist/resolver.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../lib/resolver.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../lib/resolver.js"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,iEAHG;IAA+B,QAAQ,EAA/B,KAAK,QAAQ;CACrB,OAeF"}
|
package/dist/utils/dom.d.ts
CHANGED
package/dist/utils/dom.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../lib/utils/dom.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oCAHW,WAAW,GAAC,MAAM,GAChB,WAAW,CASvB;AAKD;;;;;;GAMG;AACH,+BAHW,MAAM,GACJ,MAAM,CASlB"}
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../lib/utils/dom.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;GAKG;AACH,oCAHW,WAAW,GAAC,MAAM,GAChB,WAAW,CASvB;AAKD;;;;;;GAMG;AACH,+BAHW,MAAM,GACJ,MAAM,CASlB"}
|
package/dist/utils/props.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../lib/utils/props.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wDAEC;AAED;;;;;GAKG;AACH,4CAJW,MAAM,mBACN,MAAM,EAAE,4BASlB"}
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../lib/utils/props.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;GAIG;AACH,wDAEC;AAED;;;;;GAKG;AACH,4CAJW,MAAM,mBACN,MAAM,EAAE,4BASlB"}
|
package/dist/utils/router.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* - Note: Functions prefixed with "$" work with $route objects (running application, provided by vue-router ie $router, useRoute, etc),
|
|
4
|
-
* @module router-utils
|
|
2
|
+
* @module utils.router
|
|
5
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* This Module Creates Menus from route or router config
|
|
6
|
+
|
|
6
7
|
/**
|
|
7
8
|
* Resolves a route's title from its meta.
|
|
8
9
|
* - If `meta.title` is a function, it's called with the `currentRoute` (or the route itself).
|
|
@@ -25,7 +26,7 @@ export function getRouteTitle(route: object, currentRoute?: object): string | un
|
|
|
25
26
|
* @param {Object} options Options
|
|
26
27
|
* @param {Object} options.qualifier Callback to qualify as a base route (defaults to isStaticBaseRoute)
|
|
27
28
|
* @param {Object} options.item Options for createMenuItem
|
|
28
|
-
* @returns {Array
|
|
29
|
+
* @returns {Array<RouteMenuItem>} Array of menu items
|
|
29
30
|
*/
|
|
30
31
|
export function createBaseMenu(routes: any, options: {
|
|
31
32
|
qualifier: Object;
|
|
@@ -42,9 +43,9 @@ export function flattenMenu(menu: Array<RouteMenuItem>): Array<RouteMenuItem>;
|
|
|
42
43
|
* @param {*} routes All routes
|
|
43
44
|
* @param {*} sectionPath Path for section to create menu
|
|
44
45
|
* @param {Object} options Options
|
|
45
|
-
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie
|
|
46
|
+
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie path: ""
|
|
46
47
|
* @param {Object} options.item Options to be passed to createMenuItem
|
|
47
|
-
* @returns {Array
|
|
48
|
+
* @returns {Array<RouteMenuItem>} Array of menu items
|
|
48
49
|
*/
|
|
49
50
|
export function createSectionMenu(routes: any, sectionPath: any, options: {
|
|
50
51
|
includeIndex: boolean;
|
|
@@ -82,7 +83,7 @@ export function isStaticRoute(route: Object): boolean;
|
|
|
82
83
|
*/
|
|
83
84
|
export function isStaticBaseRoute(route: Object): boolean;
|
|
84
85
|
/**
|
|
85
|
-
* Function to make normal
|
|
86
|
+
* Function to make normal `<a>` behave as router links instread of page reload
|
|
86
87
|
* @param {Object} router Router instance (ie src/router) to push routes to
|
|
87
88
|
* @param {Object} event The event object that triggered route change (ie. onclick) pass event object
|
|
88
89
|
*/
|
|
@@ -107,9 +108,9 @@ export function $getParentRoute(route: Object, deepest: Object): Object | null;
|
|
|
107
108
|
* @param {Object} route Actual $route object
|
|
108
109
|
* @param {Object} options Options
|
|
109
110
|
* @param {Object} options.parent Route parent object, defaults to parent of route
|
|
110
|
-
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie
|
|
111
|
+
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie path: ""
|
|
111
112
|
* @param {Object} options.item Options for createMenuItem
|
|
112
|
-
* @returns {Array
|
|
113
|
+
* @returns {Array<RouteMenuItem>} Array of menu items
|
|
113
114
|
*/
|
|
114
115
|
export function $createSectionMenu(route: Object, options: {
|
|
115
116
|
parent: Object;
|
|
@@ -123,13 +124,9 @@ export function $createSectionMenu(route: Object, options: {
|
|
|
123
124
|
* - Skips routes where `meta.breadcrumb` is set to `false`.
|
|
124
125
|
* - Avoids duplicate crumbs for nested routes with empty paths.
|
|
125
126
|
* @param {Object} route The Vue Router `$route` object.
|
|
126
|
-
* @returns {Array
|
|
127
|
+
* @returns {Array<Object>} An array of breadcrumb items with title, to, and current properties.
|
|
127
128
|
*/
|
|
128
|
-
export function $createBreadcrumb(route: Object): Array<
|
|
129
|
-
title: string;
|
|
130
|
-
to: Object;
|
|
131
|
-
current: boolean;
|
|
132
|
-
}>;
|
|
129
|
+
export function $createBreadcrumb(route: Object): Array<Object>;
|
|
133
130
|
/**
|
|
134
131
|
* Route Menu Item
|
|
135
132
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../lib/utils/router.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../lib/utils/router.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;GAWG;AACH,qCAJW,MAAM,iBACN,MAAM,GACJ,MAAM,GAAC,SAAS,CAW5B;AAED;;;;;GAKG;AAEH;;;;;;;GAOG;AACH,uCANW,GAAC,WAET;IAAwB,SAAS,EAAzB,MAAM;IACU,IAAI,EAApB,MAAM;CACd,GAAU,KAAK,CAAC,aAAa,CAAC,CAgChC;AAED;;;;GAIG;AACH,kCAHW,KAAK,CAAC,aAAa,CAAC,GAClB,KAAK,CAAC,aAAa,CAAC,CAgBhC;AAED;;;;;;;;GAQG;AACH,0CAPW,GAAC,eACD,GAAC,WAET;IAAyB,YAAY;IACb,IAAI,EAApB,MAAM;CACd,GAAU,KAAK,CAAC,aAAa,CAAC,CA4BhC;AAED;;;;GAIG;AACH,qDAFa,MAAM,CAIlB;AAED;;;;;;;;GAQG;AACH,sCAPW,MAAM,aACN,MAAM,uBAEd;IAA0B,MAAM;IACN,SAAS;CACnC,GAAU,aAAa,CAuBzB;AAED;;;;GAIG;AACH,qCAHW,MAAM,WAKhB;AAED;;;;GAIG;AACH,yCAHW,MAAM,WAMhB;AAED;;;;GAIG;AACH,yCAHW,MAAM,SACN,MAAM,QAYhB;AAED;;;;GAIG;AACH,yCAHW,MAAM,2BACJ,KAAK,CAAC,MAAM,CAAC,GAAC,SAAS,CAInC;AAED;;;;;GAKG;AACH,uCAJW,MAAM,WACN,MAAM,GACL,MAAM,OAAK,CAUtB;AAUD;;;;;;;;;;GAUG;AACH,0CAPW,MAAM,WAEd;IAAwB,MAAM,EAAtB,MAAM;IACW,YAAY;IACb,IAAI,EAApB,MAAM;CACd,GAAU,KAAK,CAAC,aAAa,CAAC,CAgBhC;AAED;;;;;;;;GAQG;AACH,yCAHW,MAAM,GACJ,KAAK,CAAC,MAAM,CAAC,CAmCzB"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component
|
|
3
3
|
class="badge"
|
|
4
|
-
:class="
|
|
5
|
-
size ? `badge--${ size }` : null,
|
|
6
|
-
type ? `badge--${ type }` : null,
|
|
7
|
-
{ 'badge--clickable' : isInteractive }
|
|
8
|
-
]"
|
|
4
|
+
:class="resolvedModifiers"
|
|
9
5
|
:is="element"
|
|
10
6
|
:to="to"
|
|
11
7
|
:href="href"
|
|
@@ -29,6 +25,7 @@
|
|
|
29
25
|
<script setup>
|
|
30
26
|
import { computed } from "vue";
|
|
31
27
|
import { RouterLink } from "vue-router";
|
|
28
|
+
import { useModifiers } from "../../composables/useModifiers.js";
|
|
32
29
|
|
|
33
30
|
const props = defineProps({
|
|
34
31
|
/**
|
|
@@ -63,12 +60,26 @@
|
|
|
63
60
|
* A URL. Renders as a standard <a> tag.
|
|
64
61
|
*/
|
|
65
62
|
href: String,
|
|
63
|
+
/**
|
|
64
|
+
* Modifiers (to add any modifier classes based on base class [ie. 'tertiary'])
|
|
65
|
+
*/
|
|
66
|
+
modifiers: [String, Array]
|
|
66
67
|
});
|
|
67
68
|
|
|
68
69
|
const isInteractive = computed(() => {
|
|
69
70
|
return Boolean(props.to || props.click);
|
|
70
71
|
});
|
|
71
72
|
|
|
73
|
+
const { resolvedModifiers } = useModifiers({
|
|
74
|
+
props,
|
|
75
|
+
baseClass: "badge",
|
|
76
|
+
internal: computed(() => ({
|
|
77
|
+
[props.size] : props.size,
|
|
78
|
+
[props.type] : props.type,
|
|
79
|
+
"clickable" : isInteractive.value
|
|
80
|
+
}))
|
|
81
|
+
});
|
|
82
|
+
|
|
72
83
|
const element = computed(() => {
|
|
73
84
|
const { click, to, href } = props;
|
|
74
85
|
/* eslint-disable */
|
package/lib/components/index.js
CHANGED
package/lib/index.js
CHANGED
package/lib/meta.js
CHANGED
package/lib/plugins/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @module plugins
|
|
2
|
+
* @module plugins
|
|
3
3
|
* Responsible for exporting all plugins
|
|
4
4
|
* - Used in bundle exports
|
|
5
5
|
*/
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
export { default as corePlugin } from './core/index.js';
|
|
9
9
|
export { default as popoversPlugin, useTooltip, useTooltipFollow } from './popovers/index.js';
|
|
10
|
-
export { default as modalsPlugin } from './modals/index.js';
|
|
10
|
+
export { default as modalsPlugin, useModals } from './modals/index.js';
|
|
11
11
|
export { default as toastPlugin } from './toast/index.js';
|
|
12
12
|
export { default as breakpointsPlugin } from './breakpoints/index.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @module
|
|
3
|
-
* @
|
|
4
|
-
* Modals plugin (adds components, global registry, etc)
|
|
2
|
+
* @module modalsPlugin
|
|
3
|
+
* @description Modals plugin (adds components, global registry, etc)
|
|
5
4
|
* - Updated version handles both independent and global registered/triggered modals
|
|
6
5
|
*/
|
|
7
6
|
|
|
8
7
|
import UluModalsDisplay from "./UluModalsDisplay.vue";
|
|
9
8
|
import UluModal from "../../components/collapsible/UluModal.vue";
|
|
10
9
|
import { createApi, modalsState } from "./api.js";
|
|
10
|
+
import { useModals } from "./useModals.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Default plugin options
|
|
@@ -53,4 +53,9 @@ export default function install(app, userOptions) {
|
|
|
53
53
|
// Global property for modals component to access state
|
|
54
54
|
// and for debugging logging if needed
|
|
55
55
|
app.config.globalProperties.$uluModalsState = modalsState;
|
|
56
|
-
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Public export for composable function
|
|
60
|
+
*/
|
|
61
|
+
export { useModals };
|
package/lib/resolver.js
CHANGED
package/lib/utils/dom.js
CHANGED
package/lib/utils/index.js
CHANGED
package/lib/utils/props.js
CHANGED
package/lib/utils/router.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* - Note: Functions prefixed with "$" work with $route objects (running application, provided by vue-router ie $router, useRoute, etc),
|
|
4
|
-
* @module router-utils
|
|
2
|
+
* @module utils.router
|
|
5
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* This Module Creates Menus from route or router config
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Resolves a route's title from its meta.
|
|
@@ -37,7 +37,7 @@ export function getRouteTitle(route, currentRoute) {
|
|
|
37
37
|
* @param {Object} options Options
|
|
38
38
|
* @param {Object} options.qualifier Callback to qualify as a base route (defaults to isStaticBaseRoute)
|
|
39
39
|
* @param {Object} options.item Options for createMenuItem
|
|
40
|
-
* @returns {Array
|
|
40
|
+
* @returns {Array<RouteMenuItem>} Array of menu items
|
|
41
41
|
*/
|
|
42
42
|
export function createBaseMenu(routes, options) {
|
|
43
43
|
const defaults = {
|
|
@@ -97,9 +97,9 @@ export function flattenMenu(menu) {
|
|
|
97
97
|
* @param {*} routes All routes
|
|
98
98
|
* @param {*} sectionPath Path for section to create menu
|
|
99
99
|
* @param {Object} options Options
|
|
100
|
-
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie
|
|
100
|
+
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie path: ""
|
|
101
101
|
* @param {Object} options.item Options to be passed to createMenuItem
|
|
102
|
-
* @returns {Array
|
|
102
|
+
* @returns {Array<RouteMenuItem>} Array of menu items
|
|
103
103
|
*/
|
|
104
104
|
export function createSectionMenu(routes, sectionPath, options) {
|
|
105
105
|
const defaults = {
|
|
@@ -190,7 +190,7 @@ export function isStaticBaseRoute(route) {
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
|
-
* Function to make normal
|
|
193
|
+
* Function to make normal `<a>` behave as router links instread of page reload
|
|
194
194
|
* @param {Object} router Router instance (ie src/router) to push routes to
|
|
195
195
|
* @param {Object} event The event object that triggered route change (ie. onclick) pass event object
|
|
196
196
|
*/
|
|
@@ -246,9 +246,9 @@ function sortByWeight(a, b) {
|
|
|
246
246
|
* @param {Object} route Actual $route object
|
|
247
247
|
* @param {Object} options Options
|
|
248
248
|
* @param {Object} options.parent Route parent object, defaults to parent of route
|
|
249
|
-
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie
|
|
249
|
+
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie path: ""
|
|
250
250
|
* @param {Object} options.item Options for createMenuItem
|
|
251
|
-
* @returns {Array
|
|
251
|
+
* @returns {Array<RouteMenuItem>} Array of menu items
|
|
252
252
|
*/
|
|
253
253
|
export function $createSectionMenu(route, options) {
|
|
254
254
|
const defaults = {
|
|
@@ -273,7 +273,7 @@ export function $createSectionMenu(route, options) {
|
|
|
273
273
|
* - Skips routes where `meta.breadcrumb` is set to `false`.
|
|
274
274
|
* - Avoids duplicate crumbs for nested routes with empty paths.
|
|
275
275
|
* @param {Object} route The Vue Router `$route` object.
|
|
276
|
-
* @returns {Array
|
|
276
|
+
* @returns {Array<Object>} An array of breadcrumb items with title, to, and current properties.
|
|
277
277
|
*/
|
|
278
278
|
export function $createBreadcrumb(route) {
|
|
279
279
|
const { matched, path: currentPath } = route;
|