@ulu/frontend-vue 0.1.1-beta.2 → 0.1.1-beta.21

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 (233) hide show
  1. package/dist/{breakpoints-DfGETUy5.js → breakpoints-BK5cY325.js} +1 -1
  2. package/dist/frontend-vue.css +1 -1
  3. package/dist/frontend-vue.js +78 -74
  4. package/dist/{index-94HkwBnP.js → index-CzaotMwA.js} +2457 -2061
  5. package/lib/components/collapsible/UluAccordion.vue +9 -9
  6. package/lib/components/collapsible/UluCollapsible.vue +9 -24
  7. package/lib/components/elements/UluCard.vue +172 -157
  8. package/lib/components/elements/UluDefinitionList.vue +55 -3
  9. package/lib/components/forms/UluSelectableMenu.vue +8 -1
  10. package/lib/components/index.js +3 -1
  11. package/lib/components/navigation/UluMenu.vue +5 -3
  12. package/lib/components/navigation/UluMenuStack.vue +47 -30
  13. package/lib/components/systems/facets/UluFacetsActiveFilters.vue +104 -0
  14. package/lib/components/systems/facets/UluFacetsFilterAccordions.vue +94 -0
  15. package/lib/components/systems/facets/UluFacetsFilterLists.vue +15 -11
  16. package/lib/components/systems/facets/UluFacetsList.vue +3 -1
  17. package/lib/components/systems/facets/UluFacetsSearch.vue +1 -1
  18. package/lib/components/systems/facets/UluFacetsSidebarLayout.vue +32 -12
  19. package/lib/components/systems/facets/useFacets.js +166 -40
  20. package/lib/components/systems/index.js +2 -0
  21. package/lib/components/systems/slider/UluSlideShow.vue +2 -2
  22. package/lib/components/utils/{UluCondText.vue → UluConditionalText.vue} +1 -1
  23. package/lib/components/utils/UluConditionalWrapper.vue +29 -0
  24. package/lib/components/utils/UluRouteAnnouncer.vue +1 -1
  25. package/lib/components/utils/UluSanityRichText.vue +41 -0
  26. package/lib/components/visualizations/UluProgressCircle.vue +1 -1
  27. package/lib/plugins/core/index.js +3 -2
  28. package/lib/plugins/popovers/UluPopover.vue +1 -1
  29. package/package.json +13 -8
  30. package/types/components/collapsible/UluAccordion.vue.d.ts +41 -0
  31. package/types/components/collapsible/UluAccordion.vue.d.ts.map +1 -0
  32. package/types/components/collapsible/UluAccordionGroup.vue.d.ts +19 -0
  33. package/types/components/collapsible/UluAccordionGroup.vue.d.ts.map +1 -0
  34. package/types/components/collapsible/UluCollapsible.vue.d.ts +39 -0
  35. package/types/components/collapsible/UluCollapsible.vue.d.ts.map +1 -0
  36. package/types/components/collapsible/UluDropdown.vue.d.ts +22 -0
  37. package/types/components/collapsible/UluDropdown.vue.d.ts.map +1 -0
  38. package/types/components/collapsible/UluModal.vue.d.ts +253 -0
  39. package/types/components/collapsible/UluModal.vue.d.ts.map +1 -0
  40. package/types/components/collapsible/UluOverflowPopover.vue.d.ts +18 -0
  41. package/types/components/collapsible/UluOverflowPopover.vue.d.ts.map +1 -0
  42. package/types/components/collapsible/UluTab.vue.d.ts +10 -0
  43. package/types/components/collapsible/UluTab.vue.d.ts.map +1 -0
  44. package/types/components/collapsible/UluTabGroup.vue.d.ts +18 -0
  45. package/types/components/collapsible/UluTabGroup.vue.d.ts.map +1 -0
  46. package/types/components/collapsible/UluTabList.vue.d.ts +10 -0
  47. package/types/components/collapsible/UluTabList.vue.d.ts.map +1 -0
  48. package/types/components/collapsible/UluTabPanel.vue.d.ts +10 -0
  49. package/types/components/collapsible/UluTabPanel.vue.d.ts.map +1 -0
  50. package/types/components/collapsible/UluTabPanels.vue.d.ts +10 -0
  51. package/types/components/collapsible/UluTabPanels.vue.d.ts.map +1 -0
  52. package/types/components/elements/UluAlert.vue.d.ts +147 -0
  53. package/types/components/elements/UluAlert.vue.d.ts.map +1 -0
  54. package/types/components/elements/UluBadge.vue.d.ts +30 -0
  55. package/types/components/elements/UluBadge.vue.d.ts.map +1 -0
  56. package/types/components/elements/UluBadgeStack.vue.d.ts +9 -0
  57. package/types/components/elements/UluBadgeStack.vue.d.ts.map +1 -0
  58. package/types/components/elements/UluButton.vue.d.ts +186 -0
  59. package/types/components/elements/UluButton.vue.d.ts.map +1 -0
  60. package/types/components/elements/UluButtonVerbose.vue.d.ts +126 -0
  61. package/types/components/elements/UluButtonVerbose.vue.d.ts.map +1 -0
  62. package/types/components/elements/UluCallout.vue.d.ts +27 -0
  63. package/types/components/elements/UluCallout.vue.d.ts.map +1 -0
  64. package/types/components/elements/UluCard.vue.d.ts +66 -0
  65. package/types/components/elements/UluCard.vue.d.ts.map +1 -0
  66. package/types/components/elements/UluDefinitionList.vue.d.ts +42 -0
  67. package/types/components/elements/UluDefinitionList.vue.d.ts.map +1 -0
  68. package/types/components/elements/UluExternalLink.vue.d.ts +25 -0
  69. package/types/components/elements/UluExternalLink.vue.d.ts.map +1 -0
  70. package/types/components/elements/UluIcon.vue.d.ts +11 -0
  71. package/types/components/elements/UluIcon.vue.d.ts.map +1 -0
  72. package/types/components/elements/UluList.vue.d.ts +37 -0
  73. package/types/components/elements/UluList.vue.d.ts.map +1 -0
  74. package/types/components/elements/UluMain.vue.d.ts +13 -0
  75. package/types/components/elements/UluMain.vue.d.ts.map +1 -0
  76. package/types/components/elements/UluSpokeSpinner.vue.d.ts +9 -0
  77. package/types/components/elements/UluSpokeSpinner.vue.d.ts.map +1 -0
  78. package/types/components/elements/UluTag.vue.d.ts +26 -0
  79. package/types/components/elements/UluTag.vue.d.ts.map +1 -0
  80. package/types/components/forms/UluFileDisplay.vue.d.ts +23 -0
  81. package/types/components/forms/UluFileDisplay.vue.d.ts.map +1 -0
  82. package/types/components/forms/UluFormFile.vue.d.ts +26 -0
  83. package/types/components/forms/UluFormFile.vue.d.ts.map +1 -0
  84. package/types/components/forms/UluFormMessage.vue.d.ts +18 -0
  85. package/types/components/forms/UluFormMessage.vue.d.ts.map +1 -0
  86. package/types/components/forms/UluFormSelect.vue.d.ts +24 -0
  87. package/types/components/forms/UluFormSelect.vue.d.ts.map +1 -0
  88. package/types/components/forms/UluFormText.vue.d.ts +22 -0
  89. package/types/components/forms/UluFormText.vue.d.ts.map +1 -0
  90. package/types/components/forms/UluSearchForm.vue.d.ts +9 -0
  91. package/types/components/forms/UluSearchForm.vue.d.ts.map +1 -0
  92. package/types/components/forms/UluSelectableMenu.vue.d.ts +30 -0
  93. package/types/components/forms/UluSelectableMenu.vue.d.ts.map +1 -0
  94. package/types/components/index.d.ts +50 -0
  95. package/types/components/layout/UluAdaptiveLayout.vue.d.ts +12 -0
  96. package/types/components/layout/UluAdaptiveLayout.vue.d.ts.map +1 -0
  97. package/types/components/layout/UluDataGrid.vue.d.ts +3 -0
  98. package/types/components/layout/UluDataGrid.vue.d.ts.map +1 -0
  99. package/types/components/layout/UluTitleRail.vue.d.ts +91 -0
  100. package/types/components/layout/UluTitleRail.vue.d.ts.map +1 -0
  101. package/types/components/layout/UluWhenBreakpoint.vue.d.ts +20 -0
  102. package/types/components/layout/UluWhenBreakpoint.vue.d.ts.map +1 -0
  103. package/types/components/navigation/UluBreadcrumb.vue.d.ts +71 -0
  104. package/types/components/navigation/UluBreadcrumb.vue.d.ts.map +1 -0
  105. package/types/components/navigation/UluMenu.vue.d.ts +142 -0
  106. package/types/components/navigation/UluMenu.vue.d.ts.map +1 -0
  107. package/types/components/navigation/UluMenuStack.vue.d.ts +19 -0
  108. package/types/components/navigation/UluMenuStack.vue.d.ts.map +1 -0
  109. package/types/components/navigation/UluNavStrip.vue.d.ts +138 -0
  110. package/types/components/navigation/UluNavStrip.vue.d.ts.map +1 -0
  111. package/types/components/navigation/UluPager.vue.d.ts +15 -0
  112. package/types/components/navigation/UluPager.vue.d.ts.map +1 -0
  113. package/types/components/navigation/UluSkipLink.vue.d.ts +3 -0
  114. package/types/components/navigation/UluSkipLink.vue.d.ts.map +1 -0
  115. package/types/components/systems/facets/ExampleFacetsWithPagination.vue.d.ts +3 -0
  116. package/types/components/systems/facets/ExampleFacetsWithPagination.vue.d.ts.map +1 -0
  117. package/types/components/systems/facets/UluFacetsActiveFilters.vue.d.ts +24 -0
  118. package/types/components/systems/facets/UluFacetsActiveFilters.vue.d.ts.map +1 -0
  119. package/types/components/systems/facets/UluFacetsFilterAccordions.vue.d.ts +29 -0
  120. package/types/components/systems/facets/UluFacetsFilterAccordions.vue.d.ts.map +1 -0
  121. package/types/components/systems/facets/UluFacetsFilterLists.vue.d.ts +27 -0
  122. package/types/components/systems/facets/UluFacetsFilterLists.vue.d.ts.map +1 -0
  123. package/types/components/systems/facets/UluFacetsFilterPopovers.vue.d.ts +25 -0
  124. package/types/components/systems/facets/UluFacetsFilterPopovers.vue.d.ts.map +1 -0
  125. package/types/components/systems/facets/UluFacetsFilterSelects.vue.d.ts +11 -0
  126. package/types/components/systems/facets/UluFacetsFilterSelects.vue.d.ts.map +1 -0
  127. package/types/components/systems/facets/UluFacetsHeaderLayout.vue.d.ts +12 -0
  128. package/types/components/systems/facets/UluFacetsHeaderLayout.vue.d.ts.map +1 -0
  129. package/types/components/systems/facets/UluFacetsList.vue.d.ts +21 -0
  130. package/types/components/systems/facets/UluFacetsList.vue.d.ts.map +1 -0
  131. package/types/components/systems/facets/UluFacetsResults.vue.d.ts +27 -0
  132. package/types/components/systems/facets/UluFacetsResults.vue.d.ts.map +1 -0
  133. package/types/components/systems/facets/UluFacetsSearch.vue.d.ts +15 -0
  134. package/types/components/systems/facets/UluFacetsSearch.vue.d.ts.map +1 -0
  135. package/types/components/systems/facets/UluFacetsSidebarLayout.vue.d.ts +22 -0
  136. package/types/components/systems/facets/UluFacetsSidebarLayout.vue.d.ts.map +1 -0
  137. package/types/components/systems/facets/UluFacetsSort.vue.d.ts +22 -0
  138. package/types/components/systems/facets/UluFacetsSort.vue.d.ts.map +1 -0
  139. package/types/components/systems/facets/useFacets.d.ts +30 -12
  140. package/types/components/systems/facets/useFacets.d.ts.map +1 -1
  141. package/types/components/systems/index.d.ts +25 -0
  142. package/types/components/systems/scroll-anchors/UluScrollAnchors.vue.d.ts +60 -0
  143. package/types/components/systems/scroll-anchors/UluScrollAnchors.vue.d.ts.map +1 -0
  144. package/types/components/systems/scroll-anchors/UluScrollAnchorsNav.vue.d.ts +15 -0
  145. package/types/components/systems/scroll-anchors/UluScrollAnchorsNav.vue.d.ts.map +1 -0
  146. package/types/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue.d.ts +32 -0
  147. package/types/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue.d.ts.map +1 -0
  148. package/types/components/systems/scroll-anchors/UluScrollAnchorsSection.vue.d.ts +50 -0
  149. package/types/components/systems/scroll-anchors/UluScrollAnchorsSection.vue.d.ts.map +1 -0
  150. package/types/components/systems/scroll-anchors/symbols.d.ts +3 -3
  151. package/types/components/systems/scroll-anchors/symbols.d.ts.map +1 -1
  152. package/types/components/systems/skeleton/UluShowSkeleton.vue.d.ts +16 -0
  153. package/types/components/systems/skeleton/UluShowSkeleton.vue.d.ts.map +1 -0
  154. package/types/components/systems/skeleton/UluSkeletonContent.vue.d.ts +9 -0
  155. package/types/components/systems/skeleton/UluSkeletonContent.vue.d.ts.map +1 -0
  156. package/types/components/systems/skeleton/UluSkeletonMedia.vue.d.ts +3 -0
  157. package/types/components/systems/skeleton/UluSkeletonMedia.vue.d.ts.map +1 -0
  158. package/types/components/systems/skeleton/UluSkeletonText.vue.d.ts +13 -0
  159. package/types/components/systems/skeleton/UluSkeletonText.vue.d.ts.map +1 -0
  160. package/types/components/systems/slider/UluImageSlideShow.vue.d.ts +130 -0
  161. package/types/components/systems/slider/UluImageSlideShow.vue.d.ts.map +1 -0
  162. package/types/components/systems/slider/UluSlideShow.vue.d.ts +205 -0
  163. package/types/components/systems/slider/UluSlideShow.vue.d.ts.map +1 -0
  164. package/types/components/systems/slider/UluSlideShowSlide.vue.d.ts +17 -0
  165. package/types/components/systems/slider/UluSlideShowSlide.vue.d.ts.map +1 -0
  166. package/types/components/systems/table-sticky/UluTableSticky.vue.d.ts +455 -0
  167. package/types/components/systems/table-sticky/UluTableSticky.vue.d.ts.map +1 -0
  168. package/types/components/systems/table-sticky/UluTableStickyRows.vue.d.ts +34 -0
  169. package/types/components/systems/table-sticky/UluTableStickyRows.vue.d.ts.map +1 -0
  170. package/types/components/systems/table-sticky/UluTableStickyTable.vue.d.ts +151 -0
  171. package/types/components/systems/table-sticky/UluTableStickyTable.vue.d.ts.map +1 -0
  172. package/types/components/utils/UluCondText.vue.d.ts +29 -0
  173. package/types/components/utils/UluCondText.vue.d.ts.map +1 -0
  174. package/types/components/utils/UluConditionalText.vue.d.ts +29 -0
  175. package/types/components/utils/UluConditionalText.vue.d.ts.map +1 -0
  176. package/types/components/utils/UluConditionalWrapper.vue.d.ts +20 -0
  177. package/types/components/utils/UluConditionalWrapper.vue.d.ts.map +1 -0
  178. package/types/components/utils/UluEmpty.vue.d.ts +3 -0
  179. package/types/components/utils/UluEmpty.vue.d.ts.map +1 -0
  180. package/types/components/utils/UluEmptyView.vue.d.ts +3 -0
  181. package/types/components/utils/UluEmptyView.vue.d.ts.map +1 -0
  182. package/types/components/utils/UluPlaceholderImage.vue.d.ts +61 -0
  183. package/types/components/utils/UluPlaceholderImage.vue.d.ts.map +1 -0
  184. package/types/components/utils/UluPlaceholderText.vue.d.ts +24 -0
  185. package/types/components/utils/UluPlaceholderText.vue.d.ts.map +1 -0
  186. package/types/components/utils/UluRouteAnnouncer.vue.d.ts +63 -0
  187. package/types/components/utils/UluRouteAnnouncer.vue.d.ts.map +1 -0
  188. package/types/components/utils/UluSanityRichText.vue.d.ts +15 -0
  189. package/types/components/utils/UluSanityRichText.vue.d.ts.map +1 -0
  190. package/types/components/visualizations/UluAnimateNumber.vue.d.ts +16 -0
  191. package/types/components/visualizations/UluAnimateNumber.vue.d.ts.map +1 -0
  192. package/types/components/visualizations/UluProgressBar.vue.d.ts +66 -0
  193. package/types/components/visualizations/UluProgressBar.vue.d.ts.map +1 -0
  194. package/types/components/visualizations/UluProgressCircle.vue.d.ts +48 -0
  195. package/types/components/visualizations/UluProgressCircle.vue.d.ts.map +1 -0
  196. package/types/composables/useBreakpointManager.d.ts +1 -1
  197. package/types/composables/useBreakpointManager.d.ts.map +1 -1
  198. package/types/composables/useDocumentTitle.d.ts +4 -4
  199. package/types/composables/useDocumentTitle.d.ts.map +1 -1
  200. package/types/composables/useIcon.d.ts +1 -1
  201. package/types/composables/useIcon.d.ts.map +1 -1
  202. package/types/composables/useModifiers.d.ts +1 -1
  203. package/types/composables/useModifiers.d.ts.map +1 -1
  204. package/types/composables/useWindowResize.d.ts +1 -1
  205. package/types/composables/useWindowResize.d.ts.map +1 -1
  206. package/types/plugins/core/index.d.ts.map +1 -1
  207. package/types/plugins/modals/UluModalsDisplay.vue.d.ts +14 -0
  208. package/types/plugins/modals/UluModalsDisplay.vue.d.ts.map +1 -0
  209. package/types/plugins/modals/api.d.ts +7 -4
  210. package/types/plugins/modals/api.d.ts.map +1 -1
  211. package/types/plugins/popovers/UluPopover.vue.d.ts +53 -0
  212. package/types/plugins/popovers/UluPopover.vue.d.ts.map +1 -0
  213. package/types/plugins/popovers/UluTooltipDisplay.vue.d.ts +3 -0
  214. package/types/plugins/popovers/UluTooltipDisplay.vue.d.ts.map +1 -0
  215. package/types/plugins/popovers/UluTooltipPopover.vue.d.ts +3 -0
  216. package/types/plugins/popovers/UluTooltipPopover.vue.d.ts.map +1 -0
  217. package/types/plugins/popovers/defaults.d.ts +2 -2
  218. package/types/plugins/popovers/defaults.d.ts.map +1 -1
  219. package/types/plugins/popovers/manager.d.ts +50 -6
  220. package/types/plugins/popovers/manager.d.ts.map +1 -1
  221. package/types/plugins/popovers/useFollow.d.ts +4 -4
  222. package/types/plugins/popovers/useFollow.d.ts.map +1 -1
  223. package/types/plugins/toast/UluToast.vue.d.ts +52 -0
  224. package/types/plugins/toast/UluToast.vue.d.ts.map +1 -0
  225. package/types/plugins/toast/UluToastDisplay.vue.d.ts +13 -0
  226. package/types/plugins/toast/UluToastDisplay.vue.d.ts.map +1 -0
  227. package/types/plugins/toast/defaults.d.ts +39 -2
  228. package/types/plugins/toast/store.d.ts +65 -2
  229. package/types/plugins/toast/store.d.ts.map +1 -1
  230. package/types/utils/dom.d.ts +1 -1
  231. package/types/utils/dom.d.ts.map +1 -1
  232. package/types/utils/router.d.ts +15 -15
  233. package/types/utils/router.d.ts.map +1 -1
@@ -7,24 +7,24 @@
7
7
  :animate="animate"
8
8
  @update:model-value="$emit('update:modelValue', $event)"
9
9
  >
10
- <template #trigger="{ isOpen: open, toggle }">
11
- <slot name="trigger" :open="open" :toggle="toggle">
10
+ <template #trigger="{ isOpen }">
11
+ <slot name="trigger" :isOpen="isOpen">
12
12
  <component :is="triggerTextElement">
13
13
  {{ triggerText }}
14
14
  </component>
15
15
  </slot>
16
- <slot name="icon" :open="open">
16
+ <slot name="icon" :isOpen="isOpen">
17
17
  <span class="accordion__icon" :class="classes.icon">
18
18
  <UluIcon
19
- :icon="open ? 'type:collapse' : 'type:expand'"
19
+ :icon="isOpen ? 'type:collapse' : 'type:expand'"
20
20
  style="display: inline;"
21
21
  />
22
22
  </span>
23
23
  </slot>
24
24
  </template>
25
25
 
26
- <template #default="{ isOpen: open, toggle }">
27
- <slot :open="open" :toggle="toggle"/>
26
+ <template #default="{ isOpen, toggle }">
27
+ <slot :isOpen="isOpen" :toggle="toggle"/>
28
28
  </template>
29
29
  </UluCollapsible>
30
30
  </template>
@@ -55,7 +55,7 @@
55
55
  */
56
56
  animate: {
57
57
  type: [Boolean, Object],
58
- default: false
58
+ default: true
59
59
  },
60
60
  /**
61
61
  * Text to use for accordion, alternatively use #trigger slot
@@ -69,7 +69,7 @@
69
69
  default: "strong"
70
70
  },
71
71
  /**
72
- * Classes for elements. See UluCollapsible for all available class keys (toggle, content, etc).
72
+ * Classes for elements. See UluCollapsible for all available class keys (trigger, content, etc).
73
73
  * The 'icon' key is also available for the icon span.
74
74
  * - Any valid class binding value per element
75
75
  */
@@ -77,7 +77,7 @@
77
77
  type: Object,
78
78
  default: () => ({
79
79
  container: 'accordion',
80
- toggle: 'accordion__summary',
80
+ trigger: 'accordion__summary',
81
81
  content: 'accordion__content',
82
82
  containerOpen: 'is-active'
83
83
  })
@@ -2,16 +2,16 @@
2
2
  <div
3
3
  ref="container"
4
4
  @keydown.esc="handleEscape"
5
- :class="[classes.container, containerStateClasses]"
5
+ :class="[classes.container, isOpen ? classes.containerOpen : classes.containerClosed]"
6
6
  >
7
7
  <button
8
- :class="classes.toggle"
9
- :id="toggleId"
8
+ :class="classes.trigger"
9
+ :id="triggerId"
10
10
  :aria-controls="contentId"
11
11
  :aria-expanded="isOpen"
12
12
  @click="toggle"
13
13
  >
14
- <slot name="trigger" :isOpen="isOpen" :toggle="toggle">
14
+ <slot name="trigger" :isOpen="isOpen">
15
15
  {{ triggerText }}
16
16
  </slot>
17
17
  </button>
@@ -21,11 +21,9 @@
21
21
  tabindex="-1"
22
22
  :id="contentId"
23
23
  :aria-hidden="!isOpen"
24
- :aria-labelledby="toggleId"
24
+ :aria-labelledby="triggerId"
25
25
  >
26
- <div :class="classes.contentInner">
27
- <slot :isOpen="isOpen" :toggle="toggle" />
28
- </div>
26
+ <slot :isOpen="isOpen" :toggle="toggle" />
29
27
  </div>
30
28
  </div>
31
29
  </template>
@@ -66,16 +64,15 @@
66
64
  default: true
67
65
  },
68
66
  /**
69
- * Classes for elements ({ container, toggle, content, contentInner })
67
+ * Classes for elements ({ container, trigger, content })
70
68
  * - Any valid class binding value per element
71
69
  */
72
70
  classes: {
73
71
  type: Object,
74
72
  default: () => ({
75
73
  container: 'ulu-collapsible',
76
- toggle: 'ulu-collapsible__toggle',
74
+ trigger: 'ulu-collapsible__trigger',
77
75
  content: 'ulu-collapsible__content',
78
- contentInner: 'ulu-collapsible__content-inner',
79
76
  containerOpen: 'ulu-collapsible--open',
80
77
  containerClosed: 'ulu-collapsible--closed'
81
78
  })
@@ -114,21 +111,9 @@
114
111
  }
115
112
  });
116
113
 
117
- const toggleId = ref(newId('ulu-collapsible-toggle'));
114
+ const triggerId = ref(newId('ulu-collapsible-trigger'));
118
115
  const contentId = ref(newId('ulu-collapsible-content'));
119
116
 
120
- const containerStateClasses = computed(() => {
121
- const c = props.classes;
122
- const stateClasses = {};
123
- if (c.containerOpen && isOpen.value) {
124
- stateClasses[c.containerOpen] = true;
125
- }
126
- if (c.containerClosed && !isOpen.value) {
127
- stateClasses[c.containerClosed] = true;
128
- }
129
- return stateClasses;
130
- });
131
-
132
117
  /**
133
118
  * Function used to toggle the collapsible
134
119
  */
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <component
3
- class="card"
4
- :is="resolvedElement"
3
+ :is="resolvedElement"
4
+ ref="cardRoot"
5
+ class="card"
5
6
  @mousedown="onMousedown"
6
7
  @mouseup="onMouseup"
7
8
  :class="[
@@ -21,6 +22,7 @@
21
22
  <div class="card__body">
22
23
  <div class="card__main">
23
24
  <component
25
+ v-if="title || $slots.title"
24
26
  :is="titleElement"
25
27
  class="card__title"
26
28
  :class="classes.title"
@@ -76,166 +78,179 @@
76
78
  </component>
77
79
  </template>
78
80
 
79
- <script>
81
+ <script setup>
82
+ import { ref, computed, useSlots } from 'vue';
80
83
  import { RouterLink } from "vue-router";
81
84
  import { useModifiers } from "../../composables/useModifiers.js";
82
- const titleLinkValidator = (_, props) => {
83
- const valid = !(props.to || props.href);
84
- if (!valid) {
85
- console.warn("'titleHref' and 'titleTo' can't be used with to or href (nesting links)");
86
- }
87
- return valid;
88
- };
89
- export default {
90
- name: "UluCard",
91
- props: {
92
- /**
93
- * Specify card element, unless to or href are used which will use 'a' or 'router-link'
94
- * - Other than changing to more appropriate element (ie 'li' if in list for example), this can
95
- * be used to set the card to a button to attach your own click handlers to
96
- */
97
- cardElement: {
98
- type: String,
99
- default: "article"
100
- },
101
- /**
102
- * Text for title if not using slot
103
- */
104
- title: String,
105
- /**
106
- * Element to use for title
107
- */
108
- titleElement: {
109
- type: String,
110
- default: "h3"
111
- },
112
- /**
113
- * Title will be router link
114
- */
115
- titleTo: {
116
- type: [String, Object],
117
- validator: titleLinkValidator
118
- },
119
- /**
120
- * Will make title a link to href
121
- */
122
- titleHref: {
123
- type: String,
124
- validator: titleLinkValidator
125
- },
126
- /**
127
- * When using href this will set title link's target attribute
128
- */
129
- titleTarget: String,
130
- /**
131
- * If set the entire card will be router link
132
- * - Do not us in combination with titleTo or titleHref
133
- */
134
- to: [String, Object],
135
- /**
136
- * If set the entire card will be a link to href
137
- * - Do not us in combination with titleTo or titleHref
138
- */
139
- href: {
140
- type: String,
141
-
142
- },
143
- /**
144
- * When using href this will set link's target attribute
145
- */
146
- target: String,
147
- /**
148
- * Classes with class bindings for different elements including ({ title, image })
149
- */
150
- classes: {
151
- type: Object,
152
- default: () => ({})
153
- },
154
- /**
155
- * Whether to proxy clicks of non-interactive elements (making whole card clickable)
156
- */
157
- proxyClick: Boolean,
158
- /**
159
- * Options to be merged for proxy click settings ({ preventSelector, preventSelectionDuration })
160
- */
161
- proxyClickOptions: {
162
- type: Object,
163
- default: () => ({})
164
- },
165
- /**
166
- * Source of image
167
- */
168
- imageSrc: String,
169
- /**
170
- * Alt text for image
171
- */
172
- imageAlt: String,
173
- /**
174
- * If true image will use icon modifier (displays for image adjusts for icon vs full image)
175
- */
176
- imageIcon: Boolean,
177
- /**
178
- * Horizontal card layout
179
- */
180
- horizontal: Boolean,
181
- /**
182
- * Horizontal centered card layout
183
- */
184
- horizontalCenter: Boolean,
185
- /**
186
- * Overlay card layout
187
- */
188
- overlay: Boolean,
189
- /**
190
- * Class modifiers (ie. 'transparent', 'secondary', etc)
191
- * - Can be String or Array of Strings
192
- */
193
- modifiers: [Array, String]
85
+
86
+ const props = defineProps({
87
+ /**
88
+ * Specify card element, unless to or href are used which will use 'a' or 'router-link'
89
+ * - Other than changing to more appropriate element (ie 'li' if in list for example), this can
90
+ * be used to set the card to a button to attach your own click handlers to
91
+ */
92
+ cardElement: {
93
+ type: String,
94
+ default: "article"
194
95
  },
195
- data() {
196
- const { proxyClickOptions, proxyClick, titleHref, titleTo } = this;
197
- return {
198
- proxyClickEnabled: (proxyClick && (titleHref || titleTo)) || null,
199
- resolvedProxyOptions: {
200
- selectorPrevent: "input, select, textarea, button, a, [tabindex='-1']",
201
- mousedownDurationPrevent: 250,
202
- ...proxyClickOptions
203
- },
204
- cursorStyle: null,
205
- proxyStart: null,
206
- shouldProxy: false
207
- }
96
+ /**
97
+ * Text for title if not using slot
98
+ */
99
+ title: String,
100
+ /**
101
+ * Element to use for title
102
+ */
103
+ titleElement: {
104
+ type: String,
105
+ default: "h3"
208
106
  },
209
- setup(props) {
210
- const { resolvedModifiers } = useModifiers({ props, baseClass: "card" });
211
- return { resolvedModifiers };
107
+ /**
108
+ * Title will be router link
109
+ */
110
+ titleTo: [String, Object],
111
+ /**
112
+ * Will make title a link to href
113
+ */
114
+ titleHref: String,
115
+ /**
116
+ * When using href this will set title link's target attribute
117
+ */
118
+ titleTarget: String,
119
+ /**
120
+ * If set the entire card will be router link
121
+ * - Do not us in combination with titleTo or titleHref
122
+ */
123
+ to: [String, Object],
124
+ /**
125
+ * If set the entire card will be a link to href
126
+ * - Do not us in combination with titleTo or titleHref
127
+ */
128
+ href: String,
129
+ /**
130
+ * When using href this will set link's target attribute
131
+ */
132
+ target: String,
133
+ /**
134
+ * Classes with class bindings for different elements including ({ title, image })
135
+ */
136
+ classes: {
137
+ type: Object,
138
+ default: () => ({})
212
139
  },
213
- computed: {
214
- resolvedElement() {
215
- const { cardElement, to, href } = this;
216
- return to ? RouterLink : href ? 'a' : cardElement;
217
- }
140
+ /**
141
+ * Whether to proxy clicks of non-interactive elements (making whole card clickable).
142
+ * This is for accessibility, allowing a non-link card to have a primary action.
143
+ * The proxy action is determined in the following order:
144
+ * 1. If the title has a link (`titleTo` or `titleHref`), it will proxy the click to the title's link.
145
+ * 2. If not, it will look for an element with the `data-ulu-card-proxy-target` attribute within the card's slots and click it.
146
+ * 3. If no proxy target is found, it will emit a `proxy-click` event.
147
+ * Note: This should not be used with the `to` or `href` props.
148
+ */
149
+ proxyClick: Boolean,
150
+ /**
151
+ * Options to be merged for proxy click settings ({ preventSelector, preventSelectionDuration })
152
+ */
153
+ proxyClickOptions: {
154
+ type: Object,
155
+ default: () => ({})
218
156
  },
219
- methods: {
220
- onMousedown({ target, timeStamp }) {
221
- if (!this.proxyClickEnabled) return;
222
- const { resolvedProxyOptions } = this;
223
- const { selectorPrevent } = resolvedProxyOptions;
224
- this.shouldProxy = false;
225
- if (!target.matches(selectorPrevent)) {
226
- this.shouldProxy = true;
227
- this.proxyStart = timeStamp;
228
- }
229
- },
230
- onMouseup({ timeStamp }) {
231
- if (!this.proxyClickEnabled) return;
232
- const { link } = this.$refs;
233
- const { resolvedProxyOptions } = this;
234
- const { mousedownDurationPrevent } = resolvedProxyOptions;
235
- if (this.shouldProxy && timeStamp - this.proxyStart < mousedownDurationPrevent) {
236
- link.click();
157
+ /**
158
+ * Source of image
159
+ */
160
+ imageSrc: String,
161
+ /**
162
+ * Alt text for image
163
+ */
164
+ imageAlt: String,
165
+ /**
166
+ * If true image will use icon modifier (displays for image adjusts for icon vs full image)
167
+ */
168
+ imageIcon: Boolean,
169
+ /**
170
+ * Horizontal card layout
171
+ */
172
+ horizontal: Boolean,
173
+ /**
174
+ * Horizontal centered card layout
175
+ */
176
+ horizontalCenter: Boolean,
177
+ /**
178
+ * Overlay card layout
179
+ */
180
+ overlay: Boolean,
181
+ /**
182
+ * Class modifiers (ie. 'transparent', 'secondary', etc)
183
+ * - Can be String or Array of Strings
184
+ */
185
+ modifiers: [Array, String]
186
+ });
187
+
188
+ const emit = defineEmits(['proxy-click']);
189
+ const $slots = useSlots();
190
+
191
+ // --- Validation warnings
192
+ if (props.proxyClick && (props.to || props.href)) {
193
+ console.warn("UluCard: 'proxyClick' is ignored when 'to' or 'href' are present.");
194
+ }
195
+ if ((props.titleTo || props.titleHref) && (props.to || props.href)) {
196
+ console.warn("UluCard: 'titleTo'/'titleHref' should not be used with 'to'/'href'.");
197
+ }
198
+
199
+ // --- Template refs
200
+ const cardRoot = ref(null);
201
+ const link = ref(null);
202
+
203
+ // --- Composables
204
+ const { resolvedModifiers } = useModifiers({ props, baseClass: "card" });
205
+
206
+ // --- State
207
+ const proxyStart = ref(null);
208
+ const shouldProxy = ref(false);
209
+
210
+ // --- Computed properties
211
+ const isClickable = computed(() => props.proxyClick && !props.to && !props.href);
212
+ const isTitleProxy = computed(() => isClickable.value && (props.titleTo || props.titleHref));
213
+ const isEventProxy = computed(() => isClickable.value && !isTitleProxy.value);
214
+ const proxyClickEnabled = computed(() => isClickable.value || null);
215
+
216
+ const resolvedProxyOptions = computed(() => ({
217
+ selectorPrevent: "input, select, textarea, button, a, [tabindex='-1']",
218
+ mousedownDurationPrevent: 250,
219
+ ...props.proxyClickOptions
220
+ }));
221
+
222
+ const cursorStyle = computed(() => isClickable.value ? 'pointer' : null);
223
+
224
+ const resolvedElement = computed(() => {
225
+ return props.to ? RouterLink : props.href ? 'a' : props.cardElement;
226
+ });
227
+
228
+ // --- Methods
229
+ function onMousedown({ target, timeStamp }) {
230
+ if (!proxyClickEnabled.value) return;
231
+ const { selectorPrevent } = resolvedProxyOptions.value;
232
+ shouldProxy.value = false;
233
+ if (!target.closest(selectorPrevent)) {
234
+ shouldProxy.value = true;
235
+ proxyStart.value = timeStamp;
236
+ }
237
+ }
238
+
239
+ function onMouseup({ timeStamp }) {
240
+ if (!proxyClickEnabled.value || !shouldProxy.value) return;
241
+ const { mousedownDurationPrevent } = resolvedProxyOptions.value;
242
+ if (timeStamp - proxyStart.value < mousedownDurationPrevent) {
243
+ if (isTitleProxy.value) {
244
+ link.value?.click();
245
+ } else if (isEventProxy.value) {
246
+ const proxyTarget = cardRoot.value?.querySelector('[data-ulu-card-proxy-target]');
247
+ if (proxyTarget) {
248
+ proxyTarget.click();
249
+ } else {
250
+ emit('proxy-click');
237
251
  }
238
- },
252
+ }
239
253
  }
240
- };
241
- </script>
254
+ shouldProxy.value = false;
255
+ }
256
+ </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <dl :class="classes.list">
2
+ <dl class="definition-list" :class="[resolvedModifiers, classes.list]">
3
3
  <div
4
4
  v-for="(item, index) in items"
5
5
  :key="index"
@@ -10,6 +10,7 @@
10
10
  {{ item.term }}
11
11
  </slot>
12
12
  </dt>
13
+
13
14
  <dd :class="classes.description">
14
15
  <slot name="description" :item="item" :index="index">
15
16
  {{ item.description }}
@@ -20,7 +21,10 @@
20
21
  </template>
21
22
 
22
23
  <script setup>
23
- defineProps({
24
+ import { computed } from 'vue';
25
+ import { useModifiers } from "../../composables/useModifiers.js";
26
+
27
+ const props = defineProps({
24
28
  /**
25
29
  * Array of term, and description (props in object)
26
30
  * - Can use slots also
@@ -32,6 +36,54 @@
32
36
  classes: {
33
37
  type: Object,
34
38
  default: () => ({})
35
- }
39
+ },
40
+ /**
41
+ * Class modifiers (ie. 'transparent', 'secondary', etc)
42
+ */
43
+ modifiers: [String, Array],
44
+ /**
45
+ * Displays only the definition descriptions on the same line.
46
+ */
47
+ inline: Boolean,
48
+ /**
49
+ * Displays both the definition term and its descriptions on the same line.
50
+ */
51
+ inlineAll: Boolean,
52
+ /**
53
+ * Displays the list in a two-column grid on larger screens.
54
+ */
55
+ table: Boolean,
56
+ /**
57
+ * Adds a rule between each item.
58
+ */
59
+ separated: Boolean,
60
+ /**
61
+ * Adds a rule to the top of the first item.
62
+ */
63
+ separatedFirst: Boolean,
64
+ /**
65
+ * Adds a rule to the bottom of the last item.
66
+ */
67
+ separatedLast: Boolean,
68
+ /**
69
+ * Reduces the margin between items.
70
+ */
71
+ compact: Boolean,
72
+ });
73
+
74
+ const internalModifiers = computed(() => ({
75
+ "inline" : props.inline,
76
+ "inline-all" : props.inlineAll,
77
+ "table" : props.table,
78
+ "separated" : props.separated,
79
+ "separated-first" : props.separatedFirst,
80
+ "separated-last" : props.separatedLast,
81
+ "compact" : props.compact,
82
+ }));
83
+
84
+ const { resolvedModifiers } = useModifiers({
85
+ props,
86
+ internal: internalModifiers,
87
+ baseClass: "definition-list"
36
88
  });
37
89
  </script>
@@ -1,7 +1,10 @@
1
1
  <template>
2
2
  <div
3
3
  class="menu-stack form-theme"
4
- :class="{ 'menu-stack--hide-inputs' : hideInputs }"
4
+ :class="{
5
+ 'menu-stack--hide-inputs' : hideInputs,
6
+ 'menu-stack--compact' : compact
7
+ }"
5
8
  :role="groupRole"
6
9
  :aria-labelledby="legendId"
7
10
  >
@@ -40,6 +43,10 @@ const props = defineProps({
40
43
  * An array of options for the menu.
41
44
  */
42
45
  options: Array,
46
+ /**
47
+ * Use compact modifier on menu stack
48
+ */
49
+ compact: Boolean,
43
50
  /**
44
51
  * The type of input to use ('checkbox' or 'radio').
45
52
  */
@@ -42,12 +42,14 @@ export { default as UluMenu } from './navigation/UluMenu.vue';
42
42
  export { default as UluMenuStack } from './navigation/UluMenuStack.vue';
43
43
  export { default as UluNavStrip } from './navigation/UluNavStrip.vue';
44
44
  export { default as UluSkipLink } from './navigation/UluSkipLink.vue';
45
- export { default as UluCondText } from './utils/UluCondText.vue';
45
+ export { default as UluConditionalText } from './utils/UluConditionalText.vue';
46
+ export { default as UluConditionalWrapper } from './utils/UluConditionalWrapper.vue';
46
47
  export { default as UluEmpty } from './utils/UluEmpty.vue';
47
48
  export { default as UluEmptyView } from './utils/UluEmptyView.vue';
48
49
  export { default as UluPlaceholderImage } from './utils/UluPlaceholderImage.vue';
49
50
  export { default as UluPlaceholderText } from './utils/UluPlaceholderText.vue';
50
51
  export { default as UluRouteAnnouncer } from './utils/UluRouteAnnouncer.vue';
52
+ export { default as UluSanityRichText } from './utils/UluSanityRichText.vue';
51
53
  export { default as UluAnimateNumber } from './visualizations/UluAnimateNumber.vue';
52
54
  export { default as UluProgressBar } from './visualizations/UluProgressBar.vue';
53
55
  export { default as UluProgressCircle } from './visualizations/UluProgressCircle.vue';
@@ -17,13 +17,15 @@
17
17
  <component
18
18
  :is="item.to || item.path ? 'router-link' : item.click ? 'button' : 'a'"
19
19
  v-bind="{
20
- ...(item.to || item.path ? { to: item.to || item.path } : {}),
20
+ ...(item.to || item.path ? {
21
+ to: item.to || item.path,
22
+ activeClass: classes.linkActive || null,
23
+ exactActiveClass: classes.linkExactActive || null
24
+ } : {}),
21
25
  ...(item.href ? { 'href' : item.href || '#' } : {}),
22
26
  }"
23
27
  @click="(event) => { handleItemClick(event, item) }"
24
28
  :class="[classes.link, item?.classes?.link]"
25
- :activeClass="classes.linkActive"
26
- :exactActiveClass="classes.linkExactActive"
27
29
  :aria-label="iconOnly ? item.title : null"
28
30
  :id="item.id"
29
31
  v-ulu-tooltip="iconOnly ? item.title : item.tooltip || null"