@carbon/react 1.19.0 → 1.20.0

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 (59) hide show
  1. package/es/_virtual/_commonjsHelpers.js +15 -2
  2. package/es/_virtual/index.js +6 -2
  3. package/es/_virtual/rangePlugin.js +6 -2
  4. package/es/components/ContainedList/ContainedList.js +8 -1
  5. package/es/components/DataTable/TableHeader.js +1 -3
  6. package/es/components/DatePicker/DatePicker.js +14 -3
  7. package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.js +42 -0
  8. package/es/components/FluidNumberInput/FluidNumberInput.js +138 -0
  9. package/es/components/FluidSearch/FluidSearch.Skeleton.js +42 -0
  10. package/es/components/FluidSearch/FluidSearch.js +114 -0
  11. package/es/components/NumberInput/NumberInput.js +38 -20
  12. package/es/components/OverflowMenuItem/OverflowMenuItem.js +86 -125
  13. package/es/components/ProgressBar/ProgressBar.js +11 -4
  14. package/es/components/Search/Search.js +8 -2
  15. package/es/components/SkeletonText/SkeletonText.js +40 -39
  16. package/es/components/Slider/Slider.js +16 -26
  17. package/es/components/TextArea/TextArea.js +11 -4
  18. package/es/components/Tile/Tile.js +7 -5
  19. package/es/components/TimePickerSelect/TimePickerSelect.js +57 -69
  20. package/es/components/TimePickerSelect/index.js +2 -3
  21. package/es/index.js +4 -0
  22. package/es/node_modules/flatpickr/dist/l10n/index.js +3 -3
  23. package/es/node_modules/flatpickr/dist/plugins/rangePlugin.js +2 -2
  24. package/es/node_modules/use-resize-observer/polyfilled.js +0 -1
  25. package/lib/_virtual/_commonjsHelpers.js +15 -2
  26. package/lib/_virtual/index.js +6 -2
  27. package/lib/_virtual/rangePlugin.js +6 -2
  28. package/lib/components/ContainedList/ContainedList.js +8 -1
  29. package/lib/components/DataTable/TableHeader.js +1 -3
  30. package/lib/components/DatePicker/DatePicker.js +13 -2
  31. package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +52 -0
  32. package/lib/components/FluidNumberInput/FluidNumberInput.js +148 -0
  33. package/lib/components/FluidSearch/FluidSearch.Skeleton.js +52 -0
  34. package/lib/components/FluidSearch/FluidSearch.js +124 -0
  35. package/lib/components/NumberInput/NumberInput.js +37 -19
  36. package/lib/components/OverflowMenuItem/OverflowMenuItem.js +83 -141
  37. package/lib/components/ProgressBar/ProgressBar.js +10 -3
  38. package/lib/components/Search/Search.js +7 -1
  39. package/lib/components/SkeletonText/SkeletonText.js +38 -37
  40. package/lib/components/Slider/Slider.js +16 -26
  41. package/lib/components/TextArea/TextArea.js +10 -3
  42. package/lib/components/Tile/Tile.js +7 -5
  43. package/lib/components/TimePickerSelect/TimePickerSelect.js +53 -65
  44. package/lib/components/TimePickerSelect/index.js +2 -3
  45. package/lib/index.js +8 -0
  46. package/lib/node_modules/flatpickr/dist/l10n/index.js +2 -2
  47. package/lib/node_modules/flatpickr/dist/plugins/rangePlugin.js +2 -2
  48. package/lib/node_modules/use-resize-observer/polyfilled.js +0 -1
  49. package/package.json +7 -7
  50. package/scss/components/fluid-combo-box/_fluid-combo-box.scss +9 -0
  51. package/scss/components/fluid-combo-box/_index.scss +9 -0
  52. package/scss/components/fluid-multiselect/_fluid-multiselect.scss +9 -0
  53. package/scss/components/fluid-multiselect/_index.scss +9 -0
  54. package/scss/components/fluid-number-input/_fluid-number-input.scss +9 -0
  55. package/scss/components/fluid-number-input/_index.scss +9 -0
  56. package/scss/components/fluid-search/_fluid-search.scss +9 -0
  57. package/scss/components/fluid-search/_index.scss +9 -0
  58. package/es/components/TimePickerSelect/next/TimePickerSelect.js +0 -70
  59. package/lib/components/TimePickerSelect/next/TimePickerSelect.js +0 -80
@@ -5,78 +5,66 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { defineProperty as _defineProperty, inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass, objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectWithoutProperties as _objectWithoutProperties, defineProperty as _defineProperty, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import PropTypes from 'prop-types';
10
- import React__default, { Component } from 'react';
10
+ import React__default from 'react';
11
11
  import cx from 'classnames';
12
12
  import { ChevronDown } from '@carbon/icons-react';
13
- import deprecate from '../../prop-types/deprecate.js';
14
- import { PrefixContext } from '../../internal/usePrefix.js';
15
-
16
- var _defineProperty2;
17
-
18
- var _excluded = ["aria-label", "children", "className", "disabled", "hideLabel", "id", "iconDescription", "labelText"];
19
-
20
- var TimePickerSelect = /*#__PURE__*/function (_Component) {
21
- _inherits(TimePickerSelect, _Component);
22
-
23
- var _super = _createSuper(TimePickerSelect);
24
-
25
- function TimePickerSelect() {
26
- _classCallCheck(this, TimePickerSelect);
27
-
28
- return _super.apply(this, arguments);
29
- }
30
-
31
- _createClass(TimePickerSelect, [{
32
- key: "render",
33
- value: function render() {
34
- var _classNames;
35
-
36
- var prefix = this.context;
37
-
38
- var _this$props = this.props,
39
- _this$props$ariaLabe = _this$props['aria-label'],
40
- ariaLabel = _this$props$ariaLabe === void 0 ? 'open list of options' : _this$props$ariaLabe,
41
- children = _this$props.children,
42
- className = _this$props.className,
43
- disabled = _this$props.disabled,
44
- _this$props$hideLabel = _this$props.hideLabel,
45
- hideLabel = _this$props$hideLabel === void 0 ? true : _this$props$hideLabel,
46
- id = _this$props.id,
47
- iconDescription = _this$props.iconDescription,
48
- labelText = _this$props.labelText,
49
- rest = _objectWithoutProperties(_this$props, _excluded);
50
-
51
- var selectClasses = cx((_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "--select"), true), _defineProperty(_classNames, "".concat(prefix, "--time-picker__select"), true), _defineProperty(_classNames, className, className), _classNames));
52
- var labelClasses = cx("".concat(prefix, "--label"), _defineProperty({}, "".concat(prefix, "--visually-hidden"), hideLabel));
53
- var label = labelText ? /*#__PURE__*/React__default.createElement("label", {
54
- htmlFor: id,
55
- className: labelClasses
56
- }, labelText) : null;
57
- return /*#__PURE__*/React__default.createElement("div", {
58
- className: selectClasses
59
- }, label, /*#__PURE__*/React__default.createElement("select", _extends({
60
- className: "".concat(prefix, "--select-input"),
61
- disabled: disabled,
62
- id: id,
63
- "aria-label": ariaLabel
64
- }, rest), children), /*#__PURE__*/React__default.createElement(ChevronDown, {
65
- className: "".concat(prefix, "--select__arrow"),
66
- "aria-label": ariaLabel ? ariaLabel : iconDescription
67
- }));
68
- }
69
- }]);
70
-
71
- return TimePickerSelect;
72
- }(Component);
73
-
74
- _defineProperty(TimePickerSelect, "contextType", PrefixContext);
75
-
76
- _defineProperty(TimePickerSelect, "propTypes", (_defineProperty2 = {}, _defineProperty(_defineProperty2, 'aria-label', PropTypes.string), _defineProperty(_defineProperty2, "children", PropTypes.node), _defineProperty(_defineProperty2, "className", PropTypes.string), _defineProperty(_defineProperty2, "defaultValue", PropTypes.any), _defineProperty(_defineProperty2, "disabled", PropTypes.bool), _defineProperty(_defineProperty2, "hideLabel", deprecate(PropTypes.bool, 'The `hideLabel` prop for `TimePickerSelect` is no longer needed and has ' + 'been deprecated. It will be removed in the next major release.')), _defineProperty(_defineProperty2, "iconDescription", deprecate(PropTypes.string, 'The `iconDescription` prop for `TimePickerSelect` is no longer needed and has ' + 'been deprecated. It will be removed in the next major release. Use `aria-label` instead.')), _defineProperty(_defineProperty2, "id", PropTypes.string.isRequired), _defineProperty(_defineProperty2, "labelText", PropTypes.node.isRequired), _defineProperty2));
77
-
78
- _defineProperty(TimePickerSelect, "defaultProps", {
79
- disabled: false
13
+ import { usePrefix } from '../../internal/usePrefix.js';
14
+
15
+ var _excluded = ["aria-label", "children", "id", "disabled", "className"];
16
+ var TimePickerSelect = /*#__PURE__*/React__default.forwardRef(function TimePickerSelect(_ref, ref) {
17
+ var _cx;
18
+
19
+ var _ref$ariaLabel = _ref['aria-label'],
20
+ ariaLabel = _ref$ariaLabel === void 0 ? 'open list of options' : _ref$ariaLabel,
21
+ children = _ref.children,
22
+ id = _ref.id,
23
+ _ref$disabled = _ref.disabled,
24
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
25
+ className = _ref.className,
26
+ rest = _objectWithoutProperties(_ref, _excluded);
27
+
28
+ var prefix = usePrefix();
29
+ var selectClasses = cx((_cx = {}, _defineProperty(_cx, "".concat(prefix, "--select"), true), _defineProperty(_cx, "".concat(prefix, "--time-picker__select"), true), _defineProperty(_cx, className, className), _cx));
30
+ return /*#__PURE__*/React__default.createElement("div", {
31
+ className: selectClasses
32
+ }, /*#__PURE__*/React__default.createElement("select", _extends({
33
+ "aria-label": ariaLabel,
34
+ className: "".concat(prefix, "--select-input"),
35
+ disabled: disabled,
36
+ id: id,
37
+ ref: ref
38
+ }, rest), children), /*#__PURE__*/React__default.createElement(ChevronDown, {
39
+ className: "".concat(prefix, "--select__arrow"),
40
+ "aria-hidden": "true"
41
+ }));
80
42
  });
43
+ TimePickerSelect.propTypes = {
44
+ /**
45
+ * Provide the contents of your TimePickerSelect
46
+ */
47
+ children: PropTypes.node,
48
+
49
+ /**
50
+ * Specify an optional className to be applied to the node containing the label and the select box
51
+ */
52
+ className: PropTypes.string,
53
+
54
+ /**
55
+ * Optionally provide the default value of the `<select>`
56
+ */
57
+ defaultValue: PropTypes.any,
58
+
59
+ /**
60
+ * Specify whether the control is disabled
61
+ */
62
+ disabled: PropTypes.bool,
63
+
64
+ /**
65
+ * Specify a custom `id` for the `<select>`
66
+ */
67
+ id: PropTypes.string.isRequired
68
+ };
81
69
 
82
70
  export { TimePickerSelect as default };
@@ -6,9 +6,8 @@
6
6
  */
7
7
 
8
8
  import * as FeatureFlags from '@carbon/feature-flags';
9
- import TimePickerSelect$1 from './next/TimePickerSelect.js';
10
- import TimePickerSelect$2 from './TimePickerSelect.js';
9
+ import TimePickerSelect$1 from './TimePickerSelect.js';
11
10
 
12
- var TimePickerSelect = FeatureFlags.enabled('enable-v11-release') ? TimePickerSelect$1 : TimePickerSelect$2;
11
+ var TimePickerSelect = FeatureFlags.enabled('enable-v11-release') ? TimePickerSelect$1 : TimePickerSelect$1;
13
12
 
14
13
  export { TimePickerSelect as default };
package/es/index.js CHANGED
@@ -159,6 +159,10 @@ export { default as unstable__FluidDropdown } from './components/FluidDropdown/F
159
159
  export { default as unstable__FluidDropdownSkeleton } from './components/FluidDropdown/FluidDropdown.Skeleton.js';
160
160
  export { default as unstable__FluidMultiSelect } from './components/FluidMultiSelect/FluidMultiSelect.js';
161
161
  export { default as unstable__FluidMultiSelectSkeleton } from './components/FluidMultiSelect/FluidMultiSelect.Skeleton.js';
162
+ export { default as unstable__FluidNumberInput } from './components/FluidNumberInput/FluidNumberInput.js';
163
+ export { default as unstable__FluidNumberInputSkeleton } from './components/FluidNumberInput/FluidNumberInput.Skeleton.js';
164
+ export { default as unstable__FluidSearch } from './components/FluidSearch/FluidSearch.js';
165
+ export { default as unstable__FluidSearchSkeleton } from './components/FluidSearch/FluidSearch.Skeleton.js';
162
166
  export { default as unstable__FluidSelect } from './components/FluidSelect/FluidSelect.js';
163
167
  export { default as unstable__FluidSelectSkeleton } from './components/FluidSelect/FluidSelect.Skeleton.js';
164
168
  export { default as unstable__FluidTextArea } from './components/FluidTextArea/FluidTextArea.js';
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { commonjsGlobal, getDefaultExportFromCjs } from '../../../../_virtual/_commonjsHelpers.js';
9
- import { l as l10n$1 } from '../../../../_virtual/index.js';
9
+ import { exports as l10nExports, __module as l10n$1 } from '../../../../_virtual/index.js';
10
10
 
11
11
  (function (module, exports) {
12
12
  (function (global, factory) {
@@ -1416,8 +1416,8 @@ import { l as l10n$1 } from '../../../../_virtual/index.js';
1416
1416
  value: true
1417
1417
  });
1418
1418
  });
1419
- })(l10n$1, l10n$1.exports);
1419
+ })(l10n$1, l10nExports);
1420
1420
 
1421
- var l10n = /*@__PURE__*/getDefaultExportFromCjs(l10n$1.exports);
1421
+ var l10n = /*@__PURE__*/getDefaultExportFromCjs(l10nExports);
1422
1422
 
1423
1423
  export { l10n as default };
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { commonjsGlobal } from '../../../../_virtual/_commonjsHelpers.js';
9
- import { r as rangePlugin$1 } from '../../../../_virtual/rangePlugin.js';
9
+ import { __module as rangePlugin$1, exports as rangePluginExports } from '../../../../_virtual/rangePlugin.js';
10
10
 
11
11
  (function (module, exports) {
12
12
  (function (global, factory) {
@@ -191,6 +191,6 @@ import { r as rangePlugin$1 } from '../../../../_virtual/rangePlugin.js';
191
191
  });
192
192
  })(rangePlugin$1);
193
193
 
194
- var rangePlugin = rangePlugin$1.exports;
194
+ var rangePlugin = rangePluginExports;
195
195
 
196
196
  export { rangePlugin as default };
@@ -6,7 +6,6 @@
6
6
  */
7
7
 
8
8
  import { typeof as _typeof } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
- import '../resize-observer-polyfill/dist/ResizeObserver.es.js';
10
9
  import require$$0 from '../../_virtual/ResizeObserver.es.js';
11
10
  import React__default from 'react';
12
11
 
@@ -16,8 +16,21 @@ function getDefaultExportFromCjs (x) {
16
16
  }
17
17
 
18
18
  function getAugmentedNamespace(n) {
19
- if (n.__esModule) return n;
20
- var a = Object.defineProperty({}, '__esModule', {value: true});
19
+ if (n.__esModule) return n;
20
+ var f = n.default;
21
+ if (typeof f == "function") {
22
+ var a = function a () {
23
+ if (this instanceof a) {
24
+ var args = [null];
25
+ args.push.apply(args, arguments);
26
+ var Ctor = Function.bind.apply(f, args);
27
+ return new Ctor();
28
+ }
29
+ return f.apply(this, arguments);
30
+ };
31
+ a.prototype = f.prototype;
32
+ } else a = {};
33
+ Object.defineProperty(a, '__esModule', {value: true});
21
34
  Object.keys(n).forEach(function (k) {
22
35
  var d = Object.getOwnPropertyDescriptor(n, k);
23
36
  Object.defineProperty(a, k, d.get ? d : {
@@ -9,6 +9,10 @@
9
9
 
10
10
  Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
- var l10n = {exports: {}};
12
+ exports.exports = {};
13
+ var l10n = {
14
+ get exports(){ return exports.exports; },
15
+ set exports(v){ exports.exports = v; },
16
+ };
13
17
 
14
- exports.l10n = l10n;
18
+ exports.__module = l10n;
@@ -9,6 +9,10 @@
9
9
 
10
10
  Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
- var rangePlugin = {exports: {}};
12
+ exports.exports = {};
13
+ var rangePlugin = {
14
+ get exports(){ return exports.exports; },
15
+ set exports(v){ exports.exports = v; },
16
+ };
13
17
 
14
- exports.rangePlugin = rangePlugin;
18
+ exports.__module = rangePlugin;
@@ -9,6 +9,7 @@
9
9
 
10
10
  Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
+ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
12
13
  var React = require('react');
13
14
  var PropTypes = require('prop-types');
14
15
  var cx = require('classnames');
@@ -27,6 +28,7 @@ function ContainedList(_ref) {
27
28
  var action = _ref.action,
28
29
  children = _ref.children,
29
30
  className = _ref.className,
31
+ isInset = _ref.isInset,
30
32
  _ref$kind = _ref.kind,
31
33
  kind = _ref$kind === void 0 ? variants[0] : _ref$kind,
32
34
  label = _ref.label,
@@ -34,7 +36,7 @@ function ContainedList(_ref) {
34
36
  size = _ref$size === void 0 ? 'lg' : _ref$size;
35
37
  var labelId = "".concat(useId.useId('contained-list'), "-header");
36
38
  var prefix = usePrefix.usePrefix();
37
- var classes = cx__default["default"]("".concat(prefix, "--contained-list"), "".concat(prefix, "--contained-list--").concat(kind), "".concat(prefix, "--contained-list--").concat(size), className);
39
+ var classes = cx__default["default"]("".concat(prefix, "--contained-list"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(prefix, "--contained-list--inset-rulers"), isInset), "".concat(prefix, "--contained-list--").concat(kind), "".concat(prefix, "--contained-list--").concat(size), className);
38
40
  return /*#__PURE__*/React__default["default"].createElement("div", {
39
41
  className: classes
40
42
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -65,6 +67,11 @@ ContainedList.propTypes = {
65
67
  */
66
68
  className: PropTypes__default["default"].string,
67
69
 
70
+ /**
71
+ * Specify whether the dividing lines in between list items should be inset.
72
+ */
73
+ isInset: PropTypes__default["default"].bool,
74
+
68
75
  /**
69
76
  * The kind of ContainedList you want to display
70
77
  */
@@ -106,9 +106,7 @@ var TableHeader = /*#__PURE__*/React__default["default"].forwardRef(function Tab
106
106
  ref: ref,
107
107
  scope: scope
108
108
  }, /*#__PURE__*/React__default["default"].createElement("div", {
109
- style: {
110
- display: 'none'
111
- },
109
+ className: "".concat(prefix, "--table-sort__description"),
112
110
  id: uniqueId
113
111
  }, sortDescription), /*#__PURE__*/React__default["default"].createElement("button", _rollupPluginBabelHelpers["extends"]({
114
112
  type: "button",
@@ -132,8 +132,8 @@ function isLabelTextEmpty(children) {
132
132
  });
133
133
  }
134
134
 
135
- var rightArrowHTML = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n <polygon points=\"11,8 6,13 5.3,12.3 9.6,8 5.3,3.7 6,3 \"/>\n <rect width=\"16\" height=\"16\" style=\"fill:none\" />\n</svg>";
136
- var leftArrowHTML = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n <polygon points=\"5,8 10,3 10.7,3.7 6.4,8 10.7,12.3 10,13 \"/>\n <rect width=\"16\" height=\"16\" style=\"fill:none\" />\n</svg>";
135
+ var rightArrowHTML = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n <polygon points=\"11,8 6,13 5.3,12.3 9.6,8 5.3,3.7 6,3 \"/>\n</svg>";
136
+ var leftArrowHTML = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n <polygon points=\"5,8 10,3 10.7,3.7 6.4,8 10.7,12.3 10,13 \"/>\n</svg>";
137
137
 
138
138
  function updateClassNames(calendar, prefix) {
139
139
  var calendarContainer = calendar.calendarContainer;
@@ -393,7 +393,18 @@ var DatePicker = /*#__PURE__*/React__default["default"].forwardRef(function Date
393
393
  }
394
394
  };
395
395
  }, [savedOnChange, savedOnClose, savedOnOpen, readOnly]); //eslint-disable-line react-hooks/exhaustive-deps
396
+ // this hook allows consumers to access the flatpickr calendar
397
+ // instance for cases where functions like open() or close()
398
+ // need to be imperatively called on the calendar
396
399
 
400
+ React.useImperativeHandle(ref, function () {
401
+ return {
402
+ get calendar() {
403
+ return calendarRef.current;
404
+ }
405
+
406
+ };
407
+ });
397
408
  React.useEffect(function () {
398
409
  var _calendarRef$current;
399
410
 
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2022
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var PropTypes = require('prop-types');
14
+ var React = require('react');
15
+ var cx = require('classnames');
16
+ var usePrefix = require('../../internal/usePrefix.js');
17
+ var FormContext = require('../FluidForm/FormContext.js');
18
+
19
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
+
21
+ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
22
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
23
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
24
+
25
+ var _excluded = ["className"];
26
+
27
+ function FluidNumberInputSkeleton(_ref) {
28
+ var className = _ref.className,
29
+ other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
30
+
31
+ var prefix = usePrefix.usePrefix();
32
+ return /*#__PURE__*/React__default["default"].createElement(FormContext.FormContext.Provider, {
33
+ value: {
34
+ isFluid: true
35
+ }
36
+ }, /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
37
+ className: cx__default["default"]("".concat(prefix, "--form-item ").concat(prefix, "--text-input--fluid__skeleton"), className)
38
+ }, other), /*#__PURE__*/React__default["default"].createElement("span", {
39
+ className: "".concat(prefix, "--label ").concat(prefix, "--skeleton")
40
+ }), /*#__PURE__*/React__default["default"].createElement("div", {
41
+ className: "".concat(prefix, "--skeleton ").concat(prefix, "--text-input")
42
+ })));
43
+ }
44
+
45
+ FluidNumberInputSkeleton.propTypes = {
46
+ /**
47
+ * Specify an optional className to be applied to the outer FluidForm wrapper
48
+ */
49
+ className: PropTypes__default["default"].string
50
+ };
51
+
52
+ exports["default"] = FluidNumberInputSkeleton;
@@ -0,0 +1,148 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2022
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var PropTypes = require('prop-types');
14
+ var React = require('react');
15
+ var cx = require('classnames');
16
+ require('../NumberInput/NumberInput.Skeleton.js');
17
+ var NumberInput = require('../NumberInput/NumberInput.js');
18
+ var usePrefix = require('../../internal/usePrefix.js');
19
+ var FormContext = require('../FluidForm/FormContext.js');
20
+
21
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
22
+
23
+ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
24
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
25
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
26
+
27
+ var _excluded = ["className"];
28
+ var FluidNumberInput = /*#__PURE__*/React__default["default"].forwardRef(function FluidNumberInput(_ref, ref) {
29
+ var className = _ref.className,
30
+ other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
31
+
32
+ var prefix = usePrefix.usePrefix();
33
+ var classNames = cx__default["default"]("".concat(prefix, "--number-input--fluid"), className);
34
+ return /*#__PURE__*/React__default["default"].createElement(FormContext.FormContext.Provider, {
35
+ value: {
36
+ isFluid: true
37
+ }
38
+ }, /*#__PURE__*/React__default["default"].createElement(NumberInput.NumberInput, _rollupPluginBabelHelpers["extends"]({
39
+ ref: ref,
40
+ className: classNames
41
+ }, other)));
42
+ });
43
+ FluidNumberInput.propTypes = {
44
+ /**
45
+ * `true` to allow empty string.
46
+ */
47
+ allowEmpty: PropTypes__default["default"].bool,
48
+
49
+ /**
50
+ * Specify an optional className to be applied to the wrapper node
51
+ */
52
+ className: PropTypes__default["default"].string,
53
+
54
+ /**
55
+ * Optional starting value for uncontrolled state
56
+ */
57
+ defaultValue: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
58
+
59
+ /**
60
+ * Specify if the wheel functionality for the input should be disabled, or not
61
+ */
62
+ disableWheel: PropTypes__default["default"].bool,
63
+
64
+ /**
65
+ * Specify if the control should be disabled, or not
66
+ */
67
+ disabled: PropTypes__default["default"].bool,
68
+
69
+ /**
70
+ * Provide a description for up/down icons that can be read by screen readers
71
+ */
72
+ iconDescription: PropTypes__default["default"].string,
73
+
74
+ /**
75
+ * Specify a custom `id` for the input
76
+ */
77
+ id: PropTypes__default["default"].string.isRequired,
78
+
79
+ /**
80
+ * Specify if the currently value is invalid.
81
+ */
82
+ invalid: PropTypes__default["default"].bool,
83
+
84
+ /**
85
+ * Message which is displayed if the value is invalid.
86
+ */
87
+ invalidText: PropTypes__default["default"].node,
88
+
89
+ /**
90
+ * Generic `label` that will be used as the textual representation of what
91
+ * this field is for
92
+ */
93
+ label: PropTypes__default["default"].node,
94
+
95
+ /**
96
+ * The maximum value.
97
+ */
98
+ max: PropTypes__default["default"].number,
99
+
100
+ /**
101
+ * The minimum value.
102
+ */
103
+ min: PropTypes__default["default"].number,
104
+
105
+ /**
106
+ * Provide an optional handler that is called when the internal state of
107
+ * NumberInput changes. This handler is called with event and state info.
108
+ * `(event, { value, direction }) => void`
109
+ */
110
+ onChange: PropTypes__default["default"].func,
111
+
112
+ /**
113
+ * Provide an optional function to be called when the up/down button is clicked
114
+ */
115
+ onClick: PropTypes__default["default"].func,
116
+
117
+ /**
118
+ * Provide an optional function to be called when a key is pressed in the number input
119
+ */
120
+ onKeyUp: PropTypes__default["default"].func,
121
+
122
+ /**
123
+ * Specify how much the values should increase/decrease upon clicking on up/down button
124
+ */
125
+ step: PropTypes__default["default"].number,
126
+
127
+ /**
128
+ * Provide custom text for the component for each translation id
129
+ */
130
+ translateWithId: PropTypes__default["default"].func,
131
+
132
+ /**
133
+ * Specify the value of the input
134
+ */
135
+ value: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
136
+
137
+ /**
138
+ * Specify whether the control is currently in warning state
139
+ */
140
+ warn: PropTypes__default["default"].bool,
141
+
142
+ /**
143
+ * Provide the text that is displayed when the control is in warning state
144
+ */
145
+ warnText: PropTypes__default["default"].node
146
+ };
147
+
148
+ exports["default"] = FluidNumberInput;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2022
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var PropTypes = require('prop-types');
14
+ var React = require('react');
15
+ var cx = require('classnames');
16
+ var usePrefix = require('../../internal/usePrefix.js');
17
+ var FormContext = require('../FluidForm/FormContext.js');
18
+
19
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
+
21
+ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
22
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
23
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
24
+
25
+ var _excluded = ["className"];
26
+
27
+ function FluidSearchSkeleton(_ref) {
28
+ var className = _ref.className,
29
+ other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
30
+
31
+ var prefix = usePrefix.usePrefix();
32
+ return /*#__PURE__*/React__default["default"].createElement(FormContext.FormContext.Provider, {
33
+ value: {
34
+ isFluid: true
35
+ }
36
+ }, /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
37
+ className: cx__default["default"]("".concat(prefix, "--form-item ").concat(prefix, "--text-input--fluid__skeleton"), className)
38
+ }, other), /*#__PURE__*/React__default["default"].createElement("span", {
39
+ className: "".concat(prefix, "--label ").concat(prefix, "--skeleton")
40
+ }), /*#__PURE__*/React__default["default"].createElement("div", {
41
+ className: "".concat(prefix, "--skeleton ").concat(prefix, "--text-input")
42
+ })));
43
+ }
44
+
45
+ FluidSearchSkeleton.propTypes = {
46
+ /**
47
+ * Specify an optional className to be applied to the outer FluidForm wrapper
48
+ */
49
+ className: PropTypes__default["default"].string
50
+ };
51
+
52
+ exports["default"] = FluidSearchSkeleton;