@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.
Files changed (133) hide show
  1. package/dist/components/elements/UluBadge.vue.d.ts +2 -0
  2. package/dist/components/elements/UluBadge.vue.d.ts.map +1 -1
  3. package/dist/components/elements/UluBadge.vue.js +30 -21
  4. package/dist/components/elements/UluButton.vue.d.ts +4 -0
  5. package/dist/components/elements/UluButton.vue.d.ts.map +1 -1
  6. package/dist/components/elements/UluButton.vue.js +31 -16
  7. package/dist/components/elements/UluIcon.vue.js +21 -36
  8. package/dist/components/forms/UluFormCheckbox.vue.d.ts +3 -19
  9. package/dist/components/forms/UluFormCheckbox.vue.d.ts.map +1 -1
  10. package/dist/components/forms/UluFormCheckbox.vue.js +10 -31
  11. package/dist/components/forms/UluFormFile.vue.d.ts +3 -25
  12. package/dist/components/forms/UluFormFile.vue.d.ts.map +1 -1
  13. package/dist/components/forms/UluFormFile.vue.js +11 -49
  14. package/dist/components/forms/UluFormItem.vue.d.ts +23 -8
  15. package/dist/components/forms/UluFormItem.vue.d.ts.map +1 -1
  16. package/dist/components/forms/UluFormItem.vue.js +126 -29
  17. package/dist/components/forms/UluFormLabel.vue.d.ts +24 -0
  18. package/dist/components/forms/UluFormLabel.vue.d.ts.map +1 -0
  19. package/dist/components/forms/UluFormLabel.vue.js +34 -0
  20. package/dist/components/forms/UluFormRadio.vue.d.ts +7 -25
  21. package/dist/components/forms/UluFormRadio.vue.d.ts.map +1 -1
  22. package/dist/components/forms/UluFormRadio.vue.js +11 -37
  23. package/dist/components/forms/UluFormSelect.vue.d.ts +7 -23
  24. package/dist/components/forms/UluFormSelect.vue.d.ts.map +1 -1
  25. package/dist/components/forms/UluFormSelect.vue.js +24 -43
  26. package/dist/components/forms/UluFormText.vue.d.ts +5 -23
  27. package/dist/components/forms/UluFormText.vue.d.ts.map +1 -1
  28. package/dist/components/forms/UluFormText.vue.js +10 -38
  29. package/dist/components/forms/UluFormTextarea.vue.d.ts +5 -23
  30. package/dist/components/forms/UluFormTextarea.vue.d.ts.map +1 -1
  31. package/dist/components/forms/UluFormTextarea.vue.js +10 -37
  32. package/dist/components/forms/UluSearchForm.vue.d.ts +24 -3
  33. package/dist/components/forms/UluSearchForm.vue.d.ts.map +1 -1
  34. package/dist/components/forms/UluSearchForm.vue.js +67 -22
  35. package/dist/components/index.d.ts +1 -0
  36. package/dist/components/systems/facets/UluFacetsFilterSelects.vue.d.ts.map +1 -1
  37. package/dist/components/systems/facets/UluFacetsFilterSelects.vue.js +21 -22
  38. package/dist/components/systems/facets/useFacets.d.ts.map +1 -1
  39. package/dist/components/systems/scroll-anchors/useScrollAnchorSection.d.ts.map +1 -1
  40. package/dist/components/systems/scroll-anchors/useScrollAnchorSections.d.ts.map +1 -1
  41. package/dist/components/systems/scroll-anchors/useScrollAnchors.d.ts.map +1 -1
  42. package/dist/components/utils/UluAction.vue.d.ts +2 -0
  43. package/dist/components/utils/UluAction.vue.d.ts.map +1 -1
  44. package/dist/components/utils/UluAction.vue.js +9 -5
  45. package/dist/components/visualizations/UluProgressBar.vue.d.ts +2 -2
  46. package/dist/composables/useBreakpointManager.d.ts.map +1 -1
  47. package/dist/composables/useDocumentTitle.d.ts.map +1 -1
  48. package/dist/composables/useIcon.d.ts +3 -0
  49. package/dist/composables/useIcon.d.ts.map +1 -1
  50. package/dist/composables/useModifiers.d.ts.map +1 -1
  51. package/dist/composables/usePagination.d.ts.map +1 -1
  52. package/dist/composables/useRequiredInject.d.ts.map +1 -1
  53. package/dist/composables/useTableData.d.ts.map +1 -1
  54. package/dist/composables/useUluFloating.d.ts.map +1 -1
  55. package/dist/composables/useWindowResize.d.ts.map +1 -1
  56. package/dist/index.js +130 -128
  57. package/dist/mcp-data.json +17685 -0
  58. package/dist/plugins/breakpoints/index.d.ts.map +1 -1
  59. package/dist/plugins/core/index.d.ts.map +1 -1
  60. package/dist/plugins/core/index.js +17 -16
  61. package/dist/plugins/modals/api.d.ts.map +1 -1
  62. package/dist/plugins/modals/index.d.ts.map +1 -1
  63. package/dist/plugins/modals/useModals.d.ts.map +1 -1
  64. package/dist/plugins/popovers/defaults.d.ts.map +1 -1
  65. package/dist/plugins/popovers/index.d.ts.map +1 -1
  66. package/dist/plugins/popovers/useTooltip.d.ts.map +1 -1
  67. package/dist/plugins/popovers/useTooltipFollow.d.ts.map +1 -1
  68. package/dist/plugins/toast/index.d.ts.map +1 -1
  69. package/dist/plugins/toast/store.d.ts.map +1 -1
  70. package/dist/plugins/toast/useToast.d.ts.map +1 -1
  71. package/dist/resolver.d.ts.map +1 -1
  72. package/dist/utils/dom.d.ts +3 -0
  73. package/dist/utils/dom.d.ts.map +1 -1
  74. package/dist/utils/props.d.ts +10 -0
  75. package/dist/utils/props.d.ts.map +1 -1
  76. package/dist/utils/props.js +8 -2
  77. package/dist/utils/router.d.ts +12 -15
  78. package/dist/utils/router.d.ts.map +1 -1
  79. package/lib/components/elements/UluBadge.vue +16 -5
  80. package/lib/components/elements/UluButton.vue +18 -3
  81. package/lib/components/elements/UluIcon.vue +8 -26
  82. package/lib/components/forms/UluForm.vue +25 -25
  83. package/lib/components/forms/UluFormCheckbox.vue +11 -25
  84. package/lib/components/forms/UluFormFieldset.vue +6 -6
  85. package/lib/components/forms/UluFormFile.vue +10 -40
  86. package/lib/components/forms/UluFormItem.vue +150 -39
  87. package/lib/components/forms/UluFormLabel.vue +30 -0
  88. package/lib/components/forms/UluFormRadio.vue +15 -34
  89. package/lib/components/forms/UluFormSelect.vue +19 -24
  90. package/lib/components/forms/UluFormText.vue +7 -25
  91. package/lib/components/forms/UluFormTextarea.vue +7 -25
  92. package/lib/components/forms/UluSearchForm.vue +67 -19
  93. package/lib/components/forms/UluSelectableMenu.vue +62 -62
  94. package/lib/components/index.js +4 -0
  95. package/lib/components/systems/facets/UluFacetsFilterSelects.vue +11 -14
  96. package/lib/components/systems/facets/useFacets.js +3 -0
  97. package/lib/components/systems/index.js +3 -0
  98. package/lib/components/systems/scroll-anchors/useScrollAnchorSection.js +3 -0
  99. package/lib/components/systems/scroll-anchors/useScrollAnchorSections.js +3 -0
  100. package/lib/components/systems/scroll-anchors/useScrollAnchors.js +3 -0
  101. package/lib/components/utils/UluAction.vue +6 -2
  102. package/lib/composables/useBreakpointManager.js +3 -0
  103. package/lib/composables/useDocumentTitle.js +3 -0
  104. package/lib/composables/useIcon.js +3 -0
  105. package/lib/composables/useModifiers.js +3 -1
  106. package/lib/composables/usePagination.js +3 -0
  107. package/lib/composables/useRequiredInject.js +3 -0
  108. package/lib/composables/useTableData.js +3 -0
  109. package/lib/composables/useUluFloating.js +3 -0
  110. package/lib/composables/useWindowResize.js +3 -0
  111. package/lib/index.js +1 -1
  112. package/lib/meta.js +1 -1
  113. package/lib/plugins/breakpoints/index.js +3 -0
  114. package/lib/plugins/core/index.js +4 -2
  115. package/lib/plugins/index.js +1 -1
  116. package/lib/plugins/modals/api.js +3 -0
  117. package/lib/plugins/modals/index.js +2 -3
  118. package/lib/plugins/modals/useModals.js +3 -0
  119. package/lib/plugins/popovers/defaults.js +3 -0
  120. package/lib/plugins/popovers/index.js +3 -0
  121. package/lib/plugins/popovers/useTooltip.js +3 -0
  122. package/lib/plugins/popovers/useTooltipFollow.js +3 -0
  123. package/lib/plugins/toast/defaults.js +3 -0
  124. package/lib/plugins/toast/index.js +3 -0
  125. package/lib/plugins/toast/store.js +3 -0
  126. package/lib/plugins/toast/useToast.js +3 -0
  127. package/lib/resolver.js +3 -0
  128. package/lib/utils/dom.js +3 -0
  129. package/lib/utils/index.js +3 -0
  130. package/lib/utils/props.js +17 -0
  131. package/lib/utils/router.js +10 -10
  132. package/lib/vite.js +3 -0
  133. package/package.json +19 -6
@@ -32,75 +32,75 @@
32
32
  </template>
33
33
 
34
34
  <script setup>
35
- import { computed } from 'vue';
35
+ import { computed } from 'vue';
36
36
 
37
- const props = defineProps({
38
- /**
39
- * The legend for the menu.
40
- */
41
- legend: String,
42
- /**
43
- * An array of options for the menu.
44
- */
45
- options: Array,
46
- /**
47
- * Use compact modifier on menu stack
48
- */
49
- compact: Boolean,
50
- /**
51
- * The type of input to use ('checkbox' or 'radio').
52
- */
53
- type: {
54
- type: String,
55
- default: 'checkbox',
56
- },
57
- /**
58
- * The value of the menu (for v-model).
59
- */
60
- modelValue: [String, Array],
61
- /**
62
- * If true, the input elements will be visually hidden.
63
- */
64
- hideInputs: Boolean
65
- });
37
+ const props = defineProps({
38
+ /**
39
+ * The legend for the menu.
40
+ */
41
+ legend: String,
42
+ /**
43
+ * An array of options for the menu.
44
+ */
45
+ options: Array,
46
+ /**
47
+ * Use compact modifier on menu stack
48
+ */
49
+ compact: Boolean,
50
+ /**
51
+ * The type of input to use ('checkbox' or 'radio').
52
+ */
53
+ type: {
54
+ type: String,
55
+ default: 'checkbox',
56
+ },
57
+ /**
58
+ * The value of the menu (for v-model).
59
+ */
60
+ modelValue: [String, Array],
61
+ /**
62
+ * If true, the input elements will be visually hidden.
63
+ */
64
+ hideInputs: Boolean
65
+ });
66
66
 
67
- const emit = defineEmits(['update:modelValue']);
67
+ const emit = defineEmits(['update:modelValue']);
68
68
 
69
- const name = computed(() => props.legend ? props.legend.toLowerCase().replace(/\s+/g, '-') : `menu-${ Math.random().toString(36).substring(7) }`);
70
- const legendId = computed(() => name.value ? `${name.value}-legend` : null);
71
- const groupRole = computed(() => props.type === 'radio' ? 'radiogroup' : 'group');
69
+ const name = computed(() => props.legend ? props.legend.toLowerCase().replace(/\s+/g, '-') : `menu-${ Math.random().toString(36).substring(7) }`);
70
+ const legendId = computed(() => name.value ? `${name.value}-legend` : null);
71
+ const groupRole = computed(() => props.type === 'radio' ? 'radiogroup' : 'group');
72
72
 
73
- const getId = (option) => `${name.value}-${option.uid}`;
73
+ const getId = (option) => `${name.value}-${option.uid}`;
74
74
 
75
- const isChecked = (option) => {
76
- if (props.type === 'radio') {
77
- return props.modelValue === option.uid;
78
- }
79
- if (Array.isArray(props.modelValue)) {
80
- return props.modelValue.includes(option.uid);
81
- }
82
- if (props.type === 'checkbox') {
83
- return option.checked || false;
84
- }
85
- return false;
86
- };
87
-
88
- const handleChange = (option, event) => {
89
- if (props.type === 'radio') {
90
- emit('update:modelValue', option.uid);
91
- } else {
75
+ const isChecked = (option) => {
76
+ if (props.type === 'radio') {
77
+ return props.modelValue === option.uid;
78
+ }
92
79
  if (Array.isArray(props.modelValue)) {
93
- const newValue = [...props.modelValue];
94
- const index = newValue.indexOf(option.uid);
95
- if (index > -1) {
96
- newValue.splice(index, 1);
80
+ return props.modelValue.includes(option.uid);
81
+ }
82
+ if (props.type === 'checkbox') {
83
+ return option.checked || false;
84
+ }
85
+ return false;
86
+ };
87
+
88
+ const handleChange = (option, event) => {
89
+ if (props.type === 'radio') {
90
+ emit('update:modelValue', option.uid);
91
+ } else {
92
+ if (Array.isArray(props.modelValue)) {
93
+ const newValue = [...props.modelValue];
94
+ const index = newValue.indexOf(option.uid);
95
+ if (index > -1) {
96
+ newValue.splice(index, 1);
97
+ } else {
98
+ newValue.push(option.uid);
99
+ }
100
+ emit('update:modelValue', newValue);
97
101
  } else {
98
- newValue.push(option.uid);
102
+ option.checked = event.target.checked;
99
103
  }
100
- emit('update:modelValue', newValue);
101
- } else {
102
- option.checked = event.target.checked;
103
104
  }
104
- }
105
- };
105
+ };
106
106
  </script>
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module components
3
+ */
1
4
  /**
2
5
  * @module components/index.js
3
6
  * Responsible for exporting all components
@@ -56,6 +59,7 @@ export { default as UluFormActions } from './forms/UluFormActions.vue';
56
59
  export { default as UluFormCheckbox } from './forms/UluFormCheckbox.vue';
57
60
  export { default as UluFormFieldset } from './forms/UluFormFieldset.vue';
58
61
  export { default as UluFormItem } from './forms/UluFormItem.vue';
62
+ export { default as UluFormLabel } from './forms/UluFormLabel.vue';
59
63
  export { default as UluFormItemsInline } from './forms/UluFormItemsInline.vue';
60
64
  export { default as UluFormRadio } from './forms/UluFormRadio.vue';
61
65
  export { default as UluFormRequiredChar } from './forms/UluFormRequiredChar.vue';
@@ -59,9 +59,6 @@ const props = defineProps({
59
59
  },
60
60
  });
61
61
 
62
- console.log(props);
63
-
64
-
65
62
  const emit = defineEmits(['facet-change']);
66
63
 
67
64
  function onFilterChange(group, event) {
@@ -84,15 +81,15 @@ function onFilterChange(group, event) {
84
81
  </script>
85
82
 
86
83
  <style lang="scss">
87
- .facets-dropdown-filters {
88
- display: flex;
89
- gap: 1rem;
90
- align-items: center;
91
- flex-wrap: wrap;
92
- }
93
- .facets-dropdown-filters__group {
94
- display: flex;
95
- gap: 0.5rem;
96
- align-items: center;
97
- }
84
+ .facets-dropdown-filters {
85
+ display: flex;
86
+ gap: 1rem;
87
+ align-items: center;
88
+ flex-wrap: wrap;
89
+ }
90
+ .facets-dropdown-filters__group {
91
+ display: flex;
92
+ gap: 0.5rem;
93
+ align-items: center;
94
+ }
98
95
  </style>
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useFacets
3
+ */
1
4
  import { ref, computed, watch, watchPostEffect } from "vue";
2
5
  import Fuse from "fuse.js";
3
6
 
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module systems
3
+ */
1
4
  export { useFacets } from './facets/useFacets.js';
2
5
  export { default as UluFacetsActiveFilters } from './facets/UluFacetsActiveFilters.vue';
3
6
  export { default as UluFacetsFilterLists } from './facets/UluFacetsFilterLists.vue';
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useScrollAnchorSection
3
+ */
1
4
  import { ref, onMounted, onUnmounted, inject, computed, reactive, watch } from 'vue';
2
5
  import { urlize } from '@ulu/utils/string.js';
3
6
 
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useScrollAnchorSections
3
+ */
1
4
  import { inject } from 'vue';
2
5
 
3
6
  /**
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useScrollAnchors
3
+ */
1
4
  import { onMounted, onUnmounted, nextTick, watch } from "vue";
2
5
  import { getScrollParent } from "@ulu/utils/browser/dom.js";
3
6
  import { debounce } from "@ulu/utils/performance.js";
@@ -48,7 +48,11 @@
48
48
  * Allows passing 'click' as a prop to signify this is an action (used in UluMenu data objects).
49
49
  * Note: The actual @click listener should be attached via fallthrough attrs, this is just for logic routing.
50
50
  */
51
- click: Function
51
+ click: Function,
52
+ /**
53
+ * Button type (e.g. 'submit', 'reset', 'button'). Defaults to 'button' to prevent accidental form submissions.
54
+ */
55
+ type: String
52
56
  });
53
57
 
54
58
  const resolvedElement = computed(() => {
@@ -73,7 +77,7 @@
73
77
  }
74
78
  } else if (!props.element || props.element === "button") {
75
79
  // It's a button, ensure it doesn't accidentally submit forms unless requested
76
- attrs.type = "button";
80
+ attrs.type = props.type || "button";
77
81
  }
78
82
 
79
83
  return attrs;
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useBreakpointManager
3
+ */
1
4
  import { ref, markRaw } from "vue";
2
5
  import { isBrowser } from "@ulu/utils/browser/dom.js";
3
6
 
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useDocumentTitle
3
+ */
1
4
  import { reactive, watchEffect, onUnmounted, unref, computed } from "vue";
2
5
  import { useHead as defaultUseHead } from "@unhead/vue";
3
6
  import { useRoute as defaultUseRoute } from "vue-router";
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useIcon
3
+ */
1
4
  /**
2
5
  * A utility composable for handling and formatting icon props for `UluIcon`.
3
6
  * It provides helpers to convert various icon definition formats into either
@@ -1,5 +1,7 @@
1
1
  /**
2
- * @module composables/useModifiers
2
+ * @module useModifiers
3
+ */
4
+ /**
3
5
  * Handles user modifiers prop and internal modifiers for a given component
4
6
  */
5
7
 
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module usePagination
3
+ */
1
4
  import { computed, watch } from "vue";
2
5
  import { useRoute, useRouter } from "vue-router";
3
6
 
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useRequiredInject
3
+ */
1
4
  import { inject } from 'vue';
2
5
  import { injectRegistry } from "../meta.js";
3
6
 
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useTableData
3
+ */
1
4
  import { ref, computed, watch } from 'vue';
2
5
 
3
6
  /**
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useUluFloating
3
+ */
1
4
  import { ref, computed, watch } from "vue";
2
5
  import {
3
6
  useFloating,
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useWindowResize
3
+ */
1
4
  /**
2
5
  * Reusable window resize
3
6
  * - Future could have request animation frame throttled onResize
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @module index.js
2
+ * @module index
3
3
  * - Main library entrypoint
4
4
  * - Exports everything
5
5
  */
package/lib/meta.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @module lib/meta
2
+ * @module meta
3
3
  * @description A central lookup for meta like info in the system
4
4
  */
5
5
 
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module breakpointsPlugin
3
+ */
1
4
  import { ref, computed } from "vue";
2
5
  import { useBreakpointManager } from "../../composables/useBreakpointManager.js";
3
6
 
@@ -1,7 +1,8 @@
1
1
  /**
2
- * @module plugins/core/index.js
2
+ * @module corePlugin
3
3
  * @description Core plugin for managing shared configuration for the library.
4
4
  */
5
+
5
6
  import { reactive } from 'vue';
6
7
 
7
8
  const defaults = {
@@ -27,7 +28,8 @@ const defaults = {
27
28
  file: "fas fa-file",
28
29
  previous: "fas fa-chevron-left",
29
30
  next: "fas fa-chevron-right",
30
- dropdownExpand: "fas fa-caret-down"
31
+ dropdownExpand: "fas fa-caret-down",
32
+ search: "fas fa-search"
31
33
  }
32
34
  };
33
35
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @module plugins/index.js
2
+ * @module plugins
3
3
  * Responsible for exporting all plugins
4
4
  * - Used in bundle exports
5
5
  */
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module modals.api
3
+ */
1
4
  import { ref, markRaw } from "vue";
2
5
 
3
6
  // Create array to be used internally to manage individual modals
@@ -1,7 +1,6 @@
1
1
  /**
2
- * @module plugins/modals/index.js
3
- * @version 3.0.0
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
 
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useModals
3
+ */
1
4
  import { inject } from 'vue';
2
5
 
3
6
  /**
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module popovers.defaults
3
+ */
1
4
  export default {
2
5
  /**
3
6
  * Default Plugin Options
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module popoversPlugin
3
+ */
1
4
  import { reactive, markRaw } from 'vue';
2
5
  import UluTooltipDisplay from './UluTooltipDisplay.vue';
3
6
  import UluPopover from "./UluPopover.vue";
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useTooltip
3
+ */
1
4
  import { useRequiredInject } from '../../composables/useRequiredInject.js';
2
5
  import { TOOLTIP_STATE_KEY, POPOVER_OPTIONS_KEY, resolveTooltipConfig } from './index.js';
3
6
 
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useTooltipFollow
3
+ */
1
4
  import { ref, computed } from "vue";
2
5
  import { useRequiredInject } from '../../composables/useRequiredInject.js';
3
6
  import { TOOLTIP_STATE_KEY, POPOVER_OPTIONS_KEY } from './index.js';
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module toast.defaults
3
+ */
1
4
  import { markRaw } from "vue";
2
5
  import ToastComponent from "./UluToast.vue";
3
6
  /**
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module toastPlugin
3
+ */
1
4
  import { store, api } from "./store.js";
2
5
  import UluToast from "./UluToast.vue";
3
6
  import UluToastDisplay from "./UluToastDisplay.vue";
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module toast.store
3
+ */
1
4
  import { reactive } from "vue";
2
5
  import defaults from "./defaults.js";
3
6
 
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module useToast
3
+ */
1
4
  import { inject } from 'vue';
2
5
 
3
6
  /**
package/lib/resolver.js CHANGED
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module resolver
3
+ */
1
4
  const defaultExcluded = [
2
5
  "UluModalsDisplay",
3
6
  "UluTooltipDisplay",
package/lib/utils/dom.js CHANGED
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module utils.dom
3
+ */
1
4
  /**
2
5
  * Resolves a Vue template ref's unwrapped value to its underlying DOM element
3
6
  *
@@ -1,2 +1,5 @@
1
+ /**
2
+ * @module utils
3
+ */
1
4
  export * as dom from './dom.js';
2
5
  export * as router from './router.js';
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module utils.props
3
+ */
1
4
  /**
2
5
  * Ensures the array consists of objects
3
6
  * @param {Array} array Array to check
@@ -5,4 +8,18 @@
5
8
  */
6
9
  export function isArrayOfObjects(array) {
7
10
  return array.every(item => typeof item === "object");
11
+ }
12
+
13
+ /**
14
+ * Checks for deprecated props and calls a callback for each match
15
+ * @param {object} props - The current props object
16
+ * @param {string[]} deprecatedNames - Array of prop names to check
17
+ * @param {function} callback - Function called for each match, receiving the prop name
18
+ */
19
+ export function checkDeprecatedProps(props, deprecatedNames, callback) {
20
+ deprecatedNames.forEach(name => {
21
+ if (props[name] !== undefined) {
22
+ callback(name);
23
+ }
24
+ });
8
25
  }
@@ -1,8 +1,8 @@
1
1
  /**
2
- * This Module Creates Menus from route or router config
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.<RouteMenuItem>} Array of menu items
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 ({ path: "" })
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.<RouteMenuItem>} Array of menu items
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 <a> behave as router links instread of page reload
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 ({ path: "" })
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.<RouteMenuItem>} Array of menu items
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.<{title: String, to: Object, current: Boolean}>} An array of breadcrumb items.
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;
package/lib/vite.js CHANGED
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module vite
3
+ */
1
4
  /**
2
5
  * Vite/Vue plugin utility to automatically transform asset URLs for UluImage components.
3
6
  *