@sanity/ui 2.3.6-0 → 2.3.6-canary.1
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.compiled.mjs +7073 -0
- package/dist/index.compiled.mjs.map +1 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.esm.js +966 -982
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +971 -987
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +966 -982
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -2
- package/src/core/components/autocomplete/autocomplete.tsx +2 -2
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +3 -2
- package/src/core/components/dialog/dialog.tsx +19 -10
- package/src/core/components/hotkeys/hotkeys.tsx +3 -3
- package/src/core/components/menu/menuGroup.tsx +5 -4
- package/src/core/components/menu/menuItem.tsx +6 -4
- package/src/core/components/skeleton/skeleton.tsx +5 -11
- package/src/core/components/skeleton/textSkeleton.tsx +6 -7
- package/src/core/hooks/useArrayProp.ts +11 -10
- package/src/core/primitives/avatar/avatar.tsx +4 -4
- package/src/core/primitives/avatar/avatarCounter.tsx +2 -3
- package/src/core/primitives/avatar/avatarStack.tsx +2 -3
- package/src/core/primitives/badge/badge.tsx +7 -4
- package/src/core/primitives/box/box.tsx +53 -27
- package/src/core/primitives/button/button.tsx +11 -12
- package/src/core/primitives/card/card.tsx +17 -9
- package/src/core/primitives/code/code.tsx +4 -3
- package/src/core/primitives/container/container.tsx +4 -11
- package/src/core/primitives/flex/flex.tsx +13 -7
- package/src/core/primitives/grid/grid.tsx +19 -10
- package/src/core/primitives/heading/heading.tsx +7 -4
- package/src/core/primitives/inline/inline.tsx +3 -2
- package/src/core/primitives/kbd/kbd.tsx +4 -3
- package/src/core/primitives/label/label.tsx +7 -4
- package/src/core/primitives/popover/popover.tsx +7 -6
- package/src/core/primitives/select/select.tsx +12 -6
- package/src/core/primitives/stack/stack.tsx +4 -3
- package/src/core/primitives/text/text.tsx +7 -4
- package/src/core/primitives/textArea/textArea.tsx +12 -6
- package/src/core/primitives/textInput/textInput.tsx +6 -5
- package/src/core/primitives/tooltip/tooltip.tsx +6 -6
- package/src/core/theme/themeProvider.tsx +2 -1
- package/src/core/utils/layer/layerProvider.tsx +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -2632,6 +2632,16 @@ export declare interface TreeState {
|
|
|
2632
2632
|
/**
|
|
2633
2633
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2634
2634
|
* @beta
|
|
2635
|
+
* @deprecated use `_getArrayProp` and `useMemo` directly instead
|
|
2636
|
+
* @example
|
|
2637
|
+
* ```diff
|
|
2638
|
+
* -import {useArrayProp} from '@sanity/ui'
|
|
2639
|
+
* +import {_getArrayProp} from '@sanity/ui'
|
|
2640
|
+
* +import {useMemo} from 'react'
|
|
2641
|
+
*
|
|
2642
|
+
* -const width = useArrayProp(props.width)
|
|
2643
|
+
* +const width = useMemo(() => _getArrayProp(props.width), [props.width])
|
|
2644
|
+
* ```
|
|
2635
2645
|
*/
|
|
2636
2646
|
export declare function useArrayProp<T extends ArrayPropPrimitive = ArrayPropPrimitive>(
|
|
2637
2647
|
val: T | T[] | undefined,
|
package/dist/index.d.ts
CHANGED
|
@@ -2632,6 +2632,16 @@ export declare interface TreeState {
|
|
|
2632
2632
|
/**
|
|
2633
2633
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2634
2634
|
* @beta
|
|
2635
|
+
* @deprecated use `_getArrayProp` and `useMemo` directly instead
|
|
2636
|
+
* @example
|
|
2637
|
+
* ```diff
|
|
2638
|
+
* -import {useArrayProp} from '@sanity/ui'
|
|
2639
|
+
* +import {_getArrayProp} from '@sanity/ui'
|
|
2640
|
+
* +import {useMemo} from 'react'
|
|
2641
|
+
*
|
|
2642
|
+
* -const width = useArrayProp(props.width)
|
|
2643
|
+
* +const width = useMemo(() => _getArrayProp(props.width), [props.width])
|
|
2644
|
+
* ```
|
|
2635
2645
|
*/
|
|
2636
2646
|
export declare function useArrayProp<T extends ArrayPropPrimitive = ArrayPropPrimitive>(
|
|
2637
2647
|
val: T | T[] | undefined,
|