@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.
- package/dist/{breakpoints-DfGETUy5.js → breakpoints-BK5cY325.js} +1 -1
- package/dist/frontend-vue.css +1 -1
- package/dist/frontend-vue.js +78 -74
- package/dist/{index-94HkwBnP.js → index-CzaotMwA.js} +2457 -2061
- package/lib/components/collapsible/UluAccordion.vue +9 -9
- package/lib/components/collapsible/UluCollapsible.vue +9 -24
- package/lib/components/elements/UluCard.vue +172 -157
- package/lib/components/elements/UluDefinitionList.vue +55 -3
- package/lib/components/forms/UluSelectableMenu.vue +8 -1
- package/lib/components/index.js +3 -1
- package/lib/components/navigation/UluMenu.vue +5 -3
- package/lib/components/navigation/UluMenuStack.vue +47 -30
- package/lib/components/systems/facets/UluFacetsActiveFilters.vue +104 -0
- package/lib/components/systems/facets/UluFacetsFilterAccordions.vue +94 -0
- package/lib/components/systems/facets/UluFacetsFilterLists.vue +15 -11
- package/lib/components/systems/facets/UluFacetsList.vue +3 -1
- package/lib/components/systems/facets/UluFacetsSearch.vue +1 -1
- package/lib/components/systems/facets/UluFacetsSidebarLayout.vue +32 -12
- package/lib/components/systems/facets/useFacets.js +166 -40
- package/lib/components/systems/index.js +2 -0
- package/lib/components/systems/slider/UluSlideShow.vue +2 -2
- package/lib/components/utils/{UluCondText.vue → UluConditionalText.vue} +1 -1
- package/lib/components/utils/UluConditionalWrapper.vue +29 -0
- package/lib/components/utils/UluRouteAnnouncer.vue +1 -1
- package/lib/components/utils/UluSanityRichText.vue +41 -0
- package/lib/components/visualizations/UluProgressCircle.vue +1 -1
- package/lib/plugins/core/index.js +3 -2
- package/lib/plugins/popovers/UluPopover.vue +1 -1
- package/package.json +13 -8
- package/types/components/collapsible/UluAccordion.vue.d.ts +41 -0
- package/types/components/collapsible/UluAccordion.vue.d.ts.map +1 -0
- package/types/components/collapsible/UluAccordionGroup.vue.d.ts +19 -0
- package/types/components/collapsible/UluAccordionGroup.vue.d.ts.map +1 -0
- package/types/components/collapsible/UluCollapsible.vue.d.ts +39 -0
- package/types/components/collapsible/UluCollapsible.vue.d.ts.map +1 -0
- package/types/components/collapsible/UluDropdown.vue.d.ts +22 -0
- package/types/components/collapsible/UluDropdown.vue.d.ts.map +1 -0
- package/types/components/collapsible/UluModal.vue.d.ts +253 -0
- package/types/components/collapsible/UluModal.vue.d.ts.map +1 -0
- package/types/components/collapsible/UluOverflowPopover.vue.d.ts +18 -0
- package/types/components/collapsible/UluOverflowPopover.vue.d.ts.map +1 -0
- package/types/components/collapsible/UluTab.vue.d.ts +10 -0
- package/types/components/collapsible/UluTab.vue.d.ts.map +1 -0
- package/types/components/collapsible/UluTabGroup.vue.d.ts +18 -0
- package/types/components/collapsible/UluTabGroup.vue.d.ts.map +1 -0
- package/types/components/collapsible/UluTabList.vue.d.ts +10 -0
- package/types/components/collapsible/UluTabList.vue.d.ts.map +1 -0
- package/types/components/collapsible/UluTabPanel.vue.d.ts +10 -0
- package/types/components/collapsible/UluTabPanel.vue.d.ts.map +1 -0
- package/types/components/collapsible/UluTabPanels.vue.d.ts +10 -0
- package/types/components/collapsible/UluTabPanels.vue.d.ts.map +1 -0
- package/types/components/elements/UluAlert.vue.d.ts +147 -0
- package/types/components/elements/UluAlert.vue.d.ts.map +1 -0
- package/types/components/elements/UluBadge.vue.d.ts +30 -0
- package/types/components/elements/UluBadge.vue.d.ts.map +1 -0
- package/types/components/elements/UluBadgeStack.vue.d.ts +9 -0
- package/types/components/elements/UluBadgeStack.vue.d.ts.map +1 -0
- package/types/components/elements/UluButton.vue.d.ts +186 -0
- package/types/components/elements/UluButton.vue.d.ts.map +1 -0
- package/types/components/elements/UluButtonVerbose.vue.d.ts +126 -0
- package/types/components/elements/UluButtonVerbose.vue.d.ts.map +1 -0
- package/types/components/elements/UluCallout.vue.d.ts +27 -0
- package/types/components/elements/UluCallout.vue.d.ts.map +1 -0
- package/types/components/elements/UluCard.vue.d.ts +66 -0
- package/types/components/elements/UluCard.vue.d.ts.map +1 -0
- package/types/components/elements/UluDefinitionList.vue.d.ts +42 -0
- package/types/components/elements/UluDefinitionList.vue.d.ts.map +1 -0
- package/types/components/elements/UluExternalLink.vue.d.ts +25 -0
- package/types/components/elements/UluExternalLink.vue.d.ts.map +1 -0
- package/types/components/elements/UluIcon.vue.d.ts +11 -0
- package/types/components/elements/UluIcon.vue.d.ts.map +1 -0
- package/types/components/elements/UluList.vue.d.ts +37 -0
- package/types/components/elements/UluList.vue.d.ts.map +1 -0
- package/types/components/elements/UluMain.vue.d.ts +13 -0
- package/types/components/elements/UluMain.vue.d.ts.map +1 -0
- package/types/components/elements/UluSpokeSpinner.vue.d.ts +9 -0
- package/types/components/elements/UluSpokeSpinner.vue.d.ts.map +1 -0
- package/types/components/elements/UluTag.vue.d.ts +26 -0
- package/types/components/elements/UluTag.vue.d.ts.map +1 -0
- package/types/components/forms/UluFileDisplay.vue.d.ts +23 -0
- package/types/components/forms/UluFileDisplay.vue.d.ts.map +1 -0
- package/types/components/forms/UluFormFile.vue.d.ts +26 -0
- package/types/components/forms/UluFormFile.vue.d.ts.map +1 -0
- package/types/components/forms/UluFormMessage.vue.d.ts +18 -0
- package/types/components/forms/UluFormMessage.vue.d.ts.map +1 -0
- package/types/components/forms/UluFormSelect.vue.d.ts +24 -0
- package/types/components/forms/UluFormSelect.vue.d.ts.map +1 -0
- package/types/components/forms/UluFormText.vue.d.ts +22 -0
- package/types/components/forms/UluFormText.vue.d.ts.map +1 -0
- package/types/components/forms/UluSearchForm.vue.d.ts +9 -0
- package/types/components/forms/UluSearchForm.vue.d.ts.map +1 -0
- package/types/components/forms/UluSelectableMenu.vue.d.ts +30 -0
- package/types/components/forms/UluSelectableMenu.vue.d.ts.map +1 -0
- package/types/components/index.d.ts +50 -0
- package/types/components/layout/UluAdaptiveLayout.vue.d.ts +12 -0
- package/types/components/layout/UluAdaptiveLayout.vue.d.ts.map +1 -0
- package/types/components/layout/UluDataGrid.vue.d.ts +3 -0
- package/types/components/layout/UluDataGrid.vue.d.ts.map +1 -0
- package/types/components/layout/UluTitleRail.vue.d.ts +91 -0
- package/types/components/layout/UluTitleRail.vue.d.ts.map +1 -0
- package/types/components/layout/UluWhenBreakpoint.vue.d.ts +20 -0
- package/types/components/layout/UluWhenBreakpoint.vue.d.ts.map +1 -0
- package/types/components/navigation/UluBreadcrumb.vue.d.ts +71 -0
- package/types/components/navigation/UluBreadcrumb.vue.d.ts.map +1 -0
- package/types/components/navigation/UluMenu.vue.d.ts +142 -0
- package/types/components/navigation/UluMenu.vue.d.ts.map +1 -0
- package/types/components/navigation/UluMenuStack.vue.d.ts +19 -0
- package/types/components/navigation/UluMenuStack.vue.d.ts.map +1 -0
- package/types/components/navigation/UluNavStrip.vue.d.ts +138 -0
- package/types/components/navigation/UluNavStrip.vue.d.ts.map +1 -0
- package/types/components/navigation/UluPager.vue.d.ts +15 -0
- package/types/components/navigation/UluPager.vue.d.ts.map +1 -0
- package/types/components/navigation/UluSkipLink.vue.d.ts +3 -0
- package/types/components/navigation/UluSkipLink.vue.d.ts.map +1 -0
- package/types/components/systems/facets/ExampleFacetsWithPagination.vue.d.ts +3 -0
- package/types/components/systems/facets/ExampleFacetsWithPagination.vue.d.ts.map +1 -0
- package/types/components/systems/facets/UluFacetsActiveFilters.vue.d.ts +24 -0
- package/types/components/systems/facets/UluFacetsActiveFilters.vue.d.ts.map +1 -0
- package/types/components/systems/facets/UluFacetsFilterAccordions.vue.d.ts +29 -0
- package/types/components/systems/facets/UluFacetsFilterAccordions.vue.d.ts.map +1 -0
- package/types/components/systems/facets/UluFacetsFilterLists.vue.d.ts +27 -0
- package/types/components/systems/facets/UluFacetsFilterLists.vue.d.ts.map +1 -0
- package/types/components/systems/facets/UluFacetsFilterPopovers.vue.d.ts +25 -0
- package/types/components/systems/facets/UluFacetsFilterPopovers.vue.d.ts.map +1 -0
- package/types/components/systems/facets/UluFacetsFilterSelects.vue.d.ts +11 -0
- package/types/components/systems/facets/UluFacetsFilterSelects.vue.d.ts.map +1 -0
- package/types/components/systems/facets/UluFacetsHeaderLayout.vue.d.ts +12 -0
- package/types/components/systems/facets/UluFacetsHeaderLayout.vue.d.ts.map +1 -0
- package/types/components/systems/facets/UluFacetsList.vue.d.ts +21 -0
- package/types/components/systems/facets/UluFacetsList.vue.d.ts.map +1 -0
- package/types/components/systems/facets/UluFacetsResults.vue.d.ts +27 -0
- package/types/components/systems/facets/UluFacetsResults.vue.d.ts.map +1 -0
- package/types/components/systems/facets/UluFacetsSearch.vue.d.ts +15 -0
- package/types/components/systems/facets/UluFacetsSearch.vue.d.ts.map +1 -0
- package/types/components/systems/facets/UluFacetsSidebarLayout.vue.d.ts +22 -0
- package/types/components/systems/facets/UluFacetsSidebarLayout.vue.d.ts.map +1 -0
- package/types/components/systems/facets/UluFacetsSort.vue.d.ts +22 -0
- package/types/components/systems/facets/UluFacetsSort.vue.d.ts.map +1 -0
- package/types/components/systems/facets/useFacets.d.ts +30 -12
- package/types/components/systems/facets/useFacets.d.ts.map +1 -1
- package/types/components/systems/index.d.ts +25 -0
- package/types/components/systems/scroll-anchors/UluScrollAnchors.vue.d.ts +60 -0
- package/types/components/systems/scroll-anchors/UluScrollAnchors.vue.d.ts.map +1 -0
- package/types/components/systems/scroll-anchors/UluScrollAnchorsNav.vue.d.ts +15 -0
- package/types/components/systems/scroll-anchors/UluScrollAnchorsNav.vue.d.ts.map +1 -0
- package/types/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue.d.ts +32 -0
- package/types/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue.d.ts.map +1 -0
- package/types/components/systems/scroll-anchors/UluScrollAnchorsSection.vue.d.ts +50 -0
- package/types/components/systems/scroll-anchors/UluScrollAnchorsSection.vue.d.ts.map +1 -0
- package/types/components/systems/scroll-anchors/symbols.d.ts +3 -3
- package/types/components/systems/scroll-anchors/symbols.d.ts.map +1 -1
- package/types/components/systems/skeleton/UluShowSkeleton.vue.d.ts +16 -0
- package/types/components/systems/skeleton/UluShowSkeleton.vue.d.ts.map +1 -0
- package/types/components/systems/skeleton/UluSkeletonContent.vue.d.ts +9 -0
- package/types/components/systems/skeleton/UluSkeletonContent.vue.d.ts.map +1 -0
- package/types/components/systems/skeleton/UluSkeletonMedia.vue.d.ts +3 -0
- package/types/components/systems/skeleton/UluSkeletonMedia.vue.d.ts.map +1 -0
- package/types/components/systems/skeleton/UluSkeletonText.vue.d.ts +13 -0
- package/types/components/systems/skeleton/UluSkeletonText.vue.d.ts.map +1 -0
- package/types/components/systems/slider/UluImageSlideShow.vue.d.ts +130 -0
- package/types/components/systems/slider/UluImageSlideShow.vue.d.ts.map +1 -0
- package/types/components/systems/slider/UluSlideShow.vue.d.ts +205 -0
- package/types/components/systems/slider/UluSlideShow.vue.d.ts.map +1 -0
- package/types/components/systems/slider/UluSlideShowSlide.vue.d.ts +17 -0
- package/types/components/systems/slider/UluSlideShowSlide.vue.d.ts.map +1 -0
- package/types/components/systems/table-sticky/UluTableSticky.vue.d.ts +455 -0
- package/types/components/systems/table-sticky/UluTableSticky.vue.d.ts.map +1 -0
- package/types/components/systems/table-sticky/UluTableStickyRows.vue.d.ts +34 -0
- package/types/components/systems/table-sticky/UluTableStickyRows.vue.d.ts.map +1 -0
- package/types/components/systems/table-sticky/UluTableStickyTable.vue.d.ts +151 -0
- package/types/components/systems/table-sticky/UluTableStickyTable.vue.d.ts.map +1 -0
- package/types/components/utils/UluCondText.vue.d.ts +29 -0
- package/types/components/utils/UluCondText.vue.d.ts.map +1 -0
- package/types/components/utils/UluConditionalText.vue.d.ts +29 -0
- package/types/components/utils/UluConditionalText.vue.d.ts.map +1 -0
- package/types/components/utils/UluConditionalWrapper.vue.d.ts +20 -0
- package/types/components/utils/UluConditionalWrapper.vue.d.ts.map +1 -0
- package/types/components/utils/UluEmpty.vue.d.ts +3 -0
- package/types/components/utils/UluEmpty.vue.d.ts.map +1 -0
- package/types/components/utils/UluEmptyView.vue.d.ts +3 -0
- package/types/components/utils/UluEmptyView.vue.d.ts.map +1 -0
- package/types/components/utils/UluPlaceholderImage.vue.d.ts +61 -0
- package/types/components/utils/UluPlaceholderImage.vue.d.ts.map +1 -0
- package/types/components/utils/UluPlaceholderText.vue.d.ts +24 -0
- package/types/components/utils/UluPlaceholderText.vue.d.ts.map +1 -0
- package/types/components/utils/UluRouteAnnouncer.vue.d.ts +63 -0
- package/types/components/utils/UluRouteAnnouncer.vue.d.ts.map +1 -0
- package/types/components/utils/UluSanityRichText.vue.d.ts +15 -0
- package/types/components/utils/UluSanityRichText.vue.d.ts.map +1 -0
- package/types/components/visualizations/UluAnimateNumber.vue.d.ts +16 -0
- package/types/components/visualizations/UluAnimateNumber.vue.d.ts.map +1 -0
- package/types/components/visualizations/UluProgressBar.vue.d.ts +66 -0
- package/types/components/visualizations/UluProgressBar.vue.d.ts.map +1 -0
- package/types/components/visualizations/UluProgressCircle.vue.d.ts +48 -0
- package/types/components/visualizations/UluProgressCircle.vue.d.ts.map +1 -0
- package/types/composables/useBreakpointManager.d.ts +1 -1
- package/types/composables/useBreakpointManager.d.ts.map +1 -1
- package/types/composables/useDocumentTitle.d.ts +4 -4
- package/types/composables/useDocumentTitle.d.ts.map +1 -1
- package/types/composables/useIcon.d.ts +1 -1
- package/types/composables/useIcon.d.ts.map +1 -1
- package/types/composables/useModifiers.d.ts +1 -1
- package/types/composables/useModifiers.d.ts.map +1 -1
- package/types/composables/useWindowResize.d.ts +1 -1
- package/types/composables/useWindowResize.d.ts.map +1 -1
- package/types/plugins/core/index.d.ts.map +1 -1
- package/types/plugins/modals/UluModalsDisplay.vue.d.ts +14 -0
- package/types/plugins/modals/UluModalsDisplay.vue.d.ts.map +1 -0
- package/types/plugins/modals/api.d.ts +7 -4
- package/types/plugins/modals/api.d.ts.map +1 -1
- package/types/plugins/popovers/UluPopover.vue.d.ts +53 -0
- package/types/plugins/popovers/UluPopover.vue.d.ts.map +1 -0
- package/types/plugins/popovers/UluTooltipDisplay.vue.d.ts +3 -0
- package/types/plugins/popovers/UluTooltipDisplay.vue.d.ts.map +1 -0
- package/types/plugins/popovers/UluTooltipPopover.vue.d.ts +3 -0
- package/types/plugins/popovers/UluTooltipPopover.vue.d.ts.map +1 -0
- package/types/plugins/popovers/defaults.d.ts +2 -2
- package/types/plugins/popovers/defaults.d.ts.map +1 -1
- package/types/plugins/popovers/manager.d.ts +50 -6
- package/types/plugins/popovers/manager.d.ts.map +1 -1
- package/types/plugins/popovers/useFollow.d.ts +4 -4
- package/types/plugins/popovers/useFollow.d.ts.map +1 -1
- package/types/plugins/toast/UluToast.vue.d.ts +52 -0
- package/types/plugins/toast/UluToast.vue.d.ts.map +1 -0
- package/types/plugins/toast/UluToastDisplay.vue.d.ts +13 -0
- package/types/plugins/toast/UluToastDisplay.vue.d.ts.map +1 -0
- package/types/plugins/toast/defaults.d.ts +39 -2
- package/types/plugins/toast/store.d.ts +65 -2
- package/types/plugins/toast/store.d.ts.map +1 -1
- package/types/utils/dom.d.ts +1 -1
- package/types/utils/dom.d.ts.map +1 -1
- package/types/utils/router.d.ts +15 -15
- 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
|
|
11
|
-
<slot name="trigger" :
|
|
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" :
|
|
16
|
+
<slot name="icon" :isOpen="isOpen">
|
|
17
17
|
<span class="accordion__icon" :class="classes.icon">
|
|
18
18
|
<UluIcon
|
|
19
|
-
:icon="
|
|
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
|
|
27
|
-
<slot :
|
|
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:
|
|
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 (
|
|
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
|
-
|
|
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,
|
|
5
|
+
:class="[classes.container, isOpen ? classes.containerOpen : classes.containerClosed]"
|
|
6
6
|
>
|
|
7
7
|
<button
|
|
8
|
-
:class="classes.
|
|
9
|
-
:id="
|
|
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"
|
|
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="
|
|
24
|
+
:aria-labelledby="triggerId"
|
|
25
25
|
>
|
|
26
|
-
<
|
|
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,
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
4
|
-
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
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
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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="{
|
|
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
|
*/
|
package/lib/components/index.js
CHANGED
|
@@ -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
|
|
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 ? {
|
|
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"
|