@wix/site-ui 1.29.0 → 1.31.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.
- package/dist/1268.js +99 -0
- package/dist/1279.js +7 -0
- package/dist/1457.js +10 -0
- package/dist/1477.js +106 -0
- package/dist/1500.js +111 -0
- package/dist/167.js +6 -0
- package/dist/2274.js +34 -0
- package/dist/2287.js +17 -0
- package/dist/2418.js +31 -0
- package/dist/2801.js +20 -0
- package/dist/285.js +86 -0
- package/dist/2861.js +6 -0
- package/dist/3020.js +7 -0
- package/dist/3021.js +72 -0
- package/dist/3056.js +229 -0
- package/dist/3140.js +4 -0
- package/dist/3248.js +307 -0
- package/dist/3296.js +4 -0
- package/dist/3319.js +400 -0
- package/dist/3395.js +4 -0
- package/dist/3485.js +854 -0
- package/dist/353.js +14 -0
- package/dist/3670.js +418 -0
- package/dist/3829.js +113 -0
- package/dist/4026.js +12 -0
- package/dist/4143.js +46 -0
- package/dist/42.js +32 -0
- package/dist/4281.js +30 -0
- package/dist/4346.js +2 -0
- package/dist/4388.js +418 -0
- package/dist/4490.js +32 -0
- package/dist/4495.js +9 -0
- package/dist/4549.js +24 -0
- package/dist/4586.js +41 -0
- package/dist/4586.js.LICENSE.txt +19 -0
- package/dist/4707.js +19 -0
- package/dist/4723.js +7 -0
- package/dist/4745.js +7 -0
- package/dist/4768.js +35 -0
- package/dist/4922.js +15 -0
- package/dist/5036.js +17 -0
- package/dist/5085.js +20 -0
- package/dist/5299.js +597 -0
- package/dist/5659.js +4 -0
- package/dist/5778.js +10 -0
- package/dist/5864.js +86 -0
- package/dist/5992.js +913 -0
- package/dist/5992.js.LICENSE.txt +19 -0
- package/dist/6003.js +10 -0
- package/dist/6046.js +29 -0
- package/dist/6089.js +2355 -0
- package/dist/6107.js +10 -0
- package/dist/6247.js +20 -0
- package/dist/6270.js +487 -0
- package/dist/6329.js +32 -0
- package/dist/6330.js +30 -0
- package/dist/6499.js +7 -0
- package/dist/6535.js +71 -0
- package/dist/6588.js +382 -0
- package/dist/6706.js +16 -0
- package/dist/6825.js +7 -0
- package/dist/6882.js +1562 -0
- package/dist/6914.js +30 -0
- package/dist/7021.js +13 -0
- package/dist/7366.js +83 -0
- package/dist/7373.js +25 -0
- package/dist/7541.js +25 -0
- package/dist/7564.js +10 -0
- package/dist/7642.js +20 -0
- package/dist/7725.js +10 -0
- package/dist/7871.js +38 -0
- package/dist/8052.js +352 -0
- package/dist/8106.js +238 -0
- package/dist/8171.js +346 -0
- package/dist/8225.js +21 -0
- package/dist/8272.js +333 -0
- package/dist/8527.js +58 -0
- package/dist/8724.js +10 -0
- package/dist/8750.js +1920 -0
- package/dist/8758.js +43 -0
- package/dist/880.js +149 -0
- package/dist/8935.js +8 -0
- package/dist/8960.js +22 -0
- package/dist/8971.js +40 -0
- package/dist/8979.js +10 -0
- package/dist/8996.js +71 -0
- package/dist/904.js +121 -0
- package/dist/9048.js +52 -0
- package/dist/9087.js +256 -0
- package/dist/9189.js +158 -0
- package/dist/9255.js +136 -0
- package/dist/9352.js +148 -0
- package/dist/951.js +22 -0
- package/dist/9635.js +22 -0
- package/dist/9829.js +4 -0
- package/dist/9863.js +8 -0
- package/dist/Accordion/index.d.ts +569 -12
- package/dist/Accordion/index.js +423 -8
- package/dist/AlertDialog/index.d.ts +1417 -18
- package/dist/AlertDialog/index.js +34 -14
- package/dist/Autocomplete/index.d.ts +1861 -38
- package/dist/Autocomplete/index.js +98 -24
- package/dist/Avatar/index.d.ts +129 -7
- package/dist/Avatar/index.js +149 -6
- package/dist/Badge/index.css +44 -0
- package/dist/Badge/index.d.ts +22 -0
- package/dist/Badge/index.js +23 -0
- package/dist/Breadcrumbs/index.d.ts +960 -7
- package/dist/Breadcrumbs/index.js +5 -5
- package/dist/Button/index.d.ts +88 -6
- package/dist/Button/index.js +27 -3
- package/dist/Checkbox/index.d.ts +425 -5
- package/dist/Checkbox/index.js +45 -5
- package/dist/CheckboxGroup/index.d.ts +318 -3
- package/dist/CheckboxGroup/index.js +166 -3
- package/dist/Collapsible/index.d.ts +377 -7
- package/dist/Collapsible/index.js +160 -6
- package/dist/Combobox/index.d.ts +1984 -48
- package/dist/Combobox/index.js +352 -29
- package/dist/ContextMenu/index.d.ts +2340 -36
- package/dist/ContextMenu/index.js +197 -22
- package/dist/Dialog/index.d.ts +1355 -18
- package/dist/Dialog/index.js +16 -14
- package/dist/Drawer/index.d.ts +1653 -18
- package/dist/Drawer/index.js +2797 -20
- package/dist/Field/index.d.ts +655 -15
- package/dist/Field/index.js +677 -10
- package/dist/Fieldset/index.d.ts +94 -5
- package/dist/Fieldset/index.js +68 -5
- package/dist/Form/index.d.ts +331 -2
- package/dist/Form/index.js +106 -3
- package/dist/Input/index.d.ts +692 -3
- package/dist/Input/index.js +10 -3
- package/dist/Menu/index.d.ts +2301 -36
- package/dist/Menu/index.js +365 -26
- package/dist/Menubar/index.d.ts +2301 -3
- package/dist/Menubar/index.js +105 -3
- package/dist/Meter/index.d.ts +175 -11
- package/dist/Meter/index.js +129 -9
- package/dist/NavigationMenu/index.d.ts +978 -28
- package/dist/NavigationMenu/index.js +1034 -17
- package/dist/NumberField/index.d.ts +612 -15
- package/dist/NumberField/index.js +1409 -11
- package/dist/Popover/index.d.ts +1655 -20
- package/dist/Popover/index.js +792 -17
- package/dist/PreviewCard/index.d.ts +1523 -14
- package/dist/PreviewCard/index.js +679 -14
- package/dist/Progress/index.d.ts +183 -11
- package/dist/Progress/index.js +181 -9
- package/dist/Radio/index.d.ts +185 -6
- package/dist/Radio/index.js +253 -6
- package/dist/RadioGroup/index.d.ts +341 -2
- package/dist/RadioGroup/index.js +154 -3
- package/dist/ScrollArea/index.d.ts +265 -13
- package/dist/ScrollArea/index.js +892 -10
- package/dist/Select/index.d.ts +1493 -38
- package/dist/Select/index.js +1824 -23
- package/dist/Separator/index.d.ts +80 -6
- package/dist/Separator/index.js +3 -3
- package/dist/Slider/index.d.ts +678 -16
- package/dist/Slider/index.js +1199 -11
- package/dist/Switch/index.d.ts +393 -5
- package/dist/Switch/index.js +208 -6
- package/dist/Tabs/index.d.ts +523 -12
- package/dist/Tabs/index.js +685 -9
- package/dist/Toggle/index.d.ts +305 -2
- package/dist/Toggle/index.js +76 -3
- package/dist/ToggleGroup/index.d.ts +316 -2
- package/dist/ToggleGroup/index.js +102 -3
- package/dist/Toolbar/index.d.ts +282 -13
- package/dist/Toolbar/index.js +230 -9
- package/dist/Tooltip/index.d.ts +1572 -14
- package/dist/Tooltip/index.js +965 -14
- package/dist/index.d.ts +12758 -646
- package/dist/index.js +1 -0
- package/dist/rslib-runtime.js +18 -0
- package/package.json +3 -3
package/dist/RadioGroup/index.js
CHANGED
|
@@ -1,13 +1,164 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
3
2
|
import clsx from "clsx";
|
|
3
|
+
import { useLabelableContext, useFieldRootContext, fieldValidityMapping } from "../1477.js";
|
|
4
|
+
import { useFormContext } from "../5085.js";
|
|
5
|
+
import { useFieldsetRootContext } from "../353.js";
|
|
6
|
+
import { useBaseUiId } from "../6046.js";
|
|
7
|
+
import { useControlled } from "../8527.js";
|
|
8
|
+
import { useStableCallback } from "../7541.js";
|
|
9
|
+
import { useRegisterFieldControl } from "../4281.js";
|
|
10
|
+
import { useValueChanged } from "../2801.js";
|
|
11
|
+
import { contains } from "../4549.js";
|
|
12
|
+
import { RadioGroupContext } from "../1279.js";
|
|
13
|
+
import { CompositeRoot } from "../9087.js";
|
|
4
14
|
import * as __rspack_external_react from "react";
|
|
15
|
+
const MODIFIER_KEYS = [
|
|
16
|
+
"Shift"
|
|
17
|
+
];
|
|
18
|
+
const RadioGroup_RadioGroup = /*#__PURE__*/ __rspack_external_react.forwardRef(function(componentProps, forwardedRef) {
|
|
19
|
+
const { render, className, disabled: disabledProp, readOnly, required, onValueChange: onValueChangeProp, value: externalValue, defaultValue, form, name: nameProp, inputRef: inputRefProp, id: idProp, style, ...elementProps } = componentProps;
|
|
20
|
+
const { setTouched: setFieldTouched, setFocused, shouldValidateOnChange, validationMode, name: fieldName, disabled: fieldDisabled, state: fieldState, validation, setDirty, setFilled, validityData } = useFieldRootContext();
|
|
21
|
+
const { labelId } = useLabelableContext();
|
|
22
|
+
const { clearErrors } = useFormContext();
|
|
23
|
+
const fieldsetContext = useFieldsetRootContext(true);
|
|
24
|
+
const disabled = fieldDisabled || disabledProp;
|
|
25
|
+
const name = fieldName ?? nameProp;
|
|
26
|
+
const id = useBaseUiId(idProp);
|
|
27
|
+
const [checkedValue, setCheckedValueUnwrapped] = useControlled({
|
|
28
|
+
controlled: externalValue,
|
|
29
|
+
default: defaultValue,
|
|
30
|
+
name: 'RadioGroup',
|
|
31
|
+
state: 'value'
|
|
32
|
+
});
|
|
33
|
+
const [touched, setTouched] = __rspack_external_react.useState(false);
|
|
34
|
+
const setCheckedValue = useStableCallback((value, eventDetails)=>{
|
|
35
|
+
onValueChangeProp?.(value, eventDetails);
|
|
36
|
+
if (eventDetails.isCanceled) return;
|
|
37
|
+
setCheckedValueUnwrapped(value);
|
|
38
|
+
});
|
|
39
|
+
const controlRef = __rspack_external_react.useRef(null);
|
|
40
|
+
const groupInputRef = __rspack_external_react.useRef(null);
|
|
41
|
+
const firstEnabledInputRef = __rspack_external_react.useRef(null);
|
|
42
|
+
function setInputRef(hiddenInput) {
|
|
43
|
+
let cleanup;
|
|
44
|
+
if (inputRefProp) if ('function' == typeof inputRefProp) cleanup = inputRefProp(hiddenInput);
|
|
45
|
+
else inputRefProp.current = hiddenInput;
|
|
46
|
+
groupInputRef.current = hiddenInput;
|
|
47
|
+
validation.inputRef.current = hiddenInput;
|
|
48
|
+
return cleanup;
|
|
49
|
+
}
|
|
50
|
+
const registerControlRef = useStableCallback((element, isDisabled = false)=>{
|
|
51
|
+
if (!element) return;
|
|
52
|
+
if (isDisabled) {
|
|
53
|
+
if (controlRef.current === element) controlRef.current = null;
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (null == controlRef.current) controlRef.current = element;
|
|
57
|
+
});
|
|
58
|
+
const registerInputRef = useStableCallback((input)=>{
|
|
59
|
+
if (!input || input.disabled) return;
|
|
60
|
+
if (!firstEnabledInputRef.current) firstEnabledInputRef.current = input;
|
|
61
|
+
const currentInput = groupInputRef.current;
|
|
62
|
+
if (input.checked || null == currentInput || currentInput.disabled) return setInputRef(input);
|
|
63
|
+
});
|
|
64
|
+
useRegisterFieldControl(controlRef, id, checkedValue ?? null);
|
|
65
|
+
useValueChanged(checkedValue, ()=>{
|
|
66
|
+
clearErrors(name);
|
|
67
|
+
setDirty(checkedValue !== validityData.initialValue);
|
|
68
|
+
setFilled(null != checkedValue);
|
|
69
|
+
if (shouldValidateOnChange()) validation.commit(checkedValue);
|
|
70
|
+
else validation.commit(checkedValue, true);
|
|
71
|
+
const fallbackInput = firstEnabledInputRef.current;
|
|
72
|
+
if (null == checkedValue && fallbackInput && !fallbackInput.disabled) setInputRef(fallbackInput);
|
|
73
|
+
});
|
|
74
|
+
const ariaLabelledby = elementProps['aria-labelledby'] ?? labelId ?? fieldsetContext?.legendId;
|
|
75
|
+
const state = {
|
|
76
|
+
...fieldState,
|
|
77
|
+
disabled: disabled ?? false,
|
|
78
|
+
required: required ?? false,
|
|
79
|
+
readOnly: readOnly ?? false
|
|
80
|
+
};
|
|
81
|
+
const contextValue = __rspack_external_react.useMemo(()=>({
|
|
82
|
+
...fieldState,
|
|
83
|
+
checkedValue,
|
|
84
|
+
disabled,
|
|
85
|
+
form,
|
|
86
|
+
validation,
|
|
87
|
+
name,
|
|
88
|
+
readOnly,
|
|
89
|
+
registerControlRef,
|
|
90
|
+
registerInputRef,
|
|
91
|
+
required,
|
|
92
|
+
setCheckedValue,
|
|
93
|
+
setTouched,
|
|
94
|
+
touched
|
|
95
|
+
}), [
|
|
96
|
+
checkedValue,
|
|
97
|
+
disabled,
|
|
98
|
+
form,
|
|
99
|
+
validation,
|
|
100
|
+
fieldState,
|
|
101
|
+
name,
|
|
102
|
+
readOnly,
|
|
103
|
+
registerControlRef,
|
|
104
|
+
registerInputRef,
|
|
105
|
+
required,
|
|
106
|
+
setCheckedValue,
|
|
107
|
+
setTouched,
|
|
108
|
+
touched
|
|
109
|
+
]);
|
|
110
|
+
const defaultProps = {
|
|
111
|
+
role: 'radiogroup',
|
|
112
|
+
'aria-required': required || void 0,
|
|
113
|
+
'aria-disabled': disabled || void 0,
|
|
114
|
+
'aria-readonly': readOnly || void 0,
|
|
115
|
+
'aria-labelledby': ariaLabelledby,
|
|
116
|
+
onFocus () {
|
|
117
|
+
setFocused(true);
|
|
118
|
+
},
|
|
119
|
+
onBlur (event) {
|
|
120
|
+
if (!contains(event.currentTarget, event.relatedTarget)) {
|
|
121
|
+
setFieldTouched(true);
|
|
122
|
+
setFocused(false);
|
|
123
|
+
if ('onBlur' === validationMode) validation.commit(checkedValue);
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
onKeyDownCapture (event) {
|
|
127
|
+
if (event.key.startsWith('Arrow')) {
|
|
128
|
+
setFieldTouched(true);
|
|
129
|
+
setTouched(true);
|
|
130
|
+
setFocused(true);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
return /*#__PURE__*/ jsx(RadioGroupContext.Provider, {
|
|
135
|
+
value: contextValue,
|
|
136
|
+
children: /*#__PURE__*/ jsx(CompositeRoot, {
|
|
137
|
+
render: render,
|
|
138
|
+
className: className,
|
|
139
|
+
style: style,
|
|
140
|
+
state: state,
|
|
141
|
+
props: [
|
|
142
|
+
defaultProps,
|
|
143
|
+
validation.getValidationProps,
|
|
144
|
+
elementProps
|
|
145
|
+
],
|
|
146
|
+
refs: [
|
|
147
|
+
forwardedRef
|
|
148
|
+
],
|
|
149
|
+
stateAttributesMapping: fieldValidityMapping,
|
|
150
|
+
enableHomeAndEndKeys: false,
|
|
151
|
+
modifierKeys: MODIFIER_KEYS
|
|
152
|
+
})
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
if ("production" !== process.env.NODE_ENV) RadioGroup_RadioGroup.displayName = "RadioGroup";
|
|
5
156
|
const RadioGroup_module = {
|
|
6
157
|
root: "root-kKvIZ_"
|
|
7
158
|
};
|
|
8
|
-
const
|
|
159
|
+
const RadioGroup_RadioGroup_RadioGroup = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(RadioGroup_RadioGroup, {
|
|
9
160
|
ref: ref,
|
|
10
161
|
className: clsx(RadioGroup_module.root, className),
|
|
11
162
|
...props
|
|
12
163
|
}));
|
|
13
|
-
export {
|
|
164
|
+
export { RadioGroup_RadioGroup_RadioGroup as RadioGroup };
|
|
@@ -1,33 +1,285 @@
|
|
|
1
1
|
import * as React_2 from 'react';
|
|
2
|
-
import { ScrollAreaContentProps } from '@base-ui/react/scroll-area';
|
|
3
|
-
import { ScrollAreaCornerProps } from '@base-ui/react/scroll-area';
|
|
4
|
-
import { ScrollAreaRootProps } from '@base-ui/react/scroll-area';
|
|
5
|
-
import { ScrollAreaScrollbarProps } from '@base-ui/react/scroll-area';
|
|
6
|
-
import { ScrollAreaThumbProps } from '@base-ui/react/scroll-area';
|
|
7
|
-
import { ScrollAreaViewportProps } from '@base-ui/react/scroll-area';
|
|
2
|
+
import { ScrollAreaContentProps as ScrollAreaContentProps_2 } from '@base-ui/react/scroll-area';
|
|
3
|
+
import { ScrollAreaCornerProps as ScrollAreaCornerProps_2 } from '@base-ui/react/scroll-area';
|
|
4
|
+
import { ScrollAreaRootProps as ScrollAreaRootProps_2 } from '@base-ui/react/scroll-area';
|
|
5
|
+
import { ScrollAreaScrollbarProps as ScrollAreaScrollbarProps_2 } from '@base-ui/react/scroll-area';
|
|
6
|
+
import { ScrollAreaThumbProps as ScrollAreaThumbProps_2 } from '@base-ui/react/scroll-area';
|
|
7
|
+
import { ScrollAreaViewportProps as ScrollAreaViewportProps_2 } from '@base-ui/react/scroll-area';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Props shared by all Base UI components.
|
|
11
|
+
* Contains `className` (string or callback taking the component's state as an argument) and `render` (function to customize rendering).
|
|
12
|
+
*/
|
|
13
|
+
declare type BaseUIComponentProps<ElementType extends React_2.ElementType, State, RenderFunctionProps = HTMLProps> = Omit<WithBaseUIEvent<React_2.ComponentPropsWithRef<ElementType>>, 'className' | 'color' | 'defaultValue' | 'defaultChecked' | 'style'> & {
|
|
14
|
+
/**
|
|
15
|
+
* CSS class applied to the element, or a function that
|
|
16
|
+
* returns a class based on the component's state.
|
|
17
|
+
*/
|
|
18
|
+
className?: string | ((state: State) => string | undefined) | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Allows you to replace the component's HTML element
|
|
21
|
+
* with a different tag, or compose it with another component.
|
|
22
|
+
*
|
|
23
|
+
* Accepts a `ReactElement` or a function that returns the element to render.
|
|
24
|
+
*/
|
|
25
|
+
render?: React_2.ReactElement | ComponentRenderFn<RenderFunctionProps, State> | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Style applied to the element, or a function that
|
|
28
|
+
* returns a style object based on the component's state.
|
|
29
|
+
*/
|
|
30
|
+
style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E & {
|
|
34
|
+
preventBaseUIHandler: () => void;
|
|
35
|
+
readonly baseUIHandlerPrevented?: boolean | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 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.
|
|
40
|
+
*
|
|
41
|
+
* @template Props Props to be spread on the rendered element.
|
|
42
|
+
* @template State Component's internal state.
|
|
43
|
+
*/
|
|
44
|
+
declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
|
|
45
|
+
|
|
46
|
+
export declare type Coords = typeof DEFAULT_COORDS;
|
|
47
|
+
|
|
48
|
+
declare const DEFAULT_COORDS: {
|
|
49
|
+
x: number;
|
|
50
|
+
y: number;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
declare const DEFAULT_HIDDEN_STATE: {
|
|
54
|
+
x: boolean;
|
|
55
|
+
y: boolean;
|
|
56
|
+
corner: boolean;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
declare const DEFAULT_OVERFLOW_EDGES: {
|
|
60
|
+
xStart: boolean;
|
|
61
|
+
xEnd: boolean;
|
|
62
|
+
yStart: boolean;
|
|
63
|
+
yEnd: boolean;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
declare const DEFAULT_SIZE: {
|
|
67
|
+
width: number;
|
|
68
|
+
height: number;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export declare type HiddenState = typeof DEFAULT_HIDDEN_STATE;
|
|
72
|
+
|
|
73
|
+
declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
|
|
74
|
+
ref?: React_2.Ref<T> | undefined;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export declare type OverflowEdges = typeof DEFAULT_OVERFLOW_EDGES;
|
|
8
78
|
|
|
9
79
|
export declare const ScrollArea: {
|
|
10
|
-
Root: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
80
|
+
Root: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ScrollAreaRootProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
11
81
|
className?: string | undefined;
|
|
12
82
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
Viewport: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
83
|
+
Viewport: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ScrollAreaViewportProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
14
84
|
className?: string | undefined;
|
|
15
85
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
Scrollbar: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
86
|
+
Scrollbar: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ScrollAreaScrollbarProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
17
87
|
className?: string | undefined;
|
|
18
88
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
Content: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
89
|
+
Content: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ScrollAreaContentProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
20
90
|
className?: string | undefined;
|
|
21
91
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
22
|
-
Thumb: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
92
|
+
Thumb: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ScrollAreaThumbProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
23
93
|
className?: string | undefined;
|
|
24
94
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
25
|
-
Corner: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
95
|
+
Corner: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ScrollAreaCornerProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
26
96
|
className?: string | undefined;
|
|
27
97
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
28
98
|
};
|
|
29
99
|
|
|
100
|
+
/**
|
|
101
|
+
* A container for the content of the scroll area.
|
|
102
|
+
* Renders a `<div>` element.
|
|
103
|
+
*
|
|
104
|
+
* Documentation: [Base UI Scroll Area](https://base-ui.com/react/components/scroll-area)
|
|
105
|
+
*/
|
|
106
|
+
export declare const ScrollAreaContent: React_2.ForwardRefExoticComponent<Omit<ScrollAreaContentProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
107
|
+
|
|
108
|
+
export declare namespace ScrollAreaContent {
|
|
109
|
+
export type State = ScrollAreaContentState;
|
|
110
|
+
export type Props = ScrollAreaContentProps;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export declare interface ScrollAreaContentProps extends BaseUIComponentProps<'div', ScrollAreaContentState> {}
|
|
114
|
+
|
|
115
|
+
export declare interface ScrollAreaContentState extends ScrollAreaRootState {}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* A small rectangular area that appears at the intersection of horizontal and vertical scrollbars.
|
|
119
|
+
* Renders a `<div>` element.
|
|
120
|
+
*
|
|
121
|
+
* Documentation: [Base UI Scroll Area](https://base-ui.com/react/components/scroll-area)
|
|
122
|
+
*/
|
|
123
|
+
export declare const ScrollAreaCorner: React_2.ForwardRefExoticComponent<Omit<ScrollAreaCornerProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
124
|
+
|
|
125
|
+
export declare namespace ScrollAreaCorner {
|
|
126
|
+
export type State = ScrollAreaCornerState;
|
|
127
|
+
export type Props = ScrollAreaCornerProps;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export declare interface ScrollAreaCornerProps extends BaseUIComponentProps<'div', ScrollAreaCornerState> {}
|
|
131
|
+
|
|
132
|
+
export declare interface ScrollAreaCornerState {}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Groups all parts of the scroll area.
|
|
136
|
+
* Renders a `<div>` element.
|
|
137
|
+
*
|
|
138
|
+
* Documentation: [Base UI Scroll Area](https://base-ui.com/react/components/scroll-area)
|
|
139
|
+
*/
|
|
140
|
+
export declare const ScrollAreaRoot: React_2.ForwardRefExoticComponent<Omit<ScrollAreaRootProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
141
|
+
|
|
142
|
+
export declare namespace ScrollAreaRoot {
|
|
143
|
+
export type State = ScrollAreaRootState;
|
|
144
|
+
export type Props = ScrollAreaRootProps;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export declare interface ScrollAreaRootProps extends BaseUIComponentProps<'div', ScrollAreaRootState> {
|
|
148
|
+
/**
|
|
149
|
+
* The threshold in pixels that must be passed before the overflow edge attributes are applied.
|
|
150
|
+
* Accepts a single number for all edges or an object to configure them individually.
|
|
151
|
+
* @default 0
|
|
152
|
+
*/
|
|
153
|
+
overflowEdgeThreshold?: number | Partial<{
|
|
154
|
+
xStart: number;
|
|
155
|
+
xEnd: number;
|
|
156
|
+
yStart: number;
|
|
157
|
+
yEnd: number;
|
|
158
|
+
}> | undefined;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export declare interface ScrollAreaRootState {
|
|
162
|
+
/**
|
|
163
|
+
* Whether the scroll area is being scrolled.
|
|
164
|
+
*/
|
|
165
|
+
scrolling: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Whether horizontal overflow is present.
|
|
168
|
+
*/
|
|
169
|
+
hasOverflowX: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Whether vertical overflow is present.
|
|
172
|
+
*/
|
|
173
|
+
hasOverflowY: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Whether there is overflow on the inline start side for the horizontal axis.
|
|
176
|
+
*/
|
|
177
|
+
overflowXStart: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Whether there is overflow on the inline end side for the horizontal axis.
|
|
180
|
+
*/
|
|
181
|
+
overflowXEnd: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Whether there is overflow on the block start side.
|
|
184
|
+
*/
|
|
185
|
+
overflowYStart: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Whether there is overflow on the block end side.
|
|
188
|
+
*/
|
|
189
|
+
overflowYEnd: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Whether the scrollbar corner is hidden.
|
|
192
|
+
*/
|
|
193
|
+
cornerHidden: boolean;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* A vertical or horizontal scrollbar for the scroll area.
|
|
198
|
+
* Renders a `<div>` element.
|
|
199
|
+
*
|
|
200
|
+
* Documentation: [Base UI Scroll Area](https://base-ui.com/react/components/scroll-area)
|
|
201
|
+
*/
|
|
202
|
+
export declare const ScrollAreaScrollbar: React_2.ForwardRefExoticComponent<Omit<ScrollAreaScrollbarProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
203
|
+
|
|
204
|
+
export declare namespace ScrollAreaScrollbar {
|
|
205
|
+
export type State = ScrollAreaScrollbarState;
|
|
206
|
+
export type Props = ScrollAreaScrollbarProps;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export declare interface ScrollAreaScrollbarProps extends BaseUIComponentProps<'div', ScrollAreaScrollbarState> {
|
|
210
|
+
/**
|
|
211
|
+
* Whether the scrollbar controls vertical or horizontal scroll.
|
|
212
|
+
* @default 'vertical'
|
|
213
|
+
*/
|
|
214
|
+
orientation?: 'vertical' | 'horizontal' | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* Whether to keep the HTML element in the DOM when the viewport isn't scrollable.
|
|
217
|
+
* @default false
|
|
218
|
+
*/
|
|
219
|
+
keepMounted?: boolean | undefined;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export declare interface ScrollAreaScrollbarState extends ScrollAreaRootState {
|
|
223
|
+
/**
|
|
224
|
+
* Whether the scroll area is being hovered.
|
|
225
|
+
*/
|
|
226
|
+
hovering: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* Whether the scroll area is being scrolled.
|
|
229
|
+
*/
|
|
230
|
+
scrolling: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* The orientation of the scrollbar.
|
|
233
|
+
*/
|
|
234
|
+
orientation: 'vertical' | 'horizontal';
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* The draggable part of the scrollbar that indicates the current scroll position.
|
|
239
|
+
* Renders a `<div>` element.
|
|
240
|
+
*
|
|
241
|
+
* Documentation: [Base UI Scroll Area](https://base-ui.com/react/components/scroll-area)
|
|
242
|
+
*/
|
|
243
|
+
export declare const ScrollAreaThumb: React_2.ForwardRefExoticComponent<Omit<ScrollAreaThumbProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
244
|
+
|
|
245
|
+
export declare namespace ScrollAreaThumb {
|
|
246
|
+
export type State = ScrollAreaThumbState;
|
|
247
|
+
export type Props = ScrollAreaThumbProps;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export declare interface ScrollAreaThumbProps extends BaseUIComponentProps<'div', ScrollAreaThumbState> {}
|
|
251
|
+
|
|
252
|
+
export declare interface ScrollAreaThumbState {
|
|
253
|
+
/**
|
|
254
|
+
* The component orientation.
|
|
255
|
+
*/
|
|
256
|
+
orientation?: 'horizontal' | 'vertical' | undefined;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* The actual scrollable container of the scroll area.
|
|
261
|
+
* Renders a `<div>` element.
|
|
262
|
+
*
|
|
263
|
+
* Documentation: [Base UI Scroll Area](https://base-ui.com/react/components/scroll-area)
|
|
264
|
+
*/
|
|
265
|
+
export declare const ScrollAreaViewport: React_2.ForwardRefExoticComponent<Omit<ScrollAreaViewportProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
266
|
+
|
|
267
|
+
export declare namespace ScrollAreaViewport {
|
|
268
|
+
export type Props = ScrollAreaViewportProps;
|
|
269
|
+
export type State = ScrollAreaViewportState;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export declare interface ScrollAreaViewportProps extends BaseUIComponentProps<'div', ScrollAreaViewportState> {}
|
|
273
|
+
|
|
274
|
+
export declare interface ScrollAreaViewportState extends ScrollAreaRootState {}
|
|
275
|
+
|
|
276
|
+
export declare type Size = typeof DEFAULT_SIZE;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Adds a `preventBaseUIHandler` method to all event handlers.
|
|
280
|
+
*/
|
|
281
|
+
declare type WithBaseUIEvent<T> = { [K in keyof T]: WithPreventBaseUIHandler<T[K]> };
|
|
30
282
|
|
|
31
|
-
|
|
283
|
+
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;
|
|
32
284
|
|
|
33
285
|
export { }
|