@mantine-vue/core 2.2.2 → 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.
Files changed (100) hide show
  1. package/cjs/index.cjs +43 -31
  2. package/cjs/index.cjs.map +1 -1
  3. package/esm/index.mjs +43 -31
  4. package/esm/index.mjs.map +1 -1
  5. package/lib/components/Accordion/Accordion.d.ts +7 -6
  6. package/lib/components/ActionIcon/ActionIcon.d.ts +29 -64
  7. package/lib/components/ActionIcon/ActionIconGroupSection/ActionIconGroupSection.d.ts +11 -22
  8. package/lib/components/Alert/Alert.d.ts +6 -6
  9. package/lib/components/Avatar/Avatar.d.ts +27 -50
  10. package/lib/components/Avatar/AvatarGroup/AvatarGroup.d.ts +3 -2
  11. package/lib/components/BackgroundImage/BackgroundImage.d.ts +3 -2
  12. package/lib/components/Badge/Badge.d.ts +18 -23
  13. package/lib/components/Blockquote/Blockquote.d.ts +6 -6
  14. package/lib/components/Burger/Burger.d.ts +6 -5
  15. package/lib/components/Button/Button.d.ts +29 -65
  16. package/lib/components/Button/ButtonGroupSection/ButtonGroupSection.d.ts +12 -23
  17. package/lib/components/Card/Card.d.ts +7 -6
  18. package/lib/components/Checkbox/Checkbox.d.ts +34 -34
  19. package/lib/components/Checkbox/CheckboxCard/CheckboxCard.d.ts +4 -3
  20. package/lib/components/Checkbox/CheckboxGroup/CheckboxGroup.d.ts +4 -4
  21. package/lib/components/Checkbox/CheckboxIndicator/CheckboxIndicator.d.ts +10 -9
  22. package/lib/components/Chip/Chip.d.ts +19 -18
  23. package/lib/components/CloseButton/CloseButton.d.ts +5 -5
  24. package/lib/components/Code/Code.d.ts +5 -3
  25. package/lib/components/ColorPicker/ColorPicker.d.ts +4 -3
  26. package/lib/components/ColorSwatch/ColorSwatch.d.ts +3 -2
  27. package/lib/components/Container/Container.d.ts +3 -2
  28. package/lib/components/Dialog/Dialog.d.ts +10 -9
  29. package/lib/components/Divider/Divider.d.ts +6 -6
  30. package/lib/components/EmptyState/EmptyState.d.ts +6 -6
  31. package/lib/components/Fieldset/Fieldset.d.ts +4 -4
  32. package/lib/components/FileInput/FileInput.d.ts +4 -4
  33. package/lib/components/Flex/Flex.d.ts +15 -15
  34. package/lib/components/Grid/Grid.d.ts +49 -50
  35. package/lib/components/Grid/GridCol/GridCol.d.ts +4 -5
  36. package/lib/components/Grid/GridCol/GridColVariables.d.ts +4 -5
  37. package/lib/components/Group/Group.d.ts +12 -11
  38. package/lib/components/Highlight/Highlight.d.ts +5 -4
  39. package/lib/components/Image/Image.d.ts +6 -5
  40. package/lib/components/Indicator/Indicator.d.ts +6 -6
  41. package/lib/components/Input/Input.d.ts +28 -28
  42. package/lib/components/Input/InputClearButton/InputClearButton.d.ts +4 -3
  43. package/lib/components/Input/InputDescription/InputDescription.d.ts +4 -3
  44. package/lib/components/Input/InputError/InputError.d.ts +4 -3
  45. package/lib/components/Input/InputLabel/InputLabel.d.ts +4 -3
  46. package/lib/components/Input/InputWrapper/InputWrapper.d.ts +4 -4
  47. package/lib/components/InputBase/InputBase.d.ts +7 -6
  48. package/lib/components/Kbd/Kbd.d.ts +3 -2
  49. package/lib/components/List/List.d.ts +10 -10
  50. package/lib/components/Loader/Loader.d.ts +6 -5
  51. package/lib/components/Mark/Mark.d.ts +5 -3
  52. package/lib/components/Marquee/Marquee.d.ts +4 -3
  53. package/lib/components/NativeSelect/NativeSelect.d.ts +7 -7
  54. package/lib/components/NavLink/NavLink.d.ts +7 -7
  55. package/lib/components/Notification/Notification.d.ts +7 -7
  56. package/lib/components/NumberInput/NumberInput.d.ts +4 -4
  57. package/lib/components/OverflowList/OverflowList.d.ts +4 -3
  58. package/lib/components/Overlay/Overlay.d.ts +3 -2
  59. package/lib/components/Pagination/Pagination.d.ts +34 -33
  60. package/lib/components/Pagination/PaginationRoot/PaginationRoot.d.ts +10 -9
  61. package/lib/components/Paper/Paper.d.ts +3 -2
  62. package/lib/components/PasswordInput/PasswordInput.d.ts +7 -7
  63. package/lib/components/Pill/Pill.d.ts +19 -18
  64. package/lib/components/Pill/PillGroup/PillGroup.d.ts +8 -7
  65. package/lib/components/PillsInput/PillsInput.d.ts +13 -13
  66. package/lib/components/PinInput/PinInput.d.ts +10 -9
  67. package/lib/components/Popover/Popover.d.ts +10 -2
  68. package/lib/components/Popover/index.d.ts +1 -1
  69. package/lib/components/Progress/Progress.d.ts +28 -27
  70. package/lib/components/Progress/ProgressRoot/ProgressRoot.d.ts +7 -6
  71. package/lib/components/Progress/ProgressSection/ProgressSection.d.ts +4 -3
  72. package/lib/components/Radio/Radio.d.ts +34 -34
  73. package/lib/components/Radio/RadioCard/RadioCard.d.ts +4 -3
  74. package/lib/components/Radio/RadioGroup/RadioGroup.d.ts +4 -4
  75. package/lib/components/Radio/RadioIndicator/RadioIndicator.d.ts +10 -9
  76. package/lib/components/Rating/Rating.d.ts +7 -7
  77. package/lib/components/RingProgress/Curve/Curve.d.ts +4 -3
  78. package/lib/components/SegmentedControl/SegmentedControl.d.ts +10 -9
  79. package/lib/components/Slider/RangeSlider/RangeSlider.d.ts +10 -9
  80. package/lib/components/Slider/Slider/Slider.d.ts +10 -9
  81. package/lib/components/Stack/Stack.d.ts +9 -8
  82. package/lib/components/Stepper/Stepper.d.ts +22 -21
  83. package/lib/components/Stepper/StepperStep/StepperStep.d.ts +4 -3
  84. package/lib/components/Switch/Switch.d.ts +22 -22
  85. package/lib/components/Switch/SwitchGroup/SwitchGroup.d.ts +4 -4
  86. package/lib/components/TableOfContents/TableOfContents.d.ts +10 -9
  87. package/lib/components/Tabs/Tabs.d.ts +19 -18
  88. package/lib/components/Tabs/TabsList/TabsList.d.ts +4 -3
  89. package/lib/components/Tabs/TabsTab/TabsTab.d.ts +4 -4
  90. package/lib/components/Text/Text.d.ts +3 -2
  91. package/lib/components/ThemeIcon/ThemeIcon.d.ts +11 -23
  92. package/lib/components/Timeline/Timeline.d.ts +19 -18
  93. package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts +7 -7
  94. package/lib/components/component-props.d.ts +190 -0
  95. package/lib/components/index.d.ts +1 -0
  96. package/lib/core/Box/Box.d.ts +4 -4
  97. package/lib/core/Box/style-props/style-props.types.d.ts +4 -4
  98. package/lib/core/MantineProvider/theme.types.d.ts +5 -0
  99. package/lib/core/types.d.ts +7 -0
  100. package/package.json +3 -3
package/esm/index.mjs CHANGED
@@ -3966,7 +3966,10 @@ var Badge = withBoxProps(defineComponent({
3966
3966
  type: String,
3967
3967
  default: "div"
3968
3968
  },
3969
- size: [String, Number],
3969
+ size: {
3970
+ type: String,
3971
+ default: void 0
3972
+ },
3970
3973
  circle: {
3971
3974
  type: Boolean,
3972
3975
  default: false
@@ -4034,7 +4037,7 @@ var Badge = withBoxProps(defineComponent({
4034
4037
  const renderSection = (section, position) => hasNode(section) ? h("span", {
4035
4038
  ...getStyles("section"),
4036
4039
  "data-position": position
4037
- }, () => section) : null;
4040
+ }, section) : null;
4038
4041
  return () => {
4039
4042
  const children = slots.default?.() ?? [];
4040
4043
  const leftSection = resolveNode(props.leftSection, slots.leftSection);
@@ -6980,7 +6983,8 @@ var GridColVariables = defineComponent({
6980
6983
  acc[breakpoint]["--col-max-width"] = getColumnMaxWidth(span, ctx.columns, ctx.grow);
6981
6984
  }
6982
6985
  if (isObject$1(props.offset) && props.offset[breakpoint] !== void 0) acc[breakpoint]["--col-offset"] = getColumnOffset(props.offset[breakpoint], ctx.columns);
6983
- if (isObject$1(props.align) && props.align[breakpoint] !== void 0) acc[breakpoint]["--col-align-self"] = props.align[breakpoint];
6986
+ const responsiveAlign = isObject$1(props.align) ? props.align[breakpoint] : void 0;
6987
+ if (responsiveAlign !== void 0) acc[breakpoint]["--col-align-self"] = responsiveAlign;
6984
6988
  return acc;
6985
6989
  }, {});
6986
6990
  const values = getSortedBreakpoints(breakpoints).reduce((acc, item) => {
@@ -11174,7 +11178,7 @@ var InputClearButton = withBoxProps(defineComponent({
11174
11178
  inheritAttrs: false,
11175
11179
  props: {
11176
11180
  size: {
11177
- type: [String, Number],
11181
+ type: String,
11178
11182
  default: void 0
11179
11183
  },
11180
11184
  variant: {
@@ -13555,7 +13559,7 @@ var PinInput = withBoxProps(defineComponent({
13555
13559
  default: void 0
13556
13560
  },
13557
13561
  size: {
13558
- type: [String, Number],
13562
+ type: String,
13559
13563
  default: void 0
13560
13564
  },
13561
13565
  autoFocus: {
@@ -15292,7 +15296,7 @@ var SegmentedControl = defineComponent({
15292
15296
  default: void 0
15293
15297
  },
15294
15298
  size: {
15295
- type: [String, Number],
15299
+ type: String,
15296
15300
  default: "sm"
15297
15301
  },
15298
15302
  radius: {
@@ -17428,7 +17432,7 @@ var CheckboxGroup = defineComponent({
17428
17432
  default: void 0
17429
17433
  },
17430
17434
  size: {
17431
- type: [String, Number],
17435
+ type: String,
17432
17436
  default: void 0
17433
17437
  },
17434
17438
  wrapperProps: {
@@ -17820,7 +17824,7 @@ var CheckboxBase = defineComponent({
17820
17824
  default: void 0
17821
17825
  },
17822
17826
  size: {
17823
- type: [String, Number],
17827
+ type: String,
17824
17828
  default: "sm"
17825
17829
  },
17826
17830
  radius: {
@@ -18099,7 +18103,7 @@ var ChipBase = defineComponent({
18099
18103
  default: void 0
18100
18104
  },
18101
18105
  size: {
18102
- type: [String, Number],
18106
+ type: String,
18103
18107
  default: "sm"
18104
18108
  },
18105
18109
  type: {
@@ -18286,7 +18290,7 @@ var PillGroup = withBoxProps(defineComponent({
18286
18290
  default: void 0
18287
18291
  },
18288
18292
  size: {
18289
- type: [String, Number],
18293
+ type: String,
18290
18294
  default: void 0
18291
18295
  },
18292
18296
  disabled: {
@@ -18368,7 +18372,7 @@ var PillBase = defineComponent({
18368
18372
  inheritAttrs: false,
18369
18373
  props: {
18370
18374
  size: {
18371
- type: [String, Number],
18375
+ type: String,
18372
18376
  default: void 0
18373
18377
  },
18374
18378
  withRemoveButton: {
@@ -18749,7 +18753,7 @@ var RadioGroup = defineComponent({
18749
18753
  default: void 0
18750
18754
  },
18751
18755
  size: {
18752
- type: [String, Number],
18756
+ type: String,
18753
18757
  default: void 0
18754
18758
  },
18755
18759
  wrapperProps: {
@@ -19127,7 +19131,7 @@ var RadioBase = defineComponent({
19127
19131
  default: void 0
19128
19132
  },
19129
19133
  size: {
19130
- type: [String, Number],
19134
+ type: String,
19131
19135
  default: "sm"
19132
19136
  },
19133
19137
  icon: {
@@ -19314,7 +19318,7 @@ var SwitchGroup = defineComponent({
19314
19318
  default: void 0
19315
19319
  },
19316
19320
  size: {
19317
- type: [String, Number],
19321
+ type: String,
19318
19322
  default: void 0
19319
19323
  },
19320
19324
  wrapperProps: {
@@ -19479,7 +19483,7 @@ var SwitchBase = defineComponent({
19479
19483
  default: void 0
19480
19484
  },
19481
19485
  size: {
19482
- type: [String, Number],
19486
+ type: String,
19483
19487
  default: "sm"
19484
19488
  },
19485
19489
  radius: {
@@ -19766,8 +19770,8 @@ var Flex = withBoxProps(defineComponent({
19766
19770
  name: "Flex",
19767
19771
  classes: Flex_module_default,
19768
19772
  props,
19769
- className: attrs.class,
19770
- style: attrs.style,
19773
+ className: void 0,
19774
+ style: void 0,
19771
19775
  classNames: props.classNames,
19772
19776
  styles: props.styles,
19773
19777
  vars: props.vars,
@@ -19797,8 +19801,8 @@ var Flex = withBoxProps(defineComponent({
19797
19801
  component: props.component,
19798
19802
  ...attrs,
19799
19803
  ...getStyles("root", {
19800
- className: parsedStyleProps.hasResponsiveStyles ? responsiveClassName : void 0,
19801
- style: filterProps(parsedStyleProps.inlineStyles)
19804
+ className: [attrs.class, parsedStyleProps.hasResponsiveStyles ? responsiveClassName : void 0],
19805
+ style: [attrs.style, filterProps(parsedStyleProps.inlineStyles)]
19802
19806
  })
19803
19807
  }, () => slots.default?.())];
19804
19808
  };
@@ -20196,7 +20200,7 @@ var StepperBase = defineComponent({
20196
20200
  default: void 0
20197
20201
  },
20198
20202
  size: {
20199
- type: [String, Number],
20203
+ type: String,
20200
20204
  default: void 0
20201
20205
  },
20202
20206
  radius: {
@@ -26239,14 +26243,17 @@ var Drawer = Object.assign(DrawerBaseComponent, {
26239
26243
  });
26240
26244
  //#endregion
26241
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
+ }
26242
26249
  function horizontalSide(placement, arrowY, offset, position) {
26243
- if (placement === "center" || position === "center") return { top: arrowY };
26244
- 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) };
26245
26252
  }
26246
26253
  function verticalSide(placement, arrowX, offset, position, dir) {
26247
- if (placement === "center" || position === "center") return { left: arrowX };
26248
- if (placement === "end") return { [dir === "ltr" ? "right" : "left"]: offset };
26249
- 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) };
26250
26257
  }
26251
26258
  var radiusBySide = {
26252
26259
  bottom: "borderTopLeftRadius",
@@ -26267,15 +26274,15 @@ function mergeStyles(position, size, dir) {
26267
26274
  const startShape = placement === "start" !== (dir === "rtl");
26268
26275
  return {
26269
26276
  ...base,
26270
- [side === "bottom" ? "top" : "bottom"]: -size,
26271
- [physical]: 0,
26277
+ [side === "bottom" ? "top" : "bottom"]: px$1(-size),
26278
+ [physical]: px$1(0),
26272
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%)"
26273
26280
  };
26274
26281
  }
26275
26282
  return {
26276
26283
  ...base,
26277
- [side === "left" ? "right" : "left"]: -size,
26278
- [placement === "start" ? "top" : "bottom"]: 0,
26284
+ [side === "left" ? "right" : "left"]: px$1(-size),
26285
+ [placement === "start" ? "top" : "bottom"]: px$1(0),
26279
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%)"
26280
26287
  };
26281
26288
  }
@@ -26292,7 +26299,7 @@ function getArrowPositionStyles(input) {
26292
26299
  position: "absolute",
26293
26300
  [radiusBySide[side]]: `${input.arrowRadius}px`
26294
26301
  };
26295
- const edge = -input.arrowSize / 2;
26302
+ const edge = px$1(-input.arrowSize / 2);
26296
26303
  if (side === "left") return {
26297
26304
  ...base,
26298
26305
  ...horizontalSide(placement, input.arrowY, input.arrowOffset, input.arrowPosition),
@@ -26368,6 +26375,7 @@ var FloatingArrow = defineComponent({
26368
26375
  setup(props, { attrs }) {
26369
26376
  const { dir } = useDirection();
26370
26377
  return () => props.visible ? h("div", {
26378
+ role: "presentation",
26371
26379
  ...attrs,
26372
26380
  style: [attrs.style, getArrowPositionStyles({
26373
26381
  ...props,
@@ -26814,7 +26822,11 @@ var PopoverBase = defineComponent({
26814
26822
  ...shiftOptions
26815
26823
  };
26816
26824
  }));
26817
- 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
+ }));
26818
26830
  if (props.middlewares?.size || props.width === "target") result.push(size({
26819
26831
  ...typeof props.middlewares?.size === "object" ? props.middlewares.size : {},
26820
26832
  apply: ({ rects, availableWidth, availableHeight, elements, ...rest }) => {