@mantine-vue/core 2.3.1 → 3.0.0

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 (84) hide show
  1. package/cjs/index.cjs +1718 -292
  2. package/cjs/index.cjs.map +1 -1
  3. package/esm/index.mjs +1713 -293
  4. package/esm/index.mjs.map +1 -1
  5. package/lib/components/Accordion/Accordion.d.ts +24 -4
  6. package/lib/components/Accordion/index.d.ts +1 -1
  7. package/lib/components/AngleSlider/AngleSlider.d.ts +15 -2
  8. package/lib/components/Autocomplete/Autocomplete.d.ts +3 -1
  9. package/lib/components/Cascader/Cascader.d.ts +315 -0
  10. package/lib/components/Cascader/cascader-utils.d.ts +11 -0
  11. package/lib/components/Cascader/index.d.ts +4 -0
  12. package/lib/components/Checkbox/Checkbox.d.ts +91 -9
  13. package/lib/components/Checkbox/CheckboxCard/CheckboxCard.d.ts +15 -2
  14. package/lib/components/Checkbox/CheckboxGroup/CheckboxGroup.d.ts +14 -2
  15. package/lib/components/Chip/Chip.d.ts +46 -7
  16. package/lib/components/Chip/ChipGroup/ChipGroup.d.ts +14 -2
  17. package/lib/components/ColorInput/ColorInput.d.ts +9 -3
  18. package/lib/components/ColorInput/index.d.ts +1 -1
  19. package/lib/components/ColorPicker/AlphaSlider/AlphaSlider.d.ts +26 -4
  20. package/lib/components/ColorPicker/ColorPicker.d.ts +14 -2
  21. package/lib/components/ColorPicker/ColorSlider/ColorSlider.d.ts +26 -4
  22. package/lib/components/ColorPicker/HueSlider/HueSlider.d.ts +26 -4
  23. package/lib/components/Combobox/Combobox.d.ts +64 -4
  24. package/lib/components/Combobox/OptionsDropdown/OptionsDropdown.d.ts +1 -0
  25. package/lib/components/ComboboxPopover/ComboboxPopover.d.ts +49 -7
  26. package/lib/components/Drawer/Drawer.d.ts +33 -0
  27. package/lib/components/FileButton/FileButton.d.ts +17 -4
  28. package/lib/components/FileInput/FileInput.d.ts +14 -2
  29. package/lib/components/FloatingWindow/FloatingWindow.context.d.ts +23 -0
  30. package/lib/components/FloatingWindow/FloatingWindow.d.ts +37 -0
  31. package/lib/components/FloatingWindow/FloatingWindowResizeHandle.d.ts +27 -0
  32. package/lib/components/FloatingWindow/index.d.ts +2 -0
  33. package/lib/components/Input/Input.d.ts +74 -5
  34. package/lib/components/InputBase/InputBase.d.ts +41 -2
  35. package/lib/components/InputBase/index.d.ts +1 -1
  36. package/lib/components/JsonInput/JsonInput.d.ts +14 -2
  37. package/lib/components/MaskInput/MaskInput.d.ts +45 -2
  38. package/lib/components/Menu/Menu.context.d.ts +1 -0
  39. package/lib/components/Menu/Menu.d.ts +82 -4
  40. package/lib/components/Modal/Modal.d.ts +33 -0
  41. package/lib/components/MultiSelect/MultiSelect.d.ts +9 -1
  42. package/lib/components/MultiSelect/index.d.ts +1 -1
  43. package/lib/components/NativeSelect/NativeSelect.d.ts +19 -6
  44. package/lib/components/NumberInput/NumberInput.d.ts +14 -2
  45. package/lib/components/PasswordInput/PasswordInput.d.ts +45 -2
  46. package/lib/components/PasswordInput/index.d.ts +1 -1
  47. package/lib/components/PillsInput/PillsInput.d.ts +41 -2
  48. package/lib/components/PillsInput/PillsInputField/PillsInputField.d.ts +41 -2
  49. package/lib/components/PinInput/PinInput.d.ts +15 -2
  50. package/lib/components/Radio/Radio.d.ts +124 -9
  51. package/lib/components/Radio/RadioCard/RadioCard.d.ts +33 -2
  52. package/lib/components/Radio/RadioGroup/RadioGroup.d.ts +14 -2
  53. package/lib/components/Rating/Rating.d.ts +14 -2
  54. package/lib/components/ScrollArea/ScrollArea.d.ts +25 -0
  55. package/lib/components/Scroller/Scroller.d.ts +9 -2
  56. package/lib/components/Scroller/index.d.ts +1 -1
  57. package/lib/components/SegmentedControl/SegmentedControl.d.ts +14 -2
  58. package/lib/components/Select/Select.d.ts +4 -2
  59. package/lib/components/Select/index.d.ts +1 -1
  60. package/lib/components/Slider/RangeSlider/RangeSlider.d.ts +14 -2
  61. package/lib/components/Slider/Slider/Slider.d.ts +14 -2
  62. package/lib/components/Slider/index.d.ts +2 -1
  63. package/lib/components/Splitter/Splitter.d.ts +8 -3
  64. package/lib/components/Splitter/index.d.ts +1 -1
  65. package/lib/components/Stepper/Stepper.d.ts +2 -1
  66. package/lib/components/Switch/Switch.d.ts +67 -13
  67. package/lib/components/Switch/SwitchGroup/SwitchGroup.d.ts +15 -3
  68. package/lib/components/Tabs/Tabs.context.d.ts +0 -1
  69. package/lib/components/Tabs/Tabs.d.ts +0 -15
  70. package/lib/components/TagsInput/TagsInput.d.ts +9 -1
  71. package/lib/components/TagsInput/index.d.ts +1 -1
  72. package/lib/components/TextInput/TextInput.d.ts +36 -2
  73. package/lib/components/Textarea/Textarea.d.ts +39 -4
  74. package/lib/components/Textarea/index.d.ts +1 -0
  75. package/lib/components/Timeline/Timeline.d.ts +19 -1
  76. package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts +20 -1
  77. package/lib/components/Tree/Tree.d.ts +7 -2
  78. package/lib/components/Tree/index.d.ts +1 -1
  79. package/lib/components/TreeSelect/TreeSelect.d.ts +5 -2
  80. package/lib/components/TreeSelect/index.d.ts +1 -1
  81. package/lib/components/index.d.ts +1 -0
  82. package/package.json +3 -3
  83. package/styles.css +471 -129
  84. package/styles.layer.css +471 -129
@@ -1,5 +1,22 @@
1
- import { type PropType } from 'vue';
1
+ import { type PropType, type SlotsType, type VNodeChild } from 'vue';
2
+ import { type InputBaseSlots } from '../InputBase';
3
+ export interface TextareaSlots extends InputBaseSlots {
4
+ /** Content rendered below the textarea, alternative to the `bottomSection` prop */
5
+ bottomSection?: () => VNodeChild;
6
+ }
2
7
  export declare const Textarea: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
+ modelValue: {
9
+ type: StringConstructor;
10
+ default: undefined;
11
+ };
12
+ value: {
13
+ type: StringConstructor;
14
+ default: undefined;
15
+ };
16
+ defaultValue: {
17
+ type: StringConstructor;
18
+ default: undefined;
19
+ };
3
20
  autosize: {
4
21
  type: BooleanConstructor;
5
22
  default: boolean;
@@ -30,7 +47,19 @@ export declare const Textarea: import("vue").DefineComponent<import("vue").Extra
30
47
  };
31
48
  }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
32
49
  [key: string]: any;
33
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
50
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
51
+ modelValue: {
52
+ type: StringConstructor;
53
+ default: undefined;
54
+ };
55
+ value: {
56
+ type: StringConstructor;
57
+ default: undefined;
58
+ };
59
+ defaultValue: {
60
+ type: StringConstructor;
61
+ default: undefined;
62
+ };
34
63
  autosize: {
35
64
  type: BooleanConstructor;
36
65
  default: boolean;
@@ -59,12 +88,18 @@ export declare const Textarea: import("vue").DefineComponent<import("vue").Extra
59
88
  type: StringConstructor;
60
89
  default: undefined;
61
90
  };
62
- }>> & Readonly<{}>, {
91
+ }>> & Readonly<{
92
+ onChange?: ((...args: any[]) => any) | undefined;
93
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
94
+ }>, {
63
95
  resize: "vertical" | "horizontal" | "none" | "both";
96
+ value: string;
97
+ defaultValue: string;
64
98
  __staticSelector: string;
99
+ modelValue: string;
65
100
  autosize: boolean;
66
101
  bottomSection: any;
67
102
  maxRows: number;
68
103
  minRows: number;
69
104
  bottomSectionProps: Record<string, any>;
70
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
105
+ }, SlotsType<TextareaSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1 +1,2 @@
1
1
  export { Textarea } from './Textarea';
2
+ export type { TextareaSlots } from './Textarea';
@@ -1,6 +1,6 @@
1
1
  import { type PropType, type VNode } from 'vue';
2
2
  import { type MantineColor, type MantineRadius } from '../../core';
3
- export type TimelineStylesNames = 'root' | 'itemBody' | 'itemContent' | 'itemBullet' | 'item' | 'itemTitle';
3
+ export type TimelineStylesNames = 'root' | 'itemBody' | 'itemContent' | 'itemBullet' | 'item' | 'itemTitle' | 'itemOpposite';
4
4
  export declare const Timeline: import("../..").WithBoxProps<{
5
5
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
6
6
  active: {
@@ -252,6 +252,14 @@ export declare const Timeline: import("../..").WithBoxProps<{
252
252
  type: PropType<import("../..").MantineNode>;
253
253
  default: undefined;
254
254
  };
255
+ opposite: {
256
+ type: PropType<import("../..").MantineNode>;
257
+ default: undefined;
258
+ };
259
+ alternate: {
260
+ type: BooleanConstructor;
261
+ default: boolean;
262
+ };
255
263
  radius: {
256
264
  type: PropType<MantineRadius>;
257
265
  default: undefined;
@@ -315,6 +323,14 @@ export declare const Timeline: import("../..").WithBoxProps<{
315
323
  type: PropType<import("../..").MantineNode>;
316
324
  default: undefined;
317
325
  };
326
+ opposite: {
327
+ type: PropType<import("../..").MantineNode>;
328
+ default: undefined;
329
+ };
330
+ alternate: {
331
+ type: BooleanConstructor;
332
+ default: boolean;
333
+ };
318
334
  radius: {
319
335
  type: PropType<MantineRadius>;
320
336
  default: undefined;
@@ -356,12 +372,14 @@ export declare const Timeline: import("../..").WithBoxProps<{
356
372
  styles: Function | Record<string, any>;
357
373
  active: boolean;
358
374
  mod: any;
375
+ alternate: boolean;
359
376
  className: any;
360
377
  __active: boolean;
361
378
  __lineActive: boolean;
362
379
  __align: "left" | "right";
363
380
  lineActive: boolean;
364
381
  bullet: import("../..").MantineNode;
382
+ opposite: import("../..").MantineNode;
365
383
  lineVariant: "dashed" | "dotted" | "solid";
366
384
  }, import("vue").SlotsType<import("./TimelineItem/TimelineItem").TimelineItemSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
367
385
  }>;
@@ -1,10 +1,11 @@
1
1
  import { type PropType, type SlotsType, type VNodeChild } from 'vue';
2
2
  import { type MantineColor, type MantineNode, type MantineRadius } from '../../../core';
3
- export type TimelineItemStylesNames = 'itemBody' | 'itemContent' | 'itemBullet' | 'item' | 'itemTitle';
3
+ export type TimelineItemStylesNames = 'itemBody' | 'itemContent' | 'itemBullet' | 'item' | 'itemTitle' | 'itemOpposite';
4
4
  export interface TimelineItemSlots {
5
5
  default?: () => VNodeChild;
6
6
  title?: () => VNodeChild;
7
7
  bullet?: () => VNodeChild;
8
+ opposite?: () => VNodeChild;
8
9
  }
9
10
  export declare const TimelineItem: import("../../..").WithBoxProps<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
10
11
  __active: {
@@ -35,6 +36,14 @@ export declare const TimelineItem: import("../../..").WithBoxProps<import("vue")
35
36
  type: PropType<MantineNode>;
36
37
  default: undefined;
37
38
  };
39
+ opposite: {
40
+ type: PropType<MantineNode>;
41
+ default: undefined;
42
+ };
43
+ alternate: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
38
47
  radius: {
39
48
  type: PropType<MantineRadius>;
40
49
  default: undefined;
@@ -98,6 +107,14 @@ export declare const TimelineItem: import("../../..").WithBoxProps<import("vue")
98
107
  type: PropType<MantineNode>;
99
108
  default: undefined;
100
109
  };
110
+ opposite: {
111
+ type: PropType<MantineNode>;
112
+ default: undefined;
113
+ };
114
+ alternate: {
115
+ type: BooleanConstructor;
116
+ default: boolean;
117
+ };
101
118
  radius: {
102
119
  type: PropType<MantineRadius>;
103
120
  default: undefined;
@@ -139,11 +156,13 @@ export declare const TimelineItem: import("../../..").WithBoxProps<import("vue")
139
156
  styles: Function | Record<string, any>;
140
157
  active: boolean;
141
158
  mod: any;
159
+ alternate: boolean;
142
160
  className: any;
143
161
  __active: boolean;
144
162
  __lineActive: boolean;
145
163
  __align: "left" | "right";
146
164
  lineActive: boolean;
147
165
  bullet: MantineNode;
166
+ opposite: MantineNode;
148
167
  lineVariant: "dashed" | "dotted" | "solid";
149
168
  }, SlotsType<TimelineItemSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
@@ -1,4 +1,4 @@
1
- import { type Component, type PropType, type VNodeChild } from 'vue';
1
+ import { type Component, type PropType, type SlotsType, type VNodeChild } from 'vue';
2
2
  import { type BoxProps } from '../../core';
3
3
  import type { TreeDragDropPayload } from './move-tree-node/move-tree-node';
4
4
  import type { TreeAllowDrop, TreeDragHandleProps } from './use-tree-node-drag-drop';
@@ -50,6 +50,11 @@ export interface TreeProps extends BoxProps {
50
50
  withLines?: boolean;
51
51
  }
52
52
  export type TreeFactory = any;
53
+ export interface TreeSlots {
54
+ default?: () => VNodeChild;
55
+ node?: (payload: RenderTreeNodePayload) => VNodeChild;
56
+ renderNode?: (payload: RenderTreeNodePayload) => VNodeChild;
57
+ }
53
58
  export declare const Tree: import("../..").WithBoxProps<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
54
59
  component: {
55
60
  type: PropType<string | Component>;
@@ -234,4 +239,4 @@ export declare const Tree: import("../..").WithBoxProps<import("vue").DefineComp
234
239
  tree: import("./use-tree").UseTreeReturnType;
235
240
  clearSelectionOnOutsideClick: boolean;
236
241
  withLines: boolean;
237
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
242
+ }, SlotsType<TreeSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
@@ -5,7 +5,7 @@ export { mergeAsyncChildren } from './merge-async-children/merge-async-children'
5
5
  export { moveTreeNode } from './move-tree-node/move-tree-node';
6
6
  export { filterTreeData, defaultTreeNodeFilter } from './filter-tree-data/filter-tree-data';
7
7
  export { flattenTreeData } from './flatten-tree-data/flatten-tree-data';
8
- export type { TreeProps, TreeStylesNames, TreeFactory, TreeCssVariables, TreeNodeData, RenderTreeNodePayload, RenderNode, } from './Tree';
8
+ export type { TreeProps, TreeStylesNames, TreeFactory, TreeCssVariables, TreeNodeData, RenderTreeNodePayload, RenderNode, TreeSlots, } from './Tree';
9
9
  export type { UseTreeInput, UseTreeReturnType, TreeController, TreeExpandedState } from './use-tree';
10
10
  export type { CheckedNodeStatus } from './get-all-checked-nodes/get-all-checked-nodes';
11
11
  export type { TreeNodeFilter } from './filter-tree-data/filter-tree-data';
@@ -11,6 +11,7 @@ export interface TreeSelectRenderNodePayload {
11
11
  selected: boolean;
12
12
  checked: boolean;
13
13
  indeterminate: boolean;
14
+ expand: (event?: Event) => void;
14
15
  }
15
16
  export interface TreeSelectChevronAriaLabels {
16
17
  expand?: string;
@@ -152,6 +153,7 @@ export interface TreeSelectSlots {
152
153
  rightSection?: () => VNodeChild;
153
154
  renderNode?: (payload: TreeSelectRenderNodePayload) => VNodeChild;
154
155
  nothingFound?: () => VNodeChild;
156
+ nothingFoundMessage?: () => VNodeChild;
155
157
  }
156
158
  export declare const TreeSelect: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
157
159
  data: {
@@ -244,7 +246,7 @@ export declare const TreeSelect: import("vue").DefineComponent<import("vue").Ext
244
246
  chevronAriaLabels: PropType<TreeSelectChevronAriaLabels>;
245
247
  }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
246
248
  [key: string]: any;
247
- }>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:searchValue")[], "update:modelValue" | "update:searchValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
249
+ }>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue" | "update:searchValue")[], "change" | "update:modelValue" | "update:searchValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
248
250
  data: {
249
251
  type: PropType<TreeNodeData[]>;
250
252
  required: true;
@@ -334,17 +336,18 @@ export declare const TreeSelect: import("vue").DefineComponent<import("vue").Ext
334
336
  };
335
337
  chevronAriaLabels: PropType<TreeSelectChevronAriaLabels>;
336
338
  }>> & Readonly<{
339
+ onChange?: ((...args: any[]) => any) | undefined;
337
340
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
338
341
  "onUpdate:searchValue"?: ((...args: any[]) => any) | undefined;
339
342
  }>, {
340
343
  mode: TreeSelectMode;
341
344
  value: any;
342
345
  defaultValue: any;
346
+ modelValue: any;
343
347
  clearable: boolean;
344
348
  checkStrictly: boolean;
345
349
  expandOnClick: boolean;
346
350
  withLines: boolean;
347
- modelValue: any;
348
351
  maxDropdownHeight: string | number;
349
352
  nothingFoundMessage: any;
350
353
  dropdownOpened: boolean;
@@ -1,2 +1,2 @@
1
1
  export { TreeSelect, TreeSelectOption } from './TreeSelect';
2
- export type { CheckedStrategy, TreeSelectChevronAriaLabels, TreeSelectMode, TreeSelectProps, TreeSelectRenderNodePayload, TreeSelectValue, } from './TreeSelect';
2
+ export type { CheckedStrategy, TreeSelectChevronAriaLabels, TreeSelectMode, TreeSelectProps, TreeSelectRenderNodePayload, TreeSelectSlots, TreeSelectValue, } from './TreeSelect';
@@ -112,4 +112,5 @@ export * from './MultiSelect';
112
112
  export * from './TagsInput';
113
113
  export * from './ColorInput';
114
114
  export * from './TreeSelect';
115
+ export * from './Cascader';
115
116
  export * from './component-props';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantine-vue/core",
3
- "version": "2.3.1",
3
+ "version": "3.0.0",
4
4
  "description": "Vue component foundation architecturally equivalent to @mantine/core",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -44,8 +44,8 @@
44
44
  "vue": "^3.5.0"
45
45
  },
46
46
  "peerDependencies": {
47
- "@mantine-vue/hooks": "2.3.1",
48
- "@mantine-vue/utils": "2.3.1",
47
+ "@mantine-vue/hooks": "3.0.0",
48
+ "@mantine-vue/utils": "3.0.0",
49
49
  "vue": "^3.5.0"
50
50
  }
51
51
  }