@ulu/frontend-vue 0.6.21 → 0.6.23

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.
@@ -1 +1 @@
1
- {"version":3,"file":"UluToastDisplay.vue.d.ts","sourceRoot":"","sources":["../../../lib/plugins/toast/UluToastDisplay.vue"],"names":[],"mappings":"AAiBA;"}
1
+ {"version":3,"file":"UluToastDisplay.vue.d.ts","sourceRoot":"","sources":["../../../lib/plugins/toast/UluToastDisplay.vue"],"names":[],"mappings":"AAkBA;"}
@@ -1,9 +1,9 @@
1
- import { computed as i, createBlock as r, openBlock as e, Teleport as p, unref as s, createVNode as u, TransitionGroup as m, normalizeClass as _, withCtx as d, createElementBlock as f, Fragment as k, renderList as T, resolveDynamicComponent as g } from "vue";
2
- import { store as v } from "./store.js";
1
+ import { computed as l, createBlock as r, openBlock as e, Teleport as p, unref as s, createVNode as u, TransitionGroup as m, normalizeClass as _, withCtx as d, createElementBlock as f, Fragment as k, renderList as y, resolveDynamicComponent as T } from "vue";
2
+ import { store as g } from "./store.js";
3
3
  const C = {
4
4
  __name: "UluToastDisplay",
5
- setup(x) {
6
- const { toasts: c, pluginOptions: o } = v, l = i(() => {
5
+ setup(v) {
6
+ const { toasts: c, pluginOptions: o } = g, i = l(() => {
7
7
  const { position: n } = o;
8
8
  return n.map((a) => `toast-container--${a}`);
9
9
  });
@@ -11,12 +11,13 @@ const C = {
11
11
  to: s(o).teleportTo
12
12
  }, [
13
13
  u(m, {
14
- class: _(["toast-container", l.value]),
14
+ class: _(["toast-container", i.value]),
15
15
  name: "toast-animation",
16
- tag: "div"
16
+ tag: "div",
17
+ type: "transition"
17
18
  }, {
18
19
  default: d(() => [
19
- (e(!0), f(k, null, T(s(c), (t) => (e(), r(g(t.component), {
20
+ (e(!0), f(k, null, y(s(c), (t) => (e(), r(T(t.component), {
20
21
  key: t.uid,
21
22
  toast: t
22
23
  }, null, 8, ["toast"]))), 128))
@@ -4,7 +4,7 @@
4
4
  :model-value="resolvedModelValue"
5
5
  :start-open="startOpen"
6
6
  :trigger-text="triggerText"
7
- :classes="mergedClasses"
7
+ :classes="resolvedClasses"
8
8
  :animate="animate"
9
9
  @update:model-value="handleUpdateModelValue"
10
10
  >
@@ -15,7 +15,7 @@
15
15
  </component>
16
16
  </slot>
17
17
  <slot name="icon" :isOpen="isOpen">
18
- <span class="accordion__icon" :class="classes.icon">
18
+ <span :class="resolvedClasses.icon">
19
19
  <UluIcon
20
20
  :icon="isOpen ? 'type:collapse' : 'type:expand'"
21
21
  style="display: inline;"
@@ -36,6 +36,15 @@
36
36
  import UluCollapsible from "./UluCollapsible.vue";
37
37
  import { useModifiers } from "../../composables/useModifiers.js";
38
38
  import { newId } from "../../utils/dom.js";
39
+ import { mergeClassLookups } from "../../utils/props.js";
40
+
41
+ const DEFAULT_CLASSES = {
42
+ container: 'accordion',
43
+ trigger: 'accordion__summary',
44
+ content: 'accordion__content',
45
+ containerOpen: 'is-active',
46
+ icon: 'accordion__icon'
47
+ };
39
48
 
40
49
  const props = defineProps({
41
50
  /**
@@ -76,13 +85,8 @@
76
85
  * - Any valid class binding value per element
77
86
  */
78
87
  classes: {
79
- type: Object,
80
- default: () => ({
81
- container: 'accordion',
82
- trigger: 'accordion__summary',
83
- content: 'accordion__content',
84
- containerOpen: 'is-active'
85
- })
88
+ type: [Object, Boolean, Function],
89
+ default: () => ({})
86
90
  },
87
91
  /**
88
92
  * Class modifiers (ie. 'transparent', 'secondary', etc)
@@ -94,8 +98,8 @@
94
98
 
95
99
  const { resolvedModifiers } = useModifiers({ props, baseClass: "accordion" });
96
100
 
97
- const mergedClasses = computed(() => {
98
- const merged = { ...props.classes };
101
+ const resolvedClasses = computed(() => {
102
+ const merged = mergeClassLookups(DEFAULT_CLASSES, props.classes);
99
103
  merged.container = [merged.container, resolvedModifiers.value];
100
104
  return merged;
101
105
  });
@@ -5,6 +5,7 @@
5
5
  :class="classes"
6
6
  name="toast-animation"
7
7
  tag="div"
8
+ type="transition"
8
9
  >
9
10
  <component
10
11
  v-for="toast in toasts"
@@ -195,4 +195,9 @@ $config: (
195
195
  position: absolute;
196
196
  width: 100%;
197
197
  }
198
+ // Add this so transitioning toasts can never intercept clicks
199
+ .toast-animation-enter-active,
200
+ .toast-animation-leave-active {
201
+ pointer-events: none;
202
+ }
198
203
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ulu/frontend-vue",
3
- "version": "0.6.21",
3
+ "version": "0.6.23",
4
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": [