@iris-ui-kit/vue 0.2.0 → 0.2.1
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/index.cjs +27 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -29
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -3218,39 +3218,37 @@ var IrisPopoverContent = vue.defineComponent({
|
|
|
3218
3218
|
target?.focus();
|
|
3219
3219
|
}
|
|
3220
3220
|
});
|
|
3221
|
-
const
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
innerRef.value = el ?? null;
|
|
3228
|
-
},
|
|
3229
|
-
id: ctx.contentId,
|
|
3230
|
-
role: "dialog",
|
|
3231
|
-
tabindex: -1,
|
|
3232
|
-
"data-state": ctx.open.value ? "open" : "closed",
|
|
3233
|
-
"data-placement": ctx.placement,
|
|
3234
|
-
style: {
|
|
3235
|
-
...floatingStyles.value,
|
|
3236
|
-
background: "var(--iris-surface)",
|
|
3237
|
-
color: "var(--iris-foreground)",
|
|
3238
|
-
border: "1px solid var(--iris-border)",
|
|
3239
|
-
borderRadius: "var(--iris-radius-md)",
|
|
3240
|
-
padding: "var(--iris-padding-md)",
|
|
3241
|
-
boxShadow: "0 8px 24px -8px rgba(0, 0, 0, 0.16), 0 4px 8px -2px rgba(0, 0, 0, 0.08)",
|
|
3242
|
-
fontSize: "14px",
|
|
3243
|
-
zIndex: "1000",
|
|
3244
|
-
outline: "none",
|
|
3245
|
-
...attrs.style ?? {}
|
|
3246
|
-
}
|
|
3221
|
+
const renderContent = () => vue.h(
|
|
3222
|
+
"div",
|
|
3223
|
+
{
|
|
3224
|
+
...attrs,
|
|
3225
|
+
ref: (el) => {
|
|
3226
|
+
innerRef.value = el ?? null;
|
|
3247
3227
|
},
|
|
3248
|
-
|
|
3249
|
-
|
|
3228
|
+
id: ctx.contentId,
|
|
3229
|
+
role: "dialog",
|
|
3230
|
+
tabindex: -1,
|
|
3231
|
+
"data-state": ctx.open.value ? "open" : "closed",
|
|
3232
|
+
"data-placement": ctx.placement,
|
|
3233
|
+
style: {
|
|
3234
|
+
...floatingStyles.value,
|
|
3235
|
+
background: "var(--iris-surface)",
|
|
3236
|
+
color: "var(--iris-foreground)",
|
|
3237
|
+
border: "1px solid var(--iris-border)",
|
|
3238
|
+
borderRadius: "var(--iris-radius-md)",
|
|
3239
|
+
padding: "var(--iris-padding-md)",
|
|
3240
|
+
boxShadow: "0 8px 24px -8px rgba(0, 0, 0, 0.16), 0 4px 8px -2px rgba(0, 0, 0, 0.08)",
|
|
3241
|
+
fontSize: "14px",
|
|
3242
|
+
zIndex: "1000",
|
|
3243
|
+
outline: "none",
|
|
3244
|
+
...attrs.style ?? {}
|
|
3245
|
+
}
|
|
3246
|
+
},
|
|
3247
|
+
slots.default?.()
|
|
3250
3248
|
);
|
|
3251
3249
|
return () => {
|
|
3252
3250
|
if (!ctx.open.value) return null;
|
|
3253
|
-
const node =
|
|
3251
|
+
const node = renderContent();
|
|
3254
3252
|
if (props.teleport === false) return node;
|
|
3255
3253
|
return vue.h(vue.Teleport, { to: props.teleport }, [node]);
|
|
3256
3254
|
};
|