@ulu/frontend-vue 0.2.0-beta.8 → 0.3.0
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/components/collapsible/UluAccordionGroup.vue.d.ts +2 -2
- package/dist/components/collapsible/UluAccordionGroup.vue.d.ts.map +1 -1
- package/dist/components/collapsible/UluAccordionGroup.vue.js +22 -19
- package/dist/components/collapsible/UluDropdown.vue.d.ts +1 -1
- package/dist/components/collapsible/UluDropdown.vue.d.ts.map +1 -1
- package/dist/components/collapsible/UluDropdown.vue.js +22 -15
- package/dist/components/collapsible/UluModal.vue.d.ts +43 -248
- package/dist/components/collapsible/UluModal.vue.d.ts.map +1 -1
- package/dist/components/collapsible/UluModal.vue.js +139 -191
- package/dist/components/collapsible/UluTabGroup.vue.d.ts +2 -0
- package/dist/components/collapsible/UluTabGroup.vue.d.ts.map +1 -1
- package/dist/components/collapsible/UluTabGroup.vue.js +23 -14
- package/dist/components/elements/UluAlert.vue.d.ts +29 -144
- package/dist/components/elements/UluAlert.vue.d.ts.map +1 -1
- package/dist/components/elements/UluAlert.vue.js +39 -50
- package/dist/components/elements/UluBadge.vue.d.ts +6 -6
- package/dist/components/elements/UluBadgeStack.vue.d.ts +1 -1
- package/dist/components/elements/UluBadgeStack.vue.d.ts.map +1 -1
- package/dist/components/elements/UluBadgeStack.vue.js +12 -9
- package/dist/components/elements/UluButton.vue.d.ts +47 -177
- package/dist/components/elements/UluButton.vue.d.ts.map +1 -1
- package/dist/components/elements/UluButton.vue.js +59 -72
- package/dist/components/elements/UluButtonVerbose.vue.d.ts +38 -123
- package/dist/components/elements/UluButtonVerbose.vue.d.ts.map +1 -1
- package/dist/components/elements/UluButtonVerbose.vue.js +52 -65
- package/dist/components/elements/UluCallout.vue.d.ts +20 -25
- package/dist/components/elements/UluCallout.vue.d.ts.map +1 -1
- package/dist/components/elements/UluCallout.vue.js +11 -16
- package/dist/components/elements/UluCaptionedFigure.vue.d.ts +25 -0
- package/dist/components/elements/UluCaptionedFigure.vue.d.ts.map +1 -0
- package/dist/components/elements/UluCaptionedFigure.vue.js +48 -0
- package/dist/components/elements/UluCard.vue.d.ts +2 -2
- package/dist/components/elements/UluDefinitionList.vue.d.ts +4 -2
- package/dist/components/elements/UluDefinitionList.vue.d.ts.map +1 -1
- package/dist/components/elements/UluDefinitionList.vue.js +32 -28
- package/dist/components/elements/UluExternalLink.vue.d.ts +2 -2
- package/dist/components/elements/UluImage.vue.d.ts +14 -0
- package/dist/components/elements/UluImage.vue.d.ts.map +1 -0
- package/dist/components/elements/UluImage.vue.js +53 -0
- package/dist/components/elements/UluList.vue.d.ts.map +1 -1
- package/dist/components/elements/UluList.vue.js +14 -13
- package/dist/components/elements/UluOverflowScroller.vue.d.ts +49 -0
- package/dist/components/elements/UluOverflowScroller.vue.d.ts.map +1 -0
- package/dist/components/elements/UluOverflowScroller.vue.js +138 -0
- package/dist/components/elements/UluScrollSlider.vue.d.ts +38 -0
- package/dist/components/elements/UluScrollSlider.vue.d.ts.map +1 -0
- package/dist/components/elements/UluScrollSlider.vue.js +146 -0
- package/dist/components/elements/UluSlider.vue.d.ts +57 -0
- package/dist/components/elements/UluSlider.vue.d.ts.map +1 -0
- package/dist/components/elements/UluSlider.vue.js +277 -0
- package/dist/components/forms/UluFormFile.vue.d.ts +2 -2
- package/dist/components/forms/UluFormRadio.vue.d.ts +4 -4
- package/dist/components/index.d.ts +6 -0
- package/dist/components/layout/UluTitleRail.vue.d.ts +29 -87
- package/dist/components/layout/UluTitleRail.vue.d.ts.map +1 -1
- package/dist/components/layout/UluTitleRail.vue.js +51 -46
- package/dist/components/navigation/UluBreadcrumb.vue.d.ts +27 -68
- package/dist/components/navigation/UluBreadcrumb.vue.d.ts.map +1 -1
- package/dist/components/navigation/UluBreadcrumb.vue.js +51 -54
- package/dist/components/navigation/UluMenu.vue.d.ts +30 -138
- package/dist/components/navigation/UluMenu.vue.d.ts.map +1 -1
- package/dist/components/navigation/UluMenu.vue.js +85 -84
- package/dist/components/navigation/UluMenuStack.vue.d.ts +12 -2
- package/dist/components/navigation/UluMenuStack.vue.d.ts.map +1 -1
- package/dist/components/navigation/UluMenuStack.vue.js +26 -18
- package/dist/components/navigation/UluNavStrip.vue.d.ts +22 -134
- package/dist/components/navigation/UluNavStrip.vue.d.ts.map +1 -1
- package/dist/components/navigation/UluNavStrip.vue.js +43 -31
- package/dist/components/systems/facets/UluFacetsSidebarLayout.vue.js +10 -10
- package/dist/components/systems/facets/useFacets.d.ts +3 -0
- package/dist/components/systems/facets/useFacets.d.ts.map +1 -1
- package/dist/components/systems/facets/useFacets.js +124 -112
- package/dist/components/systems/index.d.ts +0 -3
- package/dist/components/systems/scroll-anchors/UluScrollAnchors.vue.d.ts +2 -2
- package/dist/components/systems/table-sticky/UluTableSticky.vue.d.ts +504 -432
- package/dist/components/systems/table-sticky/UluTableSticky.vue.d.ts.map +1 -1
- package/dist/components/systems/table-sticky/UluTableSticky.vue.js +313 -456
- package/dist/components/systems/table-sticky/UluTableStickyRows.vue.d.ts +40 -31
- package/dist/components/systems/table-sticky/UluTableStickyRows.vue.d.ts.map +1 -1
- package/dist/components/systems/table-sticky/UluTableStickyRows.vue.js +43 -45
- package/dist/components/systems/table-sticky/UluTableStickyTable.vue.d.ts +60 -146
- package/dist/components/systems/table-sticky/UluTableStickyTable.vue.d.ts.map +1 -1
- package/dist/components/systems/table-sticky/UluTableStickyTable.vue.js +156 -175
- package/dist/components/utils/UluAction.vue.d.ts +36 -0
- package/dist/components/utils/UluAction.vue.d.ts.map +1 -0
- package/dist/components/utils/UluAction.vue.js +59 -0
- package/dist/components/utils/UluConditionalText.vue.d.ts +7 -26
- package/dist/components/utils/UluConditionalText.vue.d.ts.map +1 -1
- package/dist/components/utils/UluConditionalText.vue.js +12 -14
- package/dist/components/utils/UluConditionalWrapper.vue.d.ts.map +1 -1
- package/dist/components/utils/UluConditionalWrapper.vue.js +11 -9
- package/dist/components/utils/UluPlaceholderImage.vue.d.ts +12 -57
- package/dist/components/utils/UluPlaceholderImage.vue.d.ts.map +1 -1
- package/dist/components/utils/UluPlaceholderImage.vue.js +18 -26
- package/dist/components/utils/UluPlaceholderText.vue.d.ts +6 -20
- package/dist/components/utils/UluPlaceholderText.vue.js +12 -14
- package/dist/components/utils/UluRouteAnnouncer.vue.d.ts +9 -58
- package/dist/components/utils/UluRouteAnnouncer.vue.d.ts.map +1 -1
- package/dist/components/utils/UluRouteAnnouncer.vue.js +28 -28
- package/dist/components/visualizations/UluAnimateNumber.vue.d.ts +20 -14
- package/dist/components/visualizations/UluAnimateNumber.vue.d.ts.map +1 -1
- package/dist/components/visualizations/UluAnimateNumber.vue.js +18 -26
- package/dist/components/visualizations/UluProgressCircle.vue.d.ts +2 -2
- package/dist/composables/useModifiers.d.ts +20 -25
- package/dist/composables/useModifiers.d.ts.map +1 -1
- package/dist/index.js +206 -200
- package/dist/plugins/modals/UluModalsDisplay.vue.d.ts +3 -12
- package/dist/plugins/modals/UluModalsDisplay.vue.js +24 -45
- package/dist/plugins/modals/index.js +6 -6
- package/dist/plugins/toast/UluToast.vue.d.ts +24 -49
- package/dist/plugins/toast/UluToast.vue.d.ts.map +1 -1
- package/dist/plugins/toast/UluToast.vue.js +68 -77
- package/dist/plugins/toast/UluToastDisplay.vue.d.ts +1 -9
- package/dist/plugins/toast/UluToastDisplay.vue.js +27 -35
- package/dist/plugins/toast/defaults.d.ts +40 -35
- package/dist/plugins/toast/defaults.js +2 -2
- package/dist/plugins/toast/index.js +4 -4
- package/dist/plugins/toast/store.d.ts +40 -35
- package/dist/plugins/toast/store.d.ts.map +1 -1
- package/dist/utils/props.d.ts +7 -0
- package/dist/utils/props.d.ts.map +1 -0
- package/dist/utils/props.js +6 -0
- package/lib/components/collapsible/UluAccordionGroup.vue +4 -1
- package/lib/components/collapsible/UluDropdown.vue +5 -1
- package/lib/components/collapsible/UluModal.vue +278 -298
- package/lib/components/collapsible/UluTabGroup.vue +21 -6
- package/lib/components/elements/UluAlert.vue +38 -51
- package/lib/components/elements/UluBadgeStack.vue +4 -1
- package/lib/components/elements/UluButton.vue +105 -129
- package/lib/components/elements/UluButtonVerbose.vue +67 -89
- package/lib/components/elements/UluCallout.vue +15 -19
- package/lib/components/elements/UluCaptionedFigure.vue +40 -0
- package/lib/components/elements/UluDefinitionList.vue +27 -6
- package/lib/components/elements/UluImage.vue +56 -0
- package/lib/components/elements/UluList.vue +1 -0
- package/lib/components/elements/UluOverflowScroller.vue +140 -0
- package/lib/components/elements/UluScrollSlider.vue +150 -0
- package/lib/components/elements/UluSlider.vue +488 -0
- package/lib/components/index.js +10 -0
- package/lib/components/layout/UluTitleRail.vue +55 -48
- package/lib/components/navigation/UluBreadcrumb.vue +29 -34
- package/lib/components/navigation/UluMenu.vue +60 -71
- package/lib/components/navigation/UluMenuStack.vue +6 -1
- package/lib/components/navigation/UluNavStrip.vue +43 -31
- package/lib/components/systems/facets/useFacets.js +33 -17
- package/lib/components/systems/index.js +0 -4
- package/lib/components/systems/table-sticky/UluTableSticky.vue +602 -576
- package/lib/components/systems/table-sticky/UluTableStickyRows.vue +16 -27
- package/lib/components/systems/table-sticky/UluTableStickyTable.vue +95 -96
- package/lib/components/utils/UluAction.vue +81 -0
- package/lib/components/utils/UluConditionalText.vue +13 -16
- package/lib/components/utils/UluConditionalWrapper.vue +5 -1
- package/lib/components/utils/UluPlaceholderImage.vue +44 -46
- package/lib/components/utils/UluPlaceholderText.vue +10 -13
- package/lib/components/utils/UluRouteAnnouncer.vue +59 -47
- package/lib/components/visualizations/UluAnimateNumber.vue +23 -30
- package/lib/composables/useModifiers.js +21 -26
- package/lib/plugins/modals/UluModalsDisplay.vue +44 -45
- package/lib/plugins/toast/UluToast.vue +28 -34
- package/lib/plugins/toast/UluToastDisplay.vue +9 -15
- package/lib/utils/props.js +8 -0
- package/package.json +9 -5
- package/dist/components/systems/slider/UluImageSlideShow.vue.d.ts +0 -130
- package/dist/components/systems/slider/UluImageSlideShow.vue.d.ts.map +0 -1
- package/dist/components/systems/slider/UluImageSlideShow.vue.js +0 -73
- package/dist/components/systems/slider/UluSlideShow.vue.d.ts +0 -205
- package/dist/components/systems/slider/UluSlideShow.vue.d.ts.map +0 -1
- package/dist/components/systems/slider/UluSlideShow.vue.js +0 -292
- package/dist/components/systems/slider/UluSlideShowSlide.vue.d.ts +0 -17
- package/dist/components/systems/slider/UluSlideShowSlide.vue.d.ts.map +0 -1
- package/dist/components/systems/slider/UluSlideShowSlide.vue.js +0 -26
- package/lib/components/systems/slider/UluImageSlideShow.vue +0 -75
- package/lib/components/systems/slider/UluSlideShow.vue +0 -336
- package/lib/components/systems/slider/UluSlideShowSlide.vue +0 -25
|
@@ -2,37 +2,30 @@
|
|
|
2
2
|
<span><slot :currentValue="currentValue">{{ currentValue }}</slot></span>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
|
-
<script>
|
|
5
|
+
<script setup>
|
|
6
|
+
import { ref, watch, reactive } from "vue";
|
|
6
7
|
import gsap from "gsap";
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
});
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
/**
|
|
11
|
+
* The target number to animate to.
|
|
12
|
+
*/
|
|
13
|
+
value: Number
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const currentValue = ref(props.value);
|
|
17
|
+
|
|
18
|
+
// Need an object for GSAP to animate its properties
|
|
19
|
+
const animationState = reactive({
|
|
20
|
+
tweenValue: props.value
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
watch(() => props.value, (newValue) => {
|
|
24
|
+
gsap.to(animationState, {
|
|
25
|
+
tweenValue: newValue,
|
|
26
|
+
onUpdate: () => {
|
|
27
|
+
currentValue.value = Math.ceil(animationState.tweenValue);
|
|
29
28
|
},
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return {
|
|
33
|
-
currentValue: this.value,
|
|
34
|
-
tweenValue: this.value,
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
38
31
|
</script>
|
|
@@ -24,37 +24,32 @@ import { normalizeClasses } from "@ulu/utils/templating.js";
|
|
|
24
24
|
* <div :class="[resolvedModifiers, 'other-class']"></div>
|
|
25
25
|
* </template>
|
|
26
26
|
*
|
|
27
|
-
* <script>
|
|
27
|
+
* <script setup>
|
|
28
28
|
* import { computed, ref } from 'vue';
|
|
29
29
|
* import { useModifiers } from './composables/useModifiers.js'; // Adjust path
|
|
30
30
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* const isHovered = ref(false);
|
|
39
|
-
*
|
|
40
|
-
* // Define component-internal modifiers based on props or local state
|
|
41
|
-
* const internalModifiers = computed(() => ({
|
|
42
|
-
* [props.variant]: !!props.variant, // Add 'primary' or 'secondary' if prop exists
|
|
43
|
-
* 'active': props.isActive, // Add 'active' if isActive prop is true
|
|
44
|
-
* 'hovered': isHovered.value, // Add 'hovered' if local state is true
|
|
45
|
-
* 'default': !props.variant && !props.isActive // Add 'default' if no variant/active
|
|
46
|
-
* }));
|
|
31
|
+
* const props = defineProps({
|
|
32
|
+
* variant: String, // e.g., 'primary', 'secondary'
|
|
33
|
+
* isActive: Boolean,
|
|
34
|
+
* modifiers: [String, Array, Object] // User-passed modifiers
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* const isHovered = ref(false);
|
|
47
38
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
39
|
+
* // Define component-internal modifiers based on props or local state
|
|
40
|
+
* const internalModifiers = computed(() => ({
|
|
41
|
+
* [props.variant]: !!props.variant, // Add 'primary' or 'secondary' if prop exists
|
|
42
|
+
* 'active': props.isActive, // Add 'active' if isActive prop is true
|
|
43
|
+
* 'hovered': isHovered.value, // Add 'hovered' if local state is true
|
|
44
|
+
* 'default': !props.variant && !props.isActive // Add 'default' if no variant/active
|
|
45
|
+
* }));
|
|
54
46
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
47
|
+
* // Use the composable to get the combined modifier classes
|
|
48
|
+
* const { resolvedModifiers } = useModifiers({
|
|
49
|
+
* props: props, // Pass component props for 'modifiers' prop
|
|
50
|
+
* baseClass: 'button', // The BEM block name
|
|
51
|
+
* internal: internalModifiers // The computed internal modifiers
|
|
52
|
+
* });
|
|
58
53
|
* </script>
|
|
59
54
|
*
|
|
60
55
|
* // Resulting class examples for 'my-component':
|
|
@@ -9,51 +9,50 @@
|
|
|
9
9
|
/>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
|
-
<script>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
// Watch for changes in the local state (e.g., when the modal emits 'update:modelValue')
|
|
42
|
-
open(newValue) {
|
|
43
|
-
if (!newValue && this.currentModal) {
|
|
44
|
-
this.$uluModals.close();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
methods: {
|
|
49
|
-
modalMounted() {
|
|
50
|
-
this.$emit("modal-mount", { modal: this.currentModal });
|
|
51
|
-
},
|
|
52
|
-
modalUnmounted() {
|
|
53
|
-
this.$nextTick(() => {
|
|
54
|
-
this.$emit("modal-unmount");
|
|
55
|
-
});
|
|
56
|
-
}
|
|
12
|
+
<script setup>
|
|
13
|
+
import { ref, computed, watch, nextTick, inject } from "vue";
|
|
14
|
+
import { modalsState } from "./api.js";
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits([
|
|
17
|
+
"modal-unmount",
|
|
18
|
+
"modal-mount"
|
|
19
|
+
]);
|
|
20
|
+
|
|
21
|
+
const uluModals = inject("uluModals");
|
|
22
|
+
|
|
23
|
+
const open = ref(false);
|
|
24
|
+
|
|
25
|
+
const currentModal = computed(() => {
|
|
26
|
+
return modalsState.data?.active;
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const currentProps = computed(() => {
|
|
30
|
+
return modalsState.data?.activeProps;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Watch for changes in the global state (e.g., when $uluModals.open() is called)
|
|
34
|
+
watch(currentModal, (newValue) => {
|
|
35
|
+
if (newValue) {
|
|
36
|
+
open.value = true;
|
|
37
|
+
} else {
|
|
38
|
+
open.value = false;
|
|
57
39
|
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// Watch for changes in the local state (e.g., when the modal emits 'update:modelValue')
|
|
43
|
+
watch(open, (newValue) => {
|
|
44
|
+
if (!newValue && currentModal.value) {
|
|
45
|
+
uluModals?.close();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const modalMounted = () => {
|
|
50
|
+
emit("modal-mount", { modal: currentModal.value });
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const modalUnmounted = () => {
|
|
54
|
+
nextTick(() => {
|
|
55
|
+
emit("modal-unmount");
|
|
56
|
+
});
|
|
58
57
|
};
|
|
59
58
|
</script>
|
|
@@ -48,40 +48,34 @@
|
|
|
48
48
|
</div>
|
|
49
49
|
</template>
|
|
50
50
|
|
|
51
|
-
<script>
|
|
51
|
+
<script setup>
|
|
52
|
+
import { nextTick } from "vue";
|
|
52
53
|
import UluIcon from "../../components/elements/UluIcon.vue";
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
actions: "type-small-x",
|
|
72
|
-
action: "button button--small button--outline",
|
|
73
|
-
closeButton: "button button--icon button--transparent"
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
methods: {
|
|
78
|
-
handleAction(event, action) {
|
|
79
|
-
const { toast } = this;
|
|
80
|
-
this.toast.close();
|
|
81
|
-
this.$nextTick(() => {
|
|
82
|
-
action(event, toast, action);
|
|
83
|
-
});
|
|
84
|
-
}
|
|
54
|
+
|
|
55
|
+
const props = defineProps({
|
|
56
|
+
/**
|
|
57
|
+
* Toast configuration
|
|
58
|
+
*/
|
|
59
|
+
toast: Object,
|
|
60
|
+
/**
|
|
61
|
+
* Icons for each element { icon, header, content, date, actions, action, closeButton, title, body, closeButton }
|
|
62
|
+
*/
|
|
63
|
+
classes: {
|
|
64
|
+
type: Object,
|
|
65
|
+
default: () => ({
|
|
66
|
+
content: "type-small",
|
|
67
|
+
date: "type-small-x",
|
|
68
|
+
actions: "type-small-x",
|
|
69
|
+
action: "button button--small button--outline",
|
|
70
|
+
closeButton: "button button--icon button--transparent"
|
|
71
|
+
})
|
|
85
72
|
}
|
|
86
|
-
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
const handleAction = (event, action) => {
|
|
76
|
+
props.toast.close();
|
|
77
|
+
nextTick(() => {
|
|
78
|
+
action(event, props.toast, action);
|
|
79
|
+
});
|
|
80
|
+
};
|
|
87
81
|
</script>
|
|
@@ -16,22 +16,16 @@
|
|
|
16
16
|
</Teleport>
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
|
-
<script>
|
|
19
|
+
<script setup>
|
|
20
|
+
import { computed } from "vue";
|
|
20
21
|
import { store } from "./store.js";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
classes() {
|
|
29
|
-
const { position } = this.pluginOptions;
|
|
30
|
-
const positionClasses = position.map(p => `toast-container--${ p }`);
|
|
31
|
-
return positionClasses;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
22
|
+
|
|
23
|
+
const { toasts, pluginOptions } = store;
|
|
24
|
+
|
|
25
|
+
const classes = computed(() => {
|
|
26
|
+
const { position } = pluginOptions;
|
|
27
|
+
return position.map(p => `toast-container--${ p }`);
|
|
28
|
+
});
|
|
35
29
|
</script>
|
|
36
30
|
|
|
37
31
|
<style lang="css">
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ulu/frontend-vue",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A modular
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "A modular, tree-shakeable Vue 3 component library for the Ulu Frontend theming system, plus general utilities for Vue development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -43,9 +43,13 @@
|
|
|
43
43
|
"components",
|
|
44
44
|
"component-library",
|
|
45
45
|
"design-system",
|
|
46
|
+
"tree-shakeable",
|
|
46
47
|
"ulu",
|
|
47
48
|
"frontend",
|
|
48
|
-
"scss"
|
|
49
|
+
"scss",
|
|
50
|
+
"sass",
|
|
51
|
+
"theme",
|
|
52
|
+
"utilities"
|
|
49
53
|
],
|
|
50
54
|
"author": "Joseph Scherben <jscherbe@gmail.com>",
|
|
51
55
|
"license": "MIT",
|
|
@@ -61,7 +65,7 @@
|
|
|
61
65
|
"@fortawesome/vue-fontawesome": "^3.0.8",
|
|
62
66
|
"@headlessui/vue": "^1.7.23",
|
|
63
67
|
"@portabletext/vue": "^1.0.14",
|
|
64
|
-
"@ulu/frontend": "^0.
|
|
68
|
+
"@ulu/frontend": "^0.3.0",
|
|
65
69
|
"@ulu/utils": "^0.0.34",
|
|
66
70
|
"@unhead/vue": "^2.0.11",
|
|
67
71
|
"fuse.js": "^6.6.2",
|
|
@@ -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.
|
|
90
|
+
"@ulu/frontend": "^0.3.3",
|
|
87
91
|
"@ulu/utils": "^0.0.34",
|
|
88
92
|
"@unhead/vue": "^2.0.11",
|
|
89
93
|
"@vitejs/plugin-vue": "^6.0.0",
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
-
images: ArrayConstructor;
|
|
3
|
-
selectButton: BooleanConstructor;
|
|
4
|
-
}>, {}, {}, {}, {
|
|
5
|
-
/**
|
|
6
|
-
* Test to see if the active slide's nav button (thumbnail) is in view
|
|
7
|
-
* if not, scroll the nav to ensure it is visible. This function will take
|
|
8
|
-
* into account which side of the overflow nav the item is hidden in and will
|
|
9
|
-
* scroll either to fit it to the flush end (if overflow to the right) or flush start
|
|
10
|
-
*/
|
|
11
|
-
slideChange({ slide, nav }: {
|
|
12
|
-
slide: any;
|
|
13
|
-
nav: any;
|
|
14
|
-
}): void;
|
|
15
|
-
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
16
|
-
images: ArrayConstructor;
|
|
17
|
-
selectButton: BooleanConstructor;
|
|
18
|
-
}>> & Readonly<{}>, {
|
|
19
|
-
selectButton: boolean;
|
|
20
|
-
}, {}, {
|
|
21
|
-
UluSlideShow: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
22
|
-
slideFocusable: BooleanConstructor;
|
|
23
|
-
focusOptions: {
|
|
24
|
-
type: ObjectConstructor;
|
|
25
|
-
default: () => {
|
|
26
|
-
preventScroll: boolean;
|
|
27
|
-
focusVisible: boolean;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
items: ArrayConstructor;
|
|
31
|
-
noNav: BooleanConstructor;
|
|
32
|
-
scrollBehaviorNav: {
|
|
33
|
-
type: StringConstructor;
|
|
34
|
-
default: string;
|
|
35
|
-
};
|
|
36
|
-
scrollBehaviorControl: {
|
|
37
|
-
type: StringConstructor;
|
|
38
|
-
default: string;
|
|
39
|
-
};
|
|
40
|
-
observerOptions: {
|
|
41
|
-
type: ObjectConstructor;
|
|
42
|
-
default: () => {
|
|
43
|
-
threshhold: number;
|
|
44
|
-
rootMargin: string;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
initialActive: {
|
|
48
|
-
type: NumberConstructor;
|
|
49
|
-
default: number;
|
|
50
|
-
};
|
|
51
|
-
scrollAmount: (FunctionConstructor | NumberConstructor)[];
|
|
52
|
-
}>, {}, {
|
|
53
|
-
slides: any;
|
|
54
|
-
}, {
|
|
55
|
-
canScrollRight(): boolean;
|
|
56
|
-
canScrollLeft(): boolean;
|
|
57
|
-
}, {
|
|
58
|
-
createSlides(): {
|
|
59
|
-
element: null;
|
|
60
|
-
active: boolean;
|
|
61
|
-
item: unknown;
|
|
62
|
-
}[];
|
|
63
|
-
getSlideByElement(el: any): any;
|
|
64
|
-
getScrollData(): {
|
|
65
|
-
scrollLeft: any;
|
|
66
|
-
offsetWidth: any;
|
|
67
|
-
scrollWidth: any;
|
|
68
|
-
};
|
|
69
|
-
resolveAmount(dir: any): any;
|
|
70
|
-
scrollTo(left: any, behavior: any): void;
|
|
71
|
-
to(index: number): void;
|
|
72
|
-
next(): void;
|
|
73
|
-
previous(): void;
|
|
74
|
-
createObserver(): void;
|
|
75
|
-
observeSlides(): void;
|
|
76
|
-
destroyObserver(): void;
|
|
77
|
-
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "slide-change"[], "slide-change", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
78
|
-
slideFocusable: BooleanConstructor;
|
|
79
|
-
focusOptions: {
|
|
80
|
-
type: ObjectConstructor;
|
|
81
|
-
default: () => {
|
|
82
|
-
preventScroll: boolean;
|
|
83
|
-
focusVisible: boolean;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
items: ArrayConstructor;
|
|
87
|
-
noNav: BooleanConstructor;
|
|
88
|
-
scrollBehaviorNav: {
|
|
89
|
-
type: StringConstructor;
|
|
90
|
-
default: string;
|
|
91
|
-
};
|
|
92
|
-
scrollBehaviorControl: {
|
|
93
|
-
type: StringConstructor;
|
|
94
|
-
default: string;
|
|
95
|
-
};
|
|
96
|
-
observerOptions: {
|
|
97
|
-
type: ObjectConstructor;
|
|
98
|
-
default: () => {
|
|
99
|
-
threshhold: number;
|
|
100
|
-
rootMargin: string;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
initialActive: {
|
|
104
|
-
type: NumberConstructor;
|
|
105
|
-
default: number;
|
|
106
|
-
};
|
|
107
|
-
scrollAmount: (FunctionConstructor | NumberConstructor)[];
|
|
108
|
-
}>> & Readonly<{
|
|
109
|
-
"onSlide-change"?: ((...args: any[]) => any) | undefined;
|
|
110
|
-
}>, {
|
|
111
|
-
observerOptions: Record<string, any>;
|
|
112
|
-
slideFocusable: boolean;
|
|
113
|
-
noNav: boolean;
|
|
114
|
-
focusOptions: Record<string, any>;
|
|
115
|
-
scrollBehaviorNav: string;
|
|
116
|
-
scrollBehaviorControl: string;
|
|
117
|
-
initialActive: number;
|
|
118
|
-
}, {}, {
|
|
119
|
-
UluIcon: import('vue').DefineComponent<{}, {
|
|
120
|
-
spaced: boolean;
|
|
121
|
-
icon?: string | boolean | Record<string, any> | unknown[] | undefined;
|
|
122
|
-
$props: {
|
|
123
|
-
readonly spaced?: boolean | undefined;
|
|
124
|
-
readonly icon?: string | boolean | Record<string, any> | unknown[] | undefined;
|
|
125
|
-
};
|
|
126
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
127
|
-
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
128
|
-
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
129
|
-
export default _default;
|
|
130
|
-
//# sourceMappingURL=UluImageSlideShow.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UluImageSlideShow.vue.d.ts","sourceRoot":"","sources":["../../../../lib/components/systems/slider/UluImageSlideShow.vue"],"names":[],"mappings":"AA2BA;;;;;IA4FM;;;;;OAKG"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import _ from "./UluSlideShow.vue.js";
|
|
2
|
-
import { resolveComponent as h, createBlock as u, openBlock as g, withCtx as a, createElementVNode as r, createCommentVNode as p, createTextVNode as S } from "vue";
|
|
3
|
-
import w from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const B = {
|
|
5
|
-
name: "ImageSlideShow",
|
|
6
|
-
components: {
|
|
7
|
-
UluSlideShow: _
|
|
8
|
-
},
|
|
9
|
-
props: {
|
|
10
|
-
images: Array,
|
|
11
|
-
selectButton: Boolean
|
|
12
|
-
},
|
|
13
|
-
watch: {
|
|
14
|
-
images() {
|
|
15
|
-
console.log("watch image from outer");
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
methods: {
|
|
19
|
-
/**
|
|
20
|
-
* Test to see if the active slide's nav button (thumbnail) is in view
|
|
21
|
-
* if not, scroll the nav to ensure it is visible. This function will take
|
|
22
|
-
* into account which side of the overflow nav the item is hidden in and will
|
|
23
|
-
* scroll either to fit it to the flush end (if overflow to the right) or flush start
|
|
24
|
-
*/
|
|
25
|
-
slideChange({ slide: m, nav: o }) {
|
|
26
|
-
const { active: s, navElement: n } = m;
|
|
27
|
-
if (!n) return;
|
|
28
|
-
const { offsetWidth: d, scrollLeft: t } = o, { offsetLeft: l, offsetWidth: c } = n, e = t + d, f = l + c;
|
|
29
|
-
let i = null;
|
|
30
|
-
console.log("left/right", t, e), s && n && (f > e ? i = t + (f - e) : l < t && (i = l), i !== null && o.scrollTo({ left: i, top: 0, behavior: "smooth" }));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}, v = ["src", "alt"], C = { class: "slideshow__image-actions" }, x = ["src", "alt"];
|
|
34
|
-
function U(m, o, s, n, d, t) {
|
|
35
|
-
const l = h("AppButton"), c = h("UluSlideShow");
|
|
36
|
-
return g(), u(c, {
|
|
37
|
-
class: "slideshow--images",
|
|
38
|
-
items: s.images,
|
|
39
|
-
onSlideChange: t.slideChange
|
|
40
|
-
}, {
|
|
41
|
-
slide: a(({ item: e }) => [
|
|
42
|
-
r("img", {
|
|
43
|
-
src: e.src,
|
|
44
|
-
alt: e.alt
|
|
45
|
-
}, null, 8, v),
|
|
46
|
-
r("div", C, [
|
|
47
|
-
s.selectButton ? (g(), u(l, {
|
|
48
|
-
key: 0,
|
|
49
|
-
class: "type-small",
|
|
50
|
-
icon: "plus",
|
|
51
|
-
small: "",
|
|
52
|
-
iconBefore: ""
|
|
53
|
-
}, {
|
|
54
|
-
default: a(() => [...o[0] || (o[0] = [
|
|
55
|
-
S(" Select ", -1)
|
|
56
|
-
])]),
|
|
57
|
-
_: 1
|
|
58
|
-
})) : p("", !0)
|
|
59
|
-
])
|
|
60
|
-
]),
|
|
61
|
-
nav: a(({ index: e }) => [
|
|
62
|
-
r("img", {
|
|
63
|
-
src: s.images[e].src,
|
|
64
|
-
alt: `View image ${e}`
|
|
65
|
-
}, null, 8, x)
|
|
66
|
-
]),
|
|
67
|
-
_: 1
|
|
68
|
-
}, 8, ["items", "onSlideChange"]);
|
|
69
|
-
}
|
|
70
|
-
const A = /* @__PURE__ */ w(B, [["render", U]]);
|
|
71
|
-
export {
|
|
72
|
-
A as default
|
|
73
|
-
};
|