@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.
Files changed (112) hide show
  1. package/dist/index.d.mts +29 -33
  2. package/dist/index.d.ts +29 -33
  3. package/dist/index.esm.js +44 -26
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.js +44 -26
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +44 -26
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/theme.d.mts +1 -1
  10. package/dist/theme.d.ts +1 -1
  11. package/dist/theme.esm.js.map +1 -1
  12. package/dist/theme.js.map +1 -1
  13. package/dist/theme.mjs.map +1 -1
  14. package/package.json +31 -25
  15. package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +1 -1
  16. package/src/core/components/autocomplete/autocomplete.tsx +4 -3
  17. package/src/core/components/autocomplete/autocompleteOption.tsx +1 -1
  18. package/src/core/components/dialog/dialog.tsx +1 -1
  19. package/src/core/components/dialog/dialogProvider.tsx +1 -1
  20. package/src/core/components/menu/__workshop__/asComponent.tsx +1 -1
  21. package/src/core/components/menu/menu.test.tsx +0 -2
  22. package/src/core/components/menu/menuButton.tsx +2 -2
  23. package/src/core/components/menu/menuGroup.tsx +2 -2
  24. package/src/core/components/menu/menuItem.tsx +1 -0
  25. package/src/core/components/tab/tabList.tsx +2 -2
  26. package/src/core/components/toast/toast.test.tsx +0 -1
  27. package/src/core/components/toast/toast.tsx +1 -1
  28. package/src/core/components/toast/toastProvider.tsx +3 -2
  29. package/src/core/components/tree/tree.tsx +1 -1
  30. package/src/core/components/tree/treeGroup.tsx +1 -1
  31. package/src/core/components/tree/treeItem.tsx +1 -1
  32. package/src/core/hooks/useDelayedState.ts +1 -1
  33. package/src/core/hooks/usePrefersDark.hydration.test.tsx +0 -1
  34. package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -1
  35. package/src/core/lib/globalScope.ts +0 -1
  36. package/src/core/primitives/avatar/avatar.tsx +1 -1
  37. package/src/core/primitives/avatar/avatarStack.tsx +1 -1
  38. package/src/core/primitives/badge/badge.tsx +1 -1
  39. package/src/core/primitives/box/box.tsx +1 -1
  40. package/src/core/primitives/button/button.tsx +1 -1
  41. package/src/core/primitives/card/__workshop__/asComponent.tsx +1 -1
  42. package/src/core/primitives/code/code.tsx +1 -2
  43. package/src/core/primitives/heading/heading.tsx +1 -1
  44. package/src/core/primitives/inline/inline.tsx +0 -1
  45. package/src/core/primitives/kbd/kbd.tsx +1 -1
  46. package/src/core/primitives/label/label.tsx +1 -1
  47. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +1 -1
  48. package/src/core/primitives/popover/__workshop__/TestStory.tsx +2 -2
  49. package/src/core/primitives/popover/popover.tsx +4 -5
  50. package/src/core/primitives/stack/stack.tsx +1 -1
  51. package/src/core/primitives/text/text.tsx +1 -1
  52. package/src/core/primitives/tooltip/tooltip.tsx +1 -2
  53. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +1 -1
  54. package/src/core/theme/__workshop__/build/story.tsx +1 -3
  55. package/src/core/theme/__workshop__/debug/story.tsx +0 -2
  56. package/src/core/theme/theme.test.tsx +0 -1
  57. package/src/core/theme/themeColorProvider.tsx +1 -1
  58. package/src/core/theme/themeProvider.tsx +1 -1
  59. package/src/core/utils/arrow/arrow.tsx +1 -1
  60. package/src/core/utils/boundaryElement/boundaryElement.test.tsx +0 -1
  61. package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +3 -1
  62. package/src/core/utils/elementQuery/elementQuery.tsx +1 -1
  63. package/src/core/utils/layer/layer.test.tsx +0 -1
  64. package/src/core/utils/layer/layer.tsx +9 -1
  65. package/src/core/utils/layer/layerProvider.tsx +1 -1
  66. package/src/core/utils/portal/portal.test.tsx +0 -1
  67. package/src/core/utils/portal/portalProvider.tsx +1 -1
  68. package/src/core/utils/srOnly/srOnly.tsx +1 -1
  69. package/src/core/utils/virtualList/virtualList.tsx +10 -3
  70. package/src/theme/build/merge.ts +0 -2
  71. package/src/theme/system/css.ts +1 -2
  72. package/src/core/components/autocomplete/__workshop__/.eslintrc +0 -5
  73. package/src/core/components/breadcrumbs/__workshop__/.eslintrc +0 -5
  74. package/src/core/components/dialog/__workshop__/.eslintrc +0 -5
  75. package/src/core/components/hotkeys/__workshop__/.eslintrc +0 -5
  76. package/src/core/components/menu/__workshop__/.eslintrc +0 -5
  77. package/src/core/components/skeleton/__workshop__/.eslintrc +0 -5
  78. package/src/core/components/tab/__workshop__/.eslintrc +0 -5
  79. package/src/core/components/toast/__workshop__/.eslintrc +0 -5
  80. package/src/core/components/tree/__workshop__/.eslintrc +0 -5
  81. package/src/core/hooks/useElementRect/__workshop__/.eslintrc +0 -5
  82. package/src/core/hooks/useMediaIndex/__workshop__/.eslintrc +0 -5
  83. package/src/core/primitives/avatar/__workshop__/.eslintrc +0 -5
  84. package/src/core/primitives/badge/__workshop__/.eslintrc +0 -5
  85. package/src/core/primitives/box/__workshop__/.eslintrc +0 -5
  86. package/src/core/primitives/button/__workshop__/.eslintrc +0 -5
  87. package/src/core/primitives/card/__workshop__/.eslintrc +0 -5
  88. package/src/core/primitives/checkbox/__workshop__/.eslintrc +0 -5
  89. package/src/core/primitives/code/__workshop__/.eslintrc +0 -5
  90. package/src/core/primitives/container/__workshop__/.eslintrc +0 -5
  91. package/src/core/primitives/flex/__workshop__/.eslintrc +0 -5
  92. package/src/core/primitives/grid/__workshop__/.eslintrc +0 -5
  93. package/src/core/primitives/heading/__workshop__/.eslintrc +0 -5
  94. package/src/core/primitives/inline/__workshop__/.eslintrc +0 -5
  95. package/src/core/primitives/kbd/__workshop__/.eslintrc +0 -5
  96. package/src/core/primitives/label/__workshop__/.eslintrc +0 -5
  97. package/src/core/primitives/popover/__workshop__/.eslintrc +0 -5
  98. package/src/core/primitives/radio/__workshop__/.eslintrc +0 -5
  99. package/src/core/primitives/select/__workshop__/.eslintrc +0 -5
  100. package/src/core/primitives/spinner/__workshop__/.eslintrc +0 -5
  101. package/src/core/primitives/stack/__workshop__/.eslintrc +0 -5
  102. package/src/core/primitives/switch/__workshop__/.eslintrc +0 -5
  103. package/src/core/primitives/text/__workshop__/.eslintrc +0 -5
  104. package/src/core/primitives/textArea/__workshop__/.eslintrc +0 -5
  105. package/src/core/primitives/textInput/__workshop__/.eslintrc +0 -5
  106. package/src/core/primitives/tooltip/__workshop__/.eslintrc +0 -5
  107. package/src/core/theme/__workshop__/.eslintrc +0 -5
  108. package/src/core/utils/boundaryElement/__workshop__/.eslintrc +0 -5
  109. package/src/core/utils/elementQuery/__workshop__/.eslintrc +0 -5
  110. package/src/core/utils/layer/__workshop__/.eslintrc +0 -5
  111. package/src/core/utils/portal/__workshop__/.eslintrc +0 -5
  112. package/src/core/utils/virtualList/__workshop__/.eslintrc +0 -5
@@ -13,7 +13,9 @@ export interface BoundaryElementProviderProps {
13
13
  /**
14
14
  * @public
15
15
  */
16
- export function BoundaryElementProvider(props: BoundaryElementProviderProps): React.ReactElement {
16
+ export function BoundaryElementProvider(
17
+ props: BoundaryElementProviderProps,
18
+ ): React.ReactElement<any> {
17
19
  const {children, element} = props
18
20
  const value: BoundaryElementContextValue = useMemo(() => ({version: 0.0, element}), [element])
19
21
 
@@ -1,4 +1,4 @@
1
- import {forwardRef, useImperativeHandle, useMemo, useState} from 'react'
1
+ import {forwardRef, useImperativeHandle, useMemo, useState, type JSX} from 'react'
2
2
  import {useElementSize} from '../../hooks'
3
3
  import {useTheme_v2} from '../../theme'
4
4
  import {findMaxBreakpoints, findMinBreakpoints} from './helpers'
@@ -1,5 +1,4 @@
1
1
  /** @jest-environment jsdom */
2
- /* eslint-disable @typescript-eslint/no-explicit-any */
3
2
 
4
3
  import {render} from '../../../../test'
5
4
  import {LayerContext} from './layerContext'
@@ -1,4 +1,12 @@
1
- import {FocusEvent, forwardRef, useCallback, useEffect, useImperativeHandle, useRef} from 'react'
1
+ import {
2
+ FocusEvent,
3
+ forwardRef,
4
+ useCallback,
5
+ useEffect,
6
+ useImperativeHandle,
7
+ useRef,
8
+ type JSX,
9
+ } from 'react'
2
10
  import {styled} from 'styled-components'
3
11
  import {EMPTY_RECORD} from '../../constants'
4
12
  import {containsOrEqualsElement, isHTMLElement} from '../../helpers'
@@ -15,7 +15,7 @@ export interface LayerProviderProps {
15
15
  /**
16
16
  * @public
17
17
  */
18
- export function LayerProvider(props: LayerProviderProps): React.ReactElement {
18
+ export function LayerProvider(props: LayerProviderProps): React.ReactElement<any> {
19
19
  const {children, zOffset: zOffsetProp = 0} = props
20
20
 
21
21
  // Get parent context values
@@ -1,5 +1,4 @@
1
1
  /** @jest-environment jsdom */
2
- /* eslint-disable @typescript-eslint/no-explicit-any */
3
2
 
4
3
  import {render} from '../../../../test'
5
4
  import {PortalContext} from './portalContext'
@@ -21,7 +21,7 @@ export interface PortalProviderProps {
21
21
  /**
22
22
  * @public
23
23
  */
24
- export function PortalProvider(props: PortalProviderProps): React.ReactElement {
24
+ export function PortalProvider(props: PortalProviderProps): React.ReactElement<any> {
25
25
  const {boundaryElement, children, element, __unstable_elements: elementsProp} = props
26
26
  const elements = useUnique(elementsProp)
27
27
  const fallbackElement = useSyncExternalStore(
@@ -1,4 +1,4 @@
1
- import {forwardRef} from 'react'
1
+ import {forwardRef, type JSX} from 'react'
2
2
  import {styled} from 'styled-components'
3
3
 
4
4
  /**
@@ -1,5 +1,12 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import {forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState} from 'react'
1
+ import {
2
+ forwardRef,
3
+ useEffect,
4
+ useImperativeHandle,
5
+ useMemo,
6
+ useRef,
7
+ useState,
8
+ type JSX,
9
+ } from 'react'
3
10
  import {styled} from 'styled-components'
4
11
  import {_isScrollable} from '../../helpers'
5
12
  import {_ResizeObserver} from '../../observers'
@@ -48,7 +55,7 @@ export const VirtualList = forwardRef(function VirtualList(
48
55
  StackProps &
49
56
  Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'onChange' | 'ref'>,
50
57
  forwardedRef: React.ForwardedRef<HTMLDivElement>,
51
- ): React.ReactElement {
58
+ ): React.ReactElement<any> {
52
59
  const {as = 'div', gap = 0, getItemKey, items = [], onChange, renderItem, ...restProps} = props
53
60
  const {space} = useTheme_v2()
54
61
  const ref = useRef<HTMLDivElement | null>(null)
@@ -1,5 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
-
3
1
  import {isRecord} from './lib/isRecord'
4
2
 
5
3
  export function merge<T extends Record<string, any>>(...records: (T | undefined)[]): T {
@@ -4,6 +4,5 @@ import type {StyledObject} from 'styled-components'
4
4
  * Work around types that are missing in `styled-components@6`
5
5
  * https://github.com/styled-components/styled-components/issues/4062
6
6
  * @internal
7
- * */
8
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
+ */
9
8
  export type CSSObject = StyledObject<any>
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/explicit-module-boundary-types": "off"
4
- }
5
- }