@sanity/ui 3.0.0-static.40 → 3.0.0-static.42
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/_chunks-cjs/_visual-editing.cjs +18 -18
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
- package/dist/_chunks-es/_visual-editing.js +18 -18
- package/dist/_chunks-es/_visual-editing.js.map +1 -1
- package/dist/css/index.cjs +51 -45
- package/dist/css/index.cjs.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/css/index.d.cts +16 -1
- package/dist/css/index.d.ts +16 -1
- package/dist/css/index.js +50 -45
- package/dist/css/index.js.map +1 -1
- package/package.json +1 -1
- package/src/core/utils/portal/portalProvider.tsx +3 -2
- package/src/css/getVarName.ts +27 -0
- package/src/css/index.ts +15 -12
- package/src/css/types.ts +4 -1
package/dist/css/index.d.cts
CHANGED
|
@@ -435,7 +435,10 @@ export declare type CSSThemeOptions = {
|
|
|
435
435
|
}
|
|
436
436
|
|
|
437
437
|
/** @public */
|
|
438
|
-
export declare type CSSVarFunction = `var(
|
|
438
|
+
export declare type CSSVarFunction = `var(${CSSVarName})`
|
|
439
|
+
|
|
440
|
+
/** @public */
|
|
441
|
+
export declare type CSSVarName = `--${string}`
|
|
439
442
|
|
|
440
443
|
/** @public */
|
|
441
444
|
export declare function dialog(props: {className?: string}): string | undefined
|
|
@@ -588,6 +591,18 @@ export declare interface GapStyleProps {
|
|
|
588
591
|
gapY?: ResponsiveProp<Space>
|
|
589
592
|
}
|
|
590
593
|
|
|
594
|
+
/**
|
|
595
|
+
* Extract the name of a CSS variable.
|
|
596
|
+
*
|
|
597
|
+
* @example
|
|
598
|
+
* ```ts
|
|
599
|
+
* getVarName('var(--color-primary)') // '--color-primary'
|
|
600
|
+
* ```
|
|
601
|
+
*
|
|
602
|
+
* @public
|
|
603
|
+
*/
|
|
604
|
+
export declare function getVarName(variable: CSSVarFunction): CSSVarName
|
|
605
|
+
|
|
591
606
|
/** @public */
|
|
592
607
|
export declare type GridAutoColumns = 'auto' | 'min' | 'max' | 'fr'
|
|
593
608
|
|
package/dist/css/index.d.ts
CHANGED
|
@@ -435,7 +435,10 @@ export declare type CSSThemeOptions = {
|
|
|
435
435
|
}
|
|
436
436
|
|
|
437
437
|
/** @public */
|
|
438
|
-
export declare type CSSVarFunction = `var(
|
|
438
|
+
export declare type CSSVarFunction = `var(${CSSVarName})`
|
|
439
|
+
|
|
440
|
+
/** @public */
|
|
441
|
+
export declare type CSSVarName = `--${string}`
|
|
439
442
|
|
|
440
443
|
/** @public */
|
|
441
444
|
export declare function dialog(props: {className?: string}): string | undefined
|
|
@@ -588,6 +591,18 @@ export declare interface GapStyleProps {
|
|
|
588
591
|
gapY?: ResponsiveProp<Space>
|
|
589
592
|
}
|
|
590
593
|
|
|
594
|
+
/**
|
|
595
|
+
* Extract the name of a CSS variable.
|
|
596
|
+
*
|
|
597
|
+
* @example
|
|
598
|
+
* ```ts
|
|
599
|
+
* getVarName('var(--color-primary)') // '--color-primary'
|
|
600
|
+
* ```
|
|
601
|
+
*
|
|
602
|
+
* @public
|
|
603
|
+
*/
|
|
604
|
+
export declare function getVarName(variable: CSSVarFunction): CSSVarName
|
|
605
|
+
|
|
591
606
|
/** @public */
|
|
592
607
|
export declare type GridAutoColumns = 'auto' | 'min' | 'max' | 'fr'
|
|
593
608
|
|