styled-components 5.3.2 → 6.0.0-alpha.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/LICENSE +21 -0
- package/README.md +187 -0
- package/dist/base.d.ts +17 -0
- package/dist/constants.d.ts +8 -0
- package/dist/constructors/constructWithOptions.d.ts +19 -0
- package/dist/constructors/createGlobalStyle.d.ts +3 -0
- package/dist/constructors/css.d.ts +4 -0
- package/dist/constructors/keyframes.d.ts +3 -0
- package/dist/constructors/styled.d.ts +185 -0
- package/dist/hoc/withTheme.d.ts +3 -0
- package/dist/hoc/withTheme.spec.d.ts +1 -0
- package/dist/hooks/useTheme.d.ts +3 -0
- package/dist/index-standalone.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/macro/index.d.ts +2 -0
- package/dist/models/ComponentStyle.d.ts +15 -0
- package/dist/models/GlobalStyle.d.ts +11 -0
- package/dist/models/InlineStyle.d.ts +6 -0
- package/dist/models/Keyframes.d.ts +11 -0
- package/dist/models/ServerStyleSheet.d.ts +15 -0
- package/dist/models/StyleSheetManager.d.ts +21 -0
- package/dist/models/StyledComponent.d.ts +3 -0
- package/dist/models/StyledNativeComponent.d.ts +3 -0
- package/dist/models/ThemeProvider.d.ts +17 -0
- package/dist/native/index.d.ts +64 -0
- package/dist/primitives/index.d.ts +22 -0
- package/dist/secretInternals.d.ts +5 -0
- package/dist/sheet/GroupIDAllocator.d.ts +4 -0
- package/dist/sheet/GroupedTag.d.ts +11 -0
- package/dist/sheet/Rehydration.d.ts +3 -0
- package/dist/sheet/Sheet.d.ts +40 -0
- package/dist/sheet/Tag.d.ts +54 -0
- package/dist/sheet/dom.d.ts +4 -0
- package/dist/sheet/index.d.ts +1 -0
- package/dist/sheet/types.d.ts +34 -0
- package/dist/styled-components-macro.cjs.js +1 -1
- package/dist/styled-components-macro.cjs.js.map +1 -1
- package/dist/styled-components-macro.esm.js +1 -1
- package/dist/styled-components-macro.esm.js.map +1 -1
- package/dist/styled-components.browser.cjs.js +1 -1
- package/dist/styled-components.browser.cjs.js.map +1 -1
- package/dist/styled-components.browser.esm.js +1 -1
- package/dist/styled-components.browser.esm.js.map +1 -1
- package/dist/styled-components.cjs.js +1 -1
- package/dist/styled-components.cjs.js.map +1 -1
- package/dist/styled-components.esm.js +1 -1
- package/dist/styled-components.esm.js.map +1 -1
- package/dist/styled-components.js +1 -1
- package/dist/styled-components.js.map +1 -1
- package/dist/styled-components.min.js +1 -1
- package/dist/styled-components.min.js.map +1 -1
- package/dist/test/globals.d.ts +2 -0
- package/dist/test/utils.d.ts +191 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +120 -0
- package/dist/utils/addUnitIfNeeded.d.ts +1 -0
- package/dist/utils/checkDynamicCreation.d.ts +1 -0
- package/dist/utils/createWarnTooManyClasses.d.ts +3 -0
- package/dist/utils/determineTheme.d.ts +2 -0
- package/dist/utils/domElements.d.ts +2 -0
- package/dist/utils/empties.d.ts +3 -0
- package/dist/utils/error.d.ts +5 -0
- package/dist/utils/errors.d.ts +20 -0
- package/dist/utils/escape.d.ts +5 -0
- package/dist/utils/flatten.d.ts +4 -0
- package/dist/utils/generateAlphabeticName.d.ts +1 -0
- package/dist/utils/generateComponentId.d.ts +1 -0
- package/dist/utils/generateDisplayName.d.ts +2 -0
- package/dist/utils/getComponentName.d.ts +2 -0
- package/dist/utils/hash.d.ts +3 -0
- package/dist/utils/hoist.d.ts +51 -0
- package/dist/utils/hyphenateStyleName.d.ts +14 -0
- package/dist/utils/interleave.d.ts +2 -0
- package/dist/utils/isFunction.d.ts +1 -0
- package/dist/utils/isPlainObject.d.ts +1 -0
- package/dist/utils/isStatelessFunction.d.ts +1 -0
- package/dist/utils/isStaticRules.d.ts +2 -0
- package/dist/utils/isStyledComponent.d.ts +2 -0
- package/dist/utils/isTag.d.ts +2 -0
- package/dist/utils/joinStrings.d.ts +4 -0
- package/dist/utils/mixinDeep.d.ts +7 -0
- package/dist/utils/nonce.d.ts +1 -0
- package/dist/utils/stylis.d.ts +9 -0
- package/native/dist/base.d.ts +17 -0
- package/native/dist/base.d.ts.map +1 -0
- package/native/dist/constants.d.ts +8 -0
- package/native/dist/constants.d.ts.map +1 -0
- package/native/dist/constructors/constructWithOptions.d.ts +19 -0
- package/native/dist/constructors/constructWithOptions.d.ts.map +1 -0
- package/native/dist/constructors/createGlobalStyle.d.ts +3 -0
- package/native/dist/constructors/createGlobalStyle.d.ts.map +1 -0
- package/native/dist/constructors/css.d.ts +4 -0
- package/native/dist/constructors/css.d.ts.map +1 -0
- package/native/dist/constructors/keyframes.d.ts +3 -0
- package/native/dist/constructors/keyframes.d.ts.map +1 -0
- package/native/dist/constructors/styled.d.ts +185 -0
- package/native/dist/constructors/styled.d.ts.map +1 -0
- package/native/dist/dist/base.d.ts +18 -0
- package/native/dist/dist/base.d.ts.map +1 -0
- package/native/dist/dist/constants.d.ts +9 -0
- package/native/dist/dist/constants.d.ts.map +1 -0
- package/native/dist/dist/constructors/constructWithOptions.d.ts +20 -0
- package/native/dist/dist/constructors/constructWithOptions.d.ts.map +1 -0
- package/native/dist/dist/constructors/createGlobalStyle.d.ts +4 -0
- package/native/dist/dist/constructors/createGlobalStyle.d.ts.map +1 -0
- package/native/dist/dist/constructors/css.d.ts +5 -0
- package/native/dist/dist/constructors/css.d.ts.map +1 -0
- package/native/dist/dist/constructors/keyframes.d.ts +4 -0
- package/native/dist/dist/constructors/keyframes.d.ts.map +1 -0
- package/native/dist/dist/constructors/styled.d.ts +186 -0
- package/native/dist/dist/constructors/styled.d.ts.map +1 -0
- package/native/dist/dist/hoc/withTheme.d.ts +4 -0
- package/native/dist/dist/hoc/withTheme.d.ts.map +1 -0
- package/native/dist/dist/hoc/withTheme.spec.d.ts +2 -0
- package/native/dist/dist/hoc/withTheme.spec.d.ts.map +1 -0
- package/native/dist/dist/hooks/useTheme.d.ts +4 -0
- package/native/dist/dist/hooks/useTheme.d.ts.map +1 -0
- package/native/dist/dist/index-standalone.d.ts +3 -0
- package/native/dist/dist/index-standalone.d.ts.map +1 -0
- package/native/dist/dist/index.d.ts +4 -0
- package/native/dist/dist/index.d.ts.map +1 -0
- package/native/dist/dist/macro/index.d.ts +3 -0
- package/native/dist/dist/macro/index.d.ts.map +1 -0
- package/native/dist/dist/macro/test/babel.config.d.ts +1 -0
- package/native/dist/dist/macro/test/babel.config.d.ts.map +1 -0
- package/native/dist/dist/models/ComponentStyle.d.ts +16 -0
- package/native/dist/dist/models/ComponentStyle.d.ts.map +1 -0
- package/native/dist/dist/models/GlobalStyle.d.ts +12 -0
- package/native/dist/dist/models/GlobalStyle.d.ts.map +1 -0
- package/native/dist/dist/models/InlineStyle.d.ts +7 -0
- package/native/dist/dist/models/InlineStyle.d.ts.map +1 -0
- package/native/dist/dist/models/Keyframes.d.ts +12 -0
- package/native/dist/dist/models/Keyframes.d.ts.map +1 -0
- package/native/dist/dist/models/ServerStyleSheet.d.ts +16 -0
- package/native/dist/dist/models/ServerStyleSheet.d.ts.map +1 -0
- package/native/dist/dist/models/StyleSheetManager.d.ts +22 -0
- package/native/dist/dist/models/StyleSheetManager.d.ts.map +1 -0
- package/native/dist/dist/models/StyledComponent.d.ts +4 -0
- package/native/dist/dist/models/StyledComponent.d.ts.map +1 -0
- package/native/dist/dist/models/StyledNativeComponent.d.ts +4 -0
- package/native/dist/dist/models/StyledNativeComponent.d.ts.map +1 -0
- package/native/dist/dist/models/ThemeProvider.d.ts +18 -0
- package/native/dist/dist/models/ThemeProvider.d.ts.map +1 -0
- package/native/dist/dist/native/index.d.ts +65 -0
- package/native/dist/dist/native/index.d.ts.map +1 -0
- package/native/dist/dist/primitives/index.d.ts +23 -0
- package/native/dist/dist/primitives/index.d.ts.map +1 -0
- package/native/dist/dist/secretInternals.d.ts +6 -0
- package/native/dist/dist/secretInternals.d.ts.map +1 -0
- package/native/dist/dist/sheet/GroupIDAllocator.d.ts +5 -0
- package/native/dist/dist/sheet/GroupIDAllocator.d.ts.map +1 -0
- package/native/dist/dist/sheet/GroupedTag.d.ts +12 -0
- package/native/dist/dist/sheet/GroupedTag.d.ts.map +1 -0
- package/native/dist/dist/sheet/Rehydration.d.ts +4 -0
- package/native/dist/dist/sheet/Rehydration.d.ts.map +1 -0
- package/native/dist/dist/sheet/Sheet.d.ts +41 -0
- package/native/dist/dist/sheet/Sheet.d.ts.map +1 -0
- package/native/dist/dist/sheet/Tag.d.ts +55 -0
- package/native/dist/dist/sheet/Tag.d.ts.map +1 -0
- package/native/dist/dist/sheet/dom.d.ts +5 -0
- package/native/dist/dist/sheet/dom.d.ts.map +1 -0
- package/native/dist/dist/sheet/index.d.ts +2 -0
- package/native/dist/dist/sheet/index.d.ts.map +1 -0
- package/native/dist/dist/sheet/types.d.ts +35 -0
- package/native/dist/dist/sheet/types.d.ts.map +1 -0
- package/native/dist/dist/test/globals.d.ts +3 -0
- package/native/dist/dist/test/globals.d.ts.map +1 -0
- package/native/dist/dist/test/utils.d.ts +192 -0
- package/native/dist/dist/test/utils.d.ts.map +1 -0
- package/native/dist/dist/types.d.ts +121 -0
- package/native/dist/dist/types.d.ts.map +1 -0
- package/native/dist/dist/utils/addUnitIfNeeded.d.ts +2 -0
- package/native/dist/dist/utils/addUnitIfNeeded.d.ts.map +1 -0
- package/native/dist/dist/utils/checkDynamicCreation.d.ts +2 -0
- package/native/dist/dist/utils/checkDynamicCreation.d.ts.map +1 -0
- package/native/dist/dist/utils/createWarnTooManyClasses.d.ts +4 -0
- package/native/dist/dist/utils/createWarnTooManyClasses.d.ts.map +1 -0
- package/native/dist/dist/utils/determineTheme.d.ts +3 -0
- package/native/dist/dist/utils/determineTheme.d.ts.map +1 -0
- package/native/dist/dist/utils/domElements.d.ts +3 -0
- package/native/dist/dist/utils/domElements.d.ts.map +1 -0
- package/native/dist/dist/utils/empties.d.ts +4 -0
- package/native/dist/dist/utils/empties.d.ts.map +1 -0
- package/native/dist/dist/utils/error.d.ts +6 -0
- package/native/dist/dist/utils/error.d.ts.map +1 -0
- package/native/dist/dist/utils/errors.d.ts +21 -0
- package/native/dist/dist/utils/errors.d.ts.map +1 -0
- package/native/dist/dist/utils/escape.d.ts +6 -0
- package/native/dist/dist/utils/escape.d.ts.map +1 -0
- package/native/dist/dist/utils/flatten.d.ts +5 -0
- package/native/dist/dist/utils/flatten.d.ts.map +1 -0
- package/native/dist/dist/utils/generateAlphabeticName.d.ts +2 -0
- package/native/dist/dist/utils/generateAlphabeticName.d.ts.map +1 -0
- package/native/dist/dist/utils/generateComponentId.d.ts +2 -0
- package/native/dist/dist/utils/generateComponentId.d.ts.map +1 -0
- package/native/dist/dist/utils/generateDisplayName.d.ts +3 -0
- package/native/dist/dist/utils/generateDisplayName.d.ts.map +1 -0
- package/native/dist/dist/utils/getComponentName.d.ts +3 -0
- package/native/dist/dist/utils/getComponentName.d.ts.map +1 -0
- package/native/dist/dist/utils/hash.d.ts +4 -0
- package/native/dist/dist/utils/hash.d.ts.map +1 -0
- package/native/dist/dist/utils/hoist.d.ts +52 -0
- package/native/dist/dist/utils/hoist.d.ts.map +1 -0
- package/native/dist/dist/utils/hyphenateStyleName.d.ts +15 -0
- package/native/dist/dist/utils/hyphenateStyleName.d.ts.map +1 -0
- package/native/dist/dist/utils/interleave.d.ts +3 -0
- package/native/dist/dist/utils/interleave.d.ts.map +1 -0
- package/native/dist/dist/utils/isFunction.d.ts +2 -0
- package/native/dist/dist/utils/isFunction.d.ts.map +1 -0
- package/native/dist/dist/utils/isPlainObject.d.ts +2 -0
- package/native/dist/dist/utils/isPlainObject.d.ts.map +1 -0
- package/native/dist/dist/utils/isStatelessFunction.d.ts +2 -0
- package/native/dist/dist/utils/isStatelessFunction.d.ts.map +1 -0
- package/native/dist/dist/utils/isStaticRules.d.ts +3 -0
- package/native/dist/dist/utils/isStaticRules.d.ts.map +1 -0
- package/native/dist/dist/utils/isStyledComponent.d.ts +3 -0
- package/native/dist/dist/utils/isStyledComponent.d.ts.map +1 -0
- package/native/dist/dist/utils/isTag.d.ts +3 -0
- package/native/dist/dist/utils/isTag.d.ts.map +1 -0
- package/native/dist/dist/utils/joinStrings.d.ts +5 -0
- package/native/dist/dist/utils/joinStrings.d.ts.map +1 -0
- package/native/dist/dist/utils/mixinDeep.d.ts +8 -0
- package/native/dist/dist/utils/mixinDeep.d.ts.map +1 -0
- package/native/dist/dist/utils/nonce.d.ts +2 -0
- package/native/dist/dist/utils/nonce.d.ts.map +1 -0
- package/native/dist/dist/utils/stylis.d.ts +10 -0
- package/native/dist/dist/utils/stylis.d.ts.map +1 -0
- package/native/dist/hoc/withTheme.d.ts +3 -0
- package/native/dist/hoc/withTheme.d.ts.map +1 -0
- package/native/dist/hoc/withTheme.spec.d.ts +1 -0
- package/native/dist/hoc/withTheme.spec.d.ts.map +1 -0
- package/native/dist/hooks/useTheme.d.ts +3 -0
- package/native/dist/hooks/useTheme.d.ts.map +1 -0
- package/native/dist/index-standalone.d.ts +2 -0
- package/native/dist/index-standalone.d.ts.map +1 -0
- package/native/dist/index.d.ts +3 -0
- package/native/dist/index.d.ts.map +1 -0
- package/native/dist/macro/index.d.ts +2 -0
- package/native/dist/macro/index.d.ts.map +1 -0
- package/native/dist/macro/test/babel.config.d.ts +1 -0
- package/native/dist/macro/test/babel.config.d.ts.map +1 -0
- package/native/dist/models/ComponentStyle.d.ts +15 -0
- package/native/dist/models/ComponentStyle.d.ts.map +1 -0
- package/native/dist/models/GlobalStyle.d.ts +11 -0
- package/native/dist/models/GlobalStyle.d.ts.map +1 -0
- package/native/dist/models/InlineStyle.d.ts +6 -0
- package/native/dist/models/InlineStyle.d.ts.map +1 -0
- package/native/dist/models/Keyframes.d.ts +11 -0
- package/native/dist/models/Keyframes.d.ts.map +1 -0
- package/native/dist/models/ServerStyleSheet.d.ts +15 -0
- package/native/dist/models/ServerStyleSheet.d.ts.map +1 -0
- package/native/dist/models/StyleSheetManager.d.ts +21 -0
- package/native/dist/models/StyleSheetManager.d.ts.map +1 -0
- package/native/dist/models/StyledComponent.d.ts +3 -0
- package/native/dist/models/StyledComponent.d.ts.map +1 -0
- package/native/dist/models/StyledNativeComponent.d.ts +3 -0
- package/native/dist/models/StyledNativeComponent.d.ts.map +1 -0
- package/native/dist/models/ThemeProvider.d.ts +17 -0
- package/native/dist/models/ThemeProvider.d.ts.map +1 -0
- package/native/dist/native/index.d.ts +64 -0
- package/native/dist/native/index.d.ts.map +1 -0
- package/native/dist/primitives/index.d.ts +22 -0
- package/native/dist/primitives/index.d.ts.map +1 -0
- package/native/dist/secretInternals.d.ts +5 -0
- package/native/dist/secretInternals.d.ts.map +1 -0
- package/native/dist/sheet/GroupIDAllocator.d.ts +4 -0
- package/native/dist/sheet/GroupIDAllocator.d.ts.map +1 -0
- package/native/dist/sheet/GroupedTag.d.ts +11 -0
- package/native/dist/sheet/GroupedTag.d.ts.map +1 -0
- package/native/dist/sheet/Rehydration.d.ts +3 -0
- package/native/dist/sheet/Rehydration.d.ts.map +1 -0
- package/native/dist/sheet/Sheet.d.ts +40 -0
- package/native/dist/sheet/Sheet.d.ts.map +1 -0
- package/native/dist/sheet/Tag.d.ts +54 -0
- package/native/dist/sheet/Tag.d.ts.map +1 -0
- package/native/dist/sheet/dom.d.ts +4 -0
- package/native/dist/sheet/dom.d.ts.map +1 -0
- package/native/dist/sheet/index.d.ts +1 -0
- package/native/dist/sheet/index.d.ts.map +1 -0
- package/native/dist/sheet/types.d.ts +34 -0
- package/native/dist/sheet/types.d.ts.map +1 -0
- package/native/dist/styled-components.native.cjs.js +1157 -6115
- package/native/dist/styled-components.native.cjs.js.map +1 -1
- package/native/dist/styled-components.native.esm.js +1153 -6115
- package/native/dist/styled-components.native.esm.js.map +1 -1
- package/native/dist/test/globals.d.ts +2 -0
- package/native/dist/test/globals.d.ts.map +1 -0
- package/native/dist/test/utils.d.ts +191 -0
- package/native/dist/test/utils.d.ts.map +1 -0
- package/native/dist/types.d.ts +120 -0
- package/native/dist/types.d.ts.map +1 -0
- package/native/dist/utils/addUnitIfNeeded.d.ts +1 -0
- package/native/dist/utils/addUnitIfNeeded.d.ts.map +1 -0
- package/native/dist/utils/checkDynamicCreation.d.ts +1 -0
- package/native/dist/utils/checkDynamicCreation.d.ts.map +1 -0
- package/native/dist/utils/createWarnTooManyClasses.d.ts +3 -0
- package/native/dist/utils/createWarnTooManyClasses.d.ts.map +1 -0
- package/native/dist/utils/determineTheme.d.ts +2 -0
- package/native/dist/utils/determineTheme.d.ts.map +1 -0
- package/native/dist/utils/domElements.d.ts +2 -0
- package/native/dist/utils/domElements.d.ts.map +1 -0
- package/native/dist/utils/empties.d.ts +3 -0
- package/native/dist/utils/empties.d.ts.map +1 -0
- package/native/dist/utils/error.d.ts +5 -0
- package/native/dist/utils/error.d.ts.map +1 -0
- package/native/dist/utils/errors.d.ts +20 -0
- package/native/dist/utils/errors.d.ts.map +1 -0
- package/native/dist/utils/escape.d.ts +5 -0
- package/native/dist/utils/escape.d.ts.map +1 -0
- package/native/dist/utils/flatten.d.ts +4 -0
- package/native/dist/utils/flatten.d.ts.map +1 -0
- package/native/dist/utils/generateAlphabeticName.d.ts +1 -0
- package/native/dist/utils/generateAlphabeticName.d.ts.map +1 -0
- package/native/dist/utils/generateComponentId.d.ts +1 -0
- package/native/dist/utils/generateComponentId.d.ts.map +1 -0
- package/native/dist/utils/generateDisplayName.d.ts +2 -0
- package/native/dist/utils/generateDisplayName.d.ts.map +1 -0
- package/native/dist/utils/getComponentName.d.ts +2 -0
- package/native/dist/utils/getComponentName.d.ts.map +1 -0
- package/native/dist/utils/hash.d.ts +3 -0
- package/native/dist/utils/hash.d.ts.map +1 -0
- package/native/dist/utils/hoist.d.ts +51 -0
- package/native/dist/utils/hoist.d.ts.map +1 -0
- package/native/dist/utils/hyphenateStyleName.d.ts +14 -0
- package/native/dist/utils/hyphenateStyleName.d.ts.map +1 -0
- package/native/dist/utils/interleave.d.ts +2 -0
- package/native/dist/utils/interleave.d.ts.map +1 -0
- package/native/dist/utils/isFunction.d.ts +1 -0
- package/native/dist/utils/isFunction.d.ts.map +1 -0
- package/native/dist/utils/isPlainObject.d.ts +1 -0
- package/native/dist/utils/isPlainObject.d.ts.map +1 -0
- package/native/dist/utils/isStatelessFunction.d.ts +1 -0
- package/native/dist/utils/isStatelessFunction.d.ts.map +1 -0
- package/native/dist/utils/isStaticRules.d.ts +2 -0
- package/native/dist/utils/isStaticRules.d.ts.map +1 -0
- package/native/dist/utils/isStyledComponent.d.ts +2 -0
- package/native/dist/utils/isStyledComponent.d.ts.map +1 -0
- package/native/dist/utils/isTag.d.ts +2 -0
- package/native/dist/utils/isTag.d.ts.map +1 -0
- package/native/dist/utils/joinStrings.d.ts +4 -0
- package/native/dist/utils/joinStrings.d.ts.map +1 -0
- package/native/dist/utils/mixinDeep.d.ts +7 -0
- package/native/dist/utils/mixinDeep.d.ts.map +1 -0
- package/native/dist/utils/nonce.d.ts +1 -0
- package/native/dist/utils/nonce.d.ts.map +1 -0
- package/native/dist/utils/stylis.d.ts +9 -0
- package/native/dist/utils/stylis.d.ts.map +1 -0
- package/package.json +72 -44
- package/primitives/dist/base.d.ts +17 -0
- package/primitives/dist/base.d.ts.map +1 -0
- package/primitives/dist/constants.d.ts +8 -0
- package/primitives/dist/constants.d.ts.map +1 -0
- package/primitives/dist/constructors/constructWithOptions.d.ts +19 -0
- package/primitives/dist/constructors/constructWithOptions.d.ts.map +1 -0
- package/primitives/dist/constructors/createGlobalStyle.d.ts +3 -0
- package/primitives/dist/constructors/createGlobalStyle.d.ts.map +1 -0
- package/primitives/dist/constructors/css.d.ts +4 -0
- package/primitives/dist/constructors/css.d.ts.map +1 -0
- package/primitives/dist/constructors/keyframes.d.ts +3 -0
- package/primitives/dist/constructors/keyframes.d.ts.map +1 -0
- package/primitives/dist/constructors/styled.d.ts +185 -0
- package/primitives/dist/constructors/styled.d.ts.map +1 -0
- package/primitives/dist/dist/base.d.ts +18 -0
- package/primitives/dist/dist/base.d.ts.map +1 -0
- package/primitives/dist/dist/constants.d.ts +9 -0
- package/primitives/dist/dist/constants.d.ts.map +1 -0
- package/primitives/dist/dist/constructors/constructWithOptions.d.ts +20 -0
- package/primitives/dist/dist/constructors/constructWithOptions.d.ts.map +1 -0
- package/primitives/dist/dist/constructors/createGlobalStyle.d.ts +4 -0
- package/primitives/dist/dist/constructors/createGlobalStyle.d.ts.map +1 -0
- package/primitives/dist/dist/constructors/css.d.ts +5 -0
- package/primitives/dist/dist/constructors/css.d.ts.map +1 -0
- package/primitives/dist/dist/constructors/keyframes.d.ts +4 -0
- package/primitives/dist/dist/constructors/keyframes.d.ts.map +1 -0
- package/primitives/dist/dist/constructors/styled.d.ts +186 -0
- package/primitives/dist/dist/constructors/styled.d.ts.map +1 -0
- package/primitives/dist/dist/hoc/withTheme.d.ts +4 -0
- package/primitives/dist/dist/hoc/withTheme.d.ts.map +1 -0
- package/primitives/dist/dist/hoc/withTheme.spec.d.ts +2 -0
- package/primitives/dist/dist/hoc/withTheme.spec.d.ts.map +1 -0
- package/primitives/dist/dist/hooks/useTheme.d.ts +4 -0
- package/primitives/dist/dist/hooks/useTheme.d.ts.map +1 -0
- package/primitives/dist/dist/index-standalone.d.ts +3 -0
- package/primitives/dist/dist/index-standalone.d.ts.map +1 -0
- package/primitives/dist/dist/index.d.ts +4 -0
- package/primitives/dist/dist/index.d.ts.map +1 -0
- package/primitives/dist/dist/macro/index.d.ts +3 -0
- package/primitives/dist/dist/macro/index.d.ts.map +1 -0
- package/primitives/dist/dist/macro/test/babel.config.d.ts +1 -0
- package/primitives/dist/dist/macro/test/babel.config.d.ts.map +1 -0
- package/primitives/dist/dist/models/ComponentStyle.d.ts +16 -0
- package/primitives/dist/dist/models/ComponentStyle.d.ts.map +1 -0
- package/primitives/dist/dist/models/GlobalStyle.d.ts +12 -0
- package/primitives/dist/dist/models/GlobalStyle.d.ts.map +1 -0
- package/primitives/dist/dist/models/InlineStyle.d.ts +7 -0
- package/primitives/dist/dist/models/InlineStyle.d.ts.map +1 -0
- package/primitives/dist/dist/models/Keyframes.d.ts +12 -0
- package/primitives/dist/dist/models/Keyframes.d.ts.map +1 -0
- package/primitives/dist/dist/models/ServerStyleSheet.d.ts +16 -0
- package/primitives/dist/dist/models/ServerStyleSheet.d.ts.map +1 -0
- package/primitives/dist/dist/models/StyleSheetManager.d.ts +22 -0
- package/primitives/dist/dist/models/StyleSheetManager.d.ts.map +1 -0
- package/primitives/dist/dist/models/StyledComponent.d.ts +4 -0
- package/primitives/dist/dist/models/StyledComponent.d.ts.map +1 -0
- package/primitives/dist/dist/models/StyledNativeComponent.d.ts +4 -0
- package/primitives/dist/dist/models/StyledNativeComponent.d.ts.map +1 -0
- package/primitives/dist/dist/models/ThemeProvider.d.ts +18 -0
- package/primitives/dist/dist/models/ThemeProvider.d.ts.map +1 -0
- package/primitives/dist/dist/native/index.d.ts +65 -0
- package/primitives/dist/dist/native/index.d.ts.map +1 -0
- package/primitives/dist/dist/primitives/index.d.ts +23 -0
- package/primitives/dist/dist/primitives/index.d.ts.map +1 -0
- package/primitives/dist/dist/secretInternals.d.ts +6 -0
- package/primitives/dist/dist/secretInternals.d.ts.map +1 -0
- package/primitives/dist/dist/sheet/GroupIDAllocator.d.ts +5 -0
- package/primitives/dist/dist/sheet/GroupIDAllocator.d.ts.map +1 -0
- package/primitives/dist/dist/sheet/GroupedTag.d.ts +12 -0
- package/primitives/dist/dist/sheet/GroupedTag.d.ts.map +1 -0
- package/primitives/dist/dist/sheet/Rehydration.d.ts +4 -0
- package/primitives/dist/dist/sheet/Rehydration.d.ts.map +1 -0
- package/primitives/dist/dist/sheet/Sheet.d.ts +41 -0
- package/primitives/dist/dist/sheet/Sheet.d.ts.map +1 -0
- package/primitives/dist/dist/sheet/Tag.d.ts +55 -0
- package/primitives/dist/dist/sheet/Tag.d.ts.map +1 -0
- package/primitives/dist/dist/sheet/dom.d.ts +5 -0
- package/primitives/dist/dist/sheet/dom.d.ts.map +1 -0
- package/primitives/dist/dist/sheet/index.d.ts +2 -0
- package/primitives/dist/dist/sheet/index.d.ts.map +1 -0
- package/primitives/dist/dist/sheet/types.d.ts +35 -0
- package/primitives/dist/dist/sheet/types.d.ts.map +1 -0
- package/primitives/dist/dist/test/globals.d.ts +3 -0
- package/primitives/dist/dist/test/globals.d.ts.map +1 -0
- package/primitives/dist/dist/test/utils.d.ts +192 -0
- package/primitives/dist/dist/test/utils.d.ts.map +1 -0
- package/primitives/dist/dist/types.d.ts +121 -0
- package/primitives/dist/dist/types.d.ts.map +1 -0
- package/primitives/dist/dist/utils/addUnitIfNeeded.d.ts +2 -0
- package/primitives/dist/dist/utils/addUnitIfNeeded.d.ts.map +1 -0
- package/primitives/dist/dist/utils/checkDynamicCreation.d.ts +2 -0
- package/primitives/dist/dist/utils/checkDynamicCreation.d.ts.map +1 -0
- package/primitives/dist/dist/utils/createWarnTooManyClasses.d.ts +4 -0
- package/primitives/dist/dist/utils/createWarnTooManyClasses.d.ts.map +1 -0
- package/primitives/dist/dist/utils/determineTheme.d.ts +3 -0
- package/primitives/dist/dist/utils/determineTheme.d.ts.map +1 -0
- package/primitives/dist/dist/utils/domElements.d.ts +3 -0
- package/primitives/dist/dist/utils/domElements.d.ts.map +1 -0
- package/primitives/dist/dist/utils/empties.d.ts +4 -0
- package/primitives/dist/dist/utils/empties.d.ts.map +1 -0
- package/primitives/dist/dist/utils/error.d.ts +6 -0
- package/primitives/dist/dist/utils/error.d.ts.map +1 -0
- package/primitives/dist/dist/utils/errors.d.ts +21 -0
- package/primitives/dist/dist/utils/errors.d.ts.map +1 -0
- package/primitives/dist/dist/utils/escape.d.ts +6 -0
- package/primitives/dist/dist/utils/escape.d.ts.map +1 -0
- package/primitives/dist/dist/utils/flatten.d.ts +5 -0
- package/primitives/dist/dist/utils/flatten.d.ts.map +1 -0
- package/primitives/dist/dist/utils/generateAlphabeticName.d.ts +2 -0
- package/primitives/dist/dist/utils/generateAlphabeticName.d.ts.map +1 -0
- package/primitives/dist/dist/utils/generateComponentId.d.ts +2 -0
- package/primitives/dist/dist/utils/generateComponentId.d.ts.map +1 -0
- package/primitives/dist/dist/utils/generateDisplayName.d.ts +3 -0
- package/primitives/dist/dist/utils/generateDisplayName.d.ts.map +1 -0
- package/primitives/dist/dist/utils/getComponentName.d.ts +3 -0
- package/primitives/dist/dist/utils/getComponentName.d.ts.map +1 -0
- package/primitives/dist/dist/utils/hash.d.ts +4 -0
- package/primitives/dist/dist/utils/hash.d.ts.map +1 -0
- package/primitives/dist/dist/utils/hoist.d.ts +52 -0
- package/primitives/dist/dist/utils/hoist.d.ts.map +1 -0
- package/primitives/dist/dist/utils/hyphenateStyleName.d.ts +15 -0
- package/primitives/dist/dist/utils/hyphenateStyleName.d.ts.map +1 -0
- package/primitives/dist/dist/utils/interleave.d.ts +3 -0
- package/primitives/dist/dist/utils/interleave.d.ts.map +1 -0
- package/primitives/dist/dist/utils/isFunction.d.ts +2 -0
- package/primitives/dist/dist/utils/isFunction.d.ts.map +1 -0
- package/primitives/dist/dist/utils/isPlainObject.d.ts +2 -0
- package/primitives/dist/dist/utils/isPlainObject.d.ts.map +1 -0
- package/primitives/dist/dist/utils/isStatelessFunction.d.ts +2 -0
- package/primitives/dist/dist/utils/isStatelessFunction.d.ts.map +1 -0
- package/primitives/dist/dist/utils/isStaticRules.d.ts +3 -0
- package/primitives/dist/dist/utils/isStaticRules.d.ts.map +1 -0
- package/primitives/dist/dist/utils/isStyledComponent.d.ts +3 -0
- package/primitives/dist/dist/utils/isStyledComponent.d.ts.map +1 -0
- package/primitives/dist/dist/utils/isTag.d.ts +3 -0
- package/primitives/dist/dist/utils/isTag.d.ts.map +1 -0
- package/primitives/dist/dist/utils/joinStrings.d.ts +5 -0
- package/primitives/dist/dist/utils/joinStrings.d.ts.map +1 -0
- package/primitives/dist/dist/utils/mixinDeep.d.ts +8 -0
- package/primitives/dist/dist/utils/mixinDeep.d.ts.map +1 -0
- package/primitives/dist/dist/utils/nonce.d.ts +2 -0
- package/primitives/dist/dist/utils/nonce.d.ts.map +1 -0
- package/primitives/dist/dist/utils/stylis.d.ts +10 -0
- package/primitives/dist/dist/utils/stylis.d.ts.map +1 -0
- package/primitives/dist/hoc/withTheme.d.ts +3 -0
- package/primitives/dist/hoc/withTheme.d.ts.map +1 -0
- package/primitives/dist/hoc/withTheme.spec.d.ts +1 -0
- package/primitives/dist/hoc/withTheme.spec.d.ts.map +1 -0
- package/primitives/dist/hooks/useTheme.d.ts +3 -0
- package/primitives/dist/hooks/useTheme.d.ts.map +1 -0
- package/primitives/dist/index-standalone.d.ts +2 -0
- package/primitives/dist/index-standalone.d.ts.map +1 -0
- package/primitives/dist/index.d.ts +3 -0
- package/primitives/dist/index.d.ts.map +1 -0
- package/primitives/dist/macro/index.d.ts +2 -0
- package/primitives/dist/macro/index.d.ts.map +1 -0
- package/primitives/dist/macro/test/babel.config.d.ts +1 -0
- package/primitives/dist/macro/test/babel.config.d.ts.map +1 -0
- package/primitives/dist/models/ComponentStyle.d.ts +15 -0
- package/primitives/dist/models/ComponentStyle.d.ts.map +1 -0
- package/primitives/dist/models/GlobalStyle.d.ts +11 -0
- package/primitives/dist/models/GlobalStyle.d.ts.map +1 -0
- package/primitives/dist/models/InlineStyle.d.ts +6 -0
- package/primitives/dist/models/InlineStyle.d.ts.map +1 -0
- package/primitives/dist/models/Keyframes.d.ts +11 -0
- package/primitives/dist/models/Keyframes.d.ts.map +1 -0
- package/primitives/dist/models/ServerStyleSheet.d.ts +15 -0
- package/primitives/dist/models/ServerStyleSheet.d.ts.map +1 -0
- package/primitives/dist/models/StyleSheetManager.d.ts +21 -0
- package/primitives/dist/models/StyleSheetManager.d.ts.map +1 -0
- package/primitives/dist/models/StyledComponent.d.ts +3 -0
- package/primitives/dist/models/StyledComponent.d.ts.map +1 -0
- package/primitives/dist/models/StyledNativeComponent.d.ts +3 -0
- package/primitives/dist/models/StyledNativeComponent.d.ts.map +1 -0
- package/primitives/dist/models/ThemeProvider.d.ts +17 -0
- package/primitives/dist/models/ThemeProvider.d.ts.map +1 -0
- package/primitives/dist/native/index.d.ts +64 -0
- package/primitives/dist/native/index.d.ts.map +1 -0
- package/primitives/dist/primitives/index.d.ts +22 -0
- package/primitives/dist/primitives/index.d.ts.map +1 -0
- package/primitives/dist/secretInternals.d.ts +5 -0
- package/primitives/dist/secretInternals.d.ts.map +1 -0
- package/primitives/dist/sheet/GroupIDAllocator.d.ts +4 -0
- package/primitives/dist/sheet/GroupIDAllocator.d.ts.map +1 -0
- package/primitives/dist/sheet/GroupedTag.d.ts +11 -0
- package/primitives/dist/sheet/GroupedTag.d.ts.map +1 -0
- package/primitives/dist/sheet/Rehydration.d.ts +3 -0
- package/primitives/dist/sheet/Rehydration.d.ts.map +1 -0
- package/primitives/dist/sheet/Sheet.d.ts +40 -0
- package/primitives/dist/sheet/Sheet.d.ts.map +1 -0
- package/primitives/dist/sheet/Tag.d.ts +54 -0
- package/primitives/dist/sheet/Tag.d.ts.map +1 -0
- package/primitives/dist/sheet/dom.d.ts +4 -0
- package/primitives/dist/sheet/dom.d.ts.map +1 -0
- package/primitives/dist/sheet/index.d.ts +1 -0
- package/primitives/dist/sheet/index.d.ts.map +1 -0
- package/primitives/dist/sheet/types.d.ts +34 -0
- package/primitives/dist/sheet/types.d.ts.map +1 -0
- package/primitives/dist/styled-components-primitives.cjs.js +1107 -6115
- package/primitives/dist/styled-components-primitives.cjs.js.map +1 -1
- package/primitives/dist/styled-components-primitives.esm.js +1101 -6114
- package/primitives/dist/styled-components-primitives.esm.js.map +1 -1
- package/primitives/dist/test/globals.d.ts +2 -0
- package/primitives/dist/test/globals.d.ts.map +1 -0
- package/primitives/dist/test/utils.d.ts +191 -0
- package/primitives/dist/test/utils.d.ts.map +1 -0
- package/primitives/dist/types.d.ts +120 -0
- package/primitives/dist/types.d.ts.map +1 -0
- package/primitives/dist/utils/addUnitIfNeeded.d.ts +1 -0
- package/primitives/dist/utils/addUnitIfNeeded.d.ts.map +1 -0
- package/primitives/dist/utils/checkDynamicCreation.d.ts +1 -0
- package/primitives/dist/utils/checkDynamicCreation.d.ts.map +1 -0
- package/primitives/dist/utils/createWarnTooManyClasses.d.ts +3 -0
- package/primitives/dist/utils/createWarnTooManyClasses.d.ts.map +1 -0
- package/primitives/dist/utils/determineTheme.d.ts +2 -0
- package/primitives/dist/utils/determineTheme.d.ts.map +1 -0
- package/primitives/dist/utils/domElements.d.ts +2 -0
- package/primitives/dist/utils/domElements.d.ts.map +1 -0
- package/primitives/dist/utils/empties.d.ts +3 -0
- package/primitives/dist/utils/empties.d.ts.map +1 -0
- package/primitives/dist/utils/error.d.ts +5 -0
- package/primitives/dist/utils/error.d.ts.map +1 -0
- package/primitives/dist/utils/errors.d.ts +20 -0
- package/primitives/dist/utils/errors.d.ts.map +1 -0
- package/primitives/dist/utils/escape.d.ts +5 -0
- package/primitives/dist/utils/escape.d.ts.map +1 -0
- package/primitives/dist/utils/flatten.d.ts +4 -0
- package/primitives/dist/utils/flatten.d.ts.map +1 -0
- package/primitives/dist/utils/generateAlphabeticName.d.ts +1 -0
- package/primitives/dist/utils/generateAlphabeticName.d.ts.map +1 -0
- package/primitives/dist/utils/generateComponentId.d.ts +1 -0
- package/primitives/dist/utils/generateComponentId.d.ts.map +1 -0
- package/primitives/dist/utils/generateDisplayName.d.ts +2 -0
- package/primitives/dist/utils/generateDisplayName.d.ts.map +1 -0
- package/primitives/dist/utils/getComponentName.d.ts +2 -0
- package/primitives/dist/utils/getComponentName.d.ts.map +1 -0
- package/primitives/dist/utils/hash.d.ts +3 -0
- package/primitives/dist/utils/hash.d.ts.map +1 -0
- package/primitives/dist/utils/hoist.d.ts +51 -0
- package/primitives/dist/utils/hoist.d.ts.map +1 -0
- package/primitives/dist/utils/hyphenateStyleName.d.ts +14 -0
- package/primitives/dist/utils/hyphenateStyleName.d.ts.map +1 -0
- package/primitives/dist/utils/interleave.d.ts +2 -0
- package/primitives/dist/utils/interleave.d.ts.map +1 -0
- package/primitives/dist/utils/isFunction.d.ts +1 -0
- package/primitives/dist/utils/isFunction.d.ts.map +1 -0
- package/primitives/dist/utils/isPlainObject.d.ts +1 -0
- package/primitives/dist/utils/isPlainObject.d.ts.map +1 -0
- package/primitives/dist/utils/isStatelessFunction.d.ts +1 -0
- package/primitives/dist/utils/isStatelessFunction.d.ts.map +1 -0
- package/primitives/dist/utils/isStaticRules.d.ts +2 -0
- package/primitives/dist/utils/isStaticRules.d.ts.map +1 -0
- package/primitives/dist/utils/isStyledComponent.d.ts +2 -0
- package/primitives/dist/utils/isStyledComponent.d.ts.map +1 -0
- package/primitives/dist/utils/isTag.d.ts +2 -0
- package/primitives/dist/utils/isTag.d.ts.map +1 -0
- package/primitives/dist/utils/joinStrings.d.ts +4 -0
- package/primitives/dist/utils/joinStrings.d.ts.map +1 -0
- package/primitives/dist/utils/mixinDeep.d.ts +7 -0
- package/primitives/dist/utils/mixinDeep.d.ts.map +1 -0
- package/primitives/dist/utils/nonce.d.ts +1 -0
- package/primitives/dist/utils/nonce.d.ts.map +1 -0
- package/primitives/dist/utils/stylis.d.ts +9 -0
- package/primitives/dist/utils/stylis.d.ts.map +1 -0
- package/test-utils/{index.js → index.ts} +10 -13
- package/test-utils/{setupTestFramework.js → setupTestFramework.ts} +2 -5
- package/scripts/generateErrorMap.js +0 -22
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016-present Glen Maddern and Maximilian Stoiber
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<a href="https://www.styled-components.com">
|
|
3
|
+
<img alt="styled-components" src="https://raw.githubusercontent.com/styled-components/brand/master/styled-components.png" height="150px" />
|
|
4
|
+
</a>
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<br />
|
|
8
|
+
|
|
9
|
+
<div align="center">
|
|
10
|
+
<strong>Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅</strong>
|
|
11
|
+
<br />
|
|
12
|
+
<br />
|
|
13
|
+
<a href="https://www.npmjs.com/package/styled-components"><img src="https://www.styled-components.com/proxy/downloads.svg" alt="downloads: 600k/month"></a>
|
|
14
|
+
<a href="#backers" alt="sponsors on Open Collective"><img src="https://opencollective.com/styled-components/backers/badge.svg" /></a> <a href="#sponsors" alt="Sponsors on Open Collective"><img src="https://opencollective.com/styled-components/sponsors/badge.svg" /></a> <a href="https://discord.gg/hfGUrbrxaU">
|
|
15
|
+
<img alt="Discord" src="https://img.shields.io/discord/818449605409767454?logo=discord" /></a>
|
|
16
|
+
<a href="https://bundlephobia.com/result?p=styled-components" title="styled-components latest minified+gzip size"><img src="https://badgen.net/bundlephobia/minzip/styled-components" alt="gzip size"></a>
|
|
17
|
+
<a href="#alternative-installation-methods"><img src="https://img.shields.io/badge/module%20formats-umd%2C%20cjs%2C%20esm-green.svg" alt="module formats: umd, cjs, esm"></a>
|
|
18
|
+
<a href="https://codecov.io/gh/styled-components/styled-components"><img src="https://codecov.io/gh/styled-components/styled-components/coverage.svg?branch=main" alt="Code Coverage"></a>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Looking for v5?
|
|
24
|
+
|
|
25
|
+
The `main` branch is under development of the upcoming v6 major version of styled-components. For changes targeting v5, please point your PRs at the `legacy-v5` branch.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
Utilising [tagged template literals](https://www.styled-components.com/docs/advanced#tagged-template-literals) (a recent addition to JavaScript) and the [power of CSS](https://www.styled-components.com/docs/api#supported-css), `styled-components` allows you to write actual CSS code to style your components. It also removes the mapping between components and styles – using components as a low-level styling construct could not be easier!
|
|
30
|
+
|
|
31
|
+
```jsx
|
|
32
|
+
const Button = styled.button`
|
|
33
|
+
color: grey;
|
|
34
|
+
`;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Alternatively, you may use [style objects](https://www.styled-components.com/docs/advanced#style-objects). This allows for easy porting of CSS from inline styles, while still supporting the more advanced styled-components capabilities like component selectors and media queries.
|
|
38
|
+
|
|
39
|
+
```jsx
|
|
40
|
+
const Button = styled.button({
|
|
41
|
+
color: 'grey',
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Equivalent to:
|
|
46
|
+
|
|
47
|
+
```jsx
|
|
48
|
+
const Button = styled.button`
|
|
49
|
+
color: grey;
|
|
50
|
+
`;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`styled-components` is compatible with both React (for web) and React Native – meaning it's the perfect choice even for truly universal apps! See the [documentation about React Native](https://www.styled-components.com/docs/basics#react-native) for more information.
|
|
54
|
+
|
|
55
|
+
_Supported by [Front End Center](https://frontend.center). Thank you for making this possible!_
|
|
56
|
+
|
|
57
|
+
## Upgrading from v4
|
|
58
|
+
|
|
59
|
+
1. `npm install styled-components@^5.0.0 react@^16.8 react-dom@^16.8 react-is@^16.8`
|
|
60
|
+
1. ??
|
|
61
|
+
1. Profit!
|
|
62
|
+
|
|
63
|
+
> If you use jest-styled-components, make sure you update that too.
|
|
64
|
+
|
|
65
|
+
## [Docs](https://www.styled-components.com/docs)
|
|
66
|
+
|
|
67
|
+
**See the documentation at [styled-components.com/docs](https://www.styled-components.com/docs)** for more information about using `styled-components`!
|
|
68
|
+
|
|
69
|
+
Quicklinks to some of the most-visited pages:
|
|
70
|
+
|
|
71
|
+
- [**Getting started**](https://www.styled-components.com/docs/basics)
|
|
72
|
+
- [API Reference](https://styled-components.com/docs/api)
|
|
73
|
+
- [Theming](https://www.styled-components.com/docs/advanced#theming)
|
|
74
|
+
- [Server-side rendering](https://www.styled-components.com/docs/advanced#server-side-rendering)
|
|
75
|
+
- [Tagged Template Literals explained](https://www.styled-components.com/docs/advanced#tagged-template-literals)
|
|
76
|
+
|
|
77
|
+
## Example
|
|
78
|
+
|
|
79
|
+
<!-- prettier-ignore -->
|
|
80
|
+
```JSX
|
|
81
|
+
import React from 'react';
|
|
82
|
+
|
|
83
|
+
import styled from 'styled-components';
|
|
84
|
+
|
|
85
|
+
// Create a <Title> react component that renders an <h1> which is
|
|
86
|
+
// centered, palevioletred and sized at 1.5em
|
|
87
|
+
const Title = styled.h1`
|
|
88
|
+
font-size: 1.5em;
|
|
89
|
+
text-align: center;
|
|
90
|
+
color: palevioletred;
|
|
91
|
+
`;
|
|
92
|
+
|
|
93
|
+
// Create a <Wrapper> react component that renders a <section> with
|
|
94
|
+
// some padding and a papayawhip background
|
|
95
|
+
const Wrapper = styled.section`
|
|
96
|
+
padding: 4em;
|
|
97
|
+
background: papayawhip;
|
|
98
|
+
`;
|
|
99
|
+
|
|
100
|
+
// Use them like any other React component – except they're styled!
|
|
101
|
+
<Wrapper>
|
|
102
|
+
<Title>Hello World, this is my first styled component!</Title>
|
|
103
|
+
</Wrapper>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
This is what you'll see in your browser:
|
|
107
|
+
|
|
108
|
+
<div align="center">
|
|
109
|
+
<a href="https://styled-components.com">
|
|
110
|
+
<img alt="Screenshot of the above code ran in a browser" src="http://i.imgur.com/wUJpcjY.jpg" />
|
|
111
|
+
</a>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
## Babel Macro
|
|
115
|
+
|
|
116
|
+
If you're using tooling that has babel-plugin-macros set up, you can switch to the `styled-components/macro` import path instead to gain the effects of the babel plugin without further setup.
|
|
117
|
+
|
|
118
|
+
```js
|
|
119
|
+
import styled from 'styled-components/macro';
|
|
120
|
+
|
|
121
|
+
// A static className will be generated for Title (important for SSR)
|
|
122
|
+
const Title = styled.h1`
|
|
123
|
+
font-size: 1.5em;
|
|
124
|
+
text-align: center;
|
|
125
|
+
color: palevioletred;
|
|
126
|
+
`;
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
If you wish to provide configuration options to the babel plugin similar to how you would in a `.babelrc`, [see this guide](https://github.com/kentcdodds/babel-plugin-macros/blob/main/other/docs/author.md#config-experimental). The config name is `"styledComponents"`.
|
|
130
|
+
|
|
131
|
+
## Built with `styled-components`
|
|
132
|
+
|
|
133
|
+
A lot of hard work goes into community libraries, projects, and guides. A lot of them make it easier to get started or help you with your next project! There’s also a whole lot of interesting apps and sites that people have built using styled-components.
|
|
134
|
+
|
|
135
|
+
Make sure to head over to [awesome-styled-components](https://github.com/styled-components/awesome-styled-components) to see them all! And please contribute and add your own work to the list so others can find it.
|
|
136
|
+
|
|
137
|
+
## Contributing
|
|
138
|
+
|
|
139
|
+
If you want to contribute to `styled-components` please see our [contributing and community guidelines](./CONTRIBUTING.md), they'll help you get set up locally and explain the whole process.
|
|
140
|
+
|
|
141
|
+
Please also note that all repositories under the `styled-components` organization follow our [Code of Conduct](./CODE_OF_CONDUCT.md), make sure to review and follow it.
|
|
142
|
+
|
|
143
|
+
## Badge
|
|
144
|
+
|
|
145
|
+
Let everyone know you're using _styled-components_ → [](https://github.com/styled-components/styled-components)
|
|
146
|
+
|
|
147
|
+
```md
|
|
148
|
+
[](https://github.com/styled-components/styled-components)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Contributors
|
|
152
|
+
|
|
153
|
+
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
|
154
|
+
<a href="https://github.com/styled-components/styled-components/graphs/contributors"><img src="https://opencollective.com/styled-components/contributors.svg?width=890" /></a>
|
|
155
|
+
|
|
156
|
+
## Backers
|
|
157
|
+
|
|
158
|
+
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/styled-components#backer)]
|
|
159
|
+
|
|
160
|
+
<a href="https://opencollective.com/styled-components#backers" target="_blank"><img src="https://opencollective.com/styled-components/backers.svg?width=890"></a>
|
|
161
|
+
|
|
162
|
+
## Sponsors
|
|
163
|
+
|
|
164
|
+
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/styled-components#sponsor)]
|
|
165
|
+
|
|
166
|
+
<a href="https://opencollective.com/styled-components/sponsor/0/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/0/avatar.svg"></a>
|
|
167
|
+
<a href="https://opencollective.com/styled-components/sponsor/1/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/1/avatar.svg"></a>
|
|
168
|
+
<a href="https://opencollective.com/styled-components/sponsor/2/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/2/avatar.svg"></a>
|
|
169
|
+
<a href="https://opencollective.com/styled-components/sponsor/3/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/3/avatar.svg"></a>
|
|
170
|
+
<a href="https://opencollective.com/styled-components/sponsor/4/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/4/avatar.svg"></a>
|
|
171
|
+
<a href="https://opencollective.com/styled-components/sponsor/5/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/5/avatar.svg"></a>
|
|
172
|
+
<a href="https://opencollective.com/styled-components/sponsor/6/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/6/avatar.svg"></a>
|
|
173
|
+
<a href="https://opencollective.com/styled-components/sponsor/7/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/7/avatar.svg"></a>
|
|
174
|
+
<a href="https://opencollective.com/styled-components/sponsor/8/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/8/avatar.svg"></a>
|
|
175
|
+
<a href="https://opencollective.com/styled-components/sponsor/9/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/9/avatar.svg"></a>
|
|
176
|
+
|
|
177
|
+
## License
|
|
178
|
+
|
|
179
|
+
Licensed under the MIT License, Copyright © 2016-present Glen Maddern and Maximilian Stoiber.
|
|
180
|
+
|
|
181
|
+
See [LICENSE](./LICENSE) for more information.
|
|
182
|
+
|
|
183
|
+
## Acknowledgements
|
|
184
|
+
|
|
185
|
+
This project builds on a long line of earlier work by clever folks all around the world. We'd like to thank Charlie Somerville, Nik Graf, Sunil Pai, Michael Chan, Andrey Popp, Jed Watson & Andrey Sitnik who contributed ideas, code or inspiration.
|
|
186
|
+
|
|
187
|
+
Special thanks to [@okonet](https://github.com/okonet) for the fantastic logo.
|
package/dist/base.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SC_VERSION } from './constants';
|
|
2
|
+
import createGlobalStyle from './constructors/createGlobalStyle';
|
|
3
|
+
import css from './constructors/css';
|
|
4
|
+
import keyframes from './constructors/keyframes';
|
|
5
|
+
import withTheme from './hoc/withTheme';
|
|
6
|
+
import useTheme from './hooks/useTheme';
|
|
7
|
+
import ServerStyleSheet from './models/ServerStyleSheet';
|
|
8
|
+
import StyleSheetManager, { StyleSheetConsumer, StyleSheetContext } from './models/StyleSheetManager';
|
|
9
|
+
import ThemeProvider, { ThemeConsumer, ThemeContext } from './models/ThemeProvider';
|
|
10
|
+
import isStyledComponent from './utils/isStyledComponent';
|
|
11
|
+
declare global {
|
|
12
|
+
interface Window {
|
|
13
|
+
'__styled-components-init__'?: number;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export * from './secretInternals';
|
|
17
|
+
export { createGlobalStyle, css, isStyledComponent, keyframes, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, useTheme, SC_VERSION as version, withTheme, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const SC_ATTR: string;
|
|
2
|
+
export declare const SC_ATTR_ACTIVE = "active";
|
|
3
|
+
export declare const SC_ATTR_VERSION = "data-styled-version";
|
|
4
|
+
export declare const SC_VERSION: string;
|
|
5
|
+
export declare const SPLITTER = "/*!sc*/\n";
|
|
6
|
+
export declare const IS_BROWSER: boolean;
|
|
7
|
+
export declare const DISABLE_SPEEDY: boolean;
|
|
8
|
+
export declare const STATIC_EXECUTION_CONTEXT: {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Attrs, Interpolation, IStyledComponent, IStyledComponentFactory, IStyledNativeComponent, IStyledNativeComponentFactory, NativeTarget, StyledNativeOptions, StyledOptions, StyledTarget, Styles, WebTarget } from '../types';
|
|
2
|
+
export interface NativeStyled<Target extends NativeTarget, OuterProps = unknown, OuterStatics = unknown> {
|
|
3
|
+
<Props = unknown, Statics = unknown>(initialStyles: Styles<OuterProps & Props>, ...interpolations: Exclude<Interpolation<OuterProps & Props>, IStyledComponent<any>>[]): IStyledNativeComponent<Target, OuterProps & Props> & OuterStatics & Statics;
|
|
4
|
+
attrs(attrs: Attrs<OuterProps>): NativeStyled<Target, OuterProps, OuterStatics>;
|
|
5
|
+
withConfig(config: StyledNativeOptions<OuterProps>): NativeStyled<Target, OuterProps, OuterStatics>;
|
|
6
|
+
}
|
|
7
|
+
export interface WebStyled<Target extends WebTarget, OuterProps = unknown, OuterStatics = unknown> {
|
|
8
|
+
<Props = unknown, Statics = unknown>(initialStyles: Styles<OuterProps & Props>, ...interpolations: Interpolation<OuterProps & Props>[]): IStyledComponent<Target, OuterProps & Props> & OuterStatics & Statics;
|
|
9
|
+
attrs(attrs: Attrs<OuterProps>): WebStyled<Target, OuterProps, OuterStatics>;
|
|
10
|
+
withConfig(config: StyledOptions<OuterProps>): WebStyled<Target, OuterProps, OuterStatics>;
|
|
11
|
+
}
|
|
12
|
+
export default function constructWithOptions<Environment extends 'web' | 'native', Target extends StyledTarget, OuterProps = unknown, // used for styled<{}>().attrs() so attrs() gets the generic prop context
|
|
13
|
+
OuterStatics = unknown>(componentConstructor: Environment extends 'web' ? IStyledComponentFactory<any, any, any> : IStyledNativeComponentFactory<any, any, any>, tag: Target, options?: Environment extends 'web' ? StyledOptions<OuterProps> : StyledNativeOptions<OuterProps>): {
|
|
14
|
+
<Props = unknown, Statics = unknown>(initialStyles: Styles<OuterProps & Props>, ...interpolations: Interpolation<OuterProps & Props>[]): ReturnType<Environment extends "web" ? IStyledComponentFactory<Target, OuterProps & Props, OuterStatics & Statics> : IStyledNativeComponentFactory<Target, OuterProps & Props, OuterStatics & Statics>>;
|
|
15
|
+
attrs(attrs: Attrs<OuterProps>): any;
|
|
16
|
+
/**
|
|
17
|
+
* If config methods are called, wrap up a new template function and merge options */
|
|
18
|
+
withConfig(config: Environment extends 'web' ? StyledOptions<OuterProps> : StyledNativeOptions<OuterProps>): any;
|
|
19
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExtensibleObject, Interpolation, Styles } from '../types';
|
|
3
|
+
export default function createGlobalStyle<Props = unknown>(strings: Styles<Props>, ...interpolations: Array<Interpolation<Props>>): React.NamedExoticComponent<ExtensibleObject>;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WebTarget } from '../types';
|
|
3
|
+
import { WebStyled } from './constructWithOptions';
|
|
4
|
+
declare const styled: (<Target extends WebTarget>(tag: Target) => {
|
|
5
|
+
<Props = unknown, Statics = unknown>(initialStyles: import("../types").Styles<Props>, ...interpolations: import("../types").Interpolation<Props>[]): import("../types").IStyledComponent<Target, Props> & Statics;
|
|
6
|
+
attrs(attrs: import("../types").Attrs<unknown>): any;
|
|
7
|
+
withConfig(config: import("../types").StyledOptions<unknown>): any;
|
|
8
|
+
}) & {
|
|
9
|
+
a: WebStyled<"a", import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, unknown>;
|
|
10
|
+
abbr: WebStyled<"abbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
11
|
+
address: WebStyled<"address", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
12
|
+
area: WebStyled<"area", import("react").DetailedHTMLProps<import("react").AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>, unknown>;
|
|
13
|
+
article: WebStyled<"article", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
14
|
+
aside: WebStyled<"aside", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
15
|
+
audio: WebStyled<"audio", import("react").DetailedHTMLProps<import("react").AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, unknown>;
|
|
16
|
+
b: WebStyled<"b", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
17
|
+
base: WebStyled<"base", import("react").DetailedHTMLProps<import("react").BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>, unknown>;
|
|
18
|
+
bdi: WebStyled<"bdi", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
19
|
+
bdo: WebStyled<"bdo", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
20
|
+
big: WebStyled<"big", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
21
|
+
blockquote: WebStyled<"blockquote", import("react").DetailedHTMLProps<import("react").BlockquoteHTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
22
|
+
body: WebStyled<"body", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>, unknown>;
|
|
23
|
+
br: WebStyled<"br", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLBRElement>, HTMLBRElement>, unknown>;
|
|
24
|
+
button: WebStyled<"button", import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, unknown>;
|
|
25
|
+
canvas: WebStyled<"canvas", import("react").DetailedHTMLProps<import("react").CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>, unknown>;
|
|
26
|
+
caption: WebStyled<"caption", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
27
|
+
cite: WebStyled<"cite", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
28
|
+
code: WebStyled<"code", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
29
|
+
col: WebStyled<"col", import("react").DetailedHTMLProps<import("react").ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, unknown>;
|
|
30
|
+
colgroup: WebStyled<"colgroup", import("react").DetailedHTMLProps<import("react").ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, unknown>;
|
|
31
|
+
data: WebStyled<"data", import("react").DetailedHTMLProps<import("react").DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>, unknown>;
|
|
32
|
+
datalist: WebStyled<"datalist", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>, unknown>;
|
|
33
|
+
dd: WebStyled<"dd", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
34
|
+
del: WebStyled<"del", import("react").DetailedHTMLProps<import("react").DelHTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
35
|
+
details: WebStyled<"details", import("react").DetailedHTMLProps<import("react").DetailsHTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
36
|
+
dfn: WebStyled<"dfn", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
37
|
+
dialog: WebStyled<"dialog", import("react").DetailedHTMLProps<import("react").DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>, unknown>;
|
|
38
|
+
div: WebStyled<"div", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, unknown>;
|
|
39
|
+
dl: WebStyled<"dl", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDListElement>, HTMLDListElement>, unknown>;
|
|
40
|
+
dt: WebStyled<"dt", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
41
|
+
em: WebStyled<"em", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
42
|
+
embed: WebStyled<"embed", import("react").DetailedHTMLProps<import("react").EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>, unknown>;
|
|
43
|
+
fieldset: WebStyled<"fieldset", import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, unknown>;
|
|
44
|
+
figcaption: WebStyled<"figcaption", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
45
|
+
figure: WebStyled<"figure", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
46
|
+
footer: WebStyled<"footer", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
47
|
+
form: WebStyled<"form", import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, unknown>;
|
|
48
|
+
h1: WebStyled<"h1", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, unknown>;
|
|
49
|
+
h2: WebStyled<"h2", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, unknown>;
|
|
50
|
+
h3: WebStyled<"h3", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, unknown>;
|
|
51
|
+
h4: WebStyled<"h4", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, unknown>;
|
|
52
|
+
h5: WebStyled<"h5", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, unknown>;
|
|
53
|
+
h6: WebStyled<"h6", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, unknown>;
|
|
54
|
+
head: WebStyled<"head", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>, unknown>;
|
|
55
|
+
header: WebStyled<"header", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
56
|
+
hgroup: WebStyled<"hgroup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
57
|
+
hr: WebStyled<"hr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, unknown>;
|
|
58
|
+
html: WebStyled<"html", import("react").DetailedHTMLProps<import("react").HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>, unknown>;
|
|
59
|
+
i: WebStyled<"i", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
60
|
+
iframe: WebStyled<"iframe", import("react").DetailedHTMLProps<import("react").IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>, unknown>;
|
|
61
|
+
img: WebStyled<"img", import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, unknown>;
|
|
62
|
+
input: WebStyled<"input", import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, unknown>;
|
|
63
|
+
ins: WebStyled<"ins", import("react").DetailedHTMLProps<import("react").InsHTMLAttributes<HTMLModElement>, HTMLModElement>, unknown>;
|
|
64
|
+
kbd: WebStyled<"kbd", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
65
|
+
keygen: WebStyled<"keygen", import("react").DetailedHTMLProps<import("react").KeygenHTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
66
|
+
label: WebStyled<"label", import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, unknown>;
|
|
67
|
+
legend: WebStyled<"legend", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, unknown>;
|
|
68
|
+
li: WebStyled<"li", import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, unknown>;
|
|
69
|
+
link: WebStyled<"link", import("react").DetailedHTMLProps<import("react").LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>, unknown>;
|
|
70
|
+
main: WebStyled<"main", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
71
|
+
map: WebStyled<"map", import("react").DetailedHTMLProps<import("react").MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>, unknown>;
|
|
72
|
+
mark: WebStyled<"mark", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
73
|
+
menu: WebStyled<"menu", import("react").DetailedHTMLProps<import("react").MenuHTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
74
|
+
menuitem: WebStyled<"menuitem", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
75
|
+
meta: WebStyled<"meta", import("react").DetailedHTMLProps<import("react").MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>, unknown>;
|
|
76
|
+
meter: WebStyled<"meter", import("react").DetailedHTMLProps<import("react").MeterHTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
77
|
+
nav: WebStyled<"nav", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
78
|
+
noindex: WebStyled<"noindex", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
79
|
+
noscript: WebStyled<"noscript", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
80
|
+
object: WebStyled<"object", import("react").DetailedHTMLProps<import("react").ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>, unknown>;
|
|
81
|
+
ol: WebStyled<"ol", import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, unknown>;
|
|
82
|
+
optgroup: WebStyled<"optgroup", import("react").DetailedHTMLProps<import("react").OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>, unknown>;
|
|
83
|
+
option: WebStyled<"option", import("react").DetailedHTMLProps<import("react").OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, unknown>;
|
|
84
|
+
output: WebStyled<"output", import("react").DetailedHTMLProps<import("react").OutputHTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
85
|
+
p: WebStyled<"p", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, unknown>;
|
|
86
|
+
param: WebStyled<"param", import("react").DetailedHTMLProps<import("react").ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>, unknown>;
|
|
87
|
+
picture: WebStyled<"picture", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
88
|
+
pre: WebStyled<"pre", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLPreElement>, HTMLPreElement>, unknown>;
|
|
89
|
+
progress: WebStyled<"progress", import("react").DetailedHTMLProps<import("react").ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>, unknown>;
|
|
90
|
+
q: WebStyled<"q", import("react").DetailedHTMLProps<import("react").QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, unknown>;
|
|
91
|
+
rp: WebStyled<"rp", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
92
|
+
rt: WebStyled<"rt", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
93
|
+
ruby: WebStyled<"ruby", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
94
|
+
s: WebStyled<"s", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
95
|
+
samp: WebStyled<"samp", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
96
|
+
slot: WebStyled<"slot", import("react").DetailedHTMLProps<import("react").SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>, unknown>;
|
|
97
|
+
script: WebStyled<"script", import("react").DetailedHTMLProps<import("react").ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>, unknown>;
|
|
98
|
+
section: WebStyled<"section", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
99
|
+
select: WebStyled<"select", import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, unknown>;
|
|
100
|
+
small: WebStyled<"small", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
101
|
+
source: WebStyled<"source", import("react").DetailedHTMLProps<import("react").SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>, unknown>;
|
|
102
|
+
span: WebStyled<"span", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, unknown>;
|
|
103
|
+
strong: WebStyled<"strong", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
104
|
+
style: WebStyled<"style", import("react").DetailedHTMLProps<import("react").StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>, unknown>;
|
|
105
|
+
sub: WebStyled<"sub", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
106
|
+
summary: WebStyled<"summary", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
107
|
+
sup: WebStyled<"sup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
108
|
+
table: WebStyled<"table", import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, unknown>;
|
|
109
|
+
template: WebStyled<"template", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>, unknown>;
|
|
110
|
+
tbody: WebStyled<"tbody", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, unknown>;
|
|
111
|
+
td: WebStyled<"td", import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, unknown>;
|
|
112
|
+
textarea: WebStyled<"textarea", import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, unknown>;
|
|
113
|
+
tfoot: WebStyled<"tfoot", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, unknown>;
|
|
114
|
+
th: WebStyled<"th", import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, unknown>;
|
|
115
|
+
thead: WebStyled<"thead", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, unknown>;
|
|
116
|
+
time: WebStyled<"time", import("react").DetailedHTMLProps<import("react").TimeHTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
117
|
+
title: WebStyled<"title", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>, unknown>;
|
|
118
|
+
tr: WebStyled<"tr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, unknown>;
|
|
119
|
+
track: WebStyled<"track", import("react").DetailedHTMLProps<import("react").TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>, unknown>;
|
|
120
|
+
u: WebStyled<"u", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
121
|
+
ul: WebStyled<"ul", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, unknown>;
|
|
122
|
+
var: WebStyled<"var", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
123
|
+
video: WebStyled<"video", import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, unknown>;
|
|
124
|
+
wbr: WebStyled<"wbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
125
|
+
webview: WebStyled<"webview", import("react").DetailedHTMLProps<import("react").WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>, unknown>;
|
|
126
|
+
svg: WebStyled<"svg", import("react").SVGProps<SVGSVGElement>, unknown>;
|
|
127
|
+
animate: WebStyled<"animate", import("react").SVGProps<SVGElement>, unknown>;
|
|
128
|
+
animateMotion: WebStyled<"animateMotion", import("react").SVGProps<SVGElement>, unknown>;
|
|
129
|
+
animateTransform: WebStyled<"animateTransform", import("react").SVGProps<SVGElement>, unknown>;
|
|
130
|
+
circle: WebStyled<"circle", import("react").SVGProps<SVGCircleElement>, unknown>;
|
|
131
|
+
clipPath: WebStyled<"clipPath", import("react").SVGProps<SVGClipPathElement>, unknown>;
|
|
132
|
+
defs: WebStyled<"defs", import("react").SVGProps<SVGDefsElement>, unknown>;
|
|
133
|
+
desc: WebStyled<"desc", import("react").SVGProps<SVGDescElement>, unknown>;
|
|
134
|
+
ellipse: WebStyled<"ellipse", import("react").SVGProps<SVGEllipseElement>, unknown>;
|
|
135
|
+
feBlend: WebStyled<"feBlend", import("react").SVGProps<SVGFEBlendElement>, unknown>;
|
|
136
|
+
feColorMatrix: WebStyled<"feColorMatrix", import("react").SVGProps<SVGFEColorMatrixElement>, unknown>;
|
|
137
|
+
feComponentTransfer: WebStyled<"feComponentTransfer", import("react").SVGProps<SVGFEComponentTransferElement>, unknown>;
|
|
138
|
+
feComposite: WebStyled<"feComposite", import("react").SVGProps<SVGFECompositeElement>, unknown>;
|
|
139
|
+
feConvolveMatrix: WebStyled<"feConvolveMatrix", import("react").SVGProps<SVGFEConvolveMatrixElement>, unknown>;
|
|
140
|
+
feDiffuseLighting: WebStyled<"feDiffuseLighting", import("react").SVGProps<SVGFEDiffuseLightingElement>, unknown>;
|
|
141
|
+
feDisplacementMap: WebStyled<"feDisplacementMap", import("react").SVGProps<SVGFEDisplacementMapElement>, unknown>;
|
|
142
|
+
feDistantLight: WebStyled<"feDistantLight", import("react").SVGProps<SVGFEDistantLightElement>, unknown>;
|
|
143
|
+
feDropShadow: WebStyled<"feDropShadow", import("react").SVGProps<SVGFEDropShadowElement>, unknown>;
|
|
144
|
+
feFlood: WebStyled<"feFlood", import("react").SVGProps<SVGFEFloodElement>, unknown>;
|
|
145
|
+
feFuncA: WebStyled<"feFuncA", import("react").SVGProps<SVGFEFuncAElement>, unknown>;
|
|
146
|
+
feFuncB: WebStyled<"feFuncB", import("react").SVGProps<SVGFEFuncBElement>, unknown>;
|
|
147
|
+
feFuncG: WebStyled<"feFuncG", import("react").SVGProps<SVGFEFuncGElement>, unknown>;
|
|
148
|
+
feFuncR: WebStyled<"feFuncR", import("react").SVGProps<SVGFEFuncRElement>, unknown>;
|
|
149
|
+
feGaussianBlur: WebStyled<"feGaussianBlur", import("react").SVGProps<SVGFEGaussianBlurElement>, unknown>;
|
|
150
|
+
feImage: WebStyled<"feImage", import("react").SVGProps<SVGFEImageElement>, unknown>;
|
|
151
|
+
feMerge: WebStyled<"feMerge", import("react").SVGProps<SVGFEMergeElement>, unknown>;
|
|
152
|
+
feMergeNode: WebStyled<"feMergeNode", import("react").SVGProps<SVGFEMergeNodeElement>, unknown>;
|
|
153
|
+
feMorphology: WebStyled<"feMorphology", import("react").SVGProps<SVGFEMorphologyElement>, unknown>;
|
|
154
|
+
feOffset: WebStyled<"feOffset", import("react").SVGProps<SVGFEOffsetElement>, unknown>;
|
|
155
|
+
fePointLight: WebStyled<"fePointLight", import("react").SVGProps<SVGFEPointLightElement>, unknown>;
|
|
156
|
+
feSpecularLighting: WebStyled<"feSpecularLighting", import("react").SVGProps<SVGFESpecularLightingElement>, unknown>;
|
|
157
|
+
feSpotLight: WebStyled<"feSpotLight", import("react").SVGProps<SVGFESpotLightElement>, unknown>;
|
|
158
|
+
feTile: WebStyled<"feTile", import("react").SVGProps<SVGFETileElement>, unknown>;
|
|
159
|
+
feTurbulence: WebStyled<"feTurbulence", import("react").SVGProps<SVGFETurbulenceElement>, unknown>;
|
|
160
|
+
filter: WebStyled<"filter", import("react").SVGProps<SVGFilterElement>, unknown>;
|
|
161
|
+
foreignObject: WebStyled<"foreignObject", import("react").SVGProps<SVGForeignObjectElement>, unknown>;
|
|
162
|
+
g: WebStyled<"g", import("react").SVGProps<SVGGElement>, unknown>;
|
|
163
|
+
image: WebStyled<"image", import("react").SVGProps<SVGImageElement>, unknown>;
|
|
164
|
+
line: WebStyled<"line", import("react").SVGProps<SVGLineElement>, unknown>;
|
|
165
|
+
linearGradient: WebStyled<"linearGradient", import("react").SVGProps<SVGLinearGradientElement>, unknown>;
|
|
166
|
+
marker: WebStyled<"marker", import("react").SVGProps<SVGMarkerElement>, unknown>;
|
|
167
|
+
mask: WebStyled<"mask", import("react").SVGProps<SVGMaskElement>, unknown>;
|
|
168
|
+
metadata: WebStyled<"metadata", import("react").SVGProps<SVGMetadataElement>, unknown>;
|
|
169
|
+
mpath: WebStyled<"mpath", import("react").SVGProps<SVGElement>, unknown>;
|
|
170
|
+
path: WebStyled<"path", import("react").SVGProps<SVGPathElement>, unknown>;
|
|
171
|
+
pattern: WebStyled<"pattern", import("react").SVGProps<SVGPatternElement>, unknown>;
|
|
172
|
+
polygon: WebStyled<"polygon", import("react").SVGProps<SVGPolygonElement>, unknown>;
|
|
173
|
+
polyline: WebStyled<"polyline", import("react").SVGProps<SVGPolylineElement>, unknown>;
|
|
174
|
+
radialGradient: WebStyled<"radialGradient", import("react").SVGProps<SVGRadialGradientElement>, unknown>;
|
|
175
|
+
rect: WebStyled<"rect", import("react").SVGProps<SVGRectElement>, unknown>;
|
|
176
|
+
stop: WebStyled<"stop", import("react").SVGProps<SVGStopElement>, unknown>;
|
|
177
|
+
switch: WebStyled<"switch", import("react").SVGProps<SVGSwitchElement>, unknown>;
|
|
178
|
+
symbol: WebStyled<"symbol", import("react").SVGProps<SVGSymbolElement>, unknown>;
|
|
179
|
+
text: WebStyled<"text", import("react").SVGProps<SVGTextElement>, unknown>;
|
|
180
|
+
textPath: WebStyled<"textPath", import("react").SVGProps<SVGTextPathElement>, unknown>;
|
|
181
|
+
tspan: WebStyled<"tspan", import("react").SVGProps<SVGTSpanElement>, unknown>;
|
|
182
|
+
use: WebStyled<"use", import("react").SVGProps<SVGUseElement>, unknown>;
|
|
183
|
+
view: WebStyled<"view", import("react").SVGProps<SVGViewElement>, unknown>;
|
|
184
|
+
};
|
|
185
|
+
export default styled;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AnyComponent, ExecutionContext } from '../types';
|
|
3
|
+
export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<T, ExecutionContext>> & React.RefAttributes<T>> & { [key in Exclude<keyof T, T extends React.MemoExoticComponent<any> ? "propTypes" | "type" | "defaultProps" | "displayName" | "$$typeof" | "compare" : T extends React.ForwardRefExoticComponent<any> ? "propTypes" | "defaultProps" | "displayName" | "$$typeof" | "render" : "length" | "propTypes" | "type" | "contextType" | "contextTypes" | "childContextTypes" | "defaultProps" | "displayName" | "getDerivedStateFromProps" | "getDerivedStateFromError" | "getDefaultProps" | "mixins" | "name" | "prototype" | "caller" | "callee" | "arguments" | "arity">]: T[key]; };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import StyleSheet from '../sheet';
|
|
2
|
+
import { RuleSet, Stringifier } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* ComponentStyle is all the CSS-specific stuff, not the React-specific stuff.
|
|
5
|
+
*/
|
|
6
|
+
export default class ComponentStyle {
|
|
7
|
+
baseHash: number;
|
|
8
|
+
baseStyle: ComponentStyle | null | undefined;
|
|
9
|
+
componentId: string;
|
|
10
|
+
isStatic: boolean;
|
|
11
|
+
rules: RuleSet<any>;
|
|
12
|
+
staticRulesId: string;
|
|
13
|
+
constructor(rules: RuleSet<any>, componentId: string, baseStyle?: ComponentStyle);
|
|
14
|
+
generateAndInjectStyles(executionContext: Object, styleSheet: StyleSheet, stylis: Stringifier): string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import StyleSheet from '../sheet';
|
|
2
|
+
import { ExecutionContext, FlattenerResult, RuleSet, Stringifier } from '../types';
|
|
3
|
+
export default class GlobalStyle<Props = unknown> {
|
|
4
|
+
componentId: string;
|
|
5
|
+
isStatic: boolean;
|
|
6
|
+
rules: FlattenerResult<Props>;
|
|
7
|
+
constructor(rules: RuleSet<Props>, componentId: string);
|
|
8
|
+
createStyles(instance: number, executionContext: ExecutionContext & Props, styleSheet: StyleSheet, stylis: Stringifier): void;
|
|
9
|
+
removeStyles(instance: number, styleSheet: StyleSheet): void;
|
|
10
|
+
renderStyles(instance: number, executionContext: ExecutionContext & Props, styleSheet: StyleSheet, stylis: Stringifier): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IInlineStyleConstructor, StyleSheet } from '../types';
|
|
2
|
+
export declare const resetStyleCache: () => void;
|
|
3
|
+
/**
|
|
4
|
+
* InlineStyle takes arbitrary CSS and generates a flat object
|
|
5
|
+
*/
|
|
6
|
+
export default function makeInlineStyleClass<Props = unknown>(styleSheet: StyleSheet): IInlineStyleConstructor<Props>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import StyleSheet from '../sheet';
|
|
2
|
+
import { Keyframes as KeyframesType, Stringifier } from '../types';
|
|
3
|
+
export default class Keyframes implements KeyframesType {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
rules: string;
|
|
7
|
+
constructor(name: string, rules: string);
|
|
8
|
+
inject: (styleSheet: StyleSheet, stylisInstance?: Stringifier) => void;
|
|
9
|
+
toString: () => void;
|
|
10
|
+
getName(stylisInstance?: Stringifier): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type * as streamInternal from 'stream';
|
|
3
|
+
import { Readable } from 'stream';
|
|
4
|
+
import StyleSheet from '../sheet';
|
|
5
|
+
export default class ServerStyleSheet {
|
|
6
|
+
instance: StyleSheet;
|
|
7
|
+
sealed: boolean;
|
|
8
|
+
constructor();
|
|
9
|
+
_emitSheetCSS: () => string;
|
|
10
|
+
collectStyles(children: any): JSX.Element;
|
|
11
|
+
getStyleTags: () => string;
|
|
12
|
+
getStyleElement: () => JSX.Element[];
|
|
13
|
+
interleaveWithNodeStream(input: Readable): streamInternal.Transform;
|
|
14
|
+
seal: () => void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import StyleSheet from '../sheet';
|
|
3
|
+
import { Stringifier } from '../types';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
children?: React.ReactChild;
|
|
6
|
+
disableCSSOMInjection?: boolean;
|
|
7
|
+
disableVendorPrefixes?: boolean;
|
|
8
|
+
sheet?: StyleSheet;
|
|
9
|
+
stylisPlugins?: stylis.Middleware[];
|
|
10
|
+
target?: HTMLElement;
|
|
11
|
+
};
|
|
12
|
+
export declare const StyleSheetContext: React.Context<void | StyleSheet>;
|
|
13
|
+
export declare const StyleSheetConsumer: React.Consumer<void | StyleSheet>;
|
|
14
|
+
export declare const StylisContext: React.Context<void | Stringifier>;
|
|
15
|
+
export declare const StylisConsumer: React.Consumer<void | Stringifier>;
|
|
16
|
+
export declare const mainSheet: StyleSheet;
|
|
17
|
+
export declare const mainStylis: Stringifier;
|
|
18
|
+
export declare function useStyleSheet(): StyleSheet;
|
|
19
|
+
export declare function useStylis(): Stringifier;
|
|
20
|
+
export default function StyleSheetManager(props: Props): JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IStyledComponentFactory, RuleSet, StyledOptions, WebTarget } from '../types';
|
|
2
|
+
declare function createStyledComponent<Target extends WebTarget, OuterProps = unknown, Statics = unknown>(target: Target, options: StyledOptions<OuterProps>, rules: RuleSet<OuterProps>): ReturnType<IStyledComponentFactory<Target, OuterProps, Statics>>;
|
|
3
|
+
export default createStyledComponent;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ExtensibleObject, IInlineStyleConstructor, IStyledNativeComponent, IStyledNativeComponentFactory, NativeTarget, RuleSet, StyledNativeOptions } from '../types';
|
|
2
|
+
declare const _default: (InlineStyle: IInlineStyleConstructor<any>) => <Target extends NativeTarget, OuterProps extends ExtensibleObject, Statics = unknown>(target: Target, options: StyledNativeOptions<OuterProps>, rules: RuleSet<OuterProps>) => IStyledNativeComponent<Target, OuterProps> & Statics;
|
|
3
|
+
export default _default;
|