@ulu/frontend-vue 0.1.0-beta.9 → 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-BbkGNxxt.js → breakpoints-BYSYcx8V.js} +1 -1
- package/dist/frontend-vue.css +1 -1
- package/dist/frontend-vue.js +82 -70
- package/dist/index-A7weElM_.js +7766 -0
- package/lib/components/collapsible/UluAccordion.vue +71 -53
- package/lib/components/collapsible/UluAccordionGroup.vue +54 -0
- package/lib/components/collapsible/UluCollapsible.vue +144 -0
- package/lib/components/collapsible/UluDropdown.vue +29 -29
- package/lib/components/collapsible/UluOverflowPopover.vue +1 -1
- package/lib/components/elements/UluBadge.vue +51 -28
- package/lib/components/elements/UluBadgeStack.vue +8 -13
- package/lib/components/elements/UluButtonVerbose.vue +119 -0
- package/lib/components/elements/UluCard.vue +1 -1
- package/lib/components/elements/UluDefinitionList.vue +14 -17
- package/lib/components/elements/UluExternalLink.vue +21 -27
- package/lib/components/elements/UluIcon.vue +11 -1
- package/lib/components/elements/UluList.vue +53 -55
- package/lib/components/elements/UluSpokeSpinner.vue +12 -18
- package/lib/components/elements/UluTag.vue +35 -35
- package/lib/components/forms/UluFileDisplay.vue +49 -31
- package/lib/components/forms/UluFormFile.vue +37 -24
- package/lib/components/forms/UluFormMessage.vue +13 -10
- package/lib/components/forms/UluFormSelect.vue +28 -16
- package/lib/components/forms/UluFormText.vue +24 -15
- package/lib/components/forms/UluSearchForm.vue +11 -10
- package/lib/components/forms/UluSelectableMenu.vue +106 -0
- package/lib/components/index.js +4 -3
- package/lib/components/layout/UluTitleRail.vue +18 -0
- package/lib/components/layout/UluWhenBreakpoint.vue +9 -0
- package/lib/components/navigation/UluBreadcrumb.vue +9 -2
- package/lib/components/navigation/UluMenu.vue +13 -6
- package/lib/components/navigation/UluMenuStack.vue +50 -31
- package/lib/components/navigation/UluPager.vue +102 -0
- package/lib/components/systems/facets/ExampleFacetsWithPagination.vue +119 -0
- package/lib/components/systems/facets/UluFacetsActiveFilters.vue +84 -0
- package/lib/components/systems/facets/UluFacetsFilterLists.vue +97 -0
- package/lib/components/systems/facets/UluFacetsFilterPopovers.vue +125 -0
- package/lib/components/systems/facets/UluFacetsFilterSelects.vue +71 -0
- package/lib/components/systems/facets/UluFacetsHeaderLayout.vue +24 -0
- package/lib/components/systems/facets/UluFacetsList.vue +64 -34
- package/lib/components/systems/facets/UluFacetsResults.vue +63 -0
- package/lib/components/systems/facets/UluFacetsSearch.vue +27 -50
- package/lib/components/systems/facets/UluFacetsSidebarLayout.vue +90 -0
- package/lib/components/systems/facets/UluFacetsSort.vue +45 -0
- package/lib/components/systems/facets/_facets.scss +2 -3
- package/lib/components/systems/facets/_mock-data.js +40 -0
- package/lib/components/systems/facets/useFacets.js +394 -0
- package/lib/components/systems/index.js +14 -2
- package/lib/components/systems/scroll-anchors/UluScrollAnchors.vue +2 -1
- package/lib/components/systems/skeleton/UluShowSkeleton.vue +9 -8
- package/lib/components/systems/skeleton/UluSkeletonContent.vue +39 -43
- package/lib/components/systems/skeleton/UluSkeletonMedia.vue +4 -6
- package/lib/components/systems/skeleton/UluSkeletonText.vue +27 -0
- package/lib/components/systems/slider/UluImageSlideShow.vue +1 -1
- package/lib/components/systems/slider/UluSlideShow.vue +8 -3
- package/lib/components/systems/table-sticky/UluTableSticky.vue +7 -7
- package/lib/components/systems/table-sticky/UluTableStickyTable.vue +3 -3
- package/lib/components/visualizations/UluAnimateNumber.vue +7 -1
- package/lib/components/visualizations/UluProgressBar.vue +148 -74
- package/lib/components/visualizations/UluProgressCircle.vue +159 -0
- package/lib/composables/index.js +3 -1
- package/lib/composables/useDocumentTitle.js +61 -0
- package/lib/composables/usePagination.js +122 -0
- package/lib/index.js +1 -0
- package/lib/plugins/core/index.js +6 -1
- package/lib/plugins/popovers/UluPopover.vue +8 -3
- package/lib/plugins/toast/UluToast.vue +1 -1
- package/lib/plugins/toast/UluToastDisplay.vue +19 -2
- package/lib/utils/dom.js +12 -0
- package/lib/utils/index.js +2 -0
- package/lib/utils/{vue-router.js → router.js} +114 -30
- package/package.json +22 -12
- 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/_mock-data.d.ts +18 -0
- package/types/components/systems/facets/_mock-data.d.ts.map +1 -0
- package/types/components/systems/facets/useFacets.d.ts +57 -0
- package/types/components/systems/facets/useFacets.d.ts.map +1 -0
- package/types/components/systems/index.d.ts +25 -1
- 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/index.d.ts +2 -0
- package/types/composables/useBreakpointManager.d.ts +1 -1
- package/types/composables/useBreakpointManager.d.ts.map +1 -1
- package/types/composables/useDocumentTitle.d.ts +22 -0
- package/types/composables/useDocumentTitle.d.ts.map +1 -0
- 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/usePageTitle.d.ts +19 -0
- package/types/composables/usePageTitle.d.ts.map +1 -0
- package/types/composables/usePagination.d.ts +25 -0
- package/types/composables/usePagination.d.ts.map +1 -0
- package/types/composables/useWindowResize.d.ts +1 -1
- package/types/composables/useWindowResize.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- 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 +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 +2 -1
- package/types/utils/dom.d.ts.map +1 -1
- package/types/utils/index.d.ts +3 -0
- package/types/utils/index.d.ts.map +1 -0
- package/types/utils/router.d.ts +144 -0
- package/types/utils/router.d.ts.map +1 -0
- package/dist/index-D3Uc6T5M.js +0 -6469
- package/lib/components/collapsible/UluCollapsibleRegion.vue +0 -278
- package/lib/components/forms/UluCheckboxMenu.vue +0 -36
- package/lib/components/systems/facets/UluFacets.vue +0 -380
- package/lib/components/systems/skeleton/UluSkeletonTextInline.vue +0 -9
- package/lib/components/visualizations/UluProgressDonut.vue +0 -97
- package/lib/utils/placeholder.js +0 -6
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div>
|
|
3
3
|
<div v-for="(line, index) in linesWithSegments" :key="index">
|
|
4
4
|
<span
|
|
5
5
|
v-for="segment in line"
|
|
6
6
|
:key="segment"
|
|
7
|
-
class="
|
|
8
|
-
:class="{ '
|
|
7
|
+
class="skeleton skeleton--text skeleton--inline"
|
|
8
|
+
:class="{ 'skeleton--background-alt' : segment.alt }"
|
|
9
9
|
:style="{ width: `${ segment.width }%` }"
|
|
10
10
|
>
|
|
11
11
|
</span>
|
|
@@ -13,48 +13,44 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
|
-
<script>
|
|
16
|
+
<script setup>
|
|
17
|
+
import { computed } from "vue";
|
|
17
18
|
import { randomInt } from "@ulu/utils/random.js";
|
|
18
19
|
import { arrayCreate } from "@ulu/utils/array.js";
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
methods: {
|
|
28
|
-
randomInt
|
|
20
|
+
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
/**
|
|
23
|
+
* Amount of lines to generate
|
|
24
|
+
*/
|
|
25
|
+
lines: {
|
|
26
|
+
type: Number,
|
|
27
|
+
default: 6
|
|
29
28
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
return segments.map(width => ({ width, alt: Math.random() < 0.5 }));
|
|
56
|
-
});
|
|
57
|
-
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Creates the segments (like words) for the given line count
|
|
33
|
+
* - Uses random number of segments and makes sure to fill the line between 70% - 100%
|
|
34
|
+
*/
|
|
35
|
+
const linesWithSegments = computed(() => arrayCreate(props.lines, () => {
|
|
36
|
+
const minWidth = 15;
|
|
37
|
+
const total = randomInt(70, 100);
|
|
38
|
+
let widthCurrent = 0;
|
|
39
|
+
const newWidth = () => {
|
|
40
|
+
const remaining = total - widthCurrent;
|
|
41
|
+
const width = randomInt(minWidth, remaining);
|
|
42
|
+
widthCurrent += width;
|
|
43
|
+
return width;
|
|
44
|
+
};
|
|
45
|
+
const segments = [];
|
|
46
|
+
while (widthCurrent < total - minWidth) {
|
|
47
|
+
segments.push(newWidth());
|
|
48
|
+
}
|
|
49
|
+
const getActualTotal = () => segments.reduce((acc, a) => acc + a, 0);
|
|
50
|
+
while (getActualTotal() >= total) {
|
|
51
|
+
let removed = segments.pop();
|
|
52
|
+
if (!removed) break;
|
|
58
53
|
}
|
|
59
|
-
|
|
54
|
+
return segments.map(width => ({ width, alt: Math.random() < 0.5 }));
|
|
55
|
+
}));
|
|
60
56
|
</script>
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
<
|
|
2
|
+
<div class="skeleton skeleton-block--media">
|
|
3
|
+
<UluIcon icon="type:image"/>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
-
<script>
|
|
8
|
-
|
|
9
|
-
name: "SkeletonMedia",
|
|
10
|
-
};
|
|
7
|
+
<script setup>
|
|
8
|
+
import UluIcon from "../../elements/UluIcon.vue";
|
|
11
9
|
</script>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span
|
|
3
|
+
class="skeleton skeleton--text"
|
|
4
|
+
:class="{
|
|
5
|
+
'skeleton--inline' : inline,
|
|
6
|
+
'skeleton--background-alt' : alt,
|
|
7
|
+
[`skeleton--width-${ width }`] : width
|
|
8
|
+
}"
|
|
9
|
+
></span>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
defineProps({
|
|
14
|
+
/**
|
|
15
|
+
* Inline modifier
|
|
16
|
+
*/
|
|
17
|
+
inline: Boolean,
|
|
18
|
+
/**
|
|
19
|
+
* Use alternate background color
|
|
20
|
+
*/
|
|
21
|
+
alt: Boolean,
|
|
22
|
+
/**
|
|
23
|
+
* Optional size (width) - should correspond with width setup in scss component
|
|
24
|
+
*/
|
|
25
|
+
width: String
|
|
26
|
+
});
|
|
27
|
+
</script>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
@click="previous"
|
|
51
51
|
:disabled="!canScrollLeft"
|
|
52
52
|
>
|
|
53
|
-
<
|
|
53
|
+
<UluIcon class="slideshow__control-icon" icon="type:previous"/>
|
|
54
54
|
</button>
|
|
55
55
|
</li>
|
|
56
56
|
<li class="slideshow__controls-item slideshow__controls-item--next">
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
@click="next"
|
|
61
61
|
:disabled="!canScrollRight"
|
|
62
62
|
>
|
|
63
|
-
<
|
|
63
|
+
<UluIcon class="slideshow__control-icon" icon="type:next" />
|
|
64
64
|
</button>
|
|
65
65
|
</li>
|
|
66
66
|
</ul>
|
|
@@ -97,8 +97,13 @@
|
|
|
97
97
|
</template>
|
|
98
98
|
|
|
99
99
|
<script>
|
|
100
|
+
import UluIcon from "../../elements/UluIcon.vue";
|
|
100
101
|
export default {
|
|
101
102
|
name: 'SlideShow',
|
|
103
|
+
emits: ['slide-change'],
|
|
104
|
+
components: {
|
|
105
|
+
UluIcon
|
|
106
|
+
},
|
|
102
107
|
props: {
|
|
103
108
|
/**
|
|
104
109
|
* Should slides be focusable by tab key
|
|
@@ -278,7 +283,7 @@
|
|
|
278
283
|
this.$nextTick(() => {
|
|
279
284
|
const slide = this.getSlideByElement(entry.target);
|
|
280
285
|
slide.active = entry.isIntersecting;
|
|
281
|
-
this.$emit('
|
|
286
|
+
this.$emit('slide-change', { slide, track, nav });
|
|
282
287
|
});
|
|
283
288
|
});
|
|
284
289
|
};
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
pointerEvents: sizesCalculated ? 'auto' : 'none',
|
|
44
44
|
width: tableWidth
|
|
45
45
|
}"
|
|
46
|
-
@
|
|
46
|
+
@column-sorted="applySort"
|
|
47
47
|
>
|
|
48
48
|
<template v-for="(_, name) in $slots" v-slot:[name]="slotData">
|
|
49
49
|
<slot :name="name" v-bind="slotData" />
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
opacity: headerOpacityX,
|
|
67
67
|
pointerEvents: headerVisibleX ? 'auto' : 'none'
|
|
68
68
|
}"
|
|
69
|
-
@
|
|
69
|
+
@column-sorted="applySort"
|
|
70
70
|
>
|
|
71
71
|
<template v-for="(_, name) in $slots" v-slot:[name]="slotData">
|
|
72
72
|
<slot :name="name" v-bind="slotData" />
|
|
@@ -138,9 +138,9 @@
|
|
|
138
138
|
:getRowValue="getRowValue"
|
|
139
139
|
:getColumnTitle="getColumnTitle"
|
|
140
140
|
@vue:mounted="tableReady"
|
|
141
|
-
@
|
|
142
|
-
@
|
|
143
|
-
@
|
|
141
|
+
@actual-header-removed="headerRemoved"
|
|
142
|
+
@actual-header-added="headerAdded"
|
|
143
|
+
@column-sorted="applySort"
|
|
144
144
|
>
|
|
145
145
|
<template v-for="(_, name) in $slots" v-slot:[name]="slotData">
|
|
146
146
|
<slot :name="name" v-bind="slotData" />
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
opacity: headerOpacityX,
|
|
168
168
|
pointerEvents: headerVisibleX ? 'auto' : 'none'
|
|
169
169
|
}"
|
|
170
|
-
@
|
|
170
|
+
@column-sorted="applySort"
|
|
171
171
|
>
|
|
172
172
|
<template v-for="(_, name) in $slots" v-slot:[name]="slotData">
|
|
173
173
|
<slot :name="name" v-bind="slotData" />
|
|
@@ -443,7 +443,7 @@
|
|
|
443
443
|
} else {
|
|
444
444
|
column.sortApplied = true;
|
|
445
445
|
}
|
|
446
|
-
this.$emit("
|
|
446
|
+
this.$emit("column-sort", column);
|
|
447
447
|
},
|
|
448
448
|
onColumnResize() {
|
|
449
449
|
if (this.sizesPainted) {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
:class="{
|
|
51
51
|
'table-sticky__sort-button--focused' : column.sortFocused,
|
|
52
52
|
}"
|
|
53
|
-
@click="$emit('
|
|
53
|
+
@click="$emit('column-sorted', column)"
|
|
54
54
|
@focus="handleSortFocus(column, true)"
|
|
55
55
|
@blur="handleSortFocus(column, false)"
|
|
56
56
|
:aria-pressed="column.sortApplied ? 'true' : 'false'"
|
|
@@ -199,9 +199,9 @@
|
|
|
199
199
|
const { id } = column;
|
|
200
200
|
const old = headerRefs[id];
|
|
201
201
|
if (old) {
|
|
202
|
-
this.$emit("
|
|
202
|
+
this.$emit("actual-header-removed", old);
|
|
203
203
|
}
|
|
204
|
-
this.$emit("
|
|
204
|
+
this.$emit("actual-header-added", el);
|
|
205
205
|
headerRefs[id] = el;
|
|
206
206
|
},
|
|
207
207
|
/**
|
|
@@ -4,11 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
<script>
|
|
6
6
|
import gsap from "gsap";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Animates a number from a previous value to a new value.
|
|
10
|
+
* @slot default - The default slot for customizing the display of the number.
|
|
11
|
+
* @binding {number} currentValue - The current animated value.
|
|
12
|
+
*/
|
|
7
13
|
export default {
|
|
8
14
|
name: 'AnimateNumber',
|
|
9
15
|
props: {
|
|
10
16
|
/**
|
|
11
|
-
*
|
|
17
|
+
* The target number to animate to.
|
|
12
18
|
*/
|
|
13
19
|
value: Number
|
|
14
20
|
},
|
|
@@ -1,94 +1,168 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class="progress-bar__label"
|
|
13
|
-
:class="{
|
|
14
|
-
'type-normal' : small,
|
|
15
|
-
'hidden-visually' : labelHidden,
|
|
16
|
-
}"
|
|
2
|
+
<div :class="componentClasses">
|
|
3
|
+
<div
|
|
4
|
+
v-if="label || $slots.label || $slots.icon || amountInHeader"
|
|
5
|
+
class="progress-bar__header"
|
|
6
|
+
>
|
|
7
|
+
<component
|
|
8
|
+
v-if="label"
|
|
9
|
+
:is="labelElement"
|
|
10
|
+
class="progress-bar__label"
|
|
11
|
+
:class="[classes.label, { 'hidden-visually': labelHidden }]"
|
|
17
12
|
>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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>
|
|
24
|
+
<div v-if="$slots.icon" class="progress-bar__icon">
|
|
25
|
+
<slot name="icon" />
|
|
23
26
|
</div>
|
|
24
27
|
</div>
|
|
25
28
|
<div class="progress-bar__track">
|
|
26
|
-
<div
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
></div>
|
|
30
|
-
<div
|
|
31
|
-
v-if="deficit"
|
|
29
|
+
<div class="progress-bar__bar" :style="{ width: barWidth }"></div>
|
|
30
|
+
<div
|
|
31
|
+
v-if="deficit > 0"
|
|
32
32
|
class="progress-bar__bar--deficit"
|
|
33
|
-
:style="
|
|
33
|
+
:style="{ width: deficitBarWidth }"
|
|
34
34
|
></div>
|
|
35
35
|
</div>
|
|
36
|
-
<div
|
|
36
|
+
<div
|
|
37
|
+
v-if="!noValues && !amountInHeader && (!loader && !indeterminate)"
|
|
38
|
+
class="progress-bar__values"
|
|
39
|
+
>
|
|
37
40
|
<div class="progress-bar__value progress-bar__value--amount">
|
|
38
41
|
<strong class="hidden-visually">Amount:</strong>
|
|
39
|
-
{{ amount }}
|
|
42
|
+
<slot name="valueAmount" :value="amount">{{ formatValue(amount, 'amount') }}</slot>
|
|
40
43
|
</div>
|
|
41
|
-
<div
|
|
42
|
-
v-if="deficit > 0"
|
|
43
|
-
class="progress-bar__value progress-bar__value--deficit color-status is-danger"
|
|
44
|
-
>
|
|
44
|
+
<div v-if="deficit > 0" class="progress-bar__value progress-bar__value--deficit">
|
|
45
45
|
<strong class="hidden-visually">Deficit: </strong>
|
|
46
|
-
|
|
46
|
+
<slot name="valueDeficit" :value="deficit">-{{ formatValue(deficit, 'deficit') }}</slot>
|
|
47
47
|
</div>
|
|
48
48
|
<div class="progress-bar__value progress-bar__value--total">
|
|
49
49
|
<strong class="hidden-visually">Total:</strong>
|
|
50
|
-
{{ total }}
|
|
50
|
+
<slot name="valueTotal" :value="total">{{ formatValue(total, 'total') }}</slot>
|
|
51
51
|
</div>
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
54
54
|
</template>
|
|
55
55
|
|
|
56
|
-
<script>
|
|
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
|
-
|
|
56
|
+
<script setup>
|
|
57
|
+
import { computed } from "vue";
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* A linear progress bar to display progress, with support for various styles and a deficit indicator.
|
|
61
|
+
* @slot icon - A slot for placing an icon in the header, typically to indicate status.
|
|
62
|
+
*/
|
|
63
|
+
const props = defineProps({
|
|
64
|
+
/**
|
|
65
|
+
* The label to display above the progress bar. (or use label slot)
|
|
66
|
+
*/
|
|
67
|
+
label: String,
|
|
68
|
+
/**
|
|
69
|
+
* Hides the label visually, but keeps it for screen readers.
|
|
70
|
+
*/
|
|
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
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* The current amount of progress.
|
|
88
|
+
*/
|
|
89
|
+
amount: {
|
|
90
|
+
type: Number,
|
|
91
|
+
default: 0,
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* The total amount that represents 100% progress.
|
|
95
|
+
*/
|
|
96
|
+
total: {
|
|
97
|
+
type: Number,
|
|
98
|
+
default: 100,
|
|
99
|
+
},
|
|
100
|
+
/**
|
|
101
|
+
* The amount of deficit to display on the bar.
|
|
102
|
+
*/
|
|
103
|
+
deficit: {
|
|
104
|
+
type: Number,
|
|
105
|
+
default: 0,
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* Renders a smaller version of the progress bar.
|
|
109
|
+
*/
|
|
110
|
+
small: Boolean,
|
|
111
|
+
/**
|
|
112
|
+
* Applies the 'positive' style (e.g., green).
|
|
113
|
+
*/
|
|
114
|
+
positive: Boolean,
|
|
115
|
+
/**
|
|
116
|
+
* Applies the 'negative' style (e.g., red).
|
|
117
|
+
*/
|
|
118
|
+
negative: Boolean,
|
|
119
|
+
/**
|
|
120
|
+
* Applies styles for use as a thin loader.
|
|
121
|
+
*/
|
|
122
|
+
loader: Boolean,
|
|
123
|
+
/**
|
|
124
|
+
* Applies an indeterminate animation for unknown progress.
|
|
125
|
+
*/
|
|
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
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
const getCssPercentage = (amount, total) => {
|
|
146
|
+
const percent = total === 0 ? 0 : (amount / total) * 100;
|
|
147
|
+
return `${ percent }%`;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const barWidth = computed(() => {
|
|
151
|
+
if (props.indeterminate) return null; // No value for width
|
|
152
|
+
return getCssPercentage(props.amount, props.total);
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
const deficitBarWidth = computed(() => getCssPercentage(props.deficit, props.total));
|
|
156
|
+
|
|
157
|
+
const componentClasses = computed(() => {
|
|
158
|
+
return {
|
|
159
|
+
'progress-bar': true,
|
|
160
|
+
'progress-bar--small': props.small,
|
|
161
|
+
'progress-bar--positive': props.positive,
|
|
162
|
+
'progress-bar--negative': props.negative,
|
|
163
|
+
'progress-bar--loader': props.loader,
|
|
164
|
+
'progress-bar--indeterminate': props.indeterminate,
|
|
165
|
+
'type-small': props.small, // From original component, seems to control font size
|
|
166
|
+
};
|
|
167
|
+
});
|
|
168
|
+
</script>
|