@sanity/ui 2.9.1 → 2.10.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/index.d.mts +29 -33
- package/dist/index.d.ts +29 -33
- package/dist/index.esm.js +44 -26
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +44 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -26
- package/dist/index.mjs.map +1 -1
- package/dist/theme.d.mts +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs.map +1 -1
- package/package.json +31 -25
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +1 -1
- package/src/core/components/autocomplete/autocomplete.tsx +4 -3
- package/src/core/components/autocomplete/autocompleteOption.tsx +1 -1
- package/src/core/components/dialog/dialog.tsx +1 -1
- package/src/core/components/dialog/dialogProvider.tsx +1 -1
- package/src/core/components/menu/__workshop__/asComponent.tsx +1 -1
- package/src/core/components/menu/menu.test.tsx +0 -2
- package/src/core/components/menu/menuButton.tsx +2 -2
- package/src/core/components/menu/menuGroup.tsx +2 -2
- package/src/core/components/menu/menuItem.tsx +1 -0
- package/src/core/components/tab/tabList.tsx +2 -2
- package/src/core/components/toast/toast.test.tsx +0 -1
- package/src/core/components/toast/toast.tsx +1 -1
- package/src/core/components/toast/toastProvider.tsx +3 -2
- package/src/core/components/tree/tree.tsx +1 -1
- package/src/core/components/tree/treeGroup.tsx +1 -1
- package/src/core/components/tree/treeItem.tsx +1 -1
- package/src/core/hooks/useDelayedState.ts +1 -1
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +0 -1
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -1
- package/src/core/lib/globalScope.ts +0 -1
- package/src/core/primitives/avatar/avatar.tsx +1 -1
- package/src/core/primitives/avatar/avatarStack.tsx +1 -1
- package/src/core/primitives/badge/badge.tsx +1 -1
- package/src/core/primitives/box/box.tsx +1 -1
- package/src/core/primitives/button/button.tsx +1 -1
- package/src/core/primitives/card/__workshop__/asComponent.tsx +1 -1
- package/src/core/primitives/code/code.tsx +1 -2
- package/src/core/primitives/heading/heading.tsx +1 -1
- package/src/core/primitives/inline/inline.tsx +0 -1
- package/src/core/primitives/kbd/kbd.tsx +1 -1
- package/src/core/primitives/label/label.tsx +1 -1
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +1 -1
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +2 -2
- package/src/core/primitives/popover/popover.tsx +4 -5
- package/src/core/primitives/stack/stack.tsx +1 -1
- package/src/core/primitives/text/text.tsx +1 -1
- package/src/core/primitives/tooltip/tooltip.tsx +1 -2
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +1 -1
- package/src/core/theme/__workshop__/build/story.tsx +1 -3
- package/src/core/theme/__workshop__/debug/story.tsx +0 -2
- package/src/core/theme/theme.test.tsx +0 -1
- package/src/core/theme/themeColorProvider.tsx +1 -1
- package/src/core/theme/themeProvider.tsx +1 -1
- package/src/core/utils/arrow/arrow.tsx +1 -1
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +0 -1
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +3 -1
- package/src/core/utils/elementQuery/elementQuery.tsx +1 -1
- package/src/core/utils/layer/layer.test.tsx +0 -1
- package/src/core/utils/layer/layer.tsx +9 -1
- package/src/core/utils/layer/layerProvider.tsx +1 -1
- package/src/core/utils/portal/portal.test.tsx +0 -1
- package/src/core/utils/portal/portalProvider.tsx +1 -1
- package/src/core/utils/srOnly/srOnly.tsx +1 -1
- package/src/core/utils/virtualList/virtualList.tsx +10 -3
- package/src/theme/build/merge.ts +0 -2
- package/src/theme/system/css.ts +1 -2
- package/src/core/components/autocomplete/__workshop__/.eslintrc +0 -5
- package/src/core/components/breadcrumbs/__workshop__/.eslintrc +0 -5
- package/src/core/components/dialog/__workshop__/.eslintrc +0 -5
- package/src/core/components/hotkeys/__workshop__/.eslintrc +0 -5
- package/src/core/components/menu/__workshop__/.eslintrc +0 -5
- package/src/core/components/skeleton/__workshop__/.eslintrc +0 -5
- package/src/core/components/tab/__workshop__/.eslintrc +0 -5
- package/src/core/components/toast/__workshop__/.eslintrc +0 -5
- package/src/core/components/tree/__workshop__/.eslintrc +0 -5
- package/src/core/hooks/useElementRect/__workshop__/.eslintrc +0 -5
- package/src/core/hooks/useMediaIndex/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/avatar/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/badge/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/box/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/button/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/card/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/checkbox/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/code/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/container/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/flex/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/grid/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/heading/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/inline/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/kbd/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/label/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/popover/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/radio/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/select/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/spinner/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/stack/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/switch/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/text/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/textArea/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/textInput/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/tooltip/__workshop__/.eslintrc +0 -5
- package/src/core/theme/__workshop__/.eslintrc +0 -5
- package/src/core/utils/boundaryElement/__workshop__/.eslintrc +0 -5
- package/src/core/utils/elementQuery/__workshop__/.eslintrc +0 -5
- package/src/core/utils/layer/__workshop__/.eslintrc +0 -5
- package/src/core/utils/portal/__workshop__/.eslintrc +0 -5
- package/src/core/utils/virtualList/__workshop__/.eslintrc +0 -5
package/dist/index.d.mts
CHANGED
|
@@ -13,7 +13,7 @@ import {hslToRgb as hslToRgb_2} from '@sanity/ui/theme'
|
|
|
13
13
|
import {HTMLAttributes} from 'react'
|
|
14
14
|
import {HTMLProps} from 'react'
|
|
15
15
|
import {IStyledComponentBase} from 'styled-components/dist/types'
|
|
16
|
-
import {
|
|
16
|
+
import {JSX} from 'react'
|
|
17
17
|
import {multiply as multiply_2} from '@sanity/ui/theme'
|
|
18
18
|
import {MutableRefObject} from 'react'
|
|
19
19
|
import {NamedExoticComponent} from 'react'
|
|
@@ -130,7 +130,7 @@ export declare const Autocomplete: <Option extends BaseAutocompleteOption>(
|
|
|
130
130
|
> & {
|
|
131
131
|
ref?: Ref<HTMLInputElement>
|
|
132
132
|
},
|
|
133
|
-
) => ReactElement
|
|
133
|
+
) => ReactElement<any>
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* @internal
|
|
@@ -199,11 +199,11 @@ export declare interface AutocompleteProps<
|
|
|
199
199
|
/** @beta */
|
|
200
200
|
relatedElements?: HTMLElement[]
|
|
201
201
|
/** The callback function for rendering each option. */
|
|
202
|
-
renderOption?: (option: Option) => ReactElement
|
|
202
|
+
renderOption?: (option: Option) => ReactElement<any>
|
|
203
203
|
/** @beta */
|
|
204
204
|
renderPopover?: (
|
|
205
205
|
props: {
|
|
206
|
-
content: ReactElement | null
|
|
206
|
+
content: ReactElement<any> | null
|
|
207
207
|
hidden: boolean
|
|
208
208
|
inputElement: HTMLInputElement | null
|
|
209
209
|
onMouseEnter: () => void
|
|
@@ -427,7 +427,7 @@ export declare interface BoundaryElementContextValue {
|
|
|
427
427
|
*/
|
|
428
428
|
export declare function BoundaryElementProvider(
|
|
429
429
|
props: BoundaryElementProviderProps,
|
|
430
|
-
): React.ReactElement
|
|
430
|
+
): React.ReactElement<any>
|
|
431
431
|
|
|
432
432
|
export declare namespace BoundaryElementProvider {
|
|
433
433
|
var displayName: string
|
|
@@ -810,7 +810,7 @@ export declare interface DialogProps extends ResponsivePaddingProps, ResponsiveW
|
|
|
810
810
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
811
811
|
* @beta
|
|
812
812
|
*/
|
|
813
|
-
export declare function DialogProvider(props: DialogProviderProps): React.ReactElement
|
|
813
|
+
export declare function DialogProvider(props: DialogProviderProps): React.ReactElement<any>
|
|
814
814
|
|
|
815
815
|
export declare namespace DialogProvider {
|
|
816
816
|
var displayName: string
|
|
@@ -1304,7 +1304,7 @@ export declare interface LayerProps {
|
|
|
1304
1304
|
/**
|
|
1305
1305
|
* @public
|
|
1306
1306
|
*/
|
|
1307
|
-
export declare function LayerProvider(props: LayerProviderProps): React.ReactElement
|
|
1307
|
+
export declare function LayerProvider(props: LayerProviderProps): React.ReactElement<any>
|
|
1308
1308
|
|
|
1309
1309
|
export declare namespace LayerProvider {
|
|
1310
1310
|
var displayName: string
|
|
@@ -1366,9 +1366,9 @@ export declare interface MenuButtonProps {
|
|
|
1366
1366
|
* @deprecated Use `popover={{boundaryElement: element}}` instead.
|
|
1367
1367
|
*/
|
|
1368
1368
|
boundaryElement?: HTMLElement
|
|
1369
|
-
button: React.ReactElement
|
|
1369
|
+
button: React.ReactElement<any>
|
|
1370
1370
|
id: string
|
|
1371
|
-
menu?: React.ReactElement
|
|
1371
|
+
menu?: React.ReactElement<any>
|
|
1372
1372
|
onClose?: () => void
|
|
1373
1373
|
onOpen?: () => void
|
|
1374
1374
|
/**
|
|
@@ -1410,7 +1410,7 @@ export declare const MenuDivider: IStyledComponentBase<
|
|
|
1410
1410
|
export declare function MenuGroup(
|
|
1411
1411
|
props: Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'popover' | 'ref' | 'tabIndex'> &
|
|
1412
1412
|
MenuGroupProps,
|
|
1413
|
-
): React.ReactElement
|
|
1413
|
+
): React.ReactElement<any>
|
|
1414
1414
|
|
|
1415
1415
|
export declare namespace MenuGroup {
|
|
1416
1416
|
var displayName: string
|
|
@@ -1518,14 +1518,12 @@ export declare type Placement =
|
|
|
1518
1518
|
*
|
|
1519
1519
|
* @public
|
|
1520
1520
|
*/
|
|
1521
|
-
export declare const Popover:
|
|
1522
|
-
|
|
1523
|
-
Omit<
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
>
|
|
1527
|
-
RefAttributes<HTMLDivElement>
|
|
1528
|
-
>
|
|
1521
|
+
export declare const Popover: NamedExoticComponent<
|
|
1522
|
+
Omit<
|
|
1523
|
+
PopoverProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'width' | 'children' | 'as'>,
|
|
1524
|
+
'ref'
|
|
1525
|
+
> &
|
|
1526
|
+
RefAttributes<HTMLDivElement>
|
|
1529
1527
|
>
|
|
1530
1528
|
|
|
1531
1529
|
/**
|
|
@@ -1550,7 +1548,7 @@ export declare interface PopoverProps
|
|
|
1550
1548
|
arrow?: boolean
|
|
1551
1549
|
/** @deprecated Use `floatingBoundary` and/or `referenceBoundary` instead */
|
|
1552
1550
|
boundaryElement?: HTMLElement | null
|
|
1553
|
-
children?: React.ReactElement
|
|
1551
|
+
children?: React.ReactElement<any>
|
|
1554
1552
|
/**
|
|
1555
1553
|
* When `true`, prevent overflow within the current boundary:
|
|
1556
1554
|
* - by flipping on its side axis
|
|
@@ -1637,7 +1635,7 @@ export declare interface PortalProps {
|
|
|
1637
1635
|
/**
|
|
1638
1636
|
* @public
|
|
1639
1637
|
*/
|
|
1640
|
-
export declare function PortalProvider(props: PortalProviderProps): React.ReactElement
|
|
1638
|
+
export declare function PortalProvider(props: PortalProviderProps): React.ReactElement<any>
|
|
1641
1639
|
|
|
1642
1640
|
export declare namespace PortalProvider {
|
|
1643
1641
|
var displayName: string
|
|
@@ -2093,7 +2091,7 @@ export declare const TabList: ForwardRefExoticComponent<
|
|
|
2093
2091
|
* @public
|
|
2094
2092
|
*/
|
|
2095
2093
|
export declare interface TabListProps extends Omit<InlineProps, 'as' | 'height'> {
|
|
2096
|
-
children: Array<React.ReactElement | null | undefined | false>
|
|
2094
|
+
children: Array<React.ReactElement<any> | null | undefined | false>
|
|
2097
2095
|
}
|
|
2098
2096
|
|
|
2099
2097
|
/**
|
|
@@ -2329,7 +2327,7 @@ export {ThemeColorName}
|
|
|
2329
2327
|
/**
|
|
2330
2328
|
* @public
|
|
2331
2329
|
*/
|
|
2332
|
-
export declare function ThemeColorProvider(props: ThemeColorProviderProps): React.ReactElement
|
|
2330
|
+
export declare function ThemeColorProvider(props: ThemeColorProviderProps): React.ReactElement<any>
|
|
2333
2331
|
|
|
2334
2332
|
export declare namespace ThemeColorProvider {
|
|
2335
2333
|
var displayName: string
|
|
@@ -2441,7 +2439,7 @@ export declare interface ThemeProps {
|
|
|
2441
2439
|
/**
|
|
2442
2440
|
* @public
|
|
2443
2441
|
*/
|
|
2444
|
-
export declare function ThemeProvider(props: ThemeProviderProps): React.ReactElement
|
|
2442
|
+
export declare function ThemeProvider(props: ThemeProviderProps): React.ReactElement<any>
|
|
2445
2443
|
|
|
2446
2444
|
export declare namespace ThemeProvider {
|
|
2447
2445
|
var displayName: string
|
|
@@ -2472,7 +2470,7 @@ export declare type ThemeShadow = ThemeShadow_2
|
|
|
2472
2470
|
*/
|
|
2473
2471
|
export declare function Toast(
|
|
2474
2472
|
props: ToastProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'ref' | 'title'>,
|
|
2475
|
-
): React.ReactElement
|
|
2473
|
+
): React.ReactElement<any>
|
|
2476
2474
|
|
|
2477
2475
|
export declare namespace Toast {
|
|
2478
2476
|
var displayName: string
|
|
@@ -2515,7 +2513,7 @@ export declare interface ToastProps {
|
|
|
2515
2513
|
/**
|
|
2516
2514
|
* @public
|
|
2517
2515
|
*/
|
|
2518
|
-
export declare function ToastProvider(props: ToastProviderProps): React.ReactElement
|
|
2516
|
+
export declare function ToastProvider(props: ToastProviderProps): React.ReactElement<any>
|
|
2519
2517
|
|
|
2520
2518
|
export declare namespace ToastProvider {
|
|
2521
2519
|
var displayName: string
|
|
@@ -2566,7 +2564,7 @@ export declare interface TooltipDelayGroupContextValue {
|
|
|
2566
2564
|
*/
|
|
2567
2565
|
export declare function TooltipDelayGroupProvider(
|
|
2568
2566
|
props: TooltipDelayGroupProviderProps,
|
|
2569
|
-
): React.ReactElement
|
|
2567
|
+
): React.ReactElement<any>
|
|
2570
2568
|
|
|
2571
2569
|
export declare namespace TooltipDelayGroupProvider {
|
|
2572
2570
|
var displayName: string
|
|
@@ -2597,7 +2595,7 @@ export declare interface TooltipProps extends Omit<LayerProps, 'as'> {
|
|
|
2597
2595
|
allowedAutoPlacements?: Placement[]
|
|
2598
2596
|
arrow?: boolean
|
|
2599
2597
|
boundaryElement?: HTMLElement | null
|
|
2600
|
-
children?: React.ReactElement
|
|
2598
|
+
children?: React.ReactElement<any>
|
|
2601
2599
|
content?: React.ReactNode
|
|
2602
2600
|
disabled?: boolean
|
|
2603
2601
|
fallbackPlacements?: Placement[]
|
|
@@ -2632,12 +2630,10 @@ export declare interface TooltipProps extends Omit<LayerProps, 'as'> {
|
|
|
2632
2630
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2633
2631
|
* @beta
|
|
2634
2632
|
*/
|
|
2635
|
-
export declare const Tree:
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
RefAttributes<HTMLDivElement>
|
|
2640
|
-
>
|
|
2633
|
+
export declare const Tree: NamedExoticComponent<
|
|
2634
|
+
TreeProps &
|
|
2635
|
+
Omit<HTMLProps<HTMLDivElement>, 'height' | 'role' | 'wrap' | 'ref' | 'as' | 'align'> &
|
|
2636
|
+
RefAttributes<HTMLDivElement>
|
|
2641
2637
|
>
|
|
2642
2638
|
|
|
2643
2639
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {hslToRgb as hslToRgb_2} from '@sanity/ui/theme'
|
|
|
13
13
|
import {HTMLAttributes} from 'react'
|
|
14
14
|
import {HTMLProps} from 'react'
|
|
15
15
|
import {IStyledComponentBase} from 'styled-components/dist/types'
|
|
16
|
-
import {
|
|
16
|
+
import {JSX} from 'react'
|
|
17
17
|
import {multiply as multiply_2} from '@sanity/ui/theme'
|
|
18
18
|
import {MutableRefObject} from 'react'
|
|
19
19
|
import {NamedExoticComponent} from 'react'
|
|
@@ -130,7 +130,7 @@ export declare const Autocomplete: <Option extends BaseAutocompleteOption>(
|
|
|
130
130
|
> & {
|
|
131
131
|
ref?: Ref<HTMLInputElement>
|
|
132
132
|
},
|
|
133
|
-
) => ReactElement
|
|
133
|
+
) => ReactElement<any>
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* @internal
|
|
@@ -199,11 +199,11 @@ export declare interface AutocompleteProps<
|
|
|
199
199
|
/** @beta */
|
|
200
200
|
relatedElements?: HTMLElement[]
|
|
201
201
|
/** The callback function for rendering each option. */
|
|
202
|
-
renderOption?: (option: Option) => ReactElement
|
|
202
|
+
renderOption?: (option: Option) => ReactElement<any>
|
|
203
203
|
/** @beta */
|
|
204
204
|
renderPopover?: (
|
|
205
205
|
props: {
|
|
206
|
-
content: ReactElement | null
|
|
206
|
+
content: ReactElement<any> | null
|
|
207
207
|
hidden: boolean
|
|
208
208
|
inputElement: HTMLInputElement | null
|
|
209
209
|
onMouseEnter: () => void
|
|
@@ -427,7 +427,7 @@ export declare interface BoundaryElementContextValue {
|
|
|
427
427
|
*/
|
|
428
428
|
export declare function BoundaryElementProvider(
|
|
429
429
|
props: BoundaryElementProviderProps,
|
|
430
|
-
): React.ReactElement
|
|
430
|
+
): React.ReactElement<any>
|
|
431
431
|
|
|
432
432
|
export declare namespace BoundaryElementProvider {
|
|
433
433
|
var displayName: string
|
|
@@ -810,7 +810,7 @@ export declare interface DialogProps extends ResponsivePaddingProps, ResponsiveW
|
|
|
810
810
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
811
811
|
* @beta
|
|
812
812
|
*/
|
|
813
|
-
export declare function DialogProvider(props: DialogProviderProps): React.ReactElement
|
|
813
|
+
export declare function DialogProvider(props: DialogProviderProps): React.ReactElement<any>
|
|
814
814
|
|
|
815
815
|
export declare namespace DialogProvider {
|
|
816
816
|
var displayName: string
|
|
@@ -1304,7 +1304,7 @@ export declare interface LayerProps {
|
|
|
1304
1304
|
/**
|
|
1305
1305
|
* @public
|
|
1306
1306
|
*/
|
|
1307
|
-
export declare function LayerProvider(props: LayerProviderProps): React.ReactElement
|
|
1307
|
+
export declare function LayerProvider(props: LayerProviderProps): React.ReactElement<any>
|
|
1308
1308
|
|
|
1309
1309
|
export declare namespace LayerProvider {
|
|
1310
1310
|
var displayName: string
|
|
@@ -1366,9 +1366,9 @@ export declare interface MenuButtonProps {
|
|
|
1366
1366
|
* @deprecated Use `popover={{boundaryElement: element}}` instead.
|
|
1367
1367
|
*/
|
|
1368
1368
|
boundaryElement?: HTMLElement
|
|
1369
|
-
button: React.ReactElement
|
|
1369
|
+
button: React.ReactElement<any>
|
|
1370
1370
|
id: string
|
|
1371
|
-
menu?: React.ReactElement
|
|
1371
|
+
menu?: React.ReactElement<any>
|
|
1372
1372
|
onClose?: () => void
|
|
1373
1373
|
onOpen?: () => void
|
|
1374
1374
|
/**
|
|
@@ -1410,7 +1410,7 @@ export declare const MenuDivider: IStyledComponentBase<
|
|
|
1410
1410
|
export declare function MenuGroup(
|
|
1411
1411
|
props: Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'popover' | 'ref' | 'tabIndex'> &
|
|
1412
1412
|
MenuGroupProps,
|
|
1413
|
-
): React.ReactElement
|
|
1413
|
+
): React.ReactElement<any>
|
|
1414
1414
|
|
|
1415
1415
|
export declare namespace MenuGroup {
|
|
1416
1416
|
var displayName: string
|
|
@@ -1518,14 +1518,12 @@ export declare type Placement =
|
|
|
1518
1518
|
*
|
|
1519
1519
|
* @public
|
|
1520
1520
|
*/
|
|
1521
|
-
export declare const Popover:
|
|
1522
|
-
|
|
1523
|
-
Omit<
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
>
|
|
1527
|
-
RefAttributes<HTMLDivElement>
|
|
1528
|
-
>
|
|
1521
|
+
export declare const Popover: NamedExoticComponent<
|
|
1522
|
+
Omit<
|
|
1523
|
+
PopoverProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'width' | 'children' | 'as'>,
|
|
1524
|
+
'ref'
|
|
1525
|
+
> &
|
|
1526
|
+
RefAttributes<HTMLDivElement>
|
|
1529
1527
|
>
|
|
1530
1528
|
|
|
1531
1529
|
/**
|
|
@@ -1550,7 +1548,7 @@ export declare interface PopoverProps
|
|
|
1550
1548
|
arrow?: boolean
|
|
1551
1549
|
/** @deprecated Use `floatingBoundary` and/or `referenceBoundary` instead */
|
|
1552
1550
|
boundaryElement?: HTMLElement | null
|
|
1553
|
-
children?: React.ReactElement
|
|
1551
|
+
children?: React.ReactElement<any>
|
|
1554
1552
|
/**
|
|
1555
1553
|
* When `true`, prevent overflow within the current boundary:
|
|
1556
1554
|
* - by flipping on its side axis
|
|
@@ -1637,7 +1635,7 @@ export declare interface PortalProps {
|
|
|
1637
1635
|
/**
|
|
1638
1636
|
* @public
|
|
1639
1637
|
*/
|
|
1640
|
-
export declare function PortalProvider(props: PortalProviderProps): React.ReactElement
|
|
1638
|
+
export declare function PortalProvider(props: PortalProviderProps): React.ReactElement<any>
|
|
1641
1639
|
|
|
1642
1640
|
export declare namespace PortalProvider {
|
|
1643
1641
|
var displayName: string
|
|
@@ -2093,7 +2091,7 @@ export declare const TabList: ForwardRefExoticComponent<
|
|
|
2093
2091
|
* @public
|
|
2094
2092
|
*/
|
|
2095
2093
|
export declare interface TabListProps extends Omit<InlineProps, 'as' | 'height'> {
|
|
2096
|
-
children: Array<React.ReactElement | null | undefined | false>
|
|
2094
|
+
children: Array<React.ReactElement<any> | null | undefined | false>
|
|
2097
2095
|
}
|
|
2098
2096
|
|
|
2099
2097
|
/**
|
|
@@ -2329,7 +2327,7 @@ export {ThemeColorName}
|
|
|
2329
2327
|
/**
|
|
2330
2328
|
* @public
|
|
2331
2329
|
*/
|
|
2332
|
-
export declare function ThemeColorProvider(props: ThemeColorProviderProps): React.ReactElement
|
|
2330
|
+
export declare function ThemeColorProvider(props: ThemeColorProviderProps): React.ReactElement<any>
|
|
2333
2331
|
|
|
2334
2332
|
export declare namespace ThemeColorProvider {
|
|
2335
2333
|
var displayName: string
|
|
@@ -2441,7 +2439,7 @@ export declare interface ThemeProps {
|
|
|
2441
2439
|
/**
|
|
2442
2440
|
* @public
|
|
2443
2441
|
*/
|
|
2444
|
-
export declare function ThemeProvider(props: ThemeProviderProps): React.ReactElement
|
|
2442
|
+
export declare function ThemeProvider(props: ThemeProviderProps): React.ReactElement<any>
|
|
2445
2443
|
|
|
2446
2444
|
export declare namespace ThemeProvider {
|
|
2447
2445
|
var displayName: string
|
|
@@ -2472,7 +2470,7 @@ export declare type ThemeShadow = ThemeShadow_2
|
|
|
2472
2470
|
*/
|
|
2473
2471
|
export declare function Toast(
|
|
2474
2472
|
props: ToastProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'ref' | 'title'>,
|
|
2475
|
-
): React.ReactElement
|
|
2473
|
+
): React.ReactElement<any>
|
|
2476
2474
|
|
|
2477
2475
|
export declare namespace Toast {
|
|
2478
2476
|
var displayName: string
|
|
@@ -2515,7 +2513,7 @@ export declare interface ToastProps {
|
|
|
2515
2513
|
/**
|
|
2516
2514
|
* @public
|
|
2517
2515
|
*/
|
|
2518
|
-
export declare function ToastProvider(props: ToastProviderProps): React.ReactElement
|
|
2516
|
+
export declare function ToastProvider(props: ToastProviderProps): React.ReactElement<any>
|
|
2519
2517
|
|
|
2520
2518
|
export declare namespace ToastProvider {
|
|
2521
2519
|
var displayName: string
|
|
@@ -2566,7 +2564,7 @@ export declare interface TooltipDelayGroupContextValue {
|
|
|
2566
2564
|
*/
|
|
2567
2565
|
export declare function TooltipDelayGroupProvider(
|
|
2568
2566
|
props: TooltipDelayGroupProviderProps,
|
|
2569
|
-
): React.ReactElement
|
|
2567
|
+
): React.ReactElement<any>
|
|
2570
2568
|
|
|
2571
2569
|
export declare namespace TooltipDelayGroupProvider {
|
|
2572
2570
|
var displayName: string
|
|
@@ -2597,7 +2595,7 @@ export declare interface TooltipProps extends Omit<LayerProps, 'as'> {
|
|
|
2597
2595
|
allowedAutoPlacements?: Placement[]
|
|
2598
2596
|
arrow?: boolean
|
|
2599
2597
|
boundaryElement?: HTMLElement | null
|
|
2600
|
-
children?: React.ReactElement
|
|
2598
|
+
children?: React.ReactElement<any>
|
|
2601
2599
|
content?: React.ReactNode
|
|
2602
2600
|
disabled?: boolean
|
|
2603
2601
|
fallbackPlacements?: Placement[]
|
|
@@ -2632,12 +2630,10 @@ export declare interface TooltipProps extends Omit<LayerProps, 'as'> {
|
|
|
2632
2630
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2633
2631
|
* @beta
|
|
2634
2632
|
*/
|
|
2635
|
-
export declare const Tree:
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
RefAttributes<HTMLDivElement>
|
|
2640
|
-
>
|
|
2633
|
+
export declare const Tree: NamedExoticComponent<
|
|
2634
|
+
TreeProps &
|
|
2635
|
+
Omit<HTMLProps<HTMLDivElement>, 'height' | 'role' | 'wrap' | 'ref' | 'as' | 'align'> &
|
|
2636
|
+
RefAttributes<HTMLDivElement>
|
|
2641
2637
|
>
|
|
2642
2638
|
|
|
2643
2639
|
/**
|
package/dist/index.esm.js
CHANGED
|
@@ -3895,7 +3895,7 @@ const Popover = memo(forwardRef(function(props, forwardedRef) {
|
|
|
3895
3895
|
useEffect(() => {
|
|
3896
3896
|
maxWidthRef.current = maxWidth;
|
|
3897
3897
|
}, [maxWidth]);
|
|
3898
|
-
const referenceWidthRef = useRef();
|
|
3898
|
+
const referenceWidthRef = useRef(void 0);
|
|
3899
3899
|
useEffect(() => {
|
|
3900
3900
|
const floatingElement = ref.current;
|
|
3901
3901
|
if (!open || !floatingElement) return;
|
|
@@ -4693,7 +4693,7 @@ function _temp3(v_0) {
|
|
|
4693
4693
|
return v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : v_0 - 1;
|
|
4694
4694
|
}
|
|
4695
4695
|
function useDelayedState(initialState) {
|
|
4696
|
-
const $ = c(3), [state, setState] = useState(initialState), delayedAction = useRef();
|
|
4696
|
+
const $ = c(3), [state, setState] = useState(initialState), delayedAction = useRef(void 0);
|
|
4697
4697
|
let t0;
|
|
4698
4698
|
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = (nextState, delay) => {
|
|
4699
4699
|
const action = () => {
|
|
@@ -5216,7 +5216,26 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5216
5216
|
inputElement: inputElementRef.current,
|
|
5217
5217
|
onMouseEnter: handlePopoverMouseEnter,
|
|
5218
5218
|
onMouseLeave: handlePopoverMouseLeave
|
|
5219
|
-
}, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsx(
|
|
5219
|
+
}, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsx(
|
|
5220
|
+
Popover,
|
|
5221
|
+
{
|
|
5222
|
+
arrow: !1,
|
|
5223
|
+
constrainSize: !0,
|
|
5224
|
+
content,
|
|
5225
|
+
fallbackPlacements: AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS,
|
|
5226
|
+
matchReferenceWidth: !0,
|
|
5227
|
+
onMouseEnter: handlePopoverMouseEnter,
|
|
5228
|
+
onMouseLeave: handlePopoverMouseLeave,
|
|
5229
|
+
open: expanded,
|
|
5230
|
+
overflow: "auto",
|
|
5231
|
+
placement: AUTOCOMPLETE_POPOVER_PLACEMENT,
|
|
5232
|
+
portal: !0,
|
|
5233
|
+
radius,
|
|
5234
|
+
ref: resultsPopoverElementRef,
|
|
5235
|
+
referenceElement: inputElementRef.current,
|
|
5236
|
+
...popover
|
|
5237
|
+
}
|
|
5238
|
+
), [content, expanded, filteredOptionsLen, handlePopoverMouseEnter, handlePopoverMouseLeave, popover, radius, renderPopover]);
|
|
5220
5239
|
return /* @__PURE__ */ jsxs(Root$9, { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: rootElementRef, children: [
|
|
5221
5240
|
input,
|
|
5222
5241
|
results
|
|
@@ -5462,7 +5481,7 @@ const Dialog = forwardRef(function(props, ref) {
|
|
|
5462
5481
|
}
|
|
5463
5482
|
isHTMLElement(event.target) && (focusedElementRef.current = event.target);
|
|
5464
5483
|
}, $[22] = onFocus, $[23] = t7) : t7 = $[23];
|
|
5465
|
-
const handleFocus = t7, labelId = `${id}_label`, rootClickTimeoutRef = useRef();
|
|
5484
|
+
const handleFocus = t7, labelId = `${id}_label`, rootClickTimeoutRef = useRef(void 0);
|
|
5466
5485
|
let t8;
|
|
5467
5486
|
$[24] !== boundaryElement || $[25] !== portalElement ? (t8 = () => {
|
|
5468
5487
|
rootClickTimeoutRef.current && clearTimeout(rootClickTimeoutRef.current), rootClickTimeoutRef.current = setTimeout(() => {
|
|
@@ -6599,24 +6618,23 @@ function ToastProvider(props) {
|
|
|
6599
6618
|
}, t7 = [1, 1, 0], $[4] = t6, $[5] = t7) : (t6 = $[4], t7 = $[5]);
|
|
6600
6619
|
let t8;
|
|
6601
6620
|
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t8 = [1, 0, 0], $[6] = t8) : t8 = $[6];
|
|
6602
|
-
|
|
6603
|
-
|
|
6621
|
+
const t9 = prefersReducedMotion ? 0 : 0.2;
|
|
6622
|
+
let t10;
|
|
6623
|
+
$[7] !== t9 ? (t10 = {
|
|
6604
6624
|
initial: t4,
|
|
6605
6625
|
animate: t6,
|
|
6606
6626
|
exit: {
|
|
6607
6627
|
opacity: t7,
|
|
6608
6628
|
[POPOVER_MOTION_CONTENT_OPACITY_PROPERTY]: t8,
|
|
6609
6629
|
scale: 0.5,
|
|
6610
|
-
transition:
|
|
6611
|
-
duration:
|
|
6612
|
-
} : {
|
|
6613
|
-
duration: 0.2
|
|
6630
|
+
transition: {
|
|
6631
|
+
duration: t9
|
|
6614
6632
|
}
|
|
6615
6633
|
}
|
|
6616
|
-
}, $[7] =
|
|
6634
|
+
}, $[7] = t9, $[8] = t10) : t10 = $[8], t3 = t10;
|
|
6617
6635
|
const variants = t3;
|
|
6618
|
-
let
|
|
6619
|
-
$[9] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
6636
|
+
let t11, t12;
|
|
6637
|
+
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t12 = {
|
|
6620
6638
|
version: 0,
|
|
6621
6639
|
push: (params) => {
|
|
6622
6640
|
const setState = (state_0) => startTransition(() => _setState(state_0)), id = params.id || generateToastId(), duration = params.duration || 5e3, dismiss = () => {
|
|
@@ -6641,23 +6659,23 @@ function ToastProvider(props) {
|
|
|
6641
6659
|
timeoutId: setTimeout(dismiss, duration)
|
|
6642
6660
|
}, id;
|
|
6643
6661
|
}
|
|
6644
|
-
}, $[9] =
|
|
6645
|
-
const value =
|
|
6646
|
-
let
|
|
6647
|
-
$[10] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
6662
|
+
}, $[9] = t12) : t12 = $[9], t11 = t12;
|
|
6663
|
+
const value = t11;
|
|
6664
|
+
let t13, t14;
|
|
6665
|
+
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t13 = () => () => {
|
|
6648
6666
|
for (const {
|
|
6649
6667
|
timeoutId: timeoutId_0
|
|
6650
6668
|
} of Object.values(toastsRef.current))
|
|
6651
6669
|
clearTimeout(timeoutId_0);
|
|
6652
6670
|
toastsRef.current = {};
|
|
6653
|
-
},
|
|
6654
|
-
let
|
|
6655
|
-
$[12] !== mounted || $[13] !== padding || $[14] !== paddingX || $[15] !== paddingY || $[16] !== prefersReducedMotion || $[17] !== state || $[18] !== variants || $[19] !== zOffset ? (
|
|
6671
|
+
}, t14 = [], $[10] = t13, $[11] = t14) : (t13 = $[10], t14 = $[11]), useEffect(t13, t14);
|
|
6672
|
+
let t15;
|
|
6673
|
+
$[12] !== mounted || $[13] !== padding || $[14] !== paddingX || $[15] !== paddingY || $[16] !== prefersReducedMotion || $[17] !== state || $[18] !== variants || $[19] !== zOffset ? (t15 = mounted && /* @__PURE__ */ jsx(Root$1, { "data-ui": "ToastProvider", zOffset, children: /* @__PURE__ */ jsx(ToastContainer, { children: /* @__PURE__ */ jsx(Box, { padding, paddingX, paddingY, children: /* @__PURE__ */ jsx(AnimatePresence, { initial: !1, children: state.map((t162) => {
|
|
6656
6674
|
const {
|
|
6657
6675
|
dismiss: dismiss_0,
|
|
6658
6676
|
id: id_0,
|
|
6659
6677
|
params: params_0
|
|
6660
|
-
} =
|
|
6678
|
+
} = t162;
|
|
6661
6679
|
return /* @__PURE__ */ jsx(motion.div, { layout: "position", initial: "initial", animate: "animate", exit: "exit", variants, transition: prefersReducedMotion ? {
|
|
6662
6680
|
duration: 0
|
|
6663
6681
|
} : {
|
|
@@ -6665,12 +6683,12 @@ function ToastProvider(props) {
|
|
|
6665
6683
|
damping: 30,
|
|
6666
6684
|
stiffness: 400
|
|
6667
6685
|
}, children: /* @__PURE__ */ jsx(Toast, { closable: params_0.closable, description: params_0.description, onClose: dismiss_0, status: params_0.status, title: params_0.title, duration: params_0.duration }) }, id_0);
|
|
6668
|
-
}) }) }) }) }), $[12] = mounted, $[13] = padding, $[14] = paddingX, $[15] = paddingY, $[16] = prefersReducedMotion, $[17] = state, $[18] = variants, $[19] = zOffset, $[20] =
|
|
6669
|
-
let
|
|
6670
|
-
return $[21] !== children || $[22] !==
|
|
6686
|
+
}) }) }) }) }), $[12] = mounted, $[13] = padding, $[14] = paddingX, $[15] = paddingY, $[16] = prefersReducedMotion, $[17] = state, $[18] = variants, $[19] = zOffset, $[20] = t15) : t15 = $[20];
|
|
6687
|
+
let t16;
|
|
6688
|
+
return $[21] !== children || $[22] !== t15 ? (t16 = /* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
|
|
6671
6689
|
children,
|
|
6672
|
-
|
|
6673
|
-
] }), $[21] = children, $[22] =
|
|
6690
|
+
t15
|
|
6691
|
+
] }), $[21] = children, $[22] = t15, $[23] = t16) : t16 = $[23], t16;
|
|
6674
6692
|
}
|
|
6675
6693
|
ToastProvider.displayName = "ToastProvider";
|
|
6676
6694
|
function useToast() {
|