@mantine/core 9.0.0-alpha.0 → 9.0.0-alpha.2

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 (123) hide show
  1. package/LICENSE +21 -0
  2. package/cjs/components/Checkbox/Checkbox.cjs +2 -0
  3. package/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
  4. package/cjs/components/CloseButton/CloseButton.cjs.map +1 -1
  5. package/cjs/components/CloseButton/CloseIcon.cjs +0 -2
  6. package/cjs/components/CloseButton/CloseIcon.cjs.map +1 -1
  7. package/cjs/components/MultiSelect/MultiSelect.cjs +10 -2
  8. package/cjs/components/MultiSelect/MultiSelect.cjs.map +1 -1
  9. package/cjs/components/Switch/Switch.cjs +2 -0
  10. package/cjs/components/Switch/Switch.cjs.map +1 -1
  11. package/cjs/components/TagsInput/TagsInput.cjs +14 -8
  12. package/cjs/components/TagsInput/TagsInput.cjs.map +1 -1
  13. package/cjs/components/TagsInput/get-splitted-tags.cjs +17 -2
  14. package/cjs/components/TagsInput/get-splitted-tags.cjs.map +1 -1
  15. package/cjs/core/MantineProvider/MantineCssVariables/default-css-variables-resolver.cjs +1 -0
  16. package/cjs/core/MantineProvider/MantineCssVariables/default-css-variables-resolver.cjs.map +1 -1
  17. package/cjs/core/MantineProvider/default-theme.cjs +5 -0
  18. package/cjs/core/MantineProvider/default-theme.cjs.map +1 -1
  19. package/cjs/index.cjs +3 -3
  20. package/esm/components/Checkbox/Checkbox.mjs +2 -0
  21. package/esm/components/Checkbox/Checkbox.mjs.map +1 -1
  22. package/esm/components/CloseButton/CloseButton.mjs.map +1 -1
  23. package/esm/components/CloseButton/CloseIcon.mjs +0 -2
  24. package/esm/components/CloseButton/CloseIcon.mjs.map +1 -1
  25. package/esm/components/MultiSelect/MultiSelect.mjs +10 -2
  26. package/esm/components/MultiSelect/MultiSelect.mjs.map +1 -1
  27. package/esm/components/Switch/Switch.mjs +2 -0
  28. package/esm/components/Switch/Switch.mjs.map +1 -1
  29. package/esm/components/TagsInput/TagsInput.mjs +14 -8
  30. package/esm/components/TagsInput/TagsInput.mjs.map +1 -1
  31. package/esm/components/TagsInput/get-splitted-tags.mjs +17 -2
  32. package/esm/components/TagsInput/get-splitted-tags.mjs.map +1 -1
  33. package/esm/core/MantineProvider/MantineCssVariables/default-css-variables-resolver.mjs +1 -0
  34. package/esm/core/MantineProvider/MantineCssVariables/default-css-variables-resolver.mjs.map +1 -1
  35. package/esm/core/MantineProvider/default-theme.mjs +5 -0
  36. package/esm/core/MantineProvider/default-theme.mjs.map +1 -1
  37. package/esm/index.mjs +1 -1
  38. package/lib/components/Accordion/Accordion.d.ts +2 -2
  39. package/lib/components/ActionIcon/ActionIcon.d.ts +3 -3
  40. package/lib/components/Anchor/Anchor.d.ts +3 -3
  41. package/lib/components/AppShell/AppShellSection/AppShellSection.d.ts +3 -3
  42. package/lib/components/Avatar/Avatar.d.ts +3 -3
  43. package/lib/components/BackgroundImage/BackgroundImage.d.ts +3 -3
  44. package/lib/components/Badge/Badge.d.ts +3 -3
  45. package/lib/components/Button/Button.d.ts +3 -3
  46. package/lib/components/Card/Card.d.ts +3 -3
  47. package/lib/components/Card/CardSection/CardSection.d.ts +3 -3
  48. package/lib/components/Center/Center.d.ts +3 -3
  49. package/lib/components/Checkbox/CheckboxGroup/CheckboxGroup.d.ts +2 -2
  50. package/lib/components/Chip/ChipGroup/ChipGroup.d.ts +2 -2
  51. package/lib/components/CloseButton/CloseButton.d.ts +4 -4
  52. package/lib/components/ColorSwatch/ColorSwatch.d.ts +3 -3
  53. package/lib/components/FileButton/FileButton.d.ts +2 -2
  54. package/lib/components/FileInput/FileInput.d.ts +2 -2
  55. package/lib/components/Flex/Flex.d.ts +3 -3
  56. package/lib/components/Highlight/Highlight.d.ts +3 -3
  57. package/lib/components/Image/Image.d.ts +3 -3
  58. package/lib/components/Input/Input.d.ts +3 -3
  59. package/lib/components/Input/InputClearSection/InputClearSection.d.ts +1 -1
  60. package/lib/components/Input/use-input-props.d.ts +19 -19
  61. package/lib/components/InputBase/InputBase.d.ts +3 -3
  62. package/lib/components/Menu/MenuItem/MenuItem.d.ts +3 -3
  63. package/lib/components/Menu/MenuSub/MenuSub.d.ts +3 -3
  64. package/lib/components/Menu/MenuSubItem/MenuSubItem.d.ts +3 -3
  65. package/lib/components/MultiSelect/MultiSelect.d.ts +2 -2
  66. package/lib/components/NavLink/NavLink.d.ts +3 -3
  67. package/lib/components/OverflowList/OverflowList.d.ts +2 -2
  68. package/lib/components/Overlay/Overlay.d.ts +3 -3
  69. package/lib/components/Paper/Paper.d.ts +3 -3
  70. package/lib/components/Radio/RadioGroup/RadioGroup.d.ts +2 -2
  71. package/lib/components/SegmentedControl/SegmentedControl.d.ts +2 -2
  72. package/lib/components/Select/Select.d.ts +2 -2
  73. package/lib/components/Switch/SwitchGroup/SwitchGroup.d.ts +2 -2
  74. package/lib/components/TagsInput/get-splitted-tags.d.ts +3 -1
  75. package/lib/components/Text/Text.d.ts +3 -3
  76. package/lib/components/UnstyledButton/UnstyledButton.d.ts +3 -3
  77. package/lib/core/MantineProvider/theme.types.d.ts +6 -0
  78. package/lib/core/factory/index.d.ts +5 -5
  79. package/package.json +2 -2
  80. package/styles/Accordion.css +1 -1
  81. package/styles/Accordion.layer.css +1 -1
  82. package/styles/ActionIcon.css +1 -1
  83. package/styles/ActionIcon.layer.css +1 -1
  84. package/styles/Alert.css +1 -1
  85. package/styles/Alert.layer.css +1 -1
  86. package/styles/Avatar.css +1 -1
  87. package/styles/Avatar.layer.css +1 -1
  88. package/styles/Badge.css +1 -1
  89. package/styles/Badge.layer.css +1 -1
  90. package/styles/Button.css +2 -2
  91. package/styles/Button.layer.css +2 -2
  92. package/styles/Chip.css +1 -1
  93. package/styles/Chip.layer.css +1 -1
  94. package/styles/Combobox.css +1 -1
  95. package/styles/Combobox.layer.css +1 -1
  96. package/styles/Input.css +1 -1
  97. package/styles/Input.layer.css +1 -1
  98. package/styles/Kbd.css +1 -1
  99. package/styles/Kbd.layer.css +1 -1
  100. package/styles/Menu.css +1 -1
  101. package/styles/Menu.layer.css +1 -1
  102. package/styles/ModalBase.css +1 -1
  103. package/styles/ModalBase.layer.css +1 -1
  104. package/styles/Notification.css +1 -1
  105. package/styles/Notification.layer.css +1 -1
  106. package/styles/SegmentedControl.css +1 -1
  107. package/styles/SegmentedControl.layer.css +1 -1
  108. package/styles/Stepper.css +1 -1
  109. package/styles/Stepper.layer.css +1 -1
  110. package/styles/Switch.css +5 -3
  111. package/styles/Switch.layer.css +5 -3
  112. package/styles/Table.css +1 -1
  113. package/styles/Table.layer.css +1 -1
  114. package/styles/Text.css +1 -1
  115. package/styles/Text.layer.css +1 -1
  116. package/styles/Timeline.css +1 -1
  117. package/styles/Timeline.layer.css +1 -1
  118. package/styles/Typography.css +1 -1
  119. package/styles/Typography.layer.css +1 -1
  120. package/styles/default-css-variables.css +3 -0
  121. package/styles/default-css-variables.layer.css +3 -0
  122. package/styles.css +28 -23
  123. package/styles.layer.css +28 -23
@@ -8,7 +8,7 @@ interface BaseProps extends __BaseInputProps, BoxProps, StylesApiProps<{
8
8
  __stylesApiProps?: Record<string, any>;
9
9
  id?: string;
10
10
  }
11
- export declare function useInputProps<T extends BaseProps, U extends Partial<T> | null>(component: string, defaultProps: U, _props: T): Omit<T & (U extends null | undefined ? {} : { [Key in Extract<keyof T, keyof U>]-?: U[Key] | NonNullable<T[Key]>; }), "vars" | "variant" | "className" | "style" | "unstyled" | "classNames" | "styles" | "attributes" | "size" | "label" | "id" | "mod" | "__staticSelector" | "required" | "description" | "error" | "__stylesApiProps" | "withAsterisk" | "labelProps" | "descriptionProps" | "errorProps" | "inputContainer" | "inputWrapperOrder" | "wrapperProps"> & {
11
+ export declare function useInputProps<T extends BaseProps, U extends Partial<T> | null>(component: string, defaultProps: U, _props: T): Omit<T & (U extends null | undefined ? {} : { [Key in Extract<keyof T, keyof U>]-?: U[Key] | NonNullable<T[Key]>; }), "classNames" | "styles" | "vars" | "label" | "style" | "className" | "id" | "variant" | "size" | "unstyled" | "attributes" | "mod" | "error" | "description" | "__staticSelector" | "required" | "__stylesApiProps" | "withAsterisk" | "labelProps" | "descriptionProps" | "errorProps" | "inputContainer" | "inputWrapperOrder" | "wrapperProps"> & {
12
12
  classNames: Partial<Record<string, string>> | ((theme: import("../..").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, string>>) | undefined;
13
13
  styles: Partial<Record<string, import("../..").CSSProperties>> | ((theme: import("../..").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, import("../..").CSSProperties>>) | undefined;
14
14
  unstyled: boolean | undefined;
@@ -23,17 +23,17 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>
23
23
  autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
24
24
  autoFocus?: boolean | undefined;
25
25
  className: string | undefined;
26
- contentEditable?: (boolean | "false" | "true") | "inherit" | "plaintext-only" | undefined;
26
+ contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
27
27
  contextMenu?: string | undefined;
28
28
  dir?: string | undefined;
29
- draggable?: (boolean | "false" | "true") | undefined;
29
+ draggable?: (boolean | "true" | "false") | undefined;
30
30
  enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
31
31
  hidden?: boolean | undefined;
32
32
  id: string | undefined;
33
33
  lang?: string | undefined;
34
34
  nonce?: string | undefined;
35
35
  slot?: string | undefined;
36
- spellCheck?: (boolean | "false" | "true") | undefined;
36
+ spellCheck?: (boolean | "true" | "false") | undefined;
37
37
  style: import("react").CSSProperties | ((theme: import("../..").MantineTheme) => import("../..").CSSProperties) | import("../..").MantineStyleProp[] | undefined;
38
38
  tabIndex?: number | undefined;
39
39
  title?: string | undefined;
@@ -71,11 +71,11 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>
71
71
  exportparts?: string | undefined;
72
72
  part?: string | undefined;
73
73
  "aria-activedescendant"?: string | undefined;
74
- "aria-atomic"?: (boolean | "false" | "true") | undefined;
74
+ "aria-atomic"?: (boolean | "true" | "false") | undefined;
75
75
  "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
76
76
  "aria-braillelabel"?: string | undefined;
77
77
  "aria-brailleroledescription"?: string | undefined;
78
- "aria-busy"?: (boolean | "false" | "true") | undefined;
78
+ "aria-busy"?: (boolean | "true" | "false") | undefined;
79
79
  "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
80
80
  "aria-colcount"?: number | undefined;
81
81
  "aria-colindex"?: number | undefined;
@@ -86,37 +86,37 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>
86
86
  "aria-describedby"?: string | undefined;
87
87
  "aria-description"?: string | undefined;
88
88
  "aria-details"?: string | undefined;
89
- "aria-disabled"?: (boolean | "false" | "true") | undefined;
89
+ "aria-disabled"?: (boolean | "true" | "false") | undefined;
90
90
  "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
91
91
  "aria-errormessage"?: string | undefined;
92
- "aria-expanded"?: (boolean | "false" | "true") | undefined;
92
+ "aria-expanded"?: (boolean | "true" | "false") | undefined;
93
93
  "aria-flowto"?: string | undefined;
94
- "aria-grabbed"?: (boolean | "false" | "true") | undefined;
94
+ "aria-grabbed"?: (boolean | "true" | "false") | undefined;
95
95
  "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
96
- "aria-hidden"?: (boolean | "false" | "true") | undefined;
96
+ "aria-hidden"?: (boolean | "true" | "false") | undefined;
97
97
  "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
98
98
  "aria-keyshortcuts"?: string | undefined;
99
99
  "aria-label"?: string | undefined;
100
100
  "aria-labelledby"?: string | undefined;
101
101
  "aria-level"?: number | undefined;
102
102
  "aria-live"?: "off" | "assertive" | "polite" | undefined;
103
- "aria-modal"?: (boolean | "false" | "true") | undefined;
104
- "aria-multiline"?: (boolean | "false" | "true") | undefined;
105
- "aria-multiselectable"?: (boolean | "false" | "true") | undefined;
103
+ "aria-modal"?: (boolean | "true" | "false") | undefined;
104
+ "aria-multiline"?: (boolean | "true" | "false") | undefined;
105
+ "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
106
106
  "aria-orientation"?: "horizontal" | "vertical" | undefined;
107
107
  "aria-owns"?: string | undefined;
108
108
  "aria-placeholder"?: string | undefined;
109
109
  "aria-posinset"?: number | undefined;
110
110
  "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
111
- "aria-readonly"?: (boolean | "false" | "true") | undefined;
111
+ "aria-readonly"?: (boolean | "true" | "false") | undefined;
112
112
  "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
113
- "aria-required"?: (boolean | "false" | "true") | undefined;
113
+ "aria-required"?: (boolean | "true" | "false") | undefined;
114
114
  "aria-roledescription"?: string | undefined;
115
115
  "aria-rowcount"?: number | undefined;
116
116
  "aria-rowindex"?: number | undefined;
117
117
  "aria-rowindextext"?: string | undefined;
118
118
  "aria-rowspan"?: number | undefined;
119
- "aria-selected"?: (boolean | "false" | "true") | undefined;
119
+ "aria-selected"?: (boolean | "true" | "false") | undefined;
120
120
  "aria-setsize"?: number | undefined;
121
121
  "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
122
122
  "aria-valuemax"?: number | undefined;
@@ -307,9 +307,9 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>
307
307
  descriptionProps: (import(".").InputDescriptionProps & import("../..").DataAttributes) | undefined;
308
308
  unstyled: boolean | undefined;
309
309
  styles: Partial<Record<string, import("../..").CSSProperties>> | ((theme: import("../..").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, import("../..").CSSProperties>>) | undefined;
310
- size: (string & {}) | import("../..").MantineSize | undefined;
310
+ size: import("../..").MantineSize | (string & {}) | undefined;
311
311
  inputContainer: ((children: React.ReactNode) => React.ReactNode) | undefined;
312
- inputWrapperOrder: ("input" | "label" | "description" | "error")[] | undefined;
312
+ inputWrapperOrder: ("input" | "label" | "error" | "description")[] | undefined;
313
313
  withAsterisk: boolean | undefined;
314
314
  variant: string | undefined;
315
315
  mod: import("../..").BoxMod | undefined;
@@ -322,7 +322,7 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>
322
322
  classNames: Partial<Record<string, string>> | ((theme: import("../..").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, string>>) | undefined;
323
323
  styles: Partial<Record<string, import("../..").CSSProperties>> | ((theme: import("../..").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, import("../..").CSSProperties>>) | undefined;
324
324
  unstyled: boolean | undefined;
325
- size: (string & {}) | import("../..").MantineSize | undefined;
325
+ size: import("../..").MantineSize | (string & {}) | undefined;
326
326
  __staticSelector: string | undefined;
327
327
  __stylesApiProps: Record<string, any> | BaseProps;
328
328
  error: import("react").ReactNode;
@@ -25,19 +25,19 @@ export declare const InputBase: (<C = "input">(props: import("../..").Polymorphi
25
25
  }) | (InputBaseProps & {
26
26
  component: React.ElementType;
27
27
  renderRoot?: (props: Record<string, any>) => any;
28
- })>, never> & import("../../core/factory/factory").ThemeExtend<{
28
+ })>, never> & import("../..").ThemeExtend<{
29
29
  props: InputBaseProps;
30
30
  defaultRef: HTMLInputElement;
31
31
  defaultComponent: "input";
32
32
  stylesNames: __InputStylesNames;
33
33
  variant: InputVariant;
34
- }> & import("../../core/factory/factory").ComponentClasses<{
34
+ }> & import("../..").ComponentClasses<{
35
35
  props: InputBaseProps;
36
36
  defaultRef: HTMLInputElement;
37
37
  defaultComponent: "input";
38
38
  stylesNames: __InputStylesNames;
39
39
  variant: InputVariant;
40
- }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
40
+ }> & import("../..").PolymorphicComponentWithProps<{
41
41
  props: InputBaseProps;
42
42
  defaultRef: HTMLInputElement;
43
43
  defaultComponent: "input";
@@ -30,19 +30,19 @@ export declare const MenuItem: (<C = "button">(props: import("../../..").Polymor
30
30
  }) | (MenuItemProps & {
31
31
  component: React.ElementType;
32
32
  renderRoot?: (props: Record<string, any>) => any;
33
- })>, never> & import("../../../core/factory/factory").ThemeExtend<{
33
+ })>, never> & import("../../..").ThemeExtend<{
34
34
  props: MenuItemProps;
35
35
  defaultRef: HTMLButtonElement;
36
36
  defaultComponent: "button";
37
37
  stylesNames: MenuItemStylesNames;
38
38
  compound: true;
39
- }> & import("../../../core/factory/factory").ComponentClasses<{
39
+ }> & import("../../..").ComponentClasses<{
40
40
  props: MenuItemProps;
41
41
  defaultRef: HTMLButtonElement;
42
42
  defaultComponent: "button";
43
43
  stylesNames: MenuItemStylesNames;
44
44
  compound: true;
45
- }> & import("../../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
45
+ }> & import("../../..").PolymorphicComponentWithProps<{
46
46
  props: MenuItemProps;
47
47
  defaultRef: HTMLButtonElement;
48
48
  defaultComponent: "button";
@@ -42,19 +42,19 @@ export declare namespace MenuSub {
42
42
  }) | (import("..").MenuSubItemProps & {
43
43
  component: React.ElementType;
44
44
  renderRoot?: (props: Record<string, any>) => any;
45
- })>, never> & import("../../../core/factory/factory").ThemeExtend<{
45
+ })>, never> & import("../../..").ThemeExtend<{
46
46
  props: import("..").MenuSubItemProps;
47
47
  defaultRef: HTMLButtonElement;
48
48
  defaultComponent: "button";
49
49
  stylesNames: import("../MenuSubItem/MenuSubItem").MenuSubItemStylesNames;
50
50
  compound: true;
51
- }> & import("../../../core/factory/factory").ComponentClasses<{
51
+ }> & import("../../..").ComponentClasses<{
52
52
  props: import("..").MenuSubItemProps;
53
53
  defaultRef: HTMLButtonElement;
54
54
  defaultComponent: "button";
55
55
  stylesNames: import("../MenuSubItem/MenuSubItem").MenuSubItemStylesNames;
56
56
  compound: true;
57
- }> & import("../../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
57
+ }> & import("../../..").PolymorphicComponentWithProps<{
58
58
  props: import("..").MenuSubItemProps;
59
59
  defaultRef: HTMLButtonElement;
60
60
  defaultComponent: "button";
@@ -30,19 +30,19 @@ export declare const MenuSubItem: (<C = "button">(props: import("../../..").Poly
30
30
  }) | (MenuSubItemProps & {
31
31
  component: React.ElementType;
32
32
  renderRoot?: (props: Record<string, any>) => any;
33
- })>, never> & import("../../../core/factory/factory").ThemeExtend<{
33
+ })>, never> & import("../../..").ThemeExtend<{
34
34
  props: MenuSubItemProps;
35
35
  defaultRef: HTMLButtonElement;
36
36
  defaultComponent: "button";
37
37
  stylesNames: MenuSubItemStylesNames;
38
38
  compound: true;
39
- }> & import("../../../core/factory/factory").ComponentClasses<{
39
+ }> & import("../../..").ComponentClasses<{
40
40
  props: MenuSubItemProps;
41
41
  defaultRef: HTMLButtonElement;
42
42
  defaultComponent: "button";
43
43
  stylesNames: MenuSubItemStylesNames;
44
44
  compound: true;
45
- }> & import("../../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
45
+ }> & import("../../..").PolymorphicComponentWithProps<{
46
46
  props: MenuSubItemProps;
47
47
  defaultRef: HTMLButtonElement;
48
48
  defaultComponent: "button";
@@ -65,12 +65,12 @@ export type MultiSelectFactory = Factory<{
65
65
  stylesNames: MultiSelectStylesNames;
66
66
  signature: <Value extends Primitive = string>(props: MultiSelectProps<Value>) => React.JSX.Element;
67
67
  }>;
68
- export declare const MultiSelect: (<Value extends Primitive = string>(props: MultiSelectProps<Value>) => React.JSX.Element) & import("../../core/factory/factory").ThemeExtend<{
68
+ export declare const MultiSelect: (<Value extends Primitive = string>(props: MultiSelectProps<Value>) => React.JSX.Element) & import("../..").ThemeExtend<{
69
69
  props: MultiSelectProps;
70
70
  ref: HTMLInputElement;
71
71
  stylesNames: MultiSelectStylesNames;
72
72
  signature: <Value extends Primitive = string>(props: MultiSelectProps<Value>) => React.JSX.Element;
73
- }> & import("../../core/factory/factory").ComponentClasses<{
73
+ }> & import("../..").ComponentClasses<{
74
74
  props: MultiSelectProps;
75
75
  ref: HTMLInputElement;
76
76
  stylesNames: MultiSelectStylesNames;
@@ -59,14 +59,14 @@ export declare const NavLink: (<C = "a">(props: import("../..").PolymorphicCompo
59
59
  }) | (NavLinkProps & {
60
60
  component: React.ElementType;
61
61
  renderRoot?: (props: Record<string, any>) => any;
62
- })>, never> & import("../../core/factory/factory").ThemeExtend<{
62
+ })>, never> & import("../..").ThemeExtend<{
63
63
  props: NavLinkProps;
64
64
  defaultRef: HTMLAnchorElement;
65
65
  defaultComponent: "a";
66
66
  stylesNames: NavLinkStylesNames;
67
67
  vars: NavLinkCssVariables;
68
68
  variant: NavLinkVariant;
69
- }> & import("../../core/factory/factory").ComponentClasses<{
69
+ }> & import("../..").ComponentClasses<{
70
70
  props: NavLinkProps;
71
71
  defaultRef: HTMLAnchorElement;
72
72
  defaultComponent: "a";
@@ -82,7 +82,7 @@ export declare const NavLink: (<C = "a">(props: import("../..").PolymorphicCompo
82
82
  vars: NavLinkCssVariables;
83
83
  variant: NavLinkVariant;
84
84
  }>;
85
- } & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
85
+ } & import("../..").PolymorphicComponentWithProps<{
86
86
  props: NavLinkProps;
87
87
  defaultRef: HTMLAnchorElement;
88
88
  defaultComponent: "a";
@@ -26,13 +26,13 @@ export type OverflowListFactory = Factory<{
26
26
  vars: OverflowListCssVariables;
27
27
  signature: <T = any>(props: OverflowListProps<T>) => React.JSX.Element;
28
28
  }>;
29
- export declare const OverflowList: (<T = any>(props: OverflowListProps<T>) => React.JSX.Element) & import("../../core/factory/factory").ThemeExtend<{
29
+ export declare const OverflowList: (<T = any>(props: OverflowListProps<T>) => React.JSX.Element) & import("../..").ThemeExtend<{
30
30
  props: OverflowListProps<any>;
31
31
  ref: HTMLDivElement;
32
32
  stylesNames: OverflowListStylesNames;
33
33
  vars: OverflowListCssVariables;
34
34
  signature: <T = any>(props: OverflowListProps<T>) => React.JSX.Element;
35
- }> & import("../../core/factory/factory").ComponentClasses<{
35
+ }> & import("../..").ComponentClasses<{
36
36
  props: OverflowListProps<any>;
37
37
  ref: HTMLDivElement;
38
38
  stylesNames: OverflowListStylesNames;
@@ -38,13 +38,13 @@ export declare const Overlay: (<C = "div">(props: import("../..").PolymorphicCom
38
38
  }) | (OverlayProps & {
39
39
  component: React.ElementType;
40
40
  renderRoot?: (props: Record<string, any>) => any;
41
- })>, never> & import("../../core/factory/factory").ThemeExtend<{
41
+ })>, never> & import("../..").ThemeExtend<{
42
42
  props: OverlayProps;
43
43
  defaultRef: HTMLDivElement;
44
44
  defaultComponent: "div";
45
45
  stylesNames: OverlayStylesNames;
46
46
  vars: OverlayCssVariables;
47
- }> & import("../../core/factory/factory").ComponentClasses<{
47
+ }> & import("../..").ComponentClasses<{
48
48
  props: OverlayProps;
49
49
  defaultRef: HTMLDivElement;
50
50
  defaultComponent: "div";
@@ -58,7 +58,7 @@ export declare const Overlay: (<C = "div">(props: import("../..").PolymorphicCom
58
58
  stylesNames: OverlayStylesNames;
59
59
  vars: OverlayCssVariables;
60
60
  }>;
61
- } & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
61
+ } & import("../..").PolymorphicComponentWithProps<{
62
62
  props: OverlayProps;
63
63
  defaultRef: HTMLDivElement;
64
64
  defaultComponent: "div";
@@ -28,13 +28,13 @@ export declare const Paper: (<C = "div">(props: import("../..").PolymorphicCompo
28
28
  }) | (PaperProps & {
29
29
  component: React.ElementType;
30
30
  renderRoot?: (props: Record<string, any>) => any;
31
- })>, never> & import("../../core/factory/factory").ThemeExtend<{
31
+ })>, never> & import("../..").ThemeExtend<{
32
32
  props: PaperProps;
33
33
  defaultComponent: "div";
34
34
  defaultRef: HTMLDivElement;
35
35
  stylesNames: PaperStylesNames;
36
36
  vars: PaperCssVariables;
37
- }> & import("../../core/factory/factory").ComponentClasses<{
37
+ }> & import("../..").ComponentClasses<{
38
38
  props: PaperProps;
39
39
  defaultComponent: "div";
40
40
  defaultRef: HTMLDivElement;
@@ -48,7 +48,7 @@ export declare const Paper: (<C = "div">(props: import("../..").PolymorphicCompo
48
48
  stylesNames: PaperStylesNames;
49
49
  vars: PaperCssVariables;
50
50
  }>;
51
- } & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
51
+ } & import("../..").PolymorphicComponentWithProps<{
52
52
  props: PaperProps;
53
53
  defaultComponent: "div";
54
54
  defaultRef: HTMLDivElement;
@@ -35,12 +35,12 @@ export type RadioGroupFactory = Factory<{
35
35
  stylesNames: RadioGroupStylesNames;
36
36
  signature: <Value extends string = string>(props: RadioGroupProps<Value>) => React.JSX.Element;
37
37
  }>;
38
- export declare const RadioGroup: (<Value extends string = string>(props: RadioGroupProps<Value>) => React.JSX.Element) & import("../../../core/factory/factory").ThemeExtend<{
38
+ export declare const RadioGroup: (<Value extends string = string>(props: RadioGroupProps<Value>) => React.JSX.Element) & import("../../..").ThemeExtend<{
39
39
  props: RadioGroupProps;
40
40
  ref: HTMLDivElement;
41
41
  stylesNames: RadioGroupStylesNames;
42
42
  signature: <Value extends string = string>(props: RadioGroupProps<Value>) => React.JSX.Element;
43
- }> & import("../../../core/factory/factory").ComponentClasses<{
43
+ }> & import("../../..").ComponentClasses<{
44
44
  props: RadioGroupProps;
45
45
  ref: HTMLDivElement;
46
46
  stylesNames: RadioGroupStylesNames;
@@ -49,13 +49,13 @@ export type SegmentedControlFactory = Factory<{
49
49
  vars: SegmentedControlCssVariables;
50
50
  signature: <Value extends Primitive = string>(props: SegmentedControlProps<Value>) => React.JSX.Element | null;
51
51
  }>;
52
- export declare const SegmentedControl: (<Value extends Primitive = string>(props: SegmentedControlProps<Value>) => React.JSX.Element | null) & import("../../core/factory/factory").ThemeExtend<{
52
+ export declare const SegmentedControl: (<Value extends Primitive = string>(props: SegmentedControlProps<Value>) => React.JSX.Element | null) & import("../..").ThemeExtend<{
53
53
  props: SegmentedControlProps;
54
54
  ref: HTMLDivElement;
55
55
  stylesNames: SegmentedControlStylesNames;
56
56
  vars: SegmentedControlCssVariables;
57
57
  signature: <Value extends Primitive = string>(props: SegmentedControlProps<Value>) => React.JSX.Element | null;
58
- }> & import("../../core/factory/factory").ComponentClasses<{
58
+ }> & import("../..").ComponentClasses<{
59
59
  props: SegmentedControlProps;
60
60
  ref: HTMLDivElement;
61
61
  stylesNames: SegmentedControlStylesNames;
@@ -56,13 +56,13 @@ export type SelectFactory = Factory<{
56
56
  variant: InputVariant;
57
57
  signature: <Value extends Primitive = string>(props: SelectProps<Value>) => React.JSX.Element;
58
58
  }>;
59
- export declare const Select: (<Value extends Primitive = string>(props: SelectProps<Value>) => React.JSX.Element) & import("../../core/factory/factory").ThemeExtend<{
59
+ export declare const Select: (<Value extends Primitive = string>(props: SelectProps<Value>) => React.JSX.Element) & import("../..").ThemeExtend<{
60
60
  props: SelectProps;
61
61
  ref: HTMLInputElement;
62
62
  stylesNames: SelectStylesNames;
63
63
  variant: InputVariant;
64
64
  signature: <Value extends Primitive = string>(props: SelectProps<Value>) => React.JSX.Element;
65
- }> & import("../../core/factory/factory").ComponentClasses<{
65
+ }> & import("../..").ComponentClasses<{
66
66
  props: SelectProps;
67
67
  ref: HTMLInputElement;
68
68
  stylesNames: SelectStylesNames;
@@ -40,12 +40,12 @@ export type SwitchGroupFactory = Factory<{
40
40
  stylesNames: SwitchGroupStylesNames;
41
41
  signature: <Value extends string = string>(props: SwitchGroupProps<Value>) => React.JSX.Element;
42
42
  }>;
43
- export declare const SwitchGroup: (<Value extends string = string>(props: SwitchGroupProps<Value>) => React.JSX.Element) & import("../../../core/factory/factory").ThemeExtend<{
43
+ export declare const SwitchGroup: (<Value extends string = string>(props: SwitchGroupProps<Value>) => React.JSX.Element) & import("../../..").ThemeExtend<{
44
44
  props: SwitchGroupProps;
45
45
  ref: HTMLDivElement;
46
46
  stylesNames: SwitchGroupStylesNames;
47
47
  signature: <Value extends string = string>(props: SwitchGroupProps<Value>) => React.JSX.Element;
48
- }> & import("../../../core/factory/factory").ComponentClasses<{
48
+ }> & import("../../..").ComponentClasses<{
49
49
  props: SwitchGroupProps;
50
50
  ref: HTMLDivElement;
51
51
  stylesNames: SwitchGroupStylesNames;
@@ -4,6 +4,8 @@ interface GetSplittedTagsInput {
4
4
  maxTags: number | undefined;
5
5
  value: string;
6
6
  currentTags: string[];
7
+ isDuplicate?: (value: string, currentValues: string[]) => boolean;
8
+ onDuplicate?: (value: string) => void;
7
9
  }
8
- export declare function getSplittedTags({ splitChars, allowDuplicates, maxTags, value, currentTags, }: GetSplittedTagsInput): string[];
10
+ export declare function getSplittedTags({ splitChars, allowDuplicates, maxTags, value, currentTags, isDuplicate, onDuplicate, }: GetSplittedTagsInput): string[];
9
11
  export {};
@@ -38,14 +38,14 @@ export declare const Text: (<C = "p">(props: import("../..").PolymorphicComponen
38
38
  }) | (TextProps & {
39
39
  component: React.ElementType;
40
40
  renderRoot?: (props: Record<string, any>) => any;
41
- })>, never> & import("../../core/factory/factory").ThemeExtend<{
41
+ })>, never> & import("../..").ThemeExtend<{
42
42
  props: TextProps;
43
43
  defaultComponent: "p";
44
44
  defaultRef: HTMLParagraphElement;
45
45
  stylesNames: TextStylesNames;
46
46
  vars: TextCssVariables;
47
47
  variant: TextVariant;
48
- }> & import("../../core/factory/factory").ComponentClasses<{
48
+ }> & import("../..").ComponentClasses<{
49
49
  props: TextProps;
50
50
  defaultComponent: "p";
51
51
  defaultRef: HTMLParagraphElement;
@@ -61,7 +61,7 @@ export declare const Text: (<C = "p">(props: import("../..").PolymorphicComponen
61
61
  vars: TextCssVariables;
62
62
  variant: TextVariant;
63
63
  }>;
64
- } & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
64
+ } & import("../..").PolymorphicComponentWithProps<{
65
65
  props: TextProps;
66
66
  defaultComponent: "p";
67
67
  defaultRef: HTMLParagraphElement;
@@ -17,17 +17,17 @@ export declare const UnstyledButton: (<C = "button">(props: import("../..").Poly
17
17
  }) | (UnstyledButtonProps & {
18
18
  component: React.ElementType;
19
19
  renderRoot?: (props: Record<string, any>) => any;
20
- })>, never> & import("../../core/factory/factory").ThemeExtend<{
20
+ })>, never> & import("../..").ThemeExtend<{
21
21
  props: UnstyledButtonProps;
22
22
  stylesNames: UnstyledButtonStylesNames;
23
23
  defaultComponent: "button";
24
24
  defaultRef: HTMLButtonElement;
25
- }> & import("../../core/factory/factory").ComponentClasses<{
25
+ }> & import("../..").ComponentClasses<{
26
26
  props: UnstyledButtonProps;
27
27
  stylesNames: UnstyledButtonStylesNames;
28
28
  defaultComponent: "button";
29
29
  defaultRef: HTMLButtonElement;
30
- }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
30
+ }> & import("../..").PolymorphicComponentWithProps<{
31
31
  props: UnstyledButtonProps;
32
32
  stylesNames: UnstyledButtonStylesNames;
33
33
  defaultComponent: "button";
@@ -77,6 +77,8 @@ export interface MantineTheme {
77
77
  fontSizes: MantineFontSizesValues;
78
78
  /** Object of values that are used to control `line-height` property in `Text` component */
79
79
  lineHeights: MantineLineHeightValues;
80
+ /** Object of values that are used to control `font-weight` property in components */
81
+ fontWeights: MantineFontWeightsValues;
80
82
  /** Object of values that are used to control breakpoints in all components,
81
83
  * values are expected to be defined in em
82
84
  * */
@@ -148,6 +150,10 @@ export type MantineLineHeight = (MantineThemeSizesOverride extends {
148
150
  lineHeights: Record<infer CustomLineHeight, string>;
149
151
  } ? CustomLineHeight : MantineSize) | (string & {});
150
152
  export type MantineLineHeightValues = Record<MantineLineHeight, string>;
153
+ export type MantineFontWeight = (MantineThemeSizesOverride extends {
154
+ fontWeights: Record<infer CustomFontWeight, string>;
155
+ } ? CustomFontWeight : 'regular' | 'medium' | 'bold') | (string & {});
156
+ export type MantineFontWeightsValues = Record<MantineFontWeight, string>;
151
157
  export interface MantineThemeOther {
152
158
  [key: string]: any;
153
159
  }
@@ -1,7 +1,7 @@
1
- export { factory, genericFactory } from './factory';
2
- export { polymorphicFactory } from './polymorphic-factory';
1
+ export type { Factory, PolymorphicFactory } from './create-factory';
3
2
  export { createPolymorphicComponent, polymorphic } from './create-polymorphic-component';
4
- export type { FactoryPayload, ExtendComponent, MantineComponent, MantineComponentStaticProperties, FactoryComponentWithProps, PlaceholderPolymorphicProps, } from './factory';
5
- export type { MantinePolymorphicComponent } from './polymorphic-factory';
6
3
  export type { PolymorphicComponentProps, PolymorphicRef } from './create-polymorphic-component';
7
- export type { Factory, PolymorphicFactory } from './create-factory';
4
+ export { factory, genericFactory } from './factory';
5
+ export type { ComponentClasses, ExtendComponent, FactoryComponentWithProps, FactoryPayload, MantineComponent, MantineComponentStaticProperties, PlaceholderPolymorphicProps, ThemeExtend, } from './factory';
6
+ export { polymorphicFactory, type PolymorphicComponentWithProps } from './polymorphic-factory';
7
+ export type { MantinePolymorphicComponent } from './polymorphic-factory';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantine/core",
3
- "version": "9.0.0-alpha.0",
3
+ "version": "9.0.0-alpha.2",
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": "9.0.0-alpha.0",
46
+ "@mantine/hooks": "9.0.0-alpha.2",
47
47
  "react": "^18.x || ^19.x",
48
48
  "react-dom": "^18.x || ^19.x"
49
49
  },
@@ -61,7 +61,7 @@
61
61
 
62
62
  .m_df3ffa0f {
63
63
  color: inherit;
64
- font-weight: 400;
64
+ font-weight: var(--mantine-font-weight-regular);
65
65
  flex: 1;
66
66
  overflow: hidden;
67
67
  text-overflow: ellipsis;
@@ -61,7 +61,7 @@
61
61
 
62
62
  .m_df3ffa0f {
63
63
  color: inherit;
64
- font-weight: 400;
64
+ font-weight: var(--mantine-font-weight-regular);
65
65
  flex: 1;
66
66
  overflow: hidden;
67
67
  text-overflow: ellipsis;
@@ -171,7 +171,7 @@
171
171
  --section-padding-x: var(--section-padding-x-sm);
172
172
  --section-color: var(--mantine-color-white);
173
173
 
174
- font-weight: 600;
174
+ font-weight: var(--mantine-font-weight-medium);
175
175
  width: auto;
176
176
  border-radius: var(--section-radius, var(--mantine-radius-default));
177
177
  font-size: var(--section-fz, var(--mantine-font-size-sm));
@@ -171,7 +171,7 @@
171
171
  --section-padding-x: var(--section-padding-x-sm);
172
172
  --section-color: var(--mantine-color-white);
173
173
 
174
- font-weight: 600;
174
+ font-weight: var(--mantine-font-weight-medium);
175
175
  width: auto;
176
176
  border-radius: var(--section-radius, var(--mantine-radius-default));
177
177
  font-size: var(--section-fz, var(--mantine-font-size-sm));
package/styles/Alert.css CHANGED
@@ -29,7 +29,7 @@
29
29
  align-items: center;
30
30
  justify-content: space-between;
31
31
  font-size: var(--mantine-font-size-sm);
32
- font-weight: 700;
32
+ font-weight: var(--mantine-font-weight-bold);
33
33
  }
34
34
 
35
35
  .m_6a03f287:where([data-with-close-button]) {
@@ -29,7 +29,7 @@
29
29
  align-items: center;
30
30
  justify-content: space-between;
31
31
  font-size: var(--mantine-font-size-sm);
32
- font-weight: 700;
32
+ font-weight: var(--mantine-font-weight-bold);
33
33
  }
34
34
 
35
35
  .m_6a03f287:where([data-with-close-button]) {
package/styles/Avatar.css CHANGED
@@ -48,7 +48,7 @@
48
48
  }
49
49
 
50
50
  .m_104cd71f {
51
- font-weight: 700;
51
+ font-weight: var(--mantine-font-weight-bold);
52
52
  display: flex;
53
53
  align-items: center;
54
54
  justify-content: center;
@@ -48,7 +48,7 @@
48
48
  }
49
49
 
50
50
  .m_104cd71f {
51
- font-weight: 700;
51
+ font-weight: var(--mantine-font-weight-bold);
52
52
  display: flex;
53
53
  align-items: center;
54
54
  justify-content: center;
package/styles/Badge.css CHANGED
@@ -39,7 +39,7 @@
39
39
  justify-content: center;
40
40
  width: fit-content;
41
41
  text-transform: uppercase;
42
- font-weight: 700;
42
+ font-weight: var(--mantine-font-weight-bold);
43
43
  letter-spacing: 0.25px;
44
44
  cursor: default;
45
45
  text-overflow: ellipsis;
@@ -39,7 +39,7 @@
39
39
  justify-content: center;
40
40
  width: fit-content;
41
41
  text-transform: uppercase;
42
- font-weight: 700;
42
+ font-weight: var(--mantine-font-weight-bold);
43
43
  letter-spacing: 0.25px;
44
44
  cursor: default;
45
45
  text-overflow: ellipsis;
package/styles/Button.css CHANGED
@@ -28,7 +28,7 @@
28
28
  --button-color: var(--mantine-color-white);
29
29
 
30
30
  user-select: none;
31
- font-weight: 600;
31
+ font-weight: var(--mantine-font-weight-medium);
32
32
  position: relative;
33
33
  line-height: 1;
34
34
  text-align: center;
@@ -244,7 +244,7 @@
244
244
  --section-padding-x: var(--section-padding-x-sm);
245
245
  --section-color: var(--mantine-color-white);
246
246
 
247
- font-weight: 600;
247
+ font-weight: var(--mantine-font-weight-medium);
248
248
  width: auto;
249
249
  border-radius: var(--section-radius, var(--mantine-radius-default));
250
250
  font-size: var(--section-fz, var(--mantine-font-size-sm));