@nova-design-system/nova-vue 3.10.1-beta.0 → 3.12.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.
|
@@ -537,6 +537,7 @@ export const NvPopover = /*@__PURE__*/ defineContainer('nv-popover', undefined,
|
|
|
537
537
|
'open',
|
|
538
538
|
'triggerMode',
|
|
539
539
|
'placement',
|
|
540
|
+
'strategy',
|
|
540
541
|
'groupName',
|
|
541
542
|
'offset',
|
|
542
543
|
'hasArrow',
|
|
@@ -602,5 +603,6 @@ export const NvTooltip = /*@__PURE__*/ defineContainer('nv-tooltip', undefined,
|
|
|
602
603
|
'message',
|
|
603
604
|
'placement',
|
|
604
605
|
'enterDelay',
|
|
606
|
+
'strategy',
|
|
605
607
|
'openChanged'
|
|
606
608
|
]);
|
|
@@ -19,11 +19,10 @@ const ARIA_PROP_PREFIX = 'aria';
|
|
|
19
19
|
const EMPTY_PROP = Symbol();
|
|
20
20
|
const DEFAULT_EMPTY_PROP = { default: EMPTY_PROP };
|
|
21
21
|
const getComponentClasses = (classes) => {
|
|
22
|
-
return
|
|
22
|
+
return classes?.split(' ') || [];
|
|
23
23
|
};
|
|
24
24
|
const getElementClasses = (ref, componentClasses, defaultClasses = []) => {
|
|
25
|
-
|
|
26
|
-
return [...Array.from(((_a = ref.value) === null || _a === void 0 ? void 0 : _a.classList) || []), ...defaultClasses].filter((c, i, self) => !componentClasses.has(c) && self.indexOf(c) === i);
|
|
25
|
+
return [...Array.from(ref.value?.classList || []), ...defaultClasses].filter((c, i, self) => !componentClasses.has(c) && self.indexOf(c) === i);
|
|
27
26
|
};
|
|
28
27
|
/**
|
|
29
28
|
* Create a callback to define a Vue component wrapper around a Web Component.
|
|
@@ -47,7 +46,6 @@ export const defineContainer = (name, defineCustomElement, componentProps = [],
|
|
|
47
46
|
defineCustomElement();
|
|
48
47
|
}
|
|
49
48
|
const Container = defineComponent((props, { attrs, slots, emit }) => {
|
|
50
|
-
var _a;
|
|
51
49
|
let modelPropValue = props[modelProp];
|
|
52
50
|
const containerRef = ref();
|
|
53
51
|
const classes = new Set(getComponentClasses(attrs.class));
|
|
@@ -74,7 +72,7 @@ export const defineContainer = (name, defineCustomElement, componentProps = [],
|
|
|
74
72
|
* when ionChange bubbles up from Component B.
|
|
75
73
|
*/
|
|
76
74
|
if (e.target.tagName === el.tagName) {
|
|
77
|
-
modelPropValue = (e
|
|
75
|
+
modelPropValue = (e?.target)[modelProp];
|
|
78
76
|
emit(UPDATE_VALUE_EVENT, modelPropValue);
|
|
79
77
|
}
|
|
80
78
|
});
|
|
@@ -82,7 +80,7 @@ export const defineContainer = (name, defineCustomElement, componentProps = [],
|
|
|
82
80
|
},
|
|
83
81
|
};
|
|
84
82
|
const currentInstance = getCurrentInstance();
|
|
85
|
-
const hasRouter =
|
|
83
|
+
const hasRouter = currentInstance?.appContext?.provides[NAV_MANAGER];
|
|
86
84
|
const navManager = hasRouter ? inject(NAV_MANAGER) : undefined;
|
|
87
85
|
const handleRouterLink = (ev) => {
|
|
88
86
|
const { routerLink } = props;
|
|
@@ -150,10 +148,16 @@ export const defineContainer = (name, defineCustomElement, componentProps = [],
|
|
|
150
148
|
* was set as a static value (i.e. no v-model).
|
|
151
149
|
*/
|
|
152
150
|
if (props[MODEL_VALUE] !== EMPTY_PROP) {
|
|
153
|
-
propsToAdd =
|
|
151
|
+
propsToAdd = {
|
|
152
|
+
...propsToAdd,
|
|
153
|
+
[modelProp]: props[MODEL_VALUE],
|
|
154
|
+
};
|
|
154
155
|
}
|
|
155
156
|
else if (modelPropValue !== EMPTY_PROP) {
|
|
156
|
-
propsToAdd =
|
|
157
|
+
propsToAdd = {
|
|
158
|
+
...propsToAdd,
|
|
159
|
+
[modelProp]: modelPropValue,
|
|
160
|
+
};
|
|
157
161
|
}
|
|
158
162
|
}
|
|
159
163
|
// If router link is defined, add href to props
|
|
@@ -161,7 +165,10 @@ export const defineContainer = (name, defineCustomElement, componentProps = [],
|
|
|
161
165
|
// of components that should become activatable and
|
|
162
166
|
// focusable with router link.
|
|
163
167
|
if (props[ROUTER_LINK_VALUE] !== EMPTY_PROP) {
|
|
164
|
-
propsToAdd =
|
|
168
|
+
propsToAdd = {
|
|
169
|
+
...propsToAdd,
|
|
170
|
+
href: props[ROUTER_LINK_VALUE],
|
|
171
|
+
};
|
|
165
172
|
}
|
|
166
173
|
/**
|
|
167
174
|
* vModelDirective is only needed on components that support v-model.
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nova-design-system/nova-vue",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.0",
|
|
4
4
|
"description": "Nova is a design system created by Elia Group to empower creators to efficiently build solutions that people love to use.",
|
|
5
5
|
"author": "Elia Group",
|
|
6
6
|
"homepage": "https://nova.eliagroup.io",
|
|
@@ -37,10 +37,12 @@
|
|
|
37
37
|
"clean": "rimraf dist lib/generated",
|
|
38
38
|
"typecheck": "tsc --emitDeclarationOnly false --noEmit"
|
|
39
39
|
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@nova-design-system/nova-webcomponents": "*"
|
|
42
|
+
},
|
|
40
43
|
"devDependencies": {
|
|
41
44
|
"vue": "3.4.36",
|
|
42
45
|
"nova-utils": "*",
|
|
43
|
-
"nova-storybook-utils": "*"
|
|
44
|
-
"@nova-design-system/nova-webcomponents": "*"
|
|
46
|
+
"nova-storybook-utils": "*"
|
|
45
47
|
}
|
|
46
48
|
}
|