styled-components 6.1.0 → 6.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -31
- 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 +15 -11
- 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/native/dist/constructors/styled.d.ts +21 -21
- package/native/dist/hoc/withTheme.d.ts +1 -1
- package/native/dist/sheet/Tag.d.ts +4 -4
- package/native/dist/styled-components.native.cjs.js +1 -1
- package/native/dist/styled-components.native.cjs.js.map +1 -1
- package/native/dist/styled-components.native.esm.js +1 -1
- package/native/dist/styled-components.native.esm.js.map +1 -1
- package/native/dist/test/utils.d.ts +21 -21
- package/native/dist/types.d.ts +4 -4
- package/native/dist/utils/domElements.d.ts +1 -1
- package/package.json +6 -6
- package/dist/base.d.ts +0 -12
- package/dist/constants.d.ts +0 -8
- package/dist/constructors/constructWithOptions.d.ts +0 -18
- package/dist/constructors/createGlobalStyle.d.ts +0 -3
- package/dist/constructors/css.d.ts +0 -4
- package/dist/constructors/keyframes.d.ts +0 -3
- package/dist/constructors/styled.d.ts +0 -138
- package/dist/hoc/withTheme.d.ts +0 -3
- package/dist/hoc/withTheme.spec.d.ts +0 -1
- package/dist/index-standalone.d.ts +0 -2
- package/dist/index.d.ts +0 -4
- package/dist/models/ComponentStyle.d.ts +0 -15
- package/dist/models/GlobalStyle.d.ts +0 -11
- package/dist/models/InlineStyle.d.ts +0 -6
- package/dist/models/Keyframes.d.ts +0 -10
- package/dist/models/ServerStyleSheet.d.ts +0 -16
- package/dist/models/StyleSheetManager.d.ts +0 -65
- package/dist/models/StyledComponent.d.ts +0 -3
- package/dist/models/StyledNativeComponent.d.ts +0 -3
- package/dist/models/ThemeProvider.d.ts +0 -47
- package/dist/native/index.d.ts +0 -36
- package/dist/secretInternals.d.ts +0 -5
- package/dist/sheet/GroupIDAllocator.d.ts +0 -4
- package/dist/sheet/GroupedTag.d.ts +0 -11
- package/dist/sheet/Rehydration.d.ts +0 -3
- package/dist/sheet/Sheet.d.ts +0 -38
- package/dist/sheet/Tag.d.ts +0 -54
- package/dist/sheet/dom.d.ts +0 -4
- package/dist/sheet/index.d.ts +0 -1
- package/dist/sheet/types.d.ts +0 -34
- package/dist/test/globals.d.ts +0 -2
- package/dist/test/utils.d.ts +0 -144
- package/dist/test/veryLargeUnionType.d.ts +0 -1
- package/dist/types.d.ts +0 -183
- package/dist/utils/addUnitIfNeeded.d.ts +0 -1
- package/dist/utils/checkDynamicCreation.d.ts +0 -1
- package/dist/utils/createWarnTooManyClasses.d.ts +0 -3
- package/dist/utils/determineTheme.d.ts +0 -4
- package/dist/utils/domElements.d.ts +0 -4
- package/dist/utils/empties.d.ts +0 -3
- package/dist/utils/error.d.ts +0 -5
- package/dist/utils/errors.d.ts +0 -21
- package/dist/utils/escape.d.ts +0 -5
- package/dist/utils/flatten.d.ts +0 -4
- package/dist/utils/generateAlphabeticName.d.ts +0 -1
- package/dist/utils/generateComponentId.d.ts +0 -1
- package/dist/utils/generateDisplayName.d.ts +0 -2
- package/dist/utils/getComponentName.d.ts +0 -2
- package/dist/utils/hash.d.ts +0 -3
- package/dist/utils/hoist.d.ts +0 -51
- package/dist/utils/hyphenateStyleName.d.ts +0 -14
- package/dist/utils/interleave.d.ts +0 -2
- package/dist/utils/isFunction.d.ts +0 -1
- package/dist/utils/isPlainObject.d.ts +0 -1
- package/dist/utils/isStatelessFunction.d.ts +0 -1
- package/dist/utils/isStaticRules.d.ts +0 -2
- package/dist/utils/isStyledComponent.d.ts +0 -2
- package/dist/utils/isTag.d.ts +0 -2
- package/dist/utils/joinStrings.d.ts +0 -5
- package/dist/utils/mixinDeep.d.ts +0 -6
- package/dist/utils/nonce.d.ts +0 -1
- package/dist/utils/setToString.d.ts +0 -17
- package/dist/utils/stylis.d.ts +0 -10
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
'data-styled';
|
|
11
11
|
var SC_ATTR_ACTIVE = 'active';
|
|
12
12
|
var SC_ATTR_VERSION = 'data-styled-version';
|
|
13
|
-
var SC_VERSION = "6.1.
|
|
13
|
+
var SC_VERSION = "6.1.2";
|
|
14
14
|
var SPLITTER = '/*!sc*/\n';
|
|
15
15
|
var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
|
|
16
16
|
var DISABLE_SPEEDY = Boolean(typeof SC_DISABLE_SPEEDY === 'boolean'
|
|
@@ -47,6 +47,8 @@
|
|
|
47
47
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
48
48
|
PERFORMANCE OF THIS SOFTWARE.
|
|
49
49
|
***************************************************************************** */
|
|
50
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
51
|
+
|
|
50
52
|
|
|
51
53
|
var __assign = function() {
|
|
52
54
|
__assign = Object.assign || function __assign(t) {
|
|
@@ -67,7 +69,12 @@
|
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
70
|
-
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
75
|
+
var e = new Error(message);
|
|
76
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
77
|
+
};
|
|
71
78
|
|
|
72
79
|
var EMPTY_ARRAY = Object.freeze([]);
|
|
73
80
|
var EMPTY_OBJECT = Object.freeze({});
|
|
@@ -240,6 +247,8 @@
|
|
|
240
247
|
return reverseRegister.get(group);
|
|
241
248
|
};
|
|
242
249
|
var setGroupForId = function (id, group) {
|
|
250
|
+
// move pointer
|
|
251
|
+
nextFreeGroup = group + 1;
|
|
243
252
|
groupIDRegister.set(id, group);
|
|
244
253
|
reverseRegister.set(group, id);
|
|
245
254
|
};
|
|
@@ -802,6 +811,7 @@
|
|
|
802
811
|
|
|
803
812
|
var unitlessKeys = {
|
|
804
813
|
animationIterationCount: 1,
|
|
814
|
+
aspectRatio: 1,
|
|
805
815
|
borderImageOutset: 1,
|
|
806
816
|
borderImageSlice: 1,
|
|
807
817
|
borderImageWidth: 1,
|
|
@@ -1386,9 +1396,7 @@
|
|
|
1386
1396
|
}
|
|
1387
1397
|
return React.createElement(Component, __assign({}, props, { theme: themeProp, ref: ref }));
|
|
1388
1398
|
});
|
|
1389
|
-
|
|
1390
|
-
WithTheme.displayName = "WithTheme(".concat(getComponentName(Component), ")");
|
|
1391
|
-
}
|
|
1399
|
+
WithTheme.displayName = "WithTheme(".concat(getComponentName(Component), ")");
|
|
1392
1400
|
return hoistNonReactStatics(WithTheme, Component);
|
|
1393
1401
|
}
|
|
1394
1402
|
|
|
@@ -1928,9 +1936,7 @@
|
|
|
1928
1936
|
function forwardRefRender(props, ref) {
|
|
1929
1937
|
return useStyledComponentImpl(WrappedStyledComponent, props, ref);
|
|
1930
1938
|
}
|
|
1931
|
-
|
|
1932
|
-
forwardRefRender.displayName = displayName;
|
|
1933
|
-
}
|
|
1939
|
+
forwardRefRender.displayName = displayName;
|
|
1934
1940
|
/**
|
|
1935
1941
|
* forwardRef creates a new interim component, which we'll take advantage of
|
|
1936
1942
|
* instead of extending ParentComponent to create _another_ interim class
|
|
@@ -1938,10 +1944,8 @@
|
|
|
1938
1944
|
var WrappedStyledComponent = React.forwardRef(forwardRefRender);
|
|
1939
1945
|
WrappedStyledComponent.attrs = finalAttrs;
|
|
1940
1946
|
WrappedStyledComponent.componentStyle = componentStyle;
|
|
1947
|
+
WrappedStyledComponent.displayName = displayName;
|
|
1941
1948
|
WrappedStyledComponent.shouldForwardProp = shouldForwardProp;
|
|
1942
|
-
{
|
|
1943
|
-
WrappedStyledComponent.displayName = displayName;
|
|
1944
|
-
}
|
|
1945
1949
|
// this static is used to preserve the cascade of static classes for component selector
|
|
1946
1950
|
// purposes; this is especially important with usage of the css prop
|
|
1947
1951
|
WrappedStyledComponent.foldedComponentIds = isTargetStyledComp
|