@pingux/astro 1.0.0-alpha.9 → 1.1.0-alpha.10

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 (142) hide show
  1. package/CHANGELOG.md +257 -0
  2. package/README.md +5 -0
  3. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
  4. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.test.js +24 -0
  5. package/lib/cjs/components/AccordionGridItem/AccordionGridItemBody.js +1 -1
  6. package/lib/cjs/components/AccordionGridItem/AccordionGridItemHeader.js +1 -1
  7. package/lib/cjs/components/AccordionGroup/AccordionGroup.test.js +33 -1
  8. package/lib/cjs/components/AccordionItem/AccordionItem.js +5 -4
  9. package/lib/cjs/components/Button/Button.js +6 -26
  10. package/lib/cjs/components/Button/Button.stories.js +7 -12
  11. package/lib/cjs/components/Button/Button.test.js +2 -25
  12. package/lib/cjs/components/Chip/Chip.js +26 -10
  13. package/lib/cjs/components/Chip/Chip.stories.js +44 -5
  14. package/lib/cjs/components/Chip/Chip.test.js +9 -0
  15. package/lib/cjs/components/{DropdownField/index.js → Chip/ChipContext.js} +8 -7
  16. package/lib/cjs/components/ColorField/ColorField.js +1 -0
  17. package/lib/cjs/components/ComboBoxField/ComboBoxField.js +7 -0
  18. package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +25 -1
  19. package/lib/cjs/components/ComboBoxField/ComboBoxField.test.js +44 -0
  20. package/lib/cjs/components/FileInputField/FileItem.js +2 -1
  21. package/lib/cjs/components/IconButton/IconButton.js +17 -7
  22. package/lib/cjs/components/IconButton/IconButton.stories.js +8 -17
  23. package/lib/cjs/components/IconButton/IconButton.test.js +4 -6
  24. package/lib/cjs/components/ImageUploadField/ImagePreviewButton.js +2 -1
  25. package/lib/cjs/components/List/List.js +3 -0
  26. package/lib/cjs/components/List/List.stories.js +7 -2
  27. package/lib/cjs/components/ListBox/ListBox.js +3 -6
  28. package/lib/cjs/components/ListBox/ListBox.test.js +2 -0
  29. package/lib/cjs/components/ListBox/Option.js +6 -0
  30. package/lib/cjs/components/ListItem/ListItem.stories.js +0 -2
  31. package/lib/cjs/components/ListView/ListView.js +4 -3
  32. package/lib/cjs/components/ListView/ListView.stories.js +580 -39
  33. package/lib/cjs/components/ListViewItem/ListViewItem.js +3 -6
  34. package/lib/cjs/components/Messages/Message.js +2 -2
  35. package/lib/cjs/components/MultivaluesField/MultivaluesField.js +3 -2
  36. package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +15 -14
  37. package/lib/cjs/components/PopoverContainer/PopoverContainer.test.js +15 -0
  38. package/lib/cjs/components/Stepper/Stepper.js +1 -0
  39. package/lib/cjs/components/Tab/Tab.js +5 -3
  40. package/lib/cjs/components/Tabs/Tabs.js +3 -0
  41. package/lib/cjs/components/Tabs/Tabs.stories.js +3 -4
  42. package/lib/cjs/components/Tabs/Tabs.test.js +44 -15
  43. package/lib/cjs/components/TextArea/TextArea.js +5 -1
  44. package/lib/cjs/components/TextAreaField/TextAreaField.test.js +10 -0
  45. package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +45 -2
  46. package/lib/cjs/index.js +48 -136
  47. package/lib/cjs/layouts/ListLayout.stories.js +2 -1
  48. package/lib/cjs/layouts/SchemaFormLayout.stories.js +2 -21
  49. package/lib/cjs/recipes/ArrayField.stories.js +3 -3
  50. package/lib/cjs/styles/forms/input.js +4 -0
  51. package/lib/cjs/styles/theme.js +0 -3
  52. package/lib/cjs/styles/variants/accordion.js +7 -9
  53. package/lib/cjs/styles/variants/boxes.js +22 -19
  54. package/lib/cjs/styles/variants/buttons.js +48 -29
  55. package/lib/cjs/styles/variants/variants.js +0 -3
  56. package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
  57. package/lib/components/AccordionGridGroup/AccordionGridGroup.test.js +23 -1
  58. package/lib/components/AccordionGridItem/AccordionGridItemBody.js +1 -1
  59. package/lib/components/AccordionGridItem/AccordionGridItemHeader.js +1 -1
  60. package/lib/components/AccordionGroup/AccordionGroup.test.js +30 -1
  61. package/lib/components/AccordionItem/AccordionItem.js +6 -5
  62. package/lib/components/Button/Button.js +8 -26
  63. package/lib/components/Button/Button.stories.js +7 -11
  64. package/lib/components/Button/Button.test.js +2 -21
  65. package/lib/components/Chip/Chip.js +25 -10
  66. package/lib/components/Chip/Chip.stories.js +41 -5
  67. package/lib/components/Chip/Chip.test.js +9 -0
  68. package/lib/components/Chip/ChipContext.js +3 -0
  69. package/lib/components/ColorField/ColorField.js +1 -0
  70. package/lib/components/ComboBoxField/ComboBoxField.js +7 -0
  71. package/lib/components/ComboBoxField/ComboBoxField.stories.js +21 -0
  72. package/lib/components/ComboBoxField/ComboBoxField.test.js +35 -0
  73. package/lib/components/FileInputField/FileItem.js +2 -1
  74. package/lib/components/IconButton/IconButton.js +17 -9
  75. package/lib/components/IconButton/IconButton.stories.js +7 -13
  76. package/lib/components/IconButton/IconButton.test.js +4 -6
  77. package/lib/components/ImageUploadField/ImagePreviewButton.js +2 -1
  78. package/lib/components/List/List.js +2 -0
  79. package/lib/components/List/List.stories.js +6 -2
  80. package/lib/components/ListBox/ListBox.js +3 -5
  81. package/lib/components/ListBox/ListBox.test.js +2 -0
  82. package/lib/components/ListBox/Option.js +6 -0
  83. package/lib/components/ListItem/ListItem.stories.js +0 -2
  84. package/lib/components/ListView/ListView.js +4 -3
  85. package/lib/components/ListView/ListView.stories.js +577 -39
  86. package/lib/components/ListViewItem/ListViewItem.js +3 -5
  87. package/lib/components/Messages/Message.js +2 -2
  88. package/lib/components/MultivaluesField/MultivaluesField.js +3 -2
  89. package/lib/components/OverlayPanel/OverlayPanel.stories.js +7 -5
  90. package/lib/components/PopoverContainer/PopoverContainer.test.js +16 -1
  91. package/lib/components/Stepper/Stepper.js +1 -0
  92. package/lib/components/Tab/Tab.js +5 -3
  93. package/lib/components/Tabs/Tabs.js +3 -0
  94. package/lib/components/Tabs/Tabs.stories.js +3 -4
  95. package/lib/components/Tabs/Tabs.test.js +40 -15
  96. package/lib/components/TextArea/TextArea.js +5 -1
  97. package/lib/components/TextAreaField/TextAreaField.test.js +8 -0
  98. package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +33 -1
  99. package/lib/index.js +0 -8
  100. package/lib/layouts/ListLayout.stories.js +2 -1
  101. package/lib/layouts/SchemaFormLayout.stories.js +2 -19
  102. package/lib/recipes/ArrayField.stories.js +3 -3
  103. package/lib/styles/forms/input.js +4 -0
  104. package/lib/styles/theme.js +0 -3
  105. package/lib/styles/variants/accordion.js +7 -9
  106. package/lib/styles/variants/boxes.js +21 -19
  107. package/lib/styles/variants/buttons.js +47 -29
  108. package/lib/styles/variants/variants.js +0 -2
  109. package/package.json +1 -1
  110. package/lib/cjs/components/Dropdown/Dropdown.js +0 -112
  111. package/lib/cjs/components/Dropdown/Dropdown.test.js +0 -80
  112. package/lib/cjs/components/Dropdown/index.js +0 -18
  113. package/lib/cjs/components/DropdownField/DropdownField.js +0 -187
  114. package/lib/cjs/components/DropdownField/DropdownField.stories.js +0 -278
  115. package/lib/cjs/components/DropdownField/DropdownField.test.js +0 -80
  116. package/lib/cjs/components/Panel/Panel.js +0 -101
  117. package/lib/cjs/components/Panel/Panel.stories.js +0 -57
  118. package/lib/cjs/components/Panel/Panel.test.js +0 -72
  119. package/lib/cjs/components/Panel/index.js +0 -18
  120. package/lib/cjs/components/Popover/Popover.js +0 -87
  121. package/lib/cjs/components/Popover/Popover.stories.js +0 -80
  122. package/lib/cjs/components/Popover/Popover.test.js +0 -91
  123. package/lib/cjs/components/Popover/index.js +0 -18
  124. package/lib/cjs/recipes/InputBoxWithLinkedChip.stories.js +0 -67
  125. package/lib/cjs/styles/variants/popover.js +0 -86
  126. package/lib/components/Dropdown/Dropdown.js +0 -90
  127. package/lib/components/Dropdown/Dropdown.test.js +0 -62
  128. package/lib/components/Dropdown/index.js +0 -1
  129. package/lib/components/DropdownField/DropdownField.js +0 -155
  130. package/lib/components/DropdownField/DropdownField.stories.js +0 -222
  131. package/lib/components/DropdownField/DropdownField.test.js +0 -60
  132. package/lib/components/DropdownField/index.js +0 -1
  133. package/lib/components/Panel/Panel.js +0 -71
  134. package/lib/components/Panel/Panel.stories.js +0 -35
  135. package/lib/components/Panel/Panel.test.js +0 -52
  136. package/lib/components/Panel/index.js +0 -1
  137. package/lib/components/Popover/Popover.js +0 -65
  138. package/lib/components/Popover/Popover.stories.js +0 -52
  139. package/lib/components/Popover/Popover.test.js +0 -75
  140. package/lib/components/Popover/index.js +0 -2
  141. package/lib/recipes/InputBoxWithLinkedChip.stories.js +0 -43
  142. package/lib/styles/variants/popover.js +0 -76
@@ -337,7 +337,7 @@ var MultivaluesField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
337
337
  }, (0, _react2.jsx)(_.Icon, {
338
338
  icon: _CloseIcon["default"],
339
339
  color: "white",
340
- size: 10
340
+ size: 14
341
341
  })));
342
342
  }
343
343
 
@@ -352,7 +352,8 @@ var MultivaluesField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
352
352
  hasAutoFocus: hasAutoFocus,
353
353
  hasVirtualFocus: true,
354
354
  hasNoEmptySelection: true,
355
- state: state
355
+ state: state,
356
+ "aria-label": "List of options"
356
357
  })), (0, _react2.jsx)(_overlays.DismissButton, {
357
358
  onDismiss: close
358
359
  }));
@@ -22,8 +22,6 @@ var _collections = require("@react-stately/collections");
22
22
 
23
23
  var _hooks = require("../../hooks");
24
24
 
25
- var _Button = _interopRequireDefault(require("../Button/Button"));
26
-
27
25
  var _OverlayPanel = _interopRequireDefault(require("./OverlayPanel"));
28
26
 
29
27
  var _index = require("../../index");
@@ -66,15 +64,18 @@ var Default = function Default(_ref) {
66
64
  var state = (0, _hooks.useOverlayPanelState)();
67
65
  return (// Application must be wrapped in an OverlayProvider so that it can be hidden from screen
68
66
  // readers when an overlay opens.
69
- (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_Button["default"], {
67
+ (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_index.Button, {
70
68
  onPress: state.open
71
69
  }, "Open Panel"), (0, _react2.jsx)(_OverlayPanel["default"], (0, _extends2["default"])({
72
70
  isOpen: state.isOpen
73
- }, args), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_Button["default"], {
71
+ }, args), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Button, {
74
72
  onPress: state.close
75
- }, "Close Panel"), (0, _react2.jsx)(_index.Text, {
76
- pt: "md"
77
- }, "Children render here."))))
73
+ }, "Close Panel"), (0, _react2.jsx)(_index.AccordionGroup, args, (0, _react2.jsx)(_collections.Item, {
74
+ key: "accordionKey",
75
+ textValue: "accordionKey",
76
+ label: "Accordion Label",
77
+ "data-id": "accordionItem"
78
+ }, (0, _react2.jsx)(_index.Text, null, "Render me!"))))))
78
79
  );
79
80
  };
80
81
 
@@ -106,7 +107,7 @@ var InnerPanel = function InnerPanel(_ref2) {
106
107
  variant: "overlayPanel.overlayPanelInner" // applies higher z-index
107
108
  ,
108
109
  isOpen: innerState.isOpen
109
- }, args), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_Button["default"], {
110
+ }, args), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Button, {
110
111
  onPress: innerState.close
111
112
  }, "Close Inner Panel"), (0, _react2.jsx)(_index.Text, {
112
113
  pt: "md"
@@ -121,7 +122,7 @@ var InnerPanel = function InnerPanel(_ref2) {
121
122
  sx: {
122
123
  p: '12px'
123
124
  }
124
- }, (0, _react2.jsx)(_Button["default"], {
125
+ }, (0, _react2.jsx)(_index.Button, {
125
126
  onPress: closeOuterPanel
126
127
  }, "Close Panel"), (0, _react2.jsx)(_index.Text, {
127
128
  pt: "md",
@@ -164,14 +165,14 @@ var InnerPanel = function InnerPanel(_ref2) {
164
165
  mr: "auto"
165
166
  }, "Form 5")), (0, _react2.jsx)(_index.Separator, {
166
167
  margin: "0"
167
- })), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_Button["default"], {
168
+ })), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_index.Button, {
168
169
  onPress: toggleMessagesOpen
169
- }, "Toggle Messages"), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_Button["default"], {
170
+ }, "Toggle Messages"), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_index.Button, {
170
171
  onPress: innerState.open
171
172
  }, "Open Inner Panel"), inner)));
172
173
  return (// Application must be wrapped in an OverlayProvider so that it can be hidden from screen
173
174
  // readers when an overlay opens.
174
- (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_Button["default"], {
175
+ (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Button, {
175
176
  onPress: state.open
176
177
  }, "Open Panel"), outer), messagesOpen && (0, _react2.jsx)(_index.Messages, {
177
178
  sx: {
@@ -192,14 +193,14 @@ var CustomWidth = function CustomWidth() {
192
193
  // readers when an overlay opens.
193
194
  //
194
195
  // For a custom width, provide the width via the 'sx' prop
195
- (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_Button["default"], {
196
+ (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_index.Button, {
196
197
  onPress: state.open
197
198
  }, "Open Panel"), (0, _react2.jsx)(_OverlayPanel["default"], {
198
199
  isOpen: state.isOpen,
199
200
  sx: {
200
201
  width: '720px'
201
202
  }
202
- }, (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_Button["default"], {
203
+ }, (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Button, {
203
204
  onPress: state.close
204
205
  }, "Close Panel"), (0, _react2.jsx)(_index.Text, {
205
206
  pt: "md"
@@ -17,6 +17,13 @@ var _react2 = require("@emotion/react");
17
17
  var getComponent = function getComponent() {
18
18
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
19
19
  return (0, _testWrapper.render)((0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_PopoverContainer["default"], props, (0, _react2.jsx)(_index.Box, null, "I am in a popover"))));
20
+ };
21
+
22
+ var getComponentInOverlayPanel = function getComponentInOverlayPanel() {
23
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
24
+ return (0, _testWrapper.render)((0, _react2.jsx)(_index.OverlayPanel, {
25
+ isOpen: true
26
+ }, (0, _react2.jsx)(_PopoverContainer["default"], props, (0, _react2.jsx)(_index.Box, null, "I am in a popover"))));
20
27
  }; // Need to be added to each test file to test accessibility using axe.
21
28
 
22
29
 
@@ -39,4 +46,12 @@ test('should render a popover with no arrow', function () {
39
46
  var arrow = _testWrapper.screen.queryByTestId('popover-arrow');
40
47
 
41
48
  expect(arrow).not.toBeInTheDocument();
49
+ });
50
+ test('popover will not open if wrapped in an overlayPanel', function () {
51
+ getComponentInOverlayPanel({
52
+ popoverProps: {
53
+ 'data-test-id': 'popover-test'
54
+ }
55
+ });
56
+ expect(_testWrapper.screen.queryByTestId('popover-test')).not.toBeInTheDocument();
42
57
  });
@@ -119,6 +119,7 @@ var Stepper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
119
119
  },
120
120
  textValue: textValue,
121
121
  title: step,
122
+ "aria-label": textValue,
122
123
  content: item.rendered,
123
124
  separator: !isFirst && line
124
125
  });
@@ -63,9 +63,10 @@ var CollectionTab = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
63
63
  tabLabelProps = itemProps.tabLabelProps,
64
64
  tabLineProps = itemProps.tabLineProps,
65
65
  content = itemProps.content,
66
- otherItemProps = (0, _objectWithoutProperties2["default"])(itemProps, ["icon", "isDisabled", "separator", "tabLabelProps", "tabLineProps", "content"]);
67
- var isDisabled = tabsDisabled || tabDisabled;
66
+ titleAttr = itemProps.titleAttr,
67
+ otherItemProps = (0, _objectWithoutProperties2["default"])(itemProps, ["icon", "isDisabled", "separator", "tabLabelProps", "tabLineProps", "content", "titleAttr"]);
68
68
  var state = (0, _react.useContext)(_Tabs.TabsContext);
69
+ var isDisabled = tabsDisabled || tabDisabled || state.disabledKeys.has(key);
69
70
  var isSelected = state.selectedKey === key;
70
71
 
71
72
  var _useFocusRing = (0, _focus.useFocusRing)(),
@@ -106,7 +107,8 @@ var CollectionTab = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
106
107
  className: classNames,
107
108
  variant: "tab"
108
109
  }, (0, _utils.mergeProps)(focusProps, hoverProps, tabProps), otherItemProps, {
109
- ref: tabRef
110
+ ref: tabRef,
111
+ title: titleAttr || undefined
110
112
  }), icon, (0, _react2.jsx)(_Text["default"], (0, _extends2["default"])({
111
113
  variant: "tabLabel"
112
114
  }, tabLabelProps), rendered), isSelected && !isDisabled && (0, _react2.jsx)(TabLine, tabLineProps)), slots === null || slots === void 0 ? void 0 : slots.afterTab);
@@ -126,6 +126,9 @@ Tabs.propTypes = {
126
126
  /** The default tab key to be selected. (uncontrolled) */
127
127
  defaultSelectedKey: _propTypes["default"].string,
128
128
 
129
+ /** Array of keys to disable within the tab list. */
130
+ disabledKeys: _propTypes["default"].arrayOf(_propTypes["default"].string),
131
+
129
132
  /** The tab key that is currently selected. (controlled) */
130
133
  selectedKey: _propTypes["default"].string,
131
134
 
@@ -170,13 +170,12 @@ exports.Centered = Centered;
170
170
 
171
171
  var DisabledSingleTab = function DisabledSingleTab() {
172
172
  return (0, _react2.jsx)(_Tabs["default"], {
173
- defaultSelectedKey: "Tab 2",
174
- items: tabs
173
+ items: tabs,
174
+ disabledKeys: ['Tab 2']
175
175
  }, function (item) {
176
176
  return (0, _react2.jsx)(_Tab["default"], {
177
177
  key: item.name,
178
- title: item.name,
179
- isDisabled: item.name === 'Tab 1'
178
+ title: item.name
180
179
  }, item.children);
181
180
  });
182
181
  };
@@ -257,6 +257,35 @@ test('disabled all tabs', function () {
257
257
  expect(tab1).not.toContainElement(_testWrapper.screen.queryByRole('presentation'));
258
258
  testTabPanel(0);
259
259
  });
260
+ test('disabled tab is not accessible on click or focus', function () {
261
+ getComponent({
262
+ disabledKeys: [defaultTabs[1].name]
263
+ });
264
+ testTabPanel(0);
265
+
266
+ var _getTabs5 = getTabs(),
267
+ tabs = _getTabs5.tabs,
268
+ tab0 = _getTabs5.tab0,
269
+ tab1 = _getTabs5.tab1,
270
+ tab2 = _getTabs5.tab2; // Ensure that clicking a disabled tab does nothing
271
+
272
+
273
+ _userEvent["default"].click(tab1);
274
+
275
+ testTabPanel(0); // Ensure that disabled tab is not accessible via focus
276
+
277
+ _userEvent["default"].tab();
278
+
279
+ testSingleTab(tabs, tab0, 'toHaveFocus');
280
+
281
+ _testWrapper.fireEvent.keyDown(tab0, {
282
+ key: 'ArrowRight',
283
+ code: 'ArrowRight'
284
+ });
285
+
286
+ testSingleTab(tabs, tab2, 'toHaveFocus');
287
+ testTabPanel(2);
288
+ });
260
289
  test('controlled tabs', function () {
261
290
  var selectedKey = defaultTabs[1].name;
262
291
  var onSelectionChange = jest.fn();
@@ -267,11 +296,11 @@ test('controlled tabs', function () {
267
296
  }),
268
297
  rerender = _getComponent.rerender;
269
298
 
270
- var _getTabs5 = getTabs(),
271
- tabs = _getTabs5.tabs,
272
- tab0 = _getTabs5.tab0,
273
- tab1 = _getTabs5.tab1,
274
- tab2 = _getTabs5.tab2; // Expect the second tab to be selected
299
+ var _getTabs6 = getTabs(),
300
+ tabs = _getTabs6.tabs,
301
+ tab0 = _getTabs6.tab0,
302
+ tab1 = _getTabs6.tab1,
303
+ tab2 = _getTabs6.tab2; // Expect the second tab to be selected
275
304
 
276
305
 
277
306
  expect(onSelectionChange).not.toHaveBeenCalled();
@@ -309,9 +338,9 @@ test('tab line props', function () {
309
338
  }),
310
339
  rerender = _getComponent2.rerender;
311
340
 
312
- var _getTabs6 = getTabs(),
313
- tabs = _getTabs6.tabs,
314
- tab0 = _getTabs6.tab0;
341
+ var _getTabs7 = getTabs(),
342
+ tabs = _getTabs7.tabs,
343
+ tab0 = _getTabs7.tab0;
315
344
 
316
345
  var tabLine = _testWrapper.screen.getByRole('presentation'); // Expect the tab line to have a red background
317
346
 
@@ -340,9 +369,9 @@ test('tab with icon', function () {
340
369
  tabs: newTabs
341
370
  });
342
371
 
343
- var _getTabs7 = getTabs(),
344
- tabs = _getTabs7.tabs,
345
- tab0 = _getTabs7.tab0;
372
+ var _getTabs8 = getTabs(),
373
+ tabs = _getTabs8.tabs,
374
+ tab0 = _getTabs8.tab0;
346
375
 
347
376
  var icon = _testWrapper.screen.getByTestId('icon'); // Expect the tab to have the given icon element
348
377
 
@@ -350,7 +379,7 @@ test('tab with icon', function () {
350
379
  testSingleTab(tabs, tab0, 'toContainElement', [icon]);
351
380
  });
352
381
  test('tooltip renders on tab\'s hover in `tooltip` mode', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
353
- var _getTabs8, tab0;
382
+ var _getTabs9, tab0;
354
383
 
355
384
  return _regenerator["default"].wrap(function _callee$(_context) {
356
385
  while (1) {
@@ -360,7 +389,7 @@ test('tooltip renders on tab\'s hover in `tooltip` mode', /*#__PURE__*/(0, _asyn
360
389
  mode: 'tooltip'
361
390
  });
362
391
  expect(_testWrapper.screen.queryByRole('tooltip')).not.toBeInTheDocument();
363
- _getTabs8 = getTabs(), tab0 = _getTabs8.tab0;
392
+ _getTabs9 = getTabs(), tab0 = _getTabs9.tab0;
364
393
 
365
394
  _testWrapper.fireEvent.mouseMove(tab0);
366
395
 
@@ -386,8 +415,8 @@ test('tabs without selected keys show null tab panel content', function () {
386
415
  test('hover tab style', function () {
387
416
  getComponent();
388
417
 
389
- var _getTabs9 = getTabs(),
390
- tab0 = _getTabs9.tab0;
418
+ var _getTabs10 = getTabs(),
419
+ tab0 = _getTabs10.tab0;
391
420
 
392
421
  expect(tab0).not.toHaveClass('is-hovered');
393
422
 
@@ -29,7 +29,11 @@ var _react2 = require("@emotion/react");
29
29
  */
30
30
  var TextArea = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
31
31
  return (0, _react2.jsx)(_themeUi.Textarea, (0, _extends2["default"])({
32
- ref: ref
32
+ ref: ref // this requires to fix safari resizing issue (UIP-4995)
33
+ ,
34
+ sx: {
35
+ position: 'relative'
36
+ }
33
37
  }, props));
34
38
  });
35
39
  TextArea.displayName = 'TextArea';
@@ -128,6 +128,16 @@ test('form wrapper will have default max label column width when no custom width
128
128
 
129
129
  expect(textAreaContainer).toHaveStyle('grid-template-columns: 40% auto');
130
130
  });
131
+ test('passing read only prop applys the is-read-only class to the textarea', function () {
132
+ var isReadOnly = true;
133
+ getComponent({
134
+ isReadOnly: isReadOnly
135
+ });
136
+
137
+ var textArea = _testWrapper.screen.getByLabelText(defaultProps.label);
138
+
139
+ expect(textArea).toHaveClass('is-read-only');
140
+ });
131
141
  test('form wrapper will have a max label column width when custom width set', function () {
132
142
  var labelMode = 'left';
133
143
  var containerProps = {
@@ -8,16 +8,20 @@ _Object$defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
10
 
11
- exports.Disabled = exports.isOpen = exports.withDelayProp = exports.withDirectionProp = exports.withAlignProp = exports.Default = exports["default"] = void 0;
11
+ exports.TextWithTooltip = exports.ChipWithTooltip = exports.IconWithTooltip = exports.Disabled = exports.isOpen = exports.withDelayProp = exports.withDirectionProp = exports.withAlignProp = exports.Default = exports["default"] = void 0;
12
12
 
13
13
  var _react = _interopRequireDefault(require("react"));
14
14
 
15
15
  var _EarthIcon = _interopRequireDefault(require("mdi-react/EarthIcon"));
16
16
 
17
+ var _PersonIcon = _interopRequireDefault(require("mdi-react/PersonIcon"));
18
+
17
19
  var _index = require("../../index");
18
20
 
19
21
  var _IconButton = _interopRequireDefault(require("../IconButton"));
20
22
 
23
+ var _Text = _interopRequireDefault(require("../Text"));
24
+
21
25
  var _react2 = require("@emotion/react");
22
26
 
23
27
  var _default = {
@@ -80,4 +84,43 @@ Disabled.parameters = {
80
84
  story: 'The tooltip can be disabled without disabling the button press events.'
81
85
  }
82
86
  }
83
- };
87
+ };
88
+
89
+ var IconWithTooltip = function IconWithTooltip() {
90
+ return (0, _react2.jsx)(_index.Box, {
91
+ pl: 50
92
+ }, (0, _react2.jsx)(_index.TooltipTrigger, null, (0, _react2.jsx)(_IconButton["default"], {
93
+ variant: "tooltipIconButton"
94
+ }, (0, _react2.jsx)(_index.Icon, {
95
+ icon: _PersonIcon["default"]
96
+ })), (0, _react2.jsx)(_index.Tooltip, null, "Useful tooltip")));
97
+ };
98
+
99
+ exports.IconWithTooltip = IconWithTooltip;
100
+
101
+ var ChipWithTooltip = function ChipWithTooltip() {
102
+ return (0, _react2.jsx)(_index.Box, {
103
+ pl: 50
104
+ }, (0, _react2.jsx)(_index.TooltipTrigger, null, (0, _react2.jsx)(_index.Button, {
105
+ variant: "tooltipChip",
106
+ bg: "neutral.10"
107
+ }, (0, _react2.jsx)(_Text["default"], {
108
+ variant: "label",
109
+ sx: {
110
+ textTransform: 'uppercase'
111
+ },
112
+ color: "white"
113
+ }, "Some text")), (0, _react2.jsx)(_index.Tooltip, null, "Useful tooltip")));
114
+ };
115
+
116
+ exports.ChipWithTooltip = ChipWithTooltip;
117
+
118
+ var TextWithTooltip = function TextWithTooltip() {
119
+ return (0, _react2.jsx)(_index.Box, {
120
+ pl: 50
121
+ }, (0, _react2.jsx)(_index.TooltipTrigger, null, (0, _react2.jsx)(_index.Button, {
122
+ variant: "tooltipInline"
123
+ }, "Some text"), (0, _react2.jsx)(_index.Tooltip, null, "Useful tooltip")));
124
+ };
125
+
126
+ exports.TextWithTooltip = TextWithTooltip;