@wix/site-ui 1.30.0 → 1.32.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 (173) hide show
  1. package/dist/1268.js +99 -0
  2. package/dist/1279.js +7 -0
  3. package/dist/1457.js +10 -0
  4. package/dist/1477.js +106 -0
  5. package/dist/1500.js +111 -0
  6. package/dist/167.js +6 -0
  7. package/dist/2274.js +34 -0
  8. package/dist/2287.js +17 -0
  9. package/dist/2418.js +31 -0
  10. package/dist/2801.js +20 -0
  11. package/dist/285.js +86 -0
  12. package/dist/2861.js +6 -0
  13. package/dist/3020.js +7 -0
  14. package/dist/3021.js +72 -0
  15. package/dist/3056.js +229 -0
  16. package/dist/3140.js +4 -0
  17. package/dist/3248.js +307 -0
  18. package/dist/3296.js +4 -0
  19. package/dist/3319.js +400 -0
  20. package/dist/3395.js +4 -0
  21. package/dist/3485.js +854 -0
  22. package/dist/353.js +14 -0
  23. package/dist/3670.js +418 -0
  24. package/dist/3829.js +113 -0
  25. package/dist/4026.js +12 -0
  26. package/dist/4143.js +46 -0
  27. package/dist/42.js +32 -0
  28. package/dist/4281.js +30 -0
  29. package/dist/4346.js +2 -0
  30. package/dist/4388.js +418 -0
  31. package/dist/4490.js +32 -0
  32. package/dist/4495.js +9 -0
  33. package/dist/4549.js +24 -0
  34. package/dist/4586.js +41 -0
  35. package/dist/4586.js.LICENSE.txt +19 -0
  36. package/dist/4707.js +19 -0
  37. package/dist/4723.js +7 -0
  38. package/dist/4745.js +7 -0
  39. package/dist/4768.js +35 -0
  40. package/dist/4922.js +15 -0
  41. package/dist/5036.js +17 -0
  42. package/dist/5085.js +20 -0
  43. package/dist/5299.js +597 -0
  44. package/dist/5659.js +4 -0
  45. package/dist/5778.js +10 -0
  46. package/dist/5864.js +86 -0
  47. package/dist/5992.js +913 -0
  48. package/dist/5992.js.LICENSE.txt +19 -0
  49. package/dist/6003.js +10 -0
  50. package/dist/6046.js +29 -0
  51. package/dist/6089.js +2355 -0
  52. package/dist/6107.js +10 -0
  53. package/dist/6247.js +20 -0
  54. package/dist/6270.js +487 -0
  55. package/dist/6329.js +32 -0
  56. package/dist/6330.js +30 -0
  57. package/dist/6499.js +7 -0
  58. package/dist/6535.js +71 -0
  59. package/dist/6588.js +382 -0
  60. package/dist/6706.js +16 -0
  61. package/dist/6825.js +7 -0
  62. package/dist/6882.js +1562 -0
  63. package/dist/6914.js +30 -0
  64. package/dist/7021.js +13 -0
  65. package/dist/7366.js +83 -0
  66. package/dist/7373.js +25 -0
  67. package/dist/7541.js +25 -0
  68. package/dist/7564.js +10 -0
  69. package/dist/7642.js +20 -0
  70. package/dist/7725.js +10 -0
  71. package/dist/7871.js +38 -0
  72. package/dist/8052.js +352 -0
  73. package/dist/8106.js +238 -0
  74. package/dist/8171.js +346 -0
  75. package/dist/8225.js +21 -0
  76. package/dist/8272.js +333 -0
  77. package/dist/8527.js +58 -0
  78. package/dist/8724.js +10 -0
  79. package/dist/8750.js +1920 -0
  80. package/dist/8758.js +43 -0
  81. package/dist/880.js +149 -0
  82. package/dist/8935.js +8 -0
  83. package/dist/8960.js +22 -0
  84. package/dist/8971.js +40 -0
  85. package/dist/8979.js +10 -0
  86. package/dist/8996.js +71 -0
  87. package/dist/904.js +121 -0
  88. package/dist/9048.js +52 -0
  89. package/dist/9087.js +256 -0
  90. package/dist/9189.js +158 -0
  91. package/dist/9255.js +136 -0
  92. package/dist/9352.js +148 -0
  93. package/dist/951.js +22 -0
  94. package/dist/9635.js +22 -0
  95. package/dist/9829.js +4 -0
  96. package/dist/9863.js +8 -0
  97. package/dist/Accordion/index.d.ts +569 -12
  98. package/dist/Accordion/index.js +423 -8
  99. package/dist/AlertDialog/index.d.ts +1417 -18
  100. package/dist/AlertDialog/index.js +34 -14
  101. package/dist/Autocomplete/index.d.ts +1861 -38
  102. package/dist/Autocomplete/index.js +98 -24
  103. package/dist/Avatar/index.d.ts +129 -7
  104. package/dist/Avatar/index.js +149 -6
  105. package/dist/Breadcrumbs/index.d.ts +960 -7
  106. package/dist/Breadcrumbs/index.js +5 -5
  107. package/dist/Button/index.d.ts +88 -6
  108. package/dist/Button/index.js +27 -3
  109. package/dist/Checkbox/index.d.ts +425 -5
  110. package/dist/Checkbox/index.js +45 -5
  111. package/dist/CheckboxGroup/index.d.ts +318 -3
  112. package/dist/CheckboxGroup/index.js +166 -3
  113. package/dist/Collapsible/index.d.ts +377 -7
  114. package/dist/Collapsible/index.js +160 -6
  115. package/dist/Combobox/index.d.ts +1984 -48
  116. package/dist/Combobox/index.js +352 -29
  117. package/dist/ContextMenu/index.d.ts +2340 -36
  118. package/dist/ContextMenu/index.js +197 -22
  119. package/dist/Dialog/index.d.ts +1355 -18
  120. package/dist/Dialog/index.js +16 -14
  121. package/dist/Drawer/index.d.ts +1653 -18
  122. package/dist/Drawer/index.js +2797 -20
  123. package/dist/Field/index.d.ts +655 -15
  124. package/dist/Field/index.js +677 -10
  125. package/dist/Fieldset/index.d.ts +94 -5
  126. package/dist/Fieldset/index.js +68 -5
  127. package/dist/Form/index.d.ts +331 -2
  128. package/dist/Form/index.js +106 -3
  129. package/dist/Input/index.d.ts +692 -3
  130. package/dist/Input/index.js +10 -3
  131. package/dist/Menu/index.d.ts +2301 -36
  132. package/dist/Menu/index.js +365 -26
  133. package/dist/Menubar/index.d.ts +2301 -3
  134. package/dist/Menubar/index.js +105 -3
  135. package/dist/Meter/index.d.ts +175 -11
  136. package/dist/Meter/index.js +129 -9
  137. package/dist/NavigationMenu/index.d.ts +978 -28
  138. package/dist/NavigationMenu/index.js +1034 -17
  139. package/dist/NumberField/index.d.ts +612 -15
  140. package/dist/NumberField/index.js +1409 -11
  141. package/dist/Popover/index.d.ts +1655 -20
  142. package/dist/Popover/index.js +792 -17
  143. package/dist/PreviewCard/index.d.ts +1523 -14
  144. package/dist/PreviewCard/index.js +679 -14
  145. package/dist/Progress/index.d.ts +183 -11
  146. package/dist/Progress/index.js +181 -9
  147. package/dist/Radio/index.d.ts +185 -6
  148. package/dist/Radio/index.js +253 -6
  149. package/dist/RadioGroup/index.d.ts +341 -2
  150. package/dist/RadioGroup/index.js +154 -3
  151. package/dist/ScrollArea/index.d.ts +265 -13
  152. package/dist/ScrollArea/index.js +892 -10
  153. package/dist/Select/index.d.ts +1493 -38
  154. package/dist/Select/index.js +1824 -23
  155. package/dist/Separator/index.d.ts +80 -6
  156. package/dist/Separator/index.js +3 -3
  157. package/dist/Slider/index.d.ts +678 -16
  158. package/dist/Slider/index.js +1199 -11
  159. package/dist/Switch/index.d.ts +393 -5
  160. package/dist/Switch/index.js +208 -6
  161. package/dist/Tabs/index.d.ts +523 -12
  162. package/dist/Tabs/index.js +685 -9
  163. package/dist/Toggle/index.d.ts +305 -2
  164. package/dist/Toggle/index.js +76 -3
  165. package/dist/ToggleGroup/index.d.ts +316 -2
  166. package/dist/ToggleGroup/index.js +102 -3
  167. package/dist/Toolbar/index.d.ts +282 -13
  168. package/dist/Toolbar/index.js +230 -9
  169. package/dist/Tooltip/index.d.ts +1572 -14
  170. package/dist/Tooltip/index.js +965 -14
  171. package/dist/index.d.ts +12749 -652
  172. package/dist/rslib-runtime.js +18 -0
  173. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { NavigationMenu } from "@base-ui/react/navigation-menu";
3
2
  import { ChevronLeft, ChevronRight } from "@wix/wix-ui-icons-common";
4
3
  import clsx from "clsx";
4
+ import { NavigationMenuLink_NavigationMenuLink, NavigationMenuItem_NavigationMenuItem, NavigationMenuList_NavigationMenuList, NavigationMenuRoot_NavigationMenuRoot } from "../6588.js";
5
5
  import * as __rspack_external_react from "react";
6
6
  const Breadcrumbs_module = {
7
7
  root: "root-uwc56U",
@@ -20,7 +20,7 @@ const BreadcrumbsContext = /*#__PURE__*/ __rspack_external_react.createContext({
20
20
  const List = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, children, ...props }, ref)=>{
21
21
  const { separator } = __rspack_external_react.useContext(BreadcrumbsContext);
22
22
  const childArray = __rspack_external_react.Children.toArray(children);
23
- return /*#__PURE__*/ jsx(NavigationMenu.List, {
23
+ return /*#__PURE__*/ jsx(NavigationMenuList_NavigationMenuList, {
24
24
  ref: ref,
25
25
  className: clsx(Breadcrumbs_module.list, className),
26
26
  ...props,
@@ -37,12 +37,12 @@ const List = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, chil
37
37
  ])
38
38
  });
39
39
  });
40
- const Item = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(NavigationMenu.Item, {
40
+ const Item = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(NavigationMenuItem_NavigationMenuItem, {
41
41
  ref: ref,
42
42
  className: clsx(Breadcrumbs_module.item, className),
43
43
  ...props
44
44
  }));
45
- const Link = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(NavigationMenu.Link, {
45
+ const Link = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(NavigationMenuLink_NavigationMenuLink, {
46
46
  ref: ref,
47
47
  className: clsx(Breadcrumbs_module.link, className),
48
48
  ...props
@@ -63,7 +63,7 @@ function Root({ className, dir, separator, 'aria-label': ariaLabel = 'Breadcrumb
63
63
  value: {
64
64
  separator: separator ?? defaultSeparator
65
65
  },
66
- children: /*#__PURE__*/ jsx(NavigationMenu.Root, {
66
+ children: /*#__PURE__*/ jsx(NavigationMenuRoot_NavigationMenuRoot, {
67
67
  "aria-label": ariaLabel,
68
68
  dir: dir,
69
69
  ...props,
@@ -1,21 +1,103 @@
1
- import { Button as Button_2 } from '@base-ui/react/button';
2
1
  import * as React_2 from 'react';
3
2
 
4
3
  declare type BaseProps = WithStringClassName<React_2.ComponentPropsWithoutRef<typeof Button_2>>;
5
4
 
6
- export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLElement>>;
5
+ /**
6
+ * Props shared by all Base UI components.
7
+ * Contains `className` (string or callback taking the component's state as an argument) and `render` (function to customize rendering).
8
+ */
9
+ declare type BaseUIComponentProps<ElementType extends React_2.ElementType, State, RenderFunctionProps = HTMLProps> = Omit<WithBaseUIEvent<React_2.ComponentPropsWithRef<ElementType>>, 'className' | 'color' | 'defaultValue' | 'defaultChecked' | 'style'> & {
10
+ /**
11
+ * CSS class applied to the element, or a function that
12
+ * returns a class based on the component's state.
13
+ */
14
+ className?: string | ((state: State) => string | undefined) | undefined;
15
+ /**
16
+ * Allows you to replace the component's HTML element
17
+ * with a different tag, or compose it with another component.
18
+ *
19
+ * Accepts a `ReactElement` or a function that returns the element to render.
20
+ */
21
+ render?: React_2.ReactElement | ComponentRenderFn<RenderFunctionProps, State> | undefined;
22
+ /**
23
+ * Style applied to the element, or a function that
24
+ * returns a style object based on the component's state.
25
+ */
26
+ style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
27
+ };
28
+
29
+ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E & {
30
+ preventBaseUIHandler: () => void;
31
+ readonly baseUIHandlerPrevented?: boolean | undefined;
32
+ };
33
+
34
+ export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps_2 & React_2.RefAttributes<HTMLElement>>;
35
+
36
+ /**
37
+ * A button component that can be used to trigger actions.
38
+ * Renders a `<button>` element.
39
+ *
40
+ * Documentation: [Base UI Button](https://base-ui.com/react/components/button)
41
+ */
42
+ declare const Button_2: React_2.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React_2.RefAttributes<HTMLElement>>;
7
43
 
8
- declare interface ButtonProps extends BaseProps {
44
+ declare namespace Button_2 {
45
+ type State = ButtonState;
46
+ type Props = ButtonProps;
47
+ }
48
+
49
+ export declare interface ButtonProps extends NativeButtonProps, BaseUIComponentProps<'button', ButtonState> {
50
+ /**
51
+ * Whether the button should be focusable when disabled.
52
+ * @default false
53
+ */
54
+ focusableWhenDisabled?: boolean | undefined;
55
+ }
56
+
57
+ declare interface ButtonProps_2 extends BaseProps {
9
58
  variant?: ButtonVariant;
10
59
  }
11
60
 
61
+ export declare interface ButtonState {
62
+ /**
63
+ * Whether the button should ignore user interaction.
64
+ */
65
+ disabled: boolean;
66
+ }
67
+
12
68
  declare type ButtonVariant = 'primary' | 'secondary' | 'tertiary';
13
69
 
14
- declare type WithStringClassName<P> = Omit<P, 'className'> & {
15
- className?: string;
70
+ /**
71
+ * Shape of the render prop: a function that takes props to be spread on the element and component's state and returns a React element.
72
+ *
73
+ * @template Props Props to be spread on the rendered element.
74
+ * @template State Component's internal state.
75
+ */
76
+ declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
77
+
78
+ declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
79
+ ref?: React_2.Ref<T> | undefined;
16
80
  };
17
81
 
82
+ declare interface NativeButtonProps {
83
+ /**
84
+ * Whether the component renders a native `<button>` element when replacing it
85
+ * via the `render` prop.
86
+ * Set to `false` if the rendered element is not a button (for example, `<div>`).
87
+ * @default true
88
+ */
89
+ nativeButton?: boolean | undefined;
90
+ }
91
+
92
+ /**
93
+ * Adds a `preventBaseUIHandler` method to all event handlers.
94
+ */
95
+ declare type WithBaseUIEvent<T> = { [K in keyof T]: WithPreventBaseUIHandler<T[K]> };
96
+
97
+ declare type WithPreventBaseUIHandler<T> = T extends ((event: infer E) => any) ? E extends React_2.SyntheticEvent<Element, Event> ? (event: BaseUIEvent<E>) => ReturnType<T> : T : T extends undefined ? undefined : T;
18
98
 
19
- export * from "@base-ui/react/button";
99
+ declare type WithStringClassName<P> = Omit<P, 'className'> & {
100
+ className?: string;
101
+ };
20
102
 
21
103
  export { }
@@ -1,16 +1,40 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { Button } from "@base-ui/react/button";
3
2
  import clsx from "clsx";
3
+ import { useButton } from "../9189.js";
4
+ import { useRenderElement } from "../8272.js";
4
5
  import * as __rspack_external_react from "react";
6
+ const Button_Button = /*#__PURE__*/ __rspack_external_react.forwardRef(function(componentProps, forwardedRef) {
7
+ const { render, className, disabled = false, focusableWhenDisabled = false, nativeButton = true, style, ...elementProps } = componentProps;
8
+ const { getButtonProps, buttonRef } = useButton({
9
+ disabled,
10
+ focusableWhenDisabled,
11
+ native: nativeButton
12
+ });
13
+ const state = {
14
+ disabled
15
+ };
16
+ return useRenderElement('button', componentProps, {
17
+ state,
18
+ ref: [
19
+ forwardedRef,
20
+ buttonRef
21
+ ],
22
+ props: [
23
+ elementProps,
24
+ getButtonProps
25
+ ]
26
+ });
27
+ });
28
+ if ("production" !== process.env.NODE_ENV) Button_Button.displayName = "Button";
5
29
  const Button_module = {
6
30
  root: "root-kIffNe",
7
31
  primary: "primary-BOdHls",
8
32
  secondary: "secondary-O9td6z",
9
33
  tertiary: "tertiary-QWTRNC"
10
34
  };
11
- const Button_Button = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, variant = 'primary', ...props }, ref)=>/*#__PURE__*/ jsx(Button, {
35
+ const Button_Button_Button = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, variant = 'primary', ...props }, ref)=>/*#__PURE__*/ jsx(Button_Button, {
12
36
  ref: ref,
13
37
  className: clsx(Button_module.root, Button_module[variant], className),
14
38
  ...props
15
39
  }));
16
- export { Button_Button as Button };
40
+ export { Button_Button_Button as Button };
@@ -1,25 +1,445 @@
1
- import { CheckboxIndicatorProps } from '@base-ui/react/checkbox';
2
- import { CheckboxRootProps } from '@base-ui/react/checkbox';
1
+ import { CheckboxIndicatorProps as CheckboxIndicatorProps_2 } from '@base-ui/react/checkbox';
2
+ import { CheckboxRootProps as CheckboxRootProps_2 } from '@base-ui/react/checkbox';
3
3
  import * as React_2 from 'react';
4
4
 
5
+ declare type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
6
+ /**
7
+ * The reason for the event.
8
+ */
9
+ reason: Reason;
10
+ /**
11
+ * The native event associated with the custom event.
12
+ */
13
+ event: ReasonToEvent<Reason>;
14
+ /**
15
+ * Cancels Base UI from handling the event.
16
+ */
17
+ cancel: () => void;
18
+ /**
19
+ * Allows the event to propagate in cases where Base UI will stop the propagation.
20
+ */
21
+ allowPropagation: () => void;
22
+ /**
23
+ * Indicates whether the event has been canceled.
24
+ */
25
+ isCanceled: boolean;
26
+ /**
27
+ * Indicates whether the event is allowed to propagate.
28
+ */
29
+ isPropagationAllowed: boolean;
30
+ /**
31
+ * The element that triggered the event, if applicable.
32
+ */
33
+ trigger: Element | undefined;
34
+ } & CustomProperties;
35
+
36
+ /**
37
+ * Details of custom change events emitted by Base UI components.
38
+ */
39
+ declare type BaseUIChangeEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends string ? BaseUIChangeEventDetail<Reason, CustomProperties> & {} : never;
40
+
41
+ /**
42
+ * Props shared by all Base UI components.
43
+ * Contains `className` (string or callback taking the component's state as an argument) and `render` (function to customize rendering).
44
+ */
45
+ declare type BaseUIComponentProps<ElementType extends React_2.ElementType, State, RenderFunctionProps = HTMLProps> = Omit<WithBaseUIEvent<React_2.ComponentPropsWithRef<ElementType>>, 'className' | 'color' | 'defaultValue' | 'defaultChecked' | 'style'> & {
46
+ /**
47
+ * CSS class applied to the element, or a function that
48
+ * returns a class based on the component's state.
49
+ */
50
+ className?: string | ((state: State) => string | undefined) | undefined;
51
+ /**
52
+ * Allows you to replace the component's HTML element
53
+ * with a different tag, or compose it with another component.
54
+ *
55
+ * Accepts a `ReactElement` or a function that returns the element to render.
56
+ */
57
+ render?: React_2.ReactElement | ComponentRenderFn<RenderFunctionProps, State> | undefined;
58
+ /**
59
+ * Style applied to the element, or a function that
60
+ * returns a style object based on the component's state.
61
+ */
62
+ style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
63
+ };
64
+
65
+ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E & {
66
+ preventBaseUIHandler: () => void;
67
+ readonly baseUIHandlerPrevented?: boolean | undefined;
68
+ };
69
+
70
+ declare const cancelOpen: "cancel-open";
71
+
5
72
  export declare const Checkbox: {
6
- Root: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<CheckboxRootProps, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">, "className"> & {
73
+ Root: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<CheckboxRootProps_2, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">, "className"> & {
7
74
  className?: string | undefined;
8
75
  } & {
9
76
  size?: number | undefined;
10
77
  } & React_2.RefAttributes<HTMLElement>>;
11
- Indicator: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<CheckboxIndicatorProps, "ref"> & React_2.RefAttributes<HTMLSpanElement>, "ref">, "className"> & {
78
+ Indicator: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<CheckboxIndicatorProps_2, "ref"> & React_2.RefAttributes<HTMLSpanElement>, "ref">, "className"> & {
12
79
  className?: string | undefined;
13
80
  } & React_2.RefAttributes<HTMLSpanElement>>;
14
81
  };
15
82
 
83
+ /**
84
+ * Indicates whether the checkbox is ticked.
85
+ * Renders a `<span>` element.
86
+ *
87
+ * Documentation: [Base UI Checkbox](https://base-ui.com/react/components/checkbox)
88
+ */
89
+ export declare const CheckboxIndicator: React_2.ForwardRefExoticComponent<Omit<CheckboxIndicatorProps, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
90
+
91
+ export declare namespace CheckboxIndicator {
92
+ export type State = CheckboxIndicatorState;
93
+ export type Props = CheckboxIndicatorProps;
94
+ }
95
+
96
+ export declare interface CheckboxIndicatorProps extends BaseUIComponentProps<'span', CheckboxIndicatorState> {
97
+ /**
98
+ * Whether to keep the element in the DOM when the checkbox is not checked.
99
+ * @default false
100
+ */
101
+ keepMounted?: boolean | undefined;
102
+ }
103
+
104
+ export declare interface CheckboxIndicatorState extends CheckboxRootState {
105
+ /**
106
+ * The transition status of the component.
107
+ */
108
+ transitionStatus: TransitionStatus;
109
+ }
110
+
111
+ /**
112
+ * Represents the checkbox itself.
113
+ * Renders a `<span>` element and a hidden `<input>` beside.
114
+ *
115
+ * Documentation: [Base UI Checkbox](https://base-ui.com/react/components/checkbox)
116
+ */
117
+ export declare const CheckboxRoot: React_2.ForwardRefExoticComponent<Omit<CheckboxRootProps, "ref"> & React_2.RefAttributes<HTMLElement>>;
118
+
119
+ export declare namespace CheckboxRoot {
120
+ export type State = CheckboxRootState;
121
+ export type Props = CheckboxRootProps;
122
+ export type ChangeEventReason = CheckboxRootChangeEventReason;
123
+ export type ChangeEventDetails = CheckboxRootChangeEventDetails;
124
+ }
125
+
126
+ export declare type CheckboxRootChangeEventDetails = BaseUIChangeEventDetails<CheckboxRoot.ChangeEventReason>;
127
+
128
+ export declare type CheckboxRootChangeEventReason = typeof REASONS.none;
129
+
130
+ export declare interface CheckboxRootProps extends NonNativeButtonProps, Omit<BaseUIComponentProps<'span', CheckboxRootState>, 'onChange' | 'value'> {
131
+ /**
132
+ * The id of the input element.
133
+ */
134
+ id?: string | undefined;
135
+ /**
136
+ * Identifies the field when a form is submitted.
137
+ * @default undefined
138
+ */
139
+ name?: string | undefined;
140
+ /**
141
+ * Identifies the form that owns the hidden input.
142
+ * Useful when the checkbox is rendered outside the form.
143
+ */
144
+ form?: string | undefined;
145
+ /**
146
+ * Whether the checkbox is currently ticked.
147
+ *
148
+ * To render an uncontrolled checkbox, use the `defaultChecked` prop instead.
149
+ * @default undefined
150
+ */
151
+ checked?: boolean | undefined;
152
+ /**
153
+ * Whether the checkbox is initially ticked.
154
+ *
155
+ * To render a controlled checkbox, use the `checked` prop instead.
156
+ * @default false
157
+ */
158
+ defaultChecked?: boolean | undefined;
159
+ /**
160
+ * Whether the component should ignore user interaction.
161
+ * @default false
162
+ */
163
+ disabled?: boolean | undefined;
164
+ /**
165
+ * Event handler called when the checkbox is ticked or unticked.
166
+ */
167
+ onCheckedChange?: ((checked: boolean, eventDetails: CheckboxRootChangeEventDetails) => void) | undefined;
168
+ /**
169
+ * Whether the user should be unable to tick or untick the checkbox.
170
+ * @default false
171
+ */
172
+ readOnly?: boolean | undefined;
173
+ /**
174
+ * Whether the user must tick the checkbox before submitting a form.
175
+ * @default false
176
+ */
177
+ required?: boolean | undefined;
178
+ /**
179
+ * Whether the checkbox is in a mixed state: neither ticked, nor unticked.
180
+ * @default false
181
+ */
182
+ indeterminate?: boolean | undefined;
183
+ /**
184
+ * A ref to access the hidden `<input>` element.
185
+ */
186
+ inputRef?: React_2.Ref<HTMLInputElement> | undefined;
187
+ /**
188
+ * Whether the checkbox controls a group of child checkboxes.
189
+ *
190
+ * Must be used in a [Checkbox Group](https://base-ui.com/react/components/checkbox-group).
191
+ * @default false
192
+ */
193
+ parent?: boolean | undefined;
194
+ /**
195
+ * The value submitted with the form when the checkbox is unchecked.
196
+ * By default, unchecked checkboxes do not submit any value, matching native checkbox behavior.
197
+ */
198
+ uncheckedValue?: string | undefined;
199
+ /**
200
+ * The value of the selected checkbox.
201
+ */
202
+ value?: string | undefined;
203
+ }
204
+
205
+ export declare interface CheckboxRootState extends FieldRootState {
206
+ /**
207
+ * Whether the checkbox is currently ticked.
208
+ */
209
+ checked: boolean;
210
+ /**
211
+ * Whether the component should ignore user interaction.
212
+ */
213
+ disabled: boolean;
214
+ /**
215
+ * Whether the user should be unable to tick or untick the checkbox.
216
+ */
217
+ readOnly: boolean;
218
+ /**
219
+ * Whether the user must tick the checkbox before submitting a form.
220
+ */
221
+ required: boolean;
222
+ /**
223
+ * Whether the checkbox is in a mixed state: neither ticked, nor unticked.
224
+ */
225
+ indeterminate: boolean;
226
+ }
227
+
16
228
  export declare const CheckboxSize: {
17
229
  readonly small: 12;
18
230
  readonly medium: 16;
19
231
  readonly large: 20;
20
232
  };
21
233
 
234
+ declare const chipRemovePress: "chip-remove-press";
235
+
236
+ declare const clearPress: "clear-press";
237
+
238
+ declare const closePress: "close-press";
239
+
240
+ declare const closeWatcher: "close-watcher";
241
+
242
+ /**
243
+ * Shape of the render prop: a function that takes props to be spread on the element and component's state and returns a React element.
244
+ *
245
+ * @template Props Props to be spread on the rendered element.
246
+ * @template State Component's internal state.
247
+ */
248
+ declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
249
+
250
+ declare const decrementPress: "decrement-press";
251
+
252
+ declare const disabled: "disabled";
253
+
254
+ declare const drag: "drag";
255
+
256
+ declare const escapeKey: "escape-key";
257
+
258
+ declare interface FieldRootState {
259
+ /**
260
+ * Whether the component should ignore user interaction.
261
+ */
262
+ disabled: boolean;
263
+ /**
264
+ * Whether the field has been touched.
265
+ */
266
+ touched: boolean;
267
+ /**
268
+ * Whether the field value has changed from its initial value.
269
+ */
270
+ dirty: boolean;
271
+ /**
272
+ * Whether the field is valid.
273
+ */
274
+ valid: boolean | null;
275
+ /**
276
+ * Whether the field has a value.
277
+ */
278
+ filled: boolean;
279
+ /**
280
+ * Whether the field is focused.
281
+ */
282
+ focused: boolean;
283
+ }
284
+
285
+ declare const focusOut: "focus-out";
286
+
287
+ declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
288
+ ref?: React_2.Ref<T> | undefined;
289
+ };
290
+
291
+ declare const imperativeAction: "imperative-action";
292
+
293
+ declare const incrementPress: "increment-press";
294
+
295
+ declare const initial: "initial";
296
+
297
+ declare const inputBlur: "input-blur";
298
+
299
+ declare const inputChange: "input-change";
300
+
301
+ declare const inputClear: "input-clear";
302
+
303
+ declare const inputPaste: "input-paste";
304
+
305
+ declare const inputPress: "input-press";
306
+
307
+ declare const itemPress: "item-press";
308
+
309
+ declare const keyboard: "keyboard";
310
+
311
+ declare const linkPress: "link-press";
312
+
313
+ declare const listNavigation: "list-navigation";
314
+
315
+ declare const missing: "missing";
316
+
317
+ declare const none: "none";
318
+
319
+ declare interface NonNativeButtonProps {
320
+ /**
321
+ * Whether the component renders a native `<button>` element when replacing it
322
+ * via the `render` prop.
323
+ * Set to `true` if the rendered element is a native button.
324
+ * @default false
325
+ */
326
+ nativeButton?: boolean | undefined;
327
+ }
328
+
329
+ declare const outsidePress: "outside-press";
330
+
331
+ export declare const PARENT_CHECKBOX = "data-parent";
332
+
333
+ declare const pointer: "pointer";
334
+
335
+ declare namespace REASONS {
336
+ export {
337
+ none,
338
+ triggerPress,
339
+ triggerHover,
340
+ triggerFocus,
341
+ outsidePress,
342
+ itemPress,
343
+ closePress,
344
+ linkPress,
345
+ clearPress,
346
+ chipRemovePress,
347
+ trackPress,
348
+ incrementPress,
349
+ decrementPress,
350
+ inputChange,
351
+ inputClear,
352
+ inputBlur,
353
+ inputPaste,
354
+ inputPress,
355
+ focusOut,
356
+ escapeKey,
357
+ closeWatcher,
358
+ listNavigation,
359
+ keyboard,
360
+ pointer,
361
+ drag,
362
+ wheel,
363
+ scrub,
364
+ cancelOpen,
365
+ siblingOpen,
366
+ disabled,
367
+ missing,
368
+ initial,
369
+ imperativeAction,
370
+ swipe,
371
+ windowResize
372
+ }
373
+ }
374
+
375
+ /**
376
+ * Maps a change `reason` string to the corresponding native event type.
377
+ */
378
+ declare type ReasonToEvent<Reason extends string> = Reason extends keyof ReasonToEventMap ? ReasonToEventMap[Reason] : Event;
379
+
380
+ declare interface ReasonToEventMap {
381
+ [REASONS.none]: Event;
382
+ [REASONS.triggerPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
383
+ [REASONS.triggerHover]: MouseEvent;
384
+ [REASONS.triggerFocus]: FocusEvent;
385
+ [REASONS.outsidePress]: MouseEvent | PointerEvent | TouchEvent;
386
+ [REASONS.itemPress]: MouseEvent | KeyboardEvent | PointerEvent;
387
+ [REASONS.closePress]: MouseEvent | KeyboardEvent | PointerEvent;
388
+ [REASONS.linkPress]: MouseEvent | PointerEvent;
389
+ [REASONS.clearPress]: PointerEvent | MouseEvent | KeyboardEvent;
390
+ [REASONS.chipRemovePress]: PointerEvent | MouseEvent | KeyboardEvent;
391
+ [REASONS.trackPress]: PointerEvent | MouseEvent | TouchEvent;
392
+ [REASONS.incrementPress]: PointerEvent | MouseEvent | TouchEvent;
393
+ [REASONS.decrementPress]: PointerEvent | MouseEvent | TouchEvent;
394
+ [REASONS.inputChange]: InputEvent | Event;
395
+ [REASONS.inputClear]: InputEvent | FocusEvent | Event;
396
+ [REASONS.inputBlur]: FocusEvent;
397
+ [REASONS.inputPaste]: ClipboardEvent;
398
+ [REASONS.inputPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
399
+ [REASONS.focusOut]: FocusEvent | KeyboardEvent;
400
+ [REASONS.escapeKey]: KeyboardEvent;
401
+ [REASONS.closeWatcher]: Event;
402
+ [REASONS.listNavigation]: KeyboardEvent;
403
+ [REASONS.keyboard]: KeyboardEvent;
404
+ [REASONS.pointer]: PointerEvent;
405
+ [REASONS.drag]: PointerEvent | TouchEvent;
406
+ [REASONS.swipe]: PointerEvent | TouchEvent;
407
+ [REASONS.wheel]: WheelEvent;
408
+ [REASONS.scrub]: PointerEvent;
409
+ [REASONS.cancelOpen]: MouseEvent;
410
+ [REASONS.siblingOpen]: Event;
411
+ [REASONS.disabled]: Event;
412
+ [REASONS.missing]: Event;
413
+ [REASONS.initial]: Event;
414
+ [REASONS.imperativeAction]: Event;
415
+ [REASONS.windowResize]: UIEvent;
416
+ }
417
+
418
+ declare const scrub: "scrub";
419
+
420
+ declare const siblingOpen: "sibling-open";
421
+
422
+ declare const swipe: "swipe";
423
+
424
+ declare const trackPress: "track-press";
425
+
426
+ declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
427
+
428
+ declare const triggerFocus: "trigger-focus";
429
+
430
+ declare const triggerHover: "trigger-hover";
431
+
432
+ declare const triggerPress: "trigger-press";
433
+
434
+ declare const wheel: "wheel";
435
+
436
+ declare const windowResize: "window-resize";
437
+
438
+ /**
439
+ * Adds a `preventBaseUIHandler` method to all event handlers.
440
+ */
441
+ declare type WithBaseUIEvent<T> = { [K in keyof T]: WithPreventBaseUIHandler<T[K]> };
22
442
 
23
- export * from "@base-ui/react/checkbox";
443
+ declare type WithPreventBaseUIHandler<T> = T extends ((event: infer E) => any) ? E extends React_2.SyntheticEvent<Element, Event> ? (event: BaseUIEvent<E>) => ReturnType<T> : T : T extends undefined ? undefined : T;
24
444
 
25
445
  export { }