@storybook/addon-controls 7.0.0-alpha.10 → 7.0.0-alpha.11

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.
@@ -29,10 +29,12 @@ const ControlsPanel = () => {
29
29
  const {
30
30
  path
31
31
  } = (0, _api.useStorybookState)();
32
- const hasControls = Object.values(rows).some(arg => arg?.control);
32
+ const hasControls = Object.values(rows).some(arg => arg === null || arg === void 0 ? void 0 : arg.control);
33
33
  const showWarning = !(hasControls && isArgsStory) && !hideNoControlsWarning;
34
34
  const withPresetColors = Object.entries(rows).reduce((acc, [key, arg]) => {
35
- if (arg?.control?.type !== 'color' || arg?.control?.presetColors) acc[key] = arg;else acc[key] = Object.assign({}, arg, {
35
+ var _arg$control, _arg$control2;
36
+
37
+ if ((arg === null || arg === void 0 ? void 0 : (_arg$control = arg.control) === null || _arg$control === void 0 ? void 0 : _arg$control.type) !== 'color' || arg !== null && arg !== void 0 && (_arg$control2 = arg.control) !== null && _arg$control2 !== void 0 && _arg$control2.presetColors) acc[key] = arg;else acc[key] = Object.assign({}, arg, {
36
38
  control: Object.assign({}, arg.control, {
37
39
  presetColors
38
40
  })
@@ -18,7 +18,7 @@ _addons.addons.register(_constants.ADDON_ID, api => {
18
18
  _addons.addons.addPanel(_constants.ADDON_ID, {
19
19
  title() {
20
20
  const rows = (0, _api.useArgTypes)();
21
- const controlsCount = Object.values(rows).filter(argType => argType?.control).length;
21
+ const controlsCount = Object.values(rows).filter(argType => argType === null || argType === void 0 ? void 0 : argType.control).length;
22
22
  const suffix = controlsCount === 0 ? '' : ` (${controlsCount})`;
23
23
  return `Controls${suffix}`;
24
24
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-controls",
3
- "version": "7.0.0-alpha.10",
3
+ "version": "7.0.0-alpha.11",
4
4
  "description": "Interact with component inputs dynamically in the Storybook UI",
5
5
  "keywords": [
6
6
  "addon",
@@ -35,19 +35,20 @@
35
35
  "*.d.ts"
36
36
  ],
37
37
  "scripts": {
38
+ "check": "tsc --noEmit",
38
39
  "prepare": "node ../../scripts/prepare.js"
39
40
  },
40
41
  "dependencies": {
41
- "@storybook/addons": "7.0.0-alpha.10",
42
- "@storybook/api": "7.0.0-alpha.10",
43
- "@storybook/blocks": "7.0.0-alpha.10",
44
- "@storybook/client-logger": "7.0.0-alpha.10",
45
- "@storybook/components": "7.0.0-alpha.10",
46
- "@storybook/core-common": "7.0.0-alpha.10",
42
+ "@storybook/addons": "7.0.0-alpha.11",
43
+ "@storybook/api": "7.0.0-alpha.11",
44
+ "@storybook/blocks": "7.0.0-alpha.11",
45
+ "@storybook/client-logger": "7.0.0-alpha.11",
46
+ "@storybook/components": "7.0.0-alpha.11",
47
+ "@storybook/core-common": "7.0.0-alpha.11",
47
48
  "@storybook/csf": "0.0.2--canary.4566f4d.1",
48
- "@storybook/node-logger": "7.0.0-alpha.10",
49
- "@storybook/store": "7.0.0-alpha.10",
50
- "@storybook/theming": "7.0.0-alpha.10",
49
+ "@storybook/node-logger": "7.0.0-alpha.11",
50
+ "@storybook/store": "7.0.0-alpha.11",
51
+ "@storybook/theming": "7.0.0-alpha.11",
51
52
  "core-js": "^3.8.2",
52
53
  "lodash": "^4.17.21",
53
54
  "ts-dedent": "^2.0.0"
@@ -67,7 +68,7 @@
67
68
  "publishConfig": {
68
69
  "access": "public"
69
70
  },
70
- "gitHead": "b13dd8fb52819d73d4983148af8ffc5d683e8b75",
71
+ "gitHead": "688d338903e84a7e83cb104472e868e734399f65",
71
72
  "storybook": {
72
73
  "displayName": "Controls",
73
74
  "icon": "https://user-images.githubusercontent.com/263385/101991669-479cc600-3c7c-11eb-93d9-38b67e8371f2.png",