@griffel/core
Advanced tools
Comparing version 1.11.0 to 1.12.0
{ | ||
"name": "@griffel/core", | ||
"version": "1.11.0", | ||
"version": "1.12.0", | ||
"description": "DOM implementation of Atomic CSS-in-JS", | ||
@@ -15,3 +15,3 @@ "license": "MIT", | ||
"rtl-css-js": "^1.16.1", | ||
"stylis": "^4.0.13", | ||
"stylis": "^4.2.0", | ||
"tslib": "^2.1.0" | ||
@@ -18,0 +18,0 @@ }, |
@@ -5,8 +5,8 @@ 'use strict'; | ||
var compileCSS = require('./compileCSS.cjs.js'); | ||
var cssifyObject = require('./utils/cssifyObject.cjs.js'); | ||
var compileCSSRules = require('./compileCSSRules.cjs.js'); | ||
function compileStaticCSS(property, value) { | ||
const cssRule = `${property} {${cssifyObject.cssifyObject(value)}}`; | ||
return compileCSS.compileCSSRules(cssRule)[0]; | ||
return compileCSSRules.compileCSSRules(cssRule, false)[0]; | ||
} | ||
@@ -13,0 +13,0 @@ |
@@ -1,7 +0,7 @@ | ||
import { compileCSSRules } from './compileCSS.esm.js'; | ||
import { cssifyObject } from './utils/cssifyObject.esm.js'; | ||
import { compileCSSRules } from './compileCSSRules.esm.js'; | ||
function compileStaticCSS(property, value) { | ||
const cssRule = `${property} {${cssifyObject(value)}}`; | ||
return compileCSSRules(cssRule)[0]; | ||
return compileCSSRules(cssRule, false)[0]; | ||
} | ||
@@ -8,0 +8,0 @@ |
@@ -14,3 +14,4 @@ 'use strict'; | ||
var hyphenateProperty = require('./utils/hyphenateProperty.cjs.js'); | ||
var compileCSS = require('./compileCSS.cjs.js'); | ||
var compileAtomicCSSRule = require('./compileAtomicCSSRule.cjs.js'); | ||
var compileCSSRules = require('./compileCSSRules.cjs.js'); | ||
var compileKeyframeCSS = require('./compileKeyframeCSS.cjs.js'); | ||
@@ -89,3 +90,3 @@ var isContainerQuerySelector = require('./utils/isContainerQuerySelector.cjs.js'); | ||
if (isNestedSelector.isNestedSelector(property)) { | ||
const nestedSelector = compileCSS.normalizePseudoSelector(property); | ||
const nestedSelector = compileAtomicCSSRule.normalizePseudoSelector(property); | ||
const [ltrNested, rtlNested] = createStringFromStyles(value); | ||
@@ -113,3 +114,3 @@ ltrCSS += `${nestedSelector}{${ltrNested}}`; | ||
const ltrClassName = constants.RESET_HASH_PREFIX + hashString__default["default"](ltrRule); | ||
const ltrCSS = compileCSS.compileCSSRules(`.${ltrClassName}{${ltrRule}}`); | ||
const ltrCSS = compileCSSRules.compileCSSRules(`.${ltrClassName}{${ltrRule}}`, false); | ||
if (ltrRule === rtlRule) { | ||
@@ -119,3 +120,3 @@ return [ltrClassName, null, ltrCSS]; | ||
const rtlClassName = constants.RESET_HASH_PREFIX + hashString__default["default"](rtlRule); | ||
const rtlCSS = compileCSS.compileCSSRules(`.${rtlClassName}{${rtlRule}}`); | ||
const rtlCSS = compileCSSRules.compileCSSRules(`.${rtlClassName}{${rtlRule}}`, false); | ||
return [ltrClassName, rtlClassName, ltrCSS.concat(rtlCSS)]; | ||
@@ -122,0 +123,0 @@ } |
@@ -10,3 +10,4 @@ import hashString from '@emotion/hash'; | ||
import { hyphenateProperty } from './utils/hyphenateProperty.esm.js'; | ||
import { compileCSSRules, normalizePseudoSelector } from './compileCSS.esm.js'; | ||
import { normalizePseudoSelector } from './compileAtomicCSSRule.esm.js'; | ||
import { compileCSSRules } from './compileCSSRules.esm.js'; | ||
import { compileKeyframeRule, compileKeyframesCSS } from './compileKeyframeCSS.esm.js'; | ||
@@ -104,3 +105,3 @@ import { isContainerQuerySelector } from './utils/isContainerQuerySelector.esm.js'; | ||
const ltrClassName = RESET_HASH_PREFIX + hashString(ltrRule); | ||
const ltrCSS = compileCSSRules(`.${ltrClassName}{${ltrRule}}`); | ||
const ltrCSS = compileCSSRules(`.${ltrClassName}{${ltrRule}}`, false); | ||
if (ltrRule === rtlRule) { | ||
@@ -110,3 +111,3 @@ return [ltrClassName, null, ltrCSS]; | ||
const rtlClassName = RESET_HASH_PREFIX + hashString(rtlRule); | ||
const rtlCSS = compileCSSRules(`.${rtlClassName}{${rtlRule}}`); | ||
const rtlCSS = compileCSSRules(`.${rtlClassName}{${rtlRule}}`, false); | ||
return [ltrClassName, rtlClassName, ltrCSS.concat(rtlCSS)]; | ||
@@ -113,0 +114,0 @@ } |
@@ -5,8 +5,8 @@ 'use strict'; | ||
var compileCSSRules = require('./compileCSSRules.cjs.js'); | ||
var compileStaticCSS = require('./compileStaticCSS.cjs.js'); | ||
var compileCSS = require('./compileCSS.cjs.js'); | ||
function resolveStaticStyleRules(styles, result = {}) { | ||
if (typeof styles === 'string') { | ||
const cssRules = compileCSS.compileCSSRules(styles); | ||
const cssRules = compileCSSRules.compileCSSRules(styles, false); | ||
for (const rule of cssRules) { | ||
@@ -13,0 +13,0 @@ addResolvedStyles(rule, result); |
@@ -0,7 +1,7 @@ | ||
import { compileCSSRules } from './compileCSSRules.esm.js'; | ||
import { compileStaticCSS } from './compileStaticCSS.esm.js'; | ||
import { compileCSSRules } from './compileCSS.esm.js'; | ||
function resolveStaticStyleRules(styles, result = {}) { | ||
if (typeof styles === 'string') { | ||
const cssRules = compileCSSRules(styles); | ||
const cssRules = compileCSSRules(styles, false); | ||
for (const rule of cssRules) { | ||
@@ -8,0 +8,0 @@ addResolvedStyles(rule, result); |
@@ -8,3 +8,3 @@ 'use strict'; | ||
var constants = require('../constants.cjs.js'); | ||
var compileCSS = require('./compileCSS.cjs.js'); | ||
var compileAtomicCSSRule = require('./compileAtomicCSSRule.cjs.js'); | ||
var compileKeyframeCSS = require('./compileKeyframeCSS.cjs.js'); | ||
@@ -102,3 +102,3 @@ var generateCombinedMediaQuery = require('./utils/generateCombinedMediaQuery.cjs.js'); | ||
const styleBucketName = getStyleBucketName.getStyleBucketName(selectors, layer, media, support, container); | ||
const [ltrCSS, rtlCSS] = compileCSS.compileCSS({ | ||
const [ltrCSS, rtlCSS] = compileAtomicCSSRule.compileAtomicCSSRule({ | ||
className, | ||
@@ -188,3 +188,3 @@ media, | ||
const styleBucketName = getStyleBucketName.getStyleBucketName(selectors, layer, media, support, container); | ||
const [ltrCSS, rtlCSS] = compileCSS.compileCSS({ | ||
const [ltrCSS, rtlCSS] = compileAtomicCSSRule.compileAtomicCSSRule({ | ||
className, | ||
@@ -191,0 +191,0 @@ media, |
import hashString from '@emotion/hash'; | ||
import { convertProperty, convert } from 'rtl-css-js/core'; | ||
import { UNSUPPORTED_CSS_PROPERTIES, HASH_PREFIX } from '../constants.esm.js'; | ||
import { compileCSS } from './compileCSS.esm.js'; | ||
import { compileAtomicCSSRule } from './compileAtomicCSSRule.esm.js'; | ||
import { compileKeyframeRule, compileKeyframesCSS } from './compileKeyframeCSS.esm.js'; | ||
@@ -93,3 +93,3 @@ import { generateCombinedQuery } from './utils/generateCombinedMediaQuery.esm.js'; | ||
const styleBucketName = getStyleBucketName(selectors, layer, media, support, container); | ||
const [ltrCSS, rtlCSS] = compileCSS({ | ||
const [ltrCSS, rtlCSS] = compileAtomicCSSRule({ | ||
className, | ||
@@ -179,3 +179,3 @@ media, | ||
const styleBucketName = getStyleBucketName(selectors, layer, media, support, container); | ||
const [ltrCSS, rtlCSS] = compileCSS({ | ||
const [ltrCSS, rtlCSS] = compileAtomicCSSRule({ | ||
className, | ||
@@ -182,0 +182,0 @@ media, |
@@ -1,2 +0,2 @@ | ||
import { GriffelStaticStyle } from '../types'; | ||
import type { GriffelStaticStyle } from '../types'; | ||
export declare function compileStaticCSS(property: string, value: GriffelStaticStyle): string; |
@@ -1,2 +0,2 @@ | ||
import { GriffelStaticStyles, CSSRulesByBucket } from '../types'; | ||
import type { GriffelStaticStyles, CSSRulesByBucket } from '../types'; | ||
export declare function resolveStaticStyleRules(styles: GriffelStaticStyles, result?: CSSRulesByBucket): CSSRulesByBucket; |
@@ -26,1 +26,5 @@ import * as CSS from 'csstype'; | ||
export declare type TransitionGlobalInput = CSS.Globals; | ||
export declare type TextDecorationStyleInput = CSS.Property.TextDecorationStyle; | ||
export declare type TextDecorationLineInput = ValueOrArray<CSS.Property.TextDecorationLine>; | ||
export declare type TextDecorationColorInput = ValueOrArray<CSS.Property.TextDecorationColor>; | ||
export declare type TextDecorationThicknessInput = ValueOrArray<CSS.Property.TextDecorationThickness>; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
640163
375
6065
Updatedstylis@^4.2.0