@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.
Files changed (214) hide show
  1. package/dist/{breakpoints-DM-CBTtb.js → breakpoints-BYSYcx8V.js} +1 -1
  2. package/dist/frontend-vue.css +1 -1
  3. package/dist/frontend-vue.js +65 -64
  4. package/dist/{index-BNRZ3Apw.js → index-A7weElM_.js} +1940 -1715
  5. package/lib/components/forms/UluSelectableMenu.vue +8 -1
  6. package/lib/components/navigation/UluMenu.vue +5 -3
  7. package/lib/components/navigation/UluMenuStack.vue +47 -30
  8. package/lib/components/systems/facets/UluFacetsActiveFilters.vue +84 -0
  9. package/lib/components/systems/facets/UluFacetsFilterLists.vue +7 -1
  10. package/lib/components/systems/facets/UluFacetsList.vue +2 -0
  11. package/lib/components/systems/facets/UluFacetsSidebarLayout.vue +32 -12
  12. package/lib/components/systems/facets/useFacets.js +166 -40
  13. package/lib/components/systems/index.js +1 -0
  14. package/lib/components/systems/slider/UluSlideShow.vue +2 -2
  15. package/lib/components/visualizations/UluProgressBar.vue +57 -14
  16. package/lib/components/visualizations/UluProgressCircle.vue +124 -111
  17. package/lib/plugins/core/index.js +2 -2
  18. package/package.json +12 -8
  19. package/types/components/collapsible/UluAccordion.vue.d.ts +42 -0
  20. package/types/components/collapsible/UluAccordion.vue.d.ts.map +1 -0
  21. package/types/components/collapsible/UluAccordionGroup.vue.d.ts +19 -0
  22. package/types/components/collapsible/UluAccordionGroup.vue.d.ts.map +1 -0
  23. package/types/components/collapsible/UluCollapsible.vue.d.ts +40 -0
  24. package/types/components/collapsible/UluCollapsible.vue.d.ts.map +1 -0
  25. package/types/components/collapsible/UluDropdown.vue.d.ts +22 -0
  26. package/types/components/collapsible/UluDropdown.vue.d.ts.map +1 -0
  27. package/types/components/collapsible/UluModal.vue.d.ts +253 -0
  28. package/types/components/collapsible/UluModal.vue.d.ts.map +1 -0
  29. package/types/components/collapsible/UluOverflowPopover.vue.d.ts +18 -0
  30. package/types/components/collapsible/UluOverflowPopover.vue.d.ts.map +1 -0
  31. package/types/components/collapsible/UluTab.vue.d.ts +10 -0
  32. package/types/components/collapsible/UluTab.vue.d.ts.map +1 -0
  33. package/types/components/collapsible/UluTabGroup.vue.d.ts +18 -0
  34. package/types/components/collapsible/UluTabGroup.vue.d.ts.map +1 -0
  35. package/types/components/collapsible/UluTabList.vue.d.ts +10 -0
  36. package/types/components/collapsible/UluTabList.vue.d.ts.map +1 -0
  37. package/types/components/collapsible/UluTabPanel.vue.d.ts +10 -0
  38. package/types/components/collapsible/UluTabPanel.vue.d.ts.map +1 -0
  39. package/types/components/collapsible/UluTabPanels.vue.d.ts +10 -0
  40. package/types/components/collapsible/UluTabPanels.vue.d.ts.map +1 -0
  41. package/types/components/elements/UluAlert.vue.d.ts +147 -0
  42. package/types/components/elements/UluAlert.vue.d.ts.map +1 -0
  43. package/types/components/elements/UluBadge.vue.d.ts +30 -0
  44. package/types/components/elements/UluBadge.vue.d.ts.map +1 -0
  45. package/types/components/elements/UluBadgeStack.vue.d.ts +9 -0
  46. package/types/components/elements/UluBadgeStack.vue.d.ts.map +1 -0
  47. package/types/components/elements/UluButton.vue.d.ts +186 -0
  48. package/types/components/elements/UluButton.vue.d.ts.map +1 -0
  49. package/types/components/elements/UluButtonVerbose.vue.d.ts +126 -0
  50. package/types/components/elements/UluButtonVerbose.vue.d.ts.map +1 -0
  51. package/types/components/elements/UluCallout.vue.d.ts +27 -0
  52. package/types/components/elements/UluCallout.vue.d.ts.map +1 -0
  53. package/types/components/elements/UluCard.vue.d.ts +238 -0
  54. package/types/components/elements/UluCard.vue.d.ts.map +1 -0
  55. package/types/components/elements/UluDefinitionList.vue.d.ts +26 -0
  56. package/types/components/elements/UluDefinitionList.vue.d.ts.map +1 -0
  57. package/types/components/elements/UluExternalLink.vue.d.ts +25 -0
  58. package/types/components/elements/UluExternalLink.vue.d.ts.map +1 -0
  59. package/types/components/elements/UluIcon.vue.d.ts +11 -0
  60. package/types/components/elements/UluIcon.vue.d.ts.map +1 -0
  61. package/types/components/elements/UluList.vue.d.ts +37 -0
  62. package/types/components/elements/UluList.vue.d.ts.map +1 -0
  63. package/types/components/elements/UluMain.vue.d.ts +13 -0
  64. package/types/components/elements/UluMain.vue.d.ts.map +1 -0
  65. package/types/components/elements/UluSpokeSpinner.vue.d.ts +9 -0
  66. package/types/components/elements/UluSpokeSpinner.vue.d.ts.map +1 -0
  67. package/types/components/elements/UluTag.vue.d.ts +26 -0
  68. package/types/components/elements/UluTag.vue.d.ts.map +1 -0
  69. package/types/components/forms/UluFileDisplay.vue.d.ts +23 -0
  70. package/types/components/forms/UluFileDisplay.vue.d.ts.map +1 -0
  71. package/types/components/forms/UluFormFile.vue.d.ts +26 -0
  72. package/types/components/forms/UluFormFile.vue.d.ts.map +1 -0
  73. package/types/components/forms/UluFormMessage.vue.d.ts +18 -0
  74. package/types/components/forms/UluFormMessage.vue.d.ts.map +1 -0
  75. package/types/components/forms/UluFormSelect.vue.d.ts +24 -0
  76. package/types/components/forms/UluFormSelect.vue.d.ts.map +1 -0
  77. package/types/components/forms/UluFormText.vue.d.ts +22 -0
  78. package/types/components/forms/UluFormText.vue.d.ts.map +1 -0
  79. package/types/components/forms/UluSearchForm.vue.d.ts +9 -0
  80. package/types/components/forms/UluSearchForm.vue.d.ts.map +1 -0
  81. package/types/components/forms/UluSelectableMenu.vue.d.ts +30 -0
  82. package/types/components/forms/UluSelectableMenu.vue.d.ts.map +1 -0
  83. package/types/components/index.d.ts +48 -0
  84. package/types/components/layout/UluAdaptiveLayout.vue.d.ts +12 -0
  85. package/types/components/layout/UluAdaptiveLayout.vue.d.ts.map +1 -0
  86. package/types/components/layout/UluDataGrid.vue.d.ts +3 -0
  87. package/types/components/layout/UluDataGrid.vue.d.ts.map +1 -0
  88. package/types/components/layout/UluTitleRail.vue.d.ts +91 -0
  89. package/types/components/layout/UluTitleRail.vue.d.ts.map +1 -0
  90. package/types/components/layout/UluWhenBreakpoint.vue.d.ts +20 -0
  91. package/types/components/layout/UluWhenBreakpoint.vue.d.ts.map +1 -0
  92. package/types/components/navigation/UluBreadcrumb.vue.d.ts +71 -0
  93. package/types/components/navigation/UluBreadcrumb.vue.d.ts.map +1 -0
  94. package/types/components/navigation/UluMenu.vue.d.ts +142 -0
  95. package/types/components/navigation/UluMenu.vue.d.ts.map +1 -0
  96. package/types/components/navigation/UluMenuStack.vue.d.ts +19 -0
  97. package/types/components/navigation/UluMenuStack.vue.d.ts.map +1 -0
  98. package/types/components/navigation/UluNavStrip.vue.d.ts +138 -0
  99. package/types/components/navigation/UluNavStrip.vue.d.ts.map +1 -0
  100. package/types/components/navigation/UluPager.vue.d.ts +15 -0
  101. package/types/components/navigation/UluPager.vue.d.ts.map +1 -0
  102. package/types/components/navigation/UluSkipLink.vue.d.ts +3 -0
  103. package/types/components/navigation/UluSkipLink.vue.d.ts.map +1 -0
  104. package/types/components/systems/facets/ExampleFacetsWithPagination.vue.d.ts +3 -0
  105. package/types/components/systems/facets/ExampleFacetsWithPagination.vue.d.ts.map +1 -0
  106. package/types/components/systems/facets/UluFacetsActiveFilters.vue.d.ts +18 -0
  107. package/types/components/systems/facets/UluFacetsActiveFilters.vue.d.ts.map +1 -0
  108. package/types/components/systems/facets/UluFacetsFilterLists.vue.d.ts +27 -0
  109. package/types/components/systems/facets/UluFacetsFilterLists.vue.d.ts.map +1 -0
  110. package/types/components/systems/facets/UluFacetsFilterPopovers.vue.d.ts +25 -0
  111. package/types/components/systems/facets/UluFacetsFilterPopovers.vue.d.ts.map +1 -0
  112. package/types/components/systems/facets/UluFacetsFilterSelects.vue.d.ts +11 -0
  113. package/types/components/systems/facets/UluFacetsFilterSelects.vue.d.ts.map +1 -0
  114. package/types/components/systems/facets/UluFacetsHeaderLayout.vue.d.ts +12 -0
  115. package/types/components/systems/facets/UluFacetsHeaderLayout.vue.d.ts.map +1 -0
  116. package/types/components/systems/facets/UluFacetsList.vue.d.ts +21 -0
  117. package/types/components/systems/facets/UluFacetsList.vue.d.ts.map +1 -0
  118. package/types/components/systems/facets/UluFacetsResults.vue.d.ts +27 -0
  119. package/types/components/systems/facets/UluFacetsResults.vue.d.ts.map +1 -0
  120. package/types/components/systems/facets/UluFacetsSearch.vue.d.ts +15 -0
  121. package/types/components/systems/facets/UluFacetsSearch.vue.d.ts.map +1 -0
  122. package/types/components/systems/facets/UluFacetsSidebarLayout.vue.d.ts +22 -0
  123. package/types/components/systems/facets/UluFacetsSidebarLayout.vue.d.ts.map +1 -0
  124. package/types/components/systems/facets/UluFacetsSort.vue.d.ts +22 -0
  125. package/types/components/systems/facets/UluFacetsSort.vue.d.ts.map +1 -0
  126. package/types/components/systems/facets/useFacets.d.ts +30 -12
  127. package/types/components/systems/facets/useFacets.d.ts.map +1 -1
  128. package/types/components/systems/index.d.ts +24 -0
  129. package/types/components/systems/scroll-anchors/UluScrollAnchors.vue.d.ts +60 -0
  130. package/types/components/systems/scroll-anchors/UluScrollAnchors.vue.d.ts.map +1 -0
  131. package/types/components/systems/scroll-anchors/UluScrollAnchorsNav.vue.d.ts +15 -0
  132. package/types/components/systems/scroll-anchors/UluScrollAnchorsNav.vue.d.ts.map +1 -0
  133. package/types/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue.d.ts +32 -0
  134. package/types/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue.d.ts.map +1 -0
  135. package/types/components/systems/scroll-anchors/UluScrollAnchorsSection.vue.d.ts +50 -0
  136. package/types/components/systems/scroll-anchors/UluScrollAnchorsSection.vue.d.ts.map +1 -0
  137. package/types/components/systems/scroll-anchors/symbols.d.ts +3 -3
  138. package/types/components/systems/scroll-anchors/symbols.d.ts.map +1 -1
  139. package/types/components/systems/skeleton/UluShowSkeleton.vue.d.ts +16 -0
  140. package/types/components/systems/skeleton/UluShowSkeleton.vue.d.ts.map +1 -0
  141. package/types/components/systems/skeleton/UluSkeletonContent.vue.d.ts +9 -0
  142. package/types/components/systems/skeleton/UluSkeletonContent.vue.d.ts.map +1 -0
  143. package/types/components/systems/skeleton/UluSkeletonMedia.vue.d.ts +3 -0
  144. package/types/components/systems/skeleton/UluSkeletonMedia.vue.d.ts.map +1 -0
  145. package/types/components/systems/skeleton/UluSkeletonText.vue.d.ts +13 -0
  146. package/types/components/systems/skeleton/UluSkeletonText.vue.d.ts.map +1 -0
  147. package/types/components/systems/slider/UluImageSlideShow.vue.d.ts +130 -0
  148. package/types/components/systems/slider/UluImageSlideShow.vue.d.ts.map +1 -0
  149. package/types/components/systems/slider/UluSlideShow.vue.d.ts +205 -0
  150. package/types/components/systems/slider/UluSlideShow.vue.d.ts.map +1 -0
  151. package/types/components/systems/slider/UluSlideShowSlide.vue.d.ts +17 -0
  152. package/types/components/systems/slider/UluSlideShowSlide.vue.d.ts.map +1 -0
  153. package/types/components/systems/table-sticky/UluTableSticky.vue.d.ts +455 -0
  154. package/types/components/systems/table-sticky/UluTableSticky.vue.d.ts.map +1 -0
  155. package/types/components/systems/table-sticky/UluTableStickyRows.vue.d.ts +34 -0
  156. package/types/components/systems/table-sticky/UluTableStickyRows.vue.d.ts.map +1 -0
  157. package/types/components/systems/table-sticky/UluTableStickyTable.vue.d.ts +151 -0
  158. package/types/components/systems/table-sticky/UluTableStickyTable.vue.d.ts.map +1 -0
  159. package/types/components/utils/UluCondText.vue.d.ts +29 -0
  160. package/types/components/utils/UluCondText.vue.d.ts.map +1 -0
  161. package/types/components/utils/UluEmpty.vue.d.ts +3 -0
  162. package/types/components/utils/UluEmpty.vue.d.ts.map +1 -0
  163. package/types/components/utils/UluEmptyView.vue.d.ts +3 -0
  164. package/types/components/utils/UluEmptyView.vue.d.ts.map +1 -0
  165. package/types/components/utils/UluPlaceholderImage.vue.d.ts +61 -0
  166. package/types/components/utils/UluPlaceholderImage.vue.d.ts.map +1 -0
  167. package/types/components/utils/UluPlaceholderText.vue.d.ts +24 -0
  168. package/types/components/utils/UluPlaceholderText.vue.d.ts.map +1 -0
  169. package/types/components/utils/UluRouteAnnouncer.vue.d.ts +63 -0
  170. package/types/components/utils/UluRouteAnnouncer.vue.d.ts.map +1 -0
  171. package/types/components/visualizations/UluAnimateNumber.vue.d.ts +16 -0
  172. package/types/components/visualizations/UluAnimateNumber.vue.d.ts.map +1 -0
  173. package/types/components/visualizations/UluProgressBar.vue.d.ts +66 -0
  174. package/types/components/visualizations/UluProgressBar.vue.d.ts.map +1 -0
  175. package/types/components/visualizations/UluProgressCircle.vue.d.ts +48 -0
  176. package/types/components/visualizations/UluProgressCircle.vue.d.ts.map +1 -0
  177. package/types/composables/useBreakpointManager.d.ts +1 -1
  178. package/types/composables/useBreakpointManager.d.ts.map +1 -1
  179. package/types/composables/useDocumentTitle.d.ts +4 -4
  180. package/types/composables/useDocumentTitle.d.ts.map +1 -1
  181. package/types/composables/useIcon.d.ts +1 -1
  182. package/types/composables/useIcon.d.ts.map +1 -1
  183. package/types/composables/useModifiers.d.ts +1 -1
  184. package/types/composables/useModifiers.d.ts.map +1 -1
  185. package/types/composables/useWindowResize.d.ts +1 -1
  186. package/types/composables/useWindowResize.d.ts.map +1 -1
  187. package/types/plugins/modals/UluModalsDisplay.vue.d.ts +14 -0
  188. package/types/plugins/modals/UluModalsDisplay.vue.d.ts.map +1 -0
  189. package/types/plugins/modals/api.d.ts +7 -4
  190. package/types/plugins/modals/api.d.ts.map +1 -1
  191. package/types/plugins/popovers/UluPopover.vue.d.ts +54 -0
  192. package/types/plugins/popovers/UluPopover.vue.d.ts.map +1 -0
  193. package/types/plugins/popovers/UluTooltipDisplay.vue.d.ts +3 -0
  194. package/types/plugins/popovers/UluTooltipDisplay.vue.d.ts.map +1 -0
  195. package/types/plugins/popovers/UluTooltipPopover.vue.d.ts +3 -0
  196. package/types/plugins/popovers/UluTooltipPopover.vue.d.ts.map +1 -0
  197. package/types/plugins/popovers/defaults.d.ts +2 -2
  198. package/types/plugins/popovers/defaults.d.ts.map +1 -1
  199. package/types/plugins/popovers/manager.d.ts +50 -6
  200. package/types/plugins/popovers/manager.d.ts.map +1 -1
  201. package/types/plugins/popovers/useFollow.d.ts +4 -4
  202. package/types/plugins/popovers/useFollow.d.ts.map +1 -1
  203. package/types/plugins/toast/UluToast.vue.d.ts +52 -0
  204. package/types/plugins/toast/UluToast.vue.d.ts.map +1 -0
  205. package/types/plugins/toast/UluToastDisplay.vue.d.ts +13 -0
  206. package/types/plugins/toast/UluToastDisplay.vue.d.ts.map +1 -0
  207. package/types/plugins/toast/defaults.d.ts +39 -2
  208. package/types/plugins/toast/store.d.ts +65 -2
  209. package/types/plugins/toast/store.d.ts.map +1 -1
  210. package/types/utils/dom.d.ts +1 -1
  211. package/types/utils/dom.d.ts.map +1 -1
  212. package/types/utils/router.d.ts +15 -15
  213. package/types/utils/router.d.ts.map +1 -1
  214. package/lib/components/visualizations/progress-bar-examples.html +0 -175
@@ -1,13 +1,26 @@
1
1
  <template>
2
2
  <div :class="componentClasses">
3
- <div v-if="label || $slots.icon" class="progress-bar__header">
4
- <strong
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
- {{ label }}
10
- </strong>
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 v-if="!loader && !indeterminate" class="progress-bar__values">
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
- -{{ deficit }}
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
- * A circular progress indicator component.
90
+ * Renders the component as a solid pie chart instead of a donut.
39
91
  */
40
- export default {
41
- name: 'UluProgressCircle',
42
- props: {
43
- /**
44
- * The label for accessibility (visually hidden).
45
- */
46
- label: {
47
- type: String,
48
- default: "Progress"
49
- },
50
- /**
51
- * The progress percentage (0-100).
52
- */
53
- percentage: {
54
- type: Number,
55
- default: 0
56
- },
57
- /**
58
- * Renders a smaller version of the component.
59
- */
60
- small: Boolean,
61
- /**
62
- * Displays the percentage value outside (to the side) of the circle.
63
- */
64
- outside: Boolean,
65
- /**
66
- * Displays the percentage value below the circle.
67
- */
68
- outsideBelow: Boolean,
69
- /**
70
- * Sets the status color of the progress circle (e.g., 'low', 'incomplete', 'complete').
71
- */
72
- status: {
73
- type: String,
74
- default: ''
75
- },
76
- /**
77
- * Renders the component as a solid pie chart instead of a donut.
78
- */
79
- pieStyle: Boolean,
80
- /**
81
- * Removes the center mask, filling the entire circle.
82
- */
83
- noMask: Boolean,
84
- /**
85
- * The duration of the animation in milliseconds.
86
- */
87
- duration: {
88
- type: Number,
89
- default: 1000 // Matches SCSS animation-duration
90
- },
91
- /**
92
- * The easing function for the animation.
93
- */
94
- easing: {
95
- type: String,
96
- default: "ease-in" // Matches SCSS animation-timing
97
- }
98
- },
99
- watch: {
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
- next: "fas fa-chevron-left",
28
- previous: "fas fa-chevron-right",
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.1",
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": "npx tsc",
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.111",
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.111",
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
- "@formkit/auto-animate" : "^0.9.0"
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"}