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