@spaced-out/ui-design-system 0.5.11 → 0.5.12

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 (191) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/lib/components/Accordion/Accordion.d.ts +1 -0
  3. package/lib/components/Accordion/Accordion.d.ts.map +1 -1
  4. package/lib/components/Accordion/Accordion.js +29 -4
  5. package/lib/components/Accordion/AccordionGroup.d.ts +2 -1
  6. package/lib/components/Accordion/AccordionGroup.d.ts.map +1 -1
  7. package/lib/components/Accordion/AccordionGroup.js +13 -2
  8. package/lib/components/Avatar/Avatar.d.ts +3 -1
  9. package/lib/components/Avatar/Avatar.d.ts.map +1 -1
  10. package/lib/components/Avatar/Avatar.js +58 -11
  11. package/lib/components/AvatarGroup/AvatarGroup.d.ts +1 -0
  12. package/lib/components/AvatarGroup/AvatarGroup.d.ts.map +1 -1
  13. package/lib/components/AvatarGroup/AvatarGroup.js +27 -3
  14. package/lib/components/Badge/Badge.d.ts +1 -0
  15. package/lib/components/Badge/Badge.d.ts.map +1 -1
  16. package/lib/components/Badge/Badge.js +22 -5
  17. package/lib/components/BadgedIcon/BadgedIcon.d.ts +2 -1
  18. package/lib/components/BadgedIcon/BadgedIcon.d.ts.map +1 -1
  19. package/lib/components/BadgedIcon/BadgedIcon.js +20 -4
  20. package/lib/components/Banner/Banner.d.ts +1 -0
  21. package/lib/components/Banner/Banner.d.ts.map +1 -1
  22. package/lib/components/Banner/Banner.js +2 -0
  23. package/lib/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.d.ts +1 -0
  24. package/lib/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.d.ts.map +1 -1
  25. package/lib/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.js +6 -1
  26. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +1 -0
  27. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  28. package/lib/components/Breadcrumbs/Breadcrumbs.js +31 -11
  29. package/lib/components/Button/Button.d.ts +1 -0
  30. package/lib/components/Button/Button.d.ts.map +1 -1
  31. package/lib/components/Button/Button.js +50 -6
  32. package/lib/components/ButtonDropdown/ButtonDropdown.d.ts +1 -0
  33. package/lib/components/ButtonDropdown/ButtonDropdown.d.ts.map +1 -1
  34. package/lib/components/ButtonDropdown/ButtonDropdown.js +22 -1
  35. package/lib/components/ButtonDropdown/SimpleButtonDropdown.d.ts +1 -0
  36. package/lib/components/ButtonDropdown/SimpleButtonDropdown.d.ts.map +1 -1
  37. package/lib/components/ButtonDropdown/SimpleButtonDropdown.js +2 -0
  38. package/lib/components/ChatBubble/ChatBubble.d.ts +13 -6
  39. package/lib/components/ChatBubble/ChatBubble.d.ts.map +1 -1
  40. package/lib/components/ChatBubble/ChatBubble.js +57 -14
  41. package/lib/components/Checkbox/Checkbox.d.ts +1 -0
  42. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  43. package/lib/components/Checkbox/Checkbox.js +34 -5
  44. package/lib/components/Checkbox/CheckboxGroup.d.ts +1 -0
  45. package/lib/components/Checkbox/CheckboxGroup.d.ts.map +1 -1
  46. package/lib/components/Checkbox/CheckboxGroup.js +21 -2
  47. package/lib/components/Chip/Chip.d.ts +1 -0
  48. package/lib/components/Chip/Chip.d.ts.map +1 -1
  49. package/lib/components/Chip/Chip.js +24 -3
  50. package/lib/components/CollapsibleCard/CollapsibleCard.d.ts +5 -2
  51. package/lib/components/CollapsibleCard/CollapsibleCard.d.ts.map +1 -1
  52. package/lib/components/CollapsibleCard/CollapsibleCard.js +46 -7
  53. package/lib/components/Dialog/Dialog.d.ts +10 -5
  54. package/lib/components/Dialog/Dialog.d.ts.map +1 -1
  55. package/lib/components/Dialog/Dialog.js +76 -11
  56. package/lib/components/Dropdown/Dropdown.d.ts +1 -0
  57. package/lib/components/Dropdown/Dropdown.d.ts.map +1 -1
  58. package/lib/components/Dropdown/Dropdown.js +19 -2
  59. package/lib/components/Dropdown/SimpleDropdown.d.ts +1 -0
  60. package/lib/components/Dropdown/SimpleDropdown.d.ts.map +1 -1
  61. package/lib/components/Dropdown/SimpleDropdown.js +2 -0
  62. package/lib/components/FileUpload/FileBlock/FileBlock.d.ts +1 -0
  63. package/lib/components/FileUpload/FileBlock/FileBlock.d.ts.map +1 -1
  64. package/lib/components/FileUpload/FileBlock/FileBlock.js +58 -10
  65. package/lib/components/FileUpload/FileUpload.d.ts +1 -0
  66. package/lib/components/FileUpload/FileUpload.d.ts.map +1 -1
  67. package/lib/components/FileUpload/FileUpload.js +30 -4
  68. package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.d.ts +2 -0
  69. package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.d.ts.map +1 -1
  70. package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.js +11 -1
  71. package/lib/components/FormTitleWrapper/FormTitleWrapper.d.ts +1 -0
  72. package/lib/components/FormTitleWrapper/FormTitleWrapper.d.ts.map +1 -1
  73. package/lib/components/FormTitleWrapper/FormTitleWrapper.js +24 -3
  74. package/lib/components/Icon/ClickableIcon.d.ts +2 -0
  75. package/lib/components/Icon/ClickableIcon.d.ts.map +1 -1
  76. package/lib/components/Icon/ClickableIcon.js +13 -1
  77. package/lib/components/Icon/Icon.docs.d.ts +11 -0
  78. package/lib/components/Icon/Icon.docs.d.ts.map +1 -1
  79. package/lib/components/Icon/Icon.docs.js +11 -0
  80. package/lib/components/Icon/SemanticIcon.d.ts +2 -1
  81. package/lib/components/Icon/SemanticIcon.d.ts.map +1 -1
  82. package/lib/components/Icon/SemanticIcon.js +11 -1
  83. package/lib/components/InContextAlert/InContextAlert.d.ts +3 -1
  84. package/lib/components/InContextAlert/InContextAlert.d.ts.map +1 -1
  85. package/lib/components/InContextAlert/InContextAlert.js +58 -10
  86. package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.d.ts +1 -0
  87. package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.d.ts.map +1 -1
  88. package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.js +30 -3
  89. package/lib/components/KPIBox/KPIBox.d.ts +1 -0
  90. package/lib/components/KPIBox/KPIBox.d.ts.map +1 -1
  91. package/lib/components/KPIBox/KPIBox.js +27 -2
  92. package/lib/components/Link/Link.d.ts +1 -0
  93. package/lib/components/Link/Link.d.ts.map +1 -1
  94. package/lib/components/Link/Link.js +24 -2
  95. package/lib/components/Menu/Menu.d.ts +2 -0
  96. package/lib/components/Menu/Menu.d.ts.map +1 -1
  97. package/lib/components/Menu/Menu.js +64 -7
  98. package/lib/components/Menu/MenuOptionButton.d.ts +1 -0
  99. package/lib/components/Menu/MenuOptionButton.d.ts.map +1 -1
  100. package/lib/components/Menu/MenuOptionButton.js +84 -8
  101. package/lib/components/Modal/Modal.d.ts +9 -5
  102. package/lib/components/Modal/Modal.d.ts.map +1 -1
  103. package/lib/components/Modal/Modal.js +48 -5
  104. package/lib/components/Notification/Notification.d.ts +1 -0
  105. package/lib/components/Notification/Notification.d.ts.map +1 -1
  106. package/lib/components/Notification/Notification.js +24 -4
  107. package/lib/components/PageTitle/PageTitle.d.ts +7 -3
  108. package/lib/components/PageTitle/PageTitle.d.ts.map +1 -1
  109. package/lib/components/PageTitle/PageTitle.js +41 -4
  110. package/lib/components/Panel/Panel.d.ts +7 -3
  111. package/lib/components/Panel/Panel.d.ts.map +1 -1
  112. package/lib/components/Panel/Panel.js +34 -4
  113. package/lib/components/ProgressDonut/ProgressDonut.d.ts +1 -0
  114. package/lib/components/ProgressDonut/ProgressDonut.d.ts.map +1 -1
  115. package/lib/components/ProgressDonut/ProgressDonut.js +11 -2
  116. package/lib/components/PromptChip/PromptChip.d.ts +1 -0
  117. package/lib/components/PromptChip/PromptChip.d.ts.map +1 -1
  118. package/lib/components/PromptChip/PromptChip.js +42 -5
  119. package/lib/components/PromptInput/PromptInput.d.ts +1 -0
  120. package/lib/components/PromptInput/PromptInput.d.ts.map +1 -1
  121. package/lib/components/PromptInput/PromptInput.js +24 -3
  122. package/lib/components/RadioButton/RadioButton.d.ts +1 -0
  123. package/lib/components/RadioButton/RadioButton.d.ts.map +1 -1
  124. package/lib/components/RadioButton/RadioButton.js +14 -0
  125. package/lib/components/RadioButton/RadioGroup.d.ts +1 -0
  126. package/lib/components/RadioButton/RadioGroup.d.ts.map +1 -1
  127. package/lib/components/RadioButton/RadioGroup.js +17 -2
  128. package/lib/components/RadioTile/RadioTile.d.ts +1 -0
  129. package/lib/components/RadioTile/RadioTile.d.ts.map +1 -1
  130. package/lib/components/RadioTile/RadioTile.js +31 -6
  131. package/lib/components/RangeSlider/RangeSlider.d.ts +1 -0
  132. package/lib/components/RangeSlider/RangeSlider.d.ts.map +1 -1
  133. package/lib/components/RangeSlider/RangeSlider.js +33 -4
  134. package/lib/components/Rating/Rating.d.ts +1 -0
  135. package/lib/components/Rating/Rating.d.ts.map +1 -1
  136. package/lib/components/Rating/Rating.js +22 -3
  137. package/lib/components/ScoreBar/ScoreBar.d.ts +1 -0
  138. package/lib/components/ScoreBar/ScoreBar.d.ts.map +1 -1
  139. package/lib/components/ScoreBar/ScoreBar.js +16 -2
  140. package/lib/components/SearchInput/SearchInput.d.ts +1 -0
  141. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  142. package/lib/components/SearchInput/SearchInput.js +20 -2
  143. package/lib/components/SideMenuLink/SideMenuLink.d.ts +1 -0
  144. package/lib/components/SideMenuLink/SideMenuLink.d.ts.map +1 -1
  145. package/lib/components/SideMenuLink/SideMenuLink.js +33 -3
  146. package/lib/components/Stepper/Step/Step.d.ts +1 -0
  147. package/lib/components/Stepper/Step/Step.d.ts.map +1 -1
  148. package/lib/components/Stepper/Step/Step.js +30 -4
  149. package/lib/components/Stepper/Step/StepContent.d.ts +2 -1
  150. package/lib/components/Stepper/Step/StepContent.d.ts.map +1 -1
  151. package/lib/components/Stepper/Step/StepContent.js +7 -1
  152. package/lib/components/Stepper/Step/StepLabel.d.ts +2 -1
  153. package/lib/components/Stepper/Step/StepLabel.d.ts.map +1 -1
  154. package/lib/components/Stepper/Step/StepLabel.js +7 -1
  155. package/lib/components/Stepper/Stepper.d.ts +1 -0
  156. package/lib/components/Stepper/Stepper.d.ts.map +1 -1
  157. package/lib/components/Stepper/Stepper.js +13 -2
  158. package/lib/components/SubMenu/SubMenu.d.ts +1 -0
  159. package/lib/components/SubMenu/SubMenu.d.ts.map +1 -1
  160. package/lib/components/SubMenu/SubMenu.js +21 -3
  161. package/lib/components/TextTile/TextTile.d.ts +1 -0
  162. package/lib/components/TextTile/TextTile.d.ts.map +1 -1
  163. package/lib/components/TextTile/TextTile.js +24 -3
  164. package/lib/components/Textarea/Textarea.d.ts +1 -0
  165. package/lib/components/Textarea/Textarea.d.ts.map +1 -1
  166. package/lib/components/Textarea/Textarea.js +38 -0
  167. package/lib/components/Timeline/Timeline.d.ts +1 -0
  168. package/lib/components/Timeline/Timeline.d.ts.map +1 -1
  169. package/lib/components/Timeline/Timeline.js +15 -4
  170. package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts +2 -0
  171. package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts.map +1 -1
  172. package/lib/components/Timeline/TimelineItem/TimelineItem.js +46 -4
  173. package/lib/components/Toast/Toast.d.ts +6 -2
  174. package/lib/components/Toast/Toast.d.ts.map +1 -1
  175. package/lib/components/Toast/Toast.js +81 -14
  176. package/lib/components/Tooltip/Tooltip.d.ts +2 -1
  177. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  178. package/lib/components/Tooltip/Tooltip.js +23 -1
  179. package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.d.ts +2 -1
  180. package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.d.ts.map +1 -1
  181. package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.js +15 -1
  182. package/lib/components/Typeahead/SimpleTypeahead.d.ts +1 -0
  183. package/lib/components/Typeahead/SimpleTypeahead.d.ts.map +1 -1
  184. package/lib/components/Typeahead/SimpleTypeahead.js +3 -1
  185. package/lib/components/Typeahead/Typeahead.d.ts +1 -0
  186. package/lib/components/Typeahead/Typeahead.d.ts.map +1 -1
  187. package/lib/components/Typeahead/Typeahead.js +19 -2
  188. package/lib/components/WeekdayPicker/WeekdayPicker.d.ts +1 -0
  189. package/lib/components/WeekdayPicker/WeekdayPicker.d.ts.map +1 -1
  190. package/lib/components/WeekdayPicker/WeekdayPicker.js +16 -4
  191. package/package.json +1 -1
@@ -7,6 +7,7 @@ exports.SkipElementFromNavigation = exports.FocusManagerWithArrowKeyNavigation =
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _react2 = require("@floating-ui/react");
9
9
  var _classify = _interopRequireDefault(require("../../utils/classify"));
10
+ var _qa = require("../../utils/qa");
10
11
  var _FocusManagerWithArrowKeyNavigationModule = _interopRequireDefault(require("./FocusManagerWithArrowKeyNavigation.module.css"));
11
12
  var _jsxRuntime = require("react/jsx-runtime");
12
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -16,10 +17,15 @@ const SkipElementFromNavigation = exports.SkipElementFromNavigation = /*#__PURE_
16
17
  let {
17
18
  children,
18
19
  className,
20
+ testId,
19
21
  ...restProps
20
22
  } = _ref;
21
23
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
22
24
  ...restProps,
25
+ "data-testid": (0, _qa.generateTestId)({
26
+ base: testId,
27
+ slot: 'skipElement'
28
+ }),
23
29
  className: className,
24
30
  tabIndex: -1,
25
31
  ref: ref,
@@ -43,6 +49,7 @@ const FocusManagerWithArrowKeyNavigation = props => {
43
49
  focusItemOnOpen = 'auto',
44
50
  loop = false,
45
51
  listReference,
52
+ testId,
46
53
  ...restFloatingFocusManagerProps
47
54
  } = props;
48
55
  const {
@@ -137,7 +144,10 @@ const FocusManagerWithArrowKeyNavigation = props => {
137
144
  ...restFloatingFocusManagerProps,
138
145
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
139
146
  ref: refs.setFloating,
140
- "data-testid": "FocusManagerWithArrowKeyNavigation",
147
+ "data-testid": (0, _qa.generateTestId)({
148
+ base: testId,
149
+ slot: 'focusManager'
150
+ }),
141
151
  ...getFloatingProps(),
142
152
  className: (0, _classify.default)(_FocusManagerWithArrowKeyNavigationModule.default.wrapper, classNames?.wrapper),
143
153
  children: clonedChildren
@@ -15,6 +15,7 @@ export interface FormTitleWrapperProps {
15
15
  iconColor?: ColorTypes;
16
16
  title: React.ReactNode;
17
17
  rightSlot?: React.ReactNode;
18
+ testId?: string;
18
19
  }
19
20
  export declare const FormTitleWrapper: Flow.AbstractComponent<FormTitleWrapperProps, HTMLDivElement>;
20
21
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"FormTitleWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/FormTitleWrapper/FormTitleWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAGrD,OAAO,KAAK,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAM5D,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,CACnD,qBAAqB,EACrB,cAAc,CAqCf,CAAC"}
1
+ {"version":3,"file":"FormTitleWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/FormTitleWrapper/FormTitleWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAIrD,OAAO,KAAK,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAM5D,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,CACnD,qBAAqB,EACrB,cAAc,CAoDf,CAAC"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.FormTitleWrapper = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _classify = _interopRequireDefault(require("../../utils/classify"));
9
+ var _qa = require("../../utils/qa");
9
10
  var _Icon = require("../Icon");
10
11
  var _FormTitleWrapperModule = _interopRequireDefault(require("./FormTitleWrapper.module.css"));
11
12
  var _jsxRuntime = require("react/jsx-runtime");
@@ -19,25 +20,45 @@ const FormTitleWrapper = exports.FormTitleWrapper = /*#__PURE__*/React.forwardRe
19
20
  iconSize = 'small',
20
21
  iconColor,
21
22
  title,
22
- rightSlot
23
+ rightSlot,
24
+ testId
23
25
  } = _ref;
24
26
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
25
27
  ref: ref,
26
- "data-testid": "FormTitleWrapper",
28
+ "data-testid": (0, _qa.generateTestId)({
29
+ base: testId,
30
+ slot: 'root'
31
+ }),
27
32
  className: _FormTitleWrapperModule.default.container,
28
33
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
29
34
  className: (0, _classify.default)(_FormTitleWrapperModule.default.leftSection, classNames?.wrapper),
35
+ "data-testid": (0, _qa.generateTestId)({
36
+ base: testId,
37
+ slot: 'left'
38
+ }),
30
39
  children: [!!iconName && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
31
40
  type: iconType,
32
41
  name: iconName,
33
42
  size: iconSize,
34
- color: iconColor
43
+ color: iconColor,
44
+ testId: (0, _qa.generateTestId)({
45
+ base: testId,
46
+ slot: 'icon'
47
+ })
35
48
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
36
49
  className: (0, _classify.default)(_FormTitleWrapperModule.default.componentHousing, classNames?.title),
50
+ "data-testid": (0, _qa.generateTestId)({
51
+ base: testId,
52
+ slot: 'title'
53
+ }),
37
54
  children: title
38
55
  })]
39
56
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
40
57
  className: (0, _classify.default)(_FormTitleWrapperModule.default.rightSection, classNames?.rightSlot),
58
+ "data-testid": (0, _qa.generateTestId)({
59
+ base: testId,
60
+ slot: 'right'
61
+ }),
41
62
  children: rightSlot
42
63
  })]
43
64
  });
@@ -10,6 +10,7 @@ export interface ClickableIconProps extends Omit<IconProps, 'disabled' | 'classN
10
10
  disabled?: boolean;
11
11
  classNames?: ClassNames;
12
12
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
13
+ testId?: string;
13
14
  }
14
15
  export declare const ClickableIcon: Flow.AbstractComponent<ClickableIconProps, HTMLButtonElement>;
15
16
  export interface CloseIconProps {
@@ -21,6 +22,7 @@ export interface CloseIconProps {
21
22
  ariaLabel?: string;
22
23
  disabled?: boolean;
23
24
  classNames?: ClassNames;
25
+ testId?: string;
24
26
  }
25
27
  export declare const CloseIcon: Flow.AbstractComponent<CloseIconProps, HTMLButtonElement>;
26
28
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ClickableIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/ClickableIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAIrD,OAAO,KAAK,EAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAOvE,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACtD;AAED,eAAO,MAAM,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAChD,kBAAkB,EAClB,iBAAiB,CA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AI,CAAC,iBAAiB,CAChD,kBAAkB,EAClB,iBAAiB,CAsDlB,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,SAAS,EAAE,IAAI,CAAC,iBAAiB,CAC5C,cAAc,EACd,iBAAiB,CAsBlB,CAAC"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.CloseIcon = exports.ClickableIcon = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _classify = _interopRequireDefault(require("../../utils/classify"));
9
+ var _qa = require("../../utils/qa");
9
10
  var _Button = require("../Button");
10
11
  var _ = require("./");
11
12
  var _Text = require("../Text");
@@ -18,6 +19,7 @@ const ClickableIcon = exports.ClickableIcon = /*#__PURE__*/React.forwardRef((_re
18
19
  size = 'medium',
19
20
  ariaLabel,
20
21
  onClick,
22
+ testId,
21
23
  // Deprecated for Clickable Icon
22
24
  className,
23
25
  classNames,
@@ -43,11 +45,19 @@ const ClickableIcon = exports.ClickableIcon = /*#__PURE__*/React.forwardRef((_re
43
45
  [_ClickableIconModule.default.large]: size === 'large'
44
46
  }, classNames?.button),
45
47
  ref: ref,
48
+ testId: (0, _qa.generateTestId)({
49
+ base: testId,
50
+ slot: 'button'
51
+ }),
46
52
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Icon, {
47
53
  ...props,
48
54
  size: size,
49
55
  color: disabled ? _Text.TEXT_COLORS.disabled : props.color,
50
- className: classNames?.icon || className
56
+ className: classNames?.icon || className,
57
+ testId: (0, _qa.generateTestId)({
58
+ base: testId,
59
+ slot: 'icon'
60
+ })
51
61
  })
52
62
  });
53
63
  });
@@ -56,6 +66,7 @@ const CloseIcon = exports.CloseIcon = /*#__PURE__*/React.forwardRef((_ref2, ref)
56
66
  size = 'medium',
57
67
  type = 'regular',
58
68
  color = _Text.TEXT_COLORS.primary,
69
+ testId,
59
70
  ...props
60
71
  } = _ref2;
61
72
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(ClickableIcon, {
@@ -63,6 +74,7 @@ const CloseIcon = exports.CloseIcon = /*#__PURE__*/React.forwardRef((_ref2, ref)
63
74
  size: size,
64
75
  type: type,
65
76
  color: color,
77
+ testId: testId,
66
78
  ...props,
67
79
  ref: ref
68
80
  });
@@ -118,6 +118,17 @@ export declare const ICON_DOCS: {
118
118
  };
119
119
  };
120
120
  };
121
+ readonly testId: {
122
+ readonly description: "Test ID for the component";
123
+ readonly control: {
124
+ readonly type: "text";
125
+ };
126
+ readonly table: {
127
+ readonly type: {
128
+ readonly summary: "string";
129
+ };
130
+ };
131
+ };
121
132
  };
122
133
  readonly parameters: {
123
134
  readonly docs: {
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.docs.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.docs.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6GZ,CAAC"}
1
+ {"version":3,"file":"Icon.docs.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.docs.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsHZ,CAAC"}
@@ -127,6 +127,17 @@ const ICON_DOCS = exports.ICON_DOCS = {
127
127
  summary: 'string'
128
128
  }
129
129
  }
130
+ },
131
+ testId: {
132
+ description: 'Test ID for the component',
133
+ control: {
134
+ type: 'text'
135
+ },
136
+ table: {
137
+ type: {
138
+ summary: 'string'
139
+ }
140
+ }
130
141
  }
131
142
  },
132
143
  parameters: {
@@ -9,7 +9,8 @@ export interface SemanticIconProps extends Omit<IconProps, 'classNames' | 'seman
9
9
  classNames?: ClassNames;
10
10
  semantic?: AlertSemanticType;
11
11
  disabled?: boolean;
12
+ testId?: string;
12
13
  }
13
- export declare const SemanticIcon: ({ semantic, classNames, size, ...iconProps }: SemanticIconProps) => React.JSX.Element;
14
+ export declare const SemanticIcon: ({ semantic, classNames, size, testId, ...iconProps }: SemanticIconProps) => React.JSX.Element;
14
15
  export {};
15
16
  //# sourceMappingURL=SemanticIcon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SemanticIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/SemanticIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAIxD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAC;AAMxD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC;IAC/D,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,GAAI,8CAK1B,iBAAiB,sBAuBnB,CAAC"}
1
+ {"version":3,"file":"SemanticIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/SemanticIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAKxD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAC;AAMxD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC;IAC/D,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,GAAI,sDAM1B,iBAAiB,sBAyBnB,CAAC"}
@@ -7,6 +7,7 @@ exports.SemanticIcon = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _typography = require("../../types/typography");
9
9
  var _classify = _interopRequireDefault(require("../../utils/classify"));
10
+ var _qa = require("../../utils/qa");
10
11
  var _Icon = require("./Icon");
11
12
  var _SemanticIconModule = _interopRequireDefault(require("./SemanticIcon.module.css"));
12
13
  var _jsxRuntime = require("react/jsx-runtime");
@@ -17,10 +18,15 @@ const SemanticIcon = _ref => {
17
18
  semantic = 'neutral',
18
19
  classNames,
19
20
  size = 'medium',
21
+ testId,
20
22
  ...iconProps
21
23
  } = _ref;
22
24
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
23
25
  children: !!iconProps.name && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
26
+ "data-testid": (0, _qa.generateTestId)({
27
+ base: testId,
28
+ slot: 'wrapper'
29
+ }),
24
30
  className: (0, _classify.default)(_SemanticIconModule.default.iconContainer, _SemanticIconModule.default[semantic], _SemanticIconModule.default[size], classNames?.wrapper, {
25
31
  [_SemanticIconModule.default.disabled]: iconProps.disabled
26
32
  }),
@@ -28,7 +34,11 @@ const SemanticIcon = _ref => {
28
34
  ...iconProps,
29
35
  className: (0, _classify.default)(iconProps.className, classNames?.icon),
30
36
  color: iconProps.disabled ? 'disabled' : _typography.TEXT_COLORS[semantic],
31
- size: size === 'large' ? 'medium' : size
37
+ size: size === 'large' ? 'medium' : size,
38
+ testId: (0, _qa.generateTestId)({
39
+ base: testId,
40
+ slot: 'icon'
41
+ })
32
42
  })
33
43
  })
34
44
  });
@@ -12,6 +12,7 @@ type ClassNames = Readonly<{
12
12
  }>;
13
13
  type InContextAlertBaseProps = {
14
14
  classNames?: ClassNames;
15
+ testId?: string;
15
16
  } & ({
16
17
  dismissable?: true;
17
18
  onCloseClick?: (e: React.SyntheticEvent<HTMLElement>) => unknown;
@@ -31,11 +32,12 @@ export interface InContextAlertProps extends Omit<InContextAlertBaseProps, 'sema
31
32
  leftIconName?: string;
32
33
  leftIconType?: IconType;
33
34
  }
34
- export declare const AlertIcon: ({ semantic, leftIconName, leftIconType, iconClassName, }: {
35
+ export declare const AlertIcon: ({ semantic, leftIconName, leftIconType, iconClassName, testId, }: {
35
36
  semantic: AlertSemanticType;
36
37
  leftIconName: string;
37
38
  leftIconType?: IconType;
38
39
  iconClassName?: string;
40
+ testId?: string;
39
41
  }) => React.JSX.Element;
40
42
  export declare const InContextAlert: Flow.AbstractComponent<InContextAlertProps, HTMLDivElement>;
41
43
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"InContextAlert.d.ts","sourceRoot":"","sources":["../../../src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AC,KAAK,OAAO,CAAC;IACjE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GACD;IACE,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CACJ,GAAG;IACA,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACtD,eAAe,CAAC,EAAE,UAAU,CAAC;CAC9B,CAAC;AAEJ,MAAM,WAAW,mBACf,SAAQ,IAAI,CACV,uBAAuB,EACvB,UAAU,GAAG,cAAc,GAAG,cAAc,CAC7C;IACD,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,QAAQ,CAAC;CACzB;AAED,eAAO,MAAM,SAAS,GAAI,kEAMvB;IACD,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,sBAyEA,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAAI,CAAC,iBAAiB,CACjD,mBAAmB,EACnB,cAAc,CAmHf,CAAC"}
@@ -8,6 +8,7 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _common = require("../../types/common");
9
9
  var _typography = require("../../types/typography");
10
10
  var _classify = require("../../utils/classify");
11
+ var _qa = require("../../utils/qa");
11
12
  var _Icon = require("../Icon");
12
13
  var _Link = require("../Link");
13
14
  var _Text = require("../Text");
@@ -21,7 +22,8 @@ const AlertIcon = _ref => {
21
22
  semantic,
22
23
  leftIconName,
23
24
  leftIconType,
24
- iconClassName
25
+ iconClassName,
26
+ testId
25
27
  } = _ref;
26
28
  switch (semantic) {
27
29
  case _common.ALERT_SEMANTIC.neutral:
@@ -30,7 +32,11 @@ const AlertIcon = _ref => {
30
32
  name: leftIconName ? leftIconName : 'face-smile',
31
33
  size: "small",
32
34
  type: leftIconType,
33
- className: iconClassName
35
+ className: iconClassName,
36
+ testId: (0, _qa.generateTestId)({
37
+ base: testId,
38
+ slot: 'icon'
39
+ })
34
40
  });
35
41
  case _common.ALERT_SEMANTIC.success:
36
42
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
@@ -38,7 +44,11 @@ const AlertIcon = _ref => {
38
44
  size: "small",
39
45
  color: _typography.TEXT_COLORS.success,
40
46
  type: leftIconType,
41
- className: iconClassName
47
+ className: iconClassName,
48
+ testId: (0, _qa.generateTestId)({
49
+ base: testId,
50
+ slot: 'icon'
51
+ })
42
52
  });
43
53
  case _common.ALERT_SEMANTIC.information:
44
54
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
@@ -46,7 +56,11 @@ const AlertIcon = _ref => {
46
56
  size: "small",
47
57
  color: _typography.TEXT_COLORS.information,
48
58
  type: leftIconType,
49
- className: iconClassName
59
+ className: iconClassName,
60
+ testId: (0, _qa.generateTestId)({
61
+ base: testId,
62
+ slot: 'icon'
63
+ })
50
64
  });
51
65
  case _common.ALERT_SEMANTIC.warning:
52
66
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
@@ -54,7 +68,11 @@ const AlertIcon = _ref => {
54
68
  size: "small",
55
69
  color: _typography.TEXT_COLORS.warning,
56
70
  type: leftIconType,
57
- className: iconClassName
71
+ className: iconClassName,
72
+ testId: (0, _qa.generateTestId)({
73
+ base: testId,
74
+ slot: 'icon'
75
+ })
58
76
  });
59
77
  case _common.ALERT_SEMANTIC.danger:
60
78
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
@@ -62,7 +80,11 @@ const AlertIcon = _ref => {
62
80
  size: "small",
63
81
  color: _typography.TEXT_COLORS.danger,
64
82
  type: leftIconType,
65
- className: iconClassName
83
+ className: iconClassName,
84
+ testId: (0, _qa.generateTestId)({
85
+ base: testId,
86
+ slot: 'icon'
87
+ })
66
88
  });
67
89
  default:
68
90
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
@@ -70,7 +92,11 @@ const AlertIcon = _ref => {
70
92
  name: leftIconName ? leftIconName : 'face-smile',
71
93
  size: "small",
72
94
  type: leftIconType,
73
- className: iconClassName
95
+ className: iconClassName,
96
+ testId: (0, _qa.generateTestId)({
97
+ base: testId,
98
+ slot: 'icon'
99
+ })
74
100
  });
75
101
  }
76
102
  };
@@ -85,7 +111,8 @@ const InContextAlert = exports.InContextAlert = /*#__PURE__*/React.forwardRef((p
85
111
  actionText = '',
86
112
  actionTextColor = _typography.TEXT_COLORS.primary,
87
113
  onAction,
88
- leftIconType
114
+ leftIconType,
115
+ testId
89
116
  } = props;
90
117
 
91
118
  // Type narrowing to safely access properties only when they exist
@@ -108,23 +135,40 @@ const InContextAlert = exports.InContextAlert = /*#__PURE__*/React.forwardRef((p
108
135
  [_InContextAlertModule.default.danger]: semantic === _common.ALERT_SEMANTIC.danger
109
136
  }, classNames?.wrapper),
110
137
  ref: ref,
138
+ "data-testid": (0, _qa.generateTestId)({
139
+ base: testId,
140
+ slot: 'wrapper'
141
+ }),
111
142
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(AlertIcon, {
112
143
  semantic: semantic,
113
144
  leftIconName: leftIconName,
114
145
  leftIconType: leftIconType,
115
- iconClassName: classNames?.icon
146
+ iconClassName: classNames?.icon,
147
+ testId: testId
116
148
  }), React.Children.count(children) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.SubTitleExtraSmall, {
117
149
  className: (0, _classify.classify)(classNames?.alertText),
118
150
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Truncate.Truncate, {
119
151
  line: 2,
120
152
  wordBreak: "initial",
153
+ testId: (0, _qa.generateTestId)({
154
+ base: testId,
155
+ slot: 'text'
156
+ }),
121
157
  children: children
122
158
  })
123
159
  }), !!(actionText || dismissable) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
124
160
  className: (0, _classify.classify)(_InContextAlertModule.default.actionContainer, classNames?.actionContainer),
161
+ "data-testid": (0, _qa.generateTestId)({
162
+ base: testId,
163
+ slot: 'actions'
164
+ }),
125
165
  children: [!!actionText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.Link, {
126
166
  onClick: onAction,
127
167
  color: actionTextColor,
168
+ testId: (0, _qa.generateTestId)({
169
+ base: testId,
170
+ slot: 'action-link'
171
+ }),
128
172
  children: actionText
129
173
  }), !!dismissable && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.ClickableIcon, {
130
174
  color: _typography.TEXT_COLORS.primary,
@@ -133,7 +177,11 @@ const InContextAlert = exports.InContextAlert = /*#__PURE__*/React.forwardRef((p
133
177
  size: "small",
134
178
  type: "regular",
135
179
  onClick: closeClickHandler,
136
- className: _InContextAlertModule.default.closeIcon
180
+ className: _InContextAlertModule.default.closeIcon,
181
+ testId: (0, _qa.generateTestId)({
182
+ base: testId,
183
+ slot: 'close-button'
184
+ })
137
185
  })]
138
186
  })]
139
187
  })
@@ -7,6 +7,7 @@ export interface InContextAlertWithMultipleActionsProps extends Omit<InContextAl
7
7
  secondaryActionText?: string;
8
8
  onSecondaryAction?: React.MouseEventHandler<HTMLAnchorElement>;
9
9
  secondaryActionTextColor?: ColorTypes;
10
+ testId?: string;
10
11
  }
11
12
  export declare const InContextAlertWithMultipleActions: Flow.AbstractComponent<InContextAlertWithMultipleActionsProps, HTMLDivElement>;
12
13
  //# sourceMappingURL=InContextAlertWithMultipleActions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InContextAlertWithMultipleActions.d.ts","sourceRoot":"","sources":["../../../src/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAGrD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAKrD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,+BAA+B,CAAC;AAQvE,MAAM,WAAW,sCACf,SAAQ,IAAI,CACV,mBAAmB,EACjB,QAAQ,GACR,qBAAqB,GACrB,mBAAmB,GACnB,0BAA0B,CAC7B;IACD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAC/D,wBAAwB,CAAC,EAAE,UAAU,CAAC;CACvC;AAED,eAAO,MAAM,iCAAiC,EAAE,IAAI,CAAC,iBAAiB,CACpE,sCAAsC,EACtC,cAAc,CAiHf,CAAC"}
1
+ {"version":3,"file":"InContextAlertWithMultipleActions.d.ts","sourceRoot":"","sources":["../../../src/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAGrD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAMrD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,+BAA+B,CAAC;AAQvE,MAAM,WAAW,sCACf,SAAQ,IAAI,CACV,mBAAmB,EACjB,QAAQ,GACR,qBAAqB,GACrB,mBAAmB,GACnB,0BAA0B,CAC7B;IACD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAC/D,wBAAwB,CAAC,EAAE,UAAU,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,iCAAiC,EAAE,IAAI,CAAC,iBAAiB,CACpE,sCAAsC,EACtC,cAAc,CAkIf,CAAC"}
@@ -8,6 +8,7 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _common = require("../../types/common");
9
9
  var _typography = require("../../types/typography");
10
10
  var _classify = require("../../utils/classify");
11
+ var _qa = require("../../utils/qa");
11
12
  var _Icon = require("../Icon");
12
13
  var _InContextAlert = require("../InContextAlert");
13
14
  var _Link = require("../Link");
@@ -30,7 +31,8 @@ const InContextAlertWithMultipleActions = exports.InContextAlertWithMultipleActi
30
31
  secondaryActionText = '',
31
32
  onSecondaryAction,
32
33
  secondaryActionTextColor = _typography.TEXT_COLORS.primary,
33
- leftIconType
34
+ leftIconType,
35
+ testId
34
36
  } = props;
35
37
  // Type narrowing to safely access selfDismiss only when dismissable is true
36
38
  const selfDismiss = dismissable === true && 'selfDismiss' in props ? props.selfDismiss : false;
@@ -52,25 +54,46 @@ const InContextAlertWithMultipleActions = exports.InContextAlertWithMultipleActi
52
54
  [_InContextAlertWithMultipleActionsModule.default.danger]: semantic === _common.ALERT_SEMANTIC.danger
53
55
  }, classNames?.wrapper),
54
56
  ref: ref,
57
+ "data-testid": (0, _qa.generateTestId)({
58
+ base: testId,
59
+ slot: 'wrapper'
60
+ }),
55
61
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_InContextAlert.AlertIcon, {
56
62
  semantic: semantic,
57
63
  leftIconName: leftIconName,
58
64
  leftIconType: leftIconType,
59
- iconClassName: classNames?.icon
65
+ iconClassName: classNames?.icon,
66
+ testId: testId
60
67
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
61
68
  className: (0, _classify.classify)(_InContextAlertWithMultipleActionsModule.default.contentContainer, inline ? _InContextAlertWithMultipleActionsModule.default.contentContainerRow : _InContextAlertWithMultipleActionsModule.default.contentContainerColumn, classNames?.contentContainer),
69
+ "data-testid": (0, _qa.generateTestId)({
70
+ base: testId,
71
+ slot: 'content'
72
+ }),
62
73
  children: [React.Children.count(children) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.SubTitleExtraSmall, {
63
74
  className: (0, _classify.classify)(classNames?.alertText),
64
75
  children: children
65
76
  }), !!(actionText || secondaryActionText) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
66
77
  className: (0, _classify.classify)(_InContextAlertWithMultipleActionsModule.default.actionContainer, classNames?.actionContainer),
78
+ "data-testid": (0, _qa.generateTestId)({
79
+ base: testId,
80
+ slot: 'actions'
81
+ }),
67
82
  children: [!!actionText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.Link, {
68
83
  onClick: onAction,
69
84
  color: actionTextColor,
85
+ testId: (0, _qa.generateTestId)({
86
+ base: testId,
87
+ slot: 'primary-action'
88
+ }),
70
89
  children: actionText
71
90
  }), !!secondaryActionText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.Link, {
72
91
  onClick: onSecondaryAction,
73
92
  color: secondaryActionTextColor,
93
+ testId: (0, _qa.generateTestId)({
94
+ base: testId,
95
+ slot: 'secondary-action'
96
+ }),
74
97
  children: secondaryActionText
75
98
  })]
76
99
  })]
@@ -82,7 +105,11 @@ const InContextAlertWithMultipleActions = exports.InContextAlertWithMultipleActi
82
105
  size: "small",
83
106
  type: "regular",
84
107
  onClick: closeClickHandler,
85
- className: _InContextAlertWithMultipleActionsModule.default.closeIcon
108
+ className: _InContextAlertWithMultipleActionsModule.default.closeIcon,
109
+ testId: (0, _qa.generateTestId)({
110
+ base: testId,
111
+ slot: 'close-button'
112
+ })
86
113
  })
87
114
  })]
88
115
  })
@@ -18,6 +18,7 @@ export interface KPIBoxProps {
18
18
  iconName?: string;
19
19
  iconSize?: IconSize;
20
20
  iconType?: IconType;
21
+ testId?: string;
21
22
  }
22
23
  export declare const KPIBox: Flow.AbstractComponent<KPIBoxProps, HTMLDivElement>;
23
24
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"KPIBox.d.ts","sourceRoot":"","sources":["../../../src/components/KPIBox/KPIBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAGxD,OAAO,KAAK,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAM5D,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC,CAAC;AAEH,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,eAAO,MAAM,MAAM,EAAE,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,cAAc,CAiEpE,CAAC"}
1
+ {"version":3,"file":"KPIBox.d.ts","sourceRoot":"","sources":["../../../src/components/KPIBox/KPIBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAIxD,OAAO,KAAK,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAM5D,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC,CAAC;AAEH,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,MAAM,EAAE,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,cAAc,CAyEpE,CAAC"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.KPIBox = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _classify = _interopRequireDefault(require("../../utils/classify"));
9
+ var _qa = require("../../utils/qa");
9
10
  var _Icon = require("../Icon");
10
11
  var _KPIBoxModule = _interopRequireDefault(require("./KPIBox.module.css"));
11
12
  var _jsxRuntime = require("react/jsx-runtime");
@@ -21,28 +22,52 @@ const KPIBox = exports.KPIBox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
21
22
  iconName,
22
23
  iconSize = 'large',
23
24
  iconType = 'solid',
25
+ testId,
24
26
  ...props
25
27
  } = _ref;
26
28
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
27
29
  ...props,
28
30
  ref: ref,
29
- "data-testid": "KPIBox",
31
+ "data-testid": (0, _qa.generateTestId)({
32
+ base: testId,
33
+ slot: 'root'
34
+ }),
30
35
  className: (0, _classify.default)(_KPIBoxModule.default.wrapper, classNames?.wrapper),
31
36
  children: [!!iconName && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.SemanticIcon, {
32
37
  semantic: semantic,
33
38
  name: iconName,
34
39
  size: iconSize,
35
- type: iconType
40
+ type: iconType,
41
+ testId: (0, _qa.generateTestId)({
42
+ base: testId,
43
+ slot: 'icon'
44
+ })
36
45
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
37
46
  className: (0, _classify.default)(_KPIBoxModule.default.textContainer, classNames?.textContainer),
47
+ "data-testid": (0, _qa.generateTestId)({
48
+ base: testId,
49
+ slot: 'content'
50
+ }),
38
51
  children: [!!topContent && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
39
52
  className: (0, _classify.default)(_KPIBoxModule.default.topFoldContent, classNames?.topFoldContent),
53
+ "data-testid": (0, _qa.generateTestId)({
54
+ base: testId,
55
+ slot: 'top'
56
+ }),
40
57
  children: topContent
41
58
  }), !!middleContent && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
42
59
  className: (0, _classify.default)(_KPIBoxModule.default.middleFoldContent, classNames?.middleFoldContent),
60
+ "data-testid": (0, _qa.generateTestId)({
61
+ base: testId,
62
+ slot: 'middle'
63
+ }),
43
64
  children: middleContent
44
65
  }), !!bottomContent && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
45
66
  className: (0, _classify.default)(_KPIBoxModule.default.bottomFoldContent, classNames?.bottomFoldContent),
67
+ "data-testid": (0, _qa.generateTestId)({
68
+ base: testId,
69
+ slot: 'bottom'
70
+ }),
46
71
  children: bottomContent
47
72
  })]
48
73
  })]