@sanity/ui 1.7.8 → 1.7.10
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.ts +346 -10
- package/dist/index.esm.js +20 -13
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +20 -13
- package/dist/index.js.map +1 -1
- package/package.json +22 -22
- package/src/components/dialog/styles.ts +1 -1
- package/src/components/menu/__workshop__/shouldFocus.tsx +1 -1
- package/src/components/menu/menuDivider.ts +2 -3
- package/src/components/menu/menuGroup.tsx +1 -1
- package/src/components/tree/style.ts +4 -4
- package/src/primitives/_selectable/style.ts +3 -3
- package/src/primitives/avatar/styles.ts +6 -3
- package/src/primitives/badge/styles.ts +1 -1
- package/src/primitives/box/box.tsx +1 -0
- package/src/primitives/button/styles.ts +3 -2
- package/src/primitives/card/styles.ts +4 -4
- package/src/primitives/checkbox/styles.ts +3 -3
- package/src/primitives/code/styles.ts +3 -5
- package/src/primitives/container/styles.ts +1 -1
- package/src/primitives/flex/flex.tsx +1 -0
- package/src/primitives/heading/styles.ts +2 -4
- package/src/primitives/inline/inline.tsx +8 -1
- package/src/primitives/inline/styles.ts +1 -1
- package/src/primitives/label/styles.ts +2 -2
- package/src/primitives/popover/popover.tsx +2 -0
- package/src/primitives/radio/styles.ts +3 -3
- package/src/primitives/select/styles.ts +6 -5
- package/src/primitives/stack/styles.ts +1 -1
- package/src/primitives/switch/styles.ts +6 -6
- package/src/primitives/text/styles.ts +2 -2
- package/src/styles/border/borderStyle.ts +1 -1
- package/src/styles/box/boxStyle.ts +1 -1
- package/src/styles/colorVars/colorVarsStyle.ts +1 -1
- package/src/styles/flex/flexItemStyle.ts +1 -1
- package/src/styles/flex/flexStyle.ts +1 -1
- package/src/styles/font/codeFontStyle.ts +1 -1
- package/src/styles/font/headingFontStyle.ts +1 -1
- package/src/styles/font/labelFontStyle.ts +1 -1
- package/src/styles/font/responsiveFont.ts +1 -1
- package/src/styles/font/textAlignStyle.ts +1 -1
- package/src/styles/font/textFontStyle.ts +1 -1
- package/src/styles/grid/gridItemStyle.ts +1 -1
- package/src/styles/grid/gridStyle.ts +1 -1
- package/src/styles/helpers.ts +1 -1
- package/src/styles/input/responsiveInputPaddingStyle.ts +1 -1
- package/src/styles/input/textInputStyle.ts +5 -4
- package/src/styles/margin/marginStyle.ts +1 -1
- package/src/styles/padding/paddingStyle.ts +1 -1
- package/src/styles/radius/radiusStyle.ts +1 -1
- package/src/styles/shadow/shadowStyle.ts +1 -1
- package/src/theme/types.ts +1 -1
- package/src/types/index.ts +1 -0
- package/src/types/styled.ts +9 -0
package/src/styles/helpers.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {css
|
|
1
|
+
import {css} from 'styled-components'
|
|
2
2
|
import {ThemeColorSchemeKey, ThemeFontWeightKey} from '../../theme'
|
|
3
3
|
import {CardTone} from '../../types'
|
|
4
|
+
import {CSSObject} from '../../types/styled'
|
|
4
5
|
import {focusRingBorderStyle, focusRingStyle} from '../focusRing'
|
|
5
6
|
import {rem, _responsive} from '../helpers'
|
|
6
7
|
import {ThemeProps} from '../types'
|
|
@@ -33,13 +34,13 @@ const ROOT_STYLE = css`
|
|
|
33
34
|
align-items: center;
|
|
34
35
|
`
|
|
35
36
|
|
|
36
|
-
export function textInputRootStyle():
|
|
37
|
+
export function textInputRootStyle(): ReturnType<typeof css> {
|
|
37
38
|
return ROOT_STYLE
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
export function textInputBaseStyle(
|
|
41
42
|
props: TextInputInputStyleProps & ThemeProps,
|
|
42
|
-
):
|
|
43
|
+
): ReturnType<typeof css> {
|
|
43
44
|
const {theme, $scheme, $tone, $weight} = props
|
|
44
45
|
const font = theme.sanity.fonts.text
|
|
45
46
|
const color = theme.sanity.color.input
|
|
@@ -127,7 +128,7 @@ export function textInputFontSizeStyle(props: TextInputInputStyleProps & ThemePr
|
|
|
127
128
|
|
|
128
129
|
export function textInputRepresentationStyle(
|
|
129
130
|
props: TextInputRepresentationStyleProps & ThemeProps,
|
|
130
|
-
):
|
|
131
|
+
): ReturnType<typeof css> {
|
|
131
132
|
const {$hasPrefix, $hasSuffix, $scheme, $tone, theme} = props
|
|
132
133
|
const {focusRing, input} = theme.sanity
|
|
133
134
|
const color = theme.sanity.color.input
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {CSSObject} from 'styled-components'
|
|
2
1
|
import {EMPTY_RECORD} from '../../constants'
|
|
3
2
|
import {BoxShadow, ThemeShadow} from '../../theme'
|
|
3
|
+
import {CSSObject} from '../../types/styled'
|
|
4
4
|
import {rem, _responsive} from '../helpers'
|
|
5
5
|
import {ThemeProps} from '../types'
|
|
6
6
|
import {ResponsiveShadowStyleProps} from './types'
|
package/src/theme/types.ts
CHANGED
package/src/types/index.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
// Workaround types that are missing in v6
|
|
3
|
+
// https://github.com/styled-components/styled-components/issues/4062
|
|
4
|
+
|
|
5
|
+
import type {StyledObject} from 'styled-components'
|
|
6
|
+
|
|
7
|
+
/** @internal */
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
+
export type CSSObject = StyledObject<any>
|