@storybook/react-native-theming 11.0.0-next.0 → 11.0.0-next.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/dist/index.d.ts +9 -23
- package/dist/index.js +40 -71
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,34 +2,29 @@ import * as RN from "react-native";
|
|
|
2
2
|
import { ImageProps, ImageSourcePropType, TextStyle } from "react-native";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import { ReactElement } from "react";
|
|
5
|
-
//#region ../../node_modules/@emotion/react/dist/declarations/src/types.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* @desc Utility type for getting props type of React component.
|
|
8
7
|
* It takes `defaultProps` into an account - making props with defaults optional.
|
|
9
8
|
*/
|
|
10
9
|
type PropsOf<C extends keyof ReactJSX.IntrinsicElements | React.JSXElementConstructor<any>> = ReactJSX.LibraryManagedAttributes<C, React.ComponentProps<C>>;
|
|
11
10
|
type DistributiveOmit<T, U> = T extends any ? Pick<T, Exclude<keyof T, U>> : never;
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region ../../node_modules/@emotion/react/dist/declarations/src/theming.d.ts
|
|
14
11
|
export interface Theme extends StorybookTheme {}
|
|
15
12
|
interface ThemeProviderProps {
|
|
16
13
|
theme: Partial<Theme> | ((outerTheme: Theme) => Theme);
|
|
17
14
|
children: React$1.ReactNode;
|
|
18
15
|
}
|
|
19
|
-
interface ThemeProvider {
|
|
16
|
+
export interface ThemeProvider {
|
|
20
17
|
(props: ThemeProviderProps): React$1.ReactElement;
|
|
21
18
|
}
|
|
22
|
-
declare const useTheme: () => Theme;
|
|
19
|
+
export declare const useTheme: () => Theme;
|
|
23
20
|
interface ThemeProviderProps {
|
|
24
21
|
theme: Partial<Theme> | ((outerTheme: Theme) => Theme);
|
|
25
22
|
children: React$1.ReactNode;
|
|
26
23
|
}
|
|
27
|
-
declare const ThemeProvider: (props: ThemeProviderProps) => React$1.JSX.Element;
|
|
28
|
-
declare function withTheme<C extends React$1.ComponentType<React$1.ComponentProps<C>>>(Component: C): React$1.ForwardRefExoticComponent<DistributiveOmit<PropsOf<C>, 'theme'> & {
|
|
24
|
+
export declare const ThemeProvider: (props: ThemeProviderProps) => React$1.JSX.Element;
|
|
25
|
+
export declare function withTheme<C extends React$1.ComponentType<React$1.ComponentProps<C>>>(Component: C): React$1.ForwardRefExoticComponent<DistributiveOmit<PropsOf<C>, 'theme'> & {
|
|
29
26
|
theme?: Theme;
|
|
30
27
|
}>;
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region ../../node_modules/@emotion/react/dist/declarations/src/jsx-namespace.d.ts
|
|
33
28
|
type IsPreReact19 = 2 extends Parameters<React.FunctionComponent<any>>['length'] ? true : false;
|
|
34
29
|
/** @ts-ignore */
|
|
35
30
|
type ReactJSXElement = true extends IsPreReact19 ? JSX.Element : React.JSX.Element;
|
|
@@ -60,8 +55,6 @@ declare namespace ReactJSX {
|
|
|
60
55
|
interface IntrinsicClassAttributes<T> extends ReactJSXIntrinsicClassAttributes<T> {}
|
|
61
56
|
type IntrinsicElements = ReactJSXIntrinsicElements;
|
|
62
57
|
}
|
|
63
|
-
//#endregion
|
|
64
|
-
//#region ../../node_modules/@emotion/native/dist/declarations/types/base.d.ts
|
|
65
58
|
type ReactNativeStyle = RN.ViewStyle | RN.TextStyle | RN.ImageStyle;
|
|
66
59
|
type ReactNativeStyleType<Props> = Props extends {
|
|
67
60
|
style?: RN.StyleProp<infer StyleType>;
|
|
@@ -139,8 +132,6 @@ interface CreateStyled$1 {
|
|
|
139
132
|
as?: React.ElementType;
|
|
140
133
|
}, {}, {}, ReactNativeStyleType<React.ComponentProps<C>>>;
|
|
141
134
|
}
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region ../../node_modules/@emotion/native/dist/declarations/types/index.d.ts
|
|
144
135
|
type ReactNative = typeof RN;
|
|
145
136
|
// those 2 are just copies of the `BaseCreateStyled` with supplied `C` type argument
|
|
146
137
|
type HostClassComponent<C extends React.ComponentClass<any>> = CreateStyledComponent<React.ComponentProps<C> & {
|
|
@@ -195,8 +186,6 @@ interface StyledComponents {
|
|
|
195
186
|
}
|
|
196
187
|
interface CreateStyled extends CreateStyled$1, StyledComponents {}
|
|
197
188
|
declare const styled: CreateStyled;
|
|
198
|
-
//#endregion
|
|
199
|
-
//#region src/web-theme.d.ts
|
|
200
189
|
declare const color: {
|
|
201
190
|
primary: string;
|
|
202
191
|
secondary: string;
|
|
@@ -259,7 +248,7 @@ declare const typography: {
|
|
|
259
248
|
code: number;
|
|
260
249
|
};
|
|
261
250
|
};
|
|
262
|
-
type Color = typeof color;
|
|
251
|
+
type Color$1 = typeof color;
|
|
263
252
|
type Background = typeof background;
|
|
264
253
|
type Typography = typeof typography;
|
|
265
254
|
interface Brand {
|
|
@@ -271,7 +260,7 @@ interface Brand {
|
|
|
271
260
|
}
|
|
272
261
|
interface StorybookThemeWeb {
|
|
273
262
|
base: 'light' | 'dark';
|
|
274
|
-
color: Color;
|
|
263
|
+
color: Color$1;
|
|
275
264
|
background: Background;
|
|
276
265
|
typography: Typography;
|
|
277
266
|
textMutedColor: string;
|
|
@@ -300,10 +289,7 @@ interface StorybookThemeWeb {
|
|
|
300
289
|
barBg: string;
|
|
301
290
|
brand?: Brand;
|
|
302
291
|
}
|
|
303
|
-
//#endregion
|
|
304
|
-
//#region src/theme.d.ts
|
|
305
292
|
type StorybookTheme = StorybookThemeWeb;
|
|
306
|
-
declare const theme: StorybookThemeWeb;
|
|
307
|
-
declare const darkTheme: StorybookThemeWeb;
|
|
308
|
-
|
|
309
|
-
export { type StorybookTheme, type StyledComponent, ThemeProvider, darkTheme, styled, theme, useTheme, withTheme };
|
|
293
|
+
export declare const theme: StorybookThemeWeb;
|
|
294
|
+
export declare const darkTheme: StorybookThemeWeb;
|
|
295
|
+
export { type StorybookTheme, type StyledComponent, styled };
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
9
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
10
10
|
var __copyProps = (to, from, except, desc) => {
|
|
11
11
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
12
|
key = keys[i];
|
|
@@ -17,17 +17,16 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
21
21
|
value: mod,
|
|
22
22
|
enumerable: true
|
|
23
23
|
}) : target, mod));
|
|
24
|
-
//#endregion
|
|
25
24
|
let react_native = require("react-native");
|
|
26
25
|
react_native = __toESM(react_native);
|
|
27
26
|
let react = require("react");
|
|
28
27
|
react = __toESM(react);
|
|
29
28
|
let polished = require("polished");
|
|
30
|
-
|
|
29
|
+
// ../../node_modules/postcss-value-parser/lib/parse.js
|
|
31
30
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32
31
|
var openParentheses = "(".charCodeAt(0);
|
|
33
32
|
var closeParentheses = ")".charCodeAt(0);
|
|
@@ -257,12 +256,11 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
257
256
|
return stack[0].nodes;
|
|
258
257
|
};
|
|
259
258
|
}));
|
|
260
|
-
|
|
261
|
-
//#region ../../node_modules/postcss-value-parser/lib/walk.js
|
|
259
|
+
// ../../node_modules/postcss-value-parser/lib/walk.js
|
|
262
260
|
var require_walk = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
263
261
|
module.exports = function walk(nodes, cb, bubble) {
|
|
264
|
-
var i, max, node, result;
|
|
265
|
-
for (
|
|
262
|
+
var i = 0, max = nodes.length, node, result;
|
|
263
|
+
for (; i < max; i += 1) {
|
|
266
264
|
node = nodes[i];
|
|
267
265
|
if (!bubble) result = cb(node, i, nodes);
|
|
268
266
|
if (result !== false && node.type === "function" && Array.isArray(node.nodes)) walk(node.nodes, cb, bubble);
|
|
@@ -270,8 +268,7 @@ var require_walk = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
270
268
|
}
|
|
271
269
|
};
|
|
272
270
|
}));
|
|
273
|
-
|
|
274
|
-
//#region ../../node_modules/postcss-value-parser/lib/stringify.js
|
|
271
|
+
// ../../node_modules/postcss-value-parser/lib/stringify.js
|
|
275
272
|
var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
276
273
|
function stringifyNode(node, custom) {
|
|
277
274
|
var type = node.type;
|
|
@@ -303,8 +300,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
303
300
|
}
|
|
304
301
|
module.exports = stringify;
|
|
305
302
|
}));
|
|
306
|
-
|
|
307
|
-
//#region ../../node_modules/postcss-value-parser/lib/unit.js
|
|
303
|
+
// ../../node_modules/postcss-value-parser/lib/unit.js
|
|
308
304
|
var require_unit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
309
305
|
var minus = "-".charCodeAt(0);
|
|
310
306
|
var plus = "+".charCodeAt(0);
|
|
@@ -370,8 +366,7 @@ var require_unit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
370
366
|
};
|
|
371
367
|
};
|
|
372
368
|
}));
|
|
373
|
-
|
|
374
|
-
//#region ../../node_modules/postcss-value-parser/lib/index.js
|
|
369
|
+
// ../../node_modules/postcss-value-parser/lib/index.js
|
|
375
370
|
var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
376
371
|
var parse = require_parse();
|
|
377
372
|
var walk = require_walk();
|
|
@@ -395,8 +390,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
395
390
|
ValueParser.stringify = stringify;
|
|
396
391
|
module.exports = ValueParser;
|
|
397
392
|
}));
|
|
398
|
-
|
|
399
|
-
//#region ../../node_modules/camelize/index.js
|
|
393
|
+
// ../../node_modules/camelize/index.js
|
|
400
394
|
var require_camelize = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
401
395
|
module.exports = function(obj) {
|
|
402
396
|
if (typeof obj === "string") return camelCase(obj);
|
|
@@ -444,8 +438,7 @@ var require_camelize = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
444
438
|
return acc;
|
|
445
439
|
}
|
|
446
440
|
}));
|
|
447
|
-
|
|
448
|
-
//#region ../../node_modules/css-color-keywords/colors.json
|
|
441
|
+
// ../../node_modules/css-color-keywords/colors.json
|
|
449
442
|
var require_colors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
450
443
|
module.exports = {
|
|
451
444
|
"black": "#000000",
|
|
@@ -596,13 +589,11 @@ var require_colors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
596
589
|
"rebeccapurple": "#663399"
|
|
597
590
|
};
|
|
598
591
|
}));
|
|
599
|
-
|
|
600
|
-
//#region ../../node_modules/css-color-keywords/index.js
|
|
592
|
+
// ../../node_modules/css-color-keywords/index.js
|
|
601
593
|
var require_css_color_keywords = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
602
594
|
module.exports = require_colors();
|
|
603
595
|
}));
|
|
604
|
-
|
|
605
|
-
//#region ../../node_modules/css-to-react-native/index.js
|
|
596
|
+
// ../../node_modules/css-to-react-native/index.js
|
|
606
597
|
var require_css_to_react_native = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
607
598
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
608
599
|
function _interopDefault(ex) {
|
|
@@ -1239,8 +1230,7 @@ var require_css_to_react_native = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1239
1230
|
exports.getStylesForProperty = getStylesForProperty;
|
|
1240
1231
|
exports.transformRawValue = transformRawValue;
|
|
1241
1232
|
}));
|
|
1242
|
-
|
|
1243
|
-
//#region ../../node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
1233
|
+
// ../../node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
1244
1234
|
function sheetForTag(tag) {
|
|
1245
1235
|
if (tag.sheet) return tag.sheet;
|
|
1246
1236
|
/* istanbul ignore next */
|
|
@@ -1259,10 +1249,11 @@ var StyleSheet$1 = /*#__PURE__*/ function() {
|
|
|
1259
1249
|
var _this = this;
|
|
1260
1250
|
this._insertTag = function(tag) {
|
|
1261
1251
|
var before;
|
|
1262
|
-
if (_this.tags.length === 0)
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1252
|
+
if (_this.tags.length === 0) {
|
|
1253
|
+
if (_this.insertionPoint) before = _this.insertionPoint.nextSibling;
|
|
1254
|
+
else if (_this.prepend) before = _this.container.firstChild;
|
|
1255
|
+
else before = _this.before;
|
|
1256
|
+
} else before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
1266
1257
|
_this.container.insertBefore(tag, before);
|
|
1267
1258
|
_this.tags.push(tag);
|
|
1268
1259
|
};
|
|
@@ -1301,8 +1292,7 @@ var StyleSheet$1 = /*#__PURE__*/ function() {
|
|
|
1301
1292
|
};
|
|
1302
1293
|
return StyleSheet;
|
|
1303
1294
|
}();
|
|
1304
|
-
|
|
1305
|
-
//#region ../../node_modules/stylis/src/Enum.js
|
|
1295
|
+
// ../../node_modules/stylis/src/Enum.js
|
|
1306
1296
|
var MS = "-ms-";
|
|
1307
1297
|
var MOZ = "-moz-";
|
|
1308
1298
|
var WEBKIT = "-webkit-";
|
|
@@ -1312,8 +1302,7 @@ var DECLARATION = "decl";
|
|
|
1312
1302
|
var IMPORT = "@import";
|
|
1313
1303
|
var KEYFRAMES = "@keyframes";
|
|
1314
1304
|
var LAYER = "@layer";
|
|
1315
|
-
|
|
1316
|
-
//#region ../../node_modules/stylis/src/Utility.js
|
|
1305
|
+
// ../../node_modules/stylis/src/Utility.js
|
|
1317
1306
|
/**
|
|
1318
1307
|
* @param {number}
|
|
1319
1308
|
* @return {number}
|
|
@@ -1416,8 +1405,7 @@ function append(value, array) {
|
|
|
1416
1405
|
function combine(array, callback) {
|
|
1417
1406
|
return array.map(callback).join("");
|
|
1418
1407
|
}
|
|
1419
|
-
|
|
1420
|
-
//#region ../../node_modules/stylis/src/Tokenizer.js
|
|
1408
|
+
// ../../node_modules/stylis/src/Tokenizer.js
|
|
1421
1409
|
var line = 1;
|
|
1422
1410
|
var column = 1;
|
|
1423
1411
|
var length = 0;
|
|
@@ -1581,9 +1569,7 @@ function delimiter(type) {
|
|
|
1581
1569
|
case 40:
|
|
1582
1570
|
if (type === 41) delimiter(type);
|
|
1583
1571
|
break;
|
|
1584
|
-
case 92:
|
|
1585
|
-
next();
|
|
1586
|
-
break;
|
|
1572
|
+
case 92: next();
|
|
1587
1573
|
}
|
|
1588
1574
|
return position;
|
|
1589
1575
|
}
|
|
@@ -1605,8 +1591,7 @@ function identifier(index) {
|
|
|
1605
1591
|
while (!token(peek())) next();
|
|
1606
1592
|
return slice(index, position);
|
|
1607
1593
|
}
|
|
1608
|
-
|
|
1609
|
-
//#region ../../node_modules/stylis/src/Parser.js
|
|
1594
|
+
// ../../node_modules/stylis/src/Parser.js
|
|
1610
1595
|
/**
|
|
1611
1596
|
* @param {string} value
|
|
1612
1597
|
* @return {object[]}
|
|
@@ -1759,8 +1744,7 @@ function comment(value, root, parent) {
|
|
|
1759
1744
|
function declaration(value, root, parent, length) {
|
|
1760
1745
|
return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length);
|
|
1761
1746
|
}
|
|
1762
|
-
|
|
1763
|
-
//#region ../../node_modules/stylis/src/Serializer.js
|
|
1747
|
+
// ../../node_modules/stylis/src/Serializer.js
|
|
1764
1748
|
/**
|
|
1765
1749
|
* @param {object[]} children
|
|
1766
1750
|
* @param {function} callback
|
|
@@ -1790,8 +1774,7 @@ function stringify(element, index, children, callback) {
|
|
|
1790
1774
|
}
|
|
1791
1775
|
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
|
|
1792
1776
|
}
|
|
1793
|
-
|
|
1794
|
-
//#region ../../node_modules/stylis/src/Middleware.js
|
|
1777
|
+
// ../../node_modules/stylis/src/Middleware.js
|
|
1795
1778
|
/**
|
|
1796
1779
|
* @param {function[]} collection
|
|
1797
1780
|
* @return {function}
|
|
@@ -1815,8 +1798,7 @@ function rulesheet(callback) {
|
|
|
1815
1798
|
}
|
|
1816
1799
|
};
|
|
1817
1800
|
}
|
|
1818
|
-
|
|
1819
|
-
//#region ../../node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
|
|
1801
|
+
// ../../node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
|
|
1820
1802
|
var weakMemoize = function weakMemoize(func) {
|
|
1821
1803
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
1822
1804
|
return function(arg) {
|
|
@@ -1826,8 +1808,7 @@ var weakMemoize = function weakMemoize(func) {
|
|
|
1826
1808
|
return ret;
|
|
1827
1809
|
};
|
|
1828
1810
|
};
|
|
1829
|
-
|
|
1830
|
-
//#region ../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
1811
|
+
// ../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
1831
1812
|
function memoize(fn) {
|
|
1832
1813
|
var cache = Object.create(null);
|
|
1833
1814
|
return function(arg) {
|
|
@@ -1835,8 +1816,7 @@ function memoize(fn) {
|
|
|
1835
1816
|
return cache[arg];
|
|
1836
1817
|
};
|
|
1837
1818
|
}
|
|
1838
|
-
|
|
1839
|
-
//#region ../../node_modules/@emotion/cache/dist/emotion-cache.esm.js
|
|
1819
|
+
// ../../node_modules/@emotion/cache/dist/emotion-cache.esm.js
|
|
1840
1820
|
var isBrowser$1 = typeof document !== "undefined";
|
|
1841
1821
|
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
1842
1822
|
var previous = 0;
|
|
@@ -2094,8 +2074,7 @@ var createCache = function createCache(options) {
|
|
|
2094
2074
|
cache.sheet.hydrate(nodesToHydrate);
|
|
2095
2075
|
return cache;
|
|
2096
2076
|
};
|
|
2097
|
-
|
|
2098
|
-
//#region ../../node_modules/@babel/runtime/helpers/esm/extends.js
|
|
2077
|
+
// ../../node_modules/@babel/runtime/helpers/esm/extends.js
|
|
2099
2078
|
function _extends() {
|
|
2100
2079
|
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
2101
2080
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -2105,8 +2084,7 @@ function _extends() {
|
|
|
2105
2084
|
return n;
|
|
2106
2085
|
}, _extends.apply(null, arguments);
|
|
2107
2086
|
}
|
|
2108
|
-
|
|
2109
|
-
//#region ../../node_modules/react-is/cjs/react-is.production.min.js
|
|
2087
|
+
// ../../node_modules/react-is/cjs/react-is.production.min.js
|
|
2110
2088
|
/** @license React v16.13.1
|
|
2111
2089
|
* react-is.production.min.js
|
|
2112
2090
|
*
|
|
@@ -2217,8 +2195,7 @@ var require_react_is_production_min = /* @__PURE__ */ __commonJSMin(((exports) =
|
|
|
2217
2195
|
};
|
|
2218
2196
|
exports.typeOf = z;
|
|
2219
2197
|
}));
|
|
2220
|
-
|
|
2221
|
-
//#region ../../node_modules/react-is/cjs/react-is.development.js
|
|
2198
|
+
// ../../node_modules/react-is/cjs/react-is.development.js
|
|
2222
2199
|
/** @license React v16.13.1
|
|
2223
2200
|
* react-is.development.js
|
|
2224
2201
|
*
|
|
@@ -2367,14 +2344,12 @@ var require_react_is_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2367
2344
|
exports.typeOf = typeOf;
|
|
2368
2345
|
})();
|
|
2369
2346
|
}));
|
|
2370
|
-
|
|
2371
|
-
//#region ../../node_modules/react-is/index.js
|
|
2347
|
+
// ../../node_modules/react-is/index.js
|
|
2372
2348
|
var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2373
2349
|
if (process.env.NODE_ENV === "production") module.exports = require_react_is_production_min();
|
|
2374
2350
|
else module.exports = require_react_is_development();
|
|
2375
2351
|
}));
|
|
2376
|
-
|
|
2377
|
-
//#region ../../node_modules/@emotion/react/_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js
|
|
2352
|
+
// ../../node_modules/@emotion/react/_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js
|
|
2378
2353
|
var import_hoist_non_react_statics_cjs = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2379
2354
|
var reactIs = require_react_is();
|
|
2380
2355
|
/**
|
|
@@ -2459,8 +2434,7 @@ var hoistNonReactStatics = (function(targetComponent, sourceComponent) {
|
|
|
2459
2434
|
return (0, import_hoist_non_react_statics_cjs.default)(targetComponent, sourceComponent);
|
|
2460
2435
|
});
|
|
2461
2436
|
react["useInsertionEffect"] && react["useInsertionEffect"] || react.useLayoutEffect;
|
|
2462
|
-
|
|
2463
|
-
//#region ../../node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
2437
|
+
// ../../node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
2464
2438
|
var isBrowser = typeof document !== "undefined";
|
|
2465
2439
|
(/* @__PURE__ */ react.createContext(typeof HTMLElement !== "undefined" ? /* #__PURE__ */ createCache({ key: "css" }) : null)).Provider;
|
|
2466
2440
|
if (!isBrowser);
|
|
@@ -2495,8 +2469,7 @@ function withTheme(Component) {
|
|
|
2495
2469
|
return hoistNonReactStatics(WithTheme, Component);
|
|
2496
2470
|
}
|
|
2497
2471
|
({}).hasOwnProperty;
|
|
2498
|
-
|
|
2499
|
-
//#region ../../node_modules/@emotion/primitives-core/dist/emotion-primitives-core.esm.js
|
|
2472
|
+
// ../../node_modules/@emotion/primitives-core/dist/emotion-primitives-core.esm.js
|
|
2500
2473
|
var import_css_to_react_native = /* @__PURE__ */ __toESM(require_css_to_react_native());
|
|
2501
2474
|
function interleave(vals) {
|
|
2502
2475
|
var strings = vals[0];
|
|
@@ -2631,8 +2604,7 @@ function createStyled(StyleSheet, options) {
|
|
|
2631
2604
|
var getDisplayName = function getDisplayName(primitive) {
|
|
2632
2605
|
return typeof primitive === "string" ? primitive : primitive.displayName || primitive.name || "Styled";
|
|
2633
2606
|
};
|
|
2634
|
-
|
|
2635
|
-
//#region ../../node_modules/@emotion/native/dist/emotion-native.esm.js
|
|
2607
|
+
// ../../node_modules/@emotion/native/dist/emotion-native.esm.js
|
|
2636
2608
|
/**
|
|
2637
2609
|
* a function that returns a styled component which render styles in React Native
|
|
2638
2610
|
*/
|
|
@@ -2686,8 +2658,7 @@ var index = [
|
|
|
2686
2658
|
}
|
|
2687
2659
|
});
|
|
2688
2660
|
}, styled);
|
|
2689
|
-
|
|
2690
|
-
//#region src/web-theme.ts
|
|
2661
|
+
// src/web-theme.ts
|
|
2691
2662
|
const color = {
|
|
2692
2663
|
primary: "#FF4785",
|
|
2693
2664
|
secondary: "#029CFD",
|
|
@@ -2782,8 +2753,7 @@ const dark = {
|
|
|
2782
2753
|
inputTextColor: color.lightest,
|
|
2783
2754
|
inputBorderRadius: 4
|
|
2784
2755
|
};
|
|
2785
|
-
|
|
2786
|
-
//#region src/theme.ts
|
|
2756
|
+
// src/theme.ts
|
|
2787
2757
|
const typography = {
|
|
2788
2758
|
weight: {
|
|
2789
2759
|
regular: "400",
|
|
@@ -2954,7 +2924,6 @@ const darkTheme = {
|
|
|
2954
2924
|
barBg: dark.barBg,
|
|
2955
2925
|
brand: void 0
|
|
2956
2926
|
};
|
|
2957
|
-
//#endregion
|
|
2958
2927
|
exports.ThemeProvider = ThemeProvider;
|
|
2959
2928
|
exports.darkTheme = darkTheme;
|
|
2960
2929
|
exports.styled = index;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native-theming",
|
|
3
|
-
"version": "11.0.0-next.
|
|
3
|
+
"version": "11.0.0-next.2",
|
|
4
4
|
"description": "A wrapper library around emotion 11 to provide theming support for react-native storybook",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@emotion/native": "^11.11.0",
|
|
32
32
|
"@emotion/react": "^11.14.0",
|
|
33
|
-
"tsdown": "^0.
|
|
33
|
+
"tsdown": "^0.23.7"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "*",
|