@pingux/astro 2.16.0-alpha.3 → 2.16.0-alpha.4

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.
@@ -8,7 +8,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
8
8
  _Object$defineProperty(exports, "__esModule", {
9
9
  value: true
10
10
  });
11
- exports["default"] = exports.Edit = exports.DisplayWithError = exports.DisplayRow = exports.Display = void 0;
11
+ exports["default"] = exports.EditRow = exports.Edit = exports.DisplayWithError = exports.DisplayRow = exports.Display = void 0;
12
12
  var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
13
13
  var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
14
14
  var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
@@ -244,7 +244,7 @@ var Edit = function Edit() {
244
244
  var _useState3 = (0, _react.useState)(false),
245
245
  _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
246
246
  isSubmitted = _useState4[0],
247
- submitFields = _useState4[1];
247
+ setIsSubmitted = _useState4[1];
248
248
  var addRow = function addRow() {
249
249
  var _context;
250
250
  var newRow = {
@@ -313,7 +313,7 @@ var Edit = function Edit() {
313
313
  updateRow: updateRow,
314
314
  key: "row container ".concat(row.name),
315
315
  isSubmitted: isSubmitted,
316
- submitFields: submitFields
316
+ setIsSubmitted: setIsSubmitted
317
317
  }));
318
318
  })))));
319
319
  };
@@ -379,17 +379,20 @@ var DisplayRow = function DisplayRow(props) {
379
379
  }));
380
380
  };
381
381
  exports.DisplayRow = DisplayRow;
382
- var EditRow = /*#__PURE__*/(0, _react.memo)(function (props) {
382
+ var EditRow = function EditRow(props) {
383
383
  var isDisabled = props.isDisabled,
384
384
  isNewRow = props.isNewRow,
385
385
  index = props.index,
386
386
  textValue = props.textValue,
387
387
  inputValue = props.inputValue,
388
- updateRow = props.updateRow,
389
- removeRow = props.removeRow,
388
+ _props$removeRow = props.removeRow,
389
+ removeRow = _props$removeRow === void 0 ? function () {} : _props$removeRow,
390
+ _props$updateRow = props.updateRow,
391
+ updateRow = _props$updateRow === void 0 ? function () {} : _props$updateRow,
390
392
  areRowsValid = props.areRowsValid,
391
393
  isSubmitted = props.isSubmitted,
392
- submitFields = props.submitFields;
394
+ _props$setIsSubmitted = props.setIsSubmitted,
395
+ setIsSubmitted = _props$setIsSubmitted === void 0 ? function () {} : _props$setIsSubmitted;
393
396
  var items = [{
394
397
  name: 'Aardvark',
395
398
  id: '1'
@@ -404,11 +407,11 @@ var EditRow = /*#__PURE__*/(0, _react.memo)(function (props) {
404
407
  var textFieldRef = (0, _react.useRef)();
405
408
  var setTextValue = function setTextValue(value) {
406
409
  updateRow(index, value, 'textValue');
407
- submitFields(false);
410
+ setIsSubmitted(false);
408
411
  };
409
412
  var setInputValue = function setInputValue(value) {
410
413
  updateRow(index, value, 'inputValue');
411
- submitFields(false);
414
+ setIsSubmitted(false);
412
415
  };
413
416
  (0, _react.useEffect)(function () {
414
417
  if (isNewRow) {
@@ -512,4 +515,5 @@ var EditRow = /*#__PURE__*/(0, _react.memo)(function (props) {
512
515
  name: 'Delete Icon'
513
516
  }
514
517
  })))));
515
- });
518
+ };
519
+ exports.EditRow = EditRow;
@@ -22,6 +22,7 @@ var _reactStately = require("react-stately");
22
22
  var _i18n = require("@react-aria/i18n");
23
23
  var _Buttons = require("../components/Button/Buttons.styles");
24
24
  var _index = require("../index");
25
+ var _figmaLinks = require("../utils/designUtils/figmaLinks.js");
25
26
  var _react2 = require("@emotion/react");
26
27
  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; }
27
28
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context6 = ownKeys(Object(source), !0)).call(_context6, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context7 = ownKeys(Object(source))).call(_context7, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; } /* eslint-disable no-nested-ternary */
@@ -105,6 +106,12 @@ var Default = function Default() {
105
106
  })));
106
107
  };
107
108
  exports.Default = Default;
109
+ Default.parameters = {
110
+ design: {
111
+ type: 'figma',
112
+ url: _figmaLinks.FIGMA_LINKS.slider["default"]
113
+ }
114
+ };
108
115
  var Slider = function Slider(props) {
109
116
  var trackRef = _react["default"].useRef(null);
110
117
  var numberFormatter = (0, _i18n.useNumberFormatter)(props.formatOptions);
@@ -93,6 +93,9 @@ var FIGMA_LINKS = {
93
93
  },
94
94
  stepper: {
95
95
  "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=7523-27301&t=rLZVlRDdR1JhehkH-0'
96
+ },
97
+ slider: {
98
+ "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=43112%3A1773&mode=dev'
96
99
  }
97
100
  };
98
101
  exports.FIGMA_LINKS = FIGMA_LINKS;
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
3
3
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
4
4
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
5
5
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
6
- import React, { memo, useEffect, useRef, useState } from 'react';
6
+ import React, { useEffect, useRef, useState } from 'react';
7
7
  import AddIcon from '@pingux/mdi-react/AddIcon';
8
8
  import AlertCircleIcon from '@pingux/mdi-react/AlertCircleIcon';
9
9
  import CogsIcon from '@pingux/mdi-react/CogsIcon';
@@ -228,7 +228,7 @@ export var Edit = function Edit() {
228
228
  var _useState3 = useState(false),
229
229
  _useState4 = _slicedToArray(_useState3, 2),
230
230
  isSubmitted = _useState4[0],
231
- submitFields = _useState4[1];
231
+ setIsSubmitted = _useState4[1];
232
232
  var addRow = function addRow() {
233
233
  var _context;
234
234
  var newRow = {
@@ -297,7 +297,7 @@ export var Edit = function Edit() {
297
297
  updateRow: updateRow,
298
298
  key: "row container ".concat(row.name),
299
299
  isSubmitted: isSubmitted,
300
- submitFields: submitFields
300
+ setIsSubmitted: setIsSubmitted
301
301
  }));
302
302
  })))));
303
303
  };
@@ -361,17 +361,20 @@ export var DisplayRow = function DisplayRow(props) {
361
361
  sx: sx.badge
362
362
  }));
363
363
  };
364
- var EditRow = /*#__PURE__*/memo(function (props) {
364
+ export var EditRow = function EditRow(props) {
365
365
  var isDisabled = props.isDisabled,
366
366
  isNewRow = props.isNewRow,
367
367
  index = props.index,
368
368
  textValue = props.textValue,
369
369
  inputValue = props.inputValue,
370
- updateRow = props.updateRow,
371
- removeRow = props.removeRow,
370
+ _props$removeRow = props.removeRow,
371
+ removeRow = _props$removeRow === void 0 ? function () {} : _props$removeRow,
372
+ _props$updateRow = props.updateRow,
373
+ updateRow = _props$updateRow === void 0 ? function () {} : _props$updateRow,
372
374
  areRowsValid = props.areRowsValid,
373
375
  isSubmitted = props.isSubmitted,
374
- submitFields = props.submitFields;
376
+ _props$setIsSubmitted = props.setIsSubmitted,
377
+ setIsSubmitted = _props$setIsSubmitted === void 0 ? function () {} : _props$setIsSubmitted;
375
378
  var items = [{
376
379
  name: 'Aardvark',
377
380
  id: '1'
@@ -386,11 +389,11 @@ var EditRow = /*#__PURE__*/memo(function (props) {
386
389
  var textFieldRef = useRef();
387
390
  var setTextValue = function setTextValue(value) {
388
391
  updateRow(index, value, 'textValue');
389
- submitFields(false);
392
+ setIsSubmitted(false);
390
393
  };
391
394
  var setInputValue = function setInputValue(value) {
392
395
  updateRow(index, value, 'inputValue');
393
- submitFields(false);
396
+ setIsSubmitted(false);
394
397
  };
395
398
  useEffect(function () {
396
399
  if (isNewRow) {
@@ -494,4 +497,4 @@ var EditRow = /*#__PURE__*/memo(function (props) {
494
497
  name: 'Delete Icon'
495
498
  }
496
499
  })))));
497
- });
500
+ };
@@ -18,6 +18,7 @@ import { useSliderState } from 'react-stately';
18
18
  import { useNumberFormatter } from '@react-aria/i18n';
19
19
  import { defaultFocus } from '../components/Button/Buttons.styles';
20
20
  import { Box } from '../index';
21
+ import { FIGMA_LINKS } from '../utils/designUtils/figmaLinks.js';
21
22
  import { jsx as ___EmotionJSX } from "@emotion/react";
22
23
  export default {
23
24
  title: 'Recipes/Slider'
@@ -97,6 +98,12 @@ export var Default = function Default() {
97
98
  step: 1
98
99
  })));
99
100
  };
101
+ Default.parameters = {
102
+ design: {
103
+ type: 'figma',
104
+ url: FIGMA_LINKS.slider["default"]
105
+ }
106
+ };
100
107
  var Slider = function Slider(props) {
101
108
  var trackRef = React.useRef(null);
102
109
  var numberFormatter = useNumberFormatter(props.formatOptions);
@@ -86,5 +86,8 @@ export var FIGMA_LINKS = {
86
86
  },
87
87
  stepper: {
88
88
  "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=7523-27301&t=rLZVlRDdR1JhehkH-0'
89
+ },
90
+ slider: {
91
+ "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=43112%3A1773&mode=dev'
89
92
  }
90
93
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.16.0-alpha.3",
3
+ "version": "2.16.0-alpha.4",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",