@ulu/frontend-vue 0.5.16 → 0.6.1
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/elements/UluButton.vue.d.ts +4 -0
- package/dist/components/elements/UluButton.vue.d.ts.map +1 -1
- package/dist/components/elements/UluButton.vue.js +31 -16
- package/dist/components/elements/UluIcon.vue.js +21 -36
- package/dist/components/forms/UluFormCheckbox.vue.d.ts +3 -19
- package/dist/components/forms/UluFormCheckbox.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormCheckbox.vue.js +10 -31
- package/dist/components/forms/UluFormFile.vue.d.ts +3 -25
- package/dist/components/forms/UluFormFile.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormFile.vue.js +11 -49
- package/dist/components/forms/UluFormItem.vue.d.ts +23 -8
- package/dist/components/forms/UluFormItem.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormItem.vue.js +126 -29
- package/dist/components/forms/UluFormLabel.vue.d.ts +24 -0
- package/dist/components/forms/UluFormLabel.vue.d.ts.map +1 -0
- package/dist/components/forms/UluFormLabel.vue.js +34 -0
- package/dist/components/forms/UluFormRadio.vue.d.ts +7 -25
- package/dist/components/forms/UluFormRadio.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormRadio.vue.js +11 -37
- package/dist/components/forms/UluFormSelect.vue.d.ts +7 -23
- package/dist/components/forms/UluFormSelect.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormSelect.vue.js +24 -43
- package/dist/components/forms/UluFormText.vue.d.ts +5 -23
- package/dist/components/forms/UluFormText.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormText.vue.js +10 -38
- package/dist/components/forms/UluFormTextarea.vue.d.ts +5 -23
- package/dist/components/forms/UluFormTextarea.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormTextarea.vue.js +10 -37
- package/dist/components/forms/UluSearchForm.vue.d.ts +24 -3
- package/dist/components/forms/UluSearchForm.vue.d.ts.map +1 -1
- package/dist/components/forms/UluSearchForm.vue.js +67 -22
- package/dist/components/index.d.ts +1 -0
- package/dist/components/systems/facets/UluFacetsFilterSelects.vue.d.ts.map +1 -1
- package/dist/components/systems/facets/UluFacetsFilterSelects.vue.js +21 -22
- 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/components/utils/UluAction.vue.d.ts +2 -0
- package/dist/components/utils/UluAction.vue.d.ts.map +1 -1
- package/dist/components/utils/UluAction.vue.js +9 -5
- package/dist/components/visualizations/UluProgressBar.vue.d.ts +2 -2
- 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 +130 -128
- 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/core/index.js +17 -16
- package/dist/plugins/modals/api.d.ts.map +1 -1
- package/dist/plugins/modals/index.d.ts.map +1 -1
- package/dist/plugins/modals/useModals.d.ts.map +1 -1
- 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 +10 -0
- package/dist/utils/props.d.ts.map +1 -1
- package/dist/utils/props.js +8 -2
- 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/elements/UluButton.vue +18 -3
- package/lib/components/elements/UluIcon.vue +8 -26
- package/lib/components/forms/UluForm.vue +25 -25
- package/lib/components/forms/UluFormCheckbox.vue +11 -25
- package/lib/components/forms/UluFormFieldset.vue +6 -6
- package/lib/components/forms/UluFormFile.vue +10 -40
- package/lib/components/forms/UluFormItem.vue +150 -39
- package/lib/components/forms/UluFormLabel.vue +30 -0
- package/lib/components/forms/UluFormRadio.vue +15 -34
- package/lib/components/forms/UluFormSelect.vue +19 -24
- package/lib/components/forms/UluFormText.vue +7 -25
- package/lib/components/forms/UluFormTextarea.vue +7 -25
- package/lib/components/forms/UluSearchForm.vue +67 -19
- package/lib/components/forms/UluSelectableMenu.vue +62 -62
- package/lib/components/index.js +4 -0
- package/lib/components/systems/facets/UluFacetsFilterSelects.vue +11 -14
- 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/components/utils/UluAction.vue +6 -2
- 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 +4 -2
- package/lib/plugins/index.js +1 -1
- package/lib/plugins/modals/api.js +3 -0
- package/lib/plugins/modals/index.js +2 -3
- 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 +17 -0
- package/lib/utils/router.js +10 -10
- package/lib/vite.js +3 -0
- package/package.json +19 -6
|
@@ -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"}
|
|
@@ -2,7 +2,7 @@ import { reactive as c } from "vue";
|
|
|
2
2
|
const o = {
|
|
3
3
|
fontAwesomeStatic: !1,
|
|
4
4
|
iconComponent: null,
|
|
5
|
-
iconPropResolver: (
|
|
5
|
+
iconPropResolver: (n) => ({ icon: n }),
|
|
6
6
|
iconsByType: {
|
|
7
7
|
danger: "fas fa-triangle-exclamation",
|
|
8
8
|
warning: "fas fa-circle-exclamation",
|
|
@@ -22,12 +22,13 @@ const o = {
|
|
|
22
22
|
file: "fas fa-file",
|
|
23
23
|
previous: "fas fa-chevron-left",
|
|
24
24
|
next: "fas fa-chevron-right",
|
|
25
|
-
dropdownExpand: "fas fa-caret-down"
|
|
25
|
+
dropdownExpand: "fas fa-caret-down",
|
|
26
|
+
search: "fas fa-search"
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
|
-
function p(
|
|
29
|
-
const t = c({ ...o }), { iconsByType:
|
|
30
|
-
|
|
29
|
+
function p(n, f = {}) {
|
|
30
|
+
const t = c({ ...o }), { iconsByType: r, ...i } = f || {};
|
|
31
|
+
i && Object.assign(t, i);
|
|
31
32
|
const s = {
|
|
32
33
|
// Methods to interact with settings
|
|
33
34
|
getSettings() {
|
|
@@ -46,25 +47,25 @@ function p(a, f = {}) {
|
|
|
46
47
|
}
|
|
47
48
|
return t[e];
|
|
48
49
|
},
|
|
49
|
-
updateSetting(e,
|
|
50
|
+
updateSetting(e, a) {
|
|
50
51
|
if (typeof e != "string")
|
|
51
52
|
throw new Error("Expected key to be string");
|
|
52
|
-
t[e] =
|
|
53
|
+
t[e] = a;
|
|
53
54
|
},
|
|
54
55
|
getIcon(e) {
|
|
55
|
-
const
|
|
56
|
-
if (!
|
|
56
|
+
const a = t.iconsByType;
|
|
57
|
+
if (!a[e])
|
|
57
58
|
throw new Error(`Icon type "${e}" not found!`);
|
|
58
|
-
return
|
|
59
|
+
return a[e];
|
|
59
60
|
},
|
|
60
|
-
setIcon(e,
|
|
61
|
-
t.iconsByType[e] =
|
|
61
|
+
setIcon(e, a) {
|
|
62
|
+
t.iconsByType[e] = a;
|
|
62
63
|
}
|
|
63
64
|
};
|
|
64
|
-
if (
|
|
65
|
-
for (const [e,
|
|
66
|
-
s.setIcon(e,
|
|
67
|
-
|
|
65
|
+
if (r)
|
|
66
|
+
for (const [e, a] of Object.entries(r))
|
|
67
|
+
s.setIcon(e, a);
|
|
68
|
+
n.provide("uluCore", s), n.config.globalProperties.$uluCore = s;
|
|
68
69
|
}
|
|
69
70
|
export {
|
|
70
71
|
p as default
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/modals/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/modals/index.js"],"names":[],"mappings":"AAqBA;;;;GAIG;AACH,uDAFW,sBAAsB,QA8BhC;;;;;;;;;;;;kBAxCa,eAAe"}
|
|
@@ -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,7 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module utils.props
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* Ensures the array consists of objects
|
|
3
6
|
* @param {Array} array Array to check
|
|
4
7
|
* @returns {Boolean} Whether all are objects within
|
|
5
8
|
*/
|
|
6
9
|
export function isArrayOfObjects(array: any[]): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Checks for deprecated props and calls a callback for each match
|
|
12
|
+
* @param {object} props - The current props object
|
|
13
|
+
* @param {string[]} deprecatedNames - Array of prop names to check
|
|
14
|
+
* @param {function} callback - Function called for each match, receiving the prop name
|
|
15
|
+
*/
|
|
16
|
+
export function checkDeprecatedProps(props: object, deprecatedNames: string[], callback: Function): void;
|
|
7
17
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../lib/utils/props.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wDAEC"}
|
|
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/props.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
function
|
|
1
|
+
function f(e) {
|
|
2
2
|
return e.every((r) => typeof r == "object");
|
|
3
3
|
}
|
|
4
|
+
function o(e, r, t) {
|
|
5
|
+
r.forEach((c) => {
|
|
6
|
+
e[c] !== void 0 && t(c);
|
|
7
|
+
});
|
|
8
|
+
}
|
|
4
9
|
export {
|
|
5
|
-
|
|
10
|
+
o as checkDeprecatedProps,
|
|
11
|
+
f as isArrayOfObjects
|
|
6
12
|
};
|
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 */
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
:href="href"
|
|
5
5
|
:target="target"
|
|
6
6
|
:download="download"
|
|
7
|
+
:type="type"
|
|
7
8
|
class="button"
|
|
8
9
|
:class="[
|
|
9
10
|
{
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
import UluAction from "../utils/UluAction.vue";
|
|
39
40
|
import UluIcon from "./UluIcon.vue";
|
|
40
41
|
import { useModifiers } from "../../composables/useModifiers.js";
|
|
42
|
+
import { checkDeprecatedProps } from "../../utils/props.js";
|
|
41
43
|
|
|
42
44
|
const props = defineProps({
|
|
43
45
|
/**
|
|
@@ -70,9 +72,14 @@
|
|
|
70
72
|
*/
|
|
71
73
|
download: [Boolean, String],
|
|
72
74
|
/**
|
|
73
|
-
*
|
|
75
|
+
* **Deprecated!** Use `ariaLabel` instead.
|
|
76
|
+
* @deprecated Use `ariaLabel` instead.
|
|
74
77
|
*/
|
|
75
78
|
alt: String,
|
|
79
|
+
/**
|
|
80
|
+
* For icon only buttons or buttons that need an explicit aria-label
|
|
81
|
+
*/
|
|
82
|
+
ariaLabel: String,
|
|
76
83
|
/**
|
|
77
84
|
* If not using slot this sets the buttons text via prop
|
|
78
85
|
*/
|
|
@@ -112,7 +119,15 @@
|
|
|
112
119
|
/**
|
|
113
120
|
* Modifiers (to add any modifier classes based on base class [ie. 'tertiary'])
|
|
114
121
|
*/
|
|
115
|
-
modifiers: [String, Array]
|
|
122
|
+
modifiers: [String, Array],
|
|
123
|
+
/**
|
|
124
|
+
* Button type (e.g. 'submit', 'reset', 'button').
|
|
125
|
+
*/
|
|
126
|
+
type: String
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
checkDeprecatedProps(props, ["alt"], (name) => {
|
|
130
|
+
console.warn(`[@ulu/frontend-vue] UluButton: The "${ name }" prop is deprecated. Please use "ariaLabel" instead.`);
|
|
116
131
|
});
|
|
117
132
|
|
|
118
133
|
const { resolvedModifiers } = useModifiers({
|
|
@@ -131,7 +146,7 @@
|
|
|
131
146
|
});
|
|
132
147
|
|
|
133
148
|
const resolvedAriaLabel = computed(() => {
|
|
134
|
-
const label = props.alt || (props.iconOnly && props.text);
|
|
149
|
+
const label = props.ariaLabel || props.alt || (props.iconOnly && props.text);
|
|
135
150
|
return label ? label : null;
|
|
136
151
|
});
|
|
137
152
|
</script>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:class="commonClasses"
|
|
7
7
|
/>
|
|
8
8
|
<component
|
|
9
|
-
v-else-if="!useStaticFa && faIconComponent
|
|
9
|
+
v-else-if="!useStaticFa && faIconComponent"
|
|
10
10
|
:is="faIconComponent"
|
|
11
11
|
v-bind="iconProps"
|
|
12
12
|
:class="commonClasses"
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script setup>
|
|
22
|
-
import {
|
|
22
|
+
import { defineAsyncComponent, computed, inject } from "vue";
|
|
23
23
|
import { useIcon } from "../../composables/useIcon.js";
|
|
24
24
|
|
|
25
25
|
const uluCore = inject('uluCore');
|
|
26
|
-
const faIconComponent = ref(null);
|
|
27
26
|
const { getIconProps, getClassesFromDefinition } = useIcon();
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
const AsyncFontAwesomeIcon = defineAsyncComponent(() =>
|
|
29
|
+
import("@fortawesome/vue-fontawesome").then(m => m.FontAwesomeIcon)
|
|
30
|
+
);
|
|
30
31
|
|
|
31
32
|
const props = defineProps({
|
|
32
33
|
/**
|
|
33
34
|
* Icon definition can be string (fa classes), or array or object (any prop format FaIcon accepts)
|
|
34
|
-
* - This will override the 'type' prop if both are provided
|
|
35
35
|
*/
|
|
36
36
|
icon: [String, Array, Object, Boolean],
|
|
37
37
|
/**
|
|
@@ -86,28 +86,10 @@
|
|
|
86
86
|
'flow-inline': props.spaced
|
|
87
87
|
}));
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
// - Use watchEffect because we are watching reactive object property access (props)
|
|
91
|
-
// - Load FA if needed (so it's not included if it's unneeded)
|
|
92
|
-
// - Replace the empty component after load or if value changes
|
|
93
|
-
watchEffect(async () => {
|
|
94
|
-
// Only attempt to load the component if we are NOT using the static version
|
|
89
|
+
const faIconComponent = computed(() => {
|
|
95
90
|
if (!useStaticFa.value && resolvedDefinition.value) {
|
|
96
|
-
|
|
97
|
-
if (FaModule) {
|
|
98
|
-
faIconComponent.value = markRaw(FaModule.FontAwesomeIcon);
|
|
99
|
-
} else {
|
|
100
|
-
const componentPromise = defineAsyncComponent(async () => {
|
|
101
|
-
const module = await import("@fortawesome/vue-fontawesome");
|
|
102
|
-
FaModule = module;
|
|
103
|
-
return module.FontAwesomeIcon;
|
|
104
|
-
});
|
|
105
|
-
faIconComponent.value = markRaw(componentPromise);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
} else {
|
|
109
|
-
// If using static FA or no definition, ensure component is null
|
|
110
|
-
faIconComponent.value = null;
|
|
91
|
+
return AsyncFontAwesomeIcon;
|
|
111
92
|
}
|
|
93
|
+
return null;
|
|
112
94
|
});
|
|
113
95
|
</script>
|
|
@@ -14,29 +14,29 @@
|
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script setup>
|
|
17
|
-
defineProps({
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
});
|
|
17
|
+
defineProps({
|
|
18
|
+
/**
|
|
19
|
+
* The HTML element to use for the form.
|
|
20
|
+
*/
|
|
21
|
+
element: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'form'
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* If true, applies the full-width styles to text inputs.
|
|
27
|
+
*/
|
|
28
|
+
fullWidth: Boolean,
|
|
29
|
+
/**
|
|
30
|
+
* If true, applies the full-width styles to select inputs.
|
|
31
|
+
*/
|
|
32
|
+
fullWidthSelect: Boolean,
|
|
33
|
+
/**
|
|
34
|
+
* If true, hides all labels in the form.
|
|
35
|
+
*/
|
|
36
|
+
hideLabels: Boolean,
|
|
37
|
+
/**
|
|
38
|
+
* If true, right-aligns the form actions.
|
|
39
|
+
*/
|
|
40
|
+
actionsRight: Boolean
|
|
41
|
+
});
|
|
42
42
|
</script>
|
|
@@ -1,38 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<input
|
|
3
3
|
type="checkbox"
|
|
4
|
-
|
|
4
|
+
v-bind="fieldAttrs"
|
|
5
5
|
:checked="modelValue"
|
|
6
6
|
@change="$emit('update:modelValue', $event.target.checked)"
|
|
7
|
-
:required="required"
|
|
8
7
|
>
|
|
9
|
-
<label :for="id">
|
|
10
|
-
<slot>
|
|
11
|
-
{{ label }}<UluFormRequiredChar v-if="required" />
|
|
12
|
-
</slot>
|
|
13
|
-
</label>
|
|
14
8
|
</template>
|
|
15
9
|
|
|
16
10
|
<script setup>
|
|
17
|
-
import {
|
|
18
|
-
import UluFormRequiredChar from "./UluFormRequiredChar.vue";
|
|
11
|
+
import { inject, computed } from "vue";
|
|
19
12
|
|
|
20
|
-
defineProps({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* The value of the checkbox (for v-model).
|
|
27
|
-
*/
|
|
28
|
-
modelValue: Boolean,
|
|
29
|
-
/**
|
|
30
|
-
* If true, the field will be required.
|
|
31
|
-
*/
|
|
32
|
-
required: Boolean
|
|
33
|
-
});
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
/**
|
|
15
|
+
* The value of the checkbox (for v-model).
|
|
16
|
+
*/
|
|
17
|
+
modelValue: Boolean
|
|
18
|
+
});
|
|
34
19
|
|
|
35
|
-
defineEmits([
|
|
20
|
+
defineEmits(["update:modelValue"]);
|
|
36
21
|
|
|
37
|
-
const
|
|
22
|
+
const injectedAttrs = inject("uluFormFieldAttrs", null);
|
|
23
|
+
const fieldAttrs = computed(() => injectedAttrs ? injectedAttrs.value : {});
|
|
38
24
|
</script>
|
|
@@ -1,59 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<label
|
|
3
|
-
:class="{ 'hidden-visually' : labelHidden }"
|
|
4
|
-
:for="id"
|
|
5
|
-
>
|
|
6
|
-
<slot name="label">
|
|
7
|
-
{{ label }}<UluFormRequiredChar v-if="required" />
|
|
8
|
-
</slot>
|
|
9
|
-
</label>
|
|
10
2
|
<input
|
|
11
3
|
type="file"
|
|
12
|
-
|
|
4
|
+
v-bind="fieldAttrs"
|
|
13
5
|
:multiple="multiple"
|
|
14
|
-
|
|
15
|
-
v-bind="inputAttrs"
|
|
16
|
-
:required="required"
|
|
6
|
+
@change="onChangeFile"
|
|
17
7
|
/>
|
|
18
8
|
</template>
|
|
19
9
|
|
|
20
10
|
<script setup>
|
|
21
|
-
import {
|
|
22
|
-
import UluFormRequiredChar from "./UluFormRequiredChar.vue";
|
|
11
|
+
import { inject, computed } from "vue";
|
|
23
12
|
|
|
24
|
-
defineProps({
|
|
25
|
-
/**
|
|
26
|
-
* The label for the file input.
|
|
27
|
-
*/
|
|
28
|
-
label: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: "Select File"
|
|
31
|
-
},
|
|
32
|
-
/**
|
|
33
|
-
* If true, the label will be visually hidden.
|
|
34
|
-
*/
|
|
35
|
-
labelHidden: Boolean,
|
|
36
|
-
/**
|
|
37
|
-
* If true, default classes will not be applied.
|
|
38
|
-
*/
|
|
39
|
-
noClasses: Boolean,
|
|
13
|
+
const props = defineProps({
|
|
40
14
|
/**
|
|
41
15
|
* If true, allows multiple file selection.
|
|
42
16
|
*/
|
|
43
|
-
multiple: Boolean
|
|
44
|
-
/**
|
|
45
|
-
* Additional attributes to bind to the input element.
|
|
46
|
-
*/
|
|
47
|
-
inputAttrs: Object,
|
|
48
|
-
/**
|
|
49
|
-
* If true, the field will be required.
|
|
50
|
-
*/
|
|
51
|
-
required: Boolean
|
|
17
|
+
multiple: Boolean
|
|
52
18
|
});
|
|
53
19
|
|
|
54
20
|
const emit = defineEmits(["file-change"]);
|
|
55
21
|
|
|
56
|
-
const
|
|
22
|
+
const injectedAttrs = inject("uluFormFieldAttrs", null);
|
|
23
|
+
const fieldAttrs = computed(() => {
|
|
24
|
+
const attrs = injectedAttrs ? { ...injectedAttrs.value } : {};
|
|
25
|
+
return attrs;
|
|
26
|
+
});
|
|
57
27
|
|
|
58
28
|
const onChangeFile = (event) => {
|
|
59
29
|
emit("file-change", event.target.files);
|