@ulu/frontend-vue 0.1.0-beta.6 → 0.1.0-beta.8
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-SWofnYUx.js → breakpoints-D2CIgld-.js} +1 -1
- package/dist/frontend-vue.js +22 -21
- package/dist/{index-CtdKSn3_.js → index-BuKf_eWi.js} +845 -828
- package/lib/components/layout/UluAdaptiveLayout.vue +3 -5
- package/lib/components/layout/UluWhenBreakpoint.vue +71 -77
- package/lib/composables/index.js +1 -0
- package/lib/composables/useRequiredInject.js +26 -0
- package/lib/meta.js +14 -0
- package/package.json +3 -2
- package/types/components/index.d.ts +2 -0
- package/types/components/index.d.ts.map +1 -0
- package/types/components/systems/index.d.ts +2 -0
- package/types/components/systems/index.d.ts.map +1 -0
- package/types/components/systems/scroll-anchors/symbols.d.ts +7 -0
- package/types/components/systems/scroll-anchors/symbols.d.ts.map +1 -0
- package/types/composables/index.d.ts +6 -0
- package/types/composables/index.d.ts.map +1 -0
- package/types/composables/useBreakpointManager.d.ts +8 -0
- package/types/composables/useBreakpointManager.d.ts.map +1 -0
- package/types/composables/useIcon.d.ts +6 -0
- package/types/composables/useIcon.d.ts.map +1 -0
- package/types/composables/useModifiers.d.ts +69 -0
- package/types/composables/useModifiers.d.ts.map +1 -0
- package/types/composables/useRequiredInject.d.ts +8 -0
- package/types/composables/useRequiredInject.d.ts.map +1 -0
- package/types/composables/useWindowResize.d.ts +6 -0
- package/types/composables/useWindowResize.d.ts.map +1 -0
- package/types/index.d.ts +4 -0
- package/types/index.d.ts.map +1 -0
- package/types/meta.d.ts +10 -0
- package/types/meta.d.ts.map +1 -0
- package/types/plugins/breakpoints/index.d.ts +2 -0
- package/types/plugins/breakpoints/index.d.ts.map +1 -0
- package/types/plugins/core/index.d.ts +3 -0
- package/types/plugins/core/index.d.ts.map +1 -0
- package/types/plugins/index.d.ts +6 -0
- package/types/plugins/index.d.ts.map +1 -0
- package/types/plugins/modals/api.d.ts +34 -0
- package/types/plugins/modals/api.d.ts.map +1 -0
- package/types/plugins/modals/index.d.ts +28 -0
- package/types/plugins/modals/index.d.ts.map +1 -0
- package/types/plugins/modals/useModals.d.ts +2 -0
- package/types/plugins/modals/useModals.d.ts.map +1 -0
- package/types/plugins/popovers/defaults.d.ts +14 -0
- package/types/plugins/popovers/defaults.d.ts.map +1 -0
- package/types/plugins/popovers/directive.d.ts +8 -0
- package/types/plugins/popovers/directive.d.ts.map +1 -0
- package/types/plugins/popovers/index.d.ts +7 -0
- package/types/plugins/popovers/index.d.ts.map +1 -0
- package/types/plugins/popovers/manager.d.ts +52 -0
- package/types/plugins/popovers/manager.d.ts.map +1 -0
- package/types/plugins/popovers/useFollow.d.ts +31 -0
- package/types/plugins/popovers/useFollow.d.ts.map +1 -0
- package/types/plugins/popovers/utils.d.ts +2 -0
- package/types/plugins/popovers/utils.d.ts.map +1 -0
- package/types/plugins/toast/defaults.d.ts +15 -0
- package/types/plugins/toast/defaults.d.ts.map +1 -0
- package/types/plugins/toast/index.d.ts +5 -0
- package/types/plugins/toast/index.d.ts.map +1 -0
- package/types/plugins/toast/store.d.ts +22 -0
- package/types/plugins/toast/store.d.ts.map +1 -0
- package/types/plugins/toast/useToast.d.ts +2 -0
- package/types/plugins/toast/useToast.d.ts.map +1 -0
- package/types/utils/dom.d.ts +8 -0
- package/types/utils/dom.d.ts.map +1 -0
- package/types/utils/placeholder.d.ts +8 -0
- package/types/utils/placeholder.d.ts.map +1 -0
- package/types/utils/vue-router.d.ts +122 -0
- package/types/utils/vue-router.d.ts.map +1 -0
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
<slot v-else name="mobile" />
|
|
4
4
|
</template>
|
|
5
5
|
|
|
6
|
-
<script>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
inject: ["uluIsMobile"],
|
|
10
|
-
};
|
|
6
|
+
<script setup>
|
|
7
|
+
import { useRequiredInject } from '../../composables/useRequiredInject.js';
|
|
8
|
+
const uluIsMobile = useRequiredInject('uluIsMobile');
|
|
11
9
|
</script>
|
|
@@ -2,85 +2,79 @@
|
|
|
2
2
|
<slot v-if="shouldShow" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
|
-
<script>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
data() {
|
|
15
|
-
return {
|
|
16
|
-
conditions: {},
|
|
17
|
-
handlers: [],
|
|
18
|
-
handlersSetup: false,
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
computed: {
|
|
22
|
-
shouldShow() {
|
|
23
|
-
if (!this.handlersSetup) return false;
|
|
24
|
-
const props = ['max', 'min', 'only'].filter(p => this[p]);
|
|
25
|
-
if (props.length === 0) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
return Object.values(this.conditions).every(c => c);
|
|
29
|
-
},
|
|
30
|
-
propsIdentifier() {
|
|
31
|
-
return `${this.max || ''}-${this.min || ''}-${this.only || ''}`;
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
watch: {
|
|
35
|
-
uluBreakpointManager: {
|
|
36
|
-
handler(manager) {
|
|
37
|
-
if (manager && !this.handlersSetup) {
|
|
38
|
-
this.setupHandlers(manager);
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
immediate: true
|
|
42
|
-
},
|
|
43
|
-
propsIdentifier() {
|
|
44
|
-
if (this.uluBreakpointManager && this.handlersSetup) {
|
|
45
|
-
this.tearDownHandlers();
|
|
46
|
-
this.setupHandlers(this.uluBreakpointManager);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
methods: {
|
|
51
|
-
setupHandlers(manager) {
|
|
52
|
-
const setupCondition = (direction) => {
|
|
53
|
-
const breakpointName = this[direction];
|
|
54
|
-
if (breakpointName) {
|
|
55
|
-
this.conditions[direction] = false;
|
|
56
|
-
const handler = {
|
|
57
|
-
on: () => { this.conditions[direction] = true; },
|
|
58
|
-
off: () => { this.conditions[direction] = false; },
|
|
59
|
-
};
|
|
60
|
-
manager.at(breakpointName)[direction](handler);
|
|
61
|
-
this.handlers.push({ name: breakpointName, direction, handler });
|
|
62
|
-
}
|
|
63
|
-
};
|
|
5
|
+
<script setup>
|
|
6
|
+
import { ref, computed, watch, onBeforeUnmount } from 'vue';
|
|
7
|
+
import { useRequiredInject } from '../../composables/useRequiredInject.js';
|
|
8
|
+
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
max: String,
|
|
11
|
+
min: String,
|
|
12
|
+
only: String,
|
|
13
|
+
});
|
|
64
14
|
|
|
65
|
-
|
|
66
|
-
setupCondition('min');
|
|
67
|
-
setupCondition('only');
|
|
15
|
+
const uluBreakpointManager = useRequiredInject('uluBreakpointManager');
|
|
68
16
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
17
|
+
const conditions = ref({});
|
|
18
|
+
const handlers = ref([]);
|
|
19
|
+
const handlersSetup = ref(false);
|
|
20
|
+
|
|
21
|
+
const shouldShow = computed(() => {
|
|
22
|
+
if (!handlersSetup.value) return false;
|
|
23
|
+
const activeProps = ['max', 'min', 'only'].filter(p => props[p]);
|
|
24
|
+
if (activeProps.length === 0) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
return Object.values(conditions.value).every(c => c);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const setupHandlers = (manager) => {
|
|
31
|
+
const setupCondition = (direction) => {
|
|
32
|
+
const breakpointName = props[direction];
|
|
33
|
+
if (breakpointName) {
|
|
34
|
+
conditions.value[direction] = false;
|
|
35
|
+
const handler = {
|
|
36
|
+
on: () => { conditions.value[direction] = true; },
|
|
37
|
+
off: () => { conditions.value[direction] = false; },
|
|
38
|
+
};
|
|
39
|
+
manager.at(breakpointName)[direction](handler);
|
|
40
|
+
handlers.value.push({ name: breakpointName, direction, handler });
|
|
80
41
|
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
setupCondition('max');
|
|
45
|
+
setupCondition('min');
|
|
46
|
+
setupCondition('only');
|
|
47
|
+
|
|
48
|
+
handlersSetup.value = true;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const tearDownHandlers = () => {
|
|
52
|
+
if (uluBreakpointManager) {
|
|
53
|
+
handlers.value.forEach(({ name, direction, handler }) => {
|
|
54
|
+
uluBreakpointManager.at(name).remove(handler, direction);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
handlers.value = [];
|
|
58
|
+
conditions.value = {};
|
|
59
|
+
handlersSetup.value = false;
|
|
85
60
|
};
|
|
61
|
+
|
|
62
|
+
watch(uluBreakpointManager, (manager) => {
|
|
63
|
+
if (manager && !handlersSetup.value) {
|
|
64
|
+
setupHandlers(manager);
|
|
65
|
+
}
|
|
66
|
+
}, { immediate: true });
|
|
67
|
+
|
|
68
|
+
// Watch all the props and update if they change
|
|
69
|
+
// - Using array syntax to avoid "deep" flag
|
|
70
|
+
watch([() => props.max, () => props.min, () => props.only], () => {
|
|
71
|
+
if (uluBreakpointManager && handlersSetup.value) {
|
|
72
|
+
tearDownHandlers();
|
|
73
|
+
setupHandlers(uluBreakpointManager);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
onBeforeUnmount(() => {
|
|
78
|
+
tearDownHandlers();
|
|
79
|
+
});
|
|
86
80
|
</script>
|
package/lib/composables/index.js
CHANGED
|
@@ -7,4 +7,5 @@
|
|
|
7
7
|
export { useIcon } from './useIcon.js';
|
|
8
8
|
export { useModifiers } from './useModifiers.js';
|
|
9
9
|
export { useWindowResize } from './useWindowResize.js';
|
|
10
|
+
export { useRequiredInject } from './useRequiredInject.js';
|
|
10
11
|
export { useBreakpointManager } from './useBreakpointManager.js';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { inject } from 'vue';
|
|
2
|
+
import { injectRegistry } from "../meta.js";
|
|
3
|
+
|
|
4
|
+
// A unique sentinel object to detect if a value was provided.
|
|
5
|
+
// This is used to differentiate between a provider not existing vs.
|
|
6
|
+
// a provider explicitly giving a `null` value.
|
|
7
|
+
const NOT_FOUND = {};
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Injects a dependency from a plugin (or other required inject) and throws an error if it's not available.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} key - The injection key (e.g., 'uluBreakpointManager').
|
|
13
|
+
* @returns The injected value.
|
|
14
|
+
*/
|
|
15
|
+
export function useRequiredInject(key) {
|
|
16
|
+
const dependency = inject(key, NOT_FOUND);
|
|
17
|
+
|
|
18
|
+
if (dependency === NOT_FOUND) {
|
|
19
|
+
const plugin = injectRegistry[key] || '';
|
|
20
|
+
const pluginInfo = plugin ? ` from the '${ plugin }' plugin` : "";
|
|
21
|
+
const action = plugin ? "Please install missing plugin." : "";
|
|
22
|
+
throw new Error(`Required inject: '${ key }'${ pluginInfo } was not provided. ${ action }`);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return dependency;
|
|
26
|
+
}
|
package/lib/meta.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module lib/meta
|
|
3
|
+
* @description A central lookup for meta like info in the system
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const injectRegistry = {
|
|
7
|
+
'uluCore': 'Core',
|
|
8
|
+
'uluIsMobile': 'Breakpoints',
|
|
9
|
+
'uluBreakpointActive': 'Breakpoints',
|
|
10
|
+
'uluBreakpointDirection': 'Breakpoints',
|
|
11
|
+
'uluBreakpointManager': 'Breakpoints',
|
|
12
|
+
'uluModals': 'Modals',
|
|
13
|
+
'uluToast': 'Toast',
|
|
14
|
+
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ulu/frontend-vue",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.8",
|
|
4
4
|
"description": "A modular and tree-shakeable Vue 3 component library for the Ulu frontend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"lib",
|
|
8
|
-
"dist"
|
|
8
|
+
"dist",
|
|
9
|
+
"types"
|
|
9
10
|
],
|
|
10
11
|
"module": "./lib/index.js",
|
|
11
12
|
"exports": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/components/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/systems/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../../../lib/components/systems/scroll-anchors/symbols.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,2BAAiC;AACjC,6BAAmC;AACnC,2BAAiC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { useIcon } from "./useIcon.js";
|
|
2
|
+
export { useModifiers } from "./useModifiers.js";
|
|
3
|
+
export { useWindowResize } from "./useWindowResize.js";
|
|
4
|
+
export { useRequiredInject } from "./useRequiredInject.js";
|
|
5
|
+
export { useBreakpointManager } from "./useBreakpointManager.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/composables/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Use the CssBreakpoints module in Vue
|
|
3
|
+
* - Normally use only once, unless you have different sets of breakpoints
|
|
4
|
+
* @param {Object} options Configuration options overrides
|
|
5
|
+
* @return {Object} { manager, active, direction } (all are null in SSR environment until init)
|
|
6
|
+
*/
|
|
7
|
+
export function useBreakpointManager(options: any): any;
|
|
8
|
+
//# sourceMappingURL=useBreakpointManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBreakpointManager.d.ts","sourceRoot":"","sources":["../../lib/composables/useBreakpointManager.js"],"names":[],"mappings":"AAoBA;;;;;GAKG;AACH,wDAyCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIcon.d.ts","sourceRoot":"","sources":["../../lib/composables/useIcon.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,+BAyDC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A composable to manage and resolve BEM style modifiers for a component,
|
|
3
|
+
* combining user-passed modifiers with internally derived conditional modifiers.
|
|
4
|
+
*
|
|
5
|
+
* @param {object} options - The options for the composable.
|
|
6
|
+
* @param {object} options.props - The component's props object. (Must contain a 'modifiers' prop if user-passed modifiers are expected)
|
|
7
|
+
* @param {string | import('vue').Ref<string>} options.baseClass - The base CSS class name for the component (e.g., 'modal').
|
|
8
|
+
* Can be a string or a ref to a string.
|
|
9
|
+
* @param {string | string[] | Object.<string, any> | import('vue').ComputedRef<string | string[] | Object.<string, any>>} [options.internal={}] -
|
|
10
|
+
* A flexible input for component's internal modifiers. Can be a string, array of strings/objects, or an object mapping modifier names to conditions.
|
|
11
|
+
* @returns {object} An object containing the computed property `resolvedModifiers`
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // In MyComponent.vue:
|
|
15
|
+
* <template>
|
|
16
|
+
* <div :class="[resolvedModifiers, 'other-class']"></div>
|
|
17
|
+
* </template>
|
|
18
|
+
*
|
|
19
|
+
* <script>
|
|
20
|
+
* import { computed, ref } from 'vue';
|
|
21
|
+
* import { useModifiers } from './composables/useModifiers.js'; // Adjust path
|
|
22
|
+
*
|
|
23
|
+
* export default {
|
|
24
|
+
* props: {
|
|
25
|
+
* variant: String, // e.g., 'primary', 'secondary'
|
|
26
|
+
* isActive: Boolean,
|
|
27
|
+
* modifiers: [String, Array, Object] // User-passed modifiers
|
|
28
|
+
* },
|
|
29
|
+
* setup(props) {
|
|
30
|
+
* const isHovered = ref(false);
|
|
31
|
+
*
|
|
32
|
+
* // Define component-internal modifiers based on props or local state
|
|
33
|
+
* const internalModifiers = computed(() => ({
|
|
34
|
+
* [props.variant]: !!props.variant, // Add 'primary' or 'secondary' if prop exists
|
|
35
|
+
* 'active': props.isActive, // Add 'active' if isActive prop is true
|
|
36
|
+
* 'hovered': isHovered.value, // Add 'hovered' if local state is true
|
|
37
|
+
* 'default': !props.variant && !props.isActive // Add 'default' if no variant/active
|
|
38
|
+
* }));
|
|
39
|
+
*
|
|
40
|
+
* // Use the composable to get the combined modifier classes
|
|
41
|
+
* const { resolvedModifiers } = useModifiers({
|
|
42
|
+
* props: props, // Pass component props for 'modifiers' prop
|
|
43
|
+
* baseClass: 'button', // The BEM block name
|
|
44
|
+
* internal: internalModifiers // The computed internal modifiers
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* return { resolvedModifiers, isHovered };
|
|
48
|
+
* }
|
|
49
|
+
* };
|
|
50
|
+
* </script>
|
|
51
|
+
*
|
|
52
|
+
* // Resulting class examples for 'my-component':
|
|
53
|
+
* // <MyComponent /> => class="my-component my-component--default"
|
|
54
|
+
* // <MyComponent variant="primary" /> => class="my-component my-component--primary"
|
|
55
|
+
* // <MyComponent isActive /> => class="my-component my-component--active"
|
|
56
|
+
* // <MyComponent modifiers="condensed" /> => class="my-component my-component--default my-component--condensed"
|
|
57
|
+
* // <MyComponent variant="secondary" :isActive="true" modifiers="round" />
|
|
58
|
+
* // => class="my-component my-component--secondary my-component--active my-component--round"
|
|
59
|
+
*/
|
|
60
|
+
export function useModifiers({ props, baseClass, internal }: {
|
|
61
|
+
props: object;
|
|
62
|
+
baseClass: string | import("vue").Ref<string>;
|
|
63
|
+
internal?: string | string[] | {
|
|
64
|
+
[x: string]: any;
|
|
65
|
+
} | import("vue").ComputedRef<string | string[] | {
|
|
66
|
+
[x: string]: any;
|
|
67
|
+
}>;
|
|
68
|
+
}): object;
|
|
69
|
+
//# sourceMappingURL=useModifiers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useModifiers.d.ts","sourceRoot":"","sources":["../../lib/composables/useModifiers.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,6DAtDG;IAAwB,KAAK,EAArB,MAAM;IACsC,SAAS,EAArD,MAAM,GAAG,OAAO,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC;IAEuF,QAAQ,GAAjI,MAAM,GAAG,MAAM,EAAE,GAAG;YAAQ,MAAM,GAAE,GAAG;KAAC,GAAG,OAAO,KAAK,EAAE,WAAW,CAAC,MAAM,GAAG,MAAM,EAAE,GAAG;YAAQ,MAAM,GAAE,GAAG;KAAC,CAAC;CAEtH,GAAU,MAAM,CA0ElB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Injects a dependency from a plugin (or other required inject) and throws an error if it's not available.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} key - The injection key (e.g., 'uluBreakpointManager').
|
|
5
|
+
* @returns The injected value.
|
|
6
|
+
*/
|
|
7
|
+
export function useRequiredInject(key: string): {};
|
|
8
|
+
//# sourceMappingURL=useRequiredInject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRequiredInject.d.ts","sourceRoot":"","sources":["../../lib/composables/useRequiredInject.js"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,uCAHW,MAAM,MAchB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowResize.d.ts","sourceRoot":"","sources":["../../lib/composables/useWindowResize.js"],"names":[],"mappings":"AAiDA;;;GAGG;AACH,uCAUC"}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.js"],"names":[],"mappings":""}
|
package/types/meta.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export namespace injectRegistry {
|
|
2
|
+
let uluCore: string;
|
|
3
|
+
let uluIsMobile: string;
|
|
4
|
+
let uluBreakpointActive: string;
|
|
5
|
+
let uluBreakpointDirection: string;
|
|
6
|
+
let uluBreakpointManager: string;
|
|
7
|
+
let uluModals: string;
|
|
8
|
+
let uluToast: string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../lib/meta.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/breakpoints/index.js"],"names":[],"mappings":"AAiBA,kEA6BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/core/index.js"],"names":[],"mappings":"AA6BA,mEAyDC;AA3DD,gCAA0D"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as corePlugin } from "./core/index.js";
|
|
2
|
+
export { default as popoversPlugin } from "./popovers/index.js";
|
|
3
|
+
export { default as modalsPlugin } from "./modals/index.js";
|
|
4
|
+
export { default as toastPlugin } from "./toast/index.js";
|
|
5
|
+
export { default as breakpointsPlugin } from "./breakpoints/index.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/plugins/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export namespace modalsState {
|
|
2
|
+
export { data };
|
|
3
|
+
export { modals };
|
|
4
|
+
}
|
|
5
|
+
export function createApi(resolveModalOptions: any): {
|
|
6
|
+
open(name: any, props?: any): void;
|
|
7
|
+
/**
|
|
8
|
+
* Close the active modal
|
|
9
|
+
* @param {String|Node} focusTo The element or selector for an element to programmatically focus after modal close
|
|
10
|
+
* @see https://www.deque.com/blog/accessible-routing-in-javascript-frameworks/
|
|
11
|
+
*/
|
|
12
|
+
close(): void;
|
|
13
|
+
/**
|
|
14
|
+
* Get a modal's config object by name
|
|
15
|
+
* @return {Object} Modal config object
|
|
16
|
+
*/
|
|
17
|
+
get(name: any): any;
|
|
18
|
+
/**
|
|
19
|
+
* Add a modal config
|
|
20
|
+
*/
|
|
21
|
+
add(config: any): void;
|
|
22
|
+
/**
|
|
23
|
+
* Removes a modal config by name
|
|
24
|
+
* @return {Object} Modal that was removed
|
|
25
|
+
*/
|
|
26
|
+
remove(name: any): any;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Reactive data from state
|
|
30
|
+
*/
|
|
31
|
+
declare const data: any;
|
|
32
|
+
declare const modals: any[];
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../lib/plugins/modals/api.js"],"names":[],"mappings":";;;;AA6BO;;IAML;;;;OAIG;;IAKH;;;OAGG;;IASH;;OAEG;;IAKH;;;OAGG;;EASH;AAxDF;;GAEG;AACH,wBAAyB;AAnBzB,4BAAkB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modals Vue Plugin
|
|
3
|
+
* @param {Object} App Vue app instance passed to plugin
|
|
4
|
+
* @param {UluModalsPluginOptions} userOptions Options to change (see defaults)
|
|
5
|
+
*/
|
|
6
|
+
export default function install(app: any, userOptions: UluModalsPluginOptions): void;
|
|
7
|
+
/**
|
|
8
|
+
* Default plugin options
|
|
9
|
+
*/
|
|
10
|
+
export type UluModalsPluginOptions = {
|
|
11
|
+
/**
|
|
12
|
+
* Name for modals component that displays app-wide modals
|
|
13
|
+
*/
|
|
14
|
+
componentNameDisplay: string;
|
|
15
|
+
/**
|
|
16
|
+
* Name for modal component
|
|
17
|
+
*/
|
|
18
|
+
componentNameModal: string;
|
|
19
|
+
/**
|
|
20
|
+
* Modals configs [{ name, component, props }]
|
|
21
|
+
*/
|
|
22
|
+
modals: any[];
|
|
23
|
+
/**
|
|
24
|
+
* Options to merge into individual modal options (to serve as defaults for each modal, see UluModalOptions)
|
|
25
|
+
*/
|
|
26
|
+
modalOptions: UluModalOptions;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/modals/index.js"],"names":[],"mappings":"AA0BA;;;;GAIG;AACH,uDAFW,sBAAsB,QA8BhC;;;;;;;;;;;;;;;;;;;;kBA1Ca,eAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useModals.d.ts","sourceRoot":"","sources":["../../../lib/plugins/modals/useModals.js"],"names":[],"mappings":"AAEO,iCAMN"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let plugin: any;
|
|
3
|
+
namespace popover {
|
|
4
|
+
let inline: boolean;
|
|
5
|
+
let delay: number;
|
|
6
|
+
let placement: string;
|
|
7
|
+
let strategy: string;
|
|
8
|
+
let offset: number;
|
|
9
|
+
let arrow: boolean;
|
|
10
|
+
}
|
|
11
|
+
let tooltip: any;
|
|
12
|
+
}
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/defaults.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
function mounted(trigger: any, binding: any): void;
|
|
3
|
+
function beforeUpdate(trigger: any): void;
|
|
4
|
+
function updated(trigger: any, binding: any): void;
|
|
5
|
+
function umounted(trigger: any): void;
|
|
6
|
+
}
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=directive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directive.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/directive.js"],"names":[],"mappings":";IAgBE,mDAEC;IACD,0CAEC;IACD,mDAEC;IACD,sCAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/index.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,kEAOC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Setup the store options
|
|
3
|
+
* @param {Object} userOptions
|
|
4
|
+
* @param {Object} options Resolved options
|
|
5
|
+
*/
|
|
6
|
+
export function init(userOptions?: any): {
|
|
7
|
+
plugin: any;
|
|
8
|
+
popover: {
|
|
9
|
+
inline: boolean;
|
|
10
|
+
delay: number;
|
|
11
|
+
placement: string;
|
|
12
|
+
strategy: string;
|
|
13
|
+
offset: number;
|
|
14
|
+
arrow: boolean;
|
|
15
|
+
};
|
|
16
|
+
tooltip: any;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Config for a single tooltip instance
|
|
20
|
+
*/
|
|
21
|
+
export function createConfig(userConfig: any): any;
|
|
22
|
+
/**
|
|
23
|
+
* Show a tooltip
|
|
24
|
+
* - Set by directive
|
|
25
|
+
*/
|
|
26
|
+
export function show(config: any): void;
|
|
27
|
+
/**
|
|
28
|
+
* Hide a tooltip
|
|
29
|
+
* - Set by directive
|
|
30
|
+
*/
|
|
31
|
+
export function hide(): void;
|
|
32
|
+
export namespace options {
|
|
33
|
+
let plugin: any;
|
|
34
|
+
let popover: {
|
|
35
|
+
inline: boolean;
|
|
36
|
+
delay: number;
|
|
37
|
+
placement: string;
|
|
38
|
+
strategy: string;
|
|
39
|
+
offset: number;
|
|
40
|
+
arrow: boolean;
|
|
41
|
+
};
|
|
42
|
+
let tooltip: any;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Whether or not the tooltip is active
|
|
46
|
+
*/
|
|
47
|
+
export const active: import("vue").Ref<boolean, boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Current tooltip config
|
|
50
|
+
*/
|
|
51
|
+
export const activeConfig: import("vue").Ref<any, any>;
|
|
52
|
+
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/manager.js"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH;;;;;;;;;;;EAKC;AAED;;KAEK;AACL,mDAEC;AAED;;;GAGG;AACH,wCAGC;AAED;;;GAGG;AACH,6BAGC;;;;;;;;;;;;;AA5CD;;GAEG;AACH,yDAAiC;AACjC;;GAEG;AACH,uDAAsC"}
|