@spaced-out/ui-design-system 0.5.11 → 0.5.12-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -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/ButtonTabs/ButtonTab/ButtonTab.d.ts +1 -0
- package/lib/components/ButtonTabs/ButtonTab/ButtonTab.d.ts.map +1 -1
- package/lib/components/ButtonTabs/ButtonTab/ButtonTab.js +2 -0
- package/lib/components/ButtonTabs/ButtonTabDropdown.d.ts +2 -1
- package/lib/components/ButtonTabs/ButtonTabDropdown.d.ts.map +1 -1
- package/lib/components/ButtonTabs/ButtonTabDropdown.js +19 -2
- package/lib/components/ButtonTabs/ButtonTabs.d.ts +1 -0
- package/lib/components/ButtonTabs/ButtonTabs.d.ts.map +1 -1
- package/lib/components/ButtonTabs/ButtonTabs.js +19 -4
- package/lib/components/Charts/ChartWrapper/ChartWrapper.d.ts +1 -0
- package/lib/components/Charts/ChartWrapper/ChartWrapper.d.ts.map +1 -1
- package/lib/components/Charts/ChartWrapper/ChartWrapper.js +37 -5
- package/lib/components/Charts/ColumnChart/ColumnChart.d.ts +2 -1
- package/lib/components/Charts/ColumnChart/ColumnChart.d.ts.map +1 -1
- package/lib/components/Charts/ColumnChart/ColumnChart.js +2 -0
- package/lib/components/Charts/DonutChart/DonutChart.d.ts +2 -1
- package/lib/components/Charts/DonutChart/DonutChart.d.ts.map +1 -1
- package/lib/components/Charts/DonutChart/DonutChart.js +2 -0
- package/lib/components/Charts/FunnelChart/FunnelChart.d.ts +2 -1
- package/lib/components/Charts/FunnelChart/FunnelChart.d.ts.map +1 -1
- package/lib/components/Charts/FunnelChart/FunnelChart.js +2 -0
- package/lib/components/Charts/LineChart/LineChart.d.ts +2 -1
- package/lib/components/Charts/LineChart/LineChart.d.ts.map +1 -1
- package/lib/components/Charts/LineChart/LineChart.js +2 -0
- package/lib/components/Charts/SankeyChart/SankeyChart.d.ts +2 -1
- package/lib/components/Charts/SankeyChart/SankeyChart.d.ts.map +1 -1
- package/lib/components/Charts/SankeyChart/SankeyChart.js +2 -0
- package/lib/components/Charts/SpiderChart/SpiderChart.d.ts +2 -1
- package/lib/components/Charts/SpiderChart/SpiderChart.d.ts.map +1 -1
- package/lib/components/Charts/SpiderChart/SpiderChart.js +2 -0
- package/lib/components/Charts/StackedBarChart/StackedBarChart.d.ts +2 -1
- package/lib/components/Charts/StackedBarChart/StackedBarChart.d.ts.map +1 -1
- package/lib/components/Charts/StackedBarChart/StackedBarChart.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/Combobox/Combobox.d.ts +1 -0
- package/lib/components/Combobox/Combobox.d.ts.map +1 -1
- package/lib/components/Combobox/Combobox.js +45 -3
- package/lib/components/DateRangePicker/Calendar.d.ts +2 -1
- package/lib/components/DateRangePicker/Calendar.d.ts.map +1 -1
- package/lib/components/DateRangePicker/Calendar.js +24 -2
- package/lib/components/DateRangePicker/DateRangePicker.d.ts +1 -0
- package/lib/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/lib/components/DateRangePicker/DateRangePicker.js +4 -2
- package/lib/components/DateRangePicker/DateRangeWrapper.d.ts +1 -0
- package/lib/components/DateRangePicker/DateRangeWrapper.d.ts.map +1 -1
- package/lib/components/DateRangePicker/DateRangeWrapper.js +104 -14
- package/lib/components/DateRangePicker/Day.d.ts +2 -1
- package/lib/components/DateRangePicker/Day.d.ts.map +1 -1
- package/lib/components/DateRangePicker/Day.js +11 -1
- 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/FilterButtonOverlay/FilterButtonOverlay.d.ts +1 -0
- package/lib/components/FilterButtonOverlay/FilterButtonOverlay.d.ts.map +1 -1
- package/lib/components/FilterButtonOverlay/FilterButtonOverlay.js +18 -1
- 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/InfinitePagination/InfinitePagination.d.ts +1 -0
- package/lib/components/InfinitePagination/InfinitePagination.d.ts.map +1 -1
- package/lib/components/InfinitePagination/InfinitePagination.js +20 -3
- package/lib/components/InlineDropdown/InlineDropdown.d.ts +1 -0
- package/lib/components/InlineDropdown/InlineDropdown.d.ts.map +1 -1
- package/lib/components/InlineDropdown/InlineDropdown.js +27 -2
- package/lib/components/InlineDropdown/SimpleInlineDropdown.d.ts +2 -1
- package/lib/components/InlineDropdown/SimpleInlineDropdown.d.ts.map +1 -1
- package/lib/components/InlineDropdown/SimpleInlineDropdown.js +2 -0
- 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/OptionButton/OptionButton.d.ts +1 -0
- package/lib/components/OptionButton/OptionButton.d.ts.map +1 -1
- package/lib/components/OptionButton/OptionButton.js +20 -2
- package/lib/components/OptionButton/SimpleOptionButton.d.ts +2 -1
- package/lib/components/OptionButton/SimpleOptionButton.d.ts.map +1 -1
- package/lib/components/OptionButton/SimpleOptionButton.js +2 -0
- 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/Pagination/Pagination.d.ts +2 -0
- package/lib/components/Pagination/Pagination.d.ts.map +1 -1
- package/lib/components/Pagination/Pagination.js +33 -3
- package/lib/components/Pagination/PaginationItem.d.ts.map +1 -1
- package/lib/components/Pagination/PaginationItem.js +31 -5
- 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/Table/Cell.d.ts +13 -7
- package/lib/components/Table/Cell.d.ts.map +1 -1
- package/lib/components/Table/Cell.js +40 -9
- package/lib/components/Table/DefaultRow.d.ts +5 -2
- package/lib/components/Table/DefaultRow.d.ts.map +1 -1
- package/lib/components/Table/DefaultRow.js +38 -6
- package/lib/components/Table/DefaultTableHeader.d.ts +2 -0
- package/lib/components/Table/DefaultTableHeader.d.ts.map +1 -1
- package/lib/components/Table/DefaultTableHeader.js +17 -2
- package/lib/components/Table/StaticTable.d.ts.map +1 -1
- package/lib/components/Table/StaticTable.js +45 -11
- package/lib/components/Table/Table.d.ts +1 -0
- package/lib/components/Table/Table.d.ts.map +1 -1
- package/lib/components/Table/Table.docs.d.ts +11 -0
- package/lib/components/Table/Table.docs.d.ts.map +1 -1
- package/lib/components/Table/Table.docs.js +11 -0
- package/lib/components/Table/Table.js +6 -3
- package/lib/components/Table/TableActionBar.d.ts +8 -3
- package/lib/components/Table/TableActionBar.d.ts.map +1 -1
- package/lib/components/Table/TableActionBar.js +16 -3
- package/lib/components/Table/TableBottomBar.d.ts +2 -1
- package/lib/components/Table/TableBottomBar.d.ts.map +1 -1
- package/lib/components/Table/TableBottomBar.js +6 -1
- package/lib/components/Table/TableTopBar.d.ts +2 -1
- package/lib/components/Table/TableTopBar.d.ts.map +1 -1
- package/lib/components/Table/TableTopBar.js +6 -1
- package/lib/components/Tabs/Tab/Tab.d.ts +1 -0
- package/lib/components/Tabs/Tab/Tab.d.ts.map +1 -1
- package/lib/components/Tabs/Tab/Tab.js +9 -1
- package/lib/components/Tabs/TabList/TabDropdown.d.ts +2 -1
- package/lib/components/Tabs/TabList/TabDropdown.d.ts.map +1 -1
- package/lib/components/Tabs/TabList/TabDropdown.js +21 -4
- package/lib/components/Tabs/TabList/TabList.d.ts +1 -0
- package/lib/components/Tabs/TabList/TabList.d.ts.map +1 -1
- package/lib/components/Tabs/TabList/TabList.js +20 -5
- 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 +14 -4
- package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts +1 -0
- package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts.map +1 -1
- package/lib/components/Timeline/TimelineItem/TimelineItem.js +44 -3
- 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/TokenListInput/TokenListInput.d.ts +1 -0
- package/lib/components/TokenListInput/TokenListInput.d.ts.map +1 -1
- package/lib/components/TokenListInput/TokenListInput.js +56 -7
- package/lib/components/TokenListInput/TokenValueChips.d.ts +2 -0
- package/lib/components/TokenListInput/TokenValueChips.d.ts.map +1 -1
- package/lib/components/TokenListInput/TokenValueChips.js +12 -3
- 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
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.PaginationItem = exports.PaginationButton = 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 _Text = require("../Text");
|
|
11
12
|
var _PaginationModule = _interopRequireDefault(require("./Pagination.module.css"));
|
|
@@ -18,7 +19,8 @@ const PaginationButton = props => {
|
|
|
18
19
|
onClick,
|
|
19
20
|
page,
|
|
20
21
|
selected,
|
|
21
|
-
type
|
|
22
|
+
type,
|
|
23
|
+
testId
|
|
22
24
|
} = props;
|
|
23
25
|
const paginationBtnRef = React.useRef(null);
|
|
24
26
|
React.useEffect(() => {
|
|
@@ -43,7 +45,11 @@ const PaginationButton = props => {
|
|
|
43
45
|
disabled: disabled,
|
|
44
46
|
ref: paginationBtnRef,
|
|
45
47
|
iconLeftName: "chevrons-left",
|
|
46
|
-
ariaLabel: "First page"
|
|
48
|
+
ariaLabel: "First page",
|
|
49
|
+
testId: (0, _qa.generateTestId)({
|
|
50
|
+
base: testId,
|
|
51
|
+
slot: 'first'
|
|
52
|
+
})
|
|
47
53
|
});
|
|
48
54
|
case 'previous':
|
|
49
55
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
|
|
@@ -61,7 +67,11 @@ const PaginationButton = props => {
|
|
|
61
67
|
disabled: disabled,
|
|
62
68
|
ref: paginationBtnRef,
|
|
63
69
|
iconLeftName: "chevron-left",
|
|
64
|
-
ariaLabel: "Previous page"
|
|
70
|
+
ariaLabel: "Previous page",
|
|
71
|
+
testId: (0, _qa.generateTestId)({
|
|
72
|
+
base: testId,
|
|
73
|
+
slot: 'previous'
|
|
74
|
+
})
|
|
65
75
|
});
|
|
66
76
|
case 'page':
|
|
67
77
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
|
|
@@ -76,12 +86,20 @@ const PaginationButton = props => {
|
|
|
76
86
|
disabled: disabled,
|
|
77
87
|
ref: paginationBtnRef,
|
|
78
88
|
tabIndex: selected ? -1 : 0,
|
|
89
|
+
testId: (0, _qa.generateTestId)({
|
|
90
|
+
base: testId,
|
|
91
|
+
slot: `page-${page}`
|
|
92
|
+
}),
|
|
79
93
|
children: page
|
|
80
94
|
});
|
|
81
95
|
case 'start-ellipsis':
|
|
82
96
|
case 'end-ellipsis':
|
|
83
97
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
84
98
|
className: (0, _classify.default)(_PaginationModule.default.separator),
|
|
99
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
100
|
+
base: testId,
|
|
101
|
+
slot: type
|
|
102
|
+
}),
|
|
85
103
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.ButtonTextSmall, {
|
|
86
104
|
color: "disabled",
|
|
87
105
|
children: "..."
|
|
@@ -103,7 +121,11 @@ const PaginationButton = props => {
|
|
|
103
121
|
disabled: disabled,
|
|
104
122
|
ref: paginationBtnRef,
|
|
105
123
|
iconLeftName: "chevron-right",
|
|
106
|
-
ariaLabel: "Next page"
|
|
124
|
+
ariaLabel: "Next page",
|
|
125
|
+
testId: (0, _qa.generateTestId)({
|
|
126
|
+
base: testId,
|
|
127
|
+
slot: 'next'
|
|
128
|
+
})
|
|
107
129
|
});
|
|
108
130
|
case 'last':
|
|
109
131
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
|
|
@@ -121,7 +143,11 @@ const PaginationButton = props => {
|
|
|
121
143
|
disabled: disabled,
|
|
122
144
|
ref: paginationBtnRef,
|
|
123
145
|
iconLeftName: "chevrons-right",
|
|
124
|
-
ariaLabel: "Last page"
|
|
146
|
+
ariaLabel: "Last page",
|
|
147
|
+
testId: (0, _qa.generateTestId)({
|
|
148
|
+
base: testId,
|
|
149
|
+
slot: 'last'
|
|
150
|
+
})
|
|
125
151
|
});
|
|
126
152
|
default:
|
|
127
153
|
break;
|
|
@@ -9,6 +9,7 @@ export interface PanelHeaderProps {
|
|
|
9
9
|
onCloseButtonClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
10
10
|
className?: string;
|
|
11
11
|
size?: 'medium' | 'small';
|
|
12
|
+
testId?: string;
|
|
12
13
|
}
|
|
13
14
|
type FooterClassNames = Readonly<{
|
|
14
15
|
wrapper?: string;
|
|
@@ -17,19 +18,22 @@ type FooterClassNames = Readonly<{
|
|
|
17
18
|
export interface PanelFooterProps {
|
|
18
19
|
children?: React.ReactNode;
|
|
19
20
|
classNames?: FooterClassNames;
|
|
21
|
+
testId?: string;
|
|
20
22
|
}
|
|
21
23
|
export interface PanelBodyProps {
|
|
22
24
|
children?: React.ReactNode;
|
|
23
25
|
className?: string;
|
|
26
|
+
testId?: string;
|
|
24
27
|
}
|
|
25
28
|
export interface PanelProps extends Omit<ModalProps, 'allowBackgroundInteraction' | 'size' | 'anchor'> {
|
|
26
29
|
allowBackgroundInteraction?: boolean;
|
|
27
30
|
size?: PanelSize;
|
|
28
31
|
anchor?: PanelAnchor;
|
|
32
|
+
testId?: string;
|
|
29
33
|
}
|
|
30
|
-
export declare const PanelHeader: ({ children, hideCloseBtn, onCloseButtonClick, className, size, }: PanelHeaderProps) => React.JSX.Element;
|
|
34
|
+
export declare const PanelHeader: ({ children, hideCloseBtn, onCloseButtonClick, className, size, testId, }: PanelHeaderProps) => React.JSX.Element;
|
|
31
35
|
export declare const PanelBody: Flow.AbstractComponent<PanelBodyProps, HTMLDivElement>;
|
|
32
|
-
export declare const PanelFooter: ({ children, classNames }: PanelFooterProps) => React.JSX.Element;
|
|
33
|
-
export declare const Panel: ({ children, isOpen, size, anchor, onClose, hideBackdrop, classNames, customAnimation, tapOutsideToClose, allowBackgroundInteraction, ...restPanelProps }: PanelProps) => React.JSX.Element;
|
|
36
|
+
export declare const PanelFooter: ({ children, classNames, testId, }: PanelFooterProps) => React.JSX.Element;
|
|
37
|
+
export declare const Panel: ({ children, isOpen, size, anchor, onClose, hideBackdrop, classNames, customAnimation, tapOutsideToClose, allowBackgroundInteraction, testId, ...restPanelProps }: PanelProps) => React.JSX.Element;
|
|
34
38
|
export {};
|
|
35
39
|
//# sourceMappingURL=Panel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../src/components/Panel/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../src/components/Panel/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAgBrD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAOrD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AACrD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kBAAkB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,KAAK,gBAAgB,GAAG,QAAQ,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,UAAU,EAAE,4BAA4B,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC1E,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAmBD,eAAO,MAAM,WAAW,GAAI,0EAOzB,gBAAgB,sBAyBlB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,cAAc,CAW1E,CAAC;AAEJ,eAAO,MAAM,WAAW,GAAI,mCAIzB,gBAAgB,sBAgBlB,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,kKAanB,UAAU,sBA2CZ,CAAC"}
|
|
@@ -9,6 +9,7 @@ var _useMountTransition = _interopRequireDefault(require("../../hooks/useMountTr
|
|
|
9
9
|
var _motion = require("../../styles/variables/_motion");
|
|
10
10
|
var _space = require("../../styles/variables/_space");
|
|
11
11
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
12
|
+
var _qa = require("../../utils/qa");
|
|
12
13
|
var _Button = require("../Button");
|
|
13
14
|
var _Modal = require("../Modal");
|
|
14
15
|
var _Truncate = require("../Truncate");
|
|
@@ -38,14 +39,23 @@ const PanelHeader = _ref => {
|
|
|
38
39
|
hideCloseBtn,
|
|
39
40
|
onCloseButtonClick,
|
|
40
41
|
className,
|
|
41
|
-
size
|
|
42
|
+
size,
|
|
43
|
+
testId
|
|
42
44
|
} = _ref;
|
|
43
45
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
44
46
|
children: React.Children.count(children) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
45
47
|
className: (0, _classify.default)(_PanelModule.default.panelHeader, className),
|
|
48
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
49
|
+
base: testId,
|
|
50
|
+
slot: 'header'
|
|
51
|
+
}),
|
|
46
52
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
47
53
|
className: _PanelModule.default.headerContent,
|
|
48
54
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Truncate.Truncate, {
|
|
55
|
+
testId: (0, _qa.generateTestId)({
|
|
56
|
+
base: testId,
|
|
57
|
+
slot: 'title'
|
|
58
|
+
}),
|
|
49
59
|
children: children
|
|
50
60
|
})
|
|
51
61
|
}), !hideCloseBtn && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
|
|
@@ -53,7 +63,11 @@ const PanelHeader = _ref => {
|
|
|
53
63
|
type: "ghost",
|
|
54
64
|
onClick: onCloseButtonClick,
|
|
55
65
|
ariaLabel: "Close Button",
|
|
56
|
-
size: size
|
|
66
|
+
size: size,
|
|
67
|
+
testId: (0, _qa.generateTestId)({
|
|
68
|
+
base: testId,
|
|
69
|
+
slot: 'close-button'
|
|
70
|
+
})
|
|
57
71
|
})]
|
|
58
72
|
})
|
|
59
73
|
});
|
|
@@ -62,24 +76,38 @@ exports.PanelHeader = PanelHeader;
|
|
|
62
76
|
const PanelBody = exports.PanelBody = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
63
77
|
let {
|
|
64
78
|
children,
|
|
65
|
-
className
|
|
79
|
+
className,
|
|
80
|
+
testId
|
|
66
81
|
} = _ref2;
|
|
67
82
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
68
83
|
ref: ref,
|
|
69
84
|
className: (0, _classify.default)(_PanelModule.default.panelBody, className),
|
|
85
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
86
|
+
base: testId,
|
|
87
|
+
slot: 'body'
|
|
88
|
+
}),
|
|
70
89
|
children: children
|
|
71
90
|
});
|
|
72
91
|
});
|
|
73
92
|
const PanelFooter = _ref3 => {
|
|
74
93
|
let {
|
|
75
94
|
children,
|
|
76
|
-
classNames
|
|
95
|
+
classNames,
|
|
96
|
+
testId
|
|
77
97
|
} = _ref3;
|
|
78
98
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
79
99
|
children: React.Children.count(children) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
80
100
|
className: (0, _classify.default)(_PanelModule.default.panelFooter, classNames?.wrapper),
|
|
101
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
102
|
+
base: testId,
|
|
103
|
+
slot: 'footer'
|
|
104
|
+
}),
|
|
81
105
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
82
106
|
className: (0, _classify.default)(_PanelModule.default.panelFooterActions, classNames?.actions),
|
|
107
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
108
|
+
base: testId,
|
|
109
|
+
slot: 'actions'
|
|
110
|
+
}),
|
|
83
111
|
children: children
|
|
84
112
|
})
|
|
85
113
|
})
|
|
@@ -98,6 +126,7 @@ const Panel = _ref4 => {
|
|
|
98
126
|
customAnimation,
|
|
99
127
|
tapOutsideToClose = true,
|
|
100
128
|
allowBackgroundInteraction,
|
|
129
|
+
testId,
|
|
101
130
|
...restPanelProps
|
|
102
131
|
} = _ref4;
|
|
103
132
|
const isTransitioning = (0, _useMountTransition.default)(isOpen, parseInt(_motion.motionDurationNormal));
|
|
@@ -108,6 +137,7 @@ const Panel = _ref4 => {
|
|
|
108
137
|
hideBackdrop: hideBackdrop,
|
|
109
138
|
tapOutsideToClose: allowBackgroundInteraction ? false : tapOutsideToClose,
|
|
110
139
|
allowBackgroundInteraction: allowBackgroundInteraction,
|
|
140
|
+
testId: testId,
|
|
111
141
|
...restPanelProps,
|
|
112
142
|
classNames: {
|
|
113
143
|
container: (0, _classify.default)(_PanelModule.default.panelContainer, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressDonut.d.ts","sourceRoot":"","sources":["../../../src/components/ProgressDonut/ProgressDonut.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"ProgressDonut.d.ts","sourceRoot":"","sources":["../../../src/components/ProgressDonut/ProgressDonut.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAkBtD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAcD,eAAO,MAAM,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAChD,kBAAkB,EAClB,cAAc,CAuEf,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.ProgressDonut = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var COLORS = _interopRequireWildcard(require("../../styles/variables/_color"));
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
10
|
+
var _qa = require("../../utils/qa");
|
|
10
11
|
var _Text = require("../Text");
|
|
11
12
|
var _ProgressDonutModule = _interopRequireDefault(require("./ProgressDonut.module.css"));
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -35,7 +36,8 @@ const ProgressDonut = exports.ProgressDonut = /*#__PURE__*/React.forwardRef((_re
|
|
|
35
36
|
let {
|
|
36
37
|
classNames,
|
|
37
38
|
percentage = 0,
|
|
38
|
-
color
|
|
39
|
+
color,
|
|
40
|
+
testId
|
|
39
41
|
} = _ref;
|
|
40
42
|
const donutPercentage = React.useMemo(() => Math.min(Math.max(percentage, MIN_PERCENTAGE), MAX_PERCENTAGE), [percentage]);
|
|
41
43
|
const donutColor = React.useMemo(() => getProgressDonutColor(donutPercentage), [donutPercentage]);
|
|
@@ -44,7 +46,10 @@ const ProgressDonut = exports.ProgressDonut = /*#__PURE__*/React.forwardRef((_re
|
|
|
44
46
|
const offset = React.useMemo(() => circumference - donutPercentage / MAX_PERCENTAGE * circumference, [circumference, donutPercentage]);
|
|
45
47
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
46
48
|
ref: ref,
|
|
47
|
-
"data-testid":
|
|
49
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
50
|
+
base: testId,
|
|
51
|
+
slot: 'progressDonut'
|
|
52
|
+
}),
|
|
48
53
|
className: (0, _classify.default)(_ProgressDonutModule.default.wrapper, classNames?.wrapper),
|
|
49
54
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
50
55
|
className: _ProgressDonutModule.default.donutChart,
|
|
@@ -72,6 +77,10 @@ const ProgressDonut = exports.ProgressDonut = /*#__PURE__*/React.forwardRef((_re
|
|
|
72
77
|
})]
|
|
73
78
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodyLargeBold, {
|
|
74
79
|
className: _ProgressDonutModule.default.donutChartPercentage,
|
|
80
|
+
testId: (0, _qa.generateTestId)({
|
|
81
|
+
base: testId,
|
|
82
|
+
slot: 'percentage'
|
|
83
|
+
}),
|
|
75
84
|
children: `${donutPercentage}%`
|
|
76
85
|
})]
|
|
77
86
|
})
|
|
@@ -18,6 +18,7 @@ export declare const PROMPT_CHIP_TYPE: Readonly<{
|
|
|
18
18
|
export type PromptChipType = (typeof PROMPT_CHIP_TYPE)[keyof typeof PROMPT_CHIP_TYPE];
|
|
19
19
|
export type PromptChipProps = {
|
|
20
20
|
classNames?: ClassNames;
|
|
21
|
+
testId?: string;
|
|
21
22
|
} & ({
|
|
22
23
|
onDismiss?: (e: React.SyntheticEvent<HTMLElement>) => unknown;
|
|
23
24
|
dismissable: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromptChip.d.ts","sourceRoot":"","sources":["../../../src/components/PromptChip/PromptChip.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;
|
|
1
|
+
{"version":3,"file":"PromptChip.d.ts","sourceRoot":"","sources":["../../../src/components/PromptChip/PromptChip.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;AAMrD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAElD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AAM7D,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;EAG3B,CAAC;AAEH,MAAM,MAAM,cAAc,GACxB,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAC3D,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,CACA;IACE,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,OAAO,CAAC;IAC9D,WAAW,EAAE,IAAI,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GACD;IACE,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CACJ,GAAG;IACA,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,OAAO,CAAC,EACJ,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,OAAO,CAAC,GACtD,IAAI,GACJ,SAAS,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAEJ,eAAO,MAAM,UAAU,EAAE,IAAI,CAAC,iBAAiB,CAC7C,eAAe,EACf,cAAc,CA6If,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.PromptChip = exports.PROMPT_CHIP_TYPE = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _typography = require("../../types/typography");
|
|
9
9
|
var _classify = require("../../utils/classify");
|
|
10
|
+
var _qa = require("../../utils/qa");
|
|
10
11
|
var _ConditionalWrapper = require("../ConditionalWrapper");
|
|
11
12
|
var _Icon = require("../Icon");
|
|
12
13
|
var _Tooltip = require("../Tooltip");
|
|
@@ -30,7 +31,8 @@ const PromptChip = exports.PromptChip = /*#__PURE__*/React.forwardRef((props, re
|
|
|
30
31
|
classNames,
|
|
31
32
|
dismissable,
|
|
32
33
|
showInfoIcon,
|
|
33
|
-
infoIconTooltip
|
|
34
|
+
infoIconTooltip,
|
|
35
|
+
testId
|
|
34
36
|
} = props;
|
|
35
37
|
// Type narrowing to safely access properties only when they exist
|
|
36
38
|
const onDismiss = dismissable === true && 'onDismiss' in props ? props.onDismiss : undefined;
|
|
@@ -46,7 +48,10 @@ const PromptChip = exports.PromptChip = /*#__PURE__*/React.forwardRef((props, re
|
|
|
46
48
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
47
49
|
children: !dismissed && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
48
50
|
ref: ref,
|
|
49
|
-
"data-testid":
|
|
51
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
52
|
+
base: testId,
|
|
53
|
+
slot: 'root'
|
|
54
|
+
}),
|
|
50
55
|
className: (0, _classify.classify)(_PromptChipModule.default.promptChipWrapper, {
|
|
51
56
|
[_PromptChipModule.default.primary]: type === PROMPT_CHIP_TYPE.primary,
|
|
52
57
|
[_PromptChipModule.default.secondary]: type === PROMPT_CHIP_TYPE.secondary
|
|
@@ -60,8 +65,16 @@ const PromptChip = exports.PromptChip = /*#__PURE__*/React.forwardRef((props, re
|
|
|
60
65
|
className: (0, _classify.classify)(_PromptChipModule.default.promptChipContainer, {
|
|
61
66
|
[_PromptChipModule.default.promptChipContainerHover]: !!onClick
|
|
62
67
|
}, classNames?.container),
|
|
68
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
69
|
+
base: testId,
|
|
70
|
+
slot: 'content'
|
|
71
|
+
}),
|
|
63
72
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
64
73
|
className: (0, _classify.classify)(_PromptChipModule.default.leftSection, classNames?.leftSlot),
|
|
74
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
75
|
+
base: testId,
|
|
76
|
+
slot: 'left'
|
|
77
|
+
}),
|
|
65
78
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
66
79
|
size: _Icon.ICON_SIZE.small,
|
|
67
80
|
name: iconName,
|
|
@@ -69,30 +82,54 @@ const PromptChip = exports.PromptChip = /*#__PURE__*/React.forwardRef((props, re
|
|
|
69
82
|
color: iconColor,
|
|
70
83
|
className: (0, _classify.classify)({
|
|
71
84
|
[_PromptChipModule.default.chipIconDefaultColor]: !iconColor
|
|
72
|
-
}, classNames?.icon)
|
|
85
|
+
}, classNames?.icon),
|
|
86
|
+
testId: (0, _qa.generateTestId)({
|
|
87
|
+
base: testId,
|
|
88
|
+
slot: 'icon'
|
|
89
|
+
})
|
|
73
90
|
}), !!children && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
74
91
|
className: (0, _classify.classify)(_PromptChipModule.default.childrenWrapper, classNames?.children),
|
|
92
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
93
|
+
base: testId,
|
|
94
|
+
slot: 'text'
|
|
95
|
+
}),
|
|
75
96
|
children: children
|
|
76
97
|
})]
|
|
77
98
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
78
99
|
className: (0, _classify.classify)(_PromptChipModule.default.rightSection, classNames?.rightSlot),
|
|
100
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
101
|
+
base: testId,
|
|
102
|
+
slot: 'right'
|
|
103
|
+
}),
|
|
79
104
|
children: [rightSlot ? rightSlot : null, !!showInfoIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConditionalWrapper.ConditionalWrapper, {
|
|
80
105
|
condition: infoIconTooltip && typeof infoIconTooltip === 'object' && Object.keys(infoIconTooltip).length > 0,
|
|
81
106
|
wrapper: children => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
|
|
82
107
|
...infoIconTooltip,
|
|
108
|
+
testId: (0, _qa.generateTestId)({
|
|
109
|
+
base: testId,
|
|
110
|
+
slot: 'tooltip'
|
|
111
|
+
}),
|
|
83
112
|
children: children
|
|
84
113
|
}),
|
|
85
114
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
86
115
|
size: _Icon.ICON_SIZE.small,
|
|
87
116
|
name: "info-circle",
|
|
88
117
|
color: _typography.TEXT_COLORS.primary,
|
|
89
|
-
className: classNames?.icon
|
|
118
|
+
className: classNames?.icon,
|
|
119
|
+
testId: (0, _qa.generateTestId)({
|
|
120
|
+
base: testId,
|
|
121
|
+
slot: 'info-icon'
|
|
122
|
+
})
|
|
90
123
|
})
|
|
91
124
|
}), !!dismissable && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.CloseIcon, {
|
|
92
125
|
size: _Icon.ICON_SIZE.small,
|
|
93
126
|
onClick: closeClickHandler,
|
|
94
127
|
ariaLabel: "Dismiss",
|
|
95
|
-
className: _PromptChipModule.default.dismissIcon
|
|
128
|
+
className: _PromptChipModule.default.dismissIcon,
|
|
129
|
+
testId: (0, _qa.generateTestId)({
|
|
130
|
+
base: testId,
|
|
131
|
+
slot: 'dismiss'
|
|
132
|
+
})
|
|
96
133
|
})]
|
|
97
134
|
})]
|
|
98
135
|
})
|
|
@@ -32,6 +32,7 @@ export interface PromptInputProps {
|
|
|
32
32
|
isButtonLoading?: boolean;
|
|
33
33
|
buttonIconLeftName?: string;
|
|
34
34
|
buttonIconLeftType?: IconType;
|
|
35
|
+
testId?: string;
|
|
35
36
|
}
|
|
36
37
|
export declare const PromptInput: Flow.AbstractComponent<PromptInputProps, HTMLDivElement>;
|
|
37
38
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../src/components/PromptInput/PromptInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../src/components/PromptInput/PromptInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAOrD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAiBlD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAEH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CACd,GAAG,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,EAC3C,OAAO,CAAC,EAAE,OAAO,KACd,OAAO,CAAC;IACb,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,KAAK,OAAO,CAAC;IACrE,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,KAAK,OAAO,CAAC;IACpE,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,KAAK,OAAO,CAAC;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,QAAQ,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,EAAE,IAAI,CAAC,iBAAiB,CAC9C,gBAAgB,EAChB,cAAc,CAkIf,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.PromptInput = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _size = require("../../styles/variables/_size");
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
10
|
+
var _qa = require("../../utils/qa");
|
|
10
11
|
var _Button = require("../Button");
|
|
11
12
|
var _Icon = require("../Icon");
|
|
12
13
|
var _Text = require("../Text");
|
|
@@ -46,7 +47,8 @@ const PromptInput = exports.PromptInput = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
46
47
|
buttonAriaLabel = CONSTANTS.BUTTON_ARIA_LABEL,
|
|
47
48
|
isButtonLoading,
|
|
48
49
|
buttonIconLeftName = CONSTANTS.BUTTON_ICON,
|
|
49
|
-
buttonIconLeftType = _Icon.ICON_TYPE.solid
|
|
50
|
+
buttonIconLeftType = _Icon.ICON_TYPE.solid,
|
|
51
|
+
testId
|
|
50
52
|
} = _ref;
|
|
51
53
|
const textareaRef = React.useRef(null);
|
|
52
54
|
const handleInput = () => {
|
|
@@ -73,7 +75,10 @@ const PromptInput = exports.PromptInput = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
73
75
|
}, [value, textCountLimit]);
|
|
74
76
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
75
77
|
ref: ref,
|
|
76
|
-
"data-testid":
|
|
78
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
79
|
+
base: testId,
|
|
80
|
+
slot: 'wrapper'
|
|
81
|
+
}),
|
|
77
82
|
className: (0, _classify.default)(_PromptInputModule.default.wrapper, {
|
|
78
83
|
[_PromptInputModule.default.styledPromptContainer]: withPadding
|
|
79
84
|
}, classNames?.wrapper),
|
|
@@ -96,7 +101,11 @@ const PromptInput = exports.PromptInput = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
96
101
|
locked: inputLocked,
|
|
97
102
|
error: inputError || textCountError,
|
|
98
103
|
errorText: inputErrorText,
|
|
99
|
-
rows: CONSTANTS.TEXT_AREA_ROWS
|
|
104
|
+
rows: CONSTANTS.TEXT_AREA_ROWS,
|
|
105
|
+
testId: (0, _qa.generateTestId)({
|
|
106
|
+
base: testId,
|
|
107
|
+
slot: 'textarea'
|
|
108
|
+
})
|
|
100
109
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
|
|
101
110
|
iconLeftName: buttonIconLeftName,
|
|
102
111
|
iconLeftType: buttonIconLeftType,
|
|
@@ -110,16 +119,28 @@ const PromptInput = exports.PromptInput = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
110
119
|
icon: classNames?.buttonIcon,
|
|
111
120
|
text: classNames?.buttonText
|
|
112
121
|
},
|
|
122
|
+
testId: (0, _qa.generateTestId)({
|
|
123
|
+
base: testId,
|
|
124
|
+
slot: 'button'
|
|
125
|
+
}),
|
|
113
126
|
children: buttonText
|
|
114
127
|
})]
|
|
115
128
|
}), (!!helperContent || !!textCountLimit) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
116
129
|
className: _PromptInputModule.default.secondaryRow,
|
|
117
130
|
children: [typeof helperContent === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodySmallBold, {
|
|
118
131
|
color: inputDisabled ? 'disabled' : 'secondary',
|
|
132
|
+
testId: (0, _qa.generateTestId)({
|
|
133
|
+
base: testId,
|
|
134
|
+
slot: 'helper-text'
|
|
135
|
+
}),
|
|
119
136
|
children: helperContent
|
|
120
137
|
}) : helperContent, /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.FormLabelSmall, {
|
|
121
138
|
color: inputError || textCountError ? 'danger' : 'secondary',
|
|
122
139
|
className: _PromptInputModule.default.textCounter,
|
|
140
|
+
testId: (0, _qa.generateTestId)({
|
|
141
|
+
base: testId,
|
|
142
|
+
slot: 'text-counter'
|
|
143
|
+
}),
|
|
123
144
|
children: !!textCountLimit && (value && value.length || 0) + '/' + textCountLimit
|
|
124
145
|
})]
|
|
125
146
|
})]
|
|
@@ -25,6 +25,7 @@ export interface RadioButtonProps extends Omit<React.InputHTMLAttributes<HTMLInp
|
|
|
25
25
|
onChange?: (newValue: string) => unknown;
|
|
26
26
|
tabIndex?: number;
|
|
27
27
|
ariaLabel?: string;
|
|
28
|
+
testId?: string;
|
|
28
29
|
}
|
|
29
30
|
export declare const RadioButton: Flow.AbstractComponent<RadioButtonProps, HTMLInputElement>;
|
|
30
31
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.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,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.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,kBAAkB,CAAC;AAMjD;;;;;GAKG;AACH,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH,MAAM,WAAW,gBACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EACzC,UAAU,GACV,OAAO,GACP,UAAU,GACV,SAAS,GACT,MAAM,GACN,eAAe,GACf,OAAO,GACP,YAAY,GACZ,OAAO,GACP,UAAU,GACV,UAAU,GACV,WAAW,CACd;IACD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,EAAE,IAAI,CAAC,iBAAiB,CAC9C,gBAAgB,EAChB,gBAAgB,CA6GjB,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.RadioButton = 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 _RadioButtonModule = _interopRequireDefault(require("./RadioButton.module.css"));
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -31,6 +32,7 @@ const RadioButton = exports.RadioButton = /*#__PURE__*/React.forwardRef((_ref, f
|
|
|
31
32
|
error = false,
|
|
32
33
|
tabIndex = 0,
|
|
33
34
|
ariaLabel = '',
|
|
35
|
+
testId,
|
|
34
36
|
...props
|
|
35
37
|
} = _ref;
|
|
36
38
|
const radioInput = /*#__PURE__*/React.createRef();
|
|
@@ -55,6 +57,10 @@ const RadioButton = exports.RadioButton = /*#__PURE__*/React.forwardRef((_ref, f
|
|
|
55
57
|
}
|
|
56
58
|
};
|
|
57
59
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
60
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
61
|
+
base: testId,
|
|
62
|
+
slot: 'radioButton'
|
|
63
|
+
}),
|
|
58
64
|
className: (0, _classify.default)(_RadioButtonModule.default.container, {
|
|
59
65
|
[_RadioButtonModule.default.horizontalRadioButton]: align === 'horizontal-fixed',
|
|
60
66
|
[_RadioButtonModule.default.fluidRadioButton]: align === 'horizontal-fluid',
|
|
@@ -63,6 +69,10 @@ const RadioButton = exports.RadioButton = /*#__PURE__*/React.forwardRef((_ref, f
|
|
|
63
69
|
onClick: onWrapClickHandler,
|
|
64
70
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
65
71
|
type: "radio",
|
|
72
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
73
|
+
base: testId,
|
|
74
|
+
slot: 'input'
|
|
75
|
+
}),
|
|
66
76
|
checked: checked,
|
|
67
77
|
disabled: disabled,
|
|
68
78
|
className: (0, _classify.default)(_RadioButtonModule.default.radio, {
|
|
@@ -80,6 +90,10 @@ const RadioButton = exports.RadioButton = /*#__PURE__*/React.forwardRef((_ref, f
|
|
|
80
90
|
"aria-label": ariaLabel || children,
|
|
81
91
|
...props
|
|
82
92
|
}), React.Children.count(children) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
93
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
94
|
+
base: testId,
|
|
95
|
+
slot: 'label'
|
|
96
|
+
}),
|
|
83
97
|
color: "secondary",
|
|
84
98
|
className: (0, _classify.default)(_RadioButtonModule.default.radioLabel, {
|
|
85
99
|
[_RadioButtonModule.default.labelDisabled]: disabled
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioGroup.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,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioGroup.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,kBAAkB,CAAC;AAmBjD;;;;;GAKG;AACH,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,EAAE,IAAI,CAAC,iBAAiB,CAC7C,eAAe,EACf,cAAc,CAsEf,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.RadioGroup = 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 _Text = require("../Text/Text");
|
|
10
11
|
var _RadioGroupModule = _interopRequireDefault(require("./RadioGroup.module.css"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -29,7 +30,8 @@ const RadioGroup = exports.RadioGroup = /*#__PURE__*/React.forwardRef((_ref, for
|
|
|
29
30
|
children,
|
|
30
31
|
classNames,
|
|
31
32
|
error = false,
|
|
32
|
-
errorText = ''
|
|
33
|
+
errorText = '',
|
|
34
|
+
testId
|
|
33
35
|
} = _ref;
|
|
34
36
|
const onChangeHandler = value => {
|
|
35
37
|
if (onChange) {
|
|
@@ -43,14 +45,23 @@ const RadioGroup = exports.RadioGroup = /*#__PURE__*/React.forwardRef((_ref, for
|
|
|
43
45
|
selectedValue: value,
|
|
44
46
|
onChange: onChangeHandler,
|
|
45
47
|
align,
|
|
46
|
-
error
|
|
48
|
+
error,
|
|
49
|
+
testId // Pass testId to child RadioButton components
|
|
47
50
|
});
|
|
48
51
|
}
|
|
49
52
|
return child;
|
|
50
53
|
});
|
|
51
54
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
55
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
56
|
+
base: testId,
|
|
57
|
+
slot: 'radioGroup'
|
|
58
|
+
}),
|
|
52
59
|
className: (0, _classify.default)(_RadioGroupModule.default.radioGroupContainer, classNames?.wrapper),
|
|
53
60
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
61
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
62
|
+
base: testId,
|
|
63
|
+
slot: 'radioGroupContainer'
|
|
64
|
+
}),
|
|
54
65
|
className: (0, _classify.default)({
|
|
55
66
|
[_RadioGroupModule.default.vertical]: align === 'vertical',
|
|
56
67
|
[_RadioGroupModule.default.horizontal]: align === 'horizontal-fixed',
|
|
@@ -61,6 +72,10 @@ const RadioGroup = exports.RadioGroup = /*#__PURE__*/React.forwardRef((_ref, for
|
|
|
61
72
|
}), error && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodySmall, {
|
|
62
73
|
color: "danger",
|
|
63
74
|
className: classNames?.errorText,
|
|
75
|
+
testId: (0, _qa.generateTestId)({
|
|
76
|
+
base: testId,
|
|
77
|
+
slot: 'errorText'
|
|
78
|
+
}),
|
|
64
79
|
children: errorText
|
|
65
80
|
})]
|
|
66
81
|
});
|