@mantine/core 8.3.6 → 8.3.8

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 (91) hide show
  1. package/cjs/components/Alert/Alert.cjs +2 -1
  2. package/cjs/components/Alert/Alert.cjs.map +1 -1
  3. package/cjs/components/AppShell/AppShell.cjs +1 -1
  4. package/cjs/components/AppShell/AppShell.cjs.map +1 -1
  5. package/cjs/components/AppShell/AppShellAside/AppShellAside.cjs +12 -2
  6. package/cjs/components/AppShell/AppShellAside/AppShellAside.cjs.map +1 -1
  7. package/cjs/components/AppShell/AppShellMediaStyles/assign-aside-variables/assign-aside-variables.cjs +2 -0
  8. package/cjs/components/AppShell/AppShellMediaStyles/assign-aside-variables/assign-aside-variables.cjs.map +1 -1
  9. package/cjs/components/Checkbox/Checkbox.cjs +10 -12
  10. package/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
  11. package/cjs/components/Checkbox/CheckboxGroup/CheckboxGroup.cjs +12 -2
  12. package/cjs/components/Checkbox/CheckboxGroup/CheckboxGroup.cjs.map +1 -1
  13. package/cjs/components/Checkbox/CheckboxGroup.context.cjs.map +1 -1
  14. package/cjs/components/Chip/Chip.cjs +1 -1
  15. package/cjs/components/Chip/Chip.cjs.map +1 -1
  16. package/cjs/components/Combobox/use-combobox/use-combobox.cjs +49 -43
  17. package/cjs/components/Combobox/use-combobox/use-combobox.cjs.map +1 -1
  18. package/cjs/components/Menu/MenuSub/MenuSub.cjs +3 -2
  19. package/cjs/components/Menu/MenuSub/MenuSub.cjs.map +1 -1
  20. package/cjs/components/NumberInput/NumberInput.cjs +5 -1
  21. package/cjs/components/NumberInput/NumberInput.cjs.map +1 -1
  22. package/cjs/components/PasswordInput/PasswordInput.cjs +1 -0
  23. package/cjs/components/PasswordInput/PasswordInput.cjs.map +1 -1
  24. package/cjs/components/Radio/Radio.cjs +11 -11
  25. package/cjs/components/Radio/Radio.cjs.map +1 -1
  26. package/cjs/components/Radio/RadioGroup/RadioGroup.cjs +28 -11
  27. package/cjs/components/Radio/RadioGroup/RadioGroup.cjs.map +1 -1
  28. package/cjs/components/Radio/RadioGroup.context.cjs.map +1 -1
  29. package/cjs/components/Switch/Switch.cjs +14 -10
  30. package/cjs/components/Switch/Switch.cjs.map +1 -1
  31. package/cjs/components/Switch/SwitchGroup/SwitchGroup.cjs +12 -2
  32. package/cjs/components/Switch/SwitchGroup/SwitchGroup.cjs.map +1 -1
  33. package/cjs/components/Switch/SwitchGroup.context.cjs.map +1 -1
  34. package/cjs/core/utils/find-element-in-shadow-dom/find-element-in-shadow-dom.cjs +46 -0
  35. package/cjs/core/utils/find-element-in-shadow-dom/find-element-in-shadow-dom.cjs.map +1 -0
  36. package/cjs/index.cjs +12 -0
  37. package/cjs/index.cjs.map +1 -1
  38. package/esm/components/Alert/Alert.mjs +2 -1
  39. package/esm/components/Alert/Alert.mjs.map +1 -1
  40. package/esm/components/AppShell/AppShell.mjs +1 -1
  41. package/esm/components/AppShell/AppShell.mjs.map +1 -1
  42. package/esm/components/AppShell/AppShellAside/AppShellAside.mjs +8 -2
  43. package/esm/components/AppShell/AppShellAside/AppShellAside.mjs.map +1 -1
  44. package/esm/components/AppShell/AppShellMediaStyles/assign-aside-variables/assign-aside-variables.mjs +2 -0
  45. package/esm/components/AppShell/AppShellMediaStyles/assign-aside-variables/assign-aside-variables.mjs.map +1 -1
  46. package/esm/components/Checkbox/Checkbox.mjs +10 -12
  47. package/esm/components/Checkbox/Checkbox.mjs.map +1 -1
  48. package/esm/components/Checkbox/CheckboxGroup/CheckboxGroup.mjs +12 -2
  49. package/esm/components/Checkbox/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
  50. package/esm/components/Checkbox/CheckboxGroup.context.mjs.map +1 -1
  51. package/esm/components/Chip/Chip.mjs +1 -1
  52. package/esm/components/Chip/Chip.mjs.map +1 -1
  53. package/esm/components/Combobox/use-combobox/use-combobox.mjs +49 -43
  54. package/esm/components/Combobox/use-combobox/use-combobox.mjs.map +1 -1
  55. package/esm/components/Menu/MenuSub/MenuSub.mjs +3 -2
  56. package/esm/components/Menu/MenuSub/MenuSub.mjs.map +1 -1
  57. package/esm/components/NumberInput/NumberInput.mjs +5 -1
  58. package/esm/components/NumberInput/NumberInput.mjs.map +1 -1
  59. package/esm/components/PasswordInput/PasswordInput.mjs +1 -0
  60. package/esm/components/PasswordInput/PasswordInput.mjs.map +1 -1
  61. package/esm/components/Radio/Radio.mjs +11 -11
  62. package/esm/components/Radio/Radio.mjs.map +1 -1
  63. package/esm/components/Radio/RadioGroup/RadioGroup.mjs +28 -11
  64. package/esm/components/Radio/RadioGroup/RadioGroup.mjs.map +1 -1
  65. package/esm/components/Radio/RadioGroup.context.mjs.map +1 -1
  66. package/esm/components/Switch/Switch.mjs +14 -10
  67. package/esm/components/Switch/Switch.mjs.map +1 -1
  68. package/esm/components/Switch/SwitchGroup/SwitchGroup.mjs +12 -2
  69. package/esm/components/Switch/SwitchGroup/SwitchGroup.mjs.map +1 -1
  70. package/esm/components/Switch/SwitchGroup.context.mjs.map +1 -1
  71. package/esm/core/utils/find-element-in-shadow-dom/find-element-in-shadow-dom.mjs +42 -0
  72. package/esm/core/utils/find-element-in-shadow-dom/find-element-in-shadow-dom.mjs.map +1 -0
  73. package/esm/index.mjs +5 -0
  74. package/esm/index.mjs.map +1 -1
  75. package/lib/components/AppShell/AppShell.d.ts +1 -1
  76. package/lib/components/Checkbox/CheckboxGroup/CheckboxGroup.d.ts +2 -0
  77. package/lib/components/Checkbox/CheckboxGroup.context.d.ts +1 -0
  78. package/lib/components/Menu/MenuSub/MenuSub.d.ts +10 -9
  79. package/lib/components/Menu/index.d.ts +8 -0
  80. package/lib/components/NumberInput/NumberInput.d.ts +1 -1
  81. package/lib/components/Radio/RadioGroup/RadioGroup.d.ts +2 -0
  82. package/lib/components/Radio/RadioGroup.context.d.ts +1 -0
  83. package/lib/components/Switch/SwitchGroup/SwitchGroup.d.ts +2 -0
  84. package/lib/components/Switch/SwitchGroup.context.d.ts +1 -0
  85. package/lib/core/utils/find-element-in-shadow-dom/find-element-in-shadow-dom.d.ts +7 -0
  86. package/lib/core/utils/index.d.ts +1 -0
  87. package/package.json +2 -2
  88. package/styles/AppShell.css +7 -3
  89. package/styles/AppShell.layer.css +7 -3
  90. package/styles.css +7 -3
  91. package/styles.layer.css +7 -3
@@ -6,10 +6,12 @@ import { MenuSubTarget } from '../MenuSubTarget/MenuSubTarget';
6
6
  export type MenuSubFactory = Factory<{
7
7
  props: MenuSubProps;
8
8
  }>;
9
- interface MenuSubProps extends __PopoverProps {
9
+ export interface MenuSubProps extends __PopoverProps {
10
10
  children: React.ReactNode;
11
11
  /** Called with current state when dropdown opens or closes */
12
12
  onChange?: (opened: boolean) => void;
13
+ /** Open delay in ms */
14
+ openDelay?: number;
13
15
  /** Close delay in ms */
14
16
  closeDelay?: number;
15
17
  /** Dropdown position relative to the target element @default `'right-start'` */
@@ -27,37 +29,36 @@ export declare namespace MenuSub {
27
29
  var displayName: string;
28
30
  var Target: typeof MenuSubTarget;
29
31
  var Dropdown: import("../../..").MantineComponent<{
30
- props: import("../MenuSubDropdown/MenuSubDropdown").MenuSubDropdownProps;
32
+ props: import("..").MenuSubDropdownProps;
31
33
  ref: HTMLDivElement;
32
34
  stylesNames: import("../MenuSubDropdown/MenuSubDropdown").MenuSubDropdownStylesNames;
33
35
  compound: true;
34
36
  }>;
35
- var Item: (<C = "button">(props: import("../../..").PolymorphicComponentProps<C, import("../MenuSubItem/MenuSubItem").MenuSubItemProps>) => React.ReactElement) & Omit<import("react").FunctionComponent<(import("../MenuSubItem/MenuSubItem").MenuSubItemProps & {
37
+ var Item: (<C = "button">(props: import("../../..").PolymorphicComponentProps<C, import("..").MenuSubItemProps>) => React.ReactElement) & Omit<import("react").FunctionComponent<(import("..").MenuSubItemProps & {
36
38
  component?: any;
37
- } & Omit<Omit<any, "ref">, "component" | keyof import("../MenuSubItem/MenuSubItem").MenuSubItemProps> & {
39
+ } & Omit<Omit<any, "ref">, "component" | keyof import("..").MenuSubItemProps> & {
38
40
  ref?: any;
39
41
  renderRoot?: (props: any) => any;
40
- }) | (import("../MenuSubItem/MenuSubItem").MenuSubItemProps & {
42
+ }) | (import("..").MenuSubItemProps & {
41
43
  component: React.ElementType;
42
44
  renderRoot?: (props: Record<string, any>) => any;
43
45
  })>, never> & import("../../../core/factory/factory").ThemeExtend<{
44
- props: import("../MenuSubItem/MenuSubItem").MenuSubItemProps;
46
+ props: import("..").MenuSubItemProps;
45
47
  defaultRef: HTMLButtonElement;
46
48
  defaultComponent: "button";
47
49
  stylesNames: import("../MenuSubItem/MenuSubItem").MenuSubItemStylesNames;
48
50
  compound: true;
49
51
  }> & import("../../../core/factory/factory").ComponentClasses<{
50
- props: import("../MenuSubItem/MenuSubItem").MenuSubItemProps;
52
+ props: import("..").MenuSubItemProps;
51
53
  defaultRef: HTMLButtonElement;
52
54
  defaultComponent: "button";
53
55
  stylesNames: import("../MenuSubItem/MenuSubItem").MenuSubItemStylesNames;
54
56
  compound: true;
55
57
  }> & import("../../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
56
- props: import("../MenuSubItem/MenuSubItem").MenuSubItemProps;
58
+ props: import("..").MenuSubItemProps;
57
59
  defaultRef: HTMLButtonElement;
58
60
  defaultComponent: "button";
59
61
  stylesNames: import("../MenuSubItem/MenuSubItem").MenuSubItemStylesNames;
60
62
  compound: true;
61
63
  }> & Record<string, never>;
62
64
  }
63
- export {};
@@ -4,9 +4,17 @@ export { MenuItem } from './MenuItem/MenuItem';
4
4
  export { MenuLabel } from './MenuLabel/MenuLabel';
5
5
  export { MenuDropdown } from './MenuDropdown/MenuDropdown';
6
6
  export { MenuTarget } from './MenuTarget/MenuTarget';
7
+ export { MenuSub } from './MenuSub/MenuSub';
8
+ export { MenuSubDropdown } from './MenuSubDropdown/MenuSubDropdown';
9
+ export { MenuSubItem } from './MenuSubItem/MenuSubItem';
10
+ export { MenuSubTarget } from './MenuSubTarget/MenuSubTarget';
7
11
  export type { MenuFactory, MenuProps, MenuStylesNames } from './Menu';
8
12
  export type { MenuDividerProps } from './MenuDivider/MenuDivider';
9
13
  export type { MenuItemProps } from './MenuItem/MenuItem';
10
14
  export type { MenuLabelProps } from './MenuLabel/MenuLabel';
11
15
  export type { MenuDropdownProps } from './MenuDropdown/MenuDropdown';
12
16
  export type { MenuTargetProps } from './MenuTarget/MenuTarget';
17
+ export type { MenuSubProps } from './MenuSub/MenuSub';
18
+ export type { MenuSubDropdownProps } from './MenuSubDropdown/MenuSubDropdown';
19
+ export type { MenuSubItemProps } from './MenuSubItem/MenuSubItem';
20
+ export type { MenuSubTargetProps } from './MenuSubTarget/MenuSubTarget';
@@ -23,7 +23,7 @@ export interface NumberInputProps extends BoxProps, __BaseInputProps, StylesApiP
23
23
  allowLeadingZeros?: boolean;
24
24
  /** If set, negative values are allowed @default `true` */
25
25
  allowNegative?: boolean;
26
- /** Characters which when pressed result in a decimal separator @default `['.']` */
26
+ /** Characters which when pressed result in a decimal separator @default `['.', ',']` */
27
27
  allowedDecimalSeparators?: string[];
28
28
  /** Limits the number of digits that can be entered after the decimal point @default `Infinity` */
29
29
  decimalScale?: number;
@@ -18,6 +18,8 @@ export interface RadioGroupProps extends Omit<InputWrapperProps, 'onChange' | 'v
18
18
  name?: string;
19
19
  /** If set, value cannot be changed */
20
20
  readOnly?: boolean;
21
+ /** Sets `disabled` attribute, prevents interactions */
22
+ disabled?: boolean;
21
23
  }
22
24
  export type RadioGroupFactory = Factory<{
23
25
  props: RadioGroupProps;
@@ -4,6 +4,7 @@ interface RadioGroupContextValue {
4
4
  value: string;
5
5
  onChange: (event: React.ChangeEvent<HTMLInputElement> | string) => void;
6
6
  name: string;
7
+ disabled?: boolean;
7
8
  }
8
9
  export declare const RadioGroupProvider: ({ children, value }: {
9
10
  value: RadioGroupContextValue;
@@ -16,6 +16,8 @@ export interface SwitchGroupProps extends Omit<InputWrapperProps, 'onChange'> {
16
16
  size?: MantineSize | (string & {});
17
17
  /** If set, value cannot be changed */
18
18
  readOnly?: boolean;
19
+ /** Sets `disabled` attribute, prevents interactions */
20
+ disabled?: boolean;
19
21
  }
20
22
  export type SwitchGroupFactory = Factory<{
21
23
  props: SwitchGroupProps;
@@ -3,6 +3,7 @@ interface SwitchGroupContextValue {
3
3
  value: string[];
4
4
  onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
5
5
  size: MantineSize | (string & {}) | undefined;
6
+ disabled?: boolean;
6
7
  }
7
8
  export declare const SwitchGroupProvider: import("react").Provider<SwitchGroupContextValue | null>;
8
9
  export declare const useSwitchGroupContext: () => SwitchGroupContextValue | null;
@@ -0,0 +1,7 @@
1
+ export declare function findElementBySelector<T extends HTMLElement>(selector: string, root?: Document | Element | ShadowRoot): T | null;
2
+ export declare function findElementsBySelector<T extends HTMLElement>(selector: string, root?: Document | Element | ShadowRoot): T[];
3
+ /**
4
+ * Gets the appropriate root element (Document or ShadowRoot) for DOM queries
5
+ * based on the provided target element reference.
6
+ */
7
+ export declare function getRootElement(targetElement: HTMLElement | null | undefined): Document | ShadowRoot;
@@ -25,3 +25,4 @@ export { getEnv } from './get-env/get-env';
25
25
  export { memoize } from './memoize/memoize';
26
26
  export { findClosestNumber } from './find-closest-number/find-closest-number';
27
27
  export { getRefProp } from './get-ref-prop/get-ref-prop';
28
+ export { findElementBySelector, findElementsBySelector, getRootElement, } from './find-element-in-shadow-dom/find-element-in-shadow-dom';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantine/core",
3
- "version": "8.3.6",
3
+ "version": "8.3.8",
4
4
  "description": "React components library focused on usability, accessibility and developer experience",
5
5
  "homepage": "https://mantine.dev/",
6
6
  "license": "MIT",
@@ -43,7 +43,7 @@
43
43
  "directory": "packages/@mantine/core"
44
44
  },
45
45
  "peerDependencies": {
46
- "@mantine/hooks": "8.3.6",
46
+ "@mantine/hooks": "8.3.8",
47
47
  "react": "^18.x || ^19.x",
48
48
  "react-dom": "^18.x || ^19.x"
49
49
  },
@@ -72,6 +72,10 @@
72
72
  border-inline-start: 1px solid var(--app-shell-border-color);
73
73
  }
74
74
 
75
+ :where([data-scroll-locked]) .m_9cdde9a {
76
+ visibility: var(--app-shell-aside-scroll-locked-visibility);
77
+ }
78
+
75
79
  .m_8983817 {
76
80
  padding-inline-start: calc(var(--app-shell-navbar-offset, 0rem) + var(--app-shell-padding));
77
81
  padding-inline-end: calc(var(--app-shell-aside-offset, 0rem) + var(--app-shell-padding));
@@ -85,13 +89,13 @@
85
89
  .m_3840c879 {
86
90
  position: fixed;
87
91
  inset-inline: 0;
88
- transition-property: transform, left, right;
92
+ transition-property: transform, margin-inline-start, margin-inline-end;
89
93
  background-color: var(--mantine-color-body);
90
94
  }
91
95
 
92
96
  :where([data-layout='alt']) .m_3b16f56b, :where([data-layout='alt']) .m_3840c879 {
93
- inset-inline-start: var(--app-shell-navbar-offset, 0rem);
94
- inset-inline-end: var(--app-shell-aside-offset, 0rem);
97
+ margin-inline-start: var(--app-shell-navbar-offset, 0rem);
98
+ margin-inline-end: var(--app-shell-aside-offset, 0rem);
95
99
  }
96
100
 
97
101
  .m_3b16f56b {
@@ -72,6 +72,10 @@
72
72
  border-inline-start: 1px solid var(--app-shell-border-color);
73
73
  }
74
74
 
75
+ :where([data-scroll-locked]) .m_9cdde9a {
76
+ visibility: var(--app-shell-aside-scroll-locked-visibility);
77
+ }
78
+
75
79
  .m_8983817 {
76
80
  padding-inline-start: calc(var(--app-shell-navbar-offset, 0rem) + var(--app-shell-padding));
77
81
  padding-inline-end: calc(var(--app-shell-aside-offset, 0rem) + var(--app-shell-padding));
@@ -85,13 +89,13 @@
85
89
  .m_3840c879 {
86
90
  position: fixed;
87
91
  inset-inline: 0;
88
- transition-property: transform, left, right;
92
+ transition-property: transform, margin-inline-start, margin-inline-end;
89
93
  background-color: var(--mantine-color-body);
90
94
  }
91
95
 
92
96
  :where([data-layout='alt']) .m_3b16f56b, :where([data-layout='alt']) .m_3840c879 {
93
- inset-inline-start: var(--app-shell-navbar-offset, 0rem);
94
- inset-inline-end: var(--app-shell-aside-offset, 0rem);
97
+ margin-inline-start: var(--app-shell-navbar-offset, 0rem);
98
+ margin-inline-end: var(--app-shell-aside-offset, 0rem);
95
99
  }
96
100
 
97
101
  .m_3b16f56b {
package/styles.css CHANGED
@@ -2256,6 +2256,10 @@ fieldset:disabled .mantine-active:active {
2256
2256
  border-inline-start: 1px solid var(--app-shell-border-color);
2257
2257
  }
2258
2258
 
2259
+ :where([data-scroll-locked]) .m_9cdde9a {
2260
+ visibility: var(--app-shell-aside-scroll-locked-visibility);
2261
+ }
2262
+
2259
2263
  .m_8983817 {
2260
2264
  padding-inline-start: calc(var(--app-shell-navbar-offset, 0rem) + var(--app-shell-padding));
2261
2265
  padding-inline-end: calc(var(--app-shell-aside-offset, 0rem) + var(--app-shell-padding));
@@ -2269,13 +2273,13 @@ fieldset:disabled .mantine-active:active {
2269
2273
  .m_3840c879 {
2270
2274
  position: fixed;
2271
2275
  inset-inline: 0;
2272
- transition-property: transform, left, right;
2276
+ transition-property: transform, margin-inline-start, margin-inline-end;
2273
2277
  background-color: var(--mantine-color-body);
2274
2278
  }
2275
2279
 
2276
2280
  :where([data-layout='alt']) .m_3b16f56b, :where([data-layout='alt']) .m_3840c879 {
2277
- inset-inline-start: var(--app-shell-navbar-offset, 0rem);
2278
- inset-inline-end: var(--app-shell-aside-offset, 0rem);
2281
+ margin-inline-start: var(--app-shell-navbar-offset, 0rem);
2282
+ margin-inline-end: var(--app-shell-aside-offset, 0rem);
2279
2283
  }
2280
2284
 
2281
2285
  .m_3b16f56b {
package/styles.layer.css CHANGED
@@ -2256,6 +2256,10 @@ fieldset:disabled .mantine-active:active {
2256
2256
  border-inline-start: 1px solid var(--app-shell-border-color);
2257
2257
  }
2258
2258
 
2259
+ :where([data-scroll-locked]) .m_9cdde9a {
2260
+ visibility: var(--app-shell-aside-scroll-locked-visibility);
2261
+ }
2262
+
2259
2263
  .m_8983817 {
2260
2264
  padding-inline-start: calc(var(--app-shell-navbar-offset, 0rem) + var(--app-shell-padding));
2261
2265
  padding-inline-end: calc(var(--app-shell-aside-offset, 0rem) + var(--app-shell-padding));
@@ -2269,13 +2273,13 @@ fieldset:disabled .mantine-active:active {
2269
2273
  .m_3840c879 {
2270
2274
  position: fixed;
2271
2275
  inset-inline: 0;
2272
- transition-property: transform, left, right;
2276
+ transition-property: transform, margin-inline-start, margin-inline-end;
2273
2277
  background-color: var(--mantine-color-body);
2274
2278
  }
2275
2279
 
2276
2280
  :where([data-layout='alt']) .m_3b16f56b, :where([data-layout='alt']) .m_3840c879 {
2277
- inset-inline-start: var(--app-shell-navbar-offset, 0rem);
2278
- inset-inline-end: var(--app-shell-aside-offset, 0rem);
2281
+ margin-inline-start: var(--app-shell-navbar-offset, 0rem);
2282
+ margin-inline-end: var(--app-shell-aside-offset, 0rem);
2279
2283
  }
2280
2284
 
2281
2285
  .m_3b16f56b {