@ulu/frontend-vue 0.1.1-beta.1 → 0.1.1-beta.10
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-DM-CBTtb.js → breakpoints-BYSYcx8V.js} +1 -1
- package/dist/frontend-vue.css +1 -1
- package/dist/frontend-vue.js +65 -64
- package/dist/{index-BNRZ3Apw.js → index-A7weElM_.js} +1940 -1715
- package/lib/components/forms/UluSelectableMenu.vue +8 -1
- package/lib/components/navigation/UluMenu.vue +5 -3
- package/lib/components/navigation/UluMenuStack.vue +47 -30
- package/lib/components/systems/facets/UluFacetsActiveFilters.vue +84 -0
- package/lib/components/systems/facets/UluFacetsFilterLists.vue +7 -1
- package/lib/components/systems/facets/UluFacetsList.vue +2 -0
- package/lib/components/systems/facets/UluFacetsSidebarLayout.vue +32 -12
- package/lib/components/systems/facets/useFacets.js +166 -40
- package/lib/components/systems/index.js +1 -0
- package/lib/components/systems/slider/UluSlideShow.vue +2 -2
- package/lib/components/visualizations/UluProgressBar.vue +57 -14
- package/lib/components/visualizations/UluProgressCircle.vue +124 -111
- package/lib/plugins/core/index.js +2 -2
- package/package.json +12 -8
- package/types/components/collapsible/UluAccordion.vue.d.ts +42 -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 +40 -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 +238 -0
- package/types/components/elements/UluCard.vue.d.ts.map +1 -0
- package/types/components/elements/UluDefinitionList.vue.d.ts +26 -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 +48 -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 +18 -0
- package/types/components/systems/facets/UluFacetsActiveFilters.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 +24 -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/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/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/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 +54 -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
- package/lib/components/visualizations/progress-bar-examples.html +0 -175
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="componentClasses">
|
|
3
|
-
<div
|
|
4
|
-
|
|
3
|
+
<div
|
|
4
|
+
v-if="label || $slots.label || $slots.icon || amountInHeader"
|
|
5
|
+
class="progress-bar__header"
|
|
6
|
+
>
|
|
7
|
+
<component
|
|
5
8
|
v-if="label"
|
|
9
|
+
:is="labelElement"
|
|
6
10
|
class="progress-bar__label"
|
|
7
|
-
:class="{ 'hidden-visually': labelHidden }"
|
|
11
|
+
:class="[classes.label, { 'hidden-visually': labelHidden }]"
|
|
8
12
|
>
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
<slot name="label">
|
|
14
|
+
{{ label }}
|
|
15
|
+
</slot>
|
|
16
|
+
</component>
|
|
17
|
+
<div
|
|
18
|
+
v-if="amountInHeader"
|
|
19
|
+
class="progress-bar__value progress-bar__value--amount"
|
|
20
|
+
>
|
|
21
|
+
<strong class="hidden-visually">Amount:</strong>
|
|
22
|
+
<slot name="valueAmount" :value="amount">{{ formatValue(amount, 'amount') }}</slot>
|
|
23
|
+
</div>
|
|
11
24
|
<div v-if="$slots.icon" class="progress-bar__icon">
|
|
12
25
|
<slot name="icon" />
|
|
13
26
|
</div>
|
|
@@ -20,21 +33,21 @@
|
|
|
20
33
|
:style="{ width: deficitBarWidth }"
|
|
21
34
|
></div>
|
|
22
35
|
</div>
|
|
23
|
-
<div
|
|
36
|
+
<div
|
|
37
|
+
v-if="!noValues && !amountInHeader && (!loader && !indeterminate)"
|
|
38
|
+
class="progress-bar__values"
|
|
39
|
+
>
|
|
24
40
|
<div class="progress-bar__value progress-bar__value--amount">
|
|
25
41
|
<strong class="hidden-visually">Amount:</strong>
|
|
26
|
-
{{ amount }}
|
|
42
|
+
<slot name="valueAmount" :value="amount">{{ formatValue(amount, 'amount') }}</slot>
|
|
27
43
|
</div>
|
|
28
|
-
<div
|
|
29
|
-
v-if="deficit > 0"
|
|
30
|
-
class="progress-bar__value progress-bar__value--deficit"
|
|
31
|
-
>
|
|
44
|
+
<div v-if="deficit > 0" class="progress-bar__value progress-bar__value--deficit">
|
|
32
45
|
<strong class="hidden-visually">Deficit: </strong>
|
|
33
|
-
|
|
46
|
+
<slot name="valueDeficit" :value="deficit">-{{ formatValue(deficit, 'deficit') }}</slot>
|
|
34
47
|
</div>
|
|
35
48
|
<div class="progress-bar__value progress-bar__value--total">
|
|
36
49
|
<strong class="hidden-visually">Total:</strong>
|
|
37
|
-
{{ total }}
|
|
50
|
+
<slot name="valueTotal" :value="total">{{ formatValue(total, 'total') }}</slot>
|
|
38
51
|
</div>
|
|
39
52
|
</div>
|
|
40
53
|
</div>
|
|
@@ -49,13 +62,27 @@ import { computed } from "vue";
|
|
|
49
62
|
*/
|
|
50
63
|
const props = defineProps({
|
|
51
64
|
/**
|
|
52
|
-
* The label to display above the progress bar.
|
|
65
|
+
* The label to display above the progress bar. (or use label slot)
|
|
53
66
|
*/
|
|
54
67
|
label: String,
|
|
55
68
|
/**
|
|
56
69
|
* Hides the label visually, but keeps it for screen readers.
|
|
57
70
|
*/
|
|
58
71
|
labelHidden: Boolean,
|
|
72
|
+
/**
|
|
73
|
+
* Optional classes object (currently only allowing { label } class)
|
|
74
|
+
*/
|
|
75
|
+
classes: {
|
|
76
|
+
type: Object,
|
|
77
|
+
default: () => ({})
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* Element to use for label
|
|
81
|
+
*/
|
|
82
|
+
labelElement: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: "strong"
|
|
85
|
+
},
|
|
59
86
|
/**
|
|
60
87
|
* The current amount of progress.
|
|
61
88
|
*/
|
|
@@ -97,6 +124,22 @@ const props = defineProps({
|
|
|
97
124
|
* Applies an indeterminate animation for unknown progress.
|
|
98
125
|
*/
|
|
99
126
|
indeterminate: Boolean,
|
|
127
|
+
/**
|
|
128
|
+
* Omit values from output (the numbers below the progress bar)
|
|
129
|
+
*/
|
|
130
|
+
noValues: Boolean,
|
|
131
|
+
/**
|
|
132
|
+
* A function to format the numerical values (amount, deficit, total).
|
|
133
|
+
* Takes the value and type ('amount', 'deficit', 'total') as input and should return a string.
|
|
134
|
+
*/
|
|
135
|
+
formatValue: {
|
|
136
|
+
type: Function,
|
|
137
|
+
default: (value, type) => value,
|
|
138
|
+
},
|
|
139
|
+
/**
|
|
140
|
+
* Will put the amount only in header (there is a headerValue slot it you want to format)
|
|
141
|
+
*/
|
|
142
|
+
amountInHeader: Boolean
|
|
100
143
|
});
|
|
101
144
|
|
|
102
145
|
const getCssPercentage = (amount, total) => {
|
|
@@ -23,124 +23,137 @@
|
|
|
23
23
|
cy="16"
|
|
24
24
|
/>
|
|
25
25
|
</svg>
|
|
26
|
-
<strong v-if="!showValueOutside" class="progress-circle__chart-value">
|
|
27
|
-
{{ percentage }}
|
|
26
|
+
<strong v-if="!showValueOutside && !noValue" class="progress-circle__chart-value">
|
|
27
|
+
<slot name="value" :value="percentage">{{ formatValue(percentage) }}</slot>
|
|
28
28
|
</strong>
|
|
29
29
|
</div>
|
|
30
|
-
<strong v-if="showValueOutside" class="progress-circle__value type-small-x">
|
|
31
|
-
{{ percentage }}
|
|
30
|
+
<strong v-if="showValueOutside && !noValue" class="progress-circle__value type-small-x">
|
|
31
|
+
<slot name="value" :value="percentage">{{ formatValue(percentage) }}</slot>
|
|
32
32
|
</strong>
|
|
33
33
|
</div>
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
|
-
<script>
|
|
36
|
+
<script setup>
|
|
37
|
+
import { ref, computed, watch, onMounted } from 'vue';
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A circular progress indicator component.
|
|
41
|
+
* @slot value - The value display. Overrides the `formatValue` prop.
|
|
42
|
+
*/
|
|
43
|
+
const props = defineProps({
|
|
44
|
+
/**
|
|
45
|
+
* The label for accessibility (visually hidden).
|
|
46
|
+
*/
|
|
47
|
+
label: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: "Progress"
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* The progress percentage (0-100).
|
|
53
|
+
*/
|
|
54
|
+
percentage: {
|
|
55
|
+
type: Number,
|
|
56
|
+
default: 0
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* A function to format the percentage value.
|
|
60
|
+
* Takes the number as input and should return a string.
|
|
61
|
+
*/
|
|
62
|
+
formatValue: {
|
|
63
|
+
type: Function,
|
|
64
|
+
default: (value) => `${ value }%`,
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* Hides the percentage value display.
|
|
68
|
+
*/
|
|
69
|
+
noValue: Boolean,
|
|
70
|
+
/**
|
|
71
|
+
* Renders a smaller version of the component.
|
|
72
|
+
*/
|
|
73
|
+
small: Boolean,
|
|
74
|
+
/**
|
|
75
|
+
* Displays the percentage value outside (to the side) of the circle.
|
|
76
|
+
*/
|
|
77
|
+
outside: Boolean,
|
|
78
|
+
/**
|
|
79
|
+
* Displays the percentage value below the circle.
|
|
80
|
+
*/
|
|
81
|
+
outsideBelow: Boolean,
|
|
82
|
+
/**
|
|
83
|
+
* Sets the status color of the progress circle (e.g., 'low', 'incomplete', 'complete').
|
|
84
|
+
*/
|
|
85
|
+
status: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: ''
|
|
88
|
+
},
|
|
37
89
|
/**
|
|
38
|
-
*
|
|
90
|
+
* Renders the component as a solid pie chart instead of a donut.
|
|
39
91
|
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
// Need to reanimate if value changes
|
|
101
|
-
percentage(newVal, oldVal) {
|
|
102
|
-
if (newVal !== oldVal) {
|
|
103
|
-
this.animate(this.normalize(oldVal));
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
computed: {
|
|
108
|
-
endDasharray() {
|
|
109
|
-
return `${ this.normalize(this.percentage) } 100`;
|
|
110
|
-
},
|
|
111
|
-
showValueOutside() {
|
|
112
|
-
return this.outside || this.outsideBelow || this.small;
|
|
113
|
-
},
|
|
114
|
-
componentClasses() {
|
|
115
|
-
const classes = {
|
|
116
|
-
'progress-circle': true,
|
|
117
|
-
'progress-circle--small': this.small,
|
|
118
|
-
'progress-circle--pie': this.pieStyle,
|
|
119
|
-
'progress-circle--outside': this.showValueOutside,
|
|
120
|
-
'progress-circle--outside-below': this.outsideBelow,
|
|
121
|
-
'progress-circle--no-mask': this.noMask,
|
|
122
|
-
};
|
|
123
|
-
if (this.status) {
|
|
124
|
-
classes[`progress-circle--${this.status}`] = true;
|
|
125
|
-
}
|
|
126
|
-
return classes;
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
methods: {
|
|
130
|
-
normalize(percentage) {
|
|
131
|
-
// Added the 1% extra to 100% because sometimes it renders with a tiny gap
|
|
132
|
-
return percentage === 100 ? 101 : percentage;
|
|
133
|
-
},
|
|
134
|
-
animate(from = 0) {
|
|
135
|
-
const { pie } = this.$refs;
|
|
136
|
-
if (!pie || !pie.animate) return; // No Animation API or element not ready
|
|
137
|
-
const { duration, easing, endDasharray } = this;
|
|
138
|
-
const keyframes = { strokeDasharray: [`${ from } 100`, endDasharray] };
|
|
139
|
-
pie.animate(keyframes, { duration, easing, fill: "forwards" });
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
mounted() {
|
|
143
|
-
this.animate();
|
|
144
|
-
}
|
|
92
|
+
pieStyle: Boolean,
|
|
93
|
+
/**
|
|
94
|
+
* Removes the center mask, filling the entire circle.
|
|
95
|
+
*/
|
|
96
|
+
noMask: Boolean,
|
|
97
|
+
/**
|
|
98
|
+
* The duration of the animation in milliseconds.
|
|
99
|
+
*/
|
|
100
|
+
duration: {
|
|
101
|
+
type: Number,
|
|
102
|
+
default: 1000 // Matches SCSS animation-duration
|
|
103
|
+
},
|
|
104
|
+
/**
|
|
105
|
+
* The easing function for the animation.
|
|
106
|
+
*/
|
|
107
|
+
easing: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: "ease-in" // Matches SCSS animation-timing
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
const pie = ref(null);
|
|
114
|
+
|
|
115
|
+
const normalize = (percentage) => {
|
|
116
|
+
// Added the 1% extra to 100% because sometimes it renders with a tiny gap
|
|
117
|
+
return percentage === 100 ? 101 : percentage;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const animate = (from = 0) => {
|
|
121
|
+
if (!pie.value || !pie.value.animate) return; // No Animation API or element not ready
|
|
122
|
+
|
|
123
|
+
const keyframes = { strokeDasharray: [`${from} 100`, endDasharray.value] };
|
|
124
|
+
pie.value.animate(keyframes, { duration: props.duration, easing: props.easing, fill: "forwards" });
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
watch(() => props.percentage, (newVal, oldVal) => {
|
|
128
|
+
if (newVal !== oldVal) {
|
|
129
|
+
animate(normalize(oldVal));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
const endDasharray = computed(() => {
|
|
134
|
+
return `${normalize(props.percentage)} 100`;
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
const showValueOutside = computed(() => {
|
|
138
|
+
return props.outside || props.outsideBelow || props.small;
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
const componentClasses = computed(() => {
|
|
142
|
+
const classes = {
|
|
143
|
+
'progress-circle': true,
|
|
144
|
+
'progress-circle--small': props.small,
|
|
145
|
+
'progress-circle--pie': props.pieStyle,
|
|
146
|
+
'progress-circle--outside': showValueOutside.value,
|
|
147
|
+
'progress-circle--outside-below': props.outsideBelow,
|
|
148
|
+
'progress-circle--no-mask': props.noMask,
|
|
149
|
+
};
|
|
150
|
+
if (props.status) {
|
|
151
|
+
classes[`progress-circle--${props.status}`] = true;
|
|
145
152
|
}
|
|
153
|
+
return classes;
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
onMounted(() => {
|
|
157
|
+
animate();
|
|
158
|
+
});
|
|
146
159
|
</script>
|
|
@@ -24,8 +24,8 @@ const defaults = {
|
|
|
24
24
|
pathSeparator: "fas fa-chevron-right",
|
|
25
25
|
image: "fas fa-image",
|
|
26
26
|
file: "fas fa-file",
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
previous: "fas fa-chevron-left",
|
|
28
|
+
next: "fas fa-chevron-right",
|
|
29
29
|
dropdownExpand: "fas fa-caret-down"
|
|
30
30
|
}
|
|
31
31
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ulu/frontend-vue",
|
|
3
|
-
"version": "0.1.1-beta.
|
|
3
|
+
"version": "0.1.1-beta.10",
|
|
4
4
|
"description": "A modular and tree-shakeable Vue 3 component library for the Ulu frontend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -14,10 +14,13 @@
|
|
|
14
14
|
"import": "./lib/index.js",
|
|
15
15
|
"types": "./types/index.d.ts"
|
|
16
16
|
},
|
|
17
|
+
"./*": {
|
|
18
|
+
"import": "./lib/*",
|
|
19
|
+
"types": "./types/*"
|
|
20
|
+
},
|
|
17
21
|
"./dist": {
|
|
18
22
|
"import": "./dist/frontend-vue.js"
|
|
19
23
|
},
|
|
20
|
-
"./*": "./lib/*",
|
|
21
24
|
"./scss": "./lib/_index.scss"
|
|
22
25
|
},
|
|
23
26
|
"types": "./types/index.d.ts",
|
|
@@ -36,7 +39,7 @@
|
|
|
36
39
|
"dev": "storybook dev -p 6006",
|
|
37
40
|
"docs:build": "storybook build -o docs",
|
|
38
41
|
"build": "vite build",
|
|
39
|
-
"types": "
|
|
42
|
+
"types": "vue-tsc",
|
|
40
43
|
"deploy": "npm run types && npm run build && npm run docs:build",
|
|
41
44
|
"update-contexts": "rm -rf .ctx && mkdir -p .ctx/frontend && cp -R node_modules/@ulu/frontend/scss node_modules/@ulu/frontend/js .ctx/frontend/"
|
|
42
45
|
},
|
|
@@ -58,12 +61,12 @@
|
|
|
58
61
|
},
|
|
59
62
|
"homepage": "https://github.com/Jscherbe/frontend-vue#readme",
|
|
60
63
|
"peerDependencies": {
|
|
64
|
+
"@formkit/auto-animate": "^0.9.0",
|
|
61
65
|
"@headlessui/vue": "^1.7.23",
|
|
62
|
-
"@ulu/frontend": "^0.1.0-beta.
|
|
66
|
+
"@ulu/frontend": "^0.1.0-beta.112",
|
|
63
67
|
"@unhead/vue": "^2.0.11",
|
|
64
68
|
"vue": "^3.5.17",
|
|
65
|
-
"vue-router": "^4.5.1"
|
|
66
|
-
"@formkit/auto-animate" : "^0.9.0"
|
|
69
|
+
"vue-router": "^4.5.1"
|
|
67
70
|
},
|
|
68
71
|
"optionalDependencies": {
|
|
69
72
|
"fuse.js": "^6.6.2",
|
|
@@ -76,6 +79,7 @@
|
|
|
76
79
|
"lodash-es": "^4.17.21"
|
|
77
80
|
},
|
|
78
81
|
"devDependencies": {
|
|
82
|
+
"@formkit/auto-animate": "^0.9.0",
|
|
79
83
|
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
80
84
|
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
|
81
85
|
"@fortawesome/vue-fontawesome": "^3.0.8",
|
|
@@ -83,7 +87,7 @@
|
|
|
83
87
|
"@storybook/addon-essentials": "^9.0.0-alpha.12",
|
|
84
88
|
"@storybook/addon-links": "^9.1.1",
|
|
85
89
|
"@storybook/vue3-vite": "^9.1.1",
|
|
86
|
-
"@ulu/frontend": "^0.1.0-beta.
|
|
90
|
+
"@ulu/frontend": "^0.1.0-beta.112",
|
|
87
91
|
"@unhead/vue": "^2.0.11",
|
|
88
92
|
"@vitejs/plugin-vue": "^6.0.0",
|
|
89
93
|
"ollama": "^0.5.16",
|
|
@@ -95,7 +99,7 @@
|
|
|
95
99
|
"typescript": "^5.3.3",
|
|
96
100
|
"vite": "^7.0.0",
|
|
97
101
|
"vue-router": "^4.5.1",
|
|
98
|
-
"
|
|
102
|
+
"vue-tsc": "^3.0.6"
|
|
99
103
|
},
|
|
100
104
|
"volta": {
|
|
101
105
|
"node": "22.17.0"
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
2
|
+
export default _default;
|
|
3
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
4
|
+
$slots: S;
|
|
5
|
+
});
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
|
+
$emit: typeof emit;
|
|
8
|
+
$props: Partial<typeof props>;
|
|
9
|
+
startOpen: boolean;
|
|
10
|
+
classes: Record<string, any>;
|
|
11
|
+
animate: boolean | Record<string, any>;
|
|
12
|
+
triggerTextElement: string;
|
|
13
|
+
triggerText?: string | undefined;
|
|
14
|
+
modifiers?: string | unknown[] | undefined;
|
|
15
|
+
modelValue?: boolean | undefined;
|
|
16
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
type __VLS_Slots = {
|
|
18
|
+
trigger?: ((props: {
|
|
19
|
+
open: boolean | undefined;
|
|
20
|
+
toggle: typeof toggle;
|
|
21
|
+
}) => any) | undefined;
|
|
22
|
+
} & {
|
|
23
|
+
icon?: ((props: {
|
|
24
|
+
open: boolean | undefined;
|
|
25
|
+
}) => any) | undefined;
|
|
26
|
+
} & {
|
|
27
|
+
default?: ((props: {
|
|
28
|
+
open: true;
|
|
29
|
+
toggle: typeof toggle;
|
|
30
|
+
}) => any) | undefined;
|
|
31
|
+
};
|
|
32
|
+
declare const emit: (event: "update:modelValue", ...args: any[]) => void;
|
|
33
|
+
declare const props: {
|
|
34
|
+
readonly startOpen: boolean;
|
|
35
|
+
readonly classes: Record<string, any>;
|
|
36
|
+
readonly animate: boolean | Record<string, any>;
|
|
37
|
+
readonly triggerTextElement: string;
|
|
38
|
+
readonly triggerText?: string | undefined;
|
|
39
|
+
readonly modifiers?: string | unknown[] | undefined;
|
|
40
|
+
readonly modelValue?: boolean | undefined;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=UluAccordion.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluAccordion.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluAccordion.vue"],"names":[],"mappings":"wBAmSqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AATzB;WAIkB,OAAO,IAAI;YADV,OAAO,CAAC,OAAO,KAAK,CAAC;;;;;;;;2OAGrC;;;;;;;;;;;;;;;;AAlID,yEAAgD;AArDhD;;;;;;;;EAmDG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
2
|
+
export default _default;
|
|
3
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
4
|
+
$slots: S;
|
|
5
|
+
});
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
|
+
$props: Partial<typeof props>;
|
|
8
|
+
items: unknown[];
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
type __VLS_Slots = {
|
|
11
|
+
item?: ((props: {
|
|
12
|
+
item: never;
|
|
13
|
+
index: number;
|
|
14
|
+
}) => any) | undefined;
|
|
15
|
+
};
|
|
16
|
+
declare const props: {
|
|
17
|
+
readonly items: unknown[];
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=UluAccordionGroup.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluAccordionGroup.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluAccordionGroup.vue"],"names":[],"mappings":"wBAwKqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AARzB;YAGmB,OAAO,CAAC,OAAO,KAAK,CAAC;;2OAErC;;;;;;;AA5GH;;EASG"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
2
|
+
export default _default;
|
|
3
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
4
|
+
$slots: S;
|
|
5
|
+
});
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
|
+
$emit: typeof emit;
|
|
8
|
+
$props: Partial<typeof props>;
|
|
9
|
+
startOpen: boolean;
|
|
10
|
+
classes: Record<string, any>;
|
|
11
|
+
animate: boolean | Record<string, any>;
|
|
12
|
+
closeOnEscape: boolean;
|
|
13
|
+
triggerText?: string | undefined;
|
|
14
|
+
modelValue?: boolean | undefined;
|
|
15
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
type __VLS_Slots = {
|
|
17
|
+
trigger?: ((props: {
|
|
18
|
+
isOpen: boolean | undefined;
|
|
19
|
+
toggle: typeof toggle;
|
|
20
|
+
}) => any) | undefined;
|
|
21
|
+
} & {
|
|
22
|
+
default?: ((props: {
|
|
23
|
+
isOpen: true;
|
|
24
|
+
toggle: typeof toggle;
|
|
25
|
+
}) => any) | undefined;
|
|
26
|
+
};
|
|
27
|
+
declare const emit: (event: "update:modelValue", ...args: any[]) => void;
|
|
28
|
+
declare const props: {
|
|
29
|
+
readonly startOpen: boolean;
|
|
30
|
+
readonly classes: Record<string, any>;
|
|
31
|
+
readonly animate: boolean | Record<string, any>;
|
|
32
|
+
readonly closeOnEscape: boolean;
|
|
33
|
+
readonly triggerText?: string | undefined;
|
|
34
|
+
readonly modelValue?: boolean | undefined;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Function used to toggle the collapsible
|
|
38
|
+
*/
|
|
39
|
+
declare function toggle(): void;
|
|
40
|
+
//# sourceMappingURL=UluCollapsible.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluCollapsible.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluCollapsible.vue"],"names":[],"mappings":"wBAgWqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AATzB;WAIkB,OAAO,IAAI;YADV,OAAO,CAAC,OAAO,KAAK,CAAC;;;;;;;2OAGrC;;;;;;;;;;;;AA3JD,yEAAgD;AA/ChD;;;;;;;EA6CG;AAiDH;;GAEG;AACH,gCAEC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
2
|
+
export default _default;
|
|
3
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
4
|
+
$slots: S;
|
|
5
|
+
});
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
|
+
$props: Partial<typeof __VLS_props>;
|
|
8
|
+
popoverClasses: Record<string, any>;
|
|
9
|
+
triggerText?: string | undefined;
|
|
10
|
+
items?: unknown[] | undefined;
|
|
11
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
type __VLS_Slots = {
|
|
13
|
+
trigger?: ((props: {
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
}) => any) | undefined;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_props: {
|
|
18
|
+
readonly popoverClasses: Record<string, any>;
|
|
19
|
+
readonly triggerText?: string | undefined;
|
|
20
|
+
readonly items?: unknown[] | undefined;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=UluDropdown.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluDropdown.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluDropdown.vue"],"names":[],"mappings":"wBA2JqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AARzB;YAGmB,OAAO,CAAC,OAAO,WAAW,CAAC;;;;2OAE3C;;;;;;AA5GD;;;;EAkBG"}
|