@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.js CHANGED
@@ -228,39 +228,37 @@ var IrisPopoverContent = defineComponent({
228
228
  target?.focus();
229
229
  }
230
230
  });
231
- const contentVNode = computed(
232
- () => h(
233
- "div",
234
- {
235
- ...attrs,
236
- ref: (el) => {
237
- innerRef.value = el ?? null;
238
- },
239
- id: ctx.contentId,
240
- role: "dialog",
241
- tabindex: -1,
242
- "data-state": ctx.open.value ? "open" : "closed",
243
- "data-placement": ctx.placement,
244
- style: {
245
- ...floatingStyles.value,
246
- background: "var(--iris-surface)",
247
- color: "var(--iris-foreground)",
248
- border: "1px solid var(--iris-border)",
249
- borderRadius: "var(--iris-radius-md)",
250
- padding: "var(--iris-padding-md)",
251
- boxShadow: "0 8px 24px -8px rgba(0, 0, 0, 0.16), 0 4px 8px -2px rgba(0, 0, 0, 0.08)",
252
- fontSize: "14px",
253
- zIndex: "1000",
254
- outline: "none",
255
- ...attrs.style ?? {}
256
- }
231
+ const renderContent = () => h(
232
+ "div",
233
+ {
234
+ ...attrs,
235
+ ref: (el) => {
236
+ innerRef.value = el ?? null;
257
237
  },
258
- slots.default?.()
259
- )
238
+ id: ctx.contentId,
239
+ role: "dialog",
240
+ tabindex: -1,
241
+ "data-state": ctx.open.value ? "open" : "closed",
242
+ "data-placement": ctx.placement,
243
+ style: {
244
+ ...floatingStyles.value,
245
+ background: "var(--iris-surface)",
246
+ color: "var(--iris-foreground)",
247
+ border: "1px solid var(--iris-border)",
248
+ borderRadius: "var(--iris-radius-md)",
249
+ padding: "var(--iris-padding-md)",
250
+ boxShadow: "0 8px 24px -8px rgba(0, 0, 0, 0.16), 0 4px 8px -2px rgba(0, 0, 0, 0.08)",
251
+ fontSize: "14px",
252
+ zIndex: "1000",
253
+ outline: "none",
254
+ ...attrs.style ?? {}
255
+ }
256
+ },
257
+ slots.default?.()
260
258
  );
261
259
  return () => {
262
260
  if (!ctx.open.value) return null;
263
- const node = contentVNode.value;
261
+ const node = renderContent();
264
262
  if (props.teleport === false) return node;
265
263
  return h(Teleport, { to: props.teleport }, [node]);
266
264
  };