@sanity/ui 3.4.4 → 3.5.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/_chunks/{theme.cjs → getScopedTheme.cjs} +3534 -3597
- package/dist/_chunks/getScopedTheme.cjs.map +1 -0
- package/dist/_chunks/{theme.js → getScopedTheme.js} +3477 -3525
- package/dist/_chunks/getScopedTheme.js.map +1 -0
- package/dist/_chunks/{tabList.cjs → portalProvider.cjs} +1561 -1554
- package/dist/_chunks/portalProvider.cjs.map +1 -0
- package/dist/_chunks/{useTheme.d.ts → portalProvider.d.cts} +307 -647
- package/dist/_chunks/portalProvider.d.cts.map +1 -0
- package/dist/_chunks/{useTheme.d.cts → portalProvider.d.ts} +307 -647
- package/dist/_chunks/portalProvider.d.ts.map +1 -0
- package/dist/_chunks/{tabList.js → portalProvider.js} +1359 -1352
- package/dist/_chunks/portalProvider.js.map +1 -0
- package/dist/_chunks/{theme.d.ts → rgba.d.cts} +178 -453
- package/dist/_chunks/rgba.d.cts.map +1 -0
- package/dist/_chunks/{theme.d.cts → rgba.d.ts} +178 -453
- package/dist/_chunks/rgba.d.ts.map +1 -0
- package/dist/_visual-editing.cjs +3 -2
- package/dist/_visual-editing.d.cts +1 -1
- package/dist/_visual-editing.d.ts +1 -1
- package/dist/_visual-editing.js +2 -1
- package/dist/index.cjs +2802 -2798
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +549 -203
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +549 -203
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2781 -2777
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs +53 -2
- package/dist/theme.cjs.map +1 -0
- package/dist/theme.d.cts +278 -2
- package/dist/theme.d.cts.map +1 -0
- package/dist/theme.d.ts +278 -2
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +52 -1
- package/dist/theme.js.map +1 -0
- package/package.json +2 -3
- package/dist/_chunks/tabList.cjs.map +0 -1
- package/dist/_chunks/tabList.js.map +0 -1
- package/dist/_chunks/theme.cjs.map +0 -1
- package/dist/_chunks/theme.d.cts.map +0 -1
- package/dist/_chunks/theme.d.ts.map +0 -1
- package/dist/_chunks/theme.js.map +0 -1
- package/dist/_chunks/useTheme.d.cts.map +0 -1
- package/dist/_chunks/useTheme.d.ts.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,154 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as
|
|
3
|
-
import { ElementType as ElementType$1, HTMLProps, ReactNode, Ref } from "react";
|
|
4
|
-
/**
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
type DialogPosition = 'absolute' | 'fixed';
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
interface CheckboxProps {
|
|
12
|
-
indeterminate?: boolean;
|
|
13
|
-
customValidity?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Checkboxes allow the user to select one or more items from a set.
|
|
17
|
-
*
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").HTMLProps<HTMLInputElement>, "as" | "type"> & CheckboxProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
21
|
-
/**
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
interface ResponsiveWidthStyleProps {
|
|
25
|
-
$width: (number | 'auto')[];
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
interface BoundaryElementProviderProps {
|
|
31
|
-
children: React.ReactNode;
|
|
32
|
-
element: HTMLElement | null;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @public
|
|
36
|
-
*/
|
|
37
|
-
declare function BoundaryElementProvider(props: BoundaryElementProviderProps): React.JSX.Element;
|
|
38
|
-
/**
|
|
39
|
-
* @public
|
|
40
|
-
*/
|
|
41
|
-
interface BoundaryElementContextValue {
|
|
42
|
-
version: 0.0;
|
|
43
|
-
element: HTMLElement | null;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* @public
|
|
47
|
-
*/
|
|
48
|
-
declare function useBoundaryElement(): BoundaryElementContextValue;
|
|
49
|
-
/**
|
|
50
|
-
* @internal
|
|
51
|
-
* @deprecated this component will be removed in the next major release
|
|
52
|
-
*/
|
|
53
|
-
declare function ConditionalWrapper({ children, condition, wrapper }: {
|
|
54
|
-
children: React.ReactNode;
|
|
55
|
-
condition: boolean;
|
|
56
|
-
wrapper: (children: React.ReactNode) => React.ReactNode;
|
|
57
|
-
}): React.ReactNode;
|
|
58
|
-
/**
|
|
59
|
-
* DO NOT USE IN PRODUCTION.
|
|
60
|
-
* @beta
|
|
61
|
-
*/
|
|
62
|
-
interface MediaQueryProps {
|
|
63
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements;
|
|
64
|
-
media?: number[];
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* DO NOT USE IN PRODUCTION.
|
|
68
|
-
* @beta
|
|
69
|
-
*/
|
|
70
|
-
declare const ElementQuery: import("react").ForwardRefExoticComponent<Omit<MediaQueryProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "media">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
71
|
-
/** @public */
|
|
72
|
-
interface LayerContextValue {
|
|
73
|
-
version: 0.0;
|
|
74
|
-
isTopLayer: boolean;
|
|
75
|
-
level?: number;
|
|
76
|
-
registerChild: (childLevel?: number) => () => void;
|
|
77
|
-
size: number;
|
|
78
|
-
zIndex: number;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* @public
|
|
82
|
-
*/
|
|
83
|
-
declare function useLayer(): LayerContextValue;
|
|
84
|
-
/**
|
|
85
|
-
* @public
|
|
86
|
-
*/
|
|
87
|
-
interface PortalContextValue {
|
|
88
|
-
version: 0.0;
|
|
89
|
-
boundaryElement: HTMLElement | null;
|
|
90
|
-
element: HTMLElement | null;
|
|
91
|
-
elements?: Record<string, HTMLElement | null | undefined>;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* @public
|
|
95
|
-
*/
|
|
96
|
-
declare function usePortal(): PortalContextValue;
|
|
97
|
-
/**
|
|
98
|
-
* @public
|
|
99
|
-
*/
|
|
100
|
-
interface SrOnlyProps {
|
|
101
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements;
|
|
102
|
-
children?: React.ReactNode;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* @public
|
|
106
|
-
*/
|
|
107
|
-
declare const SrOnly: import("react").ForwardRefExoticComponent<Omit<SrOnlyProps & Omit<import("react").HTMLProps<HTMLDivElement>, "aria-hidden" | "as">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
108
|
-
/**
|
|
109
|
-
* @public
|
|
110
|
-
*/
|
|
111
|
-
interface RadioProps {
|
|
112
|
-
customValidity?: string;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* The `Radio` component allows the user to select one option from a set.
|
|
116
|
-
*
|
|
117
|
-
* @public
|
|
118
|
-
*/
|
|
119
|
-
declare const Radio: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").HTMLProps<HTMLInputElement>, "as" | "type"> & RadioProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
120
|
-
/**
|
|
121
|
-
* @public
|
|
122
|
-
*/
|
|
123
|
-
interface SwitchProps {
|
|
124
|
-
indeterminate?: boolean;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* The `Switch` component allows the user to toggle a setting on and off.
|
|
128
|
-
*
|
|
129
|
-
* Extends all properties of an `<input type="checkbox" />` element, except type.
|
|
130
|
-
*
|
|
131
|
-
* @public
|
|
132
|
-
*/
|
|
133
|
-
declare const Switch: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").HTMLProps<HTMLInputElement>, "as" | "type"> & SwitchProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
134
|
-
/**
|
|
135
|
-
* @beta
|
|
136
|
-
*/
|
|
137
|
-
interface TooltipDelayGroupContextValue {
|
|
138
|
-
setIsGroupActive: (nextState: React.SetStateAction<boolean>, delay?: number | undefined) => void;
|
|
139
|
-
setOpenTooltipId: (nextId: string | null, delay?: number | undefined) => void;
|
|
140
|
-
openDelay: number;
|
|
141
|
-
closeDelay: number;
|
|
142
|
-
openTooltipId: string | null;
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* @beta
|
|
146
|
-
*/
|
|
147
|
-
declare const TooltipDelayGroupContext: import("react").Context<TooltipDelayGroupContextValue | null>;
|
|
148
|
-
/**
|
|
149
|
-
* @beta
|
|
150
|
-
*/
|
|
151
|
-
declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue | null;
|
|
1
|
+
import { A as ThemeColorMutedTone, At as ThemeColorSchemeKey$1, B as ThemeColorBase, C as ThemeColorSpotKey, D as ThemeColorSelectableState, Dt as ThemeColorCardToneKey, E as ThemeColorSelectable, F as ThemeColorCardState, H as ThemeColorToneKey, I as ThemeColorButton, L as ThemeColorButtonState, M as ThemeColorInputState, Mt as ThemeColorStateToneKey, N as ThemeColorInputStates, O as ThemeColorSelectableStates, P as ThemeColorCard, R as ThemeColorButtonStates, S as ThemeColorSpot, T as ThemeColorSolidTone, U as ThemeColorGenericState, V as ThemeColorName, W as ThemeAvatar, b as ThemeColorScheme, d as ThemeColorBuilderOpts, g as Theme$1, j as ThemeColorInput, k as ThemeColorMuted, m as RootTheme$1, pt as CSSObject, u as PartialThemeColorBuilderOpts, v as ThemeInput, w as ThemeColorSolid, wt as ThemeColorAvatarColorKey, x as ThemeColorSchemes, xt as ThemeFontWeightKey$1, y as ThemeColor, z as ThemeColorButtonTones } from "./_chunks/rgba.cjs";
|
|
2
|
+
import { $ as BoxOwnProps, $t as GridAutoRows, A as FlexOwnProps, An as createColorTheme, At as TagType, B as containsOrEqualsElement, Bt as ResponsiveMarginProps, C as StackProps, Cn as ThemeFontKey, Ct as MenuDivider, D as GridOwnProps, Dn as ThemeFonts, Dt as ElementType, E as Grid, En as ThemeFontWeightKey, Et as ComponentType, F as Button, Fn as rgbToHex, Ft as ResponsiveBoxProps, G as isHTMLSelectElement, Gt as GridItemColumn, H as isHTMLButtonElement, Ht as ResponsiveRadiusProps, I as ButtonOwnProps, In as rgbToHsl, It as ResponsiveFlexItemProps, J as TabListProps, Jt as GridItemRow, K as isHTMLTextAreaElement, Kt as GridItemColumnEnd, L as ButtonProps, Ln as rgba, Lt as ResponsiveFlexProps, M as Card, Mn as hslToRgb, Mt as MenuProps, N as CardOwnProps, Nn as multiply, Nt as Delay, O as GridProps, On as ThemeLayer, Ot as EmptyProps, P as CardProps, Pn as parseColor, Pt as ResponsiveBorderProps, Q as Box, Qt as GridAutoFlow, R as usePrefersDark, Rn as screen, Rt as ResponsiveGridItemProps, S as StackOwnProps, Sn as ThemeFont, St as CardTone, T as SpinnerProps, Tn as ThemeFontWeight, Tt as Assign, U as isHTMLElement, Ut as ResponsiveShadowProps, V as isHTMLAnchorElement, Vt as ResponsivePaddingProps, W as isHTMLInputElement, Wt as ResponsiveWidthProps, X as InlineOwnProps, Xt as GridItemRowStart, Y as Inline, Yt as GridItemRowEnd, Z as InlineProps, Zt as GridAutoCols, _ as Text, _n as Styles, _t as PopoverWidth, a as LayerProvider, an as BoxDisplay, at as ButtonTone, b as TextAlign, bn as ThemeColorSchemeKey, bt as PopoverMargins, c as useTheme_v2, cn as BoxSizing, ct as MenuItemOwnProps, d as Tooltip, dn as Radius, dt as MenuGroupOwnProps, en as FlexAlign, et as BoxProps, f as TooltipProps, fn as BaseTheme, ft as MenuGroupProps, g as TextInputType, gn as RootTheme, gt as PopoverUpdateCallback, h as TextInputProps, hn as RGB, ht as PopoverProps, i as PortalProps, in as FlexWrap, it as ButtonTextAlign, j as FlexProps, jn as hexToRgb, jt as Menu, k as Flex, kn as ThemeShadow, kt as Props, l as ThemeProvider, ln as Hotkeys, lt as MenuItemProps, m as TextInputClearButtonProps, mn as HSL, mt as Popover, n as PortalProviderProps, nn as FlexJustify, nt as TabProps, o as LayerProviderProps, on as BoxHeight, ot as ButtonWidth, p as TextInput, pn as BoxShadow, pt as SelectableTone, q as TabList, qt as GridItemColumnStart, r as Portal, rn as FlexValue, rt as ButtonMode, s as useTheme, sn as BoxOverflow, st as MenuItem, t as PortalProvider, tn as FlexDirection, tt as Tab, u as ThemeProviderProps, un as HotkeysProps, ut as MenuGroup, v as TextOwnProps, vn as Theme, vt as Layer, w as Spinner, wn as ThemeFontSize, wt as MenuDividerProps, x as Stack, xn as ThemeColorSyntax, xt as Placement, y as TextProps, yn as ThemeColorButtonModeKey, yt as LayerProps, z as _isEnterToClickElement, zn as studioTheme, zt as ResponsiveGridProps } from "./_chunks/portalProvider.cjs";
|
|
3
|
+
import { Component, ElementType as ElementType$1, HTMLProps, PropsWithChildren, ReactNode, Ref } from "react";
|
|
152
4
|
/**
|
|
153
5
|
* @public
|
|
154
6
|
*/
|
|
@@ -301,6 +153,10 @@ interface BreadcrumbsProps {
|
|
|
301
153
|
* @beta
|
|
302
154
|
*/
|
|
303
155
|
declare const Breadcrumbs: import("react").ForwardRefExoticComponent<BreadcrumbsProps & Omit<import("react").HTMLProps<HTMLOListElement>, "as" | "ref" | "type"> & import("react").RefAttributes<HTMLOListElement>>;
|
|
156
|
+
/**
|
|
157
|
+
* @public
|
|
158
|
+
*/
|
|
159
|
+
type DialogPosition = 'absolute' | 'fixed';
|
|
304
160
|
/**
|
|
305
161
|
* @public
|
|
306
162
|
*/
|
|
@@ -592,6 +448,12 @@ interface TreeItemProps {
|
|
|
592
448
|
* Allows passing a custom element type to the link component
|
|
593
449
|
*/
|
|
594
450
|
linkAs?: ElementType;
|
|
451
|
+
/**
|
|
452
|
+
* Additional props for the link element that is rendered when `href` is set — e.g. `next/link`'s
|
|
453
|
+
* `prefetch` together with `linkAs={Link}`. Props controlled by `TreeItem` itself (`href`,
|
|
454
|
+
* `role`, `tabIndex`, `aria-expanded` and the ref) take precedence.
|
|
455
|
+
*/
|
|
456
|
+
linkProps?: React.HTMLProps<HTMLAnchorElement> & Record<string, unknown>;
|
|
595
457
|
padding?: number | number[];
|
|
596
458
|
gap?: number | number[];
|
|
597
459
|
/**
|
|
@@ -778,7 +640,7 @@ declare function useElementSize(element: HTMLElement | null): ElementSize | null
|
|
|
778
640
|
* +useImperativeHandle(forwardedRef, () => ref.current)
|
|
779
641
|
* ```
|
|
780
642
|
*/
|
|
781
|
-
declare function useForwardedRef<T>(ref: React.ForwardedRef<T>): React.
|
|
643
|
+
declare function useForwardedRef<T>(ref: React.ForwardedRef<T>): React.RefObject<T | null>;
|
|
782
644
|
/**
|
|
783
645
|
* Adds global keydown event listener to the window.
|
|
784
646
|
*
|
|
@@ -824,106 +686,590 @@ declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boo
|
|
|
824
686
|
*/
|
|
825
687
|
declare const _ResizeObserver: typeof ResizeObserver;
|
|
826
688
|
/**
|
|
827
|
-
* @
|
|
689
|
+
* @public
|
|
828
690
|
*/
|
|
829
|
-
|
|
691
|
+
type AvatarPosition = 'top' | 'bottom' | 'inside';
|
|
830
692
|
/**
|
|
831
693
|
* @public
|
|
832
694
|
*/
|
|
833
|
-
|
|
695
|
+
type AvatarSize = 0 | 1 | 2 | 3;
|
|
834
696
|
/**
|
|
835
|
-
* @
|
|
697
|
+
* @public
|
|
836
698
|
*/
|
|
837
|
-
|
|
699
|
+
type AvatarStatus = 'online' | 'editing' | 'inactive';
|
|
838
700
|
/**
|
|
839
|
-
* @
|
|
701
|
+
* @public
|
|
840
702
|
*/
|
|
841
|
-
|
|
703
|
+
interface AvatarOwnProps {
|
|
704
|
+
/** @beta */
|
|
705
|
+
__unstable_hideInnerStroke?: boolean;
|
|
706
|
+
animateArrowFrom?: AvatarPosition;
|
|
707
|
+
arrowPosition?: AvatarPosition;
|
|
708
|
+
color?: ThemeColorAvatarColorKey;
|
|
709
|
+
initials?: string;
|
|
710
|
+
onImageLoadError?: (event: Error) => void;
|
|
711
|
+
size?: AvatarSize | AvatarSize[];
|
|
712
|
+
src?: string;
|
|
713
|
+
/**
|
|
714
|
+
* The status of the entity this Avatar represents.
|
|
715
|
+
* @alpha
|
|
716
|
+
*/
|
|
717
|
+
status?: AvatarStatus;
|
|
718
|
+
title?: string;
|
|
719
|
+
}
|
|
842
720
|
/**
|
|
843
|
-
* @
|
|
721
|
+
* @public
|
|
844
722
|
*/
|
|
845
|
-
|
|
723
|
+
type AvatarProps<E extends ElementType = 'div'> = Props<AvatarOwnProps, E>;
|
|
846
724
|
/**
|
|
847
|
-
*
|
|
725
|
+
* Avatars are used to represent people and other agents (e.g. bots).
|
|
726
|
+
*
|
|
727
|
+
* @public
|
|
848
728
|
*/
|
|
849
|
-
|
|
850
|
-
theme: Theme$1;
|
|
851
|
-
}
|
|
729
|
+
declare const Avatar: <E extends ElementType = 'div'>(props: AvatarProps<E>) => React.JSX.Element;
|
|
852
730
|
/**
|
|
853
|
-
* @
|
|
731
|
+
* @public
|
|
854
732
|
*/
|
|
855
|
-
interface
|
|
856
|
-
|
|
733
|
+
interface AvatarCounterProps {
|
|
734
|
+
count: number;
|
|
735
|
+
size?: AvatarSize | AvatarSize[];
|
|
736
|
+
/** @deprecated No longer supported. */
|
|
737
|
+
tone?: 'navbar';
|
|
857
738
|
}
|
|
858
739
|
/**
|
|
859
|
-
* @
|
|
740
|
+
* @public
|
|
860
741
|
*/
|
|
861
|
-
|
|
862
|
-
|
|
742
|
+
declare const AvatarCounter: import("react").ForwardRefExoticComponent<AvatarCounterProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
743
|
+
/**
|
|
744
|
+
* @public
|
|
745
|
+
*/
|
|
746
|
+
interface AvatarStackProps {
|
|
747
|
+
children: React.ReactNode;
|
|
748
|
+
maxLength?: number;
|
|
749
|
+
size?: AvatarSize | AvatarSize[];
|
|
750
|
+
/** @deprecated No longer supported. */
|
|
751
|
+
tone?: 'navbar';
|
|
863
752
|
}
|
|
753
|
+
/**
|
|
754
|
+
* @public
|
|
755
|
+
*/
|
|
756
|
+
declare const AvatarStack: import("react").ForwardRefExoticComponent<AvatarStackProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
864
757
|
/**
|
|
865
758
|
* @internal
|
|
866
759
|
*/
|
|
867
|
-
interface
|
|
868
|
-
$
|
|
760
|
+
interface AvatarRootStyleProps {
|
|
761
|
+
$color: ThemeColorAvatarColorKey;
|
|
869
762
|
}
|
|
870
763
|
/**
|
|
871
764
|
* @internal
|
|
872
765
|
*/
|
|
873
|
-
interface
|
|
874
|
-
$
|
|
875
|
-
$muted?: boolean;
|
|
766
|
+
interface ResponsiveAvatarSizeStyleProps {
|
|
767
|
+
$size: AvatarSize[];
|
|
876
768
|
}
|
|
877
769
|
/**
|
|
878
|
-
*
|
|
879
|
-
* @
|
|
770
|
+
* @public
|
|
771
|
+
* @deprecated No longer used
|
|
880
772
|
*/
|
|
881
|
-
|
|
773
|
+
type BadgeMode = 'default' | 'outline';
|
|
882
774
|
/**
|
|
883
|
-
*
|
|
884
|
-
* @internal
|
|
775
|
+
* @public
|
|
885
776
|
*/
|
|
886
|
-
|
|
777
|
+
type BadgeTone = ThemeColorStateToneKey;
|
|
887
778
|
/**
|
|
888
|
-
*
|
|
889
|
-
* @internal
|
|
779
|
+
* @public
|
|
890
780
|
*/
|
|
891
|
-
|
|
781
|
+
interface BadgeOwnProps extends BoxOwnProps, ResponsiveRadiusProps {
|
|
782
|
+
fontSize?: number | number[];
|
|
783
|
+
/** @deprecated No longer used. */
|
|
784
|
+
mode?: BadgeMode;
|
|
785
|
+
tone?: BadgeTone;
|
|
786
|
+
}
|
|
892
787
|
/**
|
|
893
|
-
*
|
|
894
|
-
* @internal
|
|
788
|
+
* @public
|
|
895
789
|
*/
|
|
896
|
-
|
|
790
|
+
type BadgeProps<E extends ElementType = 'div'> = Props<BadgeOwnProps, E>;
|
|
791
|
+
/**
|
|
792
|
+
* Badges are used to tag resources.
|
|
793
|
+
*
|
|
794
|
+
* @public
|
|
795
|
+
*/
|
|
796
|
+
declare const Badge: <E extends ElementType = 'div'>(props: BadgeProps<E>) => React.JSX.Element;
|
|
897
797
|
/**
|
|
898
|
-
* Get responsive CSS for the `text` font style.
|
|
899
798
|
* @internal
|
|
900
799
|
*/
|
|
901
|
-
|
|
800
|
+
interface CardStyleProps {
|
|
801
|
+
$checkered: boolean;
|
|
802
|
+
$focusRing: boolean;
|
|
803
|
+
$muted: boolean;
|
|
804
|
+
$tone: ThemeColorToneKey;
|
|
805
|
+
}
|
|
902
806
|
/**
|
|
903
807
|
* @public
|
|
904
808
|
*/
|
|
905
|
-
interface
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
tone?: ThemeColorCardToneKey;
|
|
809
|
+
interface CheckboxProps {
|
|
810
|
+
indeterminate?: boolean;
|
|
811
|
+
customValidity?: string;
|
|
909
812
|
}
|
|
910
813
|
/**
|
|
814
|
+
* Checkboxes allow the user to select one or more items from a set.
|
|
815
|
+
*
|
|
911
816
|
* @public
|
|
912
817
|
*/
|
|
913
|
-
declare
|
|
818
|
+
declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").HTMLProps<HTMLInputElement>, "as" | "type"> & CheckboxProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
914
819
|
/**
|
|
915
820
|
* @public
|
|
916
821
|
*/
|
|
917
|
-
interface
|
|
918
|
-
/**
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
tone: ThemeColorCardToneKey;
|
|
822
|
+
interface CodeOwnProps {
|
|
823
|
+
/** Define the language to use for syntax highlighting. */
|
|
824
|
+
language?: string;
|
|
825
|
+
size?: number | number[];
|
|
826
|
+
weight?: string;
|
|
923
827
|
}
|
|
924
828
|
/**
|
|
925
829
|
* @public
|
|
926
830
|
*/
|
|
927
|
-
|
|
928
|
-
|
|
831
|
+
type CodeProps<E extends ElementType = 'pre'> = Props<CodeOwnProps, E>;
|
|
832
|
+
/**
|
|
833
|
+
* @public
|
|
834
|
+
*/
|
|
835
|
+
declare const Code: <E extends ElementType = 'pre'>(props: CodeProps<E>) => React.JSX.Element;
|
|
836
|
+
/**
|
|
837
|
+
* @public
|
|
838
|
+
*/
|
|
839
|
+
interface ContainerOwnProps extends BoxOwnProps, ResponsiveWidthProps {}
|
|
840
|
+
/**
|
|
841
|
+
* @public
|
|
842
|
+
*/
|
|
843
|
+
type ContainerProps<E extends ElementType = 'div'> = Props<ContainerOwnProps, E>;
|
|
844
|
+
/**
|
|
845
|
+
* The `Container` component wraps content layout in a defined set of widths.
|
|
846
|
+
*
|
|
847
|
+
* @public
|
|
848
|
+
*/
|
|
849
|
+
declare const Container: <E extends ElementType = 'div'>(props: ContainerProps<E>) => React.JSX.Element;
|
|
850
|
+
/**
|
|
851
|
+
* @internal
|
|
852
|
+
*/
|
|
853
|
+
interface ResponsiveWidthStyleProps {
|
|
854
|
+
$width: (number | 'auto')[];
|
|
855
|
+
}
|
|
856
|
+
/**
|
|
857
|
+
* @public
|
|
858
|
+
*/
|
|
859
|
+
interface HeadingOwnProps {
|
|
860
|
+
accent?: boolean;
|
|
861
|
+
align?: TextAlign | TextAlign[];
|
|
862
|
+
muted?: boolean;
|
|
863
|
+
size?: number | number[];
|
|
864
|
+
/**
|
|
865
|
+
* Controls how overflowing text is treated.
|
|
866
|
+
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
867
|
+
* @beta
|
|
868
|
+
*/
|
|
869
|
+
textOverflow?: 'ellipsis';
|
|
870
|
+
weight?: ThemeFontWeightKey$1;
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* @public
|
|
874
|
+
*/
|
|
875
|
+
type HeadingProps<E extends ElementType = 'div'> = Props<HeadingOwnProps, E>;
|
|
876
|
+
/**
|
|
877
|
+
* Typographic headings.
|
|
878
|
+
*
|
|
879
|
+
* @public
|
|
880
|
+
*/
|
|
881
|
+
declare const Heading: <E extends ElementType = 'div'>(props: HeadingProps<E>) => React.JSX.Element;
|
|
882
|
+
/**
|
|
883
|
+
* @public
|
|
884
|
+
*/
|
|
885
|
+
interface KBDOwnProps {
|
|
886
|
+
fontSize?: number | number[];
|
|
887
|
+
padding?: number | number[];
|
|
888
|
+
radius?: Radius | Radius[];
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* @public
|
|
892
|
+
*/
|
|
893
|
+
type KBDProps<E extends ElementType = 'kbd'> = Props<KBDOwnProps, E>;
|
|
894
|
+
/**
|
|
895
|
+
* Used to define some text as keyboard input.
|
|
896
|
+
*
|
|
897
|
+
* @public
|
|
898
|
+
*/
|
|
899
|
+
declare const KBD: <E extends ElementType = 'kbd'>(props: KBDProps<E>) => React.JSX.Element;
|
|
900
|
+
/**
|
|
901
|
+
* @public
|
|
902
|
+
*/
|
|
903
|
+
interface LabelOwnProps {
|
|
904
|
+
accent?: boolean;
|
|
905
|
+
align?: TextAlign | TextAlign[];
|
|
906
|
+
muted?: boolean;
|
|
907
|
+
size?: number | number[];
|
|
908
|
+
/**
|
|
909
|
+
* Controls how overflowing text is treated.
|
|
910
|
+
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
911
|
+
* @beta
|
|
912
|
+
*/
|
|
913
|
+
textOverflow?: 'ellipsis';
|
|
914
|
+
weight?: ThemeFontWeightKey$1;
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* @public
|
|
918
|
+
*/
|
|
919
|
+
type LabelProps<E extends ElementType = 'div'> = Props<LabelOwnProps, E>;
|
|
920
|
+
/**
|
|
921
|
+
* Typographic labels.
|
|
922
|
+
*
|
|
923
|
+
* @public
|
|
924
|
+
*/
|
|
925
|
+
declare const Label: <E extends ElementType = 'div'>(props: LabelProps<E>) => React.JSX.Element;
|
|
926
|
+
/**
|
|
927
|
+
* @public
|
|
928
|
+
*/
|
|
929
|
+
interface RadioProps {
|
|
930
|
+
customValidity?: string;
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* The `Radio` component allows the user to select one option from a set.
|
|
934
|
+
*
|
|
935
|
+
* @public
|
|
936
|
+
*/
|
|
937
|
+
declare const Radio: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").HTMLProps<HTMLInputElement>, "as" | "type"> & RadioProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
938
|
+
/**
|
|
939
|
+
* @public
|
|
940
|
+
*/
|
|
941
|
+
interface SelectProps {
|
|
942
|
+
fontSize?: number | number[];
|
|
943
|
+
gap?: number | number[];
|
|
944
|
+
padding?: number | number[];
|
|
945
|
+
radius?: Radius | Radius[];
|
|
946
|
+
/**
|
|
947
|
+
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
948
|
+
*/
|
|
949
|
+
space?: number | number[];
|
|
950
|
+
customValidity?: string;
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* The `Select` component provides control of options.
|
|
954
|
+
*
|
|
955
|
+
* @public
|
|
956
|
+
*/
|
|
957
|
+
declare const Select: import("react").ForwardRefExoticComponent<Omit<SelectProps & Omit<import("react").HTMLProps<HTMLSelectElement>, "as">, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
958
|
+
/**
|
|
959
|
+
* @public
|
|
960
|
+
*/
|
|
961
|
+
interface SwitchProps {
|
|
962
|
+
indeterminate?: boolean;
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* The `Switch` component allows the user to toggle a setting on and off.
|
|
966
|
+
*
|
|
967
|
+
* Extends all properties of an `<input type="checkbox" />` element, except type.
|
|
968
|
+
*
|
|
969
|
+
* @public
|
|
970
|
+
*/
|
|
971
|
+
declare const Switch: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").HTMLProps<HTMLInputElement>, "as" | "type"> & SwitchProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
972
|
+
/**
|
|
973
|
+
* @public
|
|
974
|
+
*/
|
|
975
|
+
interface TextAreaProps extends ResponsiveRadiusProps {
|
|
976
|
+
/**
|
|
977
|
+
* @beta
|
|
978
|
+
*/
|
|
979
|
+
__unstable_disableFocusRing?: boolean;
|
|
980
|
+
border?: boolean;
|
|
981
|
+
customValidity?: string;
|
|
982
|
+
fontSize?: number | number[];
|
|
983
|
+
padding?: number | number[];
|
|
984
|
+
weight?: ThemeFontWeightKey$1;
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* A multiline text input.
|
|
988
|
+
*
|
|
989
|
+
* @public
|
|
990
|
+
*/
|
|
991
|
+
declare const TextArea: import("react").ForwardRefExoticComponent<Omit<TextAreaProps & Omit<import("react").HTMLProps<HTMLTextAreaElement>, "as">, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
992
|
+
/**
|
|
993
|
+
* @beta
|
|
994
|
+
*/
|
|
995
|
+
interface TooltipDelayGroupContextValue {
|
|
996
|
+
setIsGroupActive: (nextState: React.SetStateAction<boolean>, delay?: number | undefined) => void;
|
|
997
|
+
setOpenTooltipId: (nextId: string | null, delay?: number | undefined) => void;
|
|
998
|
+
openDelay: number;
|
|
999
|
+
closeDelay: number;
|
|
1000
|
+
openTooltipId: string | null;
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* @beta
|
|
1004
|
+
*/
|
|
1005
|
+
declare const TooltipDelayGroupContext: import("react").Context<TooltipDelayGroupContextValue | null>;
|
|
1006
|
+
/**
|
|
1007
|
+
* @public
|
|
1008
|
+
* */
|
|
1009
|
+
interface TooltipDelayGroupProviderProps {
|
|
1010
|
+
children?: React.ReactNode;
|
|
1011
|
+
/**
|
|
1012
|
+
* Handles the delays to open or close a tooltip inside a group
|
|
1013
|
+
*
|
|
1014
|
+
* If only a `number` is passed, it will be used for both opening and closing.
|
|
1015
|
+
*
|
|
1016
|
+
* If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
|
|
1017
|
+
*
|
|
1018
|
+
* @public
|
|
1019
|
+
*/
|
|
1020
|
+
delay: Delay;
|
|
1021
|
+
}
|
|
1022
|
+
/**
|
|
1023
|
+
* @public
|
|
1024
|
+
* Provides context for a group of tooltip elements that should share a delay
|
|
1025
|
+
* which temporarily becomes 1 ms after the first floating element of the group opens.
|
|
1026
|
+
*/
|
|
1027
|
+
declare function TooltipDelayGroupProvider(props: TooltipDelayGroupProviderProps): React.JSX.Element;
|
|
1028
|
+
/**
|
|
1029
|
+
* @beta
|
|
1030
|
+
*/
|
|
1031
|
+
declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue | null;
|
|
1032
|
+
/**
|
|
1033
|
+
* @internal
|
|
1034
|
+
*/
|
|
1035
|
+
interface ThemeProps {
|
|
1036
|
+
theme: Theme$1;
|
|
1037
|
+
}
|
|
1038
|
+
/**
|
|
1039
|
+
* @internal
|
|
1040
|
+
*/
|
|
1041
|
+
interface ResponsiveFontSizeStyleProps {
|
|
1042
|
+
$size: number[];
|
|
1043
|
+
}
|
|
1044
|
+
/**
|
|
1045
|
+
* @internal
|
|
1046
|
+
*/
|
|
1047
|
+
interface FontWeightStyleProps {
|
|
1048
|
+
$weight?: ThemeFontWeightKey$1;
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* @internal
|
|
1052
|
+
*/
|
|
1053
|
+
interface ResponsiveTextAlignStyleProps {
|
|
1054
|
+
$align: TextAlign[];
|
|
1055
|
+
}
|
|
1056
|
+
/**
|
|
1057
|
+
* @internal
|
|
1058
|
+
*/
|
|
1059
|
+
interface ResponsiveFontStyleProps extends FontWeightStyleProps, ResponsiveFontSizeStyleProps, ResponsiveTextAlignStyleProps {
|
|
1060
|
+
$accent?: boolean;
|
|
1061
|
+
$muted?: boolean;
|
|
1062
|
+
}
|
|
1063
|
+
/**
|
|
1064
|
+
* Get responsive CSS for the `code` font style.
|
|
1065
|
+
* @internal
|
|
1066
|
+
*/
|
|
1067
|
+
declare function responsiveCodeFontStyle(props: FontWeightStyleProps & ResponsiveFontSizeStyleProps & ThemeProps): CSSObject[];
|
|
1068
|
+
/**
|
|
1069
|
+
* Get responsive CSS for the `heading` font style.
|
|
1070
|
+
* @internal
|
|
1071
|
+
*/
|
|
1072
|
+
declare function responsiveHeadingFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
|
|
1073
|
+
/**
|
|
1074
|
+
* Get responsive CSS for the `label` font style.
|
|
1075
|
+
* @internal
|
|
1076
|
+
*/
|
|
1077
|
+
declare function responsiveLabelFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
|
|
1078
|
+
/**
|
|
1079
|
+
* Get responsive text align styles.
|
|
1080
|
+
* @internal
|
|
1081
|
+
*/
|
|
1082
|
+
declare function responsiveTextAlignStyle(props: ResponsiveTextAlignStyleProps & ThemeProps): CSSObject[];
|
|
1083
|
+
/**
|
|
1084
|
+
* Get responsive CSS for the `text` font style.
|
|
1085
|
+
* @internal
|
|
1086
|
+
*/
|
|
1087
|
+
declare function responsiveTextFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
|
|
1088
|
+
/**
|
|
1089
|
+
* @internal
|
|
1090
|
+
*/
|
|
1091
|
+
declare function _fillCSSObject(keys: string[], value: string | number | CSSObject): CSSObject;
|
|
1092
|
+
/**
|
|
1093
|
+
* @public
|
|
1094
|
+
*/
|
|
1095
|
+
declare function rem(pixelValue: number): string | 0;
|
|
1096
|
+
/**
|
|
1097
|
+
* @internal
|
|
1098
|
+
*/
|
|
1099
|
+
declare function _responsive<T>(media: number[], values: T[], callback: (value: T, index: number, array: T[]) => CSSObject): CSSObject[];
|
|
1100
|
+
/**
|
|
1101
|
+
* @internal
|
|
1102
|
+
*/
|
|
1103
|
+
declare function _getArrayProp<T = number>(val: T | T[] | undefined, defaultVal?: T[]): T[];
|
|
1104
|
+
/**
|
|
1105
|
+
* @internal
|
|
1106
|
+
*/
|
|
1107
|
+
declare function _getResponsiveSpace(theme: Theme$1, props: string[], spaceIndexes?: number[]): CSSObject[] | null;
|
|
1108
|
+
/**
|
|
1109
|
+
* @public
|
|
1110
|
+
*/
|
|
1111
|
+
interface ThemeColorProviderProps {
|
|
1112
|
+
children?: React.ReactNode;
|
|
1113
|
+
scheme?: ThemeColorSchemeKey$1;
|
|
1114
|
+
tone?: ThemeColorCardToneKey;
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* @public
|
|
1118
|
+
*/
|
|
1119
|
+
declare function ThemeColorProvider(props: ThemeColorProviderProps): React.JSX.Element;
|
|
1120
|
+
/**
|
|
1121
|
+
* @public
|
|
1122
|
+
*/
|
|
1123
|
+
interface ThemeContextValue {
|
|
1124
|
+
/** @deprecated No longer used */
|
|
1125
|
+
version: 0.0;
|
|
1126
|
+
scheme: ThemeColorSchemeKey$1;
|
|
1127
|
+
theme: RootTheme$1;
|
|
1128
|
+
tone: ThemeColorCardToneKey;
|
|
1129
|
+
}
|
|
1130
|
+
/**
|
|
1131
|
+
* @public
|
|
1132
|
+
*/
|
|
1133
|
+
declare function useRootTheme(): ThemeContextValue;
|
|
1134
|
+
/** @internal */
|
|
1135
|
+
declare const Arrow: import("react").ForwardRefExoticComponent<Omit<{
|
|
1136
|
+
width: number;
|
|
1137
|
+
height: number;
|
|
1138
|
+
radius?: number;
|
|
1139
|
+
} & Omit<HTMLProps<HTMLDivElement>, "height" | "width">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
1140
|
+
/**
|
|
1141
|
+
* @public
|
|
1142
|
+
*/
|
|
1143
|
+
interface BoundaryElementProviderProps {
|
|
1144
|
+
children: React.ReactNode;
|
|
1145
|
+
element: HTMLElement | null;
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* @public
|
|
1149
|
+
*/
|
|
1150
|
+
declare function BoundaryElementProvider(props: BoundaryElementProviderProps): React.JSX.Element;
|
|
1151
|
+
/**
|
|
1152
|
+
* @public
|
|
1153
|
+
*/
|
|
1154
|
+
interface BoundaryElementContextValue {
|
|
1155
|
+
version: 0.0;
|
|
1156
|
+
element: HTMLElement | null;
|
|
1157
|
+
}
|
|
1158
|
+
/**
|
|
1159
|
+
* @public
|
|
1160
|
+
*/
|
|
1161
|
+
declare function useBoundaryElement(): BoundaryElementContextValue;
|
|
1162
|
+
/**
|
|
1163
|
+
* @internal
|
|
1164
|
+
* @deprecated this component will be removed in the next major release
|
|
1165
|
+
*/
|
|
1166
|
+
declare function ConditionalWrapper({ children, condition, wrapper }: {
|
|
1167
|
+
children: React.ReactNode;
|
|
1168
|
+
condition: boolean;
|
|
1169
|
+
wrapper: (children: React.ReactNode) => React.ReactNode;
|
|
1170
|
+
}): React.ReactNode;
|
|
1171
|
+
/**
|
|
1172
|
+
* DO NOT USE IN PRODUCTION.
|
|
1173
|
+
* @beta
|
|
1174
|
+
*/
|
|
1175
|
+
interface MediaQueryProps {
|
|
1176
|
+
as?: React.ElementType | keyof React.JSX.IntrinsicElements;
|
|
1177
|
+
media?: number[];
|
|
1178
|
+
}
|
|
1179
|
+
/**
|
|
1180
|
+
* DO NOT USE IN PRODUCTION.
|
|
1181
|
+
* @beta
|
|
1182
|
+
*/
|
|
1183
|
+
declare const ElementQuery: import("react").ForwardRefExoticComponent<Omit<MediaQueryProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "media">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
1184
|
+
/**
|
|
1185
|
+
* DO NOT USE IN PRODUCTION
|
|
1186
|
+
* @beta
|
|
1187
|
+
*/
|
|
1188
|
+
type ErrorBoundaryProps = PropsWithChildren<{
|
|
1189
|
+
onCatch: (params: {
|
|
1190
|
+
error: Error;
|
|
1191
|
+
info: React.ErrorInfo;
|
|
1192
|
+
}) => void;
|
|
1193
|
+
}>;
|
|
1194
|
+
/**
|
|
1195
|
+
* DO NOT USE IN PRODUCTION
|
|
1196
|
+
* @beta
|
|
1197
|
+
*/
|
|
1198
|
+
interface ErrorBoundaryState {
|
|
1199
|
+
error: Error | null;
|
|
1200
|
+
}
|
|
1201
|
+
/**
|
|
1202
|
+
* DO NOT USE IN PRODUCTION
|
|
1203
|
+
* @beta
|
|
1204
|
+
*/
|
|
1205
|
+
declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
1206
|
+
state: ErrorBoundaryState;
|
|
1207
|
+
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
1208
|
+
componentDidCatch(error: Error, info: React.ErrorInfo): void;
|
|
1209
|
+
render(): React.ReactNode;
|
|
1210
|
+
}
|
|
1211
|
+
/** @public */
|
|
1212
|
+
interface LayerContextValue {
|
|
1213
|
+
version: 0.0;
|
|
1214
|
+
isTopLayer: boolean;
|
|
1215
|
+
level?: number;
|
|
1216
|
+
registerChild: (childLevel?: number) => () => void;
|
|
1217
|
+
size: number;
|
|
1218
|
+
zIndex: number;
|
|
1219
|
+
}
|
|
1220
|
+
/**
|
|
1221
|
+
* @public
|
|
1222
|
+
*/
|
|
1223
|
+
declare function useLayer(): LayerContextValue;
|
|
1224
|
+
/**
|
|
1225
|
+
* @public
|
|
1226
|
+
*/
|
|
1227
|
+
interface PortalContextValue {
|
|
1228
|
+
version: 0.0;
|
|
1229
|
+
boundaryElement: HTMLElement | null;
|
|
1230
|
+
element: HTMLElement | null;
|
|
1231
|
+
elements?: Record<string, HTMLElement | null | undefined>;
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* @public
|
|
1235
|
+
*/
|
|
1236
|
+
declare function usePortal(): PortalContextValue;
|
|
1237
|
+
/**
|
|
1238
|
+
* @public
|
|
1239
|
+
*/
|
|
1240
|
+
interface SrOnlyProps {
|
|
1241
|
+
as?: React.ElementType | keyof React.JSX.IntrinsicElements;
|
|
1242
|
+
children?: React.ReactNode;
|
|
1243
|
+
}
|
|
1244
|
+
/**
|
|
1245
|
+
* @public
|
|
1246
|
+
*/
|
|
1247
|
+
declare const SrOnly: import("react").ForwardRefExoticComponent<Omit<SrOnlyProps & Omit<import("react").HTMLProps<HTMLDivElement>, "aria-hidden" | "as">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
1248
|
+
/**
|
|
1249
|
+
* @beta
|
|
1250
|
+
*/
|
|
1251
|
+
interface VirtualListChangeOpts {
|
|
1252
|
+
fromIndex: number;
|
|
1253
|
+
gap: number;
|
|
1254
|
+
itemHeight: number;
|
|
1255
|
+
scrollHeight: number;
|
|
1256
|
+
scrollTop: number;
|
|
1257
|
+
toIndex: number;
|
|
1258
|
+
}
|
|
1259
|
+
/**
|
|
1260
|
+
* @beta
|
|
1261
|
+
*/
|
|
1262
|
+
interface VirtualListProps<Item = any> {
|
|
1263
|
+
as?: React.ElementType | keyof React.JSX.IntrinsicElements;
|
|
1264
|
+
gap?: number;
|
|
1265
|
+
getItemKey?: (item: Item, itemIndex: number) => string;
|
|
1266
|
+
items?: Item[];
|
|
1267
|
+
onChange?: (opts: VirtualListChangeOpts) => void;
|
|
1268
|
+
renderItem?: (item: Item) => React.ReactNode;
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* @beta
|
|
1272
|
+
*/
|
|
1273
|
+
declare const VirtualList: import("react").ForwardRefExoticComponent<VirtualListProps<any> & StackOwnProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "children" | "onChange" | "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
1274
|
+
export { type ArrayPropPrimitive, Arrow, type Assign, Autocomplete, type AutocompleteInputChangeMsg, type AutocompleteInputFoocusMsg, type AutocompleteMsg, type AutocompleteOpenButtonProps, type AutocompleteProps, type AutocompleteRootBlurMsg, type AutocompleteRootClearMsg, type AutocompleteRootEscapeMsg, type AutocompleteRootOpenMsg, type AutocompleteRootSetActiveValueMsg, type AutocompleteRootSetListFocusedMsg, type AutocompleteState, type AutocompleteValueChangeMsg, Avatar, AvatarCounter, type AvatarCounterProps, type AvatarOwnProps, type AvatarPosition, type AvatarProps, type AvatarRootStyleProps, type AvatarSize, AvatarStack, type AvatarStackProps, type AvatarStatus, Badge, type BadgeMode, type BadgeOwnProps, type BadgeProps, type BadgeTone, type BaseAutocompleteOption, type BaseTheme, type BoundaryElementContextValue, BoundaryElementProvider, type BoundaryElementProviderProps, Box, type BoxDisplay, type BoxHeight, type BoxOverflow, type BoxOwnProps, type BoxProps, type BoxShadow, type BoxSizing, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonMode, type ButtonOwnProps, type ButtonProps, type ButtonTextAlign, type ButtonTone, type ButtonWidth, Card, type CardOwnProps, type CardProps, type CardStyleProps, type CardTone, Checkbox, type CheckboxProps, type ClickOutsideElements, type ClickOutsideEventElements, type ClickOutsideEventListener, type ClickOutsideListener, Code, type CodeOwnProps, type CodeProps, CodeSkeleton, type CodeSkeletonProps, type ComponentType, ConditionalWrapper, Container, type ContainerOwnProps, type ContainerProps, type Delay, Dialog, DialogContext, type DialogContextValue, type DialogPosition, type DialogProps, DialogProvider, type DialogProviderProps, ElementQuery, type ElementRectValue, type ElementSize, type ElementType, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, type ErrorBoundaryState, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexOwnProps, type FlexProps, type FlexValue, type FlexWrap, type FontWeightStyleProps, Grid, type GridAutoCols, type GridAutoFlow, type GridAutoRows, type GridItemColumn, type GridItemColumnEnd, type GridItemColumnStart, type GridItemRow, type GridItemRowEnd, type GridItemRowStart, type GridOwnProps, type GridProps, type HSL, Heading, type HeadingOwnProps, type HeadingProps, HeadingSkeleton, type HeadingSkeletonProps, Hotkeys, type HotkeysProps, Inline, type InlineOwnProps, type InlineProps, KBD, type KBDOwnProps, type KBDProps, Label, type LabelOwnProps, type LabelProps, LabelSkeleton, type LabelSkeletonProps, Layer, type LayerContextValue, type LayerProps, LayerProvider, type LayerProviderProps, type MediaQueryProps, Menu, MenuButton, type MenuButtonProps, MenuDivider, type MenuDividerProps, MenuGroup, type MenuGroupOwnProps, type MenuGroupProps, MenuItem, type MenuItemOwnProps, type MenuItemProps, type MenuProps, type PartialThemeColorBuilderOpts, type Placement, Popover, type PopoverMargins, type PopoverProps, type PopoverUpdateCallback, type PopoverWidth, Portal, type PortalContextValue, type PortalProps, PortalProvider, type PortalProviderProps, type Props, type RGB, Radio, type RadioProps, type Radius, type ResponsiveAvatarSizeStyleProps, type ResponsiveBorderProps, type ResponsiveBoxProps, type ResponsiveFlexItemProps, type ResponsiveFlexProps, type ResponsiveFontSizeStyleProps, type ResponsiveFontStyleProps, type ResponsiveGridItemProps, type ResponsiveGridProps, type ResponsiveMarginProps, type ResponsivePaddingProps, type ResponsiveRadiusProps, type ResponsiveShadowProps, type ResponsiveTextAlignStyleProps, type ResponsiveWidthProps, type ResponsiveWidthStyleProps, type RootTheme, Select, type SelectProps, type SelectableTone, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, SrOnly, type SrOnlyProps, Stack, type StackOwnProps, type StackProps, type Styles, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, type TagType, Text, type TextAlign, TextArea, type TextAreaProps, TextInput, type TextInputClearButtonProps, type TextInputProps, type TextInputType, type TextOwnProps, type TextProps, TextSkeleton, type TextSkeletonProps, type Theme, type ThemeAvatar, type ThemeColor, type ThemeColorBase, type ThemeColorBuilderOpts, type ThemeColorButton, type ThemeColorButtonModeKey, type ThemeColorButtonState, type ThemeColorButtonStates, type ThemeColorButtonTones, type ThemeColorCard, type ThemeColorCardState, type ThemeColorGenericState, type ThemeColorInput, type ThemeColorInputState, type ThemeColorInputStates, type ThemeColorMuted, type ThemeColorMutedTone, type ThemeColorName, ThemeColorProvider, type ThemeColorProviderProps, type ThemeColorScheme, type ThemeColorSchemeKey, type ThemeColorSchemes, type ThemeColorSelectable, type ThemeColorSelectableState, type ThemeColorSelectableStates, type ThemeColorSolid, type ThemeColorSolidTone, type ThemeColorSpot, type ThemeColorSpotKey, type ThemeColorSyntax, type ThemeColorToneKey, type ThemeContextValue, type ThemeFont, type ThemeFontKey, type ThemeFontSize, type ThemeFontWeight, type ThemeFontWeightKey, type ThemeFonts, type ThemeInput, type ThemeLayer, type ThemeProps, ThemeProvider, type ThemeProviderProps, type ThemeShadow, Toast, type ToastContextValue, type ToastParams, type ToastProps, ToastProvider, type ToastProviderProps, Tooltip, TooltipDelayGroupContext, type TooltipDelayGroupContextValue, TooltipDelayGroupProvider, type TooltipDelayGroupProviderProps, type TooltipProps, Tree, type TreeContextValue, TreeItem, type TreeItemProps, type TreeProps, type TreeState, VirtualList, type VirtualListChangeOpts, type VirtualListProps, type _ElementSizeListener, type _ElementSizeObserver, type _ElementSizeSubscriber, type _MediaStore, _ResizeObserver, _elementSizeObserver, _fillCSSObject, _getArrayProp, _getResponsiveSpace, _hasFocus, _isEnterToClickElement, _isScrollable, _raf, _raf2, _responsive, attemptFocus, containsOrEqualsElement, createColorTheme, focusFirstDescendant, focusLastDescendant, hexToRgb, hslToRgb, isFocusable, isHTMLAnchorElement, isHTMLButtonElement, isHTMLElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, multiply, parseColor, rem, responsiveCodeFontStyle, responsiveHeadingFont, responsiveLabelFont, responsiveTextAlignStyle, responsiveTextFont, rgbToHex, rgbToHsl, rgba, screen, studioTheme, useArrayProp, useBoundaryElement, useClickOutside, useClickOutsideEvent, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMatchMedia, useMediaIndex, usePortal, usePrefersDark, usePrefersReducedMotion, useRootTheme, useTheme, useTheme_v2, useToast, useTooltipDelayGroup, useTree };
|
|
929
1275
|
//# sourceMappingURL=index.d.cts.map
|