@ulu/frontend-vue 0.1.0-beta.3 → 0.1.0-beta.31

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 (151) hide show
  1. package/README.md +113 -2
  2. package/dist/{breakpoints-Cq2oSdYS.js → breakpoints-BJNvnXsD.js} +1 -1
  3. package/dist/frontend-vue.css +1 -1
  4. package/dist/frontend-vue.js +78 -72
  5. package/dist/index-BjwifaTk.js +6946 -0
  6. package/lib/components/collapsible/UluAccordion.vue +1 -1
  7. package/lib/components/collapsible/UluModal.vue +4 -5
  8. package/lib/components/collapsible/UluOverflowPopover.vue +1 -1
  9. package/lib/components/elements/UluAlert.vue +1 -2
  10. package/lib/components/elements/UluBadge.vue +27 -28
  11. package/lib/components/elements/UluBadgeStack.vue +8 -13
  12. package/lib/components/elements/UluButton.vue +2 -2
  13. package/lib/components/elements/UluButtonVerbose.vue +119 -0
  14. package/lib/components/elements/UluCard.vue +1 -1
  15. package/lib/components/elements/UluDefinitionList.vue +14 -17
  16. package/lib/components/elements/UluExternalLink.vue +22 -29
  17. package/lib/components/elements/UluIcon.vue +22 -17
  18. package/lib/components/elements/UluList.vue +53 -55
  19. package/lib/components/elements/UluSpokeSpinner.vue +12 -18
  20. package/lib/components/elements/UluTag.vue +35 -35
  21. package/lib/components/forms/UluFileDisplay.vue +40 -31
  22. package/lib/components/forms/UluFormFile.vue +22 -24
  23. package/lib/components/forms/UluFormMessage.vue +7 -10
  24. package/lib/components/forms/UluFormSelect.vue +16 -16
  25. package/lib/components/forms/UluFormText.vue +15 -15
  26. package/lib/components/forms/UluSearchForm.vue +8 -10
  27. package/lib/components/forms/UluSelectableMenu.vue +78 -0
  28. package/lib/components/index.js +2 -2
  29. package/lib/components/layout/UluAdaptiveLayout.vue +3 -5
  30. package/lib/components/layout/UluTitleRail.vue +9 -5
  31. package/lib/components/layout/UluWhenBreakpoint.vue +71 -77
  32. package/lib/components/navigation/UluBreadcrumb.vue +10 -4
  33. package/lib/components/navigation/UluMenu.vue +3 -3
  34. package/lib/components/navigation/UluPager.vue +102 -0
  35. package/lib/components/systems/facets/ExampleFacetsWithPagination.vue +119 -0
  36. package/lib/components/systems/facets/UluFacetsFilterLists.vue +84 -0
  37. package/lib/components/systems/facets/UluFacetsFilterPopovers.vue +114 -0
  38. package/lib/components/systems/facets/UluFacetsFilterSelects.vue +71 -0
  39. package/lib/components/systems/facets/UluFacetsHeaderLayout.vue +24 -0
  40. package/lib/components/systems/facets/UluFacetsList.vue +61 -33
  41. package/lib/components/systems/facets/UluFacetsResults.vue +63 -0
  42. package/lib/components/systems/facets/UluFacetsSearch.vue +26 -49
  43. package/lib/components/systems/facets/UluFacetsSidebarLayout.vue +31 -0
  44. package/lib/components/systems/facets/UluFacetsSort.vue +45 -0
  45. package/lib/components/systems/facets/_facets.scss +2 -3
  46. package/lib/components/systems/facets/_mock-data.js +40 -0
  47. package/lib/components/systems/facets/useFacets.js +229 -0
  48. package/lib/components/systems/index.js +13 -2
  49. package/lib/components/systems/scroll-anchors/UluScrollAnchors.vue +2 -1
  50. package/lib/components/systems/skeleton/UluShowSkeleton.vue +9 -8
  51. package/lib/components/systems/skeleton/UluSkeletonContent.vue +39 -43
  52. package/lib/components/systems/skeleton/UluSkeletonMedia.vue +4 -6
  53. package/lib/components/systems/skeleton/UluSkeletonText.vue +27 -0
  54. package/lib/components/systems/slider/UluImageSlideShow.vue +1 -1
  55. package/lib/components/systems/slider/UluSlideShow.vue +8 -3
  56. package/lib/components/systems/table-sticky/UluTableSticky.vue +8 -8
  57. package/lib/components/systems/table-sticky/UluTableStickyTable.vue +3 -3
  58. package/lib/composables/index.js +4 -1
  59. package/lib/composables/useDocumentTitle.js +61 -0
  60. package/lib/composables/usePagination.js +122 -0
  61. package/lib/composables/useRequiredInject.js +26 -0
  62. package/lib/index.js +1 -1
  63. package/lib/meta.js +14 -0
  64. package/lib/plugins/core/index.js +91 -0
  65. package/lib/plugins/index.js +1 -0
  66. package/lib/plugins/popovers/UluPopover.vue +3 -1
  67. package/lib/plugins/toast/UluToast.vue +2 -2
  68. package/lib/utils/index.js +2 -0
  69. package/lib/utils/{vue-router.js → router.js} +114 -30
  70. package/package.json +38 -13
  71. package/types/components/index.d.ts +2 -0
  72. package/types/components/index.d.ts.map +1 -0
  73. package/types/components/systems/facets/_mock-data.d.ts +18 -0
  74. package/types/components/systems/facets/_mock-data.d.ts.map +1 -0
  75. package/types/components/systems/facets/useFacets.d.ts +39 -0
  76. package/types/components/systems/facets/useFacets.d.ts.map +1 -0
  77. package/types/components/systems/index.d.ts +2 -0
  78. package/types/components/systems/index.d.ts.map +1 -0
  79. package/types/components/systems/scroll-anchors/symbols.d.ts +7 -0
  80. package/types/components/systems/scroll-anchors/symbols.d.ts.map +1 -0
  81. package/types/composables/index.d.ts +8 -0
  82. package/types/composables/index.d.ts.map +1 -0
  83. package/types/composables/useBreakpointManager.d.ts +8 -0
  84. package/types/composables/useBreakpointManager.d.ts.map +1 -0
  85. package/types/composables/useDocumentTitle.d.ts +22 -0
  86. package/types/composables/useDocumentTitle.d.ts.map +1 -0
  87. package/types/composables/useIcon.d.ts +6 -0
  88. package/types/composables/useIcon.d.ts.map +1 -0
  89. package/types/composables/useModifiers.d.ts +69 -0
  90. package/types/composables/useModifiers.d.ts.map +1 -0
  91. package/types/composables/usePageTitle.d.ts +19 -0
  92. package/types/composables/usePageTitle.d.ts.map +1 -0
  93. package/types/composables/usePagination.d.ts +25 -0
  94. package/types/composables/usePagination.d.ts.map +1 -0
  95. package/types/composables/useRequiredInject.d.ts +8 -0
  96. package/types/composables/useRequiredInject.d.ts.map +1 -0
  97. package/types/composables/useWindowResize.d.ts +6 -0
  98. package/types/composables/useWindowResize.d.ts.map +1 -0
  99. package/types/index.d.ts +5 -0
  100. package/types/index.d.ts.map +1 -0
  101. package/types/meta.d.ts +10 -0
  102. package/types/meta.d.ts.map +1 -0
  103. package/types/plugins/breakpoints/index.d.ts +2 -0
  104. package/types/plugins/breakpoints/index.d.ts.map +1 -0
  105. package/types/plugins/core/index.d.ts +3 -0
  106. package/types/plugins/core/index.d.ts.map +1 -0
  107. package/types/plugins/index.d.ts +6 -0
  108. package/types/plugins/index.d.ts.map +1 -0
  109. package/types/plugins/modals/api.d.ts +34 -0
  110. package/types/plugins/modals/api.d.ts.map +1 -0
  111. package/types/plugins/modals/index.d.ts +28 -0
  112. package/types/plugins/modals/index.d.ts.map +1 -0
  113. package/types/plugins/modals/useModals.d.ts +2 -0
  114. package/types/plugins/modals/useModals.d.ts.map +1 -0
  115. package/types/plugins/popovers/defaults.d.ts +14 -0
  116. package/types/plugins/popovers/defaults.d.ts.map +1 -0
  117. package/types/plugins/popovers/directive.d.ts +8 -0
  118. package/types/plugins/popovers/directive.d.ts.map +1 -0
  119. package/types/plugins/popovers/index.d.ts +7 -0
  120. package/types/plugins/popovers/index.d.ts.map +1 -0
  121. package/types/plugins/popovers/manager.d.ts +52 -0
  122. package/types/plugins/popovers/manager.d.ts.map +1 -0
  123. package/types/plugins/popovers/useFollow.d.ts +31 -0
  124. package/types/plugins/popovers/useFollow.d.ts.map +1 -0
  125. package/types/plugins/popovers/utils.d.ts +2 -0
  126. package/types/plugins/popovers/utils.d.ts.map +1 -0
  127. package/types/plugins/toast/defaults.d.ts +15 -0
  128. package/types/plugins/toast/defaults.d.ts.map +1 -0
  129. package/types/plugins/toast/index.d.ts +5 -0
  130. package/types/plugins/toast/index.d.ts.map +1 -0
  131. package/types/plugins/toast/store.d.ts +22 -0
  132. package/types/plugins/toast/store.d.ts.map +1 -0
  133. package/types/plugins/toast/useToast.d.ts +2 -0
  134. package/types/plugins/toast/useToast.d.ts.map +1 -0
  135. package/types/utils/dom.d.ts +8 -0
  136. package/types/utils/dom.d.ts.map +1 -0
  137. package/types/utils/index.d.ts +3 -0
  138. package/types/utils/index.d.ts.map +1 -0
  139. package/types/utils/placeholder.d.ts +8 -0
  140. package/types/utils/placeholder.d.ts.map +1 -0
  141. package/types/utils/router.d.ts +144 -0
  142. package/types/utils/router.d.ts.map +1 -0
  143. package/types/utils/vue-router.d.ts +122 -0
  144. package/types/utils/vue-router.d.ts.map +1 -0
  145. package/dist/index-CMGxe_M1.js +0 -6466
  146. package/lib/components/forms/UluCheckboxMenu.vue +0 -36
  147. package/lib/components/forms/UluFormDropzone.vue +0 -62
  148. package/lib/components/systems/facets/UluFacets.vue +0 -380
  149. package/lib/components/systems/skeleton/UluSkeletonTextInline.vue +0 -9
  150. package/lib/settings.js +0 -119
  151. package/lib/utils/placeholder.js +0 -6
@@ -1,9 +1,29 @@
1
1
  /**
2
2
  * This Module Creates Menus from route or router config
3
3
  * - Note: Functions prefixed with "$" work with $route objects (running application, provided by vue-router ie $router, useRoute, etc),
4
- * @module utils/router-utils
4
+ * @module router-utils
5
5
  */
6
6
 
7
+ /**
8
+ * Resolves a route's title from its meta.
9
+ * - If `meta.title` is a function, it's called with the `currentRoute` (or the route itself).
10
+ * - Otherwise, `meta.title` is returned.
11
+ * This function is the single source of truth for resolving titles from route configuration.
12
+ * @param {object} route The route or route match object.
13
+ * @param {object} [currentRoute] The current route from `useRoute()`, passed to functional titles.
14
+ * @returns {string|undefined} The resolved title, or undefined if not found.
15
+ */
16
+ export function getRouteTitle(route, currentRoute) {
17
+ const meta = route?.meta || {};
18
+ let title = meta.title;
19
+
20
+ if (typeof title === "function") {
21
+ title = title(currentRoute || route);
22
+ }
23
+
24
+ return title;
25
+ }
26
+
7
27
  /**
8
28
  * Route Menu Item
9
29
  * @typedef {Object} RouteMenuItem
@@ -21,21 +41,55 @@
21
41
  */
22
42
  export function createBaseMenu(routes, options) {
23
43
  const defaults = {
24
- qualifier: isStaticBaseRoute,
44
+ qualifier(route, parentPath) {
45
+ if (!parentPath) {
46
+ return isStaticBaseRoute(route);
47
+ } else {
48
+ return isStaticRoute(route);
49
+ }
50
+ },
25
51
  sort: sortByWeight,
26
- item: {}
52
+ item: {},
53
+ includeChildren: false
27
54
  };
28
55
  const opts = Object.assign({}, defaults, options);
29
- return routes
30
- .filter(opts.qualifier)
31
- .map(r => {
32
- // Need to grab meta from child but use the parent path
33
- const menuRoute = r.children ? getChildIndexRoute(r.children) : r;
34
- return createMenuItem(menuRoute, r.path, opts.item);
35
- })
36
- .sort(opts.sort);
56
+ const getItemPath = (r, parentPath) => parentPath ? `${ parentPath }/${ r.path }` : r.path;
57
+ const toMenuItems = (currentRoutes, parentPath = null) => {
58
+ return currentRoutes
59
+ .filter(r => opts.qualifier(r, parentPath))
60
+ .map(r => {
61
+ const menuRoute = r.children ? getChildIndexRoute(r.children) : r;
62
+ const children = r.children ? r.children.filter(child => child.path !== "") : false;
63
+ const item = createMenuItem(menuRoute, getItemPath(r, parentPath), opts.item);
64
+ if (opts.includeChildren && children.length) {
65
+ item.children = toMenuItems(children, item.path);
66
+ }
67
+ return item;
68
+ })
69
+ .sort(opts.sort);
70
+ };
71
+ return toMenuItems(routes);
37
72
  }
38
73
 
74
+ /**
75
+ * Returns menu flat (no parent children)
76
+ */
77
+ export function flattenMenu(menu) {
78
+ function flatten(items) {
79
+ const result = [];
80
+ for (const item of items) {
81
+ const newItem = { ...item };
82
+ delete newItem.children;
83
+ result.push(newItem);
84
+ if (item.children) {
85
+ result.push(...flatten(item.children));
86
+ }
87
+ }
88
+ return result;
89
+ }
90
+ return flatten(menu);
91
+ }
92
+
39
93
  /**
40
94
  * Print out a section's menu based on path
41
95
  * @param {*} routes All routes
@@ -53,7 +107,6 @@ export function createSectionMenu(routes, sectionPath, options) {
53
107
  };
54
108
  const opts = Object.assign({}, defaults, options);
55
109
  const base = routes.find(r => r.path !== "/" && sectionPath.includes(r.path));
56
- // Go through each item and
57
110
  const getSection = (current, previous, path) => {
58
111
  if (current.children) {
59
112
  const child = current.children.find(c => c.path.includes(sectionPath));
@@ -74,20 +127,6 @@ export function createSectionMenu(routes, sectionPath, options) {
74
127
  .sort(opts.sort);
75
128
  }
76
129
 
77
- /**
78
- * For a given route this will return the route that renders. For routes without
79
- * children this is the route itself for those with children (first child with empty path)
80
- * @param {Object} route Route object to resolve
81
- * @returns {Object} Resolved route
82
- */
83
- // export function resolveRouteIndex(route) {
84
- // if (route.children) {
85
- // return getChildIndexRoute(route.children);
86
- // } else {
87
- // return route;
88
- // }
89
- // }
90
-
91
130
  /**
92
131
  * For a given array of child routes return the index
93
132
  * @param {Array} children Children array of routes
@@ -96,6 +135,7 @@ export function createSectionMenu(routes, sectionPath, options) {
96
135
  export function getChildIndexRoute(children) {
97
136
  return children.find(r => r.path === "");
98
137
  }
138
+
99
139
  /**
100
140
  * Creates common menu item structure from route, pulls title and weight from meta (on route or index child)
101
141
  * @param {Object} route Route
@@ -115,9 +155,10 @@ export function createMenuItem(route, routePath = route.path, options) {
115
155
  if (opts.indexMeta && route.children) {
116
156
  meta = Object.assign({}, meta, getChildIndexRoute(route.children)?.meta);
117
157
  }
158
+ const routeWithMergedMeta = { ...route, meta };
118
159
  const item = {
119
160
  path: routePath,
120
- title: meta?.title || "Missing Title",
161
+ title: getRouteTitle(routeWithMergedMeta, route) || "Missing Title",
121
162
  weight: meta?.weight || 0,
122
163
  meta
123
164
  };
@@ -126,23 +167,26 @@ export function createMenuItem(route, routePath = route.path, options) {
126
167
  }
127
168
  return item;
128
169
  }
170
+
129
171
  /**
130
- * Test if route is static (doesn't incude parameters)
172
+ * Test if route is static (doesn't include parameters)
131
173
  * @param {Object} route Route object to test
132
174
  * @returns {Boolean} Whether or not this route is static (not dynamic)
133
175
  */
134
176
  export function isStaticRoute(route) {
135
177
  return !route.path.includes("/:");
136
178
  }
179
+
137
180
  /**
138
181
  *
139
182
  * @param {Object} route Route object to test
140
183
  * @returns {Boolean} Whether or not this route is a static base route
141
184
  */
142
185
  export function isStaticBaseRoute(route) {
143
- const matches = route.path.match(/\//) || [];
186
+ const matches = route.path.match(/\//g) || [];
144
187
  return isStaticRoute(route) && matches.length === 1;
145
188
  }
189
+
146
190
  /**
147
191
  * Function to make normal <a> behave as router links instread of page reload
148
192
  * @param {Object} router Router instance (ie src/router) to push routes to
@@ -159,6 +203,7 @@ export function nativeLinkRouter(router, event) {
159
203
  }
160
204
  }
161
205
  }
206
+
162
207
  /**
163
208
  * Returns the child routes for base route
164
209
  * @param {Object} route Route Object
@@ -167,6 +212,7 @@ export function nativeLinkRouter(router, event) {
167
212
  export function $getRouteChildren(route, parent = $getParentRoute(route)) {
168
213
  return parent?.children;
169
214
  }
215
+
170
216
  /**
171
217
  * Returns the route's parent
172
218
  * @param {Object} route Route Object
@@ -216,4 +262,42 @@ export function $createSectionMenu(route, options) {
216
262
  .filter(includeIndex(opts.includeIndex))
217
263
  .map(r => createMenuItem(r, `${ parent.path }/${ r.path }`, opts.item))
218
264
  .sort(opts.sort);
219
- }
265
+ }
266
+
267
+ /**
268
+ * For a given $route, this will generate a breadcrumb trail.
269
+ * It iterates through `route.matched` to build the trail.
270
+ * - Falls back to `meta.title` (string or function).
271
+ * - Skips routes where `meta.breadcrumb` is set to `false`.
272
+ * - Avoids duplicate crumbs for nested routes with empty paths.
273
+ * @param {Object} route The Vue Router `$route` object.
274
+ * @returns {Array.<{title: String, to: Object, current: Boolean}>} An array of breadcrumb items.
275
+ */
276
+ export function $createBreadcrumb(route) {
277
+ const { matched, path: currentPath } = route;
278
+ let prevPath;
279
+
280
+ const crumbs = matched.reduce((arr, match, index) => {
281
+ if (match.meta?.breadcrumb === false) {
282
+ return arr;
283
+ }
284
+
285
+ if (match.path === prevPath) {
286
+ return arr;
287
+ }
288
+
289
+ const isLast = index === matched.length - 1;
290
+ const title = getRouteTitle(match, route) || "Missing Title";
291
+
292
+ arr.push({
293
+ title,
294
+ to: { path: isLast ? currentPath : match.path },
295
+ current: isLast,
296
+ });
297
+
298
+ prevPath = match.path;
299
+ return arr;
300
+ }, []);
301
+
302
+ return crumbs;
303
+ }
package/package.json CHANGED
@@ -1,16 +1,18 @@
1
1
  {
2
2
  "name": "@ulu/frontend-vue",
3
- "version": "0.1.0-beta.3",
4
- "description": "Frontend theming library (Vue)",
3
+ "version": "0.1.0-beta.31",
4
+ "description": "A modular and tree-shakeable Vue 3 component library for the Ulu frontend",
5
5
  "type": "module",
6
- "files" : [
6
+ "files": [
7
7
  "lib",
8
- "dist"
8
+ "dist",
9
+ "types"
9
10
  ],
10
11
  "module": "./lib/index.js",
11
12
  "exports": {
12
13
  ".": {
13
- "import": "./lib/index.js"
14
+ "import": "./lib/index.js",
15
+ "types": "./types/index.d.ts"
14
16
  },
15
17
  "./dist": {
16
18
  "import": "./dist/frontend-vue.js"
@@ -18,17 +20,37 @@
18
20
  "./*": "./lib/*",
19
21
  "./scss": "./lib/_index.scss"
20
22
  },
23
+ "types": "./types/index.d.ts",
24
+ "typesVersions": {
25
+ "*": {
26
+ "*": [
27
+ "./types/*"
28
+ ]
29
+ }
30
+ },
21
31
  "repository": {
22
32
  "type": "git",
23
33
  "url": "git+https://github.com/Jscherbe/frontend-vue.git"
24
34
  },
25
35
  "scripts": {
26
36
  "dev": "storybook dev -p 6006",
27
- "docs:build": "storybook build -o docs --docs",
37
+ "docs:build": "storybook build -o docs",
28
38
  "build": "vite build",
29
- "deploy": "npm run build && npm run docs:build"
39
+ "types": "npx tsc",
40
+ "deploy": "npm run types && npm run build && npm run docs:build",
41
+ "update-contexts": "rm -rf .ctx && mkdir -p .ctx/frontend && cp -R node_modules/@ulu/frontend/scss node_modules/@ulu/frontend/js .ctx/frontend/"
30
42
  },
31
- "keywords": [],
43
+ "keywords": [
44
+ "vue",
45
+ "vue3",
46
+ "ui",
47
+ "components",
48
+ "component-library",
49
+ "design-system",
50
+ "ulu",
51
+ "frontend",
52
+ "scss"
53
+ ],
32
54
  "author": "Joseph Scherben <jscherbe@gmail.com>",
33
55
  "license": "MIT",
34
56
  "bugs": {
@@ -37,29 +59,31 @@
37
59
  "homepage": "https://github.com/Jscherbe/frontend-vue#readme",
38
60
  "peerDependencies": {
39
61
  "@headlessui/vue": "^1.7.23",
40
- "@ulu/frontend": "^0.1.0-beta.94",
62
+ "@ulu/frontend": "^0.1.0-beta.104",
63
+ "@unhead/vue": "^2.0.11",
41
64
  "vue": "^3.5.17",
42
65
  "vue-router": "^4.5.1"
43
66
  },
44
67
  "optionalDependencies": {
45
- "gsap": "^3.13.0",
46
68
  "fuse.js": "^6.6.2",
69
+ "gsap": "^3.13.0",
47
70
  "vue3-dropzone": "^2.2.1"
48
71
  },
49
72
  "dependencies": {
50
73
  "@floating-ui/vue": "^1.1.8",
51
74
  "@ulu/utils": "^0.0.30",
52
- "lodash.clonedeep" : "^4.5.0"
75
+ "lodash-es": "^4.17.21"
53
76
  },
54
77
  "devDependencies": {
55
78
  "@fortawesome/fontawesome-svg-core": "^6.7.2",
56
79
  "@fortawesome/free-solid-svg-icons": "^6.7.2",
57
80
  "@fortawesome/vue-fontawesome": "^3.0.8",
58
81
  "@storybook/addon-docs": "^9.1.1",
59
- "@storybook/addon-links": "^9.1.1",
60
82
  "@storybook/addon-essentials": "^9.0.0-alpha.12",
83
+ "@storybook/addon-links": "^9.1.1",
61
84
  "@storybook/vue3-vite": "^9.1.1",
62
- "@ulu/frontend": "^0.1.0-beta.94",
85
+ "@ulu/frontend": "^0.1.0-beta.104",
86
+ "@unhead/vue": "^2.0.11",
63
87
  "@vitejs/plugin-vue": "^6.0.0",
64
88
  "ollama": "^0.5.16",
65
89
  "react": "^19.1.1",
@@ -67,6 +91,7 @@
67
91
  "sass-embedded": "^1.89.2",
68
92
  "storybook": "^9.1.1",
69
93
  "storybook-addon-vue-mdx": "^2.0.2",
94
+ "typescript": "^5.3.3",
70
95
  "vite": "^7.0.0",
71
96
  "vue-router": "^4.5.1"
72
97
  },
@@ -0,0 +1,2 @@
1
+ export * from "./systems/index.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/components/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ export const initialMockFacets: {
2
+ name: string;
3
+ uid: string;
4
+ open: boolean;
5
+ children: {
6
+ uid: string;
7
+ label: string;
8
+ }[];
9
+ }[];
10
+ export const mockItems: {
11
+ id: number;
12
+ title: string;
13
+ description: string;
14
+ category: string[];
15
+ author: string[];
16
+ date: Date;
17
+ }[];
18
+ //# sourceMappingURL=_mock-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_mock-data.d.ts","sourceRoot":"","sources":["../../../../lib/components/systems/facets/_mock-data.js"],"names":[],"mappings":"AAAA;;;;;;;;IAwBE;AAEF;;;;;;;IAaE"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * A composable for handling client-side faceted search, filtering, and sorting.
3
+ * @param {import('vue').Ref<Array<Object>>} allItems - A Vue ref containing the full list of items to be processed.
4
+ * @param {Object} options - Configuration options for the composable.
5
+ * @param {Array} [options.initialFacets] - The initial configuration for the facets. Can be generated automatically if `facetFields` is provided.
6
+ * @param {Array} [options.facetFields] - A simpler configuration to automatically generate facets from items. Each item can have `uid`, `name`, `open`, `getValue` and `getLabel`.
7
+ * @param {String} [options.initialSearchValue=''] - The initial value for the search input.
8
+ * @param {String} [options.initialSortType='az'] - The initial sort type.
9
+ * @param {Boolean} [options.noDefaultSorts=false] - If true, the default 'A-Z' and 'Z-A' sorts will not be included.
10
+ * @param {Object} [options.extraSortTypes={}] - Additional sort types to be merged with the default ones.
11
+ * @param {Object} [options.searchOptions={}] - Configuration options for Fuse.js.
12
+ * @param {Function} [options.getItemFacet] - A function to retrieve facet information from an item. Should always return an array of values.
13
+ * @param {Function} [options.getSortValue] - A function to get the value to sort by from an item.
14
+ */
15
+ export function useFacets(allItems: import("vue").Ref<Array<any>>, options?: {
16
+ initialFacets?: any[];
17
+ facetFields?: any[];
18
+ initialSearchValue?: string;
19
+ initialSortType?: string;
20
+ noDefaultSorts?: boolean;
21
+ extraSortTypes?: any;
22
+ searchOptions?: any;
23
+ getItemFacet?: Function;
24
+ getSortValue?: Function;
25
+ }): {
26
+ facets: import("vue").Ref<any, any>;
27
+ searchValue: import("vue").Ref<string, string>;
28
+ selectedSort: import("vue").Ref<string, string>;
29
+ sortTypes: import("vue").ComputedRef<any>;
30
+ displayItems: import("vue").ComputedRef<any>;
31
+ selectedFacets: import("vue").ComputedRef<any[]>;
32
+ clearFilters: () => void;
33
+ handleFacetChange: ({ groupUid, facetUid, selected }: {
34
+ groupUid: any;
35
+ facetUid: any;
36
+ selected: any;
37
+ }) => void;
38
+ };
39
+ //# sourceMappingURL=useFacets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFacets.d.ts","sourceRoot":"","sources":["../../../../lib/components/systems/facets/useFacets.js"],"names":[],"mappings":"AAsCA;;;;;;;;;;;;;GAaG;AACH,oCAZW,OAAO,KAAK,EAAE,GAAG,CAAC,KAAK,KAAQ,CAAC,YAExC;IAAwB,aAAa;IACb,WAAW;IACV,kBAAkB;IAClB,eAAe;IACd,cAAc;IACf,cAAc;IACd,aAAa;IACX,YAAY;IACZ,YAAY;CACzC;;;;;;;;;;;;;EAiLA"}
@@ -0,0 +1,2 @@
1
+ export { useFacets } from "./facets/useFacets.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/systems/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Symbol for register provide/inject
3
+ */
4
+ export const REGISTER: any;
5
+ export const UNREGISTER: any;
6
+ export const SECTIONS: any;
7
+ //# sourceMappingURL=symbols.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../../../lib/components/systems/scroll-anchors/symbols.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,2BAAiC;AACjC,6BAAmC;AACnC,2BAAiC"}
@@ -0,0 +1,8 @@
1
+ export { useIcon } from "./useIcon.js";
2
+ export { useModifiers } from "./useModifiers.js";
3
+ export { useWindowResize } from "./useWindowResize.js";
4
+ export { useRequiredInject } from "./useRequiredInject.js";
5
+ export { useBreakpointManager } from "./useBreakpointManager.js";
6
+ export { usePagination } from "./usePagination.js";
7
+ export { useDocumentTitle } from "./useDocumentTitle.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/composables/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Use the CssBreakpoints module in Vue
3
+ * - Normally use only once, unless you have different sets of breakpoints
4
+ * @param {Object} options Configuration options overrides
5
+ * @return {Object} { manager, active, direction } (all are null in SSR environment until init)
6
+ */
7
+ export function useBreakpointManager(options: any): any;
8
+ //# sourceMappingURL=useBreakpointManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBreakpointManager.d.ts","sourceRoot":"","sources":["../../lib/composables/useBreakpointManager.js"],"names":[],"mappings":"AAoBA;;;;;GAKG;AACH,wDAyCC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * A composable to manage the document title.
3
+ *
4
+ * When called with a `title` option, it sets a dynamic title for the current page.
5
+ * This is for use within specific components.
6
+ *
7
+ * When called without a `title` option (typically in App.vue), it manages the
8
+ * document title for the whole app, using titles from components or route meta.
9
+ *
10
+ * @param {object} options
11
+ * @param {import('vue').Ref<string> | string} [options.title] - The dynamic title to set for the current page.
12
+ * @param {string} [options.titleTemplate='%s'] - The template for the document title, e.g., '%s | My Site'.
13
+ * @param {Function} [options.useRoute=defaultUseRoute] - Injectable `useRoute` for testing.
14
+ * @param {Function} [options.useHead=defaultUseHead] - Injectable `useHead` for testing.
15
+ */
16
+ export function useDocumentTitle(options?: {
17
+ title?: import("vue").Ref<string> | string;
18
+ titleTemplate?: string;
19
+ useRoute?: Function;
20
+ useHead?: Function;
21
+ }): void;
22
+ //# sourceMappingURL=useDocumentTitle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDocumentTitle.d.ts","sourceRoot":"","sources":["../../lib/composables/useDocumentTitle.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;GAcG;AACH,2CALG;IAAqD,KAAK,GAAlD,OAAO,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM;IACjB,aAAa,GAA9B,MAAM;IACa,QAAQ;IACR,OAAO;CACpC,QAsCA"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Utility composable for handling and formatting icon props for UluIcon.
3
+ * @returns {Object} An object with utility functions { getIconProps, getClassesFromDefinition }
4
+ */
5
+ export function useIcon(): any;
6
+ //# sourceMappingURL=useIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIcon.d.ts","sourceRoot":"","sources":["../../lib/composables/useIcon.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,+BAyDC"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * A composable to manage and resolve BEM style modifiers for a component,
3
+ * combining user-passed modifiers with internally derived conditional modifiers.
4
+ *
5
+ * @param {object} options - The options for the composable.
6
+ * @param {object} options.props - The component's props object. (Must contain a 'modifiers' prop if user-passed modifiers are expected)
7
+ * @param {string | import('vue').Ref<string>} options.baseClass - The base CSS class name for the component (e.g., 'modal').
8
+ * Can be a string or a ref to a string.
9
+ * @param {string | string[] | Object.<string, any> | import('vue').ComputedRef<string | string[] | Object.<string, any>>} [options.internal={}] -
10
+ * A flexible input for component's internal modifiers. Can be a string, array of strings/objects, or an object mapping modifier names to conditions.
11
+ * @returns {object} An object containing the computed property `resolvedModifiers`
12
+ *
13
+ * @example
14
+ * // In MyComponent.vue:
15
+ * <template>
16
+ * <div :class="[resolvedModifiers, 'other-class']"></div>
17
+ * </template>
18
+ *
19
+ * <script>
20
+ * import { computed, ref } from 'vue';
21
+ * import { useModifiers } from './composables/useModifiers.js'; // Adjust path
22
+ *
23
+ * export default {
24
+ * props: {
25
+ * variant: String, // e.g., 'primary', 'secondary'
26
+ * isActive: Boolean,
27
+ * modifiers: [String, Array, Object] // User-passed modifiers
28
+ * },
29
+ * setup(props) {
30
+ * const isHovered = ref(false);
31
+ *
32
+ * // Define component-internal modifiers based on props or local state
33
+ * const internalModifiers = computed(() => ({
34
+ * [props.variant]: !!props.variant, // Add 'primary' or 'secondary' if prop exists
35
+ * 'active': props.isActive, // Add 'active' if isActive prop is true
36
+ * 'hovered': isHovered.value, // Add 'hovered' if local state is true
37
+ * 'default': !props.variant && !props.isActive // Add 'default' if no variant/active
38
+ * }));
39
+ *
40
+ * // Use the composable to get the combined modifier classes
41
+ * const { resolvedModifiers } = useModifiers({
42
+ * props: props, // Pass component props for 'modifiers' prop
43
+ * baseClass: 'button', // The BEM block name
44
+ * internal: internalModifiers // The computed internal modifiers
45
+ * });
46
+ *
47
+ * return { resolvedModifiers, isHovered };
48
+ * }
49
+ * };
50
+ * </script>
51
+ *
52
+ * // Resulting class examples for 'my-component':
53
+ * // <MyComponent /> => class="my-component my-component--default"
54
+ * // <MyComponent variant="primary" /> => class="my-component my-component--primary"
55
+ * // <MyComponent isActive /> => class="my-component my-component--active"
56
+ * // <MyComponent modifiers="condensed" /> => class="my-component my-component--default my-component--condensed"
57
+ * // <MyComponent variant="secondary" :isActive="true" modifiers="round" />
58
+ * // => class="my-component my-component--secondary my-component--active my-component--round"
59
+ */
60
+ export function useModifiers({ props, baseClass, internal }: {
61
+ props: object;
62
+ baseClass: string | import("vue").Ref<string>;
63
+ internal?: string | string[] | {
64
+ [x: string]: any;
65
+ } | import("vue").ComputedRef<string | string[] | {
66
+ [x: string]: any;
67
+ }>;
68
+ }): object;
69
+ //# sourceMappingURL=useModifiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useModifiers.d.ts","sourceRoot":"","sources":["../../lib/composables/useModifiers.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,6DAtDG;IAAwB,KAAK,EAArB,MAAM;IACsC,SAAS,EAArD,MAAM,GAAG,OAAO,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC;IAEuF,QAAQ,GAAjI,MAAM,GAAG,MAAM,EAAE,GAAG;YAAQ,MAAM,GAAE,GAAG;KAAC,GAAG,OAAO,KAAK,EAAE,WAAW,CAAC,MAAM,GAAG,MAAM,EAAE,GAAG;YAAQ,MAAM,GAAE,GAAG;KAAC,CAAC;CAEtH,GAAU,MAAM,CA0ElB"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * A composable to set the title for the current page/route from within its component.
3
+ * This provides a single source of truth for a page's title, which can be
4
+ * consumed by various parts of the application (e.g., breadcrumbs, document title).
5
+ * @param {import('vue').Ref<string> | string} title The title to set for the current page. Can be a ref, computed, or a plain string.
6
+ * @param {{ useRoute: Function }} options For dependency injection in tests/stories.
7
+ */
8
+ export function usePageTitle(title: import("vue").Ref<string> | string, { useRoute }?: {
9
+ useRoute: Function;
10
+ }): void;
11
+ /**
12
+ * Gets the dynamically set page title for a given path.
13
+ * For internal use by consumers like breadcrumb or document title utilities.
14
+ * @param {string} path The route path to look up.
15
+ * @returns {string | undefined}
16
+ */
17
+ export function getPageTitle(path: string): string | undefined;
18
+ export const pageTitles: {};
19
+ //# sourceMappingURL=usePageTitle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePageTitle.d.ts","sourceRoot":"","sources":["../../lib/composables/usePageTitle.js"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,oCAHW,OAAO,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,iBAClC;IAAE,QAAQ,WAAU;CAAE,QAchC;AAED;;;;;GAKG;AACH,mCAHW,MAAM,GACJ,MAAM,GAAG,SAAS,CAI9B;AA/BD,4BAAuC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * A Vue composable for handling pagination logic.
3
+ * It interacts with vue-router to keep the current page in the URL query string.
4
+ *
5
+ * @param {import('vue').Ref<Array<any>>} items - A ref containing the full list of items to be paginated.
6
+ * @param {number} itemsPerPage - The number of items to display per page.
7
+ * @returns {{
8
+ * currentPage: import('vue').ComputedRef<number>,
9
+ * totalPages: import('vue').ComputedRef<number>,
10
+ * paginatedItems: import('vue').ComputedRef<Array<any>>,
11
+ * pagerItems: import('vue').ComputedRef<object|null>,
12
+ * pagerEllipses: import('vue').ComputedRef<{previous: boolean, next: boolean}>
13
+ * }} - An object containing reactive properties for pagination.
14
+ */
15
+ export function usePagination(items: import("vue").Ref<Array<any>>, itemsPerPage: number): {
16
+ currentPage: import("vue").ComputedRef<number>;
17
+ totalPages: import("vue").ComputedRef<number>;
18
+ paginatedItems: import("vue").ComputedRef<Array<any>>;
19
+ pagerItems: import("vue").ComputedRef<object | null>;
20
+ pagerEllipses: import("vue").ComputedRef<{
21
+ previous: boolean;
22
+ next: boolean;
23
+ }>;
24
+ };
25
+ //# sourceMappingURL=usePagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePagination.d.ts","sourceRoot":"","sources":["../../lib/composables/usePagination.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AACH,qCAVW,OAAO,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,gBAC7B,MAAM,GACJ;IACR,WAAW,EAAE,OAAO,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/C,UAAU,EAAE,OAAO,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9C,cAAc,EAAE,OAAO,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IACtD,UAAU,EAAE,OAAO,KAAK,EAAE,WAAW,CAAC,MAAM,GAAC,IAAI,CAAC,CAAC;IACnD,aAAa,EAAE,OAAO,KAAK,EAAE,WAAW,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAC,CAAC,CAAA;CAC7E,CA0GH"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Injects a dependency from a plugin (or other required inject) and throws an error if it's not available.
3
+ *
4
+ * @param {string} key - The injection key (e.g., 'uluBreakpointManager').
5
+ * @returns The injected value.
6
+ */
7
+ export function useRequiredInject(key: string): {};
8
+ //# sourceMappingURL=useRequiredInject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRequiredInject.d.ts","sourceRoot":"","sources":["../../lib/composables/useRequiredInject.js"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,uCAHW,MAAM,MAchB"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Composable function
3
+ * @return {Object} Contains reactive 'resizing' and two methods for calling callbacks (onResizeStart, onResizeEnd)
4
+ */
5
+ export function useWindowResize(): any;
6
+ //# sourceMappingURL=useWindowResize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWindowResize.d.ts","sourceRoot":"","sources":["../../lib/composables/useWindowResize.js"],"names":[],"mappings":"AAiDA;;;GAGG;AACH,uCAUC"}