@pingux/astro 2.20.0-alpha.5 → 2.20.0-alpha.6

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.
@@ -20,14 +20,17 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/hel
20
20
  var _react = _interopRequireWildcard(require("react"));
21
21
  var _CheckIcon = _interopRequireDefault(require("@pingux/mdi-react/CheckIcon"));
22
22
  var _CloseIcon = _interopRequireDefault(require("@pingux/mdi-react/CloseIcon"));
23
+ var _storybookAddonDesigns = require("storybook-addon-designs");
23
24
  var _index = require("../index");
25
+ var _figmaLinks = require("../utils/designUtils/figmaLinks");
24
26
  var _react2 = require("@emotion/react");
25
27
  function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
26
28
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
29
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
28
30
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
29
31
  var _default = {
30
- title: 'Recipes/Inline Editing'
32
+ title: 'Recipes/Inline Editing',
33
+ decorators: [_storybookAddonDesigns.withDesign]
31
34
  };
32
35
  exports["default"] = _default;
33
36
  var EditableAreaContext = /*#__PURE__*/(0, _react.createContext)();
@@ -97,12 +100,19 @@ var Default = function Default() {
97
100
  controlProps: controlProps
98
101
  }));
99
102
  };
103
+ exports.Default = Default;
104
+ Default.parameters = {
105
+ design: {
106
+ type: 'figma',
107
+ url: _figmaLinks.FIGMA_LINKS.inlineEditing["default"]
108
+ }
109
+ };
100
110
 
101
111
  /**
102
112
  * Editable
103
113
  * Wrapper component that provides context value for all editable components
104
114
  */
105
- exports.Default = Default;
115
+
106
116
  var Editable = function Editable(props) {
107
117
  var value = props.value,
108
118
  isEditing = props.isEditing;
@@ -63,6 +63,9 @@ var FIGMA_LINKS = {
63
63
  iconButton: {
64
64
  "default": 'https://www.figma.com/file/Oa6VYtJcUJzEJuuRp0p4ls/Astro?type=design&node-id=0%3A2520&t=We3h7LaaFJQnxdSy-1'
65
65
  },
66
+ inlineEditing: {
67
+ "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=5244-14864&mode=design&t=1pPbrQvGkdMYBNqk-0'
68
+ },
66
69
  link: {
67
70
  "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=8708-29543&t=8Wwd3tIBh3GEjCJB-0'
68
71
  },
@@ -13,10 +13,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
13
13
  import React, { createContext, useContext, useEffect, useRef, useState } from 'react';
14
14
  import CheckIcon from '@pingux/mdi-react/CheckIcon';
15
15
  import CloseIcon from '@pingux/mdi-react/CloseIcon';
16
+ import { withDesign } from 'storybook-addon-designs';
16
17
  import { Box, Icon, IconButton, TextAreaField } from '../index';
18
+ import { FIGMA_LINKS } from '../utils/designUtils/figmaLinks';
17
19
  import { jsx as ___EmotionJSX } from "@emotion/react";
18
20
  export default {
19
- title: 'Recipes/Inline Editing'
21
+ title: 'Recipes/Inline Editing',
22
+ decorators: [withDesign]
20
23
  };
21
24
  var EditableAreaContext = /*#__PURE__*/createContext();
22
25
  var EditableAreaProvider = EditableAreaContext.Provider;
@@ -85,6 +88,12 @@ export var Default = function Default() {
85
88
  controlProps: controlProps
86
89
  }));
87
90
  };
91
+ Default.parameters = {
92
+ design: {
93
+ type: 'figma',
94
+ url: FIGMA_LINKS.inlineEditing["default"]
95
+ }
96
+ };
88
97
 
89
98
  /**
90
99
  * Editable
@@ -56,6 +56,9 @@ export var FIGMA_LINKS = {
56
56
  iconButton: {
57
57
  "default": 'https://www.figma.com/file/Oa6VYtJcUJzEJuuRp0p4ls/Astro?type=design&node-id=0%3A2520&t=We3h7LaaFJQnxdSy-1'
58
58
  },
59
+ inlineEditing: {
60
+ "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=5244-14864&mode=design&t=1pPbrQvGkdMYBNqk-0'
61
+ },
59
62
  link: {
60
63
  "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=8708-29543&t=8Wwd3tIBh3GEjCJB-0'
61
64
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.20.0-alpha.5",
3
+ "version": "2.20.0-alpha.6",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",