@mantine-vue/core 2.3.0 → 2.3.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/esm/index.mjs CHANGED
@@ -4037,7 +4037,7 @@ var Badge = withBoxProps(defineComponent({
4037
4037
  const renderSection = (section, position) => hasNode(section) ? h("span", {
4038
4038
  ...getStyles("section"),
4039
4039
  "data-position": position
4040
- }, () => section) : null;
4040
+ }, section) : null;
4041
4041
  return () => {
4042
4042
  const children = slots.default?.() ?? [];
4043
4043
  const leftSection = resolveNode(props.leftSection, slots.leftSection);
@@ -26243,14 +26243,17 @@ var Drawer = Object.assign(DrawerBaseComponent, {
26243
26243
  });
26244
26244
  //#endregion
26245
26245
  //#region src/utils/Floating/FloatingArrow/get-arrow-position-styles.ts
26246
+ function px$1(value) {
26247
+ return value === void 0 ? void 0 : `${value}px`;
26248
+ }
26246
26249
  function horizontalSide(placement, arrowY, offset, position) {
26247
- if (placement === "center" || position === "center") return { top: arrowY };
26248
- return placement === "end" ? { bottom: offset } : { top: offset };
26250
+ if (placement === "center" || position === "center") return { top: px$1(arrowY) };
26251
+ return placement === "end" ? { bottom: px$1(offset) } : { top: px$1(offset) };
26249
26252
  }
26250
26253
  function verticalSide(placement, arrowX, offset, position, dir) {
26251
- if (placement === "center" || position === "center") return { left: arrowX };
26252
- if (placement === "end") return { [dir === "ltr" ? "right" : "left"]: offset };
26253
- return { [dir === "ltr" ? "left" : "right"]: offset };
26254
+ if (placement === "center" || position === "center") return { left: px$1(arrowX) };
26255
+ if (placement === "end") return { [dir === "ltr" ? "right" : "left"]: px$1(offset) };
26256
+ return { [dir === "ltr" ? "left" : "right"]: px$1(offset) };
26254
26257
  }
26255
26258
  var radiusBySide = {
26256
26259
  bottom: "borderTopLeftRadius",
@@ -26271,15 +26274,15 @@ function mergeStyles(position, size, dir) {
26271
26274
  const startShape = placement === "start" !== (dir === "rtl");
26272
26275
  return {
26273
26276
  ...base,
26274
- [side === "bottom" ? "top" : "bottom"]: -size,
26275
- [physical]: 0,
26277
+ [side === "bottom" ? "top" : "bottom"]: px$1(-size),
26278
+ [physical]: px$1(0),
26276
26279
  clipPath: side === "bottom" ? startShape ? "polygon(0% 0%, 0% 100%, 100% 100%)" : "polygon(100% 0%, 0% 100%, 100% 100%)" : startShape ? "polygon(0% 0%, 100% 0%, 0% 100%)" : "polygon(0% 0%, 100% 0%, 100% 100%)"
26277
26280
  };
26278
26281
  }
26279
26282
  return {
26280
26283
  ...base,
26281
- [side === "left" ? "right" : "left"]: -size,
26282
- [placement === "start" ? "top" : "bottom"]: 0,
26284
+ [side === "left" ? "right" : "left"]: px$1(-size),
26285
+ [placement === "start" ? "top" : "bottom"]: px$1(0),
26283
26286
  clipPath: side === "left" ? placement === "start" ? "polygon(0% 0%, 100% 0%, 0% 100%)" : "polygon(0% 0%, 0% 100%, 100% 100%)" : placement === "start" ? "polygon(0% 0%, 100% 0%, 100% 100%)" : "polygon(100% 0%, 0% 100%, 100% 100%)"
26284
26287
  };
26285
26288
  }
@@ -26296,7 +26299,7 @@ function getArrowPositionStyles(input) {
26296
26299
  position: "absolute",
26297
26300
  [radiusBySide[side]]: `${input.arrowRadius}px`
26298
26301
  };
26299
- const edge = -input.arrowSize / 2;
26302
+ const edge = px$1(-input.arrowSize / 2);
26300
26303
  if (side === "left") return {
26301
26304
  ...base,
26302
26305
  ...horizontalSide(placement, input.arrowY, input.arrowOffset, input.arrowPosition),
@@ -26372,6 +26375,7 @@ var FloatingArrow = defineComponent({
26372
26375
  setup(props, { attrs }) {
26373
26376
  const { dir } = useDirection();
26374
26377
  return () => props.visible ? h("div", {
26378
+ role: "presentation",
26375
26379
  ...attrs,
26376
26380
  style: [attrs.style, getArrowPositionStyles({
26377
26381
  ...props,
@@ -26818,7 +26822,11 @@ var PopoverBase = defineComponent({
26818
26822
  ...shiftOptions
26819
26823
  };
26820
26824
  }));
26821
- result.push(arrow({ element: arrowElement }));
26825
+ if (props.middlewares?.inline) result.push(inline(typeof props.middlewares.inline === "object" ? props.middlewares.inline : void 0));
26826
+ result.push(arrow({
26827
+ element: arrowElement,
26828
+ padding: props.arrowOffset
26829
+ }));
26822
26830
  if (props.middlewares?.size || props.width === "target") result.push(size({
26823
26831
  ...typeof props.middlewares?.size === "object" ? props.middlewares.size : {},
26824
26832
  apply: ({ rects, availableWidth, availableHeight, elements, ...rest }) => {