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