@sanity/ui 3.0.0-static.26 → 3.0.0-static.28
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/README.md +1 -1
- package/dist/_chunks-cjs/_visual-editing.cjs +674 -804
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
- package/dist/_chunks-cjs/refractor.cjs +2 -2
- package/dist/_chunks-cjs/refractor.cjs.map +1 -1
- package/dist/_chunks-es/_visual-editing.js +652 -781
- package/dist/_chunks-es/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/refractor.js +1 -1
- package/dist/_visual-editing.d.cts +1 -0
- package/dist/_visual-editing.d.ts +1 -0
- package/dist/css/layers.css +4 -0
- package/dist/css/primitives/popover/popover.css +4 -0
- package/dist/css.cjs +59 -50
- package/dist/css.cjs.map +1 -1
- package/dist/css.d.cts +14 -6
- package/dist/css.d.ts +14 -6
- package/dist/css.js +59 -50
- package/dist/css.js.map +1 -1
- package/dist/index.cjs +1995 -1813
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -0
- package/dist/index.d.cts +35 -17
- package/dist/index.d.ts +35 -17
- package/dist/index.js +2013 -1832
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs +2605 -1075
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.d.cts +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +2689 -1159
- package/dist/theme.js.map +1 -1
- package/exports/_visual-editing.ts +2 -2
- package/package.json +20 -38
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +1 -1
- package/src/core/components/autocomplete/autocomplete.tsx +13 -17
- package/src/core/components/autocomplete/autocompleteOption.tsx +1 -1
- package/src/core/components/autocomplete/constants.ts +3 -1
- package/src/core/components/autocomplete/types.ts +1 -1
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +8 -3
- package/src/core/components/dialog/__workshop__/activate.tsx +11 -3
- package/src/core/components/dialog/__workshop__/panes.tsx +12 -5
- package/src/core/components/dialog/dialog.tsx +12 -13
- package/src/core/components/dialog/dialogCard.tsx +89 -53
- package/src/core/components/dialog/dialogContext.ts +1 -1
- package/src/core/components/dialog/dialogProvider.tsx +1 -1
- package/src/core/components/dialog/index.ts +1 -0
- package/src/core/components/dialog/isTargetWithinScope.ts +1 -1
- package/src/core/components/hotkeys/hotkeys.tsx +3 -2
- package/src/core/components/menu/__workshop__/avatarMenu.tsx +12 -6
- package/src/core/components/menu/__workshop__/customSelectedState.tsx +1 -5
- package/src/core/components/menu/__workshop__/shouldFocus.tsx +1 -2
- package/src/core/components/menu/helpers.ts +1 -1
- package/src/core/components/menu/menu.tsx +6 -4
- package/src/core/components/menu/menuButton.tsx +5 -3
- package/src/core/components/menu/menuDivider.tsx +1 -1
- package/src/core/components/menu/menuGroup.tsx +8 -4
- package/src/core/components/menu/menuItem.tsx +4 -2
- package/src/core/components/tab/tab.tsx +2 -2
- package/src/core/components/tab/tabList.tsx +2 -2
- package/src/core/components/tab/tabPanel.tsx +2 -2
- package/src/core/components/toast/toast.tsx +7 -2
- package/src/core/components/toast/toastLayer.tsx +2 -2
- package/src/core/components/toast/toastProvider.tsx +1 -1
- package/src/core/components/tree/tree.tsx +2 -2
- package/src/core/components/tree/treeGroup.tsx +2 -2
- package/src/core/components/tree/treeItem.tsx +13 -6
- package/src/core/components/tree/types.ts +0 -1
- package/src/core/{utils → components}/virtualList/__workshop__/index.ts +1 -1
- package/src/core/{utils → components}/virtualList/virtualList.tsx +10 -5
- package/src/core/helpers/focus.ts +0 -8
- package/src/core/hooks/useArrayProp.ts +1 -1
- package/src/core/hooks/useElementRect/__workshop__/example.tsx +1 -3
- package/src/core/hooks/useElementSize.ts +1 -1
- package/src/core/hooks/useResponsiveProp.ts +1 -1
- package/src/core/index.ts +83 -7
- package/src/core/observers/{elementSizeObserver.ts → elementSize.ts} +1 -1
- package/src/core/primitives/_selectable/index.ts +1 -0
- package/src/core/primitives/_selectable/selectable.tsx +13 -3
- package/src/core/{types/selectable.ts → primitives/_selectable/types.ts} +1 -1
- package/src/core/{utils → primitives}/arrow/arrow.tsx +1 -1
- package/src/core/primitives/avatar/avatar.tsx +4 -3
- package/src/core/primitives/avatar/avatarCounter.tsx +3 -3
- package/src/core/primitives/avatar/avatarStack.tsx +4 -4
- package/src/core/primitives/avatar/types.ts +17 -0
- package/src/core/primitives/badge/badge.tsx +4 -2
- package/src/core/primitives/badge/types.ts +11 -2
- package/src/core/primitives/box/__workshop__/responsive.tsx +0 -1
- package/src/core/primitives/box/box.tsx +1 -1
- package/src/core/primitives/box/index.ts +1 -0
- package/src/core/primitives/button/__workshop__/disabled.tsx +37 -51
- package/src/core/primitives/button/__workshop__/index.ts +5 -0
- package/src/core/primitives/button/__workshop__/textOverflow.tsx +13 -0
- package/src/core/primitives/button/button.tsx +15 -14
- package/src/core/primitives/button/index.ts +1 -0
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +2 -2
- package/src/core/primitives/card/card.tsx +1 -1
- package/src/core/primitives/card/types.ts +3 -0
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +9 -1
- package/src/core/primitives/checkbox/checkbox.tsx +3 -4
- package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +17 -42
- package/src/core/primitives/code/code.tsx +1 -1
- package/src/core/primitives/container/container.tsx +1 -1
- package/src/core/primitives/flex/flex.tsx +1 -1
- package/src/core/primitives/flex/index.ts +1 -0
- package/src/core/primitives/grid/grid.tsx +1 -1
- package/src/core/primitives/grid/index.ts +1 -0
- package/src/core/primitives/heading/heading.tsx +1 -1
- package/src/core/primitives/inline/inline.tsx +1 -1
- package/src/core/primitives/kbd/kbd.tsx +1 -1
- package/src/core/primitives/label/label.tsx +1 -1
- package/src/core/{utils → primitives}/layer/__workshop__/index.ts +1 -1
- package/src/core/{utils → primitives}/layer/layer.test.tsx +1 -1
- package/src/core/{utils → primitives}/layer/layer.tsx +2 -2
- package/src/core/{utils → primitives}/layer/layerCard.tsx +3 -3
- package/src/core/{utils → primitives}/layer/layerProvider.tsx +2 -1
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +12 -9
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +9 -8
- package/src/core/primitives/popover/constants.ts +1 -1
- package/src/core/primitives/popover/floating-ui/size.ts +1 -1
- package/src/core/primitives/popover/popover.tsx +8 -4
- package/src/core/primitives/popover/popoverLayer.tsx +4 -2
- package/src/core/primitives/popover/types.ts +5 -0
- package/src/core/primitives/radio/radio.tsx +2 -2
- package/src/core/primitives/select/select.tsx +2 -2
- package/src/core/{components → primitives}/skeleton/__workshop__/index.ts +1 -1
- package/src/core/{components → primitives}/skeleton/codeSkeleton.tsx +1 -1
- package/src/core/{components → primitives}/skeleton/headingSkeleton.tsx +1 -1
- package/src/core/{components → primitives}/skeleton/labelSkeleton.tsx +1 -1
- package/src/core/{components → primitives}/skeleton/skeleton.tsx +7 -8
- package/src/core/{components → primitives}/skeleton/textSkeleton.tsx +1 -1
- package/src/core/primitives/spinner/spinner.tsx +1 -1
- package/src/core/{utils → primitives}/srOnly/srOnly.tsx +1 -1
- package/src/core/primitives/stack/stack.tsx +2 -1
- package/src/core/primitives/switch/switch.tsx +2 -7
- package/src/core/primitives/text/__workshop__/colored.tsx +2 -2
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +17 -42
- package/src/core/primitives/text/text.tsx +3 -1
- package/src/core/primitives/textArea/__workshop__/plain.tsx +2 -2
- package/src/core/primitives/textArea/textArea.tsx +2 -2
- package/src/core/primitives/textInput/textInput.tsx +3 -2
- package/src/core/primitives/tooltip/constants.ts +1 -1
- package/src/core/primitives/tooltip/tooltip.tsx +6 -3
- package/src/core/primitives/tooltip/tooltipLayer.tsx +3 -2
- package/src/core/primitives/types.ts +8 -10
- package/src/core/types/radius.ts +1 -1
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +9 -5
- package/src/core/utils/elementQuery/elementQuery.tsx +2 -2
- package/src/core/utils/getElementRef.ts +1 -0
- package/src/core/utils/portal/portal.tsx +1 -1
- package/src/css/components/dialog/dialog.css.ts +26 -1
- package/src/css/components/dialog/dialog.ts +27 -7
- package/src/css/components/skeleton/skeleton.ts +3 -1
- package/src/css/components/skeleton/types.ts +3 -1
- package/src/css/index.ts +75 -5
- package/src/css/primitives/_input/input.ts +2 -1
- package/src/css/primitives/_input/types.ts +2 -1
- package/src/css/primitives/_selectable/_selectable.css.ts +32 -24
- package/src/css/primitives/_selectable/selectable.ts +1 -1
- package/src/css/primitives/_selectable/types.ts +1 -1
- package/src/css/primitives/avatar/avatar.css.ts +11 -2
- package/src/css/primitives/avatar/avatar.ts +1 -1
- package/src/css/primitives/badge/badge.css.ts +2 -1
- package/src/css/primitives/badge/types.ts +0 -2
- package/src/css/primitives/box/box.ts +35 -37
- package/src/css/primitives/box/types.ts +34 -36
- package/src/css/primitives/button/button.css.ts +4 -0
- package/src/css/primitives/button/button.ts +5 -2
- package/src/css/primitives/button/types.ts +4 -11
- package/src/css/primitives/card/__workshop__/color.tsx +70 -0
- package/src/css/primitives/card/__workshop__/index.ts +14 -0
- package/src/css/primitives/card/card.css.ts +4 -0
- package/src/css/primitives/code/code.ts +3 -1
- package/src/css/primitives/code/types.ts +2 -1
- package/src/css/primitives/container/container.ts +3 -1
- package/src/css/primitives/heading/heading.ts +4 -1
- package/src/css/primitives/heading/types.ts +3 -1
- package/src/css/primitives/kbd/kbd.ts +1 -1
- package/src/css/primitives/kbd/types.ts +1 -1
- package/src/css/primitives/label/label.css.ts +1 -0
- package/src/css/primitives/label/label.ts +4 -1
- package/src/css/primitives/label/types.ts +3 -1
- package/src/css/primitives/switch/switch.css.ts +1 -1
- package/src/css/primitives/text/text.ts +6 -1
- package/src/css/primitives/text/types.ts +5 -2
- package/src/css/props/width/types.ts +1 -1
- package/src/css/props/width/width.css.ts +3 -0
- package/src/theme/v2/build/buildTheme.test.ts +8 -8
- package/src/theme/v2/build/buildTheme.ts +32 -7
- package/src/theme/v3/defaultFonts.ts +6 -6
- package/src/theme/v3/defaultTokens.ts +1 -1
- package/bin/sanity-ui.cjs +0 -5
- package/dist/ui.css +0 -1
- package/src/cli/buildCommand.ts +0 -10
- package/src/cli/index.ts +0 -26
- package/src/core/components/autocomplete/index.ts +0 -2
- package/src/core/components/index.ts +0 -9
- package/src/core/helpers/index.ts +0 -5
- package/src/core/hooks/index.ts +0 -13
- package/src/core/observers/index.ts +0 -2
- package/src/core/primitives/index.ts +0 -27
- package/src/core/types/avatar.ts +0 -16
- package/src/core/types/card.ts +0 -4
- package/src/core/types/index.ts +0 -15
- package/src/core/types/popover.ts +0 -4
- package/src/core/utils/index.ts +0 -8
- package/src/css/__theme/index.ts +0 -16
- package/src/css/__theme/lib/contract/buildVarContract.ts +0 -78
- package/src/css/__theme/lib/contract/index.ts +0 -4
- package/src/css/__theme/lib/contract/types.ts +0 -17
- package/src/css/__theme/resolveTheme.ts +0 -865
- package/src/css/components/index.ts +0 -6
- package/src/css/primitives/index.ts +0 -24
- package/src/css/props/index.ts +0 -37
- package/src/css/utils/srOnly/index.ts +0 -1
- /package/src/core/{global.ts → __DEV__.ts} +0 -0
- /package/src/core/{types/dialog.ts → components/dialog/types.ts} +0 -0
- /package/src/core/{utils → components}/virtualList/__workshop__/changingProps.tsx +0 -0
- /package/src/core/{utils → components}/virtualList/__workshop__/elementScroll.tsx +0 -0
- /package/src/core/{utils → components}/virtualList/__workshop__/infiniteList.tsx +0 -0
- /package/src/core/{utils → components}/virtualList/__workshop__/windowScrolll.tsx +0 -0
- /package/src/core/{utils → components}/virtualList/index.ts +0 -0
- /package/src/core/observers/{resizeObserver.ts → resize.ts} +0 -0
- /package/src/core/{utils → primitives}/arrow/cmds.ts +0 -0
- /package/src/core/{utils → primitives}/arrow/index.ts +0 -0
- /package/src/core/{types/badge.ts → primitives/badge/types2.ts} +0 -0
- /package/src/core/{types/box.ts → primitives/box/types.ts} +0 -0
- /package/src/core/{types/button.ts → primitives/button/types.ts} +0 -0
- /package/src/core/{types/flex.ts → primitives/flex/types.ts} +0 -0
- /package/src/core/{types/grid.ts → primitives/grid/types.ts} +0 -0
- /package/src/core/{utils → primitives}/layer/__workshop__/_debug.tsx +0 -0
- /package/src/core/{utils → primitives}/layer/__workshop__/multipleRoots.tsx +0 -0
- /package/src/core/{utils → primitives}/layer/__workshop__/nested.tsx +0 -0
- /package/src/core/{utils → primitives}/layer/__workshop__/responsiveZOffset.tsx +0 -0
- /package/src/core/{utils → primitives}/layer/getLayerContext.test.ts +0 -0
- /package/src/core/{utils → primitives}/layer/getLayerContext.ts +0 -0
- /package/src/core/{utils → primitives}/layer/index.ts +0 -0
- /package/src/core/{utils → primitives}/layer/layerContext.ts +0 -0
- /package/src/core/{utils → primitives}/layer/types.ts +0 -0
- /package/src/core/{utils → primitives}/layer/useLayer.ts +0 -0
- /package/src/core/{components → primitives}/skeleton/__workshop__/delay.tsx +0 -0
- /package/src/core/{components → primitives}/skeleton/__workshop__/skeleton.tsx +0 -0
- /package/src/core/{components → primitives}/skeleton/index.ts +0 -0
- /package/src/core/{utils → primitives}/srOnly/index.ts +0 -0
- /package/src/core/types/{text.ts → textAlign.ts} +0 -0
- /package/src/css/{utils → primitives/srOnly}/index.ts +0 -0
- /package/src/css/{utils → primitives}/srOnly/srOnly.css.ts +0 -0
- /package/src/css/{utils → primitives}/srOnly/srOnly.ts +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -78,6 +78,7 @@ import {rgbToHex as rgbToHex_2} from '@sanity/ui/theme'
|
|
|
78
78
|
import {rgbToHsl as rgbToHsl_2} from '@sanity/ui/theme'
|
|
79
79
|
import {RootTheme as RootTheme_2} from '@sanity/ui/theme'
|
|
80
80
|
import {screen as screen_3} from '@sanity/ui/theme'
|
|
81
|
+
import {SelectableStyleProps} from '@sanity/ui/css'
|
|
81
82
|
import {SelectStyleProps} from '@sanity/ui/css'
|
|
82
83
|
import {ShadowStyleProps} from '@sanity/ui/css'
|
|
83
84
|
import {SkeletonStyleProps} from '@sanity/ui/css'
|
|
@@ -222,7 +223,7 @@ export declare type AutocompleteOwnProps<
|
|
|
222
223
|
filterOption?: (query: string, option: O) => boolean
|
|
223
224
|
icon?: ElementType_2 | ReactNode
|
|
224
225
|
/** @beta */
|
|
225
|
-
listBox?:
|
|
226
|
+
listBox?: BoxOwnProps
|
|
226
227
|
loading?: boolean
|
|
227
228
|
onChange?: (value: string) => void
|
|
228
229
|
onQueryChange?: (query: string | null) => void
|
|
@@ -443,12 +444,6 @@ export declare function Badge<E extends BadgeElementType = typeof DEFAULT_BADGE_
|
|
|
443
444
|
/** @public */
|
|
444
445
|
export declare type BadgeElementType = 'div' | 'span' | ComponentType
|
|
445
446
|
|
|
446
|
-
/**
|
|
447
|
-
* @public
|
|
448
|
-
* @deprecated No longer used
|
|
449
|
-
*/
|
|
450
|
-
export declare type BadgeMode = 'default' | 'outline'
|
|
451
|
-
|
|
452
447
|
/** @public */
|
|
453
448
|
export declare type BadgeOwnProps = PaddingStyleProps &
|
|
454
449
|
RadiusStyleProps & {
|
|
@@ -463,7 +458,7 @@ export declare type BadgeProps<E extends BadgeElementType = BadgeElementType> =
|
|
|
463
458
|
>
|
|
464
459
|
|
|
465
460
|
/** @public */
|
|
466
|
-
|
|
461
|
+
declare type BadgeTone = ThemeColorStateToneKey
|
|
467
462
|
|
|
468
463
|
/** @public */
|
|
469
464
|
export declare interface BaseAutocompleteOption {
|
|
@@ -832,13 +827,13 @@ export declare const DEFAULT_ARROW_ELEMENT = 'div'
|
|
|
832
827
|
export declare const DEFAULT_AUTOCOMPLETE_ELEMENT = 'input'
|
|
833
828
|
|
|
834
829
|
/** @public */
|
|
835
|
-
export declare const DEFAULT_AVATAR_COUNTER_ELEMENT = '
|
|
830
|
+
export declare const DEFAULT_AVATAR_COUNTER_ELEMENT = 'span'
|
|
836
831
|
|
|
837
832
|
/** @public */
|
|
838
833
|
export declare const DEFAULT_AVATAR_ELEMENT = 'span'
|
|
839
834
|
|
|
840
835
|
/** @public */
|
|
841
|
-
export declare const DEFAULT_AVATAR_STACK_ELEMENT = '
|
|
836
|
+
export declare const DEFAULT_AVATAR_STACK_ELEMENT = 'span'
|
|
842
837
|
|
|
843
838
|
/** @public */
|
|
844
839
|
export declare const DEFAULT_BADGE_ELEMENT = 'span'
|
|
@@ -924,6 +919,9 @@ export declare const DEFAULT_RADIO_ELEMENT = 'input'
|
|
|
924
919
|
/** @public */
|
|
925
920
|
export declare const DEFAULT_SELECT_ELEMENT = 'select'
|
|
926
921
|
|
|
922
|
+
/** @internal */
|
|
923
|
+
export declare const DEFAULT_SELECTABLE_ELEMENT = 'button'
|
|
924
|
+
|
|
927
925
|
/** @beta */
|
|
928
926
|
export declare const DEFAULT_SKELETON_ELEMENT = 'div'
|
|
929
927
|
|
|
@@ -2165,10 +2163,29 @@ export declare function Select<E extends SelectElementType = typeof DEFAULT_SELE
|
|
|
2165
2163
|
): JSX.Element
|
|
2166
2164
|
|
|
2167
2165
|
/** @internal */
|
|
2168
|
-
declare
|
|
2166
|
+
export declare function Selectable<
|
|
2167
|
+
E extends SelectableElementType = typeof DEFAULT_SELECTABLE_ELEMENT,
|
|
2168
|
+
>(props: SelectableProps<E>): JSX.Element
|
|
2169
|
+
|
|
2170
|
+
/** @internal */
|
|
2171
|
+
export declare type SelectableElementType = 'button' | 'a' | ComponentType
|
|
2172
|
+
|
|
2173
|
+
/** @internal */
|
|
2174
|
+
export declare type SelectableOwnProps = BoxOwnProps &
|
|
2175
|
+
SelectableStyleProps & {
|
|
2176
|
+
disabled?: boolean
|
|
2177
|
+
href?: string
|
|
2178
|
+
selected?: boolean
|
|
2179
|
+
tone?: ThemeColorStateToneKey
|
|
2180
|
+
type?: 'button'
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
/** @internal */
|
|
2184
|
+
export declare type SelectableProps<E extends SelectableElementType = SelectableElementType> =
|
|
2185
|
+
Props<SelectableOwnProps, E>
|
|
2169
2186
|
|
|
2170
2187
|
/**
|
|
2171
|
-
* @
|
|
2188
|
+
* @internal
|
|
2172
2189
|
* @deprecated Use `ThemeColorStateToneKey` instead
|
|
2173
2190
|
*/
|
|
2174
2191
|
export declare type SelectableTone = ThemeColorStateToneKey
|
|
@@ -2205,11 +2222,10 @@ export declare type SkeletonElementType = 'div' | 'span' | ComponentType
|
|
|
2205
2222
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2206
2223
|
* @beta
|
|
2207
2224
|
*/
|
|
2208
|
-
export declare type SkeletonOwnProps =
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
}
|
|
2225
|
+
export declare type SkeletonOwnProps = SkeletonStyleProps & {
|
|
2226
|
+
animated?: boolean
|
|
2227
|
+
delay?: number
|
|
2228
|
+
}
|
|
2213
2229
|
|
|
2214
2230
|
/** @beta */
|
|
2215
2231
|
export declare type SkeletonProps<E extends SkeletonElementType = SkeletonElementType> = Props<
|
|
@@ -2280,6 +2296,7 @@ export declare type StackOwnProps = Omit<
|
|
|
2280
2296
|
| 'direction'
|
|
2281
2297
|
| 'display'
|
|
2282
2298
|
| 'flexDirection'
|
|
2299
|
+
| 'flexWrap'
|
|
2283
2300
|
| 'gapX'
|
|
2284
2301
|
| 'gapY'
|
|
2285
2302
|
| 'justify'
|
|
@@ -2918,6 +2935,7 @@ export declare type TreeItemOwnProps = CardOwnProps & {
|
|
|
2918
2935
|
icon?: ElementType_2
|
|
2919
2936
|
/**
|
|
2920
2937
|
* Allows passing a custom element type to the link component
|
|
2938
|
+
* @internal
|
|
2921
2939
|
*/
|
|
2922
2940
|
linkAs?: SelectableElementType
|
|
2923
2941
|
onClick?: MouseEventHandler<HTMLAnchorElement | HTMLLIElement>
|
package/dist/index.d.ts
CHANGED
|
@@ -78,6 +78,7 @@ import {rgbToHex as rgbToHex_2} from '@sanity/ui/theme'
|
|
|
78
78
|
import {rgbToHsl as rgbToHsl_2} from '@sanity/ui/theme'
|
|
79
79
|
import {RootTheme as RootTheme_2} from '@sanity/ui/theme'
|
|
80
80
|
import {screen as screen_3} from '@sanity/ui/theme'
|
|
81
|
+
import {SelectableStyleProps} from '@sanity/ui/css'
|
|
81
82
|
import {SelectStyleProps} from '@sanity/ui/css'
|
|
82
83
|
import {ShadowStyleProps} from '@sanity/ui/css'
|
|
83
84
|
import {SkeletonStyleProps} from '@sanity/ui/css'
|
|
@@ -222,7 +223,7 @@ export declare type AutocompleteOwnProps<
|
|
|
222
223
|
filterOption?: (query: string, option: O) => boolean
|
|
223
224
|
icon?: ElementType_2 | ReactNode
|
|
224
225
|
/** @beta */
|
|
225
|
-
listBox?:
|
|
226
|
+
listBox?: BoxOwnProps
|
|
226
227
|
loading?: boolean
|
|
227
228
|
onChange?: (value: string) => void
|
|
228
229
|
onQueryChange?: (query: string | null) => void
|
|
@@ -443,12 +444,6 @@ export declare function Badge<E extends BadgeElementType = typeof DEFAULT_BADGE_
|
|
|
443
444
|
/** @public */
|
|
444
445
|
export declare type BadgeElementType = 'div' | 'span' | ComponentType
|
|
445
446
|
|
|
446
|
-
/**
|
|
447
|
-
* @public
|
|
448
|
-
* @deprecated No longer used
|
|
449
|
-
*/
|
|
450
|
-
export declare type BadgeMode = 'default' | 'outline'
|
|
451
|
-
|
|
452
447
|
/** @public */
|
|
453
448
|
export declare type BadgeOwnProps = PaddingStyleProps &
|
|
454
449
|
RadiusStyleProps & {
|
|
@@ -463,7 +458,7 @@ export declare type BadgeProps<E extends BadgeElementType = BadgeElementType> =
|
|
|
463
458
|
>
|
|
464
459
|
|
|
465
460
|
/** @public */
|
|
466
|
-
|
|
461
|
+
declare type BadgeTone = ThemeColorStateToneKey
|
|
467
462
|
|
|
468
463
|
/** @public */
|
|
469
464
|
export declare interface BaseAutocompleteOption {
|
|
@@ -832,13 +827,13 @@ export declare const DEFAULT_ARROW_ELEMENT = 'div'
|
|
|
832
827
|
export declare const DEFAULT_AUTOCOMPLETE_ELEMENT = 'input'
|
|
833
828
|
|
|
834
829
|
/** @public */
|
|
835
|
-
export declare const DEFAULT_AVATAR_COUNTER_ELEMENT = '
|
|
830
|
+
export declare const DEFAULT_AVATAR_COUNTER_ELEMENT = 'span'
|
|
836
831
|
|
|
837
832
|
/** @public */
|
|
838
833
|
export declare const DEFAULT_AVATAR_ELEMENT = 'span'
|
|
839
834
|
|
|
840
835
|
/** @public */
|
|
841
|
-
export declare const DEFAULT_AVATAR_STACK_ELEMENT = '
|
|
836
|
+
export declare const DEFAULT_AVATAR_STACK_ELEMENT = 'span'
|
|
842
837
|
|
|
843
838
|
/** @public */
|
|
844
839
|
export declare const DEFAULT_BADGE_ELEMENT = 'span'
|
|
@@ -924,6 +919,9 @@ export declare const DEFAULT_RADIO_ELEMENT = 'input'
|
|
|
924
919
|
/** @public */
|
|
925
920
|
export declare const DEFAULT_SELECT_ELEMENT = 'select'
|
|
926
921
|
|
|
922
|
+
/** @internal */
|
|
923
|
+
export declare const DEFAULT_SELECTABLE_ELEMENT = 'button'
|
|
924
|
+
|
|
927
925
|
/** @beta */
|
|
928
926
|
export declare const DEFAULT_SKELETON_ELEMENT = 'div'
|
|
929
927
|
|
|
@@ -2165,10 +2163,29 @@ export declare function Select<E extends SelectElementType = typeof DEFAULT_SELE
|
|
|
2165
2163
|
): JSX.Element
|
|
2166
2164
|
|
|
2167
2165
|
/** @internal */
|
|
2168
|
-
declare
|
|
2166
|
+
export declare function Selectable<
|
|
2167
|
+
E extends SelectableElementType = typeof DEFAULT_SELECTABLE_ELEMENT,
|
|
2168
|
+
>(props: SelectableProps<E>): JSX.Element
|
|
2169
|
+
|
|
2170
|
+
/** @internal */
|
|
2171
|
+
export declare type SelectableElementType = 'button' | 'a' | ComponentType
|
|
2172
|
+
|
|
2173
|
+
/** @internal */
|
|
2174
|
+
export declare type SelectableOwnProps = BoxOwnProps &
|
|
2175
|
+
SelectableStyleProps & {
|
|
2176
|
+
disabled?: boolean
|
|
2177
|
+
href?: string
|
|
2178
|
+
selected?: boolean
|
|
2179
|
+
tone?: ThemeColorStateToneKey
|
|
2180
|
+
type?: 'button'
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
/** @internal */
|
|
2184
|
+
export declare type SelectableProps<E extends SelectableElementType = SelectableElementType> =
|
|
2185
|
+
Props<SelectableOwnProps, E>
|
|
2169
2186
|
|
|
2170
2187
|
/**
|
|
2171
|
-
* @
|
|
2188
|
+
* @internal
|
|
2172
2189
|
* @deprecated Use `ThemeColorStateToneKey` instead
|
|
2173
2190
|
*/
|
|
2174
2191
|
export declare type SelectableTone = ThemeColorStateToneKey
|
|
@@ -2205,11 +2222,10 @@ export declare type SkeletonElementType = 'div' | 'span' | ComponentType
|
|
|
2205
2222
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2206
2223
|
* @beta
|
|
2207
2224
|
*/
|
|
2208
|
-
export declare type SkeletonOwnProps =
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
}
|
|
2225
|
+
export declare type SkeletonOwnProps = SkeletonStyleProps & {
|
|
2226
|
+
animated?: boolean
|
|
2227
|
+
delay?: number
|
|
2228
|
+
}
|
|
2213
2229
|
|
|
2214
2230
|
/** @beta */
|
|
2215
2231
|
export declare type SkeletonProps<E extends SkeletonElementType = SkeletonElementType> = Props<
|
|
@@ -2280,6 +2296,7 @@ export declare type StackOwnProps = Omit<
|
|
|
2280
2296
|
| 'direction'
|
|
2281
2297
|
| 'display'
|
|
2282
2298
|
| 'flexDirection'
|
|
2299
|
+
| 'flexWrap'
|
|
2283
2300
|
| 'gapX'
|
|
2284
2301
|
| 'gapY'
|
|
2285
2302
|
| 'justify'
|
|
@@ -2918,6 +2935,7 @@ export declare type TreeItemOwnProps = CardOwnProps & {
|
|
|
2918
2935
|
icon?: ElementType_2
|
|
2919
2936
|
/**
|
|
2920
2937
|
* Allows passing a custom element type to the link component
|
|
2938
|
+
* @internal
|
|
2921
2939
|
*/
|
|
2922
2940
|
linkAs?: SelectableElementType
|
|
2923
2941
|
onClick?: MouseEventHandler<HTMLAnchorElement | HTMLLIElement>
|