@pingux/astro 2.95.0 → 2.96.0-alpha.1

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.
Files changed (29) hide show
  1. package/lib/cjs/components/EditButton/EditButton.stories.js +7 -0
  2. package/lib/cjs/components/IconButton/IconButton.stories.d.ts +37 -4
  3. package/lib/cjs/components/IconButton/IconButton.stories.js +45 -2
  4. package/lib/cjs/components/IconButton/IconButton.styles.d.ts +14 -0
  5. package/lib/cjs/components/IconButton/IconButton.styles.js +6 -3
  6. package/lib/cjs/components/PasswordField/PasswordField.d.ts +4 -0
  7. package/lib/cjs/components/PasswordField/PasswordField.js +17 -97
  8. package/lib/cjs/components/PasswordField/PasswordField.stories.d.ts +17 -0
  9. package/lib/cjs/components/PasswordField/PasswordField.stories.js +12 -0
  10. package/lib/cjs/components/PasswordField/PasswordField.test.d.ts +1 -0
  11. package/lib/cjs/components/PasswordField/PasswordField.test.js +88 -43
  12. package/lib/cjs/components/PasswordField/index.d.ts +1 -0
  13. package/lib/cjs/types/index.d.ts +1 -0
  14. package/lib/cjs/types/index.js +29 -18
  15. package/lib/cjs/types/passwordField.d.ts +69 -0
  16. package/lib/cjs/types/passwordField.js +6 -0
  17. package/lib/cjs/types/requirementsList.d.ts +2 -1
  18. package/lib/cjs/utils/designUtils/figmaLinks.d.ts +8 -0
  19. package/lib/cjs/utils/designUtils/figmaLinks.js +9 -1
  20. package/lib/components/EditButton/EditButton.stories.js +7 -0
  21. package/lib/components/IconButton/IconButton.stories.js +42 -0
  22. package/lib/components/IconButton/IconButton.styles.js +6 -3
  23. package/lib/components/PasswordField/PasswordField.js +20 -100
  24. package/lib/components/PasswordField/PasswordField.stories.js +12 -0
  25. package/lib/components/PasswordField/PasswordField.test.js +66 -21
  26. package/lib/types/index.js +1 -0
  27. package/lib/types/passwordField.js +1 -0
  28. package/lib/utils/designUtils/figmaLinks.js +9 -1
  29. package/package.json +1 -1
@@ -24,6 +24,7 @@ var _react = _interopRequireWildcard(require("react"));
24
24
  var _storybookAddonDesigns = require("storybook-addon-designs");
25
25
  var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
26
26
  var _index = require("../../index");
27
+ var _figmaLinks = require("../../utils/designUtils/figmaLinks");
27
28
  var _iconButtonAttributes = require("../IconButton/iconButtonAttributes");
28
29
  var _EditButton = require("./EditButton");
29
30
  var _EditButton2 = _interopRequireDefault(require("./EditButton.mdx"));
@@ -65,6 +66,12 @@ var Default = function Default(args) {
65
66
  }));
66
67
  };
67
68
  exports.Default = Default;
69
+ Default.parameters = {
70
+ design: {
71
+ type: 'figma',
72
+ url: _figmaLinks.FIGMA_LINKS.editButton["default"]
73
+ }
74
+ };
68
75
  var WithSizeProp = function WithSizeProp(args) {
69
76
  return (0, _react2.jsx)(_index.EditButton, (0, _extends2["default"])({}, args, {
70
77
  size: "lg",
@@ -4,7 +4,40 @@ import { IconButtonProps } from '../../types';
4
4
  declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
5
5
  export default _default;
6
6
  export declare const Default: StoryFn<IconButtonProps>;
7
- export declare const WithTooltip: () => React.JSX.Element;
8
- export declare const Disabled: () => React.JSX.Element;
9
- export declare const Sizes: () => React.JSX.Element;
10
- export declare const CommonlyUsed: () => React.JSX.Element;
7
+ export declare const Inverted: StoryFn<IconButtonProps>;
8
+ export declare const WithTooltip: {
9
+ (): React.JSX.Element;
10
+ parameters: {
11
+ design: {
12
+ type: string;
13
+ url: string;
14
+ };
15
+ };
16
+ };
17
+ export declare const Disabled: {
18
+ (): React.JSX.Element;
19
+ parameters: {
20
+ design: {
21
+ type: string;
22
+ url: string;
23
+ };
24
+ };
25
+ };
26
+ export declare const Sizes: {
27
+ (): React.JSX.Element;
28
+ parameters: {
29
+ design: {
30
+ type: string;
31
+ url: string;
32
+ };
33
+ };
34
+ };
35
+ export declare const CommonlyUsed: {
36
+ (): React.JSX.Element;
37
+ parameters: {
38
+ design: {
39
+ type: string;
40
+ url: string;
41
+ };
42
+ };
43
+ };
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
5
5
  _Object$defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports["default"] = exports.WithTooltip = exports.Sizes = exports.Disabled = exports.Default = exports.CommonlyUsed = void 0;
8
+ exports["default"] = exports.WithTooltip = exports.Sizes = exports.Inverted = exports.Disabled = exports.Default = exports.CommonlyUsed = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _CreateIcon = _interopRequireDefault(require("@pingux/mdi-react/CreateIcon"));
@@ -55,6 +55,25 @@ Default.parameters = {
55
55
  url: _figmaLinks.FIGMA_LINKS.iconButton["default"]
56
56
  }
57
57
  };
58
+ var Inverted = function Inverted(args) {
59
+ return (0, _react2.jsx)(_index.IconButton, (0, _extends2["default"])({
60
+ "aria-label": "Plus icon button"
61
+ }, args, {
62
+ variant: "inverted"
63
+ }), (0, _react2.jsx)(_index.Icon, {
64
+ icon: _PlusIcon["default"],
65
+ title: {
66
+ name: 'Plus Icon'
67
+ }
68
+ }));
69
+ };
70
+ exports.Inverted = Inverted;
71
+ Inverted.parameters = {
72
+ design: {
73
+ type: 'figma',
74
+ url: _figmaLinks.FIGMA_LINKS.iconButton.inverted
75
+ }
76
+ };
58
77
  var WithTooltip = function WithTooltip() {
59
78
  return (0, _react2.jsx)(_index.IconButton, {
60
79
  "aria-label": "icon button with tooltip",
@@ -68,6 +87,12 @@ var WithTooltip = function WithTooltip() {
68
87
  }));
69
88
  };
70
89
  exports.WithTooltip = WithTooltip;
90
+ WithTooltip.parameters = {
91
+ design: {
92
+ type: 'figma',
93
+ url: _figmaLinks.FIGMA_LINKS.iconButton.withTooltip
94
+ }
95
+ };
71
96
  var Disabled = function Disabled() {
72
97
  return (0, _react2.jsx)(_index.IconButton, {
73
98
  "aria-label": "disabled icon button",
@@ -80,6 +105,12 @@ var Disabled = function Disabled() {
80
105
  }));
81
106
  };
82
107
  exports.Disabled = Disabled;
108
+ Disabled.parameters = {
109
+ design: {
110
+ type: 'figma',
111
+ url: _figmaLinks.FIGMA_LINKS.iconButton.disabled
112
+ }
113
+ };
83
114
  var Sizes = function Sizes() {
84
115
  return (0, _react2.jsx)(_index.Table, null, (0, _react2.jsx)(_index.TableHead, null, (0, _react2.jsx)(_index.TableRow, {
85
116
  key: "head"
@@ -185,6 +216,12 @@ var Sizes = function Sizes() {
185
216
  }))))));
186
217
  };
187
218
  exports.Sizes = Sizes;
219
+ Sizes.parameters = {
220
+ design: {
221
+ type: 'figma',
222
+ url: _figmaLinks.FIGMA_LINKS.iconButton.sizes
223
+ }
224
+ };
188
225
  var CommonlyUsed = function CommonlyUsed() {
189
226
  return (
190
227
  // please note these are intentionally not mapped for story transparency
@@ -507,4 +544,10 @@ var CommonlyUsed = function CommonlyUsed() {
507
544
  }))))
508
545
  );
509
546
  };
510
- exports.CommonlyUsed = CommonlyUsed;
547
+ exports.CommonlyUsed = CommonlyUsed;
548
+ CommonlyUsed.parameters = {
549
+ design: {
550
+ type: 'figma',
551
+ url: _figmaLinks.FIGMA_LINKS.iconButton.commonlyUsed
552
+ }
553
+ };
@@ -23,12 +23,14 @@ export declare const base: {
23
23
  };
24
24
  '&.is-hovered': {
25
25
  bg: string;
26
+ boxShadow: string;
26
27
  };
27
28
  '&.is-pressed': {
28
29
  path: {
29
30
  fill: string;
30
31
  };
31
32
  bg: string;
33
+ boxShadow: string;
32
34
  };
33
35
  };
34
36
  export declare const square: {
@@ -56,12 +58,14 @@ export declare const square: {
56
58
  };
57
59
  '&.is-hovered': {
58
60
  bg: string;
61
+ boxShadow: string;
59
62
  };
60
63
  '&.is-pressed': {
61
64
  path: {
62
65
  fill: string;
63
66
  };
64
67
  bg: string;
68
+ boxShadow: string;
65
69
  };
66
70
  };
67
71
  declare const _default: {
@@ -90,12 +94,14 @@ declare const _default: {
90
94
  };
91
95
  '&.is-hovered': {
92
96
  bg: string;
97
+ boxShadow: string;
93
98
  };
94
99
  '&.is-pressed': {
95
100
  path: {
96
101
  fill: string;
97
102
  };
98
103
  bg: string;
104
+ boxShadow: string;
99
105
  };
100
106
  };
101
107
  bidirectional: {
@@ -262,6 +268,7 @@ declare const _default: {
262
268
  bg: string;
263
269
  borderColor: string;
264
270
  color: string;
271
+ boxShadow: string;
265
272
  };
266
273
  justifyContent: string;
267
274
  appearance: string;
@@ -377,12 +384,14 @@ declare const _default: {
377
384
  };
378
385
  '&.is-hovered': {
379
386
  bg: string;
387
+ boxShadow: string;
380
388
  };
381
389
  '&.is-pressed': {
382
390
  path: {
383
391
  fill: string;
384
392
  };
385
393
  bg: string;
394
+ boxShadow: string;
386
395
  };
387
396
  };
388
397
  invertedBadgeDeleteButton: {
@@ -434,6 +443,7 @@ declare const _default: {
434
443
  bg: string;
435
444
  borderColor: string;
436
445
  color: string;
446
+ boxShadow: string;
437
447
  };
438
448
  justifyContent: string;
439
449
  appearance: string;
@@ -473,12 +483,14 @@ declare const _default: {
473
483
  };
474
484
  '&.is-hovered': {
475
485
  bg: string;
486
+ boxShadow: string;
476
487
  };
477
488
  '&.is-pressed': {
478
489
  path: {
479
490
  fill: string;
480
491
  };
481
492
  bg: string;
493
+ boxShadow: string;
482
494
  };
483
495
  };
484
496
  svgIconButton: {
@@ -506,12 +518,14 @@ declare const _default: {
506
518
  };
507
519
  '&.is-hovered': {
508
520
  bg: string;
521
+ boxShadow: string;
509
522
  };
510
523
  '&.is-pressed': {
511
524
  path: {
512
525
  fill: string;
513
526
  };
514
527
  bg: string;
528
+ boxShadow: string;
515
529
  };
516
530
  };
517
531
  toggle: {
@@ -45,13 +45,15 @@ var base = {
45
45
  outline: 'none',
46
46
  '&.is-focused': _objectSpread({}, _Buttons.defaultFocus),
47
47
  '&.is-hovered': {
48
- bg: 'accent.95'
48
+ bg: 'accent.95',
49
+ boxShadow: 'standard'
49
50
  },
50
51
  '&.is-pressed': {
51
52
  'path': {
52
53
  fill: 'white'
53
54
  },
54
- bg: 'active'
55
+ bg: 'active',
56
+ boxShadow: 'none'
55
57
  }
56
58
  };
57
59
  exports.base = base;
@@ -89,7 +91,8 @@ var inverted = _objectSpread(_objectSpread({}, base), {}, {
89
91
  '&.is-pressed': {
90
92
  bg: 'accent.20',
91
93
  borderColor: 'accent.20',
92
- color: 'white'
94
+ color: 'white',
95
+ boxShadow: 'none'
93
96
  }
94
97
  });
95
98
  var invertedSquare = _objectSpread(_objectSpread({}, inverted), {}, {
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { PasswordFieldProps } from '../../types';
3
+ declare const PasswordField: React.ForwardRefExoticComponent<PasswordFieldProps & React.RefAttributes<HTMLInputElement>>;
4
+ export default PasswordField;
@@ -30,44 +30,36 @@ var _EyeOffOutlineIcon = _interopRequireDefault(require("@pingux/mdi-react/EyeOf
30
30
  var _EyeOutlineIcon = _interopRequireDefault(require("@pingux/mdi-react/EyeOutlineIcon"));
31
31
  var _utils = require("@react-aria/utils");
32
32
  var _visuallyHidden = require("@react-aria/visually-hidden");
33
- var _propTypes = _interopRequireDefault(require("prop-types"));
34
33
  var _ = require("../..");
35
34
  var _hooks = require("../../hooks");
36
35
  var _pendoID = require("../../utils/devUtils/constants/pendoID");
37
36
  var _statuses = _interopRequireDefault(require("../../utils/devUtils/constants/statuses"));
38
- var _ariaAttributes = require("../../utils/docUtils/ariaAttributes");
39
- var _fieldAttributes = require("../../utils/docUtils/fieldAttributes");
40
37
  var _statusProp = require("../../utils/docUtils/statusProp");
41
38
  var _react2 = require("@emotion/react");
42
39
  var _excluded = ["helperText", "isVisible", "onVisibleChange", "requirements", "requirementsListProps", "slots", "status", "viewHiddenIconTestId", "viewIconTestId"];
43
40
  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); }
44
41
  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; }
45
42
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty2(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
46
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(source), !0)).call(_context3, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
43
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
47
44
  var displayName = 'PasswordField';
48
45
  var ARIA_LABELS_FOR_SHOW_PASSWORD_TOGGLE = {
49
46
  HIDE: 'hide password',
50
47
  SHOW: 'show password'
51
48
  };
52
- var RequirementMessage = function RequirementMessage(_ref) {
49
+ var RequirementMessage = function RequirementMessage(props) {
53
50
  var _context;
54
- var requirement = _ref.requirement;
51
+ var requirement = props.requirement;
55
52
  return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _hooks.useDebounce)({
56
- value: (0, _concat["default"])(_context = "".concat(requirement.name, " ")).call(_context, requirement.status === _statuses["default"].SUCCESS ? 'success' : 'not met'),
53
+ value: (0, _concat["default"])(_context = "".concat(requirement.name, " ")).call(_context, requirement.status === _statuses["default"].SUCCESS ? _statuses["default"].SUCCESS : 'not met'),
57
54
  delay: 100
58
55
  }));
59
56
  };
60
- RequirementMessage.propTypes = {
61
- requirement: _propTypes["default"].shape({
62
- name: _propTypes["default"].string,
63
- status: _propTypes["default"].string
64
- })
65
- };
66
57
  var PasswordField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
67
58
  var helperText = props.helperText,
68
59
  isVisibleProp = props.isVisible,
69
60
  onVisibleChangeProp = props.onVisibleChange,
70
- requirements = props.requirements,
61
+ _props$requirements = props.requirements,
62
+ requirements = _props$requirements === void 0 ? [] : _props$requirements,
71
63
  requirementsListProps = props.requirementsListProps,
72
64
  slots = props.slots,
73
65
  status = props.status,
@@ -79,9 +71,9 @@ var PasswordField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
79
71
  isTyping = _useState2[0],
80
72
  setIsTyping = _useState2[1];
81
73
  var checkRequirements = function checkRequirements() {
82
- return !(0, _filter["default"])(requirements).call(requirements, function (req) {
74
+ return (0, _filter["default"])(requirements).call(requirements, function (req) {
83
75
  return req.status === 'default';
84
- }).length > 0;
76
+ }).length === 0;
85
77
  };
86
78
  var _useField = (0, _hooks.useField)(_objectSpread({
87
79
  status: status
@@ -92,20 +84,16 @@ var PasswordField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
92
84
  fieldLabelProps = _useField.fieldLabelProps;
93
85
  var isFocused = fieldControlInputProps.isFocused,
94
86
  onChange = fieldControlInputProps.onChange;
95
- var inputRef = (0, _react.useRef)();
96
- var popoverRef = (0, _react.useRef)();
87
+ var inputRef = (0, _hooks.useLocalOrForwardRef)(ref);
88
+ var popoverRef = (0, _react.useRef)(null);
97
89
  (0, _hooks.usePropWarning)(props, 'disabled', 'isDisabled');
98
- /* istanbul ignore next */
99
- (0, _react.useImperativeHandle)(ref, function () {
100
- return inputRef.current;
101
- });
102
90
  var _useProgressiveState = (0, _hooks.useProgressiveState)(isVisibleProp, isVisibleProp),
103
91
  _useProgressiveState2 = (0, _slicedToArray2["default"])(_useProgressiveState, 2),
104
92
  isVisible = _useProgressiveState2[0],
105
93
  setIsShown = _useProgressiveState2[1];
106
94
 
107
95
  // Measure the width of the input to inform the width of the menu (below).
108
- var _useState3 = (0, _react.useState)(null),
96
+ var _useState3 = (0, _react.useState)(0),
109
97
  _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
110
98
  menuWidth = _useState4[0],
111
99
  setMenuWidth = _useState4[1];
@@ -150,12 +138,12 @@ var PasswordField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
150
138
  var toggleShowPasswordAriaLabel = isVisible ? ARIA_LABELS_FOR_SHOW_PASSWORD_TOGGLE.HIDE : ARIA_LABELS_FOR_SHOW_PASSWORD_TOGGLE.SHOW;
151
139
  var handleToggleShowPassword = function handleToggleShowPassword() {
152
140
  setIsShown(!isVisible);
141
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
142
+ args[_key] = arguments[_key];
143
+ }
144
+ var params = _objectSpread({}, args);
153
145
  if (onVisibleChangeProp) {
154
- var _context2;
155
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
156
- args[_key] = arguments[_key];
157
- }
158
- onVisibleChangeProp.apply(void 0, (0, _concat["default"])(_context2 = [!isVisible]).call(_context2, args));
146
+ onVisibleChangeProp(!isVisible, params);
159
147
  }
160
148
  };
161
149
  var handleInputChange = function handleInputChange(e) {
@@ -165,7 +153,7 @@ var PasswordField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
165
153
  setIsTyping(true);
166
154
  (0, _setTimeout2["default"])(function () {
167
155
  setIsTyping(false);
168
- }, [300]);
156
+ }, 300);
169
157
  };
170
158
  return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_.Box, (0, _extends2["default"])({
171
159
  variant: "forms.input.fieldContainer"
@@ -222,74 +210,6 @@ var PasswordField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
222
210
  }));
223
211
  }))));
224
212
  });
225
- PasswordField.propTypes = _objectSpread(_objectSpread(_objectSpread({
226
- /** The rendered label for the field. */
227
- label: _propTypes["default"].node,
228
- /** Whether or not the password is visible. */
229
- isVisible: _propTypes["default"].bool,
230
- /** Function that is passed into the IconButton within this component. */
231
- onVisibleChange: _propTypes["default"].func,
232
- /** Text rendered below the input. */
233
- helperText: _propTypes["default"].node,
234
- /** The unique identifier for the input element. */
235
- id: _propTypes["default"].string,
236
- /** The name for the input element. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). */
237
- name: _propTypes["default"].string,
238
- /**
239
- * Callback fired when the value is changed on the input element.
240
- *
241
- * @param {object} event The event source of the callback.
242
- * You can pull out the new value by accessing `event.target.value` (string).
243
- */
244
- onChange: _propTypes["default"].func,
245
- /** The value for the input element (controlled). */
246
- value: _propTypes["default"].string,
247
- /** How the input should handle autocompletion according to the browser. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautocomplete). The `autocomplete` prop is an alias for this. */
248
- autoComplete: _propTypes["default"].string,
249
- /** @ignore Alias for `autoComplete` prop. Exists for backwards-compatibility. */
250
- autocomplete: _propTypes["default"].string,
251
- /** A list of class names to apply to the input element. */
252
- className: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].arrayOf(_propTypes["default"].string)]),
253
- /** The default value for the input element. */
254
- defaultValue: _propTypes["default"].string,
255
- /** Whether the input element is automatically focused when loaded onto the page. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautofocus). */
256
- hasAutoFocus: _propTypes["default"].bool,
257
- /** Whether the field is disabled. */
258
- isDisabled: _propTypes["default"].bool,
259
- /** Whether the input can be selected, but not changed by the user. */
260
- isReadOnly: _propTypes["default"].bool,
261
- /** Whether the field is required. */
262
- isRequired: _propTypes["default"].bool,
263
- /** Add max Length to input value */
264
- maxLength: _propTypes["default"].number,
265
- /**
266
- * Callback fired when focus is lost on the input element.
267
- */
268
- onBlur: _propTypes["default"].func,
269
- /**
270
- * Callback fired when focus is lost on the input element.
271
- */
272
- onFocus: _propTypes["default"].func,
273
- /** The placeholder text to display in the input element. */
274
- placeholder: _propTypes["default"].string,
275
- /** Provides a way to insert markup in specified places. */
276
- slots: _propTypes["default"].shape({
277
- /** The given node will be inserted into the field container. */
278
- inContainer: _propTypes["default"].node
279
- }),
280
- /** Determines the type of input to use. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdeftype). */
281
- type: _propTypes["default"].string,
282
- /** @ignore Prop that allows testing of the icon button. */
283
- viewHiddenIconTestId: _propTypes["default"].string,
284
- /** @ignore Prop that allows testing of the icon button. */
285
- viewIconTestId: _propTypes["default"].string,
286
- /** Array of Requirements and their status. */
287
- requirements: _propTypes["default"].arrayOf(_propTypes["default"].shape(_objectSpread({
288
- name: _propTypes["default"].string.isRequired
289
- }, _statusProp.statusPropTypes))),
290
- /** Props object that is spread to the requirements list. */
291
- requirementsListProps: _propTypes["default"].shape({})
292
- }, _statusProp.statusPropTypes), _ariaAttributes.ariaAttributesBasePropTypes), _fieldAttributes.inputFieldAttributesBasePropTypes);
293
213
  PasswordField.defaultProps = _objectSpread({
294
214
  hasAutoFocus: false,
295
215
  isDisabled: false,
@@ -0,0 +1,17 @@
1
+ import { StoryFn } from '@storybook/react';
2
+ import { PasswordFieldProps } from '../../types';
3
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
4
+ export default _default;
5
+ export declare const Default: StoryFn<PasswordFieldProps>;
6
+ export declare const WithRequirementsList: StoryFn<PasswordFieldProps>;
7
+ export declare const WithStateProps: StoryFn<PasswordFieldProps>;
8
+ export declare const FloatLabel: StoryFn<PasswordFieldProps>;
9
+ export declare const LeftLabel: StoryFn<PasswordFieldProps>;
10
+ export declare const Controlled: StoryFn<PasswordFieldProps>;
11
+ export declare const Disabled: StoryFn<PasswordFieldProps>;
12
+ export declare const ReadOnly: StoryFn<PasswordFieldProps>;
13
+ export declare const Required: StoryFn<PasswordFieldProps>;
14
+ export declare const Warning: StoryFn<PasswordFieldProps>;
15
+ export declare const Success: StoryFn<PasswordFieldProps>;
16
+ export declare const DynamicRequired: StoryFn<PasswordFieldProps>;
17
+ export declare const MaxLength: StoryFn<PasswordFieldProps>;
@@ -204,7 +204,19 @@ var FloatLabel = function FloatLabel() {
204
204
  labelMode: "float"
205
205
  });
206
206
  };
207
+
208
+ // Added to bypass color contrast issue
207
209
  exports.FloatLabel = FloatLabel;
210
+ FloatLabel.parameters = {
211
+ a11y: {
212
+ config: {
213
+ rules: [{
214
+ id: 'color-contrast',
215
+ enabled: false
216
+ }]
217
+ }
218
+ }
219
+ };
208
220
  var LeftLabel = function LeftLabel() {
209
221
  var _useState15 = (0, _react.useState)(false),
210
222
  _useState16 = (0, _slicedToArray2["default"])(_useState15, 2),