@mantine-vue/core 3.4.0 → 3.6.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 (107) hide show
  1. package/cjs/index.cjs +4651 -1619
  2. package/cjs/index.cjs.map +1 -1
  3. package/esm/index.mjs +4631 -1621
  4. package/esm/index.mjs.map +1 -1
  5. package/lib/components/ActionBar/ActionBar.vue.d.ts +0 -2
  6. package/lib/components/AppShell/AppShell.context.d.ts +5 -0
  7. package/lib/components/AppShell/AppShell.types.d.ts +44 -2
  8. package/lib/components/AppShell/AppShellAside/AppShellAside.d.ts +3 -3
  9. package/lib/components/AppShell/AppShellFooter/AppShellFooter.d.ts +3 -3
  10. package/lib/components/AppShell/AppShellHeader/AppShellHeader.d.ts +3 -3
  11. package/lib/components/AppShell/AppShellMediaStyles/AppShellMediaStyles.d.ts +9 -1
  12. package/lib/components/AppShell/AppShellMediaStyles/get-variables.d.ts +6 -2
  13. package/lib/components/AppShell/AppShellNavbar/AppShellNavbar.d.ts +3 -3
  14. package/lib/components/AppShell/AppShellResizeHandle/AppShellResizeHandle.d.ts +23 -0
  15. package/lib/components/AppShell/create-app-shell-component.d.ts +3 -3
  16. package/lib/components/AppShell/index.d.ts +2 -0
  17. package/lib/components/AppShell/use-app-shell-resize/clamp-resize-size.d.ts +7 -0
  18. package/lib/components/AppShell/use-app-shell-resize/resize-section-config.d.ts +18 -0
  19. package/lib/components/AppShell/use-app-shell-resize/use-app-shell-resize.d.ts +6 -0
  20. package/lib/components/AppShell/use-resizing/use-resizing.d.ts +1 -0
  21. package/lib/components/Autocomplete/Autocomplete.d.ts +5 -5
  22. package/lib/components/Autocomplete/Autocomplete.vue.d.ts +2 -2
  23. package/lib/components/Avatar/Avatar.types.d.ts +2 -2
  24. package/lib/components/Cascader/Cascader.d.ts +5 -5
  25. package/lib/components/Cascader/Cascader.vue.d.ts +2 -2
  26. package/lib/components/Checkbox/Checkbox.d.ts +1 -0
  27. package/lib/components/Checkbox/Checkbox.types.d.ts +3 -2
  28. package/lib/components/Checkbox/Checkbox.vue.d.ts +1 -0
  29. package/lib/components/Checkbox/CheckboxIndicator/CheckboxIndicator.types.d.ts +2 -2
  30. package/lib/components/Combobox/get-combobox-label-id.d.ts +9 -0
  31. package/lib/components/Drawer/Drawer.context.d.ts +2 -0
  32. package/lib/components/HoverCard/HoverCard.context.d.ts +12 -0
  33. package/lib/components/HoverCard/HoverCard.d.ts +1 -1
  34. package/lib/components/HoverCard/HoverCard.types.d.ts +14 -0
  35. package/lib/components/HoverCard/index.d.ts +1 -1
  36. package/lib/components/HoverCard/use-hover-card.d.ts +3 -0
  37. package/lib/components/Menu/Menu.types.d.ts +4 -0
  38. package/lib/components/ModalBase/ModalBase.types.d.ts +2 -0
  39. package/lib/components/ModalBase/use-modal.d.ts +1 -0
  40. package/lib/components/MultiSelect/MultiSelect.d.ts +5 -5
  41. package/lib/components/MultiSelect/MultiSelect.vue.d.ts +2 -2
  42. package/lib/components/NumberInput/number-input-utils.d.ts +14 -1
  43. package/lib/components/PasswordInput/PasswordInputField.vue.d.ts +3 -0
  44. package/lib/components/Popover/Popover.types.d.ts +4 -0
  45. package/lib/components/Popover/Popover.vue.d.ts +2 -0
  46. package/lib/components/Portal/Portal.vue.d.ts +1 -3
  47. package/lib/components/Radio/Radio.d.ts +1 -0
  48. package/lib/components/Radio/Radio.types.d.ts +3 -2
  49. package/lib/components/Radio/Radio.vue.d.ts +1 -0
  50. package/lib/components/Radio/RadioIndicator/RadioIndicator.types.d.ts +2 -2
  51. package/lib/components/Select/Select.d.ts +5 -5
  52. package/lib/components/Select/Select.vue.d.ts +2 -2
  53. package/lib/components/Slider/Thumb/Thumb.d.ts +5 -5
  54. package/lib/components/Slider/Thumb/Thumb.vue.d.ts +2 -2
  55. package/lib/components/Table/index.d.ts +1 -1
  56. package/lib/components/TagsInput/TagsInput.d.ts +5 -5
  57. package/lib/components/TagsInput/TagsInput.vue.d.ts +2 -2
  58. package/lib/components/Toggle/Toggle.d.ts +15 -0
  59. package/lib/components/Toggle/Toggle.types.d.ts +55 -0
  60. package/lib/components/Toggle/Toggle.vue.d.ts +19 -0
  61. package/lib/components/Toggle/index.d.ts +1 -0
  62. package/lib/components/Toolbar/Toolbar.context.d.ts +12 -0
  63. package/lib/components/Toolbar/Toolbar.d.ts +26 -0
  64. package/lib/components/Toolbar/Toolbar.types.d.ts +90 -0
  65. package/lib/components/Toolbar/Toolbar.vue.d.ts +13 -0
  66. package/lib/components/Toolbar/ToolbarDivider.vue.d.ts +3 -0
  67. package/lib/components/Toolbar/ToolbarGroup.vue.d.ts +13 -0
  68. package/lib/components/Toolbar/ToolbarToggle.vue.d.ts +14 -0
  69. package/lib/components/Toolbar/ToolbarToggleGroup.vue.d.ts +19 -0
  70. package/lib/components/Toolbar/ToolbarToggleItem.vue.d.ts +14 -0
  71. package/lib/components/Toolbar/index.d.ts +1 -0
  72. package/lib/components/Tooltip/Tooltip.types.d.ts +2 -0
  73. package/lib/components/Tooltip/Tooltip.vue.d.ts +1 -0
  74. package/lib/components/Tooltip/use-tooltip.d.ts +2 -0
  75. package/lib/components/Tour/Tour.context.d.ts +27 -0
  76. package/lib/components/Tour/Tour.d.ts +184 -0
  77. package/lib/components/Tour/Tour.types.d.ts +131 -0
  78. package/lib/components/Tour/Tour.vue.d.ts +25 -0
  79. package/lib/components/Tour/TourBeacon.vue.d.ts +4 -0
  80. package/lib/components/Tour/TourBeaconPositioned.vue.d.ts +12 -0
  81. package/lib/components/Tour/TourBody.vue.d.ts +13 -0
  82. package/lib/components/Tour/TourCloseButton.vue.d.ts +3 -0
  83. package/lib/components/Tour/TourNavigation.vue.d.ts +3 -0
  84. package/lib/components/Tour/TourOverlay.vue.d.ts +8 -0
  85. package/lib/components/Tour/TourRoot.vue.d.ts +26 -0
  86. package/lib/components/Tour/TourStep.vue.d.ts +13 -0
  87. package/lib/components/Tour/TourTitle.vue.d.ts +13 -0
  88. package/lib/components/Tour/TourTooltip.vue.d.ts +14 -0
  89. package/lib/components/Tour/get-overlay-hit-path.d.ts +6 -0
  90. package/lib/components/Tour/index.d.ts +3 -0
  91. package/lib/components/Tour/is-element-in-view.d.ts +1 -0
  92. package/lib/components/TreeSelect/TreeSelect.d.ts +6 -6
  93. package/lib/components/TreeSelect/TreeSelect.types.d.ts +15 -0
  94. package/lib/components/TreeSelect/TreeSelect.vue.d.ts +2 -2
  95. package/lib/components/TreeSelect/index.d.ts +1 -1
  96. package/lib/components/index.d.ts +3 -0
  97. package/lib/core/Box/Box.d.ts +4 -4
  98. package/lib/core/MantineProvider/Mantine.context.d.ts +2 -2
  99. package/lib/core/MantineProvider/MantineProvider.d.ts +19 -19
  100. package/lib/core/MantineProvider/MantineThemeProvider.d.ts +9 -9
  101. package/lib/core/styles-api/styles-api.types.d.ts +2 -0
  102. package/lib/core/utils/extract-style-props.d.ts +14 -0
  103. package/lib/core/utils/index.d.ts +1 -0
  104. package/lib/utils/InlineInput/InlineInput.d.ts +1 -1
  105. package/package.json +3 -3
  106. package/styles.css +718 -176
  107. package/styles.layer.css +718 -176
@@ -4,6 +4,14 @@ export interface HoverCardSlots {
4
4
  /** `HoverCard.Target` and `HoverCard.Dropdown`. */
5
5
  default?: () => VNodeChild;
6
6
  }
7
+ export interface HoverCardEvents {
8
+ /** Opens the dropdown when the target is hovered. @default true */
9
+ hover?: boolean;
10
+ /** Opens the dropdown when the target receives keyboard focus. @default true */
11
+ focus?: boolean;
12
+ /** Opens the dropdown when the target is tapped. Requires hover activation. @default false */
13
+ touch?: boolean;
14
+ }
7
15
  /** Props declared by `HoverCard` itself. See `HoverCardProps` for the full public type. */
8
16
  export interface HoverCardOwnProps {
9
17
  /**
@@ -24,6 +32,12 @@ export interface HoverCardOwnProps {
24
32
  * @default 150
25
33
  */
26
34
  closeDelay?: number;
35
+ /** Events that activate the dropdown. Unspecified fields preserve their defaults. */
36
+ events?: HoverCardEvents;
37
+ /** Keeps the dropdown open while the pointer is over it. @default false */
38
+ interactive?: boolean;
39
+ /** Accessible relationship used between the target and dropdown. @default 'dialog' */
40
+ role?: 'dialog' | 'tooltip';
27
41
  }
28
42
  /** `opened` and `onChange` are owned by `HoverCard`, which drives them from hover. */
29
43
  export interface HoverCardProps extends Omit<PopoverProps, 'opened' | 'onChange' | keyof HoverCardOwnProps>, HoverCardOwnProps {
@@ -3,7 +3,7 @@ export { HoverCardTarget } from './HoverCardTarget/HoverCardTarget';
3
3
  export { HoverCardDropdown } from './HoverCardDropdown/HoverCardDropdown';
4
4
  export { HoverCardGroup } from './HoverCardGroup/HoverCardGroup';
5
5
  export { useHoverCardContext } from './HoverCard.context';
6
- export type { HoverCardOwnProps, HoverCardProps, HoverCardSlots } from './HoverCard';
6
+ export type { HoverCardEvents, HoverCardOwnProps, HoverCardProps, HoverCardSlots, } from './HoverCard';
7
7
  export type { HoverCardTargetProps } from './HoverCardTarget/HoverCardTarget';
8
8
  export type { HoverCardDropdownProps, HoverCardDropdownSlots, } from './HoverCardDropdown/HoverCardDropdown';
9
9
  export type { HoverCardGroupProps, HoverCardGroupSlots, HoverCardGroupContextValue, } from './HoverCardGroup/HoverCardGroup';
@@ -4,9 +4,12 @@ export declare function useHoverCard(settings: {
4
4
  defaultOpened?: boolean;
5
5
  onOpen?: () => void;
6
6
  onClose?: () => void;
7
+ onDismiss?: () => void;
7
8
  }): {
8
9
  opened: import("vue").Ref<boolean, boolean>;
9
10
  openDropdown: () => void;
10
11
  closeDropdown: () => void;
12
+ closeImmediately: () => void;
13
+ dismiss: () => void;
11
14
  assignTarget: (node: HTMLElement | null) => void;
12
15
  };
@@ -250,6 +250,10 @@ export interface MenuContextMenuProps {
250
250
  }
251
251
  /** Props of `Menu.Sub`, a nested menu opened from a `Menu.Sub.Target`. */
252
252
  export interface MenuSubProps {
253
+ /** `Menu.Sub` is always rendered inside its parent dropdown. */
254
+ withinPortal?: never;
255
+ /** `Menu.Sub` does not support portal props because it is always rendered inline. */
256
+ portalProps?: never;
253
257
  /** Open state. Controlled when set, bound with `v-model:opened`. */
254
258
  opened?: boolean;
255
259
  /** Uncontrolled initial open state. */
@@ -7,6 +7,8 @@ export interface ModalBaseSlots {
7
7
  }
8
8
  /** Props declared by `ModalBase` itself. See `ModalBaseProps` for the full public type. */
9
9
  export interface ModalBaseOwnProps {
10
+ /** Internal set used by modal and drawer stacks to handle each Escape event once. */
11
+ __handledEscapeEvents?: WeakSet<KeyboardEvent>;
10
12
  /** Receives the root DOM node. */
11
13
  rootRef?: VueRefTarget<Element>;
12
14
  /** Open state of the modal. */
@@ -5,6 +5,7 @@ export declare function useModal(input: {
5
5
  trapFocus: () => boolean;
6
6
  closeOnEscape: () => boolean;
7
7
  returnFocus: () => boolean;
8
+ handledEscapeEvents?: WeakSet<KeyboardEvent>;
8
9
  }): {
9
10
  id: import("vue").ComputedRef<string>;
10
11
  titleMounted: import("vue").Ref<boolean, boolean>;
@@ -1,8 +1,8 @@
1
1
  export declare const MultiSelect: {
2
2
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
3
3
  onRemove?: ((value: any) => any) | undefined;
4
- onClear?: (() => any) | undefined;
5
4
  onChange?: ((value: any[]) => any) | undefined;
5
+ onClear?: (() => any) | undefined;
6
6
  "onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
7
7
  "onOption-submit"?: ((value: any) => any) | undefined;
8
8
  "onDropdown-open"?: (() => any) | undefined;
@@ -12,8 +12,8 @@ export declare const MultiSelect: {
12
12
  "onMax-values"?: (() => any) | undefined;
13
13
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
14
  remove: (value: any) => any;
15
- clear: () => any;
16
15
  change: (value: any[]) => any;
16
+ clear: () => any;
17
17
  "update:modelValue": (value: any[]) => any;
18
18
  "option-submit": (value: any) => any;
19
19
  "dropdown-open": () => any;
@@ -30,8 +30,8 @@ export declare const MultiSelect: {
30
30
  Defaults: {};
31
31
  }, Readonly<{}> & Readonly<{
32
32
  onRemove?: ((value: any) => any) | undefined;
33
- onClear?: (() => any) | undefined;
34
33
  onChange?: ((value: any[]) => any) | undefined;
34
+ onClear?: (() => any) | undefined;
35
35
  "onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
36
36
  "onOption-submit"?: ((value: any) => any) | undefined;
37
37
  "onDropdown-open"?: (() => any) | undefined;
@@ -45,8 +45,8 @@ export declare const MultiSelect: {
45
45
  __isSuspense?: never;
46
46
  } & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{
47
47
  onRemove?: ((value: any) => any) | undefined;
48
- onClear?: (() => any) | undefined;
49
48
  onChange?: ((value: any[]) => any) | undefined;
49
+ onClear?: (() => any) | undefined;
50
50
  "onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
51
51
  "onOption-submit"?: ((value: any) => any) | undefined;
52
52
  "onDropdown-open"?: (() => any) | undefined;
@@ -56,8 +56,8 @@ export declare const MultiSelect: {
56
56
  "onMax-values"?: (() => any) | undefined;
57
57
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
58
58
  remove: (value: any) => any;
59
- clear: () => any;
60
59
  change: (value: any[]) => any;
60
+ clear: () => any;
61
61
  "update:modelValue": (value: any[]) => any;
62
62
  "option-submit": (value: any) => any;
63
63
  "dropdown-open": () => any;
@@ -10,8 +10,8 @@ declare const _default: typeof __VLS_export;
10
10
  export default _default;
11
11
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
12
  remove: (value: any) => any;
13
- clear: () => any;
14
13
  change: (value: any[]) => any;
14
+ clear: () => any;
15
15
  "update:modelValue": (value: any[]) => any;
16
16
  "option-submit": (value: any) => any;
17
17
  "dropdown-open": () => any;
@@ -21,8 +21,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{}, {}
21
21
  "max-values": () => any;
22
22
  }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
23
23
  onRemove?: ((value: any) => any) | undefined;
24
- onClear?: (() => any) | undefined;
25
24
  onChange?: ((value: any[]) => any) | undefined;
25
+ onClear?: (() => any) | undefined;
26
26
  "onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
27
27
  "onOption-submit"?: ((value: any) => any) | undefined;
28
28
  "onDropdown-open"?: (() => any) | undefined;
@@ -7,7 +7,20 @@ export declare function canStepBigInt(value: bigint | string, allowNegative: boo
7
7
  export declare function stripFormatting(value: string, options: NumberFormatterOptions): string;
8
8
  export declare function parseNumberInputValue(rawValue: string, allowDecimal: boolean, allowNegative: boolean, allowLeadingZeros: boolean, decimalScale?: number, fixedDecimalScale?: boolean): NumberInputValue;
9
9
  export declare function sanitizeNumberInputString(rawValue: string, allowDecimal: boolean, allowNegative: boolean, decimalScale?: number): string;
10
- export declare function clampAndSanitizeInput(sanitizedValue: string | number, max?: number, min?: number): string | number;
10
+ export declare function sanitizeInputOnBlur(value: string, options: {
11
+ min?: number;
12
+ max?: number;
13
+ trim: boolean;
14
+ clamp: boolean;
15
+ }): string | number;
16
+ export interface NormalizePastedValueOptions {
17
+ decimalSeparator: string;
18
+ thousandSeparator?: string;
19
+ allowedDecimalSeparators: string[];
20
+ thousandsGroupStyle?: 'thousand' | 'lakh' | 'wan' | 'none';
21
+ }
22
+ export declare function normalizePastedValue(value: string, options: NormalizePastedValueOptions): string;
23
+ export declare function getCaretPositionAfterPaste(rawValue: string, rawCaret: number, formattedValue: string, decimalSeparator: string): number;
11
24
  export declare function isInRange(value: number | undefined, min: number | undefined, max: number | undefined): boolean;
12
25
  export declare function isStrictAllowed(value: NumberInputValue, min?: number, max?: number): boolean;
13
26
  export declare function restoreInputValue(input: HTMLInputElement, value: string): void;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -104,6 +104,10 @@ export interface PopoverProps {
104
104
  * @default true
105
105
  */
106
106
  closeOnClickOutside?: boolean;
107
+ /** Events that trigger outside-click detection. @default ['mousedown', 'touchstart'] */
108
+ clickOutsideEvents?: string[];
109
+ /** If set, outside-click listeners are registered in the capture phase. @default false */
110
+ clickOutsideCapture?: boolean;
107
111
  /**
108
112
  * If set, the dropdown closes when `Escape` is pressed inside it.
109
113
  *
@@ -15,6 +15,8 @@ declare const defaults: {
15
15
  readonly withRoles: true;
16
16
  readonly returnFocus: false;
17
17
  readonly keepMounted: false;
18
+ readonly clickOutsideEvents: string[];
19
+ readonly clickOutsideCapture: false;
18
20
  readonly zIndex: number;
19
21
  readonly floatingStrategy: "absolute";
20
22
  readonly transitionProps: {
@@ -1,9 +1,7 @@
1
1
  import type { PortalOwnProps, PortalSlots } from './Portal.types';
2
- type __VLS_Slots = PortalSlots;
3
- declare const __VLS_base: import("vue").DefineComponent<PortalOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PortalOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
2
  declare const _default: typeof __VLS_export;
6
3
  export default _default;
4
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<PortalOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PortalOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PortalSlots>;
7
5
  type __VLS_WithSlots<T, S> = T & {
8
6
  new (): {
9
7
  $slots: S;
@@ -8,6 +8,7 @@ export declare const Radio: import("../..").MantineComponent<{
8
8
  ref: HTMLDivElement;
9
9
  exposed: {
10
10
  rootElement: Element | null;
11
+ inputElement: Element | null;
11
12
  };
12
13
  element: "div";
13
14
  stylesNames: import("./Radio.types").RadioStylesNames;
@@ -4,10 +4,10 @@ import type { RadioGroup } from './RadioGroup/RadioGroup';
4
4
  import type { VueRefTarget } from '@mantine-vue/hooks';
5
5
  import type { Component, VNodeChild } from 'vue';
6
6
  import type { BoxMod, BoxProps, MantineColor, MantineNode, MantineRadius, MantineSize, StylesApiProps, Factory } from '../../core';
7
- export type RadioVariant = 'filled' | 'outline';
7
+ export type RadioVariant = 'filled' | 'outline' | 'light';
8
8
  export type RadioStylesNames = 'root' | 'body' | 'labelWrapper' | 'label' | 'description' | 'error' | 'inner' | 'radio' | 'icon';
9
9
  export type RadioCssVariables = {
10
- root: '--radio-size' | '--radio-radius' | '--radio-color' | '--radio-icon-color' | '--radio-icon-size';
10
+ root: '--radio-size' | '--radio-radius' | '--radio-color' | '--radio-icon-color' | '--radio-icon-size' | '--radio-bg';
11
11
  };
12
12
  export interface RadioIconSlotProps {
13
13
  /** Class name generated for the `icon` selector. */
@@ -135,6 +135,7 @@ export type RadioFactory = Factory<{
135
135
  ref: HTMLDivElement;
136
136
  exposed: {
137
137
  rootElement: Element | null;
138
+ inputElement: Element | null;
138
139
  };
139
140
  element: 'div';
140
141
  stylesNames: RadioStylesNames;
@@ -21,6 +21,7 @@ declare const _default: typeof __VLS_export;
21
21
  export default _default;
22
22
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<RadioOwnProps, {
23
23
  rootElement: import("vue").Ref<Element | null, Element | null>;
24
+ inputElement: import("vue").Ref<Element | null, Element | null>;
24
25
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
26
  change: (checked: boolean) => any;
26
27
  "update:modelValue": (checked: boolean) => any;
@@ -1,6 +1,6 @@
1
1
  import type { Component, VNodeChild } from 'vue';
2
2
  import type { BoxMod, BoxProps, MantineColor, MantineRadius, MantineSize, StylesApiProps, Factory } from '../../../core';
3
- export type RadioIndicatorVariant = 'filled' | 'outline';
3
+ export type RadioIndicatorVariant = 'filled' | 'outline' | 'light';
4
4
  /** Props declared by `RadioIndicator` itself. See `RadioIndicatorProps` for the full public type. */
5
5
  export interface RadioIndicatorOwnProps extends StylesApiProps<RadioIndicatorFactory> {
6
6
  /** Receives the root DOM node. */
@@ -57,7 +57,7 @@ export interface RadioIndicatorProps extends Omit<BoxProps, keyof RadioIndicator
57
57
  }
58
58
  export type RadioIndicatorStylesNames = 'icon' | 'indicator';
59
59
  export type RadioIndicatorCssVariables = {
60
- indicator: '--radio-size' | '--radio-radius' | '--radio-color' | '--radio-icon-size';
60
+ indicator: '--radio-size' | '--radio-radius' | '--radio-color' | '--radio-icon-color' | '--radio-icon-size' | '--radio-bg';
61
61
  };
62
62
  export type RadioIndicatorFactory = Factory<{
63
63
  props: Omit<RadioIndicatorProps, 'rootRef'>;
@@ -1,7 +1,7 @@
1
1
  export declare const Select: {
2
2
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
3
- onClear?: (() => any) | undefined;
4
3
  onChange?: ((value: any, option: import("..").ComboboxItem<any> | null) => any) | undefined;
4
+ onClear?: (() => any) | undefined;
5
5
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
6
6
  "onOption-submit"?: ((value: any) => any) | undefined;
7
7
  "onDropdown-open"?: (() => any) | undefined;
@@ -9,8 +9,8 @@ export declare const Select: {
9
9
  "onSearch-change"?: ((value: string) => any) | undefined;
10
10
  "onUpdate:searchValue"?: ((value: string) => any) | undefined;
11
11
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
- clear: () => any;
13
12
  change: (value: any, option: import("..").ComboboxItem<any> | null) => any;
13
+ clear: () => any;
14
14
  "update:modelValue": (value: any) => any;
15
15
  "option-submit": (value: any) => any;
16
16
  "dropdown-open": () => any;
@@ -25,8 +25,8 @@ export declare const Select: {
25
25
  M: {};
26
26
  Defaults: {};
27
27
  }, Readonly<{}> & Readonly<{
28
- onClear?: (() => any) | undefined;
29
28
  onChange?: ((value: any, option: import("..").ComboboxItem<any> | null) => any) | undefined;
29
+ onClear?: (() => any) | undefined;
30
30
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
31
31
  "onOption-submit"?: ((value: any) => any) | undefined;
32
32
  "onDropdown-open"?: (() => any) | undefined;
@@ -38,8 +38,8 @@ export declare const Select: {
38
38
  __isTeleport?: never;
39
39
  __isSuspense?: never;
40
40
  } & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{
41
- onClear?: (() => any) | undefined;
42
41
  onChange?: ((value: any, option: import("..").ComboboxItem<any> | null) => any) | undefined;
42
+ onClear?: (() => any) | undefined;
43
43
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
44
44
  "onOption-submit"?: ((value: any) => any) | undefined;
45
45
  "onDropdown-open"?: (() => any) | undefined;
@@ -47,8 +47,8 @@ export declare const Select: {
47
47
  "onSearch-change"?: ((value: string) => any) | undefined;
48
48
  "onUpdate:searchValue"?: ((value: string) => any) | undefined;
49
49
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
50
- clear: () => any;
51
50
  change: (value: any, option: import("..").ComboboxItem<any> | null) => any;
51
+ clear: () => any;
52
52
  "update:modelValue": (value: any) => any;
53
53
  "option-submit": (value: any) => any;
54
54
  "dropdown-open": () => any;
@@ -2,8 +2,8 @@ import { type ComboboxItem } from '../Combobox';
2
2
  import type { SelectSlots } from './Select.types';
3
3
  type __VLS_Slots = SelectSlots;
4
4
  declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
- clear: () => any;
6
5
  change: (value: any, option: ComboboxItem<any> | null) => any;
6
+ clear: () => any;
7
7
  "update:modelValue": (value: any) => any;
8
8
  "option-submit": (value: any) => any;
9
9
  "dropdown-open": () => any;
@@ -11,8 +11,8 @@ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, impo
11
11
  "search-change": (value: string) => any;
12
12
  "update:searchValue": (value: string) => any;
13
13
  }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
14
- onClear?: (() => any) | undefined;
15
14
  onChange?: ((value: any, option: ComboboxItem<any> | null) => any) | undefined;
15
+ onClear?: (() => any) | undefined;
16
16
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
17
17
  "onOption-submit"?: ((value: any) => any) | undefined;
18
18
  "onDropdown-open"?: (() => any) | undefined;
@@ -1,13 +1,13 @@
1
1
  /** Draggable thumb of a `Slider` or `RangeSlider`, including its floating label. */
2
2
  export declare const Thumb: {
3
3
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./Thumb.types").SliderThumbOwnProps> & Readonly<{
4
- onMousedown?: ((event: MouseEvent | TouchEvent) => any) | undefined;
5
4
  onBlur?: ((event: FocusEvent) => any) | undefined;
6
5
  onFocus?: ((event: FocusEvent) => any) | undefined;
6
+ onMousedown?: ((event: MouseEvent | TouchEvent) => any) | undefined;
7
7
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
- mousedown: (event: MouseEvent | TouchEvent) => any;
9
8
  blur: (event: FocusEvent) => any;
10
9
  focus: (event: FocusEvent) => any;
10
+ mousedown: (event: MouseEvent | TouchEvent) => any;
11
11
  }, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
12
12
  P: {};
13
13
  B: {};
@@ -16,21 +16,21 @@ export declare const Thumb: {
16
16
  M: {};
17
17
  Defaults: {};
18
18
  }, Readonly<import("./Thumb.types").SliderThumbOwnProps> & Readonly<{
19
- onMousedown?: ((event: MouseEvent | TouchEvent) => any) | undefined;
20
19
  onBlur?: ((event: FocusEvent) => any) | undefined;
21
20
  onFocus?: ((event: FocusEvent) => any) | undefined;
21
+ onMousedown?: ((event: MouseEvent | TouchEvent) => any) | undefined;
22
22
  }>, {}, {}, {}, {}, {}>;
23
23
  __isFragment?: never;
24
24
  __isTeleport?: never;
25
25
  __isSuspense?: never;
26
26
  } & import("vue").ComponentOptionsBase<Readonly<import("./Thumb.types").SliderThumbOwnProps> & Readonly<{
27
- onMousedown?: ((event: MouseEvent | TouchEvent) => any) | undefined;
28
27
  onBlur?: ((event: FocusEvent) => any) | undefined;
29
28
  onFocus?: ((event: FocusEvent) => any) | undefined;
29
+ onMousedown?: ((event: MouseEvent | TouchEvent) => any) | undefined;
30
30
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
- mousedown: (event: MouseEvent | TouchEvent) => any;
32
31
  blur: (event: FocusEvent) => any;
33
32
  focus: (event: FocusEvent) => any;
33
+ mousedown: (event: MouseEvent | TouchEvent) => any;
34
34
  }, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
35
35
  $slots: import("./Thumb.types").SliderThumbSlots;
36
36
  });
@@ -15,13 +15,13 @@ export { ThumbLabel };
15
15
  declare const _default: typeof __VLS_export;
16
16
  export default _default;
17
17
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<SliderThumbOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
- mousedown: (event: MouseEvent | TouchEvent) => any;
19
18
  blur: (event: FocusEvent) => any;
20
19
  focus: (event: FocusEvent) => any;
20
+ mousedown: (event: MouseEvent | TouchEvent) => any;
21
21
  }, string, import("vue").PublicProps, Readonly<SliderThumbOwnProps> & Readonly<{
22
- onMousedown?: ((event: MouseEvent | TouchEvent) => any) | undefined;
23
22
  onBlur?: ((event: FocusEvent) => any) | undefined;
24
23
  onFocus?: ((event: FocusEvent) => any) | undefined;
24
+ onMousedown?: ((event: MouseEvent | TouchEvent) => any) | undefined;
25
25
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, SliderThumbSlots>;
26
26
  type __VLS_WithSlots<T, S> = T & {
27
27
  new (): {
@@ -1,3 +1,4 @@
1
+ import { TableScrollContainer } from './TableScrollContainer';
1
2
  export { Table } from './Table';
2
3
  export type { TableCssVariables, TableData, TableFactory, TableOwnProps, TableProps, TableSlots, TableStylesNames, TableVariant, } from './Table';
3
4
  export { TableCaption, TableTbody, TableTd, TableTfoot, TableTh, TableThead, TableTr, } from './Table.components';
@@ -5,4 +6,3 @@ export type { TableCaptionProps, TableElementName, TableElementOptions, TableEle
5
6
  export { TableDataRenderer } from './TableDataRenderer';
6
7
  export { TableScrollContainer };
7
8
  export type { TableScrollContainerCssVariables, TableScrollContainerFactory, TableScrollContainerOwnProps, TableScrollContainerProps, TableScrollContainerSlots, TableScrollContainerStylesNames, } from './TableScrollContainer';
8
- import { TableScrollContainer } from './TableScrollContainer';
@@ -1,8 +1,8 @@
1
1
  export declare const TagsInput: {
2
2
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
3
3
  onRemove?: ((value: string) => any) | undefined;
4
- onClear?: (() => any) | undefined;
5
4
  onChange?: ((value: string[]) => any) | undefined;
5
+ onClear?: (() => any) | undefined;
6
6
  "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
7
7
  "onOption-submit"?: ((value: string) => any) | undefined;
8
8
  "onDropdown-open"?: (() => any) | undefined;
@@ -13,8 +13,8 @@ export declare const TagsInput: {
13
13
  onDuplicate?: ((value: string) => any) | undefined;
14
14
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
15
  remove: (value: string) => any;
16
- clear: () => any;
17
16
  change: (value: string[]) => any;
17
+ clear: () => any;
18
18
  "update:modelValue": (value: string[]) => any;
19
19
  "option-submit": (value: string) => any;
20
20
  "dropdown-open": () => any;
@@ -32,8 +32,8 @@ export declare const TagsInput: {
32
32
  Defaults: {};
33
33
  }, Readonly<{}> & Readonly<{
34
34
  onRemove?: ((value: string) => any) | undefined;
35
- onClear?: (() => any) | undefined;
36
35
  onChange?: ((value: string[]) => any) | undefined;
36
+ onClear?: (() => any) | undefined;
37
37
  "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
38
38
  "onOption-submit"?: ((value: string) => any) | undefined;
39
39
  "onDropdown-open"?: (() => any) | undefined;
@@ -48,8 +48,8 @@ export declare const TagsInput: {
48
48
  __isSuspense?: never;
49
49
  } & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{
50
50
  onRemove?: ((value: string) => any) | undefined;
51
- onClear?: (() => any) | undefined;
52
51
  onChange?: ((value: string[]) => any) | undefined;
52
+ onClear?: (() => any) | undefined;
53
53
  "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
54
54
  "onOption-submit"?: ((value: string) => any) | undefined;
55
55
  "onDropdown-open"?: (() => any) | undefined;
@@ -60,8 +60,8 @@ export declare const TagsInput: {
60
60
  onDuplicate?: ((value: string) => any) | undefined;
61
61
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
62
62
  remove: (value: string) => any;
63
- clear: () => any;
64
63
  change: (value: string[]) => any;
64
+ clear: () => any;
65
65
  "update:modelValue": (value: string[]) => any;
66
66
  "option-submit": (value: string) => any;
67
67
  "dropdown-open": () => any;
@@ -2,8 +2,8 @@ import type { TagsInputSlots } from './TagsInput.types';
2
2
  type __VLS_Slots = TagsInputSlots;
3
3
  declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
4
  remove: (value: string) => any;
5
- clear: () => any;
6
5
  change: (value: string[]) => any;
6
+ clear: () => any;
7
7
  "update:modelValue": (value: string[]) => any;
8
8
  "option-submit": (value: string) => any;
9
9
  "dropdown-open": () => any;
@@ -14,8 +14,8 @@ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, impo
14
14
  duplicate: (value: string) => any;
15
15
  }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
16
16
  onRemove?: ((value: string) => any) | undefined;
17
- onClear?: (() => any) | undefined;
18
17
  onChange?: ((value: string[]) => any) | undefined;
18
+ onClear?: (() => any) | undefined;
19
19
  "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
20
20
  "onOption-submit"?: ((value: string) => any) | undefined;
21
21
  "onDropdown-open"?: (() => any) | undefined;
@@ -0,0 +1,15 @@
1
+ export declare const Toggle: import("../..").MantinePolymorphicComponent<{
2
+ props: Omit<import("./Toggle.types").ToggleProps, "component" | "rootRef">;
3
+ slots: import("./Toggle.types").ToggleSlots;
4
+ emits: import("./Toggle.types").ToggleEmits;
5
+ ref: HTMLButtonElement;
6
+ exposed: {
7
+ rootElement: Element | null;
8
+ };
9
+ defaultComponent: "button";
10
+ defaultRef: HTMLButtonElement;
11
+ stylesNames: import("./Toggle.types").ToggleStylesNames;
12
+ vars: import("./Toggle.types").ToggleCssVariables;
13
+ variant: import("./Toggle.types").ToggleVariant;
14
+ }, "button">;
15
+ export type * from './Toggle.types';
@@ -0,0 +1,55 @@
1
+ import type { VNodeChild } from 'vue';
2
+ import type { VueRefTarget } from '@mantine-vue/hooks';
3
+ import type { BoxProps, MantineColor, MantineElementType, MantineRadius, MantineSize, PolymorphicFactory, StylesApiProps } from '../../core';
4
+ export type ToggleStylesNames = 'root';
5
+ export type ToggleVariant = 'light' | 'filled';
6
+ export type ToggleCssVariables = {
7
+ root: '--toggle-size' | '--toggle-radius' | '--toggle-active-bg' | '--toggle-active-hover' | '--toggle-active-color';
8
+ };
9
+ export interface ToggleOwnProps extends StylesApiProps<ToggleFactory> {
10
+ /** Receives the root DOM node. The factory narrows this to the element the selected root renders. */
11
+ rootRef?: VueRefTarget<Element>;
12
+ /** Root element or Vue component rendered by the component. @default 'button' */
13
+ component?: MantineElementType;
14
+ /** Controlled active state */
15
+ active?: boolean;
16
+ /** Uncontrolled default active state */
17
+ defaultActive?: boolean;
18
+ /** If set, the toggle is disabled */
19
+ disabled?: boolean;
20
+ /** Controls toggle height and min-width, `'md'` by default */
21
+ size?: MantineSize | (string & {});
22
+ /** Key of `theme.radius` or any valid CSS value to set `border-radius`, `theme.defaultRadius` by default */
23
+ radius?: MantineRadius;
24
+ /** If set, the toggle width adjusts to content instead of being square, `false` by default */
25
+ autoWidth?: boolean;
26
+ /** Key of `theme.colors` or any valid CSS color, `theme.primaryColor` by default */
27
+ color?: MantineColor;
28
+ /** Determines whether icon color with filled variant should be changed based on the given `color` prop */
29
+ autoContrast?: boolean;
30
+ /** Controls visual representation of the component. @default 'filled' */
31
+ variant?: ToggleVariant;
32
+ }
33
+ export interface ToggleProps extends Omit<BoxProps, keyof ToggleOwnProps>, ToggleOwnProps {
34
+ }
35
+ export interface ToggleSlots {
36
+ default?: () => VNodeChild;
37
+ }
38
+ export interface ToggleEmits {
39
+ 'update:active': [active: boolean];
40
+ activeChange: [active: boolean];
41
+ }
42
+ export type ToggleFactory = PolymorphicFactory<{
43
+ props: Omit<ToggleProps, 'component' | 'rootRef'>;
44
+ slots: ToggleSlots;
45
+ emits: ToggleEmits;
46
+ ref: HTMLButtonElement;
47
+ exposed: {
48
+ rootElement: Element | null;
49
+ };
50
+ defaultComponent: 'button';
51
+ defaultRef: HTMLButtonElement;
52
+ stylesNames: ToggleStylesNames;
53
+ vars: ToggleCssVariables;
54
+ variant: ToggleVariant;
55
+ }>;
@@ -0,0 +1,19 @@
1
+ import type { ToggleOwnProps, ToggleSlots } from './Toggle.types';
2
+ declare const varsResolver: (theme: import("../..").MantineTheme, props: any, ctx: Record<string, any>) => Record<string, Record<string, string | undefined>>;
3
+ export { varsResolver };
4
+ declare const _default: typeof __VLS_export;
5
+ export default _default;
6
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ToggleOwnProps, {
7
+ rootElement: import("vue").Ref<Element | null, Element | null>;
8
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:active": (active: boolean) => any;
10
+ activeChange: (active: boolean) => any;
11
+ }, string, import("vue").PublicProps, Readonly<ToggleOwnProps> & Readonly<{
12
+ "onUpdate:active"?: ((active: boolean) => any) | undefined;
13
+ onActiveChange?: ((active: boolean) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ToggleSlots>;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1 @@
1
+ export * from './Toggle';
@@ -0,0 +1,12 @@
1
+ export interface ToolbarContextValue {
2
+ getStyles: (selector: string, options?: Record<string, any>) => any;
3
+ orientation: 'horizontal' | 'vertical';
4
+ }
5
+ export declare const provideToolbarContext: (value: ToolbarContextValue) => void, useToolbarContext: () => ToolbarContextValue;
6
+ export interface ToolbarToggleGroupContextValue {
7
+ value: string | string[] | null;
8
+ type: 'single' | 'multiple';
9
+ disabled: boolean;
10
+ onChange: (value: string) => void;
11
+ }
12
+ export declare const provideToolbarToggleGroupContext: (value: ToolbarToggleGroupContextValue) => void, useToolbarToggleGroupContext: () => ToolbarToggleGroupContextValue;
@@ -0,0 +1,26 @@
1
+ import ToolbarGroup from './ToolbarGroup.vue';
2
+ import ToolbarToggle from './ToolbarToggle.vue';
3
+ import ToolbarToggleGroup from './ToolbarToggleGroup.vue';
4
+ import ToolbarToggleItem from './ToolbarToggleItem.vue';
5
+ import ToolbarDivider from './ToolbarDivider.vue';
6
+ export { ToolbarGroup, ToolbarToggle, ToolbarToggleGroup, ToolbarToggleItem, ToolbarDivider };
7
+ export declare const Toolbar: import("../..").MantineComponent<{
8
+ props: Omit<import("./Toolbar.types").ToolbarProps, "rootRef">;
9
+ slots: import("./Toolbar.types").ToolbarSlots;
10
+ ref: HTMLDivElement;
11
+ exposed: {
12
+ rootElement: Element | null;
13
+ };
14
+ element: "div";
15
+ stylesNames: import("./Toolbar.types").ToolbarStylesNames;
16
+ vars: import("./Toolbar.types").ToolbarCssVariables;
17
+ variant: import("..").ToggleVariant;
18
+ staticComponents: {
19
+ Group: typeof ToolbarGroup;
20
+ Toggle: typeof ToolbarToggle;
21
+ ToggleGroup: typeof ToolbarToggleGroup;
22
+ ToggleItem: typeof ToolbarToggleItem;
23
+ Divider: typeof ToolbarDivider;
24
+ };
25
+ }>;
26
+ export type * from './Toolbar.types';