@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.
- package/CHANGELOG.md +17 -0
- package/lib/components/Accordion/Accordion.d.ts +1 -0
- package/lib/components/Accordion/Accordion.d.ts.map +1 -1
- package/lib/components/Accordion/Accordion.js +29 -4
- package/lib/components/Accordion/AccordionGroup.d.ts +2 -1
- package/lib/components/Accordion/AccordionGroup.d.ts.map +1 -1
- package/lib/components/Accordion/AccordionGroup.js +13 -2
- package/lib/components/Avatar/Avatar.d.ts +3 -1
- package/lib/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/components/Avatar/Avatar.js +58 -11
- package/lib/components/AvatarGroup/AvatarGroup.d.ts +1 -0
- package/lib/components/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/lib/components/AvatarGroup/AvatarGroup.js +27 -3
- package/lib/components/Badge/Badge.d.ts +1 -0
- package/lib/components/Badge/Badge.d.ts.map +1 -1
- package/lib/components/Badge/Badge.js +22 -5
- package/lib/components/BadgedIcon/BadgedIcon.d.ts +2 -1
- package/lib/components/BadgedIcon/BadgedIcon.d.ts.map +1 -1
- package/lib/components/BadgedIcon/BadgedIcon.js +20 -4
- package/lib/components/Banner/Banner.d.ts +1 -0
- package/lib/components/Banner/Banner.d.ts.map +1 -1
- package/lib/components/Banner/Banner.js +2 -0
- package/lib/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.d.ts +1 -0
- package/lib/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.d.ts.map +1 -1
- package/lib/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.js +6 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +1 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.js +31 -11
- package/lib/components/Button/Button.d.ts +1 -0
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +50 -6
- package/lib/components/ButtonDropdown/ButtonDropdown.d.ts +1 -0
- package/lib/components/ButtonDropdown/ButtonDropdown.d.ts.map +1 -1
- package/lib/components/ButtonDropdown/ButtonDropdown.js +22 -1
- package/lib/components/ButtonDropdown/SimpleButtonDropdown.d.ts +1 -0
- package/lib/components/ButtonDropdown/SimpleButtonDropdown.d.ts.map +1 -1
- package/lib/components/ButtonDropdown/SimpleButtonDropdown.js +2 -0
- package/lib/components/ChatBubble/ChatBubble.d.ts +13 -6
- package/lib/components/ChatBubble/ChatBubble.d.ts.map +1 -1
- package/lib/components/ChatBubble/ChatBubble.js +57 -14
- package/lib/components/Checkbox/Checkbox.d.ts +1 -0
- package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.js +34 -5
- package/lib/components/Checkbox/CheckboxGroup.d.ts +1 -0
- package/lib/components/Checkbox/CheckboxGroup.d.ts.map +1 -1
- package/lib/components/Checkbox/CheckboxGroup.js +21 -2
- package/lib/components/Chip/Chip.d.ts +1 -0
- package/lib/components/Chip/Chip.d.ts.map +1 -1
- package/lib/components/Chip/Chip.js +24 -3
- package/lib/components/CollapsibleCard/CollapsibleCard.d.ts +5 -2
- package/lib/components/CollapsibleCard/CollapsibleCard.d.ts.map +1 -1
- package/lib/components/CollapsibleCard/CollapsibleCard.js +46 -7
- package/lib/components/Dialog/Dialog.d.ts +10 -5
- package/lib/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/components/Dialog/Dialog.js +76 -11
- package/lib/components/Dropdown/Dropdown.d.ts +1 -0
- package/lib/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/Dropdown/Dropdown.js +19 -2
- package/lib/components/Dropdown/SimpleDropdown.d.ts +1 -0
- package/lib/components/Dropdown/SimpleDropdown.d.ts.map +1 -1
- package/lib/components/Dropdown/SimpleDropdown.js +2 -0
- package/lib/components/FileUpload/FileBlock/FileBlock.d.ts +1 -0
- package/lib/components/FileUpload/FileBlock/FileBlock.d.ts.map +1 -1
- package/lib/components/FileUpload/FileBlock/FileBlock.js +58 -10
- package/lib/components/FileUpload/FileUpload.d.ts +1 -0
- package/lib/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/lib/components/FileUpload/FileUpload.js +30 -4
- package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.d.ts +2 -0
- package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.d.ts.map +1 -1
- package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.js +11 -1
- package/lib/components/FormTitleWrapper/FormTitleWrapper.d.ts +1 -0
- package/lib/components/FormTitleWrapper/FormTitleWrapper.d.ts.map +1 -1
- package/lib/components/FormTitleWrapper/FormTitleWrapper.js +24 -3
- package/lib/components/Icon/ClickableIcon.d.ts +2 -0
- package/lib/components/Icon/ClickableIcon.d.ts.map +1 -1
- package/lib/components/Icon/ClickableIcon.js +13 -1
- package/lib/components/Icon/Icon.docs.d.ts +11 -0
- package/lib/components/Icon/Icon.docs.d.ts.map +1 -1
- package/lib/components/Icon/Icon.docs.js +11 -0
- package/lib/components/Icon/SemanticIcon.d.ts +2 -1
- package/lib/components/Icon/SemanticIcon.d.ts.map +1 -1
- package/lib/components/Icon/SemanticIcon.js +11 -1
- package/lib/components/InContextAlert/InContextAlert.d.ts +3 -1
- package/lib/components/InContextAlert/InContextAlert.d.ts.map +1 -1
- package/lib/components/InContextAlert/InContextAlert.js +58 -10
- package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.d.ts +1 -0
- package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.d.ts.map +1 -1
- package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.js +30 -3
- package/lib/components/KPIBox/KPIBox.d.ts +1 -0
- package/lib/components/KPIBox/KPIBox.d.ts.map +1 -1
- package/lib/components/KPIBox/KPIBox.js +27 -2
- package/lib/components/Link/Link.d.ts +1 -0
- package/lib/components/Link/Link.d.ts.map +1 -1
- package/lib/components/Link/Link.js +24 -2
- package/lib/components/Menu/Menu.d.ts +2 -0
- package/lib/components/Menu/Menu.d.ts.map +1 -1
- package/lib/components/Menu/Menu.js +64 -7
- package/lib/components/Menu/MenuOptionButton.d.ts +1 -0
- package/lib/components/Menu/MenuOptionButton.d.ts.map +1 -1
- package/lib/components/Menu/MenuOptionButton.js +84 -8
- package/lib/components/Modal/Modal.d.ts +9 -5
- package/lib/components/Modal/Modal.d.ts.map +1 -1
- package/lib/components/Modal/Modal.js +48 -5
- package/lib/components/Notification/Notification.d.ts +1 -0
- package/lib/components/Notification/Notification.d.ts.map +1 -1
- package/lib/components/Notification/Notification.js +24 -4
- package/lib/components/PageTitle/PageTitle.d.ts +7 -3
- package/lib/components/PageTitle/PageTitle.d.ts.map +1 -1
- package/lib/components/PageTitle/PageTitle.js +41 -4
- package/lib/components/Panel/Panel.d.ts +7 -3
- package/lib/components/Panel/Panel.d.ts.map +1 -1
- package/lib/components/Panel/Panel.js +34 -4
- package/lib/components/ProgressDonut/ProgressDonut.d.ts +1 -0
- package/lib/components/ProgressDonut/ProgressDonut.d.ts.map +1 -1
- package/lib/components/ProgressDonut/ProgressDonut.js +11 -2
- package/lib/components/PromptChip/PromptChip.d.ts +1 -0
- package/lib/components/PromptChip/PromptChip.d.ts.map +1 -1
- package/lib/components/PromptChip/PromptChip.js +42 -5
- package/lib/components/PromptInput/PromptInput.d.ts +1 -0
- package/lib/components/PromptInput/PromptInput.d.ts.map +1 -1
- package/lib/components/PromptInput/PromptInput.js +24 -3
- package/lib/components/RadioButton/RadioButton.d.ts +1 -0
- package/lib/components/RadioButton/RadioButton.d.ts.map +1 -1
- package/lib/components/RadioButton/RadioButton.js +14 -0
- package/lib/components/RadioButton/RadioGroup.d.ts +1 -0
- package/lib/components/RadioButton/RadioGroup.d.ts.map +1 -1
- package/lib/components/RadioButton/RadioGroup.js +17 -2
- package/lib/components/RadioTile/RadioTile.d.ts +1 -0
- package/lib/components/RadioTile/RadioTile.d.ts.map +1 -1
- package/lib/components/RadioTile/RadioTile.js +31 -6
- package/lib/components/RangeSlider/RangeSlider.d.ts +1 -0
- package/lib/components/RangeSlider/RangeSlider.d.ts.map +1 -1
- package/lib/components/RangeSlider/RangeSlider.js +33 -4
- package/lib/components/Rating/Rating.d.ts +1 -0
- package/lib/components/Rating/Rating.d.ts.map +1 -1
- package/lib/components/Rating/Rating.js +22 -3
- package/lib/components/ScoreBar/ScoreBar.d.ts +1 -0
- package/lib/components/ScoreBar/ScoreBar.d.ts.map +1 -1
- package/lib/components/ScoreBar/ScoreBar.js +16 -2
- package/lib/components/SearchInput/SearchInput.d.ts +1 -0
- package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/lib/components/SearchInput/SearchInput.js +20 -2
- package/lib/components/SideMenuLink/SideMenuLink.d.ts +1 -0
- package/lib/components/SideMenuLink/SideMenuLink.d.ts.map +1 -1
- package/lib/components/SideMenuLink/SideMenuLink.js +33 -3
- package/lib/components/Stepper/Step/Step.d.ts +1 -0
- package/lib/components/Stepper/Step/Step.d.ts.map +1 -1
- package/lib/components/Stepper/Step/Step.js +30 -4
- package/lib/components/Stepper/Step/StepContent.d.ts +2 -1
- package/lib/components/Stepper/Step/StepContent.d.ts.map +1 -1
- package/lib/components/Stepper/Step/StepContent.js +7 -1
- package/lib/components/Stepper/Step/StepLabel.d.ts +2 -1
- package/lib/components/Stepper/Step/StepLabel.d.ts.map +1 -1
- package/lib/components/Stepper/Step/StepLabel.js +7 -1
- package/lib/components/Stepper/Stepper.d.ts +1 -0
- package/lib/components/Stepper/Stepper.d.ts.map +1 -1
- package/lib/components/Stepper/Stepper.js +13 -2
- package/lib/components/SubMenu/SubMenu.d.ts +1 -0
- package/lib/components/SubMenu/SubMenu.d.ts.map +1 -1
- package/lib/components/SubMenu/SubMenu.js +21 -3
- package/lib/components/TextTile/TextTile.d.ts +1 -0
- package/lib/components/TextTile/TextTile.d.ts.map +1 -1
- package/lib/components/TextTile/TextTile.js +24 -3
- package/lib/components/Textarea/Textarea.d.ts +1 -0
- package/lib/components/Textarea/Textarea.d.ts.map +1 -1
- package/lib/components/Textarea/Textarea.js +38 -0
- package/lib/components/Timeline/Timeline.d.ts +1 -0
- package/lib/components/Timeline/Timeline.d.ts.map +1 -1
- package/lib/components/Timeline/Timeline.js +15 -4
- package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts +2 -0
- package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts.map +1 -1
- package/lib/components/Timeline/TimelineItem/TimelineItem.js +46 -4
- package/lib/components/Toast/Toast.d.ts +6 -2
- package/lib/components/Toast/Toast.d.ts.map +1 -1
- package/lib/components/Toast/Toast.js +81 -14
- package/lib/components/Tooltip/Tooltip.d.ts +2 -1
- package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/components/Tooltip/Tooltip.js +23 -1
- package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.d.ts +2 -1
- package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.d.ts.map +1 -1
- package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.js +15 -1
- package/lib/components/Typeahead/SimpleTypeahead.d.ts +1 -0
- package/lib/components/Typeahead/SimpleTypeahead.d.ts.map +1 -1
- package/lib/components/Typeahead/SimpleTypeahead.js +3 -1
- package/lib/components/Typeahead/Typeahead.d.ts +1 -0
- package/lib/components/Typeahead/Typeahead.d.ts.map +1 -1
- package/lib/components/Typeahead/Typeahead.js +19 -2
- package/lib/components/WeekdayPicker/WeekdayPicker.d.ts +1 -0
- package/lib/components/WeekdayPicker/WeekdayPicker.d.ts.map +1 -1
- package/lib/components/WeekdayPicker/WeekdayPicker.js +16 -4
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@ const Banner = exports.Banner = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
18
18
|
semantic,
|
|
19
19
|
leftIconType = 'solid',
|
|
20
20
|
alignment = 'top',
|
|
21
|
+
testId,
|
|
21
22
|
...props
|
|
22
23
|
} = _ref;
|
|
23
24
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
@@ -26,6 +27,7 @@ const Banner = exports.Banner = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
26
27
|
leftIconType: leftIconType,
|
|
27
28
|
semantic: semantic,
|
|
28
29
|
ref: ref,
|
|
30
|
+
testId: testId,
|
|
29
31
|
classNames: {
|
|
30
32
|
...classNames,
|
|
31
33
|
wrapper: (0, _classify.default)(_BannerModule.default.bannerContainer, {
|
|
@@ -5,6 +5,7 @@ export interface BreadcrumbLinkProps extends Omit<LinkProps, 'isActive' | 'id' |
|
|
|
5
5
|
isActive?: boolean;
|
|
6
6
|
id: string;
|
|
7
7
|
onClick?: (arg1: React.SyntheticEvent<HTMLElement>, id: string) => unknown;
|
|
8
|
+
testId?: string;
|
|
8
9
|
}
|
|
9
10
|
export declare const BreadcrumbLink: Flow.AbstractComponent<BreadcrumbLinkProps, HTMLAnchorElement | null | undefined>;
|
|
10
11
|
//# sourceMappingURL=BreadcrumbLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbLink.d.ts","sourceRoot":"","sources":["../../../../src/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"BreadcrumbLink.d.ts","sourceRoot":"","sources":["../../../../src/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAKrD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAMnD,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,cAAc,EAAE,IAAI,CAAC,iBAAiB,CACjD,mBAAmB,EACnB,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAsCrC,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.BreadcrumbLink = 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 _Link = require("../../Link");
|
|
10
11
|
var _BreadcrumbLinkModule = _interopRequireDefault(require("./BreadcrumbLink.module.css"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -21,12 +22,16 @@ const BreadcrumbLink = exports.BreadcrumbLink = /*#__PURE__*/React.forwardRef((_
|
|
|
21
22
|
onClick,
|
|
22
23
|
href,
|
|
23
24
|
to,
|
|
25
|
+
testId,
|
|
24
26
|
...props
|
|
25
27
|
} = _ref;
|
|
26
28
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.Link, {
|
|
27
29
|
...props,
|
|
28
30
|
to: to ?? href,
|
|
29
|
-
|
|
31
|
+
testId: (0, _qa.generateTestId)({
|
|
32
|
+
base: testId,
|
|
33
|
+
slot: 'wrapper'
|
|
34
|
+
}),
|
|
30
35
|
ref: ref,
|
|
31
36
|
as: as || 'subTitleExtraSmall',
|
|
32
37
|
underline: underline,
|
|
@@ -8,6 +8,7 @@ export interface BreadcrumbsProps {
|
|
|
8
8
|
classNames?: ClassNames;
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
linkComponent?: Flow.AbstractComponent<BaseLinkProps, HTMLAnchorElement | null | undefined>;
|
|
11
|
+
testId?: string;
|
|
11
12
|
}
|
|
12
13
|
export declare const Breadcrumbs: Flow.AbstractComponent<BreadcrumbsProps, HTMLDivElement>;
|
|
13
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAMrD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAKvD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,aAAa,CAAC,EAAE,IAAI,CAAC,iBAAiB,CACpC,aAAa,EACb,iBAAiB,GAAG,IAAI,GAAG,SAAS,CACrC,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA8BD,eAAO,MAAM,WAAW,EAAE,IAAI,CAAC,iBAAiB,CAC9C,gBAAgB,EAChB,cAAc,CAqCf,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Breadcrumbs = 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 _BreadcrumbsModule = _interopRequireDefault(require("./Breadcrumbs.module.css"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -15,30 +16,49 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
15
16
|
|
|
16
17
|
// Type for a breadcrumb link element that can be cloned
|
|
17
18
|
|
|
18
|
-
const BreadcrumbSeparator =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
const BreadcrumbSeparator = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
testId
|
|
22
|
+
} = _ref;
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
24
|
+
className: _BreadcrumbsModule.default.separator,
|
|
25
|
+
name: "chevron-right",
|
|
26
|
+
size: "small",
|
|
27
|
+
color: "secondary",
|
|
28
|
+
testId: (0, _qa.generateTestId)({
|
|
29
|
+
base: testId,
|
|
30
|
+
slot: 'separator'
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
const Breadcrumbs = exports.Breadcrumbs = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
25
35
|
let {
|
|
26
36
|
classNames,
|
|
27
37
|
children,
|
|
28
|
-
linkComponent
|
|
29
|
-
|
|
38
|
+
linkComponent,
|
|
39
|
+
testId
|
|
40
|
+
} = _ref2;
|
|
30
41
|
const total = React.Children.count(children);
|
|
31
42
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32
43
|
ref: ref,
|
|
33
|
-
"data-testid":
|
|
44
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
45
|
+
base: testId,
|
|
46
|
+
slot: 'wrapper'
|
|
47
|
+
}),
|
|
34
48
|
className: (0, _classify.default)(_BreadcrumbsModule.default.wrapper, classNames?.wrapper),
|
|
35
49
|
children: React.Children.map(children, (child, idx) =>
|
|
36
50
|
/*#__PURE__*/
|
|
37
51
|
// eslint-disable-next-line react/no-array-index-key
|
|
38
52
|
(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
39
53
|
children: [/*#__PURE__*/React.isValidElement(child) && child?.type?.displayName === 'BreadcrumbLink' ? /*#__PURE__*/React.cloneElement(child, {
|
|
40
|
-
linkComponent
|
|
54
|
+
linkComponent,
|
|
55
|
+
testId: (0, _qa.generateTestId)({
|
|
56
|
+
base: testId,
|
|
57
|
+
slot: 'breadcrumb-link',
|
|
58
|
+
index: idx.toString()
|
|
59
|
+
})
|
|
41
60
|
}) : child, idx < total - 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(BreadcrumbSeparator, {
|
|
61
|
+
testId: testId,
|
|
42
62
|
"aria-hidden": true
|
|
43
63
|
})]
|
|
44
64
|
}, `crumb-${idx}`))
|
|
@@ -44,6 +44,7 @@ export interface BaseButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLBut
|
|
|
44
44
|
tabIndex?: number;
|
|
45
45
|
isLoading?: boolean;
|
|
46
46
|
role?: string;
|
|
47
|
+
testId?: string;
|
|
47
48
|
}
|
|
48
49
|
export interface UnstyledButtonProps extends Omit<BaseButtonProps, 'className'> {
|
|
49
50
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1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,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WACf,SAAQ,IAAI,CACV,eAAe,EACb,YAAY,GACZ,cAAc,GACd,cAAc,GACd,eAAe,GACf,eAAe,GACf,MAAM,GACN,SAAS,GACT,MAAM,CACT;IACD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAoBD,eAAO,MAAM,cAAc,EAAE,IAAI,CAAC,iBAAiB,CACjD,mBAAmB,EACnB,iBAAiB,CAoClB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,iBAAiB,CAqKvE,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.UnstyledButton = exports.Button = exports.BUTTON_TYPES = exports.BUTTON_SIZE = exports.BUTTON_ACTION_TYPE = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _classify = require("../../utils/classify");
|
|
9
|
+
var _qa = require("../../utils/qa");
|
|
9
10
|
var _CircularLoader = require("../CircularLoader");
|
|
10
11
|
var _Icon = require("../Icon");
|
|
11
12
|
var _Truncate = require("../Truncate");
|
|
@@ -65,6 +66,7 @@ const UnstyledButton = exports.UnstyledButton = /*#__PURE__*/React.forwardRef((_
|
|
|
65
66
|
tabIndex = 0,
|
|
66
67
|
isLoading,
|
|
67
68
|
role = 'button',
|
|
69
|
+
testId,
|
|
68
70
|
...props
|
|
69
71
|
} = _ref;
|
|
70
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
@@ -78,6 +80,10 @@ const UnstyledButton = exports.UnstyledButton = /*#__PURE__*/React.forwardRef((_
|
|
|
78
80
|
disabled: disabled,
|
|
79
81
|
tabIndex: disabled ? -1 : tabIndex,
|
|
80
82
|
type: actionType,
|
|
83
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
84
|
+
base: testId,
|
|
85
|
+
slot: 'root'
|
|
86
|
+
}),
|
|
81
87
|
onClick: event => {
|
|
82
88
|
if (disabled || isLoading) {
|
|
83
89
|
event.preventDefault();
|
|
@@ -101,6 +107,7 @@ const Button = exports.Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
101
107
|
actionType = 'button',
|
|
102
108
|
size = 'medium',
|
|
103
109
|
isLoading,
|
|
110
|
+
testId,
|
|
104
111
|
...props
|
|
105
112
|
} = _ref2;
|
|
106
113
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(UnstyledButton, {
|
|
@@ -108,6 +115,7 @@ const Button = exports.Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
108
115
|
actionType: actionType,
|
|
109
116
|
disabled: disabled,
|
|
110
117
|
isLoading: isLoading,
|
|
118
|
+
testId: testId,
|
|
111
119
|
className: (0, _classify.classify)(_ButtonModule.default.button, {
|
|
112
120
|
[_ButtonModule.default.primary]: type === 'primary',
|
|
113
121
|
[_ButtonModule.default.secondary]: type === 'secondary',
|
|
@@ -127,18 +135,30 @@ const Button = exports.Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
127
135
|
ref: ref,
|
|
128
136
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
129
137
|
className: _ButtonModule.default.buttonRow,
|
|
138
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
139
|
+
base: testId,
|
|
140
|
+
slot: 'content'
|
|
141
|
+
}),
|
|
130
142
|
children: !(iconLeftName || iconRightName) ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
131
143
|
className: (0, _classify.classify)(_ButtonModule.default.textContainer, classNames?.text),
|
|
132
144
|
children: [isLoading && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
133
145
|
className: _ButtonModule.default.loader,
|
|
134
146
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularLoader.CircularLoader, {
|
|
135
147
|
size: size,
|
|
136
|
-
colorToken: disabled ? 'colorTextDisabled' : ButtonTypeToLoaderColorMap[type]
|
|
148
|
+
colorToken: disabled ? 'colorTextDisabled' : ButtonTypeToLoaderColorMap[type],
|
|
149
|
+
testId: (0, _qa.generateTestId)({
|
|
150
|
+
base: testId,
|
|
151
|
+
slot: 'loader'
|
|
152
|
+
})
|
|
137
153
|
})
|
|
138
154
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Truncate.Truncate, {
|
|
139
155
|
className: (0, _classify.classify)({
|
|
140
156
|
[_ButtonModule.default.hidden]: isLoading
|
|
141
157
|
}),
|
|
158
|
+
testId: (0, _qa.generateTestId)({
|
|
159
|
+
base: testId,
|
|
160
|
+
slot: 'text'
|
|
161
|
+
}),
|
|
142
162
|
children: children
|
|
143
163
|
})]
|
|
144
164
|
}) :
|
|
@@ -148,7 +168,11 @@ const Button = exports.Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
148
168
|
className: _ButtonModule.default.loader,
|
|
149
169
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularLoader.CircularLoader, {
|
|
150
170
|
size: size,
|
|
151
|
-
colorToken: disabled ? 'colorTextDisabled' : ButtonTypeToLoaderColorMap[type]
|
|
171
|
+
colorToken: disabled ? 'colorTextDisabled' : ButtonTypeToLoaderColorMap[type],
|
|
172
|
+
testId: (0, _qa.generateTestId)({
|
|
173
|
+
base: testId,
|
|
174
|
+
slot: 'loader'
|
|
175
|
+
})
|
|
152
176
|
})
|
|
153
177
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
154
178
|
name: iconLeftName || iconRightName,
|
|
@@ -157,7 +181,11 @@ const Button = exports.Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
157
181
|
type: iconLeftName ? iconLeftType : iconRightType,
|
|
158
182
|
className: (0, _classify.classify)({
|
|
159
183
|
[_ButtonModule.default.hidden]: isLoading
|
|
160
|
-
}, classNames?.icon)
|
|
184
|
+
}, classNames?.icon),
|
|
185
|
+
testId: (0, _qa.generateTestId)({
|
|
186
|
+
base: testId,
|
|
187
|
+
slot: 'icon'
|
|
188
|
+
})
|
|
161
189
|
})]
|
|
162
190
|
}) :
|
|
163
191
|
// has icon _and_ child
|
|
@@ -169,19 +197,31 @@ const Button = exports.Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
169
197
|
type: iconLeftType,
|
|
170
198
|
className: (0, _classify.classify)({
|
|
171
199
|
[_ButtonModule.default.hidden]: isLoading
|
|
172
|
-
}, classNames?.icon)
|
|
200
|
+
}, classNames?.icon),
|
|
201
|
+
testId: (0, _qa.generateTestId)({
|
|
202
|
+
base: testId,
|
|
203
|
+
slot: 'icon-left'
|
|
204
|
+
})
|
|
173
205
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
174
206
|
className: (0, _classify.classify)(_ButtonModule.default.textContainer, classNames?.text),
|
|
175
207
|
children: [isLoading && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
176
208
|
className: _ButtonModule.default.loader,
|
|
177
209
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularLoader.CircularLoader, {
|
|
178
210
|
size: size,
|
|
179
|
-
colorToken: disabled ? 'colorTextDisabled' : ButtonTypeToLoaderColorMap[type]
|
|
211
|
+
colorToken: disabled ? 'colorTextDisabled' : ButtonTypeToLoaderColorMap[type],
|
|
212
|
+
testId: (0, _qa.generateTestId)({
|
|
213
|
+
base: testId,
|
|
214
|
+
slot: 'loader'
|
|
215
|
+
})
|
|
180
216
|
})
|
|
181
217
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Truncate.Truncate, {
|
|
182
218
|
className: (0, _classify.classify)({
|
|
183
219
|
[_ButtonModule.default.hidden]: isLoading
|
|
184
220
|
}),
|
|
221
|
+
testId: (0, _qa.generateTestId)({
|
|
222
|
+
base: testId,
|
|
223
|
+
slot: 'text'
|
|
224
|
+
}),
|
|
185
225
|
children: children
|
|
186
226
|
})]
|
|
187
227
|
}), iconRightName && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
@@ -191,7 +231,11 @@ const Button = exports.Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
191
231
|
type: iconRightType,
|
|
192
232
|
className: (0, _classify.classify)({
|
|
193
233
|
[_ButtonModule.default.hidden]: isLoading
|
|
194
|
-
}, classNames?.icon)
|
|
234
|
+
}, classNames?.icon),
|
|
235
|
+
testId: (0, _qa.generateTestId)({
|
|
236
|
+
base: testId,
|
|
237
|
+
slot: 'icon-right'
|
|
238
|
+
})
|
|
195
239
|
})]
|
|
196
240
|
})
|
|
197
241
|
})
|
|
@@ -34,6 +34,7 @@ export interface ButtonDropdownProps extends Omit<ButtonProps, 'classNames' | 'm
|
|
|
34
34
|
tooltip?: BaseTooltipProps;
|
|
35
35
|
elevation?: ElevationType;
|
|
36
36
|
clickAwayRef?: React.RefObject<ClickAwayRefType | null>;
|
|
37
|
+
testId?: string;
|
|
37
38
|
}
|
|
38
39
|
export declare const ButtonDropdown: Flow.AbstractComponent<ButtonDropdownProps, HTMLDivElement>;
|
|
39
40
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonDropdown/ButtonDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAKrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ButtonDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonDropdown/ButtonDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAKrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAK3D,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAGvD,OAAO,KAAK,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAE/D,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAM5E,eAAO,MAAM,oBAAoB;;;;;;;EAO/B,CAAC;AAEH,eAAO,MAAM,aAAa;;;EAGxB,CAAC;AAEH,MAAM,MAAM,UAAU,GACpB,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AACnE,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE1E,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAEH,MAAM,WAAW,mBACf,SAAQ,IAAI,CACV,WAAW,EACT,YAAY,GACZ,MAAM,GACN,kBAAkB,GAClB,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,aAAa,GACb,SAAS,GACT,WAAW,GACX,cAAc,CACjB;IACD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gBAAgB,CAAC,EAAE,QAAQ,CAAC;IAC5B,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,cAAc,CAAC,EAAE,CACf,MAAM,EAAE,UAAU,EAClB,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,GAAG,SAAS,KACxD,OAAO,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,cAAc,EAAE,IAAI,CAAC,iBAAiB,CACjD,mBAAmB,EACnB,cAAc,CAiKf,CAAC"}
|
|
@@ -11,6 +11,7 @@ var _space = require("../../styles/variables/_space");
|
|
|
11
11
|
var _classify = require("../../utils/classify");
|
|
12
12
|
var _clickAway = require("../../utils/click-away");
|
|
13
13
|
var _mergeRefs = require("../../utils/merge-refs");
|
|
14
|
+
var _qa = require("../../utils/qa");
|
|
14
15
|
var _Button = require("../Button");
|
|
15
16
|
var _ConditionalWrapper = require("../ConditionalWrapper");
|
|
16
17
|
var _Menu = require("../Menu");
|
|
@@ -50,6 +51,7 @@ const ButtonDropdown = exports.ButtonDropdown = /*#__PURE__*/React.forwardRef((_
|
|
|
50
51
|
onClick,
|
|
51
52
|
elevation = 'modal',
|
|
52
53
|
clickAwayRef,
|
|
54
|
+
testId,
|
|
53
55
|
...restButtonProps
|
|
54
56
|
} = _ref;
|
|
55
57
|
const [isMenuOpen, setIsMenuOpen] = React.useState(false);
|
|
@@ -88,7 +90,10 @@ const ButtonDropdown = exports.ButtonDropdown = /*#__PURE__*/React.forwardRef((_
|
|
|
88
90
|
triggerRef
|
|
89
91
|
} = _ref2;
|
|
90
92
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
91
|
-
"data-testid":
|
|
93
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
94
|
+
base: testId,
|
|
95
|
+
slot: 'root'
|
|
96
|
+
}),
|
|
92
97
|
className: (0, _classify.classify)(_ButtonDropdownModule.default.buttonDropdownContainer, {
|
|
93
98
|
[_ButtonDropdownModule.default.isFluid]: isFluid === true
|
|
94
99
|
}, classNames?.dropdownContainer),
|
|
@@ -98,6 +103,10 @@ const ButtonDropdown = exports.ButtonDropdown = /*#__PURE__*/React.forwardRef((_
|
|
|
98
103
|
wrapper: children => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
|
|
99
104
|
...tooltip,
|
|
100
105
|
hidden: isMenuOpen ? true : tooltip?.hidden,
|
|
106
|
+
testId: (0, _qa.generateTestId)({
|
|
107
|
+
base: testId,
|
|
108
|
+
slot: 'tooltip'
|
|
109
|
+
}),
|
|
101
110
|
children: children
|
|
102
111
|
}),
|
|
103
112
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
|
|
@@ -117,6 +126,10 @@ const ButtonDropdown = exports.ButtonDropdown = /*#__PURE__*/React.forwardRef((_
|
|
|
117
126
|
wrapper: classNames?.buttonWrapper,
|
|
118
127
|
icon: classNames?.buttonIcon
|
|
119
128
|
},
|
|
129
|
+
testId: (0, _qa.generateTestId)({
|
|
130
|
+
base: testId,
|
|
131
|
+
slot: 'button'
|
|
132
|
+
}),
|
|
120
133
|
children: children
|
|
121
134
|
})
|
|
122
135
|
}), isOpen && menu && /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.FloatingPortal, {
|
|
@@ -127,6 +140,10 @@ const ButtonDropdown = exports.ButtonDropdown = /*#__PURE__*/React.forwardRef((_
|
|
|
127
140
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
128
141
|
className: _ButtonDropdownModule.default.menuWrapper,
|
|
129
142
|
ref: (0, _mergeRefs.mergeRefs)([refs.setFloating, boundaryRef]),
|
|
143
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
144
|
+
base: testId,
|
|
145
|
+
slot: 'menu-wrapper'
|
|
146
|
+
}),
|
|
130
147
|
style: {
|
|
131
148
|
display: 'flex',
|
|
132
149
|
position: strategy,
|
|
@@ -144,6 +161,10 @@ const ButtonDropdown = exports.ButtonDropdown = /*#__PURE__*/React.forwardRef((_
|
|
|
144
161
|
},
|
|
145
162
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Menu.Menu, {
|
|
146
163
|
...menu,
|
|
164
|
+
testId: (0, _qa.generateTestId)({
|
|
165
|
+
base: testId,
|
|
166
|
+
slot: 'menu'
|
|
167
|
+
}),
|
|
147
168
|
onSelect: (option, e) => {
|
|
148
169
|
onOptionSelect?.(option, e);
|
|
149
170
|
if (
|
|
@@ -35,6 +35,7 @@ export interface SimpleButtonDropdownProps extends Omit<ButtonProps, 'elevation'
|
|
|
35
35
|
resolveLabel?: (option: MenuOption) => string | React.ReactNode;
|
|
36
36
|
resolveSecondaryLabel?: (option: MenuOption) => string | React.ReactNode;
|
|
37
37
|
clickAwayRef?: React.RefObject<ClickAwayRefType | null>;
|
|
38
|
+
testId?: string;
|
|
38
39
|
}
|
|
39
40
|
export declare const SimpleButtonDropdown: Flow.AbstractComponent<SimpleButtonDropdownProps, SimpleButtonDropdownRef>;
|
|
40
41
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleButtonDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonDropdown/SimpleButtonDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,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KAAK,CAAC,SAAS,CAAC;IACzB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,CACf,MAAM,EAAE,UAAU,EAClB,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,GAAG,SAAS,KACxD,OAAO,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChE,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACzE,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAgHD,eAAO,MAAM,oBAAoB,EAAE,IAAI,CAAC,iBAAiB,CACvD,yBAAyB,EACzB,uBAAuB,CAGxB,CAAC"}
|
|
@@ -33,6 +33,7 @@ const SimpleButtonDropdownBase = (props, ref) => {
|
|
|
33
33
|
allowWrap = false,
|
|
34
34
|
clickAwayRef,
|
|
35
35
|
elevation = 'modal',
|
|
36
|
+
testId,
|
|
36
37
|
...buttonProps
|
|
37
38
|
} = props;
|
|
38
39
|
const [btnText, setBtnText] = React.useState('');
|
|
@@ -70,6 +71,7 @@ const SimpleButtonDropdownBase = (props, ref) => {
|
|
|
70
71
|
elevation: elevation,
|
|
71
72
|
onMenuClose: onMenuClose,
|
|
72
73
|
clickAwayRef: clickAwayRef,
|
|
74
|
+
testId: testId,
|
|
73
75
|
menu: {
|
|
74
76
|
// TODO (Sharad): The isFluid prop here controls menu width unlike ButtonDropdown, and is independent from the isFluid prop in ButtonDropdown. There should be a way to set the isFluid prop of ButtonDropdown.
|
|
75
77
|
isFluid,
|
|
@@ -14,6 +14,7 @@ export interface ChatBubbleProps {
|
|
|
14
14
|
classNames?: ClassNames;
|
|
15
15
|
orientation?: ChatBubbleOrientation;
|
|
16
16
|
children: React.ReactNode;
|
|
17
|
+
testId?: string;
|
|
17
18
|
}
|
|
18
19
|
export declare const ChatBubble: Flow.AbstractComponent<ChatBubbleProps, HTMLDivElement>;
|
|
19
20
|
export interface ChatAnchorProps {
|
|
@@ -21,17 +22,19 @@ export interface ChatAnchorProps {
|
|
|
21
22
|
tooltip?: BaseTooltipProps;
|
|
22
23
|
classNames?: ClassNames;
|
|
23
24
|
avatarProps?: AvatarProps;
|
|
25
|
+
testId?: string;
|
|
24
26
|
}
|
|
25
27
|
export declare const ChatAnchor: {
|
|
26
|
-
({ isAI, tooltip, classNames, avatarProps, }: ChatAnchorProps): React.JSX.Element;
|
|
28
|
+
({ isAI, tooltip, classNames, avatarProps, testId, }: ChatAnchorProps): React.JSX.Element;
|
|
27
29
|
displayName: string;
|
|
28
30
|
};
|
|
29
31
|
export interface ChatContentProps {
|
|
30
32
|
classNames?: ClassNames;
|
|
31
33
|
children?: React.ReactNode;
|
|
34
|
+
testId?: string;
|
|
32
35
|
}
|
|
33
36
|
export declare const ChatContent: {
|
|
34
|
-
({ classNames, children }: ChatContentProps): React.JSX.Element;
|
|
37
|
+
({ classNames, children, testId, }: ChatContentProps): React.JSX.Element;
|
|
35
38
|
displayName: string;
|
|
36
39
|
};
|
|
37
40
|
export type ChatBodyClassNames = Readonly<{
|
|
@@ -44,33 +47,37 @@ export interface ChatBodyProps {
|
|
|
44
47
|
loadingText?: string;
|
|
45
48
|
children?: React.ReactNode;
|
|
46
49
|
classNames?: ClassNames;
|
|
50
|
+
testId?: string;
|
|
47
51
|
}
|
|
48
52
|
export declare const ChatBody: {
|
|
49
|
-
({ withBgColor, isLoading, children, loadingText, classNames, }: ChatBodyProps): React.JSX.Element;
|
|
53
|
+
({ withBgColor, isLoading, children, loadingText, classNames, testId, }: ChatBodyProps): React.JSX.Element;
|
|
50
54
|
displayName: string;
|
|
51
55
|
};
|
|
52
56
|
export interface ChatFooterProps {
|
|
53
57
|
classNames?: ClassNames;
|
|
54
58
|
children?: React.ReactNode;
|
|
59
|
+
testId?: string;
|
|
55
60
|
}
|
|
56
61
|
export declare const ChatFooter: {
|
|
57
|
-
({ children, classNames }: ChatFooterProps): React.JSX.Element;
|
|
62
|
+
({ children, classNames, testId }: ChatFooterProps): React.JSX.Element;
|
|
58
63
|
displayName: string;
|
|
59
64
|
};
|
|
60
65
|
export interface ChatFooterRightSlotProps {
|
|
61
66
|
children?: React.ReactNode;
|
|
62
67
|
classNames?: ClassNames;
|
|
68
|
+
testId?: string;
|
|
63
69
|
}
|
|
64
70
|
export declare const ChatFooterRightSlot: {
|
|
65
|
-
({ children, classNames, }: ChatFooterRightSlotProps): React.JSX.Element;
|
|
71
|
+
({ children, classNames, testId, }: ChatFooterRightSlotProps): React.JSX.Element;
|
|
66
72
|
displayName: string;
|
|
67
73
|
};
|
|
68
74
|
export interface ChatFooterLeftSlotProps {
|
|
69
75
|
children?: React.ReactNode;
|
|
70
76
|
classNames?: ClassNames;
|
|
77
|
+
testId?: string;
|
|
71
78
|
}
|
|
72
79
|
export declare const ChatFooterLeftSlot: {
|
|
73
|
-
({ children, classNames, }: ChatFooterLeftSlotProps): React.JSX.Element;
|
|
80
|
+
({ children, classNames, testId, }: ChatFooterLeftSlotProps): React.JSX.Element;
|
|
74
81
|
displayName: string;
|
|
75
82
|
};
|
|
76
83
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBubble.d.ts","sourceRoot":"","sources":["../../../src/components/ChatBubble/ChatBubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|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