@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
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.5.12](https://github.com/spaced-out/ui-design-system/compare/v0.5.11...v0.5.12) (2025-10-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* removes border in last timeline item ([#411](https://github.com/spaced-out/ui-design-system/issues/411)) ([ea9c819](https://github.com/spaced-out/ui-design-system/commit/ea9c819fe9af112f978cbebf22b1c7df8d9163a9))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* added testid support in level 2 parents ([c02570f](https://github.com/spaced-out/ui-design-system/commit/c02570fa3ec46698028d4fbf443b35539bc4ab63))
|
|
16
|
+
* added testid support in level 3 parents ([66c263d](https://github.com/spaced-out/ui-design-system/commit/66c263db029d31c3d4c657a8464c716df848202c))
|
|
17
|
+
* added testid support in level 3 parents ([6bc25ba](https://github.com/spaced-out/ui-design-system/commit/6bc25ba7ab9221794f5888b4c0b87e09222e5c34))
|
|
18
|
+
* added testid support in level 5 parents ([08d2c45](https://github.com/spaced-out/ui-design-system/commit/08d2c450f847b6c633a1779b30cd873b458a020e))
|
|
19
|
+
* adds testid in level 1 parents and stories ([376c635](https://github.com/spaced-out/ui-design-system/commit/376c6351f87d58ef1a86d953bb641613dc115002))
|
|
20
|
+
* fixes an issue with unstyled button ([3548097](https://github.com/spaced-out/ui-design-system/commit/35480978ca7aa3efa35c1c63250cc2bbd0b44d35))
|
|
21
|
+
|
|
5
22
|
### [0.5.11](https://github.com/spaced-out/ui-design-system/compare/v0.5.10...v0.5.11) (2025-09-23)
|
|
6
23
|
|
|
7
24
|
|
|
@@ -17,6 +17,7 @@ export interface AccordionPropsType {
|
|
|
17
17
|
onChange?: ((id: string, isOpen: boolean) => unknown) | null | undefined;
|
|
18
18
|
checked?: boolean;
|
|
19
19
|
onToggle?: (checked: boolean) => unknown;
|
|
20
|
+
testId?: string;
|
|
20
21
|
}
|
|
21
22
|
export declare const Accordion: Flow.AbstractComponent<AccordionPropsType, HTMLDivElement>;
|
|
22
23
|
//# sourceMappingURL=Accordion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAWrD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,SAAS,EAAE,IAAI,CAAC,iBAAiB,CAC5C,kBAAkB,EAClB,cAAc,CA2Ff,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Accordion = 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 _Toggle = require("../Toggle");
|
|
11
12
|
var _AccordionModule = _interopRequireDefault(require("./Accordion.module.css"));
|
|
@@ -23,7 +24,8 @@ const Accordion = exports.Accordion = /*#__PURE__*/React.forwardRef((_ref, ref)
|
|
|
23
24
|
isOpen = false,
|
|
24
25
|
showToggle = false,
|
|
25
26
|
checked = false,
|
|
26
|
-
children
|
|
27
|
+
children,
|
|
28
|
+
testId
|
|
27
29
|
} = _ref;
|
|
28
30
|
const [accordionIsOpen, setAccordionIsOpen] = React.useState(isOpen);
|
|
29
31
|
const handleToggle = () => {
|
|
@@ -40,22 +42,37 @@ const Accordion = exports.Accordion = /*#__PURE__*/React.forwardRef((_ref, ref)
|
|
|
40
42
|
}, [isOpen]);
|
|
41
43
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
42
44
|
ref: ref,
|
|
43
|
-
"data-testid":
|
|
45
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
46
|
+
base: testId,
|
|
47
|
+
slot: 'wrapper'
|
|
48
|
+
}),
|
|
44
49
|
className: (0, _classify.default)(_AccordionModule.default.wrapper, classNames?.wrapper),
|
|
45
50
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
46
51
|
className: (0, _classify.default)(_AccordionModule.default.headerWrapper, classNames?.headerWrapper),
|
|
47
52
|
onClick: handleAccordionClick,
|
|
53
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
54
|
+
base: testId,
|
|
55
|
+
slot: 'header-wrapper'
|
|
56
|
+
}),
|
|
48
57
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
49
58
|
className: (0, _classify.default)(_AccordionModule.default.header, classNames?.header),
|
|
50
59
|
children: [showToggle && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
51
60
|
onClick: e => {
|
|
52
61
|
e.stopPropagation(); // prevent toggle click from triggering accordion toggle
|
|
53
62
|
},
|
|
63
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
64
|
+
base: testId,
|
|
65
|
+
slot: 'toggle-container'
|
|
66
|
+
}),
|
|
54
67
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Toggle.Toggle, {
|
|
55
68
|
checked: checked,
|
|
56
69
|
onChange: handleToggle,
|
|
57
70
|
ariaLabel: 'toggle',
|
|
58
|
-
disabled: disabled
|
|
71
|
+
disabled: disabled,
|
|
72
|
+
testId: (0, _qa.generateTestId)({
|
|
73
|
+
base: testId,
|
|
74
|
+
slot: 'toggle'
|
|
75
|
+
})
|
|
59
76
|
})
|
|
60
77
|
}), header]
|
|
61
78
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
|
|
@@ -66,11 +83,19 @@ const Accordion = exports.Accordion = /*#__PURE__*/React.forwardRef((_ref, ref)
|
|
|
66
83
|
classNames: {
|
|
67
84
|
wrapper: _AccordionModule.default.icon
|
|
68
85
|
},
|
|
69
|
-
ariaLabel: 'Collapse button'
|
|
86
|
+
ariaLabel: 'Collapse button',
|
|
87
|
+
testId: (0, _qa.generateTestId)({
|
|
88
|
+
base: testId,
|
|
89
|
+
slot: 'collapse-button'
|
|
90
|
+
})
|
|
70
91
|
// we are not defining onClick here as we are using onClick of the parent here.
|
|
71
92
|
})]
|
|
72
93
|
}), accordionIsOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
73
94
|
className: (0, _classify.default)(_AccordionModule.default.content, classNames?.content),
|
|
95
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
96
|
+
base: testId,
|
|
97
|
+
slot: 'content'
|
|
98
|
+
}),
|
|
74
99
|
children: children
|
|
75
100
|
})]
|
|
76
101
|
});
|
|
@@ -9,9 +9,10 @@ export interface AccordionGroupPropsType {
|
|
|
9
9
|
enabledToggleIds?: Array<string>;
|
|
10
10
|
initialOpenId?: string;
|
|
11
11
|
classNames?: AccordionGroupClassNames;
|
|
12
|
+
testId?: string;
|
|
12
13
|
}
|
|
13
14
|
export declare const AccordionGroup: {
|
|
14
|
-
({ children, onAccordionClick, onToggle, initialOpenId, classNames, }: AccordionGroupPropsType): React.JSX.Element;
|
|
15
|
+
({ children, onAccordionClick, onToggle, initialOpenId, classNames, testId, }: AccordionGroupPropsType): React.JSX.Element;
|
|
15
16
|
displayName: string;
|
|
16
17
|
};
|
|
17
18
|
//# sourceMappingURL=AccordionGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionGroup.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AccordionGroup.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAeH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;IAC5D,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;IACtD,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,cAAc;mFAOxB,uBAAuB;;CAiDzB,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.AccordionGroup = 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 _AccordionGroupModule = _interopRequireDefault(require("./AccordionGroup.module.css"));
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -16,7 +17,8 @@ const AccordionGroup = _ref => {
|
|
|
16
17
|
onAccordionClick,
|
|
17
18
|
onToggle,
|
|
18
19
|
initialOpenId = '',
|
|
19
|
-
classNames
|
|
20
|
+
classNames,
|
|
21
|
+
testId
|
|
20
22
|
} = _ref;
|
|
21
23
|
const [openId, setOpenedId] = React.useState(initialOpenId);
|
|
22
24
|
const handleAccordionChange = (id, isOpen) => {
|
|
@@ -46,11 +48,20 @@ const AccordionGroup = _ref => {
|
|
|
46
48
|
onToggle: accordionOnToggle,
|
|
47
49
|
showToggle: true,
|
|
48
50
|
isOpen,
|
|
49
|
-
key: childId
|
|
51
|
+
key: childId,
|
|
52
|
+
testId: (0, _qa.generateTestId)({
|
|
53
|
+
base: testId,
|
|
54
|
+
slot: 'accordion',
|
|
55
|
+
index: childId
|
|
56
|
+
})
|
|
50
57
|
});
|
|
51
58
|
});
|
|
52
59
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
53
60
|
className: (0, _classify.default)(_AccordionGroupModule.default.wrapper, classNames?.wrapper),
|
|
61
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
62
|
+
base: testId,
|
|
63
|
+
slot: 'wrapper'
|
|
64
|
+
}),
|
|
54
65
|
children: enhancedChildren
|
|
55
66
|
});
|
|
56
67
|
};
|
|
@@ -41,6 +41,7 @@ export interface AvatarProps {
|
|
|
41
41
|
iconType?: IconType;
|
|
42
42
|
status?: StatusSemanticType;
|
|
43
43
|
statusBorderColorToken?: keyof typeof COLORS;
|
|
44
|
+
testId?: string;
|
|
44
45
|
}
|
|
45
46
|
export interface AvatarContentProps {
|
|
46
47
|
imageSrc?: string;
|
|
@@ -53,8 +54,9 @@ export interface AvatarContentProps {
|
|
|
53
54
|
status?: StatusSemanticType;
|
|
54
55
|
statusBorderColorToken?: keyof typeof COLORS;
|
|
55
56
|
classNames?: ClassNames;
|
|
57
|
+
testId?: string;
|
|
56
58
|
}
|
|
57
59
|
export declare const Avatar: Flow.AbstractComponent<AvatarProps, HTMLDivElement>;
|
|
58
|
-
export declare const BaseAvatar: ({ classNames, size, text, style, color, }: AvatarProps) => React.JSX.Element;
|
|
60
|
+
export declare const BaseAvatar: ({ classNames, size, text, style, color, testId, }: AvatarProps) => React.JSX.Element;
|
|
59
61
|
export {};
|
|
60
62
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,KAAK,MAAM,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAY3D,OAAO,KAAK,EAAW,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAE5D,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,gCAAgC,CAAC;AAYvE,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;EAKtB,CAAC;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAiC,CAAC;AAE/E,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AACxE,eAAO,MAAM,YAAY;;;;;;;EAOvB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC;AAExD,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,sBAAsB,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAwDD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,sBAAsB,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC;IAC7C,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA8DD,eAAO,MAAM,MAAM,EAAE,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,cAAc,CAsEpE,CAAC;AAEJ,eAAO,MAAM,UAAU,GAAI,mDAOxB,WAAW,sBAsBb,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.avatarSizeOptions = exports.BaseAvatar = exports.Avatar = exports.AVATAR
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _color = require("../../styles/variables/_color");
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
10
|
+
var _qa = require("../../utils/qa");
|
|
10
11
|
var _Icon = require("../Icon");
|
|
11
12
|
var _StatusIndicator = require("../StatusIndicator");
|
|
12
13
|
var _Text = require("../Text");
|
|
@@ -40,27 +41,32 @@ const AvatarTextDecorator = _ref => {
|
|
|
40
41
|
let {
|
|
41
42
|
avatarText,
|
|
42
43
|
size,
|
|
43
|
-
className
|
|
44
|
+
className,
|
|
45
|
+
testId
|
|
44
46
|
} = _ref;
|
|
45
47
|
switch (size) {
|
|
46
48
|
case 'small':
|
|
47
49
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.SubTitleSmall, {
|
|
48
50
|
className: className,
|
|
51
|
+
testId: testId,
|
|
49
52
|
children: avatarText
|
|
50
53
|
});
|
|
51
54
|
case 'medium':
|
|
52
55
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.SubTitleMedium, {
|
|
53
56
|
className: className,
|
|
57
|
+
testId: testId,
|
|
54
58
|
children: avatarText
|
|
55
59
|
});
|
|
56
60
|
case 'large':
|
|
57
61
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.SubTitleLarge, {
|
|
58
62
|
className: className,
|
|
63
|
+
testId: testId,
|
|
59
64
|
children: avatarText
|
|
60
65
|
});
|
|
61
66
|
case 'extraLarge':
|
|
62
67
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.JumboSmall, {
|
|
63
68
|
className: className,
|
|
69
|
+
testId: testId,
|
|
64
70
|
children: avatarText
|
|
65
71
|
});
|
|
66
72
|
}
|
|
@@ -83,9 +89,14 @@ const AvatarConditionalContent = _ref2 => {
|
|
|
83
89
|
color = 'blue',
|
|
84
90
|
status,
|
|
85
91
|
statusBorderColorToken,
|
|
86
|
-
classNames
|
|
92
|
+
classNames,
|
|
93
|
+
testId
|
|
87
94
|
} = _ref2;
|
|
88
95
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
96
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
97
|
+
base: testId,
|
|
98
|
+
slot: 'content'
|
|
99
|
+
}),
|
|
89
100
|
className: (0, _classify.default)(_AvatarModule.default.innerContainer, {
|
|
90
101
|
[_AvatarModule.default.alignCenter]: !imageSrc
|
|
91
102
|
}, classNames?.content),
|
|
@@ -97,21 +108,37 @@ const AvatarConditionalContent = _ref2 => {
|
|
|
97
108
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_StatusIndicator.StatusIndicator, {
|
|
98
109
|
status: status,
|
|
99
110
|
withBorder: true,
|
|
100
|
-
borderColorToken: statusBorderColorToken
|
|
111
|
+
borderColorToken: statusBorderColorToken,
|
|
112
|
+
testId: (0, _qa.generateTestId)({
|
|
113
|
+
base: testId,
|
|
114
|
+
slot: 'status'
|
|
115
|
+
})
|
|
101
116
|
})
|
|
102
117
|
}), imageSrc ? /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
103
118
|
src: imageSrc,
|
|
104
119
|
alt: "Avatar",
|
|
105
|
-
className: (0, _classify.default)(_AvatarModule.default.avatar, classNames?.image)
|
|
120
|
+
className: (0, _classify.default)(_AvatarModule.default.avatar, classNames?.image),
|
|
121
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
122
|
+
base: testId,
|
|
123
|
+
slot: 'image'
|
|
124
|
+
})
|
|
106
125
|
}) : iconName ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
107
126
|
name: iconName,
|
|
108
127
|
type: iconType,
|
|
109
128
|
size: iconSize[size],
|
|
110
|
-
className: classNames?.icon
|
|
129
|
+
className: classNames?.icon,
|
|
130
|
+
testId: (0, _qa.generateTestId)({
|
|
131
|
+
base: testId,
|
|
132
|
+
slot: 'icon'
|
|
133
|
+
})
|
|
111
134
|
}) : text ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AvatarTextDecorator, {
|
|
112
135
|
avatarText: getAvatarText(text),
|
|
113
136
|
size: size,
|
|
114
|
-
className: classNames?.text
|
|
137
|
+
className: classNames?.text,
|
|
138
|
+
testId: (0, _qa.generateTestId)({
|
|
139
|
+
base: testId,
|
|
140
|
+
slot: 'text'
|
|
141
|
+
})
|
|
115
142
|
}) : null]
|
|
116
143
|
});
|
|
117
144
|
};
|
|
@@ -127,9 +154,14 @@ const Avatar = exports.Avatar = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
127
154
|
color,
|
|
128
155
|
ring = false,
|
|
129
156
|
status,
|
|
130
|
-
statusBorderColorToken
|
|
157
|
+
statusBorderColorToken,
|
|
158
|
+
testId
|
|
131
159
|
} = _ref3;
|
|
132
160
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
161
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
162
|
+
base: testId,
|
|
163
|
+
slot: 'root'
|
|
164
|
+
}),
|
|
133
165
|
className: (0, _classify.default)(_AvatarModule.default.container, {
|
|
134
166
|
[_AvatarModule.default.extraLargeSize]: size === 'extraLarge',
|
|
135
167
|
[_AvatarModule.default.largeSize]: size === 'large',
|
|
@@ -140,6 +172,10 @@ const Avatar = exports.Avatar = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
140
172
|
ref: ref,
|
|
141
173
|
children: ring ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
142
174
|
className: (0, _classify.default)(_AvatarModule.default.ring, classNames?.ring),
|
|
175
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
176
|
+
base: testId,
|
|
177
|
+
slot: 'ring'
|
|
178
|
+
}),
|
|
143
179
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
144
180
|
className: _AvatarModule.default.whiteCircle,
|
|
145
181
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AvatarConditionalContent, {
|
|
@@ -151,7 +187,8 @@ const Avatar = exports.Avatar = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
151
187
|
size: size,
|
|
152
188
|
status: status,
|
|
153
189
|
statusBorderColorToken: statusBorderColorToken,
|
|
154
|
-
classNames: classNames
|
|
190
|
+
classNames: classNames,
|
|
191
|
+
testId: testId
|
|
155
192
|
})
|
|
156
193
|
})
|
|
157
194
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(AvatarConditionalContent, {
|
|
@@ -163,7 +200,8 @@ const Avatar = exports.Avatar = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
163
200
|
size: size,
|
|
164
201
|
status: status,
|
|
165
202
|
statusBorderColorToken: statusBorderColorToken,
|
|
166
|
-
classNames: classNames
|
|
203
|
+
classNames: classNames,
|
|
204
|
+
testId: testId
|
|
167
205
|
})
|
|
168
206
|
});
|
|
169
207
|
});
|
|
@@ -173,9 +211,14 @@ const BaseAvatar = _ref4 => {
|
|
|
173
211
|
size = AVATAR_SIZE.medium,
|
|
174
212
|
text = '',
|
|
175
213
|
style,
|
|
176
|
-
color = 'blue'
|
|
214
|
+
color = 'blue',
|
|
215
|
+
testId
|
|
177
216
|
} = _ref4;
|
|
178
217
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
218
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
219
|
+
base: testId,
|
|
220
|
+
slot: 'root'
|
|
221
|
+
}),
|
|
179
222
|
className: (0, _classify.default)(_AvatarModule.default.container, {
|
|
180
223
|
[_AvatarModule.default.baseExtraLargeSize]: size === 'extraLarge',
|
|
181
224
|
[_AvatarModule.default.baseLargeSize]: size === 'large',
|
|
@@ -189,7 +232,11 @@ const BaseAvatar = _ref4 => {
|
|
|
189
232
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AvatarTextDecorator, {
|
|
190
233
|
avatarText: text,
|
|
191
234
|
size: size,
|
|
192
|
-
className: classNames?.text
|
|
235
|
+
className: classNames?.text,
|
|
236
|
+
testId: (0, _qa.generateTestId)({
|
|
237
|
+
base: testId,
|
|
238
|
+
slot: 'text'
|
|
239
|
+
})
|
|
193
240
|
})
|
|
194
241
|
});
|
|
195
242
|
};
|
|
@@ -10,6 +10,7 @@ export interface AvatarGroupProps {
|
|
|
10
10
|
placement?: PlacementType;
|
|
11
11
|
maxAvatars?: number;
|
|
12
12
|
tooltipElevation?: ElevationType;
|
|
13
|
+
testId?: string;
|
|
13
14
|
}
|
|
14
15
|
export declare const AvatarGroup: Flow.AbstractComponent<AvatarGroupProps, HTMLDivElement>;
|
|
15
16
|
//# sourceMappingURL=AvatarGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../../src/components/AvatarGroup/AvatarGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../../src/components/AvatarGroup/AvatarGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAWrD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAC,aAAa,EAAE,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAQzE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,aAAa,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAoBD,eAAO,MAAM,WAAW,EAAE,IAAI,CAAC,iBAAiB,CAC9C,gBAAgB,EAChB,cAAc,CAuKf,CAAC"}
|
|
@@ -8,6 +8,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _color = require("../../styles/variables/_color");
|
|
9
9
|
var _space = require("../../styles/variables/_space");
|
|
10
10
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
11
|
+
var _qa = require("../../utils/qa");
|
|
11
12
|
var _Avatar = require("../Avatar");
|
|
12
13
|
var _Tooltip = require("../Tooltip");
|
|
13
14
|
var _AvatarGroupModule = _interopRequireDefault(require("./AvatarGroup.module.css"));
|
|
@@ -28,7 +29,8 @@ const AvatarGroup = exports.AvatarGroup = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
28
29
|
maxTooltipLines = 7,
|
|
29
30
|
placement = 'top',
|
|
30
31
|
maxAvatars = 5,
|
|
31
|
-
tooltipElevation
|
|
32
|
+
tooltipElevation,
|
|
33
|
+
testId
|
|
32
34
|
} = _ref;
|
|
33
35
|
const childAvatarCount = React.Children.count(children);
|
|
34
36
|
const leftOverlap = {
|
|
@@ -58,12 +60,22 @@ const AvatarGroup = exports.AvatarGroup = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
58
60
|
borderColor,
|
|
59
61
|
marginLeft: `-${index !== 0 ? leftOverlap[size] : 0}`
|
|
60
62
|
},
|
|
61
|
-
color
|
|
63
|
+
color,
|
|
64
|
+
testId: (0, _qa.generateTestId)({
|
|
65
|
+
base: testId,
|
|
66
|
+
slot: 'avatar',
|
|
67
|
+
index: index.toString()
|
|
68
|
+
})
|
|
62
69
|
});
|
|
63
70
|
return text ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
|
|
64
71
|
body: text,
|
|
65
72
|
placement: placement,
|
|
66
73
|
elevation: tooltipElevation,
|
|
74
|
+
testId: (0, _qa.generateTestId)({
|
|
75
|
+
base: testId,
|
|
76
|
+
slot: 'avatar-tooltip',
|
|
77
|
+
index: index.toString()
|
|
78
|
+
}),
|
|
67
79
|
children: avatar
|
|
68
80
|
}) : avatar;
|
|
69
81
|
};
|
|
@@ -96,6 +108,10 @@ const AvatarGroup = exports.AvatarGroup = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
96
108
|
bodyMaxLines: maxTooltipLines,
|
|
97
109
|
placement: placement,
|
|
98
110
|
elevation: tooltipElevation,
|
|
111
|
+
testId: (0, _qa.generateTestId)({
|
|
112
|
+
base: testId,
|
|
113
|
+
slot: 'plus-avatar-tooltip'
|
|
114
|
+
}),
|
|
99
115
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
100
116
|
className: _AvatarGroupModule.default.plusAvatar,
|
|
101
117
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.BaseAvatar, {
|
|
@@ -108,7 +124,11 @@ const AvatarGroup = exports.AvatarGroup = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
108
124
|
style: {
|
|
109
125
|
borderColor,
|
|
110
126
|
marginLeft: `-${leftOverlap[size]}`
|
|
111
|
-
}
|
|
127
|
+
},
|
|
128
|
+
testId: (0, _qa.generateTestId)({
|
|
129
|
+
base: testId,
|
|
130
|
+
slot: 'plus-avatar'
|
|
131
|
+
})
|
|
112
132
|
})
|
|
113
133
|
})
|
|
114
134
|
});
|
|
@@ -148,6 +168,10 @@ const AvatarGroup = exports.AvatarGroup = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
148
168
|
[_AvatarGroupModule.default.smallSize]: size === 'small'
|
|
149
169
|
}),
|
|
150
170
|
ref: ref,
|
|
171
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
172
|
+
base: testId,
|
|
173
|
+
slot: 'wrapper'
|
|
174
|
+
}),
|
|
151
175
|
children: childrenWithProps
|
|
152
176
|
});
|
|
153
177
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAkBrD,OAAO,KAAK,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAO5D,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;EAYtB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,WAAW,CAAC;AAEtD,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC;IAC9D,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cACf,SAAQ,IAAI,CACV,cAAc,EACd,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,CAC/D;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAmClE,CAAC;AAEJ,eAAO,MAAM,SAAS,EAAE,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,cAAc,CAgD1E,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.IconBadge = exports.Badge = exports.BADGE_COLOR = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _color = require("../../styles/variables/_color");
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
10
|
+
var _qa = require("../../utils/qa");
|
|
10
11
|
var _Icon = require("../Icon");
|
|
11
12
|
var _Text = require("../Text");
|
|
12
13
|
var _BadgeModule = _interopRequireDefault(require("./Badge.module.css"));
|
|
@@ -30,11 +31,15 @@ const Badge = exports.Badge = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
30
31
|
let {
|
|
31
32
|
classNames,
|
|
32
33
|
text,
|
|
33
|
-
fill = 'gray'
|
|
34
|
+
fill = 'gray',
|
|
35
|
+
testId
|
|
34
36
|
} = _ref;
|
|
35
37
|
const isDark = fill.includes('Dark');
|
|
36
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
37
|
-
"data-testid":
|
|
39
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
40
|
+
base: testId,
|
|
41
|
+
slot: 'root'
|
|
42
|
+
}),
|
|
38
43
|
style: {
|
|
39
44
|
'--wrapperBgColor': BADGE_COLOR[fill]
|
|
40
45
|
},
|
|
@@ -47,6 +52,10 @@ const Badge = exports.Badge = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
47
52
|
[_BadgeModule.default.dark]: isDark,
|
|
48
53
|
[_BadgeModule.default.light]: !isDark
|
|
49
54
|
}, classNames?.text),
|
|
55
|
+
testId: (0, _qa.generateTestId)({
|
|
56
|
+
base: testId,
|
|
57
|
+
slot: 'text'
|
|
58
|
+
}),
|
|
50
59
|
children: text
|
|
51
60
|
})
|
|
52
61
|
});
|
|
@@ -59,11 +68,15 @@ const IconBadge = exports.IconBadge = /*#__PURE__*/React.forwardRef((_ref2, ref)
|
|
|
59
68
|
iconSize = 'small',
|
|
60
69
|
iconType = 'solid',
|
|
61
70
|
ariaLabel,
|
|
62
|
-
onClick
|
|
71
|
+
onClick,
|
|
72
|
+
testId
|
|
63
73
|
} = _ref2;
|
|
64
74
|
const isDark = fill.includes('Dark');
|
|
65
75
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
66
|
-
"data-testid":
|
|
76
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
77
|
+
base: testId,
|
|
78
|
+
slot: 'root'
|
|
79
|
+
}),
|
|
67
80
|
style: {
|
|
68
81
|
'--wrapperBgColor': BADGE_COLOR[fill]
|
|
69
82
|
},
|
|
@@ -78,7 +91,11 @@ const IconBadge = exports.IconBadge = /*#__PURE__*/React.forwardRef((_ref2, ref)
|
|
|
78
91
|
className: (0, _classify.default)({
|
|
79
92
|
[_BadgeModule.default.dark]: isDark,
|
|
80
93
|
[_BadgeModule.default.light]: !isDark
|
|
81
|
-
}, classNames?.icon)
|
|
94
|
+
}, classNames?.icon),
|
|
95
|
+
testId: (0, _qa.generateTestId)({
|
|
96
|
+
base: testId,
|
|
97
|
+
slot: 'icon'
|
|
98
|
+
})
|
|
82
99
|
})
|
|
83
100
|
});
|
|
84
101
|
});
|
|
@@ -12,7 +12,8 @@ export interface BadgedIconProps {
|
|
|
12
12
|
ariaLabel?: string;
|
|
13
13
|
showBadge?: boolean;
|
|
14
14
|
classNames?: ClassNames;
|
|
15
|
+
testId?: string;
|
|
15
16
|
}
|
|
16
|
-
export declare const BadgedIcon: ({ name, showBadge, classNames, size, type, ariaLabel, }: BadgedIconProps) => React.JSX.Element;
|
|
17
|
+
export declare const BadgedIcon: ({ name, showBadge, classNames, size, type, ariaLabel, testId, }: BadgedIconProps) => React.JSX.Element;
|
|
17
18
|
export {};
|
|
18
19
|
//# sourceMappingURL=BadgedIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgedIcon.d.ts","sourceRoot":"","sources":["../../../src/components/BadgedIcon/BadgedIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BadgedIcon.d.ts","sourceRoot":"","sources":["../../../src/components/BadgedIcon/BadgedIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAO5D,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,GAAI,iEAQxB,eAAe,sBAyBjB,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.BadgedIcon = 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 _BadgedIconModule = _interopRequireDefault(require("./BadgedIcon.module.css"));
|
|
12
13
|
var _typographyModule = _interopRequireDefault(require("../../styles/typography.module.css"));
|
|
@@ -20,10 +21,15 @@ const BadgedIcon = _ref => {
|
|
|
20
21
|
classNames,
|
|
21
22
|
size = 'medium',
|
|
22
23
|
type = 'solid',
|
|
23
|
-
ariaLabel
|
|
24
|
+
ariaLabel,
|
|
25
|
+
testId
|
|
24
26
|
} = _ref;
|
|
25
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
26
28
|
children: !!name && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
29
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
30
|
+
base: testId,
|
|
31
|
+
slot: 'root'
|
|
32
|
+
}),
|
|
27
33
|
className: (0, _classify.default)(_BadgedIconModule.default.iconContainer, _BadgedIconModule.default[size], classNames?.wrapper),
|
|
28
34
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
29
35
|
ariaLabel: ariaLabel,
|
|
@@ -31,9 +37,17 @@ const BadgedIcon = _ref => {
|
|
|
31
37
|
className: classNames?.icon,
|
|
32
38
|
size: size === 'large' ? 'medium' : size,
|
|
33
39
|
type: type,
|
|
34
|
-
color: _typography.TEXT_COLORS.clickable
|
|
40
|
+
color: _typography.TEXT_COLORS.clickable,
|
|
41
|
+
testId: (0, _qa.generateTestId)({
|
|
42
|
+
base: testId,
|
|
43
|
+
slot: 'icon'
|
|
44
|
+
})
|
|
35
45
|
}), showBadge && /*#__PURE__*/(0, _jsxRuntime.jsx)(BadgeIcon, {
|
|
36
|
-
className: classNames?.badgeIcon
|
|
46
|
+
className: classNames?.badgeIcon,
|
|
47
|
+
testId: (0, _qa.generateTestId)({
|
|
48
|
+
base: testId,
|
|
49
|
+
slot: 'badge'
|
|
50
|
+
})
|
|
37
51
|
})]
|
|
38
52
|
})
|
|
39
53
|
});
|
|
@@ -41,9 +55,11 @@ const BadgedIcon = _ref => {
|
|
|
41
55
|
exports.BadgedIcon = BadgedIcon;
|
|
42
56
|
const BadgeIcon = _ref2 => {
|
|
43
57
|
let {
|
|
44
|
-
className
|
|
58
|
+
className,
|
|
59
|
+
testId
|
|
45
60
|
} = _ref2;
|
|
46
61
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
|
|
62
|
+
"data-testid": testId,
|
|
47
63
|
className: (0, _classify.default)(_BadgedIconModule.default.badgeIcon, _typographyModule.default[_typography.TEXT_COLORS['clickable']], className),
|
|
48
64
|
viewBox: "0 0 12 13",
|
|
49
65
|
fill: "none",
|
|
@@ -2,6 +2,7 @@ import type { Flow } from 'flow-to-typescript-codemod';
|
|
|
2
2
|
import type { InContextAlertProps } from '../../components/InContextAlert';
|
|
3
3
|
export interface BannerProps extends Omit<InContextAlertProps, 'alignment'> {
|
|
4
4
|
alignment?: 'top' | 'bottom';
|
|
5
|
+
testId?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare const Banner: Flow.AbstractComponent<BannerProps, HTMLDivElement>;
|
|
7
8
|
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/Banner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAKrD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,+BAA+B,CAAC;AAMvE,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC;IACzE,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/Banner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAKrD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,+BAA+B,CAAC;AAMvE,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC;IACzE,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,MAAM,EAAE,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,cAAc,CA4CpE,CAAC"}
|