@pingux/astro 2.2.0-alpha.3 → 2.2.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.
Files changed (115) hide show
  1. package/lib/cjs/components/ArrayField/ArrayField.js +4 -6
  2. package/lib/cjs/components/ArrayField/ArrayField.stories.js +1 -1
  3. package/lib/cjs/components/Callout/Callout.js +12 -9
  4. package/lib/cjs/components/Callout/Callout.stories.js +12 -9
  5. package/lib/cjs/components/CheckboxField/CheckboxField.js +5 -8
  6. package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +5 -13
  7. package/lib/cjs/components/ColorField/ColorField.js +5 -8
  8. package/lib/cjs/components/ColorField/ColorField.stories.js +5 -12
  9. package/lib/cjs/components/ComboBox/ComboBoxInput.js +4 -5
  10. package/lib/cjs/components/ComboBoxField/ComboBoxField.js +4 -5
  11. package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +1 -1
  12. package/lib/cjs/components/DataTable/DataTable.stories.js +1 -1
  13. package/lib/cjs/components/FieldHelperText/FieldHelperText.js +14 -11
  14. package/lib/cjs/components/FieldHelperText/FieldHelperText.stories.js +12 -10
  15. package/lib/cjs/components/FileInputField/FileInputField.js +14 -19
  16. package/lib/cjs/components/FileInputField/FileInputField.stories.js +5 -11
  17. package/lib/cjs/components/FileInputField/FileItem.js +14 -6
  18. package/lib/cjs/components/FileInputField/FileSelect.js +1 -1
  19. package/lib/cjs/components/Icon/NoticeIcon.js +11 -5
  20. package/lib/cjs/components/ImageUploadField/ImageUploadField.js +6 -9
  21. package/lib/cjs/components/ImageUploadField/ImageUploadField.stories.js +5 -12
  22. package/lib/cjs/components/ImageUploadField/ImageUploadFieldBase.js +7 -5
  23. package/lib/cjs/components/LinkSelectField/LinkSelectField.js +7 -10
  24. package/lib/cjs/components/LinkSelectField/LinkSelectField.stories.js +5 -12
  25. package/lib/cjs/components/ListItem/ListItem.js +1 -1
  26. package/lib/cjs/components/ListItem/ListItem.stories.js +1 -1
  27. package/lib/cjs/components/Menu/Menu.js +1 -1
  28. package/lib/cjs/components/Menu/Menu.stories.js +1 -1
  29. package/lib/cjs/components/Messages/Message.js +13 -7
  30. package/lib/cjs/components/Messages/Messages.js +14 -7
  31. package/lib/cjs/components/MultivaluesField/MultivaluesField.js +9 -13
  32. package/lib/cjs/components/MultivaluesField/MultivaluesField.stories.js +5 -12
  33. package/lib/cjs/components/NumberField/NumberField.js +5 -8
  34. package/lib/cjs/components/NumberField/NumberField.stories.js +5 -12
  35. package/lib/cjs/components/PasswordField/PasswordField.js +10 -14
  36. package/lib/cjs/components/PasswordField/PasswordField.stories.js +5 -11
  37. package/lib/cjs/components/RadioField/RadioField.js +4 -7
  38. package/lib/cjs/components/RadioGroupField/RadioGroupField.js +5 -8
  39. package/lib/cjs/components/RadioGroupField/RadioGroupField.stories.js +4 -11
  40. package/lib/cjs/components/RequirementsList/RequirementsList.js +15 -6
  41. package/lib/cjs/components/SearchField/SearchField.js +2 -2
  42. package/lib/cjs/components/SearchField/SearchField.stories.js +2 -2
  43. package/lib/cjs/components/SelectField/SelectField.js +7 -11
  44. package/lib/cjs/components/SelectField/SelectField.stories.js +5 -12
  45. package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +4 -6
  46. package/lib/cjs/components/SwitchField/SwitchField.js +8 -12
  47. package/lib/cjs/components/SwitchField/SwitchField.stories.js +5 -12
  48. package/lib/cjs/components/TextAreaField/TextAreaField.js +8 -12
  49. package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +5 -12
  50. package/lib/cjs/components/TextField/TextField.js +8 -12
  51. package/lib/cjs/components/TextField/TextField.stories.js +5 -12
  52. package/lib/cjs/hooks/useField/useField.js +1 -1
  53. package/lib/cjs/utils/docUtils/statusProp.js +55 -0
  54. package/lib/components/ArrayField/ArrayField.js +4 -6
  55. package/lib/components/ArrayField/ArrayField.stories.js +1 -1
  56. package/lib/components/Callout/Callout.js +13 -9
  57. package/lib/components/Callout/Callout.stories.js +13 -9
  58. package/lib/components/CheckboxField/CheckboxField.js +5 -8
  59. package/lib/components/CheckboxField/CheckboxField.stories.js +5 -13
  60. package/lib/components/ColorField/ColorField.js +5 -8
  61. package/lib/components/ColorField/ColorField.stories.js +5 -12
  62. package/lib/components/ComboBox/ComboBoxInput.js +4 -5
  63. package/lib/components/ComboBoxField/ComboBoxField.js +4 -5
  64. package/lib/components/ComboBoxField/ComboBoxField.stories.js +1 -1
  65. package/lib/components/DataTable/DataTable.stories.js +1 -1
  66. package/lib/components/FieldHelperText/FieldHelperText.js +14 -9
  67. package/lib/components/FieldHelperText/FieldHelperText.stories.js +13 -10
  68. package/lib/components/FileInputField/FileInputField.js +14 -19
  69. package/lib/components/FileInputField/FileInputField.stories.js +5 -11
  70. package/lib/components/FileInputField/FileItem.js +14 -4
  71. package/lib/components/FileInputField/FileSelect.js +1 -1
  72. package/lib/components/Icon/NoticeIcon.js +12 -5
  73. package/lib/components/ImageUploadField/ImageUploadField.js +6 -9
  74. package/lib/components/ImageUploadField/ImageUploadField.stories.js +5 -12
  75. package/lib/components/ImageUploadField/ImageUploadFieldBase.js +7 -5
  76. package/lib/components/LinkSelectField/LinkSelectField.js +7 -10
  77. package/lib/components/LinkSelectField/LinkSelectField.stories.js +5 -12
  78. package/lib/components/ListItem/ListItem.js +1 -1
  79. package/lib/components/ListItem/ListItem.stories.js +1 -1
  80. package/lib/components/Menu/Menu.js +1 -1
  81. package/lib/components/Menu/Menu.stories.js +1 -1
  82. package/lib/components/Messages/Message.js +13 -5
  83. package/lib/components/Messages/Messages.js +14 -5
  84. package/lib/components/MultivaluesField/MultivaluesField.js +9 -13
  85. package/lib/components/MultivaluesField/MultivaluesField.stories.js +5 -12
  86. package/lib/components/NumberField/NumberField.js +5 -8
  87. package/lib/components/NumberField/NumberField.stories.js +5 -12
  88. package/lib/components/PasswordField/PasswordField.js +10 -14
  89. package/lib/components/PasswordField/PasswordField.stories.js +5 -11
  90. package/lib/components/RadioField/RadioField.js +4 -7
  91. package/lib/components/RadioGroupField/RadioGroupField.js +5 -8
  92. package/lib/components/RadioGroupField/RadioGroupField.stories.js +4 -11
  93. package/lib/components/RequirementsList/RequirementsList.js +15 -4
  94. package/lib/components/SearchField/SearchField.js +2 -2
  95. package/lib/components/SearchField/SearchField.stories.js +2 -2
  96. package/lib/components/SelectField/SelectField.js +7 -11
  97. package/lib/components/SelectField/SelectField.stories.js +5 -12
  98. package/lib/components/SelectFieldBase/SelectFieldBase.js +4 -6
  99. package/lib/components/SwitchField/SwitchField.js +8 -12
  100. package/lib/components/SwitchField/SwitchField.stories.js +5 -12
  101. package/lib/components/TextAreaField/TextAreaField.js +8 -12
  102. package/lib/components/TextAreaField/TextAreaField.stories.js +5 -12
  103. package/lib/components/TextField/TextField.js +8 -12
  104. package/lib/components/TextField/TextField.stories.js +5 -12
  105. package/lib/hooks/useField/useField.js +1 -1
  106. package/lib/utils/docUtils/statusProp.js +44 -0
  107. package/package.json +1 -1
  108. /package/lib/cjs/utils/{devUtils/props → docUtils}/ariaAttributes.js +0 -0
  109. /package/lib/cjs/utils/{devUtils/props → docUtils}/ariaAttributes.test.js +0 -0
  110. /package/lib/cjs/utils/{devUtils/props → docUtils}/fieldAttributes.js +0 -0
  111. /package/lib/cjs/utils/{devUtils/props → docUtils}/hoverProps.js +0 -0
  112. /package/lib/utils/{devUtils/props → docUtils}/ariaAttributes.js +0 -0
  113. /package/lib/utils/{devUtils/props → docUtils}/ariaAttributes.test.js +0 -0
  114. /package/lib/utils/{devUtils/props → docUtils}/fieldAttributes.js +0 -0
  115. /package/lib/utils/{devUtils/props → docUtils}/hoverProps.js +0 -0
@@ -15,8 +15,9 @@ import React, { useState } from 'react';
15
15
  import isEmpty from 'lodash/isEmpty';
16
16
  import { PasswordField } from '../../index';
17
17
  import statuses from '../../utils/devUtils/constants/statuses';
18
- import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
19
- import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
18
+ import { ariaAttributeBaseArgTypes } from '../../utils/docUtils/ariaAttributes';
19
+ import { inputFieldAttributeBaseArgTypes } from '../../utils/docUtils/fieldAttributes';
20
+ import { statusArgTypes } from '../../utils/docUtils/statusProp';
20
21
  import { jsx as ___EmotionJSX } from "@emotion/react";
21
22
  export default {
22
23
  title: 'Form/PasswordField',
@@ -28,20 +29,13 @@ export default {
28
29
  }
29
30
  }
30
31
  },
31
- argTypes: _objectSpread(_objectSpread({
32
- status: {
33
- control: {
34
- type: 'select',
35
- options: statuses
36
- },
37
- defaultValue: statuses.DEFAULT
38
- },
32
+ argTypes: _objectSpread(_objectSpread(_objectSpread({
39
33
  helperText: {
40
34
  control: {
41
35
  type: 'text'
42
36
  }
43
37
  }
44
- }, ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes)
38
+ }, statusArgTypes), ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes)
45
39
  };
46
40
  export var Default = function Default(args) {
47
41
  return ___EmotionJSX(PasswordField, _extends({
@@ -8,15 +8,14 @@ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/obje
8
8
  import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
9
9
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
10
10
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
11
- import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
12
11
  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; }
13
12
  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) { _defineProperty(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; }
14
13
  import React, { createContext, forwardRef, useContext, useImperativeHandle, useRef } from 'react';
15
14
  import { useRadio } from 'react-aria';
16
15
  import PropTypes from 'prop-types';
17
16
  import { useField, usePropWarning } from '../../hooks';
18
- import statuses from '../../utils/devUtils/constants/statuses';
19
- import { ariaAttributesBasePropTypes } from '../../utils/devUtils/props/ariaAttributes';
17
+ import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
18
+ import { statusPropTypes } from '../../utils/docUtils/statusProp';
20
19
  import Box from '../Box';
21
20
  import FieldHelperText from '../FieldHelperText';
22
21
  import Label from '../Label';
@@ -83,7 +82,7 @@ var RadioField = /*#__PURE__*/forwardRef(function (props, ref) {
83
82
  variant: "forms.radio.checkedContent"
84
83
  }, checkedContent));
85
84
  });
86
- RadioField.propTypes = _objectSpread({
85
+ RadioField.propTypes = _objectSpread(_objectSpread({
87
86
  /** Content to display when the radio is checked. */
88
87
  checkedContent: PropTypes.node,
89
88
  /** The rendered label for the field. */
@@ -105,8 +104,6 @@ RadioField.propTypes = _objectSpread({
105
104
  isReadOnly: PropTypes.bool,
106
105
  /** Whether the Radio is required. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required). */
107
106
  isRequired: PropTypes.bool,
108
- /** Determines the textarea status indicator and helper text styling. */
109
- status: PropTypes.oneOf(_Object$values(statuses)),
110
107
  /** The value of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefvalue). */
111
108
  value: PropTypes.string,
112
109
  /** Handler that is called when the element receives focus. */
@@ -130,6 +127,6 @@ RadioField.propTypes = _objectSpread({
130
127
  * object.
131
128
  */
132
129
  'aria-details': PropTypes.string
133
- }, ariaAttributesBasePropTypes);
130
+ }, statusPropTypes), ariaAttributesBasePropTypes);
134
131
  RadioField.displayName = 'RadioField';
135
132
  export default RadioField;
@@ -8,7 +8,6 @@ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/obje
8
8
  import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
9
9
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
10
10
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
11
- import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
12
11
  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; }
13
12
  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) { _defineProperty(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; }
14
13
  import React, { forwardRef, useMemo } from 'react';
@@ -19,9 +18,9 @@ import { v4 as uuid } from 'uuid';
19
18
  import { Box, FieldHelperText, Label } from '../..';
20
19
  import { usePropWarning, useStatusClasses } from '../../hooks';
21
20
  import ORIENTATION from '../../utils/devUtils/constants/orientation';
22
- import statuses from '../../utils/devUtils/constants/statuses';
23
- import { ariaAttributesBasePropTypes } from '../../utils/devUtils/props/ariaAttributes';
24
- import { inputFieldAttributesBasePropTypes } from '../../utils/devUtils/props/fieldAttributes';
21
+ import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
22
+ import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
23
+ import { statusPropTypes } from '../../utils/docUtils/statusProp';
25
24
  import { RadioContext } from '../RadioField';
26
25
 
27
26
  /**
@@ -83,7 +82,7 @@ var RadioGroupField = /*#__PURE__*/forwardRef(function (props, ref) {
83
82
  id: helperTextId
84
83
  }, helperText));
85
84
  });
86
- RadioGroupField.propTypes = _objectSpread(_objectSpread({
85
+ RadioGroupField.propTypes = _objectSpread(_objectSpread(_objectSpread({
87
86
  /** The name of the RadioGroupField, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name_and_radio_buttons). */
88
87
  name: PropTypes.string,
89
88
  /** The current value (controlled). */
@@ -96,8 +95,6 @@ RadioGroupField.propTypes = _objectSpread(_objectSpread({
96
95
  hintText: PropTypes.string,
97
96
  /** Determines the arrangement of the radios. */
98
97
  orientation: PropTypes.oneOf(['horizontal', 'vertical']),
99
- /** Determines the helper text styling. */
100
- status: PropTypes.oneOf(_Object$values(statuses)),
101
98
  /**
102
99
  * Handler that is called when the value changes.
103
100
  *
@@ -115,6 +112,6 @@ RadioGroupField.propTypes = _objectSpread(_objectSpread({
115
112
  label: PropTypes.node,
116
113
  /** The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id). */
117
114
  id: PropTypes.string
118
- }, ariaAttributesBasePropTypes), inputFieldAttributesBasePropTypes);
115
+ }, statusPropTypes), ariaAttributesBasePropTypes), inputFieldAttributesBasePropTypes);
119
116
  RadioGroupField.displayName = 'RadioGroupField';
120
117
  export default RadioGroupField;
@@ -12,13 +12,13 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
12
12
  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) { _defineProperty(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; }
13
13
  import React, { useState } from 'react';
14
14
  import { RadioField, RadioGroupField } from '../../index';
15
- import statuses from '../../utils/devUtils/constants/statuses';
16
- import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
15
+ import { ariaAttributeBaseArgTypes } from '../../utils/docUtils/ariaAttributes';
16
+ import { statusArgTypes } from '../../utils/docUtils/statusProp';
17
17
  import { jsx as ___EmotionJSX } from "@emotion/react";
18
18
  export default {
19
19
  title: 'Form/RadioGroupField',
20
20
  component: RadioGroupField,
21
- argTypes: _objectSpread({
21
+ argTypes: _objectSpread(_objectSpread({
22
22
  label: {
23
23
  control: {
24
24
  type: 'text'
@@ -35,13 +35,6 @@ export default {
35
35
  type: 'text'
36
36
  }
37
37
  },
38
- status: {
39
- control: {
40
- type: 'select',
41
- options: statuses
42
- },
43
- defaultValue: statuses.DEFAULT
44
- },
45
38
  defaultValue: {
46
39
  defaultValue: 'A'
47
40
  },
@@ -55,7 +48,7 @@ export default {
55
48
  type: 'none'
56
49
  }
57
50
  }
58
- }, ariaAttributeBaseArgTypes)
51
+ }, statusArgTypes), ariaAttributeBaseArgTypes)
59
52
  };
60
53
  export var Default = function Default(args) {
61
54
  return ___EmotionJSX(RadioGroupField, args, ___EmotionJSX(RadioField, {
@@ -1,13 +1,25 @@
1
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
1
2
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
3
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
3
4
  var _excluded = ["requirements"];
5
+ 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; }
6
+ 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) { _defineProperty(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; }
4
7
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
8
+ import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
9
+ import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
10
+ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
11
+ import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
12
+ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
13
+ import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
14
+ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
15
+ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
5
16
  import React, { forwardRef } from 'react';
6
17
  import ErrorCircle from 'mdi-react/AlertCircleIcon';
7
18
  import WarningCircle from 'mdi-react/AlertCircleOutlineIcon';
8
19
  import DefaultCircle from 'mdi-react/CheckboxBlankCircleOutlineIcon';
9
20
  import SuccessCircle from 'mdi-react/CheckCircleIcon';
10
21
  import PropTypes from 'prop-types';
22
+ import { statusPropTypes } from '../../utils/docUtils/statusProp';
11
23
  import Box from '../Box';
12
24
  import Icon from '../Icon';
13
25
  import Text from '../Text';
@@ -82,10 +94,9 @@ RequirementsList.propTypes = {
82
94
  /**
83
95
  * Requirements and their status.
84
96
  */
85
- requirements: PropTypes.arrayOf(PropTypes.shape({
86
- name: PropTypes.string.isRequired,
87
- status: PropTypes.oneOf(['default', 'success', 'warning', 'error'])
88
- }))
97
+ requirements: PropTypes.arrayOf(PropTypes.shape(_objectSpread({
98
+ name: PropTypes.string.isRequired
99
+ }, statusPropTypes)))
89
100
  };
90
101
  RequirementsList.defaultProps = {
91
102
  requirements: []
@@ -18,8 +18,8 @@ import SearchIcon from 'mdi-react/SearchIcon';
18
18
  import PropTypes from 'prop-types';
19
19
  import { Box, Icon, IconButton, Input, Label } from '../..';
20
20
  import { useField, usePropWarning } from '../../hooks';
21
- import { ariaAttributesBasePropTypes } from '../../utils/devUtils/props/ariaAttributes';
22
- import { inputFieldAttributesBasePropTypes } from '../../utils/devUtils/props/fieldAttributes';
21
+ import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
22
+ import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
23
23
 
24
24
  /**
25
25
  * Renders a search field with associated controls including visual elements and keyboard
@@ -16,8 +16,8 @@ import Users from 'mdi-react/AccountGroupIcon';
16
16
  import SearchIcon from 'mdi-react/SearchIcon';
17
17
  import { useDebounce } from '../../hooks';
18
18
  import { Box, SearchField, Text } from '../../index';
19
- import { ariaAttributeBaseArgTypes, ariaAttributeBaseDocSettings } from '../../utils/devUtils/props/ariaAttributes';
20
- import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
19
+ import { ariaAttributeBaseArgTypes, ariaAttributeBaseDocSettings } from '../../utils/docUtils/ariaAttributes';
20
+ import { inputFieldAttributeBaseArgTypes } from '../../utils/docUtils/fieldAttributes';
21
21
  import { jsx as ___EmotionJSX } from "@emotion/react";
22
22
  export default {
23
23
  title: 'Form/SearchField',
@@ -9,15 +9,14 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
9
9
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
10
10
  import _objectDestructuringEmpty from "@babel/runtime-corejs3/helpers/esm/objectDestructuringEmpty";
11
11
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
12
- import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
13
12
  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; }
14
13
  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) { _defineProperty(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; }
15
14
  import React, { forwardRef } from 'react';
16
15
  import PropTypes from 'prop-types';
17
16
  import { usePropWarning, useSelectField } from '../../hooks';
18
- import statuses from '../../utils/devUtils/constants/statuses';
19
- import { ariaAttributesBasePropTypes } from '../../utils/devUtils/props/ariaAttributes';
20
- import { inputFieldAttributesBasePropTypes } from '../../utils/devUtils/props/fieldAttributes';
17
+ import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
18
+ import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
19
+ import { statusDefaultProp, statusPropTypes } from '../../utils/docUtils/statusProp';
21
20
  import SelectFieldBase from '../SelectFieldBase';
22
21
 
23
22
  /**
@@ -37,7 +36,7 @@ var SelectField = /*#__PURE__*/forwardRef(function (props, ref) {
37
36
  "aria-invalid": status === 'error' && true
38
37
  }));
39
38
  });
40
- SelectField.propTypes = _objectSpread(_objectSpread({
39
+ SelectField.propTypes = _objectSpread(_objectSpread(_objectSpread({
41
40
  /** Alignment of the popover menu relative to the trigger. */
42
41
  align: PropTypes.oneOf(['start', 'end', 'middle']),
43
42
  /** Where the popover menu opens relative to its trigger. */
@@ -85,8 +84,6 @@ SelectField.propTypes = _objectSpread(_objectSpread({
85
84
  selectedKey: PropTypes.string,
86
85
  /** Determines the textarea status indicator and helper text styling. Eg. float. */
87
86
  labelMode: PropTypes.string,
88
- /** Determines the type of label applied to the component. */
89
- status: PropTypes.oneOf(_Object$values(statuses)),
90
87
  /**
91
88
  * Handler that is called when more items should be loaded, e.g. while scrolling near the bottom.
92
89
  *
@@ -117,15 +114,14 @@ SelectField.propTypes = _objectSpread(_objectSpread({
117
114
  scrollBoxProps: PropTypes.shape({
118
115
  maxHeight: PropTypes.string
119
116
  })
120
- }, ariaAttributesBasePropTypes);
121
- SelectField.defaultProps = {
117
+ }, statusPropTypes), ariaAttributesBasePropTypes);
118
+ SelectField.defaultProps = _objectSpread({
122
119
  placeholder: 'Select',
123
- status: statuses.DEFAULT,
124
120
  align: 'start',
125
121
  direction: 'bottom',
126
122
  scrollBoxProps: {
127
123
  maxHeight: '300px'
128
124
  }
129
- };
125
+ }, statusDefaultProp);
130
126
  SelectField.displayName = 'SelectField';
131
127
  export default SelectField;
@@ -30,9 +30,9 @@ import React, { useState } from 'react';
30
30
  import { OverlayProvider } from 'react-aria';
31
31
  import { useAsyncList } from 'react-stately';
32
32
  import { Item, Section, SelectField, Separator } from '../../index';
33
- import statuses from '../../utils/devUtils/constants/statuses';
34
- import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
35
- import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
33
+ import { ariaAttributeBaseArgTypes } from '../../utils/docUtils/ariaAttributes';
34
+ import { inputFieldAttributeBaseArgTypes } from '../../utils/docUtils/fieldAttributes';
35
+ import { statusArgTypes } from '../../utils/docUtils/statusProp';
36
36
  import { modes as labelModes } from '../Label/constants';
37
37
  import { jsx as ___EmotionJSX } from "@emotion/react";
38
38
  var animals = [{
@@ -122,7 +122,7 @@ export default {
122
122
  }
123
123
  }
124
124
  },
125
- argTypes: _objectSpread(_objectSpread({
125
+ argTypes: _objectSpread(_objectSpread(_objectSpread({
126
126
  label: {
127
127
  control: {
128
128
  type: 'text'
@@ -148,13 +148,6 @@ export default {
148
148
  },
149
149
  defaultValue: _Object$values(labelModes)[0]
150
150
  },
151
- status: {
152
- control: {
153
- type: 'select',
154
- options: statuses
155
- },
156
- defaultValue: statuses.DEFAULT
157
- },
158
151
  defaultSelectedKey: {},
159
152
  disabledKeys: {},
160
153
  name: {},
@@ -170,7 +163,7 @@ export default {
170
163
  type: 'none'
171
164
  }
172
165
  }
173
- }, ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes)
166
+ }, statusArgTypes), ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes)
174
167
  };
175
168
  export var Default = function Default(args) {
176
169
  return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(SelectField, _extends({}, args, {
@@ -18,8 +18,8 @@ import { HiddenSelect } from 'react-aria';
18
18
  import MenuDown from 'mdi-react/MenuDownIcon';
19
19
  import PropTypes from 'prop-types';
20
20
  import { v4 as uuid } from 'uuid';
21
- import statuses from '../../utils/devUtils/constants/statuses';
22
- import { ariaAttributesBasePropTypes, getAriaAttributeProps } from '../../utils/devUtils/props/ariaAttributes';
21
+ import { ariaAttributesBasePropTypes, getAriaAttributeProps } from '../../utils/docUtils/ariaAttributes';
22
+ import { statusPropTypes } from '../../utils/docUtils/statusProp';
23
23
  import Box from '../Box';
24
24
  import Button from '../Button';
25
25
  import FieldHelperText from '../FieldHelperText';
@@ -105,7 +105,7 @@ var SelectFieldBase = /*#__PURE__*/forwardRef(function (_ref, ref) {
105
105
  id: helperTextId
106
106
  }, helperText));
107
107
  });
108
- SelectFieldBase.propTypes = _objectSpread({
108
+ SelectFieldBase.propTypes = _objectSpread(_objectSpread({
109
109
  /** Default text rendered if no option is selected. Deprecated. */
110
110
  defaultText: PropTypes.string,
111
111
  /** Text rendered below the input. */
@@ -118,8 +118,6 @@ SelectFieldBase.propTypes = _objectSpread({
118
118
  name: PropTypes.string,
119
119
  /** Temporary text that occupies the text input when it is empty. */
120
120
  placeholder: PropTypes.string,
121
- /** Determines the type of label applied to the component. */
122
- status: PropTypes.oneOf(_Object$values(statuses)),
123
121
  /** Determines whether to use column styles. */
124
122
  columnStyleProps: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({})]),
125
123
  /** Determines props that applied to root container. */
@@ -156,5 +154,5 @@ SelectFieldBase.propTypes = _objectSpread({
156
154
  triggerRef: PropTypes.shape({}),
157
155
  /** Props for the element representing the selected value. */
158
156
  valueProps: PropTypes.shape({})
159
- }, ariaAttributesBasePropTypes);
157
+ }, statusPropTypes), ariaAttributesBasePropTypes);
160
158
  export default SelectFieldBase;
@@ -10,7 +10,6 @@ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
10
10
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
11
11
  var _excluded = ["label", "helperText", "isDefaultSelected", "isSelected", "onChange", "value", "name", "id", "isDisabled", "isReadOnly", "isRequired", "hasAutoFocus", "onFocus", "onBlur", "onFocusChange", "onKeyDown", "onKeyUp", "status", "controlProps"];
12
12
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
13
- import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
14
13
  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; }
15
14
  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) { _defineProperty(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; }
16
15
  import React, { forwardRef, useImperativeHandle, useRef } from 'react';
@@ -21,9 +20,9 @@ import omit from 'lodash/omit';
21
20
  import PropTypes from 'prop-types';
22
21
  import { Box, FieldHelperText, Label, Switch } from '../..';
23
22
  import { useField, usePropWarning } from '../../hooks';
24
- import statuses from '../../utils/devUtils/constants/statuses';
25
- import { ariaAttributesBasePropTypes } from '../../utils/devUtils/props/ariaAttributes';
26
- import { inputFieldAttributesBasePropTypes } from '../../utils/devUtils/props/fieldAttributes';
23
+ import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
24
+ import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
25
+ import { statusDefaultProp, statusPropTypes } from '../../utils/docUtils/statusProp';
27
26
 
28
27
  /**
29
28
  * Combines a switch, label, and helper text for a complete, form-ready solution.
@@ -98,7 +97,7 @@ var SwitchField = /*#__PURE__*/forwardRef(function (props, ref) {
98
97
  status: status
99
98
  }, helperText));
100
99
  });
101
- SwitchField.propTypes = _objectSpread(_objectSpread({
100
+ SwitchField.propTypes = _objectSpread(_objectSpread(_objectSpread({
102
101
  /** A list of class names to apply to the input element. */
103
102
  className: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
104
103
  /** Whether the element should receive focus on render. */
@@ -135,17 +134,14 @@ SwitchField.propTypes = _objectSpread(_objectSpread({
135
134
  onKeyDown: PropTypes.func,
136
135
  /** Handler that is called when a key is released. */
137
136
  onKeyUp: PropTypes.func,
138
- /** Determines the textarea status indicator and helper text styling. */
139
- status: PropTypes.oneOf(_Object$values(statuses)),
140
137
  /** The value of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefvalue). */
141
138
  value: PropTypes.string
142
- }, ariaAttributesBasePropTypes), inputFieldAttributesBasePropTypes);
143
- SwitchField.defaultProps = {
139
+ }, statusPropTypes), ariaAttributesBasePropTypes), inputFieldAttributesBasePropTypes);
140
+ SwitchField.defaultProps = _objectSpread({
144
141
  isDisabled: false,
145
142
  isReadOnly: false,
146
143
  isRequired: false,
147
- hasAutoFocus: false,
148
- status: statuses.DEFAULT
149
- };
144
+ hasAutoFocus: false
145
+ }, statusDefaultProp);
150
146
  SwitchField.displayName = 'SwitchField';
151
147
  export default SwitchField;
@@ -13,9 +13,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
13
13
  import React, { useRef, useState } from 'react';
14
14
  import { Pressable } from '@react-aria/interactions';
15
15
  import { SwitchField, Tooltip, TooltipTrigger } from '../../index';
16
- import statuses from '../../utils/devUtils/constants/statuses';
17
- import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
18
- import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
16
+ import { ariaAttributeBaseArgTypes } from '../../utils/docUtils/ariaAttributes';
17
+ import { inputFieldAttributeBaseArgTypes } from '../../utils/docUtils/fieldAttributes';
18
+ import { statusArgTypes } from '../../utils/docUtils/statusProp';
19
19
  import { jsx as ___EmotionJSX } from "@emotion/react";
20
20
  export default {
21
21
  title: 'Form/SwitchField',
@@ -27,7 +27,7 @@ export default {
27
27
  }
28
28
  }
29
29
  },
30
- argTypes: _objectSpread(_objectSpread({
30
+ argTypes: _objectSpread(_objectSpread(_objectSpread({
31
31
  label: {
32
32
  control: {
33
33
  type: 'text'
@@ -49,13 +49,6 @@ export default {
49
49
  },
50
50
  name: {},
51
51
  className: {},
52
- status: {
53
- control: {
54
- type: 'select',
55
- options: statuses
56
- },
57
- defaultValue: statuses.DEFAULT
58
- },
59
52
  isDisabled: {},
60
53
  isRequired: {},
61
54
  isReadOnly: {},
@@ -67,7 +60,7 @@ export default {
67
60
  type: 'none'
68
61
  }
69
62
  }
70
- }, ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes)
63
+ }, statusArgTypes), ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes)
71
64
  };
72
65
  export var Default = function Default(args) {
73
66
  return ___EmotionJSX(SwitchField, args);
@@ -8,7 +8,6 @@ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/obje
8
8
  import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
9
9
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
10
10
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
11
- import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
12
11
  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; }
13
12
  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) { _defineProperty(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; }
14
13
  import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from 'react';
@@ -17,9 +16,9 @@ import PropTypes from 'prop-types';
17
16
  import { v4 as uuid } from 'uuid';
18
17
  import { Box, FieldHelperText, Label, TextArea } from '../..';
19
18
  import { useColumnStyles, useField, useLabelHeight, usePropWarning } from '../../hooks';
20
- import statuses from '../../utils/devUtils/constants/statuses';
21
- import { ariaAttributesBasePropTypes } from '../../utils/devUtils/props/ariaAttributes';
22
- import { inputFieldAttributesBasePropTypes } from '../../utils/devUtils/props/fieldAttributes';
19
+ import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
20
+ import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
21
+ import { statusDefaultProp, statusPropTypes } from '../../utils/docUtils/statusProp';
23
22
 
24
23
  /**
25
24
  * Combines a textarea, label, and helper text for a complete, form-ready solution.
@@ -137,7 +136,7 @@ var TextAreaField = /*#__PURE__*/forwardRef(function (props, ref) {
137
136
  id: helperTextId
138
137
  }, helperText));
139
138
  });
140
- TextAreaField.propTypes = _objectSpread(_objectSpread({
139
+ TextAreaField.propTypes = _objectSpread(_objectSpread(_objectSpread({
141
140
  /** The rendered label for the field. */
142
141
  label: PropTypes.node,
143
142
  /** Text rendered below the textarea. */
@@ -197,22 +196,19 @@ TextAreaField.propTypes = _objectSpread(_objectSpread({
197
196
  placeholder: PropTypes.string,
198
197
  /** The number of rows to display for the textarea. Controls the default height. */
199
198
  rows: PropTypes.number,
200
- /** Determines the textarea status indicator and helper text styling. */
201
- status: PropTypes.oneOf(_Object$values(statuses)),
202
199
  /** Provides a way to insert markup in specified places. */
203
200
  slots: PropTypes.shape({
204
201
  /** The given node will be inserted into the field container. */
205
202
  inContainer: PropTypes.node
206
203
  })
207
- }, ariaAttributesBasePropTypes), inputFieldAttributesBasePropTypes);
208
- TextAreaField.defaultProps = {
204
+ }, statusPropTypes), ariaAttributesBasePropTypes), inputFieldAttributesBasePropTypes);
205
+ TextAreaField.defaultProps = _objectSpread({
209
206
  hasAutoFocus: false,
210
207
  isDisabled: false,
211
208
  isReadOnly: false,
212
209
  isRequired: false,
213
210
  isUnresizable: false,
214
- rows: 4,
215
- status: statuses.DEFAULT
216
- };
211
+ rows: 4
212
+ }, statusDefaultProp);
217
213
  TextAreaField.displayName = 'TextAreaField';
218
214
  export default TextAreaField;
@@ -15,9 +15,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
15
15
  import React, { useState } from 'react';
16
16
  import SearchIcon from 'mdi-react/SearchIcon';
17
17
  import { Box, Icon, TextAreaField } from '../../index';
18
- import statuses from '../../utils/devUtils/constants/statuses';
19
- import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
20
- import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
18
+ import { ariaAttributeBaseArgTypes } from '../../utils/docUtils/ariaAttributes';
19
+ import { inputFieldAttributeBaseArgTypes } from '../../utils/docUtils/fieldAttributes';
20
+ import { statusArgTypes } from '../../utils/docUtils/statusProp';
21
21
  import { modes as labelModes } from '../Label/constants';
22
22
  import { jsx as ___EmotionJSX } from "@emotion/react";
23
23
  export default {
@@ -30,7 +30,7 @@ export default {
30
30
  }
31
31
  }
32
32
  },
33
- argTypes: _objectSpread(_objectSpread({
33
+ argTypes: _objectSpread(_objectSpread(_objectSpread({
34
34
  label: {
35
35
  control: {
36
36
  type: 'text'
@@ -58,13 +58,6 @@ export default {
58
58
  }
59
59
  },
60
60
  rows: {},
61
- status: {
62
- control: {
63
- type: 'select',
64
- options: statuses
65
- },
66
- defaultValue: statuses.DEFAULT
67
- },
68
61
  isDisabled: {},
69
62
  isRequired: {},
70
63
  isReadOnly: {},
@@ -78,7 +71,7 @@ export default {
78
71
  type: 'none'
79
72
  }
80
73
  }
81
- }, ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes)
74
+ }, statusArgTypes), ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes)
82
75
  };
83
76
  var IconSlot = ___EmotionJSX(Box, {
84
77
  isRow: true
@@ -8,7 +8,6 @@ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/obje
8
8
  import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
9
9
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
10
10
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
11
- import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
12
11
  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; }
13
12
  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) { _defineProperty(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; }
14
13
  import React, { forwardRef, useImperativeHandle, useRef } from 'react';
@@ -17,9 +16,9 @@ import { v4 as uuid } from 'uuid';
17
16
  import { Box, FieldHelperText, Input, Label } from '../..';
18
17
  import { useField, useLabelHeight, usePropWarning } from '../../hooks';
19
18
  import useColumnStyles from '../../hooks/useColumnStyles';
20
- import statuses from '../../utils/devUtils/constants/statuses';
21
- import { ariaAttributesBasePropTypes } from '../../utils/devUtils/props/ariaAttributes';
22
- import { inputFieldAttributesBasePropTypes } from '../../utils/devUtils/props/fieldAttributes';
19
+ import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
20
+ import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
21
+ import { statusDefaultProp, statusPropTypes } from '../../utils/docUtils/statusProp';
23
22
 
24
23
  /**
25
24
  * Combines a text input, label, and helper text for a complete, form-ready solution.
@@ -71,7 +70,7 @@ var TextField = /*#__PURE__*/forwardRef(function (props, ref) {
71
70
  id: helperTextId
72
71
  }, helperText));
73
72
  });
74
- TextField.propTypes = _objectSpread(_objectSpread({
73
+ TextField.propTypes = _objectSpread(_objectSpread(_objectSpread({
75
74
  /** The rendered label for the field. */
76
75
  label: PropTypes.node,
77
76
  /** A string designating whether or not the label is a float label. */
@@ -130,19 +129,16 @@ TextField.propTypes = _objectSpread(_objectSpread({
130
129
  /** The given node will be inserted into the field container. */
131
130
  inContainer: PropTypes.node
132
131
  }),
133
- /** Determines the input status indicator and helper text styling. */
134
- status: PropTypes.oneOf(_Object$values(statuses)),
135
132
  /** Determines the type of input to use. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdeftype). */
136
133
  type: PropTypes.string,
137
134
  /** Props object that is spread directly into the input wrapper element. */
138
135
  wrapperProps: PropTypes.shape({})
139
- }, ariaAttributesBasePropTypes), inputFieldAttributesBasePropTypes);
140
- TextField.defaultProps = {
136
+ }, statusPropTypes), ariaAttributesBasePropTypes), inputFieldAttributesBasePropTypes);
137
+ TextField.defaultProps = _objectSpread({
141
138
  hasAutoFocus: false,
142
139
  isDisabled: false,
143
140
  isReadOnly: false,
144
- isRequired: false,
145
- status: statuses.DEFAULT
146
- };
141
+ isRequired: false
142
+ }, statusDefaultProp);
147
143
  TextField.displayName = 'TextField';
148
144
  export default TextField;