@salutejs/plasma-sb-utils 0.209.0-canary.2303.18841217749.0 → 0.209.0-dev.0

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.
@@ -0,0 +1,14 @@
1
+ import type { Decorator } from '@storybook/react';
2
+ export declare const reactStrictModePreviewOption: {
3
+ reactStrictMode: {
4
+ description: string;
5
+ toolbar: {
6
+ title: string;
7
+ items: {
8
+ value: boolean;
9
+ title: string;
10
+ }[];
11
+ };
12
+ };
13
+ };
14
+ export declare const withReactStrictMode: Decorator;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ export var reactStrictModePreviewOption = {
3
+ reactStrictMode: {
4
+ description: 'Decorator for toggle react strict mode',
5
+ toolbar: {
6
+ title: 'React "Strict Mode"',
7
+ items: [
8
+ { value: false, title: 'Disabled' },
9
+ { value: true, title: 'Enabled' },
10
+ ],
11
+ },
12
+ },
13
+ };
14
+ export var withReactStrictMode = function (Story, context) {
15
+ if (!context.globals.reactStrictMode) {
16
+ return React.createElement(Story, null);
17
+ }
18
+ return (React.createElement(React.StrictMode, null,
19
+ React.createElement(Story, null)));
20
+ };
21
+ //# sourceMappingURL=ReactStrictModeDecorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReactStrictModeDecorator.js","sourceRoot":"","sources":["../../src/components/ReactStrictModeDecorator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,CAAC,IAAM,4BAA4B,GAAG;IACxC,eAAe,EAAE;QACb,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE;YACL,KAAK,EAAE,qBAAqB;YAC5B,KAAK,EAAE;gBACH,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE;gBACnC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;aACpC;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,IAAM,mBAAmB,GAAc,UAAC,KAAK,EAAE,OAAO;IACzD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,EAAE;QAClC,OAAO,oBAAC,KAAK,OAAG,CAAC;KACpB;IAED,OAAO,CACH,oBAAC,KAAK,CAAC,UAAU;QACb,oBAAC,KAAK,OAAG,CACM,CACtB,CAAC;AACN,CAAC,CAAC"}
@@ -3,3 +3,4 @@ export { IconPlaceholder } from './IconPlaceholder';
3
3
  export { PaletteGrid } from './PaletteGrid';
4
4
  export { InSpacing as InSpacingDecorator } from './StoryDecorators';
5
5
  export { ThemeColors } from './ThemeColors';
6
+ export { withReactStrictMode, reactStrictModePreviewOption } from './ReactStrictModeDecorator';
@@ -3,4 +3,5 @@ export { IconPlaceholder } from './IconPlaceholder';
3
3
  export { PaletteGrid } from './PaletteGrid';
4
4
  export { InSpacing as InSpacingDecorator } from './StoryDecorators';
5
5
  export { ThemeColors } from './ThemeColors';
6
+ export { withReactStrictMode, reactStrictModePreviewOption } from './ReactStrictModeDecorator';
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-sb-utils",
3
- "version": "0.209.0-canary.2303.18841217749.0",
3
+ "version": "0.209.0-dev.0",
4
4
  "description": "Code shared between ui libraries.",
5
5
  "author": "Salute Frontend Team <salute.developers@gmail.com>",
6
6
  "license": "MIT",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@salutejs/plasma-colors": "0.16.0",
23
- "@salutejs/plasma-core": "1.209.0-canary.2303.18841217749.0",
23
+ "@salutejs/plasma-core": "1.209.0-dev.0",
24
24
  "param-case": "^3.0.4"
25
25
  },
26
26
  "peerDependencies": {
@@ -44,5 +44,5 @@
44
44
  "files": [
45
45
  "lib"
46
46
  ],
47
- "gitHead": "465d21b58d746fc2770c7ef56ca6e29dca9d40c2"
47
+ "gitHead": "9d4f31a763daf02b7bfb6df2ad5479270c6acb0e"
48
48
  }