@sproutsocial/racine 11.4.0 → 11.4.2-input-beta.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 (180) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/__flow__/Input/index.js +34 -9
  3. package/__flow__/Input/index.stories.js +14 -0
  4. package/__flow__/Input/index.test.js +18 -0
  5. package/__flow__/utils/index.js +23 -0
  6. package/commonjs/Avatar/index.js +7 -4
  7. package/commonjs/Badge/index.js +3 -1
  8. package/commonjs/Badge/styles.js +1 -1
  9. package/commonjs/Banner/index.js +3 -1
  10. package/commonjs/Banner/styles.js +1 -1
  11. package/commonjs/Box/styles.js +1 -1
  12. package/commonjs/Breadcrumb/index.js +5 -2
  13. package/commonjs/Button/index.js +3 -1
  14. package/commonjs/Card/index.js +3 -1
  15. package/commonjs/Card/styles.js +3 -3
  16. package/commonjs/CharacterCounter/index.js +3 -1
  17. package/commonjs/CharacterCounter/styles.js +1 -1
  18. package/commonjs/ChartLegend/index.js +3 -1
  19. package/commonjs/ChartLegend/styles.js +3 -3
  20. package/commonjs/Checkbox/index.js +3 -1
  21. package/commonjs/Checkbox/styles.js +1 -1
  22. package/commonjs/Collapsible/index.js +5 -2
  23. package/commonjs/DatePicker/DateRangePicker.js +3 -1
  24. package/commonjs/DatePicker/SingleDatePicker.js +3 -1
  25. package/commonjs/DatePicker/StatefulDateRangePicker.js +3 -1
  26. package/commonjs/DatePicker/StatefulSingleDatePicker.js +3 -1
  27. package/commonjs/DatePicker/common.js +1 -1
  28. package/commonjs/DatePicker/styles.js +2 -6
  29. package/commonjs/Drawer/SlideTransition.js +3 -1
  30. package/commonjs/Drawer/index.js +9 -4
  31. package/commonjs/Drawer/styles.js +2 -2
  32. package/commonjs/EmptyState/index.js +3 -1
  33. package/commonjs/Fieldset/index.js +7 -3
  34. package/commonjs/FormField/index.js +3 -1
  35. package/commonjs/Icon/index.js +5 -2
  36. package/commonjs/Icon/styles.js +1 -1
  37. package/commonjs/Image/index.js +3 -1
  38. package/commonjs/Image/styles.js +1 -1
  39. package/commonjs/Indicator/index.js +3 -1
  40. package/commonjs/Input/index.js +32 -18
  41. package/commonjs/Input/styles.js +2 -2
  42. package/commonjs/KeyboardKey/index.js +3 -1
  43. package/commonjs/Label/index.js +4 -2
  44. package/commonjs/Link/index.js +3 -1
  45. package/commonjs/Link/styles.js +1 -1
  46. package/commonjs/Listbox/index.js +7 -4
  47. package/commonjs/Loader/index.js +3 -1
  48. package/commonjs/Loader/styles.js +2 -2
  49. package/commonjs/LoaderButton/index.js +3 -1
  50. package/commonjs/Menu/constants.js +1 -1
  51. package/commonjs/Menu/descendants.js +10 -7
  52. package/commonjs/Menu/hooks.js +1 -1
  53. package/commonjs/Menu/index.js +22 -16
  54. package/commonjs/Menu/styles.js +2 -2
  55. package/commonjs/Message/index.js +3 -1
  56. package/commonjs/Message/styles.js +1 -1
  57. package/commonjs/Modal/index.js +7 -3
  58. package/commonjs/Modal/styles.js +4 -6
  59. package/commonjs/Numeral/constants.js +1 -1
  60. package/commonjs/Numeral/index.js +3 -1
  61. package/commonjs/Numeral/styles.js +3 -3
  62. package/commonjs/OverflowList/styles.js +1 -1
  63. package/commonjs/Popout/index.js +7 -3
  64. package/commonjs/Popout/styles.js +1 -1
  65. package/commonjs/Radio/index.js +3 -1
  66. package/commonjs/Radio/styles.js +4 -4
  67. package/commonjs/SegmentedControl/index.js +5 -2
  68. package/commonjs/Select/index.js +3 -1
  69. package/commonjs/Stack/index.js +3 -1
  70. package/commonjs/Switch/index.js +3 -1
  71. package/commonjs/Switch/styles.js +1 -1
  72. package/commonjs/Table/index.js +10 -5
  73. package/commonjs/TableCell/index.js +3 -1
  74. package/commonjs/TableHeaderCell/index.js +3 -1
  75. package/commonjs/TableRowAccordion/index.js +3 -1
  76. package/commonjs/Tabs/index.js +5 -2
  77. package/commonjs/Tabs/styles.js +4 -4
  78. package/commonjs/Text/index.js +3 -1
  79. package/commonjs/Text/styles.js +1 -1
  80. package/commonjs/Textarea/index.js +3 -1
  81. package/commonjs/Toast/index.js +15 -15
  82. package/commonjs/Toast/styles.js +4 -7
  83. package/commonjs/ToggleHint/index.js +3 -1
  84. package/commonjs/Token/index.js +3 -1
  85. package/commonjs/Token/styles.js +1 -1
  86. package/commonjs/TokenInput/index.js +3 -1
  87. package/commonjs/Tooltip/index.js +5 -2
  88. package/commonjs/Tooltip/styles.js +1 -1
  89. package/commonjs/VisuallyHidden/index.js +1 -1
  90. package/commonjs/index.js +1 -1
  91. package/commonjs/themes/dark/decorative-palettes.js +1 -1
  92. package/commonjs/themes/dark/theme.js +1 -1
  93. package/commonjs/themes/light/decorative-palettes.js +1 -1
  94. package/commonjs/themes/light/theme.js +1 -1
  95. package/commonjs/utils/hooks.js +3 -2
  96. package/commonjs/utils/index.js +29 -2
  97. package/commonjs/utils/mixins.js +1 -1
  98. package/commonjs/utils/system-props.js +1 -1
  99. package/dist/themes/dark/dark.scss +5 -5
  100. package/dist/themes/light/light.scss +95 -95
  101. package/lib/Avatar/index.js +7 -4
  102. package/lib/Badge/index.js +3 -1
  103. package/lib/Badge/styles.js +1 -1
  104. package/lib/Banner/index.js +3 -1
  105. package/lib/Banner/styles.js +1 -1
  106. package/lib/Box/styles.js +1 -1
  107. package/lib/Breadcrumb/index.js +5 -2
  108. package/lib/Button/index.js +3 -1
  109. package/lib/Card/index.js +3 -1
  110. package/lib/Card/styles.js +2 -2
  111. package/lib/CharacterCounter/index.js +3 -1
  112. package/lib/CharacterCounter/styles.js +1 -1
  113. package/lib/ChartLegend/index.js +3 -1
  114. package/lib/ChartLegend/styles.js +3 -3
  115. package/lib/Checkbox/index.js +3 -1
  116. package/lib/Collapsible/index.js +5 -2
  117. package/lib/DatePicker/DateRangePicker.js +3 -1
  118. package/lib/DatePicker/SingleDatePicker.js +3 -1
  119. package/lib/DatePicker/StatefulDateRangePicker.js +3 -1
  120. package/lib/DatePicker/StatefulSingleDatePicker.js +3 -1
  121. package/lib/DatePicker/styles.js +2 -6
  122. package/lib/Drawer/SlideTransition.js +3 -1
  123. package/lib/Drawer/index.js +9 -4
  124. package/lib/Drawer/styles.js +2 -2
  125. package/lib/EmptyState/index.js +3 -1
  126. package/lib/Fieldset/index.js +7 -3
  127. package/lib/FormField/index.js +3 -1
  128. package/lib/Icon/index.js +5 -2
  129. package/lib/Icon/styles.js +1 -1
  130. package/lib/Image/index.js +3 -1
  131. package/lib/Image/styles.js +1 -1
  132. package/lib/Indicator/index.js +3 -1
  133. package/lib/Input/index.js +31 -18
  134. package/lib/Input/styles.js +2 -2
  135. package/lib/KeyboardKey/index.js +3 -1
  136. package/lib/Label/index.js +4 -2
  137. package/lib/Link/index.js +3 -1
  138. package/lib/Link/styles.js +1 -1
  139. package/lib/Listbox/index.js +6 -3
  140. package/lib/Loader/index.js +3 -1
  141. package/lib/Loader/styles.js +2 -2
  142. package/lib/LoaderButton/index.js +3 -1
  143. package/lib/Menu/descendants.js +5 -2
  144. package/lib/Menu/index.js +20 -16
  145. package/lib/Menu/styles.js +2 -2
  146. package/lib/Message/index.js +3 -1
  147. package/lib/Modal/index.js +7 -3
  148. package/lib/Modal/styles.js +3 -5
  149. package/lib/Numeral/index.js +3 -1
  150. package/lib/Numeral/styles.js +2 -2
  151. package/lib/OverflowList/styles.js +1 -1
  152. package/lib/Popout/index.js +7 -3
  153. package/lib/Popout/styles.js +1 -1
  154. package/lib/Radio/index.js +3 -1
  155. package/lib/Radio/styles.js +4 -4
  156. package/lib/SegmentedControl/index.js +5 -2
  157. package/lib/Select/index.js +3 -1
  158. package/lib/Stack/index.js +3 -1
  159. package/lib/Switch/index.js +3 -1
  160. package/lib/Switch/styles.js +1 -1
  161. package/lib/Table/index.js +9 -4
  162. package/lib/TableCell/index.js +3 -1
  163. package/lib/TableHeaderCell/index.js +3 -1
  164. package/lib/TableRowAccordion/index.js +3 -1
  165. package/lib/Tabs/index.js +5 -2
  166. package/lib/Tabs/styles.js +3 -3
  167. package/lib/Text/index.js +3 -1
  168. package/lib/Text/styles.js +1 -1
  169. package/lib/Textarea/index.js +3 -1
  170. package/lib/Toast/index.js +14 -14
  171. package/lib/Toast/styles.js +3 -7
  172. package/lib/ToggleHint/index.js +3 -1
  173. package/lib/Token/index.js +3 -1
  174. package/lib/Token/styles.js +1 -1
  175. package/lib/TokenInput/index.js +3 -1
  176. package/lib/Tooltip/index.js +5 -2
  177. package/lib/Tooltip/styles.js +1 -1
  178. package/lib/VisuallyHidden/index.js +1 -1
  179. package/lib/utils/index.js +24 -0
  180. package/package.json +1 -1
@@ -11,16 +11,12 @@ var _Box = _interopRequireDefault(require("../Box"));
11
11
 
12
12
  var _mixins = require("../utils/mixins");
13
13
 
14
- var _templateObject;
15
-
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
15
 
18
16
  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); }
19
17
 
20
18
  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; }
21
19
 
22
- function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
23
-
24
20
  /*
25
21
  * Partial list of modifiers given to renderDayContents by airbnb/react-dates. There may be more.
26
22
  *
@@ -70,7 +66,7 @@ var shouldHaveRightPill = function shouldHaveRightPill(modifiers, day) {
70
66
 
71
67
  var CalendarDay = (0, _styledComponents.default)(_Box.default).withConfig({
72
68
  displayName: "styles__CalendarDay",
73
- componentId: "fso9yi-0"
69
+ componentId: "sc-fso9yi-0"
74
70
  })(["", ";"], function (_ref) {
75
71
  var modifiers = _ref.modifiers,
76
72
  day = _ref.day,
@@ -87,7 +83,7 @@ var CalendarDay = (0, _styledComponents.default)(_Box.default).withConfig({
87
83
  }
88
84
  });
89
85
  exports.CalendarDay = CalendarDay;
90
- var ReactDatesCssOverrides = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\t.DayPicker {\n\t\tbox-sizing: content-box;\n\t\tfont-weight: ", ";\n\t\tfont-family: ", ";\n\n\t\t/* override react-dates height to better reflect how tall the component actually is */\n\t\t/* adding margin/padding will be more truer to our seeds system because the height */\n\t\t/* of the calendar adds an extra row of padding if we do not override it */\n\t\t&_transitionContainer {\n\t\t\t/* need !important because react-dates sets height on the element itself */\n\t\t\theight: 228px !important;\n\t\t}\n\n\t\t&_weekHeader {\n\t\t\tcolor: ", ";\n\t\t\tborder-bottom: 1px solid ", ";\n\n \t\t\t/* Magic number to match position of .CalendarMonth_caption */\n\t\t\ttop: 26px;\n\n\t\t\t/* Magic number to make the bottom border line stretch the full width */\n\t\t\twidth: 230px;\n\n\t\t\t&_ul {\n \t\t\t\t/* Magic number to line up day name headings over the correct numbers */\n\t\t\t\tpadding-left: 10px;\n\t\t\t}\n\t\t}\n\n\t\t&_weekHeaders__horizontal {\n\t\t\tmargin-left: 0\n\t\t}\n\n\t\t&_weekHeader_li {\n\t\t\t", "\n\t\t\tcolor: ", ";\n\t\t\tfont-weight: ", ";\n\t\t\tmargin: 0;\n\t\t}\n\n\t\t&__horizontal {\n\t\t\tbox-shadow: none;\n\t\t\tbackground: ", ";\n\t\t}\n\t}\n\n .CalendarDay {\n\t\tbackground-color: transparent;\n\n &__selected, &__selected_span, &:hover {\n background-color: transparent;\n\t\t}\n\n\t\t&__default {\n\t\t\tcolor: ", ";\n\t\t}\n\t\t&__default,\n\t\t&__default:hover {\n\t\t\tborder: none;\n\t\t\tcolor: ", ";\n\t\t}\n\t}\n\n .CalendarMonth {\n\t\t", "\n\t\tbackground: ", ";\n\n \t\t/* spacing between visible months and months off canvas */\n\t\tpadding: 0 15px;\n\n\t\t&_caption {\n\t\t\t", "\n\t\t\tcolor: ", ";\n\t\t\tpadding-top: 0;\n\t\t\tbackground: ", ";\n\n\t\t\tstrong {\n\t\t\t\tfont-weight: ", ";\n\t\t\t}\n\n\t\t}\n\t\t&_table {\n\t\t\tline-height: 21.333px;\n\t\t\ttr {\n\t\t\t\tvertical-align: middle;\n\t\t\t}\n\t\t\ttd {\n\t\t\t\tpadding: 0;\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t.CalendarMonthGrid {\n\t\tbackground: ", ";\n\t}\n\n\t/* Left and Right Arrow Buttons to navigate months */\n\t.DayPickerNavigation_button__horizontal {\n\t\tcolor: ", ";\n\t\ttop: -4px;\n\t\tpadding: 7px 8px;\n\t\tposition: absolute;\n\t\tline-height: 0.78;\n\t\tborder-radius: 9999px;\n\t\tborder: none;\n\t\tbackground: ", ";\n\n\t\t&:nth-child(1) {\n\t\t\tleft: 22px;\n\t\t}\n\t\t&:nth-child(2) {\n\t\t\tright: 22px;\n\t\t}\n\n\t\t&:hover {\n\t\t\tbackground: ", ";\n\t\t}\n\t}\n"])), function (_ref2) {
86
+ var ReactDatesCssOverrides = (0, _styledComponents.createGlobalStyle)([".DayPicker{box-sizing:content-box;font-weight:", ";font-family:", ";&_transitionContainer{height:228px !important;}&_weekHeader{color:", ";border-bottom:1px solid ", ";top:26px;width:230px;&_ul{padding-left:10px;}}&_weekHeaders__horizontal{margin-left:0}&_weekHeader_li{", " color:", ";font-weight:", ";margin:0;}&__horizontal{box-shadow:none;background:", ";}}.CalendarDay{background-color:transparent;&__selected,&__selected_span,&:hover{background-color:transparent;}&__default{color:", ";}&__default,&__default:hover{border:none;color:", ";}}.CalendarMonth{", " background:", ";padding:0 15px;&_caption{", " color:", ";padding-top:0;background:", ";strong{font-weight:", ";}}&_table{line-height:21.333px;tr{vertical-align:middle;}td{padding:0;border-bottom:none;}}}.CalendarMonthGrid{background:", ";}.DayPickerNavigation_button__horizontal{color:", ";top:-4px;padding:7px 8px;position:absolute;line-height:0.78;border-radius:9999px;border:none;background:", ";&:nth-child(1){left:22px;}&:nth-child(2){right:22px;}&:hover{background:", ";}}"], function (_ref2) {
91
87
  var theme = _ref2.theme;
92
88
  return theme.fontWeights.normal;
93
89
  }, function (props) {
@@ -9,6 +9,8 @@ var _reactSpring = require("react-spring");
9
9
 
10
10
  var _seedsMotionUnitless = require("@sproutsocial/seeds-motion/dist/seeds-motion-unitless");
11
11
 
12
+ var _excluded = ["isVisible", "children", "width", "direction"];
13
+
12
14
  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); }
13
15
 
14
16
  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; }
@@ -20,7 +22,7 @@ var SlideTransition = function SlideTransition(_ref) {
20
22
  children = _ref.children,
21
23
  width = _ref.width,
22
24
  direction = _ref.direction,
23
- rest = _objectWithoutPropertiesLoose(_ref, ["isVisible", "children", "width", "direction"]);
25
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
24
26
 
25
27
  var offset = width * (direction === "left" ? -1 : 1);
26
28
  var transitions = (0, _reactSpring.useTransition)(isVisible, null, {
@@ -23,6 +23,11 @@ var _Button = _interopRequireDefault(require("../Button"));
23
23
 
24
24
  var _Icon = _interopRequireDefault(require("../Icon"));
25
25
 
26
+ var _excluded = ["title", "children", "render"],
27
+ _excluded2 = ["children"],
28
+ _excluded3 = ["id", "style", "offset", "direction", "children", "disableCloseOnClickOutside", "onClose", "zIndex", "closeTargets"],
29
+ _excluded4 = ["children", "closeButtonLabel", "direction", "disableCloseOnClickOutside", "id", "isOpen", "offset", "onClose", "zIndex", "closeTargets"];
30
+
26
31
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
32
 
28
33
  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); }
@@ -73,7 +78,7 @@ var DrawerHeader = function DrawerHeader(_ref) {
73
78
  title = _ref$title === void 0 ? "" : _ref$title,
74
79
  children = _ref.children,
75
80
  render = _ref.render,
76
- rest = _objectWithoutPropertiesLoose(_ref, ["title", "children", "render"]);
81
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
77
82
 
78
83
  var drawerContext = (0, React.useContext)(DrawerContext);
79
84
 
@@ -99,7 +104,7 @@ var DrawerHeader = function DrawerHeader(_ref) {
99
104
 
100
105
  var DrawerContent = function DrawerContent(_ref2) {
101
106
  var children = _ref2.children,
102
- rest = _objectWithoutPropertiesLoose(_ref2, ["children"]);
107
+ rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
103
108
 
104
109
  return (
105
110
  /*#__PURE__*/
@@ -122,7 +127,7 @@ var Drawer = function Drawer(_ref3) {
122
127
  onClose = _ref3.onClose,
123
128
  zIndex = _ref3.zIndex,
124
129
  closeTargets = _ref3.closeTargets,
125
- rest = _objectWithoutPropertiesLoose(_ref3, ["id", "style", "offset", "direction", "children", "disableCloseOnClickOutside", "onClose", "zIndex", "closeTargets"]);
130
+ rest = _objectWithoutPropertiesLoose(_ref3, _excluded3);
126
131
 
127
132
  var drawerRef = (0, React.useRef)(null);
128
133
  (0, React.useEffect)(function () {
@@ -194,7 +199,7 @@ var DrawerContainer = function DrawerContainer(_ref4) {
194
199
  zIndex = _ref4$zIndex === void 0 ? 7 : _ref4$zIndex,
195
200
  _ref4$closeTargets = _ref4.closeTargets,
196
201
  closeTargets = _ref4$closeTargets === void 0 ? [] : _ref4$closeTargets,
197
- rest = _objectWithoutPropertiesLoose(_ref4, ["children", "closeButtonLabel", "direction", "disableCloseOnClickOutside", "id", "isOpen", "offset", "onClose", "zIndex", "closeTargets"]);
202
+ rest = _objectWithoutPropertiesLoose(_ref4, _excluded4);
198
203
 
199
204
  return /*#__PURE__*/React.createElement(_Portal.default, {
200
205
  id: id
@@ -17,13 +17,13 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
17
17
 
18
18
  var Content = (0, _styledComponents.default)(_Box.default).withConfig({
19
19
  displayName: "styles__Content",
20
- componentId: "bo5voc-0"
20
+ componentId: "sc-bo5voc-0"
21
21
  })(["overflow-y:auto;"]);
22
22
  exports.Content = Content;
23
23
 
24
24
  var Container = _styledComponents.default.div.withConfig({
25
25
  displayName: "styles__Container",
26
- componentId: "bo5voc-1"
26
+ componentId: "sc-bo5voc-1"
27
27
  })(["display:flex;flex-direction:column;position:fixed;top:0;height:100%;width:", "px;background-color:", ";box-shadow:", ";filter:blur(0);", " ", ""], function (props) {
28
28
  return props.width;
29
29
  }, function (props) {
@@ -9,6 +9,8 @@ var _Box = _interopRequireDefault(require("../Box"));
9
9
 
10
10
  var _Text = _interopRequireDefault(require("../Text"));
11
11
 
12
+ var _excluded = ["media", "headline", "subtext", "primaryAction", "secondaryAction"];
13
+
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
 
14
16
  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); }
@@ -25,7 +27,7 @@ var EmptyState = function EmptyState(_ref) {
25
27
  subtext = _ref.subtext,
26
28
  primaryAction = _ref.primaryAction,
27
29
  secondaryAction = _ref.secondaryAction,
28
- rest = _objectWithoutPropertiesLoose(_ref, ["media", "headline", "subtext", "primaryAction", "secondaryAction"]);
30
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
29
31
 
30
32
  return (
31
33
  /*#__PURE__*/
@@ -11,6 +11,10 @@ var _Text = _interopRequireDefault(require("../Text"));
11
11
 
12
12
  var _styles = require("./styles");
13
13
 
14
+ var _excluded = ["layout", "label", "helperText", "children"],
15
+ _excluded2 = ["children"],
16
+ _excluded3 = ["children"];
17
+
14
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
19
 
16
20
  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); }
@@ -30,7 +34,7 @@ var Fieldset = function Fieldset(_ref) {
30
34
  label = _ref.label,
31
35
  helperText = _ref.helperText,
32
36
  children = _ref.children,
33
- rest = _objectWithoutPropertiesLoose(_ref, ["layout", "label", "helperText", "children"]);
37
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
34
38
 
35
39
  return (
36
40
  /*#__PURE__*/
@@ -53,7 +57,7 @@ var Fieldset = function Fieldset(_ref) {
53
57
 
54
58
  var FieldsetLegend = function FieldsetLegend(_ref2) {
55
59
  var children = _ref2.children,
56
- rest = _objectWithoutPropertiesLoose(_ref2, ["children"]);
60
+ rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
57
61
 
58
62
  return /*#__PURE__*/React.createElement(_Text.default, _extends({
59
63
  as: "legend",
@@ -66,7 +70,7 @@ var FieldsetLegend = function FieldsetLegend(_ref2) {
66
70
 
67
71
  var FieldsetHelperText = function FieldsetHelperText(_ref3) {
68
72
  var children = _ref3.children,
69
- rest = _objectWithoutPropertiesLoose(_ref3, ["children"]);
73
+ rest = _objectWithoutPropertiesLoose(_ref3, _excluded3);
70
74
 
71
75
  return /*#__PURE__*/React.createElement(_Text.default, _extends({
72
76
  as: "p",
@@ -16,6 +16,8 @@ var _VisuallyHidden = require("../VisuallyHidden");
16
16
 
17
17
  var _hooks = require("../utils/hooks");
18
18
 
19
+ var _excluded = ["children", "error", "helperText", "id", "isInvalid", "label", "mb", "qa", "isLabelHidden"];
20
+
19
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
22
 
21
23
  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); }
@@ -41,7 +43,7 @@ var FormField = function FormField(_ref) {
41
43
  qa = _ref.qa,
42
44
  _ref$isLabelHidden = _ref.isLabelHidden,
43
45
  isLabelHidden = _ref$isLabelHidden === void 0 ? false : _ref$isLabelHidden,
44
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "error", "helperText", "id", "isInvalid", "label", "mb", "qa", "isLabelHidden"]);
46
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
45
47
 
46
48
  var _useState = (0, React.useState)(identifier || "FormField-" + idCounter++),
47
49
  id = _useState[0];
@@ -15,6 +15,9 @@ var _Box = _interopRequireDefault(require("../Box"));
15
15
 
16
16
  var _deprecatedIcons = _interopRequireDefault(require("./deprecatedIcons"));
17
17
 
18
+ var _excluded = ["name", "size", "fixedWidth", "ariaLabel"],
19
+ _excluded2 = ["activeName", "inactiveName", "isActive", "size", "fixedWidth", "ariaLabel"];
20
+
18
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
22
 
20
23
  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); }
@@ -32,7 +35,7 @@ var Icon = function Icon(_ref) {
32
35
  _ref$fixedWidth = _ref.fixedWidth,
33
36
  fixedWidth = _ref$fixedWidth === void 0 ? false : _ref$fixedWidth,
34
37
  ariaLabel = _ref.ariaLabel,
35
- rest = _objectWithoutPropertiesLoose(_ref, ["name", "size", "fixedWidth", "ariaLabel"]);
38
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
36
39
 
37
40
  var iconName = _deprecatedIcons.default[name] || name;
38
41
  var iconViewBox = _IconViewBoxes.default[iconName];
@@ -73,7 +76,7 @@ var IconToggle = function IconToggle(_ref2) {
73
76
  _ref2$fixedWidth = _ref2.fixedWidth,
74
77
  fixedWidth = _ref2$fixedWidth === void 0 ? false : _ref2$fixedWidth,
75
78
  ariaLabel = _ref2.ariaLabel,
76
- rest = _objectWithoutPropertiesLoose(_ref2, ["activeName", "inactiveName", "isActive", "size", "fixedWidth", "ariaLabel"]);
79
+ rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
77
80
 
78
81
  return (
79
82
  /*#__PURE__*/
@@ -31,7 +31,7 @@ var Container = _styledComponents.default.span.attrs({
31
31
  className: "Icon"
32
32
  }).withConfig({
33
33
  displayName: "styles__Container",
34
- componentId: "x0vwa5-0"
34
+ componentId: "sc-x0vwa5-0"
35
35
  })(["display:inline-block;color:inherit;vertical-align:middle;", " ", " ", ""], function (props) {
36
36
  return stylesForSize(sizes[props.iconSize], props.fixedWidth);
37
37
  }, _systemProps.COMMON, _styledSystem.verticalAlign);
@@ -7,6 +7,8 @@ var React = _interopRequireWildcard(require("react"));
7
7
 
8
8
  var _styles = _interopRequireDefault(require("./styles"));
9
9
 
10
+ var _excluded = ["alt", "title", "onClick", "onError", "onLoad", "src", "qa"];
11
+
10
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
13
 
12
14
  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); }
@@ -97,7 +99,7 @@ var Image = /*#__PURE__*/function (_React$Component) {
97
99
  onLoad = _this$props.onLoad,
98
100
  src = _this$props.src,
99
101
  qa = _this$props.qa,
100
- rest = _objectWithoutPropertiesLoose(_this$props, ["alt", "title", "onClick", "onError", "onLoad", "src", "qa"]);
102
+ rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
101
103
 
102
104
  return /*#__PURE__*/React.createElement(_styles.default, _extends({
103
105
  isLoading: !this.state.didLoad,
@@ -16,7 +16,7 @@ var ImageContainer = _styledComponents.default.img.attrs({
16
16
  className: "Image"
17
17
  }).withConfig({
18
18
  displayName: "styles__ImageContainer",
19
- componentId: "ub2idf-0"
19
+ componentId: "sc-ub2idf-0"
20
20
  })(["display:block;", " ", " ", ""], function (props) {
21
21
  return props.isLoading && (0, _styledComponents.css)(["visibility:hidden;"]);
22
22
  }, _systemProps.COMMON, _systemProps.LAYOUT);
@@ -9,6 +9,8 @@ var _Icon = _interopRequireDefault(require("../Icon"));
9
9
 
10
10
  var _styles = _interopRequireDefault(require("./styles"));
11
11
 
12
+ var _excluded = ["tooltip"];
13
+
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
 
14
16
  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); }
@@ -35,7 +37,7 @@ var Indicator = /*#__PURE__*/function (_React$Component) {
35
37
  _proto.render = function render() {
36
38
  var _this$props = this.props,
37
39
  tooltip = _this$props.tooltip,
38
- rest = _objectWithoutPropertiesLoose(_this$props, ["tooltip"]);
40
+ rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
39
41
 
40
42
  return /*#__PURE__*/React.createElement(_styles.default, _extends({
41
43
  "data-tip": tooltip,
@@ -13,6 +13,10 @@ var _Icon = _interopRequireDefault(require("../Icon"));
13
13
 
14
14
  var _styledComponents = _interopRequireDefault(require("styled-components"));
15
15
 
16
+ var _utils = require("../utils");
17
+
18
+ var _excluded = ["autoComplete", "autoFocus", "disabled", "readOnly", "isInvalid", "hasWarning", "id", "name", "placeholder", "type", "required", "value", "elemBefore", "elemAfter", "maxLength", "ariaLabel", "ariaDescribedby", "clearButtonLabel", "innerRef", "onBlur", "onChange", "onClear", "onFocus", "onKeyDown", "onKeyUp", "onPaste", "inputProps", "qa", "appearance", "size"];
19
+
16
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
21
 
18
22
  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); }
@@ -91,32 +95,27 @@ var isClearButton = function isClearButton(elem) {
91
95
  var Input = /*#__PURE__*/function (_React$Component) {
92
96
  _inheritsLoose(Input, _React$Component);
93
97
 
94
- function Input() {
98
+ function Input(props) {
95
99
  var _this;
96
100
 
97
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
98
- args[_key] = arguments[_key];
99
- }
100
-
101
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
101
+ _this = _React$Component.call(this, props) || this;
102
+ _this.inputRef = /*#__PURE__*/React.createRef();
102
103
 
103
104
  _this.handleBlur = function (e) {
104
105
  return _this.props.onBlur == null ? void 0 : _this.props.onBlur(e);
105
106
  };
106
107
 
107
108
  _this.handleClear = function (e) {
108
- // Only attempt to focus the input if the ref is an object. It won't work for refs that are functions.
109
- if (typeof _this.props.innerRef === "object") {
110
- var _this$props$innerRef$;
111
-
112
- (_this$props$innerRef$ = _this.props.innerRef.current) == null ? void 0 : _this$props$innerRef$.focus();
113
- }
109
+ var _this$inputRef, _this$inputRef$curren;
114
110
 
111
+ (_this$inputRef = _this.inputRef) == null ? void 0 : (_this$inputRef$curren = _this$inputRef.current) == null ? void 0 : _this$inputRef$curren.focus();
115
112
  _this.props.onClear == null ? void 0 : _this.props.onClear(e);
116
113
  };
117
114
 
118
115
  _this.handleChange = function (e) {
119
- return _this.props.onChange == null ? void 0 : _this.props.onChange(e, e.currentTarget.value);
116
+ _this.props.onChange == null ? void 0 : _this.props.onChange(e, e.currentTarget.value);
117
+
118
+ _this.updateState(e.currentTarget.value);
120
119
  };
121
120
 
122
121
  _this.handleFocus = function (e) {
@@ -135,6 +134,22 @@ var Input = /*#__PURE__*/function (_React$Component) {
135
134
  return _this.props.onPaste == null ? void 0 : _this.props.onPaste(e, e.currentTarget.value);
136
135
  };
137
136
 
137
+ _this.updateState = function (value) {
138
+ var hasValue = value !== "";
139
+ var hadValue = _this.state.hasValue; // Only update state if the value has changed to avoid unnecessary renders.
140
+
141
+ if (hasValue !== hadValue) {
142
+ _this.setState({
143
+ hasValue: hasValue
144
+ });
145
+ }
146
+ };
147
+
148
+ _this.state = {
149
+ // tracking hasValue in state allows us to hide ClearButton when there is no value to clear
150
+ // for both controlled and uncontrolled inputs.
151
+ hasValue: !!props.value
152
+ };
138
153
  return _this;
139
154
  }
140
155
 
@@ -174,7 +189,7 @@ var Input = /*#__PURE__*/function (_React$Component) {
174
189
  qa = _this$props$qa === void 0 ? {} : _this$props$qa,
175
190
  appearance = _this$props.appearance,
176
191
  size = _this$props.size,
177
- rest = _objectWithoutPropertiesLoose(_this$props, ["autoComplete", "autoFocus", "disabled", "readOnly", "isInvalid", "hasWarning", "id", "name", "placeholder", "type", "required", "value", "elemBefore", "elemAfter", "maxLength", "ariaLabel", "ariaDescribedby", "clearButtonLabel", "innerRef", "onBlur", "onChange", "onClear", "onFocus", "onKeyDown", "onKeyUp", "onPaste", "inputProps", "qa", "appearance", "size"]); // Convert autoComplete from a boolean prop to a string value.
192
+ rest = _objectWithoutPropertiesLoose(_this$props, _excluded); // Convert autoComplete from a boolean prop to a string value.
178
193
 
179
194
 
180
195
  var autoCompleteValue = undefined;
@@ -203,7 +218,7 @@ var Input = /*#__PURE__*/function (_React$Component) {
203
218
  }, rest), /*#__PURE__*/React.createElement(InputContext.Provider, {
204
219
  value: {
205
220
  handleClear: this.handleClear,
206
- hasValue: !!value,
221
+ hasValue: this.state.hasValue,
207
222
  clearButtonLabel: clearButtonLabel,
208
223
  onClear: onClear,
209
224
  size: size
@@ -231,7 +246,7 @@ var Input = /*#__PURE__*/function (_React$Component) {
231
246
  onKeyDown: this.handleKeyDown,
232
247
  onKeyUp: this.handleKeyUp,
233
248
  onPaste: this.handlePaste,
234
- ref: innerRef,
249
+ ref: (0, _utils.mergeRefs)([innerRef, this.inputRef]),
235
250
  "data-qa-input": name || "",
236
251
  "data-qa-input-isdisabled": disabled === true,
237
252
  "data-qa-input-isrequired": required === true
@@ -249,8 +264,7 @@ Input.defaultProps = {
249
264
  disabled: false,
250
265
  type: "text",
251
266
  size: "default",
252
- appearance: "primary",
253
- innerRef: /*#__PURE__*/React.createRef()
267
+ appearance: "primary"
254
268
  };
255
269
  Input.ClearButton = ClearButton;
256
270
  Input.ClearButton.displayName = "Input.ClearButton";
@@ -15,7 +15,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
15
15
 
16
16
  var Container = _styledComponents.default.div.withConfig({
17
17
  displayName: "styles__Container",
18
- componentId: "uozj0s-0"
18
+ componentId: "sc-uozj0s-0"
19
19
  })(["box-sizing:border-box;position:relative;input{box-sizing:border-box;width:100%;border:1px solid transparent;border-radius:", ";background-color:", ";color:", ";outline:none;transition:border-color ", " ", ",box-shadow ", " ", ";font-family:", ";font-weight:", ";appearance:none;line-height:16px;margin:0;padding:", ";font-size:", ";&::-ms-clear{display:none;}&::-webkit-search-cancel-button{appearance:none;}&:focus{", "}&:not(output):not(:focus):-moz-ui-invalid{box-shadow:none;}&:placeholder{color:", ";}", " ", "}", " ", " ", " ", " ", ""], function (props) {
20
20
  return props.theme.radii[500];
21
21
  }, function (props) {
@@ -80,7 +80,7 @@ var Container = _styledComponents.default.div.withConfig({
80
80
 
81
81
  var Accessory = _styledComponents.default.div.withConfig({
82
82
  displayName: "styles__Accessory",
83
- componentId: "uozj0s-1"
83
+ componentId: "sc-uozj0s-1"
84
84
  })(["position:absolute;top:50%;transform:translateY(-50%);color:", ";display:flex;align-items:center;", ";", ";"], function (props) {
85
85
  return props.theme.colors.icon.base;
86
86
  }, function (props) {
@@ -9,6 +9,8 @@ var _Text = _interopRequireDefault(require("../Text"));
9
9
 
10
10
  var _styles = _interopRequireDefault(require("./styles"));
11
11
 
12
+ var _excluded = ["children"];
13
+
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
 
14
16
  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); }
@@ -33,7 +35,7 @@ var KeyboardKey = /*#__PURE__*/function (_React$Component) {
33
35
  _proto.render = function render() {
34
36
  var _this$props = this.props,
35
37
  children = _this$props.children,
36
- rest = _objectWithoutPropertiesLoose(_this$props, ["children"]);
38
+ rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
37
39
 
38
40
  return /*#__PURE__*/React.createElement(_styles.default, rest, /*#__PURE__*/React.createElement("kbd", {
39
41
  "data-qa-keyboardkey": children
@@ -10,6 +10,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
10
10
 
11
11
  var _Text = _interopRequireDefault(require("../Text"));
12
12
 
13
+ var _excluded = ["as"];
14
+
13
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
16
 
15
17
  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); }
@@ -27,7 +29,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
27
29
  var LabelBase = function LabelBase(_ref) {
28
30
  var _ref$as = _ref.as,
29
31
  as = _ref$as === void 0 ? "label" : _ref$as,
30
- rest = _objectWithoutPropertiesLoose(_ref, ["as"]);
32
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
31
33
 
32
34
  return /*#__PURE__*/React.createElement(_Text.default, _extends({}, rest, {
33
35
  as: as
@@ -36,7 +38,7 @@ var LabelBase = function LabelBase(_ref) {
36
38
 
37
39
  var StyledLabel = (0, _styledComponents.default)(LabelBase).withConfig({
38
40
  displayName: "Label__StyledLabel",
39
- componentId: "rqdi0a-0"
41
+ componentId: "sc-rqdi0a-0"
40
42
  })(["display:flex;align-items:center;"]);
41
43
 
42
44
  var Label = /*#__PURE__*/function (_React$Component) {
@@ -7,6 +7,8 @@ var React = _interopRequireWildcard(require("react"));
7
7
 
8
8
  var _styles = _interopRequireDefault(require("./styles"));
9
9
 
10
+ var _excluded = ["href", "external", "children", "disabled", "onClick", "as", "underline", "qa"];
11
+
10
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
13
 
12
14
  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); }
@@ -27,7 +29,7 @@ var Link = function Link(_ref) {
27
29
  underline = _ref.underline,
28
30
  _ref$qa = _ref.qa,
29
31
  qa = _ref$qa === void 0 ? {} : _ref$qa,
30
- rest = _objectWithoutPropertiesLoose(_ref, ["href", "external", "children", "disabled", "onClick", "as", "underline", "qa"]);
32
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
31
33
 
32
34
  if (!href && external) {
33
35
  console.warn("Warning: external prop cannot be set without a href declaration");
@@ -19,7 +19,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
19
19
 
20
20
  var Container = (0, _styledComponents.default)(_Text.default).withConfig({
21
21
  displayName: "styles__Container",
22
- componentId: "adcw4a-0"
22
+ componentId: "sc-adcw4a-0"
23
23
  })(["border:0;font-family:", ";text-decoration:", ";appearance:none;cursor:pointer;", " font-weight:", ";color:", ";&:hover{color:", ";text-decoration:underline;}&:active{color:", ";}&:focus{", "}&:focus:active{box-shadow:none;}", " ", " ", " ", " ", ""], function (props) {
24
24
  return props.theme.fontFamily;
25
25
  }, function (props) {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = exports.ListboxButton = exports.ListboxButtonContainer = exports.Listbox = void 0;
4
+ exports.default = exports.ListboxButtonContainer = exports.ListboxButton = exports.Listbox = void 0;
5
5
 
6
6
  var React = _interopRequireWildcard(require("react"));
7
7
 
@@ -15,6 +15,9 @@ var _Icon = _interopRequireDefault(require("../Icon"));
15
15
 
16
16
  var _constants = require("../Menu/constants");
17
17
 
18
+ var _excluded = ["role", "children"],
19
+ _excluded2 = ["children"];
20
+
18
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
22
 
20
23
  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); }
@@ -29,7 +32,7 @@ var Listbox = function Listbox(_ref) {
29
32
  var _ref$role = _ref.role,
30
33
  role = _ref$role === void 0 ? _constants.MENU_ROLES.LISTBOX : _ref$role,
31
34
  children = _ref.children,
32
- rest = _objectWithoutPropertiesLoose(_ref, ["role", "children"]);
35
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
33
36
 
34
37
  return /*#__PURE__*/React.createElement(_Menu.default, _extends({}, rest, {
35
38
  role: role
@@ -44,7 +47,7 @@ var Listbox = function Listbox(_ref) {
44
47
  exports.Listbox = Listbox;
45
48
  var ListboxButtonContainer = (0, _styledComponents.default)(_Menu.MenuButton).withConfig({
46
49
  displayName: "Listbox__ListboxButtonContainer",
47
- componentId: "c9mfi8-0"
50
+ componentId: "sc-c9mfi8-0"
48
51
  })(["position:relative;width:100%;border:1px solid ", ";border-radius:", ";background-color:", ";color:", ";cursor:", ";outline:none;appearance:none;transition:border-color ", " ", ",box-shadow ", " ", ";font-family:", ";font-weight:", ";text-align:left;margin:0;&:active{transform:none;}padding:", ";font-size:", ";", ""], function (props) {
49
52
  return props.theme.colors.form.border.base;
50
53
  }, function (props) {
@@ -100,7 +103,7 @@ exports.ListboxButtonContainer = ListboxButtonContainer;
100
103
 
101
104
  var ListboxButton = function ListboxButton(_ref2) {
102
105
  var children = _ref2.children,
103
- restProps = _objectWithoutPropertiesLoose(_ref2, ["children"]);
106
+ restProps = _objectWithoutPropertiesLoose(_ref2, _excluded2);
104
107
 
105
108
  return /*#__PURE__*/React.createElement(ListboxButtonContainer, _extends({}, restProps, {
106
109
  popoutProps: _extends({
@@ -7,6 +7,8 @@ var React = _interopRequireWildcard(require("react"));
7
7
 
8
8
  var _styles = _interopRequireWildcard(require("./styles"));
9
9
 
10
+ var _excluded = ["text", "size", "delay", "color", "qa"];
11
+
10
12
  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); }
11
13
 
12
14
  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; }
@@ -35,7 +37,7 @@ var Loader = /*#__PURE__*/function (_React$Component) {
35
37
  delay = _this$props.delay,
36
38
  color = _this$props.color,
37
39
  qa = _this$props.qa,
38
- rest = _objectWithoutPropertiesLoose(_this$props, ["text", "size", "delay", "color", "qa"]);
40
+ rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
39
41
 
40
42
  return /*#__PURE__*/React.createElement(_styles.default, _extends({
41
43
  small: size === "small",
@@ -32,7 +32,7 @@ var Container = _styledComponents.default.div.attrs({
32
32
  className: "Loader"
33
33
  }).withConfig({
34
34
  displayName: "styles__Container",
35
- componentId: "zj8x0q-0"
35
+ componentId: "sc-zj8x0q-0"
36
36
  })(["position:relative;margin:0 auto;overflow:hidden;&:after{position:absolute;top:50%;left:50%;border-style:solid;border-radius:50%;content:\"\";transition:opacity 250ms;animation:", ";}", " ", " ", ""], function (props) {
37
37
  return props.delay ? (0, _styledComponents.css)(["", " 2.25s infinite linear,", " 2s 1"], spin, delay) : (0, _styledComponents.css)(["", " 2.25s infinite linear"], spin);
38
38
  }, function (props) {
@@ -43,7 +43,7 @@ var Container = _styledComponents.default.div.attrs({
43
43
 
44
44
  var Text = _styledComponents.default.div.withConfig({
45
45
  displayName: "styles__Text",
46
- componentId: "zj8x0q-1"
46
+ componentId: "sc-zj8x0q-1"
47
47
  })(["", ""], _mixins.visuallyHidden);
48
48
 
49
49
  exports.Text = Text;
@@ -17,6 +17,8 @@ var _polished = require("polished");
17
17
 
18
18
  var _seedsColor = require("@sproutsocial/seeds-color");
19
19
 
20
+ var _excluded = ["appearance", "isLoading", "disabled", "loaderLabel", "children"];
21
+
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
23
 
22
24
  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); }
@@ -56,7 +58,7 @@ var LoaderButton = function LoaderButton(_ref) {
56
58
  disabled = _ref.disabled,
57
59
  loaderLabel = _ref.loaderLabel,
58
60
  children = _ref.children,
59
- rest = _objectWithoutPropertiesLoose(_ref, ["appearance", "isLoading", "disabled", "loaderLabel", "children"]);
61
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
60
62
 
61
63
  var isLoading = Boolean(_isLoading);
62
64
  return /*#__PURE__*/React.createElement(_Button.default, _extends({
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.MENU_ITEM_ROLES = exports.MENU_ROLES = void 0;
4
+ exports.MENU_ROLES = exports.MENU_ITEM_ROLES = void 0;
5
5
  var MENU_ROLES = Object.freeze({
6
6
  MENU: "menu",
7
7
  LIST: "list",